@zuplo/core 5.2179.0 → 5.2181.0

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/index.minified.js CHANGED
@@ -82,11 +82,11 @@ export default {
82
82
  return handler.requestHandler(request, env, ctx)
83
83
  },
84
84
  };
85
- `,vje=s(async function({systemDirectory:e,logger:t,config:r}){return Eje.default.timeFn("Generating Worker shim",async()=>{t.debug("Generating Worker shim");let n=r?.flags?.esmWorker?Sje:bje,i=yje.default.join(e,Jg.WORKER_ENTRY_NAME);try{await gje.default.writeFile(i,n.trimStart(),"utf-8")}catch(o){t.error(o);let a={message:`Error creating file at ${i}`,pluginName:"generate-worker-entry",severity:"error"};return{warnings:[],errors:[a]}}return{warnings:[],errors:[]}})},"generateWorker");oh.generateWorker=vje});var nH=h(ah=>{"use strict";var o$=ah&&ah.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ah,"__esModule",{value:!0});ah.validateDevPortalJSON=void 0;var Oje=o$(_n()),Zs=Yo(),Pje=require("fs/promises"),eH=o$(require("path")),tH=kt(),wje=rc(),Ije=o$(mn()),Tje="validate-dev-portal-json",Nje=s(async function({logger:e,sourceDirectory:t}){return Ije.default.timeFn("Validate dev-portal.json file",async()=>{e.debug("Validate dev-portal.json file");let r=eH.default.join(t,tH.USER_CONFIG_DIR_NAME),n=eH.default.join(r,tH.DEV_PORTAL_CONFIG_FILE);if(!await Oje.default.fileExists(n))return e.debug("Project is missing a dev-portal.json file. Skipping validate-dev-portal-json plugin."),new wje.PluginResult;let i=[],o=await(0,Pje.readFile)(n,"utf-8"),a=JSON.parse(o);if(a.enableAuthentication&&a.authentication){let{provider:u}=a.authentication;if(u&&u!=="auth0"&&u!=="okta"&&u!=="azure-ad"&&u!=="clerk"&&u!=="oidc"&&u!=="external"&&i.push({message:"The authentication setting 'provider' is not set or invalid. Valid values are 'auth0', 'okta', 'azure-ad', 'clerk', 'oidc', or 'external'.",pluginName:"validate-dev-portal-json",severity:"warning"}),u==="external"){let{loginUrl:c,logoutUrl:l}=a.authentication;(0,Zs.isNonWhitespaceString)(c)?c.startsWith("$env(")&&!c.startsWith("$env(ZUPLO_PUBLIC_")&&i.push({message:"'loginUrl' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The authentication setting for 'loginUrl' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),(0,Zs.isNonWhitespaceString)(l)?l.startsWith("$env(")&&!l.startsWith("$env(ZUPLO_PUBLIC_")&&i.push({message:"'logoutUrl' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The authentication setting for 'logoutUrl' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"})}else if("authority"in a.authentication){let{authority:c}=a.authentication;if(!a.authentication.devPortalClient)i.push({message:"The authentication setting for 'devPortalClient' is not set. This property is required when 'authority' is also set.",pluginName:"validate-dev-portal-json",severity:"warning"});else{let{clientId:l,audience:f}=a.authentication.devPortalClient;(0,Zs.isNonWhitespaceString)(c)?c.startsWith("$env(")&&!c.startsWith("$env(ZUPLO_PUBLIC_")&&i.push({message:"'authority' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The authentication setting for 'authority' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),i.push(...rH({audience:f,clientId:l}))}}else if("issuer"in a.authentication){let{issuer:c,clientId:l,clientSecret:f,audience:d}=a.authentication;(0,Zs.isNonWhitespaceString)(c)?c.startsWith("$env(")&&!c.startsWith("$env(ZUPLO_PUBLIC_")&&i.push({message:"'issuer' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The authentication setting for 'issuer' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),i.push(...rH({audience:d,clientId:l,clientSecret:f}))}else throw new Zs.BuildIssueError({message:"The dev-portal.json is not valid. The 'authentication' section does not have required fields.",severity:"error"},Tje)}if(a.enableMonetization&&a.monetization){let{provider:u}=a.monetization;if((!(0,Zs.isNonWhitespaceString)(u)||u!=="stripe")&&i.push({message:"The monetization setting 'provider' is not set or an empty string. Valid values are 'stripe'.",pluginName:"validate-dev-portal-json",severity:"warning"}),u==="stripe"){let{pricingTableId:c,publishableKey:l,secretKey:f}=a.monetization;(0,Zs.isNonWhitespaceString)(c)?c.startsWith("$env(")?c.startsWith("$env(ZUPLO_PUBLIC_")||i.push({message:"'Pricing Table Id' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration. Field monetization.pricingTableId in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):c.startsWith("prctbl_")||i.push({message:"'Pricing Table Id' field must start with prctbl_. Field monetization.pricingTableId in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The monetization setting for 'Pricing Table Id' is not set or is an empty string. Field monetization.pricingTableId in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}),(0,Zs.isNonWhitespaceString)(l)?l.startsWith("$env(")?l.startsWith("$env(ZUPLO_PUBLIC_")||i.push({message:"'Publishable Key' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration. Field monetization.publishableKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):l.startsWith("pk_")||i.push({message:"'Publishable Key' field must start with pk_. Field monetization.publishableKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The monetization setting for 'Publishable Key' is not set or is an empty string. Field monetization.publishableKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}),(0,Zs.isNonWhitespaceString)(f)?f.startsWith("$env(")||i.push({message:"The monetization setting for 'Secret Key' must be an environment variable. Field monetization.secretKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The monetization setting for 'Secret Key' is not set or is an empty string. Field monetization.secretKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"})}}else a.enableMonetization&&!a.monetization&&i.push({message:"Monetization was enabled but no monetization configuration was provider in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"});return{errors:[],warnings:i}})},"validateDevPortalJSON");ah.validateDevPortalJSON=Nje;function rH({audience:e,clientId:t,clientSecret:r}){let n=[];return e&&e.startsWith("$env(")&&!e.startsWith("$env(ZUPLO_PUBLIC_")&&n.push({message:"'audience' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}),(0,Zs.isNonWhitespaceString)(t)?t.startsWith("$env(")&&!t.startsWith("$env(ZUPLO_PUBLIC_")&&n.push({message:"'clientId' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):n.push({message:"The authentication setting for 'clientId' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),(0,Zs.isNonWhitespaceString)(r)&&!r.startsWith("$env(")&&n.push({message:"The authorization setting for 'Client Secret' must be an environment variable. Field authentication.devPortalClient.secretKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}),n}s(rH,"validateCommonAuth")});var f$=h(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});var Aje="[",Rje="]",Cje="{",$je="}",Dje=":",Lje=",",uH="true",cH="false",lH="null",iH='"',jje=new Map([["t",uH],["f",cH],["n",lH]]),u$=new Map([[iH,iH],["\\","\\"],["/","/"],["b","\b"],["n",`
86
- `],["f","\f"],["r","\r"],["t"," "]]),a$=new Map([[Aje,"Punctuator"],[Rje,"Punctuator"],[Cje,"Punctuator"],[$je,"Punctuator"],[Dje,"Punctuator"],[Lje,"Punctuator"],[uH,"Boolean"],[cH,"Boolean"],[lH,"Null"]]),Uf=class extends Error{static{s(this,"ErrorWithLocation")}constructor(t,{line:r,column:n,index:i}){super(`${t} (${r}:${n})`),this.line=r,this.column=n,this.index=i}},c$=class extends Uf{static{s(this,"UnexpectedChar")}constructor(t,r){super(`Unexpected character ${t} found.`,r)}},uh=class extends Uf{static{s(this,"UnexpectedToken")}constructor(t){super(`Unexpected token ${t.type}(${t.value}) found.`,t.loc.start)}},l$=class extends Uf{static{s(this,"UnexpectedEOF")}constructor(t){super("Unexpected end of input found.",t)}},sH='"',oH="/",aH="*",Mje={comments:!1,ranges:!1};function Uje(e){return/[\s\n]/.test(e)}s(Uje,"isWhitespace");function sc(e){return e>="0"&&e<="9"}s(sc,"isDigit");function xje(e){return sc(e)||/[a-f]/i.test(e)}s(xje,"isHexDigit");function qje(e){return e>="1"&&e<="9"}s(qje,"isPositiveDigit");function Fje(e){return/[tfn]/.test(e)}s(Fje,"isKeywordStart");function kje(e){return sc(e)||e==="."||e==="-"}s(kje,"isNumberStart");function fH(e,t){t=Object.freeze({...Mje,...t});let r=-1,n=1,i=0,o=!1,a=[];function u(E,S,O,P){let I=O.offset+S.length,j=t.ranges?{range:[O.offset,I]}:void 0;return{type:E,value:S,loc:{start:O,end:P||{line:O.line,column:O.column+S.length,offset:I}},...j}}s(u,"createToken");function c(){let E=e.charAt(++r);return o?(n++,i=1,o=!1):i++,E==="\r"?(o=!0,e.charAt(r+1)===`
85
+ `,vje=s(async function({systemDirectory:e,logger:t,config:r}){return Eje.default.timeFn("Generating Worker shim",async()=>{t.debug("Generating Worker shim");let n=r?.flags?.esmWorker?Sje:bje,i=yje.default.join(e,Jg.WORKER_ENTRY_NAME);try{await gje.default.writeFile(i,n.trimStart(),"utf-8")}catch(o){t.error(o);let a={message:`Error creating file at ${i}`,pluginName:"generate-worker-entry",severity:"error"};return{warnings:[],errors:[a]}}return{warnings:[],errors:[]}})},"generateWorker");oh.generateWorker=vje});var nH=h(ah=>{"use strict";var o$=ah&&ah.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ah,"__esModule",{value:!0});ah.validateDevPortalJSON=void 0;var Oje=o$(_n()),Zs=Yo(),Pje=require("fs/promises"),eH=o$(require("path")),tH=kt(),wje=rc(),Ije=o$(mn()),Tje="validate-dev-portal-json",Nje=s(async function({logger:e,sourceDirectory:t}){return Ije.default.timeFn("Validate dev-portal.json file",async()=>{e.debug("Validate dev-portal.json file");let r=eH.default.join(t,tH.USER_CONFIG_DIR_NAME),n=eH.default.join(r,tH.DEV_PORTAL_CONFIG_FILE);if(!await Oje.default.fileExists(n))return e.debug("Project is missing a dev-portal.json file. Skipping validate-dev-portal-json plugin."),new wje.PluginResult;let i=[],o=await(0,Pje.readFile)(n,"utf-8"),a=JSON.parse(o);if(a.enableAuthentication&&a.authentication){let{provider:u}=a.authentication;if(u&&u!=="auth0"&&u!=="okta"&&u!=="azure-ad"&&u!=="clerk"&&u!=="oidc"&&u!=="external"&&i.push({message:"The authentication setting 'provider' is not set or invalid. Valid values are 'auth0', 'okta', 'azure-ad', 'clerk', 'oidc', or 'external'.",pluginName:"validate-dev-portal-json",severity:"warning"}),u==="external"){let{loginUrl:c,logoutUrl:l}=a.authentication;(0,Zs.isNonWhitespaceString)(c)?c.startsWith("$env(")&&!c.startsWith("$env(ZUPLO_PUBLIC_")&&i.push({message:"'loginUrl' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The authentication setting for 'loginUrl' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),(0,Zs.isNonWhitespaceString)(l)?l.startsWith("$env(")&&!l.startsWith("$env(ZUPLO_PUBLIC_")&&i.push({message:"'logoutUrl' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The authentication setting for 'logoutUrl' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"})}else if("authority"in a.authentication){let{authority:c}=a.authentication;if(!a.authentication.devPortalClient)i.push({message:"The authentication setting for 'devPortalClient' is not set. This property is required when 'authority' is also set.",pluginName:"validate-dev-portal-json",severity:"warning"});else{let{clientId:l,audience:f}=a.authentication.devPortalClient;(0,Zs.isNonWhitespaceString)(c)?c.startsWith("$env(")&&!c.startsWith("$env(ZUPLO_PUBLIC_")&&i.push({message:"'authority' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The authentication setting for 'authority' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),i.push(...rH({audience:f,clientId:l}))}}else if("issuer"in a.authentication){let{issuer:c,clientId:l,clientSecret:f,audience:d}=a.authentication;(0,Zs.isNonWhitespaceString)(c)?c.startsWith("$env(")&&!c.startsWith("$env(ZUPLO_PUBLIC_")&&i.push({message:"'issuer' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The authentication setting for 'issuer' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),i.push(...rH({audience:d,clientId:l,clientSecret:f}))}else throw new Zs.BuildIssueError({message:"The dev-portal.json is not valid. The 'authentication' section does not have required fields.",severity:"error"},Tje)}if(a.enableMonetization&&a.monetization){let{provider:u}=a.monetization;if((!(0,Zs.isNonWhitespaceString)(u)||u!=="stripe")&&i.push({message:"The monetization setting 'provider' is not set or an empty string. Valid values are 'stripe'.",pluginName:"validate-dev-portal-json",severity:"warning"}),u==="stripe"){let{pricingTableId:c,publishableKey:l,secretKey:f}=a.monetization;(0,Zs.isNonWhitespaceString)(c)?c.startsWith("$env(")?c.startsWith("$env(ZUPLO_PUBLIC_")||i.push({message:"'Pricing Table Id' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration. Field monetization.pricingTableId in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):c.startsWith("prctbl_")||i.push({message:"'Pricing Table Id' field must start with prctbl_. Field monetization.pricingTableId in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The monetization setting for 'Pricing Table Id' is not set or is an empty string. Field monetization.pricingTableId in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}),(0,Zs.isNonWhitespaceString)(l)?l.startsWith("$env(")?l.startsWith("$env(ZUPLO_PUBLIC_")||i.push({message:"'Publishable Key' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration. Field monetization.publishableKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):l.startsWith("pk_")||i.push({message:"'Publishable Key' field must start with pk_. Field monetization.publishableKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The monetization setting for 'Publishable Key' is not set or is an empty string. Field monetization.publishableKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}),(0,Zs.isNonWhitespaceString)(f)?f.startsWith("$env(")||i.push({message:"The monetization setting for 'Secret Key' must be an environment variable. Field monetization.secretKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"}):i.push({message:"The monetization setting for 'Secret Key' is not set or is an empty string. Field monetization.secretKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"})}}else a.enableMonetization&&!a.monetization&&i.push({message:"Monetization was enabled but no monetization configuration was provider in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"});return{errors:[],warnings:i}})},"validateDevPortalJSON");ah.validateDevPortalJSON=Nje;function rH({audience:e,clientId:t,clientSecret:r}){let n=[];return e&&e.startsWith("$env(")&&!e.startsWith("$env(ZUPLO_PUBLIC_")&&n.push({message:"'audience' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}),(0,Zs.isNonWhitespaceString)(t)?t.startsWith("$env(")&&!t.startsWith("$env(ZUPLO_PUBLIC_")&&n.push({message:"'clientId' field contains an invalid environment variable. Only variables prefixed with 'ZUPLO_PUBLIC_' can be used in developer portal configuration.",pluginName:"validate-dev-portal-json",severity:"warning"}):n.push({message:"The authentication setting for 'clientId' is not set or is an empty string.",pluginName:"validate-dev-portal-json",severity:"warning"}),(0,Zs.isNonWhitespaceString)(r)&&!r.startsWith("$env(")&&(r.startsWith("$env(ZUPLO_PUBLIC")&&n.push({message:"The authorization setting for 'Client Secret' should not be a public environment variable. ",pluginName:"validate-dev-portal-json",severity:"warning"}),n.push({message:"The authorization setting for 'Client Secret' must be an environment variable. Field authentication.devPortalClient.secretKey in dev-portal.json.",pluginName:"validate-dev-portal-json",severity:"warning"})),n}s(rH,"validateCommonAuth")});var f$=h(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});var Aje="[",Rje="]",Cje="{",$je="}",Dje=":",Lje=",",uH="true",cH="false",lH="null",iH='"',jje=new Map([["t",uH],["f",cH],["n",lH]]),u$=new Map([[iH,iH],["\\","\\"],["/","/"],["b","\b"],["n",`
86
+ `],["f","\f"],["r","\r"],["t"," "]]),a$=new Map([[Aje,"Punctuator"],[Rje,"Punctuator"],[Cje,"Punctuator"],[$je,"Punctuator"],[Dje,"Punctuator"],[Lje,"Punctuator"],[uH,"Boolean"],[cH,"Boolean"],[lH,"Null"]]),Uf=class extends Error{static{s(this,"ErrorWithLocation")}constructor(t,{line:r,column:n,index:i}){super(`${t} (${r}:${n})`),this.line=r,this.column=n,this.index=i}},c$=class extends Uf{static{s(this,"UnexpectedChar")}constructor(t,r){super(`Unexpected character ${t} found.`,r)}},uh=class extends Uf{static{s(this,"UnexpectedToken")}constructor(t){super(`Unexpected token ${t.type}(${t.value}) found.`,t.loc.start)}},l$=class extends Uf{static{s(this,"UnexpectedEOF")}constructor(t){super("Unexpected end of input found.",t)}},sH='"',oH="/",aH="*",Mje={comments:!1,ranges:!1};function Uje(e){return/[\s\n]/.test(e)}s(Uje,"isWhitespace");function sc(e){return e>="0"&&e<="9"}s(sc,"isDigit");function xje(e){return sc(e)||/[a-f]/i.test(e)}s(xje,"isHexDigit");function qje(e){return e>="1"&&e<="9"}s(qje,"isPositiveDigit");function Fje(e){return/[tfn]/.test(e)}s(Fje,"isKeywordStart");function kje(e){return sc(e)||e==="."||e==="-"}s(kje,"isNumberStart");function fH(e,t){t=Object.freeze({...Mje,...t});let r=-1,n=1,i=0,o=!1,a=[];function u(E,v,O,P){let I=O.offset+v.length,j=t.ranges?{range:[O.offset,I]}:void 0;return{type:E,value:v,loc:{start:O,end:P||{line:O.line,column:O.column+v.length,offset:I}},...j}}s(u,"createToken");function c(){let E=e.charAt(++r);return o?(n++,i=1,o=!1):i++,E==="\r"?(o=!0,e.charAt(r+1)===`
87
87
  `&&r++):E===`
88
- `&&(o=!0),E}s(c,"next");function l(){return{line:n,column:i,offset:r}}s(l,"locate");function f(E){let S=jje.get(E);if(e.slice(r,r+S.length)===S)return r+=S.length-1,i+=S.length-1,{value:S,c:c()};for(let O=1;O<S.length;O++)S[O]!==e.charAt(r+O)&&g(c())}s(f,"readKeyword");function d(E){let S=E;for(E=c();E&&E!==sH;){if(E==="\\")if(S+=E,E=c(),u$.has(E))S+=E;else if(E==="u"){S+=E;for(let O=0;O<4;O++)E=c(),xje(E)?S+=E:g(E)}else g(E);else S+=E;E=c()}return E||y(),S+=E,{value:S,c:c()}}s(d,"readString");function _(E){let S="";if(E==="-"&&(S+=E,E=c(),sc(E)||g(E)),E==="0")S+=E,E=c(),sc(E)&&g(E);else{qje(E)||g(E);do S+=E,E=c();while(sc(E))}if(E===".")do S+=E,E=c();while(sc(E));if(E==="e"||E==="E")for(S+=E,E=c(),(E==="+"||E==="-")&&(S+=E,E=c()),sc(E)||g(E);sc(E);)S+=E,E=c();return{value:S,c:E}}s(_,"readNumber");function m(E){let S=E;if(E=c(),E==="/"){do S+=E,E=c();while(E&&E!=="\r"&&E!==`
89
- `);return{value:S,c:E}}if(E===aH){for(;E;)if(S+=E,E=c(),E===aH&&(S+=E,E=c(),E===oH))return S+=E,E=c(),{value:S,c:E};y()}g(E)}s(m,"readComment");function g(E){throw new c$(E,l())}s(g,"unexpected");function y(){throw new l$(l())}s(y,"unexpectedEOF");let b=c();for(;r<e.length;){for(;Uje(b);)b=c();if(!b)break;let E=l();if(a$.has(b))a.push(u(a$.get(b),b,E)),b=c();else if(Fje(b)){let S=f(b),O=S.value;b=S.c,a.push(u(a$.get(O),O,E))}else if(kje(b)){let S=_(b),O=S.value;b=S.c,a.push(u("Number",O,E))}else if(b===sH){let S=d(b),O=S.value;b=S.c,a.push(u("String",O,E))}else if(b===oH&&t.comments){let S=m(b),O=S.value;b=S.c,a.push(u(O.startsWith("//")?"LineComment":"BlockComment",O,E,l()))}else g(b)}return a}s(fH,"tokenize");var Xg={document(e,t={}){return{type:"Document",body:e,...t}},string(e,t={}){return{type:"String",value:e,...t}},number(e,t={}){return{type:"Number",value:e,...t}},boolean(e,t={}){return{type:"Boolean",value:e,...t}},null(e={}){return{type:"Null",value:"null",...e}},array(e,t={}){return{type:"Array",elements:e,...t}},object(e,t={}){return{type:"Object",members:e,...t}},member(e,t,r={}){return{type:"Member",name:e,value:t,...r}}},Bje={tokens:!1,comments:!1,ranges:!1};function Gje(e){let t=e.value.slice(1,-1),r="",n=t.indexOf("\\"),i=0;for(;n>=0;){r+=t.slice(i,n);let o=t.charAt(n+1);if(u$.has(o))r+=u$.get(o),i=n+2;else if(o==="u"){let a=t.slice(n+2,n+6);if(a.length<4||/[^0-9a-f]/i.test(a))throw new Uf(`Invalid unicode escape \\u${a}.`,{line:e.loc.start.line,column:e.loc.start.column+n,offset:e.loc.start.offset+n});r+=String.fromCharCode(parseInt(a,16)),i=n+6}else throw new Uf(`Invalid escape \\${o}.`,{line:e.loc.start.line,column:e.loc.start.column+n,offset:e.loc.start.offset+n});n=t.indexOf("\\",i)}return r+=t.slice(i),r}s(Gje,"getStringValue");function Vje(e){switch(e.type){case"Boolean":return e.value==="true";case"Number":return Number(e.value);case"Null":return null;case"String":return Gje(e)}}s(Vje,"getLiteralValue");function zje(e,t){t=Object.freeze({...Bje,...t});let r=fH(e,{comments:!!t.comments,ranges:!!t.ranges}),n=0;function i(){return r[n++]}s(i,"nextNoComments");function o(){let S=r[n++];return S&&S.type.endsWith("Comment")?o():S}s(o,"nextSkipComments");let a=t.comments?o:i;function u(S,O){if(!S||S.value!==O)throw new uh(S)}s(u,"assertTokenValue");function c(S,O){if(!S||S.type!==O)throw new uh(S)}s(c,"assertTokenType");function l(S,O){return t.ranges?{range:[S.offset,O.offset]}:void 0}s(l,"createRange");function f(S){let O=l(S.loc.start,S.loc.end);return{type:S.type,value:Vje(S),loc:{start:{...S.loc.start},end:{...S.loc.end}},...O}}s(f,"createLiteralNode");function d(S){c(S,"String");let O=f(S);S=a(),u(S,":");let P=g(),I=l(O.loc.start,P.loc.end);return Xg.member(O,P,{loc:{start:{...O.loc.start},end:{...P.loc.end}},...I})}s(d,"parseProperty");function _(S){u(S,"{");let O=[],P=a();if(P&&P.value!=="}")do if(O.push(d(P)),P=a(),P.value===",")P=a();else break;while(P);u(P,"}");let I=l(S.loc.start,P.loc.end);return Xg.object(O,{loc:{start:{...S.loc.start},end:{...P.loc.end}},...I})}s(_,"parseObject");function m(S){u(S,"[");let O=[],P=a();if(P&&P.value!=="]")do if(O.push(g(P)),P=a(),P.value===",")P=a();else break;while(P);u(P,"]");let I=l(S.loc.start,P.loc.end);return Xg.array(O,{type:"Array",elements:O,loc:{start:{...S.loc.start},end:{...P.loc.end}},...I})}s(m,"parseArray");function g(S){switch(S=S||a(),S.type){case"String":case"Boolean":case"Number":case"Null":return f(S);case"Punctuator":if(S.value==="{")return _(S);if(S.value==="[")return m(S);default:throw new uh(S)}}s(g,"parseValue");let y=g(),b=a();if(b)throw new uh(b);let E={loc:{start:{line:1,column:1,offset:0},end:{...y.loc.end}}};return t.tokens&&(E.tokens=r),t.ranges&&(E.range=l(E.loc.start,E.loc.end)),Xg.document(y,E)}s(zje,"parse");var Hje=new Map([["Document",["body"]],["Object",["members"]],["Member",["name","value"]],["Array",["elements"]],["String",[]],["Number",[]],["Boolean",[]],["Null",[]]]);function dH(e){return e&&typeof e=="object"}s(dH,"isObject");function Kje(e){return dH(e)&&typeof e.type=="string"}s(Kje,"isNode");function pH(e,t){function r(n,i){typeof t.enter=="function"&&t.enter(n,i);for(let o of Hje.get(n.type)){let a=n[o];dH(a)&&(Array.isArray(a)?a.forEach(u=>r(u,n)):Kje(a)&&r(a,n))}typeof t.exit=="function"&&t.exit(n,i)}s(r,"visitNode"),r(e)}s(pH,"traverse");function Wje(e,t=()=>!0){let r=[];return pH(e,{enter(n,i){r.push({node:n,parent:i,phase:"enter"})},exit(n,i){r.push({node:n,parent:i,phase:"exit"})}}),r.filter(t).values()}s(Wje,"iterator");function ch(e){switch(e.type){case"String":case"Number":case"Boolean":return e.value;case"Null":return null;case"Array":return e.elements.map(ch);case"Object":{let t={};return e.members.forEach(r=>{t[ch(r.name)]=ch(r.value)}),t}case"Document":return ch(e.body);case"Property":throw new Error("Cannot evaluate object property outside of an object.");default:throw new Error(`Unknown node type ${e.type}.`)}}s(ch,"evaluate");function Yje(e,{indent:t=0}={}){let r=ch(e);return JSON.stringify(r,null,t)}s(Yje,"print");iu.evaluate=ch;iu.iterator=Wje;iu.parse=zje;iu.print=Yje;iu.tokenize=fH;iu.traverse=pH;iu.types=Xg});var d$=h(Qs=>{"use strict";var Jje=Qs&&Qs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qs,"__esModule",{value:!0});Qs.getSchemaAST=Qs.getSchemaContent=Qs.getFileLineContent=void 0;var Xje=f$(),Zje=Jje(require("fs/promises")),Qje=s((e,t)=>e.split(/\r?\n/)[t-1],"getFileLineContent");Qs.getFileLineContent=Qje;var eMe=s(async e=>{try{return await Zje.default.readFile(e,"utf-8")}catch{return}},"getSchemaContent");Qs.getSchemaContent=eMe;var tMe=s(async e=>{try{return(0,Xje.parse)(e)}catch(t){if(t.column&&t.line&&t.message){let r=(0,Qs.getFileLineContent)(e,t.line);return{column:t.column,line:t.line,length:void 0,lineText:r}}return}},"getSchemaAST");Qs.getSchemaAST=tMe});var hH=h(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.getRouteLocationByValueFromSchema=gn.getRouteLocationByValue=gn.DEFAULT_ROUTES_LOCATION=gn.ROUTES_RELATIVE_PATH=void 0;var rMe=f$(),p$=d$();gn.ROUTES_RELATIVE_PATH="config/routes.json";gn.DEFAULT_ROUTES_LOCATION={file:gn.ROUTES_RELATIVE_PATH};var nMe=s(async(e,t,r)=>{try{if(!e)return gn.DEFAULT_ROUTES_LOCATION;let n=await(0,p$.getSchemaContent)(e);return await(0,gn.getRouteLocationByValueFromSchema)(n,e,t,r)}catch{}return gn.DEFAULT_ROUTES_LOCATION},"getRouteLocationByValue");gn.getRouteLocationByValue=nMe;var iMe=s(async(e,t,r,n)=>{try{if(!e)return gn.DEFAULT_ROUTES_LOCATION;let i=null,o=await(0,p$.getSchemaAST)(e);if(o){for(let{node:a}of(0,rMe.iterator)(o))if(a.value&&a.value===r){i=a.loc;break}if(i!==null){let a=(0,p$.getFileLineContent)(e,i.start.line);return{file:t,line:i.start.line,column:i.start.column,length:i.end.column-i.start.column,lineText:a,suggestion:n}}}}catch{}return gn.DEFAULT_ROUTES_LOCATION},"getRouteLocationByValueFromSchema");gn.getRouteLocationByValueFromSchema=iMe});var h$=h(lh=>{"use strict";Object.defineProperty(lh,"__esModule",{value:!0});lh.OPEN_API_FILE_SUFFIX=lh.USER_SCHEMAS_DIR_NAME=void 0;lh.USER_SCHEMAS_DIR_NAME="schemas";lh.OPEN_API_FILE_SUFFIX=".oas.json"});var SH=h(di=>{"use strict";var mH=di&&di.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(di,"__esModule",{value:!0});di.getFilePathNameFromRefName=di.getFullyQualifiedRefName=di.chaseRefs=di.oasFileInProject=di.getOpenApiFilesByAlphabetical=void 0;var _H=mH(require("fs/promises")),sP=mH(require("path")),gH=h$(),sMe=s(async e=>(await _H.default.readdir(e)).map(r=>`${e}/${r}`).filter(r=>r.endsWith(gH.OPEN_API_FILE_SUFFIX)).sort(),"getOpenApiFilesByAlphabetical");di.getOpenApiFilesByAlphabetical=sMe;var oMe=s(async e=>{let t=sP.default.resolve(e,"config");return(await _H.default.readdir(t)).filter(n=>n.endsWith(gH.OPEN_API_FILE_SUFFIX)).length>=1},"oasFileInProject");di.oasFileInProject=oMe;function yH(e,t,r,n,i,o,a){if(o.has(r))return;let u=n.get(r);o.set(r,i.length),i.push(r),m$(bH(r),t,u,n,i,o,a)}s(yH,"chaseRefs");di.chaseRefs=yH;function m$(e,t,r,n,i,o,a){if(Array.isArray(r))for(let u of r)m$(e,t,u,n,i,o,a);else if(typeof r=="object")for(let u in r){if(u==="$ref"){let c=r[u];a&&(r[u]=a(t,c)),yH(e,t,EH(e,c),n,i,o,a)}m$(e,t,r[u],n,i,o,a)}}s(m$,"lookForRefs");function EH(e,t){let r=t.indexOf("#");return r>=0?`${sP.default.resolve(e,t.substring(0,r))}${t.substring(r)}`:sP.default.resolve(sP.default.dirname(e),t)}s(EH,"getFullyQualifiedRefName");di.getFullyQualifiedRefName=EH;function bH(e){let t=e.indexOf("#");return t>=0?e.substring(0,t):e}s(bH,"getFilePathNameFromRefName");di.getFilePathNameFromRefName=bH});var oP=h(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});fh.getDeepKeys=fh.toJSON=void 0;var aMe=["function","symbol","undefined"],uMe=["constructor","prototype","__proto__"],cMe=Object.getPrototypeOf({});function lMe(){let e={},t=this;for(let r of vH(t))if(typeof r=="string"){let n=t[r],i=typeof n;aMe.includes(i)||(e[r]=n)}return e}s(lMe,"toJSON");fh.toJSON=lMe;function vH(e,t=[]){let r=[];for(;e&&e!==cMe;)r=r.concat(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e)),e=Object.getPrototypeOf(e);let n=new Set(r);for(let i of t.concat(uMe))n.delete(i);return n}s(vH,"getDeepKeys");fh.getDeepKeys=vH});var _$=h(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});dh.addInspectMethod=dh.format=void 0;var OH=require("util"),fMe=oP(),PH=OH.inspect.custom||Symbol.for("nodejs.util.inspect.custom");dh.format=OH.format;function dMe(e){e[PH]=pMe}s(dMe,"addInspectMethod");dh.addInspectMethod=dMe;function pMe(){let e={},t=this;for(let r of fMe.getDeepKeys(t)){let n=t[r];e[r]=n}return delete e[PH],e}s(pMe,"inspect")});var TH=h(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.lazyJoinStacks=Jo.joinStacks=Jo.isWritableStack=Jo.isLazyStack=void 0;var hMe=/\r?\n/,mMe=/\bono[ @]/;function _Me(e){return!!(e&&e.configurable&&typeof e.get=="function")}s(_Me,"isLazyStack");Jo.isLazyStack=_Me;function gMe(e){return!!(!e||e.writable||typeof e.set=="function")}s(gMe,"isWritableStack");Jo.isWritableStack=gMe;function wH(e,t){let r=IH(e.stack),n=t?t.stack:void 0;return r&&n?r+`
88
+ `&&(o=!0),E}s(c,"next");function l(){return{line:n,column:i,offset:r}}s(l,"locate");function f(E){let v=jje.get(E);if(e.slice(r,r+v.length)===v)return r+=v.length-1,i+=v.length-1,{value:v,c:c()};for(let O=1;O<v.length;O++)v[O]!==e.charAt(r+O)&&g(c())}s(f,"readKeyword");function d(E){let v=E;for(E=c();E&&E!==sH;){if(E==="\\")if(v+=E,E=c(),u$.has(E))v+=E;else if(E==="u"){v+=E;for(let O=0;O<4;O++)E=c(),xje(E)?v+=E:g(E)}else g(E);else v+=E;E=c()}return E||y(),v+=E,{value:v,c:c()}}s(d,"readString");function _(E){let v="";if(E==="-"&&(v+=E,E=c(),sc(E)||g(E)),E==="0")v+=E,E=c(),sc(E)&&g(E);else{qje(E)||g(E);do v+=E,E=c();while(sc(E))}if(E===".")do v+=E,E=c();while(sc(E));if(E==="e"||E==="E")for(v+=E,E=c(),(E==="+"||E==="-")&&(v+=E,E=c()),sc(E)||g(E);sc(E);)v+=E,E=c();return{value:v,c:E}}s(_,"readNumber");function m(E){let v=E;if(E=c(),E==="/"){do v+=E,E=c();while(E&&E!=="\r"&&E!==`
89
+ `);return{value:v,c:E}}if(E===aH){for(;E;)if(v+=E,E=c(),E===aH&&(v+=E,E=c(),E===oH))return v+=E,E=c(),{value:v,c:E};y()}g(E)}s(m,"readComment");function g(E){throw new c$(E,l())}s(g,"unexpected");function y(){throw new l$(l())}s(y,"unexpectedEOF");let b=c();for(;r<e.length;){for(;Uje(b);)b=c();if(!b)break;let E=l();if(a$.has(b))a.push(u(a$.get(b),b,E)),b=c();else if(Fje(b)){let v=f(b),O=v.value;b=v.c,a.push(u(a$.get(O),O,E))}else if(kje(b)){let v=_(b),O=v.value;b=v.c,a.push(u("Number",O,E))}else if(b===sH){let v=d(b),O=v.value;b=v.c,a.push(u("String",O,E))}else if(b===oH&&t.comments){let v=m(b),O=v.value;b=v.c,a.push(u(O.startsWith("//")?"LineComment":"BlockComment",O,E,l()))}else g(b)}return a}s(fH,"tokenize");var Xg={document(e,t={}){return{type:"Document",body:e,...t}},string(e,t={}){return{type:"String",value:e,...t}},number(e,t={}){return{type:"Number",value:e,...t}},boolean(e,t={}){return{type:"Boolean",value:e,...t}},null(e={}){return{type:"Null",value:"null",...e}},array(e,t={}){return{type:"Array",elements:e,...t}},object(e,t={}){return{type:"Object",members:e,...t}},member(e,t,r={}){return{type:"Member",name:e,value:t,...r}}},Bje={tokens:!1,comments:!1,ranges:!1};function Gje(e){let t=e.value.slice(1,-1),r="",n=t.indexOf("\\"),i=0;for(;n>=0;){r+=t.slice(i,n);let o=t.charAt(n+1);if(u$.has(o))r+=u$.get(o),i=n+2;else if(o==="u"){let a=t.slice(n+2,n+6);if(a.length<4||/[^0-9a-f]/i.test(a))throw new Uf(`Invalid unicode escape \\u${a}.`,{line:e.loc.start.line,column:e.loc.start.column+n,offset:e.loc.start.offset+n});r+=String.fromCharCode(parseInt(a,16)),i=n+6}else throw new Uf(`Invalid escape \\${o}.`,{line:e.loc.start.line,column:e.loc.start.column+n,offset:e.loc.start.offset+n});n=t.indexOf("\\",i)}return r+=t.slice(i),r}s(Gje,"getStringValue");function Vje(e){switch(e.type){case"Boolean":return e.value==="true";case"Number":return Number(e.value);case"Null":return null;case"String":return Gje(e)}}s(Vje,"getLiteralValue");function zje(e,t){t=Object.freeze({...Bje,...t});let r=fH(e,{comments:!!t.comments,ranges:!!t.ranges}),n=0;function i(){return r[n++]}s(i,"nextNoComments");function o(){let v=r[n++];return v&&v.type.endsWith("Comment")?o():v}s(o,"nextSkipComments");let a=t.comments?o:i;function u(v,O){if(!v||v.value!==O)throw new uh(v)}s(u,"assertTokenValue");function c(v,O){if(!v||v.type!==O)throw new uh(v)}s(c,"assertTokenType");function l(v,O){return t.ranges?{range:[v.offset,O.offset]}:void 0}s(l,"createRange");function f(v){let O=l(v.loc.start,v.loc.end);return{type:v.type,value:Vje(v),loc:{start:{...v.loc.start},end:{...v.loc.end}},...O}}s(f,"createLiteralNode");function d(v){c(v,"String");let O=f(v);v=a(),u(v,":");let P=g(),I=l(O.loc.start,P.loc.end);return Xg.member(O,P,{loc:{start:{...O.loc.start},end:{...P.loc.end}},...I})}s(d,"parseProperty");function _(v){u(v,"{");let O=[],P=a();if(P&&P.value!=="}")do if(O.push(d(P)),P=a(),P.value===",")P=a();else break;while(P);u(P,"}");let I=l(v.loc.start,P.loc.end);return Xg.object(O,{loc:{start:{...v.loc.start},end:{...P.loc.end}},...I})}s(_,"parseObject");function m(v){u(v,"[");let O=[],P=a();if(P&&P.value!=="]")do if(O.push(g(P)),P=a(),P.value===",")P=a();else break;while(P);u(P,"]");let I=l(v.loc.start,P.loc.end);return Xg.array(O,{type:"Array",elements:O,loc:{start:{...v.loc.start},end:{...P.loc.end}},...I})}s(m,"parseArray");function g(v){switch(v=v||a(),v.type){case"String":case"Boolean":case"Number":case"Null":return f(v);case"Punctuator":if(v.value==="{")return _(v);if(v.value==="[")return m(v);default:throw new uh(v)}}s(g,"parseValue");let y=g(),b=a();if(b)throw new uh(b);let E={loc:{start:{line:1,column:1,offset:0},end:{...y.loc.end}}};return t.tokens&&(E.tokens=r),t.ranges&&(E.range=l(E.loc.start,E.loc.end)),Xg.document(y,E)}s(zje,"parse");var Hje=new Map([["Document",["body"]],["Object",["members"]],["Member",["name","value"]],["Array",["elements"]],["String",[]],["Number",[]],["Boolean",[]],["Null",[]]]);function dH(e){return e&&typeof e=="object"}s(dH,"isObject");function Kje(e){return dH(e)&&typeof e.type=="string"}s(Kje,"isNode");function pH(e,t){function r(n,i){typeof t.enter=="function"&&t.enter(n,i);for(let o of Hje.get(n.type)){let a=n[o];dH(a)&&(Array.isArray(a)?a.forEach(u=>r(u,n)):Kje(a)&&r(a,n))}typeof t.exit=="function"&&t.exit(n,i)}s(r,"visitNode"),r(e)}s(pH,"traverse");function Wje(e,t=()=>!0){let r=[];return pH(e,{enter(n,i){r.push({node:n,parent:i,phase:"enter"})},exit(n,i){r.push({node:n,parent:i,phase:"exit"})}}),r.filter(t).values()}s(Wje,"iterator");function ch(e){switch(e.type){case"String":case"Number":case"Boolean":return e.value;case"Null":return null;case"Array":return e.elements.map(ch);case"Object":{let t={};return e.members.forEach(r=>{t[ch(r.name)]=ch(r.value)}),t}case"Document":return ch(e.body);case"Property":throw new Error("Cannot evaluate object property outside of an object.");default:throw new Error(`Unknown node type ${e.type}.`)}}s(ch,"evaluate");function Yje(e,{indent:t=0}={}){let r=ch(e);return JSON.stringify(r,null,t)}s(Yje,"print");iu.evaluate=ch;iu.iterator=Wje;iu.parse=zje;iu.print=Yje;iu.tokenize=fH;iu.traverse=pH;iu.types=Xg});var d$=h(Qs=>{"use strict";var Jje=Qs&&Qs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qs,"__esModule",{value:!0});Qs.getSchemaAST=Qs.getSchemaContent=Qs.getFileLineContent=void 0;var Xje=f$(),Zje=Jje(require("fs/promises")),Qje=s((e,t)=>e.split(/\r?\n/)[t-1],"getFileLineContent");Qs.getFileLineContent=Qje;var eMe=s(async e=>{try{return await Zje.default.readFile(e,"utf-8")}catch{return}},"getSchemaContent");Qs.getSchemaContent=eMe;var tMe=s(async e=>{try{return(0,Xje.parse)(e)}catch(t){if(t.column&&t.line&&t.message){let r=(0,Qs.getFileLineContent)(e,t.line);return{column:t.column,line:t.line,length:void 0,lineText:r}}return}},"getSchemaAST");Qs.getSchemaAST=tMe});var hH=h(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.getRouteLocationByValueFromSchema=gn.getRouteLocationByValue=gn.DEFAULT_ROUTES_LOCATION=gn.ROUTES_RELATIVE_PATH=void 0;var rMe=f$(),p$=d$();gn.ROUTES_RELATIVE_PATH="config/routes.json";gn.DEFAULT_ROUTES_LOCATION={file:gn.ROUTES_RELATIVE_PATH};var nMe=s(async(e,t,r)=>{try{if(!e)return gn.DEFAULT_ROUTES_LOCATION;let n=await(0,p$.getSchemaContent)(e);return await(0,gn.getRouteLocationByValueFromSchema)(n,e,t,r)}catch{}return gn.DEFAULT_ROUTES_LOCATION},"getRouteLocationByValue");gn.getRouteLocationByValue=nMe;var iMe=s(async(e,t,r,n)=>{try{if(!e)return gn.DEFAULT_ROUTES_LOCATION;let i=null,o=await(0,p$.getSchemaAST)(e);if(o){for(let{node:a}of(0,rMe.iterator)(o))if(a.value&&a.value===r){i=a.loc;break}if(i!==null){let a=(0,p$.getFileLineContent)(e,i.start.line);return{file:t,line:i.start.line,column:i.start.column,length:i.end.column-i.start.column,lineText:a,suggestion:n}}}}catch{}return gn.DEFAULT_ROUTES_LOCATION},"getRouteLocationByValueFromSchema");gn.getRouteLocationByValueFromSchema=iMe});var h$=h(lh=>{"use strict";Object.defineProperty(lh,"__esModule",{value:!0});lh.OPEN_API_FILE_SUFFIX=lh.USER_SCHEMAS_DIR_NAME=void 0;lh.USER_SCHEMAS_DIR_NAME="schemas";lh.OPEN_API_FILE_SUFFIX=".oas.json"});var SH=h(di=>{"use strict";var mH=di&&di.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(di,"__esModule",{value:!0});di.getFilePathNameFromRefName=di.getFullyQualifiedRefName=di.chaseRefs=di.oasFileInProject=di.getOpenApiFilesByAlphabetical=void 0;var _H=mH(require("fs/promises")),sP=mH(require("path")),gH=h$(),sMe=s(async e=>(await _H.default.readdir(e)).map(r=>`${e}/${r}`).filter(r=>r.endsWith(gH.OPEN_API_FILE_SUFFIX)).sort(),"getOpenApiFilesByAlphabetical");di.getOpenApiFilesByAlphabetical=sMe;var oMe=s(async e=>{let t=sP.default.resolve(e,"config");return(await _H.default.readdir(t)).filter(n=>n.endsWith(gH.OPEN_API_FILE_SUFFIX)).length>=1},"oasFileInProject");di.oasFileInProject=oMe;function yH(e,t,r,n,i,o,a){if(o.has(r))return;let u=n.get(r);o.set(r,i.length),i.push(r),m$(bH(r),t,u,n,i,o,a)}s(yH,"chaseRefs");di.chaseRefs=yH;function m$(e,t,r,n,i,o,a){if(Array.isArray(r))for(let u of r)m$(e,t,u,n,i,o,a);else if(typeof r=="object")for(let u in r){if(u==="$ref"){let c=r[u];a&&(r[u]=a(t,c)),yH(e,t,EH(e,c),n,i,o,a)}m$(e,t,r[u],n,i,o,a)}}s(m$,"lookForRefs");function EH(e,t){let r=t.indexOf("#");return r>=0?`${sP.default.resolve(e,t.substring(0,r))}${t.substring(r)}`:sP.default.resolve(sP.default.dirname(e),t)}s(EH,"getFullyQualifiedRefName");di.getFullyQualifiedRefName=EH;function bH(e){let t=e.indexOf("#");return t>=0?e.substring(0,t):e}s(bH,"getFilePathNameFromRefName");di.getFilePathNameFromRefName=bH});var oP=h(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});fh.getDeepKeys=fh.toJSON=void 0;var aMe=["function","symbol","undefined"],uMe=["constructor","prototype","__proto__"],cMe=Object.getPrototypeOf({});function lMe(){let e={},t=this;for(let r of vH(t))if(typeof r=="string"){let n=t[r],i=typeof n;aMe.includes(i)||(e[r]=n)}return e}s(lMe,"toJSON");fh.toJSON=lMe;function vH(e,t=[]){let r=[];for(;e&&e!==cMe;)r=r.concat(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e)),e=Object.getPrototypeOf(e);let n=new Set(r);for(let i of t.concat(uMe))n.delete(i);return n}s(vH,"getDeepKeys");fh.getDeepKeys=vH});var _$=h(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});dh.addInspectMethod=dh.format=void 0;var OH=require("util"),fMe=oP(),PH=OH.inspect.custom||Symbol.for("nodejs.util.inspect.custom");dh.format=OH.format;function dMe(e){e[PH]=pMe}s(dMe,"addInspectMethod");dh.addInspectMethod=dMe;function pMe(){let e={},t=this;for(let r of fMe.getDeepKeys(t)){let n=t[r];e[r]=n}return delete e[PH],e}s(pMe,"inspect")});var TH=h(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.lazyJoinStacks=Jo.joinStacks=Jo.isWritableStack=Jo.isLazyStack=void 0;var hMe=/\r?\n/,mMe=/\bono[ @]/;function _Me(e){return!!(e&&e.configurable&&typeof e.get=="function")}s(_Me,"isLazyStack");Jo.isLazyStack=_Me;function gMe(e){return!!(!e||e.writable||typeof e.set=="function")}s(gMe,"isWritableStack");Jo.isWritableStack=gMe;function wH(e,t){let r=IH(e.stack),n=t?t.stack:void 0;return r&&n?r+`
90
90
 
91
91
  `+n:r||n}s(wH,"joinStacks");Jo.joinStacks=wH;function yMe(e,t,r){r?Object.defineProperty(t,"stack",{get:()=>{let n=e.get.apply(t);return wH({stack:n},r)},enumerable:!1,configurable:!0}):EMe(t,e)}s(yMe,"lazyJoinStacks");Jo.lazyJoinStacks=yMe;function IH(e){if(e){let t=e.split(hMe),r;for(let n=0;n<t.length;n++){let i=t[n];if(mMe.test(i))r===void 0&&(r=n);else if(r!==void 0){t.splice(r,n-r);break}}if(t.length>0)return t.join(`
92
92
  `)}return e}s(IH,"popStack");function EMe(e,t){Object.defineProperty(e,"stack",{get:()=>IH(t.get.apply(e)),enumerable:!1,configurable:!0})}s(EMe,"lazyPopStack")});var RH=h(uP=>{"use strict";Object.defineProperty(uP,"__esModule",{value:!0});uP.extendError=void 0;var NH=_$(),aP=TH(),AH=oP(),bMe=["name","message","stack"];function SMe(e,t,r){let n=e;return vMe(n,t),t&&typeof t=="object"&&OMe(n,t),n.toJSON=AH.toJSON,NH.addInspectMethod&&NH.addInspectMethod(n),r&&typeof r=="object"&&Object.assign(n,r),n}s(SMe,"extendError");uP.extendError=SMe;function vMe(e,t){let r=Object.getOwnPropertyDescriptor(e,"stack");aP.isLazyStack(r)?aP.lazyJoinStacks(r,e,t):aP.isWritableStack(r)&&(e.stack=aP.joinStacks(e,t))}s(vMe,"extendStack");function OMe(e,t){let r=AH.getDeepKeys(t,bMe),n=e,i=t;for(let o of r)if(n[o]===void 0)try{n[o]=i[o]}catch{}}s(OMe,"mergeErrors")});var CH=h(ph=>{"use strict";Object.defineProperty(ph,"__esModule",{value:!0});ph.normalizeArgs=ph.normalizeOptions=void 0;var PMe=_$();function wMe(e){return e=e||{},{concatMessages:e.concatMessages===void 0?!0:!!e.concatMessages,format:e.format===void 0?PMe.format:typeof e.format=="function"?e.format:!1}}s(wMe,"normalizeOptions");ph.normalizeOptions=wMe;function IMe(e,t){let r,n,i,o="";return typeof e[0]=="string"?i=e:typeof e[1]=="string"?(e[0]instanceof Error?r=e[0]:n=e[0],i=e.slice(1)):(r=e[0],n=e[1],i=e.slice(2)),i.length>0&&(t.format?o=t.format.apply(void 0,i):o=i.join(" ")),t.concatMessages&&r&&r.message&&(o+=(o?`
@@ -103,13 +103,13 @@ Parsed value is empty`)):n(f)}s(c,"onParsed");function l(f){!f&&t.continueOnErro
103
103
  `;return u.replace(/\n$/,"")}s(yUe,"makeSnippet");c5.exports=yUe});var yn=h((MTt,d5)=>{"use strict";var f5=gh(),EUe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],bUe=["scalar","sequence","mapping"];function SUe(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}s(SUe,"compileStyleAliases");function vUe(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(EUe.indexOf(r)===-1)throw new f5('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=SUe(t.styleAliases||null),bUe.indexOf(this.kind)===-1)throw new f5('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}s(vUe,"Type");d5.exports=vUe});var R$=h((xTt,h5)=>{"use strict";var ry=gh(),N$=yn();function p5(e,t){var r=[];return e[t].forEach(function(n){var i=r.length;r.forEach(function(o,a){o.tag===n.tag&&o.kind===n.kind&&o.multi===n.multi&&(i=a)}),r[i]=n}),r}s(p5,"compileList");function OUe(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function n(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(s(n,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(n);return e}s(OUe,"compileMap");function A$(e){return this.extend(e)}s(A$,"Schema");A$.prototype.extend=s(function(t){var r=[],n=[];if(t instanceof N$)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new ry("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof N$))throw new ry("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new ry("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new ry("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(o){if(!(o instanceof N$))throw new ry("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(A$.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=p5(i,"implicit"),i.compiledExplicit=p5(i,"explicit"),i.compiledTypeMap=OUe(i.compiledImplicit,i.compiledExplicit),i},"extend");h5.exports=A$});var C$=h((FTt,m5)=>{"use strict";var PUe=yn();m5.exports=new PUe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var $$=h((kTt,_5)=>{"use strict";var wUe=yn();_5.exports=new wUe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var D$=h((BTt,g5)=>{"use strict";var IUe=yn();g5.exports=new IUe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var L$=h((GTt,y5)=>{"use strict";var TUe=R$();y5.exports=new TUe({explicit:[C$(),$$(),D$()]})});var j$=h((VTt,E5)=>{"use strict";var NUe=yn();function AUe(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}s(AUe,"resolveYamlNull");function RUe(){return null}s(RUe,"constructYamlNull");function CUe(e){return e===null}s(CUe,"isNull");E5.exports=new NUe("tag:yaml.org,2002:null",{kind:"scalar",resolve:AUe,construct:RUe,predicate:CUe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})});var M$=h((HTt,b5)=>{"use strict";var $Ue=yn();function DUe(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}s(DUe,"resolveYamlBoolean");function LUe(e){return e==="true"||e==="True"||e==="TRUE"}s(LUe,"constructYamlBoolean");function jUe(e){return Object.prototype.toString.call(e)==="[object Boolean]"}s(jUe,"isBoolean");b5.exports=new $Ue("tag:yaml.org,2002:bool",{kind:"scalar",resolve:DUe,construct:LUe,predicate:jUe,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var U$=h((WTt,S5)=>{"use strict";var MUe=_h(),UUe=yn();function xUe(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}s(xUe,"isHexCode");function qUe(e){return 48<=e&&e<=55}s(qUe,"isOctCode");function FUe(e){return 48<=e&&e<=57}s(FUe,"isDecCode");function kUe(e){if(e===null)return!1;var t=e.length,r=0,n=!1,i;if(!t)return!1;if(i=e[r],(i==="-"||i==="+")&&(i=e[++r]),i==="0"){if(r+1===t)return!0;if(i=e[++r],i==="b"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(!xUe(e.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}if(i==="o"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(!qUe(e.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}}if(i==="_")return!1;for(;r<t;r++)if(i=e[r],i!=="_"){if(!FUe(e.charCodeAt(r)))return!1;n=!0}return!(!n||i==="_")}s(kUe,"resolveYamlInteger");function BUe(e){var t=e,r=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}s(BUe,"constructYamlInteger");function GUe(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!MUe.isNegativeZero(e)}s(GUe,"isInteger");S5.exports=new UUe("tag:yaml.org,2002:int",{kind:"scalar",resolve:kUe,construct:BUe,predicate:GUe,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var x$=h((JTt,O5)=>{"use strict";var v5=_h(),VUe=yn(),zUe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function HUe(e){return!(e===null||!zUe.test(e)||e[e.length-1]==="_")}s(HUe,"resolveYamlFloat");function KUe(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}s(KUe,"constructYamlFloat");var WUe=/^[-+]?[0-9]+e/;function YUe(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(v5.isNegativeZero(e))return"-0.0";return r=e.toString(10),WUe.test(r)?r.replace("e",".e"):r}s(YUe,"representYamlFloat");function JUe(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||v5.isNegativeZero(e))}s(JUe,"isFloat");O5.exports=new VUe("tag:yaml.org,2002:float",{kind:"scalar",resolve:HUe,construct:KUe,predicate:JUe,represent:YUe,defaultStyle:"lowercase"})});var q$=h((ZTt,P5)=>{"use strict";P5.exports=L$().extend({implicit:[j$(),M$(),U$(),x$()]})});var F$=h((QTt,w5)=>{"use strict";w5.exports=q$()});var k$=h((e1t,N5)=>{"use strict";var XUe=yn(),I5=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),T5=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function ZUe(e){return e===null?!1:I5.exec(e)!==null||T5.exec(e)!==null}s(ZUe,"resolveYamlTimestamp");function QUe(e){var t,r,n,i,o,a,u,c=0,l=null,f,d,_;if(t=I5.exec(e),t===null&&(t=T5.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(o=+t[4],a=+t[5],u=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(f=+t[10],d=+(t[11]||0),l=(f*60+d)*6e4,t[9]==="-"&&(l=-l)),_=new Date(Date.UTC(r,n,i,o,a,u,c)),l&&_.setTime(_.getTime()-l),_}s(QUe,"constructYamlTimestamp");function exe(e){return e.toISOString()}s(exe,"representYamlTimestamp");N5.exports=new XUe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:ZUe,construct:QUe,instanceOf:Date,represent:exe})});var B$=h((r1t,A5)=>{"use strict";var txe=yn();function rxe(e){return e==="<<"||e===null}s(rxe,"resolveYamlMerge");A5.exports=new txe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:rxe})});var V$=h((i1t,R5)=>{"use strict";var nxe=yn(),G$=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
104
104
  \r`;function ixe(e){if(e===null)return!1;var t,r,n=0,i=e.length,o=G$;for(r=0;r<i;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}s(ixe,"resolveYamlBinary");function sxe(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,o=G$,a=0,u=[];for(t=0;t<i;t++)t%4===0&&t&&(u.push(a>>16&255),u.push(a>>8&255),u.push(a&255)),a=a<<6|o.indexOf(n.charAt(t));return r=i%4*6,r===0?(u.push(a>>16&255),u.push(a>>8&255),u.push(a&255)):r===18?(u.push(a>>10&255),u.push(a>>2&255)):r===12&&u.push(a>>4&255),new Uint8Array(u)}s(sxe,"constructYamlBinary");function oxe(e){var t="",r=0,n,i,o=e.length,a=G$;for(n=0;n<o;n++)n%3===0&&n&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[n];return i=o%3,i===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):i===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):i===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}s(oxe,"representYamlBinary");function axe(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}s(axe,"isBinary");R5.exports=new nxe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ixe,construct:sxe,predicate:axe,represent:oxe})});var z$=h((o1t,C5)=>{"use strict";var uxe=yn(),cxe=Object.prototype.hasOwnProperty,lxe=Object.prototype.toString;function fxe(e){if(e===null)return!0;var t=[],r,n,i,o,a,u=e;for(r=0,n=u.length;r<n;r+=1){if(i=u[r],a=!1,lxe.call(i)!=="[object Object]")return!1;for(o in i)if(cxe.call(i,o))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}s(fxe,"resolveYamlOmap");function dxe(e){return e!==null?e:[]}s(dxe,"constructYamlOmap");C5.exports=new uxe("tag:yaml.org,2002:omap",{kind:"sequence",resolve:fxe,construct:dxe})});var H$=h((u1t,$5)=>{"use strict";var pxe=yn(),hxe=Object.prototype.toString;function mxe(e){if(e===null)return!0;var t,r,n,i,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(n=a[t],hxe.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;o[t]=[i[0],n[i[0]]]}return!0}s(mxe,"resolveYamlPairs");function _xe(e){if(e===null)return[];var t,r,n,i,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1)n=a[t],i=Object.keys(n),o[t]=[i[0],n[i[0]]];return o}s(_xe,"constructYamlPairs");$5.exports=new pxe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:mxe,construct:_xe})});var K$=h((l1t,D5)=>{"use strict";var gxe=yn(),yxe=Object.prototype.hasOwnProperty;function Exe(e){if(e===null)return!0;var t,r=e;for(t in r)if(yxe.call(r,t)&&r[t]!==null)return!1;return!0}s(Exe,"resolveYamlSet");function bxe(e){return e!==null?e:{}}s(bxe,"constructYamlSet");D5.exports=new gxe("tag:yaml.org,2002:set",{kind:"mapping",resolve:Exe,construct:bxe})});var hP=h((d1t,L5)=>{"use strict";L5.exports=F$().extend({implicit:[k$(),B$()],explicit:[V$(),z$(),H$(),K$()]})});var J5=h((p1t,X$)=>{"use strict";var kf=_h(),k5=gh(),Sxe=l5(),vxe=hP(),pc=Object.prototype.hasOwnProperty,mP=1,B5=2,G5=3,_P=4,W$=1,Oxe=2,j5=3,Pxe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,wxe=/[\x85\u2028\u2029]/,Ixe=/[,\[\]\{\}]/,V5=/^(?:!|!!|![a-z\-]+!)$/i,z5=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function M5(e){return Object.prototype.toString.call(e)}s(M5,"_class");function Zo(e){return e===10||e===13}s(Zo,"is_EOL");function Bf(e){return e===9||e===32}s(Bf,"is_WHITE_SPACE");function hi(e){return e===9||e===32||e===10||e===13}s(hi,"is_WS_OR_EOL");function yh(e){return e===44||e===91||e===93||e===123||e===125}s(yh,"is_FLOW_INDICATOR");function Txe(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}s(Txe,"fromHexCode");function Nxe(e){return e===120?2:e===117?4:e===85?8:0}s(Nxe,"escapedHexLen");function Axe(e){return 48<=e&&e<=57?e-48:-1}s(Axe,"fromDecimalCode");function U5(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
105
105
  `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}s(U5,"simpleEscapeSequence");function Rxe(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}s(Rxe,"charFromCodepoint");var H5=new Array(256),K5=new Array(256);for(Ff=0;Ff<256;Ff++)H5[Ff]=U5(Ff)?1:0,K5[Ff]=U5(Ff);var Ff;function Cxe(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||vxe,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}s(Cxe,"State");function W5(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Sxe(r),new k5(t,r)}s(W5,"generateError");function fe(e,t){throw W5(e,t)}s(fe,"throwError");function gP(e,t){e.onWarning&&e.onWarning.call(null,W5(e,t))}s(gP,"throwWarning");var x5={YAML:s(function(t,r,n){var i,o,a;t.version!==null&&fe(t,"duplication of %YAML directive"),n.length!==1&&fe(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&fe(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),a=parseInt(i[2],10),o!==1&&fe(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&gP(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:s(function(t,r,n){var i,o;n.length!==2&&fe(t,"TAG directive accepts exactly two arguments"),i=n[0],o=n[1],V5.test(i)||fe(t,"ill-formed tag handle (first argument) of the TAG directive"),pc.call(t.tagMap,i)&&fe(t,'there is a previously declared suffix for "'+i+'" tag handle'),z5.test(o)||fe(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{fe(t,"tag prefix is malformed: "+o)}t.tagMap[i]=o},"handleTagDirective")};function dc(e,t,r,n){var i,o,a,u;if(t<r){if(u=e.input.slice(t,r),n)for(i=0,o=u.length;i<o;i+=1)a=u.charCodeAt(i),a===9||32<=a&&a<=1114111||fe(e,"expected valid JSON character");else Pxe.test(u)&&fe(e,"the stream contains non-printable characters");e.result+=u}}s(dc,"captureSegment");function q5(e,t,r,n){var i,o,a,u;for(kf.isObject(r)||fe(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),a=0,u=i.length;a<u;a+=1)o=i[a],pc.call(t,o)||(t[o]=r[o],n[o]=!0)}s(q5,"mergeMappings");function Eh(e,t,r,n,i,o,a,u,c){var l,f;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,f=i.length;l<f;l+=1)Array.isArray(i[l])&&fe(e,"nested arrays are not supported inside keys"),typeof i=="object"&&M5(i[l])==="[object Object]"&&(i[l]="[object Object]");if(typeof i=="object"&&M5(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(l=0,f=o.length;l<f;l+=1)q5(e,t,o[l],r);else q5(e,t,o,r);else!e.json&&!pc.call(r,i)&&pc.call(t,i)&&(e.line=a||e.line,e.lineStart=u||e.lineStart,e.position=c||e.position,fe(e,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[i]=o,delete r[i];return t}s(Eh,"storeMappingPair");function Y$(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):fe(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}s(Y$,"readLineBreak");function Tr(e,t,r){for(var n=0,i=e.input.charCodeAt(e.position);i!==0;){for(;Bf(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(Zo(i))for(Y$(e),i=e.input.charCodeAt(e.position),n++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return r!==-1&&n!==0&&e.lineIndent<r&&gP(e,"deficient indentation"),n}s(Tr,"skipSeparationSpace");function yP(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||hi(r)))}s(yP,"testDocumentSeparator");function J$(e,t){t===1?e.result+=" ":t>1&&(e.result+=kf.repeat(`
106
- `,t-1))}s(J$,"writeFoldedLines");function $xe(e,t,r){var n,i,o,a,u,c,l,f,d=e.kind,_=e.result,m;if(m=e.input.charCodeAt(e.position),hi(m)||yh(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(i=e.input.charCodeAt(e.position+1),hi(i)||r&&yh(i)))return!1;for(e.kind="scalar",e.result="",o=a=e.position,u=!1;m!==0;){if(m===58){if(i=e.input.charCodeAt(e.position+1),hi(i)||r&&yh(i))break}else if(m===35){if(n=e.input.charCodeAt(e.position-1),hi(n))break}else{if(e.position===e.lineStart&&yP(e)||r&&yh(m))break;if(Zo(m))if(c=e.line,l=e.lineStart,f=e.lineIndent,Tr(e,!1,-1),e.lineIndent>=t){u=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=c,e.lineStart=l,e.lineIndent=f;break}}u&&(dc(e,o,a,!1),J$(e,e.line-c),o=a=e.position,u=!1),Bf(m)||(a=e.position+1),m=e.input.charCodeAt(++e.position)}return dc(e,o,a,!1),e.result?!0:(e.kind=d,e.result=_,!1)}s($xe,"readPlainScalar");function Dxe(e,t){var r,n,i;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(dc(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,i=e.position;else return!0;else Zo(r)?(dc(e,n,i,!0),J$(e,Tr(e,!1,t)),n=i=e.position):e.position===e.lineStart&&yP(e)?fe(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);fe(e,"unexpected end of the stream within a single quoted scalar")}s(Dxe,"readSingleQuotedScalar");function Lxe(e,t){var r,n,i,o,a,u;if(u=e.input.charCodeAt(e.position),u!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(u=e.input.charCodeAt(e.position))!==0;){if(u===34)return dc(e,r,e.position,!0),e.position++,!0;if(u===92){if(dc(e,r,e.position,!0),u=e.input.charCodeAt(++e.position),Zo(u))Tr(e,!1,t);else if(u<256&&H5[u])e.result+=K5[u],e.position++;else if((a=Nxe(u))>0){for(i=a,o=0;i>0;i--)u=e.input.charCodeAt(++e.position),(a=Txe(u))>=0?o=(o<<4)+a:fe(e,"expected hexadecimal character");e.result+=Rxe(o),e.position++}else fe(e,"unknown escape sequence");r=n=e.position}else Zo(u)?(dc(e,r,n,!0),J$(e,Tr(e,!1,t)),r=n=e.position):e.position===e.lineStart&&yP(e)?fe(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}fe(e,"unexpected end of the stream within a double quoted scalar")}s(Lxe,"readDoubleQuotedScalar");function jxe(e,t){var r=!0,n,i,o,a=e.tag,u,c=e.anchor,l,f,d,_,m,g=Object.create(null),y,b,E,S;if(S=e.input.charCodeAt(e.position),S===91)f=93,m=!1,u=[];else if(S===123)f=125,m=!0,u={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),S=e.input.charCodeAt(++e.position);S!==0;){if(Tr(e,!0,t),S=e.input.charCodeAt(e.position),S===f)return e.position++,e.tag=a,e.anchor=c,e.kind=m?"mapping":"sequence",e.result=u,!0;r?S===44&&fe(e,"expected the node content, but found ','"):fe(e,"missed comma between flow collection entries"),b=y=E=null,d=_=!1,S===63&&(l=e.input.charCodeAt(e.position+1),hi(l)&&(d=_=!0,e.position++,Tr(e,!0,t))),n=e.line,i=e.lineStart,o=e.position,bh(e,t,mP,!1,!0),b=e.tag,y=e.result,Tr(e,!0,t),S=e.input.charCodeAt(e.position),(_||e.line===n)&&S===58&&(d=!0,S=e.input.charCodeAt(++e.position),Tr(e,!0,t),bh(e,t,mP,!1,!0),E=e.result),m?Eh(e,u,g,b,y,E,n,i,o):d?u.push(Eh(e,null,g,b,y,E,n,i,o)):u.push(y),Tr(e,!0,t),S=e.input.charCodeAt(e.position),S===44?(r=!0,S=e.input.charCodeAt(++e.position)):r=!1}fe(e,"unexpected end of the stream within a flow collection")}s(jxe,"readFlowCollection");function Mxe(e,t){var r,n,i=W$,o=!1,a=!1,u=t,c=0,l=!1,f,d;if(d=e.input.charCodeAt(e.position),d===124)n=!1;else if(d===62)n=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)W$===i?i=d===43?j5:Oxe:fe(e,"repeat of a chomping mode identifier");else if((f=Axe(d))>=0)f===0?fe(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?fe(e,"repeat of an indentation width identifier"):(u=t+f-1,a=!0);else break;if(Bf(d)){do d=e.input.charCodeAt(++e.position);while(Bf(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Zo(d)&&d!==0)}for(;d!==0;){for(Y$(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!a||e.lineIndent<u)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>u&&(u=e.lineIndent),Zo(d)){c++;continue}if(e.lineIndent<u){i===j5?e.result+=kf.repeat(`
106
+ `,t-1))}s(J$,"writeFoldedLines");function $xe(e,t,r){var n,i,o,a,u,c,l,f,d=e.kind,_=e.result,m;if(m=e.input.charCodeAt(e.position),hi(m)||yh(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(i=e.input.charCodeAt(e.position+1),hi(i)||r&&yh(i)))return!1;for(e.kind="scalar",e.result="",o=a=e.position,u=!1;m!==0;){if(m===58){if(i=e.input.charCodeAt(e.position+1),hi(i)||r&&yh(i))break}else if(m===35){if(n=e.input.charCodeAt(e.position-1),hi(n))break}else{if(e.position===e.lineStart&&yP(e)||r&&yh(m))break;if(Zo(m))if(c=e.line,l=e.lineStart,f=e.lineIndent,Tr(e,!1,-1),e.lineIndent>=t){u=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=c,e.lineStart=l,e.lineIndent=f;break}}u&&(dc(e,o,a,!1),J$(e,e.line-c),o=a=e.position,u=!1),Bf(m)||(a=e.position+1),m=e.input.charCodeAt(++e.position)}return dc(e,o,a,!1),e.result?!0:(e.kind=d,e.result=_,!1)}s($xe,"readPlainScalar");function Dxe(e,t){var r,n,i;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(dc(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,i=e.position;else return!0;else Zo(r)?(dc(e,n,i,!0),J$(e,Tr(e,!1,t)),n=i=e.position):e.position===e.lineStart&&yP(e)?fe(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);fe(e,"unexpected end of the stream within a single quoted scalar")}s(Dxe,"readSingleQuotedScalar");function Lxe(e,t){var r,n,i,o,a,u;if(u=e.input.charCodeAt(e.position),u!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(u=e.input.charCodeAt(e.position))!==0;){if(u===34)return dc(e,r,e.position,!0),e.position++,!0;if(u===92){if(dc(e,r,e.position,!0),u=e.input.charCodeAt(++e.position),Zo(u))Tr(e,!1,t);else if(u<256&&H5[u])e.result+=K5[u],e.position++;else if((a=Nxe(u))>0){for(i=a,o=0;i>0;i--)u=e.input.charCodeAt(++e.position),(a=Txe(u))>=0?o=(o<<4)+a:fe(e,"expected hexadecimal character");e.result+=Rxe(o),e.position++}else fe(e,"unknown escape sequence");r=n=e.position}else Zo(u)?(dc(e,r,n,!0),J$(e,Tr(e,!1,t)),r=n=e.position):e.position===e.lineStart&&yP(e)?fe(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}fe(e,"unexpected end of the stream within a double quoted scalar")}s(Lxe,"readDoubleQuotedScalar");function jxe(e,t){var r=!0,n,i,o,a=e.tag,u,c=e.anchor,l,f,d,_,m,g=Object.create(null),y,b,E,v;if(v=e.input.charCodeAt(e.position),v===91)f=93,m=!1,u=[];else if(v===123)f=125,m=!0,u={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),v=e.input.charCodeAt(++e.position);v!==0;){if(Tr(e,!0,t),v=e.input.charCodeAt(e.position),v===f)return e.position++,e.tag=a,e.anchor=c,e.kind=m?"mapping":"sequence",e.result=u,!0;r?v===44&&fe(e,"expected the node content, but found ','"):fe(e,"missed comma between flow collection entries"),b=y=E=null,d=_=!1,v===63&&(l=e.input.charCodeAt(e.position+1),hi(l)&&(d=_=!0,e.position++,Tr(e,!0,t))),n=e.line,i=e.lineStart,o=e.position,bh(e,t,mP,!1,!0),b=e.tag,y=e.result,Tr(e,!0,t),v=e.input.charCodeAt(e.position),(_||e.line===n)&&v===58&&(d=!0,v=e.input.charCodeAt(++e.position),Tr(e,!0,t),bh(e,t,mP,!1,!0),E=e.result),m?Eh(e,u,g,b,y,E,n,i,o):d?u.push(Eh(e,null,g,b,y,E,n,i,o)):u.push(y),Tr(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(r=!0,v=e.input.charCodeAt(++e.position)):r=!1}fe(e,"unexpected end of the stream within a flow collection")}s(jxe,"readFlowCollection");function Mxe(e,t){var r,n,i=W$,o=!1,a=!1,u=t,c=0,l=!1,f,d;if(d=e.input.charCodeAt(e.position),d===124)n=!1;else if(d===62)n=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)W$===i?i=d===43?j5:Oxe:fe(e,"repeat of a chomping mode identifier");else if((f=Axe(d))>=0)f===0?fe(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?fe(e,"repeat of an indentation width identifier"):(u=t+f-1,a=!0);else break;if(Bf(d)){do d=e.input.charCodeAt(++e.position);while(Bf(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Zo(d)&&d!==0)}for(;d!==0;){for(Y$(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!a||e.lineIndent<u)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>u&&(u=e.lineIndent),Zo(d)){c++;continue}if(e.lineIndent<u){i===j5?e.result+=kf.repeat(`
107
107
  `,o?1+c:c):i===W$&&o&&(e.result+=`
108
108
  `);break}for(n?Bf(d)?(l=!0,e.result+=kf.repeat(`
109
109
  `,o?1+c:c)):l?(l=!1,e.result+=kf.repeat(`
110
110
  `,c+1)):c===0?o&&(e.result+=" "):e.result+=kf.repeat(`
111
111
  `,c):e.result+=kf.repeat(`
112
- `,o?1+c:c),o=!0,a=!0,c=0,r=e.position;!Zo(d)&&d!==0;)d=e.input.charCodeAt(++e.position);dc(e,r,e.position,!1)}return!0}s(Mxe,"readBlockScalar");function F5(e,t){var r,n=e.tag,i=e.anchor,o=[],a,u=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,fe(e,"tab characters must not be used in indentation")),!(c!==45||(a=e.input.charCodeAt(e.position+1),!hi(a))));){if(u=!0,e.position++,Tr(e,!0,-1)&&e.lineIndent<=t){o.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,bh(e,t,G5,!1,!0),o.push(e.result),Tr(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)fe(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return u?(e.tag=n,e.anchor=i,e.kind="sequence",e.result=o,!0):!1}s(F5,"readBlockSequence");function Uxe(e,t,r){var n,i,o,a,u,c,l=e.tag,f=e.anchor,d={},_=Object.create(null),m=null,g=null,y=null,b=!1,E=!1,S;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),S=e.input.charCodeAt(e.position);S!==0;){if(!b&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,fe(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),o=e.line,(S===63||S===58)&&hi(n))S===63?(b&&(Eh(e,d,_,m,g,null,a,u,c),m=g=y=null),E=!0,b=!0,i=!0):b?(b=!1,i=!0):fe(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,S=n;else{if(a=e.line,u=e.lineStart,c=e.position,!bh(e,r,B5,!1,!0))break;if(e.line===o){for(S=e.input.charCodeAt(e.position);Bf(S);)S=e.input.charCodeAt(++e.position);if(S===58)S=e.input.charCodeAt(++e.position),hi(S)||fe(e,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(Eh(e,d,_,m,g,null,a,u,c),m=g=y=null),E=!0,b=!1,i=!1,m=e.tag,g=e.result;else if(E)fe(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=f,!0}else if(E)fe(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=l,e.anchor=f,!0}if((e.line===o||e.lineIndent>t)&&(b&&(a=e.line,u=e.lineStart,c=e.position),bh(e,t,_P,!0,i)&&(b?g=e.result:y=e.result),b||(Eh(e,d,_,m,g,y,a,u,c),m=g=y=null),Tr(e,!0,-1),S=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&S!==0)fe(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return b&&Eh(e,d,_,m,g,null,a,u,c),E&&(e.tag=l,e.anchor=f,e.kind="mapping",e.result=d),E}s(Uxe,"readBlockMapping");function xxe(e){var t,r=!1,n=!1,i,o,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&fe(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(n=!0,i="!!",a=e.input.charCodeAt(++e.position)):i="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(o=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):fe(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!hi(a);)a===33&&(n?fe(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),V5.test(i)||fe(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),Ixe.test(o)&&fe(e,"tag suffix cannot contain flow indicator characters")}o&&!z5.test(o)&&fe(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{fe(e,"tag name is malformed: "+o)}return r?e.tag=o:pc.call(e.tagMap,i)?e.tag=e.tagMap[i]+o:i==="!"?e.tag="!"+o:i==="!!"?e.tag="tag:yaml.org,2002:"+o:fe(e,'undeclared tag handle "'+i+'"'),!0}s(xxe,"readTagProperty");function qxe(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&fe(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!hi(r)&&!yh(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&fe(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}s(qxe,"readAnchorProperty");function Fxe(e){var t,r,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!hi(n)&&!yh(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&fe(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),pc.call(e.anchorMap,r)||fe(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Tr(e,!0,-1),!0}s(Fxe,"readAlias");function bh(e,t,r,n,i){var o,a,u,c=1,l=!1,f=!1,d,_,m,g,y,b;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=u=_P===r||G5===r,n&&Tr(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;xxe(e)||qxe(e);)Tr(e,!0,-1)?(l=!0,u=o,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):u=!1;if(u&&(u=l||i),(c===1||_P===r)&&(mP===r||B5===r?y=t:y=t+1,b=e.position-e.lineStart,c===1?u&&(F5(e,b)||Uxe(e,b,y))||jxe(e,y)?f=!0:(a&&Mxe(e,y)||Dxe(e,y)||Lxe(e,y)?f=!0:Fxe(e)?(f=!0,(e.tag!==null||e.anchor!==null)&&fe(e,"alias node should not have any properties")):$xe(e,y,mP===r)&&(f=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(f=u&&F5(e,b))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&fe(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,_=e.implicitTypes.length;d<_;d+=1)if(g=e.implicitTypes[d],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(pc.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,m=e.typeMap.multi[e.kind||"fallback"],d=0,_=m.length;d<_;d+=1)if(e.tag.slice(0,m[d].tag.length)===m[d].tag){g=m[d];break}g||fe(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&fe(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):fe(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||f}s(bh,"composeNode");function kxe(e){var t=e.position,r,n,i,o=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(Tr(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(o=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!hi(a);)a=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),i=[],n.length<1&&fe(e,"directive name must not be less than one character in length");a!==0;){for(;Bf(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!Zo(a));break}if(Zo(a))break;for(r=e.position;a!==0&&!hi(a);)a=e.input.charCodeAt(++e.position);i.push(e.input.slice(r,e.position))}a!==0&&Y$(e),pc.call(x5,n)?x5[n](e,n,i):gP(e,'unknown document directive "'+n+'"')}if(Tr(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Tr(e,!0,-1)):o&&fe(e,"directives end mark is expected"),bh(e,e.lineIndent-1,_P,!1,!0),Tr(e,!0,-1),e.checkLineBreaks&&wxe.test(e.input.slice(t,e.position))&&gP(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&yP(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Tr(e,!0,-1));return}if(e.position<e.length-1)fe(e,"end of the stream or a document separator is expected");else return}s(kxe,"readDocument");function Y5(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
112
+ `,o?1+c:c),o=!0,a=!0,c=0,r=e.position;!Zo(d)&&d!==0;)d=e.input.charCodeAt(++e.position);dc(e,r,e.position,!1)}return!0}s(Mxe,"readBlockScalar");function F5(e,t){var r,n=e.tag,i=e.anchor,o=[],a,u=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,fe(e,"tab characters must not be used in indentation")),!(c!==45||(a=e.input.charCodeAt(e.position+1),!hi(a))));){if(u=!0,e.position++,Tr(e,!0,-1)&&e.lineIndent<=t){o.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,bh(e,t,G5,!1,!0),o.push(e.result),Tr(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)fe(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return u?(e.tag=n,e.anchor=i,e.kind="sequence",e.result=o,!0):!1}s(F5,"readBlockSequence");function Uxe(e,t,r){var n,i,o,a,u,c,l=e.tag,f=e.anchor,d={},_=Object.create(null),m=null,g=null,y=null,b=!1,E=!1,v;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),v=e.input.charCodeAt(e.position);v!==0;){if(!b&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,fe(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),o=e.line,(v===63||v===58)&&hi(n))v===63?(b&&(Eh(e,d,_,m,g,null,a,u,c),m=g=y=null),E=!0,b=!0,i=!0):b?(b=!1,i=!0):fe(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,v=n;else{if(a=e.line,u=e.lineStart,c=e.position,!bh(e,r,B5,!1,!0))break;if(e.line===o){for(v=e.input.charCodeAt(e.position);Bf(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),hi(v)||fe(e,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(Eh(e,d,_,m,g,null,a,u,c),m=g=y=null),E=!0,b=!1,i=!1,m=e.tag,g=e.result;else if(E)fe(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=f,!0}else if(E)fe(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=l,e.anchor=f,!0}if((e.line===o||e.lineIndent>t)&&(b&&(a=e.line,u=e.lineStart,c=e.position),bh(e,t,_P,!0,i)&&(b?g=e.result:y=e.result),b||(Eh(e,d,_,m,g,y,a,u,c),m=g=y=null),Tr(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&v!==0)fe(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return b&&Eh(e,d,_,m,g,null,a,u,c),E&&(e.tag=l,e.anchor=f,e.kind="mapping",e.result=d),E}s(Uxe,"readBlockMapping");function xxe(e){var t,r=!1,n=!1,i,o,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&fe(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(n=!0,i="!!",a=e.input.charCodeAt(++e.position)):i="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(o=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):fe(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!hi(a);)a===33&&(n?fe(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),V5.test(i)||fe(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),Ixe.test(o)&&fe(e,"tag suffix cannot contain flow indicator characters")}o&&!z5.test(o)&&fe(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{fe(e,"tag name is malformed: "+o)}return r?e.tag=o:pc.call(e.tagMap,i)?e.tag=e.tagMap[i]+o:i==="!"?e.tag="!"+o:i==="!!"?e.tag="tag:yaml.org,2002:"+o:fe(e,'undeclared tag handle "'+i+'"'),!0}s(xxe,"readTagProperty");function qxe(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&fe(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!hi(r)&&!yh(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&fe(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}s(qxe,"readAnchorProperty");function Fxe(e){var t,r,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!hi(n)&&!yh(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&fe(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),pc.call(e.anchorMap,r)||fe(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Tr(e,!0,-1),!0}s(Fxe,"readAlias");function bh(e,t,r,n,i){var o,a,u,c=1,l=!1,f=!1,d,_,m,g,y,b;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=u=_P===r||G5===r,n&&Tr(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;xxe(e)||qxe(e);)Tr(e,!0,-1)?(l=!0,u=o,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):u=!1;if(u&&(u=l||i),(c===1||_P===r)&&(mP===r||B5===r?y=t:y=t+1,b=e.position-e.lineStart,c===1?u&&(F5(e,b)||Uxe(e,b,y))||jxe(e,y)?f=!0:(a&&Mxe(e,y)||Dxe(e,y)||Lxe(e,y)?f=!0:Fxe(e)?(f=!0,(e.tag!==null||e.anchor!==null)&&fe(e,"alias node should not have any properties")):$xe(e,y,mP===r)&&(f=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(f=u&&F5(e,b))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&fe(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,_=e.implicitTypes.length;d<_;d+=1)if(g=e.implicitTypes[d],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(pc.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,m=e.typeMap.multi[e.kind||"fallback"],d=0,_=m.length;d<_;d+=1)if(e.tag.slice(0,m[d].tag.length)===m[d].tag){g=m[d];break}g||fe(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&fe(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):fe(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||f}s(bh,"composeNode");function kxe(e){var t=e.position,r,n,i,o=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(Tr(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(o=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!hi(a);)a=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),i=[],n.length<1&&fe(e,"directive name must not be less than one character in length");a!==0;){for(;Bf(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!Zo(a));break}if(Zo(a))break;for(r=e.position;a!==0&&!hi(a);)a=e.input.charCodeAt(++e.position);i.push(e.input.slice(r,e.position))}a!==0&&Y$(e),pc.call(x5,n)?x5[n](e,n,i):gP(e,'unknown document directive "'+n+'"')}if(Tr(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Tr(e,!0,-1)):o&&fe(e,"directives end mark is expected"),bh(e,e.lineIndent-1,_P,!1,!0),Tr(e,!0,-1),e.checkLineBreaks&&wxe.test(e.input.slice(t,e.position))&&gP(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&yP(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Tr(e,!0,-1));return}if(e.position<e.length-1)fe(e,"end of the stream or a document separator is expected");else return}s(kxe,"readDocument");function Y5(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
113
113
  `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Cxe(e,t),n=e.indexOf("\0");for(n!==-1&&(r.position=n,fe(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)kxe(r);return r.documents}s(Y5,"loadDocuments");function Bxe(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var n=Y5(e,r);if(typeof t!="function")return n;for(var i=0,o=n.length;i<o;i+=1)t(n[i])}s(Bxe,"loadAll");function Gxe(e,t){var r=Y5(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new k5("expected a single document in the stream, but found more")}}s(Gxe,"load");X$.exports.loadAll=Bxe;X$.exports.load=Gxe});var gK=h((m1t,_K)=>{"use strict";var SP=_h(),ay=gh(),Vxe=hP(),sK=Object.prototype.toString,oK=Object.prototype.hasOwnProperty,rD=65279,zxe=9,iy=10,Hxe=13,Kxe=32,Wxe=33,Yxe=34,Z$=35,Jxe=37,Xxe=38,Zxe=39,Qxe=42,aK=44,eqe=45,EP=58,tqe=61,rqe=62,nqe=63,iqe=64,uK=91,cK=93,sqe=96,lK=123,oqe=124,fK=125,En={};En[0]="\\0";En[7]="\\a";En[8]="\\b";En[9]="\\t";En[10]="\\n";En[11]="\\v";En[12]="\\f";En[13]="\\r";En[27]="\\e";En[34]='\\"';En[92]="\\\\";En[133]="\\N";En[160]="\\_";En[8232]="\\L";En[8233]="\\P";var aqe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],uqe=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function cqe(e,t){var r,n,i,o,a,u,c;if(t===null)return{};for(r={},n=Object.keys(t),i=0,o=n.length;i<o;i+=1)a=n[i],u=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),c=e.compiledTypeMap.fallback[a],c&&oK.call(c.styleAliases,u)&&(u=c.styleAliases[u]),r[a]=u;return r}s(cqe,"compileStyleMap");function lqe(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else if(e<=4294967295)r="U",n=8;else throw new ay("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+SP.repeat("0",n-t.length)+t}s(lqe,"encodeHex");var fqe=1,sy=2;function dqe(e){this.schema=e.schema||Vxe,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=SP.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=cqe(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?sy:fqe,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}s(dqe,"State");function X5(e,t){for(var r=SP.repeat(" ",t),n=0,i=-1,o="",a,u=e.length;n<u;)i=e.indexOf(`
114
114
  `,n),i===-1?(a=e.slice(n),n=u):(a=e.slice(n,i+1),n=i+1),a.length&&a!==`
115
115
  `&&(o+=r),o+=a;return o}s(X5,"indentString");function Q$(e,t){return`
@@ -135,25 +135,25 @@ export default environment;`;function YFe(e){return{name:"environment",setup(t){
135
135
  `:""},this._extScope=t,this._scope=new so.Scope({parent:t}),this._nodes=[new UD]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new CD(t,o,n)),o}const(t,r,n){return this._def(so.varKinds.const,t,r,n)}let(t,r,n){return this._def(so.varKinds.let,t,r,n)}var(t,r,n){return this._def(so.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new GP(t,r,n))}add(t,r){return this._leafNode(new $D(t,Le.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==Xe.nil&&this._leafNode(new MD(t)),this}object(...t){let r=["{"];for(let[n,i]of t)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,Xe.addCodeArg)(r,i));return r.push("}"),new Xe._Code(r)}if(t,r,n){if(this._blockNode(new Hf(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new Hf(t))}else(){return this._elseNode(new Rh)}endIf(){return this._endBlockNode(Hf,Rh)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new xD(t),r)}forRange(t,r,n,i,o=this.opts.es5?so.varKinds.var:so.varKinds.let){let a=this._scope.toName(t);return this._for(new qD(o,a,r,n),()=>i(a))}forOf(t,r,n,i=so.varKinds.const){let o=this._scope.toName(t);if(this.opts.es5){let a=r instanceof Xe.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,Xe._)`${a}.length`,u=>{this.var(o,(0,Xe._)`${a}[${u}]`),n(o)})}return this._for(new VP("of",i,o,r),()=>n(o))}forIn(t,r,n,i=this.opts.es5?so.varKinds.var:so.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,Xe._)`Object.keys(${r})`,n);let o=this._scope.toName(t);return this._for(new VP("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(Kf)}label(t){return this._leafNode(new DD(t))}break(t){return this._leafNode(new LD(t))}return(t){let r=new Ey;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ey)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new FD;if(this._blockNode(i),this.code(t),r){let o=this.name("e");this._currNode=i.catch=new by(o),r(o)}return n&&(this._currNode=i.finally=new Sy,this.code(n)),this._endBlockNode(by,Sy)}throw(t){return this._leafNode(new jD(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=Xe.nil,n,i){return this._blockNode(new yy(t,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(yy)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof Hf))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};Le.CodeGen=kD;function Wf(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}s(Wf,"addNames");function zP(e,t){return t instanceof Xe._CodeOrName?Wf(e,t.names):e}s(zP,"addExprNames");function Ch(e,t,r){if(e instanceof Xe.Name)return n(e);if(!i(e))return e;return new Xe._Code(e._items.reduce((o,a)=>(a instanceof Xe.Name&&(a=n(a)),a instanceof Xe._Code?o.push(...a._items):o.push(a),o),[]));function n(o){let a=r[o.str];return a===void 0||t[o.str]!==1?o:(delete t[o.str],a)}function i(o){return o instanceof Xe._Code&&o._items.some(a=>a instanceof Xe.Name&&t[a.str]===1&&r[a.str]!==void 0)}}s(Ch,"optimizeExpr");function ske(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}s(ske,"subtractNames");function k9(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Xe._)`!${BD(e)}`}s(k9,"not");Le.not=k9;var oke=B9(Le.operators.AND);function ake(...e){return e.reduce(oke)}s(ake,"and");Le.and=ake;var uke=B9(Le.operators.OR);function cke(...e){return e.reduce(uke)}s(cke,"or");Le.or=cke;function B9(e){return(t,r)=>t===Xe.nil?r:r===Xe.nil?t:(0,Xe._)`${BD(t)} ${e} ${BD(r)}`}s(B9,"mappend");function BD(e){return e instanceof Xe.Name?e:(0,Xe._)`(${e})`}s(BD,"par")});var Ve=h(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.checkStrictMode=je.getErrorPath=je.Type=je.useFunc=je.setEvaluated=je.evaluatedPropsToName=je.mergeEvaluated=je.eachItem=je.unescapeJsonPointer=je.escapeJsonPointer=je.escapeFragment=je.unescapeFragment=je.schemaRefOrVal=je.schemaHasRulesButRef=je.schemaHasRules=je.checkUnknownRules=je.alwaysValidSchema=je.toHash=void 0;var Mt=Oe(),lke=Ah();function fke(e){let t={};for(let r of e)t[r]=!0;return t}s(fke,"toHash");je.toHash=fke;function dke(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(z9(e,t),!H9(t,e.self.RULES.all))}s(dke,"alwaysValidSchema");je.alwaysValidSchema=dke;function z9(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let i=n.RULES.keywords;for(let o in t)i[o]||J9(e,`unknown keyword: "${o}"`)}s(z9,"checkUnknownRules");je.checkUnknownRules=z9;function H9(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}s(H9,"schemaHasRules");je.schemaHasRules=H9;function pke(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}s(pke,"schemaHasRulesButRef");je.schemaHasRulesButRef=pke;function hke({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Mt._)`${r}`}return(0,Mt._)`${e}${t}${(0,Mt.getProperty)(n)}`}s(hke,"schemaRefOrVal");je.schemaRefOrVal=hke;function mke(e){return K9(decodeURIComponent(e))}s(mke,"unescapeFragment");je.unescapeFragment=mke;function _ke(e){return encodeURIComponent(GD(e))}s(_ke,"escapeFragment");je.escapeFragment=_ke;function GD(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}s(GD,"escapeJsonPointer");je.escapeJsonPointer=GD;function K9(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}s(K9,"unescapeJsonPointer");je.unescapeJsonPointer=K9;function gke(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}s(gke,"eachItem");je.eachItem=gke;function G9({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,o,a,u)=>{let c=a===void 0?o:a instanceof Mt.Name?(o instanceof Mt.Name?e(i,o,a):t(i,o,a),a):o instanceof Mt.Name?(t(i,a,o),o):r(o,a);return u===Mt.Name&&!(c instanceof Mt.Name)?n(i,c):c}}s(G9,"makeMergeEvaluated");je.mergeEvaluated={props:G9({mergeNames:(e,t,r)=>e.if((0,Mt._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Mt._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Mt._)`${r} || {}`).code((0,Mt._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Mt._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Mt._)`${r} || {}`),VD(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:W9}),items:G9({mergeNames:(e,t,r)=>e.if((0,Mt._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Mt._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Mt._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Mt._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function W9(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Mt._)`{}`);return t!==void 0&&VD(e,r,t),r}s(W9,"evaluatedPropsToName");je.evaluatedPropsToName=W9;function VD(e,t,r){Object.keys(r).forEach(n=>e.assign((0,Mt._)`${t}${(0,Mt.getProperty)(n)}`,!0))}s(VD,"setEvaluated");je.setEvaluated=VD;var V9={};function yke(e,t){return e.scopeValue("func",{ref:t,code:V9[t.code]||(V9[t.code]=new lke._Code(t.code))})}s(yke,"useFunc");je.useFunc=yke;var Y9;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Y9=je.Type||(je.Type={}));function Eke(e,t,r){if(e instanceof Mt.Name){let n=t===Y9.Num;return r?n?(0,Mt._)`"[" + ${e} + "]"`:(0,Mt._)`"['" + ${e} + "']"`:n?(0,Mt._)`"/" + ${e}`:(0,Mt._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Mt.getProperty)(e).toString():"/"+GD(e)}s(Eke,"getErrorPath");je.getErrorPath=Eke;function J9(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}s(J9,"checkStrictMode");je.checkStrictMode=J9});var hs=h(zD=>{"use strict";Object.defineProperty(zD,"__esModule",{value:!0});var bn=Oe(),bke={data:new bn.Name("data"),valCxt:new bn.Name("valCxt"),instancePath:new bn.Name("instancePath"),parentData:new bn.Name("parentData"),parentDataProperty:new bn.Name("parentDataProperty"),rootData:new bn.Name("rootData"),dynamicAnchors:new bn.Name("dynamicAnchors"),vErrors:new bn.Name("vErrors"),errors:new bn.Name("errors"),this:new bn.Name("this"),self:new bn.Name("self"),scope:new bn.Name("scope"),json:new bn.Name("json"),jsonPos:new bn.Name("jsonPos"),jsonLen:new bn.Name("jsonLen"),jsonPart:new bn.Name("jsonPart")};zD.default=bke});var vy=h(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.extendErrors=Sn.resetErrorsCount=Sn.reportExtraError=Sn.reportError=Sn.keyword$DataError=Sn.keywordError=void 0;var rt=Oe(),KP=Ve(),qn=hs();Sn.keywordError={message:({keyword:e})=>(0,rt.str)`must pass "${e}" keyword validation`};Sn.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,rt.str)`"${e}" keyword must be ${t} ($data)`:(0,rt.str)`"${e}" keyword is invalid ($data)`};function Ske(e,t=Sn.keywordError,r,n){let{it:i}=e,{gen:o,compositeRule:a,allErrors:u}=i,c=Q9(e,t,r);n??(a||u)?X9(o,c):Z9(i,(0,rt._)`[${c}]`)}s(Ske,"reportError");Sn.reportError=Ske;function vke(e,t=Sn.keywordError,r){let{it:n}=e,{gen:i,compositeRule:o,allErrors:a}=n,u=Q9(e,t,r);X9(i,u),o||a||Z9(n,qn.default.vErrors)}s(vke,"reportExtraError");Sn.reportExtraError=vke;function Oke(e,t){e.assign(qn.default.errors,t),e.if((0,rt._)`${qn.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,rt._)`${qn.default.vErrors}.length`,t),()=>e.assign(qn.default.vErrors,null)))}s(Oke,"resetErrorsCount");Sn.resetErrorsCount=Oke;function Pke({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",i,qn.default.errors,u=>{e.const(a,(0,rt._)`${qn.default.vErrors}[${u}]`),e.if((0,rt._)`${a}.instancePath === undefined`,()=>e.assign((0,rt._)`${a}.instancePath`,(0,rt.strConcat)(qn.default.instancePath,o.errorPath))),e.assign((0,rt._)`${a}.schemaPath`,(0,rt.str)`${o.errSchemaPath}/${t}`),o.opts.verbose&&(e.assign((0,rt._)`${a}.schema`,r),e.assign((0,rt._)`${a}.data`,n))})}s(Pke,"extendErrors");Sn.extendErrors=Pke;function X9(e,t){let r=e.const("err",t);e.if((0,rt._)`${qn.default.vErrors} === null`,()=>e.assign(qn.default.vErrors,(0,rt._)`[${r}]`),(0,rt._)`${qn.default.vErrors}.push(${r})`),e.code((0,rt._)`${qn.default.errors}++`)}s(X9,"addError");function Z9(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;i.$async?r.throw((0,rt._)`new ${e.ValidationError}(${t})`):(r.assign((0,rt._)`${n}.errors`,t),r.return(!1))}s(Z9,"returnErrors");var Yf={keyword:new rt.Name("keyword"),schemaPath:new rt.Name("schemaPath"),params:new rt.Name("params"),propertyName:new rt.Name("propertyName"),message:new rt.Name("message"),schema:new rt.Name("schema"),parentSchema:new rt.Name("parentSchema")};function Q9(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,rt._)`{}`:wke(e,t,r)}s(Q9,"errorObjectCode");function wke(e,t,r={}){let{gen:n,it:i}=e,o=[Ike(i,r),Tke(e,r)];return Nke(e,t,o),n.object(...o)}s(wke,"errorObject");function Ike({errorPath:e},{instancePath:t}){let r=t?(0,rt.str)`${e}${(0,KP.getErrorPath)(t,KP.Type.Str)}`:e;return[qn.default.instancePath,(0,rt.strConcat)(qn.default.instancePath,r)]}s(Ike,"errorInstancePath");function Tke({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,rt.str)`${t}/${e}`;return r&&(i=(0,rt.str)`${i}${(0,KP.getErrorPath)(r,KP.Type.Str)}`),[Yf.schemaPath,i]}s(Tke,"errorSchemaPath");function Nke(e,{params:t,message:r},n){let{keyword:i,data:o,schemaValue:a,it:u}=e,{opts:c,propertyName:l,topSchemaRef:f,schemaPath:d}=u;n.push([Yf.keyword,i],[Yf.params,typeof t=="function"?t(e):t||(0,rt._)`{}`]),c.messages&&n.push([Yf.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([Yf.schema,a],[Yf.parentSchema,(0,rt._)`${f}${d}`],[qn.default.data,o]),l&&n.push([Yf.propertyName,l])}s(Nke,"extraErrorProps")});var t7=h($h=>{"use strict";Object.defineProperty($h,"__esModule",{value:!0});$h.boolOrEmptySchema=$h.topBoolOrEmptySchema=void 0;var Ake=vy(),Rke=Oe(),Cke=hs(),$ke={message:"boolean schema is false"};function Dke(e){let{gen:t,schema:r,validateName:n}=e;r===!1?e7(e,!1):typeof r=="object"&&r.$async===!0?t.return(Cke.default.data):(t.assign((0,Rke._)`${n}.errors`,null),t.return(!0))}s(Dke,"topBoolOrEmptySchema");$h.topBoolOrEmptySchema=Dke;function Lke(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),e7(e)):r.var(t,!0)}s(Lke,"boolOrEmptySchema");$h.boolOrEmptySchema=Lke;function e7(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,Ake.reportError)(i,$ke,void 0,t)}s(e7,"falseSchemaError")});var HD=h(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});Dh.getRules=Dh.isJSONType=void 0;var jke=["string","number","integer","boolean","null","object","array"],Mke=new Set(jke);function Uke(e){return typeof e=="string"&&Mke.has(e)}s(Uke,"isJSONType");Dh.isJSONType=Uke;function xke(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}s(xke,"getRules");Dh.getRules=xke});var KD=h(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});gc.shouldUseRule=gc.shouldUseGroup=gc.schemaHasRulesForType=void 0;function qke({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&r7(e,n)}s(qke,"schemaHasRulesForType");gc.schemaHasRulesForType=qke;function r7(e,t){return t.rules.some(r=>n7(e,r))}s(r7,"shouldUseGroup");gc.shouldUseGroup=r7;function n7(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}s(n7,"shouldUseRule");gc.shouldUseRule=n7});var Py=h(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.reportTypeError=Xr.checkDataTypes=Xr.checkDataType=Xr.coerceAndCheckDataType=Xr.getJSONTypes=Xr.getSchemaTypes=Xr.DataType=void 0;var Fke=HD(),kke=KD(),Bke=vy(),Te=Oe(),i7=Ve(),Oy;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Oy=Xr.DataType||(Xr.DataType={}));function Gke(e){let t=s7(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}s(Gke,"getSchemaTypes");Xr.getSchemaTypes=Gke;function s7(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(Fke.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}s(s7,"getJSONTypes");Xr.getJSONTypes=s7;function Vke(e,t){let{gen:r,data:n,opts:i}=e,o=zke(t,i.coerceTypes),a=t.length>0&&!(o.length===0&&t.length===1&&(0,kke.schemaHasRulesForType)(e,t[0]));if(a){let u=YD(t,n,i.strictNumbers,Oy.Wrong);r.if(u,()=>{o.length?Hke(e,t,o):JD(e)})}return a}s(Vke,"coerceAndCheckDataType");Xr.coerceAndCheckDataType=Vke;var o7=new Set(["string","number","integer","boolean","null"]);function zke(e,t){return t?e.filter(r=>o7.has(r)||t==="array"&&r==="array"):[]}s(zke,"coerceToTypes");function Hke(e,t,r){let{gen:n,data:i,opts:o}=e,a=n.let("dataType",(0,Te._)`typeof ${i}`),u=n.let("coerced",(0,Te._)`undefined`);o.coerceTypes==="array"&&n.if((0,Te._)`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Te._)`${i}[0]`).assign(a,(0,Te._)`typeof ${i}`).if(YD(t,i,o.strictNumbers),()=>n.assign(u,i))),n.if((0,Te._)`${u} !== undefined`);for(let l of r)(o7.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);n.else(),JD(e),n.endIf(),n.if((0,Te._)`${u} !== undefined`,()=>{n.assign(i,u),Kke(e,u)});function c(l){switch(l){case"string":n.elseIf((0,Te._)`${a} == "number" || ${a} == "boolean"`).assign(u,(0,Te._)`"" + ${i}`).elseIf((0,Te._)`${i} === null`).assign(u,(0,Te._)`""`);return;case"number":n.elseIf((0,Te._)`${a} == "boolean" || ${i} === null
136
136
  || (${a} == "string" && ${i} && ${i} == +${i})`).assign(u,(0,Te._)`+${i}`);return;case"integer":n.elseIf((0,Te._)`${a} === "boolean" || ${i} === null
137
137
  || (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(u,(0,Te._)`+${i}`);return;case"boolean":n.elseIf((0,Te._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(u,!1).elseIf((0,Te._)`${i} === "true" || ${i} === 1`).assign(u,!0);return;case"null":n.elseIf((0,Te._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(u,null);return;case"array":n.elseIf((0,Te._)`${a} === "string" || ${a} === "number"
138
- || ${a} === "boolean" || ${i} === null`).assign(u,(0,Te._)`[${i}]`)}}s(c,"coerceSpecificType")}s(Hke,"coerceData");function Kke({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Te._)`${t} !== undefined`,()=>e.assign((0,Te._)`${t}[${r}]`,n))}s(Kke,"assignParentData");function WD(e,t,r,n=Oy.Correct){let i=n===Oy.Correct?Te.operators.EQ:Te.operators.NEQ,o;switch(e){case"null":return(0,Te._)`${t} ${i} null`;case"array":o=(0,Te._)`Array.isArray(${t})`;break;case"object":o=(0,Te._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a((0,Te._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return(0,Te._)`typeof ${t} ${i} ${e}`}return n===Oy.Correct?o:(0,Te.not)(o);function a(u=Te.nil){return(0,Te.and)((0,Te._)`typeof ${t} == "number"`,u,r?(0,Te._)`isFinite(${t})`:Te.nil)}}s(WD,"checkDataType");Xr.checkDataType=WD;function YD(e,t,r,n){if(e.length===1)return WD(e[0],t,r,n);let i,o=(0,i7.toHash)(e);if(o.array&&o.object){let a=(0,Te._)`typeof ${t} != "object"`;i=o.null?a:(0,Te._)`!${t} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Te.nil;o.number&&delete o.integer;for(let a in o)i=(0,Te.and)(i,WD(a,t,r,n));return i}s(YD,"checkDataTypes");Xr.checkDataTypes=YD;var Wke={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Te._)`{type: ${e}}`:(0,Te._)`{type: ${t}}`};function JD(e){let t=Yke(e);(0,Bke.reportError)(t,Wke)}s(JD,"reportTypeError");Xr.reportTypeError=JD;function Yke(e){let{gen:t,data:r,schema:n}=e,i=(0,i7.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}s(Yke,"getTypeErrorContext")});var u7=h(WP=>{"use strict";Object.defineProperty(WP,"__esModule",{value:!0});WP.assignDefaults=void 0;var Lh=Oe(),Jke=Ve();function Xke(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)a7(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,o)=>a7(e,o,i.default))}s(Xke,"assignDefaults");WP.assignDefaults=Xke;function a7(e,t,r){let{gen:n,compositeRule:i,data:o,opts:a}=e;if(r===void 0)return;let u=(0,Lh._)`${o}${(0,Lh.getProperty)(t)}`;if(i){(0,Jke.checkStrictMode)(e,`default is ignored for: ${u}`);return}let c=(0,Lh._)`${u} === undefined`;a.useDefaults==="empty"&&(c=(0,Lh._)`${c} || ${u} === null || ${u} === ""`),n.if(c,(0,Lh._)`${u} = ${(0,Lh.stringify)(r)}`)}s(a7,"assignDefault")});var ms=h(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.validateUnion=Rt.validateArray=Rt.usePattern=Rt.callValidateCode=Rt.schemaProperties=Rt.allSchemaProperties=Rt.noPropertyInData=Rt.propertyInData=Rt.isOwnProperty=Rt.hasPropFunc=Rt.reportMissingProp=Rt.checkMissingProp=Rt.checkReportMissingProp=void 0;var Bt=Oe(),XD=Ve(),yc=hs(),Zke=Ve();function Qke(e,t){let{gen:r,data:n,it:i}=e;r.if(QD(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Bt._)`${t}`},!0),e.error()})}s(Qke,"checkReportMissingProp");Rt.checkReportMissingProp=Qke;function eBe({gen:e,data:t,it:{opts:r}},n,i){return(0,Bt.or)(...n.map(o=>(0,Bt.and)(QD(e,t,o,r.ownProperties),(0,Bt._)`${i} = ${o}`)))}s(eBe,"checkMissingProp");Rt.checkMissingProp=eBe;function tBe(e,t){e.setParams({missingProperty:t},!0),e.error()}s(tBe,"reportMissingProp");Rt.reportMissingProp=tBe;function c7(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Bt._)`Object.prototype.hasOwnProperty`})}s(c7,"hasPropFunc");Rt.hasPropFunc=c7;function ZD(e,t,r){return(0,Bt._)`${c7(e)}.call(${t}, ${r})`}s(ZD,"isOwnProperty");Rt.isOwnProperty=ZD;function rBe(e,t,r,n){let i=(0,Bt._)`${t}${(0,Bt.getProperty)(r)} !== undefined`;return n?(0,Bt._)`${i} && ${ZD(e,t,r)}`:i}s(rBe,"propertyInData");Rt.propertyInData=rBe;function QD(e,t,r,n){let i=(0,Bt._)`${t}${(0,Bt.getProperty)(r)} === undefined`;return n?(0,Bt.or)(i,(0,Bt.not)(ZD(e,t,r))):i}s(QD,"noPropertyInData");Rt.noPropertyInData=QD;function l7(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}s(l7,"allSchemaProperties");Rt.allSchemaProperties=l7;function nBe(e,t){return l7(t).filter(r=>!(0,XD.alwaysValidSchema)(e,t[r]))}s(nBe,"schemaProperties");Rt.schemaProperties=nBe;function iBe({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},u,c,l){let f=l?(0,Bt._)`${e}, ${t}, ${n}${i}`:t,d=[[yc.default.instancePath,(0,Bt.strConcat)(yc.default.instancePath,o)],[yc.default.parentData,a.parentData],[yc.default.parentDataProperty,a.parentDataProperty],[yc.default.rootData,yc.default.rootData]];a.opts.dynamicRef&&d.push([yc.default.dynamicAnchors,yc.default.dynamicAnchors]);let _=(0,Bt._)`${f}, ${r.object(...d)}`;return c!==Bt.nil?(0,Bt._)`${u}.call(${c}, ${_})`:(0,Bt._)`${u}(${_})`}s(iBe,"callValidateCode");Rt.callValidateCode=iBe;var sBe=(0,Bt._)`new RegExp`;function oBe({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,o=i(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Bt._)`${i.code==="new RegExp"?sBe:(0,Zke.useFunc)(e,i)}(${r}, ${n})`})}s(oBe,"usePattern");Rt.usePattern=oBe;function aBe(e){let{gen:t,data:r,keyword:n,it:i}=e,o=t.name("valid");if(i.allErrors){let u=t.let("valid",!0);return a(()=>t.assign(u,!1)),u}return t.var(o,!0),a(()=>t.break()),o;function a(u){let c=t.const("len",(0,Bt._)`${r}.length`);t.forRange("i",0,c,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:XD.Type.Num},o),t.if((0,Bt.not)(o),u)})}s(a,"validateItems")}s(aBe,"validateArray");Rt.validateArray=aBe;function uBe(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,XD.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let a=t.let("valid",!1),u=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let f=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},u);t.assign(a,(0,Bt._)`${a} || ${u}`),e.mergeValidEvaluated(f,u)||t.if((0,Bt.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}s(uBe,"validateUnion");Rt.validateUnion=uBe});var p7=h(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});ra.validateKeywordUsage=ra.validSchemaType=ra.funcKeywordCode=ra.macroKeywordCode=void 0;var Fn=Oe(),Jf=hs(),cBe=ms(),lBe=vy();function fBe(e,t){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=e,u=t.macro.call(a.self,i,o,a),c=d7(r,n,u);a.opts.validateSchema!==!1&&a.self.validateSchema(u,!0);let l=r.name("valid");e.subschema({schema:u,schemaPath:Fn.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}s(fBe,"macroKeywordCode");ra.macroKeywordCode=fBe;function dBe(e,t){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:u,it:c}=e;hBe(c,t);let l=!u&&t.compile?t.compile.call(c.self,o,a,c):t.validate,f=d7(n,i,l),d=n.let("valid");e.block$data(d,_),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function _(){if(t.errors===!1)y(),t.modifying&&f7(e),b(()=>e.error());else{let E=t.async?m():g();t.modifying&&f7(e),b(()=>pBe(e,E))}}s(_,"validateKeyword");function m(){let E=n.let("ruleErrs",null);return n.try(()=>y((0,Fn._)`await `),S=>n.assign(d,!1).if((0,Fn._)`${S} instanceof ${c.ValidationError}`,()=>n.assign(E,(0,Fn._)`${S}.errors`),()=>n.throw(S))),E}s(m,"validateAsync");function g(){let E=(0,Fn._)`${f}.errors`;return n.assign(E,null),y(Fn.nil),E}s(g,"validateSync");function y(E=t.async?(0,Fn._)`await `:Fn.nil){let S=c.opts.passContext?Jf.default.this:Jf.default.self,O=!("compile"in t&&!u||t.schema===!1);n.assign(d,(0,Fn._)`${E}${(0,cBe.callValidateCode)(e,f,S,O)}`,t.modifying)}s(y,"assignValid");function b(E){var S;n.if((0,Fn.not)((S=t.valid)!==null&&S!==void 0?S:d),E)}s(b,"reportErrs")}s(dBe,"funcKeywordCode");ra.funcKeywordCode=dBe;function f7(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Fn._)`${n.parentData}[${n.parentDataProperty}]`))}s(f7,"modifyData");function pBe(e,t){let{gen:r}=e;r.if((0,Fn._)`Array.isArray(${t})`,()=>{r.assign(Jf.default.vErrors,(0,Fn._)`${Jf.default.vErrors} === null ? ${t} : ${Jf.default.vErrors}.concat(${t})`).assign(Jf.default.errors,(0,Fn._)`${Jf.default.vErrors}.length`),(0,lBe.extendErrors)(e)},()=>e.error())}s(pBe,"addErrs");function hBe({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}s(hBe,"checkAsyncKeyword");function d7(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Fn.stringify)(r)})}s(d7,"useKeyword");function mBe(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}s(mBe,"validSchemaType");ra.validSchemaType=mBe;function _Be({schema:e,opts:t,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let a=i.dependencies;if(a?.some(u=>!Object.prototype.hasOwnProperty.call(e,u)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}s(_Be,"validateKeywordUsage");ra.validateKeywordUsage=_Be});var m7=h(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});Ec.extendSubschemaMode=Ec.extendSubschemaData=Ec.getSubschema=void 0;var na=Oe(),h7=Ve();function gBe(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let u=e.schema[t];return r===void 0?{schema:u,schemaPath:(0,na._)`${e.schemaPath}${(0,na.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:u[r],schemaPath:(0,na._)`${e.schemaPath}${(0,na.getProperty)(t)}${(0,na.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,h7.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}s(gBe,"getSubschema");Ec.getSubschema=gBe;function yBe(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:u}=t;if(r!==void 0){let{errorPath:l,dataPathArr:f,opts:d}=t,_=u.let("data",(0,na._)`${t.data}${(0,na.getProperty)(r)}`,!0);c(_),e.errorPath=(0,na.str)`${l}${(0,h7.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,na._)`${r}`,e.dataPathArr=[...f,e.parentDataProperty]}if(i!==void 0){let l=i instanceof na.Name?i:u.let("data",i,!0);c(l),a!==void 0&&(e.propertyName=a)}o&&(e.dataTypes=o);function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}s(c,"dataContextProps")}s(yBe,"extendSubschemaData");Ec.extendSubschemaData=yBe;function EBe(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}s(EBe,"extendSubschemaMode");Ec.extendSubschemaMode=EBe});var Xf=h((kNt,_7)=>{"use strict";_7.exports=s(function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r},"equal")});var JP=h((GNt,g7)=>{"use strict";var bc=g7.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};YP(t,n,i,e,"",e)};bc.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};bc.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};bc.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};bc.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function YP(e,t,r,n,i,o,a,u,c,l){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,o,a,u,c,l);for(var f in n){var d=n[f];if(Array.isArray(d)){if(f in bc.arrayKeywords)for(var _=0;_<d.length;_++)YP(e,t,r,d[_],i+"/"+f+"/"+_,o,i,f,n,_)}else if(f in bc.propsKeywords){if(d&&typeof d=="object")for(var m in d)YP(e,t,r,d[m],i+"/"+f+"/"+bBe(m),o,i,f,n,m)}else(f in bc.keywords||e.allKeys&&!(f in bc.skipKeywords))&&YP(e,t,r,d,i+"/"+f,o,i,f,n)}r(n,i,o,a,u,c,l)}}s(YP,"_traverse");function bBe(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}s(bBe,"escapeJsonPtr")});var wy=h(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.getSchemaRefs=yi.resolveUrl=yi.normalizeId=yi._getFullPath=yi.getFullPath=yi.inlineRef=void 0;var SBe=Ve(),vBe=Xf(),OBe=JP(),PBe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function wBe(e,t=!0){return typeof e=="boolean"?!0:t===!0?!eL(e):t?y7(e)<=t:!1}s(wBe,"inlineRef");yi.inlineRef=wBe;var IBe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function eL(e){for(let t in e){if(IBe.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(eL)||typeof r=="object"&&eL(r))return!0}return!1}s(eL,"hasRef");function y7(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!PBe.has(r)&&(typeof e[r]=="object"&&(0,SBe.eachItem)(e[r],n=>t+=y7(n)),t===1/0))return 1/0}return t}s(y7,"countKeys");function E7(e,t="",r){r!==!1&&(t=jh(t));let n=e.parse(t);return b7(e,n)}s(E7,"getFullPath");yi.getFullPath=E7;function b7(e,t){return e.serialize(t).split("#")[0]+"#"}s(b7,"_getFullPath");yi._getFullPath=b7;var TBe=/#\/?$/;function jh(e){return e?e.replace(TBe,""):""}s(jh,"normalizeId");yi.normalizeId=jh;function NBe(e,t,r){return r=jh(r),e.resolve(t,r)}s(NBe,"resolveUrl");yi.resolveUrl=NBe;var ABe=/^[a-z_][-a-z0-9._]*$/i;function RBe(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=jh(e[r]||t),o={"":i},a=E7(n,i,!1),u={},c=new Set;return OBe(e,{allKeys:!0},(d,_,m,g)=>{if(g===void 0)return;let y=a+_,b=o[g];typeof d[r]=="string"&&(b=E.call(this,d[r])),S.call(this,d.$anchor),S.call(this,d.$dynamicAnchor),o[_]=b;function E(O){let P=this.opts.uriResolver.resolve;if(O=jh(b?P(b,O):O),c.has(O))throw f(O);c.add(O);let I=this.refs[O];return typeof I=="string"&&(I=this.refs[I]),typeof I=="object"?l(d,I.schema,O):O!==jh(y)&&(O[0]==="#"?(l(d,u[O],O),u[O]=d):this.refs[O]=y),O}s(E,"addRef");function S(O){if(typeof O=="string"){if(!ABe.test(O))throw new Error(`invalid anchor "${O}"`);E.call(this,`#${O}`)}}s(S,"addAnchor")}),u;function l(d,_,m){if(_!==void 0&&!vBe(d,_))throw f(m)}s(l,"checkAmbiguosRef");function f(d){return new Error(`reference "${d}" resolves to more than one schema`)}s(f,"ambiguos")}s(RBe,"getSchemaRefs");yi.getSchemaRefs=RBe});var Mh=h(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});Sc.getData=Sc.KeywordCxt=Sc.validateFunctionCode=void 0;var w7=t7(),S7=Py(),rL=KD(),XP=Py(),CBe=u7(),Ty=p7(),tL=m7(),ae=Oe(),Ee=hs(),$Be=wy(),uu=Ve(),Iy=vy();function DBe(e){if(N7(e)&&(A7(e),T7(e))){MBe(e);return}I7(e,()=>(0,w7.topBoolOrEmptySchema)(e))}s(DBe,"validateFunctionCode");Sc.validateFunctionCode=DBe;function I7({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,(0,ae._)`${Ee.default.data}, ${Ee.default.valCxt}`,n.$async,()=>{e.code((0,ae._)`"use strict"; ${v7(r,i)}`),jBe(e,i),e.code(o)}):e.func(t,(0,ae._)`${Ee.default.data}, ${LBe(i)}`,n.$async,()=>e.code(v7(r,i)).code(o))}s(I7,"validateFunction");function LBe(e){return(0,ae._)`{${Ee.default.instancePath}="", ${Ee.default.parentData}, ${Ee.default.parentDataProperty}, ${Ee.default.rootData}=${Ee.default.data}${e.dynamicRef?(0,ae._)`, ${Ee.default.dynamicAnchors}={}`:ae.nil}}={}`}s(LBe,"destructureValCxt");function jBe(e,t){e.if(Ee.default.valCxt,()=>{e.var(Ee.default.instancePath,(0,ae._)`${Ee.default.valCxt}.${Ee.default.instancePath}`),e.var(Ee.default.parentData,(0,ae._)`${Ee.default.valCxt}.${Ee.default.parentData}`),e.var(Ee.default.parentDataProperty,(0,ae._)`${Ee.default.valCxt}.${Ee.default.parentDataProperty}`),e.var(Ee.default.rootData,(0,ae._)`${Ee.default.valCxt}.${Ee.default.rootData}`),t.dynamicRef&&e.var(Ee.default.dynamicAnchors,(0,ae._)`${Ee.default.valCxt}.${Ee.default.dynamicAnchors}`)},()=>{e.var(Ee.default.instancePath,(0,ae._)`""`),e.var(Ee.default.parentData,(0,ae._)`undefined`),e.var(Ee.default.parentDataProperty,(0,ae._)`undefined`),e.var(Ee.default.rootData,Ee.default.data),t.dynamicRef&&e.var(Ee.default.dynamicAnchors,(0,ae._)`{}`)})}s(jBe,"destructureValCxtES5");function MBe(e){let{schema:t,opts:r,gen:n}=e;I7(e,()=>{r.$comment&&t.$comment&&C7(e),kBe(e),n.let(Ee.default.vErrors,null),n.let(Ee.default.errors,0),r.unevaluated&&UBe(e),R7(e),VBe(e)})}s(MBe,"topSchemaObjCode");function UBe(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,ae._)`${r}.evaluated`),t.if((0,ae._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,ae._)`${e.evaluated}.props`,(0,ae._)`undefined`)),t.if((0,ae._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,ae._)`${e.evaluated}.items`,(0,ae._)`undefined`))}s(UBe,"resetEvaluated");function v7(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,ae._)`/*# sourceURL=${r} */`:ae.nil}s(v7,"funcSourceUrl");function xBe(e,t){if(N7(e)&&(A7(e),T7(e))){qBe(e,t);return}(0,w7.boolOrEmptySchema)(e,t)}s(xBe,"subschemaCode");function T7({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}s(T7,"schemaCxtHasRules");function N7(e){return typeof e.schema!="boolean"}s(N7,"isSchemaObj");function qBe(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&C7(e),BBe(e),GBe(e);let o=n.const("_errs",Ee.default.errors);R7(e,o),n.var(t,(0,ae._)`${o} === ${Ee.default.errors}`)}s(qBe,"subSchemaObjCode");function A7(e){(0,uu.checkUnknownRules)(e),FBe(e)}s(A7,"checkKeywords");function R7(e,t){if(e.opts.jtd)return O7(e,[],!1,t);let r=(0,S7.getSchemaTypes)(e.schema),n=(0,S7.coerceAndCheckDataType)(e,r);O7(e,r,!n,t)}s(R7,"typeAndKeywords");function FBe(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,uu.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}s(FBe,"checkRefsAndKeywords");function kBe(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,uu.checkStrictMode)(e,"default is ignored in the schema root")}s(kBe,"checkNoDefault");function BBe(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,$Be.resolveUrl)(e.opts.uriResolver,e.baseId,t))}s(BBe,"updateContext");function GBe(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}s(GBe,"checkAsyncSchema");function C7({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)e.code((0,ae._)`${Ee.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,ae.str)`${n}/$comment`,u=e.scopeValue("root",{ref:t.root});e.code((0,ae._)`${Ee.default.self}.opts.$comment(${o}, ${a}, ${u}.schema)`)}}s(C7,"commentKeyword");function VBe(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if((0,ae._)`${Ee.default.errors} === 0`,()=>t.return(Ee.default.data),()=>t.throw((0,ae._)`new ${i}(${Ee.default.vErrors})`)):(t.assign((0,ae._)`${n}.errors`,Ee.default.vErrors),o.unevaluated&&zBe(e),t.return((0,ae._)`${Ee.default.errors} === 0`))}s(VBe,"returnResults");function zBe({gen:e,evaluated:t,props:r,items:n}){r instanceof ae.Name&&e.assign((0,ae._)`${t}.props`,r),n instanceof ae.Name&&e.assign((0,ae._)`${t}.items`,n)}s(zBe,"assignEvaluated");function O7(e,t,r,n){let{gen:i,schema:o,data:a,allErrors:u,opts:c,self:l}=e,{RULES:f}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,uu.schemaHasRulesButRef)(o,f))){i.block(()=>D7(e,"$ref",f.all.$ref.definition));return}c.jtd||HBe(e,t),i.block(()=>{for(let _ of f.rules)d(_);d(f.post)});function d(_){(0,rL.shouldUseGroup)(o,_)&&(_.type?(i.if((0,XP.checkDataType)(_.type,a,c.strictNumbers)),P7(e,_),t.length===1&&t[0]===_.type&&r&&(i.else(),(0,XP.reportTypeError)(e)),i.endIf()):P7(e,_),u||i.if((0,ae._)`${Ee.default.errors} === ${n||0}`))}s(d,"groupKeywords")}s(O7,"schemaKeywords");function P7(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,CBe.assignDefaults)(e,t.type),r.block(()=>{for(let o of t.rules)(0,rL.shouldUseRule)(n,o)&&D7(e,o.keyword,o.definition,t.type)})}s(P7,"iterateKeywords");function HBe(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(KBe(e,t),e.opts.allowUnionTypes||WBe(e,t),YBe(e,e.dataTypes))}s(HBe,"checkStrictTypes");function KBe(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{$7(e.dataTypes,r)||nL(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),XBe(e,t)}}s(KBe,"checkContextTypes");function WBe(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&nL(e,"use allowUnionTypes to allow union type keyword")}s(WBe,"checkMultipleTypes");function YBe(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,rL.shouldUseRule)(e.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>JBe(t,a))&&nL(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}s(YBe,"checkKeywordTypes");function JBe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}s(JBe,"hasApplicableType");function $7(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}s($7,"includesType");function XBe(e,t){let r=[];for(let n of e.dataTypes)$7(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}s(XBe,"narrowSchemaTypes");function nL(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,uu.checkStrictMode)(e,t,e.opts.strictTypes)}s(nL,"strictTypesError");var ZP=class{static{s(this,"KeywordCxt")}constructor(t,r,n){if((0,Ty.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,uu.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",L7(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Ty.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Ee.default.errors))}result(t,r,n){this.failResult((0,ae.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,ae.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,ae._)`${r} !== undefined && (${(0,ae.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Iy.reportExtraError:Iy.reportError)(this,this.def.error,r)}$dataError(){(0,Iy.reportError)(this,this.def.$dataError||Iy.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Iy.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=ae.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=ae.nil,r=ae.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,ae.or)((0,ae._)`${i} === undefined`,r)),t!==ae.nil&&n.assign(t,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==ae.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,ae.or)(a(),u());function a(){if(n.length){if(!(r instanceof ae.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,ae._)`${(0,XP.checkDataTypes)(c,r,o.opts.strictNumbers,XP.DataType.Wrong)}`}return ae.nil}function u(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,ae._)`!${c}(${r})`}return ae.nil}}subschema(t,r){let n=(0,tL.getSubschema)(this.it,t);(0,tL.extendSubschemaData)(n,this.it,t),(0,tL.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return xBe(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=uu.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=uu.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,ae.Name)),!0}};Sc.KeywordCxt=ZP;function D7(e,t,r,n){let i=new ZP(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Ty.funcKeywordCode)(i,r):"macro"in r?(0,Ty.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Ty.funcKeywordCode)(i,r)}s(D7,"keywordCode");var ZBe=/^\/(?:[^~]|~0|~1)*$/,QBe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function L7(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(e==="")return Ee.default.rootData;if(e[0]==="/"){if(!ZBe.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=Ee.default.rootData}else{let l=QBe.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);let f=+l[1];if(i=l[2],i==="#"){if(f>=t)throw new Error(c("property/index",f));return n[t-f]}if(f>t)throw new Error(c("data",f));if(o=r[t-f],!i)return o}let a=o,u=i.split("/");for(let l of u)l&&(o=(0,ae._)`${o}${(0,ae.getProperty)((0,uu.unescapeJsonPointer)(l))}`,a=(0,ae._)`${a} && ${o}`);return a;function c(l,f){return`Cannot access ${l} ${f} levels up, current level is ${t}`}}s(L7,"getData");Sc.getData=L7});var Ny=h(sL=>{"use strict";Object.defineProperty(sL,"__esModule",{value:!0});var iL=class extends Error{static{s(this,"ValidationError")}constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};sL.default=iL});var Ay=h(uL=>{"use strict";Object.defineProperty(uL,"__esModule",{value:!0});var oL=wy(),aL=class extends Error{static{s(this,"MissingRefError")}constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,oL.resolveUrl)(t,r,n),this.missingSchema=(0,oL.normalizeId)((0,oL.getFullPath)(t,this.missingRef))}};uL.default=aL});var Ry=h(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.resolveSchema=_s.getCompilingSchema=_s.resolveRef=_s.compileSchema=_s.SchemaEnv=void 0;var oo=Oe(),e3e=Ny(),Zf=hs(),ao=wy(),j7=Ve(),t3e=Mh(),Uh=class{static{s(this,"SchemaEnv")}constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,ao.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};_s.SchemaEnv=Uh;function lL(e){let t=M7.call(this,e);if(t)return t;let r=(0,ao.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new oo.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),u;e.$async&&(u=a.scopeValue("Error",{ref:e3e.default,code:(0,oo._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let l={gen:a,allErrors:this.opts.allErrors,data:Zf.default.data,parentData:Zf.default.parentData,parentDataProperty:Zf.default.parentDataProperty,dataNames:[Zf.default.data],dataPathArr:[oo.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,oo.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:oo.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,oo._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(e),(0,t3e.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);let d=a.toString();f=`${a.scopeRefs(Zf.default.scope)}return ${d}`,this.opts.code.process&&(f=this.opts.code.process(f,e));let m=new Function(`${Zf.default.self}`,`${Zf.default.scope}`,f)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:g,items:y}=l;m.evaluated={props:g instanceof oo.Name?void 0:g,items:y instanceof oo.Name?void 0:y,dynamicProps:g instanceof oo.Name,dynamicItems:y instanceof oo.Name},m.source&&(m.source.evaluated=(0,oo.stringify)(m.evaluated))}return e.validate=m,e}catch(d){throw delete e.validate,delete e.validateName,f&&this.logger.error("Error compiling schema, function code:",f),d}finally{this._compilations.delete(e)}}s(lL,"compileSchema");_s.compileSchema=lL;function r3e(e,t,r){var n;r=(0,ao.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let o=s3e.call(this,e,r);if(o===void 0){let a=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:u}=this.opts;a&&(o=new Uh({schema:a,schemaId:u,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=n3e.call(this,o)}s(r3e,"resolveRef");_s.resolveRef=r3e;function n3e(e){return(0,ao.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:lL.call(this,e)}s(n3e,"inlineOrCompile");function M7(e){for(let t of this._compilations)if(i3e(t,e))return t}s(M7,"getCompilingSchema");_s.getCompilingSchema=M7;function i3e(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}s(i3e,"sameSchemaEnv");function s3e(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||QP.call(this,e,t)}s(s3e,"resolve");function QP(e,t){let r=this.opts.uriResolver.parse(t),n=(0,ao._getFullPath)(this.opts.uriResolver,r),i=(0,ao.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return cL.call(this,r,e);let o=(0,ao.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let u=QP.call(this,e,a);return typeof u?.schema!="object"?void 0:cL.call(this,r,u)}if(typeof a?.schema=="object"){if(a.validate||lL.call(this,a),o===(0,ao.normalizeId)(t)){let{schema:u}=a,{schemaId:c}=this.opts,l=u[c];return l&&(i=(0,ao.resolveUrl)(this.opts.uriResolver,i,l)),new Uh({schema:u,schemaId:c,root:e,baseId:i})}return cL.call(this,r,a)}}s(QP,"resolveSchema");_s.resolveSchema=QP;var o3e=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function cL(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let u of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,j7.unescapeFragment)(u)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!o3e.has(u)&&l&&(t=(0,ao.resolveUrl)(this.opts.uriResolver,t,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,j7.schemaHasRulesButRef)(r,this.RULES)){let u=(0,ao.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=QP.call(this,n,u)}let{schemaId:a}=this.opts;if(o=o||new Uh({schema:r,schemaId:a,root:n,baseId:t}),o.schema!==o.root.schema)return o}s(cL,"getJsonPointer")});var U7=h((tAt,a3e)=>{a3e.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var tw=h((ew,x7)=>{(function(e,t){typeof ew=="object"&&typeof x7<"u"?t(ew):typeof define=="function"&&define.amd?define(["exports"],t):t(e.URI=e.URI||{})})(ew,function(e){"use strict";function t(){for(var T=arguments.length,w=Array(T),R=0;R<T;R++)w[R]=arguments[R];if(w.length>1){w[0]=w[0].slice(0,-1);for(var C=w.length-1,$=1;$<C;++$)w[$]=w[$].slice(1,-1);return w[C]=w[C].slice(1),w.join("")}else return w[0]}s(t,"merge");function r(T){return"(?:"+T+")"}s(r,"subexp");function n(T){return T===void 0?"undefined":T===null?"null":Object.prototype.toString.call(T).split(" ").pop().split("]").shift().toLowerCase()}s(n,"typeOf");function i(T){return T.toUpperCase()}s(i,"toUpperCase");function o(T){return T!=null?T instanceof Array?T:typeof T.length!="number"||T.split||T.setInterval||T.call?[T]:Array.prototype.slice.call(T):[]}s(o,"toArray");function a(T,w){var R=T;if(w)for(var C in w)R[C]=w[C];return R}s(a,"assign");function u(T){var w="[A-Za-z]",R="[\\x0D]",C="[0-9]",$="[\\x22]",ee=t(C,"[A-Fa-f]"),Ie="[\\x0A]",ut="[\\x20]",vt=r(r("%[EFef]"+ee+"%"+ee+ee+"%"+ee+ee)+"|"+r("%[89A-Fa-f]"+ee+"%"+ee+ee)+"|"+r("%"+ee+ee)),br="[\\:\\/\\?\\#\\[\\]\\@]",et="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Zt=t(br,et),Sr=T?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Kt=T?"[\\uE000-\\uF8FF]":"[]",gt=t(w,C,"[\\-\\.\\_\\~]",Sr),Qt=r(w+t(w,C,"[\\+\\-\\.]")+"*"),Nt=r(r(vt+"|"+t(gt,et,"[\\:]"))+"*"),fl=r(r("25[0-5]")+"|"+r("2[0-4]"+C)+"|"+r("1"+C+C)+"|"+r("[1-9]"+C)+"|"+C),Ui=r(r("25[0-5]")+"|"+r("2[0-4]"+C)+"|"+r("1"+C+C)+"|"+r("0?[1-9]"+C)+"|0?0?"+C),es=r(Ui+"\\."+Ui+"\\."+Ui+"\\."+Ui),Lt=r(ee+"{1,4}"),xi=r(r(Lt+"\\:"+Lt)+"|"+es),ts=r(r(Lt+"\\:")+"{6}"+xi),Ro=r("\\:\\:"+r(Lt+"\\:")+"{5}"+xi),dl=r(r(Lt)+"?\\:\\:"+r(Lt+"\\:")+"{4}"+xi),qa=r(r(r(Lt+"\\:")+"{0,1}"+Lt)+"?\\:\\:"+r(Lt+"\\:")+"{3}"+xi),rg=r(r(r(Lt+"\\:")+"{0,2}"+Lt)+"?\\:\\:"+r(Lt+"\\:")+"{2}"+xi),hb=r(r(r(Lt+"\\:")+"{0,3}"+Lt)+"?\\:\\:"+Lt+"\\:"+xi),mb=r(r(r(Lt+"\\:")+"{0,4}"+Lt)+"?\\:\\:"+xi),dp=r(r(r(Lt+"\\:")+"{0,5}"+Lt)+"?\\:\\:"+Lt),pp=r(r(r(Lt+"\\:")+"{0,6}"+Lt)+"?\\:\\:"),Fa=r([ts,Ro,dl,qa,rg,hb,mb,dp,pp].join("|")),hp=r(r(gt+"|"+vt)+"+"),IA=r(Fa+"\\%25"+hp),pl=r(Fa+r("\\%25|\\%(?!"+ee+"{2})")+hp),Jpe=r("[vV]"+ee+"+\\."+t(gt,et,"[\\:]")+"+"),Xpe=r("\\["+r(pl+"|"+Fa+"|"+Jpe)+"\\]"),YB=r(r(vt+"|"+t(gt,et))+"*"),ng=r(Xpe+"|"+es+"(?!"+YB+")|"+YB),ig=r(C+"*"),JB=r(r(Nt+"@")+"?"+ng+r("\\:"+ig)+"?"),sg=r(vt+"|"+t(gt,et,"[\\:\\@]")),Zpe=r(sg+"*"),XB=r(sg+"+"),Qpe=r(r(vt+"|"+t(gt,et,"[\\@]"))+"+"),ka=r(r("\\/"+Zpe)+"*"),mp=r("\\/"+r(XB+ka)+"?"),TA=r(Qpe+ka),_b=r(XB+ka),_p="(?!"+sg+")",M0t=r(ka+"|"+mp+"|"+TA+"|"+_b+"|"+_p),gp=r(r(sg+"|"+t("[\\/\\?]",Kt))+"*"),og=r(r(sg+"|[\\/\\?]")+"*"),ZB=r(r("\\/\\/"+JB+ka)+"|"+mp+"|"+_b+"|"+_p),ehe=r(Qt+"\\:"+ZB+r("\\?"+gp)+"?"+r("\\#"+og)+"?"),the=r(r("\\/\\/"+JB+ka)+"|"+mp+"|"+TA+"|"+_p),rhe=r(the+r("\\?"+gp)+"?"+r("\\#"+og)+"?"),U0t=r(ehe+"|"+rhe),x0t=r(Qt+"\\:"+ZB+r("\\?"+gp)+"?"),q0t="^("+Qt+")\\:"+r(r("\\/\\/("+r("("+Nt+")@")+"?("+ng+")"+r("\\:("+ig+")")+"?)")+"?("+ka+"|"+mp+"|"+_b+"|"+_p+")")+r("\\?("+gp+")")+"?"+r("\\#("+og+")")+"?$",F0t="^(){0}"+r(r("\\/\\/("+r("("+Nt+")@")+"?("+ng+")"+r("\\:("+ig+")")+"?)")+"?("+ka+"|"+mp+"|"+TA+"|"+_p+")")+r("\\?("+gp+")")+"?"+r("\\#("+og+")")+"?$",k0t="^("+Qt+")\\:"+r(r("\\/\\/("+r("("+Nt+")@")+"?("+ng+")"+r("\\:("+ig+")")+"?)")+"?("+ka+"|"+mp+"|"+_b+"|"+_p+")")+r("\\?("+gp+")")+"?$",B0t="^"+r("\\#("+og+")")+"?$",G0t="^"+r("("+Nt+")@")+"?("+ng+")"+r("\\:("+ig+")")+"?$";return{NOT_SCHEME:new RegExp(t("[^]",w,C,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",gt,et),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",gt,et),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",gt,et),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",gt,et),"g"),NOT_QUERY:new RegExp(t("[^\\%]",gt,et,"[\\:\\@\\/\\?]",Kt),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",gt,et,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",gt,et),"g"),UNRESERVED:new RegExp(gt,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",gt,Zt),"g"),PCT_ENCODED:new RegExp(vt,"g"),IPV4ADDRESS:new RegExp("^("+es+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Fa+")"+r(r("\\%25|\\%(?!"+ee+"{2})")+"("+hp+")")+"?\\]?$")}}s(u,"buildExps");var c=u(!1),l=u(!0),f=function(){function T(w,R){var C=[],$=!0,ee=!1,Ie=void 0;try{for(var ut=w[Symbol.iterator](),vt;!($=(vt=ut.next()).done)&&(C.push(vt.value),!(R&&C.length===R));$=!0);}catch(br){ee=!0,Ie=br}finally{try{!$&&ut.return&&ut.return()}finally{if(ee)throw Ie}}return C}return s(T,"sliceIterator"),function(w,R){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return T(w,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=s(function(T){if(Array.isArray(T)){for(var w=0,R=Array(T.length);w<T.length;w++)R[w]=T[w];return R}else return Array.from(T)},"toConsumableArray"),_=2147483647,m=36,g=1,y=26,b=38,E=700,S=72,O=128,P="-",I=/^xn--/,j=/[^\0-\x7E]/,x=/[\x2E\u3002\uFF0E\uFF61]/g,H={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},K=m-g,Q=Math.floor,de=String.fromCharCode;function re(T){throw new RangeError(H[T])}s(re,"error$1");function he(T,w){for(var R=[],C=T.length;C--;)R[C]=w(T[C]);return R}s(he,"map");function $e(T,w){var R=T.split("@"),C="";R.length>1&&(C=R[0]+"@",T=R[1]),T=T.replace(x,".");var $=T.split("."),ee=he($,w).join(".");return C+ee}s($e,"mapDomain");function bt(T){for(var w=[],R=0,C=T.length;R<C;){var $=T.charCodeAt(R++);if($>=55296&&$<=56319&&R<C){var ee=T.charCodeAt(R++);(ee&64512)==56320?w.push((($&1023)<<10)+(ee&1023)+65536):(w.push($),R--)}else w.push($)}return w}s(bt,"ucs2decode");var _t=s(function(w){return String.fromCodePoint.apply(String,d(w))},"ucs2encode"),zr=s(function(w){return w-48<10?w-22:w-65<26?w-65:w-97<26?w-97:m},"basicToDigit"),Rn=s(function(w,R){return w+22+75*(w<26)-((R!=0)<<5)},"digitToBasic"),Qi=s(function(w,R,C){var $=0;for(w=C?Q(w/E):w>>1,w+=Q(w/R);w>K*y>>1;$+=m)w=Q(w/K);return Q($+(K+1)*w/(w+b))},"adapt"),ja=s(function(w){var R=[],C=w.length,$=0,ee=O,Ie=S,ut=w.lastIndexOf(P);ut<0&&(ut=0);for(var vt=0;vt<ut;++vt)w.charCodeAt(vt)>=128&&re("not-basic"),R.push(w.charCodeAt(vt));for(var br=ut>0?ut+1:0;br<C;){for(var et=$,Zt=1,Sr=m;;Sr+=m){br>=C&&re("invalid-input");var Kt=zr(w.charCodeAt(br++));(Kt>=m||Kt>Q((_-$)/Zt))&&re("overflow"),$+=Kt*Zt;var gt=Sr<=Ie?g:Sr>=Ie+y?y:Sr-Ie;if(Kt<gt)break;var Qt=m-gt;Zt>Q(_/Qt)&&re("overflow"),Zt*=Qt}var Nt=R.length+1;Ie=Qi($-et,Nt,et==0),Q($/Nt)>_-ee&&re("overflow"),ee+=Q($/Nt),$%=Nt,R.splice($++,0,ee)}return String.fromCodePoint.apply(String,R)},"decode"),Cn=s(function(w){var R=[];w=bt(w);var C=w.length,$=O,ee=0,Ie=S,ut=!0,vt=!1,br=void 0;try{for(var et=w[Symbol.iterator](),Zt;!(ut=(Zt=et.next()).done);ut=!0){var Sr=Zt.value;Sr<128&&R.push(de(Sr))}}catch(pl){vt=!0,br=pl}finally{try{!ut&&et.return&&et.return()}finally{if(vt)throw br}}var Kt=R.length,gt=Kt;for(Kt&&R.push(P);gt<C;){var Qt=_,Nt=!0,fl=!1,Ui=void 0;try{for(var es=w[Symbol.iterator](),Lt;!(Nt=(Lt=es.next()).done);Nt=!0){var xi=Lt.value;xi>=$&&xi<Qt&&(Qt=xi)}}catch(pl){fl=!0,Ui=pl}finally{try{!Nt&&es.return&&es.return()}finally{if(fl)throw Ui}}var ts=gt+1;Qt-$>Q((_-ee)/ts)&&re("overflow"),ee+=(Qt-$)*ts,$=Qt;var Ro=!0,dl=!1,qa=void 0;try{for(var rg=w[Symbol.iterator](),hb;!(Ro=(hb=rg.next()).done);Ro=!0){var mb=hb.value;if(mb<$&&++ee>_&&re("overflow"),mb==$){for(var dp=ee,pp=m;;pp+=m){var Fa=pp<=Ie?g:pp>=Ie+y?y:pp-Ie;if(dp<Fa)break;var hp=dp-Fa,IA=m-Fa;R.push(de(Rn(Fa+hp%IA,0))),dp=Q(hp/IA)}R.push(de(Rn(dp,0))),Ie=Qi(ee,ts,gt==Kt),ee=0,++gt}}}catch(pl){dl=!0,qa=pl}finally{try{!Ro&&rg.return&&rg.return()}finally{if(dl)throw qa}}++ee,++$}return R.join("")},"encode"),ji=s(function(w){return $e(w,function(R){return I.test(R)?ja(R.slice(4).toLowerCase()):R})},"toUnicode"),Mi=s(function(w){return $e(w,function(R){return j.test(R)?"xn--"+Cn(R):R})},"toASCII"),Ma={version:"2.1.0",ucs2:{decode:bt,encode:_t},decode:ja,encode:Cn,toASCII:Mi,toUnicode:ji},Hr={};function $n(T){var w=T.charCodeAt(0),R=void 0;return w<16?R="%0"+w.toString(16).toUpperCase():w<128?R="%"+w.toString(16).toUpperCase():w<2048?R="%"+(w>>6|192).toString(16).toUpperCase()+"%"+(w&63|128).toString(16).toUpperCase():R="%"+(w>>12|224).toString(16).toUpperCase()+"%"+(w>>6&63|128).toString(16).toUpperCase()+"%"+(w&63|128).toString(16).toUpperCase(),R}s($n,"pctEncChar");function cp(T){for(var w="",R=0,C=T.length;R<C;){var $=parseInt(T.substr(R+1,2),16);if($<128)w+=String.fromCharCode($),R+=3;else if($>=194&&$<224){if(C-R>=6){var ee=parseInt(T.substr(R+4,2),16);w+=String.fromCharCode(($&31)<<6|ee&63)}else w+=T.substr(R,6);R+=6}else if($>=224){if(C-R>=9){var Ie=parseInt(T.substr(R+4,2),16),ut=parseInt(T.substr(R+7,2),16);w+=String.fromCharCode(($&15)<<12|(Ie&63)<<6|ut&63)}else w+=T.substr(R,9);R+=9}else w+=T.substr(R,3),R+=3}return w}s(cp,"pctDecChars");function vA(T,w){function R(C){var $=cp(C);return $.match(w.UNRESERVED)?$:C}return s(R,"decodeUnreserved"),T.scheme&&(T.scheme=String(T.scheme).replace(w.PCT_ENCODED,R).toLowerCase().replace(w.NOT_SCHEME,"")),T.userinfo!==void 0&&(T.userinfo=String(T.userinfo).replace(w.PCT_ENCODED,R).replace(w.NOT_USERINFO,$n).replace(w.PCT_ENCODED,i)),T.host!==void 0&&(T.host=String(T.host).replace(w.PCT_ENCODED,R).toLowerCase().replace(w.NOT_HOST,$n).replace(w.PCT_ENCODED,i)),T.path!==void 0&&(T.path=String(T.path).replace(w.PCT_ENCODED,R).replace(T.scheme?w.NOT_PATH:w.NOT_PATH_NOSCHEME,$n).replace(w.PCT_ENCODED,i)),T.query!==void 0&&(T.query=String(T.query).replace(w.PCT_ENCODED,R).replace(w.NOT_QUERY,$n).replace(w.PCT_ENCODED,i)),T.fragment!==void 0&&(T.fragment=String(T.fragment).replace(w.PCT_ENCODED,R).replace(w.NOT_FRAGMENT,$n).replace(w.PCT_ENCODED,i)),T}s(vA,"_normalizeComponentEncoding");function OA(T){return T.replace(/^0*(.*)/,"$1")||"0"}s(OA,"_stripLeadingZeros");function PA(T,w){var R=T.match(w.IPV4ADDRESS)||[],C=f(R,2),$=C[1];return $?$.split(".").map(OA).join("."):T}s(PA,"_normalizeIPv4");function MB(T,w){var R=T.match(w.IPV6ADDRESS)||[],C=f(R,3),$=C[1],ee=C[2];if($){for(var Ie=$.toLowerCase().split("::").reverse(),ut=f(Ie,2),vt=ut[0],br=ut[1],et=br?br.split(":").map(OA):[],Zt=vt.split(":").map(OA),Sr=w.IPV4ADDRESS.test(Zt[Zt.length-1]),Kt=Sr?7:8,gt=Zt.length-Kt,Qt=Array(Kt),Nt=0;Nt<Kt;++Nt)Qt[Nt]=et[Nt]||Zt[gt+Nt]||"";Sr&&(Qt[Kt-1]=PA(Qt[Kt-1],w));var fl=Qt.reduce(function(ts,Ro,dl){if(!Ro||Ro==="0"){var qa=ts[ts.length-1];qa&&qa.index+qa.length===dl?qa.length++:ts.push({index:dl,length:1})}return ts},[]),Ui=fl.sort(function(ts,Ro){return Ro.length-ts.length})[0],es=void 0;if(Ui&&Ui.length>1){var Lt=Qt.slice(0,Ui.index),xi=Qt.slice(Ui.index+Ui.length);es=Lt.join(":")+"::"+xi.join(":")}else es=Qt.join(":");return ee&&(es+="%"+ee),es}else return T}s(MB,"_normalizeIPv6");var Rpe=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Cpe="".match(/(){0}/)[1]===void 0;function Ua(T){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R={},C=w.iri!==!1?l:c;w.reference==="suffix"&&(T=(w.scheme?w.scheme+":":"")+"//"+T);var $=T.match(Rpe);if($){Cpe?(R.scheme=$[1],R.userinfo=$[3],R.host=$[4],R.port=parseInt($[5],10),R.path=$[6]||"",R.query=$[7],R.fragment=$[8],isNaN(R.port)&&(R.port=$[5])):(R.scheme=$[1]||void 0,R.userinfo=T.indexOf("@")!==-1?$[3]:void 0,R.host=T.indexOf("//")!==-1?$[4]:void 0,R.port=parseInt($[5],10),R.path=$[6]||"",R.query=T.indexOf("?")!==-1?$[7]:void 0,R.fragment=T.indexOf("#")!==-1?$[8]:void 0,isNaN(R.port)&&(R.port=T.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?$[4]:void 0)),R.host&&(R.host=MB(PA(R.host,C),C)),R.scheme===void 0&&R.userinfo===void 0&&R.host===void 0&&R.port===void 0&&!R.path&&R.query===void 0?R.reference="same-document":R.scheme===void 0?R.reference="relative":R.fragment===void 0?R.reference="absolute":R.reference="uri",w.reference&&w.reference!=="suffix"&&w.reference!==R.reference&&(R.error=R.error||"URI is not a "+w.reference+" reference.");var ee=Hr[(w.scheme||R.scheme||"").toLowerCase()];if(!w.unicodeSupport&&(!ee||!ee.unicodeSupport)){if(R.host&&(w.domainHost||ee&&ee.domainHost))try{R.host=Ma.toASCII(R.host.replace(C.PCT_ENCODED,cp).toLowerCase())}catch(Ie){R.error=R.error||"Host's domain name can not be converted to ASCII via punycode: "+Ie}vA(R,c)}else vA(R,C);ee&&ee.parse&&ee.parse(R,w)}else R.error=R.error||"URI can not be parsed.";return R}s(Ua,"parse");function $pe(T,w){var R=w.iri!==!1?l:c,C=[];return T.userinfo!==void 0&&(C.push(T.userinfo),C.push("@")),T.host!==void 0&&C.push(MB(PA(String(T.host),R),R).replace(R.IPV6ADDRESS,function($,ee,Ie){return"["+ee+(Ie?"%25"+Ie:"")+"]"})),(typeof T.port=="number"||typeof T.port=="string")&&(C.push(":"),C.push(String(T.port))),C.length?C.join(""):void 0}s($pe,"_recomposeAuthority");var UB=/^\.\.?\//,xB=/^\/\.(\/|$)/,qB=/^\/\.\.(\/|$)/,Dpe=/^\/?(?:.|\n)*?(?=\/|$)/;function lp(T){for(var w=[];T.length;)if(T.match(UB))T=T.replace(UB,"");else if(T.match(xB))T=T.replace(xB,"/");else if(T.match(qB))T=T.replace(qB,"/"),w.pop();else if(T==="."||T==="..")T="";else{var R=T.match(Dpe);if(R){var C=R[0];T=T.slice(C.length),w.push(C)}else throw new Error("Unexpected dot segment condition")}return w.join("")}s(lp,"removeDotSegments");function No(T){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=w.iri?l:c,C=[],$=Hr[(w.scheme||T.scheme||"").toLowerCase()];if($&&$.serialize&&$.serialize(T,w),T.host&&!R.IPV6ADDRESS.test(T.host)){if(w.domainHost||$&&$.domainHost)try{T.host=w.iri?Ma.toUnicode(T.host):Ma.toASCII(T.host.replace(R.PCT_ENCODED,cp).toLowerCase())}catch(ut){T.error=T.error||"Host's domain name can not be converted to "+(w.iri?"Unicode":"ASCII")+" via punycode: "+ut}}vA(T,R),w.reference!=="suffix"&&T.scheme&&(C.push(T.scheme),C.push(":"));var ee=$pe(T,w);if(ee!==void 0&&(w.reference!=="suffix"&&C.push("//"),C.push(ee),T.path&&T.path.charAt(0)!=="/"&&C.push("/")),T.path!==void 0){var Ie=T.path;!w.absolutePath&&(!$||!$.absolutePath)&&(Ie=lp(Ie)),ee===void 0&&(Ie=Ie.replace(/^\/\//,"/%2F")),C.push(Ie)}return T.query!==void 0&&(C.push("?"),C.push(T.query)),T.fragment!==void 0&&(C.push("#"),C.push(T.fragment)),C.join("")}s(No,"serialize");function FB(T,w){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},C=arguments[3],$={};return C||(T=Ua(No(T,R),R),w=Ua(No(w,R),R)),R=R||{},!R.tolerant&&w.scheme?($.scheme=w.scheme,$.userinfo=w.userinfo,$.host=w.host,$.port=w.port,$.path=lp(w.path||""),$.query=w.query):(w.userinfo!==void 0||w.host!==void 0||w.port!==void 0?($.userinfo=w.userinfo,$.host=w.host,$.port=w.port,$.path=lp(w.path||""),$.query=w.query):(w.path?(w.path.charAt(0)==="/"?$.path=lp(w.path):((T.userinfo!==void 0||T.host!==void 0||T.port!==void 0)&&!T.path?$.path="/"+w.path:T.path?$.path=T.path.slice(0,T.path.lastIndexOf("/")+1)+w.path:$.path=w.path,$.path=lp($.path)),$.query=w.query):($.path=T.path,w.query!==void 0?$.query=w.query:$.query=T.query),$.userinfo=T.userinfo,$.host=T.host,$.port=T.port),$.scheme=T.scheme),$.fragment=w.fragment,$}s(FB,"resolveComponents");function Lpe(T,w,R){var C=a({scheme:"null"},R);return No(FB(Ua(T,C),Ua(w,C),C,!0),C)}s(Lpe,"resolve");function jpe(T,w){return typeof T=="string"?T=No(Ua(T,w),w):n(T)==="object"&&(T=Ua(No(T,w),w)),T}s(jpe,"normalize");function Mpe(T,w,R){return typeof T=="string"?T=No(Ua(T,R),R):n(T)==="object"&&(T=No(T,R)),typeof w=="string"?w=No(Ua(w,R),R):n(w)==="object"&&(w=No(w,R)),T===w}s(Mpe,"equal");function Upe(T,w){return T&&T.toString().replace(!w||!w.iri?c.ESCAPE:l.ESCAPE,$n)}s(Upe,"escapeComponent");function xa(T,w){return T&&T.toString().replace(!w||!w.iri?c.PCT_ENCODED:l.PCT_ENCODED,cp)}s(xa,"unescapeComponent");var eg={scheme:"http",domainHost:!0,parse:s(function(w,R){return w.host||(w.error=w.error||"HTTP URIs must have a host."),w},"parse"),serialize:s(function(w,R){var C=String(w.scheme).toLowerCase()==="https";return(w.port===(C?443:80)||w.port==="")&&(w.port=void 0),w.path||(w.path="/"),w},"serialize")},kB={scheme:"https",domainHost:eg.domainHost,parse:eg.parse,serialize:eg.serialize};function BB(T){return typeof T.secure=="boolean"?T.secure:String(T.scheme).toLowerCase()==="wss"}s(BB,"isSecure");var tg={scheme:"ws",domainHost:!0,parse:s(function(w,R){var C=w;return C.secure=BB(C),C.resourceName=(C.path||"/")+(C.query?"?"+C.query:""),C.path=void 0,C.query=void 0,C},"parse"),serialize:s(function(w,R){if((w.port===(BB(w)?443:80)||w.port==="")&&(w.port=void 0),typeof w.secure=="boolean"&&(w.scheme=w.secure?"wss":"ws",w.secure=void 0),w.resourceName){var C=w.resourceName.split("?"),$=f(C,2),ee=$[0],Ie=$[1];w.path=ee&&ee!=="/"?ee:void 0,w.query=Ie,w.resourceName=void 0}return w.fragment=void 0,w},"serialize")},GB={scheme:"wss",domainHost:tg.domainHost,parse:tg.parse,serialize:tg.serialize},xpe={},qpe=!0,VB="[A-Za-z0-9\\-\\.\\_\\~"+(qpe?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",Ao="[0-9A-Fa-f]",Fpe=r(r("%[EFef]"+Ao+"%"+Ao+Ao+"%"+Ao+Ao)+"|"+r("%[89A-Fa-f]"+Ao+"%"+Ao+Ao)+"|"+r("%"+Ao+Ao)),kpe="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Bpe="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Gpe=t(Bpe,'[\\"\\\\]'),Vpe="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",zpe=new RegExp(VB,"g"),fp=new RegExp(Fpe,"g"),Hpe=new RegExp(t("[^]",kpe,"[\\.]",'[\\"]',Gpe),"g"),zB=new RegExp(t("[^]",VB,Vpe),"g"),Kpe=zB;function wA(T){var w=cp(T);return w.match(zpe)?w:T}s(wA,"decodeUnreserved");var HB={scheme:"mailto",parse:s(function(w,R){var C=w,$=C.to=C.path?C.path.split(","):[];if(C.path=void 0,C.query){for(var ee=!1,Ie={},ut=C.query.split("&"),vt=0,br=ut.length;vt<br;++vt){var et=ut[vt].split("=");switch(et[0]){case"to":for(var Zt=et[1].split(","),Sr=0,Kt=Zt.length;Sr<Kt;++Sr)$.push(Zt[Sr]);break;case"subject":C.subject=xa(et[1],R);break;case"body":C.body=xa(et[1],R);break;default:ee=!0,Ie[xa(et[0],R)]=xa(et[1],R);break}}ee&&(C.headers=Ie)}C.query=void 0;for(var gt=0,Qt=$.length;gt<Qt;++gt){var Nt=$[gt].split("@");if(Nt[0]=xa(Nt[0]),R.unicodeSupport)Nt[1]=xa(Nt[1],R).toLowerCase();else try{Nt[1]=Ma.toASCII(xa(Nt[1],R).toLowerCase())}catch(fl){C.error=C.error||"Email address's domain name can not be converted to ASCII via punycode: "+fl}$[gt]=Nt.join("@")}return C},"parse$$1"),serialize:s(function(w,R){var C=w,$=o(w.to);if($){for(var ee=0,Ie=$.length;ee<Ie;++ee){var ut=String($[ee]),vt=ut.lastIndexOf("@"),br=ut.slice(0,vt).replace(fp,wA).replace(fp,i).replace(Hpe,$n),et=ut.slice(vt+1);try{et=R.iri?Ma.toUnicode(et):Ma.toASCII(xa(et,R).toLowerCase())}catch(gt){C.error=C.error||"Email address's domain name can not be converted to "+(R.iri?"Unicode":"ASCII")+" via punycode: "+gt}$[ee]=br+"@"+et}C.path=$.join(",")}var Zt=w.headers=w.headers||{};w.subject&&(Zt.subject=w.subject),w.body&&(Zt.body=w.body);var Sr=[];for(var Kt in Zt)Zt[Kt]!==xpe[Kt]&&Sr.push(Kt.replace(fp,wA).replace(fp,i).replace(zB,$n)+"="+Zt[Kt].replace(fp,wA).replace(fp,i).replace(Kpe,$n));return Sr.length&&(C.query=Sr.join("&")),C},"serialize$$1")},Wpe=/^([^\:]+)\:(.*)/,KB={scheme:"urn",parse:s(function(w,R){var C=w.path&&w.path.match(Wpe),$=w;if(C){var ee=R.scheme||$.scheme||"urn",Ie=C[1].toLowerCase(),ut=C[2],vt=ee+":"+(R.nid||Ie),br=Hr[vt];$.nid=Ie,$.nss=ut,$.path=void 0,br&&($=br.parse($,R))}else $.error=$.error||"URN can not be parsed.";return $},"parse$$1"),serialize:s(function(w,R){var C=R.scheme||w.scheme||"urn",$=w.nid,ee=C+":"+(R.nid||$),Ie=Hr[ee];Ie&&(w=Ie.serialize(w,R));var ut=w,vt=w.nss;return ut.path=($||R.nid)+":"+vt,ut},"serialize$$1")},Ype=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,WB={scheme:"urn:uuid",parse:s(function(w,R){var C=w;return C.uuid=C.nss,C.nss=void 0,!R.tolerant&&(!C.uuid||!C.uuid.match(Ype))&&(C.error=C.error||"UUID is not valid."),C},"parse"),serialize:s(function(w,R){var C=w;return C.nss=(w.uuid||"").toLowerCase(),C},"serialize")};Hr[eg.scheme]=eg,Hr[kB.scheme]=kB,Hr[tg.scheme]=tg,Hr[GB.scheme]=GB,Hr[HB.scheme]=HB,Hr[KB.scheme]=KB,Hr[WB.scheme]=WB,e.SCHEMES=Hr,e.pctEncChar=$n,e.pctDecChars=cp,e.parse=Ua,e.removeDotSegments=lp,e.serialize=No,e.resolveComponents=FB,e.resolve=Lpe,e.normalize=jpe,e.equal=Mpe,e.escapeComponent=Upe,e.unescapeComponent=xa,Object.defineProperty(e,"__esModule",{value:!0})})});var F7=h(fL=>{"use strict";Object.defineProperty(fL,"__esModule",{value:!0});var q7=tw();q7.code='require("ajv/dist/runtime/uri").default';fL.default=q7});var hL=h(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.CodeGen=Zr.Name=Zr.nil=Zr.stringify=Zr.str=Zr._=Zr.KeywordCxt=void 0;var u3e=Mh();Object.defineProperty(Zr,"KeywordCxt",{enumerable:!0,get:function(){return u3e.KeywordCxt}});var xh=Oe();Object.defineProperty(Zr,"_",{enumerable:!0,get:function(){return xh._}});Object.defineProperty(Zr,"str",{enumerable:!0,get:function(){return xh.str}});Object.defineProperty(Zr,"stringify",{enumerable:!0,get:function(){return xh.stringify}});Object.defineProperty(Zr,"nil",{enumerable:!0,get:function(){return xh.nil}});Object.defineProperty(Zr,"Name",{enumerable:!0,get:function(){return xh.Name}});Object.defineProperty(Zr,"CodeGen",{enumerable:!0,get:function(){return xh.CodeGen}});var c3e=Ny(),z7=Ay(),l3e=HD(),Cy=Ry(),f3e=Oe(),$y=wy(),rw=Py(),pL=Ve(),k7=U7(),d3e=F7(),H7=s((e,t)=>new RegExp(e,t),"defaultRegExp");H7.code="new RegExp";var p3e=["removeAdditional","useDefaults","coerceTypes"],h3e=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m3e={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_3e={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},B7=200;function g3e(e){var t,r,n,i,o,a,u,c,l,f,d,_,m,g,y,b,E,S,O,P,I,j,x,H,K;let Q=e.strict,de=(t=e.code)===null||t===void 0?void 0:t.optimize,re=de===!0||de===void 0?1:de||0,he=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:H7,$e=(i=e.uriResolver)!==null&&i!==void 0?i:d3e.default;return{strictSchema:(a=(o=e.strictSchema)!==null&&o!==void 0?o:Q)!==null&&a!==void 0?a:!0,strictNumbers:(c=(u=e.strictNumbers)!==null&&u!==void 0?u:Q)!==null&&c!==void 0?c:!0,strictTypes:(f=(l=e.strictTypes)!==null&&l!==void 0?l:Q)!==null&&f!==void 0?f:"log",strictTuples:(_=(d=e.strictTuples)!==null&&d!==void 0?d:Q)!==null&&_!==void 0?_:"log",strictRequired:(g=(m=e.strictRequired)!==null&&m!==void 0?m:Q)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:re,regExp:he}:{optimize:re,regExp:he},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:B7,loopEnum:(b=e.loopEnum)!==null&&b!==void 0?b:B7,meta:(E=e.meta)!==null&&E!==void 0?E:!0,messages:(S=e.messages)!==null&&S!==void 0?S:!0,inlineRefs:(O=e.inlineRefs)!==null&&O!==void 0?O:!0,schemaId:(P=e.schemaId)!==null&&P!==void 0?P:"$id",addUsedSchema:(I=e.addUsedSchema)!==null&&I!==void 0?I:!0,validateSchema:(j=e.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(x=e.validateFormats)!==null&&x!==void 0?x:!0,unicodeRegExp:(H=e.unicodeRegExp)!==null&&H!==void 0?H:!0,int32range:(K=e.int32range)!==null&&K!==void 0?K:!0,uriResolver:$e}}s(g3e,"requiredOptions");var Dy=class{static{s(this,"Ajv")}constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...g3e(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new f3e.ValueScope({scope:{},prefixes:h3e,es5:r,lines:n}),this.logger=O3e(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,l3e.getRules)(),G7.call(this,m3e,t,"NOT SUPPORTED"),G7.call(this,_3e,t,"DEPRECATED","warn"),this._metaOpts=S3e.call(this),t.formats&&E3e.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&b3e.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),y3e.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=k7;n==="id"&&(i={...k7},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,t,r);async function i(f,d){await o.call(this,f.$schema);let _=this._addSchema(f,d);return _.validate||a.call(this,_)}async function o(f){f&&!this.getSchema(f)&&await i.call(this,{$ref:f},!0)}async function a(f){try{return this._compileSchemaEnv(f)}catch(d){if(!(d instanceof z7.default))throw d;return u.call(this,d),await c.call(this,d.missingSchema),a.call(this,f)}}function u({missingSchema:f,missingRef:d}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${d} cannot be resolved`)}async function c(f){let d=await l.call(this,f);this.refs[f]||await o.call(this,d.$schema),this.refs[f]||this.addSchema(d,f,r)}async function l(f){let d=this._loading[f];if(d)return d;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,n,i);return this}let o;if(typeof t=="object"){let{schemaId:a}=this.opts;if(o=t[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,$y.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,t);if(!i&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(t){let r;for(;typeof(r=V7.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Cy.SchemaEnv({schema:{},schemaId:n});if(r=Cy.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=V7.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,$y.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(w3e.call(this,n,r),!r)return(0,pL.eachItem)(n,o=>dL.call(this,o)),this;T3e.call(this,r);let i={...r,type:(0,rw.getJSONTypes)(r.type),schemaType:(0,rw.getJSONTypes)(r.schemaType)};return(0,pL.eachItem)(n,i.type.length===0?o=>dL.call(this,o,i):o=>i.type.forEach(a=>dL.call(this,o,i,a))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let o=i.split("/").slice(1),a=t;for(let u of o)a=a[u];for(let u in n){let c=n[u];if(typeof c!="object")continue;let{$data:l}=c.definition,f=a[u];l&&f&&(a[u]=K7(f))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:u}=this.opts;if(typeof t=="object")a=t[u];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,$y.normalizeId)(a||n);let l=$y.getSchemaRefs.call(this,t,n);return c=new Cy.SchemaEnv({schema:t,schemaId:u,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Cy.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Cy.compileSchema.call(this,t)}finally{this.opts=r}}};Zr.default=Dy;Dy.ValidationError=c3e.default;Dy.MissingRefError=z7.default;function G7(e,t,r,n="error"){for(let i in e){let o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}s(G7,"checkOptions");function V7(e){return e=(0,$y.normalizeId)(e),this.schemas[e]||this.refs[e]}s(V7,"getSchEnv");function y3e(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}s(y3e,"addInitialSchemas");function E3e(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}s(E3e,"addInitialFormats");function b3e(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}s(b3e,"addInitialKeywords");function S3e(){let e={...this.opts};for(let t of p3e)delete e[t];return e}s(S3e,"getMetaSchemaOptions");var v3e={log(){},warn(){},error(){}};function O3e(e){if(e===!1)return v3e;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}s(O3e,"getLogger");var P3e=/^[a-z_$][a-z0-9_$:-]*$/i;function w3e(e,t){let{RULES:r}=this;if((0,pL.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!P3e.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}s(w3e,"checkKeyword");function dL(e,t,r){var n;let i=t?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[e]=!0,!t)return;let u={keyword:e,definition:{...t,type:(0,rw.getJSONTypes)(t.type),schemaType:(0,rw.getJSONTypes)(t.schemaType)}};t.before?I3e.call(this,a,u,t.before):a.rules.push(u),o.all[e]=u,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}s(dL,"addRule");function I3e(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}s(I3e,"addBeforeRule");function T3e(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=K7(t)),e.validateSchema=this.compile(t,!0))}s(T3e,"keywordMetaschema");var N3e={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function K7(e){return{anyOf:[e,N3e]}}s(K7,"schemaOrData")});var W7=h(mL=>{"use strict";Object.defineProperty(mL,"__esModule",{value:!0});var A3e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};mL.default=A3e});var sw=h(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});Qf.callRef=Qf.getValidate=void 0;var R3e=Ay(),Y7=ms(),Ei=Oe(),qh=hs(),J7=Ry(),nw=Ve(),C3e={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:o,validateName:a,opts:u,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return d();let f=J7.resolveRef.call(c,l,i,r);if(f===void 0)throw new R3e.default(n.opts.uriResolver,i,r);if(f instanceof J7.SchemaEnv)return _(f);return m(f);function d(){if(o===l)return iw(e,a,o,o.$async);let g=t.scopeValue("root",{ref:l});return iw(e,(0,Ei._)`${g}.validate`,l,l.$async)}function _(g){let y=X7(e,g);iw(e,y,g,g.$async)}function m(g){let y=t.scopeValue("schema",u.code.source===!0?{ref:g,code:(0,Ei.stringify)(g)}:{ref:g}),b=t.name("valid"),E=e.subschema({schema:g,dataTypes:[],schemaPath:Ei.nil,topSchemaRef:y,errSchemaPath:r},b);e.mergeEvaluated(E),e.ok(b)}}};function X7(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Ei._)`${r.scopeValue("wrapper",{ref:t})}.validate`}s(X7,"getValidate");Qf.getValidate=X7;function iw(e,t,r,n){let{gen:i,it:o}=e,{allErrors:a,schemaEnv:u,opts:c}=o,l=c.passContext?qh.default.this:Ei.nil;n?f():d();function f(){if(!u.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,Ei._)`await ${(0,Y7.callValidateCode)(e,t,l)}`),m(t),a||i.assign(g,!0)},y=>{i.if((0,Ei._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),_(y),a||i.assign(g,!1)}),e.ok(g)}s(f,"callAsyncRef");function d(){e.result((0,Y7.callValidateCode)(e,t,l),()=>m(t),()=>_(t))}s(d,"callSyncRef");function _(g){let y=(0,Ei._)`${g}.errors`;i.assign(qh.default.vErrors,(0,Ei._)`${qh.default.vErrors} === null ? ${y} : ${qh.default.vErrors}.concat(${y})`),i.assign(qh.default.errors,(0,Ei._)`${qh.default.vErrors}.length`)}s(_,"addErrorsFrom");function m(g){var y;if(!o.opts.unevaluated)return;let b=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(b&&!b.dynamicProps)b.props!==void 0&&(o.props=nw.mergeEvaluated.props(i,b.props,o.props));else{let E=i.var("props",(0,Ei._)`${g}.evaluated.props`);o.props=nw.mergeEvaluated.props(i,E,o.props,Ei.Name)}if(o.items!==!0)if(b&&!b.dynamicItems)b.items!==void 0&&(o.items=nw.mergeEvaluated.items(i,b.items,o.items));else{let E=i.var("items",(0,Ei._)`${g}.evaluated.items`);o.items=nw.mergeEvaluated.items(i,E,o.items,Ei.Name)}}s(m,"addEvaluatedFrom")}s(iw,"callRef");Qf.callRef=iw;Qf.default=C3e});var gL=h(_L=>{"use strict";Object.defineProperty(_L,"__esModule",{value:!0});var $3e=W7(),D3e=sw(),L3e=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",$3e.default,D3e.default];_L.default=L3e});var Z7=h(yL=>{"use strict";Object.defineProperty(yL,"__esModule",{value:!0});var ow=Oe(),vc=ow.operators,aw={maximum:{okStr:"<=",ok:vc.LTE,fail:vc.GT},minimum:{okStr:">=",ok:vc.GTE,fail:vc.LT},exclusiveMaximum:{okStr:"<",ok:vc.LT,fail:vc.GTE},exclusiveMinimum:{okStr:">",ok:vc.GT,fail:vc.LTE}},j3e={message:({keyword:e,schemaCode:t})=>(0,ow.str)`must be ${aw[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,ow._)`{comparison: ${aw[e].okStr}, limit: ${t}}`},M3e={keyword:Object.keys(aw),type:"number",schemaType:"number",$data:!0,error:j3e,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,ow._)`${r} ${aw[t].fail} ${n} || isNaN(${r})`)}};yL.default=M3e});var Q7=h(EL=>{"use strict";Object.defineProperty(EL,"__esModule",{value:!0});var Ly=Oe(),U3e={message:({schemaCode:e})=>(0,Ly.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Ly._)`{multipleOf: ${e}}`},x3e={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:U3e,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,o=i.opts.multipleOfPrecision,a=t.let("res"),u=o?(0,Ly._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,Ly._)`${a} !== parseInt(${a})`;e.fail$data((0,Ly._)`(${n} === 0 || (${a} = ${r}/${n}, ${u}))`)}};EL.default=x3e});var tW=h(bL=>{"use strict";Object.defineProperty(bL,"__esModule",{value:!0});function eW(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}s(eW,"ucs2length");bL.default=eW;eW.code='require("ajv/dist/runtime/ucs2length").default'});var rW=h(SL=>{"use strict";Object.defineProperty(SL,"__esModule",{value:!0});var ed=Oe(),q3e=Ve(),F3e=tW(),k3e={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,ed.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,ed._)`{limit: ${e}}`},B3e={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:k3e,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,o=t==="maxLength"?ed.operators.GT:ed.operators.LT,a=i.opts.unicode===!1?(0,ed._)`${r}.length`:(0,ed._)`${(0,q3e.useFunc)(e.gen,F3e.default)}(${r})`;e.fail$data((0,ed._)`${a} ${o} ${n}`)}};SL.default=B3e});var nW=h(vL=>{"use strict";Object.defineProperty(vL,"__esModule",{value:!0});var G3e=ms(),uw=Oe(),V3e={message:({schemaCode:e})=>(0,uw.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,uw._)`{pattern: ${e}}`},z3e={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:V3e,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:o}=e,a=o.opts.unicodeRegExp?"u":"",u=r?(0,uw._)`(new RegExp(${i}, ${a}))`:(0,G3e.usePattern)(e,n);e.fail$data((0,uw._)`!${u}.test(${t})`)}};vL.default=z3e});var iW=h(OL=>{"use strict";Object.defineProperty(OL,"__esModule",{value:!0});var jy=Oe(),H3e={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,jy.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,jy._)`{limit: ${e}}`},K3e={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:H3e,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?jy.operators.GT:jy.operators.LT;e.fail$data((0,jy._)`Object.keys(${r}).length ${i} ${n}`)}};OL.default=K3e});var sW=h(PL=>{"use strict";Object.defineProperty(PL,"__esModule",{value:!0});var My=ms(),Uy=Oe(),W3e=Ve(),Y3e={message:({params:{missingProperty:e}})=>(0,Uy.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Uy._)`{missingProperty: ${e}}`},J3e={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Y3e,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:o,it:a}=e,{opts:u}=a;if(!o&&r.length===0)return;let c=r.length>=u.loopRequired;if(a.allErrors?l():f(),u.strictRequired){let m=e.parentSchema.properties,{definedProperties:g}=e.it;for(let y of r)if(m?.[y]===void 0&&!g.has(y)){let b=a.schemaEnv.baseId+a.errSchemaPath,E=`required property "${y}" is not defined at "${b}" (strictRequired)`;(0,W3e.checkStrictMode)(a,E,a.opts.strictRequired)}}function l(){if(c||o)e.block$data(Uy.nil,d);else for(let m of r)(0,My.checkReportMissingProp)(e,m)}s(l,"allErrorsMode");function f(){let m=t.let("missing");if(c||o){let g=t.let("valid",!0);e.block$data(g,()=>_(m,g)),e.ok(g)}else t.if((0,My.checkMissingProp)(e,r,m)),(0,My.reportMissingProp)(e,m),t.else()}s(f,"exitOnErrorMode");function d(){t.forOf("prop",n,m=>{e.setParams({missingProperty:m}),t.if((0,My.noPropertyInData)(t,i,m,u.ownProperties),()=>e.error())})}s(d,"loopAllRequired");function _(m,g){e.setParams({missingProperty:m}),t.forOf(m,n,()=>{t.assign(g,(0,My.propertyInData)(t,i,m,u.ownProperties)),t.if((0,Uy.not)(g),()=>{e.error(),t.break()})},Uy.nil)}s(_,"loopUntilMissing")}};PL.default=J3e});var oW=h(wL=>{"use strict";Object.defineProperty(wL,"__esModule",{value:!0});var xy=Oe(),X3e={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,xy.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,xy._)`{limit: ${e}}`},Z3e={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:X3e,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?xy.operators.GT:xy.operators.LT;e.fail$data((0,xy._)`${r}.length ${i} ${n}`)}};wL.default=Z3e});var cw=h(IL=>{"use strict";Object.defineProperty(IL,"__esModule",{value:!0});var aW=Xf();aW.code='require("ajv/dist/runtime/equal").default';IL.default=aW});var uW=h(NL=>{"use strict";Object.defineProperty(NL,"__esModule",{value:!0});var TL=Py(),Qr=Oe(),Q3e=Ve(),e4e=cw(),t4e={message:({params:{i:e,j:t}})=>(0,Qr.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Qr._)`{i: ${e}, j: ${t}}`},r4e={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:t4e,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:u}=e;if(!n&&!i)return;let c=t.let("valid"),l=o.items?(0,TL.getSchemaTypes)(o.items):[];e.block$data(c,f,(0,Qr._)`${a} === false`),e.ok(c);function f(){let g=t.let("i",(0,Qr._)`${r}.length`),y=t.let("j");e.setParams({i:g,j:y}),t.assign(c,!0),t.if((0,Qr._)`${g} > 1`,()=>(d()?_:m)(g,y))}s(f,"validateUniqueItems");function d(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}s(d,"canOptimize");function _(g,y){let b=t.name("item"),E=(0,TL.checkDataTypes)(l,b,u.opts.strictNumbers,TL.DataType.Wrong),S=t.const("indices",(0,Qr._)`{}`);t.for((0,Qr._)`;${g}--;`,()=>{t.let(b,(0,Qr._)`${r}[${g}]`),t.if(E,(0,Qr._)`continue`),l.length>1&&t.if((0,Qr._)`typeof ${b} == "string"`,(0,Qr._)`${b} += "_"`),t.if((0,Qr._)`typeof ${S}[${b}] == "number"`,()=>{t.assign(y,(0,Qr._)`${S}[${b}]`),e.error(),t.assign(c,!1).break()}).code((0,Qr._)`${S}[${b}] = ${g}`)})}s(_,"loopN");function m(g,y){let b=(0,Q3e.useFunc)(t,e4e.default),E=t.name("outer");t.label(E).for((0,Qr._)`;${g}--;`,()=>t.for((0,Qr._)`${y} = ${g}; ${y}--;`,()=>t.if((0,Qr._)`${b}(${r}[${g}], ${r}[${y}])`,()=>{e.error(),t.assign(c,!1).break(E)})))}s(m,"loopN2")}};NL.default=r4e});var cW=h(RL=>{"use strict";Object.defineProperty(RL,"__esModule",{value:!0});var AL=Oe(),n4e=Ve(),i4e=cw(),s4e={message:"must be equal to constant",params:({schemaCode:e})=>(0,AL._)`{allowedValue: ${e}}`},o4e={keyword:"const",$data:!0,error:s4e,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:o}=e;n||o&&typeof o=="object"?e.fail$data((0,AL._)`!${(0,n4e.useFunc)(t,i4e.default)}(${r}, ${i})`):e.fail((0,AL._)`${o} !== ${r}`)}};RL.default=o4e});var lW=h(CL=>{"use strict";Object.defineProperty(CL,"__esModule",{value:!0});var qy=Oe(),a4e=Ve(),u4e=cw(),c4e={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,qy._)`{allowedValues: ${e}}`},l4e={keyword:"enum",schemaType:"array",$data:!0,error:c4e,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:a}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let u=i.length>=a.opts.loopEnum,c,l=s(()=>c??(c=(0,a4e.useFunc)(t,u4e.default)),"getEql"),f;if(u||n)f=t.let("valid"),e.block$data(f,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=t.const("vSchema",o);f=(0,qy.or)(...i.map((g,y)=>_(m,y)))}e.pass(f);function d(){t.assign(f,!1),t.forOf("v",o,m=>t.if((0,qy._)`${l()}(${r}, ${m})`,()=>t.assign(f,!0).break()))}s(d,"loopEnum");function _(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,qy._)`${l()}(${r}, ${m}[${g}])`:(0,qy._)`${r} === ${y}`}s(_,"equalCode")}};CL.default=l4e});var DL=h($L=>{"use strict";Object.defineProperty($L,"__esModule",{value:!0});var f4e=Z7(),d4e=Q7(),p4e=rW(),h4e=nW(),m4e=iW(),_4e=sW(),g4e=oW(),y4e=uW(),E4e=cW(),b4e=lW(),S4e=[f4e.default,d4e.default,p4e.default,h4e.default,m4e.default,_4e.default,g4e.default,y4e.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},E4e.default,b4e.default];$L.default=S4e});var jL=h(Fy=>{"use strict";Object.defineProperty(Fy,"__esModule",{value:!0});Fy.validateAdditionalItems=void 0;var td=Oe(),LL=Ve(),v4e={message:({params:{len:e}})=>(0,td.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,td._)`{limit: ${e}}`},O4e={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:v4e,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,LL.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}fW(e,n)}};function fW(e,t){let{gen:r,schema:n,data:i,keyword:o,it:a}=e;a.items=!0;let u=r.const("len",(0,td._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,td._)`${u} <= ${t.length}`);else if(typeof n=="object"&&!(0,LL.alwaysValidSchema)(a,n)){let l=r.var("valid",(0,td._)`${u} <= ${t.length}`);r.if((0,td.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,u,f=>{e.subschema({keyword:o,dataProp:f,dataPropType:LL.Type.Num},l),a.allErrors||r.if((0,td.not)(l),()=>r.break())})}s(c,"validateItems")}s(fW,"validateAdditionalItems");Fy.validateAdditionalItems=fW;Fy.default=O4e});var ML=h(ky=>{"use strict";Object.defineProperty(ky,"__esModule",{value:!0});ky.validateTuple=void 0;var dW=Oe(),lw=Ve(),P4e=ms(),w4e={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return pW(e,"additionalItems",t);r.items=!0,!(0,lw.alwaysValidSchema)(r,t)&&e.ok((0,P4e.validateArray)(e))}};function pW(e,t,r=e.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:u}=e;f(i),u.opts.unevaluated&&r.length&&u.items!==!0&&(u.items=lw.mergeEvaluated.items(n,r.length,u.items));let c=n.name("valid"),l=n.const("len",(0,dW._)`${o}.length`);r.forEach((d,_)=>{(0,lw.alwaysValidSchema)(u,d)||(n.if((0,dW._)`${l} > ${_}`,()=>e.subschema({keyword:a,schemaProp:_,dataProp:_},c)),e.ok(c))});function f(d){let{opts:_,errSchemaPath:m}=u,g=r.length,y=g===d.minItems&&(g===d.maxItems||d[t]===!1);if(_.strictTuples&&!y){let b=`"${a}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,lw.checkStrictMode)(u,b,_.strictTuples)}}s(f,"checkStrictTuple")}s(pW,"validateTuple");ky.validateTuple=pW;ky.default=w4e});var hW=h(UL=>{"use strict";Object.defineProperty(UL,"__esModule",{value:!0});var I4e=ML(),T4e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,I4e.validateTuple)(e,"items")};UL.default=T4e});var _W=h(xL=>{"use strict";Object.defineProperty(xL,"__esModule",{value:!0});var mW=Oe(),N4e=Ve(),A4e=ms(),R4e=jL(),C4e={message:({params:{len:e}})=>(0,mW.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,mW._)`{limit: ${e}}`},$4e={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:C4e,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,N4e.alwaysValidSchema)(n,t)&&(i?(0,R4e.validateAdditionalItems)(e,i):e.ok((0,A4e.validateArray)(e)))}};xL.default=$4e});var gW=h(qL=>{"use strict";Object.defineProperty(qL,"__esModule",{value:!0});var gs=Oe(),fw=Ve(),D4e={message:({params:{min:e,max:t}})=>t===void 0?(0,gs.str)`must contain at least ${e} valid item(s)`:(0,gs.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,gs._)`{minContains: ${e}}`:(0,gs._)`{minContains: ${e}, maxContains: ${t}}`},L4e={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:D4e,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e,a,u,{minContains:c,maxContains:l}=n;o.opts.next?(a=c===void 0?1:c,u=l):a=1;let f=t.const("len",(0,gs._)`${i}.length`);if(e.setParams({min:a,max:u}),u===void 0&&a===0){(0,fw.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&a>u){(0,fw.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,fw.alwaysValidSchema)(o,r)){let y=(0,gs._)`${f} >= ${a}`;u!==void 0&&(y=(0,gs._)`${y} && ${f} <= ${u}`),e.pass(y);return}o.items=!0;let d=t.name("valid");u===void 0&&a===1?m(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),u!==void 0&&t.if((0,gs._)`${i}.length > 0`,_)):(t.let(d,!1),_()),e.result(d,()=>e.reset());function _(){let y=t.name("_valid"),b=t.let("count",0);m(y,()=>t.if(y,()=>g(b)))}s(_,"validateItemsWithCount");function m(y,b){t.forRange("i",0,f,E=>{e.subschema({keyword:"contains",dataProp:E,dataPropType:fw.Type.Num,compositeRule:!0},y),b()})}s(m,"validateItems");function g(y){t.code((0,gs._)`${y}++`),u===void 0?t.if((0,gs._)`${y} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,gs._)`${y} > ${u}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,gs._)`${y} >= ${a}`,()=>t.assign(d,!0)))}s(g,"checkLimits")}};qL.default=L4e});var dw=h(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.validateSchemaDeps=ia.validatePropertyDeps=ia.error=void 0;var FL=Oe(),j4e=Ve(),By=ms();ia.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,FL.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,FL._)`{property: ${e},
138
+ || ${a} === "boolean" || ${i} === null`).assign(u,(0,Te._)`[${i}]`)}}s(c,"coerceSpecificType")}s(Hke,"coerceData");function Kke({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Te._)`${t} !== undefined`,()=>e.assign((0,Te._)`${t}[${r}]`,n))}s(Kke,"assignParentData");function WD(e,t,r,n=Oy.Correct){let i=n===Oy.Correct?Te.operators.EQ:Te.operators.NEQ,o;switch(e){case"null":return(0,Te._)`${t} ${i} null`;case"array":o=(0,Te._)`Array.isArray(${t})`;break;case"object":o=(0,Te._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a((0,Te._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return(0,Te._)`typeof ${t} ${i} ${e}`}return n===Oy.Correct?o:(0,Te.not)(o);function a(u=Te.nil){return(0,Te.and)((0,Te._)`typeof ${t} == "number"`,u,r?(0,Te._)`isFinite(${t})`:Te.nil)}}s(WD,"checkDataType");Xr.checkDataType=WD;function YD(e,t,r,n){if(e.length===1)return WD(e[0],t,r,n);let i,o=(0,i7.toHash)(e);if(o.array&&o.object){let a=(0,Te._)`typeof ${t} != "object"`;i=o.null?a:(0,Te._)`!${t} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Te.nil;o.number&&delete o.integer;for(let a in o)i=(0,Te.and)(i,WD(a,t,r,n));return i}s(YD,"checkDataTypes");Xr.checkDataTypes=YD;var Wke={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Te._)`{type: ${e}}`:(0,Te._)`{type: ${t}}`};function JD(e){let t=Yke(e);(0,Bke.reportError)(t,Wke)}s(JD,"reportTypeError");Xr.reportTypeError=JD;function Yke(e){let{gen:t,data:r,schema:n}=e,i=(0,i7.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}s(Yke,"getTypeErrorContext")});var u7=h(WP=>{"use strict";Object.defineProperty(WP,"__esModule",{value:!0});WP.assignDefaults=void 0;var Lh=Oe(),Jke=Ve();function Xke(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)a7(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,o)=>a7(e,o,i.default))}s(Xke,"assignDefaults");WP.assignDefaults=Xke;function a7(e,t,r){let{gen:n,compositeRule:i,data:o,opts:a}=e;if(r===void 0)return;let u=(0,Lh._)`${o}${(0,Lh.getProperty)(t)}`;if(i){(0,Jke.checkStrictMode)(e,`default is ignored for: ${u}`);return}let c=(0,Lh._)`${u} === undefined`;a.useDefaults==="empty"&&(c=(0,Lh._)`${c} || ${u} === null || ${u} === ""`),n.if(c,(0,Lh._)`${u} = ${(0,Lh.stringify)(r)}`)}s(a7,"assignDefault")});var ms=h(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.validateUnion=Rt.validateArray=Rt.usePattern=Rt.callValidateCode=Rt.schemaProperties=Rt.allSchemaProperties=Rt.noPropertyInData=Rt.propertyInData=Rt.isOwnProperty=Rt.hasPropFunc=Rt.reportMissingProp=Rt.checkMissingProp=Rt.checkReportMissingProp=void 0;var Bt=Oe(),XD=Ve(),yc=hs(),Zke=Ve();function Qke(e,t){let{gen:r,data:n,it:i}=e;r.if(QD(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Bt._)`${t}`},!0),e.error()})}s(Qke,"checkReportMissingProp");Rt.checkReportMissingProp=Qke;function eBe({gen:e,data:t,it:{opts:r}},n,i){return(0,Bt.or)(...n.map(o=>(0,Bt.and)(QD(e,t,o,r.ownProperties),(0,Bt._)`${i} = ${o}`)))}s(eBe,"checkMissingProp");Rt.checkMissingProp=eBe;function tBe(e,t){e.setParams({missingProperty:t},!0),e.error()}s(tBe,"reportMissingProp");Rt.reportMissingProp=tBe;function c7(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Bt._)`Object.prototype.hasOwnProperty`})}s(c7,"hasPropFunc");Rt.hasPropFunc=c7;function ZD(e,t,r){return(0,Bt._)`${c7(e)}.call(${t}, ${r})`}s(ZD,"isOwnProperty");Rt.isOwnProperty=ZD;function rBe(e,t,r,n){let i=(0,Bt._)`${t}${(0,Bt.getProperty)(r)} !== undefined`;return n?(0,Bt._)`${i} && ${ZD(e,t,r)}`:i}s(rBe,"propertyInData");Rt.propertyInData=rBe;function QD(e,t,r,n){let i=(0,Bt._)`${t}${(0,Bt.getProperty)(r)} === undefined`;return n?(0,Bt.or)(i,(0,Bt.not)(ZD(e,t,r))):i}s(QD,"noPropertyInData");Rt.noPropertyInData=QD;function l7(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}s(l7,"allSchemaProperties");Rt.allSchemaProperties=l7;function nBe(e,t){return l7(t).filter(r=>!(0,XD.alwaysValidSchema)(e,t[r]))}s(nBe,"schemaProperties");Rt.schemaProperties=nBe;function iBe({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},u,c,l){let f=l?(0,Bt._)`${e}, ${t}, ${n}${i}`:t,d=[[yc.default.instancePath,(0,Bt.strConcat)(yc.default.instancePath,o)],[yc.default.parentData,a.parentData],[yc.default.parentDataProperty,a.parentDataProperty],[yc.default.rootData,yc.default.rootData]];a.opts.dynamicRef&&d.push([yc.default.dynamicAnchors,yc.default.dynamicAnchors]);let _=(0,Bt._)`${f}, ${r.object(...d)}`;return c!==Bt.nil?(0,Bt._)`${u}.call(${c}, ${_})`:(0,Bt._)`${u}(${_})`}s(iBe,"callValidateCode");Rt.callValidateCode=iBe;var sBe=(0,Bt._)`new RegExp`;function oBe({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,o=i(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Bt._)`${i.code==="new RegExp"?sBe:(0,Zke.useFunc)(e,i)}(${r}, ${n})`})}s(oBe,"usePattern");Rt.usePattern=oBe;function aBe(e){let{gen:t,data:r,keyword:n,it:i}=e,o=t.name("valid");if(i.allErrors){let u=t.let("valid",!0);return a(()=>t.assign(u,!1)),u}return t.var(o,!0),a(()=>t.break()),o;function a(u){let c=t.const("len",(0,Bt._)`${r}.length`);t.forRange("i",0,c,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:XD.Type.Num},o),t.if((0,Bt.not)(o),u)})}s(a,"validateItems")}s(aBe,"validateArray");Rt.validateArray=aBe;function uBe(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,XD.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let a=t.let("valid",!1),u=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let f=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},u);t.assign(a,(0,Bt._)`${a} || ${u}`),e.mergeValidEvaluated(f,u)||t.if((0,Bt.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}s(uBe,"validateUnion");Rt.validateUnion=uBe});var p7=h(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});ra.validateKeywordUsage=ra.validSchemaType=ra.funcKeywordCode=ra.macroKeywordCode=void 0;var Fn=Oe(),Jf=hs(),cBe=ms(),lBe=vy();function fBe(e,t){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=e,u=t.macro.call(a.self,i,o,a),c=d7(r,n,u);a.opts.validateSchema!==!1&&a.self.validateSchema(u,!0);let l=r.name("valid");e.subschema({schema:u,schemaPath:Fn.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}s(fBe,"macroKeywordCode");ra.macroKeywordCode=fBe;function dBe(e,t){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:u,it:c}=e;hBe(c,t);let l=!u&&t.compile?t.compile.call(c.self,o,a,c):t.validate,f=d7(n,i,l),d=n.let("valid");e.block$data(d,_),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function _(){if(t.errors===!1)y(),t.modifying&&f7(e),b(()=>e.error());else{let E=t.async?m():g();t.modifying&&f7(e),b(()=>pBe(e,E))}}s(_,"validateKeyword");function m(){let E=n.let("ruleErrs",null);return n.try(()=>y((0,Fn._)`await `),v=>n.assign(d,!1).if((0,Fn._)`${v} instanceof ${c.ValidationError}`,()=>n.assign(E,(0,Fn._)`${v}.errors`),()=>n.throw(v))),E}s(m,"validateAsync");function g(){let E=(0,Fn._)`${f}.errors`;return n.assign(E,null),y(Fn.nil),E}s(g,"validateSync");function y(E=t.async?(0,Fn._)`await `:Fn.nil){let v=c.opts.passContext?Jf.default.this:Jf.default.self,O=!("compile"in t&&!u||t.schema===!1);n.assign(d,(0,Fn._)`${E}${(0,cBe.callValidateCode)(e,f,v,O)}`,t.modifying)}s(y,"assignValid");function b(E){var v;n.if((0,Fn.not)((v=t.valid)!==null&&v!==void 0?v:d),E)}s(b,"reportErrs")}s(dBe,"funcKeywordCode");ra.funcKeywordCode=dBe;function f7(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Fn._)`${n.parentData}[${n.parentDataProperty}]`))}s(f7,"modifyData");function pBe(e,t){let{gen:r}=e;r.if((0,Fn._)`Array.isArray(${t})`,()=>{r.assign(Jf.default.vErrors,(0,Fn._)`${Jf.default.vErrors} === null ? ${t} : ${Jf.default.vErrors}.concat(${t})`).assign(Jf.default.errors,(0,Fn._)`${Jf.default.vErrors}.length`),(0,lBe.extendErrors)(e)},()=>e.error())}s(pBe,"addErrs");function hBe({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}s(hBe,"checkAsyncKeyword");function d7(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Fn.stringify)(r)})}s(d7,"useKeyword");function mBe(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}s(mBe,"validSchemaType");ra.validSchemaType=mBe;function _Be({schema:e,opts:t,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let a=i.dependencies;if(a?.some(u=>!Object.prototype.hasOwnProperty.call(e,u)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}s(_Be,"validateKeywordUsage");ra.validateKeywordUsage=_Be});var m7=h(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});Ec.extendSubschemaMode=Ec.extendSubschemaData=Ec.getSubschema=void 0;var na=Oe(),h7=Ve();function gBe(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let u=e.schema[t];return r===void 0?{schema:u,schemaPath:(0,na._)`${e.schemaPath}${(0,na.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:u[r],schemaPath:(0,na._)`${e.schemaPath}${(0,na.getProperty)(t)}${(0,na.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,h7.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}s(gBe,"getSubschema");Ec.getSubschema=gBe;function yBe(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:u}=t;if(r!==void 0){let{errorPath:l,dataPathArr:f,opts:d}=t,_=u.let("data",(0,na._)`${t.data}${(0,na.getProperty)(r)}`,!0);c(_),e.errorPath=(0,na.str)`${l}${(0,h7.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,na._)`${r}`,e.dataPathArr=[...f,e.parentDataProperty]}if(i!==void 0){let l=i instanceof na.Name?i:u.let("data",i,!0);c(l),a!==void 0&&(e.propertyName=a)}o&&(e.dataTypes=o);function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}s(c,"dataContextProps")}s(yBe,"extendSubschemaData");Ec.extendSubschemaData=yBe;function EBe(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}s(EBe,"extendSubschemaMode");Ec.extendSubschemaMode=EBe});var Xf=h((kNt,_7)=>{"use strict";_7.exports=s(function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r},"equal")});var JP=h((GNt,g7)=>{"use strict";var bc=g7.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};YP(t,n,i,e,"",e)};bc.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};bc.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};bc.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};bc.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function YP(e,t,r,n,i,o,a,u,c,l){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,i,o,a,u,c,l);for(var f in n){var d=n[f];if(Array.isArray(d)){if(f in bc.arrayKeywords)for(var _=0;_<d.length;_++)YP(e,t,r,d[_],i+"/"+f+"/"+_,o,i,f,n,_)}else if(f in bc.propsKeywords){if(d&&typeof d=="object")for(var m in d)YP(e,t,r,d[m],i+"/"+f+"/"+bBe(m),o,i,f,n,m)}else(f in bc.keywords||e.allKeys&&!(f in bc.skipKeywords))&&YP(e,t,r,d,i+"/"+f,o,i,f,n)}r(n,i,o,a,u,c,l)}}s(YP,"_traverse");function bBe(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}s(bBe,"escapeJsonPtr")});var wy=h(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.getSchemaRefs=yi.resolveUrl=yi.normalizeId=yi._getFullPath=yi.getFullPath=yi.inlineRef=void 0;var SBe=Ve(),vBe=Xf(),OBe=JP(),PBe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function wBe(e,t=!0){return typeof e=="boolean"?!0:t===!0?!eL(e):t?y7(e)<=t:!1}s(wBe,"inlineRef");yi.inlineRef=wBe;var IBe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function eL(e){for(let t in e){if(IBe.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(eL)||typeof r=="object"&&eL(r))return!0}return!1}s(eL,"hasRef");function y7(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!PBe.has(r)&&(typeof e[r]=="object"&&(0,SBe.eachItem)(e[r],n=>t+=y7(n)),t===1/0))return 1/0}return t}s(y7,"countKeys");function E7(e,t="",r){r!==!1&&(t=jh(t));let n=e.parse(t);return b7(e,n)}s(E7,"getFullPath");yi.getFullPath=E7;function b7(e,t){return e.serialize(t).split("#")[0]+"#"}s(b7,"_getFullPath");yi._getFullPath=b7;var TBe=/#\/?$/;function jh(e){return e?e.replace(TBe,""):""}s(jh,"normalizeId");yi.normalizeId=jh;function NBe(e,t,r){return r=jh(r),e.resolve(t,r)}s(NBe,"resolveUrl");yi.resolveUrl=NBe;var ABe=/^[a-z_][-a-z0-9._]*$/i;function RBe(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=jh(e[r]||t),o={"":i},a=E7(n,i,!1),u={},c=new Set;return OBe(e,{allKeys:!0},(d,_,m,g)=>{if(g===void 0)return;let y=a+_,b=o[g];typeof d[r]=="string"&&(b=E.call(this,d[r])),v.call(this,d.$anchor),v.call(this,d.$dynamicAnchor),o[_]=b;function E(O){let P=this.opts.uriResolver.resolve;if(O=jh(b?P(b,O):O),c.has(O))throw f(O);c.add(O);let I=this.refs[O];return typeof I=="string"&&(I=this.refs[I]),typeof I=="object"?l(d,I.schema,O):O!==jh(y)&&(O[0]==="#"?(l(d,u[O],O),u[O]=d):this.refs[O]=y),O}s(E,"addRef");function v(O){if(typeof O=="string"){if(!ABe.test(O))throw new Error(`invalid anchor "${O}"`);E.call(this,`#${O}`)}}s(v,"addAnchor")}),u;function l(d,_,m){if(_!==void 0&&!vBe(d,_))throw f(m)}s(l,"checkAmbiguosRef");function f(d){return new Error(`reference "${d}" resolves to more than one schema`)}s(f,"ambiguos")}s(RBe,"getSchemaRefs");yi.getSchemaRefs=RBe});var Mh=h(Sc=>{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});Sc.getData=Sc.KeywordCxt=Sc.validateFunctionCode=void 0;var w7=t7(),S7=Py(),rL=KD(),XP=Py(),CBe=u7(),Ty=p7(),tL=m7(),ae=Oe(),Ee=hs(),$Be=wy(),uu=Ve(),Iy=vy();function DBe(e){if(N7(e)&&(A7(e),T7(e))){MBe(e);return}I7(e,()=>(0,w7.topBoolOrEmptySchema)(e))}s(DBe,"validateFunctionCode");Sc.validateFunctionCode=DBe;function I7({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,(0,ae._)`${Ee.default.data}, ${Ee.default.valCxt}`,n.$async,()=>{e.code((0,ae._)`"use strict"; ${v7(r,i)}`),jBe(e,i),e.code(o)}):e.func(t,(0,ae._)`${Ee.default.data}, ${LBe(i)}`,n.$async,()=>e.code(v7(r,i)).code(o))}s(I7,"validateFunction");function LBe(e){return(0,ae._)`{${Ee.default.instancePath}="", ${Ee.default.parentData}, ${Ee.default.parentDataProperty}, ${Ee.default.rootData}=${Ee.default.data}${e.dynamicRef?(0,ae._)`, ${Ee.default.dynamicAnchors}={}`:ae.nil}}={}`}s(LBe,"destructureValCxt");function jBe(e,t){e.if(Ee.default.valCxt,()=>{e.var(Ee.default.instancePath,(0,ae._)`${Ee.default.valCxt}.${Ee.default.instancePath}`),e.var(Ee.default.parentData,(0,ae._)`${Ee.default.valCxt}.${Ee.default.parentData}`),e.var(Ee.default.parentDataProperty,(0,ae._)`${Ee.default.valCxt}.${Ee.default.parentDataProperty}`),e.var(Ee.default.rootData,(0,ae._)`${Ee.default.valCxt}.${Ee.default.rootData}`),t.dynamicRef&&e.var(Ee.default.dynamicAnchors,(0,ae._)`${Ee.default.valCxt}.${Ee.default.dynamicAnchors}`)},()=>{e.var(Ee.default.instancePath,(0,ae._)`""`),e.var(Ee.default.parentData,(0,ae._)`undefined`),e.var(Ee.default.parentDataProperty,(0,ae._)`undefined`),e.var(Ee.default.rootData,Ee.default.data),t.dynamicRef&&e.var(Ee.default.dynamicAnchors,(0,ae._)`{}`)})}s(jBe,"destructureValCxtES5");function MBe(e){let{schema:t,opts:r,gen:n}=e;I7(e,()=>{r.$comment&&t.$comment&&C7(e),kBe(e),n.let(Ee.default.vErrors,null),n.let(Ee.default.errors,0),r.unevaluated&&UBe(e),R7(e),VBe(e)})}s(MBe,"topSchemaObjCode");function UBe(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,ae._)`${r}.evaluated`),t.if((0,ae._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,ae._)`${e.evaluated}.props`,(0,ae._)`undefined`)),t.if((0,ae._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,ae._)`${e.evaluated}.items`,(0,ae._)`undefined`))}s(UBe,"resetEvaluated");function v7(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,ae._)`/*# sourceURL=${r} */`:ae.nil}s(v7,"funcSourceUrl");function xBe(e,t){if(N7(e)&&(A7(e),T7(e))){qBe(e,t);return}(0,w7.boolOrEmptySchema)(e,t)}s(xBe,"subschemaCode");function T7({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}s(T7,"schemaCxtHasRules");function N7(e){return typeof e.schema!="boolean"}s(N7,"isSchemaObj");function qBe(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&C7(e),BBe(e),GBe(e);let o=n.const("_errs",Ee.default.errors);R7(e,o),n.var(t,(0,ae._)`${o} === ${Ee.default.errors}`)}s(qBe,"subSchemaObjCode");function A7(e){(0,uu.checkUnknownRules)(e),FBe(e)}s(A7,"checkKeywords");function R7(e,t){if(e.opts.jtd)return O7(e,[],!1,t);let r=(0,S7.getSchemaTypes)(e.schema),n=(0,S7.coerceAndCheckDataType)(e,r);O7(e,r,!n,t)}s(R7,"typeAndKeywords");function FBe(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,uu.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}s(FBe,"checkRefsAndKeywords");function kBe(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,uu.checkStrictMode)(e,"default is ignored in the schema root")}s(kBe,"checkNoDefault");function BBe(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,$Be.resolveUrl)(e.opts.uriResolver,e.baseId,t))}s(BBe,"updateContext");function GBe(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}s(GBe,"checkAsyncSchema");function C7({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)e.code((0,ae._)`${Ee.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,ae.str)`${n}/$comment`,u=e.scopeValue("root",{ref:t.root});e.code((0,ae._)`${Ee.default.self}.opts.$comment(${o}, ${a}, ${u}.schema)`)}}s(C7,"commentKeyword");function VBe(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if((0,ae._)`${Ee.default.errors} === 0`,()=>t.return(Ee.default.data),()=>t.throw((0,ae._)`new ${i}(${Ee.default.vErrors})`)):(t.assign((0,ae._)`${n}.errors`,Ee.default.vErrors),o.unevaluated&&zBe(e),t.return((0,ae._)`${Ee.default.errors} === 0`))}s(VBe,"returnResults");function zBe({gen:e,evaluated:t,props:r,items:n}){r instanceof ae.Name&&e.assign((0,ae._)`${t}.props`,r),n instanceof ae.Name&&e.assign((0,ae._)`${t}.items`,n)}s(zBe,"assignEvaluated");function O7(e,t,r,n){let{gen:i,schema:o,data:a,allErrors:u,opts:c,self:l}=e,{RULES:f}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,uu.schemaHasRulesButRef)(o,f))){i.block(()=>D7(e,"$ref",f.all.$ref.definition));return}c.jtd||HBe(e,t),i.block(()=>{for(let _ of f.rules)d(_);d(f.post)});function d(_){(0,rL.shouldUseGroup)(o,_)&&(_.type?(i.if((0,XP.checkDataType)(_.type,a,c.strictNumbers)),P7(e,_),t.length===1&&t[0]===_.type&&r&&(i.else(),(0,XP.reportTypeError)(e)),i.endIf()):P7(e,_),u||i.if((0,ae._)`${Ee.default.errors} === ${n||0}`))}s(d,"groupKeywords")}s(O7,"schemaKeywords");function P7(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,CBe.assignDefaults)(e,t.type),r.block(()=>{for(let o of t.rules)(0,rL.shouldUseRule)(n,o)&&D7(e,o.keyword,o.definition,t.type)})}s(P7,"iterateKeywords");function HBe(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(KBe(e,t),e.opts.allowUnionTypes||WBe(e,t),YBe(e,e.dataTypes))}s(HBe,"checkStrictTypes");function KBe(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{$7(e.dataTypes,r)||nL(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),XBe(e,t)}}s(KBe,"checkContextTypes");function WBe(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&nL(e,"use allowUnionTypes to allow union type keyword")}s(WBe,"checkMultipleTypes");function YBe(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,rL.shouldUseRule)(e.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>JBe(t,a))&&nL(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}s(YBe,"checkKeywordTypes");function JBe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}s(JBe,"hasApplicableType");function $7(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}s($7,"includesType");function XBe(e,t){let r=[];for(let n of e.dataTypes)$7(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}s(XBe,"narrowSchemaTypes");function nL(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,uu.checkStrictMode)(e,t,e.opts.strictTypes)}s(nL,"strictTypesError");var ZP=class{static{s(this,"KeywordCxt")}constructor(t,r,n){if((0,Ty.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,uu.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",L7(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Ty.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Ee.default.errors))}result(t,r,n){this.failResult((0,ae.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,ae.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,ae._)`${r} !== undefined && (${(0,ae.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Iy.reportExtraError:Iy.reportError)(this,this.def.error,r)}$dataError(){(0,Iy.reportError)(this,this.def.$dataError||Iy.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Iy.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=ae.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=ae.nil,r=ae.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,ae.or)((0,ae._)`${i} === undefined`,r)),t!==ae.nil&&n.assign(t,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==ae.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,ae.or)(a(),u());function a(){if(n.length){if(!(r instanceof ae.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,ae._)`${(0,XP.checkDataTypes)(c,r,o.opts.strictNumbers,XP.DataType.Wrong)}`}return ae.nil}function u(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,ae._)`!${c}(${r})`}return ae.nil}}subschema(t,r){let n=(0,tL.getSubschema)(this.it,t);(0,tL.extendSubschemaData)(n,this.it,t),(0,tL.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return xBe(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=uu.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=uu.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,ae.Name)),!0}};Sc.KeywordCxt=ZP;function D7(e,t,r,n){let i=new ZP(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Ty.funcKeywordCode)(i,r):"macro"in r?(0,Ty.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Ty.funcKeywordCode)(i,r)}s(D7,"keywordCode");var ZBe=/^\/(?:[^~]|~0|~1)*$/,QBe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function L7(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(e==="")return Ee.default.rootData;if(e[0]==="/"){if(!ZBe.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=Ee.default.rootData}else{let l=QBe.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);let f=+l[1];if(i=l[2],i==="#"){if(f>=t)throw new Error(c("property/index",f));return n[t-f]}if(f>t)throw new Error(c("data",f));if(o=r[t-f],!i)return o}let a=o,u=i.split("/");for(let l of u)l&&(o=(0,ae._)`${o}${(0,ae.getProperty)((0,uu.unescapeJsonPointer)(l))}`,a=(0,ae._)`${a} && ${o}`);return a;function c(l,f){return`Cannot access ${l} ${f} levels up, current level is ${t}`}}s(L7,"getData");Sc.getData=L7});var Ny=h(sL=>{"use strict";Object.defineProperty(sL,"__esModule",{value:!0});var iL=class extends Error{static{s(this,"ValidationError")}constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};sL.default=iL});var Ay=h(uL=>{"use strict";Object.defineProperty(uL,"__esModule",{value:!0});var oL=wy(),aL=class extends Error{static{s(this,"MissingRefError")}constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,oL.resolveUrl)(t,r,n),this.missingSchema=(0,oL.normalizeId)((0,oL.getFullPath)(t,this.missingRef))}};uL.default=aL});var Ry=h(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.resolveSchema=_s.getCompilingSchema=_s.resolveRef=_s.compileSchema=_s.SchemaEnv=void 0;var oo=Oe(),e3e=Ny(),Zf=hs(),ao=wy(),j7=Ve(),t3e=Mh(),Uh=class{static{s(this,"SchemaEnv")}constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,ao.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};_s.SchemaEnv=Uh;function lL(e){let t=M7.call(this,e);if(t)return t;let r=(0,ao.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new oo.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),u;e.$async&&(u=a.scopeValue("Error",{ref:e3e.default,code:(0,oo._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let l={gen:a,allErrors:this.opts.allErrors,data:Zf.default.data,parentData:Zf.default.parentData,parentDataProperty:Zf.default.parentDataProperty,dataNames:[Zf.default.data],dataPathArr:[oo.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,oo.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:oo.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,oo._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(e),(0,t3e.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);let d=a.toString();f=`${a.scopeRefs(Zf.default.scope)}return ${d}`,this.opts.code.process&&(f=this.opts.code.process(f,e));let m=new Function(`${Zf.default.self}`,`${Zf.default.scope}`,f)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:g,items:y}=l;m.evaluated={props:g instanceof oo.Name?void 0:g,items:y instanceof oo.Name?void 0:y,dynamicProps:g instanceof oo.Name,dynamicItems:y instanceof oo.Name},m.source&&(m.source.evaluated=(0,oo.stringify)(m.evaluated))}return e.validate=m,e}catch(d){throw delete e.validate,delete e.validateName,f&&this.logger.error("Error compiling schema, function code:",f),d}finally{this._compilations.delete(e)}}s(lL,"compileSchema");_s.compileSchema=lL;function r3e(e,t,r){var n;r=(0,ao.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let o=s3e.call(this,e,r);if(o===void 0){let a=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:u}=this.opts;a&&(o=new Uh({schema:a,schemaId:u,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=n3e.call(this,o)}s(r3e,"resolveRef");_s.resolveRef=r3e;function n3e(e){return(0,ao.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:lL.call(this,e)}s(n3e,"inlineOrCompile");function M7(e){for(let t of this._compilations)if(i3e(t,e))return t}s(M7,"getCompilingSchema");_s.getCompilingSchema=M7;function i3e(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}s(i3e,"sameSchemaEnv");function s3e(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||QP.call(this,e,t)}s(s3e,"resolve");function QP(e,t){let r=this.opts.uriResolver.parse(t),n=(0,ao._getFullPath)(this.opts.uriResolver,r),i=(0,ao.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return cL.call(this,r,e);let o=(0,ao.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let u=QP.call(this,e,a);return typeof u?.schema!="object"?void 0:cL.call(this,r,u)}if(typeof a?.schema=="object"){if(a.validate||lL.call(this,a),o===(0,ao.normalizeId)(t)){let{schema:u}=a,{schemaId:c}=this.opts,l=u[c];return l&&(i=(0,ao.resolveUrl)(this.opts.uriResolver,i,l)),new Uh({schema:u,schemaId:c,root:e,baseId:i})}return cL.call(this,r,a)}}s(QP,"resolveSchema");_s.resolveSchema=QP;var o3e=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function cL(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let u of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,j7.unescapeFragment)(u)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!o3e.has(u)&&l&&(t=(0,ao.resolveUrl)(this.opts.uriResolver,t,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,j7.schemaHasRulesButRef)(r,this.RULES)){let u=(0,ao.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=QP.call(this,n,u)}let{schemaId:a}=this.opts;if(o=o||new Uh({schema:r,schemaId:a,root:n,baseId:t}),o.schema!==o.root.schema)return o}s(cL,"getJsonPointer")});var U7=h((tAt,a3e)=>{a3e.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var tw=h((ew,x7)=>{(function(e,t){typeof ew=="object"&&typeof x7<"u"?t(ew):typeof define=="function"&&define.amd?define(["exports"],t):t(e.URI=e.URI||{})})(ew,function(e){"use strict";function t(){for(var T=arguments.length,w=Array(T),R=0;R<T;R++)w[R]=arguments[R];if(w.length>1){w[0]=w[0].slice(0,-1);for(var C=w.length-1,$=1;$<C;++$)w[$]=w[$].slice(1,-1);return w[C]=w[C].slice(1),w.join("")}else return w[0]}s(t,"merge");function r(T){return"(?:"+T+")"}s(r,"subexp");function n(T){return T===void 0?"undefined":T===null?"null":Object.prototype.toString.call(T).split(" ").pop().split("]").shift().toLowerCase()}s(n,"typeOf");function i(T){return T.toUpperCase()}s(i,"toUpperCase");function o(T){return T!=null?T instanceof Array?T:typeof T.length!="number"||T.split||T.setInterval||T.call?[T]:Array.prototype.slice.call(T):[]}s(o,"toArray");function a(T,w){var R=T;if(w)for(var C in w)R[C]=w[C];return R}s(a,"assign");function u(T){var w="[A-Za-z]",R="[\\x0D]",C="[0-9]",$="[\\x22]",ee=t(C,"[A-Fa-f]"),Ie="[\\x0A]",ut="[\\x20]",vt=r(r("%[EFef]"+ee+"%"+ee+ee+"%"+ee+ee)+"|"+r("%[89A-Fa-f]"+ee+"%"+ee+ee)+"|"+r("%"+ee+ee)),br="[\\:\\/\\?\\#\\[\\]\\@]",et="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Zt=t(br,et),Sr=T?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Kt=T?"[\\uE000-\\uF8FF]":"[]",gt=t(w,C,"[\\-\\.\\_\\~]",Sr),Qt=r(w+t(w,C,"[\\+\\-\\.]")+"*"),Nt=r(r(vt+"|"+t(gt,et,"[\\:]"))+"*"),fl=r(r("25[0-5]")+"|"+r("2[0-4]"+C)+"|"+r("1"+C+C)+"|"+r("[1-9]"+C)+"|"+C),Ui=r(r("25[0-5]")+"|"+r("2[0-4]"+C)+"|"+r("1"+C+C)+"|"+r("0?[1-9]"+C)+"|0?0?"+C),es=r(Ui+"\\."+Ui+"\\."+Ui+"\\."+Ui),Lt=r(ee+"{1,4}"),xi=r(r(Lt+"\\:"+Lt)+"|"+es),ts=r(r(Lt+"\\:")+"{6}"+xi),Ro=r("\\:\\:"+r(Lt+"\\:")+"{5}"+xi),dl=r(r(Lt)+"?\\:\\:"+r(Lt+"\\:")+"{4}"+xi),qa=r(r(r(Lt+"\\:")+"{0,1}"+Lt)+"?\\:\\:"+r(Lt+"\\:")+"{3}"+xi),rg=r(r(r(Lt+"\\:")+"{0,2}"+Lt)+"?\\:\\:"+r(Lt+"\\:")+"{2}"+xi),hb=r(r(r(Lt+"\\:")+"{0,3}"+Lt)+"?\\:\\:"+Lt+"\\:"+xi),mb=r(r(r(Lt+"\\:")+"{0,4}"+Lt)+"?\\:\\:"+xi),dp=r(r(r(Lt+"\\:")+"{0,5}"+Lt)+"?\\:\\:"+Lt),pp=r(r(r(Lt+"\\:")+"{0,6}"+Lt)+"?\\:\\:"),Fa=r([ts,Ro,dl,qa,rg,hb,mb,dp,pp].join("|")),hp=r(r(gt+"|"+vt)+"+"),IA=r(Fa+"\\%25"+hp),pl=r(Fa+r("\\%25|\\%(?!"+ee+"{2})")+hp),Jpe=r("[vV]"+ee+"+\\."+t(gt,et,"[\\:]")+"+"),Xpe=r("\\["+r(pl+"|"+Fa+"|"+Jpe)+"\\]"),YB=r(r(vt+"|"+t(gt,et))+"*"),ng=r(Xpe+"|"+es+"(?!"+YB+")|"+YB),ig=r(C+"*"),JB=r(r(Nt+"@")+"?"+ng+r("\\:"+ig)+"?"),sg=r(vt+"|"+t(gt,et,"[\\:\\@]")),Zpe=r(sg+"*"),XB=r(sg+"+"),Qpe=r(r(vt+"|"+t(gt,et,"[\\@]"))+"+"),ka=r(r("\\/"+Zpe)+"*"),mp=r("\\/"+r(XB+ka)+"?"),TA=r(Qpe+ka),_b=r(XB+ka),_p="(?!"+sg+")",M0t=r(ka+"|"+mp+"|"+TA+"|"+_b+"|"+_p),gp=r(r(sg+"|"+t("[\\/\\?]",Kt))+"*"),og=r(r(sg+"|[\\/\\?]")+"*"),ZB=r(r("\\/\\/"+JB+ka)+"|"+mp+"|"+_b+"|"+_p),ehe=r(Qt+"\\:"+ZB+r("\\?"+gp)+"?"+r("\\#"+og)+"?"),the=r(r("\\/\\/"+JB+ka)+"|"+mp+"|"+TA+"|"+_p),rhe=r(the+r("\\?"+gp)+"?"+r("\\#"+og)+"?"),U0t=r(ehe+"|"+rhe),x0t=r(Qt+"\\:"+ZB+r("\\?"+gp)+"?"),q0t="^("+Qt+")\\:"+r(r("\\/\\/("+r("("+Nt+")@")+"?("+ng+")"+r("\\:("+ig+")")+"?)")+"?("+ka+"|"+mp+"|"+_b+"|"+_p+")")+r("\\?("+gp+")")+"?"+r("\\#("+og+")")+"?$",F0t="^(){0}"+r(r("\\/\\/("+r("("+Nt+")@")+"?("+ng+")"+r("\\:("+ig+")")+"?)")+"?("+ka+"|"+mp+"|"+TA+"|"+_p+")")+r("\\?("+gp+")")+"?"+r("\\#("+og+")")+"?$",k0t="^("+Qt+")\\:"+r(r("\\/\\/("+r("("+Nt+")@")+"?("+ng+")"+r("\\:("+ig+")")+"?)")+"?("+ka+"|"+mp+"|"+_b+"|"+_p+")")+r("\\?("+gp+")")+"?$",B0t="^"+r("\\#("+og+")")+"?$",G0t="^"+r("("+Nt+")@")+"?("+ng+")"+r("\\:("+ig+")")+"?$";return{NOT_SCHEME:new RegExp(t("[^]",w,C,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",gt,et),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",gt,et),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",gt,et),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",gt,et),"g"),NOT_QUERY:new RegExp(t("[^\\%]",gt,et,"[\\:\\@\\/\\?]",Kt),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",gt,et,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",gt,et),"g"),UNRESERVED:new RegExp(gt,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",gt,Zt),"g"),PCT_ENCODED:new RegExp(vt,"g"),IPV4ADDRESS:new RegExp("^("+es+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Fa+")"+r(r("\\%25|\\%(?!"+ee+"{2})")+"("+hp+")")+"?\\]?$")}}s(u,"buildExps");var c=u(!1),l=u(!0),f=function(){function T(w,R){var C=[],$=!0,ee=!1,Ie=void 0;try{for(var ut=w[Symbol.iterator](),vt;!($=(vt=ut.next()).done)&&(C.push(vt.value),!(R&&C.length===R));$=!0);}catch(br){ee=!0,Ie=br}finally{try{!$&&ut.return&&ut.return()}finally{if(ee)throw Ie}}return C}return s(T,"sliceIterator"),function(w,R){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return T(w,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=s(function(T){if(Array.isArray(T)){for(var w=0,R=Array(T.length);w<T.length;w++)R[w]=T[w];return R}else return Array.from(T)},"toConsumableArray"),_=2147483647,m=36,g=1,y=26,b=38,E=700,v=72,O=128,P="-",I=/^xn--/,j=/[^\0-\x7E]/,x=/[\x2E\u3002\uFF0E\uFF61]/g,H={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},K=m-g,Q=Math.floor,de=String.fromCharCode;function re(T){throw new RangeError(H[T])}s(re,"error$1");function he(T,w){for(var R=[],C=T.length;C--;)R[C]=w(T[C]);return R}s(he,"map");function $e(T,w){var R=T.split("@"),C="";R.length>1&&(C=R[0]+"@",T=R[1]),T=T.replace(x,".");var $=T.split("."),ee=he($,w).join(".");return C+ee}s($e,"mapDomain");function bt(T){for(var w=[],R=0,C=T.length;R<C;){var $=T.charCodeAt(R++);if($>=55296&&$<=56319&&R<C){var ee=T.charCodeAt(R++);(ee&64512)==56320?w.push((($&1023)<<10)+(ee&1023)+65536):(w.push($),R--)}else w.push($)}return w}s(bt,"ucs2decode");var _t=s(function(w){return String.fromCodePoint.apply(String,d(w))},"ucs2encode"),zr=s(function(w){return w-48<10?w-22:w-65<26?w-65:w-97<26?w-97:m},"basicToDigit"),Rn=s(function(w,R){return w+22+75*(w<26)-((R!=0)<<5)},"digitToBasic"),Qi=s(function(w,R,C){var $=0;for(w=C?Q(w/E):w>>1,w+=Q(w/R);w>K*y>>1;$+=m)w=Q(w/K);return Q($+(K+1)*w/(w+b))},"adapt"),ja=s(function(w){var R=[],C=w.length,$=0,ee=O,Ie=v,ut=w.lastIndexOf(P);ut<0&&(ut=0);for(var vt=0;vt<ut;++vt)w.charCodeAt(vt)>=128&&re("not-basic"),R.push(w.charCodeAt(vt));for(var br=ut>0?ut+1:0;br<C;){for(var et=$,Zt=1,Sr=m;;Sr+=m){br>=C&&re("invalid-input");var Kt=zr(w.charCodeAt(br++));(Kt>=m||Kt>Q((_-$)/Zt))&&re("overflow"),$+=Kt*Zt;var gt=Sr<=Ie?g:Sr>=Ie+y?y:Sr-Ie;if(Kt<gt)break;var Qt=m-gt;Zt>Q(_/Qt)&&re("overflow"),Zt*=Qt}var Nt=R.length+1;Ie=Qi($-et,Nt,et==0),Q($/Nt)>_-ee&&re("overflow"),ee+=Q($/Nt),$%=Nt,R.splice($++,0,ee)}return String.fromCodePoint.apply(String,R)},"decode"),Cn=s(function(w){var R=[];w=bt(w);var C=w.length,$=O,ee=0,Ie=v,ut=!0,vt=!1,br=void 0;try{for(var et=w[Symbol.iterator](),Zt;!(ut=(Zt=et.next()).done);ut=!0){var Sr=Zt.value;Sr<128&&R.push(de(Sr))}}catch(pl){vt=!0,br=pl}finally{try{!ut&&et.return&&et.return()}finally{if(vt)throw br}}var Kt=R.length,gt=Kt;for(Kt&&R.push(P);gt<C;){var Qt=_,Nt=!0,fl=!1,Ui=void 0;try{for(var es=w[Symbol.iterator](),Lt;!(Nt=(Lt=es.next()).done);Nt=!0){var xi=Lt.value;xi>=$&&xi<Qt&&(Qt=xi)}}catch(pl){fl=!0,Ui=pl}finally{try{!Nt&&es.return&&es.return()}finally{if(fl)throw Ui}}var ts=gt+1;Qt-$>Q((_-ee)/ts)&&re("overflow"),ee+=(Qt-$)*ts,$=Qt;var Ro=!0,dl=!1,qa=void 0;try{for(var rg=w[Symbol.iterator](),hb;!(Ro=(hb=rg.next()).done);Ro=!0){var mb=hb.value;if(mb<$&&++ee>_&&re("overflow"),mb==$){for(var dp=ee,pp=m;;pp+=m){var Fa=pp<=Ie?g:pp>=Ie+y?y:pp-Ie;if(dp<Fa)break;var hp=dp-Fa,IA=m-Fa;R.push(de(Rn(Fa+hp%IA,0))),dp=Q(hp/IA)}R.push(de(Rn(dp,0))),Ie=Qi(ee,ts,gt==Kt),ee=0,++gt}}}catch(pl){dl=!0,qa=pl}finally{try{!Ro&&rg.return&&rg.return()}finally{if(dl)throw qa}}++ee,++$}return R.join("")},"encode"),ji=s(function(w){return $e(w,function(R){return I.test(R)?ja(R.slice(4).toLowerCase()):R})},"toUnicode"),Mi=s(function(w){return $e(w,function(R){return j.test(R)?"xn--"+Cn(R):R})},"toASCII"),Ma={version:"2.1.0",ucs2:{decode:bt,encode:_t},decode:ja,encode:Cn,toASCII:Mi,toUnicode:ji},Hr={};function $n(T){var w=T.charCodeAt(0),R=void 0;return w<16?R="%0"+w.toString(16).toUpperCase():w<128?R="%"+w.toString(16).toUpperCase():w<2048?R="%"+(w>>6|192).toString(16).toUpperCase()+"%"+(w&63|128).toString(16).toUpperCase():R="%"+(w>>12|224).toString(16).toUpperCase()+"%"+(w>>6&63|128).toString(16).toUpperCase()+"%"+(w&63|128).toString(16).toUpperCase(),R}s($n,"pctEncChar");function cp(T){for(var w="",R=0,C=T.length;R<C;){var $=parseInt(T.substr(R+1,2),16);if($<128)w+=String.fromCharCode($),R+=3;else if($>=194&&$<224){if(C-R>=6){var ee=parseInt(T.substr(R+4,2),16);w+=String.fromCharCode(($&31)<<6|ee&63)}else w+=T.substr(R,6);R+=6}else if($>=224){if(C-R>=9){var Ie=parseInt(T.substr(R+4,2),16),ut=parseInt(T.substr(R+7,2),16);w+=String.fromCharCode(($&15)<<12|(Ie&63)<<6|ut&63)}else w+=T.substr(R,9);R+=9}else w+=T.substr(R,3),R+=3}return w}s(cp,"pctDecChars");function vA(T,w){function R(C){var $=cp(C);return $.match(w.UNRESERVED)?$:C}return s(R,"decodeUnreserved"),T.scheme&&(T.scheme=String(T.scheme).replace(w.PCT_ENCODED,R).toLowerCase().replace(w.NOT_SCHEME,"")),T.userinfo!==void 0&&(T.userinfo=String(T.userinfo).replace(w.PCT_ENCODED,R).replace(w.NOT_USERINFO,$n).replace(w.PCT_ENCODED,i)),T.host!==void 0&&(T.host=String(T.host).replace(w.PCT_ENCODED,R).toLowerCase().replace(w.NOT_HOST,$n).replace(w.PCT_ENCODED,i)),T.path!==void 0&&(T.path=String(T.path).replace(w.PCT_ENCODED,R).replace(T.scheme?w.NOT_PATH:w.NOT_PATH_NOSCHEME,$n).replace(w.PCT_ENCODED,i)),T.query!==void 0&&(T.query=String(T.query).replace(w.PCT_ENCODED,R).replace(w.NOT_QUERY,$n).replace(w.PCT_ENCODED,i)),T.fragment!==void 0&&(T.fragment=String(T.fragment).replace(w.PCT_ENCODED,R).replace(w.NOT_FRAGMENT,$n).replace(w.PCT_ENCODED,i)),T}s(vA,"_normalizeComponentEncoding");function OA(T){return T.replace(/^0*(.*)/,"$1")||"0"}s(OA,"_stripLeadingZeros");function PA(T,w){var R=T.match(w.IPV4ADDRESS)||[],C=f(R,2),$=C[1];return $?$.split(".").map(OA).join("."):T}s(PA,"_normalizeIPv4");function MB(T,w){var R=T.match(w.IPV6ADDRESS)||[],C=f(R,3),$=C[1],ee=C[2];if($){for(var Ie=$.toLowerCase().split("::").reverse(),ut=f(Ie,2),vt=ut[0],br=ut[1],et=br?br.split(":").map(OA):[],Zt=vt.split(":").map(OA),Sr=w.IPV4ADDRESS.test(Zt[Zt.length-1]),Kt=Sr?7:8,gt=Zt.length-Kt,Qt=Array(Kt),Nt=0;Nt<Kt;++Nt)Qt[Nt]=et[Nt]||Zt[gt+Nt]||"";Sr&&(Qt[Kt-1]=PA(Qt[Kt-1],w));var fl=Qt.reduce(function(ts,Ro,dl){if(!Ro||Ro==="0"){var qa=ts[ts.length-1];qa&&qa.index+qa.length===dl?qa.length++:ts.push({index:dl,length:1})}return ts},[]),Ui=fl.sort(function(ts,Ro){return Ro.length-ts.length})[0],es=void 0;if(Ui&&Ui.length>1){var Lt=Qt.slice(0,Ui.index),xi=Qt.slice(Ui.index+Ui.length);es=Lt.join(":")+"::"+xi.join(":")}else es=Qt.join(":");return ee&&(es+="%"+ee),es}else return T}s(MB,"_normalizeIPv6");var Rpe=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Cpe="".match(/(){0}/)[1]===void 0;function Ua(T){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R={},C=w.iri!==!1?l:c;w.reference==="suffix"&&(T=(w.scheme?w.scheme+":":"")+"//"+T);var $=T.match(Rpe);if($){Cpe?(R.scheme=$[1],R.userinfo=$[3],R.host=$[4],R.port=parseInt($[5],10),R.path=$[6]||"",R.query=$[7],R.fragment=$[8],isNaN(R.port)&&(R.port=$[5])):(R.scheme=$[1]||void 0,R.userinfo=T.indexOf("@")!==-1?$[3]:void 0,R.host=T.indexOf("//")!==-1?$[4]:void 0,R.port=parseInt($[5],10),R.path=$[6]||"",R.query=T.indexOf("?")!==-1?$[7]:void 0,R.fragment=T.indexOf("#")!==-1?$[8]:void 0,isNaN(R.port)&&(R.port=T.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?$[4]:void 0)),R.host&&(R.host=MB(PA(R.host,C),C)),R.scheme===void 0&&R.userinfo===void 0&&R.host===void 0&&R.port===void 0&&!R.path&&R.query===void 0?R.reference="same-document":R.scheme===void 0?R.reference="relative":R.fragment===void 0?R.reference="absolute":R.reference="uri",w.reference&&w.reference!=="suffix"&&w.reference!==R.reference&&(R.error=R.error||"URI is not a "+w.reference+" reference.");var ee=Hr[(w.scheme||R.scheme||"").toLowerCase()];if(!w.unicodeSupport&&(!ee||!ee.unicodeSupport)){if(R.host&&(w.domainHost||ee&&ee.domainHost))try{R.host=Ma.toASCII(R.host.replace(C.PCT_ENCODED,cp).toLowerCase())}catch(Ie){R.error=R.error||"Host's domain name can not be converted to ASCII via punycode: "+Ie}vA(R,c)}else vA(R,C);ee&&ee.parse&&ee.parse(R,w)}else R.error=R.error||"URI can not be parsed.";return R}s(Ua,"parse");function $pe(T,w){var R=w.iri!==!1?l:c,C=[];return T.userinfo!==void 0&&(C.push(T.userinfo),C.push("@")),T.host!==void 0&&C.push(MB(PA(String(T.host),R),R).replace(R.IPV6ADDRESS,function($,ee,Ie){return"["+ee+(Ie?"%25"+Ie:"")+"]"})),(typeof T.port=="number"||typeof T.port=="string")&&(C.push(":"),C.push(String(T.port))),C.length?C.join(""):void 0}s($pe,"_recomposeAuthority");var UB=/^\.\.?\//,xB=/^\/\.(\/|$)/,qB=/^\/\.\.(\/|$)/,Dpe=/^\/?(?:.|\n)*?(?=\/|$)/;function lp(T){for(var w=[];T.length;)if(T.match(UB))T=T.replace(UB,"");else if(T.match(xB))T=T.replace(xB,"/");else if(T.match(qB))T=T.replace(qB,"/"),w.pop();else if(T==="."||T==="..")T="";else{var R=T.match(Dpe);if(R){var C=R[0];T=T.slice(C.length),w.push(C)}else throw new Error("Unexpected dot segment condition")}return w.join("")}s(lp,"removeDotSegments");function No(T){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=w.iri?l:c,C=[],$=Hr[(w.scheme||T.scheme||"").toLowerCase()];if($&&$.serialize&&$.serialize(T,w),T.host&&!R.IPV6ADDRESS.test(T.host)){if(w.domainHost||$&&$.domainHost)try{T.host=w.iri?Ma.toUnicode(T.host):Ma.toASCII(T.host.replace(R.PCT_ENCODED,cp).toLowerCase())}catch(ut){T.error=T.error||"Host's domain name can not be converted to "+(w.iri?"Unicode":"ASCII")+" via punycode: "+ut}}vA(T,R),w.reference!=="suffix"&&T.scheme&&(C.push(T.scheme),C.push(":"));var ee=$pe(T,w);if(ee!==void 0&&(w.reference!=="suffix"&&C.push("//"),C.push(ee),T.path&&T.path.charAt(0)!=="/"&&C.push("/")),T.path!==void 0){var Ie=T.path;!w.absolutePath&&(!$||!$.absolutePath)&&(Ie=lp(Ie)),ee===void 0&&(Ie=Ie.replace(/^\/\//,"/%2F")),C.push(Ie)}return T.query!==void 0&&(C.push("?"),C.push(T.query)),T.fragment!==void 0&&(C.push("#"),C.push(T.fragment)),C.join("")}s(No,"serialize");function FB(T,w){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},C=arguments[3],$={};return C||(T=Ua(No(T,R),R),w=Ua(No(w,R),R)),R=R||{},!R.tolerant&&w.scheme?($.scheme=w.scheme,$.userinfo=w.userinfo,$.host=w.host,$.port=w.port,$.path=lp(w.path||""),$.query=w.query):(w.userinfo!==void 0||w.host!==void 0||w.port!==void 0?($.userinfo=w.userinfo,$.host=w.host,$.port=w.port,$.path=lp(w.path||""),$.query=w.query):(w.path?(w.path.charAt(0)==="/"?$.path=lp(w.path):((T.userinfo!==void 0||T.host!==void 0||T.port!==void 0)&&!T.path?$.path="/"+w.path:T.path?$.path=T.path.slice(0,T.path.lastIndexOf("/")+1)+w.path:$.path=w.path,$.path=lp($.path)),$.query=w.query):($.path=T.path,w.query!==void 0?$.query=w.query:$.query=T.query),$.userinfo=T.userinfo,$.host=T.host,$.port=T.port),$.scheme=T.scheme),$.fragment=w.fragment,$}s(FB,"resolveComponents");function Lpe(T,w,R){var C=a({scheme:"null"},R);return No(FB(Ua(T,C),Ua(w,C),C,!0),C)}s(Lpe,"resolve");function jpe(T,w){return typeof T=="string"?T=No(Ua(T,w),w):n(T)==="object"&&(T=Ua(No(T,w),w)),T}s(jpe,"normalize");function Mpe(T,w,R){return typeof T=="string"?T=No(Ua(T,R),R):n(T)==="object"&&(T=No(T,R)),typeof w=="string"?w=No(Ua(w,R),R):n(w)==="object"&&(w=No(w,R)),T===w}s(Mpe,"equal");function Upe(T,w){return T&&T.toString().replace(!w||!w.iri?c.ESCAPE:l.ESCAPE,$n)}s(Upe,"escapeComponent");function xa(T,w){return T&&T.toString().replace(!w||!w.iri?c.PCT_ENCODED:l.PCT_ENCODED,cp)}s(xa,"unescapeComponent");var eg={scheme:"http",domainHost:!0,parse:s(function(w,R){return w.host||(w.error=w.error||"HTTP URIs must have a host."),w},"parse"),serialize:s(function(w,R){var C=String(w.scheme).toLowerCase()==="https";return(w.port===(C?443:80)||w.port==="")&&(w.port=void 0),w.path||(w.path="/"),w},"serialize")},kB={scheme:"https",domainHost:eg.domainHost,parse:eg.parse,serialize:eg.serialize};function BB(T){return typeof T.secure=="boolean"?T.secure:String(T.scheme).toLowerCase()==="wss"}s(BB,"isSecure");var tg={scheme:"ws",domainHost:!0,parse:s(function(w,R){var C=w;return C.secure=BB(C),C.resourceName=(C.path||"/")+(C.query?"?"+C.query:""),C.path=void 0,C.query=void 0,C},"parse"),serialize:s(function(w,R){if((w.port===(BB(w)?443:80)||w.port==="")&&(w.port=void 0),typeof w.secure=="boolean"&&(w.scheme=w.secure?"wss":"ws",w.secure=void 0),w.resourceName){var C=w.resourceName.split("?"),$=f(C,2),ee=$[0],Ie=$[1];w.path=ee&&ee!=="/"?ee:void 0,w.query=Ie,w.resourceName=void 0}return w.fragment=void 0,w},"serialize")},GB={scheme:"wss",domainHost:tg.domainHost,parse:tg.parse,serialize:tg.serialize},xpe={},qpe=!0,VB="[A-Za-z0-9\\-\\.\\_\\~"+(qpe?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",Ao="[0-9A-Fa-f]",Fpe=r(r("%[EFef]"+Ao+"%"+Ao+Ao+"%"+Ao+Ao)+"|"+r("%[89A-Fa-f]"+Ao+"%"+Ao+Ao)+"|"+r("%"+Ao+Ao)),kpe="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Bpe="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Gpe=t(Bpe,'[\\"\\\\]'),Vpe="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",zpe=new RegExp(VB,"g"),fp=new RegExp(Fpe,"g"),Hpe=new RegExp(t("[^]",kpe,"[\\.]",'[\\"]',Gpe),"g"),zB=new RegExp(t("[^]",VB,Vpe),"g"),Kpe=zB;function wA(T){var w=cp(T);return w.match(zpe)?w:T}s(wA,"decodeUnreserved");var HB={scheme:"mailto",parse:s(function(w,R){var C=w,$=C.to=C.path?C.path.split(","):[];if(C.path=void 0,C.query){for(var ee=!1,Ie={},ut=C.query.split("&"),vt=0,br=ut.length;vt<br;++vt){var et=ut[vt].split("=");switch(et[0]){case"to":for(var Zt=et[1].split(","),Sr=0,Kt=Zt.length;Sr<Kt;++Sr)$.push(Zt[Sr]);break;case"subject":C.subject=xa(et[1],R);break;case"body":C.body=xa(et[1],R);break;default:ee=!0,Ie[xa(et[0],R)]=xa(et[1],R);break}}ee&&(C.headers=Ie)}C.query=void 0;for(var gt=0,Qt=$.length;gt<Qt;++gt){var Nt=$[gt].split("@");if(Nt[0]=xa(Nt[0]),R.unicodeSupport)Nt[1]=xa(Nt[1],R).toLowerCase();else try{Nt[1]=Ma.toASCII(xa(Nt[1],R).toLowerCase())}catch(fl){C.error=C.error||"Email address's domain name can not be converted to ASCII via punycode: "+fl}$[gt]=Nt.join("@")}return C},"parse$$1"),serialize:s(function(w,R){var C=w,$=o(w.to);if($){for(var ee=0,Ie=$.length;ee<Ie;++ee){var ut=String($[ee]),vt=ut.lastIndexOf("@"),br=ut.slice(0,vt).replace(fp,wA).replace(fp,i).replace(Hpe,$n),et=ut.slice(vt+1);try{et=R.iri?Ma.toUnicode(et):Ma.toASCII(xa(et,R).toLowerCase())}catch(gt){C.error=C.error||"Email address's domain name can not be converted to "+(R.iri?"Unicode":"ASCII")+" via punycode: "+gt}$[ee]=br+"@"+et}C.path=$.join(",")}var Zt=w.headers=w.headers||{};w.subject&&(Zt.subject=w.subject),w.body&&(Zt.body=w.body);var Sr=[];for(var Kt in Zt)Zt[Kt]!==xpe[Kt]&&Sr.push(Kt.replace(fp,wA).replace(fp,i).replace(zB,$n)+"="+Zt[Kt].replace(fp,wA).replace(fp,i).replace(Kpe,$n));return Sr.length&&(C.query=Sr.join("&")),C},"serialize$$1")},Wpe=/^([^\:]+)\:(.*)/,KB={scheme:"urn",parse:s(function(w,R){var C=w.path&&w.path.match(Wpe),$=w;if(C){var ee=R.scheme||$.scheme||"urn",Ie=C[1].toLowerCase(),ut=C[2],vt=ee+":"+(R.nid||Ie),br=Hr[vt];$.nid=Ie,$.nss=ut,$.path=void 0,br&&($=br.parse($,R))}else $.error=$.error||"URN can not be parsed.";return $},"parse$$1"),serialize:s(function(w,R){var C=R.scheme||w.scheme||"urn",$=w.nid,ee=C+":"+(R.nid||$),Ie=Hr[ee];Ie&&(w=Ie.serialize(w,R));var ut=w,vt=w.nss;return ut.path=($||R.nid)+":"+vt,ut},"serialize$$1")},Ype=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,WB={scheme:"urn:uuid",parse:s(function(w,R){var C=w;return C.uuid=C.nss,C.nss=void 0,!R.tolerant&&(!C.uuid||!C.uuid.match(Ype))&&(C.error=C.error||"UUID is not valid."),C},"parse"),serialize:s(function(w,R){var C=w;return C.nss=(w.uuid||"").toLowerCase(),C},"serialize")};Hr[eg.scheme]=eg,Hr[kB.scheme]=kB,Hr[tg.scheme]=tg,Hr[GB.scheme]=GB,Hr[HB.scheme]=HB,Hr[KB.scheme]=KB,Hr[WB.scheme]=WB,e.SCHEMES=Hr,e.pctEncChar=$n,e.pctDecChars=cp,e.parse=Ua,e.removeDotSegments=lp,e.serialize=No,e.resolveComponents=FB,e.resolve=Lpe,e.normalize=jpe,e.equal=Mpe,e.escapeComponent=Upe,e.unescapeComponent=xa,Object.defineProperty(e,"__esModule",{value:!0})})});var F7=h(fL=>{"use strict";Object.defineProperty(fL,"__esModule",{value:!0});var q7=tw();q7.code='require("ajv/dist/runtime/uri").default';fL.default=q7});var hL=h(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.CodeGen=Zr.Name=Zr.nil=Zr.stringify=Zr.str=Zr._=Zr.KeywordCxt=void 0;var u3e=Mh();Object.defineProperty(Zr,"KeywordCxt",{enumerable:!0,get:function(){return u3e.KeywordCxt}});var xh=Oe();Object.defineProperty(Zr,"_",{enumerable:!0,get:function(){return xh._}});Object.defineProperty(Zr,"str",{enumerable:!0,get:function(){return xh.str}});Object.defineProperty(Zr,"stringify",{enumerable:!0,get:function(){return xh.stringify}});Object.defineProperty(Zr,"nil",{enumerable:!0,get:function(){return xh.nil}});Object.defineProperty(Zr,"Name",{enumerable:!0,get:function(){return xh.Name}});Object.defineProperty(Zr,"CodeGen",{enumerable:!0,get:function(){return xh.CodeGen}});var c3e=Ny(),z7=Ay(),l3e=HD(),Cy=Ry(),f3e=Oe(),$y=wy(),rw=Py(),pL=Ve(),k7=U7(),d3e=F7(),H7=s((e,t)=>new RegExp(e,t),"defaultRegExp");H7.code="new RegExp";var p3e=["removeAdditional","useDefaults","coerceTypes"],h3e=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m3e={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_3e={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},B7=200;function g3e(e){var t,r,n,i,o,a,u,c,l,f,d,_,m,g,y,b,E,v,O,P,I,j,x,H,K;let Q=e.strict,de=(t=e.code)===null||t===void 0?void 0:t.optimize,re=de===!0||de===void 0?1:de||0,he=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:H7,$e=(i=e.uriResolver)!==null&&i!==void 0?i:d3e.default;return{strictSchema:(a=(o=e.strictSchema)!==null&&o!==void 0?o:Q)!==null&&a!==void 0?a:!0,strictNumbers:(c=(u=e.strictNumbers)!==null&&u!==void 0?u:Q)!==null&&c!==void 0?c:!0,strictTypes:(f=(l=e.strictTypes)!==null&&l!==void 0?l:Q)!==null&&f!==void 0?f:"log",strictTuples:(_=(d=e.strictTuples)!==null&&d!==void 0?d:Q)!==null&&_!==void 0?_:"log",strictRequired:(g=(m=e.strictRequired)!==null&&m!==void 0?m:Q)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:re,regExp:he}:{optimize:re,regExp:he},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:B7,loopEnum:(b=e.loopEnum)!==null&&b!==void 0?b:B7,meta:(E=e.meta)!==null&&E!==void 0?E:!0,messages:(v=e.messages)!==null&&v!==void 0?v:!0,inlineRefs:(O=e.inlineRefs)!==null&&O!==void 0?O:!0,schemaId:(P=e.schemaId)!==null&&P!==void 0?P:"$id",addUsedSchema:(I=e.addUsedSchema)!==null&&I!==void 0?I:!0,validateSchema:(j=e.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(x=e.validateFormats)!==null&&x!==void 0?x:!0,unicodeRegExp:(H=e.unicodeRegExp)!==null&&H!==void 0?H:!0,int32range:(K=e.int32range)!==null&&K!==void 0?K:!0,uriResolver:$e}}s(g3e,"requiredOptions");var Dy=class{static{s(this,"Ajv")}constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...g3e(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new f3e.ValueScope({scope:{},prefixes:h3e,es5:r,lines:n}),this.logger=O3e(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,l3e.getRules)(),G7.call(this,m3e,t,"NOT SUPPORTED"),G7.call(this,_3e,t,"DEPRECATED","warn"),this._metaOpts=S3e.call(this),t.formats&&E3e.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&b3e.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),y3e.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=k7;n==="id"&&(i={...k7},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,t,r);async function i(f,d){await o.call(this,f.$schema);let _=this._addSchema(f,d);return _.validate||a.call(this,_)}async function o(f){f&&!this.getSchema(f)&&await i.call(this,{$ref:f},!0)}async function a(f){try{return this._compileSchemaEnv(f)}catch(d){if(!(d instanceof z7.default))throw d;return u.call(this,d),await c.call(this,d.missingSchema),a.call(this,f)}}function u({missingSchema:f,missingRef:d}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${d} cannot be resolved`)}async function c(f){let d=await l.call(this,f);this.refs[f]||await o.call(this,d.$schema),this.refs[f]||this.addSchema(d,f,r)}async function l(f){let d=this._loading[f];if(d)return d;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,n,i);return this}let o;if(typeof t=="object"){let{schemaId:a}=this.opts;if(o=t[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,$y.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,t);if(!i&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(t){let r;for(;typeof(r=V7.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Cy.SchemaEnv({schema:{},schemaId:n});if(r=Cy.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=V7.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,$y.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(w3e.call(this,n,r),!r)return(0,pL.eachItem)(n,o=>dL.call(this,o)),this;T3e.call(this,r);let i={...r,type:(0,rw.getJSONTypes)(r.type),schemaType:(0,rw.getJSONTypes)(r.schemaType)};return(0,pL.eachItem)(n,i.type.length===0?o=>dL.call(this,o,i):o=>i.type.forEach(a=>dL.call(this,o,i,a))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let o=i.split("/").slice(1),a=t;for(let u of o)a=a[u];for(let u in n){let c=n[u];if(typeof c!="object")continue;let{$data:l}=c.definition,f=a[u];l&&f&&(a[u]=K7(f))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:u}=this.opts;if(typeof t=="object")a=t[u];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,$y.normalizeId)(a||n);let l=$y.getSchemaRefs.call(this,t,n);return c=new Cy.SchemaEnv({schema:t,schemaId:u,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Cy.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Cy.compileSchema.call(this,t)}finally{this.opts=r}}};Zr.default=Dy;Dy.ValidationError=c3e.default;Dy.MissingRefError=z7.default;function G7(e,t,r,n="error"){for(let i in e){let o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}s(G7,"checkOptions");function V7(e){return e=(0,$y.normalizeId)(e),this.schemas[e]||this.refs[e]}s(V7,"getSchEnv");function y3e(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}s(y3e,"addInitialSchemas");function E3e(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}s(E3e,"addInitialFormats");function b3e(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}s(b3e,"addInitialKeywords");function S3e(){let e={...this.opts};for(let t of p3e)delete e[t];return e}s(S3e,"getMetaSchemaOptions");var v3e={log(){},warn(){},error(){}};function O3e(e){if(e===!1)return v3e;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}s(O3e,"getLogger");var P3e=/^[a-z_$][a-z0-9_$:-]*$/i;function w3e(e,t){let{RULES:r}=this;if((0,pL.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!P3e.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}s(w3e,"checkKeyword");function dL(e,t,r){var n;let i=t?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[e]=!0,!t)return;let u={keyword:e,definition:{...t,type:(0,rw.getJSONTypes)(t.type),schemaType:(0,rw.getJSONTypes)(t.schemaType)}};t.before?I3e.call(this,a,u,t.before):a.rules.push(u),o.all[e]=u,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}s(dL,"addRule");function I3e(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}s(I3e,"addBeforeRule");function T3e(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=K7(t)),e.validateSchema=this.compile(t,!0))}s(T3e,"keywordMetaschema");var N3e={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function K7(e){return{anyOf:[e,N3e]}}s(K7,"schemaOrData")});var W7=h(mL=>{"use strict";Object.defineProperty(mL,"__esModule",{value:!0});var A3e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};mL.default=A3e});var sw=h(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});Qf.callRef=Qf.getValidate=void 0;var R3e=Ay(),Y7=ms(),Ei=Oe(),qh=hs(),J7=Ry(),nw=Ve(),C3e={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:o,validateName:a,opts:u,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return d();let f=J7.resolveRef.call(c,l,i,r);if(f===void 0)throw new R3e.default(n.opts.uriResolver,i,r);if(f instanceof J7.SchemaEnv)return _(f);return m(f);function d(){if(o===l)return iw(e,a,o,o.$async);let g=t.scopeValue("root",{ref:l});return iw(e,(0,Ei._)`${g}.validate`,l,l.$async)}function _(g){let y=X7(e,g);iw(e,y,g,g.$async)}function m(g){let y=t.scopeValue("schema",u.code.source===!0?{ref:g,code:(0,Ei.stringify)(g)}:{ref:g}),b=t.name("valid"),E=e.subschema({schema:g,dataTypes:[],schemaPath:Ei.nil,topSchemaRef:y,errSchemaPath:r},b);e.mergeEvaluated(E),e.ok(b)}}};function X7(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Ei._)`${r.scopeValue("wrapper",{ref:t})}.validate`}s(X7,"getValidate");Qf.getValidate=X7;function iw(e,t,r,n){let{gen:i,it:o}=e,{allErrors:a,schemaEnv:u,opts:c}=o,l=c.passContext?qh.default.this:Ei.nil;n?f():d();function f(){if(!u.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,Ei._)`await ${(0,Y7.callValidateCode)(e,t,l)}`),m(t),a||i.assign(g,!0)},y=>{i.if((0,Ei._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),_(y),a||i.assign(g,!1)}),e.ok(g)}s(f,"callAsyncRef");function d(){e.result((0,Y7.callValidateCode)(e,t,l),()=>m(t),()=>_(t))}s(d,"callSyncRef");function _(g){let y=(0,Ei._)`${g}.errors`;i.assign(qh.default.vErrors,(0,Ei._)`${qh.default.vErrors} === null ? ${y} : ${qh.default.vErrors}.concat(${y})`),i.assign(qh.default.errors,(0,Ei._)`${qh.default.vErrors}.length`)}s(_,"addErrorsFrom");function m(g){var y;if(!o.opts.unevaluated)return;let b=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(b&&!b.dynamicProps)b.props!==void 0&&(o.props=nw.mergeEvaluated.props(i,b.props,o.props));else{let E=i.var("props",(0,Ei._)`${g}.evaluated.props`);o.props=nw.mergeEvaluated.props(i,E,o.props,Ei.Name)}if(o.items!==!0)if(b&&!b.dynamicItems)b.items!==void 0&&(o.items=nw.mergeEvaluated.items(i,b.items,o.items));else{let E=i.var("items",(0,Ei._)`${g}.evaluated.items`);o.items=nw.mergeEvaluated.items(i,E,o.items,Ei.Name)}}s(m,"addEvaluatedFrom")}s(iw,"callRef");Qf.callRef=iw;Qf.default=C3e});var gL=h(_L=>{"use strict";Object.defineProperty(_L,"__esModule",{value:!0});var $3e=W7(),D3e=sw(),L3e=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",$3e.default,D3e.default];_L.default=L3e});var Z7=h(yL=>{"use strict";Object.defineProperty(yL,"__esModule",{value:!0});var ow=Oe(),vc=ow.operators,aw={maximum:{okStr:"<=",ok:vc.LTE,fail:vc.GT},minimum:{okStr:">=",ok:vc.GTE,fail:vc.LT},exclusiveMaximum:{okStr:"<",ok:vc.LT,fail:vc.GTE},exclusiveMinimum:{okStr:">",ok:vc.GT,fail:vc.LTE}},j3e={message:({keyword:e,schemaCode:t})=>(0,ow.str)`must be ${aw[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,ow._)`{comparison: ${aw[e].okStr}, limit: ${t}}`},M3e={keyword:Object.keys(aw),type:"number",schemaType:"number",$data:!0,error:j3e,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,ow._)`${r} ${aw[t].fail} ${n} || isNaN(${r})`)}};yL.default=M3e});var Q7=h(EL=>{"use strict";Object.defineProperty(EL,"__esModule",{value:!0});var Ly=Oe(),U3e={message:({schemaCode:e})=>(0,Ly.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Ly._)`{multipleOf: ${e}}`},x3e={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:U3e,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,o=i.opts.multipleOfPrecision,a=t.let("res"),u=o?(0,Ly._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,Ly._)`${a} !== parseInt(${a})`;e.fail$data((0,Ly._)`(${n} === 0 || (${a} = ${r}/${n}, ${u}))`)}};EL.default=x3e});var tW=h(bL=>{"use strict";Object.defineProperty(bL,"__esModule",{value:!0});function eW(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}s(eW,"ucs2length");bL.default=eW;eW.code='require("ajv/dist/runtime/ucs2length").default'});var rW=h(SL=>{"use strict";Object.defineProperty(SL,"__esModule",{value:!0});var ed=Oe(),q3e=Ve(),F3e=tW(),k3e={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,ed.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,ed._)`{limit: ${e}}`},B3e={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:k3e,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,o=t==="maxLength"?ed.operators.GT:ed.operators.LT,a=i.opts.unicode===!1?(0,ed._)`${r}.length`:(0,ed._)`${(0,q3e.useFunc)(e.gen,F3e.default)}(${r})`;e.fail$data((0,ed._)`${a} ${o} ${n}`)}};SL.default=B3e});var nW=h(vL=>{"use strict";Object.defineProperty(vL,"__esModule",{value:!0});var G3e=ms(),uw=Oe(),V3e={message:({schemaCode:e})=>(0,uw.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,uw._)`{pattern: ${e}}`},z3e={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:V3e,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:o}=e,a=o.opts.unicodeRegExp?"u":"",u=r?(0,uw._)`(new RegExp(${i}, ${a}))`:(0,G3e.usePattern)(e,n);e.fail$data((0,uw._)`!${u}.test(${t})`)}};vL.default=z3e});var iW=h(OL=>{"use strict";Object.defineProperty(OL,"__esModule",{value:!0});var jy=Oe(),H3e={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,jy.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,jy._)`{limit: ${e}}`},K3e={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:H3e,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?jy.operators.GT:jy.operators.LT;e.fail$data((0,jy._)`Object.keys(${r}).length ${i} ${n}`)}};OL.default=K3e});var sW=h(PL=>{"use strict";Object.defineProperty(PL,"__esModule",{value:!0});var My=ms(),Uy=Oe(),W3e=Ve(),Y3e={message:({params:{missingProperty:e}})=>(0,Uy.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Uy._)`{missingProperty: ${e}}`},J3e={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Y3e,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:o,it:a}=e,{opts:u}=a;if(!o&&r.length===0)return;let c=r.length>=u.loopRequired;if(a.allErrors?l():f(),u.strictRequired){let m=e.parentSchema.properties,{definedProperties:g}=e.it;for(let y of r)if(m?.[y]===void 0&&!g.has(y)){let b=a.schemaEnv.baseId+a.errSchemaPath,E=`required property "${y}" is not defined at "${b}" (strictRequired)`;(0,W3e.checkStrictMode)(a,E,a.opts.strictRequired)}}function l(){if(c||o)e.block$data(Uy.nil,d);else for(let m of r)(0,My.checkReportMissingProp)(e,m)}s(l,"allErrorsMode");function f(){let m=t.let("missing");if(c||o){let g=t.let("valid",!0);e.block$data(g,()=>_(m,g)),e.ok(g)}else t.if((0,My.checkMissingProp)(e,r,m)),(0,My.reportMissingProp)(e,m),t.else()}s(f,"exitOnErrorMode");function d(){t.forOf("prop",n,m=>{e.setParams({missingProperty:m}),t.if((0,My.noPropertyInData)(t,i,m,u.ownProperties),()=>e.error())})}s(d,"loopAllRequired");function _(m,g){e.setParams({missingProperty:m}),t.forOf(m,n,()=>{t.assign(g,(0,My.propertyInData)(t,i,m,u.ownProperties)),t.if((0,Uy.not)(g),()=>{e.error(),t.break()})},Uy.nil)}s(_,"loopUntilMissing")}};PL.default=J3e});var oW=h(wL=>{"use strict";Object.defineProperty(wL,"__esModule",{value:!0});var xy=Oe(),X3e={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,xy.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,xy._)`{limit: ${e}}`},Z3e={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:X3e,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?xy.operators.GT:xy.operators.LT;e.fail$data((0,xy._)`${r}.length ${i} ${n}`)}};wL.default=Z3e});var cw=h(IL=>{"use strict";Object.defineProperty(IL,"__esModule",{value:!0});var aW=Xf();aW.code='require("ajv/dist/runtime/equal").default';IL.default=aW});var uW=h(NL=>{"use strict";Object.defineProperty(NL,"__esModule",{value:!0});var TL=Py(),Qr=Oe(),Q3e=Ve(),e4e=cw(),t4e={message:({params:{i:e,j:t}})=>(0,Qr.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Qr._)`{i: ${e}, j: ${t}}`},r4e={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:t4e,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:u}=e;if(!n&&!i)return;let c=t.let("valid"),l=o.items?(0,TL.getSchemaTypes)(o.items):[];e.block$data(c,f,(0,Qr._)`${a} === false`),e.ok(c);function f(){let g=t.let("i",(0,Qr._)`${r}.length`),y=t.let("j");e.setParams({i:g,j:y}),t.assign(c,!0),t.if((0,Qr._)`${g} > 1`,()=>(d()?_:m)(g,y))}s(f,"validateUniqueItems");function d(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}s(d,"canOptimize");function _(g,y){let b=t.name("item"),E=(0,TL.checkDataTypes)(l,b,u.opts.strictNumbers,TL.DataType.Wrong),v=t.const("indices",(0,Qr._)`{}`);t.for((0,Qr._)`;${g}--;`,()=>{t.let(b,(0,Qr._)`${r}[${g}]`),t.if(E,(0,Qr._)`continue`),l.length>1&&t.if((0,Qr._)`typeof ${b} == "string"`,(0,Qr._)`${b} += "_"`),t.if((0,Qr._)`typeof ${v}[${b}] == "number"`,()=>{t.assign(y,(0,Qr._)`${v}[${b}]`),e.error(),t.assign(c,!1).break()}).code((0,Qr._)`${v}[${b}] = ${g}`)})}s(_,"loopN");function m(g,y){let b=(0,Q3e.useFunc)(t,e4e.default),E=t.name("outer");t.label(E).for((0,Qr._)`;${g}--;`,()=>t.for((0,Qr._)`${y} = ${g}; ${y}--;`,()=>t.if((0,Qr._)`${b}(${r}[${g}], ${r}[${y}])`,()=>{e.error(),t.assign(c,!1).break(E)})))}s(m,"loopN2")}};NL.default=r4e});var cW=h(RL=>{"use strict";Object.defineProperty(RL,"__esModule",{value:!0});var AL=Oe(),n4e=Ve(),i4e=cw(),s4e={message:"must be equal to constant",params:({schemaCode:e})=>(0,AL._)`{allowedValue: ${e}}`},o4e={keyword:"const",$data:!0,error:s4e,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:o}=e;n||o&&typeof o=="object"?e.fail$data((0,AL._)`!${(0,n4e.useFunc)(t,i4e.default)}(${r}, ${i})`):e.fail((0,AL._)`${o} !== ${r}`)}};RL.default=o4e});var lW=h(CL=>{"use strict";Object.defineProperty(CL,"__esModule",{value:!0});var qy=Oe(),a4e=Ve(),u4e=cw(),c4e={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,qy._)`{allowedValues: ${e}}`},l4e={keyword:"enum",schemaType:"array",$data:!0,error:c4e,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:a}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let u=i.length>=a.opts.loopEnum,c,l=s(()=>c??(c=(0,a4e.useFunc)(t,u4e.default)),"getEql"),f;if(u||n)f=t.let("valid"),e.block$data(f,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=t.const("vSchema",o);f=(0,qy.or)(...i.map((g,y)=>_(m,y)))}e.pass(f);function d(){t.assign(f,!1),t.forOf("v",o,m=>t.if((0,qy._)`${l()}(${r}, ${m})`,()=>t.assign(f,!0).break()))}s(d,"loopEnum");function _(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,qy._)`${l()}(${r}, ${m}[${g}])`:(0,qy._)`${r} === ${y}`}s(_,"equalCode")}};CL.default=l4e});var DL=h($L=>{"use strict";Object.defineProperty($L,"__esModule",{value:!0});var f4e=Z7(),d4e=Q7(),p4e=rW(),h4e=nW(),m4e=iW(),_4e=sW(),g4e=oW(),y4e=uW(),E4e=cW(),b4e=lW(),S4e=[f4e.default,d4e.default,p4e.default,h4e.default,m4e.default,_4e.default,g4e.default,y4e.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},E4e.default,b4e.default];$L.default=S4e});var jL=h(Fy=>{"use strict";Object.defineProperty(Fy,"__esModule",{value:!0});Fy.validateAdditionalItems=void 0;var td=Oe(),LL=Ve(),v4e={message:({params:{len:e}})=>(0,td.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,td._)`{limit: ${e}}`},O4e={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:v4e,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,LL.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}fW(e,n)}};function fW(e,t){let{gen:r,schema:n,data:i,keyword:o,it:a}=e;a.items=!0;let u=r.const("len",(0,td._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,td._)`${u} <= ${t.length}`);else if(typeof n=="object"&&!(0,LL.alwaysValidSchema)(a,n)){let l=r.var("valid",(0,td._)`${u} <= ${t.length}`);r.if((0,td.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,u,f=>{e.subschema({keyword:o,dataProp:f,dataPropType:LL.Type.Num},l),a.allErrors||r.if((0,td.not)(l),()=>r.break())})}s(c,"validateItems")}s(fW,"validateAdditionalItems");Fy.validateAdditionalItems=fW;Fy.default=O4e});var ML=h(ky=>{"use strict";Object.defineProperty(ky,"__esModule",{value:!0});ky.validateTuple=void 0;var dW=Oe(),lw=Ve(),P4e=ms(),w4e={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return pW(e,"additionalItems",t);r.items=!0,!(0,lw.alwaysValidSchema)(r,t)&&e.ok((0,P4e.validateArray)(e))}};function pW(e,t,r=e.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:u}=e;f(i),u.opts.unevaluated&&r.length&&u.items!==!0&&(u.items=lw.mergeEvaluated.items(n,r.length,u.items));let c=n.name("valid"),l=n.const("len",(0,dW._)`${o}.length`);r.forEach((d,_)=>{(0,lw.alwaysValidSchema)(u,d)||(n.if((0,dW._)`${l} > ${_}`,()=>e.subschema({keyword:a,schemaProp:_,dataProp:_},c)),e.ok(c))});function f(d){let{opts:_,errSchemaPath:m}=u,g=r.length,y=g===d.minItems&&(g===d.maxItems||d[t]===!1);if(_.strictTuples&&!y){let b=`"${a}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,lw.checkStrictMode)(u,b,_.strictTuples)}}s(f,"checkStrictTuple")}s(pW,"validateTuple");ky.validateTuple=pW;ky.default=w4e});var hW=h(UL=>{"use strict";Object.defineProperty(UL,"__esModule",{value:!0});var I4e=ML(),T4e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,I4e.validateTuple)(e,"items")};UL.default=T4e});var _W=h(xL=>{"use strict";Object.defineProperty(xL,"__esModule",{value:!0});var mW=Oe(),N4e=Ve(),A4e=ms(),R4e=jL(),C4e={message:({params:{len:e}})=>(0,mW.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,mW._)`{limit: ${e}}`},$4e={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:C4e,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,N4e.alwaysValidSchema)(n,t)&&(i?(0,R4e.validateAdditionalItems)(e,i):e.ok((0,A4e.validateArray)(e)))}};xL.default=$4e});var gW=h(qL=>{"use strict";Object.defineProperty(qL,"__esModule",{value:!0});var gs=Oe(),fw=Ve(),D4e={message:({params:{min:e,max:t}})=>t===void 0?(0,gs.str)`must contain at least ${e} valid item(s)`:(0,gs.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,gs._)`{minContains: ${e}}`:(0,gs._)`{minContains: ${e}, maxContains: ${t}}`},L4e={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:D4e,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e,a,u,{minContains:c,maxContains:l}=n;o.opts.next?(a=c===void 0?1:c,u=l):a=1;let f=t.const("len",(0,gs._)`${i}.length`);if(e.setParams({min:a,max:u}),u===void 0&&a===0){(0,fw.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&a>u){(0,fw.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,fw.alwaysValidSchema)(o,r)){let y=(0,gs._)`${f} >= ${a}`;u!==void 0&&(y=(0,gs._)`${y} && ${f} <= ${u}`),e.pass(y);return}o.items=!0;let d=t.name("valid");u===void 0&&a===1?m(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),u!==void 0&&t.if((0,gs._)`${i}.length > 0`,_)):(t.let(d,!1),_()),e.result(d,()=>e.reset());function _(){let y=t.name("_valid"),b=t.let("count",0);m(y,()=>t.if(y,()=>g(b)))}s(_,"validateItemsWithCount");function m(y,b){t.forRange("i",0,f,E=>{e.subschema({keyword:"contains",dataProp:E,dataPropType:fw.Type.Num,compositeRule:!0},y),b()})}s(m,"validateItems");function g(y){t.code((0,gs._)`${y}++`),u===void 0?t.if((0,gs._)`${y} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,gs._)`${y} > ${u}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,gs._)`${y} >= ${a}`,()=>t.assign(d,!0)))}s(g,"checkLimits")}};qL.default=L4e});var dw=h(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.validateSchemaDeps=ia.validatePropertyDeps=ia.error=void 0;var FL=Oe(),j4e=Ve(),By=ms();ia.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,FL.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,FL._)`{property: ${e},
139
139
  missingProperty: ${n},
140
140
  depsCount: ${t},
141
- deps: ${r}}`};var M4e={keyword:"dependencies",type:"object",schemaType:"object",error:ia.error,code(e){let[t,r]=U4e(e);yW(e,t),EW(e,r)}};function U4e({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}s(U4e,"splitDependencies");function yW(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let a in t){let u=t[a];if(u.length===0)continue;let c=(0,By.propertyInData)(r,n,a,i.opts.ownProperties);e.setParams({property:a,depsCount:u.length,deps:u.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of u)(0,By.checkReportMissingProp)(e,l)}):(r.if((0,FL._)`${c} && (${(0,By.checkMissingProp)(e,u,o)})`),(0,By.reportMissingProp)(e,o),r.else())}}s(yW,"validatePropertyDeps");ia.validatePropertyDeps=yW;function EW(e,t=e.schema){let{gen:r,data:n,keyword:i,it:o}=e,a=r.name("valid");for(let u in t)(0,j4e.alwaysValidSchema)(o,t[u])||(r.if((0,By.propertyInData)(r,n,u,o.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:u},a);e.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),e.ok(a))}s(EW,"validateSchemaDeps");ia.validateSchemaDeps=EW;ia.default=M4e});var SW=h(kL=>{"use strict";Object.defineProperty(kL,"__esModule",{value:!0});var bW=Oe(),x4e=Ve(),q4e={message:"property name must be valid",params:({params:e})=>(0,bW._)`{propertyName: ${e.propertyName}}`},F4e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:q4e,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,x4e.alwaysValidSchema)(i,r))return;let o=t.name("valid");t.forIn("key",n,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,bW.not)(o),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(o)}};kL.default=F4e});var GL=h(BL=>{"use strict";Object.defineProperty(BL,"__esModule",{value:!0});var pw=ms(),uo=Oe(),k4e=hs(),hw=Ve(),B4e={message:"must NOT have additional properties",params:({params:e})=>(0,uo._)`{additionalProperty: ${e.additionalProperty}}`},G4e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:B4e,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=e;if(!o)throw new Error("ajv implementation error");let{allErrors:u,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,hw.alwaysValidSchema)(a,r))return;let l=(0,pw.allSchemaProperties)(n.properties),f=(0,pw.allSchemaProperties)(n.patternProperties);d(),e.ok((0,uo._)`${o} === ${k4e.default.errors}`);function d(){t.forIn("key",i,b=>{!l.length&&!f.length?g(b):t.if(_(b),()=>g(b))})}s(d,"checkAdditionalProperties");function _(b){let E;if(l.length>8){let S=(0,hw.schemaRefOrVal)(a,n.properties,"properties");E=(0,pw.isOwnProperty)(t,S,b)}else l.length?E=(0,uo.or)(...l.map(S=>(0,uo._)`${b} === ${S}`)):E=uo.nil;return f.length&&(E=(0,uo.or)(E,...f.map(S=>(0,uo._)`${(0,pw.usePattern)(e,S)}.test(${b})`))),(0,uo.not)(E)}s(_,"isAdditional");function m(b){t.code((0,uo._)`delete ${i}[${b}]`)}s(m,"deleteAdditional");function g(b){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(b);return}if(r===!1){e.setParams({additionalProperty:b}),e.error(),u||t.break();return}if(typeof r=="object"&&!(0,hw.alwaysValidSchema)(a,r)){let E=t.name("valid");c.removeAdditional==="failing"?(y(b,E,!1),t.if((0,uo.not)(E),()=>{e.reset(),m(b)})):(y(b,E),u||t.if((0,uo.not)(E),()=>t.break()))}}s(g,"additionalPropertyCode");function y(b,E,S){let O={keyword:"additionalProperties",dataProp:b,dataPropType:hw.Type.Str};S===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(O,E)}s(y,"applyAdditionalSchema")}};BL.default=G4e});var PW=h(zL=>{"use strict";Object.defineProperty(zL,"__esModule",{value:!0});var V4e=Mh(),vW=ms(),VL=Ve(),OW=GL(),z4e={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&OW.default.code(new V4e.KeywordCxt(o,OW.default,"additionalProperties"));let a=(0,vW.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=VL.mergeEvaluated.props(t,(0,VL.toHash)(a),o.props));let u=a.filter(d=>!(0,VL.alwaysValidSchema)(o,r[d]));if(u.length===0)return;let c=t.name("valid");for(let d of u)l(d)?f(d):(t.if((0,vW.propertyInData)(t,i,d,o.opts.ownProperties)),f(d),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function l(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}s(l,"hasDefault");function f(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}s(f,"applyPropertySchema")}};zL.default=z4e});var NW=h(HL=>{"use strict";Object.defineProperty(HL,"__esModule",{value:!0});var wW=ms(),mw=Oe(),IW=Ve(),TW=Ve(),H4e={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:o}=e,{opts:a}=o,u=(0,wW.allSchemaProperties)(r),c=u.filter(y=>(0,IW.alwaysValidSchema)(o,r[y]));if(u.length===0||c.length===u.length&&(!o.opts.unevaluated||o.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,f=t.name("valid");o.props!==!0&&!(o.props instanceof mw.Name)&&(o.props=(0,TW.evaluatedPropsToName)(t,o.props));let{props:d}=o;_();function _(){for(let y of u)l&&m(y),o.allErrors?g(y):(t.var(f,!0),g(y),t.if(f))}s(_,"validatePatternProperties");function m(y){for(let b in l)new RegExp(y).test(b)&&(0,IW.checkStrictMode)(o,`property ${b} matches pattern ${y} (use allowMatchingProperties)`)}s(m,"checkMatchingProperties");function g(y){t.forIn("key",n,b=>{t.if((0,mw._)`${(0,wW.usePattern)(e,y)}.test(${b})`,()=>{let E=c.includes(y);E||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:b,dataPropType:TW.Type.Str},f),o.opts.unevaluated&&d!==!0?t.assign((0,mw._)`${d}[${b}]`,!0):!E&&!o.allErrors&&t.if((0,mw.not)(f),()=>t.break())})})}s(g,"validateProperties")}};HL.default=H4e});var AW=h(KL=>{"use strict";Object.defineProperty(KL,"__esModule",{value:!0});var K4e=Ve(),W4e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,K4e.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};KL.default=W4e});var RW=h(WL=>{"use strict";Object.defineProperty(WL,"__esModule",{value:!0});var Y4e=ms(),J4e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Y4e.validateUnion,error:{message:"must match a schema in anyOf"}};WL.default=J4e});var CW=h(YL=>{"use strict";Object.defineProperty(YL,"__esModule",{value:!0});var _w=Oe(),X4e=Ve(),Z4e={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,_w._)`{passingSchemas: ${e.passing}}`},Q4e={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Z4e,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=t.let("valid",!1),u=t.let("passing",null),c=t.name("_valid");e.setParams({passing:u}),t.block(l),e.result(a,()=>e.reset(),()=>e.error(!0));function l(){o.forEach((f,d)=>{let _;(0,X4e.alwaysValidSchema)(i,f)?t.var(c,!0):_=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,_w._)`${c} && ${a}`).assign(a,!1).assign(u,(0,_w._)`[${u}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(u,d),_&&e.mergeEvaluated(_,_w.Name)})})}s(l,"validateOneOf")}};YL.default=Q4e});var $W=h(JL=>{"use strict";Object.defineProperty(JL,"__esModule",{value:!0});var eGe=Ve(),tGe={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((o,a)=>{if((0,eGe.alwaysValidSchema)(n,o))return;let u=e.subschema({keyword:"allOf",schemaProp:a},i);e.ok(i),e.mergeEvaluated(u)})}};JL.default=tGe});var jW=h(XL=>{"use strict";Object.defineProperty(XL,"__esModule",{value:!0});var gw=Oe(),LW=Ve(),rGe={message:({params:e})=>(0,gw.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,gw._)`{failingKeyword: ${e.ifClause}}`},nGe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:rGe,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,LW.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=DW(n,"then"),o=DW(n,"else");if(!i&&!o)return;let a=t.let("valid",!0),u=t.name("_valid");if(c(),e.reset(),i&&o){let f=t.let("ifClause");e.setParams({ifClause:f}),t.if(u,l("then",f),l("else",f))}else i?t.if(u,l("then")):t.if((0,gw.not)(u),l("else"));e.pass(a,()=>e.error(!0));function c(){let f=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(f)}s(c,"validateIf");function l(f,d){return()=>{let _=e.subschema({keyword:f},u);t.assign(a,u),e.mergeValidEvaluated(_,a),d?t.assign(d,(0,gw._)`${f}`):e.setParams({ifClause:f})}}s(l,"validateClause")}};function DW(e,t){let r=e.schema[t];return r!==void 0&&!(0,LW.alwaysValidSchema)(e,r)}s(DW,"hasSchema");XL.default=nGe});var MW=h(ZL=>{"use strict";Object.defineProperty(ZL,"__esModule",{value:!0});var iGe=Ve(),sGe={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,iGe.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};ZL.default=sGe});var ej=h(QL=>{"use strict";Object.defineProperty(QL,"__esModule",{value:!0});var oGe=jL(),aGe=hW(),uGe=ML(),cGe=_W(),lGe=gW(),fGe=dw(),dGe=SW(),pGe=GL(),hGe=PW(),mGe=NW(),_Ge=AW(),gGe=RW(),yGe=CW(),EGe=$W(),bGe=jW(),SGe=MW();function vGe(e=!1){let t=[_Ge.default,gGe.default,yGe.default,EGe.default,bGe.default,SGe.default,dGe.default,pGe.default,fGe.default,hGe.default,mGe.default];return e?t.push(aGe.default,cGe.default):t.push(oGe.default,uGe.default),t.push(lGe.default),t}s(vGe,"getApplicator");QL.default=vGe});var UW=h(tj=>{"use strict";Object.defineProperty(tj,"__esModule",{value:!0});var pr=Oe(),OGe={message:({schemaCode:e})=>(0,pr.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,pr._)`{format: ${e}}`},PGe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:OGe,code(e,t){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:d}=u;if(!c.validateFormats)return;i?_():m();function _(){let g=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),y=r.const("fDef",(0,pr._)`${g}[${a}]`),b=r.let("fType"),E=r.let("format");r.if((0,pr._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(b,(0,pr._)`${y}.type || "string"`).assign(E,(0,pr._)`${y}.validate`),()=>r.assign(b,(0,pr._)`"string"`).assign(E,y)),e.fail$data((0,pr.or)(S(),O()));function S(){return c.strictSchema===!1?pr.nil:(0,pr._)`${a} && !${E}`}s(S,"unknownFmt");function O(){let P=f.$async?(0,pr._)`(${y}.async ? await ${E}(${n}) : ${E}(${n}))`:(0,pr._)`${E}(${n})`,I=(0,pr._)`(typeof ${E} == "function" ? ${P} : ${E}.test(${n}))`;return(0,pr._)`${E} && ${E} !== true && ${b} === ${t} && !${I}`}s(O,"invalidFmt")}s(_,"validate$DataFormat");function m(){let g=d.formats[o];if(!g){S();return}if(g===!0)return;let[y,b,E]=O(g);y===t&&e.pass(P());function S(){if(c.strictSchema===!1){d.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${o}" ignored in schema at path "${l}"`}}s(S,"unknownFormat");function O(I){let j=I instanceof RegExp?(0,pr.regexpCode)(I):c.code.formats?(0,pr._)`${c.code.formats}${(0,pr.getProperty)(o)}`:void 0,x=r.scopeValue("formats",{key:o,ref:I,code:j});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,pr._)`${x}.validate`]:["string",I,x]}s(O,"getFormat");function P(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,pr._)`await ${E}(${n})`}return typeof b=="function"?(0,pr._)`${E}(${n})`:(0,pr._)`${E}.test(${n})`}s(P,"validCondition")}s(m,"validateFormat")}};tj.default=PGe});var nj=h(rj=>{"use strict";Object.defineProperty(rj,"__esModule",{value:!0});var wGe=UW(),IGe=[wGe.default];rj.default=IGe});var ij=h(Fh=>{"use strict";Object.defineProperty(Fh,"__esModule",{value:!0});Fh.contentVocabulary=Fh.metadataVocabulary=void 0;Fh.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Fh.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var qW=h(sj=>{"use strict";Object.defineProperty(sj,"__esModule",{value:!0});var TGe=gL(),NGe=DL(),AGe=ej(),RGe=nj(),xW=ij(),CGe=[TGe.default,NGe.default,(0,AGe.default)(),RGe.default,xW.metadataVocabulary,xW.contentVocabulary];sj.default=CGe});var FW=h(Gy=>{"use strict";Object.defineProperty(Gy,"__esModule",{value:!0});Gy.DiscrError=void 0;var $Ge;(function(e){e.Tag="tag",e.Mapping="mapping"})($Ge=Gy.DiscrError||(Gy.DiscrError={}))});var uj=h(aj=>{"use strict";Object.defineProperty(aj,"__esModule",{value:!0});var kh=Oe(),oj=FW(),kW=Ry(),DGe=Ve(),LGe={message:({params:{discrError:e,tagName:t}})=>e===oj.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,kh._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},jGe={keyword:"discriminator",type:"object",schemaType:"object",error:LGe,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:o}=e,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let u=n.propertyName;if(typeof u!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",(0,kh._)`${r}${(0,kh.getProperty)(u)}`);t.if((0,kh._)`typeof ${l} == "string"`,()=>f(),()=>e.error(!1,{discrError:oj.DiscrError.Tag,tag:l,tagName:u})),e.ok(c);function f(){let m=_();t.if(!1);for(let g in m)t.elseIf((0,kh._)`${l} === ${g}`),t.assign(c,d(m[g]));t.else(),e.error(!1,{discrError:oj.DiscrError.Mapping,tag:l,tagName:u}),t.endIf()}s(f,"validateMapping");function d(m){let g=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:m},g);return e.mergeEvaluated(y,kh.Name),g}s(d,"applyTagSchema");function _(){var m;let g={},y=E(i),b=!0;for(let P=0;P<a.length;P++){let I=a[P];I?.$ref&&!(0,DGe.schemaHasRulesButRef)(I,o.self.RULES)&&(I=kW.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,I?.$ref),I instanceof kW.SchemaEnv&&(I=I.schema));let j=(m=I?.properties)===null||m===void 0?void 0:m[u];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);b=b&&(y||E(I)),S(j,P)}if(!b)throw new Error(`discriminator: "${u}" must be required`);return g;function E({required:P}){return Array.isArray(P)&&P.includes(u)}function S(P,I){if(P.const)O(P.const,I);else if(P.enum)for(let j of P.enum)O(j,I);else throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`)}function O(P,I){if(typeof P!="string"||P in g)throw new Error(`discriminator: "${u}" values must be unique strings`);g[P]=I}}s(_,"getMapping")}};aj.default=jGe});var BW=h((uRt,MGe)=>{MGe.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var zW=h((tr,VW)=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.MissingRefError=tr.ValidationError=tr.CodeGen=tr.Name=tr.nil=tr.stringify=tr.str=tr._=tr.KeywordCxt=void 0;var UGe=hL(),xGe=qW(),qGe=uj(),GW=BW(),FGe=["/properties"],yw="http://json-schema.org/draft-07/schema",Ew=class extends UGe.default{static{s(this,"Ajv")}_addVocabularies(){super._addVocabularies(),xGe.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(qGe.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(GW,FGe):GW;this.addMetaSchema(t,yw,!1),this.refs["http://json-schema.org/schema"]=yw}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(yw)?yw:void 0)}};VW.exports=tr=Ew;Object.defineProperty(tr,"__esModule",{value:!0});tr.default=Ew;var kGe=Mh();Object.defineProperty(tr,"KeywordCxt",{enumerable:!0,get:function(){return kGe.KeywordCxt}});var Bh=Oe();Object.defineProperty(tr,"_",{enumerable:!0,get:function(){return Bh._}});Object.defineProperty(tr,"str",{enumerable:!0,get:function(){return Bh.str}});Object.defineProperty(tr,"stringify",{enumerable:!0,get:function(){return Bh.stringify}});Object.defineProperty(tr,"nil",{enumerable:!0,get:function(){return Bh.nil}});Object.defineProperty(tr,"Name",{enumerable:!0,get:function(){return Bh.Name}});Object.defineProperty(tr,"CodeGen",{enumerable:!0,get:function(){return Bh.CodeGen}});var BGe=Ny();Object.defineProperty(tr,"ValidationError",{enumerable:!0,get:function(){return BGe.default}});var GGe=Ay();Object.defineProperty(tr,"MissingRefError",{enumerable:!0,get:function(){return GGe.default}})});var XW=h(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.formatNames=sa.fastFormats=sa.fullFormats=void 0;function Gh(e,t){return{validate:e,compare:t}}s(Gh,"fmtDef");sa.fullFormats={date:Gh(WW,fj),time:Gh(YW,dj),"date-time":Gh(KGe,JW),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:JGe,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:n6e,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:XGe,int32:{type:"number",validate:e6e},int64:{type:"number",validate:t6e},float:{type:"number",validate:KW},double:{type:"number",validate:KW},password:!0,binary:!0};sa.fastFormats={...sa.fullFormats,date:Gh(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,fj),time:Gh(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,dj),"date-time":Gh(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,JW),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};sa.formatNames=Object.keys(sa.fullFormats);function VGe(e){return e%4===0&&(e%100!==0||e%400===0)}s(VGe,"isLeapYear");var zGe=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,HGe=[0,31,28,31,30,31,30,31,31,30,31,30,31];function WW(e){let t=zGe.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&VGe(r)?29:HGe[n])}s(WW,"date");function fj(e,t){if(e&&t)return e>t?1:e<t?-1:0}s(fj,"compareDate");var cj=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function YW(e,t){let r=cj.exec(e);if(!r)return!1;let n=+r[1],i=+r[2],o=+r[3],a=r[5];return(n<=23&&i<=59&&o<=59||n===23&&i===59&&o===60)&&(!t||a!=="")}s(YW,"time");function dj(e,t){if(!(e&&t))return;let r=cj.exec(e),n=cj.exec(t);if(r&&n)return e=r[1]+r[2]+r[3]+(r[4]||""),t=n[1]+n[2]+n[3]+(n[4]||""),e>t?1:e<t?-1:0}s(dj,"compareTime");var lj=/t|\s/i;function KGe(e){let t=e.split(lj);return t.length===2&&WW(t[0])&&YW(t[1],!0)}s(KGe,"date_time");function JW(e,t){if(!(e&&t))return;let[r,n]=e.split(lj),[i,o]=t.split(lj),a=fj(r,i);if(a!==void 0)return a||dj(n,o)}s(JW,"compareDateTime");var WGe=/\/|:/,YGe=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function JGe(e){return WGe.test(e)&&YGe.test(e)}s(JGe,"uri");var HW=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function XGe(e){return HW.lastIndex=0,HW.test(e)}s(XGe,"byte");var ZGe=-(2**31),QGe=2**31-1;function e6e(e){return Number.isInteger(e)&&e<=QGe&&e>=ZGe}s(e6e,"validateInt32");function t6e(e){return Number.isInteger(e)}s(t6e,"validateInt64");function KW(){return!0}s(KW,"validateNumber");var r6e=/[^\\]\\Z/;function n6e(e){if(r6e.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}s(n6e,"regex")});var Hy=h(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.regexpCode=dt.getEsmExportName=dt.getProperty=dt.safeStringify=dt.stringify=dt.strConcat=dt.addCodeArg=dt.str=dt._=dt.nil=dt._Code=dt.Name=dt.IDENTIFIER=dt._CodeOrName=void 0;var Vy=class{static{s(this,"_CodeOrName")}};dt._CodeOrName=Vy;dt.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var rd=class extends Vy{static{s(this,"Name")}constructor(t){if(super(),!dt.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};dt.Name=rd;var ys=class extends Vy{static{s(this,"_Code")}constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof rd&&(r[n.str]=(r[n.str]||0)+1),r),{})}};dt._Code=ys;dt.nil=new ys("");function ZW(e,...t){let r=[e[0]],n=0;for(;n<t.length;)hj(r,t[n]),r.push(e[++n]);return new ys(r)}s(ZW,"_");dt._=ZW;var pj=new ys("+");function QW(e,...t){let r=[zy(e[0])],n=0;for(;n<t.length;)r.push(pj),hj(r,t[n]),r.push(pj,zy(e[++n]));return i6e(r),new ys(r)}s(QW,"str");dt.str=QW;function hj(e,t){t instanceof ys?e.push(...t._items):t instanceof rd?e.push(t):e.push(a6e(t))}s(hj,"addCodeArg");dt.addCodeArg=hj;function i6e(e){let t=1;for(;t<e.length-1;){if(e[t]===pj){let r=s6e(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}s(i6e,"optimize");function s6e(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof rd||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof rd))return`"${e}${t.slice(1)}`}s(s6e,"mergeExprItems");function o6e(e,t){return t.emptyStr()?e:e.emptyStr()?t:QW`${e}${t}`}s(o6e,"strConcat");dt.strConcat=o6e;function a6e(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:zy(Array.isArray(e)?e.join(","):e)}s(a6e,"interpolate");function u6e(e){return new ys(zy(e))}s(u6e,"stringify");dt.stringify=u6e;function zy(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}s(zy,"safeStringify");dt.safeStringify=zy;function c6e(e){return typeof e=="string"&&dt.IDENTIFIER.test(e)?new ys(`.${e}`):ZW`[${e}]`}s(c6e,"getProperty");dt.getProperty=c6e;function l6e(e){if(typeof e=="string"&&dt.IDENTIFIER.test(e))return new ys(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}s(l6e,"getEsmExportName");dt.getEsmExportName=l6e;function f6e(e){return new ys(e.toString())}s(f6e,"regexpCode");dt.regexpCode=f6e});var yj=h(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.ValueScope=kn.ValueScopeName=kn.Scope=kn.varKinds=kn.UsedValueState=void 0;var bi=Hy(),mj=class extends Error{static{s(this,"ValueError")}constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},_j;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(_j=kn.UsedValueState||(kn.UsedValueState={}));kn.varKinds={const:new bi.Name("const"),let:new bi.Name("let"),var:new bi.Name("var")};var bw=class{static{s(this,"Scope")}constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof bi.Name?t:this.name(t)}name(t){return new bi.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};kn.Scope=bw;var Sw=class extends bi.Name{static{s(this,"ValueScopeName")}constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,bi._)`.${new bi.Name(r)}[${n}]`}};kn.ValueScopeName=Sw;var d6e=(0,bi._)`\n`,gj=class extends bw{static{s(this,"ValueScope")}constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?d6e:bi.nil}}get(){return this._scope}name(t){return new Sw(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(t),{prefix:o}=i,a=(n=r.key)!==null&&n!==void 0?n:r.ref,u=this._values[o];if(u){let f=u.get(a);if(f)return f}else u=this._values[o]=new Map;u.set(a,i);let c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=r.ref,i.setValue(r,{property:o,itemIndex:l}),i}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,bi._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(t,r,n={},i){let o=bi.nil;for(let a in t){let u=t[a];if(!u)continue;let c=n[a]=n[a]||new Map;u.forEach(l=>{if(c.has(l))return;c.set(l,_j.Started);let f=r(l);if(f){let d=this.opts.es5?kn.varKinds.var:kn.varKinds.const;o=(0,bi._)`${o}${d} ${l} = ${f};${this.opts._n}`}else if(f=i?.(l))o=(0,bi._)`${o}${f}${this.opts._n}`;else throw new mj(l);c.set(l,_j.Completed)})}return o}};kn.ValueScope=gj});var Re=h(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.or=Me.and=Me.not=Me.CodeGen=Me.operators=Me.varKinds=Me.ValueScopeName=Me.ValueScope=Me.Scope=Me.Name=Me.regexpCode=Me.stringify=Me.getProperty=Me.nil=Me.strConcat=Me.str=Me._=void 0;var Ze=Hy(),co=yj(),Oc=Hy();Object.defineProperty(Me,"_",{enumerable:!0,get:function(){return Oc._}});Object.defineProperty(Me,"str",{enumerable:!0,get:function(){return Oc.str}});Object.defineProperty(Me,"strConcat",{enumerable:!0,get:function(){return Oc.strConcat}});Object.defineProperty(Me,"nil",{enumerable:!0,get:function(){return Oc.nil}});Object.defineProperty(Me,"getProperty",{enumerable:!0,get:function(){return Oc.getProperty}});Object.defineProperty(Me,"stringify",{enumerable:!0,get:function(){return Oc.stringify}});Object.defineProperty(Me,"regexpCode",{enumerable:!0,get:function(){return Oc.regexpCode}});Object.defineProperty(Me,"Name",{enumerable:!0,get:function(){return Oc.Name}});var ww=yj();Object.defineProperty(Me,"Scope",{enumerable:!0,get:function(){return ww.Scope}});Object.defineProperty(Me,"ValueScope",{enumerable:!0,get:function(){return ww.ValueScope}});Object.defineProperty(Me,"ValueScopeName",{enumerable:!0,get:function(){return ww.ValueScopeName}});Object.defineProperty(Me,"varKinds",{enumerable:!0,get:function(){return ww.varKinds}});Me.operators={GT:new Ze._Code(">"),GTE:new Ze._Code(">="),LT:new Ze._Code("<"),LTE:new Ze._Code("<="),EQ:new Ze._Code("==="),NEQ:new Ze._Code("!=="),NOT:new Ze._Code("!"),OR:new Ze._Code("||"),AND:new Ze._Code("&&"),ADD:new Ze._Code("+")};var cu=class{static{s(this,"Node")}optimizeNodes(){return this}optimizeNames(t,r){return this}},Ej=class extends cu{static{s(this,"Def")}constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?co.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=zh(this.rhs,t,r)),this}get names(){return this.rhs instanceof Ze._CodeOrName?this.rhs.names:{}}},vw=class extends cu{static{s(this,"Assign")}constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof Ze.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=zh(this.rhs,t,r),this}get names(){let t=this.lhs instanceof Ze.Name?{}:{...this.lhs.names};return Pw(t,this.rhs)}},bj=class extends vw{static{s(this,"AssignOp")}constructor(t,r,n,i){super(t,n,i),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Sj=class extends cu{static{s(this,"Label")}constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},vj=class extends cu{static{s(this,"Break")}constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Oj=class extends cu{static{s(this,"Throw")}constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Pj=class extends cu{static{s(this,"AnyCode")}constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=zh(this.code,t,r),this}get names(){return this.code instanceof Ze._CodeOrName?this.code.names:{}}},Ky=class extends cu{static{s(this,"ParentNode")}constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(t,r)||(p6e(t,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>sd(t,r.names),{})}},lu=class extends Ky{static{s(this,"BlockNode")}render(t){return"{"+t._n+super.render(t)+"}"+t._n}},wj=class extends Ky{static{s(this,"Root")}},Vh=class extends lu{static{s(this,"Else")}};Vh.kind="else";var nd=class e extends lu{static{s(this,"If")}constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Vh(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(eY(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=zh(this.condition,t,r),this}get names(){let t=super.names;return Pw(t,this.condition),this.else&&sd(t,this.else.names),t}};nd.kind="if";var id=class extends lu{static{s(this,"For")}};id.kind="for";var Ij=class extends id{static{s(this,"ForLoop")}constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=zh(this.iteration,t,r),this}get names(){return sd(super.names,this.iteration.names)}},Tj=class extends id{static{s(this,"ForRange")}constructor(t,r,n,i){super(),this.varKind=t,this.name=r,this.from=n,this.to=i}render(t){let r=t.es5?co.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(t)}get names(){let t=Pw(super.names,this.from);return Pw(t,this.to)}},Ow=class extends id{static{s(this,"ForIter")}constructor(t,r,n,i){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=i}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=zh(this.iterable,t,r),this}get names(){return sd(super.names,this.iterable.names)}},Wy=class extends lu{static{s(this,"Func")}constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Wy.kind="func";var Yy=class extends Ky{static{s(this,"Return")}render(t){return"return "+super.render(t)}};Yy.kind="return";var Nj=class extends lu{static{s(this,"Try")}render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,i;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(i=this.finally)===null||i===void 0||i.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&sd(t,this.catch.names),this.finally&&sd(t,this.finally.names),t}},Jy=class extends lu{static{s(this,"Catch")}constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Jy.kind="catch";var Xy=class extends lu{static{s(this,"Finally")}render(t){return"finally"+super.render(t)}};Xy.kind="finally";var Aj=class{static{s(this,"CodeGen")}constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
141
+ deps: ${r}}`};var M4e={keyword:"dependencies",type:"object",schemaType:"object",error:ia.error,code(e){let[t,r]=U4e(e);yW(e,t),EW(e,r)}};function U4e({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}s(U4e,"splitDependencies");function yW(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let a in t){let u=t[a];if(u.length===0)continue;let c=(0,By.propertyInData)(r,n,a,i.opts.ownProperties);e.setParams({property:a,depsCount:u.length,deps:u.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of u)(0,By.checkReportMissingProp)(e,l)}):(r.if((0,FL._)`${c} && (${(0,By.checkMissingProp)(e,u,o)})`),(0,By.reportMissingProp)(e,o),r.else())}}s(yW,"validatePropertyDeps");ia.validatePropertyDeps=yW;function EW(e,t=e.schema){let{gen:r,data:n,keyword:i,it:o}=e,a=r.name("valid");for(let u in t)(0,j4e.alwaysValidSchema)(o,t[u])||(r.if((0,By.propertyInData)(r,n,u,o.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:u},a);e.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),e.ok(a))}s(EW,"validateSchemaDeps");ia.validateSchemaDeps=EW;ia.default=M4e});var SW=h(kL=>{"use strict";Object.defineProperty(kL,"__esModule",{value:!0});var bW=Oe(),x4e=Ve(),q4e={message:"property name must be valid",params:({params:e})=>(0,bW._)`{propertyName: ${e.propertyName}}`},F4e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:q4e,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,x4e.alwaysValidSchema)(i,r))return;let o=t.name("valid");t.forIn("key",n,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,bW.not)(o),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(o)}};kL.default=F4e});var GL=h(BL=>{"use strict";Object.defineProperty(BL,"__esModule",{value:!0});var pw=ms(),uo=Oe(),k4e=hs(),hw=Ve(),B4e={message:"must NOT have additional properties",params:({params:e})=>(0,uo._)`{additionalProperty: ${e.additionalProperty}}`},G4e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:B4e,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=e;if(!o)throw new Error("ajv implementation error");let{allErrors:u,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,hw.alwaysValidSchema)(a,r))return;let l=(0,pw.allSchemaProperties)(n.properties),f=(0,pw.allSchemaProperties)(n.patternProperties);d(),e.ok((0,uo._)`${o} === ${k4e.default.errors}`);function d(){t.forIn("key",i,b=>{!l.length&&!f.length?g(b):t.if(_(b),()=>g(b))})}s(d,"checkAdditionalProperties");function _(b){let E;if(l.length>8){let v=(0,hw.schemaRefOrVal)(a,n.properties,"properties");E=(0,pw.isOwnProperty)(t,v,b)}else l.length?E=(0,uo.or)(...l.map(v=>(0,uo._)`${b} === ${v}`)):E=uo.nil;return f.length&&(E=(0,uo.or)(E,...f.map(v=>(0,uo._)`${(0,pw.usePattern)(e,v)}.test(${b})`))),(0,uo.not)(E)}s(_,"isAdditional");function m(b){t.code((0,uo._)`delete ${i}[${b}]`)}s(m,"deleteAdditional");function g(b){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(b);return}if(r===!1){e.setParams({additionalProperty:b}),e.error(),u||t.break();return}if(typeof r=="object"&&!(0,hw.alwaysValidSchema)(a,r)){let E=t.name("valid");c.removeAdditional==="failing"?(y(b,E,!1),t.if((0,uo.not)(E),()=>{e.reset(),m(b)})):(y(b,E),u||t.if((0,uo.not)(E),()=>t.break()))}}s(g,"additionalPropertyCode");function y(b,E,v){let O={keyword:"additionalProperties",dataProp:b,dataPropType:hw.Type.Str};v===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(O,E)}s(y,"applyAdditionalSchema")}};BL.default=G4e});var PW=h(zL=>{"use strict";Object.defineProperty(zL,"__esModule",{value:!0});var V4e=Mh(),vW=ms(),VL=Ve(),OW=GL(),z4e={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&OW.default.code(new V4e.KeywordCxt(o,OW.default,"additionalProperties"));let a=(0,vW.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=VL.mergeEvaluated.props(t,(0,VL.toHash)(a),o.props));let u=a.filter(d=>!(0,VL.alwaysValidSchema)(o,r[d]));if(u.length===0)return;let c=t.name("valid");for(let d of u)l(d)?f(d):(t.if((0,vW.propertyInData)(t,i,d,o.opts.ownProperties)),f(d),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function l(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}s(l,"hasDefault");function f(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}s(f,"applyPropertySchema")}};zL.default=z4e});var NW=h(HL=>{"use strict";Object.defineProperty(HL,"__esModule",{value:!0});var wW=ms(),mw=Oe(),IW=Ve(),TW=Ve(),H4e={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:o}=e,{opts:a}=o,u=(0,wW.allSchemaProperties)(r),c=u.filter(y=>(0,IW.alwaysValidSchema)(o,r[y]));if(u.length===0||c.length===u.length&&(!o.opts.unevaluated||o.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,f=t.name("valid");o.props!==!0&&!(o.props instanceof mw.Name)&&(o.props=(0,TW.evaluatedPropsToName)(t,o.props));let{props:d}=o;_();function _(){for(let y of u)l&&m(y),o.allErrors?g(y):(t.var(f,!0),g(y),t.if(f))}s(_,"validatePatternProperties");function m(y){for(let b in l)new RegExp(y).test(b)&&(0,IW.checkStrictMode)(o,`property ${b} matches pattern ${y} (use allowMatchingProperties)`)}s(m,"checkMatchingProperties");function g(y){t.forIn("key",n,b=>{t.if((0,mw._)`${(0,wW.usePattern)(e,y)}.test(${b})`,()=>{let E=c.includes(y);E||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:b,dataPropType:TW.Type.Str},f),o.opts.unevaluated&&d!==!0?t.assign((0,mw._)`${d}[${b}]`,!0):!E&&!o.allErrors&&t.if((0,mw.not)(f),()=>t.break())})})}s(g,"validateProperties")}};HL.default=H4e});var AW=h(KL=>{"use strict";Object.defineProperty(KL,"__esModule",{value:!0});var K4e=Ve(),W4e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,K4e.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};KL.default=W4e});var RW=h(WL=>{"use strict";Object.defineProperty(WL,"__esModule",{value:!0});var Y4e=ms(),J4e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Y4e.validateUnion,error:{message:"must match a schema in anyOf"}};WL.default=J4e});var CW=h(YL=>{"use strict";Object.defineProperty(YL,"__esModule",{value:!0});var _w=Oe(),X4e=Ve(),Z4e={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,_w._)`{passingSchemas: ${e.passing}}`},Q4e={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Z4e,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=t.let("valid",!1),u=t.let("passing",null),c=t.name("_valid");e.setParams({passing:u}),t.block(l),e.result(a,()=>e.reset(),()=>e.error(!0));function l(){o.forEach((f,d)=>{let _;(0,X4e.alwaysValidSchema)(i,f)?t.var(c,!0):_=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,_w._)`${c} && ${a}`).assign(a,!1).assign(u,(0,_w._)`[${u}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(u,d),_&&e.mergeEvaluated(_,_w.Name)})})}s(l,"validateOneOf")}};YL.default=Q4e});var $W=h(JL=>{"use strict";Object.defineProperty(JL,"__esModule",{value:!0});var eGe=Ve(),tGe={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((o,a)=>{if((0,eGe.alwaysValidSchema)(n,o))return;let u=e.subschema({keyword:"allOf",schemaProp:a},i);e.ok(i),e.mergeEvaluated(u)})}};JL.default=tGe});var jW=h(XL=>{"use strict";Object.defineProperty(XL,"__esModule",{value:!0});var gw=Oe(),LW=Ve(),rGe={message:({params:e})=>(0,gw.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,gw._)`{failingKeyword: ${e.ifClause}}`},nGe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:rGe,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,LW.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=DW(n,"then"),o=DW(n,"else");if(!i&&!o)return;let a=t.let("valid",!0),u=t.name("_valid");if(c(),e.reset(),i&&o){let f=t.let("ifClause");e.setParams({ifClause:f}),t.if(u,l("then",f),l("else",f))}else i?t.if(u,l("then")):t.if((0,gw.not)(u),l("else"));e.pass(a,()=>e.error(!0));function c(){let f=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(f)}s(c,"validateIf");function l(f,d){return()=>{let _=e.subschema({keyword:f},u);t.assign(a,u),e.mergeValidEvaluated(_,a),d?t.assign(d,(0,gw._)`${f}`):e.setParams({ifClause:f})}}s(l,"validateClause")}};function DW(e,t){let r=e.schema[t];return r!==void 0&&!(0,LW.alwaysValidSchema)(e,r)}s(DW,"hasSchema");XL.default=nGe});var MW=h(ZL=>{"use strict";Object.defineProperty(ZL,"__esModule",{value:!0});var iGe=Ve(),sGe={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,iGe.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};ZL.default=sGe});var ej=h(QL=>{"use strict";Object.defineProperty(QL,"__esModule",{value:!0});var oGe=jL(),aGe=hW(),uGe=ML(),cGe=_W(),lGe=gW(),fGe=dw(),dGe=SW(),pGe=GL(),hGe=PW(),mGe=NW(),_Ge=AW(),gGe=RW(),yGe=CW(),EGe=$W(),bGe=jW(),SGe=MW();function vGe(e=!1){let t=[_Ge.default,gGe.default,yGe.default,EGe.default,bGe.default,SGe.default,dGe.default,pGe.default,fGe.default,hGe.default,mGe.default];return e?t.push(aGe.default,cGe.default):t.push(oGe.default,uGe.default),t.push(lGe.default),t}s(vGe,"getApplicator");QL.default=vGe});var UW=h(tj=>{"use strict";Object.defineProperty(tj,"__esModule",{value:!0});var pr=Oe(),OGe={message:({schemaCode:e})=>(0,pr.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,pr._)`{format: ${e}}`},PGe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:OGe,code(e,t){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:d}=u;if(!c.validateFormats)return;i?_():m();function _(){let g=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),y=r.const("fDef",(0,pr._)`${g}[${a}]`),b=r.let("fType"),E=r.let("format");r.if((0,pr._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(b,(0,pr._)`${y}.type || "string"`).assign(E,(0,pr._)`${y}.validate`),()=>r.assign(b,(0,pr._)`"string"`).assign(E,y)),e.fail$data((0,pr.or)(v(),O()));function v(){return c.strictSchema===!1?pr.nil:(0,pr._)`${a} && !${E}`}s(v,"unknownFmt");function O(){let P=f.$async?(0,pr._)`(${y}.async ? await ${E}(${n}) : ${E}(${n}))`:(0,pr._)`${E}(${n})`,I=(0,pr._)`(typeof ${E} == "function" ? ${P} : ${E}.test(${n}))`;return(0,pr._)`${E} && ${E} !== true && ${b} === ${t} && !${I}`}s(O,"invalidFmt")}s(_,"validate$DataFormat");function m(){let g=d.formats[o];if(!g){v();return}if(g===!0)return;let[y,b,E]=O(g);y===t&&e.pass(P());function v(){if(c.strictSchema===!1){d.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${o}" ignored in schema at path "${l}"`}}s(v,"unknownFormat");function O(I){let j=I instanceof RegExp?(0,pr.regexpCode)(I):c.code.formats?(0,pr._)`${c.code.formats}${(0,pr.getProperty)(o)}`:void 0,x=r.scopeValue("formats",{key:o,ref:I,code:j});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,pr._)`${x}.validate`]:["string",I,x]}s(O,"getFormat");function P(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,pr._)`await ${E}(${n})`}return typeof b=="function"?(0,pr._)`${E}(${n})`:(0,pr._)`${E}.test(${n})`}s(P,"validCondition")}s(m,"validateFormat")}};tj.default=PGe});var nj=h(rj=>{"use strict";Object.defineProperty(rj,"__esModule",{value:!0});var wGe=UW(),IGe=[wGe.default];rj.default=IGe});var ij=h(Fh=>{"use strict";Object.defineProperty(Fh,"__esModule",{value:!0});Fh.contentVocabulary=Fh.metadataVocabulary=void 0;Fh.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Fh.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var qW=h(sj=>{"use strict";Object.defineProperty(sj,"__esModule",{value:!0});var TGe=gL(),NGe=DL(),AGe=ej(),RGe=nj(),xW=ij(),CGe=[TGe.default,NGe.default,(0,AGe.default)(),RGe.default,xW.metadataVocabulary,xW.contentVocabulary];sj.default=CGe});var FW=h(Gy=>{"use strict";Object.defineProperty(Gy,"__esModule",{value:!0});Gy.DiscrError=void 0;var $Ge;(function(e){e.Tag="tag",e.Mapping="mapping"})($Ge=Gy.DiscrError||(Gy.DiscrError={}))});var uj=h(aj=>{"use strict";Object.defineProperty(aj,"__esModule",{value:!0});var kh=Oe(),oj=FW(),kW=Ry(),DGe=Ve(),LGe={message:({params:{discrError:e,tagName:t}})=>e===oj.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,kh._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},jGe={keyword:"discriminator",type:"object",schemaType:"object",error:LGe,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:o}=e,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let u=n.propertyName;if(typeof u!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",(0,kh._)`${r}${(0,kh.getProperty)(u)}`);t.if((0,kh._)`typeof ${l} == "string"`,()=>f(),()=>e.error(!1,{discrError:oj.DiscrError.Tag,tag:l,tagName:u})),e.ok(c);function f(){let m=_();t.if(!1);for(let g in m)t.elseIf((0,kh._)`${l} === ${g}`),t.assign(c,d(m[g]));t.else(),e.error(!1,{discrError:oj.DiscrError.Mapping,tag:l,tagName:u}),t.endIf()}s(f,"validateMapping");function d(m){let g=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:m},g);return e.mergeEvaluated(y,kh.Name),g}s(d,"applyTagSchema");function _(){var m;let g={},y=E(i),b=!0;for(let P=0;P<a.length;P++){let I=a[P];I?.$ref&&!(0,DGe.schemaHasRulesButRef)(I,o.self.RULES)&&(I=kW.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,I?.$ref),I instanceof kW.SchemaEnv&&(I=I.schema));let j=(m=I?.properties)===null||m===void 0?void 0:m[u];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);b=b&&(y||E(I)),v(j,P)}if(!b)throw new Error(`discriminator: "${u}" must be required`);return g;function E({required:P}){return Array.isArray(P)&&P.includes(u)}function v(P,I){if(P.const)O(P.const,I);else if(P.enum)for(let j of P.enum)O(j,I);else throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`)}function O(P,I){if(typeof P!="string"||P in g)throw new Error(`discriminator: "${u}" values must be unique strings`);g[P]=I}}s(_,"getMapping")}};aj.default=jGe});var BW=h((uRt,MGe)=>{MGe.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var zW=h((tr,VW)=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.MissingRefError=tr.ValidationError=tr.CodeGen=tr.Name=tr.nil=tr.stringify=tr.str=tr._=tr.KeywordCxt=void 0;var UGe=hL(),xGe=qW(),qGe=uj(),GW=BW(),FGe=["/properties"],yw="http://json-schema.org/draft-07/schema",Ew=class extends UGe.default{static{s(this,"Ajv")}_addVocabularies(){super._addVocabularies(),xGe.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(qGe.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(GW,FGe):GW;this.addMetaSchema(t,yw,!1),this.refs["http://json-schema.org/schema"]=yw}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(yw)?yw:void 0)}};VW.exports=tr=Ew;Object.defineProperty(tr,"__esModule",{value:!0});tr.default=Ew;var kGe=Mh();Object.defineProperty(tr,"KeywordCxt",{enumerable:!0,get:function(){return kGe.KeywordCxt}});var Bh=Oe();Object.defineProperty(tr,"_",{enumerable:!0,get:function(){return Bh._}});Object.defineProperty(tr,"str",{enumerable:!0,get:function(){return Bh.str}});Object.defineProperty(tr,"stringify",{enumerable:!0,get:function(){return Bh.stringify}});Object.defineProperty(tr,"nil",{enumerable:!0,get:function(){return Bh.nil}});Object.defineProperty(tr,"Name",{enumerable:!0,get:function(){return Bh.Name}});Object.defineProperty(tr,"CodeGen",{enumerable:!0,get:function(){return Bh.CodeGen}});var BGe=Ny();Object.defineProperty(tr,"ValidationError",{enumerable:!0,get:function(){return BGe.default}});var GGe=Ay();Object.defineProperty(tr,"MissingRefError",{enumerable:!0,get:function(){return GGe.default}})});var XW=h(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.formatNames=sa.fastFormats=sa.fullFormats=void 0;function Gh(e,t){return{validate:e,compare:t}}s(Gh,"fmtDef");sa.fullFormats={date:Gh(WW,fj),time:Gh(YW,dj),"date-time":Gh(KGe,JW),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:JGe,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:n6e,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:XGe,int32:{type:"number",validate:e6e},int64:{type:"number",validate:t6e},float:{type:"number",validate:KW},double:{type:"number",validate:KW},password:!0,binary:!0};sa.fastFormats={...sa.fullFormats,date:Gh(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,fj),time:Gh(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,dj),"date-time":Gh(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,JW),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};sa.formatNames=Object.keys(sa.fullFormats);function VGe(e){return e%4===0&&(e%100!==0||e%400===0)}s(VGe,"isLeapYear");var zGe=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,HGe=[0,31,28,31,30,31,30,31,31,30,31,30,31];function WW(e){let t=zGe.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&VGe(r)?29:HGe[n])}s(WW,"date");function fj(e,t){if(e&&t)return e>t?1:e<t?-1:0}s(fj,"compareDate");var cj=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function YW(e,t){let r=cj.exec(e);if(!r)return!1;let n=+r[1],i=+r[2],o=+r[3],a=r[5];return(n<=23&&i<=59&&o<=59||n===23&&i===59&&o===60)&&(!t||a!=="")}s(YW,"time");function dj(e,t){if(!(e&&t))return;let r=cj.exec(e),n=cj.exec(t);if(r&&n)return e=r[1]+r[2]+r[3]+(r[4]||""),t=n[1]+n[2]+n[3]+(n[4]||""),e>t?1:e<t?-1:0}s(dj,"compareTime");var lj=/t|\s/i;function KGe(e){let t=e.split(lj);return t.length===2&&WW(t[0])&&YW(t[1],!0)}s(KGe,"date_time");function JW(e,t){if(!(e&&t))return;let[r,n]=e.split(lj),[i,o]=t.split(lj),a=fj(r,i);if(a!==void 0)return a||dj(n,o)}s(JW,"compareDateTime");var WGe=/\/|:/,YGe=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function JGe(e){return WGe.test(e)&&YGe.test(e)}s(JGe,"uri");var HW=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function XGe(e){return HW.lastIndex=0,HW.test(e)}s(XGe,"byte");var ZGe=-(2**31),QGe=2**31-1;function e6e(e){return Number.isInteger(e)&&e<=QGe&&e>=ZGe}s(e6e,"validateInt32");function t6e(e){return Number.isInteger(e)}s(t6e,"validateInt64");function KW(){return!0}s(KW,"validateNumber");var r6e=/[^\\]\\Z/;function n6e(e){if(r6e.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}s(n6e,"regex")});var Hy=h(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.regexpCode=dt.getEsmExportName=dt.getProperty=dt.safeStringify=dt.stringify=dt.strConcat=dt.addCodeArg=dt.str=dt._=dt.nil=dt._Code=dt.Name=dt.IDENTIFIER=dt._CodeOrName=void 0;var Vy=class{static{s(this,"_CodeOrName")}};dt._CodeOrName=Vy;dt.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var rd=class extends Vy{static{s(this,"Name")}constructor(t){if(super(),!dt.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};dt.Name=rd;var ys=class extends Vy{static{s(this,"_Code")}constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof rd&&(r[n.str]=(r[n.str]||0)+1),r),{})}};dt._Code=ys;dt.nil=new ys("");function ZW(e,...t){let r=[e[0]],n=0;for(;n<t.length;)hj(r,t[n]),r.push(e[++n]);return new ys(r)}s(ZW,"_");dt._=ZW;var pj=new ys("+");function QW(e,...t){let r=[zy(e[0])],n=0;for(;n<t.length;)r.push(pj),hj(r,t[n]),r.push(pj,zy(e[++n]));return i6e(r),new ys(r)}s(QW,"str");dt.str=QW;function hj(e,t){t instanceof ys?e.push(...t._items):t instanceof rd?e.push(t):e.push(a6e(t))}s(hj,"addCodeArg");dt.addCodeArg=hj;function i6e(e){let t=1;for(;t<e.length-1;){if(e[t]===pj){let r=s6e(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}s(i6e,"optimize");function s6e(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof rd||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof rd))return`"${e}${t.slice(1)}`}s(s6e,"mergeExprItems");function o6e(e,t){return t.emptyStr()?e:e.emptyStr()?t:QW`${e}${t}`}s(o6e,"strConcat");dt.strConcat=o6e;function a6e(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:zy(Array.isArray(e)?e.join(","):e)}s(a6e,"interpolate");function u6e(e){return new ys(zy(e))}s(u6e,"stringify");dt.stringify=u6e;function zy(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}s(zy,"safeStringify");dt.safeStringify=zy;function c6e(e){return typeof e=="string"&&dt.IDENTIFIER.test(e)?new ys(`.${e}`):ZW`[${e}]`}s(c6e,"getProperty");dt.getProperty=c6e;function l6e(e){if(typeof e=="string"&&dt.IDENTIFIER.test(e))return new ys(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}s(l6e,"getEsmExportName");dt.getEsmExportName=l6e;function f6e(e){return new ys(e.toString())}s(f6e,"regexpCode");dt.regexpCode=f6e});var yj=h(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.ValueScope=kn.ValueScopeName=kn.Scope=kn.varKinds=kn.UsedValueState=void 0;var bi=Hy(),mj=class extends Error{static{s(this,"ValueError")}constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},_j;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(_j=kn.UsedValueState||(kn.UsedValueState={}));kn.varKinds={const:new bi.Name("const"),let:new bi.Name("let"),var:new bi.Name("var")};var bw=class{static{s(this,"Scope")}constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof bi.Name?t:this.name(t)}name(t){return new bi.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};kn.Scope=bw;var Sw=class extends bi.Name{static{s(this,"ValueScopeName")}constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,bi._)`.${new bi.Name(r)}[${n}]`}};kn.ValueScopeName=Sw;var d6e=(0,bi._)`\n`,gj=class extends bw{static{s(this,"ValueScope")}constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?d6e:bi.nil}}get(){return this._scope}name(t){return new Sw(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(t),{prefix:o}=i,a=(n=r.key)!==null&&n!==void 0?n:r.ref,u=this._values[o];if(u){let f=u.get(a);if(f)return f}else u=this._values[o]=new Map;u.set(a,i);let c=this._scope[o]||(this._scope[o]=[]),l=c.length;return c[l]=r.ref,i.setValue(r,{property:o,itemIndex:l}),i}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,bi._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(t,r,n={},i){let o=bi.nil;for(let a in t){let u=t[a];if(!u)continue;let c=n[a]=n[a]||new Map;u.forEach(l=>{if(c.has(l))return;c.set(l,_j.Started);let f=r(l);if(f){let d=this.opts.es5?kn.varKinds.var:kn.varKinds.const;o=(0,bi._)`${o}${d} ${l} = ${f};${this.opts._n}`}else if(f=i?.(l))o=(0,bi._)`${o}${f}${this.opts._n}`;else throw new mj(l);c.set(l,_j.Completed)})}return o}};kn.ValueScope=gj});var Re=h(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.or=Me.and=Me.not=Me.CodeGen=Me.operators=Me.varKinds=Me.ValueScopeName=Me.ValueScope=Me.Scope=Me.Name=Me.regexpCode=Me.stringify=Me.getProperty=Me.nil=Me.strConcat=Me.str=Me._=void 0;var Ze=Hy(),co=yj(),Oc=Hy();Object.defineProperty(Me,"_",{enumerable:!0,get:function(){return Oc._}});Object.defineProperty(Me,"str",{enumerable:!0,get:function(){return Oc.str}});Object.defineProperty(Me,"strConcat",{enumerable:!0,get:function(){return Oc.strConcat}});Object.defineProperty(Me,"nil",{enumerable:!0,get:function(){return Oc.nil}});Object.defineProperty(Me,"getProperty",{enumerable:!0,get:function(){return Oc.getProperty}});Object.defineProperty(Me,"stringify",{enumerable:!0,get:function(){return Oc.stringify}});Object.defineProperty(Me,"regexpCode",{enumerable:!0,get:function(){return Oc.regexpCode}});Object.defineProperty(Me,"Name",{enumerable:!0,get:function(){return Oc.Name}});var ww=yj();Object.defineProperty(Me,"Scope",{enumerable:!0,get:function(){return ww.Scope}});Object.defineProperty(Me,"ValueScope",{enumerable:!0,get:function(){return ww.ValueScope}});Object.defineProperty(Me,"ValueScopeName",{enumerable:!0,get:function(){return ww.ValueScopeName}});Object.defineProperty(Me,"varKinds",{enumerable:!0,get:function(){return ww.varKinds}});Me.operators={GT:new Ze._Code(">"),GTE:new Ze._Code(">="),LT:new Ze._Code("<"),LTE:new Ze._Code("<="),EQ:new Ze._Code("==="),NEQ:new Ze._Code("!=="),NOT:new Ze._Code("!"),OR:new Ze._Code("||"),AND:new Ze._Code("&&"),ADD:new Ze._Code("+")};var cu=class{static{s(this,"Node")}optimizeNodes(){return this}optimizeNames(t,r){return this}},Ej=class extends cu{static{s(this,"Def")}constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?co.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=zh(this.rhs,t,r)),this}get names(){return this.rhs instanceof Ze._CodeOrName?this.rhs.names:{}}},vw=class extends cu{static{s(this,"Assign")}constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof Ze.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=zh(this.rhs,t,r),this}get names(){let t=this.lhs instanceof Ze.Name?{}:{...this.lhs.names};return Pw(t,this.rhs)}},bj=class extends vw{static{s(this,"AssignOp")}constructor(t,r,n,i){super(t,n,i),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Sj=class extends cu{static{s(this,"Label")}constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},vj=class extends cu{static{s(this,"Break")}constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Oj=class extends cu{static{s(this,"Throw")}constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Pj=class extends cu{static{s(this,"AnyCode")}constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=zh(this.code,t,r),this}get names(){return this.code instanceof Ze._CodeOrName?this.code.names:{}}},Ky=class extends cu{static{s(this,"ParentNode")}constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(t,r)||(p6e(t,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>sd(t,r.names),{})}},lu=class extends Ky{static{s(this,"BlockNode")}render(t){return"{"+t._n+super.render(t)+"}"+t._n}},wj=class extends Ky{static{s(this,"Root")}},Vh=class extends lu{static{s(this,"Else")}};Vh.kind="else";var nd=class e extends lu{static{s(this,"If")}constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Vh(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(eY(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=zh(this.condition,t,r),this}get names(){let t=super.names;return Pw(t,this.condition),this.else&&sd(t,this.else.names),t}};nd.kind="if";var id=class extends lu{static{s(this,"For")}};id.kind="for";var Ij=class extends id{static{s(this,"ForLoop")}constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=zh(this.iteration,t,r),this}get names(){return sd(super.names,this.iteration.names)}},Tj=class extends id{static{s(this,"ForRange")}constructor(t,r,n,i){super(),this.varKind=t,this.name=r,this.from=n,this.to=i}render(t){let r=t.es5?co.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(t)}get names(){let t=Pw(super.names,this.from);return Pw(t,this.to)}},Ow=class extends id{static{s(this,"ForIter")}constructor(t,r,n,i){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=i}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=zh(this.iterable,t,r),this}get names(){return sd(super.names,this.iterable.names)}},Wy=class extends lu{static{s(this,"Func")}constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Wy.kind="func";var Yy=class extends Ky{static{s(this,"Return")}render(t){return"return "+super.render(t)}};Yy.kind="return";var Nj=class extends lu{static{s(this,"Try")}render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,i;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(i=this.finally)===null||i===void 0||i.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&sd(t,this.catch.names),this.finally&&sd(t,this.finally.names),t}},Jy=class extends lu{static{s(this,"Catch")}constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Jy.kind="catch";var Xy=class extends lu{static{s(this,"Finally")}render(t){return"finally"+super.render(t)}};Xy.kind="finally";var Aj=class{static{s(this,"CodeGen")}constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
142
142
  `:""},this._extScope=t,this._scope=new co.Scope({parent:t}),this._nodes=[new wj]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new Ej(t,o,n)),o}const(t,r,n){return this._def(co.varKinds.const,t,r,n)}let(t,r,n){return this._def(co.varKinds.let,t,r,n)}var(t,r,n){return this._def(co.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new vw(t,r,n))}add(t,r){return this._leafNode(new bj(t,Me.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==Ze.nil&&this._leafNode(new Pj(t)),this}object(...t){let r=["{"];for(let[n,i]of t)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,Ze.addCodeArg)(r,i));return r.push("}"),new Ze._Code(r)}if(t,r,n){if(this._blockNode(new nd(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new nd(t))}else(){return this._elseNode(new Vh)}endIf(){return this._endBlockNode(nd,Vh)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Ij(t),r)}forRange(t,r,n,i,o=this.opts.es5?co.varKinds.var:co.varKinds.let){let a=this._scope.toName(t);return this._for(new Tj(o,a,r,n),()=>i(a))}forOf(t,r,n,i=co.varKinds.const){let o=this._scope.toName(t);if(this.opts.es5){let a=r instanceof Ze.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,Ze._)`${a}.length`,u=>{this.var(o,(0,Ze._)`${a}[${u}]`),n(o)})}return this._for(new Ow("of",i,o,r),()=>n(o))}forIn(t,r,n,i=this.opts.es5?co.varKinds.var:co.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,Ze._)`Object.keys(${r})`,n);let o=this._scope.toName(t);return this._for(new Ow("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(id)}label(t){return this._leafNode(new Sj(t))}break(t){return this._leafNode(new vj(t))}return(t){let r=new Yy;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Yy)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Nj;if(this._blockNode(i),this.code(t),r){let o=this.name("e");this._currNode=i.catch=new Jy(o),r(o)}return n&&(this._currNode=i.finally=new Xy,this.code(n)),this._endBlockNode(Jy,Xy)}throw(t){return this._leafNode(new Oj(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=Ze.nil,n,i){return this._blockNode(new Wy(t,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Wy)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof nd))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};Me.CodeGen=Aj;function sd(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}s(sd,"addNames");function Pw(e,t){return t instanceof Ze._CodeOrName?sd(e,t.names):e}s(Pw,"addExprNames");function zh(e,t,r){if(e instanceof Ze.Name)return n(e);if(!i(e))return e;return new Ze._Code(e._items.reduce((o,a)=>(a instanceof Ze.Name&&(a=n(a)),a instanceof Ze._Code?o.push(...a._items):o.push(a),o),[]));function n(o){let a=r[o.str];return a===void 0||t[o.str]!==1?o:(delete t[o.str],a)}function i(o){return o instanceof Ze._Code&&o._items.some(a=>a instanceof Ze.Name&&t[a.str]===1&&r[a.str]!==void 0)}}s(zh,"optimizeExpr");function p6e(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}s(p6e,"subtractNames");function eY(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Ze._)`!${Rj(e)}`}s(eY,"not");Me.not=eY;var h6e=tY(Me.operators.AND);function m6e(...e){return e.reduce(h6e)}s(m6e,"and");Me.and=m6e;var _6e=tY(Me.operators.OR);function g6e(...e){return e.reduce(_6e)}s(g6e,"or");Me.or=g6e;function tY(e){return(t,r)=>t===Ze.nil?r:r===Ze.nil?t:(0,Ze._)`${Rj(t)} ${e} ${Rj(r)}`}s(tY,"mappend");function Rj(e){return e instanceof Ze.Name?e:(0,Ze._)`(${e})`}s(Rj,"par")});var pt=h(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.checkStrictMode=Ue.getErrorPath=Ue.Type=Ue.useFunc=Ue.setEvaluated=Ue.evaluatedPropsToName=Ue.mergeEvaluated=Ue.eachItem=Ue.unescapeJsonPointer=Ue.escapeJsonPointer=Ue.escapeFragment=Ue.unescapeFragment=Ue.schemaRefOrVal=Ue.schemaHasRulesButRef=Ue.schemaHasRules=Ue.checkUnknownRules=Ue.alwaysValidSchema=Ue.toHash=void 0;var Ut=Re(),y6e=Hy();function E6e(e){let t={};for(let r of e)t[r]=!0;return t}s(E6e,"toHash");Ue.toHash=E6e;function b6e(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(iY(e,t),!sY(t,e.self.RULES.all))}s(b6e,"alwaysValidSchema");Ue.alwaysValidSchema=b6e;function iY(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let i=n.RULES.keywords;for(let o in t)i[o]||cY(e,`unknown keyword: "${o}"`)}s(iY,"checkUnknownRules");Ue.checkUnknownRules=iY;function sY(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}s(sY,"schemaHasRules");Ue.schemaHasRules=sY;function S6e(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}s(S6e,"schemaHasRulesButRef");Ue.schemaHasRulesButRef=S6e;function v6e({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Ut._)`${r}`}return(0,Ut._)`${e}${t}${(0,Ut.getProperty)(n)}`}s(v6e,"schemaRefOrVal");Ue.schemaRefOrVal=v6e;function O6e(e){return oY(decodeURIComponent(e))}s(O6e,"unescapeFragment");Ue.unescapeFragment=O6e;function P6e(e){return encodeURIComponent(Cj(e))}s(P6e,"escapeFragment");Ue.escapeFragment=P6e;function Cj(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}s(Cj,"escapeJsonPointer");Ue.escapeJsonPointer=Cj;function oY(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}s(oY,"unescapeJsonPointer");Ue.unescapeJsonPointer=oY;function w6e(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}s(w6e,"eachItem");Ue.eachItem=w6e;function rY({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,o,a,u)=>{let c=a===void 0?o:a instanceof Ut.Name?(o instanceof Ut.Name?e(i,o,a):t(i,o,a),a):o instanceof Ut.Name?(t(i,a,o),o):r(o,a);return u===Ut.Name&&!(c instanceof Ut.Name)?n(i,c):c}}s(rY,"makeMergeEvaluated");Ue.mergeEvaluated={props:rY({mergeNames:(e,t,r)=>e.if((0,Ut._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,Ut._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,Ut._)`${r} || {}`).code((0,Ut._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,Ut._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,Ut._)`${r} || {}`),$j(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:aY}),items:rY({mergeNames:(e,t,r)=>e.if((0,Ut._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,Ut._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,Ut._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,Ut._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function aY(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,Ut._)`{}`);return t!==void 0&&$j(e,r,t),r}s(aY,"evaluatedPropsToName");Ue.evaluatedPropsToName=aY;function $j(e,t,r){Object.keys(r).forEach(n=>e.assign((0,Ut._)`${t}${(0,Ut.getProperty)(n)}`,!0))}s($j,"setEvaluated");Ue.setEvaluated=$j;var nY={};function I6e(e,t){return e.scopeValue("func",{ref:t,code:nY[t.code]||(nY[t.code]=new y6e._Code(t.code))})}s(I6e,"useFunc");Ue.useFunc=I6e;var uY;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(uY=Ue.Type||(Ue.Type={}));function T6e(e,t,r){if(e instanceof Ut.Name){let n=t===uY.Num;return r?n?(0,Ut._)`"[" + ${e} + "]"`:(0,Ut._)`"['" + ${e} + "']"`:n?(0,Ut._)`"/" + ${e}`:(0,Ut._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Ut.getProperty)(e).toString():"/"+Cj(e)}s(T6e,"getErrorPath");Ue.getErrorPath=T6e;function cY(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}s(cY,"checkStrictMode");Ue.checkStrictMode=cY});var fu=h(Dj=>{"use strict";Object.defineProperty(Dj,"__esModule",{value:!0});var vn=Re(),N6e={data:new vn.Name("data"),valCxt:new vn.Name("valCxt"),instancePath:new vn.Name("instancePath"),parentData:new vn.Name("parentData"),parentDataProperty:new vn.Name("parentDataProperty"),rootData:new vn.Name("rootData"),dynamicAnchors:new vn.Name("dynamicAnchors"),vErrors:new vn.Name("vErrors"),errors:new vn.Name("errors"),this:new vn.Name("this"),self:new vn.Name("self"),scope:new vn.Name("scope"),json:new vn.Name("json"),jsonPos:new vn.Name("jsonPos"),jsonLen:new vn.Name("jsonLen"),jsonPart:new vn.Name("jsonPart")};Dj.default=N6e});var Zy=h(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.extendErrors=On.resetErrorsCount=On.reportExtraError=On.reportError=On.keyword$DataError=On.keywordError=void 0;var nt=Re(),Iw=pt(),Bn=fu();On.keywordError={message:({keyword:e})=>(0,nt.str)`must pass "${e}" keyword validation`};On.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,nt.str)`"${e}" keyword must be ${t} ($data)`:(0,nt.str)`"${e}" keyword is invalid ($data)`};function A6e(e,t=On.keywordError,r,n){let{it:i}=e,{gen:o,compositeRule:a,allErrors:u}=i,c=dY(e,t,r);n??(a||u)?lY(o,c):fY(i,(0,nt._)`[${c}]`)}s(A6e,"reportError");On.reportError=A6e;function R6e(e,t=On.keywordError,r){let{it:n}=e,{gen:i,compositeRule:o,allErrors:a}=n,u=dY(e,t,r);lY(i,u),o||a||fY(n,Bn.default.vErrors)}s(R6e,"reportExtraError");On.reportExtraError=R6e;function C6e(e,t){e.assign(Bn.default.errors,t),e.if((0,nt._)`${Bn.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,nt._)`${Bn.default.vErrors}.length`,t),()=>e.assign(Bn.default.vErrors,null)))}s(C6e,"resetErrorsCount");On.resetErrorsCount=C6e;function $6e({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",i,Bn.default.errors,u=>{e.const(a,(0,nt._)`${Bn.default.vErrors}[${u}]`),e.if((0,nt._)`${a}.instancePath === undefined`,()=>e.assign((0,nt._)`${a}.instancePath`,(0,nt.strConcat)(Bn.default.instancePath,o.errorPath))),e.assign((0,nt._)`${a}.schemaPath`,(0,nt.str)`${o.errSchemaPath}/${t}`),o.opts.verbose&&(e.assign((0,nt._)`${a}.schema`,r),e.assign((0,nt._)`${a}.data`,n))})}s($6e,"extendErrors");On.extendErrors=$6e;function lY(e,t){let r=e.const("err",t);e.if((0,nt._)`${Bn.default.vErrors} === null`,()=>e.assign(Bn.default.vErrors,(0,nt._)`[${r}]`),(0,nt._)`${Bn.default.vErrors}.push(${r})`),e.code((0,nt._)`${Bn.default.errors}++`)}s(lY,"addError");function fY(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;i.$async?r.throw((0,nt._)`new ${e.ValidationError}(${t})`):(r.assign((0,nt._)`${n}.errors`,t),r.return(!1))}s(fY,"returnErrors");var od={keyword:new nt.Name("keyword"),schemaPath:new nt.Name("schemaPath"),params:new nt.Name("params"),propertyName:new nt.Name("propertyName"),message:new nt.Name("message"),schema:new nt.Name("schema"),parentSchema:new nt.Name("parentSchema")};function dY(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,nt._)`{}`:D6e(e,t,r)}s(dY,"errorObjectCode");function D6e(e,t,r={}){let{gen:n,it:i}=e,o=[L6e(i,r),j6e(e,r)];return M6e(e,t,o),n.object(...o)}s(D6e,"errorObject");function L6e({errorPath:e},{instancePath:t}){let r=t?(0,nt.str)`${e}${(0,Iw.getErrorPath)(t,Iw.Type.Str)}`:e;return[Bn.default.instancePath,(0,nt.strConcat)(Bn.default.instancePath,r)]}s(L6e,"errorInstancePath");function j6e({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,nt.str)`${t}/${e}`;return r&&(i=(0,nt.str)`${i}${(0,Iw.getErrorPath)(r,Iw.Type.Str)}`),[od.schemaPath,i]}s(j6e,"errorSchemaPath");function M6e(e,{params:t,message:r},n){let{keyword:i,data:o,schemaValue:a,it:u}=e,{opts:c,propertyName:l,topSchemaRef:f,schemaPath:d}=u;n.push([od.keyword,i],[od.params,typeof t=="function"?t(e):t||(0,nt._)`{}`]),c.messages&&n.push([od.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([od.schema,a],[od.parentSchema,(0,nt._)`${f}${d}`],[Bn.default.data,o]),l&&n.push([od.propertyName,l])}s(M6e,"extraErrorProps")});var hY=h(Hh=>{"use strict";Object.defineProperty(Hh,"__esModule",{value:!0});Hh.boolOrEmptySchema=Hh.topBoolOrEmptySchema=void 0;var U6e=Zy(),x6e=Re(),q6e=fu(),F6e={message:"boolean schema is false"};function k6e(e){let{gen:t,schema:r,validateName:n}=e;r===!1?pY(e,!1):typeof r=="object"&&r.$async===!0?t.return(q6e.default.data):(t.assign((0,x6e._)`${n}.errors`,null),t.return(!0))}s(k6e,"topBoolOrEmptySchema");Hh.topBoolOrEmptySchema=k6e;function B6e(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),pY(e)):r.var(t,!0)}s(B6e,"boolOrEmptySchema");Hh.boolOrEmptySchema=B6e;function pY(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,U6e.reportError)(i,F6e,void 0,t)}s(pY,"falseSchemaError")});var Lj=h(Kh=>{"use strict";Object.defineProperty(Kh,"__esModule",{value:!0});Kh.getRules=Kh.isJSONType=void 0;var G6e=["string","number","integer","boolean","null","object","array"],V6e=new Set(G6e);function z6e(e){return typeof e=="string"&&V6e.has(e)}s(z6e,"isJSONType");Kh.isJSONType=z6e;function H6e(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}s(H6e,"getRules");Kh.getRules=H6e});var jj=h(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});Pc.shouldUseRule=Pc.shouldUseGroup=Pc.schemaHasRulesForType=void 0;function K6e({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&mY(e,n)}s(K6e,"schemaHasRulesForType");Pc.schemaHasRulesForType=K6e;function mY(e,t){return t.rules.some(r=>_Y(e,r))}s(mY,"shouldUseGroup");Pc.shouldUseGroup=mY;function _Y(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}s(_Y,"shouldUseRule");Pc.shouldUseRule=_Y});var e0=h(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.reportTypeError=en.checkDataTypes=en.checkDataType=en.coerceAndCheckDataType=en.getJSONTypes=en.getSchemaTypes=en.DataType=void 0;var W6e=Lj(),Y6e=jj(),J6e=Zy(),Ne=Re(),gY=pt(),Qy;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Qy=en.DataType||(en.DataType={}));function X6e(e){let t=yY(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}s(X6e,"getSchemaTypes");en.getSchemaTypes=X6e;function yY(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(W6e.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}s(yY,"getJSONTypes");en.getJSONTypes=yY;function Z6e(e,t){let{gen:r,data:n,opts:i}=e,o=Q6e(t,i.coerceTypes),a=t.length>0&&!(o.length===0&&t.length===1&&(0,Y6e.schemaHasRulesForType)(e,t[0]));if(a){let u=Uj(t,n,i.strictNumbers,Qy.Wrong);r.if(u,()=>{o.length?e8e(e,t,o):xj(e)})}return a}s(Z6e,"coerceAndCheckDataType");en.coerceAndCheckDataType=Z6e;var EY=new Set(["string","number","integer","boolean","null"]);function Q6e(e,t){return t?e.filter(r=>EY.has(r)||t==="array"&&r==="array"):[]}s(Q6e,"coerceToTypes");function e8e(e,t,r){let{gen:n,data:i,opts:o}=e,a=n.let("dataType",(0,Ne._)`typeof ${i}`),u=n.let("coerced",(0,Ne._)`undefined`);o.coerceTypes==="array"&&n.if((0,Ne._)`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Ne._)`${i}[0]`).assign(a,(0,Ne._)`typeof ${i}`).if(Uj(t,i,o.strictNumbers),()=>n.assign(u,i))),n.if((0,Ne._)`${u} !== undefined`);for(let l of r)(EY.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);n.else(),xj(e),n.endIf(),n.if((0,Ne._)`${u} !== undefined`,()=>{n.assign(i,u),t8e(e,u)});function c(l){switch(l){case"string":n.elseIf((0,Ne._)`${a} == "number" || ${a} == "boolean"`).assign(u,(0,Ne._)`"" + ${i}`).elseIf((0,Ne._)`${i} === null`).assign(u,(0,Ne._)`""`);return;case"number":n.elseIf((0,Ne._)`${a} == "boolean" || ${i} === null
143
143
  || (${a} == "string" && ${i} && ${i} == +${i})`).assign(u,(0,Ne._)`+${i}`);return;case"integer":n.elseIf((0,Ne._)`${a} === "boolean" || ${i} === null
144
144
  || (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(u,(0,Ne._)`+${i}`);return;case"boolean":n.elseIf((0,Ne._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(u,!1).elseIf((0,Ne._)`${i} === "true" || ${i} === 1`).assign(u,!0);return;case"null":n.elseIf((0,Ne._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(u,null);return;case"array":n.elseIf((0,Ne._)`${a} === "string" || ${a} === "number"
145
- || ${a} === "boolean" || ${i} === null`).assign(u,(0,Ne._)`[${i}]`)}}s(c,"coerceSpecificType")}s(e8e,"coerceData");function t8e({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Ne._)`${t} !== undefined`,()=>e.assign((0,Ne._)`${t}[${r}]`,n))}s(t8e,"assignParentData");function Mj(e,t,r,n=Qy.Correct){let i=n===Qy.Correct?Ne.operators.EQ:Ne.operators.NEQ,o;switch(e){case"null":return(0,Ne._)`${t} ${i} null`;case"array":o=(0,Ne._)`Array.isArray(${t})`;break;case"object":o=(0,Ne._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a((0,Ne._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return(0,Ne._)`typeof ${t} ${i} ${e}`}return n===Qy.Correct?o:(0,Ne.not)(o);function a(u=Ne.nil){return(0,Ne.and)((0,Ne._)`typeof ${t} == "number"`,u,r?(0,Ne._)`isFinite(${t})`:Ne.nil)}}s(Mj,"checkDataType");en.checkDataType=Mj;function Uj(e,t,r,n){if(e.length===1)return Mj(e[0],t,r,n);let i,o=(0,gY.toHash)(e);if(o.array&&o.object){let a=(0,Ne._)`typeof ${t} != "object"`;i=o.null?a:(0,Ne._)`!${t} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Ne.nil;o.number&&delete o.integer;for(let a in o)i=(0,Ne.and)(i,Mj(a,t,r,n));return i}s(Uj,"checkDataTypes");en.checkDataTypes=Uj;var r8e={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Ne._)`{type: ${e}}`:(0,Ne._)`{type: ${t}}`};function xj(e){let t=n8e(e);(0,J6e.reportError)(t,r8e)}s(xj,"reportTypeError");en.reportTypeError=xj;function n8e(e){let{gen:t,data:r,schema:n}=e,i=(0,gY.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}s(n8e,"getTypeErrorContext")});var SY=h(Tw=>{"use strict";Object.defineProperty(Tw,"__esModule",{value:!0});Tw.assignDefaults=void 0;var Wh=Re(),i8e=pt();function s8e(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)bY(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,o)=>bY(e,o,i.default))}s(s8e,"assignDefaults");Tw.assignDefaults=s8e;function bY(e,t,r){let{gen:n,compositeRule:i,data:o,opts:a}=e;if(r===void 0)return;let u=(0,Wh._)`${o}${(0,Wh.getProperty)(t)}`;if(i){(0,i8e.checkStrictMode)(e,`default is ignored for: ${u}`);return}let c=(0,Wh._)`${u} === undefined`;a.useDefaults==="empty"&&(c=(0,Wh._)`${c} || ${u} === null || ${u} === ""`),n.if(c,(0,Wh._)`${u} = ${(0,Wh.stringify)(r)}`)}s(bY,"assignDefault")});var Es=h(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.validateUnion=Ct.validateArray=Ct.usePattern=Ct.callValidateCode=Ct.schemaProperties=Ct.allSchemaProperties=Ct.noPropertyInData=Ct.propertyInData=Ct.isOwnProperty=Ct.hasPropFunc=Ct.reportMissingProp=Ct.checkMissingProp=Ct.checkReportMissingProp=void 0;var Gt=Re(),qj=pt(),wc=fu(),o8e=pt();function a8e(e,t){let{gen:r,data:n,it:i}=e;r.if(kj(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Gt._)`${t}`},!0),e.error()})}s(a8e,"checkReportMissingProp");Ct.checkReportMissingProp=a8e;function u8e({gen:e,data:t,it:{opts:r}},n,i){return(0,Gt.or)(...n.map(o=>(0,Gt.and)(kj(e,t,o,r.ownProperties),(0,Gt._)`${i} = ${o}`)))}s(u8e,"checkMissingProp");Ct.checkMissingProp=u8e;function c8e(e,t){e.setParams({missingProperty:t},!0),e.error()}s(c8e,"reportMissingProp");Ct.reportMissingProp=c8e;function vY(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Gt._)`Object.prototype.hasOwnProperty`})}s(vY,"hasPropFunc");Ct.hasPropFunc=vY;function Fj(e,t,r){return(0,Gt._)`${vY(e)}.call(${t}, ${r})`}s(Fj,"isOwnProperty");Ct.isOwnProperty=Fj;function l8e(e,t,r,n){let i=(0,Gt._)`${t}${(0,Gt.getProperty)(r)} !== undefined`;return n?(0,Gt._)`${i} && ${Fj(e,t,r)}`:i}s(l8e,"propertyInData");Ct.propertyInData=l8e;function kj(e,t,r,n){let i=(0,Gt._)`${t}${(0,Gt.getProperty)(r)} === undefined`;return n?(0,Gt.or)(i,(0,Gt.not)(Fj(e,t,r))):i}s(kj,"noPropertyInData");Ct.noPropertyInData=kj;function OY(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}s(OY,"allSchemaProperties");Ct.allSchemaProperties=OY;function f8e(e,t){return OY(t).filter(r=>!(0,qj.alwaysValidSchema)(e,t[r]))}s(f8e,"schemaProperties");Ct.schemaProperties=f8e;function d8e({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},u,c,l){let f=l?(0,Gt._)`${e}, ${t}, ${n}${i}`:t,d=[[wc.default.instancePath,(0,Gt.strConcat)(wc.default.instancePath,o)],[wc.default.parentData,a.parentData],[wc.default.parentDataProperty,a.parentDataProperty],[wc.default.rootData,wc.default.rootData]];a.opts.dynamicRef&&d.push([wc.default.dynamicAnchors,wc.default.dynamicAnchors]);let _=(0,Gt._)`${f}, ${r.object(...d)}`;return c!==Gt.nil?(0,Gt._)`${u}.call(${c}, ${_})`:(0,Gt._)`${u}(${_})`}s(d8e,"callValidateCode");Ct.callValidateCode=d8e;var p8e=(0,Gt._)`new RegExp`;function h8e({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,o=i(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Gt._)`${i.code==="new RegExp"?p8e:(0,o8e.useFunc)(e,i)}(${r}, ${n})`})}s(h8e,"usePattern");Ct.usePattern=h8e;function m8e(e){let{gen:t,data:r,keyword:n,it:i}=e,o=t.name("valid");if(i.allErrors){let u=t.let("valid",!0);return a(()=>t.assign(u,!1)),u}return t.var(o,!0),a(()=>t.break()),o;function a(u){let c=t.const("len",(0,Gt._)`${r}.length`);t.forRange("i",0,c,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:qj.Type.Num},o),t.if((0,Gt.not)(o),u)})}s(a,"validateItems")}s(m8e,"validateArray");Ct.validateArray=m8e;function _8e(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,qj.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let a=t.let("valid",!1),u=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let f=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},u);t.assign(a,(0,Gt._)`${a} || ${u}`),e.mergeValidEvaluated(f,u)||t.if((0,Gt.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}s(_8e,"validateUnion");Ct.validateUnion=_8e});var IY=h(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.validateKeywordUsage=oa.validSchemaType=oa.funcKeywordCode=oa.macroKeywordCode=void 0;var Gn=Re(),ad=fu(),g8e=Es(),y8e=Zy();function E8e(e,t){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=e,u=t.macro.call(a.self,i,o,a),c=wY(r,n,u);a.opts.validateSchema!==!1&&a.self.validateSchema(u,!0);let l=r.name("valid");e.subschema({schema:u,schemaPath:Gn.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}s(E8e,"macroKeywordCode");oa.macroKeywordCode=E8e;function b8e(e,t){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:u,it:c}=e;v8e(c,t);let l=!u&&t.compile?t.compile.call(c.self,o,a,c):t.validate,f=wY(n,i,l),d=n.let("valid");e.block$data(d,_),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function _(){if(t.errors===!1)y(),t.modifying&&PY(e),b(()=>e.error());else{let E=t.async?m():g();t.modifying&&PY(e),b(()=>S8e(e,E))}}s(_,"validateKeyword");function m(){let E=n.let("ruleErrs",null);return n.try(()=>y((0,Gn._)`await `),S=>n.assign(d,!1).if((0,Gn._)`${S} instanceof ${c.ValidationError}`,()=>n.assign(E,(0,Gn._)`${S}.errors`),()=>n.throw(S))),E}s(m,"validateAsync");function g(){let E=(0,Gn._)`${f}.errors`;return n.assign(E,null),y(Gn.nil),E}s(g,"validateSync");function y(E=t.async?(0,Gn._)`await `:Gn.nil){let S=c.opts.passContext?ad.default.this:ad.default.self,O=!("compile"in t&&!u||t.schema===!1);n.assign(d,(0,Gn._)`${E}${(0,g8e.callValidateCode)(e,f,S,O)}`,t.modifying)}s(y,"assignValid");function b(E){var S;n.if((0,Gn.not)((S=t.valid)!==null&&S!==void 0?S:d),E)}s(b,"reportErrs")}s(b8e,"funcKeywordCode");oa.funcKeywordCode=b8e;function PY(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Gn._)`${n.parentData}[${n.parentDataProperty}]`))}s(PY,"modifyData");function S8e(e,t){let{gen:r}=e;r.if((0,Gn._)`Array.isArray(${t})`,()=>{r.assign(ad.default.vErrors,(0,Gn._)`${ad.default.vErrors} === null ? ${t} : ${ad.default.vErrors}.concat(${t})`).assign(ad.default.errors,(0,Gn._)`${ad.default.vErrors}.length`),(0,y8e.extendErrors)(e)},()=>e.error())}s(S8e,"addErrs");function v8e({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}s(v8e,"checkAsyncKeyword");function wY(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Gn.stringify)(r)})}s(wY,"useKeyword");function O8e(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}s(O8e,"validSchemaType");oa.validSchemaType=O8e;function P8e({schema:e,opts:t,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let a=i.dependencies;if(a?.some(u=>!Object.prototype.hasOwnProperty.call(e,u)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}s(P8e,"validateKeywordUsage");oa.validateKeywordUsage=P8e});var NY=h(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});Ic.extendSubschemaMode=Ic.extendSubschemaData=Ic.getSubschema=void 0;var aa=Re(),TY=pt();function w8e(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let u=e.schema[t];return r===void 0?{schema:u,schemaPath:(0,aa._)`${e.schemaPath}${(0,aa.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:u[r],schemaPath:(0,aa._)`${e.schemaPath}${(0,aa.getProperty)(t)}${(0,aa.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,TY.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}s(w8e,"getSubschema");Ic.getSubschema=w8e;function I8e(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:u}=t;if(r!==void 0){let{errorPath:l,dataPathArr:f,opts:d}=t,_=u.let("data",(0,aa._)`${t.data}${(0,aa.getProperty)(r)}`,!0);c(_),e.errorPath=(0,aa.str)`${l}${(0,TY.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,aa._)`${r}`,e.dataPathArr=[...f,e.parentDataProperty]}if(i!==void 0){let l=i instanceof aa.Name?i:u.let("data",i,!0);c(l),a!==void 0&&(e.propertyName=a)}o&&(e.dataTypes=o);function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}s(c,"dataContextProps")}s(I8e,"extendSubschemaData");Ic.extendSubschemaData=I8e;function T8e(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}s(T8e,"extendSubschemaMode");Ic.extendSubschemaMode=T8e});var t0=h(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.getSchemaRefs=Si.resolveUrl=Si.normalizeId=Si._getFullPath=Si.getFullPath=Si.inlineRef=void 0;var N8e=pt(),A8e=Xf(),R8e=JP(),C8e=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function $8e(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Bj(e):t?AY(e)<=t:!1}s($8e,"inlineRef");Si.inlineRef=$8e;var D8e=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Bj(e){for(let t in e){if(D8e.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Bj)||typeof r=="object"&&Bj(r))return!0}return!1}s(Bj,"hasRef");function AY(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!C8e.has(r)&&(typeof e[r]=="object"&&(0,N8e.eachItem)(e[r],n=>t+=AY(n)),t===1/0))return 1/0}return t}s(AY,"countKeys");function RY(e,t="",r){r!==!1&&(t=Yh(t));let n=e.parse(t);return CY(e,n)}s(RY,"getFullPath");Si.getFullPath=RY;function CY(e,t){return e.serialize(t).split("#")[0]+"#"}s(CY,"_getFullPath");Si._getFullPath=CY;var L8e=/#\/?$/;function Yh(e){return e?e.replace(L8e,""):""}s(Yh,"normalizeId");Si.normalizeId=Yh;function j8e(e,t,r){return r=Yh(r),e.resolve(t,r)}s(j8e,"resolveUrl");Si.resolveUrl=j8e;var M8e=/^[a-z_][-a-z0-9._]*$/i;function U8e(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Yh(e[r]||t),o={"":i},a=RY(n,i,!1),u={},c=new Set;return R8e(e,{allKeys:!0},(d,_,m,g)=>{if(g===void 0)return;let y=a+_,b=o[g];typeof d[r]=="string"&&(b=E.call(this,d[r])),S.call(this,d.$anchor),S.call(this,d.$dynamicAnchor),o[_]=b;function E(O){let P=this.opts.uriResolver.resolve;if(O=Yh(b?P(b,O):O),c.has(O))throw f(O);c.add(O);let I=this.refs[O];return typeof I=="string"&&(I=this.refs[I]),typeof I=="object"?l(d,I.schema,O):O!==Yh(y)&&(O[0]==="#"?(l(d,u[O],O),u[O]=d):this.refs[O]=y),O}s(E,"addRef");function S(O){if(typeof O=="string"){if(!M8e.test(O))throw new Error(`invalid anchor "${O}"`);E.call(this,`#${O}`)}}s(S,"addAnchor")}),u;function l(d,_,m){if(_!==void 0&&!A8e(d,_))throw f(m)}s(l,"checkAmbiguosRef");function f(d){return new Error(`reference "${d}" resolves to more than one schema`)}s(f,"ambiguos")}s(U8e,"getSchemaRefs");Si.getSchemaRefs=U8e});var i0=h(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});Tc.getData=Tc.KeywordCxt=Tc.validateFunctionCode=void 0;var MY=hY(),$Y=e0(),Vj=jj(),Nw=e0(),x8e=SY(),n0=IY(),Gj=NY(),ue=Re(),be=fu(),q8e=t0(),du=pt(),r0=Zy();function F8e(e){if(qY(e)&&(FY(e),xY(e))){G8e(e);return}UY(e,()=>(0,MY.topBoolOrEmptySchema)(e))}s(F8e,"validateFunctionCode");Tc.validateFunctionCode=F8e;function UY({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,(0,ue._)`${be.default.data}, ${be.default.valCxt}`,n.$async,()=>{e.code((0,ue._)`"use strict"; ${DY(r,i)}`),B8e(e,i),e.code(o)}):e.func(t,(0,ue._)`${be.default.data}, ${k8e(i)}`,n.$async,()=>e.code(DY(r,i)).code(o))}s(UY,"validateFunction");function k8e(e){return(0,ue._)`{${be.default.instancePath}="", ${be.default.parentData}, ${be.default.parentDataProperty}, ${be.default.rootData}=${be.default.data}${e.dynamicRef?(0,ue._)`, ${be.default.dynamicAnchors}={}`:ue.nil}}={}`}s(k8e,"destructureValCxt");function B8e(e,t){e.if(be.default.valCxt,()=>{e.var(be.default.instancePath,(0,ue._)`${be.default.valCxt}.${be.default.instancePath}`),e.var(be.default.parentData,(0,ue._)`${be.default.valCxt}.${be.default.parentData}`),e.var(be.default.parentDataProperty,(0,ue._)`${be.default.valCxt}.${be.default.parentDataProperty}`),e.var(be.default.rootData,(0,ue._)`${be.default.valCxt}.${be.default.rootData}`),t.dynamicRef&&e.var(be.default.dynamicAnchors,(0,ue._)`${be.default.valCxt}.${be.default.dynamicAnchors}`)},()=>{e.var(be.default.instancePath,(0,ue._)`""`),e.var(be.default.parentData,(0,ue._)`undefined`),e.var(be.default.parentDataProperty,(0,ue._)`undefined`),e.var(be.default.rootData,be.default.data),t.dynamicRef&&e.var(be.default.dynamicAnchors,(0,ue._)`{}`)})}s(B8e,"destructureValCxtES5");function G8e(e){let{schema:t,opts:r,gen:n}=e;UY(e,()=>{r.$comment&&t.$comment&&BY(e),W8e(e),n.let(be.default.vErrors,null),n.let(be.default.errors,0),r.unevaluated&&V8e(e),kY(e),X8e(e)})}s(G8e,"topSchemaObjCode");function V8e(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,ue._)`${r}.evaluated`),t.if((0,ue._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,ue._)`${e.evaluated}.props`,(0,ue._)`undefined`)),t.if((0,ue._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,ue._)`${e.evaluated}.items`,(0,ue._)`undefined`))}s(V8e,"resetEvaluated");function DY(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,ue._)`/*# sourceURL=${r} */`:ue.nil}s(DY,"funcSourceUrl");function z8e(e,t){if(qY(e)&&(FY(e),xY(e))){H8e(e,t);return}(0,MY.boolOrEmptySchema)(e,t)}s(z8e,"subschemaCode");function xY({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}s(xY,"schemaCxtHasRules");function qY(e){return typeof e.schema!="boolean"}s(qY,"isSchemaObj");function H8e(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&BY(e),Y8e(e),J8e(e);let o=n.const("_errs",be.default.errors);kY(e,o),n.var(t,(0,ue._)`${o} === ${be.default.errors}`)}s(H8e,"subSchemaObjCode");function FY(e){(0,du.checkUnknownRules)(e),K8e(e)}s(FY,"checkKeywords");function kY(e,t){if(e.opts.jtd)return LY(e,[],!1,t);let r=(0,$Y.getSchemaTypes)(e.schema),n=(0,$Y.coerceAndCheckDataType)(e,r);LY(e,r,!n,t)}s(kY,"typeAndKeywords");function K8e(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,du.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}s(K8e,"checkRefsAndKeywords");function W8e(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,du.checkStrictMode)(e,"default is ignored in the schema root")}s(W8e,"checkNoDefault");function Y8e(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,q8e.resolveUrl)(e.opts.uriResolver,e.baseId,t))}s(Y8e,"updateContext");function J8e(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}s(J8e,"checkAsyncSchema");function BY({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)e.code((0,ue._)`${be.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,ue.str)`${n}/$comment`,u=e.scopeValue("root",{ref:t.root});e.code((0,ue._)`${be.default.self}.opts.$comment(${o}, ${a}, ${u}.schema)`)}}s(BY,"commentKeyword");function X8e(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if((0,ue._)`${be.default.errors} === 0`,()=>t.return(be.default.data),()=>t.throw((0,ue._)`new ${i}(${be.default.vErrors})`)):(t.assign((0,ue._)`${n}.errors`,be.default.vErrors),o.unevaluated&&Z8e(e),t.return((0,ue._)`${be.default.errors} === 0`))}s(X8e,"returnResults");function Z8e({gen:e,evaluated:t,props:r,items:n}){r instanceof ue.Name&&e.assign((0,ue._)`${t}.props`,r),n instanceof ue.Name&&e.assign((0,ue._)`${t}.items`,n)}s(Z8e,"assignEvaluated");function LY(e,t,r,n){let{gen:i,schema:o,data:a,allErrors:u,opts:c,self:l}=e,{RULES:f}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,du.schemaHasRulesButRef)(o,f))){i.block(()=>VY(e,"$ref",f.all.$ref.definition));return}c.jtd||Q8e(e,t),i.block(()=>{for(let _ of f.rules)d(_);d(f.post)});function d(_){(0,Vj.shouldUseGroup)(o,_)&&(_.type?(i.if((0,Nw.checkDataType)(_.type,a,c.strictNumbers)),jY(e,_),t.length===1&&t[0]===_.type&&r&&(i.else(),(0,Nw.reportTypeError)(e)),i.endIf()):jY(e,_),u||i.if((0,ue._)`${be.default.errors} === ${n||0}`))}s(d,"groupKeywords")}s(LY,"schemaKeywords");function jY(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,x8e.assignDefaults)(e,t.type),r.block(()=>{for(let o of t.rules)(0,Vj.shouldUseRule)(n,o)&&VY(e,o.keyword,o.definition,t.type)})}s(jY,"iterateKeywords");function Q8e(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(eVe(e,t),e.opts.allowUnionTypes||tVe(e,t),rVe(e,e.dataTypes))}s(Q8e,"checkStrictTypes");function eVe(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{GY(e.dataTypes,r)||zj(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),iVe(e,t)}}s(eVe,"checkContextTypes");function tVe(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&zj(e,"use allowUnionTypes to allow union type keyword")}s(tVe,"checkMultipleTypes");function rVe(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Vj.shouldUseRule)(e.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>nVe(t,a))&&zj(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}s(rVe,"checkKeywordTypes");function nVe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}s(nVe,"hasApplicableType");function GY(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}s(GY,"includesType");function iVe(e,t){let r=[];for(let n of e.dataTypes)GY(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}s(iVe,"narrowSchemaTypes");function zj(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,du.checkStrictMode)(e,t,e.opts.strictTypes)}s(zj,"strictTypesError");var Aw=class{static{s(this,"KeywordCxt")}constructor(t,r,n){if((0,n0.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,du.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",zY(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,n0.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",be.default.errors))}result(t,r,n){this.failResult((0,ue.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,ue.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,ue._)`${r} !== undefined && (${(0,ue.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?r0.reportExtraError:r0.reportError)(this,this.def.error,r)}$dataError(){(0,r0.reportError)(this,this.def.$dataError||r0.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,r0.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=ue.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=ue.nil,r=ue.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,ue.or)((0,ue._)`${i} === undefined`,r)),t!==ue.nil&&n.assign(t,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==ue.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,ue.or)(a(),u());function a(){if(n.length){if(!(r instanceof ue.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,ue._)`${(0,Nw.checkDataTypes)(c,r,o.opts.strictNumbers,Nw.DataType.Wrong)}`}return ue.nil}function u(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,ue._)`!${c}(${r})`}return ue.nil}}subschema(t,r){let n=(0,Gj.getSubschema)(this.it,t);(0,Gj.extendSubschemaData)(n,this.it,t),(0,Gj.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return z8e(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=du.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=du.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,ue.Name)),!0}};Tc.KeywordCxt=Aw;function VY(e,t,r,n){let i=new Aw(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,n0.funcKeywordCode)(i,r):"macro"in r?(0,n0.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,n0.funcKeywordCode)(i,r)}s(VY,"keywordCode");var sVe=/^\/(?:[^~]|~0|~1)*$/,oVe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function zY(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(e==="")return be.default.rootData;if(e[0]==="/"){if(!sVe.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=be.default.rootData}else{let l=oVe.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);let f=+l[1];if(i=l[2],i==="#"){if(f>=t)throw new Error(c("property/index",f));return n[t-f]}if(f>t)throw new Error(c("data",f));if(o=r[t-f],!i)return o}let a=o,u=i.split("/");for(let l of u)l&&(o=(0,ue._)`${o}${(0,ue.getProperty)((0,du.unescapeJsonPointer)(l))}`,a=(0,ue._)`${a} && ${o}`);return a;function c(l,f){return`Cannot access ${l} ${f} levels up, current level is ${t}`}}s(zY,"getData");Tc.getData=zY});var Rw=h(Kj=>{"use strict";Object.defineProperty(Kj,"__esModule",{value:!0});var Hj=class extends Error{static{s(this,"ValidationError")}constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Kj.default=Hj});var Cw=h(Jj=>{"use strict";Object.defineProperty(Jj,"__esModule",{value:!0});var Wj=t0(),Yj=class extends Error{static{s(this,"MissingRefError")}constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Wj.resolveUrl)(t,r,n),this.missingSchema=(0,Wj.normalizeId)((0,Wj.getFullPath)(t,this.missingRef))}};Jj.default=Yj});var Dw=h(bs=>{"use strict";Object.defineProperty(bs,"__esModule",{value:!0});bs.resolveSchema=bs.getCompilingSchema=bs.resolveRef=bs.compileSchema=bs.SchemaEnv=void 0;var lo=Re(),aVe=Rw(),ud=fu(),fo=t0(),HY=pt(),uVe=i0(),Jh=class{static{s(this,"SchemaEnv")}constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,fo.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};bs.SchemaEnv=Jh;function Zj(e){let t=KY.call(this,e);if(t)return t;let r=(0,fo.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new lo.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),u;e.$async&&(u=a.scopeValue("Error",{ref:aVe.default,code:(0,lo._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let l={gen:a,allErrors:this.opts.allErrors,data:ud.default.data,parentData:ud.default.parentData,parentDataProperty:ud.default.parentDataProperty,dataNames:[ud.default.data],dataPathArr:[lo.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,lo.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:lo.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,lo._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(e),(0,uVe.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);let d=a.toString();f=`${a.scopeRefs(ud.default.scope)}return ${d}`,this.opts.code.process&&(f=this.opts.code.process(f,e));let m=new Function(`${ud.default.self}`,`${ud.default.scope}`,f)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:g,items:y}=l;m.evaluated={props:g instanceof lo.Name?void 0:g,items:y instanceof lo.Name?void 0:y,dynamicProps:g instanceof lo.Name,dynamicItems:y instanceof lo.Name},m.source&&(m.source.evaluated=(0,lo.stringify)(m.evaluated))}return e.validate=m,e}catch(d){throw delete e.validate,delete e.validateName,f&&this.logger.error("Error compiling schema, function code:",f),d}finally{this._compilations.delete(e)}}s(Zj,"compileSchema");bs.compileSchema=Zj;function cVe(e,t,r){var n;r=(0,fo.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let o=dVe.call(this,e,r);if(o===void 0){let a=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:u}=this.opts;a&&(o=new Jh({schema:a,schemaId:u,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=lVe.call(this,o)}s(cVe,"resolveRef");bs.resolveRef=cVe;function lVe(e){return(0,fo.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Zj.call(this,e)}s(lVe,"inlineOrCompile");function KY(e){for(let t of this._compilations)if(fVe(t,e))return t}s(KY,"getCompilingSchema");bs.getCompilingSchema=KY;function fVe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}s(fVe,"sameSchemaEnv");function dVe(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||$w.call(this,e,t)}s(dVe,"resolve");function $w(e,t){let r=this.opts.uriResolver.parse(t),n=(0,fo._getFullPath)(this.opts.uriResolver,r),i=(0,fo.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return Xj.call(this,r,e);let o=(0,fo.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let u=$w.call(this,e,a);return typeof u?.schema!="object"?void 0:Xj.call(this,r,u)}if(typeof a?.schema=="object"){if(a.validate||Zj.call(this,a),o===(0,fo.normalizeId)(t)){let{schema:u}=a,{schemaId:c}=this.opts,l=u[c];return l&&(i=(0,fo.resolveUrl)(this.opts.uriResolver,i,l)),new Jh({schema:u,schemaId:c,root:e,baseId:i})}return Xj.call(this,r,a)}}s($w,"resolveSchema");bs.resolveSchema=$w;var pVe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Xj(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let u of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,HY.unescapeFragment)(u)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!pVe.has(u)&&l&&(t=(0,fo.resolveUrl)(this.opts.uriResolver,t,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,HY.schemaHasRulesButRef)(r,this.RULES)){let u=(0,fo.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=$w.call(this,n,u)}let{schemaId:a}=this.opts;if(o=o||new Jh({schema:r,schemaId:a,root:n,baseId:t}),o.schema!==o.root.schema)return o}s(Xj,"getJsonPointer")});var WY=h((YRt,hVe)=>{hVe.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var JY=h(Qj=>{"use strict";Object.defineProperty(Qj,"__esModule",{value:!0});var YY=tw();YY.code='require("ajv/dist/runtime/uri").default';Qj.default=YY});var iJ=h(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.CodeGen=tn.Name=tn.nil=tn.stringify=tn.str=tn._=tn.KeywordCxt=void 0;var mVe=i0();Object.defineProperty(tn,"KeywordCxt",{enumerable:!0,get:function(){return mVe.KeywordCxt}});var Xh=Re();Object.defineProperty(tn,"_",{enumerable:!0,get:function(){return Xh._}});Object.defineProperty(tn,"str",{enumerable:!0,get:function(){return Xh.str}});Object.defineProperty(tn,"stringify",{enumerable:!0,get:function(){return Xh.stringify}});Object.defineProperty(tn,"nil",{enumerable:!0,get:function(){return Xh.nil}});Object.defineProperty(tn,"Name",{enumerable:!0,get:function(){return Xh.Name}});Object.defineProperty(tn,"CodeGen",{enumerable:!0,get:function(){return Xh.CodeGen}});var _Ve=Rw(),tJ=Cw(),gVe=Lj(),s0=Dw(),yVe=Re(),o0=t0(),Lw=e0(),tM=pt(),XY=WY(),EVe=JY(),rJ=s((e,t)=>new RegExp(e,t),"defaultRegExp");rJ.code="new RegExp";var bVe=["removeAdditional","useDefaults","coerceTypes"],SVe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),vVe={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},OVe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},ZY=200;function PVe(e){var t,r,n,i,o,a,u,c,l,f,d,_,m,g,y,b,E,S,O,P,I,j,x,H,K;let Q=e.strict,de=(t=e.code)===null||t===void 0?void 0:t.optimize,re=de===!0||de===void 0?1:de||0,he=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:rJ,$e=(i=e.uriResolver)!==null&&i!==void 0?i:EVe.default;return{strictSchema:(a=(o=e.strictSchema)!==null&&o!==void 0?o:Q)!==null&&a!==void 0?a:!0,strictNumbers:(c=(u=e.strictNumbers)!==null&&u!==void 0?u:Q)!==null&&c!==void 0?c:!0,strictTypes:(f=(l=e.strictTypes)!==null&&l!==void 0?l:Q)!==null&&f!==void 0?f:"log",strictTuples:(_=(d=e.strictTuples)!==null&&d!==void 0?d:Q)!==null&&_!==void 0?_:"log",strictRequired:(g=(m=e.strictRequired)!==null&&m!==void 0?m:Q)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:re,regExp:he}:{optimize:re,regExp:he},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:ZY,loopEnum:(b=e.loopEnum)!==null&&b!==void 0?b:ZY,meta:(E=e.meta)!==null&&E!==void 0?E:!0,messages:(S=e.messages)!==null&&S!==void 0?S:!0,inlineRefs:(O=e.inlineRefs)!==null&&O!==void 0?O:!0,schemaId:(P=e.schemaId)!==null&&P!==void 0?P:"$id",addUsedSchema:(I=e.addUsedSchema)!==null&&I!==void 0?I:!0,validateSchema:(j=e.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(x=e.validateFormats)!==null&&x!==void 0?x:!0,unicodeRegExp:(H=e.unicodeRegExp)!==null&&H!==void 0?H:!0,int32range:(K=e.int32range)!==null&&K!==void 0?K:!0,uriResolver:$e}}s(PVe,"requiredOptions");var a0=class{static{s(this,"Ajv")}constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...PVe(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new yVe.ValueScope({scope:{},prefixes:SVe,es5:r,lines:n}),this.logger=RVe(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,gVe.getRules)(),QY.call(this,vVe,t,"NOT SUPPORTED"),QY.call(this,OVe,t,"DEPRECATED","warn"),this._metaOpts=NVe.call(this),t.formats&&IVe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&TVe.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),wVe.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=XY;n==="id"&&(i={...XY},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,t,r);async function i(f,d){await o.call(this,f.$schema);let _=this._addSchema(f,d);return _.validate||a.call(this,_)}async function o(f){f&&!this.getSchema(f)&&await i.call(this,{$ref:f},!0)}async function a(f){try{return this._compileSchemaEnv(f)}catch(d){if(!(d instanceof tJ.default))throw d;return u.call(this,d),await c.call(this,d.missingSchema),a.call(this,f)}}function u({missingSchema:f,missingRef:d}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${d} cannot be resolved`)}async function c(f){let d=await l.call(this,f);this.refs[f]||await o.call(this,d.$schema),this.refs[f]||this.addSchema(d,f,r)}async function l(f){let d=this._loading[f];if(d)return d;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,n,i);return this}let o;if(typeof t=="object"){let{schemaId:a}=this.opts;if(o=t[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,o0.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,t);if(!i&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(t){let r;for(;typeof(r=eJ.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new s0.SchemaEnv({schema:{},schemaId:n});if(r=s0.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=eJ.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,o0.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if($Ve.call(this,n,r),!r)return(0,tM.eachItem)(n,o=>eM.call(this,o)),this;LVe.call(this,r);let i={...r,type:(0,Lw.getJSONTypes)(r.type),schemaType:(0,Lw.getJSONTypes)(r.schemaType)};return(0,tM.eachItem)(n,i.type.length===0?o=>eM.call(this,o,i):o=>i.type.forEach(a=>eM.call(this,o,i,a))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let o=i.split("/").slice(1),a=t;for(let u of o)a=a[u];for(let u in n){let c=n[u];if(typeof c!="object")continue;let{$data:l}=c.definition,f=a[u];l&&f&&(a[u]=nJ(f))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:u}=this.opts;if(typeof t=="object")a=t[u];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,o0.normalizeId)(a||n);let l=o0.getSchemaRefs.call(this,t,n);return c=new s0.SchemaEnv({schema:t,schemaId:u,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):s0.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{s0.compileSchema.call(this,t)}finally{this.opts=r}}};tn.default=a0;a0.ValidationError=_Ve.default;a0.MissingRefError=tJ.default;function QY(e,t,r,n="error"){for(let i in e){let o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}s(QY,"checkOptions");function eJ(e){return e=(0,o0.normalizeId)(e),this.schemas[e]||this.refs[e]}s(eJ,"getSchEnv");function wVe(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}s(wVe,"addInitialSchemas");function IVe(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}s(IVe,"addInitialFormats");function TVe(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}s(TVe,"addInitialKeywords");function NVe(){let e={...this.opts};for(let t of bVe)delete e[t];return e}s(NVe,"getMetaSchemaOptions");var AVe={log(){},warn(){},error(){}};function RVe(e){if(e===!1)return AVe;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}s(RVe,"getLogger");var CVe=/^[a-z_$][a-z0-9_$:-]*$/i;function $Ve(e,t){let{RULES:r}=this;if((0,tM.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!CVe.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}s($Ve,"checkKeyword");function eM(e,t,r){var n;let i=t?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[e]=!0,!t)return;let u={keyword:e,definition:{...t,type:(0,Lw.getJSONTypes)(t.type),schemaType:(0,Lw.getJSONTypes)(t.schemaType)}};t.before?DVe.call(this,a,u,t.before):a.rules.push(u),o.all[e]=u,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}s(eM,"addRule");function DVe(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}s(DVe,"addBeforeRule");function LVe(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=nJ(t)),e.validateSchema=this.compile(t,!0))}s(LVe,"keywordMetaschema");var jVe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function nJ(e){return{anyOf:[e,jVe]}}s(nJ,"schemaOrData")});var sJ=h(rM=>{"use strict";Object.defineProperty(rM,"__esModule",{value:!0});var MVe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};rM.default=MVe});var cJ=h(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.callRef=cd.getValidate=void 0;var UVe=Cw(),oJ=Es(),vi=Re(),Zh=fu(),aJ=Dw(),jw=pt(),xVe={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:o,validateName:a,opts:u,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return d();let f=aJ.resolveRef.call(c,l,i,r);if(f===void 0)throw new UVe.default(n.opts.uriResolver,i,r);if(f instanceof aJ.SchemaEnv)return _(f);return m(f);function d(){if(o===l)return Mw(e,a,o,o.$async);let g=t.scopeValue("root",{ref:l});return Mw(e,(0,vi._)`${g}.validate`,l,l.$async)}function _(g){let y=uJ(e,g);Mw(e,y,g,g.$async)}function m(g){let y=t.scopeValue("schema",u.code.source===!0?{ref:g,code:(0,vi.stringify)(g)}:{ref:g}),b=t.name("valid"),E=e.subschema({schema:g,dataTypes:[],schemaPath:vi.nil,topSchemaRef:y,errSchemaPath:r},b);e.mergeEvaluated(E),e.ok(b)}}};function uJ(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,vi._)`${r.scopeValue("wrapper",{ref:t})}.validate`}s(uJ,"getValidate");cd.getValidate=uJ;function Mw(e,t,r,n){let{gen:i,it:o}=e,{allErrors:a,schemaEnv:u,opts:c}=o,l=c.passContext?Zh.default.this:vi.nil;n?f():d();function f(){if(!u.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,vi._)`await ${(0,oJ.callValidateCode)(e,t,l)}`),m(t),a||i.assign(g,!0)},y=>{i.if((0,vi._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),_(y),a||i.assign(g,!1)}),e.ok(g)}s(f,"callAsyncRef");function d(){e.result((0,oJ.callValidateCode)(e,t,l),()=>m(t),()=>_(t))}s(d,"callSyncRef");function _(g){let y=(0,vi._)`${g}.errors`;i.assign(Zh.default.vErrors,(0,vi._)`${Zh.default.vErrors} === null ? ${y} : ${Zh.default.vErrors}.concat(${y})`),i.assign(Zh.default.errors,(0,vi._)`${Zh.default.vErrors}.length`)}s(_,"addErrorsFrom");function m(g){var y;if(!o.opts.unevaluated)return;let b=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(b&&!b.dynamicProps)b.props!==void 0&&(o.props=jw.mergeEvaluated.props(i,b.props,o.props));else{let E=i.var("props",(0,vi._)`${g}.evaluated.props`);o.props=jw.mergeEvaluated.props(i,E,o.props,vi.Name)}if(o.items!==!0)if(b&&!b.dynamicItems)b.items!==void 0&&(o.items=jw.mergeEvaluated.items(i,b.items,o.items));else{let E=i.var("items",(0,vi._)`${g}.evaluated.items`);o.items=jw.mergeEvaluated.items(i,E,o.items,vi.Name)}}s(m,"addEvaluatedFrom")}s(Mw,"callRef");cd.callRef=Mw;cd.default=xVe});var lJ=h(nM=>{"use strict";Object.defineProperty(nM,"__esModule",{value:!0});var qVe=sJ(),FVe=cJ(),kVe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",qVe.default,FVe.default];nM.default=kVe});var fJ=h(iM=>{"use strict";Object.defineProperty(iM,"__esModule",{value:!0});var Uw=Re(),Nc=Uw.operators,xw={maximum:{okStr:"<=",ok:Nc.LTE,fail:Nc.GT},minimum:{okStr:">=",ok:Nc.GTE,fail:Nc.LT},exclusiveMaximum:{okStr:"<",ok:Nc.LT,fail:Nc.GTE},exclusiveMinimum:{okStr:">",ok:Nc.GT,fail:Nc.LTE}},BVe={message:({keyword:e,schemaCode:t})=>(0,Uw.str)`must be ${xw[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Uw._)`{comparison: ${xw[e].okStr}, limit: ${t}}`},GVe={keyword:Object.keys(xw),type:"number",schemaType:"number",$data:!0,error:BVe,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,Uw._)`${r} ${xw[t].fail} ${n} || isNaN(${r})`)}};iM.default=GVe});var dJ=h(sM=>{"use strict";Object.defineProperty(sM,"__esModule",{value:!0});var u0=Re(),VVe={message:({schemaCode:e})=>(0,u0.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,u0._)`{multipleOf: ${e}}`},zVe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:VVe,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,o=i.opts.multipleOfPrecision,a=t.let("res"),u=o?(0,u0._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,u0._)`${a} !== parseInt(${a})`;e.fail$data((0,u0._)`(${n} === 0 || (${a} = ${r}/${n}, ${u}))`)}};sM.default=zVe});var hJ=h(oM=>{"use strict";Object.defineProperty(oM,"__esModule",{value:!0});function pJ(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}s(pJ,"ucs2length");oM.default=pJ;pJ.code='require("ajv/dist/runtime/ucs2length").default'});var mJ=h(aM=>{"use strict";Object.defineProperty(aM,"__esModule",{value:!0});var ld=Re(),HVe=pt(),KVe=hJ(),WVe={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,ld.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,ld._)`{limit: ${e}}`},YVe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:WVe,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,o=t==="maxLength"?ld.operators.GT:ld.operators.LT,a=i.opts.unicode===!1?(0,ld._)`${r}.length`:(0,ld._)`${(0,HVe.useFunc)(e.gen,KVe.default)}(${r})`;e.fail$data((0,ld._)`${a} ${o} ${n}`)}};aM.default=YVe});var _J=h(uM=>{"use strict";Object.defineProperty(uM,"__esModule",{value:!0});var JVe=Es(),qw=Re(),XVe={message:({schemaCode:e})=>(0,qw.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,qw._)`{pattern: ${e}}`},ZVe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:XVe,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:o}=e,a=o.opts.unicodeRegExp?"u":"",u=r?(0,qw._)`(new RegExp(${i}, ${a}))`:(0,JVe.usePattern)(e,n);e.fail$data((0,qw._)`!${u}.test(${t})`)}};uM.default=ZVe});var gJ=h(cM=>{"use strict";Object.defineProperty(cM,"__esModule",{value:!0});var c0=Re(),QVe={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,c0.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,c0._)`{limit: ${e}}`},eze={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:QVe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?c0.operators.GT:c0.operators.LT;e.fail$data((0,c0._)`Object.keys(${r}).length ${i} ${n}`)}};cM.default=eze});var yJ=h(lM=>{"use strict";Object.defineProperty(lM,"__esModule",{value:!0});var l0=Es(),f0=Re(),tze=pt(),rze={message:({params:{missingProperty:e}})=>(0,f0.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,f0._)`{missingProperty: ${e}}`},nze={keyword:"required",type:"object",schemaType:"array",$data:!0,error:rze,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:o,it:a}=e,{opts:u}=a;if(!o&&r.length===0)return;let c=r.length>=u.loopRequired;if(a.allErrors?l():f(),u.strictRequired){let m=e.parentSchema.properties,{definedProperties:g}=e.it;for(let y of r)if(m?.[y]===void 0&&!g.has(y)){let b=a.schemaEnv.baseId+a.errSchemaPath,E=`required property "${y}" is not defined at "${b}" (strictRequired)`;(0,tze.checkStrictMode)(a,E,a.opts.strictRequired)}}function l(){if(c||o)e.block$data(f0.nil,d);else for(let m of r)(0,l0.checkReportMissingProp)(e,m)}s(l,"allErrorsMode");function f(){let m=t.let("missing");if(c||o){let g=t.let("valid",!0);e.block$data(g,()=>_(m,g)),e.ok(g)}else t.if((0,l0.checkMissingProp)(e,r,m)),(0,l0.reportMissingProp)(e,m),t.else()}s(f,"exitOnErrorMode");function d(){t.forOf("prop",n,m=>{e.setParams({missingProperty:m}),t.if((0,l0.noPropertyInData)(t,i,m,u.ownProperties),()=>e.error())})}s(d,"loopAllRequired");function _(m,g){e.setParams({missingProperty:m}),t.forOf(m,n,()=>{t.assign(g,(0,l0.propertyInData)(t,i,m,u.ownProperties)),t.if((0,f0.not)(g),()=>{e.error(),t.break()})},f0.nil)}s(_,"loopUntilMissing")}};lM.default=nze});var EJ=h(fM=>{"use strict";Object.defineProperty(fM,"__esModule",{value:!0});var d0=Re(),ize={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,d0.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,d0._)`{limit: ${e}}`},sze={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:ize,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?d0.operators.GT:d0.operators.LT;e.fail$data((0,d0._)`${r}.length ${i} ${n}`)}};fM.default=sze});var Fw=h(dM=>{"use strict";Object.defineProperty(dM,"__esModule",{value:!0});var bJ=Xf();bJ.code='require("ajv/dist/runtime/equal").default';dM.default=bJ});var SJ=h(hM=>{"use strict";Object.defineProperty(hM,"__esModule",{value:!0});var pM=e0(),rn=Re(),oze=pt(),aze=Fw(),uze={message:({params:{i:e,j:t}})=>(0,rn.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,rn._)`{i: ${e}, j: ${t}}`},cze={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:uze,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:u}=e;if(!n&&!i)return;let c=t.let("valid"),l=o.items?(0,pM.getSchemaTypes)(o.items):[];e.block$data(c,f,(0,rn._)`${a} === false`),e.ok(c);function f(){let g=t.let("i",(0,rn._)`${r}.length`),y=t.let("j");e.setParams({i:g,j:y}),t.assign(c,!0),t.if((0,rn._)`${g} > 1`,()=>(d()?_:m)(g,y))}s(f,"validateUniqueItems");function d(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}s(d,"canOptimize");function _(g,y){let b=t.name("item"),E=(0,pM.checkDataTypes)(l,b,u.opts.strictNumbers,pM.DataType.Wrong),S=t.const("indices",(0,rn._)`{}`);t.for((0,rn._)`;${g}--;`,()=>{t.let(b,(0,rn._)`${r}[${g}]`),t.if(E,(0,rn._)`continue`),l.length>1&&t.if((0,rn._)`typeof ${b} == "string"`,(0,rn._)`${b} += "_"`),t.if((0,rn._)`typeof ${S}[${b}] == "number"`,()=>{t.assign(y,(0,rn._)`${S}[${b}]`),e.error(),t.assign(c,!1).break()}).code((0,rn._)`${S}[${b}] = ${g}`)})}s(_,"loopN");function m(g,y){let b=(0,oze.useFunc)(t,aze.default),E=t.name("outer");t.label(E).for((0,rn._)`;${g}--;`,()=>t.for((0,rn._)`${y} = ${g}; ${y}--;`,()=>t.if((0,rn._)`${b}(${r}[${g}], ${r}[${y}])`,()=>{e.error(),t.assign(c,!1).break(E)})))}s(m,"loopN2")}};hM.default=cze});var vJ=h(_M=>{"use strict";Object.defineProperty(_M,"__esModule",{value:!0});var mM=Re(),lze=pt(),fze=Fw(),dze={message:"must be equal to constant",params:({schemaCode:e})=>(0,mM._)`{allowedValue: ${e}}`},pze={keyword:"const",$data:!0,error:dze,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:o}=e;n||o&&typeof o=="object"?e.fail$data((0,mM._)`!${(0,lze.useFunc)(t,fze.default)}(${r}, ${i})`):e.fail((0,mM._)`${o} !== ${r}`)}};_M.default=pze});var OJ=h(gM=>{"use strict";Object.defineProperty(gM,"__esModule",{value:!0});var p0=Re(),hze=pt(),mze=Fw(),_ze={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,p0._)`{allowedValues: ${e}}`},gze={keyword:"enum",schemaType:"array",$data:!0,error:_ze,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:a}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let u=i.length>=a.opts.loopEnum,c,l=s(()=>c??(c=(0,hze.useFunc)(t,mze.default)),"getEql"),f;if(u||n)f=t.let("valid"),e.block$data(f,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=t.const("vSchema",o);f=(0,p0.or)(...i.map((g,y)=>_(m,y)))}e.pass(f);function d(){t.assign(f,!1),t.forOf("v",o,m=>t.if((0,p0._)`${l()}(${r}, ${m})`,()=>t.assign(f,!0).break()))}s(d,"loopEnum");function _(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,p0._)`${l()}(${r}, ${m}[${g}])`:(0,p0._)`${r} === ${y}`}s(_,"equalCode")}};gM.default=gze});var PJ=h(yM=>{"use strict";Object.defineProperty(yM,"__esModule",{value:!0});var yze=fJ(),Eze=dJ(),bze=mJ(),Sze=_J(),vze=gJ(),Oze=yJ(),Pze=EJ(),wze=SJ(),Ize=vJ(),Tze=OJ(),Nze=[yze.default,Eze.default,bze.default,Sze.default,vze.default,Oze.default,Pze.default,wze.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Ize.default,Tze.default];yM.default=Nze});var bM=h(h0=>{"use strict";Object.defineProperty(h0,"__esModule",{value:!0});h0.validateAdditionalItems=void 0;var fd=Re(),EM=pt(),Aze={message:({params:{len:e}})=>(0,fd.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,fd._)`{limit: ${e}}`},Rze={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Aze,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,EM.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}wJ(e,n)}};function wJ(e,t){let{gen:r,schema:n,data:i,keyword:o,it:a}=e;a.items=!0;let u=r.const("len",(0,fd._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,fd._)`${u} <= ${t.length}`);else if(typeof n=="object"&&!(0,EM.alwaysValidSchema)(a,n)){let l=r.var("valid",(0,fd._)`${u} <= ${t.length}`);r.if((0,fd.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,u,f=>{e.subschema({keyword:o,dataProp:f,dataPropType:EM.Type.Num},l),a.allErrors||r.if((0,fd.not)(l),()=>r.break())})}s(c,"validateItems")}s(wJ,"validateAdditionalItems");h0.validateAdditionalItems=wJ;h0.default=Rze});var SM=h(m0=>{"use strict";Object.defineProperty(m0,"__esModule",{value:!0});m0.validateTuple=void 0;var IJ=Re(),kw=pt(),Cze=Es(),$ze={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return TJ(e,"additionalItems",t);r.items=!0,!(0,kw.alwaysValidSchema)(r,t)&&e.ok((0,Cze.validateArray)(e))}};function TJ(e,t,r=e.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:u}=e;f(i),u.opts.unevaluated&&r.length&&u.items!==!0&&(u.items=kw.mergeEvaluated.items(n,r.length,u.items));let c=n.name("valid"),l=n.const("len",(0,IJ._)`${o}.length`);r.forEach((d,_)=>{(0,kw.alwaysValidSchema)(u,d)||(n.if((0,IJ._)`${l} > ${_}`,()=>e.subschema({keyword:a,schemaProp:_,dataProp:_},c)),e.ok(c))});function f(d){let{opts:_,errSchemaPath:m}=u,g=r.length,y=g===d.minItems&&(g===d.maxItems||d[t]===!1);if(_.strictTuples&&!y){let b=`"${a}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,kw.checkStrictMode)(u,b,_.strictTuples)}}s(f,"checkStrictTuple")}s(TJ,"validateTuple");m0.validateTuple=TJ;m0.default=$ze});var NJ=h(vM=>{"use strict";Object.defineProperty(vM,"__esModule",{value:!0});var Dze=SM(),Lze={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,Dze.validateTuple)(e,"items")};vM.default=Lze});var RJ=h(OM=>{"use strict";Object.defineProperty(OM,"__esModule",{value:!0});var AJ=Re(),jze=pt(),Mze=Es(),Uze=bM(),xze={message:({params:{len:e}})=>(0,AJ.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,AJ._)`{limit: ${e}}`},qze={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:xze,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,jze.alwaysValidSchema)(n,t)&&(i?(0,Uze.validateAdditionalItems)(e,i):e.ok((0,Mze.validateArray)(e)))}};OM.default=qze});var CJ=h(PM=>{"use strict";Object.defineProperty(PM,"__esModule",{value:!0});var Ss=Re(),Bw=pt(),Fze={message:({params:{min:e,max:t}})=>t===void 0?(0,Ss.str)`must contain at least ${e} valid item(s)`:(0,Ss.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Ss._)`{minContains: ${e}}`:(0,Ss._)`{minContains: ${e}, maxContains: ${t}}`},kze={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Fze,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e,a,u,{minContains:c,maxContains:l}=n;o.opts.next?(a=c===void 0?1:c,u=l):a=1;let f=t.const("len",(0,Ss._)`${i}.length`);if(e.setParams({min:a,max:u}),u===void 0&&a===0){(0,Bw.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&a>u){(0,Bw.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Bw.alwaysValidSchema)(o,r)){let y=(0,Ss._)`${f} >= ${a}`;u!==void 0&&(y=(0,Ss._)`${y} && ${f} <= ${u}`),e.pass(y);return}o.items=!0;let d=t.name("valid");u===void 0&&a===1?m(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),u!==void 0&&t.if((0,Ss._)`${i}.length > 0`,_)):(t.let(d,!1),_()),e.result(d,()=>e.reset());function _(){let y=t.name("_valid"),b=t.let("count",0);m(y,()=>t.if(y,()=>g(b)))}s(_,"validateItemsWithCount");function m(y,b){t.forRange("i",0,f,E=>{e.subschema({keyword:"contains",dataProp:E,dataPropType:Bw.Type.Num,compositeRule:!0},y),b()})}s(m,"validateItems");function g(y){t.code((0,Ss._)`${y}++`),u===void 0?t.if((0,Ss._)`${y} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,Ss._)`${y} > ${u}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,Ss._)`${y} >= ${a}`,()=>t.assign(d,!0)))}s(g,"checkLimits")}};PM.default=kze});var LJ=h(ua=>{"use strict";Object.defineProperty(ua,"__esModule",{value:!0});ua.validateSchemaDeps=ua.validatePropertyDeps=ua.error=void 0;var wM=Re(),Bze=pt(),_0=Es();ua.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,wM.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,wM._)`{property: ${e},
145
+ || ${a} === "boolean" || ${i} === null`).assign(u,(0,Ne._)`[${i}]`)}}s(c,"coerceSpecificType")}s(e8e,"coerceData");function t8e({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Ne._)`${t} !== undefined`,()=>e.assign((0,Ne._)`${t}[${r}]`,n))}s(t8e,"assignParentData");function Mj(e,t,r,n=Qy.Correct){let i=n===Qy.Correct?Ne.operators.EQ:Ne.operators.NEQ,o;switch(e){case"null":return(0,Ne._)`${t} ${i} null`;case"array":o=(0,Ne._)`Array.isArray(${t})`;break;case"object":o=(0,Ne._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a((0,Ne._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return(0,Ne._)`typeof ${t} ${i} ${e}`}return n===Qy.Correct?o:(0,Ne.not)(o);function a(u=Ne.nil){return(0,Ne.and)((0,Ne._)`typeof ${t} == "number"`,u,r?(0,Ne._)`isFinite(${t})`:Ne.nil)}}s(Mj,"checkDataType");en.checkDataType=Mj;function Uj(e,t,r,n){if(e.length===1)return Mj(e[0],t,r,n);let i,o=(0,gY.toHash)(e);if(o.array&&o.object){let a=(0,Ne._)`typeof ${t} != "object"`;i=o.null?a:(0,Ne._)`!${t} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Ne.nil;o.number&&delete o.integer;for(let a in o)i=(0,Ne.and)(i,Mj(a,t,r,n));return i}s(Uj,"checkDataTypes");en.checkDataTypes=Uj;var r8e={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Ne._)`{type: ${e}}`:(0,Ne._)`{type: ${t}}`};function xj(e){let t=n8e(e);(0,J6e.reportError)(t,r8e)}s(xj,"reportTypeError");en.reportTypeError=xj;function n8e(e){let{gen:t,data:r,schema:n}=e,i=(0,gY.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}s(n8e,"getTypeErrorContext")});var SY=h(Tw=>{"use strict";Object.defineProperty(Tw,"__esModule",{value:!0});Tw.assignDefaults=void 0;var Wh=Re(),i8e=pt();function s8e(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)bY(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,o)=>bY(e,o,i.default))}s(s8e,"assignDefaults");Tw.assignDefaults=s8e;function bY(e,t,r){let{gen:n,compositeRule:i,data:o,opts:a}=e;if(r===void 0)return;let u=(0,Wh._)`${o}${(0,Wh.getProperty)(t)}`;if(i){(0,i8e.checkStrictMode)(e,`default is ignored for: ${u}`);return}let c=(0,Wh._)`${u} === undefined`;a.useDefaults==="empty"&&(c=(0,Wh._)`${c} || ${u} === null || ${u} === ""`),n.if(c,(0,Wh._)`${u} = ${(0,Wh.stringify)(r)}`)}s(bY,"assignDefault")});var Es=h(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.validateUnion=Ct.validateArray=Ct.usePattern=Ct.callValidateCode=Ct.schemaProperties=Ct.allSchemaProperties=Ct.noPropertyInData=Ct.propertyInData=Ct.isOwnProperty=Ct.hasPropFunc=Ct.reportMissingProp=Ct.checkMissingProp=Ct.checkReportMissingProp=void 0;var Gt=Re(),qj=pt(),wc=fu(),o8e=pt();function a8e(e,t){let{gen:r,data:n,it:i}=e;r.if(kj(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Gt._)`${t}`},!0),e.error()})}s(a8e,"checkReportMissingProp");Ct.checkReportMissingProp=a8e;function u8e({gen:e,data:t,it:{opts:r}},n,i){return(0,Gt.or)(...n.map(o=>(0,Gt.and)(kj(e,t,o,r.ownProperties),(0,Gt._)`${i} = ${o}`)))}s(u8e,"checkMissingProp");Ct.checkMissingProp=u8e;function c8e(e,t){e.setParams({missingProperty:t},!0),e.error()}s(c8e,"reportMissingProp");Ct.reportMissingProp=c8e;function vY(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Gt._)`Object.prototype.hasOwnProperty`})}s(vY,"hasPropFunc");Ct.hasPropFunc=vY;function Fj(e,t,r){return(0,Gt._)`${vY(e)}.call(${t}, ${r})`}s(Fj,"isOwnProperty");Ct.isOwnProperty=Fj;function l8e(e,t,r,n){let i=(0,Gt._)`${t}${(0,Gt.getProperty)(r)} !== undefined`;return n?(0,Gt._)`${i} && ${Fj(e,t,r)}`:i}s(l8e,"propertyInData");Ct.propertyInData=l8e;function kj(e,t,r,n){let i=(0,Gt._)`${t}${(0,Gt.getProperty)(r)} === undefined`;return n?(0,Gt.or)(i,(0,Gt.not)(Fj(e,t,r))):i}s(kj,"noPropertyInData");Ct.noPropertyInData=kj;function OY(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}s(OY,"allSchemaProperties");Ct.allSchemaProperties=OY;function f8e(e,t){return OY(t).filter(r=>!(0,qj.alwaysValidSchema)(e,t[r]))}s(f8e,"schemaProperties");Ct.schemaProperties=f8e;function d8e({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},u,c,l){let f=l?(0,Gt._)`${e}, ${t}, ${n}${i}`:t,d=[[wc.default.instancePath,(0,Gt.strConcat)(wc.default.instancePath,o)],[wc.default.parentData,a.parentData],[wc.default.parentDataProperty,a.parentDataProperty],[wc.default.rootData,wc.default.rootData]];a.opts.dynamicRef&&d.push([wc.default.dynamicAnchors,wc.default.dynamicAnchors]);let _=(0,Gt._)`${f}, ${r.object(...d)}`;return c!==Gt.nil?(0,Gt._)`${u}.call(${c}, ${_})`:(0,Gt._)`${u}(${_})`}s(d8e,"callValidateCode");Ct.callValidateCode=d8e;var p8e=(0,Gt._)`new RegExp`;function h8e({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,o=i(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Gt._)`${i.code==="new RegExp"?p8e:(0,o8e.useFunc)(e,i)}(${r}, ${n})`})}s(h8e,"usePattern");Ct.usePattern=h8e;function m8e(e){let{gen:t,data:r,keyword:n,it:i}=e,o=t.name("valid");if(i.allErrors){let u=t.let("valid",!0);return a(()=>t.assign(u,!1)),u}return t.var(o,!0),a(()=>t.break()),o;function a(u){let c=t.const("len",(0,Gt._)`${r}.length`);t.forRange("i",0,c,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:qj.Type.Num},o),t.if((0,Gt.not)(o),u)})}s(a,"validateItems")}s(m8e,"validateArray");Ct.validateArray=m8e;function _8e(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,qj.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let a=t.let("valid",!1),u=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let f=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},u);t.assign(a,(0,Gt._)`${a} || ${u}`),e.mergeValidEvaluated(f,u)||t.if((0,Gt.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}s(_8e,"validateUnion");Ct.validateUnion=_8e});var IY=h(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.validateKeywordUsage=oa.validSchemaType=oa.funcKeywordCode=oa.macroKeywordCode=void 0;var Gn=Re(),ad=fu(),g8e=Es(),y8e=Zy();function E8e(e,t){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=e,u=t.macro.call(a.self,i,o,a),c=wY(r,n,u);a.opts.validateSchema!==!1&&a.self.validateSchema(u,!0);let l=r.name("valid");e.subschema({schema:u,schemaPath:Gn.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}s(E8e,"macroKeywordCode");oa.macroKeywordCode=E8e;function b8e(e,t){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:u,it:c}=e;v8e(c,t);let l=!u&&t.compile?t.compile.call(c.self,o,a,c):t.validate,f=wY(n,i,l),d=n.let("valid");e.block$data(d,_),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function _(){if(t.errors===!1)y(),t.modifying&&PY(e),b(()=>e.error());else{let E=t.async?m():g();t.modifying&&PY(e),b(()=>S8e(e,E))}}s(_,"validateKeyword");function m(){let E=n.let("ruleErrs",null);return n.try(()=>y((0,Gn._)`await `),v=>n.assign(d,!1).if((0,Gn._)`${v} instanceof ${c.ValidationError}`,()=>n.assign(E,(0,Gn._)`${v}.errors`),()=>n.throw(v))),E}s(m,"validateAsync");function g(){let E=(0,Gn._)`${f}.errors`;return n.assign(E,null),y(Gn.nil),E}s(g,"validateSync");function y(E=t.async?(0,Gn._)`await `:Gn.nil){let v=c.opts.passContext?ad.default.this:ad.default.self,O=!("compile"in t&&!u||t.schema===!1);n.assign(d,(0,Gn._)`${E}${(0,g8e.callValidateCode)(e,f,v,O)}`,t.modifying)}s(y,"assignValid");function b(E){var v;n.if((0,Gn.not)((v=t.valid)!==null&&v!==void 0?v:d),E)}s(b,"reportErrs")}s(b8e,"funcKeywordCode");oa.funcKeywordCode=b8e;function PY(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Gn._)`${n.parentData}[${n.parentDataProperty}]`))}s(PY,"modifyData");function S8e(e,t){let{gen:r}=e;r.if((0,Gn._)`Array.isArray(${t})`,()=>{r.assign(ad.default.vErrors,(0,Gn._)`${ad.default.vErrors} === null ? ${t} : ${ad.default.vErrors}.concat(${t})`).assign(ad.default.errors,(0,Gn._)`${ad.default.vErrors}.length`),(0,y8e.extendErrors)(e)},()=>e.error())}s(S8e,"addErrs");function v8e({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}s(v8e,"checkAsyncKeyword");function wY(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Gn.stringify)(r)})}s(wY,"useKeyword");function O8e(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}s(O8e,"validSchemaType");oa.validSchemaType=O8e;function P8e({schema:e,opts:t,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let a=i.dependencies;if(a?.some(u=>!Object.prototype.hasOwnProperty.call(e,u)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}s(P8e,"validateKeywordUsage");oa.validateKeywordUsage=P8e});var NY=h(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});Ic.extendSubschemaMode=Ic.extendSubschemaData=Ic.getSubschema=void 0;var aa=Re(),TY=pt();function w8e(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let u=e.schema[t];return r===void 0?{schema:u,schemaPath:(0,aa._)`${e.schemaPath}${(0,aa.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:u[r],schemaPath:(0,aa._)`${e.schemaPath}${(0,aa.getProperty)(t)}${(0,aa.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,TY.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}s(w8e,"getSubschema");Ic.getSubschema=w8e;function I8e(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:u}=t;if(r!==void 0){let{errorPath:l,dataPathArr:f,opts:d}=t,_=u.let("data",(0,aa._)`${t.data}${(0,aa.getProperty)(r)}`,!0);c(_),e.errorPath=(0,aa.str)`${l}${(0,TY.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,aa._)`${r}`,e.dataPathArr=[...f,e.parentDataProperty]}if(i!==void 0){let l=i instanceof aa.Name?i:u.let("data",i,!0);c(l),a!==void 0&&(e.propertyName=a)}o&&(e.dataTypes=o);function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}s(c,"dataContextProps")}s(I8e,"extendSubschemaData");Ic.extendSubschemaData=I8e;function T8e(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}s(T8e,"extendSubschemaMode");Ic.extendSubschemaMode=T8e});var t0=h(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.getSchemaRefs=Si.resolveUrl=Si.normalizeId=Si._getFullPath=Si.getFullPath=Si.inlineRef=void 0;var N8e=pt(),A8e=Xf(),R8e=JP(),C8e=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function $8e(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Bj(e):t?AY(e)<=t:!1}s($8e,"inlineRef");Si.inlineRef=$8e;var D8e=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Bj(e){for(let t in e){if(D8e.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Bj)||typeof r=="object"&&Bj(r))return!0}return!1}s(Bj,"hasRef");function AY(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!C8e.has(r)&&(typeof e[r]=="object"&&(0,N8e.eachItem)(e[r],n=>t+=AY(n)),t===1/0))return 1/0}return t}s(AY,"countKeys");function RY(e,t="",r){r!==!1&&(t=Yh(t));let n=e.parse(t);return CY(e,n)}s(RY,"getFullPath");Si.getFullPath=RY;function CY(e,t){return e.serialize(t).split("#")[0]+"#"}s(CY,"_getFullPath");Si._getFullPath=CY;var L8e=/#\/?$/;function Yh(e){return e?e.replace(L8e,""):""}s(Yh,"normalizeId");Si.normalizeId=Yh;function j8e(e,t,r){return r=Yh(r),e.resolve(t,r)}s(j8e,"resolveUrl");Si.resolveUrl=j8e;var M8e=/^[a-z_][-a-z0-9._]*$/i;function U8e(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Yh(e[r]||t),o={"":i},a=RY(n,i,!1),u={},c=new Set;return R8e(e,{allKeys:!0},(d,_,m,g)=>{if(g===void 0)return;let y=a+_,b=o[g];typeof d[r]=="string"&&(b=E.call(this,d[r])),v.call(this,d.$anchor),v.call(this,d.$dynamicAnchor),o[_]=b;function E(O){let P=this.opts.uriResolver.resolve;if(O=Yh(b?P(b,O):O),c.has(O))throw f(O);c.add(O);let I=this.refs[O];return typeof I=="string"&&(I=this.refs[I]),typeof I=="object"?l(d,I.schema,O):O!==Yh(y)&&(O[0]==="#"?(l(d,u[O],O),u[O]=d):this.refs[O]=y),O}s(E,"addRef");function v(O){if(typeof O=="string"){if(!M8e.test(O))throw new Error(`invalid anchor "${O}"`);E.call(this,`#${O}`)}}s(v,"addAnchor")}),u;function l(d,_,m){if(_!==void 0&&!A8e(d,_))throw f(m)}s(l,"checkAmbiguosRef");function f(d){return new Error(`reference "${d}" resolves to more than one schema`)}s(f,"ambiguos")}s(U8e,"getSchemaRefs");Si.getSchemaRefs=U8e});var i0=h(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});Tc.getData=Tc.KeywordCxt=Tc.validateFunctionCode=void 0;var MY=hY(),$Y=e0(),Vj=jj(),Nw=e0(),x8e=SY(),n0=IY(),Gj=NY(),ue=Re(),be=fu(),q8e=t0(),du=pt(),r0=Zy();function F8e(e){if(qY(e)&&(FY(e),xY(e))){G8e(e);return}UY(e,()=>(0,MY.topBoolOrEmptySchema)(e))}s(F8e,"validateFunctionCode");Tc.validateFunctionCode=F8e;function UY({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,(0,ue._)`${be.default.data}, ${be.default.valCxt}`,n.$async,()=>{e.code((0,ue._)`"use strict"; ${DY(r,i)}`),B8e(e,i),e.code(o)}):e.func(t,(0,ue._)`${be.default.data}, ${k8e(i)}`,n.$async,()=>e.code(DY(r,i)).code(o))}s(UY,"validateFunction");function k8e(e){return(0,ue._)`{${be.default.instancePath}="", ${be.default.parentData}, ${be.default.parentDataProperty}, ${be.default.rootData}=${be.default.data}${e.dynamicRef?(0,ue._)`, ${be.default.dynamicAnchors}={}`:ue.nil}}={}`}s(k8e,"destructureValCxt");function B8e(e,t){e.if(be.default.valCxt,()=>{e.var(be.default.instancePath,(0,ue._)`${be.default.valCxt}.${be.default.instancePath}`),e.var(be.default.parentData,(0,ue._)`${be.default.valCxt}.${be.default.parentData}`),e.var(be.default.parentDataProperty,(0,ue._)`${be.default.valCxt}.${be.default.parentDataProperty}`),e.var(be.default.rootData,(0,ue._)`${be.default.valCxt}.${be.default.rootData}`),t.dynamicRef&&e.var(be.default.dynamicAnchors,(0,ue._)`${be.default.valCxt}.${be.default.dynamicAnchors}`)},()=>{e.var(be.default.instancePath,(0,ue._)`""`),e.var(be.default.parentData,(0,ue._)`undefined`),e.var(be.default.parentDataProperty,(0,ue._)`undefined`),e.var(be.default.rootData,be.default.data),t.dynamicRef&&e.var(be.default.dynamicAnchors,(0,ue._)`{}`)})}s(B8e,"destructureValCxtES5");function G8e(e){let{schema:t,opts:r,gen:n}=e;UY(e,()=>{r.$comment&&t.$comment&&BY(e),W8e(e),n.let(be.default.vErrors,null),n.let(be.default.errors,0),r.unevaluated&&V8e(e),kY(e),X8e(e)})}s(G8e,"topSchemaObjCode");function V8e(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,ue._)`${r}.evaluated`),t.if((0,ue._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,ue._)`${e.evaluated}.props`,(0,ue._)`undefined`)),t.if((0,ue._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,ue._)`${e.evaluated}.items`,(0,ue._)`undefined`))}s(V8e,"resetEvaluated");function DY(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,ue._)`/*# sourceURL=${r} */`:ue.nil}s(DY,"funcSourceUrl");function z8e(e,t){if(qY(e)&&(FY(e),xY(e))){H8e(e,t);return}(0,MY.boolOrEmptySchema)(e,t)}s(z8e,"subschemaCode");function xY({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}s(xY,"schemaCxtHasRules");function qY(e){return typeof e.schema!="boolean"}s(qY,"isSchemaObj");function H8e(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&BY(e),Y8e(e),J8e(e);let o=n.const("_errs",be.default.errors);kY(e,o),n.var(t,(0,ue._)`${o} === ${be.default.errors}`)}s(H8e,"subSchemaObjCode");function FY(e){(0,du.checkUnknownRules)(e),K8e(e)}s(FY,"checkKeywords");function kY(e,t){if(e.opts.jtd)return LY(e,[],!1,t);let r=(0,$Y.getSchemaTypes)(e.schema),n=(0,$Y.coerceAndCheckDataType)(e,r);LY(e,r,!n,t)}s(kY,"typeAndKeywords");function K8e(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,du.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}s(K8e,"checkRefsAndKeywords");function W8e(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,du.checkStrictMode)(e,"default is ignored in the schema root")}s(W8e,"checkNoDefault");function Y8e(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,q8e.resolveUrl)(e.opts.uriResolver,e.baseId,t))}s(Y8e,"updateContext");function J8e(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}s(J8e,"checkAsyncSchema");function BY({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)e.code((0,ue._)`${be.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,ue.str)`${n}/$comment`,u=e.scopeValue("root",{ref:t.root});e.code((0,ue._)`${be.default.self}.opts.$comment(${o}, ${a}, ${u}.schema)`)}}s(BY,"commentKeyword");function X8e(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if((0,ue._)`${be.default.errors} === 0`,()=>t.return(be.default.data),()=>t.throw((0,ue._)`new ${i}(${be.default.vErrors})`)):(t.assign((0,ue._)`${n}.errors`,be.default.vErrors),o.unevaluated&&Z8e(e),t.return((0,ue._)`${be.default.errors} === 0`))}s(X8e,"returnResults");function Z8e({gen:e,evaluated:t,props:r,items:n}){r instanceof ue.Name&&e.assign((0,ue._)`${t}.props`,r),n instanceof ue.Name&&e.assign((0,ue._)`${t}.items`,n)}s(Z8e,"assignEvaluated");function LY(e,t,r,n){let{gen:i,schema:o,data:a,allErrors:u,opts:c,self:l}=e,{RULES:f}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,du.schemaHasRulesButRef)(o,f))){i.block(()=>VY(e,"$ref",f.all.$ref.definition));return}c.jtd||Q8e(e,t),i.block(()=>{for(let _ of f.rules)d(_);d(f.post)});function d(_){(0,Vj.shouldUseGroup)(o,_)&&(_.type?(i.if((0,Nw.checkDataType)(_.type,a,c.strictNumbers)),jY(e,_),t.length===1&&t[0]===_.type&&r&&(i.else(),(0,Nw.reportTypeError)(e)),i.endIf()):jY(e,_),u||i.if((0,ue._)`${be.default.errors} === ${n||0}`))}s(d,"groupKeywords")}s(LY,"schemaKeywords");function jY(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,x8e.assignDefaults)(e,t.type),r.block(()=>{for(let o of t.rules)(0,Vj.shouldUseRule)(n,o)&&VY(e,o.keyword,o.definition,t.type)})}s(jY,"iterateKeywords");function Q8e(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(eVe(e,t),e.opts.allowUnionTypes||tVe(e,t),rVe(e,e.dataTypes))}s(Q8e,"checkStrictTypes");function eVe(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{GY(e.dataTypes,r)||zj(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),iVe(e,t)}}s(eVe,"checkContextTypes");function tVe(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&zj(e,"use allowUnionTypes to allow union type keyword")}s(tVe,"checkMultipleTypes");function rVe(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Vj.shouldUseRule)(e.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>nVe(t,a))&&zj(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}s(rVe,"checkKeywordTypes");function nVe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}s(nVe,"hasApplicableType");function GY(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}s(GY,"includesType");function iVe(e,t){let r=[];for(let n of e.dataTypes)GY(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}s(iVe,"narrowSchemaTypes");function zj(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,du.checkStrictMode)(e,t,e.opts.strictTypes)}s(zj,"strictTypesError");var Aw=class{static{s(this,"KeywordCxt")}constructor(t,r,n){if((0,n0.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,du.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",zY(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,n0.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",be.default.errors))}result(t,r,n){this.failResult((0,ue.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,ue.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,ue._)`${r} !== undefined && (${(0,ue.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?r0.reportExtraError:r0.reportError)(this,this.def.error,r)}$dataError(){(0,r0.reportError)(this,this.def.$dataError||r0.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,r0.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=ue.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=ue.nil,r=ue.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,ue.or)((0,ue._)`${i} === undefined`,r)),t!==ue.nil&&n.assign(t,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==ue.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,ue.or)(a(),u());function a(){if(n.length){if(!(r instanceof ue.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,ue._)`${(0,Nw.checkDataTypes)(c,r,o.opts.strictNumbers,Nw.DataType.Wrong)}`}return ue.nil}function u(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,ue._)`!${c}(${r})`}return ue.nil}}subschema(t,r){let n=(0,Gj.getSubschema)(this.it,t);(0,Gj.extendSubschemaData)(n,this.it,t),(0,Gj.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return z8e(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=du.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=du.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,ue.Name)),!0}};Tc.KeywordCxt=Aw;function VY(e,t,r,n){let i=new Aw(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,n0.funcKeywordCode)(i,r):"macro"in r?(0,n0.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,n0.funcKeywordCode)(i,r)}s(VY,"keywordCode");var sVe=/^\/(?:[^~]|~0|~1)*$/,oVe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function zY(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(e==="")return be.default.rootData;if(e[0]==="/"){if(!sVe.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=be.default.rootData}else{let l=oVe.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);let f=+l[1];if(i=l[2],i==="#"){if(f>=t)throw new Error(c("property/index",f));return n[t-f]}if(f>t)throw new Error(c("data",f));if(o=r[t-f],!i)return o}let a=o,u=i.split("/");for(let l of u)l&&(o=(0,ue._)`${o}${(0,ue.getProperty)((0,du.unescapeJsonPointer)(l))}`,a=(0,ue._)`${a} && ${o}`);return a;function c(l,f){return`Cannot access ${l} ${f} levels up, current level is ${t}`}}s(zY,"getData");Tc.getData=zY});var Rw=h(Kj=>{"use strict";Object.defineProperty(Kj,"__esModule",{value:!0});var Hj=class extends Error{static{s(this,"ValidationError")}constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Kj.default=Hj});var Cw=h(Jj=>{"use strict";Object.defineProperty(Jj,"__esModule",{value:!0});var Wj=t0(),Yj=class extends Error{static{s(this,"MissingRefError")}constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Wj.resolveUrl)(t,r,n),this.missingSchema=(0,Wj.normalizeId)((0,Wj.getFullPath)(t,this.missingRef))}};Jj.default=Yj});var Dw=h(bs=>{"use strict";Object.defineProperty(bs,"__esModule",{value:!0});bs.resolveSchema=bs.getCompilingSchema=bs.resolveRef=bs.compileSchema=bs.SchemaEnv=void 0;var lo=Re(),aVe=Rw(),ud=fu(),fo=t0(),HY=pt(),uVe=i0(),Jh=class{static{s(this,"SchemaEnv")}constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,fo.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};bs.SchemaEnv=Jh;function Zj(e){let t=KY.call(this,e);if(t)return t;let r=(0,fo.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new lo.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),u;e.$async&&(u=a.scopeValue("Error",{ref:aVe.default,code:(0,lo._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let l={gen:a,allErrors:this.opts.allErrors,data:ud.default.data,parentData:ud.default.parentData,parentDataProperty:ud.default.parentDataProperty,dataNames:[ud.default.data],dataPathArr:[lo.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,lo.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:lo.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,lo._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(e),(0,uVe.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);let d=a.toString();f=`${a.scopeRefs(ud.default.scope)}return ${d}`,this.opts.code.process&&(f=this.opts.code.process(f,e));let m=new Function(`${ud.default.self}`,`${ud.default.scope}`,f)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:g,items:y}=l;m.evaluated={props:g instanceof lo.Name?void 0:g,items:y instanceof lo.Name?void 0:y,dynamicProps:g instanceof lo.Name,dynamicItems:y instanceof lo.Name},m.source&&(m.source.evaluated=(0,lo.stringify)(m.evaluated))}return e.validate=m,e}catch(d){throw delete e.validate,delete e.validateName,f&&this.logger.error("Error compiling schema, function code:",f),d}finally{this._compilations.delete(e)}}s(Zj,"compileSchema");bs.compileSchema=Zj;function cVe(e,t,r){var n;r=(0,fo.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let o=dVe.call(this,e,r);if(o===void 0){let a=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:u}=this.opts;a&&(o=new Jh({schema:a,schemaId:u,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=lVe.call(this,o)}s(cVe,"resolveRef");bs.resolveRef=cVe;function lVe(e){return(0,fo.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Zj.call(this,e)}s(lVe,"inlineOrCompile");function KY(e){for(let t of this._compilations)if(fVe(t,e))return t}s(KY,"getCompilingSchema");bs.getCompilingSchema=KY;function fVe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}s(fVe,"sameSchemaEnv");function dVe(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||$w.call(this,e,t)}s(dVe,"resolve");function $w(e,t){let r=this.opts.uriResolver.parse(t),n=(0,fo._getFullPath)(this.opts.uriResolver,r),i=(0,fo.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return Xj.call(this,r,e);let o=(0,fo.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let u=$w.call(this,e,a);return typeof u?.schema!="object"?void 0:Xj.call(this,r,u)}if(typeof a?.schema=="object"){if(a.validate||Zj.call(this,a),o===(0,fo.normalizeId)(t)){let{schema:u}=a,{schemaId:c}=this.opts,l=u[c];return l&&(i=(0,fo.resolveUrl)(this.opts.uriResolver,i,l)),new Jh({schema:u,schemaId:c,root:e,baseId:i})}return Xj.call(this,r,a)}}s($w,"resolveSchema");bs.resolveSchema=$w;var pVe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Xj(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let u of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,HY.unescapeFragment)(u)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!pVe.has(u)&&l&&(t=(0,fo.resolveUrl)(this.opts.uriResolver,t,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,HY.schemaHasRulesButRef)(r,this.RULES)){let u=(0,fo.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=$w.call(this,n,u)}let{schemaId:a}=this.opts;if(o=o||new Jh({schema:r,schemaId:a,root:n,baseId:t}),o.schema!==o.root.schema)return o}s(Xj,"getJsonPointer")});var WY=h((YRt,hVe)=>{hVe.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var JY=h(Qj=>{"use strict";Object.defineProperty(Qj,"__esModule",{value:!0});var YY=tw();YY.code='require("ajv/dist/runtime/uri").default';Qj.default=YY});var iJ=h(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.CodeGen=tn.Name=tn.nil=tn.stringify=tn.str=tn._=tn.KeywordCxt=void 0;var mVe=i0();Object.defineProperty(tn,"KeywordCxt",{enumerable:!0,get:function(){return mVe.KeywordCxt}});var Xh=Re();Object.defineProperty(tn,"_",{enumerable:!0,get:function(){return Xh._}});Object.defineProperty(tn,"str",{enumerable:!0,get:function(){return Xh.str}});Object.defineProperty(tn,"stringify",{enumerable:!0,get:function(){return Xh.stringify}});Object.defineProperty(tn,"nil",{enumerable:!0,get:function(){return Xh.nil}});Object.defineProperty(tn,"Name",{enumerable:!0,get:function(){return Xh.Name}});Object.defineProperty(tn,"CodeGen",{enumerable:!0,get:function(){return Xh.CodeGen}});var _Ve=Rw(),tJ=Cw(),gVe=Lj(),s0=Dw(),yVe=Re(),o0=t0(),Lw=e0(),tM=pt(),XY=WY(),EVe=JY(),rJ=s((e,t)=>new RegExp(e,t),"defaultRegExp");rJ.code="new RegExp";var bVe=["removeAdditional","useDefaults","coerceTypes"],SVe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),vVe={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},OVe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},ZY=200;function PVe(e){var t,r,n,i,o,a,u,c,l,f,d,_,m,g,y,b,E,v,O,P,I,j,x,H,K;let Q=e.strict,de=(t=e.code)===null||t===void 0?void 0:t.optimize,re=de===!0||de===void 0?1:de||0,he=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:rJ,$e=(i=e.uriResolver)!==null&&i!==void 0?i:EVe.default;return{strictSchema:(a=(o=e.strictSchema)!==null&&o!==void 0?o:Q)!==null&&a!==void 0?a:!0,strictNumbers:(c=(u=e.strictNumbers)!==null&&u!==void 0?u:Q)!==null&&c!==void 0?c:!0,strictTypes:(f=(l=e.strictTypes)!==null&&l!==void 0?l:Q)!==null&&f!==void 0?f:"log",strictTuples:(_=(d=e.strictTuples)!==null&&d!==void 0?d:Q)!==null&&_!==void 0?_:"log",strictRequired:(g=(m=e.strictRequired)!==null&&m!==void 0?m:Q)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:re,regExp:he}:{optimize:re,regExp:he},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:ZY,loopEnum:(b=e.loopEnum)!==null&&b!==void 0?b:ZY,meta:(E=e.meta)!==null&&E!==void 0?E:!0,messages:(v=e.messages)!==null&&v!==void 0?v:!0,inlineRefs:(O=e.inlineRefs)!==null&&O!==void 0?O:!0,schemaId:(P=e.schemaId)!==null&&P!==void 0?P:"$id",addUsedSchema:(I=e.addUsedSchema)!==null&&I!==void 0?I:!0,validateSchema:(j=e.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(x=e.validateFormats)!==null&&x!==void 0?x:!0,unicodeRegExp:(H=e.unicodeRegExp)!==null&&H!==void 0?H:!0,int32range:(K=e.int32range)!==null&&K!==void 0?K:!0,uriResolver:$e}}s(PVe,"requiredOptions");var a0=class{static{s(this,"Ajv")}constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...PVe(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new yVe.ValueScope({scope:{},prefixes:SVe,es5:r,lines:n}),this.logger=RVe(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,gVe.getRules)(),QY.call(this,vVe,t,"NOT SUPPORTED"),QY.call(this,OVe,t,"DEPRECATED","warn"),this._metaOpts=NVe.call(this),t.formats&&IVe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&TVe.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),wVe.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=XY;n==="id"&&(i={...XY},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,t,r);async function i(f,d){await o.call(this,f.$schema);let _=this._addSchema(f,d);return _.validate||a.call(this,_)}async function o(f){f&&!this.getSchema(f)&&await i.call(this,{$ref:f},!0)}async function a(f){try{return this._compileSchemaEnv(f)}catch(d){if(!(d instanceof tJ.default))throw d;return u.call(this,d),await c.call(this,d.missingSchema),a.call(this,f)}}function u({missingSchema:f,missingRef:d}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${d} cannot be resolved`)}async function c(f){let d=await l.call(this,f);this.refs[f]||await o.call(this,d.$schema),this.refs[f]||this.addSchema(d,f,r)}async function l(f){let d=this._loading[f];if(d)return d;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,n,i);return this}let o;if(typeof t=="object"){let{schemaId:a}=this.opts;if(o=t[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,o0.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,t);if(!i&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(t){let r;for(;typeof(r=eJ.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new s0.SchemaEnv({schema:{},schemaId:n});if(r=s0.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=eJ.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,o0.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if($Ve.call(this,n,r),!r)return(0,tM.eachItem)(n,o=>eM.call(this,o)),this;LVe.call(this,r);let i={...r,type:(0,Lw.getJSONTypes)(r.type),schemaType:(0,Lw.getJSONTypes)(r.schemaType)};return(0,tM.eachItem)(n,i.type.length===0?o=>eM.call(this,o,i):o=>i.type.forEach(a=>eM.call(this,o,i,a))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let o=i.split("/").slice(1),a=t;for(let u of o)a=a[u];for(let u in n){let c=n[u];if(typeof c!="object")continue;let{$data:l}=c.definition,f=a[u];l&&f&&(a[u]=nJ(f))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:u}=this.opts;if(typeof t=="object")a=t[u];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,o0.normalizeId)(a||n);let l=o0.getSchemaRefs.call(this,t,n);return c=new s0.SchemaEnv({schema:t,schemaId:u,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):s0.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{s0.compileSchema.call(this,t)}finally{this.opts=r}}};tn.default=a0;a0.ValidationError=_Ve.default;a0.MissingRefError=tJ.default;function QY(e,t,r,n="error"){for(let i in e){let o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}s(QY,"checkOptions");function eJ(e){return e=(0,o0.normalizeId)(e),this.schemas[e]||this.refs[e]}s(eJ,"getSchEnv");function wVe(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}s(wVe,"addInitialSchemas");function IVe(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}s(IVe,"addInitialFormats");function TVe(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}s(TVe,"addInitialKeywords");function NVe(){let e={...this.opts};for(let t of bVe)delete e[t];return e}s(NVe,"getMetaSchemaOptions");var AVe={log(){},warn(){},error(){}};function RVe(e){if(e===!1)return AVe;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}s(RVe,"getLogger");var CVe=/^[a-z_$][a-z0-9_$:-]*$/i;function $Ve(e,t){let{RULES:r}=this;if((0,tM.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!CVe.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}s($Ve,"checkKeyword");function eM(e,t,r){var n;let i=t?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[e]=!0,!t)return;let u={keyword:e,definition:{...t,type:(0,Lw.getJSONTypes)(t.type),schemaType:(0,Lw.getJSONTypes)(t.schemaType)}};t.before?DVe.call(this,a,u,t.before):a.rules.push(u),o.all[e]=u,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}s(eM,"addRule");function DVe(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}s(DVe,"addBeforeRule");function LVe(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=nJ(t)),e.validateSchema=this.compile(t,!0))}s(LVe,"keywordMetaschema");var jVe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function nJ(e){return{anyOf:[e,jVe]}}s(nJ,"schemaOrData")});var sJ=h(rM=>{"use strict";Object.defineProperty(rM,"__esModule",{value:!0});var MVe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};rM.default=MVe});var cJ=h(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});cd.callRef=cd.getValidate=void 0;var UVe=Cw(),oJ=Es(),vi=Re(),Zh=fu(),aJ=Dw(),jw=pt(),xVe={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:o,validateName:a,opts:u,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return d();let f=aJ.resolveRef.call(c,l,i,r);if(f===void 0)throw new UVe.default(n.opts.uriResolver,i,r);if(f instanceof aJ.SchemaEnv)return _(f);return m(f);function d(){if(o===l)return Mw(e,a,o,o.$async);let g=t.scopeValue("root",{ref:l});return Mw(e,(0,vi._)`${g}.validate`,l,l.$async)}function _(g){let y=uJ(e,g);Mw(e,y,g,g.$async)}function m(g){let y=t.scopeValue("schema",u.code.source===!0?{ref:g,code:(0,vi.stringify)(g)}:{ref:g}),b=t.name("valid"),E=e.subschema({schema:g,dataTypes:[],schemaPath:vi.nil,topSchemaRef:y,errSchemaPath:r},b);e.mergeEvaluated(E),e.ok(b)}}};function uJ(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,vi._)`${r.scopeValue("wrapper",{ref:t})}.validate`}s(uJ,"getValidate");cd.getValidate=uJ;function Mw(e,t,r,n){let{gen:i,it:o}=e,{allErrors:a,schemaEnv:u,opts:c}=o,l=c.passContext?Zh.default.this:vi.nil;n?f():d();function f(){if(!u.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,vi._)`await ${(0,oJ.callValidateCode)(e,t,l)}`),m(t),a||i.assign(g,!0)},y=>{i.if((0,vi._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),_(y),a||i.assign(g,!1)}),e.ok(g)}s(f,"callAsyncRef");function d(){e.result((0,oJ.callValidateCode)(e,t,l),()=>m(t),()=>_(t))}s(d,"callSyncRef");function _(g){let y=(0,vi._)`${g}.errors`;i.assign(Zh.default.vErrors,(0,vi._)`${Zh.default.vErrors} === null ? ${y} : ${Zh.default.vErrors}.concat(${y})`),i.assign(Zh.default.errors,(0,vi._)`${Zh.default.vErrors}.length`)}s(_,"addErrorsFrom");function m(g){var y;if(!o.opts.unevaluated)return;let b=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(b&&!b.dynamicProps)b.props!==void 0&&(o.props=jw.mergeEvaluated.props(i,b.props,o.props));else{let E=i.var("props",(0,vi._)`${g}.evaluated.props`);o.props=jw.mergeEvaluated.props(i,E,o.props,vi.Name)}if(o.items!==!0)if(b&&!b.dynamicItems)b.items!==void 0&&(o.items=jw.mergeEvaluated.items(i,b.items,o.items));else{let E=i.var("items",(0,vi._)`${g}.evaluated.items`);o.items=jw.mergeEvaluated.items(i,E,o.items,vi.Name)}}s(m,"addEvaluatedFrom")}s(Mw,"callRef");cd.callRef=Mw;cd.default=xVe});var lJ=h(nM=>{"use strict";Object.defineProperty(nM,"__esModule",{value:!0});var qVe=sJ(),FVe=cJ(),kVe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",qVe.default,FVe.default];nM.default=kVe});var fJ=h(iM=>{"use strict";Object.defineProperty(iM,"__esModule",{value:!0});var Uw=Re(),Nc=Uw.operators,xw={maximum:{okStr:"<=",ok:Nc.LTE,fail:Nc.GT},minimum:{okStr:">=",ok:Nc.GTE,fail:Nc.LT},exclusiveMaximum:{okStr:"<",ok:Nc.LT,fail:Nc.GTE},exclusiveMinimum:{okStr:">",ok:Nc.GT,fail:Nc.LTE}},BVe={message:({keyword:e,schemaCode:t})=>(0,Uw.str)`must be ${xw[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Uw._)`{comparison: ${xw[e].okStr}, limit: ${t}}`},GVe={keyword:Object.keys(xw),type:"number",schemaType:"number",$data:!0,error:BVe,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,Uw._)`${r} ${xw[t].fail} ${n} || isNaN(${r})`)}};iM.default=GVe});var dJ=h(sM=>{"use strict";Object.defineProperty(sM,"__esModule",{value:!0});var u0=Re(),VVe={message:({schemaCode:e})=>(0,u0.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,u0._)`{multipleOf: ${e}}`},zVe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:VVe,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,o=i.opts.multipleOfPrecision,a=t.let("res"),u=o?(0,u0._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,u0._)`${a} !== parseInt(${a})`;e.fail$data((0,u0._)`(${n} === 0 || (${a} = ${r}/${n}, ${u}))`)}};sM.default=zVe});var hJ=h(oM=>{"use strict";Object.defineProperty(oM,"__esModule",{value:!0});function pJ(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}s(pJ,"ucs2length");oM.default=pJ;pJ.code='require("ajv/dist/runtime/ucs2length").default'});var mJ=h(aM=>{"use strict";Object.defineProperty(aM,"__esModule",{value:!0});var ld=Re(),HVe=pt(),KVe=hJ(),WVe={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,ld.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,ld._)`{limit: ${e}}`},YVe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:WVe,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,o=t==="maxLength"?ld.operators.GT:ld.operators.LT,a=i.opts.unicode===!1?(0,ld._)`${r}.length`:(0,ld._)`${(0,HVe.useFunc)(e.gen,KVe.default)}(${r})`;e.fail$data((0,ld._)`${a} ${o} ${n}`)}};aM.default=YVe});var _J=h(uM=>{"use strict";Object.defineProperty(uM,"__esModule",{value:!0});var JVe=Es(),qw=Re(),XVe={message:({schemaCode:e})=>(0,qw.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,qw._)`{pattern: ${e}}`},ZVe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:XVe,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:o}=e,a=o.opts.unicodeRegExp?"u":"",u=r?(0,qw._)`(new RegExp(${i}, ${a}))`:(0,JVe.usePattern)(e,n);e.fail$data((0,qw._)`!${u}.test(${t})`)}};uM.default=ZVe});var gJ=h(cM=>{"use strict";Object.defineProperty(cM,"__esModule",{value:!0});var c0=Re(),QVe={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,c0.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,c0._)`{limit: ${e}}`},eze={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:QVe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?c0.operators.GT:c0.operators.LT;e.fail$data((0,c0._)`Object.keys(${r}).length ${i} ${n}`)}};cM.default=eze});var yJ=h(lM=>{"use strict";Object.defineProperty(lM,"__esModule",{value:!0});var l0=Es(),f0=Re(),tze=pt(),rze={message:({params:{missingProperty:e}})=>(0,f0.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,f0._)`{missingProperty: ${e}}`},nze={keyword:"required",type:"object",schemaType:"array",$data:!0,error:rze,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:o,it:a}=e,{opts:u}=a;if(!o&&r.length===0)return;let c=r.length>=u.loopRequired;if(a.allErrors?l():f(),u.strictRequired){let m=e.parentSchema.properties,{definedProperties:g}=e.it;for(let y of r)if(m?.[y]===void 0&&!g.has(y)){let b=a.schemaEnv.baseId+a.errSchemaPath,E=`required property "${y}" is not defined at "${b}" (strictRequired)`;(0,tze.checkStrictMode)(a,E,a.opts.strictRequired)}}function l(){if(c||o)e.block$data(f0.nil,d);else for(let m of r)(0,l0.checkReportMissingProp)(e,m)}s(l,"allErrorsMode");function f(){let m=t.let("missing");if(c||o){let g=t.let("valid",!0);e.block$data(g,()=>_(m,g)),e.ok(g)}else t.if((0,l0.checkMissingProp)(e,r,m)),(0,l0.reportMissingProp)(e,m),t.else()}s(f,"exitOnErrorMode");function d(){t.forOf("prop",n,m=>{e.setParams({missingProperty:m}),t.if((0,l0.noPropertyInData)(t,i,m,u.ownProperties),()=>e.error())})}s(d,"loopAllRequired");function _(m,g){e.setParams({missingProperty:m}),t.forOf(m,n,()=>{t.assign(g,(0,l0.propertyInData)(t,i,m,u.ownProperties)),t.if((0,f0.not)(g),()=>{e.error(),t.break()})},f0.nil)}s(_,"loopUntilMissing")}};lM.default=nze});var EJ=h(fM=>{"use strict";Object.defineProperty(fM,"__esModule",{value:!0});var d0=Re(),ize={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,d0.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,d0._)`{limit: ${e}}`},sze={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:ize,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?d0.operators.GT:d0.operators.LT;e.fail$data((0,d0._)`${r}.length ${i} ${n}`)}};fM.default=sze});var Fw=h(dM=>{"use strict";Object.defineProperty(dM,"__esModule",{value:!0});var bJ=Xf();bJ.code='require("ajv/dist/runtime/equal").default';dM.default=bJ});var SJ=h(hM=>{"use strict";Object.defineProperty(hM,"__esModule",{value:!0});var pM=e0(),rn=Re(),oze=pt(),aze=Fw(),uze={message:({params:{i:e,j:t}})=>(0,rn.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,rn._)`{i: ${e}, j: ${t}}`},cze={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:uze,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:u}=e;if(!n&&!i)return;let c=t.let("valid"),l=o.items?(0,pM.getSchemaTypes)(o.items):[];e.block$data(c,f,(0,rn._)`${a} === false`),e.ok(c);function f(){let g=t.let("i",(0,rn._)`${r}.length`),y=t.let("j");e.setParams({i:g,j:y}),t.assign(c,!0),t.if((0,rn._)`${g} > 1`,()=>(d()?_:m)(g,y))}s(f,"validateUniqueItems");function d(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}s(d,"canOptimize");function _(g,y){let b=t.name("item"),E=(0,pM.checkDataTypes)(l,b,u.opts.strictNumbers,pM.DataType.Wrong),v=t.const("indices",(0,rn._)`{}`);t.for((0,rn._)`;${g}--;`,()=>{t.let(b,(0,rn._)`${r}[${g}]`),t.if(E,(0,rn._)`continue`),l.length>1&&t.if((0,rn._)`typeof ${b} == "string"`,(0,rn._)`${b} += "_"`),t.if((0,rn._)`typeof ${v}[${b}] == "number"`,()=>{t.assign(y,(0,rn._)`${v}[${b}]`),e.error(),t.assign(c,!1).break()}).code((0,rn._)`${v}[${b}] = ${g}`)})}s(_,"loopN");function m(g,y){let b=(0,oze.useFunc)(t,aze.default),E=t.name("outer");t.label(E).for((0,rn._)`;${g}--;`,()=>t.for((0,rn._)`${y} = ${g}; ${y}--;`,()=>t.if((0,rn._)`${b}(${r}[${g}], ${r}[${y}])`,()=>{e.error(),t.assign(c,!1).break(E)})))}s(m,"loopN2")}};hM.default=cze});var vJ=h(_M=>{"use strict";Object.defineProperty(_M,"__esModule",{value:!0});var mM=Re(),lze=pt(),fze=Fw(),dze={message:"must be equal to constant",params:({schemaCode:e})=>(0,mM._)`{allowedValue: ${e}}`},pze={keyword:"const",$data:!0,error:dze,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:o}=e;n||o&&typeof o=="object"?e.fail$data((0,mM._)`!${(0,lze.useFunc)(t,fze.default)}(${r}, ${i})`):e.fail((0,mM._)`${o} !== ${r}`)}};_M.default=pze});var OJ=h(gM=>{"use strict";Object.defineProperty(gM,"__esModule",{value:!0});var p0=Re(),hze=pt(),mze=Fw(),_ze={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,p0._)`{allowedValues: ${e}}`},gze={keyword:"enum",schemaType:"array",$data:!0,error:_ze,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:a}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let u=i.length>=a.opts.loopEnum,c,l=s(()=>c??(c=(0,hze.useFunc)(t,mze.default)),"getEql"),f;if(u||n)f=t.let("valid"),e.block$data(f,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=t.const("vSchema",o);f=(0,p0.or)(...i.map((g,y)=>_(m,y)))}e.pass(f);function d(){t.assign(f,!1),t.forOf("v",o,m=>t.if((0,p0._)`${l()}(${r}, ${m})`,()=>t.assign(f,!0).break()))}s(d,"loopEnum");function _(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,p0._)`${l()}(${r}, ${m}[${g}])`:(0,p0._)`${r} === ${y}`}s(_,"equalCode")}};gM.default=gze});var PJ=h(yM=>{"use strict";Object.defineProperty(yM,"__esModule",{value:!0});var yze=fJ(),Eze=dJ(),bze=mJ(),Sze=_J(),vze=gJ(),Oze=yJ(),Pze=EJ(),wze=SJ(),Ize=vJ(),Tze=OJ(),Nze=[yze.default,Eze.default,bze.default,Sze.default,vze.default,Oze.default,Pze.default,wze.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Ize.default,Tze.default];yM.default=Nze});var bM=h(h0=>{"use strict";Object.defineProperty(h0,"__esModule",{value:!0});h0.validateAdditionalItems=void 0;var fd=Re(),EM=pt(),Aze={message:({params:{len:e}})=>(0,fd.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,fd._)`{limit: ${e}}`},Rze={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Aze,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,EM.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}wJ(e,n)}};function wJ(e,t){let{gen:r,schema:n,data:i,keyword:o,it:a}=e;a.items=!0;let u=r.const("len",(0,fd._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,fd._)`${u} <= ${t.length}`);else if(typeof n=="object"&&!(0,EM.alwaysValidSchema)(a,n)){let l=r.var("valid",(0,fd._)`${u} <= ${t.length}`);r.if((0,fd.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,u,f=>{e.subschema({keyword:o,dataProp:f,dataPropType:EM.Type.Num},l),a.allErrors||r.if((0,fd.not)(l),()=>r.break())})}s(c,"validateItems")}s(wJ,"validateAdditionalItems");h0.validateAdditionalItems=wJ;h0.default=Rze});var SM=h(m0=>{"use strict";Object.defineProperty(m0,"__esModule",{value:!0});m0.validateTuple=void 0;var IJ=Re(),kw=pt(),Cze=Es(),$ze={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return TJ(e,"additionalItems",t);r.items=!0,!(0,kw.alwaysValidSchema)(r,t)&&e.ok((0,Cze.validateArray)(e))}};function TJ(e,t,r=e.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:u}=e;f(i),u.opts.unevaluated&&r.length&&u.items!==!0&&(u.items=kw.mergeEvaluated.items(n,r.length,u.items));let c=n.name("valid"),l=n.const("len",(0,IJ._)`${o}.length`);r.forEach((d,_)=>{(0,kw.alwaysValidSchema)(u,d)||(n.if((0,IJ._)`${l} > ${_}`,()=>e.subschema({keyword:a,schemaProp:_,dataProp:_},c)),e.ok(c))});function f(d){let{opts:_,errSchemaPath:m}=u,g=r.length,y=g===d.minItems&&(g===d.maxItems||d[t]===!1);if(_.strictTuples&&!y){let b=`"${a}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,kw.checkStrictMode)(u,b,_.strictTuples)}}s(f,"checkStrictTuple")}s(TJ,"validateTuple");m0.validateTuple=TJ;m0.default=$ze});var NJ=h(vM=>{"use strict";Object.defineProperty(vM,"__esModule",{value:!0});var Dze=SM(),Lze={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,Dze.validateTuple)(e,"items")};vM.default=Lze});var RJ=h(OM=>{"use strict";Object.defineProperty(OM,"__esModule",{value:!0});var AJ=Re(),jze=pt(),Mze=Es(),Uze=bM(),xze={message:({params:{len:e}})=>(0,AJ.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,AJ._)`{limit: ${e}}`},qze={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:xze,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,jze.alwaysValidSchema)(n,t)&&(i?(0,Uze.validateAdditionalItems)(e,i):e.ok((0,Mze.validateArray)(e)))}};OM.default=qze});var CJ=h(PM=>{"use strict";Object.defineProperty(PM,"__esModule",{value:!0});var Ss=Re(),Bw=pt(),Fze={message:({params:{min:e,max:t}})=>t===void 0?(0,Ss.str)`must contain at least ${e} valid item(s)`:(0,Ss.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Ss._)`{minContains: ${e}}`:(0,Ss._)`{minContains: ${e}, maxContains: ${t}}`},kze={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Fze,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e,a,u,{minContains:c,maxContains:l}=n;o.opts.next?(a=c===void 0?1:c,u=l):a=1;let f=t.const("len",(0,Ss._)`${i}.length`);if(e.setParams({min:a,max:u}),u===void 0&&a===0){(0,Bw.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&a>u){(0,Bw.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Bw.alwaysValidSchema)(o,r)){let y=(0,Ss._)`${f} >= ${a}`;u!==void 0&&(y=(0,Ss._)`${y} && ${f} <= ${u}`),e.pass(y);return}o.items=!0;let d=t.name("valid");u===void 0&&a===1?m(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),u!==void 0&&t.if((0,Ss._)`${i}.length > 0`,_)):(t.let(d,!1),_()),e.result(d,()=>e.reset());function _(){let y=t.name("_valid"),b=t.let("count",0);m(y,()=>t.if(y,()=>g(b)))}s(_,"validateItemsWithCount");function m(y,b){t.forRange("i",0,f,E=>{e.subschema({keyword:"contains",dataProp:E,dataPropType:Bw.Type.Num,compositeRule:!0},y),b()})}s(m,"validateItems");function g(y){t.code((0,Ss._)`${y}++`),u===void 0?t.if((0,Ss._)`${y} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,Ss._)`${y} > ${u}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,Ss._)`${y} >= ${a}`,()=>t.assign(d,!0)))}s(g,"checkLimits")}};PM.default=kze});var LJ=h(ua=>{"use strict";Object.defineProperty(ua,"__esModule",{value:!0});ua.validateSchemaDeps=ua.validatePropertyDeps=ua.error=void 0;var wM=Re(),Bze=pt(),_0=Es();ua.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,wM.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,wM._)`{property: ${e},
146
146
  missingProperty: ${n},
147
147
  depsCount: ${t},
148
- deps: ${r}}`};var Gze={keyword:"dependencies",type:"object",schemaType:"object",error:ua.error,code(e){let[t,r]=Vze(e);$J(e,t),DJ(e,r)}};function Vze({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}s(Vze,"splitDependencies");function $J(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let a in t){let u=t[a];if(u.length===0)continue;let c=(0,_0.propertyInData)(r,n,a,i.opts.ownProperties);e.setParams({property:a,depsCount:u.length,deps:u.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of u)(0,_0.checkReportMissingProp)(e,l)}):(r.if((0,wM._)`${c} && (${(0,_0.checkMissingProp)(e,u,o)})`),(0,_0.reportMissingProp)(e,o),r.else())}}s($J,"validatePropertyDeps");ua.validatePropertyDeps=$J;function DJ(e,t=e.schema){let{gen:r,data:n,keyword:i,it:o}=e,a=r.name("valid");for(let u in t)(0,Bze.alwaysValidSchema)(o,t[u])||(r.if((0,_0.propertyInData)(r,n,u,o.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:u},a);e.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),e.ok(a))}s(DJ,"validateSchemaDeps");ua.validateSchemaDeps=DJ;ua.default=Gze});var MJ=h(IM=>{"use strict";Object.defineProperty(IM,"__esModule",{value:!0});var jJ=Re(),zze=pt(),Hze={message:"property name must be valid",params:({params:e})=>(0,jJ._)`{propertyName: ${e.propertyName}}`},Kze={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Hze,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,zze.alwaysValidSchema)(i,r))return;let o=t.name("valid");t.forIn("key",n,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,jJ.not)(o),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(o)}};IM.default=Kze});var NM=h(TM=>{"use strict";Object.defineProperty(TM,"__esModule",{value:!0});var Gw=Es(),po=Re(),Wze=fu(),Vw=pt(),Yze={message:"must NOT have additional properties",params:({params:e})=>(0,po._)`{additionalProperty: ${e.additionalProperty}}`},Jze={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Yze,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=e;if(!o)throw new Error("ajv implementation error");let{allErrors:u,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,Vw.alwaysValidSchema)(a,r))return;let l=(0,Gw.allSchemaProperties)(n.properties),f=(0,Gw.allSchemaProperties)(n.patternProperties);d(),e.ok((0,po._)`${o} === ${Wze.default.errors}`);function d(){t.forIn("key",i,b=>{!l.length&&!f.length?g(b):t.if(_(b),()=>g(b))})}s(d,"checkAdditionalProperties");function _(b){let E;if(l.length>8){let S=(0,Vw.schemaRefOrVal)(a,n.properties,"properties");E=(0,Gw.isOwnProperty)(t,S,b)}else l.length?E=(0,po.or)(...l.map(S=>(0,po._)`${b} === ${S}`)):E=po.nil;return f.length&&(E=(0,po.or)(E,...f.map(S=>(0,po._)`${(0,Gw.usePattern)(e,S)}.test(${b})`))),(0,po.not)(E)}s(_,"isAdditional");function m(b){t.code((0,po._)`delete ${i}[${b}]`)}s(m,"deleteAdditional");function g(b){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(b);return}if(r===!1){e.setParams({additionalProperty:b}),e.error(),u||t.break();return}if(typeof r=="object"&&!(0,Vw.alwaysValidSchema)(a,r)){let E=t.name("valid");c.removeAdditional==="failing"?(y(b,E,!1),t.if((0,po.not)(E),()=>{e.reset(),m(b)})):(y(b,E),u||t.if((0,po.not)(E),()=>t.break()))}}s(g,"additionalPropertyCode");function y(b,E,S){let O={keyword:"additionalProperties",dataProp:b,dataPropType:Vw.Type.Str};S===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(O,E)}s(y,"applyAdditionalSchema")}};TM.default=Jze});var qJ=h(RM=>{"use strict";Object.defineProperty(RM,"__esModule",{value:!0});var Xze=i0(),UJ=Es(),AM=pt(),xJ=NM(),Zze={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&xJ.default.code(new Xze.KeywordCxt(o,xJ.default,"additionalProperties"));let a=(0,UJ.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=AM.mergeEvaluated.props(t,(0,AM.toHash)(a),o.props));let u=a.filter(d=>!(0,AM.alwaysValidSchema)(o,r[d]));if(u.length===0)return;let c=t.name("valid");for(let d of u)l(d)?f(d):(t.if((0,UJ.propertyInData)(t,i,d,o.opts.ownProperties)),f(d),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function l(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}s(l,"hasDefault");function f(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}s(f,"applyPropertySchema")}};RM.default=Zze});var GJ=h(CM=>{"use strict";Object.defineProperty(CM,"__esModule",{value:!0});var FJ=Es(),zw=Re(),kJ=pt(),BJ=pt(),Qze={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:o}=e,{opts:a}=o,u=(0,FJ.allSchemaProperties)(r),c=u.filter(y=>(0,kJ.alwaysValidSchema)(o,r[y]));if(u.length===0||c.length===u.length&&(!o.opts.unevaluated||o.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,f=t.name("valid");o.props!==!0&&!(o.props instanceof zw.Name)&&(o.props=(0,BJ.evaluatedPropsToName)(t,o.props));let{props:d}=o;_();function _(){for(let y of u)l&&m(y),o.allErrors?g(y):(t.var(f,!0),g(y),t.if(f))}s(_,"validatePatternProperties");function m(y){for(let b in l)new RegExp(y).test(b)&&(0,kJ.checkStrictMode)(o,`property ${b} matches pattern ${y} (use allowMatchingProperties)`)}s(m,"checkMatchingProperties");function g(y){t.forIn("key",n,b=>{t.if((0,zw._)`${(0,FJ.usePattern)(e,y)}.test(${b})`,()=>{let E=c.includes(y);E||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:b,dataPropType:BJ.Type.Str},f),o.opts.unevaluated&&d!==!0?t.assign((0,zw._)`${d}[${b}]`,!0):!E&&!o.allErrors&&t.if((0,zw.not)(f),()=>t.break())})})}s(g,"validateProperties")}};CM.default=Qze});var VJ=h($M=>{"use strict";Object.defineProperty($M,"__esModule",{value:!0});var eHe=pt(),tHe={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,eHe.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};$M.default=tHe});var zJ=h(DM=>{"use strict";Object.defineProperty(DM,"__esModule",{value:!0});var rHe=Es(),nHe={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:rHe.validateUnion,error:{message:"must match a schema in anyOf"}};DM.default=nHe});var HJ=h(LM=>{"use strict";Object.defineProperty(LM,"__esModule",{value:!0});var Hw=Re(),iHe=pt(),sHe={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Hw._)`{passingSchemas: ${e.passing}}`},oHe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:sHe,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=t.let("valid",!1),u=t.let("passing",null),c=t.name("_valid");e.setParams({passing:u}),t.block(l),e.result(a,()=>e.reset(),()=>e.error(!0));function l(){o.forEach((f,d)=>{let _;(0,iHe.alwaysValidSchema)(i,f)?t.var(c,!0):_=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,Hw._)`${c} && ${a}`).assign(a,!1).assign(u,(0,Hw._)`[${u}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(u,d),_&&e.mergeEvaluated(_,Hw.Name)})})}s(l,"validateOneOf")}};LM.default=oHe});var KJ=h(jM=>{"use strict";Object.defineProperty(jM,"__esModule",{value:!0});var aHe=pt(),uHe={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((o,a)=>{if((0,aHe.alwaysValidSchema)(n,o))return;let u=e.subschema({keyword:"allOf",schemaProp:a},i);e.ok(i),e.mergeEvaluated(u)})}};jM.default=uHe});var JJ=h(MM=>{"use strict";Object.defineProperty(MM,"__esModule",{value:!0});var Kw=Re(),YJ=pt(),cHe={message:({params:e})=>(0,Kw.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Kw._)`{failingKeyword: ${e.ifClause}}`},lHe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:cHe,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,YJ.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=WJ(n,"then"),o=WJ(n,"else");if(!i&&!o)return;let a=t.let("valid",!0),u=t.name("_valid");if(c(),e.reset(),i&&o){let f=t.let("ifClause");e.setParams({ifClause:f}),t.if(u,l("then",f),l("else",f))}else i?t.if(u,l("then")):t.if((0,Kw.not)(u),l("else"));e.pass(a,()=>e.error(!0));function c(){let f=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(f)}s(c,"validateIf");function l(f,d){return()=>{let _=e.subschema({keyword:f},u);t.assign(a,u),e.mergeValidEvaluated(_,a),d?t.assign(d,(0,Kw._)`${f}`):e.setParams({ifClause:f})}}s(l,"validateClause")}};function WJ(e,t){let r=e.schema[t];return r!==void 0&&!(0,YJ.alwaysValidSchema)(e,r)}s(WJ,"hasSchema");MM.default=lHe});var XJ=h(UM=>{"use strict";Object.defineProperty(UM,"__esModule",{value:!0});var fHe=pt(),dHe={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,fHe.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};UM.default=dHe});var ZJ=h(xM=>{"use strict";Object.defineProperty(xM,"__esModule",{value:!0});var pHe=bM(),hHe=NJ(),mHe=SM(),_He=RJ(),gHe=CJ(),yHe=LJ(),EHe=MJ(),bHe=NM(),SHe=qJ(),vHe=GJ(),OHe=VJ(),PHe=zJ(),wHe=HJ(),IHe=KJ(),THe=JJ(),NHe=XJ();function AHe(e=!1){let t=[OHe.default,PHe.default,wHe.default,IHe.default,THe.default,NHe.default,EHe.default,bHe.default,yHe.default,SHe.default,vHe.default];return e?t.push(hHe.default,_He.default):t.push(pHe.default,mHe.default),t.push(gHe.default),t}s(AHe,"getApplicator");xM.default=AHe});var QJ=h(qM=>{"use strict";Object.defineProperty(qM,"__esModule",{value:!0});var hr=Re(),RHe={message:({schemaCode:e})=>(0,hr.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,hr._)`{format: ${e}}`},CHe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:RHe,code(e,t){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:d}=u;if(!c.validateFormats)return;i?_():m();function _(){let g=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),y=r.const("fDef",(0,hr._)`${g}[${a}]`),b=r.let("fType"),E=r.let("format");r.if((0,hr._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(b,(0,hr._)`${y}.type || "string"`).assign(E,(0,hr._)`${y}.validate`),()=>r.assign(b,(0,hr._)`"string"`).assign(E,y)),e.fail$data((0,hr.or)(S(),O()));function S(){return c.strictSchema===!1?hr.nil:(0,hr._)`${a} && !${E}`}s(S,"unknownFmt");function O(){let P=f.$async?(0,hr._)`(${y}.async ? await ${E}(${n}) : ${E}(${n}))`:(0,hr._)`${E}(${n})`,I=(0,hr._)`(typeof ${E} == "function" ? ${P} : ${E}.test(${n}))`;return(0,hr._)`${E} && ${E} !== true && ${b} === ${t} && !${I}`}s(O,"invalidFmt")}s(_,"validate$DataFormat");function m(){let g=d.formats[o];if(!g){S();return}if(g===!0)return;let[y,b,E]=O(g);y===t&&e.pass(P());function S(){if(c.strictSchema===!1){d.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${o}" ignored in schema at path "${l}"`}}s(S,"unknownFormat");function O(I){let j=I instanceof RegExp?(0,hr.regexpCode)(I):c.code.formats?(0,hr._)`${c.code.formats}${(0,hr.getProperty)(o)}`:void 0,x=r.scopeValue("formats",{key:o,ref:I,code:j});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,hr._)`${x}.validate`]:["string",I,x]}s(O,"getFormat");function P(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,hr._)`await ${E}(${n})`}return typeof b=="function"?(0,hr._)`${E}(${n})`:(0,hr._)`${E}.test(${n})`}s(P,"validCondition")}s(m,"validateFormat")}};qM.default=CHe});var eX=h(FM=>{"use strict";Object.defineProperty(FM,"__esModule",{value:!0});var $He=QJ(),DHe=[$He.default];FM.default=DHe});var tX=h(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});Qh.contentVocabulary=Qh.metadataVocabulary=void 0;Qh.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Qh.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var nX=h(kM=>{"use strict";Object.defineProperty(kM,"__esModule",{value:!0});var LHe=lJ(),jHe=PJ(),MHe=ZJ(),UHe=eX(),rX=tX(),xHe=[LHe.default,jHe.default,(0,MHe.default)(),UHe.default,rX.metadataVocabulary,rX.contentVocabulary];kM.default=xHe});var iX=h(g0=>{"use strict";Object.defineProperty(g0,"__esModule",{value:!0});g0.DiscrError=void 0;var qHe;(function(e){e.Tag="tag",e.Mapping="mapping"})(qHe=g0.DiscrError||(g0.DiscrError={}))});var oX=h(GM=>{"use strict";Object.defineProperty(GM,"__esModule",{value:!0});var em=Re(),BM=iX(),sX=Dw(),FHe=pt(),kHe={message:({params:{discrError:e,tagName:t}})=>e===BM.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,em._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},BHe={keyword:"discriminator",type:"object",schemaType:"object",error:kHe,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:o}=e,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let u=n.propertyName;if(typeof u!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",(0,em._)`${r}${(0,em.getProperty)(u)}`);t.if((0,em._)`typeof ${l} == "string"`,()=>f(),()=>e.error(!1,{discrError:BM.DiscrError.Tag,tag:l,tagName:u})),e.ok(c);function f(){let m=_();t.if(!1);for(let g in m)t.elseIf((0,em._)`${l} === ${g}`),t.assign(c,d(m[g]));t.else(),e.error(!1,{discrError:BM.DiscrError.Mapping,tag:l,tagName:u}),t.endIf()}s(f,"validateMapping");function d(m){let g=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:m},g);return e.mergeEvaluated(y,em.Name),g}s(d,"applyTagSchema");function _(){var m;let g={},y=E(i),b=!0;for(let P=0;P<a.length;P++){let I=a[P];I?.$ref&&!(0,FHe.schemaHasRulesButRef)(I,o.self.RULES)&&(I=sX.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,I?.$ref),I instanceof sX.SchemaEnv&&(I=I.schema));let j=(m=I?.properties)===null||m===void 0?void 0:m[u];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);b=b&&(y||E(I)),S(j,P)}if(!b)throw new Error(`discriminator: "${u}" must be required`);return g;function E({required:P}){return Array.isArray(P)&&P.includes(u)}function S(P,I){if(P.const)O(P.const,I);else if(P.enum)for(let j of P.enum)O(j,I);else throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`)}function O(P,I){if(typeof P!="string"||P in g)throw new Error(`discriminator: "${u}" values must be unique strings`);g[P]=I}}s(_,"getMapping")}};GM.default=BHe});var aX=h((t$t,GHe)=>{GHe.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var lX=h((rr,cX)=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.MissingRefError=rr.ValidationError=rr.CodeGen=rr.Name=rr.nil=rr.stringify=rr.str=rr._=rr.KeywordCxt=void 0;var VHe=iJ(),zHe=nX(),HHe=oX(),uX=aX(),KHe=["/properties"],Ww="http://json-schema.org/draft-07/schema",Yw=class extends VHe.default{static{s(this,"Ajv")}_addVocabularies(){super._addVocabularies(),zHe.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(HHe.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(uX,KHe):uX;this.addMetaSchema(t,Ww,!1),this.refs["http://json-schema.org/schema"]=Ww}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Ww)?Ww:void 0)}};cX.exports=rr=Yw;Object.defineProperty(rr,"__esModule",{value:!0});rr.default=Yw;var WHe=i0();Object.defineProperty(rr,"KeywordCxt",{enumerable:!0,get:function(){return WHe.KeywordCxt}});var tm=Re();Object.defineProperty(rr,"_",{enumerable:!0,get:function(){return tm._}});Object.defineProperty(rr,"str",{enumerable:!0,get:function(){return tm.str}});Object.defineProperty(rr,"stringify",{enumerable:!0,get:function(){return tm.stringify}});Object.defineProperty(rr,"nil",{enumerable:!0,get:function(){return tm.nil}});Object.defineProperty(rr,"Name",{enumerable:!0,get:function(){return tm.Name}});Object.defineProperty(rr,"CodeGen",{enumerable:!0,get:function(){return tm.CodeGen}});var YHe=Rw();Object.defineProperty(rr,"ValidationError",{enumerable:!0,get:function(){return YHe.default}});var JHe=Cw();Object.defineProperty(rr,"MissingRefError",{enumerable:!0,get:function(){return JHe.default}})});var fX=h(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});rm.formatLimitDefinition=void 0;var XHe=lX(),ho=Re(),Ac=ho.operators,Jw={formatMaximum:{okStr:"<=",ok:Ac.LTE,fail:Ac.GT},formatMinimum:{okStr:">=",ok:Ac.GTE,fail:Ac.LT},formatExclusiveMaximum:{okStr:"<",ok:Ac.LT,fail:Ac.GTE},formatExclusiveMinimum:{okStr:">",ok:Ac.GT,fail:Ac.LTE}},ZHe={message:({keyword:e,schemaCode:t})=>ho.str`should be ${Jw[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>ho._`{comparison: ${Jw[e].okStr}, limit: ${t}}`};rm.formatLimitDefinition={keyword:Object.keys(Jw),type:"string",schemaType:"string",$data:!0,error:ZHe,code(e){let{gen:t,data:r,schemaCode:n,keyword:i,it:o}=e,{opts:a,self:u}=o;if(!a.validateFormats)return;let c=new XHe.KeywordCxt(o,u.RULES.all.format.definition,"format");c.$data?l():f();function l(){let _=t.scopeValue("formats",{ref:u.formats,code:a.code.formats}),m=t.const("fmt",ho._`${_}[${c.schemaCode}]`);e.fail$data(ho.or(ho._`typeof ${m} != "object"`,ho._`${m} instanceof RegExp`,ho._`typeof ${m}.compare != "function"`,d(m)))}s(l,"validate$DataFormat");function f(){let _=c.schema,m=u.formats[_];if(!m||m===!0)return;if(typeof m!="object"||m instanceof RegExp||typeof m.compare!="function")throw new Error(`"${i}": format "${_}" does not define "compare" function`);let g=t.scopeValue("formats",{key:_,ref:m,code:a.code.formats?ho._`${a.code.formats}${ho.getProperty(_)}`:void 0});e.fail$data(d(g))}s(f,"validateFormat");function d(_){return ho._`${_}.compare(${r}, ${n}) ${Jw[i].fail} 0`}s(d,"compareCode")},dependencies:["format"]};var QHe=s(e=>(e.addKeyword(rm.formatLimitDefinition),e),"formatLimitPlugin");rm.default=QHe});var HM=h((y0,hX)=>{"use strict";Object.defineProperty(y0,"__esModule",{value:!0});var nm=XW(),e5e=fX(),VM=Re(),dX=new VM.Name("fullFormats"),t5e=new VM.Name("fastFormats"),zM=s((e,t={keywords:!0})=>{if(Array.isArray(t))return pX(e,t,nm.fullFormats,dX),e;let[r,n]=t.mode==="fast"?[nm.fastFormats,t5e]:[nm.fullFormats,dX],i=t.formats||nm.formatNames;return pX(e,i,r,n),t.keywords&&e5e.default(e),e},"formatsPlugin");zM.get=(e,t="full")=>{let n=(t==="fast"?nm.fastFormats:nm.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function pX(e,t,r,n){var i,o;(i=(o=e.opts.code).formats)!==null&&i!==void 0||(o.formats=VM._`require("ajv-formats/dist/formats").${n}`);for(let a of t)e.addFormat(a,r[a])}s(pX,"addFormats");hX.exports=y0=zM;Object.defineProperty(y0,"__esModule",{value:!0});y0.default=zM});var WM=h(E0=>{"use strict";Object.defineProperty(E0,"__esModule",{value:!0});E0.dynamicAnchor=void 0;var KM=Oe(),r5e=hs(),mX=Ry(),n5e=sw(),i5e={keyword:"$dynamicAnchor",schemaType:"string",code:e=>_X(e,e.schema)};function _X(e,t){let{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;let i=(0,KM._)`${r5e.default.dynamicAnchors}${(0,KM.getProperty)(t)}`,o=n.errSchemaPath==="#"?n.validateName:s5e(e);r.if((0,KM._)`!${i}`,()=>r.assign(i,o))}s(_X,"dynamicAnchor");E0.dynamicAnchor=_X;function s5e(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:i,baseId:o,localRefs:a,meta:u}=t.root,{schemaId:c}=n.opts,l=new mX.SchemaEnv({schema:r,schemaId:c,root:i,baseId:o,localRefs:a,meta:u});return mX.compileSchema.call(n,l),(0,n5e.getValidate)(e,l)}s(s5e,"_getValidate");E0.default=i5e});var YM=h(b0=>{"use strict";Object.defineProperty(b0,"__esModule",{value:!0});b0.dynamicRef=void 0;var gX=Oe(),o5e=hs(),yX=sw(),a5e={keyword:"$dynamicRef",schemaType:"string",code:e=>EX(e,e.schema)};function EX(e,t){let{gen:r,keyword:n,it:i}=e;if(t[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=t.slice(1);if(i.allErrors)a();else{let c=r.let("valid",!1);a(c),e.ok(c)}function a(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=r.let("_v",(0,gX._)`${o5e.default.dynamicAnchors}${(0,gX.getProperty)(o)}`);r.if(l,u(l,c),u(i.validateName,c))}else u(i.validateName,c)()}s(a,"_dynamicRef");function u(c,l){return l?()=>r.block(()=>{(0,yX.callRef)(e,c),r.let(l,!0)}):()=>(0,yX.callRef)(e,c)}s(u,"_callRef")}s(EX,"dynamicRef");b0.dynamicRef=EX;b0.default=a5e});var bX=h(JM=>{"use strict";Object.defineProperty(JM,"__esModule",{value:!0});var u5e=WM(),c5e=Ve(),l5e={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,u5e.dynamicAnchor)(e,""):(0,c5e.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};JM.default=l5e});var SX=h(XM=>{"use strict";Object.defineProperty(XM,"__esModule",{value:!0});var f5e=YM(),d5e={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,f5e.dynamicRef)(e,e.schema)};XM.default=d5e});var vX=h(ZM=>{"use strict";Object.defineProperty(ZM,"__esModule",{value:!0});var p5e=WM(),h5e=YM(),m5e=bX(),_5e=SX(),g5e=[p5e.default,h5e.default,m5e.default,_5e.default];ZM.default=g5e});var PX=h(QM=>{"use strict";Object.defineProperty(QM,"__esModule",{value:!0});var OX=dw(),y5e={keyword:"dependentRequired",type:"object",schemaType:"object",error:OX.error,code:e=>(0,OX.validatePropertyDeps)(e)};QM.default=y5e});var wX=h(eU=>{"use strict";Object.defineProperty(eU,"__esModule",{value:!0});var E5e=dw(),b5e={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,E5e.validateSchemaDeps)(e)};eU.default=b5e});var IX=h(tU=>{"use strict";Object.defineProperty(tU,"__esModule",{value:!0});var S5e=Ve(),v5e={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){t.contains===void 0&&(0,S5e.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};tU.default=v5e});var TX=h(rU=>{"use strict";Object.defineProperty(rU,"__esModule",{value:!0});var O5e=PX(),P5e=wX(),w5e=IX(),I5e=[O5e.default,P5e.default,w5e.default];rU.default=I5e});var AX=h(nU=>{"use strict";Object.defineProperty(nU,"__esModule",{value:!0});var Rc=Oe(),NX=Ve(),T5e=hs(),N5e={message:"must NOT have unevaluated properties",params:({params:e})=>(0,Rc._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},A5e={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:N5e,code(e){let{gen:t,schema:r,data:n,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:a,props:u}=o;u instanceof Rc.Name?t.if((0,Rc._)`${u} !== true`,()=>t.forIn("key",n,d=>t.if(l(u,d),()=>c(d)))):u!==!0&&t.forIn("key",n,d=>u===void 0?c(d):t.if(f(u,d),()=>c(d))),o.props=!0,e.ok((0,Rc._)`${i} === ${T5e.default.errors}`);function c(d){if(r===!1){e.setParams({unevaluatedProperty:d}),e.error(),a||t.break();return}if(!(0,NX.alwaysValidSchema)(o,r)){let _=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:d,dataPropType:NX.Type.Str},_),a||t.if((0,Rc.not)(_),()=>t.break())}}s(c,"unevaluatedPropCode");function l(d,_){return(0,Rc._)`!${d} || !${d}[${_}]`}s(l,"unevaluatedDynamic");function f(d,_){let m=[];for(let g in d)d[g]===!0&&m.push((0,Rc._)`${_} !== ${g}`);return(0,Rc.and)(...m)}s(f,"unevaluatedStatic")}};nU.default=A5e});var CX=h(iU=>{"use strict";Object.defineProperty(iU,"__esModule",{value:!0});var dd=Oe(),RX=Ve(),R5e={message:({params:{len:e}})=>(0,dd.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,dd._)`{limit: ${e}}`},C5e={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:R5e,code(e){let{gen:t,schema:r,data:n,it:i}=e,o=i.items||0;if(o===!0)return;let a=t.const("len",(0,dd._)`${n}.length`);if(r===!1)e.setParams({len:o}),e.fail((0,dd._)`${a} > ${o}`);else if(typeof r=="object"&&!(0,RX.alwaysValidSchema)(i,r)){let c=t.var("valid",(0,dd._)`${a} <= ${o}`);t.if((0,dd.not)(c),()=>u(c,o)),e.ok(c)}i.items=!0;function u(c,l){t.forRange("i",l,a,f=>{e.subschema({keyword:"unevaluatedItems",dataProp:f,dataPropType:RX.Type.Num},c),i.allErrors||t.if((0,dd.not)(c),()=>t.break())})}s(u,"validateItems")}};iU.default=C5e});var $X=h(sU=>{"use strict";Object.defineProperty(sU,"__esModule",{value:!0});var $5e=AX(),D5e=CX(),L5e=[$5e.default,D5e.default];sU.default=L5e});var LX=h(oU=>{"use strict";Object.defineProperty(oU,"__esModule",{value:!0});var j5e=gL(),M5e=DL(),U5e=ej(),x5e=vX(),q5e=TX(),F5e=$X(),k5e=nj(),DX=ij(),B5e=[x5e.default,j5e.default,M5e.default,(0,U5e.default)(!0),k5e.default,DX.metadataVocabulary,DX.contentVocabulary,q5e.default,F5e.default];oU.default=B5e});var jX=h((O$t,G5e)=>{G5e.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}});var MX=h((P$t,V5e)=>{V5e.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}});var UX=h((w$t,z5e)=>{z5e.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var xX=h((I$t,H5e)=>{H5e.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var qX=h((T$t,K5e)=>{K5e.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}});var FX=h((N$t,W5e)=>{W5e.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var kX=h((A$t,Y5e)=>{Y5e.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var BX=h((R$t,J5e)=>{J5e.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var GX=h(aU=>{"use strict";Object.defineProperty(aU,"__esModule",{value:!0});var X5e=jX(),Z5e=MX(),Q5e=UX(),eKe=xX(),tKe=qX(),rKe=FX(),nKe=kX(),iKe=BX(),sKe=["/properties"];function oKe(e){return[X5e,Z5e,Q5e,eKe,tKe,t(this,rKe),nKe,t(this,iKe)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function t(r,n){return e?r.$dataMetaSchema(n,sKe):n}s(t,"with$data")}s(oKe,"addMetaSchema2020");aU.default=oKe});var cU=h((nr,VX)=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.MissingRefError=nr.ValidationError=nr.CodeGen=nr.Name=nr.nil=nr.stringify=nr.str=nr._=nr.KeywordCxt=void 0;var aKe=hL(),uKe=LX(),cKe=uj(),lKe=GX(),uU="https://json-schema.org/draft/2020-12/schema",Xw=class extends aKe.default{static{s(this,"Ajv2020")}constructor(t={}){super({...t,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),uKe.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(cKe.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:t,meta:r}=this.opts;r&&(lKe.default.call(this,t),this.refs["http://json-schema.org/schema"]=uU)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(uU)?uU:void 0)}};VX.exports=nr=Xw;Object.defineProperty(nr,"__esModule",{value:!0});nr.default=Xw;var fKe=Mh();Object.defineProperty(nr,"KeywordCxt",{enumerable:!0,get:function(){return fKe.KeywordCxt}});var im=Oe();Object.defineProperty(nr,"_",{enumerable:!0,get:function(){return im._}});Object.defineProperty(nr,"str",{enumerable:!0,get:function(){return im.str}});Object.defineProperty(nr,"stringify",{enumerable:!0,get:function(){return im.stringify}});Object.defineProperty(nr,"nil",{enumerable:!0,get:function(){return im.nil}});Object.defineProperty(nr,"Name",{enumerable:!0,get:function(){return im.Name}});Object.defineProperty(nr,"CodeGen",{enumerable:!0,get:function(){return im.CodeGen}});var dKe=Ny();Object.defineProperty(nr,"ValidationError",{enumerable:!0,get:function(){return dKe.default}});var pKe=Ay();Object.defineProperty(nr,"MissingRefError",{enumerable:!0,get:function(){return pKe.default}})});var lU=h((v0,HX)=>{"use strict";Object.defineProperty(v0,"__esModule",{value:!0});var S0=BP(),mo=Ah();function zX(e,t){if(!e.opts.code.source)throw new Error("moduleCode: ajv instance must have code.source option");let{_n:r}=e.scope.opts;return typeof t=="function"?i(t.source):t!==void 0?o(t,n):o(e.schemas,u=>u.meta?void 0:e.compile(u.schema));function n(u){let c=e.getSchema(u);if(!c)throw new Error(`moduleCode: no schema with id ${u}`);return c}function i(u){let c={},l=u?.validateName,f=a(c,u);return e.opts.code.esm?`"use strict";${r}export const validate = ${l};${r}export default ${l};${r}${f}`:`"use strict";${r}module.exports = ${l};${r}module.exports.default = ${l};${r}${f}`}function o(u,c){var l;let f={},d=(0,mo._)`"use strict";`;for(let _ in u){let m=c(u[_]);if(m){let g=a(f,m.source),y=e.opts.code.esm?(0,mo._)`export const ${(0,mo.getEsmExportName)(_)}`:(0,mo._)`exports${(0,mo.getProperty)(_)}`;d=(0,mo._)`${d}${r}${y} = ${(l=m.source)===null||l===void 0?void 0:l.validateName};${r}${g}`}}return`${d}`}function a(u,c){if(!c)throw new Error('moduleCode: function does not have "source" property');if(_(c.validateName)===S0.UsedValueState.Completed)return mo.nil;m(c.validateName,S0.UsedValueState.Started);let l=e.scope.scopeCode(c.scopeValues,u,d),f=new mo._Code(`${l}${r}${c.validateCode}`);return c.evaluated?(0,mo._)`${f}${c.validateName}.evaluated = ${c.evaluated};${r}`:f;function d(g){var y;let b=(y=g.value)===null||y===void 0?void 0:y.ref;if(g.prefix==="validate"&&typeof b=="function")return a(u,b.source);if((g.prefix==="root"||g.prefix==="wrapper")&&typeof b=="object"){let{validate:E,validateName:S}=b;if(!S)throw new Error("ajv internal error");let O=e.opts.code.es5?S0.varKinds.var:S0.varKinds.const,P=(0,mo._)`${O} ${g} = {validate: ${S}};`;if(_(S)===S0.UsedValueState.Started)return P;let I=a(u,E?.source);return(0,mo._)`${P}${r}${I}`}}function _(g){var y;return(y=u[g.prefix])===null||y===void 0?void 0:y.get(g)}function m(g,y){let{prefix:b}=g;(u[b]=u[b]||new Map).set(g,y)}}}s(zX,"standaloneCode");HX.exports=v0=zX;Object.defineProperty(v0,"__esModule",{value:!0});v0.default=zX});var JX=h(sm=>{"use strict";var pu=sm&&sm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sm,"__esModule",{value:!0});sm.jsonSchemaPlugin=void 0;var KX=Gf(),pd=pu(_n()),hKe=zW(),mKe=pu(HM()),_Ke=pu(cU()),gKe=pu(lU()),WX=pu(require("fs/promises")),Hi=pu(require("path")),yKe=pu(require("prettier")),O0=kt(),YX=pu(Xs()),EKe=pu(mn()),ca="schemas",Zw="json-schema";function bKe(e){return{name:ca,async setup(t){let r=new _Ke.default({code:{source:!0},allErrors:!0,strict:!1,verbose:!0,meta:!0});(0,mKe.default)(r,{mode:"fast"}),r.opts.code.formats=(0,hKe._)`require("ajv-formats/dist/formats").fastFormats`;let n=Hi.default.join(e.sourceDirectory,O0.USER_SCHEMAS_DIR_NAME),i,o=[],a=[];if(await pd.default.dirExists(n)&&(r.addKeyword("faker"),i=await pd.default.listFolderContents(n,O0.USER_SCHEMAS_DIR_NAME),await Promise.all(i.map(async u=>{try{let c=pd.default.safePath(e.sourceDirectory).resolve(n,u);if(!c.startsWith(n))throw new Error("All schemas must be in the schemas directory");let l=await WX.default.readFile(c,"utf-8");if(l===""||l===void 0)throw new Error(`Schema 'schemas/${u}' is empty and will be ignored.`);let f=JSON.parse(l);if(f.$schema&&f.$schema!=="https://json-schema.org/draft/2020-12/schema")throw new Error(`Error in ${u}: All JSON schemas must use version 2020-12. See release notes for changes: https://json-schema.org/draft/2020-12/release-notes.html`);if(r.$dataMetaSchema,r.addSchema(f,u),r.errors?.length){let d=r.errors[0];o.push({id:"json-schema-validation-error",pluginName:ca,text:`Error: ${d.message}`,location:{file:Hi.default.join(O0.USER_SCHEMAS_DIR_NAME,u)},detail:{params:d.params,propertyName:d.propertyName,schemaPath:d.schemaPath,data:d.data}})}}catch(c){if(c.message.endsWith("is empty and will be ignored.")){a.push({id:"empty-json-schema-file",pluginName:ca,text:`Schema 'schemas/${u}' is empty and will be ignored.`,location:{file:`schemas/${u}`,suggestion:"Add schema details or remove the file from the project."},detail:"EmptyJSONSchemaFile",notes:[{text:`Schema 'schemas/${u}' is empty and will be ignored.`,location:{file:`schemas/${u}`,suggestion:"Add schema details or remove the file from the project."}}]});return}let l=await(0,KX.getLocation)(u,e.sourceDirectory,c.message);o.push({id:"json-schema-add-error",pluginName:ca,text:`Error: ${c.message}`,location:l,detail:"InvalidAddSchemaError",notes:[{text:c.message}]})}})),await Promise.all(i.map(async u=>{try{let c=r.getSchema(u);c&&r.compile(c.schema).errors?.forEach(f=>{o.push({text:`Failed to compile ${u}: ${f.message}`})})}catch(c){let l=await(0,KX.getLocation)(u,e.sourceDirectory,c.message);o.push({id:"json-schema-compile-error",pluginName:ca,text:`The schema file '${u}' is not valid. Error: ${c.message}`,location:l,detail:"InvalidSchemaError",notes:[{text:c.message}]})}})),YX.default.DEBUG_BUILD_MODE)){let u=Hi.default.resolve(e.outputDirectory,O0.USER_SCHEMAS_DIR_NAME);await pd.default.mkdirIfNotExists(u)}t.onStart(async()=>{if(i)return{errors:o,warnings:a}}),t.onResolve({filter:/schemas\/.*\.json$/},async u=>{let c=Hi.default.isAbsolute(u.path)?u.path:Hi.default.join(u.resolveDir,u.path);if(u.importer&&u.importer!==Hi.default.join(e.sourceDirectory,"config/routes.json"))return{path:c};if(!await pd.default.fileExists(c)){let l="policies.json";return{errors:[{id:"json-schema-build-error",text:`Unable to resolve reference to '${u.path}' from ${l}`,location:{file:Hi.default.join(u.resolveDir,l),namespace:Zw,line:1,column:0,length:0,lineText:`Invalid JSON schema reference in ${l}`,suggestion:""},detail:"RouteReferenceError",pluginName:ca,notes:[{text:`Unable to resolve reference to '${u.path}' from ${l}`,location:null}]}],namespace:Zw,path:c,pluginName:ca}}return{path:c,namespace:Zw,pluginName:ca}}),t.onLoad({filter:/.*/,namespace:Zw},async u=>EKe.default.timeFn(`Generating json schema data: ${Hi.default.basename(u.path)}`,async()=>{let c=[],l;try{let f=Hi.default.relative(n,u.path),d=r.getSchema(f);if(!d)throw new Error(`Could not load schema at ${u.path}`);l=d.source?.validateCode;let _=r.compile(d.schema);l=(0,gKe.default)(r,_)}catch(f){c.push({pluginName:ca,text:`Cannot parse project's schemas/${Hi.default.basename(u.path)} file. Error: ${f.message}`,location:null,notes:[{text:f.message,location:null}],detail:f})}if(YX.default.DEBUG_BUILD_MODE&&l){let f=Hi.default.resolve(e.outputDirectory,O0.USER_SCHEMAS_DIR_NAME),d=Hi.default.relative(n,u.path),_=await yKe.default.format(l,{parser:"babel"}),m=pd.default.safePath(e.sourceDirectory).resolve(f,`${d}.js`);await pd.default.mkdirForFilePathIfNotExits(m),await WX.default.writeFile(m,_,"utf-8")}return{contents:l,errors:c,pluginName:ca,resolveDir:Hi.default.dirname(u.path),watchFiles:[u.path]}}))}}}s(bKe,"jsonSchemaPlugin");sm.jsonSchemaPlugin=bKe});var QX=h(Qw=>{"use strict";Object.defineProperty(Qw,"__esModule",{value:!0});Qw.nodejsCompatPlugin=void 0;var XX=require("path"),ZX=["node:assert","node:async_hooks","node:buffer","node:crypto","node:diagnostics_channel","node:events","node:path","node:process","node:stream","node:string_decoder","node:util"],SKe="nodejs-compat-plugin";function vKe({nodeCompatEnabled:e,sourceDirectory:t}){return{name:SKe,setup(r){let n=new Set;r.onStart(()=>{n.clear()}),r.onResolve({filter:/node:.*/},async({path:i,kind:o,resolveDir:a,...u})=>{let c=`${i}:${o}:${a}:${u.importer}`;if(n.has(c))return;if(n.add(c),!e&&i==="node:async_hooks")return{path:(0,XX.resolve)(__dirname,"../../../polyfills/async_hooks.js")};let l=await r.resolve(i,{kind:o,resolveDir:a,importer:u.importer});return l.errors.length>0?e&&ZX.includes(i)||i.includes("/")&&ZX.includes(i.split("/")[0])?{external:!0}:{external:!0,warnings:l.errors.map(d=>({...d,location:{file:(0,XX.relative)(t,u.importer),line:0,column:0,namespace:"",length:0,lineText:"",suggestion:"Remove the imported node module"},detail:`The package "${i}" wasn't found on the file system but is built into node. If this code is executed it will fail.`}))}:l})}}}s(vKe,"nodejsCompatPlugin");Qw.nodejsCompatPlugin=vKe});var Vn=h(Ki=>{"use strict";Ki.__esModule=!0;Ki.extend=eZ;Ki.indexOf=TKe;Ki.escapeExpression=NKe;Ki.isEmpty=AKe;Ki.createFrame=RKe;Ki.blockParams=CKe;Ki.appendContextPath=$Ke;var OKe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},PKe=/[&<>"'`=]/g,wKe=/[&<>"'`=]/;function IKe(e){return OKe[e]}s(IKe,"escapeChar");function eZ(e){for(var t=1;t<arguments.length;t++)for(var r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&(e[r]=arguments[t][r]);return e}s(eZ,"extend");var dU=Object.prototype.toString;Ki.toString=dU;var fU=s(function(t){return typeof t=="function"},"isFunction");fU(/x/)&&(Ki.isFunction=fU=s(function(e){return typeof e=="function"&&dU.call(e)==="[object Function]"},"isFunction"));Ki.isFunction=fU;var tZ=Array.isArray||function(e){return e&&typeof e=="object"?dU.call(e)==="[object Array]":!1};Ki.isArray=tZ;function TKe(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}s(TKe,"indexOf");function NKe(e){if(typeof e!="string"){if(e&&e.toHTML)return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return wKe.test(e)?e.replace(PKe,IKe):e}s(NKe,"escapeExpression");function AKe(e){return!e&&e!==0?!0:!!(tZ(e)&&e.length===0)}s(AKe,"isEmpty");function RKe(e){var t=eZ({},e);return t._parent=e,t}s(RKe,"createFrame");function CKe(e,t){return e.path=t,e}s(CKe,"blockParams");function $Ke(e,t){return(e?e+".":"")+t}s($Ke,"appendContextPath")});var vs=h((eI,rZ)=>{"use strict";eI.__esModule=!0;var pU=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function hU(e,t){var r=t&&t.loc,n=void 0,i=void 0,o=void 0,a=void 0;r&&(n=r.start.line,i=r.end.line,o=r.start.column,a=r.end.column,e+=" - "+n+":"+o);for(var u=Error.prototype.constructor.call(this,e),c=0;c<pU.length;c++)this[pU[c]]=u[pU[c]];Error.captureStackTrace&&Error.captureStackTrace(this,hU);try{r&&(this.lineNumber=n,this.endLineNumber=i,Object.defineProperty?(Object.defineProperty(this,"column",{value:o,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=o,this.endColumn=a))}catch{}}s(hU,"Exception");hU.prototype=new Error;eI.default=hU;rZ.exports=eI.default});var iZ=h((tI,nZ)=>{"use strict";tI.__esModule=!0;var mU=Vn();tI.default=function(e){e.registerHelper("blockHelperMissing",function(t,r){var n=r.inverse,i=r.fn;if(t===!0)return i(this);if(t===!1||t==null)return n(this);if(mU.isArray(t))return t.length>0?(r.ids&&(r.ids=[r.name]),e.helpers.each(t,r)):n(this);if(r.data&&r.ids){var o=mU.createFrame(r.data);o.contextPath=mU.appendContextPath(r.data.contextPath,r.name),r={data:o}}return i(t,r)})};nZ.exports=tI.default});var oZ=h((rI,sZ)=>{"use strict";rI.__esModule=!0;function DKe(e){return e&&e.__esModule?e:{default:e}}s(DKe,"_interopRequireDefault");var P0=Vn(),LKe=vs(),jKe=DKe(LKe);rI.default=function(e){e.registerHelper("each",function(t,r){if(!r)throw new jKe.default("Must pass iterator to #each");var n=r.fn,i=r.inverse,o=0,a="",u=void 0,c=void 0;r.data&&r.ids&&(c=P0.appendContextPath(r.data.contextPath,r.ids[0])+"."),P0.isFunction(t)&&(t=t.call(this)),r.data&&(u=P0.createFrame(r.data));function l(g,y,b){u&&(u.key=g,u.index=y,u.first=y===0,u.last=!!b,c&&(u.contextPath=c+g)),a=a+n(t[g],{data:u,blockParams:P0.blockParams([t[g],g],[c+g,null])})}if(s(l,"execIteration"),t&&typeof t=="object")if(P0.isArray(t))for(var f=t.length;o<f;o++)o in t&&l(o,o,o===t.length-1);else if(global.Symbol&&t[global.Symbol.iterator]){for(var d=[],_=t[global.Symbol.iterator](),m=_.next();!m.done;m=_.next())d.push(m.value);t=d;for(var f=t.length;o<f;o++)l(o,o,o===t.length-1)}else(function(){var g=void 0;Object.keys(t).forEach(function(y){g!==void 0&&l(g,o-1),g=y,o++}),g!==void 0&&l(g,o-1,!0)})();return o===0&&(a=i(this)),a})};sZ.exports=rI.default});var uZ=h((nI,aZ)=>{"use strict";nI.__esModule=!0;function MKe(e){return e&&e.__esModule?e:{default:e}}s(MKe,"_interopRequireDefault");var UKe=vs(),xKe=MKe(UKe);nI.default=function(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new xKe.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};aZ.exports=nI.default});var dZ=h((iI,fZ)=>{"use strict";iI.__esModule=!0;function qKe(e){return e&&e.__esModule?e:{default:e}}s(qKe,"_interopRequireDefault");var cZ=Vn(),FKe=vs(),lZ=qKe(FKe);iI.default=function(e){e.registerHelper("if",function(t,r){if(arguments.length!=2)throw new lZ.default("#if requires exactly one argument");return cZ.isFunction(t)&&(t=t.call(this)),!r.hash.includeZero&&!t||cZ.isEmpty(t)?r.inverse(this):r.fn(this)}),e.registerHelper("unless",function(t,r){if(arguments.length!=2)throw new lZ.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};fZ.exports=iI.default});var hZ=h((sI,pZ)=>{"use strict";sI.__esModule=!0;sI.default=function(e){e.registerHelper("log",function(){for(var t=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)t.push(arguments[n]);var i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),t[0]=i,e.log.apply(e,t)})};pZ.exports=sI.default});var _Z=h((oI,mZ)=>{"use strict";oI.__esModule=!0;oI.default=function(e){e.registerHelper("lookup",function(t,r,n){return t&&n.lookupProperty(t,r)})};mZ.exports=oI.default});var yZ=h((aI,gZ)=>{"use strict";aI.__esModule=!0;function kKe(e){return e&&e.__esModule?e:{default:e}}s(kKe,"_interopRequireDefault");var w0=Vn(),BKe=vs(),GKe=kKe(BKe);aI.default=function(e){e.registerHelper("with",function(t,r){if(arguments.length!=2)throw new GKe.default("#with requires exactly one argument");w0.isFunction(t)&&(t=t.call(this));var n=r.fn;if(w0.isEmpty(t))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=w0.createFrame(r.data),i.contextPath=w0.appendContextPath(r.data.contextPath,r.ids[0])),n(t,{data:i,blockParams:w0.blockParams([t],[i&&i.contextPath])})})};gZ.exports=aI.default});var _U=h(uI=>{"use strict";uI.__esModule=!0;uI.registerDefaultHelpers=i9e;uI.moveHelperToHooks=s9e;function hd(e){return e&&e.__esModule?e:{default:e}}s(hd,"_interopRequireDefault");var VKe=iZ(),zKe=hd(VKe),HKe=oZ(),KKe=hd(HKe),WKe=uZ(),YKe=hd(WKe),JKe=dZ(),XKe=hd(JKe),ZKe=hZ(),QKe=hd(ZKe),e9e=_Z(),t9e=hd(e9e),r9e=yZ(),n9e=hd(r9e);function i9e(e){zKe.default(e),KKe.default(e),YKe.default(e),XKe.default(e),QKe.default(e),t9e.default(e),n9e.default(e)}s(i9e,"registerDefaultHelpers");function s9e(e,t,r){e.helpers[t]&&(e.hooks[t]=e.helpers[t],r||delete e.helpers[t])}s(s9e,"moveHelperToHooks")});var bZ=h((cI,EZ)=>{"use strict";cI.__esModule=!0;var o9e=Vn();cI.default=function(e){e.registerDecorator("inline",function(t,r,n,i){var o=t;return r.partials||(r.partials={},o=s(function(a,u){var c=n.partials;n.partials=o9e.extend({},c,r.partials);var l=t(a,u);return n.partials=c,l},"ret")),r.partials[i.args[0]]=i.fn,o})};EZ.exports=cI.default});var SZ=h(gU=>{"use strict";gU.__esModule=!0;gU.registerDefaultDecorators=l9e;function a9e(e){return e&&e.__esModule?e:{default:e}}s(a9e,"_interopRequireDefault");var u9e=bZ(),c9e=a9e(u9e);function l9e(e){c9e.default(e)}s(l9e,"registerDefaultDecorators")});var yU=h((lI,vZ)=>{"use strict";lI.__esModule=!0;var f9e=Vn(),om={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:s(function(t){if(typeof t=="string"){var r=f9e.indexOf(om.methodMap,t.toLowerCase());r>=0?t=r:t=parseInt(t,10)}return t},"lookupLevel"),log:s(function(t){if(t=om.lookupLevel(t),typeof console<"u"&&om.lookupLevel(om.level)<=t){var r=om.methodMap[t];console[r]||(r="log");for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];console[r].apply(console,i)}},"log")};lI.default=om;vZ.exports=lI.default});var OZ=h(EU=>{"use strict";EU.__esModule=!0;EU.createNewLookupObject=p9e;var d9e=Vn();function p9e(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return d9e.extend.apply(void 0,[Object.create(null)].concat(t))}s(p9e,"createNewLookupObject")});var bU=h(I0=>{"use strict";I0.__esModule=!0;I0.createProtoAccessControl=g9e;I0.resultIsAllowed=y9e;I0.resetLoggedProperties=b9e;function h9e(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}s(h9e,"_interopRequireWildcard");var PZ=OZ(),m9e=yU(),_9e=h9e(m9e),fI=Object.create(null);function g9e(e){var t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var r=Object.create(null);return r.__proto__=!1,{properties:{whitelist:PZ.createNewLookupObject(r,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:PZ.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}s(g9e,"createProtoAccessControl");function y9e(e,t,r){return wZ(typeof e=="function"?t.methods:t.properties,r)}s(y9e,"resultIsAllowed");function wZ(e,t){return e.whitelist[t]!==void 0?e.whitelist[t]===!0:e.defaultValue!==void 0?e.defaultValue:(E9e(t),!1)}s(wZ,"checkWhiteList");function E9e(e){fI[e]!==!0&&(fI[e]=!0,_9e.log("error",'Handlebars: Access has been denied to resolve the property "'+e+`" because it is not an "own property" of its parent.
148
+ deps: ${r}}`};var Gze={keyword:"dependencies",type:"object",schemaType:"object",error:ua.error,code(e){let[t,r]=Vze(e);$J(e,t),DJ(e,r)}};function Vze({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}s(Vze,"splitDependencies");function $J(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let a in t){let u=t[a];if(u.length===0)continue;let c=(0,_0.propertyInData)(r,n,a,i.opts.ownProperties);e.setParams({property:a,depsCount:u.length,deps:u.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of u)(0,_0.checkReportMissingProp)(e,l)}):(r.if((0,wM._)`${c} && (${(0,_0.checkMissingProp)(e,u,o)})`),(0,_0.reportMissingProp)(e,o),r.else())}}s($J,"validatePropertyDeps");ua.validatePropertyDeps=$J;function DJ(e,t=e.schema){let{gen:r,data:n,keyword:i,it:o}=e,a=r.name("valid");for(let u in t)(0,Bze.alwaysValidSchema)(o,t[u])||(r.if((0,_0.propertyInData)(r,n,u,o.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:u},a);e.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),e.ok(a))}s(DJ,"validateSchemaDeps");ua.validateSchemaDeps=DJ;ua.default=Gze});var MJ=h(IM=>{"use strict";Object.defineProperty(IM,"__esModule",{value:!0});var jJ=Re(),zze=pt(),Hze={message:"property name must be valid",params:({params:e})=>(0,jJ._)`{propertyName: ${e.propertyName}}`},Kze={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Hze,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,zze.alwaysValidSchema)(i,r))return;let o=t.name("valid");t.forIn("key",n,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,jJ.not)(o),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(o)}};IM.default=Kze});var NM=h(TM=>{"use strict";Object.defineProperty(TM,"__esModule",{value:!0});var Gw=Es(),po=Re(),Wze=fu(),Vw=pt(),Yze={message:"must NOT have additional properties",params:({params:e})=>(0,po._)`{additionalProperty: ${e.additionalProperty}}`},Jze={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Yze,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=e;if(!o)throw new Error("ajv implementation error");let{allErrors:u,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,Vw.alwaysValidSchema)(a,r))return;let l=(0,Gw.allSchemaProperties)(n.properties),f=(0,Gw.allSchemaProperties)(n.patternProperties);d(),e.ok((0,po._)`${o} === ${Wze.default.errors}`);function d(){t.forIn("key",i,b=>{!l.length&&!f.length?g(b):t.if(_(b),()=>g(b))})}s(d,"checkAdditionalProperties");function _(b){let E;if(l.length>8){let v=(0,Vw.schemaRefOrVal)(a,n.properties,"properties");E=(0,Gw.isOwnProperty)(t,v,b)}else l.length?E=(0,po.or)(...l.map(v=>(0,po._)`${b} === ${v}`)):E=po.nil;return f.length&&(E=(0,po.or)(E,...f.map(v=>(0,po._)`${(0,Gw.usePattern)(e,v)}.test(${b})`))),(0,po.not)(E)}s(_,"isAdditional");function m(b){t.code((0,po._)`delete ${i}[${b}]`)}s(m,"deleteAdditional");function g(b){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(b);return}if(r===!1){e.setParams({additionalProperty:b}),e.error(),u||t.break();return}if(typeof r=="object"&&!(0,Vw.alwaysValidSchema)(a,r)){let E=t.name("valid");c.removeAdditional==="failing"?(y(b,E,!1),t.if((0,po.not)(E),()=>{e.reset(),m(b)})):(y(b,E),u||t.if((0,po.not)(E),()=>t.break()))}}s(g,"additionalPropertyCode");function y(b,E,v){let O={keyword:"additionalProperties",dataProp:b,dataPropType:Vw.Type.Str};v===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(O,E)}s(y,"applyAdditionalSchema")}};TM.default=Jze});var qJ=h(RM=>{"use strict";Object.defineProperty(RM,"__esModule",{value:!0});var Xze=i0(),UJ=Es(),AM=pt(),xJ=NM(),Zze={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&xJ.default.code(new Xze.KeywordCxt(o,xJ.default,"additionalProperties"));let a=(0,UJ.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=AM.mergeEvaluated.props(t,(0,AM.toHash)(a),o.props));let u=a.filter(d=>!(0,AM.alwaysValidSchema)(o,r[d]));if(u.length===0)return;let c=t.name("valid");for(let d of u)l(d)?f(d):(t.if((0,UJ.propertyInData)(t,i,d,o.opts.ownProperties)),f(d),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function l(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}s(l,"hasDefault");function f(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}s(f,"applyPropertySchema")}};RM.default=Zze});var GJ=h(CM=>{"use strict";Object.defineProperty(CM,"__esModule",{value:!0});var FJ=Es(),zw=Re(),kJ=pt(),BJ=pt(),Qze={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:o}=e,{opts:a}=o,u=(0,FJ.allSchemaProperties)(r),c=u.filter(y=>(0,kJ.alwaysValidSchema)(o,r[y]));if(u.length===0||c.length===u.length&&(!o.opts.unevaluated||o.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,f=t.name("valid");o.props!==!0&&!(o.props instanceof zw.Name)&&(o.props=(0,BJ.evaluatedPropsToName)(t,o.props));let{props:d}=o;_();function _(){for(let y of u)l&&m(y),o.allErrors?g(y):(t.var(f,!0),g(y),t.if(f))}s(_,"validatePatternProperties");function m(y){for(let b in l)new RegExp(y).test(b)&&(0,kJ.checkStrictMode)(o,`property ${b} matches pattern ${y} (use allowMatchingProperties)`)}s(m,"checkMatchingProperties");function g(y){t.forIn("key",n,b=>{t.if((0,zw._)`${(0,FJ.usePattern)(e,y)}.test(${b})`,()=>{let E=c.includes(y);E||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:b,dataPropType:BJ.Type.Str},f),o.opts.unevaluated&&d!==!0?t.assign((0,zw._)`${d}[${b}]`,!0):!E&&!o.allErrors&&t.if((0,zw.not)(f),()=>t.break())})})}s(g,"validateProperties")}};CM.default=Qze});var VJ=h($M=>{"use strict";Object.defineProperty($M,"__esModule",{value:!0});var eHe=pt(),tHe={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,eHe.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};$M.default=tHe});var zJ=h(DM=>{"use strict";Object.defineProperty(DM,"__esModule",{value:!0});var rHe=Es(),nHe={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:rHe.validateUnion,error:{message:"must match a schema in anyOf"}};DM.default=nHe});var HJ=h(LM=>{"use strict";Object.defineProperty(LM,"__esModule",{value:!0});var Hw=Re(),iHe=pt(),sHe={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Hw._)`{passingSchemas: ${e.passing}}`},oHe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:sHe,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=t.let("valid",!1),u=t.let("passing",null),c=t.name("_valid");e.setParams({passing:u}),t.block(l),e.result(a,()=>e.reset(),()=>e.error(!0));function l(){o.forEach((f,d)=>{let _;(0,iHe.alwaysValidSchema)(i,f)?t.var(c,!0):_=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,Hw._)`${c} && ${a}`).assign(a,!1).assign(u,(0,Hw._)`[${u}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(u,d),_&&e.mergeEvaluated(_,Hw.Name)})})}s(l,"validateOneOf")}};LM.default=oHe});var KJ=h(jM=>{"use strict";Object.defineProperty(jM,"__esModule",{value:!0});var aHe=pt(),uHe={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((o,a)=>{if((0,aHe.alwaysValidSchema)(n,o))return;let u=e.subschema({keyword:"allOf",schemaProp:a},i);e.ok(i),e.mergeEvaluated(u)})}};jM.default=uHe});var JJ=h(MM=>{"use strict";Object.defineProperty(MM,"__esModule",{value:!0});var Kw=Re(),YJ=pt(),cHe={message:({params:e})=>(0,Kw.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Kw._)`{failingKeyword: ${e.ifClause}}`},lHe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:cHe,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,YJ.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=WJ(n,"then"),o=WJ(n,"else");if(!i&&!o)return;let a=t.let("valid",!0),u=t.name("_valid");if(c(),e.reset(),i&&o){let f=t.let("ifClause");e.setParams({ifClause:f}),t.if(u,l("then",f),l("else",f))}else i?t.if(u,l("then")):t.if((0,Kw.not)(u),l("else"));e.pass(a,()=>e.error(!0));function c(){let f=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(f)}s(c,"validateIf");function l(f,d){return()=>{let _=e.subschema({keyword:f},u);t.assign(a,u),e.mergeValidEvaluated(_,a),d?t.assign(d,(0,Kw._)`${f}`):e.setParams({ifClause:f})}}s(l,"validateClause")}};function WJ(e,t){let r=e.schema[t];return r!==void 0&&!(0,YJ.alwaysValidSchema)(e,r)}s(WJ,"hasSchema");MM.default=lHe});var XJ=h(UM=>{"use strict";Object.defineProperty(UM,"__esModule",{value:!0});var fHe=pt(),dHe={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,fHe.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};UM.default=dHe});var ZJ=h(xM=>{"use strict";Object.defineProperty(xM,"__esModule",{value:!0});var pHe=bM(),hHe=NJ(),mHe=SM(),_He=RJ(),gHe=CJ(),yHe=LJ(),EHe=MJ(),bHe=NM(),SHe=qJ(),vHe=GJ(),OHe=VJ(),PHe=zJ(),wHe=HJ(),IHe=KJ(),THe=JJ(),NHe=XJ();function AHe(e=!1){let t=[OHe.default,PHe.default,wHe.default,IHe.default,THe.default,NHe.default,EHe.default,bHe.default,yHe.default,SHe.default,vHe.default];return e?t.push(hHe.default,_He.default):t.push(pHe.default,mHe.default),t.push(gHe.default),t}s(AHe,"getApplicator");xM.default=AHe});var QJ=h(qM=>{"use strict";Object.defineProperty(qM,"__esModule",{value:!0});var hr=Re(),RHe={message:({schemaCode:e})=>(0,hr.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,hr._)`{format: ${e}}`},CHe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:RHe,code(e,t){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:d}=u;if(!c.validateFormats)return;i?_():m();function _(){let g=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),y=r.const("fDef",(0,hr._)`${g}[${a}]`),b=r.let("fType"),E=r.let("format");r.if((0,hr._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(b,(0,hr._)`${y}.type || "string"`).assign(E,(0,hr._)`${y}.validate`),()=>r.assign(b,(0,hr._)`"string"`).assign(E,y)),e.fail$data((0,hr.or)(v(),O()));function v(){return c.strictSchema===!1?hr.nil:(0,hr._)`${a} && !${E}`}s(v,"unknownFmt");function O(){let P=f.$async?(0,hr._)`(${y}.async ? await ${E}(${n}) : ${E}(${n}))`:(0,hr._)`${E}(${n})`,I=(0,hr._)`(typeof ${E} == "function" ? ${P} : ${E}.test(${n}))`;return(0,hr._)`${E} && ${E} !== true && ${b} === ${t} && !${I}`}s(O,"invalidFmt")}s(_,"validate$DataFormat");function m(){let g=d.formats[o];if(!g){v();return}if(g===!0)return;let[y,b,E]=O(g);y===t&&e.pass(P());function v(){if(c.strictSchema===!1){d.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${o}" ignored in schema at path "${l}"`}}s(v,"unknownFormat");function O(I){let j=I instanceof RegExp?(0,hr.regexpCode)(I):c.code.formats?(0,hr._)`${c.code.formats}${(0,hr.getProperty)(o)}`:void 0,x=r.scopeValue("formats",{key:o,ref:I,code:j});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,hr._)`${x}.validate`]:["string",I,x]}s(O,"getFormat");function P(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,hr._)`await ${E}(${n})`}return typeof b=="function"?(0,hr._)`${E}(${n})`:(0,hr._)`${E}.test(${n})`}s(P,"validCondition")}s(m,"validateFormat")}};qM.default=CHe});var eX=h(FM=>{"use strict";Object.defineProperty(FM,"__esModule",{value:!0});var $He=QJ(),DHe=[$He.default];FM.default=DHe});var tX=h(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});Qh.contentVocabulary=Qh.metadataVocabulary=void 0;Qh.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Qh.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var nX=h(kM=>{"use strict";Object.defineProperty(kM,"__esModule",{value:!0});var LHe=lJ(),jHe=PJ(),MHe=ZJ(),UHe=eX(),rX=tX(),xHe=[LHe.default,jHe.default,(0,MHe.default)(),UHe.default,rX.metadataVocabulary,rX.contentVocabulary];kM.default=xHe});var iX=h(g0=>{"use strict";Object.defineProperty(g0,"__esModule",{value:!0});g0.DiscrError=void 0;var qHe;(function(e){e.Tag="tag",e.Mapping="mapping"})(qHe=g0.DiscrError||(g0.DiscrError={}))});var oX=h(GM=>{"use strict";Object.defineProperty(GM,"__esModule",{value:!0});var em=Re(),BM=iX(),sX=Dw(),FHe=pt(),kHe={message:({params:{discrError:e,tagName:t}})=>e===BM.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,em._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},BHe={keyword:"discriminator",type:"object",schemaType:"object",error:kHe,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:o}=e,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let u=n.propertyName;if(typeof u!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",(0,em._)`${r}${(0,em.getProperty)(u)}`);t.if((0,em._)`typeof ${l} == "string"`,()=>f(),()=>e.error(!1,{discrError:BM.DiscrError.Tag,tag:l,tagName:u})),e.ok(c);function f(){let m=_();t.if(!1);for(let g in m)t.elseIf((0,em._)`${l} === ${g}`),t.assign(c,d(m[g]));t.else(),e.error(!1,{discrError:BM.DiscrError.Mapping,tag:l,tagName:u}),t.endIf()}s(f,"validateMapping");function d(m){let g=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:m},g);return e.mergeEvaluated(y,em.Name),g}s(d,"applyTagSchema");function _(){var m;let g={},y=E(i),b=!0;for(let P=0;P<a.length;P++){let I=a[P];I?.$ref&&!(0,FHe.schemaHasRulesButRef)(I,o.self.RULES)&&(I=sX.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,I?.$ref),I instanceof sX.SchemaEnv&&(I=I.schema));let j=(m=I?.properties)===null||m===void 0?void 0:m[u];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);b=b&&(y||E(I)),v(j,P)}if(!b)throw new Error(`discriminator: "${u}" must be required`);return g;function E({required:P}){return Array.isArray(P)&&P.includes(u)}function v(P,I){if(P.const)O(P.const,I);else if(P.enum)for(let j of P.enum)O(j,I);else throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`)}function O(P,I){if(typeof P!="string"||P in g)throw new Error(`discriminator: "${u}" values must be unique strings`);g[P]=I}}s(_,"getMapping")}};GM.default=BHe});var aX=h((t$t,GHe)=>{GHe.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var lX=h((rr,cX)=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.MissingRefError=rr.ValidationError=rr.CodeGen=rr.Name=rr.nil=rr.stringify=rr.str=rr._=rr.KeywordCxt=void 0;var VHe=iJ(),zHe=nX(),HHe=oX(),uX=aX(),KHe=["/properties"],Ww="http://json-schema.org/draft-07/schema",Yw=class extends VHe.default{static{s(this,"Ajv")}_addVocabularies(){super._addVocabularies(),zHe.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(HHe.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(uX,KHe):uX;this.addMetaSchema(t,Ww,!1),this.refs["http://json-schema.org/schema"]=Ww}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Ww)?Ww:void 0)}};cX.exports=rr=Yw;Object.defineProperty(rr,"__esModule",{value:!0});rr.default=Yw;var WHe=i0();Object.defineProperty(rr,"KeywordCxt",{enumerable:!0,get:function(){return WHe.KeywordCxt}});var tm=Re();Object.defineProperty(rr,"_",{enumerable:!0,get:function(){return tm._}});Object.defineProperty(rr,"str",{enumerable:!0,get:function(){return tm.str}});Object.defineProperty(rr,"stringify",{enumerable:!0,get:function(){return tm.stringify}});Object.defineProperty(rr,"nil",{enumerable:!0,get:function(){return tm.nil}});Object.defineProperty(rr,"Name",{enumerable:!0,get:function(){return tm.Name}});Object.defineProperty(rr,"CodeGen",{enumerable:!0,get:function(){return tm.CodeGen}});var YHe=Rw();Object.defineProperty(rr,"ValidationError",{enumerable:!0,get:function(){return YHe.default}});var JHe=Cw();Object.defineProperty(rr,"MissingRefError",{enumerable:!0,get:function(){return JHe.default}})});var fX=h(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});rm.formatLimitDefinition=void 0;var XHe=lX(),ho=Re(),Ac=ho.operators,Jw={formatMaximum:{okStr:"<=",ok:Ac.LTE,fail:Ac.GT},formatMinimum:{okStr:">=",ok:Ac.GTE,fail:Ac.LT},formatExclusiveMaximum:{okStr:"<",ok:Ac.LT,fail:Ac.GTE},formatExclusiveMinimum:{okStr:">",ok:Ac.GT,fail:Ac.LTE}},ZHe={message:({keyword:e,schemaCode:t})=>ho.str`should be ${Jw[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>ho._`{comparison: ${Jw[e].okStr}, limit: ${t}}`};rm.formatLimitDefinition={keyword:Object.keys(Jw),type:"string",schemaType:"string",$data:!0,error:ZHe,code(e){let{gen:t,data:r,schemaCode:n,keyword:i,it:o}=e,{opts:a,self:u}=o;if(!a.validateFormats)return;let c=new XHe.KeywordCxt(o,u.RULES.all.format.definition,"format");c.$data?l():f();function l(){let _=t.scopeValue("formats",{ref:u.formats,code:a.code.formats}),m=t.const("fmt",ho._`${_}[${c.schemaCode}]`);e.fail$data(ho.or(ho._`typeof ${m} != "object"`,ho._`${m} instanceof RegExp`,ho._`typeof ${m}.compare != "function"`,d(m)))}s(l,"validate$DataFormat");function f(){let _=c.schema,m=u.formats[_];if(!m||m===!0)return;if(typeof m!="object"||m instanceof RegExp||typeof m.compare!="function")throw new Error(`"${i}": format "${_}" does not define "compare" function`);let g=t.scopeValue("formats",{key:_,ref:m,code:a.code.formats?ho._`${a.code.formats}${ho.getProperty(_)}`:void 0});e.fail$data(d(g))}s(f,"validateFormat");function d(_){return ho._`${_}.compare(${r}, ${n}) ${Jw[i].fail} 0`}s(d,"compareCode")},dependencies:["format"]};var QHe=s(e=>(e.addKeyword(rm.formatLimitDefinition),e),"formatLimitPlugin");rm.default=QHe});var HM=h((y0,hX)=>{"use strict";Object.defineProperty(y0,"__esModule",{value:!0});var nm=XW(),e5e=fX(),VM=Re(),dX=new VM.Name("fullFormats"),t5e=new VM.Name("fastFormats"),zM=s((e,t={keywords:!0})=>{if(Array.isArray(t))return pX(e,t,nm.fullFormats,dX),e;let[r,n]=t.mode==="fast"?[nm.fastFormats,t5e]:[nm.fullFormats,dX],i=t.formats||nm.formatNames;return pX(e,i,r,n),t.keywords&&e5e.default(e),e},"formatsPlugin");zM.get=(e,t="full")=>{let n=(t==="fast"?nm.fastFormats:nm.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function pX(e,t,r,n){var i,o;(i=(o=e.opts.code).formats)!==null&&i!==void 0||(o.formats=VM._`require("ajv-formats/dist/formats").${n}`);for(let a of t)e.addFormat(a,r[a])}s(pX,"addFormats");hX.exports=y0=zM;Object.defineProperty(y0,"__esModule",{value:!0});y0.default=zM});var WM=h(E0=>{"use strict";Object.defineProperty(E0,"__esModule",{value:!0});E0.dynamicAnchor=void 0;var KM=Oe(),r5e=hs(),mX=Ry(),n5e=sw(),i5e={keyword:"$dynamicAnchor",schemaType:"string",code:e=>_X(e,e.schema)};function _X(e,t){let{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;let i=(0,KM._)`${r5e.default.dynamicAnchors}${(0,KM.getProperty)(t)}`,o=n.errSchemaPath==="#"?n.validateName:s5e(e);r.if((0,KM._)`!${i}`,()=>r.assign(i,o))}s(_X,"dynamicAnchor");E0.dynamicAnchor=_X;function s5e(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:i,baseId:o,localRefs:a,meta:u}=t.root,{schemaId:c}=n.opts,l=new mX.SchemaEnv({schema:r,schemaId:c,root:i,baseId:o,localRefs:a,meta:u});return mX.compileSchema.call(n,l),(0,n5e.getValidate)(e,l)}s(s5e,"_getValidate");E0.default=i5e});var YM=h(b0=>{"use strict";Object.defineProperty(b0,"__esModule",{value:!0});b0.dynamicRef=void 0;var gX=Oe(),o5e=hs(),yX=sw(),a5e={keyword:"$dynamicRef",schemaType:"string",code:e=>EX(e,e.schema)};function EX(e,t){let{gen:r,keyword:n,it:i}=e;if(t[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=t.slice(1);if(i.allErrors)a();else{let c=r.let("valid",!1);a(c),e.ok(c)}function a(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=r.let("_v",(0,gX._)`${o5e.default.dynamicAnchors}${(0,gX.getProperty)(o)}`);r.if(l,u(l,c),u(i.validateName,c))}else u(i.validateName,c)()}s(a,"_dynamicRef");function u(c,l){return l?()=>r.block(()=>{(0,yX.callRef)(e,c),r.let(l,!0)}):()=>(0,yX.callRef)(e,c)}s(u,"_callRef")}s(EX,"dynamicRef");b0.dynamicRef=EX;b0.default=a5e});var bX=h(JM=>{"use strict";Object.defineProperty(JM,"__esModule",{value:!0});var u5e=WM(),c5e=Ve(),l5e={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,u5e.dynamicAnchor)(e,""):(0,c5e.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};JM.default=l5e});var SX=h(XM=>{"use strict";Object.defineProperty(XM,"__esModule",{value:!0});var f5e=YM(),d5e={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,f5e.dynamicRef)(e,e.schema)};XM.default=d5e});var vX=h(ZM=>{"use strict";Object.defineProperty(ZM,"__esModule",{value:!0});var p5e=WM(),h5e=YM(),m5e=bX(),_5e=SX(),g5e=[p5e.default,h5e.default,m5e.default,_5e.default];ZM.default=g5e});var PX=h(QM=>{"use strict";Object.defineProperty(QM,"__esModule",{value:!0});var OX=dw(),y5e={keyword:"dependentRequired",type:"object",schemaType:"object",error:OX.error,code:e=>(0,OX.validatePropertyDeps)(e)};QM.default=y5e});var wX=h(eU=>{"use strict";Object.defineProperty(eU,"__esModule",{value:!0});var E5e=dw(),b5e={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,E5e.validateSchemaDeps)(e)};eU.default=b5e});var IX=h(tU=>{"use strict";Object.defineProperty(tU,"__esModule",{value:!0});var S5e=Ve(),v5e={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){t.contains===void 0&&(0,S5e.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};tU.default=v5e});var TX=h(rU=>{"use strict";Object.defineProperty(rU,"__esModule",{value:!0});var O5e=PX(),P5e=wX(),w5e=IX(),I5e=[O5e.default,P5e.default,w5e.default];rU.default=I5e});var AX=h(nU=>{"use strict";Object.defineProperty(nU,"__esModule",{value:!0});var Rc=Oe(),NX=Ve(),T5e=hs(),N5e={message:"must NOT have unevaluated properties",params:({params:e})=>(0,Rc._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},A5e={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:N5e,code(e){let{gen:t,schema:r,data:n,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:a,props:u}=o;u instanceof Rc.Name?t.if((0,Rc._)`${u} !== true`,()=>t.forIn("key",n,d=>t.if(l(u,d),()=>c(d)))):u!==!0&&t.forIn("key",n,d=>u===void 0?c(d):t.if(f(u,d),()=>c(d))),o.props=!0,e.ok((0,Rc._)`${i} === ${T5e.default.errors}`);function c(d){if(r===!1){e.setParams({unevaluatedProperty:d}),e.error(),a||t.break();return}if(!(0,NX.alwaysValidSchema)(o,r)){let _=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:d,dataPropType:NX.Type.Str},_),a||t.if((0,Rc.not)(_),()=>t.break())}}s(c,"unevaluatedPropCode");function l(d,_){return(0,Rc._)`!${d} || !${d}[${_}]`}s(l,"unevaluatedDynamic");function f(d,_){let m=[];for(let g in d)d[g]===!0&&m.push((0,Rc._)`${_} !== ${g}`);return(0,Rc.and)(...m)}s(f,"unevaluatedStatic")}};nU.default=A5e});var CX=h(iU=>{"use strict";Object.defineProperty(iU,"__esModule",{value:!0});var dd=Oe(),RX=Ve(),R5e={message:({params:{len:e}})=>(0,dd.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,dd._)`{limit: ${e}}`},C5e={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:R5e,code(e){let{gen:t,schema:r,data:n,it:i}=e,o=i.items||0;if(o===!0)return;let a=t.const("len",(0,dd._)`${n}.length`);if(r===!1)e.setParams({len:o}),e.fail((0,dd._)`${a} > ${o}`);else if(typeof r=="object"&&!(0,RX.alwaysValidSchema)(i,r)){let c=t.var("valid",(0,dd._)`${a} <= ${o}`);t.if((0,dd.not)(c),()=>u(c,o)),e.ok(c)}i.items=!0;function u(c,l){t.forRange("i",l,a,f=>{e.subschema({keyword:"unevaluatedItems",dataProp:f,dataPropType:RX.Type.Num},c),i.allErrors||t.if((0,dd.not)(c),()=>t.break())})}s(u,"validateItems")}};iU.default=C5e});var $X=h(sU=>{"use strict";Object.defineProperty(sU,"__esModule",{value:!0});var $5e=AX(),D5e=CX(),L5e=[$5e.default,D5e.default];sU.default=L5e});var LX=h(oU=>{"use strict";Object.defineProperty(oU,"__esModule",{value:!0});var j5e=gL(),M5e=DL(),U5e=ej(),x5e=vX(),q5e=TX(),F5e=$X(),k5e=nj(),DX=ij(),B5e=[x5e.default,j5e.default,M5e.default,(0,U5e.default)(!0),k5e.default,DX.metadataVocabulary,DX.contentVocabulary,q5e.default,F5e.default];oU.default=B5e});var jX=h((O$t,G5e)=>{G5e.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}});var MX=h((P$t,V5e)=>{V5e.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}});var UX=h((w$t,z5e)=>{z5e.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var xX=h((I$t,H5e)=>{H5e.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var qX=h((T$t,K5e)=>{K5e.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}});var FX=h((N$t,W5e)=>{W5e.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var kX=h((A$t,Y5e)=>{Y5e.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var BX=h((R$t,J5e)=>{J5e.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var GX=h(aU=>{"use strict";Object.defineProperty(aU,"__esModule",{value:!0});var X5e=jX(),Z5e=MX(),Q5e=UX(),eKe=xX(),tKe=qX(),rKe=FX(),nKe=kX(),iKe=BX(),sKe=["/properties"];function oKe(e){return[X5e,Z5e,Q5e,eKe,tKe,t(this,rKe),nKe,t(this,iKe)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function t(r,n){return e?r.$dataMetaSchema(n,sKe):n}s(t,"with$data")}s(oKe,"addMetaSchema2020");aU.default=oKe});var cU=h((nr,VX)=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.MissingRefError=nr.ValidationError=nr.CodeGen=nr.Name=nr.nil=nr.stringify=nr.str=nr._=nr.KeywordCxt=void 0;var aKe=hL(),uKe=LX(),cKe=uj(),lKe=GX(),uU="https://json-schema.org/draft/2020-12/schema",Xw=class extends aKe.default{static{s(this,"Ajv2020")}constructor(t={}){super({...t,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),uKe.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(cKe.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:t,meta:r}=this.opts;r&&(lKe.default.call(this,t),this.refs["http://json-schema.org/schema"]=uU)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(uU)?uU:void 0)}};VX.exports=nr=Xw;Object.defineProperty(nr,"__esModule",{value:!0});nr.default=Xw;var fKe=Mh();Object.defineProperty(nr,"KeywordCxt",{enumerable:!0,get:function(){return fKe.KeywordCxt}});var im=Oe();Object.defineProperty(nr,"_",{enumerable:!0,get:function(){return im._}});Object.defineProperty(nr,"str",{enumerable:!0,get:function(){return im.str}});Object.defineProperty(nr,"stringify",{enumerable:!0,get:function(){return im.stringify}});Object.defineProperty(nr,"nil",{enumerable:!0,get:function(){return im.nil}});Object.defineProperty(nr,"Name",{enumerable:!0,get:function(){return im.Name}});Object.defineProperty(nr,"CodeGen",{enumerable:!0,get:function(){return im.CodeGen}});var dKe=Ny();Object.defineProperty(nr,"ValidationError",{enumerable:!0,get:function(){return dKe.default}});var pKe=Ay();Object.defineProperty(nr,"MissingRefError",{enumerable:!0,get:function(){return pKe.default}})});var lU=h((v0,HX)=>{"use strict";Object.defineProperty(v0,"__esModule",{value:!0});var S0=BP(),mo=Ah();function zX(e,t){if(!e.opts.code.source)throw new Error("moduleCode: ajv instance must have code.source option");let{_n:r}=e.scope.opts;return typeof t=="function"?i(t.source):t!==void 0?o(t,n):o(e.schemas,u=>u.meta?void 0:e.compile(u.schema));function n(u){let c=e.getSchema(u);if(!c)throw new Error(`moduleCode: no schema with id ${u}`);return c}function i(u){let c={},l=u?.validateName,f=a(c,u);return e.opts.code.esm?`"use strict";${r}export const validate = ${l};${r}export default ${l};${r}${f}`:`"use strict";${r}module.exports = ${l};${r}module.exports.default = ${l};${r}${f}`}function o(u,c){var l;let f={},d=(0,mo._)`"use strict";`;for(let _ in u){let m=c(u[_]);if(m){let g=a(f,m.source),y=e.opts.code.esm?(0,mo._)`export const ${(0,mo.getEsmExportName)(_)}`:(0,mo._)`exports${(0,mo.getProperty)(_)}`;d=(0,mo._)`${d}${r}${y} = ${(l=m.source)===null||l===void 0?void 0:l.validateName};${r}${g}`}}return`${d}`}function a(u,c){if(!c)throw new Error('moduleCode: function does not have "source" property');if(_(c.validateName)===S0.UsedValueState.Completed)return mo.nil;m(c.validateName,S0.UsedValueState.Started);let l=e.scope.scopeCode(c.scopeValues,u,d),f=new mo._Code(`${l}${r}${c.validateCode}`);return c.evaluated?(0,mo._)`${f}${c.validateName}.evaluated = ${c.evaluated};${r}`:f;function d(g){var y;let b=(y=g.value)===null||y===void 0?void 0:y.ref;if(g.prefix==="validate"&&typeof b=="function")return a(u,b.source);if((g.prefix==="root"||g.prefix==="wrapper")&&typeof b=="object"){let{validate:E,validateName:v}=b;if(!v)throw new Error("ajv internal error");let O=e.opts.code.es5?S0.varKinds.var:S0.varKinds.const,P=(0,mo._)`${O} ${g} = {validate: ${v}};`;if(_(v)===S0.UsedValueState.Started)return P;let I=a(u,E?.source);return(0,mo._)`${P}${r}${I}`}}function _(g){var y;return(y=u[g.prefix])===null||y===void 0?void 0:y.get(g)}function m(g,y){let{prefix:b}=g;(u[b]=u[b]||new Map).set(g,y)}}}s(zX,"standaloneCode");HX.exports=v0=zX;Object.defineProperty(v0,"__esModule",{value:!0});v0.default=zX});var JX=h(sm=>{"use strict";var pu=sm&&sm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sm,"__esModule",{value:!0});sm.jsonSchemaPlugin=void 0;var KX=Gf(),pd=pu(_n()),hKe=zW(),mKe=pu(HM()),_Ke=pu(cU()),gKe=pu(lU()),WX=pu(require("fs/promises")),Hi=pu(require("path")),yKe=pu(require("prettier")),O0=kt(),YX=pu(Xs()),EKe=pu(mn()),ca="schemas",Zw="json-schema";function bKe(e){return{name:ca,async setup(t){let r=new _Ke.default({code:{source:!0},allErrors:!0,strict:!1,verbose:!0,meta:!0});(0,mKe.default)(r,{mode:"fast"}),r.opts.code.formats=(0,hKe._)`require("ajv-formats/dist/formats").fastFormats`;let n=Hi.default.join(e.sourceDirectory,O0.USER_SCHEMAS_DIR_NAME),i,o=[],a=[];if(await pd.default.dirExists(n)&&(r.addKeyword("faker"),i=await pd.default.listFolderContents(n,O0.USER_SCHEMAS_DIR_NAME),await Promise.all(i.map(async u=>{try{let c=pd.default.safePath(e.sourceDirectory).resolve(n,u);if(!c.startsWith(n))throw new Error("All schemas must be in the schemas directory");let l=await WX.default.readFile(c,"utf-8");if(l===""||l===void 0)throw new Error(`Schema 'schemas/${u}' is empty and will be ignored.`);let f=JSON.parse(l);if(f.$schema&&f.$schema!=="https://json-schema.org/draft/2020-12/schema")throw new Error(`Error in ${u}: All JSON schemas must use version 2020-12. See release notes for changes: https://json-schema.org/draft/2020-12/release-notes.html`);if(r.$dataMetaSchema,r.addSchema(f,u),r.errors?.length){let d=r.errors[0];o.push({id:"json-schema-validation-error",pluginName:ca,text:`Error: ${d.message}`,location:{file:Hi.default.join(O0.USER_SCHEMAS_DIR_NAME,u)},detail:{params:d.params,propertyName:d.propertyName,schemaPath:d.schemaPath,data:d.data}})}}catch(c){if(c.message.endsWith("is empty and will be ignored.")){a.push({id:"empty-json-schema-file",pluginName:ca,text:`Schema 'schemas/${u}' is empty and will be ignored.`,location:{file:`schemas/${u}`,suggestion:"Add schema details or remove the file from the project."},detail:"EmptyJSONSchemaFile",notes:[{text:`Schema 'schemas/${u}' is empty and will be ignored.`,location:{file:`schemas/${u}`,suggestion:"Add schema details or remove the file from the project."}}]});return}let l=await(0,KX.getLocation)(u,e.sourceDirectory,c.message);o.push({id:"json-schema-add-error",pluginName:ca,text:`Error: ${c.message}`,location:l,detail:"InvalidAddSchemaError",notes:[{text:c.message}]})}})),await Promise.all(i.map(async u=>{try{let c=r.getSchema(u);c&&r.compile(c.schema).errors?.forEach(f=>{o.push({text:`Failed to compile ${u}: ${f.message}`})})}catch(c){let l=await(0,KX.getLocation)(u,e.sourceDirectory,c.message);o.push({id:"json-schema-compile-error",pluginName:ca,text:`The schema file '${u}' is not valid. Error: ${c.message}`,location:l,detail:"InvalidSchemaError",notes:[{text:c.message}]})}})),YX.default.DEBUG_BUILD_MODE)){let u=Hi.default.resolve(e.outputDirectory,O0.USER_SCHEMAS_DIR_NAME);await pd.default.mkdirIfNotExists(u)}t.onStart(async()=>{if(i)return{errors:o,warnings:a}}),t.onResolve({filter:/schemas\/.*\.json$/},async u=>{let c=Hi.default.isAbsolute(u.path)?u.path:Hi.default.join(u.resolveDir,u.path);if(u.importer&&u.importer!==Hi.default.join(e.sourceDirectory,"config/routes.json"))return{path:c};if(!await pd.default.fileExists(c)){let l="policies.json";return{errors:[{id:"json-schema-build-error",text:`Unable to resolve reference to '${u.path}' from ${l}`,location:{file:Hi.default.join(u.resolveDir,l),namespace:Zw,line:1,column:0,length:0,lineText:`Invalid JSON schema reference in ${l}`,suggestion:""},detail:"RouteReferenceError",pluginName:ca,notes:[{text:`Unable to resolve reference to '${u.path}' from ${l}`,location:null}]}],namespace:Zw,path:c,pluginName:ca}}return{path:c,namespace:Zw,pluginName:ca}}),t.onLoad({filter:/.*/,namespace:Zw},async u=>EKe.default.timeFn(`Generating json schema data: ${Hi.default.basename(u.path)}`,async()=>{let c=[],l;try{let f=Hi.default.relative(n,u.path),d=r.getSchema(f);if(!d)throw new Error(`Could not load schema at ${u.path}`);l=d.source?.validateCode;let _=r.compile(d.schema);l=(0,gKe.default)(r,_)}catch(f){c.push({pluginName:ca,text:`Cannot parse project's schemas/${Hi.default.basename(u.path)} file. Error: ${f.message}`,location:null,notes:[{text:f.message,location:null}],detail:f})}if(YX.default.DEBUG_BUILD_MODE&&l){let f=Hi.default.resolve(e.outputDirectory,O0.USER_SCHEMAS_DIR_NAME),d=Hi.default.relative(n,u.path),_=await yKe.default.format(l,{parser:"babel"}),m=pd.default.safePath(e.sourceDirectory).resolve(f,`${d}.js`);await pd.default.mkdirForFilePathIfNotExits(m),await WX.default.writeFile(m,_,"utf-8")}return{contents:l,errors:c,pluginName:ca,resolveDir:Hi.default.dirname(u.path),watchFiles:[u.path]}}))}}}s(bKe,"jsonSchemaPlugin");sm.jsonSchemaPlugin=bKe});var QX=h(Qw=>{"use strict";Object.defineProperty(Qw,"__esModule",{value:!0});Qw.nodejsCompatPlugin=void 0;var XX=require("path"),ZX=["node:assert","node:async_hooks","node:buffer","node:crypto","node:diagnostics_channel","node:events","node:path","node:process","node:stream","node:string_decoder","node:util"],SKe="nodejs-compat-plugin";function vKe({nodeCompatEnabled:e,sourceDirectory:t}){return{name:SKe,setup(r){let n=new Set;r.onStart(()=>{n.clear()}),r.onResolve({filter:/node:.*/},async({path:i,kind:o,resolveDir:a,...u})=>{let c=`${i}:${o}:${a}:${u.importer}`;if(n.has(c))return;if(n.add(c),!e&&i==="node:async_hooks")return{path:(0,XX.resolve)(__dirname,"../../../polyfills/async_hooks.js")};let l=await r.resolve(i,{kind:o,resolveDir:a,importer:u.importer});return l.errors.length>0?e&&ZX.includes(i)||i.includes("/")&&ZX.includes(i.split("/")[0])?{external:!0}:{external:!0,warnings:l.errors.map(d=>({...d,location:{file:(0,XX.relative)(t,u.importer),line:0,column:0,namespace:"",length:0,lineText:"",suggestion:"Remove the imported node module"},detail:`The package "${i}" wasn't found on the file system but is built into node. If this code is executed it will fail.`}))}:l})}}}s(vKe,"nodejsCompatPlugin");Qw.nodejsCompatPlugin=vKe});var Vn=h(Ki=>{"use strict";Ki.__esModule=!0;Ki.extend=eZ;Ki.indexOf=TKe;Ki.escapeExpression=NKe;Ki.isEmpty=AKe;Ki.createFrame=RKe;Ki.blockParams=CKe;Ki.appendContextPath=$Ke;var OKe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},PKe=/[&<>"'`=]/g,wKe=/[&<>"'`=]/;function IKe(e){return OKe[e]}s(IKe,"escapeChar");function eZ(e){for(var t=1;t<arguments.length;t++)for(var r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&(e[r]=arguments[t][r]);return e}s(eZ,"extend");var dU=Object.prototype.toString;Ki.toString=dU;var fU=s(function(t){return typeof t=="function"},"isFunction");fU(/x/)&&(Ki.isFunction=fU=s(function(e){return typeof e=="function"&&dU.call(e)==="[object Function]"},"isFunction"));Ki.isFunction=fU;var tZ=Array.isArray||function(e){return e&&typeof e=="object"?dU.call(e)==="[object Array]":!1};Ki.isArray=tZ;function TKe(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}s(TKe,"indexOf");function NKe(e){if(typeof e!="string"){if(e&&e.toHTML)return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return wKe.test(e)?e.replace(PKe,IKe):e}s(NKe,"escapeExpression");function AKe(e){return!e&&e!==0?!0:!!(tZ(e)&&e.length===0)}s(AKe,"isEmpty");function RKe(e){var t=eZ({},e);return t._parent=e,t}s(RKe,"createFrame");function CKe(e,t){return e.path=t,e}s(CKe,"blockParams");function $Ke(e,t){return(e?e+".":"")+t}s($Ke,"appendContextPath")});var vs=h((eI,rZ)=>{"use strict";eI.__esModule=!0;var pU=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function hU(e,t){var r=t&&t.loc,n=void 0,i=void 0,o=void 0,a=void 0;r&&(n=r.start.line,i=r.end.line,o=r.start.column,a=r.end.column,e+=" - "+n+":"+o);for(var u=Error.prototype.constructor.call(this,e),c=0;c<pU.length;c++)this[pU[c]]=u[pU[c]];Error.captureStackTrace&&Error.captureStackTrace(this,hU);try{r&&(this.lineNumber=n,this.endLineNumber=i,Object.defineProperty?(Object.defineProperty(this,"column",{value:o,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=o,this.endColumn=a))}catch{}}s(hU,"Exception");hU.prototype=new Error;eI.default=hU;rZ.exports=eI.default});var iZ=h((tI,nZ)=>{"use strict";tI.__esModule=!0;var mU=Vn();tI.default=function(e){e.registerHelper("blockHelperMissing",function(t,r){var n=r.inverse,i=r.fn;if(t===!0)return i(this);if(t===!1||t==null)return n(this);if(mU.isArray(t))return t.length>0?(r.ids&&(r.ids=[r.name]),e.helpers.each(t,r)):n(this);if(r.data&&r.ids){var o=mU.createFrame(r.data);o.contextPath=mU.appendContextPath(r.data.contextPath,r.name),r={data:o}}return i(t,r)})};nZ.exports=tI.default});var oZ=h((rI,sZ)=>{"use strict";rI.__esModule=!0;function DKe(e){return e&&e.__esModule?e:{default:e}}s(DKe,"_interopRequireDefault");var P0=Vn(),LKe=vs(),jKe=DKe(LKe);rI.default=function(e){e.registerHelper("each",function(t,r){if(!r)throw new jKe.default("Must pass iterator to #each");var n=r.fn,i=r.inverse,o=0,a="",u=void 0,c=void 0;r.data&&r.ids&&(c=P0.appendContextPath(r.data.contextPath,r.ids[0])+"."),P0.isFunction(t)&&(t=t.call(this)),r.data&&(u=P0.createFrame(r.data));function l(g,y,b){u&&(u.key=g,u.index=y,u.first=y===0,u.last=!!b,c&&(u.contextPath=c+g)),a=a+n(t[g],{data:u,blockParams:P0.blockParams([t[g],g],[c+g,null])})}if(s(l,"execIteration"),t&&typeof t=="object")if(P0.isArray(t))for(var f=t.length;o<f;o++)o in t&&l(o,o,o===t.length-1);else if(global.Symbol&&t[global.Symbol.iterator]){for(var d=[],_=t[global.Symbol.iterator](),m=_.next();!m.done;m=_.next())d.push(m.value);t=d;for(var f=t.length;o<f;o++)l(o,o,o===t.length-1)}else(function(){var g=void 0;Object.keys(t).forEach(function(y){g!==void 0&&l(g,o-1),g=y,o++}),g!==void 0&&l(g,o-1,!0)})();return o===0&&(a=i(this)),a})};sZ.exports=rI.default});var uZ=h((nI,aZ)=>{"use strict";nI.__esModule=!0;function MKe(e){return e&&e.__esModule?e:{default:e}}s(MKe,"_interopRequireDefault");var UKe=vs(),xKe=MKe(UKe);nI.default=function(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new xKe.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};aZ.exports=nI.default});var dZ=h((iI,fZ)=>{"use strict";iI.__esModule=!0;function qKe(e){return e&&e.__esModule?e:{default:e}}s(qKe,"_interopRequireDefault");var cZ=Vn(),FKe=vs(),lZ=qKe(FKe);iI.default=function(e){e.registerHelper("if",function(t,r){if(arguments.length!=2)throw new lZ.default("#if requires exactly one argument");return cZ.isFunction(t)&&(t=t.call(this)),!r.hash.includeZero&&!t||cZ.isEmpty(t)?r.inverse(this):r.fn(this)}),e.registerHelper("unless",function(t,r){if(arguments.length!=2)throw new lZ.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};fZ.exports=iI.default});var hZ=h((sI,pZ)=>{"use strict";sI.__esModule=!0;sI.default=function(e){e.registerHelper("log",function(){for(var t=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)t.push(arguments[n]);var i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),t[0]=i,e.log.apply(e,t)})};pZ.exports=sI.default});var _Z=h((oI,mZ)=>{"use strict";oI.__esModule=!0;oI.default=function(e){e.registerHelper("lookup",function(t,r,n){return t&&n.lookupProperty(t,r)})};mZ.exports=oI.default});var yZ=h((aI,gZ)=>{"use strict";aI.__esModule=!0;function kKe(e){return e&&e.__esModule?e:{default:e}}s(kKe,"_interopRequireDefault");var w0=Vn(),BKe=vs(),GKe=kKe(BKe);aI.default=function(e){e.registerHelper("with",function(t,r){if(arguments.length!=2)throw new GKe.default("#with requires exactly one argument");w0.isFunction(t)&&(t=t.call(this));var n=r.fn;if(w0.isEmpty(t))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=w0.createFrame(r.data),i.contextPath=w0.appendContextPath(r.data.contextPath,r.ids[0])),n(t,{data:i,blockParams:w0.blockParams([t],[i&&i.contextPath])})})};gZ.exports=aI.default});var _U=h(uI=>{"use strict";uI.__esModule=!0;uI.registerDefaultHelpers=i9e;uI.moveHelperToHooks=s9e;function hd(e){return e&&e.__esModule?e:{default:e}}s(hd,"_interopRequireDefault");var VKe=iZ(),zKe=hd(VKe),HKe=oZ(),KKe=hd(HKe),WKe=uZ(),YKe=hd(WKe),JKe=dZ(),XKe=hd(JKe),ZKe=hZ(),QKe=hd(ZKe),e9e=_Z(),t9e=hd(e9e),r9e=yZ(),n9e=hd(r9e);function i9e(e){zKe.default(e),KKe.default(e),YKe.default(e),XKe.default(e),QKe.default(e),t9e.default(e),n9e.default(e)}s(i9e,"registerDefaultHelpers");function s9e(e,t,r){e.helpers[t]&&(e.hooks[t]=e.helpers[t],r||delete e.helpers[t])}s(s9e,"moveHelperToHooks")});var bZ=h((cI,EZ)=>{"use strict";cI.__esModule=!0;var o9e=Vn();cI.default=function(e){e.registerDecorator("inline",function(t,r,n,i){var o=t;return r.partials||(r.partials={},o=s(function(a,u){var c=n.partials;n.partials=o9e.extend({},c,r.partials);var l=t(a,u);return n.partials=c,l},"ret")),r.partials[i.args[0]]=i.fn,o})};EZ.exports=cI.default});var SZ=h(gU=>{"use strict";gU.__esModule=!0;gU.registerDefaultDecorators=l9e;function a9e(e){return e&&e.__esModule?e:{default:e}}s(a9e,"_interopRequireDefault");var u9e=bZ(),c9e=a9e(u9e);function l9e(e){c9e.default(e)}s(l9e,"registerDefaultDecorators")});var yU=h((lI,vZ)=>{"use strict";lI.__esModule=!0;var f9e=Vn(),om={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:s(function(t){if(typeof t=="string"){var r=f9e.indexOf(om.methodMap,t.toLowerCase());r>=0?t=r:t=parseInt(t,10)}return t},"lookupLevel"),log:s(function(t){if(t=om.lookupLevel(t),typeof console<"u"&&om.lookupLevel(om.level)<=t){var r=om.methodMap[t];console[r]||(r="log");for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];console[r].apply(console,i)}},"log")};lI.default=om;vZ.exports=lI.default});var OZ=h(EU=>{"use strict";EU.__esModule=!0;EU.createNewLookupObject=p9e;var d9e=Vn();function p9e(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return d9e.extend.apply(void 0,[Object.create(null)].concat(t))}s(p9e,"createNewLookupObject")});var bU=h(I0=>{"use strict";I0.__esModule=!0;I0.createProtoAccessControl=g9e;I0.resultIsAllowed=y9e;I0.resetLoggedProperties=b9e;function h9e(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}s(h9e,"_interopRequireWildcard");var PZ=OZ(),m9e=yU(),_9e=h9e(m9e),fI=Object.create(null);function g9e(e){var t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var r=Object.create(null);return r.__proto__=!1,{properties:{whitelist:PZ.createNewLookupObject(r,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:PZ.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}s(g9e,"createProtoAccessControl");function y9e(e,t,r){return wZ(typeof e=="function"?t.methods:t.properties,r)}s(y9e,"resultIsAllowed");function wZ(e,t){return e.whitelist[t]!==void 0?e.whitelist[t]===!0:e.defaultValue!==void 0?e.defaultValue:(E9e(t),!1)}s(wZ,"checkWhiteList");function E9e(e){fI[e]!==!0&&(fI[e]=!0,_9e.log("error",'Handlebars: Access has been denied to resolve the property "'+e+`" because it is not an "own property" of its parent.
149
149
  You can add a runtime option to disable the check or this warning:
150
150
  See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}s(E9e,"logUnexpecedPropertyAccessOnce");function b9e(){Object.keys(fI).forEach(function(e){delete fI[e]})}s(b9e,"resetLoggedProperties")});var pI=h(la=>{"use strict";la.__esModule=!0;la.HandlebarsEnvironment=OU;function IZ(e){return e&&e.__esModule?e:{default:e}}s(IZ,"_interopRequireDefault");var md=Vn(),S9e=vs(),SU=IZ(S9e),v9e=_U(),O9e=SZ(),P9e=yU(),dI=IZ(P9e),w9e=bU(),I9e="4.7.7";la.VERSION=I9e;var T9e=8;la.COMPILER_REVISION=T9e;var N9e=7;la.LAST_COMPATIBLE_COMPILER_REVISION=N9e;var A9e={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};la.REVISION_CHANGES=A9e;var vU="[object Object]";function OU(e,t,r){this.helpers=e||{},this.partials=t||{},this.decorators=r||{},v9e.registerDefaultHelpers(this),O9e.registerDefaultDecorators(this)}s(OU,"HandlebarsEnvironment");OU.prototype={constructor:OU,logger:dI.default,log:dI.default.log,registerHelper:s(function(t,r){if(md.toString.call(t)===vU){if(r)throw new SU.default("Arg not supported with multiple helpers");md.extend(this.helpers,t)}else this.helpers[t]=r},"registerHelper"),unregisterHelper:s(function(t){delete this.helpers[t]},"unregisterHelper"),registerPartial:s(function(t,r){if(md.toString.call(t)===vU)md.extend(this.partials,t);else{if(typeof r>"u")throw new SU.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=r}},"registerPartial"),unregisterPartial:s(function(t){delete this.partials[t]},"unregisterPartial"),registerDecorator:s(function(t,r){if(md.toString.call(t)===vU){if(r)throw new SU.default("Arg not supported with multiple decorators");md.extend(this.decorators,t)}else this.decorators[t]=r},"registerDecorator"),unregisterDecorator:s(function(t){delete this.decorators[t]},"unregisterDecorator"),resetLoggedPropertyAccesses:s(function(){w9e.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var R9e=dI.default.log;la.log=R9e;la.createFrame=md.createFrame;la.logger=dI.default});var NZ=h((hI,TZ)=>{"use strict";hI.__esModule=!0;function PU(e){this.string=e}s(PU,"SafeString");PU.prototype.toString=PU.prototype.toHTML=function(){return""+this.string};hI.default=PU;TZ.exports=hI.default});var AZ=h(wU=>{"use strict";wU.__esModule=!0;wU.wrapHelper=C9e;function C9e(e,t){if(typeof e!="function")return e;var r=s(function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=t(i),e.apply(this,arguments)},"wrapper");return r}s(C9e,"wrapHelper")});var LZ=h(Cc=>{"use strict";Cc.__esModule=!0;Cc.checkRevision=U9e;Cc.template=x9e;Cc.wrapProgram=mI;Cc.resolvePartial=q9e;Cc.invokePartial=F9e;Cc.noop=$Z;function $9e(e){return e&&e.__esModule?e:{default:e}}s($9e,"_interopRequireDefault");function D9e(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}s(D9e,"_interopRequireWildcard");var L9e=Vn(),hu=D9e(L9e),j9e=vs(),mu=$9e(j9e),_u=pI(),RZ=_U(),M9e=AZ(),CZ=bU();function U9e(e){var t=e&&e[0]||1,r=_u.COMPILER_REVISION;if(!(t>=_u.LAST_COMPATIBLE_COMPILER_REVISION&&t<=_u.COMPILER_REVISION))if(t<_u.LAST_COMPATIBLE_COMPILER_REVISION){var n=_u.REVISION_CHANGES[r],i=_u.REVISION_CHANGES[t];throw new mu.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+i+").")}else throw new mu.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}s(U9e,"checkRevision");function x9e(e,t){if(!t)throw new mu.default("No environment passed to template");if(!e||!e.main)throw new mu.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var r=e.compiler&&e.compiler[0]===7;function n(a,u,c){c.hash&&(u=hu.extend({},u,c.hash),c.ids&&(c.ids[0]=!0)),a=t.VM.resolvePartial.call(this,a,u,c);var l=hu.extend({},c,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),f=t.VM.invokePartial.call(this,a,u,l);if(f==null&&t.compile&&(c.partials[c.name]=t.compile(a,e.compilerOptions,t),f=c.partials[c.name](u,l)),f!=null){if(c.indent){for(var d=f.split(`
151
151
  `),_=0,m=d.length;_<m&&!(!d[_]&&_+1===m);_++)d[_]=c.indent+d[_];f=d.join(`
152
- `)}return f}else throw new mu.default("The partial "+c.name+" could not be compiled when running in runtime-only mode")}s(n,"invokePartialWrapper");var i={strict:s(function(u,c,l){if(!u||!(c in u))throw new mu.default('"'+c+'" not defined in '+u,{loc:l});return i.lookupProperty(u,c)},"strict"),lookupProperty:s(function(u,c){var l=u[c];if(l==null||Object.prototype.hasOwnProperty.call(u,c)||CZ.resultIsAllowed(l,i.protoAccessControl,c))return l},"lookupProperty"),lookup:s(function(u,c){for(var l=u.length,f=0;f<l;f++){var d=u[f]&&i.lookupProperty(u[f],c);if(d!=null)return u[f][c]}},"lookup"),lambda:s(function(u,c){return typeof u=="function"?u.call(c):u},"lambda"),escapeExpression:hu.escapeExpression,invokePartial:n,fn:s(function(u){var c=e[u];return c.decorator=e[u+"_d"],c},"fn"),programs:[],program:s(function(u,c,l,f,d){var _=this.programs[u],m=this.fn(u);return c||d||f||l?_=mI(this,u,m,c,l,f,d):_||(_=this.programs[u]=mI(this,u,m)),_},"program"),data:s(function(u,c){for(;u&&c--;)u=u._parent;return u},"data"),mergeIfNeeded:s(function(u,c){var l=u||c;return u&&c&&u!==c&&(l=hu.extend({},c,u)),l},"mergeIfNeeded"),nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function o(a){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=u.data;o._setup(u),!u.partial&&e.useData&&(c=k9e(a,c));var l=void 0,f=e.useBlockParams?[]:void 0;e.useDepths&&(u.depths?l=a!=u.depths[0]?[a].concat(u.depths):u.depths:l=[a]);function d(_){return""+e.main(i,_,i.helpers,i.partials,c,f,l)}return s(d,"main"),d=DZ(e.main,d,i,u.depths||[],c,f),d(a,u)}return s(o,"ret"),o.isTop=!0,o._setup=function(a){if(a.partial)i.protoAccessControl=a.protoAccessControl,i.helpers=a.helpers,i.partials=a.partials,i.decorators=a.decorators,i.hooks=a.hooks;else{var u=hu.extend({},t.helpers,a.helpers);B9e(u,i),i.helpers=u,e.usePartial&&(i.partials=i.mergeIfNeeded(a.partials,t.partials)),(e.usePartial||e.useDecorators)&&(i.decorators=hu.extend({},t.decorators,a.decorators)),i.hooks={},i.protoAccessControl=CZ.createProtoAccessControl(a);var c=a.allowCallsToHelperMissing||r;RZ.moveHelperToHooks(i,"helperMissing",c),RZ.moveHelperToHooks(i,"blockHelperMissing",c)}},o._child=function(a,u,c,l){if(e.useBlockParams&&!c)throw new mu.default("must pass block params");if(e.useDepths&&!l)throw new mu.default("must pass parent depths");return mI(i,a,e[a],u,0,c,l)},o}s(x9e,"template");function mI(e,t,r,n,i,o,a){function u(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],f=a;return a&&c!=a[0]&&!(c===e.nullContext&&a[0]===null)&&(f=[c].concat(a)),r(e,c,e.helpers,e.partials,l.data||n,o&&[l.blockParams].concat(o),f)}return s(u,"prog"),u=DZ(r,u,e,a,n,o),u.program=t,u.depth=a?a.length:0,u.blockParams=i||0,u}s(mI,"wrapProgram");function q9e(e,t,r){return e?!e.call&&!r.name&&(r.name=e,e=r.partials[e]):r.name==="@partial-block"?e=r.data["partial-block"]:e=r.partials[r.name],e}s(q9e,"resolvePartial");function F9e(e,t,r){var n=r.data&&r.data["partial-block"];r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var i=void 0;if(r.fn&&r.fn!==$Z&&function(){r.data=_u.createFrame(r.data);var o=r.fn;i=r.data["partial-block"]=s(function(u){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=_u.createFrame(c.data),c.data["partial-block"]=n,o(u,c)},"partialBlockWrapper"),o.partials&&(r.partials=hu.extend({},r.partials,o.partials))}(),e===void 0&&i&&(e=i),e===void 0)throw new mu.default("The partial "+r.name+" could not be found");if(e instanceof Function)return e(t,r)}s(F9e,"invokePartial");function $Z(){return""}s($Z,"noop");function k9e(e,t){return(!t||!("root"in t))&&(t=t?_u.createFrame(t):{},t.root=e),t}s(k9e,"initData");function DZ(e,t,r,n,i,o){if(e.decorator){var a={};t=e.decorator(t,a,r,n&&n[0],i,o,n),hu.extend(t,a)}return t}s(DZ,"executeDecorators");function B9e(e,t){Object.keys(e).forEach(function(r){var n=e[r];e[r]=G9e(n,t)})}s(B9e,"wrapHelpersToPassLookupProperty");function G9e(e,t){var r=t.lookupProperty;return M9e.wrapHelper(e,function(n){return hu.extend({lookupProperty:r},n)})}s(G9e,"passLookupPropertyOption")});var IU=h((_I,jZ)=>{"use strict";_I.__esModule=!0;_I.default=function(e){var t=typeof global<"u"?global:window,r=t.Handlebars;e.noConflict=function(){return t.Handlebars===e&&(t.Handlebars=r),e}};jZ.exports=_I.default});var FZ=h((gI,qZ)=>{"use strict";gI.__esModule=!0;function NU(e){return e&&e.__esModule?e:{default:e}}s(NU,"_interopRequireDefault");function AU(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}s(AU,"_interopRequireWildcard");var V9e=pI(),MZ=AU(V9e),z9e=NZ(),H9e=NU(z9e),K9e=vs(),W9e=NU(K9e),Y9e=Vn(),TU=AU(Y9e),J9e=LZ(),UZ=AU(J9e),X9e=IU(),Z9e=NU(X9e);function xZ(){var e=new MZ.HandlebarsEnvironment;return TU.extend(e,MZ),e.SafeString=H9e.default,e.Exception=W9e.default,e.Utils=TU,e.escapeExpression=TU.escapeExpression,e.VM=UZ,e.template=function(t){return UZ.template(t,e)},e}s(xZ,"create");var T0=xZ();T0.create=xZ;Z9e.default(T0);T0.default=T0;gI.default=T0;qZ.exports=gI.default});var RU=h((yI,BZ)=>{"use strict";yI.__esModule=!0;var kZ={helpers:{helperExpression:s(function(t){return t.type==="SubExpression"||(t.type==="MustacheStatement"||t.type==="BlockStatement")&&!!(t.params&&t.params.length||t.hash)},"helperExpression"),scopedId:s(function(t){return/^\.|this\b/.test(t.original)},"scopedId"),simpleId:s(function(t){return t.parts.length===1&&!kZ.helpers.scopedId(t)&&!t.depth},"simpleId")}};yI.default=kZ;BZ.exports=yI.default});var VZ=h((EI,GZ)=>{"use strict";EI.__esModule=!0;var Q9e=function(){var e={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:s(function(i,o,a,u,c,l,f){var d=l.length-1;switch(c){case 1:return l[d-1];case 2:this.$=u.prepareProgram(l[d]);break;case 3:this.$=l[d];break;case 4:this.$=l[d];break;case 5:this.$=l[d];break;case 6:this.$=l[d];break;case 7:this.$=l[d];break;case 8:this.$=l[d];break;case 9:this.$={type:"CommentStatement",value:u.stripComment(l[d]),strip:u.stripFlags(l[d],l[d]),loc:u.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[d],value:l[d],loc:u.locInfo(this._$)};break;case 11:this.$=u.prepareRawBlock(l[d-2],l[d-1],l[d],this._$);break;case 12:this.$={path:l[d-3],params:l[d-2],hash:l[d-1]};break;case 13:this.$=u.prepareBlock(l[d-3],l[d-2],l[d-1],l[d],!1,this._$);break;case 14:this.$=u.prepareBlock(l[d-3],l[d-2],l[d-1],l[d],!0,this._$);break;case 15:this.$={open:l[d-5],path:l[d-4],params:l[d-3],hash:l[d-2],blockParams:l[d-1],strip:u.stripFlags(l[d-5],l[d])};break;case 16:this.$={path:l[d-4],params:l[d-3],hash:l[d-2],blockParams:l[d-1],strip:u.stripFlags(l[d-5],l[d])};break;case 17:this.$={path:l[d-4],params:l[d-3],hash:l[d-2],blockParams:l[d-1],strip:u.stripFlags(l[d-5],l[d])};break;case 18:this.$={strip:u.stripFlags(l[d-1],l[d-1]),program:l[d]};break;case 19:var _=u.prepareBlock(l[d-2],l[d-1],l[d],l[d],!1,this._$),m=u.prepareProgram([_],l[d-1].loc);m.chained=!0,this.$={strip:l[d-2].strip,program:m,chain:!0};break;case 20:this.$=l[d];break;case 21:this.$={path:l[d-1],strip:u.stripFlags(l[d-2],l[d])};break;case 22:this.$=u.prepareMustache(l[d-3],l[d-2],l[d-1],l[d-4],u.stripFlags(l[d-4],l[d]),this._$);break;case 23:this.$=u.prepareMustache(l[d-3],l[d-2],l[d-1],l[d-4],u.stripFlags(l[d-4],l[d]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[d-3],params:l[d-2],hash:l[d-1],indent:"",strip:u.stripFlags(l[d-4],l[d]),loc:u.locInfo(this._$)};break;case 25:this.$=u.preparePartialBlock(l[d-2],l[d-1],l[d],this._$);break;case 26:this.$={path:l[d-3],params:l[d-2],hash:l[d-1],strip:u.stripFlags(l[d-4],l[d])};break;case 27:this.$=l[d];break;case 28:this.$=l[d];break;case 29:this.$={type:"SubExpression",path:l[d-3],params:l[d-2],hash:l[d-1],loc:u.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[d],loc:u.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:u.id(l[d-2]),value:l[d],loc:u.locInfo(this._$)};break;case 32:this.$=u.id(l[d-1]);break;case 33:this.$=l[d];break;case 34:this.$=l[d];break;case 35:this.$={type:"StringLiteral",value:l[d],original:l[d],loc:u.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[d]),original:Number(l[d]),loc:u.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[d]==="true",original:l[d]==="true",loc:u.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:u.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:u.locInfo(this._$)};break;case 40:this.$=l[d];break;case 41:this.$=l[d];break;case 42:this.$=u.preparePath(!0,l[d],this._$);break;case 43:this.$=u.preparePath(!1,l[d],this._$);break;case 44:l[d-2].push({part:u.id(l[d]),original:l[d],separator:l[d-1]}),this.$=l[d-2];break;case 45:this.$=[{part:u.id(l[d]),original:l[d]}];break;case 46:this.$=[];break;case 47:l[d-1].push(l[d]);break;case 48:this.$=[];break;case 49:l[d-1].push(l[d]);break;case 50:this.$=[];break;case 51:l[d-1].push(l[d]);break;case 58:this.$=[];break;case 59:l[d-1].push(l[d]);break;case 64:this.$=[];break;case 65:l[d-1].push(l[d]);break;case 70:this.$=[];break;case 71:l[d-1].push(l[d]);break;case 78:this.$=[];break;case 79:l[d-1].push(l[d]);break;case 82:this.$=[];break;case 83:l[d-1].push(l[d]);break;case 86:this.$=[];break;case 87:l[d-1].push(l[d]);break;case 90:this.$=[];break;case 91:l[d-1].push(l[d]);break;case 94:this.$=[];break;case 95:l[d-1].push(l[d]);break;case 98:this.$=[l[d]];break;case 99:l[d-1].push(l[d]);break;case 100:this.$=[l[d]];break;case 101:l[d-1].push(l[d]);break}},"anonymous"),table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:s(function(i,o){throw new Error(i)},"parseError"),parse:s(function(i){var o=this,a=[0],u=[null],c=[],l=this.table,f="",d=0,_=0,m=0,g=2,y=1;this.lexer.setInput(i),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var b=this.lexer.yylloc;c.push(b);var E=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function S(_t){a.length=a.length-2*_t,u.length=u.length-_t,c.length=c.length-_t}s(S,"popStack");function O(){var _t;return _t=o.lexer.lex()||1,typeof _t!="number"&&(_t=o.symbols_[_t]||_t),_t}s(O,"lex");for(var P,I,j,x,H,K,Q={},de,re,he,$e;;){if(j=a[a.length-1],this.defaultActions[j]?x=this.defaultActions[j]:((P===null||typeof P>"u")&&(P=O()),x=l[j]&&l[j][P]),typeof x>"u"||!x.length||!x[0]){var bt="";if(!m){$e=[];for(de in l[j])this.terminals_[de]&&de>2&&$e.push("'"+this.terminals_[de]+"'");this.lexer.showPosition?bt="Parse error on line "+(d+1)+`:
152
+ `)}return f}else throw new mu.default("The partial "+c.name+" could not be compiled when running in runtime-only mode")}s(n,"invokePartialWrapper");var i={strict:s(function(u,c,l){if(!u||!(c in u))throw new mu.default('"'+c+'" not defined in '+u,{loc:l});return i.lookupProperty(u,c)},"strict"),lookupProperty:s(function(u,c){var l=u[c];if(l==null||Object.prototype.hasOwnProperty.call(u,c)||CZ.resultIsAllowed(l,i.protoAccessControl,c))return l},"lookupProperty"),lookup:s(function(u,c){for(var l=u.length,f=0;f<l;f++){var d=u[f]&&i.lookupProperty(u[f],c);if(d!=null)return u[f][c]}},"lookup"),lambda:s(function(u,c){return typeof u=="function"?u.call(c):u},"lambda"),escapeExpression:hu.escapeExpression,invokePartial:n,fn:s(function(u){var c=e[u];return c.decorator=e[u+"_d"],c},"fn"),programs:[],program:s(function(u,c,l,f,d){var _=this.programs[u],m=this.fn(u);return c||d||f||l?_=mI(this,u,m,c,l,f,d):_||(_=this.programs[u]=mI(this,u,m)),_},"program"),data:s(function(u,c){for(;u&&c--;)u=u._parent;return u},"data"),mergeIfNeeded:s(function(u,c){var l=u||c;return u&&c&&u!==c&&(l=hu.extend({},c,u)),l},"mergeIfNeeded"),nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function o(a){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=u.data;o._setup(u),!u.partial&&e.useData&&(c=k9e(a,c));var l=void 0,f=e.useBlockParams?[]:void 0;e.useDepths&&(u.depths?l=a!=u.depths[0]?[a].concat(u.depths):u.depths:l=[a]);function d(_){return""+e.main(i,_,i.helpers,i.partials,c,f,l)}return s(d,"main"),d=DZ(e.main,d,i,u.depths||[],c,f),d(a,u)}return s(o,"ret"),o.isTop=!0,o._setup=function(a){if(a.partial)i.protoAccessControl=a.protoAccessControl,i.helpers=a.helpers,i.partials=a.partials,i.decorators=a.decorators,i.hooks=a.hooks;else{var u=hu.extend({},t.helpers,a.helpers);B9e(u,i),i.helpers=u,e.usePartial&&(i.partials=i.mergeIfNeeded(a.partials,t.partials)),(e.usePartial||e.useDecorators)&&(i.decorators=hu.extend({},t.decorators,a.decorators)),i.hooks={},i.protoAccessControl=CZ.createProtoAccessControl(a);var c=a.allowCallsToHelperMissing||r;RZ.moveHelperToHooks(i,"helperMissing",c),RZ.moveHelperToHooks(i,"blockHelperMissing",c)}},o._child=function(a,u,c,l){if(e.useBlockParams&&!c)throw new mu.default("must pass block params");if(e.useDepths&&!l)throw new mu.default("must pass parent depths");return mI(i,a,e[a],u,0,c,l)},o}s(x9e,"template");function mI(e,t,r,n,i,o,a){function u(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],f=a;return a&&c!=a[0]&&!(c===e.nullContext&&a[0]===null)&&(f=[c].concat(a)),r(e,c,e.helpers,e.partials,l.data||n,o&&[l.blockParams].concat(o),f)}return s(u,"prog"),u=DZ(r,u,e,a,n,o),u.program=t,u.depth=a?a.length:0,u.blockParams=i||0,u}s(mI,"wrapProgram");function q9e(e,t,r){return e?!e.call&&!r.name&&(r.name=e,e=r.partials[e]):r.name==="@partial-block"?e=r.data["partial-block"]:e=r.partials[r.name],e}s(q9e,"resolvePartial");function F9e(e,t,r){var n=r.data&&r.data["partial-block"];r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var i=void 0;if(r.fn&&r.fn!==$Z&&function(){r.data=_u.createFrame(r.data);var o=r.fn;i=r.data["partial-block"]=s(function(u){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=_u.createFrame(c.data),c.data["partial-block"]=n,o(u,c)},"partialBlockWrapper"),o.partials&&(r.partials=hu.extend({},r.partials,o.partials))}(),e===void 0&&i&&(e=i),e===void 0)throw new mu.default("The partial "+r.name+" could not be found");if(e instanceof Function)return e(t,r)}s(F9e,"invokePartial");function $Z(){return""}s($Z,"noop");function k9e(e,t){return(!t||!("root"in t))&&(t=t?_u.createFrame(t):{},t.root=e),t}s(k9e,"initData");function DZ(e,t,r,n,i,o){if(e.decorator){var a={};t=e.decorator(t,a,r,n&&n[0],i,o,n),hu.extend(t,a)}return t}s(DZ,"executeDecorators");function B9e(e,t){Object.keys(e).forEach(function(r){var n=e[r];e[r]=G9e(n,t)})}s(B9e,"wrapHelpersToPassLookupProperty");function G9e(e,t){var r=t.lookupProperty;return M9e.wrapHelper(e,function(n){return hu.extend({lookupProperty:r},n)})}s(G9e,"passLookupPropertyOption")});var IU=h((_I,jZ)=>{"use strict";_I.__esModule=!0;_I.default=function(e){var t=typeof global<"u"?global:window,r=t.Handlebars;e.noConflict=function(){return t.Handlebars===e&&(t.Handlebars=r),e}};jZ.exports=_I.default});var FZ=h((gI,qZ)=>{"use strict";gI.__esModule=!0;function NU(e){return e&&e.__esModule?e:{default:e}}s(NU,"_interopRequireDefault");function AU(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}s(AU,"_interopRequireWildcard");var V9e=pI(),MZ=AU(V9e),z9e=NZ(),H9e=NU(z9e),K9e=vs(),W9e=NU(K9e),Y9e=Vn(),TU=AU(Y9e),J9e=LZ(),UZ=AU(J9e),X9e=IU(),Z9e=NU(X9e);function xZ(){var e=new MZ.HandlebarsEnvironment;return TU.extend(e,MZ),e.SafeString=H9e.default,e.Exception=W9e.default,e.Utils=TU,e.escapeExpression=TU.escapeExpression,e.VM=UZ,e.template=function(t){return UZ.template(t,e)},e}s(xZ,"create");var T0=xZ();T0.create=xZ;Z9e.default(T0);T0.default=T0;gI.default=T0;qZ.exports=gI.default});var RU=h((yI,BZ)=>{"use strict";yI.__esModule=!0;var kZ={helpers:{helperExpression:s(function(t){return t.type==="SubExpression"||(t.type==="MustacheStatement"||t.type==="BlockStatement")&&!!(t.params&&t.params.length||t.hash)},"helperExpression"),scopedId:s(function(t){return/^\.|this\b/.test(t.original)},"scopedId"),simpleId:s(function(t){return t.parts.length===1&&!kZ.helpers.scopedId(t)&&!t.depth},"simpleId")}};yI.default=kZ;BZ.exports=yI.default});var VZ=h((EI,GZ)=>{"use strict";EI.__esModule=!0;var Q9e=function(){var e={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:s(function(i,o,a,u,c,l,f){var d=l.length-1;switch(c){case 1:return l[d-1];case 2:this.$=u.prepareProgram(l[d]);break;case 3:this.$=l[d];break;case 4:this.$=l[d];break;case 5:this.$=l[d];break;case 6:this.$=l[d];break;case 7:this.$=l[d];break;case 8:this.$=l[d];break;case 9:this.$={type:"CommentStatement",value:u.stripComment(l[d]),strip:u.stripFlags(l[d],l[d]),loc:u.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[d],value:l[d],loc:u.locInfo(this._$)};break;case 11:this.$=u.prepareRawBlock(l[d-2],l[d-1],l[d],this._$);break;case 12:this.$={path:l[d-3],params:l[d-2],hash:l[d-1]};break;case 13:this.$=u.prepareBlock(l[d-3],l[d-2],l[d-1],l[d],!1,this._$);break;case 14:this.$=u.prepareBlock(l[d-3],l[d-2],l[d-1],l[d],!0,this._$);break;case 15:this.$={open:l[d-5],path:l[d-4],params:l[d-3],hash:l[d-2],blockParams:l[d-1],strip:u.stripFlags(l[d-5],l[d])};break;case 16:this.$={path:l[d-4],params:l[d-3],hash:l[d-2],blockParams:l[d-1],strip:u.stripFlags(l[d-5],l[d])};break;case 17:this.$={path:l[d-4],params:l[d-3],hash:l[d-2],blockParams:l[d-1],strip:u.stripFlags(l[d-5],l[d])};break;case 18:this.$={strip:u.stripFlags(l[d-1],l[d-1]),program:l[d]};break;case 19:var _=u.prepareBlock(l[d-2],l[d-1],l[d],l[d],!1,this._$),m=u.prepareProgram([_],l[d-1].loc);m.chained=!0,this.$={strip:l[d-2].strip,program:m,chain:!0};break;case 20:this.$=l[d];break;case 21:this.$={path:l[d-1],strip:u.stripFlags(l[d-2],l[d])};break;case 22:this.$=u.prepareMustache(l[d-3],l[d-2],l[d-1],l[d-4],u.stripFlags(l[d-4],l[d]),this._$);break;case 23:this.$=u.prepareMustache(l[d-3],l[d-2],l[d-1],l[d-4],u.stripFlags(l[d-4],l[d]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[d-3],params:l[d-2],hash:l[d-1],indent:"",strip:u.stripFlags(l[d-4],l[d]),loc:u.locInfo(this._$)};break;case 25:this.$=u.preparePartialBlock(l[d-2],l[d-1],l[d],this._$);break;case 26:this.$={path:l[d-3],params:l[d-2],hash:l[d-1],strip:u.stripFlags(l[d-4],l[d])};break;case 27:this.$=l[d];break;case 28:this.$=l[d];break;case 29:this.$={type:"SubExpression",path:l[d-3],params:l[d-2],hash:l[d-1],loc:u.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[d],loc:u.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:u.id(l[d-2]),value:l[d],loc:u.locInfo(this._$)};break;case 32:this.$=u.id(l[d-1]);break;case 33:this.$=l[d];break;case 34:this.$=l[d];break;case 35:this.$={type:"StringLiteral",value:l[d],original:l[d],loc:u.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[d]),original:Number(l[d]),loc:u.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[d]==="true",original:l[d]==="true",loc:u.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:u.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:u.locInfo(this._$)};break;case 40:this.$=l[d];break;case 41:this.$=l[d];break;case 42:this.$=u.preparePath(!0,l[d],this._$);break;case 43:this.$=u.preparePath(!1,l[d],this._$);break;case 44:l[d-2].push({part:u.id(l[d]),original:l[d],separator:l[d-1]}),this.$=l[d-2];break;case 45:this.$=[{part:u.id(l[d]),original:l[d]}];break;case 46:this.$=[];break;case 47:l[d-1].push(l[d]);break;case 48:this.$=[];break;case 49:l[d-1].push(l[d]);break;case 50:this.$=[];break;case 51:l[d-1].push(l[d]);break;case 58:this.$=[];break;case 59:l[d-1].push(l[d]);break;case 64:this.$=[];break;case 65:l[d-1].push(l[d]);break;case 70:this.$=[];break;case 71:l[d-1].push(l[d]);break;case 78:this.$=[];break;case 79:l[d-1].push(l[d]);break;case 82:this.$=[];break;case 83:l[d-1].push(l[d]);break;case 86:this.$=[];break;case 87:l[d-1].push(l[d]);break;case 90:this.$=[];break;case 91:l[d-1].push(l[d]);break;case 94:this.$=[];break;case 95:l[d-1].push(l[d]);break;case 98:this.$=[l[d]];break;case 99:l[d-1].push(l[d]);break;case 100:this.$=[l[d]];break;case 101:l[d-1].push(l[d]);break}},"anonymous"),table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:s(function(i,o){throw new Error(i)},"parseError"),parse:s(function(i){var o=this,a=[0],u=[null],c=[],l=this.table,f="",d=0,_=0,m=0,g=2,y=1;this.lexer.setInput(i),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var b=this.lexer.yylloc;c.push(b);var E=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function v(_t){a.length=a.length-2*_t,u.length=u.length-_t,c.length=c.length-_t}s(v,"popStack");function O(){var _t;return _t=o.lexer.lex()||1,typeof _t!="number"&&(_t=o.symbols_[_t]||_t),_t}s(O,"lex");for(var P,I,j,x,H,K,Q={},de,re,he,$e;;){if(j=a[a.length-1],this.defaultActions[j]?x=this.defaultActions[j]:((P===null||typeof P>"u")&&(P=O()),x=l[j]&&l[j][P]),typeof x>"u"||!x.length||!x[0]){var bt="";if(!m){$e=[];for(de in l[j])this.terminals_[de]&&de>2&&$e.push("'"+this.terminals_[de]+"'");this.lexer.showPosition?bt="Parse error on line "+(d+1)+`:
153
153
  `+this.lexer.showPosition()+`
154
154
  Expecting `+$e.join(", ")+", got '"+(this.terminals_[P]||P)+"'":bt="Parse error on line "+(d+1)+": Unexpected "+(P==1?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(bt,{text:this.lexer.match,token:this.terminals_[P]||P,line:this.lexer.yylineno,loc:b,expected:$e})}}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+P);switch(x[0]){case 1:a.push(P),u.push(this.lexer.yytext),c.push(this.lexer.yylloc),a.push(x[1]),P=null,I?(P=I,I=null):(_=this.lexer.yyleng,f=this.lexer.yytext,d=this.lexer.yylineno,b=this.lexer.yylloc,m>0&&m--);break;case 2:if(re=this.productions_[x[1]][1],Q.$=u[u.length-re],Q._$={first_line:c[c.length-(re||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(re||1)].first_column,last_column:c[c.length-1].last_column},E&&(Q._$.range=[c[c.length-(re||1)].range[0],c[c.length-1].range[1]]),K=this.performAction.call(Q,f,_,d,this.yy,x[1],u,c),typeof K<"u")return K;re&&(a=a.slice(0,-1*re*2),u=u.slice(0,-1*re),c=c.slice(0,-1*re)),a.push(this.productions_[x[1]][0]),u.push(Q.$),c.push(Q._$),he=l[a[a.length-2]][a[a.length-1]],a.push(he);break;case 3:return!0}}return!0},"parse")},t=function(){var n={EOF:1,parseError:s(function(o,a){if(this.yy.parser)this.yy.parser.parseError(o,a);else throw new Error(o)},"parseError"),setInput:s(function(o){return this._input=o,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var a=o.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:s(function(o){var a=o.length,u=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a-1),this.offset-=a;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var l=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===c.length?this.yylloc.first_column:0)+c[c.length-u.length].length-u[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[l[0],l[0]+this.yyleng-a]),this},"unput"),more:s(function(){return this._more=!0,this},"more"),less:s(function(o){this.unput(this.match.slice(o))},"less"),pastInput:s(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var o=this.pastInput(),a=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
155
155
  `+a+"^"},"showPosition"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,a,u,c,l,f;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),_=0;_<d.length&&(u=this._input.match(this.rules[d[_]]),!(u&&(!a||u[0].length>a[0].length)&&(a=u,c=_,!this.options.flex)));_++);return a?(f=a[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],o=this.performAction.call(this,this.yy,this,d[c],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
156
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var o=this.next();return typeof o<"u"?o:this.lex()},"lex"),begin:s(function(o){this.conditionStack.push(o)},"begin"),popState:s(function(){return this.conditionStack.pop()},"popState"),_currentRules:s(function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},"_currentRules"),topState:s(function(){return this.conditionStack[this.conditionStack.length-2]},"topState"),pushState:s(function(o){this.begin(o)},"begin")};return n.options={},n.performAction=s(function(o,a,u,c){function l(d,_){return a.yytext=a.yytext.substring(d,a.yyleng-_+d)}s(l,"strip");var f=c;switch(u){case 0:if(a.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):a.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),a.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(a.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return a.yytext=l(1,2).replace(/\\"/g,'"'),80;break;case 32:return a.yytext=l(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return a.yytext=a.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},"anonymous"),n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n}();e.lexer=t;function r(){this.yy={}}return s(r,"Parser"),r.prototype=e,e.Parser=r,new r}();EI.default=Q9e;GZ.exports=EI.default});var OI=h((vI,KZ)=>{"use strict";vI.__esModule=!0;function e7e(e){return e&&e.__esModule?e:{default:e}}s(e7e,"_interopRequireDefault");var t7e=vs(),CU=e7e(t7e);function bI(){this.parents=[]}s(bI,"Visitor");bI.prototype={constructor:bI,mutating:!1,acceptKey:s(function(t,r){var n=this.accept(t[r]);if(this.mutating){if(n&&!bI.prototype[n.type])throw new CU.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+t.type);t[r]=n}},"acceptKey"),acceptRequired:s(function(t,r){if(this.acceptKey(t,r),!t[r])throw new CU.default(t.type+" requires "+r)},"acceptRequired"),acceptArray:s(function(t){for(var r=0,n=t.length;r<n;r++)this.acceptKey(t,r),t[r]||(t.splice(r,1),r--,n--)},"acceptArray"),accept:s(function(t){if(t){if(!this[t.type])throw new CU.default("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var r=this[t.type](t);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return t}},"accept"),Program:s(function(t){this.acceptArray(t.body)},"Program"),MustacheStatement:SI,Decorator:SI,BlockStatement:zZ,DecoratorBlock:zZ,PartialStatement:HZ,PartialBlockStatement:s(function(t){HZ.call(this,t),this.acceptKey(t,"program")},"PartialBlockStatement"),ContentStatement:s(function(){},"ContentStatement"),CommentStatement:s(function(){},"CommentStatement"),SubExpression:SI,PathExpression:s(function(){},"PathExpression"),StringLiteral:s(function(){},"StringLiteral"),NumberLiteral:s(function(){},"NumberLiteral"),BooleanLiteral:s(function(){},"BooleanLiteral"),UndefinedLiteral:s(function(){},"UndefinedLiteral"),NullLiteral:s(function(){},"NullLiteral"),Hash:s(function(t){this.acceptArray(t.pairs)},"Hash"),HashPair:s(function(t){this.acceptRequired(t,"value")},"HashPair")};function SI(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}s(SI,"visitSubExpression");function zZ(e){SI.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}s(zZ,"visitBlock");function HZ(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}s(HZ,"visitPartial");vI.default=bI;KZ.exports=vI.default});var YZ=h((PI,WZ)=>{"use strict";PI.__esModule=!0;function r7e(e){return e&&e.__esModule?e:{default:e}}s(r7e,"_interopRequireDefault");var n7e=OI(),i7e=r7e(n7e);function fa(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}s(fa,"WhitespaceControl");fa.prototype=new i7e.default;fa.prototype.Program=function(e){var t=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=e.body,i=0,o=n.length;i<o;i++){var a=n[i],u=this.accept(a);if(u){var c=$U(n,i,r),l=DU(n,i,r),f=u.openStandalone&&c,d=u.closeStandalone&&l,_=u.inlineStandalone&&c&&l;u.close&&_d(n,i,!0),u.open&&$c(n,i,!0),t&&_&&(_d(n,i),$c(n,i)&&a.type==="PartialStatement"&&(a.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),t&&f&&(_d((a.program||a.inverse).body),$c(n,i)),t&&d&&(_d(n,i),$c((a.inverse||a.program).body))}}return e};fa.prototype.BlockStatement=fa.prototype.DecoratorBlock=fa.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,r=e.program&&e.inverse,n=r,i=r;if(r&&r.chained)for(n=r.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var o={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:DU(t.body),closeStandalone:$U((n||t).body)};if(e.openStrip.close&&_d(t.body,null,!0),r){var a=e.inverseStrip;a.open&&$c(t.body,null,!0),a.close&&_d(n.body,null,!0),e.closeStrip.open&&$c(i.body,null,!0),!this.options.ignoreStandalone&&$U(t.body)&&DU(n.body)&&($c(t.body),_d(n.body))}else e.closeStrip.open&&$c(t.body,null,!0);return o};fa.prototype.Decorator=fa.prototype.MustacheStatement=function(e){return e.strip};fa.prototype.PartialStatement=fa.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function $U(e,t,r){t===void 0&&(t=e.length);var n=e[t-1],i=e[t-2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}s($U,"isPrevWhitespace");function DU(e,t,r){t===void 0&&(t=-1);var n=e[t+1],i=e[t+2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}s(DU,"isNextWhitespace");function _d(e,t,r){var n=e[t==null?0:t+1];if(!(!n||n.type!=="ContentStatement"||!r&&n.rightStripped)){var i=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==i}}s(_d,"omitRight");function $c(e,t,r){var n=e[t==null?e.length-1:t-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var i=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==i,n.leftStripped}}s($c,"omitLeft");PI.default=fa;WZ.exports=PI.default});var JZ=h(Os=>{"use strict";Os.__esModule=!0;Os.SourceLocation=a7e;Os.id=u7e;Os.stripFlags=c7e;Os.stripComment=l7e;Os.preparePath=f7e;Os.prepareMustache=d7e;Os.prepareRawBlock=p7e;Os.prepareBlock=h7e;Os.prepareProgram=m7e;Os.preparePartialBlock=_7e;function s7e(e){return e&&e.__esModule?e:{default:e}}s(s7e,"_interopRequireDefault");var o7e=vs(),LU=s7e(o7e);function jU(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var r={loc:e.path.loc};throw new LU.default(e.path.original+" doesn't match "+t,r)}}s(jU,"validateClose");function a7e(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}}s(a7e,"SourceLocation");function u7e(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}s(u7e,"id");function c7e(e,t){return{open:e.charAt(2)==="~",close:t.charAt(t.length-3)==="~"}}s(c7e,"stripFlags");function l7e(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}s(l7e,"stripComment");function f7e(e,t,r){r=this.locInfo(r);for(var n=e?"@":"",i=[],o=0,a=0,u=t.length;a<u;a++){var c=t[a].part,l=t[a].original!==c;if(n+=(t[a].separator||"")+c,!l&&(c===".."||c==="."||c==="this")){if(i.length>0)throw new LU.default("Invalid path: "+n,{loc:r});c===".."&&o++}else i.push(c)}return{type:"PathExpression",data:e,depth:o,parts:i,original:n,loc:r}}s(f7e,"preparePath");function d7e(e,t,r,n,i,o){var a=n.charAt(3)||n.charAt(2),u=a!=="{"&&a!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:e,params:t,hash:r,escaped:u,strip:i,loc:this.locInfo(o)}}s(d7e,"prepareMustache");function p7e(e,t,r,n){jU(e,r),n=this.locInfo(n);var i={type:"Program",body:t,strip:{},loc:n};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}s(p7e,"prepareRawBlock");function h7e(e,t,r,n,i,o){n&&n.path&&jU(e,n);var a=/\*/.test(e.open);t.blockParams=e.blockParams;var u=void 0,c=void 0;if(r){if(a)throw new LU.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),c=r.strip,u=r.program}return i&&(i=u,u=t,t=i),{type:a?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:u,openStrip:e.strip,inverseStrip:c,closeStrip:n&&n.strip,loc:this.locInfo(o)}}s(h7e,"prepareBlock");function m7e(e,t){if(!t&&e.length){var r=e[0].loc,n=e[e.length-1].loc;r&&n&&(t={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:e,strip:{},loc:t}}s(m7e,"prepareProgram");function _7e(e,t,r,n){return jU(e,r),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}s(_7e,"preparePartialBlock")});var QZ=h(N0=>{"use strict";N0.__esModule=!0;N0.parseWithoutProcessing=ZZ;N0.parse=P7e;function g7e(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}s(g7e,"_interopRequireWildcard");function XZ(e){return e&&e.__esModule?e:{default:e}}s(XZ,"_interopRequireDefault");var y7e=VZ(),MU=XZ(y7e),E7e=YZ(),b7e=XZ(E7e),S7e=JZ(),v7e=g7e(S7e),O7e=Vn();N0.parser=MU.default;var wI={};O7e.extend(wI,v7e);function ZZ(e,t){if(e.type==="Program")return e;MU.default.yy=wI,wI.locInfo=function(n){return new wI.SourceLocation(t&&t.srcName,n)};var r=MU.default.parse(e);return r}s(ZZ,"parseWithoutProcessing");function P7e(e,t){var r=ZZ(e,t),n=new b7e.default(t);return n.accept(r)}s(P7e,"parse")});var nQ=h($0=>{"use strict";$0.__esModule=!0;$0.Compiler=UU;$0.precompile=N7e;$0.compile=A7e;function tQ(e){return e&&e.__esModule?e:{default:e}}s(tQ,"_interopRequireDefault");var w7e=vs(),R0=tQ(w7e),C0=Vn(),I7e=RU(),A0=tQ(I7e),T7e=[].slice;function UU(){}s(UU,"Compiler");UU.prototype={compiler:UU,equals:s(function(t){var r=this.opcodes.length;if(t.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var i=this.opcodes[n],o=t.opcodes[n];if(i.opcode!==o.opcode||!rQ(i.args,o.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(t.children[n]))return!1;return!0},"equals"),guid:0,compile:s(function(t,r){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=r,this.stringParams=r.stringParams,this.trackIds=r.trackIds,r.blockParams=r.blockParams||[],r.knownHelpers=C0.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(t)},"compile"),compileProgram:s(function(t){var r=new this.compiler,n=r.compile(t,this.options),i=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[i]=n,this.useDepths=this.useDepths||n.useDepths,i},"compileProgram"),accept:s(function(t){if(!this[t.type])throw new R0.default("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var r=this[t.type](t);return this.sourceNode.shift(),r},"accept"),Program:s(function(t){this.options.blockParams.unshift(t.blockParams);for(var r=t.body,n=r.length,i=0;i<n;i++)this.accept(r[i]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=t.blockParams?t.blockParams.length:0,this},"Program"),BlockStatement:s(function(t){eQ(t);var r=t.program,n=t.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var i=this.classifySexpr(t);i==="helper"?this.helperSexpr(t,r,n):i==="simple"?(this.simpleSexpr(t),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},"BlockStatement"),DecoratorBlock:s(function(t){var r=t.program&&this.compileProgram(t.program),n=this.setupFullMustacheParams(t,r,void 0),i=t.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},"DecoratorBlock"),PartialStatement:s(function(t){this.usePartial=!0;var r=t.program;r&&(r=this.compileProgram(t.program));var n=t.params;if(n.length>1)throw new R0.default("Unsupported number of partial arguments: "+n.length,t);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=t.name.original,o=t.name.type==="SubExpression";o&&this.accept(t.name),this.setupFullMustacheParams(t,r,void 0,!0);var a=t.indent||"";this.options.preventIndent&&a&&(this.opcode("appendContent",a),a=""),this.opcode("invokePartial",o,i,a),this.opcode("append")},"PartialStatement"),PartialBlockStatement:s(function(t){this.PartialStatement(t)},"PartialBlockStatement"),MustacheStatement:s(function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},"MustacheStatement"),Decorator:s(function(t){this.DecoratorBlock(t)},"Decorator"),ContentStatement:s(function(t){t.value&&this.opcode("appendContent",t.value)},"ContentStatement"),CommentStatement:s(function(){},"CommentStatement"),SubExpression:s(function(t){eQ(t);var r=this.classifySexpr(t);r==="simple"?this.simpleSexpr(t):r==="helper"?this.helperSexpr(t):this.ambiguousSexpr(t)},"SubExpression"),ambiguousSexpr:s(function(t,r,n){var i=t.path,o=i.parts[0],a=r!=null||n!=null;this.opcode("getContext",i.depth),this.opcode("pushProgram",r),this.opcode("pushProgram",n),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",o,a)},"ambiguousSexpr"),simpleSexpr:s(function(t){var r=t.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},"simpleSexpr"),helperSexpr:s(function(t,r,n){var i=this.setupFullMustacheParams(t,r,n),o=t.path,a=o.parts[0];if(this.options.knownHelpers[a])this.opcode("invokeKnownHelper",i.length,a);else{if(this.options.knownHelpersOnly)throw new R0.default("You specified knownHelpersOnly, but used the unknown helper "+a,t);o.strict=!0,o.falsy=!0,this.accept(o),this.opcode("invokeHelper",i.length,o.original,A0.default.helpers.simpleId(o))}},"helperSexpr"),PathExpression:s(function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var r=t.parts[0],n=A0.default.helpers.scopedId(t),i=!t.depth&&!n&&this.blockParamIndex(r);i?this.opcode("lookupBlockParam",i,t.parts):r?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,n):this.opcode("pushContext")},"PathExpression"),StringLiteral:s(function(t){this.opcode("pushString",t.value)},"StringLiteral"),NumberLiteral:s(function(t){this.opcode("pushLiteral",t.value)},"NumberLiteral"),BooleanLiteral:s(function(t){this.opcode("pushLiteral",t.value)},"BooleanLiteral"),UndefinedLiteral:s(function(){this.opcode("pushLiteral","undefined")},"UndefinedLiteral"),NullLiteral:s(function(){this.opcode("pushLiteral","null")},"NullLiteral"),Hash:s(function(t){var r=t.pairs,n=0,i=r.length;for(this.opcode("pushHash");n<i;n++)this.pushParam(r[n].value);for(;n--;)this.opcode("assignToHash",r[n].key);this.opcode("popHash")},"Hash"),opcode:s(function(t){this.opcodes.push({opcode:t,args:T7e.call(arguments,1),loc:this.sourceNode[0].loc})},"opcode"),addDepth:s(function(t){t&&(this.useDepths=!0)},"addDepth"),classifySexpr:s(function(t){var r=A0.default.helpers.simpleId(t.path),n=r&&!!this.blockParamIndex(t.path.parts[0]),i=!n&&A0.default.helpers.helperExpression(t),o=!n&&(i||r);if(o&&!i){var a=t.path.parts[0],u=this.options;u.knownHelpers[a]?i=!0:u.knownHelpersOnly&&(o=!1)}return i?"helper":o?"ambiguous":"simple"},"classifySexpr"),pushParams:s(function(t){for(var r=0,n=t.length;r<n;r++)this.pushParam(t[r])},"pushParams"),pushParam:s(function(t){var r=t.value!=null?t.value:t.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",r,t.type),t.type==="SubExpression"&&this.accept(t);else{if(this.trackIds){var n=void 0;if(t.parts&&!A0.default.helpers.scopedId(t)&&!t.depth&&(n=this.blockParamIndex(t.parts[0])),n){var i=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else r=t.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,r)}this.accept(t)}},"pushParam"),setupFullMustacheParams:s(function(t,r,n,i){var o=t.params;return this.pushParams(o),this.opcode("pushProgram",r),this.opcode("pushProgram",n),t.hash?this.accept(t.hash):this.opcode("emptyHash",i),o},"setupFullMustacheParams"),blockParamIndex:s(function(t){for(var r=0,n=this.options.blockParams.length;r<n;r++){var i=this.options.blockParams[r],o=i&&C0.indexOf(i,t);if(i&&o>=0)return[r,o]}},"blockParamIndex")};function N7e(e,t,r){if(e==null||typeof e!="string"&&e.type!=="Program")throw new R0.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e);t=t||{},"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=r.parse(e,t),i=new r.Compiler().compile(n,t);return new r.JavaScriptCompiler().compile(i,t)}s(N7e,"precompile");function A7e(e,t,r){if(t===void 0&&(t={}),e==null||typeof e!="string"&&e.type!=="Program")throw new R0.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);t=C0.extend({},t),"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=void 0;function i(){var a=r.parse(e,t),u=new r.Compiler().compile(a,t),c=new r.JavaScriptCompiler().compile(u,t,void 0,!0);return r.template(c)}s(i,"compileInput");function o(a,u){return n||(n=i()),n.call(this,a,u)}return s(o,"ret"),o._setup=function(a){return n||(n=i()),n._setup(a)},o._child=function(a,u,c,l){return n||(n=i()),n._child(a,u,c,l)},o}s(A7e,"compile");function rQ(e,t){if(e===t)return!0;if(C0.isArray(e)&&C0.isArray(t)&&e.length===t.length){for(var r=0;r<e.length;r++)if(!rQ(e[r],t[r]))return!1;return!0}}s(rQ,"argEquals");function eQ(e){if(!e.path.parts){var t=e.path;e.path={type:"PathExpression",data:!1,depth:0,parts:[t.original+""],original:t.original+"",loc:t.loc}}}s(eQ,"transformLiteralToPath")});var sQ=h(xU=>{var iQ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");xU.encode=function(e){if(0<=e&&e<iQ.length)return iQ[e];throw new TypeError("Must be between 0 and 63: "+e)};xU.decode=function(e){var t=65,r=90,n=97,i=122,o=48,a=57,u=43,c=47,l=26,f=52;return t<=e&&e<=r?e-t:n<=e&&e<=i?e-n+l:o<=e&&e<=a?e-o+f:e==u?62:e==c?63:-1}});var kU=h(FU=>{var oQ=sQ(),qU=5,aQ=1<<qU,uQ=aQ-1,cQ=aQ;function R7e(e){return e<0?(-e<<1)+1:(e<<1)+0}s(R7e,"toVLQSigned");function C7e(e){var t=(e&1)===1,r=e>>1;return t?-r:r}s(C7e,"fromVLQSigned");FU.encode=s(function(t){var r="",n,i=R7e(t);do n=i&uQ,i>>>=qU,i>0&&(n|=cQ),r+=oQ.encode(n);while(i>0);return r},"base64VLQ_encode");FU.decode=s(function(t,r,n){var i=t.length,o=0,a=0,u,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=oQ.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));u=!!(c&cQ),c&=uQ,o=o+(c<<a),a+=qU}while(u);n.value=C7e(o),n.rest=r},"base64VLQ_decode")});var cm=h(Pn=>{function $7e(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}s($7e,"getArg");Pn.getArg=$7e;var lQ=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,D7e=/^data:.+\,.+$/;function D0(e){var t=e.match(lQ);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}s(D0,"urlParse");Pn.urlParse=D0;function am(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}s(am,"urlGenerate");Pn.urlGenerate=am;function BU(e){var t=e,r=D0(e);if(r){if(!r.path)return e;t=r.path}for(var n=Pn.isAbsolute(t),i=t.split(/\/+/),o,a=0,u=i.length-1;u>=0;u--)o=i[u],o==="."?i.splice(u,1):o===".."?a++:a>0&&(o===""?(i.splice(u+1,a),a=0):(i.splice(u,2),a--));return t=i.join("/"),t===""&&(t=n?"/":"."),r?(r.path=t,am(r)):t}s(BU,"normalize");Pn.normalize=BU;function fQ(e,t){e===""&&(e="."),t===""&&(t=".");var r=D0(t),n=D0(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),am(r);if(r||t.match(D7e))return t;if(n&&!n.host&&!n.path)return n.host=t,am(n);var i=t.charAt(0)==="/"?t:BU(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=i,am(n)):i}s(fQ,"join");Pn.join=fQ;Pn.isAbsolute=function(e){return e.charAt(0)==="/"||lQ.test(e)};function L7e(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}s(L7e,"relative");Pn.relative=L7e;var dQ=function(){var e=Object.create(null);return!("__proto__"in e)}();function pQ(e){return e}s(pQ,"identity");function j7e(e){return hQ(e)?"$"+e:e}s(j7e,"toSetString");Pn.toSetString=dQ?pQ:j7e;function M7e(e){return hQ(e)?e.slice(1):e}s(M7e,"fromSetString");Pn.fromSetString=dQ?pQ:M7e;function hQ(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}s(hQ,"isProtoString");function U7e(e,t,r){var n=um(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:um(e.name,t.name)}s(U7e,"compareByOriginalPositions");Pn.compareByOriginalPositions=U7e;function x7e(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=um(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:um(e.name,t.name)}s(x7e,"compareByGeneratedPositionsDeflated");Pn.compareByGeneratedPositionsDeflated=x7e;function um(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}s(um,"strcmp");function q7e(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=um(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:um(e.name,t.name)}s(q7e,"compareByGeneratedPositionsInflated");Pn.compareByGeneratedPositionsInflated=q7e;function F7e(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}s(F7e,"parseSourceMapInput");Pn.parseSourceMapInput=F7e;function k7e(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=D0(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}t=fQ(am(n),t)}return BU(t)}s(k7e,"computeSourceURL");Pn.computeSourceURL=k7e});var zU=h(mQ=>{var GU=cm(),VU=Object.prototype.hasOwnProperty,gd=typeof Map<"u";function gu(){this._array=[],this._set=gd?new Map:Object.create(null)}s(gu,"ArraySet");gu.fromArray=s(function(t,r){for(var n=new gu,i=0,o=t.length;i<o;i++)n.add(t[i],r);return n},"ArraySet_fromArray");gu.prototype.size=s(function(){return gd?this._set.size:Object.getOwnPropertyNames(this._set).length},"ArraySet_size");gu.prototype.add=s(function(t,r){var n=gd?t:GU.toSetString(t),i=gd?this.has(t):VU.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(t),i||(gd?this._set.set(t,o):this._set[n]=o)},"ArraySet_add");gu.prototype.has=s(function(t){if(gd)return this._set.has(t);var r=GU.toSetString(t);return VU.call(this._set,r)},"ArraySet_has");gu.prototype.indexOf=s(function(t){if(gd){var r=this._set.get(t);if(r>=0)return r}else{var n=GU.toSetString(t);if(VU.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')},"ArraySet_indexOf");gu.prototype.at=s(function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)},"ArraySet_at");gu.prototype.toArray=s(function(){return this._array.slice()},"ArraySet_toArray");mQ.ArraySet=gu});var yQ=h(gQ=>{var _Q=cm();function B7e(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,o=t.generatedColumn;return n>r||n==r&&o>=i||_Q.compareByGeneratedPositionsInflated(e,t)<=0}s(B7e,"generatedPositionAfter");function II(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}s(II,"MappingList");II.prototype.unsortedForEach=s(function(t,r){this._array.forEach(t,r)},"MappingList_forEach");II.prototype.add=s(function(t){B7e(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))},"MappingList_add");II.prototype.toArray=s(function(){return this._sorted||(this._array.sort(_Q.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},"MappingList_toArray");gQ.MappingList=II});var HU=h(EQ=>{var L0=kU(),Ar=cm(),TI=zU().ArraySet,G7e=yQ().MappingList;function Ps(e){e||(e={}),this._file=Ar.getArg(e,"file",null),this._sourceRoot=Ar.getArg(e,"sourceRoot",null),this._skipValidation=Ar.getArg(e,"skipValidation",!1),this._sources=new TI,this._names=new TI,this._mappings=new G7e,this._sourcesContents=null}s(Ps,"SourceMapGenerator");Ps.prototype._version=3;Ps.fromSourceMap=s(function(t){var r=t.sourceRoot,n=new Ps({file:t.file,sourceRoot:r});return t.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,r!=null&&(o.source=Ar.relative(r,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),n.addMapping(o)}),t.sources.forEach(function(i){var o=i;r!==null&&(o=Ar.relative(r,i)),n._sources.has(o)||n._sources.add(o);var a=t.sourceContentFor(i);a!=null&&n.setSourceContent(i,a)}),n},"SourceMapGenerator_fromSourceMap");Ps.prototype.addMapping=s(function(t){var r=Ar.getArg(t,"generated"),n=Ar.getArg(t,"original",null),i=Ar.getArg(t,"source",null),o=Ar.getArg(t,"name",null);this._skipValidation||this._validateMapping(r,n,i,o),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:o})},"SourceMapGenerator_addMapping");Ps.prototype.setSourceContent=s(function(t,r){var n=t;this._sourceRoot!=null&&(n=Ar.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Ar.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Ar.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},"SourceMapGenerator_setSourceContent");Ps.prototype.applySourceMap=s(function(t,r,n){var i=r;if(r==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=t.file}var o=this._sourceRoot;o!=null&&(i=Ar.relative(o,i));var a=new TI,u=new TI;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var l=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});l.source!=null&&(c.source=l.source,n!=null&&(c.source=Ar.join(n,c.source)),o!=null&&(c.source=Ar.relative(o,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var f=c.source;f!=null&&!a.has(f)&&a.add(f);var d=c.name;d!=null&&!u.has(d)&&u.add(d)},this),this._sources=a,this._names=u,t.sources.forEach(function(c){var l=t.sourceContentFor(c);l!=null&&(n!=null&&(c=Ar.join(n,c)),o!=null&&(c=Ar.relative(o,c)),this.setSourceContent(c,l))},this)},"SourceMapGenerator_applySourceMap");Ps.prototype._validateMapping=s(function(t,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!i)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:i}))}},"SourceMapGenerator_validateMapping");Ps.prototype._serializeMappings=s(function(){for(var t=0,r=1,n=0,i=0,o=0,a=0,u="",c,l,f,d,_=this._mappings.toArray(),m=0,g=_.length;m<g;m++){if(l=_[m],c="",l.generatedLine!==r)for(t=0;l.generatedLine!==r;)c+=";",r++;else if(m>0){if(!Ar.compareByGeneratedPositionsInflated(l,_[m-1]))continue;c+=","}c+=L0.encode(l.generatedColumn-t),t=l.generatedColumn,l.source!=null&&(d=this._sources.indexOf(l.source),c+=L0.encode(d-a),a=d,c+=L0.encode(l.originalLine-1-i),i=l.originalLine-1,c+=L0.encode(l.originalColumn-n),n=l.originalColumn,l.name!=null&&(f=this._names.indexOf(l.name),c+=L0.encode(f-o),o=f)),u+=c}return u},"SourceMapGenerator_serializeMappings");Ps.prototype._generateSourcesContent=s(function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Ar.relative(r,n));var i=Ar.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)},"SourceMapGenerator_generateSourcesContent");Ps.prototype.toJSON=s(function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t},"SourceMapGenerator_toJSON");Ps.prototype.toString=s(function(){return JSON.stringify(this.toJSON())},"SourceMapGenerator_toString");EQ.SourceMapGenerator=Ps});var bQ=h(yd=>{yd.GREATEST_LOWER_BOUND=1;yd.LEAST_UPPER_BOUND=2;function KU(e,t,r,n,i,o){var a=Math.floor((t-e)/2)+e,u=i(r,n[a],!0);return u===0?a:u>0?t-a>1?KU(a,t,r,n,i,o):o==yd.LEAST_UPPER_BOUND?t<n.length?t:-1:a:a-e>1?KU(e,a,r,n,i,o):o==yd.LEAST_UPPER_BOUND?a:e<0?-1:e}s(KU,"recursiveSearch");yd.search=s(function(t,r,n,i){if(r.length===0)return-1;var o=KU(-1,r.length,t,r,n,i||yd.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o},"search")});var vQ=h(SQ=>{function WU(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}s(WU,"swap");function V7e(e,t){return Math.round(e+Math.random()*(t-e))}s(V7e,"randomIntInRange");function YU(e,t,r,n){if(r<n){var i=V7e(r,n),o=r-1;WU(e,i,n);for(var a=e[n],u=r;u<n;u++)t(e[u],a)<=0&&(o+=1,WU(e,o,u));WU(e,o+1,u);var c=o+1;YU(e,t,r,c-1),YU(e,t,c+1,n)}}s(YU,"doQuickSort");SQ.quickSort=function(e,t){YU(e,t,0,e.length-1)}});var PQ=h(NI=>{var se=cm(),JU=bQ(),lm=zU().ArraySet,z7e=kU(),j0=vQ().quickSort;function Vt(e,t){var r=e;return typeof e=="string"&&(r=se.parseSourceMapInput(e)),r.sections!=null?new _o(r,t):new nn(r,t)}s(Vt,"SourceMapConsumer");Vt.fromSourceMap=function(e,t){return nn.fromSourceMap(e,t)};Vt.prototype._version=3;Vt.prototype.__generatedMappings=null;Object.defineProperty(Vt.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});Vt.prototype.__originalMappings=null;Object.defineProperty(Vt.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});Vt.prototype._charIsMappingSeparator=s(function(t,r){var n=t.charAt(r);return n===";"||n===","},"SourceMapConsumer_charIsMappingSeparator");Vt.prototype._parseMappings=s(function(t,r){throw new Error("Subclasses must implement _parseMappings")},"SourceMapConsumer_parseMappings");Vt.GENERATED_ORDER=1;Vt.ORIGINAL_ORDER=2;Vt.GREATEST_LOWER_BOUND=1;Vt.LEAST_UPPER_BOUND=2;Vt.prototype.eachMapping=s(function(t,r,n){var i=r||null,o=n||Vt.GENERATED_ORDER,a;switch(o){case Vt.GENERATED_ORDER:a=this._generatedMappings;break;case Vt.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;a.map(function(c){var l=c.source===null?null:this._sources.at(c.source);return l=se.computeSourceURL(u,l,this._sourceMapURL),{source:l,generatedLine:c.generatedLine,generatedColumn:c.generatedColumn,originalLine:c.originalLine,originalColumn:c.originalColumn,name:c.name===null?null:this._names.at(c.name)}},this).forEach(t,i)},"SourceMapConsumer_eachMapping");Vt.prototype.allGeneratedPositionsFor=s(function(t){var r=se.getArg(t,"line"),n={source:se.getArg(t,"source"),originalLine:r,originalColumn:se.getArg(t,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",se.compareByOriginalPositions,JU.LEAST_UPPER_BOUND);if(o>=0){var a=this._originalMappings[o];if(t.column===void 0)for(var u=a.originalLine;a&&a.originalLine===u;)i.push({line:se.getArg(a,"generatedLine",null),column:se.getArg(a,"generatedColumn",null),lastColumn:se.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o];else for(var c=a.originalColumn;a&&a.originalLine===r&&a.originalColumn==c;)i.push({line:se.getArg(a,"generatedLine",null),column:se.getArg(a,"generatedColumn",null),lastColumn:se.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o]}return i},"SourceMapConsumer_allGeneratedPositionsFor");NI.SourceMapConsumer=Vt;function nn(e,t){var r=e;typeof e=="string"&&(r=se.parseSourceMapInput(e));var n=se.getArg(r,"version"),i=se.getArg(r,"sources"),o=se.getArg(r,"names",[]),a=se.getArg(r,"sourceRoot",null),u=se.getArg(r,"sourcesContent",null),c=se.getArg(r,"mappings"),l=se.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);a&&(a=se.normalize(a)),i=i.map(String).map(se.normalize).map(function(f){return a&&se.isAbsolute(a)&&se.isAbsolute(f)?se.relative(a,f):f}),this._names=lm.fromArray(o.map(String),!0),this._sources=lm.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(f){return se.computeSourceURL(a,f,t)}),this.sourceRoot=a,this.sourcesContent=u,this._mappings=c,this._sourceMapURL=t,this.file=l}s(nn,"BasicSourceMapConsumer");nn.prototype=Object.create(Vt.prototype);nn.prototype.consumer=Vt;nn.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=se.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1};nn.fromSourceMap=s(function(t,r){var n=Object.create(nn.prototype),i=n._names=lm.fromArray(t._names.toArray(),!0),o=n._sources=lm.fromArray(t._sources.toArray(),!0);n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(m){return se.computeSourceURL(n.sourceRoot,m,r)});for(var a=t._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],l=0,f=a.length;l<f;l++){var d=a[l],_=new OQ;_.generatedLine=d.generatedLine,_.generatedColumn=d.generatedColumn,d.source&&(_.source=o.indexOf(d.source),_.originalLine=d.originalLine,_.originalColumn=d.originalColumn,d.name&&(_.name=i.indexOf(d.name)),c.push(_)),u.push(_)}return j0(n.__originalMappings,se.compareByOriginalPositions),n},"SourceMapConsumer_fromSourceMap");nn.prototype._version=3;Object.defineProperty(nn.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function OQ(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}s(OQ,"Mapping");nn.prototype._parseMappings=s(function(t,r){for(var n=1,i=0,o=0,a=0,u=0,c=0,l=t.length,f=0,d={},_={},m=[],g=[],y,b,E,S,O;f<l;)if(t.charAt(f)===";")n++,f++,i=0;else if(t.charAt(f)===",")f++;else{for(y=new OQ,y.generatedLine=n,S=f;S<l&&!this._charIsMappingSeparator(t,S);S++);if(b=t.slice(f,S),E=d[b],E)f+=b.length;else{for(E=[];f<S;)z7e.decode(t,f,_),O=_.value,f=_.rest,E.push(O);if(E.length===2)throw new Error("Found a source, but no line and column");if(E.length===3)throw new Error("Found a source and line, but no column");d[b]=E}y.generatedColumn=i+E[0],i=y.generatedColumn,E.length>1&&(y.source=u+E[1],u+=E[1],y.originalLine=o+E[2],o=y.originalLine,y.originalLine+=1,y.originalColumn=a+E[3],a=y.originalColumn,E.length>4&&(y.name=c+E[4],c+=E[4])),g.push(y),typeof y.originalLine=="number"&&m.push(y)}j0(g,se.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,j0(m,se.compareByOriginalPositions),this.__originalMappings=m},"SourceMapConsumer_parseMappings");nn.prototype._findMapping=s(function(t,r,n,i,o,a){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[i]);return JU.search(t,r,o,a)},"SourceMapConsumer_findMapping");nn.prototype.computeColumnSpans=s(function(){for(var t=0;t<this._generatedMappings.length;++t){var r=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}},"SourceMapConsumer_computeColumnSpans");nn.prototype.originalPositionFor=s(function(t){var r={generatedLine:se.getArg(t,"line"),generatedColumn:se.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",se.compareByGeneratedPositionsDeflated,se.getArg(t,"bias",Vt.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var o=se.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=se.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var a=se.getArg(i,"name",null);return a!==null&&(a=this._names.at(a)),{source:o,line:se.getArg(i,"originalLine",null),column:se.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},"SourceMapConsumer_originalPositionFor");nn.prototype.hasContentsOfAllSources=s(function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1},"BasicSourceMapConsumer_hasContentsOfAllSources");nn.prototype.sourceContentFor=s(function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var i=t;this.sourceRoot!=null&&(i=se.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=se.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if(o.scheme=="file"&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!o.path||o.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')},"SourceMapConsumer_sourceContentFor");nn.prototype.generatedPositionFor=s(function(t){var r=se.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:se.getArg(t,"line"),originalColumn:se.getArg(t,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",se.compareByOriginalPositions,se.getArg(t,"bias",Vt.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:se.getArg(o,"generatedLine",null),column:se.getArg(o,"generatedColumn",null),lastColumn:se.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},"SourceMapConsumer_generatedPositionFor");NI.BasicSourceMapConsumer=nn;function _o(e,t){var r=e;typeof e=="string"&&(r=se.parseSourceMapInput(e));var n=se.getArg(r,"version"),i=se.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new lm,this._names=new lm;var o={line:-1,column:0};this._sections=i.map(function(a){if(a.url)throw new Error("Support for url field in sections not implemented.");var u=se.getArg(a,"offset"),c=se.getArg(u,"line"),l=se.getArg(u,"column");if(c<o.line||c===o.line&&l<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=u,{generatedOffset:{generatedLine:c+1,generatedColumn:l+1},consumer:new Vt(se.getArg(a,"map"),t)}})}s(_o,"IndexedSourceMapConsumer");_o.prototype=Object.create(Vt.prototype);_o.prototype.constructor=Vt;_o.prototype._version=3;Object.defineProperty(_o.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}});_o.prototype.originalPositionFor=s(function(t){var r={generatedLine:se.getArg(t,"line"),generatedColumn:se.getArg(t,"column")},n=JU.search(r,this._sections,function(o,a){var u=o.generatedLine-a.generatedOffset.generatedLine;return u||o.generatedColumn-a.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}},"IndexedSourceMapConsumer_originalPositionFor");_o.prototype.hasContentsOfAllSources=s(function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})},"IndexedSourceMapConsumer_hasContentsOfAllSources");_o.prototype.sourceContentFor=s(function(t,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],o=i.consumer.sourceContentFor(t,!0);if(o)return o}if(r)return null;throw new Error('"'+t+'" is not in the SourceMap.')},"IndexedSourceMapConsumer_sourceContentFor");_o.prototype.generatedPositionFor=s(function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(se.getArg(t,"source"))!==-1){var i=n.consumer.generatedPositionFor(t);if(i){var o={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}},"IndexedSourceMapConsumer_generatedPositionFor");_o.prototype._parseMappings=s(function(t,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],o=i.consumer._generatedMappings,a=0;a<o.length;a++){var u=o[a],c=i.consumer._sources.at(u.source);c=se.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var l=null;u.name&&(l=i.consumer._names.at(u.name),this._names.add(l),l=this._names.indexOf(l));var f={source:c,generatedLine:u.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:u.generatedColumn+(i.generatedOffset.generatedLine===u.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:u.originalLine,originalColumn:u.originalColumn,name:l};this.__generatedMappings.push(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}j0(this.__generatedMappings,se.compareByGeneratedPositionsDeflated),j0(this.__originalMappings,se.compareByOriginalPositions)},"IndexedSourceMapConsumer_parseMappings");NI.IndexedSourceMapConsumer=_o});var IQ=h(wQ=>{var H7e=HU().SourceMapGenerator,AI=cm(),K7e=/(\r?\n)/,W7e=10,fm="$$$isSourceNode$$$";function Wi(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=r??null,this.name=i??null,this[fm]=!0,n!=null&&this.add(n)}s(Wi,"SourceNode");Wi.fromStringWithSourceMap=s(function(t,r,n){var i=new Wi,o=t.split(K7e),a=0,u=s(function(){var _=g(),m=g()||"";return _+m;function g(){return a<o.length?o[a++]:void 0}},"shiftNextLine"),c=1,l=0,f=null;return r.eachMapping(function(_){if(f!==null)if(c<_.generatedLine)d(f,u()),c++,l=0;else{var m=o[a]||"",g=m.substr(0,_.generatedColumn-l);o[a]=m.substr(_.generatedColumn-l),l=_.generatedColumn,d(f,g),f=_;return}for(;c<_.generatedLine;)i.add(u()),c++;if(l<_.generatedColumn){var m=o[a]||"";i.add(m.substr(0,_.generatedColumn)),o[a]=m.substr(_.generatedColumn),l=_.generatedColumn}f=_},this),a<o.length&&(f&&d(f,u()),i.add(o.splice(a).join(""))),r.sources.forEach(function(_){var m=r.sourceContentFor(_);m!=null&&(n!=null&&(_=AI.join(n,_)),i.setSourceContent(_,m))}),i;function d(_,m){if(_===null||_.source===void 0)i.add(m);else{var g=n?AI.join(n,_.source):_.source;i.add(new Wi(_.originalLine,_.originalColumn,g,m,_.name))}}s(d,"addMappingWithCode")},"SourceNode_fromStringWithSourceMap");Wi.prototype.add=s(function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[fm]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this},"SourceNode_add");Wi.prototype.prepend=s(function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[fm]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this},"SourceNode_prepend");Wi.prototype.walk=s(function(t){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[fm]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})},"SourceNode_walk");Wi.prototype.join=s(function(t){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(t);r.push(this.children[n]),this.children=r}return this},"SourceNode_join");Wi.prototype.replaceRight=s(function(t,r){var n=this.children[this.children.length-1];return n[fm]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this},"SourceNode_replaceRight");Wi.prototype.setSourceContent=s(function(t,r){this.sourceContents[AI.toSetString(t)]=r},"SourceNode_setSourceContent");Wi.prototype.walkSourceContents=s(function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][fm]&&this.children[r].walkSourceContents(t);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)t(AI.fromSetString(i[r]),this.sourceContents[i[r]])},"SourceNode_walkSourceContents");Wi.prototype.toString=s(function(){var t="";return this.walk(function(r){t+=r}),t},"SourceNode_toString");Wi.prototype.toStringWithSourceMap=s(function(t){var r={code:"",line:1,column:0},n=new H7e(t),i=!1,o=null,a=null,u=null,c=null;return this.walk(function(l,f){r.code+=l,f.source!==null&&f.line!==null&&f.column!==null?((o!==f.source||a!==f.line||u!==f.column||c!==f.name)&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name}),o=f.source,a=f.line,u=f.column,c=f.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var d=0,_=l.length;d<_;d++)l.charCodeAt(d)===W7e?(r.line++,r.column=0,d+1===_?(o=null,i=!1):i&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name})):r.column++}),this.walkSourceContents(function(l,f){n.setSourceContent(l,f)}),{code:r.code,map:n}},"SourceNode_toStringWithSourceMap");wQ.SourceNode=Wi});var TQ=h(RI=>{RI.SourceMapGenerator=HU().SourceMapGenerator;RI.SourceMapConsumer=PQ().SourceMapConsumer;RI.SourceNode=IQ().SourceNode});var CQ=h((CI,RQ)=>{"use strict";CI.__esModule=!0;var ZU=Vn(),Ed=void 0;try{(typeof define!="function"||!define.amd)&&(NQ=TQ(),Ed=NQ.SourceNode)}catch{}var NQ;Ed||(Ed=s(function(e,t,r,n){this.src="",n&&this.add(n)},"SourceNode"),Ed.prototype={add:s(function(t){ZU.isArray(t)&&(t=t.join("")),this.src+=t},"add"),prepend:s(function(t){ZU.isArray(t)&&(t=t.join("")),this.src=t+this.src},"prepend"),toStringWithSourceMap:s(function(){return{code:this.toString()}},"toStringWithSourceMap"),toString:s(function(){return this.src},"toString")});function XU(e,t,r){if(ZU.isArray(e)){for(var n=[],i=0,o=e.length;i<o;i++)n.push(t.wrap(e[i],r));return n}else if(typeof e=="boolean"||typeof e=="number")return e+"";return e}s(XU,"castChunk");function AQ(e){this.srcFile=e,this.source=[]}s(AQ,"CodeGen");AQ.prototype={isEmpty:s(function(){return!this.source.length},"isEmpty"),prepend:s(function(t,r){this.source.unshift(this.wrap(t,r))},"prepend"),push:s(function(t,r){this.source.push(this.wrap(t,r))},"push"),merge:s(function(){var t=this.empty();return this.each(function(r){t.add([" ",r,`
156
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var o=this.next();return typeof o<"u"?o:this.lex()},"lex"),begin:s(function(o){this.conditionStack.push(o)},"begin"),popState:s(function(){return this.conditionStack.pop()},"popState"),_currentRules:s(function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},"_currentRules"),topState:s(function(){return this.conditionStack[this.conditionStack.length-2]},"topState"),pushState:s(function(o){this.begin(o)},"begin")};return n.options={},n.performAction=s(function(o,a,u,c){function l(d,_){return a.yytext=a.yytext.substring(d,a.yyleng-_+d)}s(l,"strip");var f=c;switch(u){case 0:if(a.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):a.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),a.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(a.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return a.yytext=l(1,2).replace(/\\"/g,'"'),80;break;case 32:return a.yytext=l(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return a.yytext=a.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},"anonymous"),n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n}();e.lexer=t;function r(){this.yy={}}return s(r,"Parser"),r.prototype=e,e.Parser=r,new r}();EI.default=Q9e;GZ.exports=EI.default});var OI=h((vI,KZ)=>{"use strict";vI.__esModule=!0;function e7e(e){return e&&e.__esModule?e:{default:e}}s(e7e,"_interopRequireDefault");var t7e=vs(),CU=e7e(t7e);function bI(){this.parents=[]}s(bI,"Visitor");bI.prototype={constructor:bI,mutating:!1,acceptKey:s(function(t,r){var n=this.accept(t[r]);if(this.mutating){if(n&&!bI.prototype[n.type])throw new CU.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+t.type);t[r]=n}},"acceptKey"),acceptRequired:s(function(t,r){if(this.acceptKey(t,r),!t[r])throw new CU.default(t.type+" requires "+r)},"acceptRequired"),acceptArray:s(function(t){for(var r=0,n=t.length;r<n;r++)this.acceptKey(t,r),t[r]||(t.splice(r,1),r--,n--)},"acceptArray"),accept:s(function(t){if(t){if(!this[t.type])throw new CU.default("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var r=this[t.type](t);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return t}},"accept"),Program:s(function(t){this.acceptArray(t.body)},"Program"),MustacheStatement:SI,Decorator:SI,BlockStatement:zZ,DecoratorBlock:zZ,PartialStatement:HZ,PartialBlockStatement:s(function(t){HZ.call(this,t),this.acceptKey(t,"program")},"PartialBlockStatement"),ContentStatement:s(function(){},"ContentStatement"),CommentStatement:s(function(){},"CommentStatement"),SubExpression:SI,PathExpression:s(function(){},"PathExpression"),StringLiteral:s(function(){},"StringLiteral"),NumberLiteral:s(function(){},"NumberLiteral"),BooleanLiteral:s(function(){},"BooleanLiteral"),UndefinedLiteral:s(function(){},"UndefinedLiteral"),NullLiteral:s(function(){},"NullLiteral"),Hash:s(function(t){this.acceptArray(t.pairs)},"Hash"),HashPair:s(function(t){this.acceptRequired(t,"value")},"HashPair")};function SI(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}s(SI,"visitSubExpression");function zZ(e){SI.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}s(zZ,"visitBlock");function HZ(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}s(HZ,"visitPartial");vI.default=bI;KZ.exports=vI.default});var YZ=h((PI,WZ)=>{"use strict";PI.__esModule=!0;function r7e(e){return e&&e.__esModule?e:{default:e}}s(r7e,"_interopRequireDefault");var n7e=OI(),i7e=r7e(n7e);function fa(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}s(fa,"WhitespaceControl");fa.prototype=new i7e.default;fa.prototype.Program=function(e){var t=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=e.body,i=0,o=n.length;i<o;i++){var a=n[i],u=this.accept(a);if(u){var c=$U(n,i,r),l=DU(n,i,r),f=u.openStandalone&&c,d=u.closeStandalone&&l,_=u.inlineStandalone&&c&&l;u.close&&_d(n,i,!0),u.open&&$c(n,i,!0),t&&_&&(_d(n,i),$c(n,i)&&a.type==="PartialStatement"&&(a.indent=/([ \t]+$)/.exec(n[i-1].original)[1])),t&&f&&(_d((a.program||a.inverse).body),$c(n,i)),t&&d&&(_d(n,i),$c((a.inverse||a.program).body))}}return e};fa.prototype.BlockStatement=fa.prototype.DecoratorBlock=fa.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,r=e.program&&e.inverse,n=r,i=r;if(r&&r.chained)for(n=r.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var o={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:DU(t.body),closeStandalone:$U((n||t).body)};if(e.openStrip.close&&_d(t.body,null,!0),r){var a=e.inverseStrip;a.open&&$c(t.body,null,!0),a.close&&_d(n.body,null,!0),e.closeStrip.open&&$c(i.body,null,!0),!this.options.ignoreStandalone&&$U(t.body)&&DU(n.body)&&($c(t.body),_d(n.body))}else e.closeStrip.open&&$c(t.body,null,!0);return o};fa.prototype.Decorator=fa.prototype.MustacheStatement=function(e){return e.strip};fa.prototype.PartialStatement=fa.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function $U(e,t,r){t===void 0&&(t=e.length);var n=e[t-1],i=e[t-2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}s($U,"isPrevWhitespace");function DU(e,t,r){t===void 0&&(t=-1);var n=e[t+1],i=e[t+2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}s(DU,"isNextWhitespace");function _d(e,t,r){var n=e[t==null?0:t+1];if(!(!n||n.type!=="ContentStatement"||!r&&n.rightStripped)){var i=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==i}}s(_d,"omitRight");function $c(e,t,r){var n=e[t==null?e.length-1:t-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var i=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==i,n.leftStripped}}s($c,"omitLeft");PI.default=fa;WZ.exports=PI.default});var JZ=h(Os=>{"use strict";Os.__esModule=!0;Os.SourceLocation=a7e;Os.id=u7e;Os.stripFlags=c7e;Os.stripComment=l7e;Os.preparePath=f7e;Os.prepareMustache=d7e;Os.prepareRawBlock=p7e;Os.prepareBlock=h7e;Os.prepareProgram=m7e;Os.preparePartialBlock=_7e;function s7e(e){return e&&e.__esModule?e:{default:e}}s(s7e,"_interopRequireDefault");var o7e=vs(),LU=s7e(o7e);function jU(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var r={loc:e.path.loc};throw new LU.default(e.path.original+" doesn't match "+t,r)}}s(jU,"validateClose");function a7e(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}}s(a7e,"SourceLocation");function u7e(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}s(u7e,"id");function c7e(e,t){return{open:e.charAt(2)==="~",close:t.charAt(t.length-3)==="~"}}s(c7e,"stripFlags");function l7e(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}s(l7e,"stripComment");function f7e(e,t,r){r=this.locInfo(r);for(var n=e?"@":"",i=[],o=0,a=0,u=t.length;a<u;a++){var c=t[a].part,l=t[a].original!==c;if(n+=(t[a].separator||"")+c,!l&&(c===".."||c==="."||c==="this")){if(i.length>0)throw new LU.default("Invalid path: "+n,{loc:r});c===".."&&o++}else i.push(c)}return{type:"PathExpression",data:e,depth:o,parts:i,original:n,loc:r}}s(f7e,"preparePath");function d7e(e,t,r,n,i,o){var a=n.charAt(3)||n.charAt(2),u=a!=="{"&&a!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:e,params:t,hash:r,escaped:u,strip:i,loc:this.locInfo(o)}}s(d7e,"prepareMustache");function p7e(e,t,r,n){jU(e,r),n=this.locInfo(n);var i={type:"Program",body:t,strip:{},loc:n};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}s(p7e,"prepareRawBlock");function h7e(e,t,r,n,i,o){n&&n.path&&jU(e,n);var a=/\*/.test(e.open);t.blockParams=e.blockParams;var u=void 0,c=void 0;if(r){if(a)throw new LU.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),c=r.strip,u=r.program}return i&&(i=u,u=t,t=i),{type:a?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:u,openStrip:e.strip,inverseStrip:c,closeStrip:n&&n.strip,loc:this.locInfo(o)}}s(h7e,"prepareBlock");function m7e(e,t){if(!t&&e.length){var r=e[0].loc,n=e[e.length-1].loc;r&&n&&(t={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:e,strip:{},loc:t}}s(m7e,"prepareProgram");function _7e(e,t,r,n){return jU(e,r),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}s(_7e,"preparePartialBlock")});var QZ=h(N0=>{"use strict";N0.__esModule=!0;N0.parseWithoutProcessing=ZZ;N0.parse=P7e;function g7e(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}s(g7e,"_interopRequireWildcard");function XZ(e){return e&&e.__esModule?e:{default:e}}s(XZ,"_interopRequireDefault");var y7e=VZ(),MU=XZ(y7e),E7e=YZ(),b7e=XZ(E7e),S7e=JZ(),v7e=g7e(S7e),O7e=Vn();N0.parser=MU.default;var wI={};O7e.extend(wI,v7e);function ZZ(e,t){if(e.type==="Program")return e;MU.default.yy=wI,wI.locInfo=function(n){return new wI.SourceLocation(t&&t.srcName,n)};var r=MU.default.parse(e);return r}s(ZZ,"parseWithoutProcessing");function P7e(e,t){var r=ZZ(e,t),n=new b7e.default(t);return n.accept(r)}s(P7e,"parse")});var nQ=h($0=>{"use strict";$0.__esModule=!0;$0.Compiler=UU;$0.precompile=N7e;$0.compile=A7e;function tQ(e){return e&&e.__esModule?e:{default:e}}s(tQ,"_interopRequireDefault");var w7e=vs(),R0=tQ(w7e),C0=Vn(),I7e=RU(),A0=tQ(I7e),T7e=[].slice;function UU(){}s(UU,"Compiler");UU.prototype={compiler:UU,equals:s(function(t){var r=this.opcodes.length;if(t.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var i=this.opcodes[n],o=t.opcodes[n];if(i.opcode!==o.opcode||!rQ(i.args,o.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(t.children[n]))return!1;return!0},"equals"),guid:0,compile:s(function(t,r){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=r,this.stringParams=r.stringParams,this.trackIds=r.trackIds,r.blockParams=r.blockParams||[],r.knownHelpers=C0.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(t)},"compile"),compileProgram:s(function(t){var r=new this.compiler,n=r.compile(t,this.options),i=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[i]=n,this.useDepths=this.useDepths||n.useDepths,i},"compileProgram"),accept:s(function(t){if(!this[t.type])throw new R0.default("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var r=this[t.type](t);return this.sourceNode.shift(),r},"accept"),Program:s(function(t){this.options.blockParams.unshift(t.blockParams);for(var r=t.body,n=r.length,i=0;i<n;i++)this.accept(r[i]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=t.blockParams?t.blockParams.length:0,this},"Program"),BlockStatement:s(function(t){eQ(t);var r=t.program,n=t.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var i=this.classifySexpr(t);i==="helper"?this.helperSexpr(t,r,n):i==="simple"?(this.simpleSexpr(t),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},"BlockStatement"),DecoratorBlock:s(function(t){var r=t.program&&this.compileProgram(t.program),n=this.setupFullMustacheParams(t,r,void 0),i=t.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},"DecoratorBlock"),PartialStatement:s(function(t){this.usePartial=!0;var r=t.program;r&&(r=this.compileProgram(t.program));var n=t.params;if(n.length>1)throw new R0.default("Unsupported number of partial arguments: "+n.length,t);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=t.name.original,o=t.name.type==="SubExpression";o&&this.accept(t.name),this.setupFullMustacheParams(t,r,void 0,!0);var a=t.indent||"";this.options.preventIndent&&a&&(this.opcode("appendContent",a),a=""),this.opcode("invokePartial",o,i,a),this.opcode("append")},"PartialStatement"),PartialBlockStatement:s(function(t){this.PartialStatement(t)},"PartialBlockStatement"),MustacheStatement:s(function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},"MustacheStatement"),Decorator:s(function(t){this.DecoratorBlock(t)},"Decorator"),ContentStatement:s(function(t){t.value&&this.opcode("appendContent",t.value)},"ContentStatement"),CommentStatement:s(function(){},"CommentStatement"),SubExpression:s(function(t){eQ(t);var r=this.classifySexpr(t);r==="simple"?this.simpleSexpr(t):r==="helper"?this.helperSexpr(t):this.ambiguousSexpr(t)},"SubExpression"),ambiguousSexpr:s(function(t,r,n){var i=t.path,o=i.parts[0],a=r!=null||n!=null;this.opcode("getContext",i.depth),this.opcode("pushProgram",r),this.opcode("pushProgram",n),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",o,a)},"ambiguousSexpr"),simpleSexpr:s(function(t){var r=t.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},"simpleSexpr"),helperSexpr:s(function(t,r,n){var i=this.setupFullMustacheParams(t,r,n),o=t.path,a=o.parts[0];if(this.options.knownHelpers[a])this.opcode("invokeKnownHelper",i.length,a);else{if(this.options.knownHelpersOnly)throw new R0.default("You specified knownHelpersOnly, but used the unknown helper "+a,t);o.strict=!0,o.falsy=!0,this.accept(o),this.opcode("invokeHelper",i.length,o.original,A0.default.helpers.simpleId(o))}},"helperSexpr"),PathExpression:s(function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var r=t.parts[0],n=A0.default.helpers.scopedId(t),i=!t.depth&&!n&&this.blockParamIndex(r);i?this.opcode("lookupBlockParam",i,t.parts):r?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,n):this.opcode("pushContext")},"PathExpression"),StringLiteral:s(function(t){this.opcode("pushString",t.value)},"StringLiteral"),NumberLiteral:s(function(t){this.opcode("pushLiteral",t.value)},"NumberLiteral"),BooleanLiteral:s(function(t){this.opcode("pushLiteral",t.value)},"BooleanLiteral"),UndefinedLiteral:s(function(){this.opcode("pushLiteral","undefined")},"UndefinedLiteral"),NullLiteral:s(function(){this.opcode("pushLiteral","null")},"NullLiteral"),Hash:s(function(t){var r=t.pairs,n=0,i=r.length;for(this.opcode("pushHash");n<i;n++)this.pushParam(r[n].value);for(;n--;)this.opcode("assignToHash",r[n].key);this.opcode("popHash")},"Hash"),opcode:s(function(t){this.opcodes.push({opcode:t,args:T7e.call(arguments,1),loc:this.sourceNode[0].loc})},"opcode"),addDepth:s(function(t){t&&(this.useDepths=!0)},"addDepth"),classifySexpr:s(function(t){var r=A0.default.helpers.simpleId(t.path),n=r&&!!this.blockParamIndex(t.path.parts[0]),i=!n&&A0.default.helpers.helperExpression(t),o=!n&&(i||r);if(o&&!i){var a=t.path.parts[0],u=this.options;u.knownHelpers[a]?i=!0:u.knownHelpersOnly&&(o=!1)}return i?"helper":o?"ambiguous":"simple"},"classifySexpr"),pushParams:s(function(t){for(var r=0,n=t.length;r<n;r++)this.pushParam(t[r])},"pushParams"),pushParam:s(function(t){var r=t.value!=null?t.value:t.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",r,t.type),t.type==="SubExpression"&&this.accept(t);else{if(this.trackIds){var n=void 0;if(t.parts&&!A0.default.helpers.scopedId(t)&&!t.depth&&(n=this.blockParamIndex(t.parts[0])),n){var i=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else r=t.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,r)}this.accept(t)}},"pushParam"),setupFullMustacheParams:s(function(t,r,n,i){var o=t.params;return this.pushParams(o),this.opcode("pushProgram",r),this.opcode("pushProgram",n),t.hash?this.accept(t.hash):this.opcode("emptyHash",i),o},"setupFullMustacheParams"),blockParamIndex:s(function(t){for(var r=0,n=this.options.blockParams.length;r<n;r++){var i=this.options.blockParams[r],o=i&&C0.indexOf(i,t);if(i&&o>=0)return[r,o]}},"blockParamIndex")};function N7e(e,t,r){if(e==null||typeof e!="string"&&e.type!=="Program")throw new R0.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e);t=t||{},"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=r.parse(e,t),i=new r.Compiler().compile(n,t);return new r.JavaScriptCompiler().compile(i,t)}s(N7e,"precompile");function A7e(e,t,r){if(t===void 0&&(t={}),e==null||typeof e!="string"&&e.type!=="Program")throw new R0.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);t=C0.extend({},t),"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=void 0;function i(){var a=r.parse(e,t),u=new r.Compiler().compile(a,t),c=new r.JavaScriptCompiler().compile(u,t,void 0,!0);return r.template(c)}s(i,"compileInput");function o(a,u){return n||(n=i()),n.call(this,a,u)}return s(o,"ret"),o._setup=function(a){return n||(n=i()),n._setup(a)},o._child=function(a,u,c,l){return n||(n=i()),n._child(a,u,c,l)},o}s(A7e,"compile");function rQ(e,t){if(e===t)return!0;if(C0.isArray(e)&&C0.isArray(t)&&e.length===t.length){for(var r=0;r<e.length;r++)if(!rQ(e[r],t[r]))return!1;return!0}}s(rQ,"argEquals");function eQ(e){if(!e.path.parts){var t=e.path;e.path={type:"PathExpression",data:!1,depth:0,parts:[t.original+""],original:t.original+"",loc:t.loc}}}s(eQ,"transformLiteralToPath")});var sQ=h(xU=>{var iQ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");xU.encode=function(e){if(0<=e&&e<iQ.length)return iQ[e];throw new TypeError("Must be between 0 and 63: "+e)};xU.decode=function(e){var t=65,r=90,n=97,i=122,o=48,a=57,u=43,c=47,l=26,f=52;return t<=e&&e<=r?e-t:n<=e&&e<=i?e-n+l:o<=e&&e<=a?e-o+f:e==u?62:e==c?63:-1}});var kU=h(FU=>{var oQ=sQ(),qU=5,aQ=1<<qU,uQ=aQ-1,cQ=aQ;function R7e(e){return e<0?(-e<<1)+1:(e<<1)+0}s(R7e,"toVLQSigned");function C7e(e){var t=(e&1)===1,r=e>>1;return t?-r:r}s(C7e,"fromVLQSigned");FU.encode=s(function(t){var r="",n,i=R7e(t);do n=i&uQ,i>>>=qU,i>0&&(n|=cQ),r+=oQ.encode(n);while(i>0);return r},"base64VLQ_encode");FU.decode=s(function(t,r,n){var i=t.length,o=0,a=0,u,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=oQ.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));u=!!(c&cQ),c&=uQ,o=o+(c<<a),a+=qU}while(u);n.value=C7e(o),n.rest=r},"base64VLQ_decode")});var cm=h(Pn=>{function $7e(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}s($7e,"getArg");Pn.getArg=$7e;var lQ=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,D7e=/^data:.+\,.+$/;function D0(e){var t=e.match(lQ);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}s(D0,"urlParse");Pn.urlParse=D0;function am(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}s(am,"urlGenerate");Pn.urlGenerate=am;function BU(e){var t=e,r=D0(e);if(r){if(!r.path)return e;t=r.path}for(var n=Pn.isAbsolute(t),i=t.split(/\/+/),o,a=0,u=i.length-1;u>=0;u--)o=i[u],o==="."?i.splice(u,1):o===".."?a++:a>0&&(o===""?(i.splice(u+1,a),a=0):(i.splice(u,2),a--));return t=i.join("/"),t===""&&(t=n?"/":"."),r?(r.path=t,am(r)):t}s(BU,"normalize");Pn.normalize=BU;function fQ(e,t){e===""&&(e="."),t===""&&(t=".");var r=D0(t),n=D0(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),am(r);if(r||t.match(D7e))return t;if(n&&!n.host&&!n.path)return n.host=t,am(n);var i=t.charAt(0)==="/"?t:BU(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=i,am(n)):i}s(fQ,"join");Pn.join=fQ;Pn.isAbsolute=function(e){return e.charAt(0)==="/"||lQ.test(e)};function L7e(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}s(L7e,"relative");Pn.relative=L7e;var dQ=function(){var e=Object.create(null);return!("__proto__"in e)}();function pQ(e){return e}s(pQ,"identity");function j7e(e){return hQ(e)?"$"+e:e}s(j7e,"toSetString");Pn.toSetString=dQ?pQ:j7e;function M7e(e){return hQ(e)?e.slice(1):e}s(M7e,"fromSetString");Pn.fromSetString=dQ?pQ:M7e;function hQ(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}s(hQ,"isProtoString");function U7e(e,t,r){var n=um(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:um(e.name,t.name)}s(U7e,"compareByOriginalPositions");Pn.compareByOriginalPositions=U7e;function x7e(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=um(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:um(e.name,t.name)}s(x7e,"compareByGeneratedPositionsDeflated");Pn.compareByGeneratedPositionsDeflated=x7e;function um(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}s(um,"strcmp");function q7e(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=um(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:um(e.name,t.name)}s(q7e,"compareByGeneratedPositionsInflated");Pn.compareByGeneratedPositionsInflated=q7e;function F7e(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}s(F7e,"parseSourceMapInput");Pn.parseSourceMapInput=F7e;function k7e(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=D0(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}t=fQ(am(n),t)}return BU(t)}s(k7e,"computeSourceURL");Pn.computeSourceURL=k7e});var zU=h(mQ=>{var GU=cm(),VU=Object.prototype.hasOwnProperty,gd=typeof Map<"u";function gu(){this._array=[],this._set=gd?new Map:Object.create(null)}s(gu,"ArraySet");gu.fromArray=s(function(t,r){for(var n=new gu,i=0,o=t.length;i<o;i++)n.add(t[i],r);return n},"ArraySet_fromArray");gu.prototype.size=s(function(){return gd?this._set.size:Object.getOwnPropertyNames(this._set).length},"ArraySet_size");gu.prototype.add=s(function(t,r){var n=gd?t:GU.toSetString(t),i=gd?this.has(t):VU.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(t),i||(gd?this._set.set(t,o):this._set[n]=o)},"ArraySet_add");gu.prototype.has=s(function(t){if(gd)return this._set.has(t);var r=GU.toSetString(t);return VU.call(this._set,r)},"ArraySet_has");gu.prototype.indexOf=s(function(t){if(gd){var r=this._set.get(t);if(r>=0)return r}else{var n=GU.toSetString(t);if(VU.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')},"ArraySet_indexOf");gu.prototype.at=s(function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)},"ArraySet_at");gu.prototype.toArray=s(function(){return this._array.slice()},"ArraySet_toArray");mQ.ArraySet=gu});var yQ=h(gQ=>{var _Q=cm();function B7e(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,o=t.generatedColumn;return n>r||n==r&&o>=i||_Q.compareByGeneratedPositionsInflated(e,t)<=0}s(B7e,"generatedPositionAfter");function II(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}s(II,"MappingList");II.prototype.unsortedForEach=s(function(t,r){this._array.forEach(t,r)},"MappingList_forEach");II.prototype.add=s(function(t){B7e(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))},"MappingList_add");II.prototype.toArray=s(function(){return this._sorted||(this._array.sort(_Q.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},"MappingList_toArray");gQ.MappingList=II});var HU=h(EQ=>{var L0=kU(),Ar=cm(),TI=zU().ArraySet,G7e=yQ().MappingList;function Ps(e){e||(e={}),this._file=Ar.getArg(e,"file",null),this._sourceRoot=Ar.getArg(e,"sourceRoot",null),this._skipValidation=Ar.getArg(e,"skipValidation",!1),this._sources=new TI,this._names=new TI,this._mappings=new G7e,this._sourcesContents=null}s(Ps,"SourceMapGenerator");Ps.prototype._version=3;Ps.fromSourceMap=s(function(t){var r=t.sourceRoot,n=new Ps({file:t.file,sourceRoot:r});return t.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,r!=null&&(o.source=Ar.relative(r,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),n.addMapping(o)}),t.sources.forEach(function(i){var o=i;r!==null&&(o=Ar.relative(r,i)),n._sources.has(o)||n._sources.add(o);var a=t.sourceContentFor(i);a!=null&&n.setSourceContent(i,a)}),n},"SourceMapGenerator_fromSourceMap");Ps.prototype.addMapping=s(function(t){var r=Ar.getArg(t,"generated"),n=Ar.getArg(t,"original",null),i=Ar.getArg(t,"source",null),o=Ar.getArg(t,"name",null);this._skipValidation||this._validateMapping(r,n,i,o),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:o})},"SourceMapGenerator_addMapping");Ps.prototype.setSourceContent=s(function(t,r){var n=t;this._sourceRoot!=null&&(n=Ar.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Ar.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Ar.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},"SourceMapGenerator_setSourceContent");Ps.prototype.applySourceMap=s(function(t,r,n){var i=r;if(r==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=t.file}var o=this._sourceRoot;o!=null&&(i=Ar.relative(o,i));var a=new TI,u=new TI;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var l=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});l.source!=null&&(c.source=l.source,n!=null&&(c.source=Ar.join(n,c.source)),o!=null&&(c.source=Ar.relative(o,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var f=c.source;f!=null&&!a.has(f)&&a.add(f);var d=c.name;d!=null&&!u.has(d)&&u.add(d)},this),this._sources=a,this._names=u,t.sources.forEach(function(c){var l=t.sourceContentFor(c);l!=null&&(n!=null&&(c=Ar.join(n,c)),o!=null&&(c=Ar.relative(o,c)),this.setSourceContent(c,l))},this)},"SourceMapGenerator_applySourceMap");Ps.prototype._validateMapping=s(function(t,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!i)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:i}))}},"SourceMapGenerator_validateMapping");Ps.prototype._serializeMappings=s(function(){for(var t=0,r=1,n=0,i=0,o=0,a=0,u="",c,l,f,d,_=this._mappings.toArray(),m=0,g=_.length;m<g;m++){if(l=_[m],c="",l.generatedLine!==r)for(t=0;l.generatedLine!==r;)c+=";",r++;else if(m>0){if(!Ar.compareByGeneratedPositionsInflated(l,_[m-1]))continue;c+=","}c+=L0.encode(l.generatedColumn-t),t=l.generatedColumn,l.source!=null&&(d=this._sources.indexOf(l.source),c+=L0.encode(d-a),a=d,c+=L0.encode(l.originalLine-1-i),i=l.originalLine-1,c+=L0.encode(l.originalColumn-n),n=l.originalColumn,l.name!=null&&(f=this._names.indexOf(l.name),c+=L0.encode(f-o),o=f)),u+=c}return u},"SourceMapGenerator_serializeMappings");Ps.prototype._generateSourcesContent=s(function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Ar.relative(r,n));var i=Ar.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)},"SourceMapGenerator_generateSourcesContent");Ps.prototype.toJSON=s(function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t},"SourceMapGenerator_toJSON");Ps.prototype.toString=s(function(){return JSON.stringify(this.toJSON())},"SourceMapGenerator_toString");EQ.SourceMapGenerator=Ps});var bQ=h(yd=>{yd.GREATEST_LOWER_BOUND=1;yd.LEAST_UPPER_BOUND=2;function KU(e,t,r,n,i,o){var a=Math.floor((t-e)/2)+e,u=i(r,n[a],!0);return u===0?a:u>0?t-a>1?KU(a,t,r,n,i,o):o==yd.LEAST_UPPER_BOUND?t<n.length?t:-1:a:a-e>1?KU(e,a,r,n,i,o):o==yd.LEAST_UPPER_BOUND?a:e<0?-1:e}s(KU,"recursiveSearch");yd.search=s(function(t,r,n,i){if(r.length===0)return-1;var o=KU(-1,r.length,t,r,n,i||yd.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o},"search")});var vQ=h(SQ=>{function WU(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}s(WU,"swap");function V7e(e,t){return Math.round(e+Math.random()*(t-e))}s(V7e,"randomIntInRange");function YU(e,t,r,n){if(r<n){var i=V7e(r,n),o=r-1;WU(e,i,n);for(var a=e[n],u=r;u<n;u++)t(e[u],a)<=0&&(o+=1,WU(e,o,u));WU(e,o+1,u);var c=o+1;YU(e,t,r,c-1),YU(e,t,c+1,n)}}s(YU,"doQuickSort");SQ.quickSort=function(e,t){YU(e,t,0,e.length-1)}});var PQ=h(NI=>{var se=cm(),JU=bQ(),lm=zU().ArraySet,z7e=kU(),j0=vQ().quickSort;function Vt(e,t){var r=e;return typeof e=="string"&&(r=se.parseSourceMapInput(e)),r.sections!=null?new _o(r,t):new nn(r,t)}s(Vt,"SourceMapConsumer");Vt.fromSourceMap=function(e,t){return nn.fromSourceMap(e,t)};Vt.prototype._version=3;Vt.prototype.__generatedMappings=null;Object.defineProperty(Vt.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});Vt.prototype.__originalMappings=null;Object.defineProperty(Vt.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});Vt.prototype._charIsMappingSeparator=s(function(t,r){var n=t.charAt(r);return n===";"||n===","},"SourceMapConsumer_charIsMappingSeparator");Vt.prototype._parseMappings=s(function(t,r){throw new Error("Subclasses must implement _parseMappings")},"SourceMapConsumer_parseMappings");Vt.GENERATED_ORDER=1;Vt.ORIGINAL_ORDER=2;Vt.GREATEST_LOWER_BOUND=1;Vt.LEAST_UPPER_BOUND=2;Vt.prototype.eachMapping=s(function(t,r,n){var i=r||null,o=n||Vt.GENERATED_ORDER,a;switch(o){case Vt.GENERATED_ORDER:a=this._generatedMappings;break;case Vt.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;a.map(function(c){var l=c.source===null?null:this._sources.at(c.source);return l=se.computeSourceURL(u,l,this._sourceMapURL),{source:l,generatedLine:c.generatedLine,generatedColumn:c.generatedColumn,originalLine:c.originalLine,originalColumn:c.originalColumn,name:c.name===null?null:this._names.at(c.name)}},this).forEach(t,i)},"SourceMapConsumer_eachMapping");Vt.prototype.allGeneratedPositionsFor=s(function(t){var r=se.getArg(t,"line"),n={source:se.getArg(t,"source"),originalLine:r,originalColumn:se.getArg(t,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",se.compareByOriginalPositions,JU.LEAST_UPPER_BOUND);if(o>=0){var a=this._originalMappings[o];if(t.column===void 0)for(var u=a.originalLine;a&&a.originalLine===u;)i.push({line:se.getArg(a,"generatedLine",null),column:se.getArg(a,"generatedColumn",null),lastColumn:se.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o];else for(var c=a.originalColumn;a&&a.originalLine===r&&a.originalColumn==c;)i.push({line:se.getArg(a,"generatedLine",null),column:se.getArg(a,"generatedColumn",null),lastColumn:se.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++o]}return i},"SourceMapConsumer_allGeneratedPositionsFor");NI.SourceMapConsumer=Vt;function nn(e,t){var r=e;typeof e=="string"&&(r=se.parseSourceMapInput(e));var n=se.getArg(r,"version"),i=se.getArg(r,"sources"),o=se.getArg(r,"names",[]),a=se.getArg(r,"sourceRoot",null),u=se.getArg(r,"sourcesContent",null),c=se.getArg(r,"mappings"),l=se.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);a&&(a=se.normalize(a)),i=i.map(String).map(se.normalize).map(function(f){return a&&se.isAbsolute(a)&&se.isAbsolute(f)?se.relative(a,f):f}),this._names=lm.fromArray(o.map(String),!0),this._sources=lm.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(f){return se.computeSourceURL(a,f,t)}),this.sourceRoot=a,this.sourcesContent=u,this._mappings=c,this._sourceMapURL=t,this.file=l}s(nn,"BasicSourceMapConsumer");nn.prototype=Object.create(Vt.prototype);nn.prototype.consumer=Vt;nn.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=se.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1};nn.fromSourceMap=s(function(t,r){var n=Object.create(nn.prototype),i=n._names=lm.fromArray(t._names.toArray(),!0),o=n._sources=lm.fromArray(t._sources.toArray(),!0);n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(m){return se.computeSourceURL(n.sourceRoot,m,r)});for(var a=t._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],l=0,f=a.length;l<f;l++){var d=a[l],_=new OQ;_.generatedLine=d.generatedLine,_.generatedColumn=d.generatedColumn,d.source&&(_.source=o.indexOf(d.source),_.originalLine=d.originalLine,_.originalColumn=d.originalColumn,d.name&&(_.name=i.indexOf(d.name)),c.push(_)),u.push(_)}return j0(n.__originalMappings,se.compareByOriginalPositions),n},"SourceMapConsumer_fromSourceMap");nn.prototype._version=3;Object.defineProperty(nn.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function OQ(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}s(OQ,"Mapping");nn.prototype._parseMappings=s(function(t,r){for(var n=1,i=0,o=0,a=0,u=0,c=0,l=t.length,f=0,d={},_={},m=[],g=[],y,b,E,v,O;f<l;)if(t.charAt(f)===";")n++,f++,i=0;else if(t.charAt(f)===",")f++;else{for(y=new OQ,y.generatedLine=n,v=f;v<l&&!this._charIsMappingSeparator(t,v);v++);if(b=t.slice(f,v),E=d[b],E)f+=b.length;else{for(E=[];f<v;)z7e.decode(t,f,_),O=_.value,f=_.rest,E.push(O);if(E.length===2)throw new Error("Found a source, but no line and column");if(E.length===3)throw new Error("Found a source and line, but no column");d[b]=E}y.generatedColumn=i+E[0],i=y.generatedColumn,E.length>1&&(y.source=u+E[1],u+=E[1],y.originalLine=o+E[2],o=y.originalLine,y.originalLine+=1,y.originalColumn=a+E[3],a=y.originalColumn,E.length>4&&(y.name=c+E[4],c+=E[4])),g.push(y),typeof y.originalLine=="number"&&m.push(y)}j0(g,se.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,j0(m,se.compareByOriginalPositions),this.__originalMappings=m},"SourceMapConsumer_parseMappings");nn.prototype._findMapping=s(function(t,r,n,i,o,a){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[i]);return JU.search(t,r,o,a)},"SourceMapConsumer_findMapping");nn.prototype.computeColumnSpans=s(function(){for(var t=0;t<this._generatedMappings.length;++t){var r=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}},"SourceMapConsumer_computeColumnSpans");nn.prototype.originalPositionFor=s(function(t){var r={generatedLine:se.getArg(t,"line"),generatedColumn:se.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",se.compareByGeneratedPositionsDeflated,se.getArg(t,"bias",Vt.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var o=se.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=se.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var a=se.getArg(i,"name",null);return a!==null&&(a=this._names.at(a)),{source:o,line:se.getArg(i,"originalLine",null),column:se.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},"SourceMapConsumer_originalPositionFor");nn.prototype.hasContentsOfAllSources=s(function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1},"BasicSourceMapConsumer_hasContentsOfAllSources");nn.prototype.sourceContentFor=s(function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var i=t;this.sourceRoot!=null&&(i=se.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=se.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if(o.scheme=="file"&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!o.path||o.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')},"SourceMapConsumer_sourceContentFor");nn.prototype.generatedPositionFor=s(function(t){var r=se.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:se.getArg(t,"line"),originalColumn:se.getArg(t,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",se.compareByOriginalPositions,se.getArg(t,"bias",Vt.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:se.getArg(o,"generatedLine",null),column:se.getArg(o,"generatedColumn",null),lastColumn:se.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},"SourceMapConsumer_generatedPositionFor");NI.BasicSourceMapConsumer=nn;function _o(e,t){var r=e;typeof e=="string"&&(r=se.parseSourceMapInput(e));var n=se.getArg(r,"version"),i=se.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new lm,this._names=new lm;var o={line:-1,column:0};this._sections=i.map(function(a){if(a.url)throw new Error("Support for url field in sections not implemented.");var u=se.getArg(a,"offset"),c=se.getArg(u,"line"),l=se.getArg(u,"column");if(c<o.line||c===o.line&&l<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=u,{generatedOffset:{generatedLine:c+1,generatedColumn:l+1},consumer:new Vt(se.getArg(a,"map"),t)}})}s(_o,"IndexedSourceMapConsumer");_o.prototype=Object.create(Vt.prototype);_o.prototype.constructor=Vt;_o.prototype._version=3;Object.defineProperty(_o.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}});_o.prototype.originalPositionFor=s(function(t){var r={generatedLine:se.getArg(t,"line"),generatedColumn:se.getArg(t,"column")},n=JU.search(r,this._sections,function(o,a){var u=o.generatedLine-a.generatedOffset.generatedLine;return u||o.generatedColumn-a.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}},"IndexedSourceMapConsumer_originalPositionFor");_o.prototype.hasContentsOfAllSources=s(function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})},"IndexedSourceMapConsumer_hasContentsOfAllSources");_o.prototype.sourceContentFor=s(function(t,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],o=i.consumer.sourceContentFor(t,!0);if(o)return o}if(r)return null;throw new Error('"'+t+'" is not in the SourceMap.')},"IndexedSourceMapConsumer_sourceContentFor");_o.prototype.generatedPositionFor=s(function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(se.getArg(t,"source"))!==-1){var i=n.consumer.generatedPositionFor(t);if(i){var o={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}},"IndexedSourceMapConsumer_generatedPositionFor");_o.prototype._parseMappings=s(function(t,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],o=i.consumer._generatedMappings,a=0;a<o.length;a++){var u=o[a],c=i.consumer._sources.at(u.source);c=se.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var l=null;u.name&&(l=i.consumer._names.at(u.name),this._names.add(l),l=this._names.indexOf(l));var f={source:c,generatedLine:u.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:u.generatedColumn+(i.generatedOffset.generatedLine===u.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:u.originalLine,originalColumn:u.originalColumn,name:l};this.__generatedMappings.push(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}j0(this.__generatedMappings,se.compareByGeneratedPositionsDeflated),j0(this.__originalMappings,se.compareByOriginalPositions)},"IndexedSourceMapConsumer_parseMappings");NI.IndexedSourceMapConsumer=_o});var IQ=h(wQ=>{var H7e=HU().SourceMapGenerator,AI=cm(),K7e=/(\r?\n)/,W7e=10,fm="$$$isSourceNode$$$";function Wi(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=r??null,this.name=i??null,this[fm]=!0,n!=null&&this.add(n)}s(Wi,"SourceNode");Wi.fromStringWithSourceMap=s(function(t,r,n){var i=new Wi,o=t.split(K7e),a=0,u=s(function(){var _=g(),m=g()||"";return _+m;function g(){return a<o.length?o[a++]:void 0}},"shiftNextLine"),c=1,l=0,f=null;return r.eachMapping(function(_){if(f!==null)if(c<_.generatedLine)d(f,u()),c++,l=0;else{var m=o[a]||"",g=m.substr(0,_.generatedColumn-l);o[a]=m.substr(_.generatedColumn-l),l=_.generatedColumn,d(f,g),f=_;return}for(;c<_.generatedLine;)i.add(u()),c++;if(l<_.generatedColumn){var m=o[a]||"";i.add(m.substr(0,_.generatedColumn)),o[a]=m.substr(_.generatedColumn),l=_.generatedColumn}f=_},this),a<o.length&&(f&&d(f,u()),i.add(o.splice(a).join(""))),r.sources.forEach(function(_){var m=r.sourceContentFor(_);m!=null&&(n!=null&&(_=AI.join(n,_)),i.setSourceContent(_,m))}),i;function d(_,m){if(_===null||_.source===void 0)i.add(m);else{var g=n?AI.join(n,_.source):_.source;i.add(new Wi(_.originalLine,_.originalColumn,g,m,_.name))}}s(d,"addMappingWithCode")},"SourceNode_fromStringWithSourceMap");Wi.prototype.add=s(function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[fm]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this},"SourceNode_add");Wi.prototype.prepend=s(function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[fm]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this},"SourceNode_prepend");Wi.prototype.walk=s(function(t){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[fm]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})},"SourceNode_walk");Wi.prototype.join=s(function(t){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(t);r.push(this.children[n]),this.children=r}return this},"SourceNode_join");Wi.prototype.replaceRight=s(function(t,r){var n=this.children[this.children.length-1];return n[fm]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this},"SourceNode_replaceRight");Wi.prototype.setSourceContent=s(function(t,r){this.sourceContents[AI.toSetString(t)]=r},"SourceNode_setSourceContent");Wi.prototype.walkSourceContents=s(function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][fm]&&this.children[r].walkSourceContents(t);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)t(AI.fromSetString(i[r]),this.sourceContents[i[r]])},"SourceNode_walkSourceContents");Wi.prototype.toString=s(function(){var t="";return this.walk(function(r){t+=r}),t},"SourceNode_toString");Wi.prototype.toStringWithSourceMap=s(function(t){var r={code:"",line:1,column:0},n=new H7e(t),i=!1,o=null,a=null,u=null,c=null;return this.walk(function(l,f){r.code+=l,f.source!==null&&f.line!==null&&f.column!==null?((o!==f.source||a!==f.line||u!==f.column||c!==f.name)&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name}),o=f.source,a=f.line,u=f.column,c=f.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var d=0,_=l.length;d<_;d++)l.charCodeAt(d)===W7e?(r.line++,r.column=0,d+1===_?(o=null,i=!1):i&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name})):r.column++}),this.walkSourceContents(function(l,f){n.setSourceContent(l,f)}),{code:r.code,map:n}},"SourceNode_toStringWithSourceMap");wQ.SourceNode=Wi});var TQ=h(RI=>{RI.SourceMapGenerator=HU().SourceMapGenerator;RI.SourceMapConsumer=PQ().SourceMapConsumer;RI.SourceNode=IQ().SourceNode});var CQ=h((CI,RQ)=>{"use strict";CI.__esModule=!0;var ZU=Vn(),Ed=void 0;try{(typeof define!="function"||!define.amd)&&(NQ=TQ(),Ed=NQ.SourceNode)}catch{}var NQ;Ed||(Ed=s(function(e,t,r,n){this.src="",n&&this.add(n)},"SourceNode"),Ed.prototype={add:s(function(t){ZU.isArray(t)&&(t=t.join("")),this.src+=t},"add"),prepend:s(function(t){ZU.isArray(t)&&(t=t.join("")),this.src=t+this.src},"prepend"),toStringWithSourceMap:s(function(){return{code:this.toString()}},"toStringWithSourceMap"),toString:s(function(){return this.src},"toString")});function XU(e,t,r){if(ZU.isArray(e)){for(var n=[],i=0,o=e.length;i<o;i++)n.push(t.wrap(e[i],r));return n}else if(typeof e=="boolean"||typeof e=="number")return e+"";return e}s(XU,"castChunk");function AQ(e){this.srcFile=e,this.source=[]}s(AQ,"CodeGen");AQ.prototype={isEmpty:s(function(){return!this.source.length},"isEmpty"),prepend:s(function(t,r){this.source.unshift(this.wrap(t,r))},"prepend"),push:s(function(t,r){this.source.push(this.wrap(t,r))},"push"),merge:s(function(){var t=this.empty();return this.each(function(r){t.add([" ",r,`
157
157
  `])}),t},"merge"),each:s(function(t){for(var r=0,n=this.source.length;r<n;r++)t(this.source[r])},"each"),empty:s(function(){var t=this.currentLocation||{start:{}};return new Ed(t.start.line,t.start.column,this.srcFile)},"empty"),wrap:s(function(t){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return t instanceof Ed?t:(t=XU(t,this,r),new Ed(r.start.line,r.start.column,this.srcFile,t))},"wrap"),functionCall:s(function(t,r,n){return n=this.generateList(n),this.wrap([t,r?"."+r+"(":"(",n,")"])},"functionCall"),quotedString:s(function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},"quotedString"),objectLiteral:s(function(t){var r=this,n=[];Object.keys(t).forEach(function(o){var a=XU(t[o],r);a!=="undefined"&&n.push([r.quotedString(o),":",a])});var i=this.generateList(n);return i.prepend("{"),i.add("}"),i},"objectLiteral"),generateList:s(function(t){for(var r=this.empty(),n=0,i=t.length;n<i;n++)n&&r.add(","),r.add(XU(t[n],this));return r},"generateList"),generateArray:s(function(t){var r=this.generateList(t);return r.prepend("["),r.add("]"),r},"generateArray")};CI.default=AQ;RQ.exports=CI.default});var MQ=h(($I,jQ)=>{"use strict";$I.__esModule=!0;function LQ(e){return e&&e.__esModule?e:{default:e}}s(LQ,"_interopRequireDefault");var $Q=pI(),Y7e=vs(),QU=LQ(Y7e),J7e=Vn(),X7e=CQ(),DQ=LQ(X7e);function dm(e){this.value=e}s(dm,"Literal");function pm(){}s(pm,"JavaScriptCompiler");pm.prototype={nameLookup:s(function(t,r){return this.internalNameLookup(t,r)},"nameLookup"),depthedLookup:s(function(t){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(t),")"]},"depthedLookup"),compilerInfo:s(function(){var t=$Q.COMPILER_REVISION,r=$Q.REVISION_CHANGES[t];return[t,r]},"compilerInfo"),appendToBuffer:s(function(t,r,n){return J7e.isArray(t)||(t=[t]),t=this.source.wrap(t,r),this.environment.isSimple?["return ",t,";"]:n?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},"appendToBuffer"),initializeBuffer:s(function(){return this.quotedString("")},"initializeBuffer"),internalNameLookup:s(function(t,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",t,",",JSON.stringify(r),")"]},"internalNameLookup"),lookupPropertyFunctionIsUsed:!1,compile:s(function(t,r,n,i){this.environment=t,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(t,r),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var o=t.opcodes,a=void 0,u=void 0,c=void 0,l=void 0;for(c=0,l=o.length;c<l;c++)a=o[c],this.source.currentLocation=a.loc,u=u||a.loc,this[a.opcode].apply(this,a.args);if(this.source.currentLocation=u,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new QU.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
158
158
  `]),this.decorators.push("return fn;"),i?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
159
159
  `),this.decorators.push(`}
@@ -171,16 +171,16 @@ Expecting `+$e.join(", ")+", got '"+(this.terminals_[P]||P)+"'":bt="Parse error
171
171
  `:""},this._extScope=t,this._scope=new go.Scope({parent:t}),this._nodes=[new yx]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new dx(t,o,n)),o}const(t,r,n){return this._def(go.varKinds.const,t,r,n)}let(t,r,n){return this._def(go.varKinds.let,t,r,n)}var(t,r,n){return this._def(go.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new GI(t,r,n))}add(t,r){return this._leafNode(new px(t,xe.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==Qe.nil&&this._leafNode(new gx(t)),this}object(...t){let r=["{"];for(let[n,i]of t)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,Qe.addCodeArg)(r,i));return r.push("}"),new Qe._Code(r)}if(t,r,n){if(this._blockNode(new vd(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new vd(t))}else(){return this._elseNode(new gm)}endIf(){return this._endBlockNode(vd,gm)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Ex(t),r)}forRange(t,r,n,i,o=this.opts.es5?go.varKinds.var:go.varKinds.let){let a=this._scope.toName(t);return this._for(new bx(o,a,r,n),()=>i(a))}forOf(t,r,n,i=go.varKinds.const){let o=this._scope.toName(t);if(this.opts.es5){let a=r instanceof Qe.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,Qe._)`${a}.length`,u=>{this.var(o,(0,Qe._)`${a}[${u}]`),n(o)})}return this._for(new VI("of",i,o,r),()=>n(o))}forIn(t,r,n,i=this.opts.es5?go.varKinds.var:go.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,Qe._)`Object.keys(${r})`,n);let o=this._scope.toName(t);return this._for(new VI("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(Od)}label(t){return this._leafNode(new hx(t))}break(t){return this._leafNode(new mx(t))}return(t){let r=new V0;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(V0)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Sx;if(this._blockNode(i),this.code(t),r){let o=this.name("e");this._currNode=i.catch=new z0(o),r(o)}return n&&(this._currNode=i.finally=new H0,this.code(n)),this._endBlockNode(z0,H0)}throw(t){return this._leafNode(new _x(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=Qe.nil,n,i){return this._blockNode(new G0(t,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(G0)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof vd))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};xe.CodeGen=vx;function Pd(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}s(Pd,"addNames");function zI(e,t){return t instanceof Qe._CodeOrName?Pd(e,t.names):e}s(zI,"addExprNames");function ym(e,t,r){if(e instanceof Qe.Name)return n(e);if(!i(e))return e;return new Qe._Code(e._items.reduce((o,a)=>(a instanceof Qe.Name&&(a=n(a)),a instanceof Qe._Code?o.push(...a._items):o.push(a),o),[]));function n(o){let a=r[o.str];return a===void 0||t[o.str]!==1?o:(delete t[o.str],a)}function i(o){return o instanceof Qe._Code&&o._items.some(a=>a instanceof Qe.Name&&t[a.str]===1&&r[a.str]!==void 0)}}s(ym,"optimizeExpr");function YWe(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}s(YWe,"subtractNames");function cee(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Qe._)`!${Ox(e)}`}s(cee,"not");xe.not=cee;var JWe=lee(xe.operators.AND);function XWe(...e){return e.reduce(JWe)}s(XWe,"and");xe.and=XWe;var ZWe=lee(xe.operators.OR);function QWe(...e){return e.reduce(ZWe)}s(QWe,"or");xe.or=QWe;function lee(e){return(t,r)=>t===Qe.nil?r:r===Qe.nil?t:(0,Qe._)`${Ox(t)} ${e} ${Ox(r)}`}s(lee,"mappend");function Ox(e){return e instanceof Qe.Name?e:(0,Qe._)`(${e})`}s(Ox,"par")});var ze=h(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.checkStrictMode=qe.getErrorPath=qe.Type=qe.useFunc=qe.setEvaluated=qe.evaluatedPropsToName=qe.mergeEvaluated=qe.eachItem=qe.unescapeJsonPointer=qe.escapeJsonPointer=qe.escapeFragment=qe.unescapeFragment=qe.schemaRefOrVal=qe.schemaHasRulesButRef=qe.schemaHasRules=qe.checkUnknownRules=qe.alwaysValidSchema=qe.toHash=void 0;var xt=Pe(),eYe=k0();function tYe(e){let t={};for(let r of e)t[r]=!0;return t}s(tYe,"toHash");qe.toHash=tYe;function rYe(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(pee(e,t),!hee(t,e.self.RULES.all))}s(rYe,"alwaysValidSchema");qe.alwaysValidSchema=rYe;function pee(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let i=n.RULES.keywords;for(let o in t)i[o]||yee(e,`unknown keyword: "${o}"`)}s(pee,"checkUnknownRules");qe.checkUnknownRules=pee;function hee(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}s(hee,"schemaHasRules");qe.schemaHasRules=hee;function nYe(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}s(nYe,"schemaHasRulesButRef");qe.schemaHasRulesButRef=nYe;function iYe({topSchemaRef:e,schemaPath:t},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,xt._)`${r}`}return(0,xt._)`${e}${t}${(0,xt.getProperty)(n)}`}s(iYe,"schemaRefOrVal");qe.schemaRefOrVal=iYe;function sYe(e){return mee(decodeURIComponent(e))}s(sYe,"unescapeFragment");qe.unescapeFragment=sYe;function oYe(e){return encodeURIComponent(Px(e))}s(oYe,"escapeFragment");qe.escapeFragment=oYe;function Px(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}s(Px,"escapeJsonPointer");qe.escapeJsonPointer=Px;function mee(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}s(mee,"unescapeJsonPointer");qe.unescapeJsonPointer=mee;function aYe(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}s(aYe,"eachItem");qe.eachItem=aYe;function fee({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(i,o,a,u)=>{let c=a===void 0?o:a instanceof xt.Name?(o instanceof xt.Name?e(i,o,a):t(i,o,a),a):o instanceof xt.Name?(t(i,a,o),o):r(o,a);return u===xt.Name&&!(c instanceof xt.Name)?n(i,c):c}}s(fee,"makeMergeEvaluated");qe.mergeEvaluated={props:fee({mergeNames:(e,t,r)=>e.if((0,xt._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,xt._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,xt._)`${r} || {}`).code((0,xt._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,xt._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,xt._)`${r} || {}`),wx(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:_ee}),items:fee({mergeNames:(e,t,r)=>e.if((0,xt._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,xt._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,xt._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,xt._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function _ee(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,xt._)`{}`);return t!==void 0&&wx(e,r,t),r}s(_ee,"evaluatedPropsToName");qe.evaluatedPropsToName=_ee;function wx(e,t,r){Object.keys(r).forEach(n=>e.assign((0,xt._)`${t}${(0,xt.getProperty)(n)}`,!0))}s(wx,"setEvaluated");qe.setEvaluated=wx;var dee={};function uYe(e,t){return e.scopeValue("func",{ref:t,code:dee[t.code]||(dee[t.code]=new eYe._Code(t.code))})}s(uYe,"useFunc");qe.useFunc=uYe;var gee;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(gee=qe.Type||(qe.Type={}));function cYe(e,t,r){if(e instanceof xt.Name){let n=t===gee.Num;return r?n?(0,xt._)`"[" + ${e} + "]"`:(0,xt._)`"['" + ${e} + "']"`:n?(0,xt._)`"/" + ${e}`:(0,xt._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,xt.getProperty)(e).toString():"/"+Px(e)}s(cYe,"getErrorPath");qe.getErrorPath=cYe;function yee(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}s(yee,"checkStrictMode");qe.checkStrictMode=yee});var Is=h(Ix=>{"use strict";Object.defineProperty(Ix,"__esModule",{value:!0});var wn=Pe(),lYe={data:new wn.Name("data"),valCxt:new wn.Name("valCxt"),instancePath:new wn.Name("instancePath"),parentData:new wn.Name("parentData"),parentDataProperty:new wn.Name("parentDataProperty"),rootData:new wn.Name("rootData"),dynamicAnchors:new wn.Name("dynamicAnchors"),vErrors:new wn.Name("vErrors"),errors:new wn.Name("errors"),this:new wn.Name("this"),self:new wn.Name("self"),scope:new wn.Name("scope"),json:new wn.Name("json"),jsonPos:new wn.Name("jsonPos"),jsonLen:new wn.Name("jsonLen"),jsonPart:new wn.Name("jsonPart")};Ix.default=lYe});var K0=h(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.extendErrors=In.resetErrorsCount=In.reportExtraError=In.reportError=In.keyword$DataError=In.keywordError=void 0;var st=Pe(),KI=ze(),Hn=Is();In.keywordError={message:({keyword:e})=>(0,st.str)`must pass "${e}" keyword validation`};In.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,st.str)`"${e}" keyword must be ${t} ($data)`:(0,st.str)`"${e}" keyword is invalid ($data)`};function fYe(e,t=In.keywordError,r,n){let{it:i}=e,{gen:o,compositeRule:a,allErrors:u}=i,c=See(e,t,r);n??(a||u)?Eee(o,c):bee(i,(0,st._)`[${c}]`)}s(fYe,"reportError");In.reportError=fYe;function dYe(e,t=In.keywordError,r){let{it:n}=e,{gen:i,compositeRule:o,allErrors:a}=n,u=See(e,t,r);Eee(i,u),o||a||bee(n,Hn.default.vErrors)}s(dYe,"reportExtraError");In.reportExtraError=dYe;function pYe(e,t){e.assign(Hn.default.errors,t),e.if((0,st._)`${Hn.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,st._)`${Hn.default.vErrors}.length`,t),()=>e.assign(Hn.default.vErrors,null)))}s(pYe,"resetErrorsCount");In.resetErrorsCount=pYe;function hYe({gen:e,keyword:t,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",i,Hn.default.errors,u=>{e.const(a,(0,st._)`${Hn.default.vErrors}[${u}]`),e.if((0,st._)`${a}.instancePath === undefined`,()=>e.assign((0,st._)`${a}.instancePath`,(0,st.strConcat)(Hn.default.instancePath,o.errorPath))),e.assign((0,st._)`${a}.schemaPath`,(0,st.str)`${o.errSchemaPath}/${t}`),o.opts.verbose&&(e.assign((0,st._)`${a}.schema`,r),e.assign((0,st._)`${a}.data`,n))})}s(hYe,"extendErrors");In.extendErrors=hYe;function Eee(e,t){let r=e.const("err",t);e.if((0,st._)`${Hn.default.vErrors} === null`,()=>e.assign(Hn.default.vErrors,(0,st._)`[${r}]`),(0,st._)`${Hn.default.vErrors}.push(${r})`),e.code((0,st._)`${Hn.default.errors}++`)}s(Eee,"addError");function bee(e,t){let{gen:r,validateName:n,schemaEnv:i}=e;i.$async?r.throw((0,st._)`new ${e.ValidationError}(${t})`):(r.assign((0,st._)`${n}.errors`,t),r.return(!1))}s(bee,"returnErrors");var wd={keyword:new st.Name("keyword"),schemaPath:new st.Name("schemaPath"),params:new st.Name("params"),propertyName:new st.Name("propertyName"),message:new st.Name("message"),schema:new st.Name("schema"),parentSchema:new st.Name("parentSchema")};function See(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,st._)`{}`:mYe(e,t,r)}s(See,"errorObjectCode");function mYe(e,t,r={}){let{gen:n,it:i}=e,o=[_Ye(i,r),gYe(e,r)];return yYe(e,t,o),n.object(...o)}s(mYe,"errorObject");function _Ye({errorPath:e},{instancePath:t}){let r=t?(0,st.str)`${e}${(0,KI.getErrorPath)(t,KI.Type.Str)}`:e;return[Hn.default.instancePath,(0,st.strConcat)(Hn.default.instancePath,r)]}s(_Ye,"errorInstancePath");function gYe({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let i=n?t:(0,st.str)`${t}/${e}`;return r&&(i=(0,st.str)`${i}${(0,KI.getErrorPath)(r,KI.Type.Str)}`),[wd.schemaPath,i]}s(gYe,"errorSchemaPath");function yYe(e,{params:t,message:r},n){let{keyword:i,data:o,schemaValue:a,it:u}=e,{opts:c,propertyName:l,topSchemaRef:f,schemaPath:d}=u;n.push([wd.keyword,i],[wd.params,typeof t=="function"?t(e):t||(0,st._)`{}`]),c.messages&&n.push([wd.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([wd.schema,a],[wd.parentSchema,(0,st._)`${f}${d}`],[Hn.default.data,o]),l&&n.push([wd.propertyName,l])}s(yYe,"extraErrorProps")});var Oee=h(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});Em.boolOrEmptySchema=Em.topBoolOrEmptySchema=void 0;var EYe=K0(),bYe=Pe(),SYe=Is(),vYe={message:"boolean schema is false"};function OYe(e){let{gen:t,schema:r,validateName:n}=e;r===!1?vee(e,!1):typeof r=="object"&&r.$async===!0?t.return(SYe.default.data):(t.assign((0,bYe._)`${n}.errors`,null),t.return(!0))}s(OYe,"topBoolOrEmptySchema");Em.topBoolOrEmptySchema=OYe;function PYe(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),vee(e)):r.var(t,!0)}s(PYe,"boolOrEmptySchema");Em.boolOrEmptySchema=PYe;function vee(e,t){let{gen:r,data:n}=e,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,EYe.reportError)(i,vYe,void 0,t)}s(vee,"falseSchemaError")});var Tx=h(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});bm.getRules=bm.isJSONType=void 0;var wYe=["string","number","integer","boolean","null","object","array"],IYe=new Set(wYe);function TYe(e){return typeof e=="string"&&IYe.has(e)}s(TYe,"isJSONType");bm.isJSONType=TYe;function NYe(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}s(NYe,"getRules");bm.getRules=NYe});var Nx=h(jc=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});jc.shouldUseRule=jc.shouldUseGroup=jc.schemaHasRulesForType=void 0;function AYe({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&Pee(e,n)}s(AYe,"schemaHasRulesForType");jc.schemaHasRulesForType=AYe;function Pee(e,t){return t.rules.some(r=>wee(e,r))}s(Pee,"shouldUseGroup");jc.shouldUseGroup=Pee;function wee(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}s(wee,"shouldUseRule");jc.shouldUseRule=wee});var Y0=h(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.reportTypeError=sn.checkDataTypes=sn.checkDataType=sn.coerceAndCheckDataType=sn.getJSONTypes=sn.getSchemaTypes=sn.DataType=void 0;var RYe=Tx(),CYe=Nx(),$Ye=K0(),Ae=Pe(),Iee=ze(),W0;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(W0=sn.DataType||(sn.DataType={}));function DYe(e){let t=Tee(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}s(DYe,"getSchemaTypes");sn.getSchemaTypes=DYe;function Tee(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(RYe.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}s(Tee,"getJSONTypes");sn.getJSONTypes=Tee;function LYe(e,t){let{gen:r,data:n,opts:i}=e,o=jYe(t,i.coerceTypes),a=t.length>0&&!(o.length===0&&t.length===1&&(0,CYe.schemaHasRulesForType)(e,t[0]));if(a){let u=Rx(t,n,i.strictNumbers,W0.Wrong);r.if(u,()=>{o.length?MYe(e,t,o):Cx(e)})}return a}s(LYe,"coerceAndCheckDataType");sn.coerceAndCheckDataType=LYe;var Nee=new Set(["string","number","integer","boolean","null"]);function jYe(e,t){return t?e.filter(r=>Nee.has(r)||t==="array"&&r==="array"):[]}s(jYe,"coerceToTypes");function MYe(e,t,r){let{gen:n,data:i,opts:o}=e,a=n.let("dataType",(0,Ae._)`typeof ${i}`),u=n.let("coerced",(0,Ae._)`undefined`);o.coerceTypes==="array"&&n.if((0,Ae._)`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Ae._)`${i}[0]`).assign(a,(0,Ae._)`typeof ${i}`).if(Rx(t,i,o.strictNumbers),()=>n.assign(u,i))),n.if((0,Ae._)`${u} !== undefined`);for(let l of r)(Nee.has(l)||l==="array"&&o.coerceTypes==="array")&&c(l);n.else(),Cx(e),n.endIf(),n.if((0,Ae._)`${u} !== undefined`,()=>{n.assign(i,u),UYe(e,u)});function c(l){switch(l){case"string":n.elseIf((0,Ae._)`${a} == "number" || ${a} == "boolean"`).assign(u,(0,Ae._)`"" + ${i}`).elseIf((0,Ae._)`${i} === null`).assign(u,(0,Ae._)`""`);return;case"number":n.elseIf((0,Ae._)`${a} == "boolean" || ${i} === null
172
172
  || (${a} == "string" && ${i} && ${i} == +${i})`).assign(u,(0,Ae._)`+${i}`);return;case"integer":n.elseIf((0,Ae._)`${a} === "boolean" || ${i} === null
173
173
  || (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(u,(0,Ae._)`+${i}`);return;case"boolean":n.elseIf((0,Ae._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(u,!1).elseIf((0,Ae._)`${i} === "true" || ${i} === 1`).assign(u,!0);return;case"null":n.elseIf((0,Ae._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(u,null);return;case"array":n.elseIf((0,Ae._)`${a} === "string" || ${a} === "number"
174
- || ${a} === "boolean" || ${i} === null`).assign(u,(0,Ae._)`[${i}]`)}}s(c,"coerceSpecificType")}s(MYe,"coerceData");function UYe({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Ae._)`${t} !== undefined`,()=>e.assign((0,Ae._)`${t}[${r}]`,n))}s(UYe,"assignParentData");function Ax(e,t,r,n=W0.Correct){let i=n===W0.Correct?Ae.operators.EQ:Ae.operators.NEQ,o;switch(e){case"null":return(0,Ae._)`${t} ${i} null`;case"array":o=(0,Ae._)`Array.isArray(${t})`;break;case"object":o=(0,Ae._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a((0,Ae._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return(0,Ae._)`typeof ${t} ${i} ${e}`}return n===W0.Correct?o:(0,Ae.not)(o);function a(u=Ae.nil){return(0,Ae.and)((0,Ae._)`typeof ${t} == "number"`,u,r?(0,Ae._)`isFinite(${t})`:Ae.nil)}}s(Ax,"checkDataType");sn.checkDataType=Ax;function Rx(e,t,r,n){if(e.length===1)return Ax(e[0],t,r,n);let i,o=(0,Iee.toHash)(e);if(o.array&&o.object){let a=(0,Ae._)`typeof ${t} != "object"`;i=o.null?a:(0,Ae._)`!${t} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Ae.nil;o.number&&delete o.integer;for(let a in o)i=(0,Ae.and)(i,Ax(a,t,r,n));return i}s(Rx,"checkDataTypes");sn.checkDataTypes=Rx;var xYe={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Ae._)`{type: ${e}}`:(0,Ae._)`{type: ${t}}`};function Cx(e){let t=qYe(e);(0,$Ye.reportError)(t,xYe)}s(Cx,"reportTypeError");sn.reportTypeError=Cx;function qYe(e){let{gen:t,data:r,schema:n}=e,i=(0,Iee.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}s(qYe,"getTypeErrorContext")});var Ree=h(WI=>{"use strict";Object.defineProperty(WI,"__esModule",{value:!0});WI.assignDefaults=void 0;var Sm=Pe(),FYe=ze();function kYe(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)Aee(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,o)=>Aee(e,o,i.default))}s(kYe,"assignDefaults");WI.assignDefaults=kYe;function Aee(e,t,r){let{gen:n,compositeRule:i,data:o,opts:a}=e;if(r===void 0)return;let u=(0,Sm._)`${o}${(0,Sm.getProperty)(t)}`;if(i){(0,FYe.checkStrictMode)(e,`default is ignored for: ${u}`);return}let c=(0,Sm._)`${u} === undefined`;a.useDefaults==="empty"&&(c=(0,Sm._)`${c} || ${u} === null || ${u} === ""`),n.if(c,(0,Sm._)`${u} = ${(0,Sm.stringify)(r)}`)}s(Aee,"assignDefault")});var Ts=h($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.validateUnion=$t.validateArray=$t.usePattern=$t.callValidateCode=$t.schemaProperties=$t.allSchemaProperties=$t.noPropertyInData=$t.propertyInData=$t.isOwnProperty=$t.hasPropFunc=$t.reportMissingProp=$t.checkMissingProp=$t.checkReportMissingProp=void 0;var zt=Pe(),$x=ze(),Mc=Is(),BYe=ze();function GYe(e,t){let{gen:r,data:n,it:i}=e;r.if(Lx(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,zt._)`${t}`},!0),e.error()})}s(GYe,"checkReportMissingProp");$t.checkReportMissingProp=GYe;function VYe({gen:e,data:t,it:{opts:r}},n,i){return(0,zt.or)(...n.map(o=>(0,zt.and)(Lx(e,t,o,r.ownProperties),(0,zt._)`${i} = ${o}`)))}s(VYe,"checkMissingProp");$t.checkMissingProp=VYe;function zYe(e,t){e.setParams({missingProperty:t},!0),e.error()}s(zYe,"reportMissingProp");$t.reportMissingProp=zYe;function Cee(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,zt._)`Object.prototype.hasOwnProperty`})}s(Cee,"hasPropFunc");$t.hasPropFunc=Cee;function Dx(e,t,r){return(0,zt._)`${Cee(e)}.call(${t}, ${r})`}s(Dx,"isOwnProperty");$t.isOwnProperty=Dx;function HYe(e,t,r,n){let i=(0,zt._)`${t}${(0,zt.getProperty)(r)} !== undefined`;return n?(0,zt._)`${i} && ${Dx(e,t,r)}`:i}s(HYe,"propertyInData");$t.propertyInData=HYe;function Lx(e,t,r,n){let i=(0,zt._)`${t}${(0,zt.getProperty)(r)} === undefined`;return n?(0,zt.or)(i,(0,zt.not)(Dx(e,t,r))):i}s(Lx,"noPropertyInData");$t.noPropertyInData=Lx;function $ee(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}s($ee,"allSchemaProperties");$t.allSchemaProperties=$ee;function KYe(e,t){return $ee(t).filter(r=>!(0,$x.alwaysValidSchema)(e,t[r]))}s(KYe,"schemaProperties");$t.schemaProperties=KYe;function WYe({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},u,c,l){let f=l?(0,zt._)`${e}, ${t}, ${n}${i}`:t,d=[[Mc.default.instancePath,(0,zt.strConcat)(Mc.default.instancePath,o)],[Mc.default.parentData,a.parentData],[Mc.default.parentDataProperty,a.parentDataProperty],[Mc.default.rootData,Mc.default.rootData]];a.opts.dynamicRef&&d.push([Mc.default.dynamicAnchors,Mc.default.dynamicAnchors]);let _=(0,zt._)`${f}, ${r.object(...d)}`;return c!==zt.nil?(0,zt._)`${u}.call(${c}, ${_})`:(0,zt._)`${u}(${_})`}s(WYe,"callValidateCode");$t.callValidateCode=WYe;var YYe=(0,zt._)`new RegExp`;function JYe({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,o=i(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,zt._)`${i.code==="new RegExp"?YYe:(0,BYe.useFunc)(e,i)}(${r}, ${n})`})}s(JYe,"usePattern");$t.usePattern=JYe;function XYe(e){let{gen:t,data:r,keyword:n,it:i}=e,o=t.name("valid");if(i.allErrors){let u=t.let("valid",!0);return a(()=>t.assign(u,!1)),u}return t.var(o,!0),a(()=>t.break()),o;function a(u){let c=t.const("len",(0,zt._)`${r}.length`);t.forRange("i",0,c,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:$x.Type.Num},o),t.if((0,zt.not)(o),u)})}s(a,"validateItems")}s(XYe,"validateArray");$t.validateArray=XYe;function ZYe(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,$x.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let a=t.let("valid",!1),u=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let f=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},u);t.assign(a,(0,zt._)`${a} || ${u}`),e.mergeValidEvaluated(f,u)||t.if((0,zt.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}s(ZYe,"validateUnion");$t.validateUnion=ZYe});var jee=h(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.validateKeywordUsage=pa.validSchemaType=pa.funcKeywordCode=pa.macroKeywordCode=void 0;var Kn=Pe(),Id=Is(),QYe=Ts(),eJe=K0();function tJe(e,t){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=e,u=t.macro.call(a.self,i,o,a),c=Lee(r,n,u);a.opts.validateSchema!==!1&&a.self.validateSchema(u,!0);let l=r.name("valid");e.subschema({schema:u,schemaPath:Kn.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}s(tJe,"macroKeywordCode");pa.macroKeywordCode=tJe;function rJe(e,t){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:u,it:c}=e;iJe(c,t);let l=!u&&t.compile?t.compile.call(c.self,o,a,c):t.validate,f=Lee(n,i,l),d=n.let("valid");e.block$data(d,_),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function _(){if(t.errors===!1)y(),t.modifying&&Dee(e),b(()=>e.error());else{let E=t.async?m():g();t.modifying&&Dee(e),b(()=>nJe(e,E))}}s(_,"validateKeyword");function m(){let E=n.let("ruleErrs",null);return n.try(()=>y((0,Kn._)`await `),S=>n.assign(d,!1).if((0,Kn._)`${S} instanceof ${c.ValidationError}`,()=>n.assign(E,(0,Kn._)`${S}.errors`),()=>n.throw(S))),E}s(m,"validateAsync");function g(){let E=(0,Kn._)`${f}.errors`;return n.assign(E,null),y(Kn.nil),E}s(g,"validateSync");function y(E=t.async?(0,Kn._)`await `:Kn.nil){let S=c.opts.passContext?Id.default.this:Id.default.self,O=!("compile"in t&&!u||t.schema===!1);n.assign(d,(0,Kn._)`${E}${(0,QYe.callValidateCode)(e,f,S,O)}`,t.modifying)}s(y,"assignValid");function b(E){var S;n.if((0,Kn.not)((S=t.valid)!==null&&S!==void 0?S:d),E)}s(b,"reportErrs")}s(rJe,"funcKeywordCode");pa.funcKeywordCode=rJe;function Dee(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Kn._)`${n.parentData}[${n.parentDataProperty}]`))}s(Dee,"modifyData");function nJe(e,t){let{gen:r}=e;r.if((0,Kn._)`Array.isArray(${t})`,()=>{r.assign(Id.default.vErrors,(0,Kn._)`${Id.default.vErrors} === null ? ${t} : ${Id.default.vErrors}.concat(${t})`).assign(Id.default.errors,(0,Kn._)`${Id.default.vErrors}.length`),(0,eJe.extendErrors)(e)},()=>e.error())}s(nJe,"addErrs");function iJe({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}s(iJe,"checkAsyncKeyword");function Lee(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Kn.stringify)(r)})}s(Lee,"useKeyword");function sJe(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}s(sJe,"validSchemaType");pa.validSchemaType=sJe;function oJe({schema:e,opts:t,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let a=i.dependencies;if(a?.some(u=>!Object.prototype.hasOwnProperty.call(e,u)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}s(oJe,"validateKeywordUsage");pa.validateKeywordUsage=oJe});var Uee=h(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.extendSubschemaMode=Uc.extendSubschemaData=Uc.getSubschema=void 0;var ha=Pe(),Mee=ze();function aJe(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let u=e.schema[t];return r===void 0?{schema:u,schemaPath:(0,ha._)`${e.schemaPath}${(0,ha.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:u[r],schemaPath:(0,ha._)`${e.schemaPath}${(0,ha.getProperty)(t)}${(0,ha.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Mee.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}s(aJe,"getSubschema");Uc.getSubschema=aJe;function uJe(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:u}=t;if(r!==void 0){let{errorPath:l,dataPathArr:f,opts:d}=t,_=u.let("data",(0,ha._)`${t.data}${(0,ha.getProperty)(r)}`,!0);c(_),e.errorPath=(0,ha.str)`${l}${(0,Mee.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,ha._)`${r}`,e.dataPathArr=[...f,e.parentDataProperty]}if(i!==void 0){let l=i instanceof ha.Name?i:u.let("data",i,!0);c(l),a!==void 0&&(e.propertyName=a)}o&&(e.dataTypes=o);function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}s(c,"dataContextProps")}s(uJe,"extendSubschemaData");Uc.extendSubschemaData=uJe;function cJe(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}s(cJe,"extendSubschemaMode");Uc.extendSubschemaMode=cJe});var J0=h(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.getSchemaRefs=Pi.resolveUrl=Pi.normalizeId=Pi._getFullPath=Pi.getFullPath=Pi.inlineRef=void 0;var lJe=ze(),fJe=Xf(),dJe=JP(),pJe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function hJe(e,t=!0){return typeof e=="boolean"?!0:t===!0?!jx(e):t?xee(e)<=t:!1}s(hJe,"inlineRef");Pi.inlineRef=hJe;var mJe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function jx(e){for(let t in e){if(mJe.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(jx)||typeof r=="object"&&jx(r))return!0}return!1}s(jx,"hasRef");function xee(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!pJe.has(r)&&(typeof e[r]=="object"&&(0,lJe.eachItem)(e[r],n=>t+=xee(n)),t===1/0))return 1/0}return t}s(xee,"countKeys");function qee(e,t="",r){r!==!1&&(t=vm(t));let n=e.parse(t);return Fee(e,n)}s(qee,"getFullPath");Pi.getFullPath=qee;function Fee(e,t){return e.serialize(t).split("#")[0]+"#"}s(Fee,"_getFullPath");Pi._getFullPath=Fee;var _Je=/#\/?$/;function vm(e){return e?e.replace(_Je,""):""}s(vm,"normalizeId");Pi.normalizeId=vm;function gJe(e,t,r){return r=vm(r),e.resolve(t,r)}s(gJe,"resolveUrl");Pi.resolveUrl=gJe;var yJe=/^[a-z_][-a-z0-9._]*$/i;function EJe(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=vm(e[r]||t),o={"":i},a=qee(n,i,!1),u={},c=new Set;return dJe(e,{allKeys:!0},(d,_,m,g)=>{if(g===void 0)return;let y=a+_,b=o[g];typeof d[r]=="string"&&(b=E.call(this,d[r])),S.call(this,d.$anchor),S.call(this,d.$dynamicAnchor),o[_]=b;function E(O){let P=this.opts.uriResolver.resolve;if(O=vm(b?P(b,O):O),c.has(O))throw f(O);c.add(O);let I=this.refs[O];return typeof I=="string"&&(I=this.refs[I]),typeof I=="object"?l(d,I.schema,O):O!==vm(y)&&(O[0]==="#"?(l(d,u[O],O),u[O]=d):this.refs[O]=y),O}s(E,"addRef");function S(O){if(typeof O=="string"){if(!yJe.test(O))throw new Error(`invalid anchor "${O}"`);E.call(this,`#${O}`)}}s(S,"addAnchor")}),u;function l(d,_,m){if(_!==void 0&&!fJe(d,_))throw f(m)}s(l,"checkAmbiguosRef");function f(d){return new Error(`reference "${d}" resolves to more than one schema`)}s(f,"ambiguos")}s(EJe,"getSchemaRefs");Pi.getSchemaRefs=EJe});var Q0=h(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.getData=xc.KeywordCxt=xc.validateFunctionCode=void 0;var zee=Oee(),kee=Y0(),Ux=Nx(),YI=Y0(),bJe=Ree(),Z0=jee(),Mx=Uee(),ce=Pe(),Se=Is(),SJe=J0(),bu=ze(),X0=K0();function vJe(e){if(Wee(e)&&(Yee(e),Kee(e))){wJe(e);return}Hee(e,()=>(0,zee.topBoolOrEmptySchema)(e))}s(vJe,"validateFunctionCode");xc.validateFunctionCode=vJe;function Hee({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,(0,ce._)`${Se.default.data}, ${Se.default.valCxt}`,n.$async,()=>{e.code((0,ce._)`"use strict"; ${Bee(r,i)}`),PJe(e,i),e.code(o)}):e.func(t,(0,ce._)`${Se.default.data}, ${OJe(i)}`,n.$async,()=>e.code(Bee(r,i)).code(o))}s(Hee,"validateFunction");function OJe(e){return(0,ce._)`{${Se.default.instancePath}="", ${Se.default.parentData}, ${Se.default.parentDataProperty}, ${Se.default.rootData}=${Se.default.data}${e.dynamicRef?(0,ce._)`, ${Se.default.dynamicAnchors}={}`:ce.nil}}={}`}s(OJe,"destructureValCxt");function PJe(e,t){e.if(Se.default.valCxt,()=>{e.var(Se.default.instancePath,(0,ce._)`${Se.default.valCxt}.${Se.default.instancePath}`),e.var(Se.default.parentData,(0,ce._)`${Se.default.valCxt}.${Se.default.parentData}`),e.var(Se.default.parentDataProperty,(0,ce._)`${Se.default.valCxt}.${Se.default.parentDataProperty}`),e.var(Se.default.rootData,(0,ce._)`${Se.default.valCxt}.${Se.default.rootData}`),t.dynamicRef&&e.var(Se.default.dynamicAnchors,(0,ce._)`${Se.default.valCxt}.${Se.default.dynamicAnchors}`)},()=>{e.var(Se.default.instancePath,(0,ce._)`""`),e.var(Se.default.parentData,(0,ce._)`undefined`),e.var(Se.default.parentDataProperty,(0,ce._)`undefined`),e.var(Se.default.rootData,Se.default.data),t.dynamicRef&&e.var(Se.default.dynamicAnchors,(0,ce._)`{}`)})}s(PJe,"destructureValCxtES5");function wJe(e){let{schema:t,opts:r,gen:n}=e;Hee(e,()=>{r.$comment&&t.$comment&&Xee(e),RJe(e),n.let(Se.default.vErrors,null),n.let(Se.default.errors,0),r.unevaluated&&IJe(e),Jee(e),DJe(e)})}s(wJe,"topSchemaObjCode");function IJe(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,ce._)`${r}.evaluated`),t.if((0,ce._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,ce._)`${e.evaluated}.props`,(0,ce._)`undefined`)),t.if((0,ce._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,ce._)`${e.evaluated}.items`,(0,ce._)`undefined`))}s(IJe,"resetEvaluated");function Bee(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,ce._)`/*# sourceURL=${r} */`:ce.nil}s(Bee,"funcSourceUrl");function TJe(e,t){if(Wee(e)&&(Yee(e),Kee(e))){NJe(e,t);return}(0,zee.boolOrEmptySchema)(e,t)}s(TJe,"subschemaCode");function Kee({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}s(Kee,"schemaCxtHasRules");function Wee(e){return typeof e.schema!="boolean"}s(Wee,"isSchemaObj");function NJe(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&Xee(e),CJe(e),$Je(e);let o=n.const("_errs",Se.default.errors);Jee(e,o),n.var(t,(0,ce._)`${o} === ${Se.default.errors}`)}s(NJe,"subSchemaObjCode");function Yee(e){(0,bu.checkUnknownRules)(e),AJe(e)}s(Yee,"checkKeywords");function Jee(e,t){if(e.opts.jtd)return Gee(e,[],!1,t);let r=(0,kee.getSchemaTypes)(e.schema),n=(0,kee.coerceAndCheckDataType)(e,r);Gee(e,r,!n,t)}s(Jee,"typeAndKeywords");function AJe(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,bu.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}s(AJe,"checkRefsAndKeywords");function RJe(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,bu.checkStrictMode)(e,"default is ignored in the schema root")}s(RJe,"checkNoDefault");function CJe(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,SJe.resolveUrl)(e.opts.uriResolver,e.baseId,t))}s(CJe,"updateContext");function $Je(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}s($Je,"checkAsyncSchema");function Xee({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)e.code((0,ce._)`${Se.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,ce.str)`${n}/$comment`,u=e.scopeValue("root",{ref:t.root});e.code((0,ce._)`${Se.default.self}.opts.$comment(${o}, ${a}, ${u}.schema)`)}}s(Xee,"commentKeyword");function DJe(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if((0,ce._)`${Se.default.errors} === 0`,()=>t.return(Se.default.data),()=>t.throw((0,ce._)`new ${i}(${Se.default.vErrors})`)):(t.assign((0,ce._)`${n}.errors`,Se.default.vErrors),o.unevaluated&&LJe(e),t.return((0,ce._)`${Se.default.errors} === 0`))}s(DJe,"returnResults");function LJe({gen:e,evaluated:t,props:r,items:n}){r instanceof ce.Name&&e.assign((0,ce._)`${t}.props`,r),n instanceof ce.Name&&e.assign((0,ce._)`${t}.items`,n)}s(LJe,"assignEvaluated");function Gee(e,t,r,n){let{gen:i,schema:o,data:a,allErrors:u,opts:c,self:l}=e,{RULES:f}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,bu.schemaHasRulesButRef)(o,f))){i.block(()=>Qee(e,"$ref",f.all.$ref.definition));return}c.jtd||jJe(e,t),i.block(()=>{for(let _ of f.rules)d(_);d(f.post)});function d(_){(0,Ux.shouldUseGroup)(o,_)&&(_.type?(i.if((0,YI.checkDataType)(_.type,a,c.strictNumbers)),Vee(e,_),t.length===1&&t[0]===_.type&&r&&(i.else(),(0,YI.reportTypeError)(e)),i.endIf()):Vee(e,_),u||i.if((0,ce._)`${Se.default.errors} === ${n||0}`))}s(d,"groupKeywords")}s(Gee,"schemaKeywords");function Vee(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,bJe.assignDefaults)(e,t.type),r.block(()=>{for(let o of t.rules)(0,Ux.shouldUseRule)(n,o)&&Qee(e,o.keyword,o.definition,t.type)})}s(Vee,"iterateKeywords");function jJe(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(MJe(e,t),e.opts.allowUnionTypes||UJe(e,t),xJe(e,e.dataTypes))}s(jJe,"checkStrictTypes");function MJe(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Zee(e.dataTypes,r)||xx(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),FJe(e,t)}}s(MJe,"checkContextTypes");function UJe(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&xx(e,"use allowUnionTypes to allow union type keyword")}s(UJe,"checkMultipleTypes");function xJe(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Ux.shouldUseRule)(e.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>qJe(t,a))&&xx(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}s(xJe,"checkKeywordTypes");function qJe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}s(qJe,"hasApplicableType");function Zee(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}s(Zee,"includesType");function FJe(e,t){let r=[];for(let n of e.dataTypes)Zee(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}s(FJe,"narrowSchemaTypes");function xx(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,bu.checkStrictMode)(e,t,e.opts.strictTypes)}s(xx,"strictTypesError");var JI=class{static{s(this,"KeywordCxt")}constructor(t,r,n){if((0,Z0.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,bu.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",ete(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Z0.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Se.default.errors))}result(t,r,n){this.failResult((0,ce.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,ce.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,ce._)`${r} !== undefined && (${(0,ce.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?X0.reportExtraError:X0.reportError)(this,this.def.error,r)}$dataError(){(0,X0.reportError)(this,this.def.$dataError||X0.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,X0.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=ce.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=ce.nil,r=ce.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,ce.or)((0,ce._)`${i} === undefined`,r)),t!==ce.nil&&n.assign(t,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==ce.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,ce.or)(a(),u());function a(){if(n.length){if(!(r instanceof ce.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,ce._)`${(0,YI.checkDataTypes)(c,r,o.opts.strictNumbers,YI.DataType.Wrong)}`}return ce.nil}function u(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,ce._)`!${c}(${r})`}return ce.nil}}subschema(t,r){let n=(0,Mx.getSubschema)(this.it,t);(0,Mx.extendSubschemaData)(n,this.it,t),(0,Mx.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return TJe(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=bu.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=bu.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,ce.Name)),!0}};xc.KeywordCxt=JI;function Qee(e,t,r,n){let i=new JI(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Z0.funcKeywordCode)(i,r):"macro"in r?(0,Z0.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Z0.funcKeywordCode)(i,r)}s(Qee,"keywordCode");var kJe=/^\/(?:[^~]|~0|~1)*$/,BJe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ete(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(e==="")return Se.default.rootData;if(e[0]==="/"){if(!kJe.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=Se.default.rootData}else{let l=BJe.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);let f=+l[1];if(i=l[2],i==="#"){if(f>=t)throw new Error(c("property/index",f));return n[t-f]}if(f>t)throw new Error(c("data",f));if(o=r[t-f],!i)return o}let a=o,u=i.split("/");for(let l of u)l&&(o=(0,ce._)`${o}${(0,ce.getProperty)((0,bu.unescapeJsonPointer)(l))}`,a=(0,ce._)`${a} && ${o}`);return a;function c(l,f){return`Cannot access ${l} ${f} levels up, current level is ${t}`}}s(ete,"getData");xc.getData=ete});var XI=h(Fx=>{"use strict";Object.defineProperty(Fx,"__esModule",{value:!0});var qx=class extends Error{static{s(this,"ValidationError")}constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Fx.default=qx});var ZI=h(Gx=>{"use strict";Object.defineProperty(Gx,"__esModule",{value:!0});var kx=J0(),Bx=class extends Error{static{s(this,"MissingRefError")}constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,kx.resolveUrl)(t,r,n),this.missingSchema=(0,kx.normalizeId)((0,kx.getFullPath)(t,this.missingRef))}};Gx.default=Bx});var eE=h(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});Ns.resolveSchema=Ns.getCompilingSchema=Ns.resolveRef=Ns.compileSchema=Ns.SchemaEnv=void 0;var yo=Pe(),GJe=XI(),Td=Is(),Eo=J0(),tte=ze(),VJe=Q0(),Om=class{static{s(this,"SchemaEnv")}constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Eo.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};Ns.SchemaEnv=Om;function zx(e){let t=rte.call(this,e);if(t)return t;let r=(0,Eo.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new yo.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),u;e.$async&&(u=a.scopeValue("Error",{ref:GJe.default,code:(0,yo._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let l={gen:a,allErrors:this.opts.allErrors,data:Td.default.data,parentData:Td.default.parentData,parentDataProperty:Td.default.parentDataProperty,dataNames:[Td.default.data],dataPathArr:[yo.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,yo.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:yo.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,yo._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(e),(0,VJe.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);let d=a.toString();f=`${a.scopeRefs(Td.default.scope)}return ${d}`,this.opts.code.process&&(f=this.opts.code.process(f,e));let m=new Function(`${Td.default.self}`,`${Td.default.scope}`,f)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:g,items:y}=l;m.evaluated={props:g instanceof yo.Name?void 0:g,items:y instanceof yo.Name?void 0:y,dynamicProps:g instanceof yo.Name,dynamicItems:y instanceof yo.Name},m.source&&(m.source.evaluated=(0,yo.stringify)(m.evaluated))}return e.validate=m,e}catch(d){throw delete e.validate,delete e.validateName,f&&this.logger.error("Error compiling schema, function code:",f),d}finally{this._compilations.delete(e)}}s(zx,"compileSchema");Ns.compileSchema=zx;function zJe(e,t,r){var n;r=(0,Eo.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let o=WJe.call(this,e,r);if(o===void 0){let a=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:u}=this.opts;a&&(o=new Om({schema:a,schemaId:u,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=HJe.call(this,o)}s(zJe,"resolveRef");Ns.resolveRef=zJe;function HJe(e){return(0,Eo.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:zx.call(this,e)}s(HJe,"inlineOrCompile");function rte(e){for(let t of this._compilations)if(KJe(t,e))return t}s(rte,"getCompilingSchema");Ns.getCompilingSchema=rte;function KJe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}s(KJe,"sameSchemaEnv");function WJe(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||QI.call(this,e,t)}s(WJe,"resolve");function QI(e,t){let r=this.opts.uriResolver.parse(t),n=(0,Eo._getFullPath)(this.opts.uriResolver,r),i=(0,Eo.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return Vx.call(this,r,e);let o=(0,Eo.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let u=QI.call(this,e,a);return typeof u?.schema!="object"?void 0:Vx.call(this,r,u)}if(typeof a?.schema=="object"){if(a.validate||zx.call(this,a),o===(0,Eo.normalizeId)(t)){let{schema:u}=a,{schemaId:c}=this.opts,l=u[c];return l&&(i=(0,Eo.resolveUrl)(this.opts.uriResolver,i,l)),new Om({schema:u,schemaId:c,root:e,baseId:i})}return Vx.call(this,r,a)}}s(QI,"resolveSchema");Ns.resolveSchema=QI;var YJe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Vx(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let u of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,tte.unescapeFragment)(u)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!YJe.has(u)&&l&&(t=(0,Eo.resolveUrl)(this.opts.uriResolver,t,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,tte.schemaHasRulesButRef)(r,this.RULES)){let u=(0,Eo.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=QI.call(this,n,u)}let{schemaId:a}=this.opts;if(o=o||new Om({schema:r,schemaId:a,root:n,baseId:t}),o.schema!==o.root.schema)return o}s(Vx,"getJsonPointer")});var nte=h((YLt,JJe)=>{JJe.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var ste=h(Hx=>{"use strict";Object.defineProperty(Hx,"__esModule",{value:!0});var ite=tw();ite.code='require("ajv/dist/runtime/uri").default';Hx.default=ite});var pte=h(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.CodeGen=on.Name=on.nil=on.stringify=on.str=on._=on.KeywordCxt=void 0;var XJe=Q0();Object.defineProperty(on,"KeywordCxt",{enumerable:!0,get:function(){return XJe.KeywordCxt}});var Pm=Pe();Object.defineProperty(on,"_",{enumerable:!0,get:function(){return Pm._}});Object.defineProperty(on,"str",{enumerable:!0,get:function(){return Pm.str}});Object.defineProperty(on,"stringify",{enumerable:!0,get:function(){return Pm.stringify}});Object.defineProperty(on,"nil",{enumerable:!0,get:function(){return Pm.nil}});Object.defineProperty(on,"Name",{enumerable:!0,get:function(){return Pm.Name}});Object.defineProperty(on,"CodeGen",{enumerable:!0,get:function(){return Pm.CodeGen}});var ZJe=XI(),lte=ZI(),QJe=Tx(),tE=eE(),eXe=Pe(),rE=J0(),eT=Y0(),Wx=ze(),ote=nte(),tXe=ste(),fte=s((e,t)=>new RegExp(e,t),"defaultRegExp");fte.code="new RegExp";var rXe=["removeAdditional","useDefaults","coerceTypes"],nXe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),iXe={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},sXe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},ate=200;function oXe(e){var t,r,n,i,o,a,u,c,l,f,d,_,m,g,y,b,E,S,O,P,I,j,x,H,K;let Q=e.strict,de=(t=e.code)===null||t===void 0?void 0:t.optimize,re=de===!0||de===void 0?1:de||0,he=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:fte,$e=(i=e.uriResolver)!==null&&i!==void 0?i:tXe.default;return{strictSchema:(a=(o=e.strictSchema)!==null&&o!==void 0?o:Q)!==null&&a!==void 0?a:!0,strictNumbers:(c=(u=e.strictNumbers)!==null&&u!==void 0?u:Q)!==null&&c!==void 0?c:!0,strictTypes:(f=(l=e.strictTypes)!==null&&l!==void 0?l:Q)!==null&&f!==void 0?f:"log",strictTuples:(_=(d=e.strictTuples)!==null&&d!==void 0?d:Q)!==null&&_!==void 0?_:"log",strictRequired:(g=(m=e.strictRequired)!==null&&m!==void 0?m:Q)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:re,regExp:he}:{optimize:re,regExp:he},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:ate,loopEnum:(b=e.loopEnum)!==null&&b!==void 0?b:ate,meta:(E=e.meta)!==null&&E!==void 0?E:!0,messages:(S=e.messages)!==null&&S!==void 0?S:!0,inlineRefs:(O=e.inlineRefs)!==null&&O!==void 0?O:!0,schemaId:(P=e.schemaId)!==null&&P!==void 0?P:"$id",addUsedSchema:(I=e.addUsedSchema)!==null&&I!==void 0?I:!0,validateSchema:(j=e.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(x=e.validateFormats)!==null&&x!==void 0?x:!0,unicodeRegExp:(H=e.unicodeRegExp)!==null&&H!==void 0?H:!0,int32range:(K=e.int32range)!==null&&K!==void 0?K:!0,uriResolver:$e}}s(oXe,"requiredOptions");var nE=class{static{s(this,"Ajv")}constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...oXe(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new eXe.ValueScope({scope:{},prefixes:nXe,es5:r,lines:n}),this.logger=dXe(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,QJe.getRules)(),ute.call(this,iXe,t,"NOT SUPPORTED"),ute.call(this,sXe,t,"DEPRECATED","warn"),this._metaOpts=lXe.call(this),t.formats&&uXe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&cXe.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),aXe.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=ote;n==="id"&&(i={...ote},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,t,r);async function i(f,d){await o.call(this,f.$schema);let _=this._addSchema(f,d);return _.validate||a.call(this,_)}async function o(f){f&&!this.getSchema(f)&&await i.call(this,{$ref:f},!0)}async function a(f){try{return this._compileSchemaEnv(f)}catch(d){if(!(d instanceof lte.default))throw d;return u.call(this,d),await c.call(this,d.missingSchema),a.call(this,f)}}function u({missingSchema:f,missingRef:d}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${d} cannot be resolved`)}async function c(f){let d=await l.call(this,f);this.refs[f]||await o.call(this,d.$schema),this.refs[f]||this.addSchema(d,f,r)}async function l(f){let d=this._loading[f];if(d)return d;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,n,i);return this}let o;if(typeof t=="object"){let{schemaId:a}=this.opts;if(o=t[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,rE.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,t);if(!i&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(t){let r;for(;typeof(r=cte.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new tE.SchemaEnv({schema:{},schemaId:n});if(r=tE.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=cte.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,rE.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(hXe.call(this,n,r),!r)return(0,Wx.eachItem)(n,o=>Kx.call(this,o)),this;_Xe.call(this,r);let i={...r,type:(0,eT.getJSONTypes)(r.type),schemaType:(0,eT.getJSONTypes)(r.schemaType)};return(0,Wx.eachItem)(n,i.type.length===0?o=>Kx.call(this,o,i):o=>i.type.forEach(a=>Kx.call(this,o,i,a))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let o=i.split("/").slice(1),a=t;for(let u of o)a=a[u];for(let u in n){let c=n[u];if(typeof c!="object")continue;let{$data:l}=c.definition,f=a[u];l&&f&&(a[u]=dte(f))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:u}=this.opts;if(typeof t=="object")a=t[u];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,rE.normalizeId)(a||n);let l=rE.getSchemaRefs.call(this,t,n);return c=new tE.SchemaEnv({schema:t,schemaId:u,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):tE.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{tE.compileSchema.call(this,t)}finally{this.opts=r}}};on.default=nE;nE.ValidationError=ZJe.default;nE.MissingRefError=lte.default;function ute(e,t,r,n="error"){for(let i in e){let o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}s(ute,"checkOptions");function cte(e){return e=(0,rE.normalizeId)(e),this.schemas[e]||this.refs[e]}s(cte,"getSchEnv");function aXe(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}s(aXe,"addInitialSchemas");function uXe(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}s(uXe,"addInitialFormats");function cXe(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}s(cXe,"addInitialKeywords");function lXe(){let e={...this.opts};for(let t of rXe)delete e[t];return e}s(lXe,"getMetaSchemaOptions");var fXe={log(){},warn(){},error(){}};function dXe(e){if(e===!1)return fXe;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}s(dXe,"getLogger");var pXe=/^[a-z_$][a-z0-9_$:-]*$/i;function hXe(e,t){let{RULES:r}=this;if((0,Wx.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!pXe.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}s(hXe,"checkKeyword");function Kx(e,t,r){var n;let i=t?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[e]=!0,!t)return;let u={keyword:e,definition:{...t,type:(0,eT.getJSONTypes)(t.type),schemaType:(0,eT.getJSONTypes)(t.schemaType)}};t.before?mXe.call(this,a,u,t.before):a.rules.push(u),o.all[e]=u,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}s(Kx,"addRule");function mXe(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}s(mXe,"addBeforeRule");function _Xe(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=dte(t)),e.validateSchema=this.compile(t,!0))}s(_Xe,"keywordMetaschema");var gXe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function dte(e){return{anyOf:[e,gXe]}}s(dte,"schemaOrData")});var hte=h(Yx=>{"use strict";Object.defineProperty(Yx,"__esModule",{value:!0});var yXe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Yx.default=yXe});var nT=h(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.callRef=Nd.getValidate=void 0;var EXe=ZI(),mte=Ts(),wi=Pe(),wm=Is(),_te=eE(),tT=ze(),bXe={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:o,validateName:a,opts:u,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return d();let f=_te.resolveRef.call(c,l,i,r);if(f===void 0)throw new EXe.default(n.opts.uriResolver,i,r);if(f instanceof _te.SchemaEnv)return _(f);return m(f);function d(){if(o===l)return rT(e,a,o,o.$async);let g=t.scopeValue("root",{ref:l});return rT(e,(0,wi._)`${g}.validate`,l,l.$async)}function _(g){let y=gte(e,g);rT(e,y,g,g.$async)}function m(g){let y=t.scopeValue("schema",u.code.source===!0?{ref:g,code:(0,wi.stringify)(g)}:{ref:g}),b=t.name("valid"),E=e.subschema({schema:g,dataTypes:[],schemaPath:wi.nil,topSchemaRef:y,errSchemaPath:r},b);e.mergeEvaluated(E),e.ok(b)}}};function gte(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,wi._)`${r.scopeValue("wrapper",{ref:t})}.validate`}s(gte,"getValidate");Nd.getValidate=gte;function rT(e,t,r,n){let{gen:i,it:o}=e,{allErrors:a,schemaEnv:u,opts:c}=o,l=c.passContext?wm.default.this:wi.nil;n?f():d();function f(){if(!u.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,wi._)`await ${(0,mte.callValidateCode)(e,t,l)}`),m(t),a||i.assign(g,!0)},y=>{i.if((0,wi._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),_(y),a||i.assign(g,!1)}),e.ok(g)}s(f,"callAsyncRef");function d(){e.result((0,mte.callValidateCode)(e,t,l),()=>m(t),()=>_(t))}s(d,"callSyncRef");function _(g){let y=(0,wi._)`${g}.errors`;i.assign(wm.default.vErrors,(0,wi._)`${wm.default.vErrors} === null ? ${y} : ${wm.default.vErrors}.concat(${y})`),i.assign(wm.default.errors,(0,wi._)`${wm.default.vErrors}.length`)}s(_,"addErrorsFrom");function m(g){var y;if(!o.opts.unevaluated)return;let b=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(b&&!b.dynamicProps)b.props!==void 0&&(o.props=tT.mergeEvaluated.props(i,b.props,o.props));else{let E=i.var("props",(0,wi._)`${g}.evaluated.props`);o.props=tT.mergeEvaluated.props(i,E,o.props,wi.Name)}if(o.items!==!0)if(b&&!b.dynamicItems)b.items!==void 0&&(o.items=tT.mergeEvaluated.items(i,b.items,o.items));else{let E=i.var("items",(0,wi._)`${g}.evaluated.items`);o.items=tT.mergeEvaluated.items(i,E,o.items,wi.Name)}}s(m,"addEvaluatedFrom")}s(rT,"callRef");Nd.callRef=rT;Nd.default=bXe});var yte=h(Jx=>{"use strict";Object.defineProperty(Jx,"__esModule",{value:!0});var SXe=hte(),vXe=nT(),OXe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",SXe.default,vXe.default];Jx.default=OXe});var Ete=h(Xx=>{"use strict";Object.defineProperty(Xx,"__esModule",{value:!0});var iT=Pe(),qc=iT.operators,sT={maximum:{okStr:"<=",ok:qc.LTE,fail:qc.GT},minimum:{okStr:">=",ok:qc.GTE,fail:qc.LT},exclusiveMaximum:{okStr:"<",ok:qc.LT,fail:qc.GTE},exclusiveMinimum:{okStr:">",ok:qc.GT,fail:qc.LTE}},PXe={message:({keyword:e,schemaCode:t})=>(0,iT.str)`must be ${sT[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,iT._)`{comparison: ${sT[e].okStr}, limit: ${t}}`},wXe={keyword:Object.keys(sT),type:"number",schemaType:"number",$data:!0,error:PXe,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,iT._)`${r} ${sT[t].fail} ${n} || isNaN(${r})`)}};Xx.default=wXe});var bte=h(Zx=>{"use strict";Object.defineProperty(Zx,"__esModule",{value:!0});var iE=Pe(),IXe={message:({schemaCode:e})=>(0,iE.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,iE._)`{multipleOf: ${e}}`},TXe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:IXe,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,o=i.opts.multipleOfPrecision,a=t.let("res"),u=o?(0,iE._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,iE._)`${a} !== parseInt(${a})`;e.fail$data((0,iE._)`(${n} === 0 || (${a} = ${r}/${n}, ${u}))`)}};Zx.default=TXe});var vte=h(Qx=>{"use strict";Object.defineProperty(Qx,"__esModule",{value:!0});function Ste(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}s(Ste,"ucs2length");Qx.default=Ste;Ste.code='require("ajv/dist/runtime/ucs2length").default'});var Ote=h(eq=>{"use strict";Object.defineProperty(eq,"__esModule",{value:!0});var Ad=Pe(),NXe=ze(),AXe=vte(),RXe={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Ad.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Ad._)`{limit: ${e}}`},CXe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:RXe,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,o=t==="maxLength"?Ad.operators.GT:Ad.operators.LT,a=i.opts.unicode===!1?(0,Ad._)`${r}.length`:(0,Ad._)`${(0,NXe.useFunc)(e.gen,AXe.default)}(${r})`;e.fail$data((0,Ad._)`${a} ${o} ${n}`)}};eq.default=CXe});var Pte=h(tq=>{"use strict";Object.defineProperty(tq,"__esModule",{value:!0});var $Xe=Ts(),oT=Pe(),DXe={message:({schemaCode:e})=>(0,oT.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,oT._)`{pattern: ${e}}`},LXe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:DXe,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:o}=e,a=o.opts.unicodeRegExp?"u":"",u=r?(0,oT._)`(new RegExp(${i}, ${a}))`:(0,$Xe.usePattern)(e,n);e.fail$data((0,oT._)`!${u}.test(${t})`)}};tq.default=LXe});var wte=h(rq=>{"use strict";Object.defineProperty(rq,"__esModule",{value:!0});var sE=Pe(),jXe={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,sE.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,sE._)`{limit: ${e}}`},MXe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:jXe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?sE.operators.GT:sE.operators.LT;e.fail$data((0,sE._)`Object.keys(${r}).length ${i} ${n}`)}};rq.default=MXe});var Ite=h(nq=>{"use strict";Object.defineProperty(nq,"__esModule",{value:!0});var oE=Ts(),aE=Pe(),UXe=ze(),xXe={message:({params:{missingProperty:e}})=>(0,aE.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,aE._)`{missingProperty: ${e}}`},qXe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:xXe,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:o,it:a}=e,{opts:u}=a;if(!o&&r.length===0)return;let c=r.length>=u.loopRequired;if(a.allErrors?l():f(),u.strictRequired){let m=e.parentSchema.properties,{definedProperties:g}=e.it;for(let y of r)if(m?.[y]===void 0&&!g.has(y)){let b=a.schemaEnv.baseId+a.errSchemaPath,E=`required property "${y}" is not defined at "${b}" (strictRequired)`;(0,UXe.checkStrictMode)(a,E,a.opts.strictRequired)}}function l(){if(c||o)e.block$data(aE.nil,d);else for(let m of r)(0,oE.checkReportMissingProp)(e,m)}s(l,"allErrorsMode");function f(){let m=t.let("missing");if(c||o){let g=t.let("valid",!0);e.block$data(g,()=>_(m,g)),e.ok(g)}else t.if((0,oE.checkMissingProp)(e,r,m)),(0,oE.reportMissingProp)(e,m),t.else()}s(f,"exitOnErrorMode");function d(){t.forOf("prop",n,m=>{e.setParams({missingProperty:m}),t.if((0,oE.noPropertyInData)(t,i,m,u.ownProperties),()=>e.error())})}s(d,"loopAllRequired");function _(m,g){e.setParams({missingProperty:m}),t.forOf(m,n,()=>{t.assign(g,(0,oE.propertyInData)(t,i,m,u.ownProperties)),t.if((0,aE.not)(g),()=>{e.error(),t.break()})},aE.nil)}s(_,"loopUntilMissing")}};nq.default=qXe});var Tte=h(iq=>{"use strict";Object.defineProperty(iq,"__esModule",{value:!0});var uE=Pe(),FXe={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,uE.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,uE._)`{limit: ${e}}`},kXe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:FXe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?uE.operators.GT:uE.operators.LT;e.fail$data((0,uE._)`${r}.length ${i} ${n}`)}};iq.default=kXe});var aT=h(sq=>{"use strict";Object.defineProperty(sq,"__esModule",{value:!0});var Nte=Xf();Nte.code='require("ajv/dist/runtime/equal").default';sq.default=Nte});var Ate=h(aq=>{"use strict";Object.defineProperty(aq,"__esModule",{value:!0});var oq=Y0(),an=Pe(),BXe=ze(),GXe=aT(),VXe={message:({params:{i:e,j:t}})=>(0,an.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,an._)`{i: ${e}, j: ${t}}`},zXe={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:VXe,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:u}=e;if(!n&&!i)return;let c=t.let("valid"),l=o.items?(0,oq.getSchemaTypes)(o.items):[];e.block$data(c,f,(0,an._)`${a} === false`),e.ok(c);function f(){let g=t.let("i",(0,an._)`${r}.length`),y=t.let("j");e.setParams({i:g,j:y}),t.assign(c,!0),t.if((0,an._)`${g} > 1`,()=>(d()?_:m)(g,y))}s(f,"validateUniqueItems");function d(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}s(d,"canOptimize");function _(g,y){let b=t.name("item"),E=(0,oq.checkDataTypes)(l,b,u.opts.strictNumbers,oq.DataType.Wrong),S=t.const("indices",(0,an._)`{}`);t.for((0,an._)`;${g}--;`,()=>{t.let(b,(0,an._)`${r}[${g}]`),t.if(E,(0,an._)`continue`),l.length>1&&t.if((0,an._)`typeof ${b} == "string"`,(0,an._)`${b} += "_"`),t.if((0,an._)`typeof ${S}[${b}] == "number"`,()=>{t.assign(y,(0,an._)`${S}[${b}]`),e.error(),t.assign(c,!1).break()}).code((0,an._)`${S}[${b}] = ${g}`)})}s(_,"loopN");function m(g,y){let b=(0,BXe.useFunc)(t,GXe.default),E=t.name("outer");t.label(E).for((0,an._)`;${g}--;`,()=>t.for((0,an._)`${y} = ${g}; ${y}--;`,()=>t.if((0,an._)`${b}(${r}[${g}], ${r}[${y}])`,()=>{e.error(),t.assign(c,!1).break(E)})))}s(m,"loopN2")}};aq.default=zXe});var Rte=h(cq=>{"use strict";Object.defineProperty(cq,"__esModule",{value:!0});var uq=Pe(),HXe=ze(),KXe=aT(),WXe={message:"must be equal to constant",params:({schemaCode:e})=>(0,uq._)`{allowedValue: ${e}}`},YXe={keyword:"const",$data:!0,error:WXe,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:o}=e;n||o&&typeof o=="object"?e.fail$data((0,uq._)`!${(0,HXe.useFunc)(t,KXe.default)}(${r}, ${i})`):e.fail((0,uq._)`${o} !== ${r}`)}};cq.default=YXe});var Cte=h(lq=>{"use strict";Object.defineProperty(lq,"__esModule",{value:!0});var cE=Pe(),JXe=ze(),XXe=aT(),ZXe={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,cE._)`{allowedValues: ${e}}`},QXe={keyword:"enum",schemaType:"array",$data:!0,error:ZXe,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:a}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let u=i.length>=a.opts.loopEnum,c,l=s(()=>c??(c=(0,JXe.useFunc)(t,XXe.default)),"getEql"),f;if(u||n)f=t.let("valid"),e.block$data(f,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=t.const("vSchema",o);f=(0,cE.or)(...i.map((g,y)=>_(m,y)))}e.pass(f);function d(){t.assign(f,!1),t.forOf("v",o,m=>t.if((0,cE._)`${l()}(${r}, ${m})`,()=>t.assign(f,!0).break()))}s(d,"loopEnum");function _(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,cE._)`${l()}(${r}, ${m}[${g}])`:(0,cE._)`${r} === ${y}`}s(_,"equalCode")}};lq.default=QXe});var $te=h(fq=>{"use strict";Object.defineProperty(fq,"__esModule",{value:!0});var eZe=Ete(),tZe=bte(),rZe=Ote(),nZe=Pte(),iZe=wte(),sZe=Ite(),oZe=Tte(),aZe=Ate(),uZe=Rte(),cZe=Cte(),lZe=[eZe.default,tZe.default,rZe.default,nZe.default,iZe.default,sZe.default,oZe.default,aZe.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},uZe.default,cZe.default];fq.default=lZe});var pq=h(lE=>{"use strict";Object.defineProperty(lE,"__esModule",{value:!0});lE.validateAdditionalItems=void 0;var Rd=Pe(),dq=ze(),fZe={message:({params:{len:e}})=>(0,Rd.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Rd._)`{limit: ${e}}`},dZe={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:fZe,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,dq.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Dte(e,n)}};function Dte(e,t){let{gen:r,schema:n,data:i,keyword:o,it:a}=e;a.items=!0;let u=r.const("len",(0,Rd._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Rd._)`${u} <= ${t.length}`);else if(typeof n=="object"&&!(0,dq.alwaysValidSchema)(a,n)){let l=r.var("valid",(0,Rd._)`${u} <= ${t.length}`);r.if((0,Rd.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,u,f=>{e.subschema({keyword:o,dataProp:f,dataPropType:dq.Type.Num},l),a.allErrors||r.if((0,Rd.not)(l),()=>r.break())})}s(c,"validateItems")}s(Dte,"validateAdditionalItems");lE.validateAdditionalItems=Dte;lE.default=dZe});var hq=h(fE=>{"use strict";Object.defineProperty(fE,"__esModule",{value:!0});fE.validateTuple=void 0;var Lte=Pe(),uT=ze(),pZe=Ts(),hZe={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return jte(e,"additionalItems",t);r.items=!0,!(0,uT.alwaysValidSchema)(r,t)&&e.ok((0,pZe.validateArray)(e))}};function jte(e,t,r=e.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:u}=e;f(i),u.opts.unevaluated&&r.length&&u.items!==!0&&(u.items=uT.mergeEvaluated.items(n,r.length,u.items));let c=n.name("valid"),l=n.const("len",(0,Lte._)`${o}.length`);r.forEach((d,_)=>{(0,uT.alwaysValidSchema)(u,d)||(n.if((0,Lte._)`${l} > ${_}`,()=>e.subschema({keyword:a,schemaProp:_,dataProp:_},c)),e.ok(c))});function f(d){let{opts:_,errSchemaPath:m}=u,g=r.length,y=g===d.minItems&&(g===d.maxItems||d[t]===!1);if(_.strictTuples&&!y){let b=`"${a}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,uT.checkStrictMode)(u,b,_.strictTuples)}}s(f,"checkStrictTuple")}s(jte,"validateTuple");fE.validateTuple=jte;fE.default=hZe});var Mte=h(mq=>{"use strict";Object.defineProperty(mq,"__esModule",{value:!0});var mZe=hq(),_Ze={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,mZe.validateTuple)(e,"items")};mq.default=_Ze});var xte=h(_q=>{"use strict";Object.defineProperty(_q,"__esModule",{value:!0});var Ute=Pe(),gZe=ze(),yZe=Ts(),EZe=pq(),bZe={message:({params:{len:e}})=>(0,Ute.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Ute._)`{limit: ${e}}`},SZe={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:bZe,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,gZe.alwaysValidSchema)(n,t)&&(i?(0,EZe.validateAdditionalItems)(e,i):e.ok((0,yZe.validateArray)(e)))}};_q.default=SZe});var qte=h(gq=>{"use strict";Object.defineProperty(gq,"__esModule",{value:!0});var As=Pe(),cT=ze(),vZe={message:({params:{min:e,max:t}})=>t===void 0?(0,As.str)`must contain at least ${e} valid item(s)`:(0,As.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,As._)`{minContains: ${e}}`:(0,As._)`{minContains: ${e}, maxContains: ${t}}`},OZe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:vZe,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e,a,u,{minContains:c,maxContains:l}=n;o.opts.next?(a=c===void 0?1:c,u=l):a=1;let f=t.const("len",(0,As._)`${i}.length`);if(e.setParams({min:a,max:u}),u===void 0&&a===0){(0,cT.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&a>u){(0,cT.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,cT.alwaysValidSchema)(o,r)){let y=(0,As._)`${f} >= ${a}`;u!==void 0&&(y=(0,As._)`${y} && ${f} <= ${u}`),e.pass(y);return}o.items=!0;let d=t.name("valid");u===void 0&&a===1?m(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),u!==void 0&&t.if((0,As._)`${i}.length > 0`,_)):(t.let(d,!1),_()),e.result(d,()=>e.reset());function _(){let y=t.name("_valid"),b=t.let("count",0);m(y,()=>t.if(y,()=>g(b)))}s(_,"validateItemsWithCount");function m(y,b){t.forRange("i",0,f,E=>{e.subschema({keyword:"contains",dataProp:E,dataPropType:cT.Type.Num,compositeRule:!0},y),b()})}s(m,"validateItems");function g(y){t.code((0,As._)`${y}++`),u===void 0?t.if((0,As._)`${y} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,As._)`${y} > ${u}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,As._)`${y} >= ${a}`,()=>t.assign(d,!0)))}s(g,"checkLimits")}};gq.default=OZe});var lT=h(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.validateSchemaDeps=ma.validatePropertyDeps=ma.error=void 0;var yq=Pe(),PZe=ze(),dE=Ts();ma.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,yq.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,yq._)`{property: ${e},
174
+ || ${a} === "boolean" || ${i} === null`).assign(u,(0,Ae._)`[${i}]`)}}s(c,"coerceSpecificType")}s(MYe,"coerceData");function UYe({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Ae._)`${t} !== undefined`,()=>e.assign((0,Ae._)`${t}[${r}]`,n))}s(UYe,"assignParentData");function Ax(e,t,r,n=W0.Correct){let i=n===W0.Correct?Ae.operators.EQ:Ae.operators.NEQ,o;switch(e){case"null":return(0,Ae._)`${t} ${i} null`;case"array":o=(0,Ae._)`Array.isArray(${t})`;break;case"object":o=(0,Ae._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a((0,Ae._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return(0,Ae._)`typeof ${t} ${i} ${e}`}return n===W0.Correct?o:(0,Ae.not)(o);function a(u=Ae.nil){return(0,Ae.and)((0,Ae._)`typeof ${t} == "number"`,u,r?(0,Ae._)`isFinite(${t})`:Ae.nil)}}s(Ax,"checkDataType");sn.checkDataType=Ax;function Rx(e,t,r,n){if(e.length===1)return Ax(e[0],t,r,n);let i,o=(0,Iee.toHash)(e);if(o.array&&o.object){let a=(0,Ae._)`typeof ${t} != "object"`;i=o.null?a:(0,Ae._)`!${t} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Ae.nil;o.number&&delete o.integer;for(let a in o)i=(0,Ae.and)(i,Ax(a,t,r,n));return i}s(Rx,"checkDataTypes");sn.checkDataTypes=Rx;var xYe={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Ae._)`{type: ${e}}`:(0,Ae._)`{type: ${t}}`};function Cx(e){let t=qYe(e);(0,$Ye.reportError)(t,xYe)}s(Cx,"reportTypeError");sn.reportTypeError=Cx;function qYe(e){let{gen:t,data:r,schema:n}=e,i=(0,Iee.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}s(qYe,"getTypeErrorContext")});var Ree=h(WI=>{"use strict";Object.defineProperty(WI,"__esModule",{value:!0});WI.assignDefaults=void 0;var Sm=Pe(),FYe=ze();function kYe(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let i in r)Aee(e,i,r[i].default);else t==="array"&&Array.isArray(n)&&n.forEach((i,o)=>Aee(e,o,i.default))}s(kYe,"assignDefaults");WI.assignDefaults=kYe;function Aee(e,t,r){let{gen:n,compositeRule:i,data:o,opts:a}=e;if(r===void 0)return;let u=(0,Sm._)`${o}${(0,Sm.getProperty)(t)}`;if(i){(0,FYe.checkStrictMode)(e,`default is ignored for: ${u}`);return}let c=(0,Sm._)`${u} === undefined`;a.useDefaults==="empty"&&(c=(0,Sm._)`${c} || ${u} === null || ${u} === ""`),n.if(c,(0,Sm._)`${u} = ${(0,Sm.stringify)(r)}`)}s(Aee,"assignDefault")});var Ts=h($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.validateUnion=$t.validateArray=$t.usePattern=$t.callValidateCode=$t.schemaProperties=$t.allSchemaProperties=$t.noPropertyInData=$t.propertyInData=$t.isOwnProperty=$t.hasPropFunc=$t.reportMissingProp=$t.checkMissingProp=$t.checkReportMissingProp=void 0;var zt=Pe(),$x=ze(),Mc=Is(),BYe=ze();function GYe(e,t){let{gen:r,data:n,it:i}=e;r.if(Lx(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,zt._)`${t}`},!0),e.error()})}s(GYe,"checkReportMissingProp");$t.checkReportMissingProp=GYe;function VYe({gen:e,data:t,it:{opts:r}},n,i){return(0,zt.or)(...n.map(o=>(0,zt.and)(Lx(e,t,o,r.ownProperties),(0,zt._)`${i} = ${o}`)))}s(VYe,"checkMissingProp");$t.checkMissingProp=VYe;function zYe(e,t){e.setParams({missingProperty:t},!0),e.error()}s(zYe,"reportMissingProp");$t.reportMissingProp=zYe;function Cee(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,zt._)`Object.prototype.hasOwnProperty`})}s(Cee,"hasPropFunc");$t.hasPropFunc=Cee;function Dx(e,t,r){return(0,zt._)`${Cee(e)}.call(${t}, ${r})`}s(Dx,"isOwnProperty");$t.isOwnProperty=Dx;function HYe(e,t,r,n){let i=(0,zt._)`${t}${(0,zt.getProperty)(r)} !== undefined`;return n?(0,zt._)`${i} && ${Dx(e,t,r)}`:i}s(HYe,"propertyInData");$t.propertyInData=HYe;function Lx(e,t,r,n){let i=(0,zt._)`${t}${(0,zt.getProperty)(r)} === undefined`;return n?(0,zt.or)(i,(0,zt.not)(Dx(e,t,r))):i}s(Lx,"noPropertyInData");$t.noPropertyInData=Lx;function $ee(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}s($ee,"allSchemaProperties");$t.allSchemaProperties=$ee;function KYe(e,t){return $ee(t).filter(r=>!(0,$x.alwaysValidSchema)(e,t[r]))}s(KYe,"schemaProperties");$t.schemaProperties=KYe;function WYe({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},u,c,l){let f=l?(0,zt._)`${e}, ${t}, ${n}${i}`:t,d=[[Mc.default.instancePath,(0,zt.strConcat)(Mc.default.instancePath,o)],[Mc.default.parentData,a.parentData],[Mc.default.parentDataProperty,a.parentDataProperty],[Mc.default.rootData,Mc.default.rootData]];a.opts.dynamicRef&&d.push([Mc.default.dynamicAnchors,Mc.default.dynamicAnchors]);let _=(0,zt._)`${f}, ${r.object(...d)}`;return c!==zt.nil?(0,zt._)`${u}.call(${c}, ${_})`:(0,zt._)`${u}(${_})`}s(WYe,"callValidateCode");$t.callValidateCode=WYe;var YYe=(0,zt._)`new RegExp`;function JYe({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:i}=t.code,o=i(r,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,zt._)`${i.code==="new RegExp"?YYe:(0,BYe.useFunc)(e,i)}(${r}, ${n})`})}s(JYe,"usePattern");$t.usePattern=JYe;function XYe(e){let{gen:t,data:r,keyword:n,it:i}=e,o=t.name("valid");if(i.allErrors){let u=t.let("valid",!0);return a(()=>t.assign(u,!1)),u}return t.var(o,!0),a(()=>t.break()),o;function a(u){let c=t.const("len",(0,zt._)`${r}.length`);t.forRange("i",0,c,l=>{e.subschema({keyword:n,dataProp:l,dataPropType:$x.Type.Num},o),t.if((0,zt.not)(o),u)})}s(a,"validateItems")}s(XYe,"validateArray");$t.validateArray=XYe;function ZYe(e){let{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,$x.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let a=t.let("valid",!1),u=t.name("_valid");t.block(()=>r.forEach((c,l)=>{let f=e.subschema({keyword:n,schemaProp:l,compositeRule:!0},u);t.assign(a,(0,zt._)`${a} || ${u}`),e.mergeValidEvaluated(f,u)||t.if((0,zt.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}s(ZYe,"validateUnion");$t.validateUnion=ZYe});var jee=h(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.validateKeywordUsage=pa.validSchemaType=pa.funcKeywordCode=pa.macroKeywordCode=void 0;var Kn=Pe(),Id=Is(),QYe=Ts(),eJe=K0();function tJe(e,t){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=e,u=t.macro.call(a.self,i,o,a),c=Lee(r,n,u);a.opts.validateSchema!==!1&&a.self.validateSchema(u,!0);let l=r.name("valid");e.subschema({schema:u,schemaPath:Kn.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}s(tJe,"macroKeywordCode");pa.macroKeywordCode=tJe;function rJe(e,t){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:u,it:c}=e;iJe(c,t);let l=!u&&t.compile?t.compile.call(c.self,o,a,c):t.validate,f=Lee(n,i,l),d=n.let("valid");e.block$data(d,_),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function _(){if(t.errors===!1)y(),t.modifying&&Dee(e),b(()=>e.error());else{let E=t.async?m():g();t.modifying&&Dee(e),b(()=>nJe(e,E))}}s(_,"validateKeyword");function m(){let E=n.let("ruleErrs",null);return n.try(()=>y((0,Kn._)`await `),v=>n.assign(d,!1).if((0,Kn._)`${v} instanceof ${c.ValidationError}`,()=>n.assign(E,(0,Kn._)`${v}.errors`),()=>n.throw(v))),E}s(m,"validateAsync");function g(){let E=(0,Kn._)`${f}.errors`;return n.assign(E,null),y(Kn.nil),E}s(g,"validateSync");function y(E=t.async?(0,Kn._)`await `:Kn.nil){let v=c.opts.passContext?Id.default.this:Id.default.self,O=!("compile"in t&&!u||t.schema===!1);n.assign(d,(0,Kn._)`${E}${(0,QYe.callValidateCode)(e,f,v,O)}`,t.modifying)}s(y,"assignValid");function b(E){var v;n.if((0,Kn.not)((v=t.valid)!==null&&v!==void 0?v:d),E)}s(b,"reportErrs")}s(rJe,"funcKeywordCode");pa.funcKeywordCode=rJe;function Dee(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Kn._)`${n.parentData}[${n.parentDataProperty}]`))}s(Dee,"modifyData");function nJe(e,t){let{gen:r}=e;r.if((0,Kn._)`Array.isArray(${t})`,()=>{r.assign(Id.default.vErrors,(0,Kn._)`${Id.default.vErrors} === null ? ${t} : ${Id.default.vErrors}.concat(${t})`).assign(Id.default.errors,(0,Kn._)`${Id.default.vErrors}.length`),(0,eJe.extendErrors)(e)},()=>e.error())}s(nJe,"addErrs");function iJe({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}s(iJe,"checkAsyncKeyword");function Lee(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Kn.stringify)(r)})}s(Lee,"useKeyword");function sJe(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}s(sJe,"validSchemaType");pa.validSchemaType=sJe;function oJe({schema:e,opts:t,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let a=i.dependencies;if(a?.some(u=>!Object.prototype.hasOwnProperty.call(e,u)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}s(oJe,"validateKeywordUsage");pa.validateKeywordUsage=oJe});var Uee=h(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.extendSubschemaMode=Uc.extendSubschemaData=Uc.getSubschema=void 0;var ha=Pe(),Mee=ze();function aJe(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let u=e.schema[t];return r===void 0?{schema:u,schemaPath:(0,ha._)`${e.schemaPath}${(0,ha.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:u[r],schemaPath:(0,ha._)`${e.schemaPath}${(0,ha.getProperty)(t)}${(0,ha.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Mee.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}s(aJe,"getSubschema");Uc.getSubschema=aJe;function uJe(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:u}=t;if(r!==void 0){let{errorPath:l,dataPathArr:f,opts:d}=t,_=u.let("data",(0,ha._)`${t.data}${(0,ha.getProperty)(r)}`,!0);c(_),e.errorPath=(0,ha.str)`${l}${(0,Mee.getErrorPath)(r,n,d.jsPropertySyntax)}`,e.parentDataProperty=(0,ha._)`${r}`,e.dataPathArr=[...f,e.parentDataProperty]}if(i!==void 0){let l=i instanceof ha.Name?i:u.let("data",i,!0);c(l),a!==void 0&&(e.propertyName=a)}o&&(e.dataTypes=o);function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}s(c,"dataContextProps")}s(uJe,"extendSubschemaData");Uc.extendSubschemaData=uJe;function cJe(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(e.compositeRule=n),i!==void 0&&(e.createErrors=i),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}s(cJe,"extendSubschemaMode");Uc.extendSubschemaMode=cJe});var J0=h(Pi=>{"use strict";Object.defineProperty(Pi,"__esModule",{value:!0});Pi.getSchemaRefs=Pi.resolveUrl=Pi.normalizeId=Pi._getFullPath=Pi.getFullPath=Pi.inlineRef=void 0;var lJe=ze(),fJe=Xf(),dJe=JP(),pJe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function hJe(e,t=!0){return typeof e=="boolean"?!0:t===!0?!jx(e):t?xee(e)<=t:!1}s(hJe,"inlineRef");Pi.inlineRef=hJe;var mJe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function jx(e){for(let t in e){if(mJe.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(jx)||typeof r=="object"&&jx(r))return!0}return!1}s(jx,"hasRef");function xee(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!pJe.has(r)&&(typeof e[r]=="object"&&(0,lJe.eachItem)(e[r],n=>t+=xee(n)),t===1/0))return 1/0}return t}s(xee,"countKeys");function qee(e,t="",r){r!==!1&&(t=vm(t));let n=e.parse(t);return Fee(e,n)}s(qee,"getFullPath");Pi.getFullPath=qee;function Fee(e,t){return e.serialize(t).split("#")[0]+"#"}s(Fee,"_getFullPath");Pi._getFullPath=Fee;var _Je=/#\/?$/;function vm(e){return e?e.replace(_Je,""):""}s(vm,"normalizeId");Pi.normalizeId=vm;function gJe(e,t,r){return r=vm(r),e.resolve(t,r)}s(gJe,"resolveUrl");Pi.resolveUrl=gJe;var yJe=/^[a-z_][-a-z0-9._]*$/i;function EJe(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=vm(e[r]||t),o={"":i},a=qee(n,i,!1),u={},c=new Set;return dJe(e,{allKeys:!0},(d,_,m,g)=>{if(g===void 0)return;let y=a+_,b=o[g];typeof d[r]=="string"&&(b=E.call(this,d[r])),v.call(this,d.$anchor),v.call(this,d.$dynamicAnchor),o[_]=b;function E(O){let P=this.opts.uriResolver.resolve;if(O=vm(b?P(b,O):O),c.has(O))throw f(O);c.add(O);let I=this.refs[O];return typeof I=="string"&&(I=this.refs[I]),typeof I=="object"?l(d,I.schema,O):O!==vm(y)&&(O[0]==="#"?(l(d,u[O],O),u[O]=d):this.refs[O]=y),O}s(E,"addRef");function v(O){if(typeof O=="string"){if(!yJe.test(O))throw new Error(`invalid anchor "${O}"`);E.call(this,`#${O}`)}}s(v,"addAnchor")}),u;function l(d,_,m){if(_!==void 0&&!fJe(d,_))throw f(m)}s(l,"checkAmbiguosRef");function f(d){return new Error(`reference "${d}" resolves to more than one schema`)}s(f,"ambiguos")}s(EJe,"getSchemaRefs");Pi.getSchemaRefs=EJe});var Q0=h(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.getData=xc.KeywordCxt=xc.validateFunctionCode=void 0;var zee=Oee(),kee=Y0(),Ux=Nx(),YI=Y0(),bJe=Ree(),Z0=jee(),Mx=Uee(),ce=Pe(),Se=Is(),SJe=J0(),bu=ze(),X0=K0();function vJe(e){if(Wee(e)&&(Yee(e),Kee(e))){wJe(e);return}Hee(e,()=>(0,zee.topBoolOrEmptySchema)(e))}s(vJe,"validateFunctionCode");xc.validateFunctionCode=vJe;function Hee({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,(0,ce._)`${Se.default.data}, ${Se.default.valCxt}`,n.$async,()=>{e.code((0,ce._)`"use strict"; ${Bee(r,i)}`),PJe(e,i),e.code(o)}):e.func(t,(0,ce._)`${Se.default.data}, ${OJe(i)}`,n.$async,()=>e.code(Bee(r,i)).code(o))}s(Hee,"validateFunction");function OJe(e){return(0,ce._)`{${Se.default.instancePath}="", ${Se.default.parentData}, ${Se.default.parentDataProperty}, ${Se.default.rootData}=${Se.default.data}${e.dynamicRef?(0,ce._)`, ${Se.default.dynamicAnchors}={}`:ce.nil}}={}`}s(OJe,"destructureValCxt");function PJe(e,t){e.if(Se.default.valCxt,()=>{e.var(Se.default.instancePath,(0,ce._)`${Se.default.valCxt}.${Se.default.instancePath}`),e.var(Se.default.parentData,(0,ce._)`${Se.default.valCxt}.${Se.default.parentData}`),e.var(Se.default.parentDataProperty,(0,ce._)`${Se.default.valCxt}.${Se.default.parentDataProperty}`),e.var(Se.default.rootData,(0,ce._)`${Se.default.valCxt}.${Se.default.rootData}`),t.dynamicRef&&e.var(Se.default.dynamicAnchors,(0,ce._)`${Se.default.valCxt}.${Se.default.dynamicAnchors}`)},()=>{e.var(Se.default.instancePath,(0,ce._)`""`),e.var(Se.default.parentData,(0,ce._)`undefined`),e.var(Se.default.parentDataProperty,(0,ce._)`undefined`),e.var(Se.default.rootData,Se.default.data),t.dynamicRef&&e.var(Se.default.dynamicAnchors,(0,ce._)`{}`)})}s(PJe,"destructureValCxtES5");function wJe(e){let{schema:t,opts:r,gen:n}=e;Hee(e,()=>{r.$comment&&t.$comment&&Xee(e),RJe(e),n.let(Se.default.vErrors,null),n.let(Se.default.errors,0),r.unevaluated&&IJe(e),Jee(e),DJe(e)})}s(wJe,"topSchemaObjCode");function IJe(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,ce._)`${r}.evaluated`),t.if((0,ce._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,ce._)`${e.evaluated}.props`,(0,ce._)`undefined`)),t.if((0,ce._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,ce._)`${e.evaluated}.items`,(0,ce._)`undefined`))}s(IJe,"resetEvaluated");function Bee(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,ce._)`/*# sourceURL=${r} */`:ce.nil}s(Bee,"funcSourceUrl");function TJe(e,t){if(Wee(e)&&(Yee(e),Kee(e))){NJe(e,t);return}(0,zee.boolOrEmptySchema)(e,t)}s(TJe,"subschemaCode");function Kee({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}s(Kee,"schemaCxtHasRules");function Wee(e){return typeof e.schema!="boolean"}s(Wee,"isSchemaObj");function NJe(e,t){let{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&Xee(e),CJe(e),$Je(e);let o=n.const("_errs",Se.default.errors);Jee(e,o),n.var(t,(0,ce._)`${o} === ${Se.default.errors}`)}s(NJe,"subSchemaObjCode");function Yee(e){(0,bu.checkUnknownRules)(e),AJe(e)}s(Yee,"checkKeywords");function Jee(e,t){if(e.opts.jtd)return Gee(e,[],!1,t);let r=(0,kee.getSchemaTypes)(e.schema),n=(0,kee.coerceAndCheckDataType)(e,r);Gee(e,r,!n,t)}s(Jee,"typeAndKeywords");function AJe(e){let{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,bu.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}s(AJe,"checkRefsAndKeywords");function RJe(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,bu.checkStrictMode)(e,"default is ignored in the schema root")}s(RJe,"checkNoDefault");function CJe(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,SJe.resolveUrl)(e.opts.uriResolver,e.baseId,t))}s(CJe,"updateContext");function $Je(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}s($Je,"checkAsyncSchema");function Xee({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)e.code((0,ce._)`${Se.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,ce.str)`${n}/$comment`,u=e.scopeValue("root",{ref:t.root});e.code((0,ce._)`${Se.default.self}.opts.$comment(${o}, ${a}, ${u}.schema)`)}}s(Xee,"commentKeyword");function DJe(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if((0,ce._)`${Se.default.errors} === 0`,()=>t.return(Se.default.data),()=>t.throw((0,ce._)`new ${i}(${Se.default.vErrors})`)):(t.assign((0,ce._)`${n}.errors`,Se.default.vErrors),o.unevaluated&&LJe(e),t.return((0,ce._)`${Se.default.errors} === 0`))}s(DJe,"returnResults");function LJe({gen:e,evaluated:t,props:r,items:n}){r instanceof ce.Name&&e.assign((0,ce._)`${t}.props`,r),n instanceof ce.Name&&e.assign((0,ce._)`${t}.items`,n)}s(LJe,"assignEvaluated");function Gee(e,t,r,n){let{gen:i,schema:o,data:a,allErrors:u,opts:c,self:l}=e,{RULES:f}=l;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,bu.schemaHasRulesButRef)(o,f))){i.block(()=>Qee(e,"$ref",f.all.$ref.definition));return}c.jtd||jJe(e,t),i.block(()=>{for(let _ of f.rules)d(_);d(f.post)});function d(_){(0,Ux.shouldUseGroup)(o,_)&&(_.type?(i.if((0,YI.checkDataType)(_.type,a,c.strictNumbers)),Vee(e,_),t.length===1&&t[0]===_.type&&r&&(i.else(),(0,YI.reportTypeError)(e)),i.endIf()):Vee(e,_),u||i.if((0,ce._)`${Se.default.errors} === ${n||0}`))}s(d,"groupKeywords")}s(Gee,"schemaKeywords");function Vee(e,t){let{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,bJe.assignDefaults)(e,t.type),r.block(()=>{for(let o of t.rules)(0,Ux.shouldUseRule)(n,o)&&Qee(e,o.keyword,o.definition,t.type)})}s(Vee,"iterateKeywords");function jJe(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(MJe(e,t),e.opts.allowUnionTypes||UJe(e,t),xJe(e,e.dataTypes))}s(jJe,"checkStrictTypes");function MJe(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Zee(e.dataTypes,r)||xx(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),FJe(e,t)}}s(MJe,"checkContextTypes");function UJe(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&xx(e,"use allowUnionTypes to allow union type keyword")}s(UJe,"checkMultipleTypes");function xJe(e,t){let r=e.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Ux.shouldUseRule)(e.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>qJe(t,a))&&xx(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}s(xJe,"checkKeywordTypes");function qJe(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}s(qJe,"hasApplicableType");function Zee(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}s(Zee,"includesType");function FJe(e,t){let r=[];for(let n of e.dataTypes)Zee(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}s(FJe,"narrowSchemaTypes");function xx(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,bu.checkStrictMode)(e,t,e.opts.strictTypes)}s(xx,"strictTypesError");var JI=class{static{s(this,"KeywordCxt")}constructor(t,r,n){if((0,Z0.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,bu.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",ete(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Z0.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Se.default.errors))}result(t,r,n){this.failResult((0,ce.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,ce.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,ce._)`${r} !== undefined && (${(0,ce.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?X0.reportExtraError:X0.reportError)(this,this.def.error,r)}$dataError(){(0,X0.reportError)(this,this.def.$dataError||X0.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,X0.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=ce.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=ce.nil,r=ce.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,ce.or)((0,ce._)`${i} === undefined`,r)),t!==ce.nil&&n.assign(t,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==ce.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,ce.or)(a(),u());function a(){if(n.length){if(!(r instanceof ce.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,ce._)`${(0,YI.checkDataTypes)(c,r,o.opts.strictNumbers,YI.DataType.Wrong)}`}return ce.nil}function u(){if(i.validateSchema){let c=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,ce._)`!${c}(${r})`}return ce.nil}}subschema(t,r){let n=(0,Mx.getSubschema)(this.it,t);(0,Mx.extendSubschemaData)(n,this.it,t),(0,Mx.extendSubschemaMode)(n,t);let i={...this.it,...n,items:void 0,props:void 0};return TJe(i,r),i}mergeEvaluated(t,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=bu.mergeEvaluated.props(i,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=bu.mergeEvaluated.items(i,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(t,ce.Name)),!0}};xc.KeywordCxt=JI;function Qee(e,t,r,n){let i=new JI(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Z0.funcKeywordCode)(i,r):"macro"in r?(0,Z0.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Z0.funcKeywordCode)(i,r)}s(Qee,"keywordCode");var kJe=/^\/(?:[^~]|~0|~1)*$/,BJe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ete(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(e==="")return Se.default.rootData;if(e[0]==="/"){if(!kJe.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=Se.default.rootData}else{let l=BJe.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);let f=+l[1];if(i=l[2],i==="#"){if(f>=t)throw new Error(c("property/index",f));return n[t-f]}if(f>t)throw new Error(c("data",f));if(o=r[t-f],!i)return o}let a=o,u=i.split("/");for(let l of u)l&&(o=(0,ce._)`${o}${(0,ce.getProperty)((0,bu.unescapeJsonPointer)(l))}`,a=(0,ce._)`${a} && ${o}`);return a;function c(l,f){return`Cannot access ${l} ${f} levels up, current level is ${t}`}}s(ete,"getData");xc.getData=ete});var XI=h(Fx=>{"use strict";Object.defineProperty(Fx,"__esModule",{value:!0});var qx=class extends Error{static{s(this,"ValidationError")}constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Fx.default=qx});var ZI=h(Gx=>{"use strict";Object.defineProperty(Gx,"__esModule",{value:!0});var kx=J0(),Bx=class extends Error{static{s(this,"MissingRefError")}constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,kx.resolveUrl)(t,r,n),this.missingSchema=(0,kx.normalizeId)((0,kx.getFullPath)(t,this.missingRef))}};Gx.default=Bx});var eE=h(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});Ns.resolveSchema=Ns.getCompilingSchema=Ns.resolveRef=Ns.compileSchema=Ns.SchemaEnv=void 0;var yo=Pe(),GJe=XI(),Td=Is(),Eo=J0(),tte=ze(),VJe=Q0(),Om=class{static{s(this,"SchemaEnv")}constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Eo.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};Ns.SchemaEnv=Om;function zx(e){let t=rte.call(this,e);if(t)return t;let r=(0,Eo.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new yo.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),u;e.$async&&(u=a.scopeValue("Error",{ref:GJe.default,code:(0,yo._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let l={gen:a,allErrors:this.opts.allErrors,data:Td.default.data,parentData:Td.default.parentData,parentDataProperty:Td.default.parentDataProperty,dataNames:[Td.default.data],dataPathArr:[yo.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,yo.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:yo.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,yo._)`""`,opts:this.opts,self:this},f;try{this._compilations.add(e),(0,VJe.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);let d=a.toString();f=`${a.scopeRefs(Td.default.scope)}return ${d}`,this.opts.code.process&&(f=this.opts.code.process(f,e));let m=new Function(`${Td.default.self}`,`${Td.default.scope}`,f)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:g,items:y}=l;m.evaluated={props:g instanceof yo.Name?void 0:g,items:y instanceof yo.Name?void 0:y,dynamicProps:g instanceof yo.Name,dynamicItems:y instanceof yo.Name},m.source&&(m.source.evaluated=(0,yo.stringify)(m.evaluated))}return e.validate=m,e}catch(d){throw delete e.validate,delete e.validateName,f&&this.logger.error("Error compiling schema, function code:",f),d}finally{this._compilations.delete(e)}}s(zx,"compileSchema");Ns.compileSchema=zx;function zJe(e,t,r){var n;r=(0,Eo.resolveUrl)(this.opts.uriResolver,t,r);let i=e.refs[r];if(i)return i;let o=WJe.call(this,e,r);if(o===void 0){let a=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:u}=this.opts;a&&(o=new Om({schema:a,schemaId:u,root:e,baseId:t}))}if(o!==void 0)return e.refs[r]=HJe.call(this,o)}s(zJe,"resolveRef");Ns.resolveRef=zJe;function HJe(e){return(0,Eo.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:zx.call(this,e)}s(HJe,"inlineOrCompile");function rte(e){for(let t of this._compilations)if(KJe(t,e))return t}s(rte,"getCompilingSchema");Ns.getCompilingSchema=rte;function KJe(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}s(KJe,"sameSchemaEnv");function WJe(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||QI.call(this,e,t)}s(WJe,"resolve");function QI(e,t){let r=this.opts.uriResolver.parse(t),n=(0,Eo._getFullPath)(this.opts.uriResolver,r),i=(0,Eo.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return Vx.call(this,r,e);let o=(0,Eo.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let u=QI.call(this,e,a);return typeof u?.schema!="object"?void 0:Vx.call(this,r,u)}if(typeof a?.schema=="object"){if(a.validate||zx.call(this,a),o===(0,Eo.normalizeId)(t)){let{schema:u}=a,{schemaId:c}=this.opts,l=u[c];return l&&(i=(0,Eo.resolveUrl)(this.opts.uriResolver,i,l)),new Om({schema:u,schemaId:c,root:e,baseId:i})}return Vx.call(this,r,a)}}s(QI,"resolveSchema");Ns.resolveSchema=QI;var YJe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Vx(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let u of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,tte.unescapeFragment)(u)];if(c===void 0)return;r=c;let l=typeof r=="object"&&r[this.opts.schemaId];!YJe.has(u)&&l&&(t=(0,Eo.resolveUrl)(this.opts.uriResolver,t,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,tte.schemaHasRulesButRef)(r,this.RULES)){let u=(0,Eo.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=QI.call(this,n,u)}let{schemaId:a}=this.opts;if(o=o||new Om({schema:r,schemaId:a,root:n,baseId:t}),o.schema!==o.root.schema)return o}s(Vx,"getJsonPointer")});var nte=h((YLt,JJe)=>{JJe.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var ste=h(Hx=>{"use strict";Object.defineProperty(Hx,"__esModule",{value:!0});var ite=tw();ite.code='require("ajv/dist/runtime/uri").default';Hx.default=ite});var pte=h(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.CodeGen=on.Name=on.nil=on.stringify=on.str=on._=on.KeywordCxt=void 0;var XJe=Q0();Object.defineProperty(on,"KeywordCxt",{enumerable:!0,get:function(){return XJe.KeywordCxt}});var Pm=Pe();Object.defineProperty(on,"_",{enumerable:!0,get:function(){return Pm._}});Object.defineProperty(on,"str",{enumerable:!0,get:function(){return Pm.str}});Object.defineProperty(on,"stringify",{enumerable:!0,get:function(){return Pm.stringify}});Object.defineProperty(on,"nil",{enumerable:!0,get:function(){return Pm.nil}});Object.defineProperty(on,"Name",{enumerable:!0,get:function(){return Pm.Name}});Object.defineProperty(on,"CodeGen",{enumerable:!0,get:function(){return Pm.CodeGen}});var ZJe=XI(),lte=ZI(),QJe=Tx(),tE=eE(),eXe=Pe(),rE=J0(),eT=Y0(),Wx=ze(),ote=nte(),tXe=ste(),fte=s((e,t)=>new RegExp(e,t),"defaultRegExp");fte.code="new RegExp";var rXe=["removeAdditional","useDefaults","coerceTypes"],nXe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),iXe={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},sXe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},ate=200;function oXe(e){var t,r,n,i,o,a,u,c,l,f,d,_,m,g,y,b,E,v,O,P,I,j,x,H,K;let Q=e.strict,de=(t=e.code)===null||t===void 0?void 0:t.optimize,re=de===!0||de===void 0?1:de||0,he=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:fte,$e=(i=e.uriResolver)!==null&&i!==void 0?i:tXe.default;return{strictSchema:(a=(o=e.strictSchema)!==null&&o!==void 0?o:Q)!==null&&a!==void 0?a:!0,strictNumbers:(c=(u=e.strictNumbers)!==null&&u!==void 0?u:Q)!==null&&c!==void 0?c:!0,strictTypes:(f=(l=e.strictTypes)!==null&&l!==void 0?l:Q)!==null&&f!==void 0?f:"log",strictTuples:(_=(d=e.strictTuples)!==null&&d!==void 0?d:Q)!==null&&_!==void 0?_:"log",strictRequired:(g=(m=e.strictRequired)!==null&&m!==void 0?m:Q)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:re,regExp:he}:{optimize:re,regExp:he},loopRequired:(y=e.loopRequired)!==null&&y!==void 0?y:ate,loopEnum:(b=e.loopEnum)!==null&&b!==void 0?b:ate,meta:(E=e.meta)!==null&&E!==void 0?E:!0,messages:(v=e.messages)!==null&&v!==void 0?v:!0,inlineRefs:(O=e.inlineRefs)!==null&&O!==void 0?O:!0,schemaId:(P=e.schemaId)!==null&&P!==void 0?P:"$id",addUsedSchema:(I=e.addUsedSchema)!==null&&I!==void 0?I:!0,validateSchema:(j=e.validateSchema)!==null&&j!==void 0?j:!0,validateFormats:(x=e.validateFormats)!==null&&x!==void 0?x:!0,unicodeRegExp:(H=e.unicodeRegExp)!==null&&H!==void 0?H:!0,int32range:(K=e.int32range)!==null&&K!==void 0?K:!0,uriResolver:$e}}s(oXe,"requiredOptions");var nE=class{static{s(this,"Ajv")}constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...oXe(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new eXe.ValueScope({scope:{},prefixes:nXe,es5:r,lines:n}),this.logger=dXe(t.logger);let i=t.validateFormats;t.validateFormats=!1,this.RULES=(0,QJe.getRules)(),ute.call(this,iXe,t,"NOT SUPPORTED"),ute.call(this,sXe,t,"DEPRECATED","warn"),this._metaOpts=lXe.call(this),t.formats&&uXe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&cXe.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),aXe.call(this),t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,i=ote;n==="id"&&(i={...ote},i.id=i.$id,delete i.$id),r&&t&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,t,r);async function i(f,d){await o.call(this,f.$schema);let _=this._addSchema(f,d);return _.validate||a.call(this,_)}async function o(f){f&&!this.getSchema(f)&&await i.call(this,{$ref:f},!0)}async function a(f){try{return this._compileSchemaEnv(f)}catch(d){if(!(d instanceof lte.default))throw d;return u.call(this,d),await c.call(this,d.missingSchema),a.call(this,f)}}function u({missingSchema:f,missingRef:d}){if(this.refs[f])throw new Error(`AnySchema ${f} is loaded but ${d} cannot be resolved`)}async function c(f){let d=await l.call(this,f);this.refs[f]||await o.call(this,d.$schema),this.refs[f]||this.addSchema(d,f,r)}async function l(f){let d=this._loading[f];if(d)return d;try{return await(this._loading[f]=n(f))}finally{delete this._loading[f]}}}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,n,i);return this}let o;if(typeof t=="object"){let{schemaId:a}=this.opts;if(o=t[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,rE.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,i,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,t);if(!i&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(t){let r;for(;typeof(r=cte.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,i=new tE.SchemaEnv({schema:{},schemaId:n});if(r=tE.resolveSchema.call(this,i,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=cte.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,rE.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(hXe.call(this,n,r),!r)return(0,Wx.eachItem)(n,o=>Kx.call(this,o)),this;_Xe.call(this,r);let i={...r,type:(0,eT.getJSONTypes)(r.type),schemaType:(0,eT.getJSONTypes)(r.schemaType)};return(0,Wx.eachItem)(n,i.type.length===0?o=>Kx.call(this,o,i):o=>i.type.forEach(a=>Kx.call(this,o,i,a))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===t);i>=0&&n.rules.splice(i,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let i of r){let o=i.split("/").slice(1),a=t;for(let u of o)a=a[u];for(let u in n){let c=n[u];if(typeof c!="object")continue;let{$data:l}=c.definition,f=a[u];l&&f&&(a[u]=dte(f))}}return t}_removeAllSchemas(t,r){for(let n in t){let i=t[n];(!r||r.test(n))&&(typeof i=="string"?delete t[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete t[n]))}}_addSchema(t,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:u}=this.opts;if(typeof t=="object")a=t[u];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,rE.normalizeId)(a||n);let l=rE.getSchemaRefs.call(this,t,n);return c=new tE.SchemaEnv({schema:t,schemaId:u,meta:r,baseId:n,localRefs:l}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):tE.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{tE.compileSchema.call(this,t)}finally{this.opts=r}}};on.default=nE;nE.ValidationError=ZJe.default;nE.MissingRefError=lte.default;function ute(e,t,r,n="error"){for(let i in e){let o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}s(ute,"checkOptions");function cte(e){return e=(0,rE.normalizeId)(e),this.schemas[e]||this.refs[e]}s(cte,"getSchEnv");function aXe(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}s(aXe,"addInitialSchemas");function uXe(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}s(uXe,"addInitialFormats");function cXe(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}s(cXe,"addInitialKeywords");function lXe(){let e={...this.opts};for(let t of rXe)delete e[t];return e}s(lXe,"getMetaSchemaOptions");var fXe={log(){},warn(){},error(){}};function dXe(e){if(e===!1)return fXe;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}s(dXe,"getLogger");var pXe=/^[a-z_$][a-z0-9_$:-]*$/i;function hXe(e,t){let{RULES:r}=this;if((0,Wx.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!pXe.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}s(hXe,"checkKeyword");function Kx(e,t,r){var n;let i=t?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[e]=!0,!t)return;let u={keyword:e,definition:{...t,type:(0,eT.getJSONTypes)(t.type),schemaType:(0,eT.getJSONTypes)(t.schemaType)}};t.before?mXe.call(this,a,u,t.before):a.rules.push(u),o.all[e]=u,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}s(Kx,"addRule");function mXe(e,t,r){let n=e.rules.findIndex(i=>i.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}s(mXe,"addBeforeRule");function _Xe(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=dte(t)),e.validateSchema=this.compile(t,!0))}s(_Xe,"keywordMetaschema");var gXe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function dte(e){return{anyOf:[e,gXe]}}s(dte,"schemaOrData")});var hte=h(Yx=>{"use strict";Object.defineProperty(Yx,"__esModule",{value:!0});var yXe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Yx.default=yXe});var nT=h(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.callRef=Nd.getValidate=void 0;var EXe=ZI(),mte=Ts(),wi=Pe(),wm=Is(),_te=eE(),tT=ze(),bXe={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:o,validateName:a,opts:u,self:c}=n,{root:l}=o;if((r==="#"||r==="#/")&&i===l.baseId)return d();let f=_te.resolveRef.call(c,l,i,r);if(f===void 0)throw new EXe.default(n.opts.uriResolver,i,r);if(f instanceof _te.SchemaEnv)return _(f);return m(f);function d(){if(o===l)return rT(e,a,o,o.$async);let g=t.scopeValue("root",{ref:l});return rT(e,(0,wi._)`${g}.validate`,l,l.$async)}function _(g){let y=gte(e,g);rT(e,y,g,g.$async)}function m(g){let y=t.scopeValue("schema",u.code.source===!0?{ref:g,code:(0,wi.stringify)(g)}:{ref:g}),b=t.name("valid"),E=e.subschema({schema:g,dataTypes:[],schemaPath:wi.nil,topSchemaRef:y,errSchemaPath:r},b);e.mergeEvaluated(E),e.ok(b)}}};function gte(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,wi._)`${r.scopeValue("wrapper",{ref:t})}.validate`}s(gte,"getValidate");Nd.getValidate=gte;function rT(e,t,r,n){let{gen:i,it:o}=e,{allErrors:a,schemaEnv:u,opts:c}=o,l=c.passContext?wm.default.this:wi.nil;n?f():d();function f(){if(!u.$async)throw new Error("async schema referenced by sync schema");let g=i.let("valid");i.try(()=>{i.code((0,wi._)`await ${(0,mte.callValidateCode)(e,t,l)}`),m(t),a||i.assign(g,!0)},y=>{i.if((0,wi._)`!(${y} instanceof ${o.ValidationError})`,()=>i.throw(y)),_(y),a||i.assign(g,!1)}),e.ok(g)}s(f,"callAsyncRef");function d(){e.result((0,mte.callValidateCode)(e,t,l),()=>m(t),()=>_(t))}s(d,"callSyncRef");function _(g){let y=(0,wi._)`${g}.errors`;i.assign(wm.default.vErrors,(0,wi._)`${wm.default.vErrors} === null ? ${y} : ${wm.default.vErrors}.concat(${y})`),i.assign(wm.default.errors,(0,wi._)`${wm.default.vErrors}.length`)}s(_,"addErrorsFrom");function m(g){var y;if(!o.opts.unevaluated)return;let b=(y=r?.validate)===null||y===void 0?void 0:y.evaluated;if(o.props!==!0)if(b&&!b.dynamicProps)b.props!==void 0&&(o.props=tT.mergeEvaluated.props(i,b.props,o.props));else{let E=i.var("props",(0,wi._)`${g}.evaluated.props`);o.props=tT.mergeEvaluated.props(i,E,o.props,wi.Name)}if(o.items!==!0)if(b&&!b.dynamicItems)b.items!==void 0&&(o.items=tT.mergeEvaluated.items(i,b.items,o.items));else{let E=i.var("items",(0,wi._)`${g}.evaluated.items`);o.items=tT.mergeEvaluated.items(i,E,o.items,wi.Name)}}s(m,"addEvaluatedFrom")}s(rT,"callRef");Nd.callRef=rT;Nd.default=bXe});var yte=h(Jx=>{"use strict";Object.defineProperty(Jx,"__esModule",{value:!0});var SXe=hte(),vXe=nT(),OXe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",SXe.default,vXe.default];Jx.default=OXe});var Ete=h(Xx=>{"use strict";Object.defineProperty(Xx,"__esModule",{value:!0});var iT=Pe(),qc=iT.operators,sT={maximum:{okStr:"<=",ok:qc.LTE,fail:qc.GT},minimum:{okStr:">=",ok:qc.GTE,fail:qc.LT},exclusiveMaximum:{okStr:"<",ok:qc.LT,fail:qc.GTE},exclusiveMinimum:{okStr:">",ok:qc.GT,fail:qc.LTE}},PXe={message:({keyword:e,schemaCode:t})=>(0,iT.str)`must be ${sT[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,iT._)`{comparison: ${sT[e].okStr}, limit: ${t}}`},wXe={keyword:Object.keys(sT),type:"number",schemaType:"number",$data:!0,error:PXe,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,iT._)`${r} ${sT[t].fail} ${n} || isNaN(${r})`)}};Xx.default=wXe});var bte=h(Zx=>{"use strict";Object.defineProperty(Zx,"__esModule",{value:!0});var iE=Pe(),IXe={message:({schemaCode:e})=>(0,iE.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,iE._)`{multipleOf: ${e}}`},TXe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:IXe,code(e){let{gen:t,data:r,schemaCode:n,it:i}=e,o=i.opts.multipleOfPrecision,a=t.let("res"),u=o?(0,iE._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,iE._)`${a} !== parseInt(${a})`;e.fail$data((0,iE._)`(${n} === 0 || (${a} = ${r}/${n}, ${u}))`)}};Zx.default=TXe});var vte=h(Qx=>{"use strict";Object.defineProperty(Qx,"__esModule",{value:!0});function Ste(e){let t=e.length,r=0,n=0,i;for(;n<t;)r++,i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<t&&(i=e.charCodeAt(n),(i&64512)===56320&&n++);return r}s(Ste,"ucs2length");Qx.default=Ste;Ste.code='require("ajv/dist/runtime/ucs2length").default'});var Ote=h(eq=>{"use strict";Object.defineProperty(eq,"__esModule",{value:!0});var Ad=Pe(),NXe=ze(),AXe=vte(),RXe={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Ad.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Ad._)`{limit: ${e}}`},CXe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:RXe,code(e){let{keyword:t,data:r,schemaCode:n,it:i}=e,o=t==="maxLength"?Ad.operators.GT:Ad.operators.LT,a=i.opts.unicode===!1?(0,Ad._)`${r}.length`:(0,Ad._)`${(0,NXe.useFunc)(e.gen,AXe.default)}(${r})`;e.fail$data((0,Ad._)`${a} ${o} ${n}`)}};eq.default=CXe});var Pte=h(tq=>{"use strict";Object.defineProperty(tq,"__esModule",{value:!0});var $Xe=Ts(),oT=Pe(),DXe={message:({schemaCode:e})=>(0,oT.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,oT._)`{pattern: ${e}}`},LXe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:DXe,code(e){let{data:t,$data:r,schema:n,schemaCode:i,it:o}=e,a=o.opts.unicodeRegExp?"u":"",u=r?(0,oT._)`(new RegExp(${i}, ${a}))`:(0,$Xe.usePattern)(e,n);e.fail$data((0,oT._)`!${u}.test(${t})`)}};tq.default=LXe});var wte=h(rq=>{"use strict";Object.defineProperty(rq,"__esModule",{value:!0});var sE=Pe(),jXe={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,sE.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,sE._)`{limit: ${e}}`},MXe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:jXe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxProperties"?sE.operators.GT:sE.operators.LT;e.fail$data((0,sE._)`Object.keys(${r}).length ${i} ${n}`)}};rq.default=MXe});var Ite=h(nq=>{"use strict";Object.defineProperty(nq,"__esModule",{value:!0});var oE=Ts(),aE=Pe(),UXe=ze(),xXe={message:({params:{missingProperty:e}})=>(0,aE.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,aE._)`{missingProperty: ${e}}`},qXe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:xXe,code(e){let{gen:t,schema:r,schemaCode:n,data:i,$data:o,it:a}=e,{opts:u}=a;if(!o&&r.length===0)return;let c=r.length>=u.loopRequired;if(a.allErrors?l():f(),u.strictRequired){let m=e.parentSchema.properties,{definedProperties:g}=e.it;for(let y of r)if(m?.[y]===void 0&&!g.has(y)){let b=a.schemaEnv.baseId+a.errSchemaPath,E=`required property "${y}" is not defined at "${b}" (strictRequired)`;(0,UXe.checkStrictMode)(a,E,a.opts.strictRequired)}}function l(){if(c||o)e.block$data(aE.nil,d);else for(let m of r)(0,oE.checkReportMissingProp)(e,m)}s(l,"allErrorsMode");function f(){let m=t.let("missing");if(c||o){let g=t.let("valid",!0);e.block$data(g,()=>_(m,g)),e.ok(g)}else t.if((0,oE.checkMissingProp)(e,r,m)),(0,oE.reportMissingProp)(e,m),t.else()}s(f,"exitOnErrorMode");function d(){t.forOf("prop",n,m=>{e.setParams({missingProperty:m}),t.if((0,oE.noPropertyInData)(t,i,m,u.ownProperties),()=>e.error())})}s(d,"loopAllRequired");function _(m,g){e.setParams({missingProperty:m}),t.forOf(m,n,()=>{t.assign(g,(0,oE.propertyInData)(t,i,m,u.ownProperties)),t.if((0,aE.not)(g),()=>{e.error(),t.break()})},aE.nil)}s(_,"loopUntilMissing")}};nq.default=qXe});var Tte=h(iq=>{"use strict";Object.defineProperty(iq,"__esModule",{value:!0});var uE=Pe(),FXe={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,uE.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,uE._)`{limit: ${e}}`},kXe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:FXe,code(e){let{keyword:t,data:r,schemaCode:n}=e,i=t==="maxItems"?uE.operators.GT:uE.operators.LT;e.fail$data((0,uE._)`${r}.length ${i} ${n}`)}};iq.default=kXe});var aT=h(sq=>{"use strict";Object.defineProperty(sq,"__esModule",{value:!0});var Nte=Xf();Nte.code='require("ajv/dist/runtime/equal").default';sq.default=Nte});var Ate=h(aq=>{"use strict";Object.defineProperty(aq,"__esModule",{value:!0});var oq=Y0(),an=Pe(),BXe=ze(),GXe=aT(),VXe={message:({params:{i:e,j:t}})=>(0,an.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,an._)`{i: ${e}, j: ${t}}`},zXe={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:VXe,code(e){let{gen:t,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:u}=e;if(!n&&!i)return;let c=t.let("valid"),l=o.items?(0,oq.getSchemaTypes)(o.items):[];e.block$data(c,f,(0,an._)`${a} === false`),e.ok(c);function f(){let g=t.let("i",(0,an._)`${r}.length`),y=t.let("j");e.setParams({i:g,j:y}),t.assign(c,!0),t.if((0,an._)`${g} > 1`,()=>(d()?_:m)(g,y))}s(f,"validateUniqueItems");function d(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}s(d,"canOptimize");function _(g,y){let b=t.name("item"),E=(0,oq.checkDataTypes)(l,b,u.opts.strictNumbers,oq.DataType.Wrong),v=t.const("indices",(0,an._)`{}`);t.for((0,an._)`;${g}--;`,()=>{t.let(b,(0,an._)`${r}[${g}]`),t.if(E,(0,an._)`continue`),l.length>1&&t.if((0,an._)`typeof ${b} == "string"`,(0,an._)`${b} += "_"`),t.if((0,an._)`typeof ${v}[${b}] == "number"`,()=>{t.assign(y,(0,an._)`${v}[${b}]`),e.error(),t.assign(c,!1).break()}).code((0,an._)`${v}[${b}] = ${g}`)})}s(_,"loopN");function m(g,y){let b=(0,BXe.useFunc)(t,GXe.default),E=t.name("outer");t.label(E).for((0,an._)`;${g}--;`,()=>t.for((0,an._)`${y} = ${g}; ${y}--;`,()=>t.if((0,an._)`${b}(${r}[${g}], ${r}[${y}])`,()=>{e.error(),t.assign(c,!1).break(E)})))}s(m,"loopN2")}};aq.default=zXe});var Rte=h(cq=>{"use strict";Object.defineProperty(cq,"__esModule",{value:!0});var uq=Pe(),HXe=ze(),KXe=aT(),WXe={message:"must be equal to constant",params:({schemaCode:e})=>(0,uq._)`{allowedValue: ${e}}`},YXe={keyword:"const",$data:!0,error:WXe,code(e){let{gen:t,data:r,$data:n,schemaCode:i,schema:o}=e;n||o&&typeof o=="object"?e.fail$data((0,uq._)`!${(0,HXe.useFunc)(t,KXe.default)}(${r}, ${i})`):e.fail((0,uq._)`${o} !== ${r}`)}};cq.default=YXe});var Cte=h(lq=>{"use strict";Object.defineProperty(lq,"__esModule",{value:!0});var cE=Pe(),JXe=ze(),XXe=aT(),ZXe={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,cE._)`{allowedValues: ${e}}`},QXe={keyword:"enum",schemaType:"array",$data:!0,error:ZXe,code(e){let{gen:t,data:r,$data:n,schema:i,schemaCode:o,it:a}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let u=i.length>=a.opts.loopEnum,c,l=s(()=>c??(c=(0,JXe.useFunc)(t,XXe.default)),"getEql"),f;if(u||n)f=t.let("valid"),e.block$data(f,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let m=t.const("vSchema",o);f=(0,cE.or)(...i.map((g,y)=>_(m,y)))}e.pass(f);function d(){t.assign(f,!1),t.forOf("v",o,m=>t.if((0,cE._)`${l()}(${r}, ${m})`,()=>t.assign(f,!0).break()))}s(d,"loopEnum");function _(m,g){let y=i[g];return typeof y=="object"&&y!==null?(0,cE._)`${l()}(${r}, ${m}[${g}])`:(0,cE._)`${r} === ${y}`}s(_,"equalCode")}};lq.default=QXe});var $te=h(fq=>{"use strict";Object.defineProperty(fq,"__esModule",{value:!0});var eZe=Ete(),tZe=bte(),rZe=Ote(),nZe=Pte(),iZe=wte(),sZe=Ite(),oZe=Tte(),aZe=Ate(),uZe=Rte(),cZe=Cte(),lZe=[eZe.default,tZe.default,rZe.default,nZe.default,iZe.default,sZe.default,oZe.default,aZe.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},uZe.default,cZe.default];fq.default=lZe});var pq=h(lE=>{"use strict";Object.defineProperty(lE,"__esModule",{value:!0});lE.validateAdditionalItems=void 0;var Rd=Pe(),dq=ze(),fZe={message:({params:{len:e}})=>(0,Rd.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Rd._)`{limit: ${e}}`},dZe={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:fZe,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,dq.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Dte(e,n)}};function Dte(e,t){let{gen:r,schema:n,data:i,keyword:o,it:a}=e;a.items=!0;let u=r.const("len",(0,Rd._)`${i}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Rd._)`${u} <= ${t.length}`);else if(typeof n=="object"&&!(0,dq.alwaysValidSchema)(a,n)){let l=r.var("valid",(0,Rd._)`${u} <= ${t.length}`);r.if((0,Rd.not)(l),()=>c(l)),e.ok(l)}function c(l){r.forRange("i",t.length,u,f=>{e.subschema({keyword:o,dataProp:f,dataPropType:dq.Type.Num},l),a.allErrors||r.if((0,Rd.not)(l),()=>r.break())})}s(c,"validateItems")}s(Dte,"validateAdditionalItems");lE.validateAdditionalItems=Dte;lE.default=dZe});var hq=h(fE=>{"use strict";Object.defineProperty(fE,"__esModule",{value:!0});fE.validateTuple=void 0;var Lte=Pe(),uT=ze(),pZe=Ts(),hZe={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return jte(e,"additionalItems",t);r.items=!0,!(0,uT.alwaysValidSchema)(r,t)&&e.ok((0,pZe.validateArray)(e))}};function jte(e,t,r=e.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:u}=e;f(i),u.opts.unevaluated&&r.length&&u.items!==!0&&(u.items=uT.mergeEvaluated.items(n,r.length,u.items));let c=n.name("valid"),l=n.const("len",(0,Lte._)`${o}.length`);r.forEach((d,_)=>{(0,uT.alwaysValidSchema)(u,d)||(n.if((0,Lte._)`${l} > ${_}`,()=>e.subschema({keyword:a,schemaProp:_,dataProp:_},c)),e.ok(c))});function f(d){let{opts:_,errSchemaPath:m}=u,g=r.length,y=g===d.minItems&&(g===d.maxItems||d[t]===!1);if(_.strictTuples&&!y){let b=`"${a}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,uT.checkStrictMode)(u,b,_.strictTuples)}}s(f,"checkStrictTuple")}s(jte,"validateTuple");fE.validateTuple=jte;fE.default=hZe});var Mte=h(mq=>{"use strict";Object.defineProperty(mq,"__esModule",{value:!0});var mZe=hq(),_Ze={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,mZe.validateTuple)(e,"items")};mq.default=_Ze});var xte=h(_q=>{"use strict";Object.defineProperty(_q,"__esModule",{value:!0});var Ute=Pe(),gZe=ze(),yZe=Ts(),EZe=pq(),bZe={message:({params:{len:e}})=>(0,Ute.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Ute._)`{limit: ${e}}`},SZe={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:bZe,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,!(0,gZe.alwaysValidSchema)(n,t)&&(i?(0,EZe.validateAdditionalItems)(e,i):e.ok((0,yZe.validateArray)(e)))}};_q.default=SZe});var qte=h(gq=>{"use strict";Object.defineProperty(gq,"__esModule",{value:!0});var As=Pe(),cT=ze(),vZe={message:({params:{min:e,max:t}})=>t===void 0?(0,As.str)`must contain at least ${e} valid item(s)`:(0,As.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,As._)`{minContains: ${e}}`:(0,As._)`{minContains: ${e}, maxContains: ${t}}`},OZe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:vZe,code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e,a,u,{minContains:c,maxContains:l}=n;o.opts.next?(a=c===void 0?1:c,u=l):a=1;let f=t.const("len",(0,As._)`${i}.length`);if(e.setParams({min:a,max:u}),u===void 0&&a===0){(0,cT.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(u!==void 0&&a>u){(0,cT.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,cT.alwaysValidSchema)(o,r)){let y=(0,As._)`${f} >= ${a}`;u!==void 0&&(y=(0,As._)`${y} && ${f} <= ${u}`),e.pass(y);return}o.items=!0;let d=t.name("valid");u===void 0&&a===1?m(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),u!==void 0&&t.if((0,As._)`${i}.length > 0`,_)):(t.let(d,!1),_()),e.result(d,()=>e.reset());function _(){let y=t.name("_valid"),b=t.let("count",0);m(y,()=>t.if(y,()=>g(b)))}s(_,"validateItemsWithCount");function m(y,b){t.forRange("i",0,f,E=>{e.subschema({keyword:"contains",dataProp:E,dataPropType:cT.Type.Num,compositeRule:!0},y),b()})}s(m,"validateItems");function g(y){t.code((0,As._)`${y}++`),u===void 0?t.if((0,As._)`${y} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,As._)`${y} > ${u}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,As._)`${y} >= ${a}`,()=>t.assign(d,!0)))}s(g,"checkLimits")}};gq.default=OZe});var lT=h(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.validateSchemaDeps=ma.validatePropertyDeps=ma.error=void 0;var yq=Pe(),PZe=ze(),dE=Ts();ma.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,yq.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,yq._)`{property: ${e},
175
175
  missingProperty: ${n},
176
176
  depsCount: ${t},
177
- deps: ${r}}`};var wZe={keyword:"dependencies",type:"object",schemaType:"object",error:ma.error,code(e){let[t,r]=IZe(e);Fte(e,t),kte(e,r)}};function IZe({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}s(IZe,"splitDependencies");function Fte(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let a in t){let u=t[a];if(u.length===0)continue;let c=(0,dE.propertyInData)(r,n,a,i.opts.ownProperties);e.setParams({property:a,depsCount:u.length,deps:u.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of u)(0,dE.checkReportMissingProp)(e,l)}):(r.if((0,yq._)`${c} && (${(0,dE.checkMissingProp)(e,u,o)})`),(0,dE.reportMissingProp)(e,o),r.else())}}s(Fte,"validatePropertyDeps");ma.validatePropertyDeps=Fte;function kte(e,t=e.schema){let{gen:r,data:n,keyword:i,it:o}=e,a=r.name("valid");for(let u in t)(0,PZe.alwaysValidSchema)(o,t[u])||(r.if((0,dE.propertyInData)(r,n,u,o.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:u},a);e.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),e.ok(a))}s(kte,"validateSchemaDeps");ma.validateSchemaDeps=kte;ma.default=wZe});var Gte=h(Eq=>{"use strict";Object.defineProperty(Eq,"__esModule",{value:!0});var Bte=Pe(),TZe=ze(),NZe={message:"property name must be valid",params:({params:e})=>(0,Bte._)`{propertyName: ${e.propertyName}}`},AZe={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:NZe,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,TZe.alwaysValidSchema)(i,r))return;let o=t.name("valid");t.forIn("key",n,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,Bte.not)(o),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(o)}};Eq.default=AZe});var Sq=h(bq=>{"use strict";Object.defineProperty(bq,"__esModule",{value:!0});var fT=Ts(),bo=Pe(),RZe=Is(),dT=ze(),CZe={message:"must NOT have additional properties",params:({params:e})=>(0,bo._)`{additionalProperty: ${e.additionalProperty}}`},$Ze={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:CZe,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=e;if(!o)throw new Error("ajv implementation error");let{allErrors:u,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,dT.alwaysValidSchema)(a,r))return;let l=(0,fT.allSchemaProperties)(n.properties),f=(0,fT.allSchemaProperties)(n.patternProperties);d(),e.ok((0,bo._)`${o} === ${RZe.default.errors}`);function d(){t.forIn("key",i,b=>{!l.length&&!f.length?g(b):t.if(_(b),()=>g(b))})}s(d,"checkAdditionalProperties");function _(b){let E;if(l.length>8){let S=(0,dT.schemaRefOrVal)(a,n.properties,"properties");E=(0,fT.isOwnProperty)(t,S,b)}else l.length?E=(0,bo.or)(...l.map(S=>(0,bo._)`${b} === ${S}`)):E=bo.nil;return f.length&&(E=(0,bo.or)(E,...f.map(S=>(0,bo._)`${(0,fT.usePattern)(e,S)}.test(${b})`))),(0,bo.not)(E)}s(_,"isAdditional");function m(b){t.code((0,bo._)`delete ${i}[${b}]`)}s(m,"deleteAdditional");function g(b){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(b);return}if(r===!1){e.setParams({additionalProperty:b}),e.error(),u||t.break();return}if(typeof r=="object"&&!(0,dT.alwaysValidSchema)(a,r)){let E=t.name("valid");c.removeAdditional==="failing"?(y(b,E,!1),t.if((0,bo.not)(E),()=>{e.reset(),m(b)})):(y(b,E),u||t.if((0,bo.not)(E),()=>t.break()))}}s(g,"additionalPropertyCode");function y(b,E,S){let O={keyword:"additionalProperties",dataProp:b,dataPropType:dT.Type.Str};S===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(O,E)}s(y,"applyAdditionalSchema")}};bq.default=$Ze});var Hte=h(Oq=>{"use strict";Object.defineProperty(Oq,"__esModule",{value:!0});var DZe=Q0(),Vte=Ts(),vq=ze(),zte=Sq(),LZe={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&zte.default.code(new DZe.KeywordCxt(o,zte.default,"additionalProperties"));let a=(0,Vte.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=vq.mergeEvaluated.props(t,(0,vq.toHash)(a),o.props));let u=a.filter(d=>!(0,vq.alwaysValidSchema)(o,r[d]));if(u.length===0)return;let c=t.name("valid");for(let d of u)l(d)?f(d):(t.if((0,Vte.propertyInData)(t,i,d,o.opts.ownProperties)),f(d),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function l(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}s(l,"hasDefault");function f(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}s(f,"applyPropertySchema")}};Oq.default=LZe});var Jte=h(Pq=>{"use strict";Object.defineProperty(Pq,"__esModule",{value:!0});var Kte=Ts(),pT=Pe(),Wte=ze(),Yte=ze(),jZe={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:o}=e,{opts:a}=o,u=(0,Kte.allSchemaProperties)(r),c=u.filter(y=>(0,Wte.alwaysValidSchema)(o,r[y]));if(u.length===0||c.length===u.length&&(!o.opts.unevaluated||o.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,f=t.name("valid");o.props!==!0&&!(o.props instanceof pT.Name)&&(o.props=(0,Yte.evaluatedPropsToName)(t,o.props));let{props:d}=o;_();function _(){for(let y of u)l&&m(y),o.allErrors?g(y):(t.var(f,!0),g(y),t.if(f))}s(_,"validatePatternProperties");function m(y){for(let b in l)new RegExp(y).test(b)&&(0,Wte.checkStrictMode)(o,`property ${b} matches pattern ${y} (use allowMatchingProperties)`)}s(m,"checkMatchingProperties");function g(y){t.forIn("key",n,b=>{t.if((0,pT._)`${(0,Kte.usePattern)(e,y)}.test(${b})`,()=>{let E=c.includes(y);E||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:b,dataPropType:Yte.Type.Str},f),o.opts.unevaluated&&d!==!0?t.assign((0,pT._)`${d}[${b}]`,!0):!E&&!o.allErrors&&t.if((0,pT.not)(f),()=>t.break())})})}s(g,"validateProperties")}};Pq.default=jZe});var Xte=h(wq=>{"use strict";Object.defineProperty(wq,"__esModule",{value:!0});var MZe=ze(),UZe={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,MZe.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};wq.default=UZe});var Zte=h(Iq=>{"use strict";Object.defineProperty(Iq,"__esModule",{value:!0});var xZe=Ts(),qZe={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:xZe.validateUnion,error:{message:"must match a schema in anyOf"}};Iq.default=qZe});var Qte=h(Tq=>{"use strict";Object.defineProperty(Tq,"__esModule",{value:!0});var hT=Pe(),FZe=ze(),kZe={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,hT._)`{passingSchemas: ${e.passing}}`},BZe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:kZe,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=t.let("valid",!1),u=t.let("passing",null),c=t.name("_valid");e.setParams({passing:u}),t.block(l),e.result(a,()=>e.reset(),()=>e.error(!0));function l(){o.forEach((f,d)=>{let _;(0,FZe.alwaysValidSchema)(i,f)?t.var(c,!0):_=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,hT._)`${c} && ${a}`).assign(a,!1).assign(u,(0,hT._)`[${u}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(u,d),_&&e.mergeEvaluated(_,hT.Name)})})}s(l,"validateOneOf")}};Tq.default=BZe});var ere=h(Nq=>{"use strict";Object.defineProperty(Nq,"__esModule",{value:!0});var GZe=ze(),VZe={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((o,a)=>{if((0,GZe.alwaysValidSchema)(n,o))return;let u=e.subschema({keyword:"allOf",schemaProp:a},i);e.ok(i),e.mergeEvaluated(u)})}};Nq.default=VZe});var nre=h(Aq=>{"use strict";Object.defineProperty(Aq,"__esModule",{value:!0});var mT=Pe(),rre=ze(),zZe={message:({params:e})=>(0,mT.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,mT._)`{failingKeyword: ${e.ifClause}}`},HZe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:zZe,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,rre.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=tre(n,"then"),o=tre(n,"else");if(!i&&!o)return;let a=t.let("valid",!0),u=t.name("_valid");if(c(),e.reset(),i&&o){let f=t.let("ifClause");e.setParams({ifClause:f}),t.if(u,l("then",f),l("else",f))}else i?t.if(u,l("then")):t.if((0,mT.not)(u),l("else"));e.pass(a,()=>e.error(!0));function c(){let f=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(f)}s(c,"validateIf");function l(f,d){return()=>{let _=e.subschema({keyword:f},u);t.assign(a,u),e.mergeValidEvaluated(_,a),d?t.assign(d,(0,mT._)`${f}`):e.setParams({ifClause:f})}}s(l,"validateClause")}};function tre(e,t){let r=e.schema[t];return r!==void 0&&!(0,rre.alwaysValidSchema)(e,r)}s(tre,"hasSchema");Aq.default=HZe});var ire=h(Rq=>{"use strict";Object.defineProperty(Rq,"__esModule",{value:!0});var KZe=ze(),WZe={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,KZe.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Rq.default=WZe});var sre=h(Cq=>{"use strict";Object.defineProperty(Cq,"__esModule",{value:!0});var YZe=pq(),JZe=Mte(),XZe=hq(),ZZe=xte(),QZe=qte(),eQe=lT(),tQe=Gte(),rQe=Sq(),nQe=Hte(),iQe=Jte(),sQe=Xte(),oQe=Zte(),aQe=Qte(),uQe=ere(),cQe=nre(),lQe=ire();function fQe(e=!1){let t=[sQe.default,oQe.default,aQe.default,uQe.default,cQe.default,lQe.default,tQe.default,rQe.default,eQe.default,nQe.default,iQe.default];return e?t.push(JZe.default,ZZe.default):t.push(YZe.default,XZe.default),t.push(QZe.default),t}s(fQe,"getApplicator");Cq.default=fQe});var Dq=h(pE=>{"use strict";Object.defineProperty(pE,"__esModule",{value:!0});pE.dynamicAnchor=void 0;var $q=Pe(),dQe=Is(),ore=eE(),pQe=nT(),hQe={keyword:"$dynamicAnchor",schemaType:"string",code:e=>are(e,e.schema)};function are(e,t){let{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;let i=(0,$q._)`${dQe.default.dynamicAnchors}${(0,$q.getProperty)(t)}`,o=n.errSchemaPath==="#"?n.validateName:mQe(e);r.if((0,$q._)`!${i}`,()=>r.assign(i,o))}s(are,"dynamicAnchor");pE.dynamicAnchor=are;function mQe(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:i,baseId:o,localRefs:a,meta:u}=t.root,{schemaId:c}=n.opts,l=new ore.SchemaEnv({schema:r,schemaId:c,root:i,baseId:o,localRefs:a,meta:u});return ore.compileSchema.call(n,l),(0,pQe.getValidate)(e,l)}s(mQe,"_getValidate");pE.default=hQe});var Lq=h(hE=>{"use strict";Object.defineProperty(hE,"__esModule",{value:!0});hE.dynamicRef=void 0;var ure=Pe(),_Qe=Is(),cre=nT(),gQe={keyword:"$dynamicRef",schemaType:"string",code:e=>lre(e,e.schema)};function lre(e,t){let{gen:r,keyword:n,it:i}=e;if(t[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=t.slice(1);if(i.allErrors)a();else{let c=r.let("valid",!1);a(c),e.ok(c)}function a(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=r.let("_v",(0,ure._)`${_Qe.default.dynamicAnchors}${(0,ure.getProperty)(o)}`);r.if(l,u(l,c),u(i.validateName,c))}else u(i.validateName,c)()}s(a,"_dynamicRef");function u(c,l){return l?()=>r.block(()=>{(0,cre.callRef)(e,c),r.let(l,!0)}):()=>(0,cre.callRef)(e,c)}s(u,"_callRef")}s(lre,"dynamicRef");hE.dynamicRef=lre;hE.default=gQe});var fre=h(jq=>{"use strict";Object.defineProperty(jq,"__esModule",{value:!0});var yQe=Dq(),EQe=ze(),bQe={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,yQe.dynamicAnchor)(e,""):(0,EQe.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};jq.default=bQe});var dre=h(Mq=>{"use strict";Object.defineProperty(Mq,"__esModule",{value:!0});var SQe=Lq(),vQe={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,SQe.dynamicRef)(e,e.schema)};Mq.default=vQe});var pre=h(Uq=>{"use strict";Object.defineProperty(Uq,"__esModule",{value:!0});var OQe=Dq(),PQe=Lq(),wQe=fre(),IQe=dre(),TQe=[OQe.default,PQe.default,wQe.default,IQe.default];Uq.default=TQe});var mre=h(xq=>{"use strict";Object.defineProperty(xq,"__esModule",{value:!0});var hre=lT(),NQe={keyword:"dependentRequired",type:"object",schemaType:"object",error:hre.error,code:e=>(0,hre.validatePropertyDeps)(e)};xq.default=NQe});var _re=h(qq=>{"use strict";Object.defineProperty(qq,"__esModule",{value:!0});var AQe=lT(),RQe={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,AQe.validateSchemaDeps)(e)};qq.default=RQe});var gre=h(Fq=>{"use strict";Object.defineProperty(Fq,"__esModule",{value:!0});var CQe=ze(),$Qe={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){t.contains===void 0&&(0,CQe.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};Fq.default=$Qe});var yre=h(kq=>{"use strict";Object.defineProperty(kq,"__esModule",{value:!0});var DQe=mre(),LQe=_re(),jQe=gre(),MQe=[DQe.default,LQe.default,jQe.default];kq.default=MQe});var bre=h(Bq=>{"use strict";Object.defineProperty(Bq,"__esModule",{value:!0});var Fc=Pe(),Ere=ze(),UQe=Is(),xQe={message:"must NOT have unevaluated properties",params:({params:e})=>(0,Fc._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},qQe={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:xQe,code(e){let{gen:t,schema:r,data:n,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:a,props:u}=o;u instanceof Fc.Name?t.if((0,Fc._)`${u} !== true`,()=>t.forIn("key",n,d=>t.if(l(u,d),()=>c(d)))):u!==!0&&t.forIn("key",n,d=>u===void 0?c(d):t.if(f(u,d),()=>c(d))),o.props=!0,e.ok((0,Fc._)`${i} === ${UQe.default.errors}`);function c(d){if(r===!1){e.setParams({unevaluatedProperty:d}),e.error(),a||t.break();return}if(!(0,Ere.alwaysValidSchema)(o,r)){let _=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:d,dataPropType:Ere.Type.Str},_),a||t.if((0,Fc.not)(_),()=>t.break())}}s(c,"unevaluatedPropCode");function l(d,_){return(0,Fc._)`!${d} || !${d}[${_}]`}s(l,"unevaluatedDynamic");function f(d,_){let m=[];for(let g in d)d[g]===!0&&m.push((0,Fc._)`${_} !== ${g}`);return(0,Fc.and)(...m)}s(f,"unevaluatedStatic")}};Bq.default=qQe});var vre=h(Gq=>{"use strict";Object.defineProperty(Gq,"__esModule",{value:!0});var Cd=Pe(),Sre=ze(),FQe={message:({params:{len:e}})=>(0,Cd.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Cd._)`{limit: ${e}}`},kQe={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:FQe,code(e){let{gen:t,schema:r,data:n,it:i}=e,o=i.items||0;if(o===!0)return;let a=t.const("len",(0,Cd._)`${n}.length`);if(r===!1)e.setParams({len:o}),e.fail((0,Cd._)`${a} > ${o}`);else if(typeof r=="object"&&!(0,Sre.alwaysValidSchema)(i,r)){let c=t.var("valid",(0,Cd._)`${a} <= ${o}`);t.if((0,Cd.not)(c),()=>u(c,o)),e.ok(c)}i.items=!0;function u(c,l){t.forRange("i",l,a,f=>{e.subschema({keyword:"unevaluatedItems",dataProp:f,dataPropType:Sre.Type.Num},c),i.allErrors||t.if((0,Cd.not)(c),()=>t.break())})}s(u,"validateItems")}};Gq.default=kQe});var Ore=h(Vq=>{"use strict";Object.defineProperty(Vq,"__esModule",{value:!0});var BQe=bre(),GQe=vre(),VQe=[BQe.default,GQe.default];Vq.default=VQe});var Pre=h(zq=>{"use strict";Object.defineProperty(zq,"__esModule",{value:!0});var mr=Pe(),zQe={message:({schemaCode:e})=>(0,mr.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,mr._)`{format: ${e}}`},HQe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:zQe,code(e,t){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:d}=u;if(!c.validateFormats)return;i?_():m();function _(){let g=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),y=r.const("fDef",(0,mr._)`${g}[${a}]`),b=r.let("fType"),E=r.let("format");r.if((0,mr._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(b,(0,mr._)`${y}.type || "string"`).assign(E,(0,mr._)`${y}.validate`),()=>r.assign(b,(0,mr._)`"string"`).assign(E,y)),e.fail$data((0,mr.or)(S(),O()));function S(){return c.strictSchema===!1?mr.nil:(0,mr._)`${a} && !${E}`}s(S,"unknownFmt");function O(){let P=f.$async?(0,mr._)`(${y}.async ? await ${E}(${n}) : ${E}(${n}))`:(0,mr._)`${E}(${n})`,I=(0,mr._)`(typeof ${E} == "function" ? ${P} : ${E}.test(${n}))`;return(0,mr._)`${E} && ${E} !== true && ${b} === ${t} && !${I}`}s(O,"invalidFmt")}s(_,"validate$DataFormat");function m(){let g=d.formats[o];if(!g){S();return}if(g===!0)return;let[y,b,E]=O(g);y===t&&e.pass(P());function S(){if(c.strictSchema===!1){d.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${o}" ignored in schema at path "${l}"`}}s(S,"unknownFormat");function O(I){let j=I instanceof RegExp?(0,mr.regexpCode)(I):c.code.formats?(0,mr._)`${c.code.formats}${(0,mr.getProperty)(o)}`:void 0,x=r.scopeValue("formats",{key:o,ref:I,code:j});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,mr._)`${x}.validate`]:["string",I,x]}s(O,"getFormat");function P(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,mr._)`await ${E}(${n})`}return typeof b=="function"?(0,mr._)`${E}(${n})`:(0,mr._)`${E}.test(${n})`}s(P,"validCondition")}s(m,"validateFormat")}};zq.default=HQe});var wre=h(Hq=>{"use strict";Object.defineProperty(Hq,"__esModule",{value:!0});var KQe=Pre(),WQe=[KQe.default];Hq.default=WQe});var Ire=h(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});Im.contentVocabulary=Im.metadataVocabulary=void 0;Im.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Im.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Nre=h(Kq=>{"use strict";Object.defineProperty(Kq,"__esModule",{value:!0});var YQe=yte(),JQe=$te(),XQe=sre(),ZQe=pre(),QQe=yre(),eet=Ore(),tet=wre(),Tre=Ire(),ret=[ZQe.default,YQe.default,JQe.default,(0,XQe.default)(!0),tet.default,Tre.metadataVocabulary,Tre.contentVocabulary,QQe.default,eet.default];Kq.default=ret});var Are=h(mE=>{"use strict";Object.defineProperty(mE,"__esModule",{value:!0});mE.DiscrError=void 0;var net;(function(e){e.Tag="tag",e.Mapping="mapping"})(net=mE.DiscrError||(mE.DiscrError={}))});var Cre=h(Yq=>{"use strict";Object.defineProperty(Yq,"__esModule",{value:!0});var Tm=Pe(),Wq=Are(),Rre=eE(),iet=ze(),set={message:({params:{discrError:e,tagName:t}})=>e===Wq.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Tm._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},oet={keyword:"discriminator",type:"object",schemaType:"object",error:set,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:o}=e,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let u=n.propertyName;if(typeof u!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",(0,Tm._)`${r}${(0,Tm.getProperty)(u)}`);t.if((0,Tm._)`typeof ${l} == "string"`,()=>f(),()=>e.error(!1,{discrError:Wq.DiscrError.Tag,tag:l,tagName:u})),e.ok(c);function f(){let m=_();t.if(!1);for(let g in m)t.elseIf((0,Tm._)`${l} === ${g}`),t.assign(c,d(m[g]));t.else(),e.error(!1,{discrError:Wq.DiscrError.Mapping,tag:l,tagName:u}),t.endIf()}s(f,"validateMapping");function d(m){let g=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:m},g);return e.mergeEvaluated(y,Tm.Name),g}s(d,"applyTagSchema");function _(){var m;let g={},y=E(i),b=!0;for(let P=0;P<a.length;P++){let I=a[P];I?.$ref&&!(0,iet.schemaHasRulesButRef)(I,o.self.RULES)&&(I=Rre.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,I?.$ref),I instanceof Rre.SchemaEnv&&(I=I.schema));let j=(m=I?.properties)===null||m===void 0?void 0:m[u];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);b=b&&(y||E(I)),S(j,P)}if(!b)throw new Error(`discriminator: "${u}" must be required`);return g;function E({required:P}){return Array.isArray(P)&&P.includes(u)}function S(P,I){if(P.const)O(P.const,I);else if(P.enum)for(let j of P.enum)O(j,I);else throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`)}function O(P,I){if(typeof P!="string"||P in g)throw new Error(`discriminator: "${u}" values must be unique strings`);g[P]=I}}s(_,"getMapping")}};Yq.default=oet});var $re=h((gMt,aet)=>{aet.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}});var Dre=h((yMt,uet)=>{uet.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}});var Lre=h((EMt,cet)=>{cet.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var jre=h((bMt,fet)=>{fet.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var Mre=h((SMt,det)=>{det.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}});var Ure=h((vMt,pet)=>{pet.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var xre=h((OMt,het)=>{het.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var qre=h((PMt,met)=>{met.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var Fre=h(Jq=>{"use strict";Object.defineProperty(Jq,"__esModule",{value:!0});var _et=$re(),get=Dre(),yet=Lre(),Eet=jre(),bet=Mre(),vet=Ure(),Oet=xre(),Pet=qre(),wet=["/properties"];function Iet(e){return[_et,get,yet,Eet,bet,t(this,vet),Oet,t(this,Pet)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function t(r,n){return e?r.$dataMetaSchema(n,wet):n}s(t,"with$data")}s(Iet,"addMetaSchema2020");Jq.default=Iet});var Bre=h((ir,kre)=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.MissingRefError=ir.ValidationError=ir.CodeGen=ir.Name=ir.nil=ir.stringify=ir.str=ir._=ir.KeywordCxt=void 0;var Tet=pte(),Net=Nre(),Aet=Cre(),Ret=Fre(),Xq="https://json-schema.org/draft/2020-12/schema",_T=class extends Tet.default{static{s(this,"Ajv2020")}constructor(t={}){super({...t,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),Net.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(Aet.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:t,meta:r}=this.opts;r&&(Ret.default.call(this,t),this.refs["http://json-schema.org/schema"]=Xq)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Xq)?Xq:void 0)}};kre.exports=ir=_T;Object.defineProperty(ir,"__esModule",{value:!0});ir.default=_T;var Cet=Q0();Object.defineProperty(ir,"KeywordCxt",{enumerable:!0,get:function(){return Cet.KeywordCxt}});var Nm=Pe();Object.defineProperty(ir,"_",{enumerable:!0,get:function(){return Nm._}});Object.defineProperty(ir,"str",{enumerable:!0,get:function(){return Nm.str}});Object.defineProperty(ir,"stringify",{enumerable:!0,get:function(){return Nm.stringify}});Object.defineProperty(ir,"nil",{enumerable:!0,get:function(){return Nm.nil}});Object.defineProperty(ir,"Name",{enumerable:!0,get:function(){return Nm.Name}});Object.defineProperty(ir,"CodeGen",{enumerable:!0,get:function(){return Nm.CodeGen}});var $et=XI();Object.defineProperty(ir,"ValidationError",{enumerable:!0,get:function(){return $et.default}});var Det=ZI();Object.defineProperty(ir,"MissingRefError",{enumerable:!0,get:function(){return Det.default}})});var Vre=h(Am=>{"use strict";var Gre=Am&&Am.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Am,"__esModule",{value:!0});Am.JsonValidator=void 0;var Let=Gre(HM()),jet=Gre(Bre()),Zq=class e{static{s(this,"JsonValidator")}static#t=new e;static get instance(){return e.#t}ajv;constructor(){this.ajv=new jet.default({allErrors:!0,allowUnionTypes:!0}),this.ajv.addKeyword("faker"),(0,Let.default)(this.ajv,{mode:"fast"})}addSchema(t,r){this.ajv.addSchema(t,r)}compile(t){let r=this.ajv.compile(t);return s(i=>({isValid:r(i),errors:this.toSimpleErrors(r.errors,i),warnings:[]}),"validator")}toSimpleErrors(t,r){let n=[];return t?.forEach(i=>{i.keyword==="enum"&&i.params.allowedValues&&Array.isArray(i.params.allowedValues)&&(i.message+=`; ${i.params.allowedValues.join(", ")}`),i.instancePath&&(i.instancePath=i.instancePath.replaceAll(/(\/)?(~1)(\/)?/gm,"/"));let o={details:{}},a=i.instancePath.split("/");if(a.length>2){let c=a[1],l=a[2]?parseInt(a[2]):0,f=a[3],d=isNaN(l)?void 0:r[c][l][f];o={details:{property:c,index:l,field:f,fieldValue:d}}}if(i.keyword==="required"&&i.params.missingProperty&&i.instancePath&&(i.message=`A 'path' is missing required property '${i.params.missingProperty}'`),i.keyword==="additionalProperties"&&i.params.additionalProperty&&i.instancePath&&(i.message=`A 'path' should NOT include property '${i.params.additionalProperty}'`),i.keyword==="type"&&i.params.type&&i.instancePath){let c=i.instancePath.split("/"),l=c[c.length-1];i.message=`Value of property '${l}' must be '${i.params.type}'`}let u=Object.assign(i,o);n.push(u)}),n}};Am.JsonValidator=Zq});var gT=h(_a=>{"use strict";var Rm=_a&&_a.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_a,"__esModule",{value:!0});_a.policiesConfigurationValidatorFn=_a.openAPIRouteConfigurationValidatorFn=_a.routeConfigurationValidatorFn=void 0;var Met=Rm(tee()),zre=Rm(ree()),Uet=Rm(nee()),Hre=Rm(iee()),Kre=Rm(see()),xet=Rm(oee()),qet=Vre(),Su=qet.JsonValidator.instance;Su.addSchema(xet.default,"routes.schema.json");Su.addSchema(Kre.default,"route-configuration.schema.json");Su.addSchema(Uet.default,"policy-configuration.schema.json");Su.addSchema(zre.default,"policies.schema.json");Su.addSchema(Hre.default,"open-api-route-configuration.schema.json");Su.addSchema(Met.default,"fragments.schema.json");_a.routeConfigurationValidatorFn=Su.compile(Kre.default);_a.openAPIRouteConfigurationValidatorFn=Su.compile(Hre.default);_a.policiesConfigurationValidatorFn=Su.compile(zre.default)});var Wre=h(yT=>{"use strict";Object.defineProperty(yT,"__esModule",{value:!0});yT.PoliciesConfigurationValidator=void 0;var Fet=gT(),Qq=class{static{s(this,"PoliciesConfigurationValidator")}results;validate(t){return this.results=(0,Fet.policiesConfigurationValidatorFn)(t),this.results}};yT.PoliciesConfigurationValidator=Qq});var Yre=h(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});Cm.OpenAPIGlobalValidator=Cm.OpenAPILocalizedValidator=void 0;var ket=gT(),e2=class{static{s(this,"OpenAPILocalizedValidator")}results;validate(t){return this.results=(0,ket.openAPIRouteConfigurationValidatorFn)(t),this.results}};Cm.OpenAPILocalizedValidator=e2;var t2=class{static{s(this,"OpenAPIGlobalValidator")}validate(t){return[]}};Cm.OpenAPIGlobalValidator=t2});var i2=h(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.testPosition=Ii.CodeGenError=Ii.JSON_ENV_REGEX=Ii.JSON_IMPORT_REGEX=Ii.ROUTE_ENV_REGEX=Ii.ROUTE_IMPORT_REGEX=void 0;var r2=Dc();Ii.ROUTE_IMPORT_REGEX=/\$import\((.*)\)/;Ii.ROUTE_ENV_REGEX=/\$env\((.*?)\)/g;Ii.JSON_IMPORT_REGEX=/require\("(.*)"\)/;Ii.JSON_ENV_REGEX=/\${environment.(.*)}/;var n2=class extends Error{static{s(this,"CodeGenError")}location;constructor(t,r,n,i){super(t),this.location={file:r,namespace:"",line:n?n.line:0,column:n?n.column:0,length:0,lineText:i??"",suggestion:""}}};Ii.CodeGenError=n2;var Bet=s(e=>{let t=[],r=e;for(;r.parent;)t.push(r),r=r.parent;return t.reverse()},"invertTree"),Get=s((e,t)=>{if(!e)return!1;let r=Bet(e);return t.split("/").every((o,a)=>{let u=r[a];return u?o==="*"||(0,r2.isAstProperty)(u)&&u.name.value===o?!0:o==="{}"?u.type===r2.SyntaxType.Object:o==="[]"?u.type===r2.SyntaxType.Array:!1:!1})},"testPosition");Ii.testPosition=Get});var Jre=h(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});Dm.getEnvStatementTransformer=Dm.AstTransformer=void 0;var $m=Dc(),Vet=qI(),_E=i2(),s2=class{static{s(this,"AstTransformer")}errors=[];transform(t){return this.visitor(t),t}visitor(t){this.visit(t),(0,$m.isAstObject)(t)?t.children.forEach(r=>{this.visitor(r)}):(0,$m.isAstArray)(t)?t.children.forEach(r=>{this.visitor(r)}):(0,$m.isAstProperty)(t)&&this.visitor(t.value)}};Dm.AstTransformer=s2;var zet=s((e,t,r)=>n=>{if(!(0,$m.isAstProperty)(n)||!(0,$m.isAstLiteral)(n.value)||typeof n.value.value!="string")return;if(!e.some(o=>(0,_E.testPosition)(n,o))){_E.ROUTE_ENV_REGEX.test(n.value.value)&&t.push(new _E.CodeGenError("An $env() statement is not expected at this location.",r,n.location,n.value.value));return}let i=new RegExp(_E.ROUTE_ENV_REGEX).exec(n.value.value);if(i?.length===2&&i[0]===n.value.value){let o={type:$m.SyntaxType.FunctionBody,parent:null,value:`environment["${i[1]}"]`};n.value=o}else{let o=n.value.value.replaceAll(new RegExp(_E.ROUTE_ENV_REGEX),(a,u)=>`\${environment["${u}"] ? environment["${u}"] : ""}`);o!==n.value.value&&(n.value=Vet.factory.createTemplateString(o,n))}},"getEnvStatementTransformer");Dm.getEnvStatementTransformer=zet});var ene=h(Lm=>{"use strict";var Het=Lm&&Lm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lm,"__esModule",{value:!0});Lm.OpenAPIRoutesFragmentAstTransformer=void 0;var Ket=Het(require("path")),Rs=Dc(),o2=qI(),Xre=Jre(),So=i2(),gE="config/routes.json",Wet=["handler/{}/options/*","policies/[]/{}/handler/{}/options/*","corsPolicies/[]/{}/*"],Yet=["handler/{}/module","handler/{}/options/{}/policies/{}/inbound/[]/{}/module","handler/{}/options/{}/policies/{}/outbound/[]/{}/module","policies/[]/{}/handler/{}/module","policies/[]/{}/handler/{}/options/{}/identifier/{}/module","policies/[]/{}/handler/{}/options/{}/validator"],Zre=["handler/{}/options/*","policies/[]/{}/handler/{}/options/*"],Jet="handler/{}/options/{}/rewritePattern",Xet="handler/{}/options/{}/baseUrl",a2=class extends Xre.AstTransformer{static{s(this,"OpenAPIRoutesFragmentAstTransformer")}visit(t){this.rewriteHandlerFunction(t),this.rewriteForwardFunction(t),this.replaceImportStatements(t),this.replaceEnvStatements(t)}rewriteHandlerFunction(t){if(!(!(0,Rs.isAstProperty)(t)||!(0,Rs.isAstLiteral)(t.value)||typeof t.value.value!="string")&&(0,So.testPosition)(t,Jet)){if(!t.parent||!(0,Rs.isAstObject)(t.parent)){this.errors.push(new So.CodeGenError("Invalid node, expected object",gE,t.parent?t.parent.location:t.location,void 0));return}let r=t.value.value,n={type:Rs.SyntaxType.FunctionBody,parent:null,value:Qre(r)},i=o2.factory.createProperty("__rewriteFunction",n,t);t.parent.children.push(i)}}rewriteForwardFunction(t){if(!(!(0,Rs.isAstProperty)(t)||!(0,Rs.isAstLiteral)(t.value)||typeof t.value.value!="string")&&(0,So.testPosition)(t,Xet)){if(!t.parent||!(0,Rs.isAstObject)(t.parent)){this.errors.push(new So.CodeGenError("Invalid node, expected object",gE,t.parent?t.parent.location:t.location,void 0));return}let r=t.value.value,n={type:Rs.SyntaxType.FunctionBody,parent:null,value:Qre(r)},i=o2.factory.createProperty("__rewriteFunction",n,t);t.parent.children.push(i)}}replaceImportStatements(t){if(!(0,Rs.isAstProperty)(t)||!(0,Rs.isAstLiteral)(t.value))return;let r=t.value.value;if(typeof r!="string")return;if(!Yet.some(a=>(0,So.testPosition)(t,a))&&!Zre.some(a=>(0,So.testPosition)(t,a))){if(So.ROUTE_IMPORT_REGEX.test(r)){if(t.name.value==="$ref")return;this.errors.push(new So.CodeGenError("An $import() statement is not expected at this location.",gE,t.location,r))}return}let n=So.ROUTE_IMPORT_REGEX.exec(r);if(Zre.some(a=>(0,So.testPosition)(t,a))&&!n)return;if(!n){this.errors.push(new So.CodeGenError("Invalid $import() statement",gE,t.location,r));return}let i=n[1];i.startsWith(".")&&(i=Ket.default.join("..",i));let o={name:null,type:Rs.SyntaxType.FunctionCall,parent:t.parent,children:[]};o.name={value:"require",type:Rs.SyntaxType.Identifier,parent:o},o.children.push(o2.factory.createLiteral(i,o)),t.value=o}replaceEnvStatements=(0,Xre.getEnvStatementTransformer)(Wet,this.errors,gE)};Lm.OpenAPIRoutesFragmentAstTransformer=a2;function Qre(e){return`(request, context) => {
177
+ deps: ${r}}`};var wZe={keyword:"dependencies",type:"object",schemaType:"object",error:ma.error,code(e){let[t,r]=IZe(e);Fte(e,t),kte(e,r)}};function IZe({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}s(IZe,"splitDependencies");function Fte(e,t=e.schema){let{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;let o=r.let("missing");for(let a in t){let u=t[a];if(u.length===0)continue;let c=(0,dE.propertyInData)(r,n,a,i.opts.ownProperties);e.setParams({property:a,depsCount:u.length,deps:u.join(", ")}),i.allErrors?r.if(c,()=>{for(let l of u)(0,dE.checkReportMissingProp)(e,l)}):(r.if((0,yq._)`${c} && (${(0,dE.checkMissingProp)(e,u,o)})`),(0,dE.reportMissingProp)(e,o),r.else())}}s(Fte,"validatePropertyDeps");ma.validatePropertyDeps=Fte;function kte(e,t=e.schema){let{gen:r,data:n,keyword:i,it:o}=e,a=r.name("valid");for(let u in t)(0,PZe.alwaysValidSchema)(o,t[u])||(r.if((0,dE.propertyInData)(r,n,u,o.opts.ownProperties),()=>{let c=e.subschema({keyword:i,schemaProp:u},a);e.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),e.ok(a))}s(kte,"validateSchemaDeps");ma.validateSchemaDeps=kte;ma.default=wZe});var Gte=h(Eq=>{"use strict";Object.defineProperty(Eq,"__esModule",{value:!0});var Bte=Pe(),TZe=ze(),NZe={message:"property name must be valid",params:({params:e})=>(0,Bte._)`{propertyName: ${e.propertyName}}`},AZe={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:NZe,code(e){let{gen:t,schema:r,data:n,it:i}=e;if((0,TZe.alwaysValidSchema)(i,r))return;let o=t.name("valid");t.forIn("key",n,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),t.if((0,Bte.not)(o),()=>{e.error(!0),i.allErrors||t.break()})}),e.ok(o)}};Eq.default=AZe});var Sq=h(bq=>{"use strict";Object.defineProperty(bq,"__esModule",{value:!0});var fT=Ts(),bo=Pe(),RZe=Is(),dT=ze(),CZe={message:"must NOT have additional properties",params:({params:e})=>(0,bo._)`{additionalProperty: ${e.additionalProperty}}`},$Ze={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:CZe,code(e){let{gen:t,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=e;if(!o)throw new Error("ajv implementation error");let{allErrors:u,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,dT.alwaysValidSchema)(a,r))return;let l=(0,fT.allSchemaProperties)(n.properties),f=(0,fT.allSchemaProperties)(n.patternProperties);d(),e.ok((0,bo._)`${o} === ${RZe.default.errors}`);function d(){t.forIn("key",i,b=>{!l.length&&!f.length?g(b):t.if(_(b),()=>g(b))})}s(d,"checkAdditionalProperties");function _(b){let E;if(l.length>8){let v=(0,dT.schemaRefOrVal)(a,n.properties,"properties");E=(0,fT.isOwnProperty)(t,v,b)}else l.length?E=(0,bo.or)(...l.map(v=>(0,bo._)`${b} === ${v}`)):E=bo.nil;return f.length&&(E=(0,bo.or)(E,...f.map(v=>(0,bo._)`${(0,fT.usePattern)(e,v)}.test(${b})`))),(0,bo.not)(E)}s(_,"isAdditional");function m(b){t.code((0,bo._)`delete ${i}[${b}]`)}s(m,"deleteAdditional");function g(b){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(b);return}if(r===!1){e.setParams({additionalProperty:b}),e.error(),u||t.break();return}if(typeof r=="object"&&!(0,dT.alwaysValidSchema)(a,r)){let E=t.name("valid");c.removeAdditional==="failing"?(y(b,E,!1),t.if((0,bo.not)(E),()=>{e.reset(),m(b)})):(y(b,E),u||t.if((0,bo.not)(E),()=>t.break()))}}s(g,"additionalPropertyCode");function y(b,E,v){let O={keyword:"additionalProperties",dataProp:b,dataPropType:dT.Type.Str};v===!1&&Object.assign(O,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(O,E)}s(y,"applyAdditionalSchema")}};bq.default=$Ze});var Hte=h(Oq=>{"use strict";Object.defineProperty(Oq,"__esModule",{value:!0});var DZe=Q0(),Vte=Ts(),vq=ze(),zte=Sq(),LZe={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:i,it:o}=e;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&zte.default.code(new DZe.KeywordCxt(o,zte.default,"additionalProperties"));let a=(0,Vte.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=vq.mergeEvaluated.props(t,(0,vq.toHash)(a),o.props));let u=a.filter(d=>!(0,vq.alwaysValidSchema)(o,r[d]));if(u.length===0)return;let c=t.name("valid");for(let d of u)l(d)?f(d):(t.if((0,Vte.propertyInData)(t,i,d,o.opts.ownProperties)),f(d),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function l(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}s(l,"hasDefault");function f(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}s(f,"applyPropertySchema")}};Oq.default=LZe});var Jte=h(Pq=>{"use strict";Object.defineProperty(Pq,"__esModule",{value:!0});var Kte=Ts(),pT=Pe(),Wte=ze(),Yte=ze(),jZe={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:i,it:o}=e,{opts:a}=o,u=(0,Kte.allSchemaProperties)(r),c=u.filter(y=>(0,Wte.alwaysValidSchema)(o,r[y]));if(u.length===0||c.length===u.length&&(!o.opts.unevaluated||o.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,f=t.name("valid");o.props!==!0&&!(o.props instanceof pT.Name)&&(o.props=(0,Yte.evaluatedPropsToName)(t,o.props));let{props:d}=o;_();function _(){for(let y of u)l&&m(y),o.allErrors?g(y):(t.var(f,!0),g(y),t.if(f))}s(_,"validatePatternProperties");function m(y){for(let b in l)new RegExp(y).test(b)&&(0,Wte.checkStrictMode)(o,`property ${b} matches pattern ${y} (use allowMatchingProperties)`)}s(m,"checkMatchingProperties");function g(y){t.forIn("key",n,b=>{t.if((0,pT._)`${(0,Kte.usePattern)(e,y)}.test(${b})`,()=>{let E=c.includes(y);E||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:b,dataPropType:Yte.Type.Str},f),o.opts.unevaluated&&d!==!0?t.assign((0,pT._)`${d}[${b}]`,!0):!E&&!o.allErrors&&t.if((0,pT.not)(f),()=>t.break())})})}s(g,"validateProperties")}};Pq.default=jZe});var Xte=h(wq=>{"use strict";Object.defineProperty(wq,"__esModule",{value:!0});var MZe=ze(),UZe={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,MZe.alwaysValidSchema)(n,r)){e.fail();return}let i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};wq.default=UZe});var Zte=h(Iq=>{"use strict";Object.defineProperty(Iq,"__esModule",{value:!0});var xZe=Ts(),qZe={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:xZe.validateUnion,error:{message:"must match a schema in anyOf"}};Iq.default=qZe});var Qte=h(Tq=>{"use strict";Object.defineProperty(Tq,"__esModule",{value:!0});var hT=Pe(),FZe=ze(),kZe={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,hT._)`{passingSchemas: ${e.passing}}`},BZe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:kZe,code(e){let{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=t.let("valid",!1),u=t.let("passing",null),c=t.name("_valid");e.setParams({passing:u}),t.block(l),e.result(a,()=>e.reset(),()=>e.error(!0));function l(){o.forEach((f,d)=>{let _;(0,FZe.alwaysValidSchema)(i,f)?t.var(c,!0):_=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,hT._)`${c} && ${a}`).assign(a,!1).assign(u,(0,hT._)`[${u}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(u,d),_&&e.mergeEvaluated(_,hT.Name)})})}s(l,"validateOneOf")}};Tq.default=BZe});var ere=h(Nq=>{"use strict";Object.defineProperty(Nq,"__esModule",{value:!0});var GZe=ze(),VZe={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=t.name("valid");r.forEach((o,a)=>{if((0,GZe.alwaysValidSchema)(n,o))return;let u=e.subschema({keyword:"allOf",schemaProp:a},i);e.ok(i),e.mergeEvaluated(u)})}};Nq.default=VZe});var nre=h(Aq=>{"use strict";Object.defineProperty(Aq,"__esModule",{value:!0});var mT=Pe(),rre=ze(),zZe={message:({params:e})=>(0,mT.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,mT._)`{failingKeyword: ${e.ifClause}}`},HZe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:zZe,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,rre.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=tre(n,"then"),o=tre(n,"else");if(!i&&!o)return;let a=t.let("valid",!0),u=t.name("_valid");if(c(),e.reset(),i&&o){let f=t.let("ifClause");e.setParams({ifClause:f}),t.if(u,l("then",f),l("else",f))}else i?t.if(u,l("then")):t.if((0,mT.not)(u),l("else"));e.pass(a,()=>e.error(!0));function c(){let f=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(f)}s(c,"validateIf");function l(f,d){return()=>{let _=e.subschema({keyword:f},u);t.assign(a,u),e.mergeValidEvaluated(_,a),d?t.assign(d,(0,mT._)`${f}`):e.setParams({ifClause:f})}}s(l,"validateClause")}};function tre(e,t){let r=e.schema[t];return r!==void 0&&!(0,rre.alwaysValidSchema)(e,r)}s(tre,"hasSchema");Aq.default=HZe});var ire=h(Rq=>{"use strict";Object.defineProperty(Rq,"__esModule",{value:!0});var KZe=ze(),WZe={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,KZe.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Rq.default=WZe});var sre=h(Cq=>{"use strict";Object.defineProperty(Cq,"__esModule",{value:!0});var YZe=pq(),JZe=Mte(),XZe=hq(),ZZe=xte(),QZe=qte(),eQe=lT(),tQe=Gte(),rQe=Sq(),nQe=Hte(),iQe=Jte(),sQe=Xte(),oQe=Zte(),aQe=Qte(),uQe=ere(),cQe=nre(),lQe=ire();function fQe(e=!1){let t=[sQe.default,oQe.default,aQe.default,uQe.default,cQe.default,lQe.default,tQe.default,rQe.default,eQe.default,nQe.default,iQe.default];return e?t.push(JZe.default,ZZe.default):t.push(YZe.default,XZe.default),t.push(QZe.default),t}s(fQe,"getApplicator");Cq.default=fQe});var Dq=h(pE=>{"use strict";Object.defineProperty(pE,"__esModule",{value:!0});pE.dynamicAnchor=void 0;var $q=Pe(),dQe=Is(),ore=eE(),pQe=nT(),hQe={keyword:"$dynamicAnchor",schemaType:"string",code:e=>are(e,e.schema)};function are(e,t){let{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=!0;let i=(0,$q._)`${dQe.default.dynamicAnchors}${(0,$q.getProperty)(t)}`,o=n.errSchemaPath==="#"?n.validateName:mQe(e);r.if((0,$q._)`!${i}`,()=>r.assign(i,o))}s(are,"dynamicAnchor");pE.dynamicAnchor=are;function mQe(e){let{schemaEnv:t,schema:r,self:n}=e.it,{root:i,baseId:o,localRefs:a,meta:u}=t.root,{schemaId:c}=n.opts,l=new ore.SchemaEnv({schema:r,schemaId:c,root:i,baseId:o,localRefs:a,meta:u});return ore.compileSchema.call(n,l),(0,pQe.getValidate)(e,l)}s(mQe,"_getValidate");pE.default=hQe});var Lq=h(hE=>{"use strict";Object.defineProperty(hE,"__esModule",{value:!0});hE.dynamicRef=void 0;var ure=Pe(),_Qe=Is(),cre=nT(),gQe={keyword:"$dynamicRef",schemaType:"string",code:e=>lre(e,e.schema)};function lre(e,t){let{gen:r,keyword:n,it:i}=e;if(t[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let o=t.slice(1);if(i.allErrors)a();else{let c=r.let("valid",!1);a(c),e.ok(c)}function a(c){if(i.schemaEnv.root.dynamicAnchors[o]){let l=r.let("_v",(0,ure._)`${_Qe.default.dynamicAnchors}${(0,ure.getProperty)(o)}`);r.if(l,u(l,c),u(i.validateName,c))}else u(i.validateName,c)()}s(a,"_dynamicRef");function u(c,l){return l?()=>r.block(()=>{(0,cre.callRef)(e,c),r.let(l,!0)}):()=>(0,cre.callRef)(e,c)}s(u,"_callRef")}s(lre,"dynamicRef");hE.dynamicRef=lre;hE.default=gQe});var fre=h(jq=>{"use strict";Object.defineProperty(jq,"__esModule",{value:!0});var yQe=Dq(),EQe=ze(),bQe={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){e.schema?(0,yQe.dynamicAnchor)(e,""):(0,EQe.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};jq.default=bQe});var dre=h(Mq=>{"use strict";Object.defineProperty(Mq,"__esModule",{value:!0});var SQe=Lq(),vQe={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,SQe.dynamicRef)(e,e.schema)};Mq.default=vQe});var pre=h(Uq=>{"use strict";Object.defineProperty(Uq,"__esModule",{value:!0});var OQe=Dq(),PQe=Lq(),wQe=fre(),IQe=dre(),TQe=[OQe.default,PQe.default,wQe.default,IQe.default];Uq.default=TQe});var mre=h(xq=>{"use strict";Object.defineProperty(xq,"__esModule",{value:!0});var hre=lT(),NQe={keyword:"dependentRequired",type:"object",schemaType:"object",error:hre.error,code:e=>(0,hre.validatePropertyDeps)(e)};xq.default=NQe});var _re=h(qq=>{"use strict";Object.defineProperty(qq,"__esModule",{value:!0});var AQe=lT(),RQe={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,AQe.validateSchemaDeps)(e)};qq.default=RQe});var gre=h(Fq=>{"use strict";Object.defineProperty(Fq,"__esModule",{value:!0});var CQe=ze(),$Qe={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){t.contains===void 0&&(0,CQe.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}};Fq.default=$Qe});var yre=h(kq=>{"use strict";Object.defineProperty(kq,"__esModule",{value:!0});var DQe=mre(),LQe=_re(),jQe=gre(),MQe=[DQe.default,LQe.default,jQe.default];kq.default=MQe});var bre=h(Bq=>{"use strict";Object.defineProperty(Bq,"__esModule",{value:!0});var Fc=Pe(),Ere=ze(),UQe=Is(),xQe={message:"must NOT have unevaluated properties",params:({params:e})=>(0,Fc._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},qQe={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:xQe,code(e){let{gen:t,schema:r,data:n,errsCount:i,it:o}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:a,props:u}=o;u instanceof Fc.Name?t.if((0,Fc._)`${u} !== true`,()=>t.forIn("key",n,d=>t.if(l(u,d),()=>c(d)))):u!==!0&&t.forIn("key",n,d=>u===void 0?c(d):t.if(f(u,d),()=>c(d))),o.props=!0,e.ok((0,Fc._)`${i} === ${UQe.default.errors}`);function c(d){if(r===!1){e.setParams({unevaluatedProperty:d}),e.error(),a||t.break();return}if(!(0,Ere.alwaysValidSchema)(o,r)){let _=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:d,dataPropType:Ere.Type.Str},_),a||t.if((0,Fc.not)(_),()=>t.break())}}s(c,"unevaluatedPropCode");function l(d,_){return(0,Fc._)`!${d} || !${d}[${_}]`}s(l,"unevaluatedDynamic");function f(d,_){let m=[];for(let g in d)d[g]===!0&&m.push((0,Fc._)`${_} !== ${g}`);return(0,Fc.and)(...m)}s(f,"unevaluatedStatic")}};Bq.default=qQe});var vre=h(Gq=>{"use strict";Object.defineProperty(Gq,"__esModule",{value:!0});var Cd=Pe(),Sre=ze(),FQe={message:({params:{len:e}})=>(0,Cd.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Cd._)`{limit: ${e}}`},kQe={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:FQe,code(e){let{gen:t,schema:r,data:n,it:i}=e,o=i.items||0;if(o===!0)return;let a=t.const("len",(0,Cd._)`${n}.length`);if(r===!1)e.setParams({len:o}),e.fail((0,Cd._)`${a} > ${o}`);else if(typeof r=="object"&&!(0,Sre.alwaysValidSchema)(i,r)){let c=t.var("valid",(0,Cd._)`${a} <= ${o}`);t.if((0,Cd.not)(c),()=>u(c,o)),e.ok(c)}i.items=!0;function u(c,l){t.forRange("i",l,a,f=>{e.subschema({keyword:"unevaluatedItems",dataProp:f,dataPropType:Sre.Type.Num},c),i.allErrors||t.if((0,Cd.not)(c),()=>t.break())})}s(u,"validateItems")}};Gq.default=kQe});var Ore=h(Vq=>{"use strict";Object.defineProperty(Vq,"__esModule",{value:!0});var BQe=bre(),GQe=vre(),VQe=[BQe.default,GQe.default];Vq.default=VQe});var Pre=h(zq=>{"use strict";Object.defineProperty(zq,"__esModule",{value:!0});var mr=Pe(),zQe={message:({schemaCode:e})=>(0,mr.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,mr._)`{format: ${e}}`},HQe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:zQe,code(e,t){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:d}=u;if(!c.validateFormats)return;i?_():m();function _(){let g=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),y=r.const("fDef",(0,mr._)`${g}[${a}]`),b=r.let("fType"),E=r.let("format");r.if((0,mr._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(b,(0,mr._)`${y}.type || "string"`).assign(E,(0,mr._)`${y}.validate`),()=>r.assign(b,(0,mr._)`"string"`).assign(E,y)),e.fail$data((0,mr.or)(v(),O()));function v(){return c.strictSchema===!1?mr.nil:(0,mr._)`${a} && !${E}`}s(v,"unknownFmt");function O(){let P=f.$async?(0,mr._)`(${y}.async ? await ${E}(${n}) : ${E}(${n}))`:(0,mr._)`${E}(${n})`,I=(0,mr._)`(typeof ${E} == "function" ? ${P} : ${E}.test(${n}))`;return(0,mr._)`${E} && ${E} !== true && ${b} === ${t} && !${I}`}s(O,"invalidFmt")}s(_,"validate$DataFormat");function m(){let g=d.formats[o];if(!g){v();return}if(g===!0)return;let[y,b,E]=O(g);y===t&&e.pass(P());function v(){if(c.strictSchema===!1){d.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${o}" ignored in schema at path "${l}"`}}s(v,"unknownFormat");function O(I){let j=I instanceof RegExp?(0,mr.regexpCode)(I):c.code.formats?(0,mr._)`${c.code.formats}${(0,mr.getProperty)(o)}`:void 0,x=r.scopeValue("formats",{key:o,ref:I,code:j});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,mr._)`${x}.validate`]:["string",I,x]}s(O,"getFormat");function P(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!f.$async)throw new Error("async format in sync schema");return(0,mr._)`await ${E}(${n})`}return typeof b=="function"?(0,mr._)`${E}(${n})`:(0,mr._)`${E}.test(${n})`}s(P,"validCondition")}s(m,"validateFormat")}};zq.default=HQe});var wre=h(Hq=>{"use strict";Object.defineProperty(Hq,"__esModule",{value:!0});var KQe=Pre(),WQe=[KQe.default];Hq.default=WQe});var Ire=h(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});Im.contentVocabulary=Im.metadataVocabulary=void 0;Im.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Im.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Nre=h(Kq=>{"use strict";Object.defineProperty(Kq,"__esModule",{value:!0});var YQe=yte(),JQe=$te(),XQe=sre(),ZQe=pre(),QQe=yre(),eet=Ore(),tet=wre(),Tre=Ire(),ret=[ZQe.default,YQe.default,JQe.default,(0,XQe.default)(!0),tet.default,Tre.metadataVocabulary,Tre.contentVocabulary,QQe.default,eet.default];Kq.default=ret});var Are=h(mE=>{"use strict";Object.defineProperty(mE,"__esModule",{value:!0});mE.DiscrError=void 0;var net;(function(e){e.Tag="tag",e.Mapping="mapping"})(net=mE.DiscrError||(mE.DiscrError={}))});var Cre=h(Yq=>{"use strict";Object.defineProperty(Yq,"__esModule",{value:!0});var Tm=Pe(),Wq=Are(),Rre=eE(),iet=ze(),set={message:({params:{discrError:e,tagName:t}})=>e===Wq.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Tm._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},oet={keyword:"discriminator",type:"object",schemaType:"object",error:set,code(e){let{gen:t,data:r,schema:n,parentSchema:i,it:o}=e,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let u=n.propertyName;if(typeof u!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",(0,Tm._)`${r}${(0,Tm.getProperty)(u)}`);t.if((0,Tm._)`typeof ${l} == "string"`,()=>f(),()=>e.error(!1,{discrError:Wq.DiscrError.Tag,tag:l,tagName:u})),e.ok(c);function f(){let m=_();t.if(!1);for(let g in m)t.elseIf((0,Tm._)`${l} === ${g}`),t.assign(c,d(m[g]));t.else(),e.error(!1,{discrError:Wq.DiscrError.Mapping,tag:l,tagName:u}),t.endIf()}s(f,"validateMapping");function d(m){let g=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:m},g);return e.mergeEvaluated(y,Tm.Name),g}s(d,"applyTagSchema");function _(){var m;let g={},y=E(i),b=!0;for(let P=0;P<a.length;P++){let I=a[P];I?.$ref&&!(0,iet.schemaHasRulesButRef)(I,o.self.RULES)&&(I=Rre.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,I?.$ref),I instanceof Rre.SchemaEnv&&(I=I.schema));let j=(m=I?.properties)===null||m===void 0?void 0:m[u];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`);b=b&&(y||E(I)),v(j,P)}if(!b)throw new Error(`discriminator: "${u}" must be required`);return g;function E({required:P}){return Array.isArray(P)&&P.includes(u)}function v(P,I){if(P.const)O(P.const,I);else if(P.enum)for(let j of P.enum)O(j,I);else throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`)}function O(P,I){if(typeof P!="string"||P in g)throw new Error(`discriminator: "${u}" values must be unique strings`);g[P]=I}}s(_,"getMapping")}};Yq.default=oet});var $re=h((gMt,aet)=>{aet.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}});var Dre=h((yMt,uet)=>{uet.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}}});var Lre=h((EMt,cet)=>{cet.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var jre=h((bMt,fet)=>{fet.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var Mre=h((SMt,det)=>{det.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}}});var Ure=h((vMt,pet)=>{pet.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var xre=h((OMt,het)=>{het.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}});var qre=h((PMt,met)=>{met.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var Fre=h(Jq=>{"use strict";Object.defineProperty(Jq,"__esModule",{value:!0});var _et=$re(),get=Dre(),yet=Lre(),Eet=jre(),bet=Mre(),vet=Ure(),Oet=xre(),Pet=qre(),wet=["/properties"];function Iet(e){return[_et,get,yet,Eet,bet,t(this,vet),Oet,t(this,Pet)].forEach(r=>this.addMetaSchema(r,void 0,!1)),this;function t(r,n){return e?r.$dataMetaSchema(n,wet):n}s(t,"with$data")}s(Iet,"addMetaSchema2020");Jq.default=Iet});var Bre=h((ir,kre)=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.MissingRefError=ir.ValidationError=ir.CodeGen=ir.Name=ir.nil=ir.stringify=ir.str=ir._=ir.KeywordCxt=void 0;var Tet=pte(),Net=Nre(),Aet=Cre(),Ret=Fre(),Xq="https://json-schema.org/draft/2020-12/schema",_T=class extends Tet.default{static{s(this,"Ajv2020")}constructor(t={}){super({...t,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),Net.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(Aet.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:t,meta:r}=this.opts;r&&(Ret.default.call(this,t),this.refs["http://json-schema.org/schema"]=Xq)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Xq)?Xq:void 0)}};kre.exports=ir=_T;Object.defineProperty(ir,"__esModule",{value:!0});ir.default=_T;var Cet=Q0();Object.defineProperty(ir,"KeywordCxt",{enumerable:!0,get:function(){return Cet.KeywordCxt}});var Nm=Pe();Object.defineProperty(ir,"_",{enumerable:!0,get:function(){return Nm._}});Object.defineProperty(ir,"str",{enumerable:!0,get:function(){return Nm.str}});Object.defineProperty(ir,"stringify",{enumerable:!0,get:function(){return Nm.stringify}});Object.defineProperty(ir,"nil",{enumerable:!0,get:function(){return Nm.nil}});Object.defineProperty(ir,"Name",{enumerable:!0,get:function(){return Nm.Name}});Object.defineProperty(ir,"CodeGen",{enumerable:!0,get:function(){return Nm.CodeGen}});var $et=XI();Object.defineProperty(ir,"ValidationError",{enumerable:!0,get:function(){return $et.default}});var Det=ZI();Object.defineProperty(ir,"MissingRefError",{enumerable:!0,get:function(){return Det.default}})});var Vre=h(Am=>{"use strict";var Gre=Am&&Am.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Am,"__esModule",{value:!0});Am.JsonValidator=void 0;var Let=Gre(HM()),jet=Gre(Bre()),Zq=class e{static{s(this,"JsonValidator")}static#t=new e;static get instance(){return e.#t}ajv;constructor(){this.ajv=new jet.default({allErrors:!0,allowUnionTypes:!0}),this.ajv.addKeyword("faker"),(0,Let.default)(this.ajv,{mode:"fast"})}addSchema(t,r){this.ajv.addSchema(t,r)}compile(t){let r=this.ajv.compile(t);return s(i=>({isValid:r(i),errors:this.toSimpleErrors(r.errors,i),warnings:[]}),"validator")}toSimpleErrors(t,r){let n=[];return t?.forEach(i=>{i.keyword==="enum"&&i.params.allowedValues&&Array.isArray(i.params.allowedValues)&&(i.message+=`; ${i.params.allowedValues.join(", ")}`),i.instancePath&&(i.instancePath=i.instancePath.replaceAll(/(\/)?(~1)(\/)?/gm,"/"));let o={details:{}},a=i.instancePath.split("/");if(a.length>2){let c=a[1],l=a[2]?parseInt(a[2]):0,f=a[3],d=isNaN(l)?void 0:r[c][l][f];o={details:{property:c,index:l,field:f,fieldValue:d}}}if(i.keyword==="required"&&i.params.missingProperty&&i.instancePath&&(i.message=`A 'path' is missing required property '${i.params.missingProperty}'`),i.keyword==="additionalProperties"&&i.params.additionalProperty&&i.instancePath&&(i.message=`A 'path' should NOT include property '${i.params.additionalProperty}'`),i.keyword==="type"&&i.params.type&&i.instancePath){let c=i.instancePath.split("/"),l=c[c.length-1];i.message=`Value of property '${l}' must be '${i.params.type}'`}let u=Object.assign(i,o);n.push(u)}),n}};Am.JsonValidator=Zq});var gT=h(_a=>{"use strict";var Rm=_a&&_a.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_a,"__esModule",{value:!0});_a.policiesConfigurationValidatorFn=_a.openAPIRouteConfigurationValidatorFn=_a.routeConfigurationValidatorFn=void 0;var Met=Rm(tee()),zre=Rm(ree()),Uet=Rm(nee()),Hre=Rm(iee()),Kre=Rm(see()),xet=Rm(oee()),qet=Vre(),Su=qet.JsonValidator.instance;Su.addSchema(xet.default,"routes.schema.json");Su.addSchema(Kre.default,"route-configuration.schema.json");Su.addSchema(Uet.default,"policy-configuration.schema.json");Su.addSchema(zre.default,"policies.schema.json");Su.addSchema(Hre.default,"open-api-route-configuration.schema.json");Su.addSchema(Met.default,"fragments.schema.json");_a.routeConfigurationValidatorFn=Su.compile(Kre.default);_a.openAPIRouteConfigurationValidatorFn=Su.compile(Hre.default);_a.policiesConfigurationValidatorFn=Su.compile(zre.default)});var Wre=h(yT=>{"use strict";Object.defineProperty(yT,"__esModule",{value:!0});yT.PoliciesConfigurationValidator=void 0;var Fet=gT(),Qq=class{static{s(this,"PoliciesConfigurationValidator")}results;validate(t){return this.results=(0,Fet.policiesConfigurationValidatorFn)(t),this.results}};yT.PoliciesConfigurationValidator=Qq});var Yre=h(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});Cm.OpenAPIGlobalValidator=Cm.OpenAPILocalizedValidator=void 0;var ket=gT(),e2=class{static{s(this,"OpenAPILocalizedValidator")}results;validate(t){return this.results=(0,ket.openAPIRouteConfigurationValidatorFn)(t),this.results}};Cm.OpenAPILocalizedValidator=e2;var t2=class{static{s(this,"OpenAPIGlobalValidator")}validate(t){return[]}};Cm.OpenAPIGlobalValidator=t2});var i2=h(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.testPosition=Ii.CodeGenError=Ii.JSON_ENV_REGEX=Ii.JSON_IMPORT_REGEX=Ii.ROUTE_ENV_REGEX=Ii.ROUTE_IMPORT_REGEX=void 0;var r2=Dc();Ii.ROUTE_IMPORT_REGEX=/\$import\((.*)\)/;Ii.ROUTE_ENV_REGEX=/\$env\((.*?)\)/g;Ii.JSON_IMPORT_REGEX=/require\("(.*)"\)/;Ii.JSON_ENV_REGEX=/\${environment.(.*)}/;var n2=class extends Error{static{s(this,"CodeGenError")}location;constructor(t,r,n,i){super(t),this.location={file:r,namespace:"",line:n?n.line:0,column:n?n.column:0,length:0,lineText:i??"",suggestion:""}}};Ii.CodeGenError=n2;var Bet=s(e=>{let t=[],r=e;for(;r.parent;)t.push(r),r=r.parent;return t.reverse()},"invertTree"),Get=s((e,t)=>{if(!e)return!1;let r=Bet(e);return t.split("/").every((o,a)=>{let u=r[a];return u?o==="*"||(0,r2.isAstProperty)(u)&&u.name.value===o?!0:o==="{}"?u.type===r2.SyntaxType.Object:o==="[]"?u.type===r2.SyntaxType.Array:!1:!1})},"testPosition");Ii.testPosition=Get});var Jre=h(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});Dm.getEnvStatementTransformer=Dm.AstTransformer=void 0;var $m=Dc(),Vet=qI(),_E=i2(),s2=class{static{s(this,"AstTransformer")}errors=[];transform(t){return this.visitor(t),t}visitor(t){this.visit(t),(0,$m.isAstObject)(t)?t.children.forEach(r=>{this.visitor(r)}):(0,$m.isAstArray)(t)?t.children.forEach(r=>{this.visitor(r)}):(0,$m.isAstProperty)(t)&&this.visitor(t.value)}};Dm.AstTransformer=s2;var zet=s((e,t,r)=>n=>{if(!(0,$m.isAstProperty)(n)||!(0,$m.isAstLiteral)(n.value)||typeof n.value.value!="string")return;if(!e.some(o=>(0,_E.testPosition)(n,o))){_E.ROUTE_ENV_REGEX.test(n.value.value)&&t.push(new _E.CodeGenError("An $env() statement is not expected at this location.",r,n.location,n.value.value));return}let i=new RegExp(_E.ROUTE_ENV_REGEX).exec(n.value.value);if(i?.length===2&&i[0]===n.value.value){let o={type:$m.SyntaxType.FunctionBody,parent:null,value:`environment["${i[1]}"]`};n.value=o}else{let o=n.value.value.replaceAll(new RegExp(_E.ROUTE_ENV_REGEX),(a,u)=>`\${environment["${u}"] ? environment["${u}"] : ""}`);o!==n.value.value&&(n.value=Vet.factory.createTemplateString(o,n))}},"getEnvStatementTransformer");Dm.getEnvStatementTransformer=zet});var ene=h(Lm=>{"use strict";var Het=Lm&&Lm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lm,"__esModule",{value:!0});Lm.OpenAPIRoutesFragmentAstTransformer=void 0;var Ket=Het(require("path")),Rs=Dc(),o2=qI(),Xre=Jre(),So=i2(),gE="config/routes.json",Wet=["handler/{}/options/*","policies/[]/{}/handler/{}/options/*","corsPolicies/[]/{}/*"],Yet=["handler/{}/module","handler/{}/options/{}/policies/{}/inbound/[]/{}/module","handler/{}/options/{}/policies/{}/outbound/[]/{}/module","policies/[]/{}/handler/{}/module","policies/[]/{}/handler/{}/options/{}/identifier/{}/module","policies/[]/{}/handler/{}/options/{}/validator"],Zre=["handler/{}/options/*","policies/[]/{}/handler/{}/options/*"],Jet="handler/{}/options/{}/rewritePattern",Xet="handler/{}/options/{}/baseUrl",a2=class extends Xre.AstTransformer{static{s(this,"OpenAPIRoutesFragmentAstTransformer")}visit(t){this.rewriteHandlerFunction(t),this.rewriteForwardFunction(t),this.replaceImportStatements(t),this.replaceEnvStatements(t)}rewriteHandlerFunction(t){if(!(!(0,Rs.isAstProperty)(t)||!(0,Rs.isAstLiteral)(t.value)||typeof t.value.value!="string")&&(0,So.testPosition)(t,Jet)){if(!t.parent||!(0,Rs.isAstObject)(t.parent)){this.errors.push(new So.CodeGenError("Invalid node, expected object",gE,t.parent?t.parent.location:t.location,void 0));return}let r=t.value.value,n={type:Rs.SyntaxType.FunctionBody,parent:null,value:Qre(r)},i=o2.factory.createProperty("__rewriteFunction",n,t);t.parent.children.push(i)}}rewriteForwardFunction(t){if(!(!(0,Rs.isAstProperty)(t)||!(0,Rs.isAstLiteral)(t.value)||typeof t.value.value!="string")&&(0,So.testPosition)(t,Xet)){if(!t.parent||!(0,Rs.isAstObject)(t.parent)){this.errors.push(new So.CodeGenError("Invalid node, expected object",gE,t.parent?t.parent.location:t.location,void 0));return}let r=t.value.value,n={type:Rs.SyntaxType.FunctionBody,parent:null,value:Qre(r)},i=o2.factory.createProperty("__rewriteFunction",n,t);t.parent.children.push(i)}}replaceImportStatements(t){if(!(0,Rs.isAstProperty)(t)||!(0,Rs.isAstLiteral)(t.value))return;let r=t.value.value;if(typeof r!="string")return;if(!Yet.some(a=>(0,So.testPosition)(t,a))&&!Zre.some(a=>(0,So.testPosition)(t,a))){if(So.ROUTE_IMPORT_REGEX.test(r)){if(t.name.value==="$ref")return;this.errors.push(new So.CodeGenError("An $import() statement is not expected at this location.",gE,t.location,r))}return}let n=So.ROUTE_IMPORT_REGEX.exec(r);if(Zre.some(a=>(0,So.testPosition)(t,a))&&!n)return;if(!n){this.errors.push(new So.CodeGenError("Invalid $import() statement",gE,t.location,r));return}let i=n[1];i.startsWith(".")&&(i=Ket.default.join("..",i));let o={name:null,type:Rs.SyntaxType.FunctionCall,parent:t.parent,children:[]};o.name={value:"require",type:Rs.SyntaxType.Identifier,parent:o},o.children.push(o2.factory.createLiteral(i,o)),t.value=o}replaceEnvStatements=(0,Xre.getEnvStatementTransformer)(Wet,this.errors,gE)};Lm.OpenAPIRoutesFragmentAstTransformer=a2;function Qre(e){return`(request, context) => {
178
178
  const { params, url, query, method, headers } = request;
179
179
  const { host, hostname, origin, pathname, port, search } = new URL(url);
180
180
  const e = encodeURIComponent;
181
181
  const env = environment;
182
182
  return \`${e.replaceAll("`","\\`")}\`
183
- }`}s(Qre,"buildRewriteFunction")});var tne=h(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.OPEN_API_MODE=ga.URL_PATTERN_MODE=ga.OPEN_API_ROUTE_EXTENSION=ga.OPEN_API_PATH_EXTENSION=void 0;ga.OPEN_API_PATH_EXTENSION="x-zuplo-path";ga.OPEN_API_ROUTE_EXTENSION="x-zuplo-route";ga.URL_PATTERN_MODE="url-pattern";ga.OPEN_API_MODE="open-api"});var gne=h((BMt,_ne)=>{"use strict";var l2=Object.defineProperty,Zet=Object.getOwnPropertyDescriptor,Qet=Object.getOwnPropertyNames,ett=Object.prototype.hasOwnProperty,ttt=s((e,t)=>{for(var r in t)l2(e,r,{get:t[r],enumerable:!0})},"Oe"),rtt=s((e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Qet(t))!ett.call(e,i)&&i!==r&&l2(e,i,{get:()=>t[i],enumerable:!(n=Zet(t,i))||n.enumerable});return e},"ke"),ntt=s(e=>rtt(l2({},"__esModule",{value:!0}),e),"Te"),ine={};ttt(ine,{URLPattern:()=>Att});_ne.exports=ntt(ine);var bE=class{static{s(this,"R")}type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(e,t,r,n,i,o){this.type=e,this.name=t,this.prefix=r,this.value=n,this.suffix=i,this.modifier=o}hasCustomName(){return this.name!==""&&typeof this.name!="number"}},itt=/[$_\p{ID_Start}]/u,stt=/[$_\u200C\u200D\p{ID_Continue}]/u,c2=".*";function ott(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}s(ott,"we");function sne(e,t=!1){let r=[],n=0;for(;n<e.length;){let i=e[n],o=s(function(a){if(!t)throw new TypeError(a);r.push({type:"INVALID_CHAR",index:n,value:e[n++]})},"c");if(i==="*"){r.push({type:"ASTERISK",index:n,value:e[n++]});continue}if(i==="+"||i==="?"){r.push({type:"OTHER_MODIFIER",index:n,value:e[n++]});continue}if(i==="\\"){r.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});continue}if(i==="{"){r.push({type:"OPEN",index:n,value:e[n++]});continue}if(i==="}"){r.push({type:"CLOSE",index:n,value:e[n++]});continue}if(i===":"){let a="",u=n+1;for(;u<e.length;){let c=e.substr(u,1);if(u===n+1&&itt.test(c)||u!==n+1&&stt.test(c)){a+=e[u++];continue}break}if(!a){o(`Missing parameter name at ${n}`);continue}r.push({type:"NAME",index:n,value:a}),n=u;continue}if(i==="("){let a=1,u="",c=n+1,l=!1;if(e[c]==="?"){o(`Pattern cannot start with "?" at ${c}`);continue}for(;c<e.length;){if(!ott(e[c],!1)){o(`Invalid character '${e[c]}' at ${c}.`),l=!0;break}if(e[c]==="\\"){u+=e[c++]+e[c++];continue}if(e[c]===")"){if(a--,a===0){c++;break}}else if(e[c]==="("&&(a++,e[c+1]!=="?")){o(`Capturing groups are not allowed at ${c}`),l=!0;break}u+=e[c++]}if(l)continue;if(a){o(`Unbalanced pattern at ${n}`);continue}if(!u){o(`Missing pattern at ${n}`);continue}r.push({type:"REGEX",index:n,value:u}),n=c;continue}r.push({type:"CHAR",index:n,value:e[n++]})}return r.push({type:"END",index:n,value:""}),r}s(sne,"D");function one(e,t={}){let r=sne(e);t.delimiter??="/#?",t.prefixes??="./";let n=`[^${Cs(t.delimiter)}]+?`,i=[],o=0,a=0,u="",c=new Set,l=s(O=>{if(a<r.length&&r[a].type===O)return r[a++].value},"o"),f=s(()=>l("OTHER_MODIFIER")??l("ASTERISK"),"f"),d=s(O=>{let P=l(O);if(P!==void 0)return P;let{type:I,index:j}=r[a];throw new TypeError(`Unexpected ${I} at ${j}, expected ${O}`)},"d"),_=s(()=>{let O="",P;for(;P=l("CHAR")??l("ESCAPED_CHAR");)O+=P;return O},"T"),m=s(O=>O,"xe"),g=t.encodePart||m,y="",b=s(O=>{y+=O},"U"),E=s(()=>{y.length&&(i.push(new bE(3,"","",g(y),"",3)),y="")},"$"),S=s((O,P,I,j,x)=>{let H=3;switch(x){case"?":H=1;break;case"*":H=0;break;case"+":H=2;break}if(!P&&!I&&H===3){b(O);return}if(E(),!P&&!I){if(!O)return;i.push(new bE(3,"","",g(O),"",H));return}let K;I?I==="*"?K=c2:K=I:K=n;let Q=2;K===n?(Q=1,K=""):K===c2&&(Q=0,K="");let de;if(P?de=P:I&&(de=o++),c.has(de))throw new TypeError(`Duplicate name '${de}'.`);c.add(de),i.push(new bE(Q,de,g(O),K,g(j),H))},"X");for(;a<r.length;){let O=l("CHAR"),P=l("NAME"),I=l("REGEX");if(!P&&!I&&(I=l("ASTERISK")),P||I){let x=O??"";t.prefixes.indexOf(x)===-1&&(b(x),x=""),E();let H=f();S(x,P,I,"",H);continue}let j=O??l("ESCAPED_CHAR");if(j){b(j);continue}if(l("OPEN")){let x=_(),H=l("NAME"),K=l("REGEX");!H&&!K&&(K=l("ASTERISK"));let Q=_();d("CLOSE");let de=f();S(x,H,K,Q,de);continue}E(),d("END")}return i}s(one,"F");function Cs(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}s(Cs,"S");function rne(e){return e&&e.ignoreCase?"ui":"u"}s(rne,"B");function att(e,t,r){return ane(one(e,r),t,r)}s(att,"q");function jm(e){switch(e){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}s(jm,"k");function ane(e,t,r={}){r.delimiter??="/#?",r.prefixes??="./",r.sensitive??=!1,r.strict??=!1,r.end??=!0,r.start??=!0,r.endsWith="";let n=r.start?"^":"";for(let u of e){if(u.type===3){u.modifier===3?n+=Cs(u.value):n+=`(?:${Cs(u.value)})${jm(u.modifier)}`;continue}t&&t.push(u.name);let c=`[^${Cs(r.delimiter)}]+?`,l=u.value;if(u.type===1?l=c:u.type===0&&(l=c2),!u.prefix.length&&!u.suffix.length){u.modifier===3||u.modifier===1?n+=`(${l})${jm(u.modifier)}`:n+=`((?:${l})${jm(u.modifier)})`;continue}if(u.modifier===3||u.modifier===1){n+=`(?:${Cs(u.prefix)}(${l})${Cs(u.suffix)})`,n+=jm(u.modifier);continue}n+=`(?:${Cs(u.prefix)}`,n+=`((?:${l})(?:`,n+=Cs(u.suffix),n+=Cs(u.prefix),n+=`(?:${l}))*)${Cs(u.suffix)})`,u.modifier===0&&(n+="?")}let i=`[${Cs(r.endsWith)}]|$`,o=`[${Cs(r.delimiter)}]`;if(r.end)return r.strict||(n+=`${o}?`),r.endsWith.length?n+=`(?=${i})`:n+="$",new RegExp(n,rne(r));r.strict||(n+=`(?:${o}(?=${i}))?`);let a=!1;if(e.length){let u=e[e.length-1];u.type===3&&u.modifier===3&&(a=r.delimiter.indexOf(u)>-1)}return a||(n+=`(?=${o}|${i})`),new RegExp(n,rne(r))}s(ane,"W");var Bc={delimiter:"",prefixes:"",sensitive:!0,strict:!0},utt={delimiter:".",prefixes:"",sensitive:!0,strict:!0},ctt={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function ltt(e,t){return e.length?e[0]==="/"?!0:!t||e.length<2?!1:(e[0]=="\\"||e[0]=="{")&&e[1]=="/":!1}s(ltt,"ee");function une(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}s(une,"te");function ftt(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}s(ftt,"Ce");function cne(e){return!e||e.length<2?!1:e[0]==="["||(e[0]==="\\"||e[0]==="{")&&e[1]==="["}s(cne,"_");var lne=["ftp","file","http","https","ws","wss"];function fne(e){if(!e)return!0;for(let t of lne)if(e.test(t))return!0;return!1}s(fne,"N");function dtt(e,t){if(e=une(e,"#"),t||e==="")return e;let r=new URL("https://example.com");return r.hash=e,r.hash?r.hash.substring(1,r.hash.length):""}s(dtt,"ne");function ptt(e,t){if(e=une(e,"?"),t||e==="")return e;let r=new URL("https://example.com");return r.search=e,r.search?r.search.substring(1,r.search.length):""}s(ptt,"se");function htt(e,t){return t||e===""?e:cne(e)?hne(e):pne(e)}s(htt,"ie");function mtt(e,t){if(t||e==="")return e;let r=new URL("https://example.com");return r.password=e,r.password}s(mtt,"ae");function _tt(e,t){if(t||e==="")return e;let r=new URL("https://example.com");return r.username=e,r.username}s(_tt,"oe");function gtt(e,t,r){if(r||e==="")return e;if(t&&!lne.includes(t))return new URL(`${t}:${e}`).pathname;let n=e[0]=="/";return e=new URL(n?e:"/-"+e,"https://example.com").pathname,n||(e=e.substring(2,e.length)),e}s(gtt,"ce");function ytt(e,t,r){return dne(t)===e&&(e=""),r||e===""?e:mne(e)}s(ytt,"le");function Ett(e,t){return e=ftt(e,":"),t||e===""?e:f2(e)}s(Ett,"fe");function dne(e){switch(e){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}s(dne,"z");function f2(e){if(e==="")return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw new TypeError(`Invalid protocol '${e}'.`)}s(f2,"y");function btt(e){if(e==="")return e;let t=new URL("https://example.com");return t.username=e,t.username}s(btt,"he");function Stt(e){if(e==="")return e;let t=new URL("https://example.com");return t.password=e,t.password}s(Stt,"ue");function pne(e){if(e==="")return e;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e))throw new TypeError(`Invalid hostname '${e}'`);let t=new URL("https://example.com");return t.hostname=e,t.hostname}s(pne,"j");function hne(e){if(e==="")return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw new TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}s(hne,"K");function mne(e){if(e===""||/^[0-9]*$/.test(e)&&parseInt(e)<=65535)return e;throw new TypeError(`Invalid port '${e}'.`)}s(mne,"G");function vtt(e){if(e==="")return e;let t=new URL("https://example.com");return t.pathname=e[0]!=="/"?"/-"+e:e,e[0]!=="/"?t.pathname.substring(2,t.pathname.length):t.pathname}s(vtt,"de");function Ott(e){return e===""?e:new URL(`data:${e}`).pathname}s(Ott,"pe");function Ptt(e){if(e==="")return e;let t=new URL("https://example.com");return t.search=e,t.search.substring(1,t.search.length)}s(Ptt,"ge");function wtt(e){if(e==="")return e;let t=new URL("https://example.com");return t.hash=e,t.hash.substring(1,t.hash.length)}s(wtt,"me");var Itt=class{static{s(this,"H")}#t;#r=[];#n={};#e=0;#s=1;#c=0;#f=0;#l=0;#a=0;#i=!1;constructor(e){this.#t=e}get result(){return this.#n}parse(){for(this.#r=sne(this.#t,!0);this.#e<this.#r.length;this.#e+=this.#s){if(this.#s=1,this.#r[this.#e].type==="END"){if(this.#f===0){this.#_(),this.#y()?this.#u(9,1):this.#P()?this.#u(8,1):this.#u(7,0);continue}else if(this.#f===2){this.#p(5);continue}this.#u(10,0);break}if(this.#l>0)if(this.#o())this.#l-=1;else continue;if(this.#w()){this.#l+=1;continue}switch(this.#f){case 0:this.#I()&&this.#p(1);break;case 1:if(this.#I()){this.#$();let e=7,t=1;this.#A()?(e=2,t=3):this.#i&&(e=2),this.#u(e,t)}break;case 2:this.#O()?this.#p(3):(this.#m()||this.#P()||this.#y())&&this.#p(5);break;case 3:this.#v()?this.#u(4,1):this.#O()&&this.#u(5,1);break;case 4:this.#O()&&this.#u(5,1);break;case 5:this.#S()?this.#a+=1:this.#R()&&(this.#a-=1),this.#T()&&!this.#a?this.#u(6,1):this.#m()?this.#u(7,0):this.#P()?this.#u(8,1):this.#y()&&this.#u(9,1);break;case 6:this.#m()?this.#u(7,0):this.#P()?this.#u(8,1):this.#y()&&this.#u(9,1);break;case 7:this.#P()?this.#u(8,1):this.#y()&&this.#u(9,1);break;case 8:this.#y()&&this.#u(9,1);break;case 9:break;case 10:break}}this.#n.hostname!==void 0&&this.#n.port===void 0&&(this.#n.port="")}#u(e,t){switch(this.#f){case 0:break;case 1:this.#n.protocol=this.#g();break;case 2:break;case 3:this.#n.username=this.#g();break;case 4:this.#n.password=this.#g();break;case 5:this.#n.hostname=this.#g();break;case 6:this.#n.port=this.#g();break;case 7:this.#n.pathname=this.#g();break;case 8:this.#n.search=this.#g();break;case 9:this.#n.hash=this.#g();break;case 10:break}this.#f!==0&&e!==10&&([1,2,3,4].includes(this.#f)&&[6,7,8,9].includes(e)&&(this.#n.hostname??=""),[1,2,3,4,5,6].includes(this.#f)&&[8,9].includes(e)&&(this.#n.pathname??=this.#i?"/":""),[1,2,3,4,5,6,7].includes(this.#f)&&e===9&&(this.#n.search??="")),this.#E(e,t)}#E(e,t){this.#f=e,this.#c=this.#e+t,this.#e+=t,this.#s=0}#_(){this.#e=this.#c,this.#s=0}#p(e){this.#_(),this.#f=e}#b(e){return e<0&&(e=this.#r.length-e),e<this.#r.length?this.#r[e]:this.#r[this.#r.length-1]}#d(e,t){let r=this.#b(e);return r.value===t&&(r.type==="CHAR"||r.type==="ESCAPED_CHAR"||r.type==="INVALID_CHAR")}#I(){return this.#d(this.#e,":")}#A(){return this.#d(this.#e+1,"/")&&this.#d(this.#e+2,"/")}#O(){return this.#d(this.#e,"@")}#v(){return this.#d(this.#e,":")}#T(){return this.#d(this.#e,":")}#m(){return this.#d(this.#e,"/")}#P(){if(this.#d(this.#e,"?"))return!0;if(this.#r[this.#e].value!=="?")return!1;let e=this.#b(this.#e-1);return e.type!=="NAME"&&e.type!=="REGEX"&&e.type!=="CLOSE"&&e.type!=="ASTERISK"}#y(){return this.#d(this.#e,"#")}#w(){return this.#r[this.#e].type=="OPEN"}#o(){return this.#r[this.#e].type=="CLOSE"}#S(){return this.#d(this.#e,"[")}#R(){return this.#d(this.#e,"]")}#g(){let e=this.#r[this.#e],t=this.#b(this.#c).index;return this.#t.substring(t,e.index)}#$(){let e={};Object.assign(e,Bc),e.encodePart=f2;let t=att(this.#g(),void 0,e);this.#i=fne(t)}},u2=["protocol","username","password","hostname","port","pathname","search","hash"],kc="*";function nne(e,t){if(typeof e!="string")throw new TypeError("parameter 1 is not of type 'string'.");let r=new URL(e,t);return{protocol:r.protocol.substring(0,r.protocol.length-1),username:r.username,password:r.password,hostname:r.hostname,port:r.port,pathname:r.pathname,search:r.search!==""?r.search.substring(1,r.search.length):void 0,hash:r.hash!==""?r.hash.substring(1,r.hash.length):void 0}}s(nne,"Se");function vu(e,t){return t?EE(e):e}s(vu,"b");function yE(e,t,r){let n;if(typeof t.baseURL=="string")try{n=new URL(t.baseURL),t.protocol===void 0&&(e.protocol=vu(n.protocol.substring(0,n.protocol.length-1),r)),!r&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&(e.username=vu(n.username,r)),!r&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&t.password===void 0&&(e.password=vu(n.password,r)),t.protocol===void 0&&t.hostname===void 0&&(e.hostname=vu(n.hostname,r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&(e.port=vu(n.port,r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&(e.pathname=vu(n.pathname,r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&(e.search=vu(n.search.substring(1,n.search.length),r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&t.hash===void 0&&(e.hash=vu(n.hash.substring(1,n.hash.length),r))}catch{throw new TypeError(`invalid baseURL '${t.baseURL}'.`)}if(typeof t.protocol=="string"&&(e.protocol=Ett(t.protocol,r)),typeof t.username=="string"&&(e.username=_tt(t.username,r)),typeof t.password=="string"&&(e.password=mtt(t.password,r)),typeof t.hostname=="string"&&(e.hostname=htt(t.hostname,r)),typeof t.port=="string"&&(e.port=ytt(t.port,e.protocol,r)),typeof t.pathname=="string"){if(e.pathname=t.pathname,n&&!ltt(e.pathname,r)){let i=n.pathname.lastIndexOf("/");i>=0&&(e.pathname=vu(n.pathname.substring(0,i+1),r)+e.pathname)}e.pathname=gtt(e.pathname,e.protocol,r)}return typeof t.search=="string"&&(e.search=ptt(t.search,r)),typeof t.hash=="string"&&(e.hash=dtt(t.hash,r)),e}s(yE,"w");function EE(e){return e.replace(/([+*?:{}()\\])/g,"\\$1")}s(EE,"C");function Ttt(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}s(Ttt,"Le");function Ntt(e,t){t.delimiter??="/#?",t.prefixes??="./",t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith="";let r=".*",n=`[^${Ttt(t.delimiter)}]+?`,i=/[$_\u200C\u200D\p{ID_Continue}]/u,o="";for(let a=0;a<e.length;++a){let u=e[a];if(u.type===3){if(u.modifier===3){o+=EE(u.value);continue}o+=`{${EE(u.value)}}${jm(u.modifier)}`;continue}let c=u.hasCustomName(),l=!!u.suffix.length||!!u.prefix.length&&(u.prefix.length!==1||!t.prefixes.includes(u.prefix)),f=a>0?e[a-1]:null,d=a<e.length-1?e[a+1]:null;if(!l&&c&&u.type===1&&u.modifier===3&&d&&!d.prefix.length&&!d.suffix.length)if(d.type===3){let _=d.value.length>0?d.value[0]:"";l=i.test(_)}else l=!d.hasCustomName();if(!l&&!u.prefix.length&&f&&f.type===3){let _=f.value[f.value.length-1];l=t.prefixes.includes(_)}l&&(o+="{"),o+=EE(u.prefix),c&&(o+=`:${u.name}`),u.type===2?o+=`(${u.value})`:u.type===1?c||(o+=`(${n})`):u.type===0&&(!c&&(!f||f.type===3||f.modifier!==3||l||u.prefix!=="")?o+="*":o+=`(${r})`),u.type===1&&c&&u.suffix.length&&i.test(u.suffix[0])&&(o+="\\"),o+=EE(u.suffix),l&&(o+="}"),u.modifier!==3&&(o+=jm(u.modifier))}return o}s(Ntt,"Ie");var Att=class{static{s(this,"Y")}#t;#r={};#n={};#e={};#s={};#c=!1;constructor(e={},t,r){try{let n;if(typeof t=="string"?n=t:r=t,typeof e=="string"){let u=new Itt(e);if(u.parse(),e=u.result,n===void 0&&typeof e.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");e.baseURL=n}else{if(!e||typeof e!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(n)throw new TypeError("parameter 1 is not of type 'string'.")}typeof r>"u"&&(r={ignoreCase:!1});let i={ignoreCase:r.ignoreCase===!0},o={pathname:kc,protocol:kc,username:kc,password:kc,hostname:kc,port:kc,search:kc,hash:kc};this.#t=yE(o,e,!0),dne(this.#t.protocol)===this.#t.port&&(this.#t.port="");let a;for(a of u2){if(!(a in this.#t))continue;let u={},c=this.#t[a];switch(this.#n[a]=[],a){case"protocol":Object.assign(u,Bc),u.encodePart=f2;break;case"username":Object.assign(u,Bc),u.encodePart=btt;break;case"password":Object.assign(u,Bc),u.encodePart=Stt;break;case"hostname":Object.assign(u,utt),cne(c)?u.encodePart=hne:u.encodePart=pne;break;case"port":Object.assign(u,Bc),u.encodePart=mne;break;case"pathname":fne(this.#r.protocol)?(Object.assign(u,ctt,i),u.encodePart=vtt):(Object.assign(u,Bc,i),u.encodePart=Ott);break;case"search":Object.assign(u,Bc,i),u.encodePart=Ptt;break;case"hash":Object.assign(u,Bc,i),u.encodePart=wtt;break}try{this.#s[a]=one(c,u),this.#r[a]=ane(this.#s[a],this.#n[a],u),this.#e[a]=Ntt(this.#s[a],u),this.#c=this.#c||this.#s[a].some(l=>l.type===2)}catch{throw new TypeError(`invalid ${a} pattern '${this.#t[a]}'.`)}}}catch(n){throw new TypeError(`Failed to construct 'URLPattern': ${n.message}`)}}test(e={},t){let r={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof e!="string"&&t)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof e>"u")return!1;try{typeof e=="object"?r=yE(r,e,!1):r=yE(r,nne(e,t),!1)}catch{return!1}let n;for(n of u2)if(!this.#r[n].exec(r[n]))return!1;return!0}exec(e={},t){let r={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof e!="string"&&t)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof e>"u")return;try{typeof e=="object"?r=yE(r,e,!1):r=yE(r,nne(e,t),!1)}catch{return null}let n={};t?n.inputs=[e,t]:n.inputs=[e];let i;for(i of u2){let o=this.#r[i].exec(r[i]);if(!o)return null;let a={};for(let[u,c]of this.#n[i].entries())if(typeof c=="string"||typeof c=="number"){let l=o[u+1];a[c]=l}n[i]={input:r[i]??"",groups:a}}return n}static compareComponent(e,t,r){let n=s((u,c)=>{for(let l of["type","modifier","prefix","value","suffix"]){if(u[l]<c[l])return-1;if(u[l]!==c[l])return 1}return 0},"a"),i=new bE(3,"","","","",3),o=new bE(0,"","","","",3),a=s((u,c)=>{let l=0;for(;l<Math.min(u.length,c.length);++l){let f=n(u[l],c[l]);if(f)return f}return u.length===c.length?0:n(u[l]??i,c[l]??i)},"s");return!t.#e[e]&&!r.#e[e]?0:t.#e[e]&&!r.#e[e]?a(t.#s[e],[o]):!t.#e[e]&&r.#e[e]?a([o],r.#s[e]):a(t.#s[e],r.#s[e])}get protocol(){return this.#e.protocol}get username(){return this.#e.username}get password(){return this.#e.password}get hostname(){return this.#e.hostname}get port(){return this.#e.port}get pathname(){return this.#e.pathname}get search(){return this.#e.search}get hash(){return this.#e.hash}get hasRegExpGroups(){return this.#c}}});var bne=h((KMt,Ene)=>{var{URLPattern:yne}=gne();Ene.exports={URLPattern:yne};globalThis.URLPattern||(globalThis.URLPattern=yne)});var Cne=h(Ea=>{"use strict";var m2=Ea&&Ea.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ea,"__esModule",{value:!0});Ea.embellishWithRawOpenApi=Ea.embellishWithPathPattern=Ea.compileRoutes=void 0;var Rtt=require("@zuplo/runtime/internal"),d2=m2(_n()),Ctt=m2(VQ()),ya=require("jsonc-parser"),h2=m2(require("path")),bT=rx(),Sne=ZQ(),vo=Dc(),SE=qI(),vne=QQ(),$tt=eee(),One=nx(),Dtt=Wre(),Ltt=Yre(),Pne=ene(),Wn=tne(),Tne=globalThis;Tne.URLPattern||bne();var jtt=Tne.URLPattern,Mtt=Ctt.default.compile(`
183
+ }`}s(Qre,"buildRewriteFunction")});var tne=h(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.OPEN_API_MODE=ga.URL_PATTERN_MODE=ga.OPEN_API_ROUTE_EXTENSION=ga.OPEN_API_PATH_EXTENSION=void 0;ga.OPEN_API_PATH_EXTENSION="x-zuplo-path";ga.OPEN_API_ROUTE_EXTENSION="x-zuplo-route";ga.URL_PATTERN_MODE="url-pattern";ga.OPEN_API_MODE="open-api"});var gne=h((BMt,_ne)=>{"use strict";var l2=Object.defineProperty,Zet=Object.getOwnPropertyDescriptor,Qet=Object.getOwnPropertyNames,ett=Object.prototype.hasOwnProperty,ttt=s((e,t)=>{for(var r in t)l2(e,r,{get:t[r],enumerable:!0})},"Oe"),rtt=s((e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Qet(t))!ett.call(e,i)&&i!==r&&l2(e,i,{get:()=>t[i],enumerable:!(n=Zet(t,i))||n.enumerable});return e},"ke"),ntt=s(e=>rtt(l2({},"__esModule",{value:!0}),e),"Te"),ine={};ttt(ine,{URLPattern:()=>Att});_ne.exports=ntt(ine);var bE=class{static{s(this,"R")}type=3;name="";prefix="";value="";suffix="";modifier=3;constructor(e,t,r,n,i,o){this.type=e,this.name=t,this.prefix=r,this.value=n,this.suffix=i,this.modifier=o}hasCustomName(){return this.name!==""&&typeof this.name!="number"}},itt=/[$_\p{ID_Start}]/u,stt=/[$_\u200C\u200D\p{ID_Continue}]/u,c2=".*";function ott(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}s(ott,"we");function sne(e,t=!1){let r=[],n=0;for(;n<e.length;){let i=e[n],o=s(function(a){if(!t)throw new TypeError(a);r.push({type:"INVALID_CHAR",index:n,value:e[n++]})},"c");if(i==="*"){r.push({type:"ASTERISK",index:n,value:e[n++]});continue}if(i==="+"||i==="?"){r.push({type:"OTHER_MODIFIER",index:n,value:e[n++]});continue}if(i==="\\"){r.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});continue}if(i==="{"){r.push({type:"OPEN",index:n,value:e[n++]});continue}if(i==="}"){r.push({type:"CLOSE",index:n,value:e[n++]});continue}if(i===":"){let a="",u=n+1;for(;u<e.length;){let c=e.substr(u,1);if(u===n+1&&itt.test(c)||u!==n+1&&stt.test(c)){a+=e[u++];continue}break}if(!a){o(`Missing parameter name at ${n}`);continue}r.push({type:"NAME",index:n,value:a}),n=u;continue}if(i==="("){let a=1,u="",c=n+1,l=!1;if(e[c]==="?"){o(`Pattern cannot start with "?" at ${c}`);continue}for(;c<e.length;){if(!ott(e[c],!1)){o(`Invalid character '${e[c]}' at ${c}.`),l=!0;break}if(e[c]==="\\"){u+=e[c++]+e[c++];continue}if(e[c]===")"){if(a--,a===0){c++;break}}else if(e[c]==="("&&(a++,e[c+1]!=="?")){o(`Capturing groups are not allowed at ${c}`),l=!0;break}u+=e[c++]}if(l)continue;if(a){o(`Unbalanced pattern at ${n}`);continue}if(!u){o(`Missing pattern at ${n}`);continue}r.push({type:"REGEX",index:n,value:u}),n=c;continue}r.push({type:"CHAR",index:n,value:e[n++]})}return r.push({type:"END",index:n,value:""}),r}s(sne,"D");function one(e,t={}){let r=sne(e);t.delimiter??="/#?",t.prefixes??="./";let n=`[^${Cs(t.delimiter)}]+?`,i=[],o=0,a=0,u="",c=new Set,l=s(O=>{if(a<r.length&&r[a].type===O)return r[a++].value},"o"),f=s(()=>l("OTHER_MODIFIER")??l("ASTERISK"),"f"),d=s(O=>{let P=l(O);if(P!==void 0)return P;let{type:I,index:j}=r[a];throw new TypeError(`Unexpected ${I} at ${j}, expected ${O}`)},"d"),_=s(()=>{let O="",P;for(;P=l("CHAR")??l("ESCAPED_CHAR");)O+=P;return O},"T"),m=s(O=>O,"xe"),g=t.encodePart||m,y="",b=s(O=>{y+=O},"U"),E=s(()=>{y.length&&(i.push(new bE(3,"","",g(y),"",3)),y="")},"$"),v=s((O,P,I,j,x)=>{let H=3;switch(x){case"?":H=1;break;case"*":H=0;break;case"+":H=2;break}if(!P&&!I&&H===3){b(O);return}if(E(),!P&&!I){if(!O)return;i.push(new bE(3,"","",g(O),"",H));return}let K;I?I==="*"?K=c2:K=I:K=n;let Q=2;K===n?(Q=1,K=""):K===c2&&(Q=0,K="");let de;if(P?de=P:I&&(de=o++),c.has(de))throw new TypeError(`Duplicate name '${de}'.`);c.add(de),i.push(new bE(Q,de,g(O),K,g(j),H))},"X");for(;a<r.length;){let O=l("CHAR"),P=l("NAME"),I=l("REGEX");if(!P&&!I&&(I=l("ASTERISK")),P||I){let x=O??"";t.prefixes.indexOf(x)===-1&&(b(x),x=""),E();let H=f();v(x,P,I,"",H);continue}let j=O??l("ESCAPED_CHAR");if(j){b(j);continue}if(l("OPEN")){let x=_(),H=l("NAME"),K=l("REGEX");!H&&!K&&(K=l("ASTERISK"));let Q=_();d("CLOSE");let de=f();v(x,H,K,Q,de);continue}E(),d("END")}return i}s(one,"F");function Cs(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}s(Cs,"S");function rne(e){return e&&e.ignoreCase?"ui":"u"}s(rne,"B");function att(e,t,r){return ane(one(e,r),t,r)}s(att,"q");function jm(e){switch(e){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}s(jm,"k");function ane(e,t,r={}){r.delimiter??="/#?",r.prefixes??="./",r.sensitive??=!1,r.strict??=!1,r.end??=!0,r.start??=!0,r.endsWith="";let n=r.start?"^":"";for(let u of e){if(u.type===3){u.modifier===3?n+=Cs(u.value):n+=`(?:${Cs(u.value)})${jm(u.modifier)}`;continue}t&&t.push(u.name);let c=`[^${Cs(r.delimiter)}]+?`,l=u.value;if(u.type===1?l=c:u.type===0&&(l=c2),!u.prefix.length&&!u.suffix.length){u.modifier===3||u.modifier===1?n+=`(${l})${jm(u.modifier)}`:n+=`((?:${l})${jm(u.modifier)})`;continue}if(u.modifier===3||u.modifier===1){n+=`(?:${Cs(u.prefix)}(${l})${Cs(u.suffix)})`,n+=jm(u.modifier);continue}n+=`(?:${Cs(u.prefix)}`,n+=`((?:${l})(?:`,n+=Cs(u.suffix),n+=Cs(u.prefix),n+=`(?:${l}))*)${Cs(u.suffix)})`,u.modifier===0&&(n+="?")}let i=`[${Cs(r.endsWith)}]|$`,o=`[${Cs(r.delimiter)}]`;if(r.end)return r.strict||(n+=`${o}?`),r.endsWith.length?n+=`(?=${i})`:n+="$",new RegExp(n,rne(r));r.strict||(n+=`(?:${o}(?=${i}))?`);let a=!1;if(e.length){let u=e[e.length-1];u.type===3&&u.modifier===3&&(a=r.delimiter.indexOf(u)>-1)}return a||(n+=`(?=${o}|${i})`),new RegExp(n,rne(r))}s(ane,"W");var Bc={delimiter:"",prefixes:"",sensitive:!0,strict:!0},utt={delimiter:".",prefixes:"",sensitive:!0,strict:!0},ctt={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function ltt(e,t){return e.length?e[0]==="/"?!0:!t||e.length<2?!1:(e[0]=="\\"||e[0]=="{")&&e[1]=="/":!1}s(ltt,"ee");function une(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}s(une,"te");function ftt(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}s(ftt,"Ce");function cne(e){return!e||e.length<2?!1:e[0]==="["||(e[0]==="\\"||e[0]==="{")&&e[1]==="["}s(cne,"_");var lne=["ftp","file","http","https","ws","wss"];function fne(e){if(!e)return!0;for(let t of lne)if(e.test(t))return!0;return!1}s(fne,"N");function dtt(e,t){if(e=une(e,"#"),t||e==="")return e;let r=new URL("https://example.com");return r.hash=e,r.hash?r.hash.substring(1,r.hash.length):""}s(dtt,"ne");function ptt(e,t){if(e=une(e,"?"),t||e==="")return e;let r=new URL("https://example.com");return r.search=e,r.search?r.search.substring(1,r.search.length):""}s(ptt,"se");function htt(e,t){return t||e===""?e:cne(e)?hne(e):pne(e)}s(htt,"ie");function mtt(e,t){if(t||e==="")return e;let r=new URL("https://example.com");return r.password=e,r.password}s(mtt,"ae");function _tt(e,t){if(t||e==="")return e;let r=new URL("https://example.com");return r.username=e,r.username}s(_tt,"oe");function gtt(e,t,r){if(r||e==="")return e;if(t&&!lne.includes(t))return new URL(`${t}:${e}`).pathname;let n=e[0]=="/";return e=new URL(n?e:"/-"+e,"https://example.com").pathname,n||(e=e.substring(2,e.length)),e}s(gtt,"ce");function ytt(e,t,r){return dne(t)===e&&(e=""),r||e===""?e:mne(e)}s(ytt,"le");function Ett(e,t){return e=ftt(e,":"),t||e===""?e:f2(e)}s(Ett,"fe");function dne(e){switch(e){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}s(dne,"z");function f2(e){if(e==="")return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw new TypeError(`Invalid protocol '${e}'.`)}s(f2,"y");function btt(e){if(e==="")return e;let t=new URL("https://example.com");return t.username=e,t.username}s(btt,"he");function Stt(e){if(e==="")return e;let t=new URL("https://example.com");return t.password=e,t.password}s(Stt,"ue");function pne(e){if(e==="")return e;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e))throw new TypeError(`Invalid hostname '${e}'`);let t=new URL("https://example.com");return t.hostname=e,t.hostname}s(pne,"j");function hne(e){if(e==="")return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw new TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}s(hne,"K");function mne(e){if(e===""||/^[0-9]*$/.test(e)&&parseInt(e)<=65535)return e;throw new TypeError(`Invalid port '${e}'.`)}s(mne,"G");function vtt(e){if(e==="")return e;let t=new URL("https://example.com");return t.pathname=e[0]!=="/"?"/-"+e:e,e[0]!=="/"?t.pathname.substring(2,t.pathname.length):t.pathname}s(vtt,"de");function Ott(e){return e===""?e:new URL(`data:${e}`).pathname}s(Ott,"pe");function Ptt(e){if(e==="")return e;let t=new URL("https://example.com");return t.search=e,t.search.substring(1,t.search.length)}s(Ptt,"ge");function wtt(e){if(e==="")return e;let t=new URL("https://example.com");return t.hash=e,t.hash.substring(1,t.hash.length)}s(wtt,"me");var Itt=class{static{s(this,"H")}#t;#r=[];#n={};#e=0;#s=1;#c=0;#f=0;#l=0;#a=0;#i=!1;constructor(e){this.#t=e}get result(){return this.#n}parse(){for(this.#r=sne(this.#t,!0);this.#e<this.#r.length;this.#e+=this.#s){if(this.#s=1,this.#r[this.#e].type==="END"){if(this.#f===0){this.#_(),this.#y()?this.#u(9,1):this.#P()?this.#u(8,1):this.#u(7,0);continue}else if(this.#f===2){this.#p(5);continue}this.#u(10,0);break}if(this.#l>0)if(this.#o())this.#l-=1;else continue;if(this.#w()){this.#l+=1;continue}switch(this.#f){case 0:this.#I()&&this.#p(1);break;case 1:if(this.#I()){this.#$();let e=7,t=1;this.#A()?(e=2,t=3):this.#i&&(e=2),this.#u(e,t)}break;case 2:this.#O()?this.#p(3):(this.#m()||this.#P()||this.#y())&&this.#p(5);break;case 3:this.#v()?this.#u(4,1):this.#O()&&this.#u(5,1);break;case 4:this.#O()&&this.#u(5,1);break;case 5:this.#S()?this.#a+=1:this.#R()&&(this.#a-=1),this.#T()&&!this.#a?this.#u(6,1):this.#m()?this.#u(7,0):this.#P()?this.#u(8,1):this.#y()&&this.#u(9,1);break;case 6:this.#m()?this.#u(7,0):this.#P()?this.#u(8,1):this.#y()&&this.#u(9,1);break;case 7:this.#P()?this.#u(8,1):this.#y()&&this.#u(9,1);break;case 8:this.#y()&&this.#u(9,1);break;case 9:break;case 10:break}}this.#n.hostname!==void 0&&this.#n.port===void 0&&(this.#n.port="")}#u(e,t){switch(this.#f){case 0:break;case 1:this.#n.protocol=this.#g();break;case 2:break;case 3:this.#n.username=this.#g();break;case 4:this.#n.password=this.#g();break;case 5:this.#n.hostname=this.#g();break;case 6:this.#n.port=this.#g();break;case 7:this.#n.pathname=this.#g();break;case 8:this.#n.search=this.#g();break;case 9:this.#n.hash=this.#g();break;case 10:break}this.#f!==0&&e!==10&&([1,2,3,4].includes(this.#f)&&[6,7,8,9].includes(e)&&(this.#n.hostname??=""),[1,2,3,4,5,6].includes(this.#f)&&[8,9].includes(e)&&(this.#n.pathname??=this.#i?"/":""),[1,2,3,4,5,6,7].includes(this.#f)&&e===9&&(this.#n.search??="")),this.#E(e,t)}#E(e,t){this.#f=e,this.#c=this.#e+t,this.#e+=t,this.#s=0}#_(){this.#e=this.#c,this.#s=0}#p(e){this.#_(),this.#f=e}#b(e){return e<0&&(e=this.#r.length-e),e<this.#r.length?this.#r[e]:this.#r[this.#r.length-1]}#d(e,t){let r=this.#b(e);return r.value===t&&(r.type==="CHAR"||r.type==="ESCAPED_CHAR"||r.type==="INVALID_CHAR")}#I(){return this.#d(this.#e,":")}#A(){return this.#d(this.#e+1,"/")&&this.#d(this.#e+2,"/")}#O(){return this.#d(this.#e,"@")}#v(){return this.#d(this.#e,":")}#T(){return this.#d(this.#e,":")}#m(){return this.#d(this.#e,"/")}#P(){if(this.#d(this.#e,"?"))return!0;if(this.#r[this.#e].value!=="?")return!1;let e=this.#b(this.#e-1);return e.type!=="NAME"&&e.type!=="REGEX"&&e.type!=="CLOSE"&&e.type!=="ASTERISK"}#y(){return this.#d(this.#e,"#")}#w(){return this.#r[this.#e].type=="OPEN"}#o(){return this.#r[this.#e].type=="CLOSE"}#S(){return this.#d(this.#e,"[")}#R(){return this.#d(this.#e,"]")}#g(){let e=this.#r[this.#e],t=this.#b(this.#c).index;return this.#t.substring(t,e.index)}#$(){let e={};Object.assign(e,Bc),e.encodePart=f2;let t=att(this.#g(),void 0,e);this.#i=fne(t)}},u2=["protocol","username","password","hostname","port","pathname","search","hash"],kc="*";function nne(e,t){if(typeof e!="string")throw new TypeError("parameter 1 is not of type 'string'.");let r=new URL(e,t);return{protocol:r.protocol.substring(0,r.protocol.length-1),username:r.username,password:r.password,hostname:r.hostname,port:r.port,pathname:r.pathname,search:r.search!==""?r.search.substring(1,r.search.length):void 0,hash:r.hash!==""?r.hash.substring(1,r.hash.length):void 0}}s(nne,"Se");function vu(e,t){return t?EE(e):e}s(vu,"b");function yE(e,t,r){let n;if(typeof t.baseURL=="string")try{n=new URL(t.baseURL),t.protocol===void 0&&(e.protocol=vu(n.protocol.substring(0,n.protocol.length-1),r)),!r&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&(e.username=vu(n.username,r)),!r&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&t.password===void 0&&(e.password=vu(n.password,r)),t.protocol===void 0&&t.hostname===void 0&&(e.hostname=vu(n.hostname,r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&(e.port=vu(n.port,r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&(e.pathname=vu(n.pathname,r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&(e.search=vu(n.search.substring(1,n.search.length),r)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&t.hash===void 0&&(e.hash=vu(n.hash.substring(1,n.hash.length),r))}catch{throw new TypeError(`invalid baseURL '${t.baseURL}'.`)}if(typeof t.protocol=="string"&&(e.protocol=Ett(t.protocol,r)),typeof t.username=="string"&&(e.username=_tt(t.username,r)),typeof t.password=="string"&&(e.password=mtt(t.password,r)),typeof t.hostname=="string"&&(e.hostname=htt(t.hostname,r)),typeof t.port=="string"&&(e.port=ytt(t.port,e.protocol,r)),typeof t.pathname=="string"){if(e.pathname=t.pathname,n&&!ltt(e.pathname,r)){let i=n.pathname.lastIndexOf("/");i>=0&&(e.pathname=vu(n.pathname.substring(0,i+1),r)+e.pathname)}e.pathname=gtt(e.pathname,e.protocol,r)}return typeof t.search=="string"&&(e.search=ptt(t.search,r)),typeof t.hash=="string"&&(e.hash=dtt(t.hash,r)),e}s(yE,"w");function EE(e){return e.replace(/([+*?:{}()\\])/g,"\\$1")}s(EE,"C");function Ttt(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}s(Ttt,"Le");function Ntt(e,t){t.delimiter??="/#?",t.prefixes??="./",t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith="";let r=".*",n=`[^${Ttt(t.delimiter)}]+?`,i=/[$_\u200C\u200D\p{ID_Continue}]/u,o="";for(let a=0;a<e.length;++a){let u=e[a];if(u.type===3){if(u.modifier===3){o+=EE(u.value);continue}o+=`{${EE(u.value)}}${jm(u.modifier)}`;continue}let c=u.hasCustomName(),l=!!u.suffix.length||!!u.prefix.length&&(u.prefix.length!==1||!t.prefixes.includes(u.prefix)),f=a>0?e[a-1]:null,d=a<e.length-1?e[a+1]:null;if(!l&&c&&u.type===1&&u.modifier===3&&d&&!d.prefix.length&&!d.suffix.length)if(d.type===3){let _=d.value.length>0?d.value[0]:"";l=i.test(_)}else l=!d.hasCustomName();if(!l&&!u.prefix.length&&f&&f.type===3){let _=f.value[f.value.length-1];l=t.prefixes.includes(_)}l&&(o+="{"),o+=EE(u.prefix),c&&(o+=`:${u.name}`),u.type===2?o+=`(${u.value})`:u.type===1?c||(o+=`(${n})`):u.type===0&&(!c&&(!f||f.type===3||f.modifier!==3||l||u.prefix!=="")?o+="*":o+=`(${r})`),u.type===1&&c&&u.suffix.length&&i.test(u.suffix[0])&&(o+="\\"),o+=EE(u.suffix),l&&(o+="}"),u.modifier!==3&&(o+=jm(u.modifier))}return o}s(Ntt,"Ie");var Att=class{static{s(this,"Y")}#t;#r={};#n={};#e={};#s={};#c=!1;constructor(e={},t,r){try{let n;if(typeof t=="string"?n=t:r=t,typeof e=="string"){let u=new Itt(e);if(u.parse(),e=u.result,n===void 0&&typeof e.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");e.baseURL=n}else{if(!e||typeof e!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(n)throw new TypeError("parameter 1 is not of type 'string'.")}typeof r>"u"&&(r={ignoreCase:!1});let i={ignoreCase:r.ignoreCase===!0},o={pathname:kc,protocol:kc,username:kc,password:kc,hostname:kc,port:kc,search:kc,hash:kc};this.#t=yE(o,e,!0),dne(this.#t.protocol)===this.#t.port&&(this.#t.port="");let a;for(a of u2){if(!(a in this.#t))continue;let u={},c=this.#t[a];switch(this.#n[a]=[],a){case"protocol":Object.assign(u,Bc),u.encodePart=f2;break;case"username":Object.assign(u,Bc),u.encodePart=btt;break;case"password":Object.assign(u,Bc),u.encodePart=Stt;break;case"hostname":Object.assign(u,utt),cne(c)?u.encodePart=hne:u.encodePart=pne;break;case"port":Object.assign(u,Bc),u.encodePart=mne;break;case"pathname":fne(this.#r.protocol)?(Object.assign(u,ctt,i),u.encodePart=vtt):(Object.assign(u,Bc,i),u.encodePart=Ott);break;case"search":Object.assign(u,Bc,i),u.encodePart=Ptt;break;case"hash":Object.assign(u,Bc,i),u.encodePart=wtt;break}try{this.#s[a]=one(c,u),this.#r[a]=ane(this.#s[a],this.#n[a],u),this.#e[a]=Ntt(this.#s[a],u),this.#c=this.#c||this.#s[a].some(l=>l.type===2)}catch{throw new TypeError(`invalid ${a} pattern '${this.#t[a]}'.`)}}}catch(n){throw new TypeError(`Failed to construct 'URLPattern': ${n.message}`)}}test(e={},t){let r={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof e!="string"&&t)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof e>"u")return!1;try{typeof e=="object"?r=yE(r,e,!1):r=yE(r,nne(e,t),!1)}catch{return!1}let n;for(n of u2)if(!this.#r[n].exec(r[n]))return!1;return!0}exec(e={},t){let r={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof e!="string"&&t)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof e>"u")return;try{typeof e=="object"?r=yE(r,e,!1):r=yE(r,nne(e,t),!1)}catch{return null}let n={};t?n.inputs=[e,t]:n.inputs=[e];let i;for(i of u2){let o=this.#r[i].exec(r[i]);if(!o)return null;let a={};for(let[u,c]of this.#n[i].entries())if(typeof c=="string"||typeof c=="number"){let l=o[u+1];a[c]=l}n[i]={input:r[i]??"",groups:a}}return n}static compareComponent(e,t,r){let n=s((u,c)=>{for(let l of["type","modifier","prefix","value","suffix"]){if(u[l]<c[l])return-1;if(u[l]!==c[l])return 1}return 0},"a"),i=new bE(3,"","","","",3),o=new bE(0,"","","","",3),a=s((u,c)=>{let l=0;for(;l<Math.min(u.length,c.length);++l){let f=n(u[l],c[l]);if(f)return f}return u.length===c.length?0:n(u[l]??i,c[l]??i)},"s");return!t.#e[e]&&!r.#e[e]?0:t.#e[e]&&!r.#e[e]?a(t.#s[e],[o]):!t.#e[e]&&r.#e[e]?a([o],r.#s[e]):a(t.#s[e],r.#s[e])}get protocol(){return this.#e.protocol}get username(){return this.#e.username}get password(){return this.#e.password}get hostname(){return this.#e.hostname}get port(){return this.#e.port}get pathname(){return this.#e.pathname}get search(){return this.#e.search}get hash(){return this.#e.hash}get hasRegExpGroups(){return this.#c}}});var bne=h((KMt,Ene)=>{var{URLPattern:yne}=gne();Ene.exports={URLPattern:yne};globalThis.URLPattern||(globalThis.URLPattern=yne)});var Cne=h(Ea=>{"use strict";var m2=Ea&&Ea.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ea,"__esModule",{value:!0});Ea.embellishWithRawOpenApi=Ea.embellishWithPathPattern=Ea.compileRoutes=void 0;var Rtt=require("@zuplo/runtime/internal"),d2=m2(_n()),Ctt=m2(VQ()),ya=require("jsonc-parser"),h2=m2(require("path")),bT=rx(),Sne=ZQ(),vo=Dc(),SE=qI(),vne=QQ(),$tt=eee(),One=nx(),Dtt=Wre(),Ltt=Yre(),Pne=ene(),Wn=tne(),Tne=globalThis;Tne.URLPattern||bne();var jtt=Tne.URLPattern,Mtt=Ctt.default.compile(`
184
184
  import { environment } from "@zuplo/runtime";
185
185
  import rawRouteData from "./raw.json";
186
186
  const routes = () => ({
@@ -196,7 +196,7 @@ Expecting `+$e.join(", ")+", got '"+(this.terminals_[P]||P)+"'":bt="Parse error
196
196
  ],
197
197
  });
198
198
  export default routes;
199
- `);async function Utt(e,t){let r=[],n=[],i=[],o=new Dtt.PoliciesConfigurationValidator,a=JSON.parse(t.content),u=o.validate(a);if(!u.isValid)return{content:"",errors:[{text:JSON.stringify(u.errors),location:{line:0,column:0,file:"/config/policies.json"}}]};let c=new Sne.AstAdapter().parse(JSON.stringify(a)),l=[],f=[],d=new Pne.OpenAPIRoutesFragmentAstTransformer,_=new vne.SourceGenerator,m,g,y=c.children.find(I=>I.name.value==="policies");if(y){let I=d.transform(y);m=_.generate(I),l=a.policies.map(({name:j})=>j)}let b=c.children.find(I=>I.name.value==="corsPolicies");if(b){let I=d.transform(b);g=_.generate(I),f=a.corsPolicies.map(({name:j})=>j)}let E=[];for(let I=0;I<e.length;I++){let j=[],x=e[I],H=(0,One.parse)(x.content,j);if(j.length>0)return{content:"",errors:j.map(re=>({text:(0,ya.printParseErrorCode)(re.error),location:{file:x.fileName,line:re.line,column:re.column}}))};if(H){E.push(H);let re=(0,ya.findNodeAtLocation)(H,["paths"]);if(re&&re.children){for(let he of re.children)if(he.children){let $e=ET(he),bt=$e[Wn.OPEN_API_PATH_EXTENSION]?.pathMode;if(bt){if(bt!==Wn.OPEN_API_MODE&&bt!==Wn.URL_PATTERN_MODE)return{content:"",errors:[{text:`Unknown path mode ${bt}`,location:{line:0,column:0,file:x.fileName}}]}}else bt=Wn.OPEN_API_MODE;for(let[_t,zr]of Object.entries($e))if(_t!==Wn.OPEN_API_PATH_EXTENSION){let Rn=_t,Qi=zr,ja=Qi[Wn.OPEN_API_ROUTE_EXTENSION];if(ja){let ji=new Ltt.OpenAPILocalizedValidator().validate(ja);if(ji.isValid){let Mi=p2(he),Ma=wne(he,[Mi,Rn,Wn.OPEN_API_ROUTE_EXTENSION]),Hr=await Vtt(Ma,x);if(!Hr.valid)return{content:"",errors:[{text:Hr.errorMsg??`Unknown error on handler for path '${Mi}'`,location:{line:Hr.line??0,column:Hr.column??0,file:x.fileName}}]};let $n=Htt(Ma,x);if(!$n.valid)return{content:"",errors:$n.errors};$n.warnings&&i.push(...$n.warnings),r.push({path:Mi,pathPattern:Mi,pathMode:bt,httpMethod:Rn,rawOpenAPI:Qi,config:wne(he,[Mi,Rn,Wn.OPEN_API_ROUTE_EXTENSION])})}else return{content:"",errors:[{text:JSON.stringify(ji.errors),location:{line:0,column:0,file:x.fileName}}]}}else{let Cn=p2(he),ji={corsPolicy:"none",handler:Gtt(Cn,H)};r.push({path:Cn,pathPattern:Cn,pathMode:Wn.OPEN_API_MODE,rawOpenAPI:Qi,httpMethod:Rn,config:(0,One.parse)(JSON.stringify(ji))})}}}}}let K=[];for(let re=0;re<e.length;re++){let he=e[re],$e=E.at(re);if($e){let bt=(0,ya.findNodeAtLocation)($e,["paths"]);if(bt&&bt.children){for(let _t of bt.children)if(_t.children){let zr=ET(_t);for(let[Rn,Qi]of Object.entries(zr))if(Rn!==Wn.OPEN_API_PATH_EXTENSION){let Cn=Qi[Wn.OPEN_API_ROUTE_EXTENSION];if(Cn&&"policies"in Cn){let ji=Cn.policies;ji.inbound?.forEach(Mi=>{l.includes(Mi)||K.push({text:`Policy '${Mi}' does not exist in policies.json. Please add it and rebuild.`,location:{line:zr.line,column:zr.column,file:he.fileName}})}),ji.outbound?.forEach(Mi=>{l.includes(Mi)||K.push({text:`Policy '${Mi}' does not exist in policies.json. Please add it and rebuild.`,location:{line:zr.line,column:zr.column,file:he.fileName}})})}}}}}}if(K.length>0)return{content:"",errors:K};let Q=[],de=["none","anything-goes"];for(let re=0;re<e.length;re++){let he=e[re],$e=E.at(re);if($e){let bt=(0,ya.findNodeAtLocation)($e,["paths"]);if(bt&&bt.children){for(let _t of bt.children)if(_t.children){let zr=ET(_t);for(let[Rn,Qi]of Object.entries(zr))if(Rn!==Wn.OPEN_API_PATH_EXTENSION){let Cn=Qi[Wn.OPEN_API_ROUTE_EXTENSION];if(Cn&&"corsPolicy"in Cn){let ji=Cn.corsPolicy;if(de.includes(ji))continue;f.includes(ji)||Q.push({text:`Cors policy '${ji}' does not exist in policies.json. Please add it and rebuild.`,location:{line:zr.line,column:zr.column,file:he.fileName}})}}}}}}if(Q.length>0)return{content:"",errors:Q};for(let re of r){let he=new Pne.OpenAPIRoutesFragmentAstTransformer,$e=new Sne.AstAdapter().convert(re.config);Ftt($e,re),Nne($e,re),ktt($e,re),Btt($e),Ane(h2.default.basename(e[I].fileName,".oas.json"),re.path,re.httpMethod,$e);let bt=he.transform($e),_t=he.errors;if(_t.length>0)return{content:"",errors:[{text:JSON.stringify(_t),location:{line:0,column:0,file:x.fileName}}]};let Rn=new vne.SourceGenerator().generate(bt);n.push(Rn)}}let S=new Map,O=[];for(let I=0;I<e.length;I++){let j=e[I],x=E.at(I);if(x){let H=(0,ya.findNodeAtLocation)(x,["paths"]);if(H&&H.children){for(let K of H.children)if(K.children){let Q=ET(K);for(let de of Object.keys(Q)){if(de===Wn.OPEN_API_PATH_EXTENSION)continue;let re=de,he=p2(K),$e=re.replace(/\s+/g,"").split(",");if(S.has(he)){let bt=S.get(he)?.methods??[];$e.forEach(_t=>{bt?.includes(_t)?O.push({text:`Cannot have duplicate routes declared. Route '${_t.toUpperCase()} ${he}' declared more than once.`,location:{line:K.line,column:K.column,file:j.fileName}}):bt.push(_t)}),S.set(he,{methods:bt})}else{try{new jtt({pathname:he})}catch{O.push({text:`Path ${he} contains invalid characters.`,location:{line:K.line,column:K.column,file:j.fileName}})}S.set(he,{methods:$e})}}}}}}return O.length>0?{content:"",errors:O}:{content:Mtt({routes:n,policies:m??"policies: []",corsPolicies:g??"corsPolicies: []"}),errors:[],warnings:i}}s(Utt,"compileRoutes");Ea.compileRoutes=Utt;var xtt=0,qtt=1;function Ftt(e,t){let r={type:vo.SyntaxType.Property,parent:e,name:null,value:null};r.name={value:"path",type:vo.SyntaxType.Identifier,parent:r},r.value=SE.factory.createLiteral(t.path,r),e.children.unshift(r)}s(Ftt,"embellishWithPath");function Nne(e,t){let r={type:vo.SyntaxType.Property,parent:e,name:null,value:null};if(r.name={value:"pathPattern",type:vo.SyntaxType.Identifier,parent:r},t.pathMode===Wn.URL_PATTERN_MODE)r.value=SE.factory.createLiteral(t.path,r);else{let n=/{(\S+?)}/gm,i=":$1",o=t.path.replace(n,i);t.path.endsWith("/")||(o=o+"{/}?"),r.value=SE.factory.createLiteral(o,r)}e.children.unshift(r)}s(Nne,"embellishWithPathPattern");Ea.embellishWithPathPattern=Nne;function ktt(e,t){let r={type:vo.SyntaxType.Property,parent:e,name:null,value:null};r.name={value:"methods",type:vo.SyntaxType.Identifier,parent:r};let n=t.httpMethod.split(/,/).map(i=>i.trim().toUpperCase());r.value=SE.factory.createArrayOfLiterals(n,r),e.children.unshift(r)}s(ktt,"embellishWithMethods");function Btt(e){let t={type:vo.SyntaxType.Property,parent:e,name:null,value:null};t.name={value:"version",type:vo.SyntaxType.Identifier,parent:t},t.value=SE.factory.createLiteral("none",t),e.children.unshift(t)}s(Btt,"embellishWithVersion");function Ane(e,t,r,n){let i={type:vo.SyntaxType.Property,parent:n,name:null,value:null};i.name={value:"raw",type:vo.SyntaxType.Identifier,parent:n};let o=(0,Rtt.getRawOperationDataIdentifierName)(e,t,r);i.value={type:vo.SyntaxType.FunctionBody,parent:i,value:`() => {return rawRouteData.${o};}`},n.children.unshift(i)}s(Ane,"embellishWithRawOpenApi");Ea.embellishWithRawOpenApi=Ane;function ET(e){return(0,bT.assert)(e.type==="property"),(0,bT.assert)(Array.isArray(e.children)),(0,ya.getNodeValue)(e.children[qtt])}s(ET,"evaluatePathItem");function p2(e){return(0,bT.assert)(e.type==="property"),(0,bT.assert)(Array.isArray(e.children)),(0,ya.getNodeValue)(e.children[xtt])}s(p2,"evaluatePath");function wne(e,t){return(0,ya.findNodeAtLocation)(e.parent,t)}s(wne,"extractZuploRouteNode");function Rne(e){return(0,ya.getNodeValue)(e)}s(Rne,"evaluateZuploRouteNode");function Gtt(e,t){let r=/{(\S+?)}/gm,n="${params.$1}",i=e.replace(r,n),o=(0,ya.getNodeValue)(t);return{export:"urlRewriteHandler",module:"$import(@zuplo/runtime)",options:{rewritePattern:`${o.servers&&o.servers.length>0?o.servers[0].url:"http://example.com"}${i}`,forwardSearch:!0}}}s(Gtt,"addDefaultUrlRewriteHandler");async function Vtt(e,t){let r=Rne(e),n=r.handler.module.replace(/^\$import\(/,"").replace(/\)$/,""),i=h2.default.join(h2.default.dirname(t.fileName),"..",`${n}.ts`),o=r.handler.export;if(n==="@zuplo/runtime")return{valid:!0};if(await d2.default.fileExists(i)){let a=await(0,$tt.getJSFileExports)(i);if(a===null)return{valid:!1,errorMsg:`Could not find any export due to a compile error in '${d2.default.getParentDirFilename(i)}'`};if(!a.has(o)){let u=`Could not find export "${o}" in '${d2.default.getParentDirFilename(i)}'`,c=0,l=0;if(e.children)for(let f of e.children)f.children&&f.children.forEach(d=>{d.value==="handler"&&(c=d.line,l=d.column)});return{valid:!1,errorMsg:u,line:c,column:l}}return{valid:!0}}else return{valid:!1,errorMsg:`Could not find module '${n}'`}}s(Vtt,"checkModuleIsValid");var Ine=s((e,t)=>{let r=0,n=0;if(e.children)for(let i of e.children)i.children&&i.children.forEach(o=>{o.value==="options"&&o.children?.forEach(a=>{o.value===t&&(r=a.line,n=a.column)})});return{line:r,column:n}},"getHandlerOptionLocation"),ztt="$env(";function Htt(e,t){let r=Rne(e),n=r.handler.export;if(n!=="urlForwardHandler"&&n!=="urlRewriteHandler")return{valid:!0};let i="rewritePattern";n==="urlForwardHandler"&&(i="baseUrl");let o=r.handler.options[i];if(!o){let a=Ine(e,i);return{valid:!1,errors:[{text:`Invalid request handler configuration. handler.options.${i} is required but was not provided.`,location:{file:t.fileName,line:a.line,column:a.column}}]}}if(o.includes(ztt)){let a=Ine(e,i);return{valid:!0,warnings:[{text:`Invalid environment variable access syntax detected. Use \${env.VAR_NAME} instead of $env(VAR_NAME) for handler.options.${i}.`,location:{file:t.fileName,line:a.line,column:a.column}}]}}return{valid:!0}}s(Htt,"checkHandlerIsValid")});var Dne=h(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.routeConfigurationValidatorFn=Gc.policiesConfigurationValidatorFn=Gc.compileRoutes=void 0;var Ktt=Cne();Object.defineProperty(Gc,"compileRoutes",{enumerable:!0,get:function(){return Ktt.compileRoutes}});var $ne=gT();Object.defineProperty(Gc,"policiesConfigurationValidatorFn",{enumerable:!0,get:function(){return $ne.policiesConfigurationValidatorFn}});Object.defineProperty(Gc,"routeConfigurationValidatorFn",{enumerable:!0,get:function(){return $ne.routeConfigurationValidatorFn}})});var Une=h((XMt,Mne)=>{"use strict";var _2=s(e=>{if(!e)return;let t=e.cause;if(typeof t=="function"){let r=e.cause();return r instanceof Error?r:void 0}else return t instanceof Error?t:void 0},"getErrorCause"),Lne=s((e,t)=>{if(!(e instanceof Error))return"";let r=e.stack||"";if(t.has(e))return r+`
199
+ `);async function Utt(e,t){let r=[],n=[],i=[],o=new Dtt.PoliciesConfigurationValidator,a=JSON.parse(t.content),u=o.validate(a);if(!u.isValid)return{content:"",errors:[{text:JSON.stringify(u.errors),location:{line:0,column:0,file:"/config/policies.json"}}]};let c=new Sne.AstAdapter().parse(JSON.stringify(a)),l=[],f=[],d=new Pne.OpenAPIRoutesFragmentAstTransformer,_=new vne.SourceGenerator,m,g,y=c.children.find(I=>I.name.value==="policies");if(y){let I=d.transform(y);m=_.generate(I),l=a.policies.map(({name:j})=>j)}let b=c.children.find(I=>I.name.value==="corsPolicies");if(b){let I=d.transform(b);g=_.generate(I),f=a.corsPolicies.map(({name:j})=>j)}let E=[];for(let I=0;I<e.length;I++){let j=[],x=e[I],H=(0,One.parse)(x.content,j);if(j.length>0)return{content:"",errors:j.map(re=>({text:(0,ya.printParseErrorCode)(re.error),location:{file:x.fileName,line:re.line,column:re.column}}))};if(H){E.push(H);let re=(0,ya.findNodeAtLocation)(H,["paths"]);if(re&&re.children){for(let he of re.children)if(he.children){let $e=ET(he),bt=$e[Wn.OPEN_API_PATH_EXTENSION]?.pathMode;if(bt){if(bt!==Wn.OPEN_API_MODE&&bt!==Wn.URL_PATTERN_MODE)return{content:"",errors:[{text:`Unknown path mode ${bt}`,location:{line:0,column:0,file:x.fileName}}]}}else bt=Wn.OPEN_API_MODE;for(let[_t,zr]of Object.entries($e))if(_t!==Wn.OPEN_API_PATH_EXTENSION){let Rn=_t,Qi=zr,ja=Qi[Wn.OPEN_API_ROUTE_EXTENSION];if(ja){let ji=new Ltt.OpenAPILocalizedValidator().validate(ja);if(ji.isValid){let Mi=p2(he),Ma=wne(he,[Mi,Rn,Wn.OPEN_API_ROUTE_EXTENSION]),Hr=await Vtt(Ma,x);if(!Hr.valid)return{content:"",errors:[{text:Hr.errorMsg??`Unknown error on handler for path '${Mi}'`,location:{line:Hr.line??0,column:Hr.column??0,file:x.fileName}}]};let $n=Htt(Ma,x);if(!$n.valid)return{content:"",errors:$n.errors};$n.warnings&&i.push(...$n.warnings),r.push({path:Mi,pathPattern:Mi,pathMode:bt,httpMethod:Rn,rawOpenAPI:Qi,config:wne(he,[Mi,Rn,Wn.OPEN_API_ROUTE_EXTENSION])})}else return{content:"",errors:[{text:JSON.stringify(ji.errors),location:{line:0,column:0,file:x.fileName}}]}}else{let Cn=p2(he),ji={corsPolicy:"none",handler:Gtt(Cn,H)};r.push({path:Cn,pathPattern:Cn,pathMode:Wn.OPEN_API_MODE,rawOpenAPI:Qi,httpMethod:Rn,config:(0,One.parse)(JSON.stringify(ji))})}}}}}let K=[];for(let re=0;re<e.length;re++){let he=e[re],$e=E.at(re);if($e){let bt=(0,ya.findNodeAtLocation)($e,["paths"]);if(bt&&bt.children){for(let _t of bt.children)if(_t.children){let zr=ET(_t);for(let[Rn,Qi]of Object.entries(zr))if(Rn!==Wn.OPEN_API_PATH_EXTENSION){let Cn=Qi[Wn.OPEN_API_ROUTE_EXTENSION];if(Cn&&"policies"in Cn){let ji=Cn.policies;ji.inbound?.forEach(Mi=>{l.includes(Mi)||K.push({text:`Policy '${Mi}' does not exist in policies.json. Please add it and rebuild.`,location:{line:zr.line,column:zr.column,file:he.fileName}})}),ji.outbound?.forEach(Mi=>{l.includes(Mi)||K.push({text:`Policy '${Mi}' does not exist in policies.json. Please add it and rebuild.`,location:{line:zr.line,column:zr.column,file:he.fileName}})})}}}}}}if(K.length>0)return{content:"",errors:K};let Q=[],de=["none","anything-goes"];for(let re=0;re<e.length;re++){let he=e[re],$e=E.at(re);if($e){let bt=(0,ya.findNodeAtLocation)($e,["paths"]);if(bt&&bt.children){for(let _t of bt.children)if(_t.children){let zr=ET(_t);for(let[Rn,Qi]of Object.entries(zr))if(Rn!==Wn.OPEN_API_PATH_EXTENSION){let Cn=Qi[Wn.OPEN_API_ROUTE_EXTENSION];if(Cn&&"corsPolicy"in Cn){let ji=Cn.corsPolicy;if(de.includes(ji))continue;f.includes(ji)||Q.push({text:`Cors policy '${ji}' does not exist in policies.json. Please add it and rebuild.`,location:{line:zr.line,column:zr.column,file:he.fileName}})}}}}}}if(Q.length>0)return{content:"",errors:Q};for(let re of r){let he=new Pne.OpenAPIRoutesFragmentAstTransformer,$e=new Sne.AstAdapter().convert(re.config);Ftt($e,re),Nne($e,re),ktt($e,re),Btt($e),Ane(h2.default.basename(e[I].fileName,".oas.json"),re.path,re.httpMethod,$e);let bt=he.transform($e),_t=he.errors;if(_t.length>0)return{content:"",errors:[{text:JSON.stringify(_t),location:{line:0,column:0,file:x.fileName}}]};let Rn=new vne.SourceGenerator().generate(bt);n.push(Rn)}}let v=new Map,O=[];for(let I=0;I<e.length;I++){let j=e[I],x=E.at(I);if(x){let H=(0,ya.findNodeAtLocation)(x,["paths"]);if(H&&H.children){for(let K of H.children)if(K.children){let Q=ET(K);for(let de of Object.keys(Q)){if(de===Wn.OPEN_API_PATH_EXTENSION)continue;let re=de,he=p2(K),$e=re.replace(/\s+/g,"").split(",");if(v.has(he)){let bt=v.get(he)?.methods??[];$e.forEach(_t=>{bt?.includes(_t)?O.push({text:`Cannot have duplicate routes declared. Route '${_t.toUpperCase()} ${he}' declared more than once.`,location:{line:K.line,column:K.column,file:j.fileName}}):bt.push(_t)}),v.set(he,{methods:bt})}else{try{new jtt({pathname:he})}catch{O.push({text:`Path ${he} contains invalid characters.`,location:{line:K.line,column:K.column,file:j.fileName}})}v.set(he,{methods:$e})}}}}}}return O.length>0?{content:"",errors:O}:{content:Mtt({routes:n,policies:m??"policies: []",corsPolicies:g??"corsPolicies: []"}),errors:[],warnings:i}}s(Utt,"compileRoutes");Ea.compileRoutes=Utt;var xtt=0,qtt=1;function Ftt(e,t){let r={type:vo.SyntaxType.Property,parent:e,name:null,value:null};r.name={value:"path",type:vo.SyntaxType.Identifier,parent:r},r.value=SE.factory.createLiteral(t.path,r),e.children.unshift(r)}s(Ftt,"embellishWithPath");function Nne(e,t){let r={type:vo.SyntaxType.Property,parent:e,name:null,value:null};if(r.name={value:"pathPattern",type:vo.SyntaxType.Identifier,parent:r},t.pathMode===Wn.URL_PATTERN_MODE)r.value=SE.factory.createLiteral(t.path,r);else{let n=/{(\S+?)}/gm,i=":$1",o=t.path.replace(n,i);t.path.endsWith("/")||(o=o+"{/}?"),r.value=SE.factory.createLiteral(o,r)}e.children.unshift(r)}s(Nne,"embellishWithPathPattern");Ea.embellishWithPathPattern=Nne;function ktt(e,t){let r={type:vo.SyntaxType.Property,parent:e,name:null,value:null};r.name={value:"methods",type:vo.SyntaxType.Identifier,parent:r};let n=t.httpMethod.split(/,/).map(i=>i.trim().toUpperCase());r.value=SE.factory.createArrayOfLiterals(n,r),e.children.unshift(r)}s(ktt,"embellishWithMethods");function Btt(e){let t={type:vo.SyntaxType.Property,parent:e,name:null,value:null};t.name={value:"version",type:vo.SyntaxType.Identifier,parent:t},t.value=SE.factory.createLiteral("none",t),e.children.unshift(t)}s(Btt,"embellishWithVersion");function Ane(e,t,r,n){let i={type:vo.SyntaxType.Property,parent:n,name:null,value:null};i.name={value:"raw",type:vo.SyntaxType.Identifier,parent:n};let o=(0,Rtt.getRawOperationDataIdentifierName)(e,t,r);i.value={type:vo.SyntaxType.FunctionBody,parent:i,value:`() => {return rawRouteData.${o};}`},n.children.unshift(i)}s(Ane,"embellishWithRawOpenApi");Ea.embellishWithRawOpenApi=Ane;function ET(e){return(0,bT.assert)(e.type==="property"),(0,bT.assert)(Array.isArray(e.children)),(0,ya.getNodeValue)(e.children[qtt])}s(ET,"evaluatePathItem");function p2(e){return(0,bT.assert)(e.type==="property"),(0,bT.assert)(Array.isArray(e.children)),(0,ya.getNodeValue)(e.children[xtt])}s(p2,"evaluatePath");function wne(e,t){return(0,ya.findNodeAtLocation)(e.parent,t)}s(wne,"extractZuploRouteNode");function Rne(e){return(0,ya.getNodeValue)(e)}s(Rne,"evaluateZuploRouteNode");function Gtt(e,t){let r=/{(\S+?)}/gm,n="${params.$1}",i=e.replace(r,n),o=(0,ya.getNodeValue)(t);return{export:"urlRewriteHandler",module:"$import(@zuplo/runtime)",options:{rewritePattern:`${o.servers&&o.servers.length>0?o.servers[0].url:"http://example.com"}${i}`,forwardSearch:!0}}}s(Gtt,"addDefaultUrlRewriteHandler");async function Vtt(e,t){let r=Rne(e),n=r.handler.module.replace(/^\$import\(/,"").replace(/\)$/,""),i=h2.default.join(h2.default.dirname(t.fileName),"..",`${n}.ts`),o=r.handler.export;if(n==="@zuplo/runtime")return{valid:!0};if(await d2.default.fileExists(i)){let a=await(0,$tt.getJSFileExports)(i);if(a===null)return{valid:!1,errorMsg:`Could not find any export due to a compile error in '${d2.default.getParentDirFilename(i)}'`};if(!a.has(o)){let u=`Could not find export "${o}" in '${d2.default.getParentDirFilename(i)}'`,c=0,l=0;if(e.children)for(let f of e.children)f.children&&f.children.forEach(d=>{d.value==="handler"&&(c=d.line,l=d.column)});return{valid:!1,errorMsg:u,line:c,column:l}}return{valid:!0}}else return{valid:!1,errorMsg:`Could not find module '${n}'`}}s(Vtt,"checkModuleIsValid");var Ine=s((e,t)=>{let r=0,n=0;if(e.children)for(let i of e.children)i.children&&i.children.forEach(o=>{o.value==="options"&&o.children?.forEach(a=>{o.value===t&&(r=a.line,n=a.column)})});return{line:r,column:n}},"getHandlerOptionLocation"),ztt="$env(";function Htt(e,t){let r=Rne(e),n=r.handler.export;if(n!=="urlForwardHandler"&&n!=="urlRewriteHandler")return{valid:!0};let i="rewritePattern";n==="urlForwardHandler"&&(i="baseUrl");let o=r.handler.options[i];if(!o){let a=Ine(e,i);return{valid:!1,errors:[{text:`Invalid request handler configuration. handler.options.${i} is required but was not provided.`,location:{file:t.fileName,line:a.line,column:a.column}}]}}if(o.includes(ztt)){let a=Ine(e,i);return{valid:!0,warnings:[{text:`Invalid environment variable access syntax detected. Use \${env.VAR_NAME} instead of $env(VAR_NAME) for handler.options.${i}.`,location:{file:t.fileName,line:a.line,column:a.column}}]}}return{valid:!0}}s(Htt,"checkHandlerIsValid")});var Dne=h(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.routeConfigurationValidatorFn=Gc.policiesConfigurationValidatorFn=Gc.compileRoutes=void 0;var Ktt=Cne();Object.defineProperty(Gc,"compileRoutes",{enumerable:!0,get:function(){return Ktt.compileRoutes}});var $ne=gT();Object.defineProperty(Gc,"policiesConfigurationValidatorFn",{enumerable:!0,get:function(){return $ne.policiesConfigurationValidatorFn}});Object.defineProperty(Gc,"routeConfigurationValidatorFn",{enumerable:!0,get:function(){return $ne.routeConfigurationValidatorFn}})});var Une=h((XMt,Mne)=>{"use strict";var _2=s(e=>{if(!e)return;let t=e.cause;if(typeof t=="function"){let r=e.cause();return r instanceof Error?r:void 0}else return t instanceof Error?t:void 0},"getErrorCause"),Lne=s((e,t)=>{if(!(e instanceof Error))return"";let r=e.stack||"";if(t.has(e))return r+`
200
200
  causes have become circular...`;let n=_2(e);return n?(t.add(e),r+`
201
201
  caused by: `+Lne(n,t)):r},"_stackWithCauses"),Wtt=s(e=>Lne(e,new Set),"stackWithCauses"),jne=s((e,t,r)=>{if(!(e instanceof Error))return"";let n=r?"":e.message||"";if(t.has(e))return n+": ...";let i=_2(e);if(i){t.add(e);let o=typeof e.cause=="function";return n+(o?"":": ")+jne(i,t,o)}else return n},"_messageWithCauses"),Ytt=s(e=>jne(e,new Set),"messageWithCauses");Mne.exports={getErrorCause:_2,stackWithCauses:Wtt,messageWithCauses:Ytt}});var Fne=h((QMt,qne)=>{"use strict";qne.exports=E2;var{messageWithCauses:Jtt,stackWithCauses:Xtt}=Une(),{toString:Ztt}=Object.prototype,g2=Symbol("circular-ref-tag"),y2=Symbol("pino-raw-err-ref"),xne=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[y2]},set:function(e){this[y2]=e}}});Object.defineProperty(xne,y2,{writable:!0,value:{}});function E2(e){if(!(e instanceof Error))return e;e[g2]=void 0;let t=Object.create(xne);t.type=Ztt.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=Jtt(e),t.stack=Xtt(e),global.AggregateError!==void 0&&e instanceof global.AggregateError&&Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>E2(r)));for(let r in e)if(t[r]===void 0){let n=e[r];n instanceof Error?r!=="cause"&&!Object.prototype.hasOwnProperty.call(n,g2)&&(t[r]=E2(n)):t[r]=n}return delete e[g2],t.raw=e,t}s(E2,"errSerializer")});var Vne=h((tUt,Gne)=>{"use strict";Gne.exports={mapHttpRequest:Qtt,reqSerializer:Bne};var b2=Symbol("pino-raw-req-ref"),kne=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[b2]},set:function(e){this[b2]=e}}});Object.defineProperty(kne,b2,{writable:!0,value:{}});function Bne(e){let t=e.info||e.socket,r=Object.create(kne);if(r.id=typeof e.id=="function"?e.id():e.id||(e.info?e.info.id:void 0),r.method=e.method,e.originalUrl)r.url=e.originalUrl;else{let n=e.path;r.url=typeof n=="string"?n:e.url?e.url.path||e.url:void 0}return e.query&&(r.query=e.query),e.params&&(r.params=e.params),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}s(Bne,"reqSerializer");function Qtt(e){return{req:Bne(e)}}s(Qtt,"mapHttpRequest")});var Wne=h((nUt,Kne)=>{"use strict";Kne.exports={mapHttpResponse:ert,resSerializer:Hne};var S2=Symbol("pino-raw-res-ref"),zne=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[S2]},set:function(e){this[S2]=e}}});Object.defineProperty(zne,S2,{writable:!0,value:{}});function Hne(e){let t=Object.create(zne);return t.statusCode=e.headersSent?e.statusCode:null,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}s(Hne,"resSerializer");function ert(e){return{res:Hne(e)}}s(ert,"mapHttpResponse")});var O2=h((sUt,Yne)=>{"use strict";var v2=Fne(),ST=Vne(),vT=Wne();Yne.exports={err:v2,mapHttpRequest:ST.mapHttpRequest,mapHttpResponse:vT.mapHttpResponse,req:ST.reqSerializer,res:vT.resSerializer,wrapErrorSerializer:s(function(t){return t===v2?t:s(function(n){return t(v2(n))},"wrapErrSerializer")},"wrapErrorSerializer"),wrapRequestSerializer:s(function(t){return t===ST.reqSerializer?t:s(function(n){return t(ST.reqSerializer(n))},"wrappedReqSerializer")},"wrapRequestSerializer"),wrapResponseSerializer:s(function(t){return t===vT.resSerializer?t:s(function(n){return t(vT.resSerializer(n))},"wrappedResSerializer")},"wrapResponseSerializer")}});var P2=h((aUt,Jne)=>{"use strict";function trt(e,t){return t}s(trt,"noOpPrepareStackTrace");Jne.exports=s(function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=trt;let r=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(r))return;let n=r.slice(2),i=[];for(let o of n)o&&i.push(o.getFileName());return i},"getCallers")});var Zne=h((cUt,Xne)=>{"use strict";var{createContext:rrt,runInContext:nrt}=require("vm");Xne.exports=irt;function irt(e={}){let{ERR_PATHS_MUST_BE_STRINGS:t=s(()=>"fast-redact - Paths must be (non-empty) strings","ERR_PATHS_MUST_BE_STRINGS"),ERR_INVALID_PATH:r=s(n=>`fast-redact \u2013 Invalid path (${n})`,"ERR_INVALID_PATH")}=e;return s(function({paths:i}){i.forEach(o=>{if(typeof o!="string")throw Error(t());try{if(/〇/.test(o))throw Error();let a=new Proxy({},{get:()=>a,set:()=>{throw Error()}}),u=(o[0]==="["?"":".")+o.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").replace(/\[\*\]/g,"[\u3007]");if(/\n|\r|;/.test(u)||/\/\*/.test(u))throw Error();nrt(`
202
202
  (function () {
@@ -249,7 +249,7 @@ caused by: `+Lne(n,t)):r},"_stackWithCauses"),Wtt=s(e=>Lne(e,new Set),"stackWith
249
249
  var s = this.serialize(o)
250
250
  this.restore(o)
251
251
  return s
252
- `}s(frt,"resultTmpl");function drt(e,t){return e===!0?"throw Error('fast-redact: primitives cannot be redacted')":t===!1?"return o":"return this.serialize(o)"}s(drt,"strictImpl")});var w2=h((_Ut,sie)=>{"use strict";sie.exports={groupRedact:hrt,groupRestore:prt,nestedRedact:_rt,nestedRestore:mrt};function prt({keys:e,values:t,target:r}){if(r==null)return;let n=e.length;for(var i=0;i<n;i++){let o=e[i];r[o]=t[i]}}s(prt,"groupRestore");function hrt(e,t,r,n,i){let o=iie(e,t);if(o==null)return{keys:null,values:null,target:null,flat:!0};let a=Object.keys(o),u=a.length,c=t.length,l=i?[...t]:void 0,f=new Array(u);for(var d=0;d<u;d++){let _=a[d];f[d]=o[_],i?(l[c]=_,o[_]=r(o[_],l)):n?o[_]=r(o[_]):o[_]=r}return{keys:a,values:f,target:o,flat:!0}}s(hrt,"groupRedact");function mrt(e){let t=e.length;for(var r=0;r<t;r++){let{key:i,target:o,value:a}=e[r];if(PT(o,i)&&(o[i]=a),typeof o=="object"){let u=Object.keys(o);for(var n=0;n<u.length;n++){let c=u[n],l=o[c];PT(l,i)&&(l[i]=a)}}}}s(mrt,"nestedRestore");function _rt(e,t,r,n,i,o,a){let u=iie(t,r);if(u==null)return;let c=Object.keys(u),l=c.length;for(var f=0;f<l;f++){let d=c[f],{value:_,parent:m,exists:g}=grt(u,d,r,n,i,o,a);g===!0&&m!==null&&e.push({key:n[n.length-1],target:m,value:_})}return e}s(_rt,"nestedRedact");function PT(e,t){return e!=null?"hasOwn"in Object?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t):!1}s(PT,"has");function grt(e,t,r,n,i,o,a){let u=n.length,c=u-1,l=t;var f=-1,d,_,m,g=null,y=!0,b=null;if(m=d=e[t],typeof d!="object")return{value:null,parent:null,exists:y};for(;d!=null&&++f<u;){if(t=n[f],g=m,t!=="*"&&!b&&!(typeof d=="object"&&t in d)){y=!1;break}if(!(t==="*"&&(b=t,f!==c))){if(b){let S=Object.keys(d);for(var E=0;E<S.length;E++){let O=S[E],P=d[O],I=t==="*";(I||typeof P=="object"&&P!==null&&t in P)&&(I?m=P:m=P[t],_=f!==c?m:o?a?i(m,[...r,l,...n]):i(m):i,I?d[O]=_:P[t]===_?y=!1:P[t]=_===void 0&&i!==void 0||PT(P,t)&&_===m?P[t]:_)}b=null}else m=d[t],_=f!==c?m:o?a?i(m,[...r,l,...n]):i(m):i,d[t]=PT(d,t)&&_===m||_===void 0&&i!==void 0?d[t]:_,d=d[t];if(typeof d!="object")break;m===g&&(y=!1)}}return{value:m,parent:g,exists:y}}s(grt,"specialSet");function iie(e,t){for(var r=-1,n=t.length,i=e;i!=null&&++r<n;)i=i[t[r]];return i}s(iie,"get")});var aie=h((yUt,oie)=>{"use strict";var{groupRestore:yrt,nestedRestore:Ert}=w2();oie.exports=brt;function brt({secret:e,wcLen:t}){return s(function(){if(this.restore)return;let n=Object.keys(e),i=Srt(e,n),o=t>0,a=o?{secret:e,groupRestore:yrt,nestedRestore:Ert}:{secret:e};this.restore=Function("o",vrt(i,n,o)).bind(a)},"compileRestore")}s(brt,"restorer");function Srt(e,t){return t.map(r=>{let{circle:n,escPath:i,leadingBracket:o}=e[r],u=n?`o.${n} = secret[${i}].val`:`o${o?"":"."}${r} = secret[${i}].val`,c=`secret[${i}].val = undefined`;return`
252
+ `}s(frt,"resultTmpl");function drt(e,t){return e===!0?"throw Error('fast-redact: primitives cannot be redacted')":t===!1?"return o":"return this.serialize(o)"}s(drt,"strictImpl")});var w2=h((_Ut,sie)=>{"use strict";sie.exports={groupRedact:hrt,groupRestore:prt,nestedRedact:_rt,nestedRestore:mrt};function prt({keys:e,values:t,target:r}){if(r==null)return;let n=e.length;for(var i=0;i<n;i++){let o=e[i];r[o]=t[i]}}s(prt,"groupRestore");function hrt(e,t,r,n,i){let o=iie(e,t);if(o==null)return{keys:null,values:null,target:null,flat:!0};let a=Object.keys(o),u=a.length,c=t.length,l=i?[...t]:void 0,f=new Array(u);for(var d=0;d<u;d++){let _=a[d];f[d]=o[_],i?(l[c]=_,o[_]=r(o[_],l)):n?o[_]=r(o[_]):o[_]=r}return{keys:a,values:f,target:o,flat:!0}}s(hrt,"groupRedact");function mrt(e){let t=e.length;for(var r=0;r<t;r++){let{key:i,target:o,value:a}=e[r];if(PT(o,i)&&(o[i]=a),typeof o=="object"){let u=Object.keys(o);for(var n=0;n<u.length;n++){let c=u[n],l=o[c];PT(l,i)&&(l[i]=a)}}}}s(mrt,"nestedRestore");function _rt(e,t,r,n,i,o,a){let u=iie(t,r);if(u==null)return;let c=Object.keys(u),l=c.length;for(var f=0;f<l;f++){let d=c[f],{value:_,parent:m,exists:g}=grt(u,d,r,n,i,o,a);g===!0&&m!==null&&e.push({key:n[n.length-1],target:m,value:_})}return e}s(_rt,"nestedRedact");function PT(e,t){return e!=null?"hasOwn"in Object?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t):!1}s(PT,"has");function grt(e,t,r,n,i,o,a){let u=n.length,c=u-1,l=t;var f=-1,d,_,m,g=null,y=!0,b=null;if(m=d=e[t],typeof d!="object")return{value:null,parent:null,exists:y};for(;d!=null&&++f<u;){if(t=n[f],g=m,t!=="*"&&!b&&!(typeof d=="object"&&t in d)){y=!1;break}if(!(t==="*"&&(b=t,f!==c))){if(b){let v=Object.keys(d);for(var E=0;E<v.length;E++){let O=v[E],P=d[O],I=t==="*";(I||typeof P=="object"&&P!==null&&t in P)&&(I?m=P:m=P[t],_=f!==c?m:o?a?i(m,[...r,l,...n]):i(m):i,I?d[O]=_:P[t]===_?y=!1:P[t]=_===void 0&&i!==void 0||PT(P,t)&&_===m?P[t]:_)}b=null}else m=d[t],_=f!==c?m:o?a?i(m,[...r,l,...n]):i(m):i,d[t]=PT(d,t)&&_===m||_===void 0&&i!==void 0?d[t]:_,d=d[t];if(typeof d!="object")break;m===g&&(y=!1)}}return{value:m,parent:g,exists:y}}s(grt,"specialSet");function iie(e,t){for(var r=-1,n=t.length,i=e;i!=null&&++r<n;)i=i[t[r]];return i}s(iie,"get")});var aie=h((yUt,oie)=>{"use strict";var{groupRestore:yrt,nestedRestore:Ert}=w2();oie.exports=brt;function brt({secret:e,wcLen:t}){return s(function(){if(this.restore)return;let n=Object.keys(e),i=Srt(e,n),o=t>0,a=o?{secret:e,groupRestore:yrt,nestedRestore:Ert}:{secret:e};this.restore=Function("o",vrt(i,n,o)).bind(a)},"compileRestore")}s(brt,"restorer");function Srt(e,t){return t.map(r=>{let{circle:n,escPath:i,leadingBracket:o}=e[r],u=n?`o.${n} = secret[${i}].val`:`o${o?"":"."}${r} = secret[${i}].val`,c=`secret[${i}].val = undefined`;return`
253
253
  if (secret[${i}].val !== undefined) {
254
254
  try { ${u} } catch (e) {}
255
255
  ${c}
@@ -269,41 +269,41 @@ caused by: `+Lne(n,t)):r},"_stackWithCauses"),Wtt=s(e=>Lne(e,new Set),"stackWith
269
269
  `:""}
270
270
  ${e}
271
271
  return o
272
- `}s(vrt,"restoreTmpl")});var cie=h((bUt,uie)=>{"use strict";uie.exports=Ort;function Ort(e){let{secret:t,censor:r,compileRestore:n,serialize:i,groupRedact:o,nestedRedact:a,wildcards:u,wcLen:c}=e,l=[{secret:t,censor:r,compileRestore:n}];return i!==!1&&l.push({serialize:i}),c>0&&l.push({groupRedact:o,nestedRedact:a,wildcards:u,wcLen:c}),Object.assign(...l)}s(Ort,"state")});var die=h((vUt,fie)=>{"use strict";var lie=Zne(),Prt=tie(),wrt=nie(),Irt=aie(),{groupRedact:Trt,nestedRedact:Nrt}=w2(),Art=cie(),Rrt=OT(),Crt=lie(),I2=s(e=>e,"noop");I2.restore=I2;var $rt="[REDACTED]";T2.rx=Rrt;T2.validator=lie;fie.exports=T2;function T2(e={}){let t=Array.from(new Set(e.paths||[])),r="serialize"in e&&(e.serialize===!1||typeof e.serialize=="function")?e.serialize:JSON.stringify,n=e.remove;if(n===!0&&r!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let i=n===!0?void 0:"censor"in e?e.censor:$rt,o=typeof i=="function",a=o&&i.length>1;if(t.length===0)return r||I2;Crt({paths:t,serialize:r,censor:i});let{wildcards:u,wcLen:c,secret:l}=Prt({paths:t,censor:i}),f=Irt({secret:l,wcLen:c}),d="strict"in e?e.strict:!0;return wrt({secret:l,wcLen:c,serialize:r,strict:d,isCensorFct:o,censorFctTakesPath:a},Art({secret:l,censor:i,compileRestore:f,serialize:r,groupRedact:Trt,nestedRedact:Nrt,wildcards:u,wcLen:c}))}s(T2,"fastRedact")});var Mm=h((PUt,pie)=>{"use strict";var Drt=Symbol("pino.setLevel"),Lrt=Symbol("pino.getLevel"),jrt=Symbol("pino.levelVal"),Mrt=Symbol("pino.levelComp"),Urt=Symbol("pino.useLevelLabels"),xrt=Symbol("pino.useOnlyCustomLevels"),qrt=Symbol("pino.mixin"),Frt=Symbol("pino.lsCache"),krt=Symbol("pino.chindings"),Brt=Symbol("pino.asJson"),Grt=Symbol("pino.write"),Vrt=Symbol("pino.redactFmt"),zrt=Symbol("pino.time"),Hrt=Symbol("pino.timeSliceIndex"),Krt=Symbol("pino.stream"),Wrt=Symbol("pino.stringify"),Yrt=Symbol("pino.stringifySafe"),Jrt=Symbol("pino.stringifiers"),Xrt=Symbol("pino.end"),Zrt=Symbol("pino.formatOpts"),Qrt=Symbol("pino.messageKey"),ent=Symbol("pino.errorKey"),tnt=Symbol("pino.nestedKey"),rnt=Symbol("pino.nestedKeyStr"),nnt=Symbol("pino.mixinMergeStrategy"),int=Symbol("pino.msgPrefix"),snt=Symbol("pino.wildcardFirst"),ont=Symbol.for("pino.serializers"),ant=Symbol.for("pino.formatters"),unt=Symbol.for("pino.hooks"),cnt=Symbol.for("pino.metadata");pie.exports={setLevelSym:Drt,getLevelSym:Lrt,levelValSym:jrt,levelCompSym:Mrt,useLevelLabelsSym:Urt,mixinSym:qrt,lsCacheSym:Frt,chindingsSym:krt,asJsonSym:Brt,writeSym:Grt,serializersSym:ont,redactFmtSym:Vrt,timeSym:zrt,timeSliceIndexSym:Hrt,streamSym:Krt,stringifySym:Wrt,stringifySafeSym:Yrt,stringifiersSym:Jrt,endSym:Xrt,formatOptsSym:Zrt,messageKeySym:Qrt,errorKeySym:ent,nestedKeySym:tnt,wildcardFirstSym:snt,needsMetadataGsym:cnt,useOnlyCustomLevelsSym:xrt,formattersSym:ant,hooksSym:unt,nestedKeyStrSym:rnt,mixinMergeStrategySym:nnt,msgPrefixSym:int}});var R2=h((wUt,gie)=>{"use strict";var A2=die(),{redactFmtSym:lnt,wildcardFirstSym:wT}=Mm(),{rx:N2,validator:fnt}=A2,hie=fnt({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:e=>`pino \u2013 redact paths array contains an invalid path (${e})`}),mie="[Redacted]",_ie=!1;function dnt(e,t){let{paths:r,censor:n}=pnt(e),i=r.reduce((u,c)=>{N2.lastIndex=0;let l=N2.exec(c),f=N2.exec(c),d=l[1]!==void 0?l[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):l[0];if(d==="*"&&(d=wT),f===null)return u[d]=null,u;if(u[d]===null)return u;let{index:_}=f,m=`${c.substr(_,c.length-1)}`;return u[d]=u[d]||[],d!==wT&&u[d].length===0&&u[d].push(...u[wT]||[]),d===wT&&Object.keys(u).forEach(function(g){u[g]&&u[g].push(m)}),u[d].push(m),u},{}),o={[lnt]:A2({paths:r,censor:n,serialize:t,strict:_ie})},a=s((...u)=>t(typeof n=="function"?n(...u):n),"topCensor");return[...Object.keys(i),...Object.getOwnPropertySymbols(i)].reduce((u,c)=>{if(i[c]===null)u[c]=l=>a(l,[c]);else{let l=typeof n=="function"?(f,d)=>n(f,[c,...d]):n;u[c]=A2({paths:i[c],censor:l,serialize:t,strict:_ie})}return u},o)}s(dnt,"redaction");function pnt(e){if(Array.isArray(e))return e={paths:e,censor:mie},hie(e),e;let{paths:t,censor:r=mie,remove:n}=e;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return n===!0&&(r=void 0),hie({paths:t,censor:r}),{paths:t,censor:r}}s(pnt,"handle");gie.exports=dnt});var Eie=h((TUt,yie)=>{"use strict";var hnt=s(()=>"","nullTime"),mnt=s(()=>`,"time":${Date.now()}`,"epochTime"),_nt=s(()=>`,"time":${Math.round(Date.now()/1e3)}`,"unixTime"),gnt=s(()=>`,"time":"${new Date(Date.now()).toISOString()}"`,"isoTime");yie.exports={nullTime:hnt,epochTime:mnt,unixTime:_nt,isoTime:gnt}});var Sie=h((AUt,bie)=>{"use strict";function ynt(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}s(ynt,"tryStringify");bie.exports=Ent;function Ent(e,t,r){var n=r&&r.stringify||ynt,i=1;if(typeof e=="object"&&e!==null){var o=t.length+i;if(o===1)return e;var a=new Array(o);a[0]=n(e);for(var u=1;u<o;u++)a[u]=n(t[u]);return a.join(" ")}if(typeof e!="string")return e;var c=t.length;if(c===0)return e;for(var l="",f=1-i,d=-1,_=e&&e.length||0,m=0;m<_;){if(e.charCodeAt(m)===37&&m+1<_){switch(d=d>-1?d:0,e.charCodeAt(m+1)){case 100:case 102:if(f>=c||t[f]==null)break;d<m&&(l+=e.slice(d,m)),l+=Number(t[f]),d=m+2,m++;break;case 105:if(f>=c||t[f]==null)break;d<m&&(l+=e.slice(d,m)),l+=Math.floor(Number(t[f])),d=m+2,m++;break;case 79:case 111:case 106:if(f>=c||t[f]===void 0)break;d<m&&(l+=e.slice(d,m));var g=typeof t[f];if(g==="string"){l+="'"+t[f]+"'",d=m+2,m++;break}if(g==="function"){l+=t[f].name||"<anonymous>",d=m+2,m++;break}l+=n(t[f]),d=m+2,m++;break;case 115:if(f>=c)break;d<m&&(l+=e.slice(d,m)),l+=String(t[f]),d=m+2,m++;break;case 37:d<m&&(l+=e.slice(d,m)),l+="%",d=m+2,m++,f--;break}++f}++m}return d===-1?e:(d<_&&(l+=e.slice(d)),l)}s(Ent,"format")});var $2=h((CUt,C2)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let t=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(e,0,0,Number(r))};s(t,"sleep");let e=new Int32Array(new SharedArrayBuffer(4));C2.exports=t}else{let e=function(t){if((t>0&&t<1/0)===!1)throw typeof t!="number"&&typeof t!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let n=Date.now()+Number(t);for(;n>Date.now(););};s(e,"sleep"),C2.exports=e}});var Aie=h((DUt,Nie)=>{"use strict";var _r=require("fs"),bnt=require("events"),Snt=require("util").inherits,vie=require("path"),L2=$2(),IT=100,TT=Buffer.allocUnsafe(0),vnt=16*1024,Oie="buffer",Pie="utf8";function wie(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(o,a){if(o){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",o)}):t.emit("error",o);return}t.fd=a,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!(t._reopening||t.destroyed)&&(!t._writing&&t._len>t.minLength||t._flushPending)&&t._actualWrite()}s(r,"fileOpened");let n=t.append?"a":"w",i=t.mode;if(t.sync)try{t.mkdir&&_r.mkdirSync(vie.dirname(e),{recursive:!0});let o=_r.openSync(e,n,i);r(null,o)}catch(o){throw r(o),o}else t.mkdir?_r.mkdir(vie.dirname(e),{recursive:!0},o=>{if(o)return r(o);_r.open(e,n,i,r)}):_r.open(e,n,i,r)}s(wie,"openFile");function Oo(e){if(!(this instanceof Oo))return new Oo(e);let{fd:t,dest:r,minLength:n,maxLength:i,maxWrite:o,sync:a,append:u=!0,mkdir:c,retryEAGAIN:l,fsync:f,contentMode:d,mode:_}=e||{};t=t||r,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(n||0,16387),this.file=null,this.destroyed=!1,this.minLength=n||0,this.maxLength=i||0,this.maxWrite=o||vnt,this.sync=a||!1,this.writable=!0,this._fsync=f||!1,this.append=u||!1,this.mode=_,this.retryEAGAIN=l||(()=>!0),this.mkdir=c||!1;let m,g;if(d===Oie)this._writingBuf=TT,this.write=wnt,this.flush=Tnt,this.flushSync=Ant,this._actualWrite=Cnt,m=s(()=>_r.writeSync(this.fd,this._writingBuf),"fsWriteSync"),g=s(()=>_r.write(this.fd,this._writingBuf,this.release),"fsWrite");else if(d===void 0||d===Pie)this._writingBuf="",this.write=Pnt,this.flush=Int,this.flushSync=Nnt,this._actualWrite=Rnt,m=s(()=>_r.writeSync(this.fd,this._writingBuf,"utf8"),"fsWriteSync"),g=s(()=>_r.write(this.fd,this._writingBuf,"utf8",this.release),"fsWrite");else throw new Error(`SonicBoom supports "${Pie}" and "${Oie}", but passed ${d}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")wie(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(y,b)=>{if(y){if((y.code==="EAGAIN"||y.code==="EBUSY")&&this.retryEAGAIN(y,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{L2(IT),this.release(void 0,0)}catch(O){this.release(O)}else setTimeout(g,IT);else this._writing=!1,this.emit("error",y);return}this.emit("write",b);let E=D2(this._writingBuf,this._len,b);if(this._len=E.len,this._writingBuf=E.writingBuf,this._writingBuf.length){if(!this.sync){g();return}try{do{let O=m(),P=D2(this._writingBuf,this._len,O);this._len=P.len,this._writingBuf=P.writingBuf}while(this._writingBuf.length)}catch(O){this.release(O);return}}this._fsync&&_r.fsyncSync(this.fd);let S=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):S>this.minLength?this._actualWrite():this._ending?S>0?this._actualWrite():(this._writing=!1,NT(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(Ont,this)):this.emit("drain"))},this.on("newListener",function(y){y==="drain"&&(this._asyncDrainScheduled=!1)})}s(Oo,"SonicBoom");function D2(e,t,r){return typeof e=="string"&&Buffer.byteLength(e)!==r&&(r=Buffer.from(e).subarray(0,r).toString().length),t=Math.max(t-r,0),e=e.slice(r),{writingBuf:e,len:t}}s(D2,"releaseWritingBuf");function Ont(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}s(Ont,"emitDrain");Snt(Oo,bnt);function Iie(e,t){return e.length===0?TT:e.length===1?e[0]:Buffer.concat(e,t)}s(Iie,"mergeBuf");function Pnt(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||r[r.length-1].length+e.length>this.maxWrite?r.push(""+e):r[r.length-1]+=e,this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}s(Pnt,"write");function wnt(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs,n=this._lens;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||n[n.length-1]+e.length>this.maxWrite?(r.push([e]),n.push(e.length)):(r[r.length-1].push(e),n[n.length-1]+=e.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}s(wnt,"writeBuffer");function Tie(e){this._flushPending=!0;let t=s(()=>{this._fsync?(this._flushPending=!1,e()):_r.fsync(this.fd,n=>{this._flushPending=!1,e(n)}),this.off("error",r)},"onDrain"),r=s(n=>{this._flushPending=!1,e(n),this.off("drain",t)},"onError");this.once("drain",t),this.once("error",r)}s(Tie,"callFlushCallbackOnDrain");function Int(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&Tie.call(this,e),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}s(Int,"flush");function Tnt(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&Tie.call(this,e),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}s(Tnt,"flushBuffer");Oo.prototype.reopen=function(e){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(e)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&_r.close(t,r=>{if(r)return this.emit("error",r)})}),wie(e||this.file,this)};Oo.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():NT(this)))};function Nnt(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let e="";for(;this._bufs.length||e;){e.length<=0&&(e=this._bufs[0]);try{let t=_r.writeSync(this.fd,e,"utf8"),r=D2(e,this._len,t);e=r.writingBuf,this._len=r.len,e.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;L2(IT)}}try{_r.fsyncSync(this.fd)}catch{}}s(Nnt,"flushSync");function Ant(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=TT);let e=TT;for(;this._bufs.length||e.length;){e.length<=0&&(e=Iie(this._bufs[0],this._lens[0]));try{let t=_r.writeSync(this.fd,e);e=e.subarray(t),this._len=Math.max(this._len-t,0),e.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;L2(IT)}}}s(Ant,"flushBufferSync");Oo.prototype.destroy=function(){this.destroyed||NT(this)};function Rnt(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf||this._bufs.shift()||"",this.sync)try{let t=_r.writeSync(this.fd,this._writingBuf,"utf8");e(null,t)}catch(t){e(t)}else _r.write(this.fd,this._writingBuf,"utf8",e)}s(Rnt,"actualWrite");function Cnt(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:Iie(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=_r.writeSync(this.fd,this._writingBuf);e(null,t)}catch(t){e(t)}else _r.write(this.fd,this._writingBuf,e)}s(Cnt,"actualWriteBuffer");function NT(e){if(e.fd===-1){e.once("ready",NT.bind(null,e));return}e.destroyed=!0,e._bufs=[],e._lens=[],_r.fsync(e.fd,t);function t(){e.fd!==1&&e.fd!==2?_r.close(e.fd,r):r()}s(t,"closeWrapped");function r(n){if(n){e.emit("error",n);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}s(r,"done")}s(NT,"actualClose");Oo.SonicBoom=Oo;Oo.default=Oo;Nie.exports=Oo});var j2=h((jUt,jie)=>{"use strict";var Vc={exit:[],beforeExit:[]},Rie={exit:Dnt,beforeExit:Lnt},Cie=new FinalizationRegistry(jnt);function $nt(e){Vc[e].length>0||process.on(e,Rie[e])}s($nt,"install");function $ie(e){Vc[e].length>0||process.removeListener(e,Rie[e])}s($ie,"uninstall");function Dnt(){Die("exit")}s(Dnt,"onExit");function Lnt(){Die("beforeExit")}s(Lnt,"onBeforeExit");function Die(e){for(let t of Vc[e]){let r=t.deref(),n=t.fn;r!==void 0&&n(r,e)}}s(Die,"callRefs");function jnt(e){for(let t of["exit","beforeExit"]){let r=Vc[t].indexOf(e);Vc[t].splice(r,r+1),$ie(t)}}s(jnt,"clear");function Lie(e,t,r){if(t===void 0)throw new Error("the object can't be undefined");$nt(e);let n=new WeakRef(t);n.fn=r,Cie.register(t,n),Vc[e].push(n)}s(Lie,"_register");function Mnt(e,t){Lie("exit",e,t)}s(Mnt,"register");function Unt(e,t){Lie("beforeExit",e,t)}s(Unt,"registerBeforeExit");function xnt(e){Cie.unregister(e);for(let t of["exit","beforeExit"])Vc[t]=Vc[t].filter(r=>{let n=r.deref();return n&&n!==e}),$ie(t)}s(xnt,"unregister");jie.exports={register:Mnt,registerBeforeExit:Unt,unregister:xnt}});var x2=h((UUt,Mie)=>{"use strict";var{createRequire:qnt}=require("module"),Fnt=P2(),{join:M2,isAbsolute:knt,sep:Bnt}=require("path"),Gnt=$2(),U2=j2(),Vnt=require("thread-stream");function znt(e){U2.register(e,Knt),U2.registerBeforeExit(e,Wnt),e.on("close",function(){U2.unregister(e)})}s(znt,"setupOnExit");function Hnt(e,t,r){let n=new Vnt({filename:e,workerData:t,workerOpts:r});n.on("ready",i),n.on("close",function(){process.removeListener("exit",o)}),process.on("exit",o);function i(){process.removeListener("exit",o),n.unref(),r.autoEnd!==!1&&znt(n)}s(i,"onReady");function o(){n.closed||(n.flushSync(),Gnt(100),n.end())}return s(o,"onExit"),n}s(Hnt,"buildStream");function Knt(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}s(Knt,"autoEnd");function Wnt(e){e.flushSync()}s(Wnt,"flush");function Ynt(e){let{pipeline:t,targets:r,levels:n,dedupe:i,options:o={},worker:a={},caller:u=Fnt()}=e,c=typeof u=="string"?[u]:u,l="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},f=e.target;if(f&&r)throw new Error("only one of target or targets can be specified");return r?(f=l["pino-worker"]||M2(__dirname,"worker.js"),o.targets=r.map(_=>({..._,target:d(_.target)}))):t&&(f=l["pino-pipeline-worker"]||M2(__dirname,"worker-pipeline.js"),o.targets=t.map(_=>({..._,target:d(_.target)}))),n&&(o.levels=n),i&&(o.dedupe=i),Hnt(d(f),o,a);function d(_){if(_=l[_]||_,knt(_)||_.indexOf("file://")===0)return _;if(_==="pino/file")return M2(__dirname,"..","file.js");let m;for(let g of c)try{let y=g==="node:repl"?process.cwd()+Bnt:g;m=qnt(y).resolve(_);break}catch{continue}if(!m)throw new Error(`unable to determine transport target for "${_}"`);return m}s(d,"fixTarget")}s(Ynt,"transport");Mie.exports=Ynt});var CT=h((qUt,Kie)=>{"use strict";var Uie=Sie(),{mapHttpRequest:Jnt,mapHttpResponse:Xnt}=O2(),F2=Aie(),xie=j2(),{lsCacheSym:Znt,chindingsSym:kie,writeSym:qie,serializersSym:Bie,formatOptsSym:Fie,endSym:Qnt,stringifiersSym:Gie,stringifySym:Vie,stringifySafeSym:k2,wildcardFirstSym:zie,nestedKeySym:eit,formattersSym:Hie,messageKeySym:tit,errorKeySym:rit,nestedKeyStrSym:nit,msgPrefixSym:AT}=Mm(),{isMainThread:iit}=require("worker_threads"),sit=x2();function Um(){}s(Um,"noop");function oit(e,t){if(!t)return r;return s(function(...i){t.call(this,i,r,e)},"hookWrappedLog");function r(n,...i){if(typeof n=="object"){let o=n;n!==null&&(n.method&&n.headers&&n.socket?n=Jnt(n):typeof n.setHeader=="function"&&(n=Xnt(n)));let a;o===null&&i.length===0?a=[null]:(o=i.shift(),a=i),typeof this[AT]=="string"&&o!==void 0&&o!==null&&(o=this[AT]+o),this[qie](n,Uie(o,a,this[Fie]),e)}else{let o=n===void 0?i.shift():n;typeof this[AT]=="string"&&o!==void 0&&o!==null&&(o=this[AT]+o),this[qie](null,Uie(o,i,this[Fie]),e)}}}s(oit,"genLog");function q2(e){let t="",r=0,n=!1,i=255,o=e.length;if(o>100)return JSON.stringify(e);for(var a=0;a<o&&i>=32;a++)i=e.charCodeAt(a),(i===34||i===92)&&(t+=e.slice(r,a)+"\\",r=a,n=!0);return n?t+=e.slice(r):t=e,i<32?JSON.stringify(e):'"'+t+'"'}s(q2,"asString");function ait(e,t,r,n){let i=this[Vie],o=this[k2],a=this[Gie],u=this[Qnt],c=this[kie],l=this[Bie],f=this[Hie],d=this[tit],_=this[rit],m=this[Znt][r]+n;m=m+c;let g;f.log&&(e=f.log(e));let y=a[zie],b="";for(let S in e)if(g=e[S],Object.prototype.hasOwnProperty.call(e,S)&&g!==void 0){l[S]?g=l[S](g):S===_&&l.err&&(g=l.err(g));let O=a[S]||y;switch(typeof g){case"undefined":case"function":continue;case"number":Number.isFinite(g)===!1&&(g=null);case"boolean":O&&(g=O(g));break;case"string":g=(O||q2)(g);break;default:g=(O||i)(g,o)}if(g===void 0)continue;let P=q2(S);b+=","+P+":"+g}let E="";if(t!==void 0){g=l[d]?l[d](t):t;let S=a[d]||y;switch(typeof g){case"function":break;case"number":Number.isFinite(g)===!1&&(g=null);case"boolean":S&&(g=S(g)),E=',"'+d+'":'+g;break;case"string":g=(S||q2)(g),E=',"'+d+'":'+g;break;default:g=(S||i)(g,o),E=',"'+d+'":'+g}}return this[eit]&&b?m+this[nit]+b.slice(1)+"}"+E+u:m+b+E+u}s(ait,"asJson");function uit(e,t){let r,n=e[kie],i=e[Vie],o=e[k2],a=e[Gie],u=a[zie],c=e[Bie],l=e[Hie].bindings;t=l(t);for(let f in t)if(r=t[f],(f!=="level"&&f!=="serializers"&&f!=="formatters"&&f!=="customLevels"&&t.hasOwnProperty(f)&&r!==void 0)===!0){if(r=c[f]?c[f](r):r,r=(a[f]||u||i)(r,o),r===void 0)continue;n+=',"'+f+'":'+r}return n}s(uit,"asChindings");function cit(e){return e.write!==e.constructor.prototype.write}s(cit,"hasBeenTampered");var lit=process.env.NODE_V8_COVERAGE||process.env.V8_COVERAGE;function RT(e){let t=new F2(e);return t.on("error",r),!lit&&!e.sync&&iit&&(xie.register(t,fit),t.on("close",function(){xie.unregister(t)})),t;function r(n){if(n.code==="EPIPE"){t.write=Um,t.end=Um,t.flushSync=Um,t.destroy=Um;return}t.removeListener("error",r),t.emit("error",n)}s(r,"filterBrokenPipe")}s(RT,"buildSafeSonicBoom");function fit(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}s(fit,"autoEnd");function dit(e){return s(function(r,n,i={},o){if(typeof i=="string")o=RT({dest:i}),i={};else if(typeof o=="string"){if(i&&i.transport)throw Error("only one of option.transport or stream can be specified");o=RT({dest:o})}else if(i instanceof F2||i.writable||i._writableState)o=i,i={};else if(i.transport){if(i.transport instanceof F2||i.transport.writable||i.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(i.transport.targets&&i.transport.targets.length&&i.formatters&&typeof i.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let c;i.customLevels&&(c=i.useOnlyCustomLevels?i.customLevels:Object.assign({},i.levels,i.customLevels)),o=sit({caller:n,...i.transport,levels:c})}if(i=Object.assign({},e,i),i.serializers=Object.assign({},e.serializers,i.serializers),i.formatters=Object.assign({},e.formatters,i.formatters),i.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:a,onChild:u}=i;return a===!1&&(i.level="silent"),u||(i.onChild=Um),o||(cit(process.stdout)?o=process.stdout:o=RT({fd:process.stdout.fd||1})),{opts:i,stream:o}},"normalizeArgs")}s(dit,"createArgsNormalizer");function pit(e,t){try{return JSON.stringify(e)}catch{try{return(t||this[k2])(e)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}s(pit,"stringify");function hit(e,t,r){return{level:e,bindings:t,log:r}}s(hit,"buildFormatters");function mit(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e===void 0?1:e}s(mit,"normalizeDestFileDescriptor");Kie.exports={noop:Um,buildSafeSonicBoom:RT,asChindings:uit,asJson:ait,genLog:oit,createArgsNormalizer:dit,stringify:pit,buildFormatters:hit,normalizeDestFileDescriptor:mit}});var $T=h((kUt,Wie)=>{var _it={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},git={ASC:"ASC",DESC:"DESC"};Wie.exports={DEFAULT_LEVELS:_it,SORTING_ORDER:git}});var V2=h((BUt,Zie)=>{"use strict";var{lsCacheSym:yit,levelValSym:B2,useOnlyCustomLevelsSym:Eit,streamSym:bit,formattersSym:Sit,hooksSym:vit,levelCompSym:Yie}=Mm(),{noop:Oit,genLog:$d}=CT(),{DEFAULT_LEVELS:ba,SORTING_ORDER:Jie}=$T(),Xie={fatal:e=>{let t=$d(ba.fatal,e);return function(...r){let n=this[bit];if(t.call(this,...r),typeof n.flushSync=="function")try{n.flushSync()}catch{}}},error:e=>$d(ba.error,e),warn:e=>$d(ba.warn,e),info:e=>$d(ba.info,e),debug:e=>$d(ba.debug,e),trace:e=>$d(ba.trace,e)},G2=Object.keys(ba).reduce((e,t)=>(e[ba[t]]=t,e),{}),Pit=Object.keys(G2).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function wit(e){let t=e[Sit].level,{labels:r}=e.levels,n={};for(let i in r){let o=t(r[i],Number(i));n[i]=JSON.stringify(o).slice(0,-1)}return e[yit]=n,e}s(wit,"genLsCache");function Iit(e,t){if(t)return!1;switch(e){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}s(Iit,"isStandardLevel");function Tit(e){let{labels:t,values:r}=this.levels;if(typeof e=="number"){if(t[e]===void 0)throw Error("unknown level value"+e);e=t[e]}if(r[e]===void 0)throw Error("unknown level "+e);let n=this[B2],i=this[B2]=r[e],o=this[Eit],a=this[Yie],u=this[vit].logMethod;for(let c in r){if(a(r[c],i)===!1){this[c]=Oit;continue}this[c]=Iit(c,o)?Xie[c](u):$d(r[c],u)}this.emit("level-change",e,i,t[n],n,this)}s(Tit,"setLevel");function Nit(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}s(Nit,"getLevel");function Ait(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&this[Yie](r,this[B2])}s(Ait,"isLevelEnabled");function Rit(e,t,r){return e===Jie.DESC?t<=r:t>=r}s(Rit,"compareLevel");function Cit(e){return typeof e=="string"?Rit.bind(null,e):e}s(Cit,"genLevelComparison");function $it(e=null,t=!1){let r=e?Object.keys(e).reduce((o,a)=>(o[e[a]]=a,o),{}):null,n=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:G2,r),i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:ba,e);return{labels:n,values:i}}s($it,"mappings");function Dit(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(o=>t[o]),r?[]:Object.keys(G2).map(o=>+o),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:ba,t);if(!(e in n))throw Error(`default level:${e} must be included in custom levels`)}s(Dit,"assertDefaultLevelFound");function Lit(e,t){let{labels:r,values:n}=e;for(let i in t){if(i in n)throw Error("levels cannot be overridden");if(t[i]in r)throw Error("pre-existing level values cannot be used for new levels")}}s(Lit,"assertNoLevelCollisions");function jit(e){if(typeof e!="function"&&!(typeof e=="string"&&Object.values(Jie).includes(e)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}s(jit,"assertLevelComparison");Zie.exports={initialLsCache:Pit,genLsCache:wit,levelMethods:Xie,getLevel:Nit,setLevel:Tit,isLevelEnabled:Ait,mappings:$it,assertNoLevelCollisions:Lit,assertDefaultLevelFound:Dit,genLevelComparison:Cit,assertLevelComparison:jit}});var z2=h((VUt,Qie)=>{"use strict";Qie.exports={version:"8.19.0"}});var lse=h((HUt,cse)=>{"use strict";var{EventEmitter:Mit}=require("events"),{lsCacheSym:Uit,levelValSym:xit,setLevelSym:K2,getLevelSym:ese,chindingsSym:W2,parsedChindingsSym:qit,mixinSym:Fit,asJsonSym:sse,writeSym:kit,mixinMergeStrategySym:Bit,timeSym:Git,timeSliceIndexSym:Vit,streamSym:ose,serializersSym:Dd,formattersSym:H2,errorKeySym:zit,messageKeySym:Hit,useOnlyCustomLevelsSym:Kit,needsMetadataGsym:Wit,redactFmtSym:Yit,stringifySym:Jit,formatOptsSym:Xit,stringifiersSym:Zit,msgPrefixSym:tse}=Mm(),{getLevel:Qit,setLevel:est,isLevelEnabled:tst,mappings:rst,initialLsCache:nst,genLsCache:ist,assertNoLevelCollisions:sst}=V2(),{asChindings:ase,asJson:ost,buildFormatters:rse,stringify:nse}=CT(),{version:ast}=z2(),ust=R2(),cst=class{static{s(this,"Pino")}},use={constructor:cst,child:lst,bindings:fst,setBindings:dst,flush:_st,isLevelEnabled:tst,version:ast,get level(){return this[ese]()},set level(e){this[K2](e)},get levelVal(){return this[xit]},set levelVal(e){throw Error("levelVal is read-only")},[Uit]:nst,[kit]:hst,[sse]:ost,[ese]:Qit,[K2]:est};Object.setPrototypeOf(use,Mit.prototype);cse.exports=function(){return Object.create(use)};var ise=s(e=>e,"resetChildingsFormatter");function lst(e,t){if(!e)throw Error("missing bindings for child Pino");t=t||{};let r=this[Dd],n=this[H2],i=Object.create(this);if(t.hasOwnProperty("serializers")===!0){i[Dd]=Object.create(null);for(let f in r)i[Dd][f]=r[f];let c=Object.getOwnPropertySymbols(r);for(var o=0;o<c.length;o++){let f=c[o];i[Dd][f]=r[f]}for(let f in t.serializers)i[Dd][f]=t.serializers[f];let l=Object.getOwnPropertySymbols(t.serializers);for(var a=0;a<l.length;a++){let f=l[a];i[Dd][f]=t.serializers[f]}}else i[Dd]=r;if(t.hasOwnProperty("formatters")){let{level:c,bindings:l,log:f}=t.formatters;i[H2]=rse(c||n.level,l||ise,f||n.log)}else i[H2]=rse(n.level,ise,n.log);if(t.hasOwnProperty("customLevels")===!0&&(sst(this.levels,t.customLevels),i.levels=rst(t.customLevels,i[Kit]),ist(i)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){i.redact=t.redact;let c=ust(i.redact,nse),l={stringify:c[Yit]};i[Jit]=nse,i[Zit]=c,i[Xit]=l}typeof t.msgPrefix=="string"&&(i[tse]=(this[tse]||"")+t.msgPrefix),i[W2]=ase(i,e);let u=t.level||this.level;return i[K2](u),this.onChild(i),i}s(lst,"child");function fst(){let t=`{${this[W2].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}s(fst,"bindings");function dst(e){let t=ase(this,e);this[W2]=t,delete this[qit]}s(dst,"setBindings");function pst(e,t){return Object.assign(t,e)}s(pst,"defaultMixinMergeStrategy");function hst(e,t,r){let n=this[Git](),i=this[Fit],o=this[zit],a=this[Hit],u=this[Bit]||pst,c;e==null?c={}:e instanceof Error?(c={[o]:e},t===void 0&&(t=e.message)):(c=e,t===void 0&&e[a]===void 0&&e[o]&&(t=e[o].message)),i&&(c=u(c,i(c,r,this)));let l=this[sse](c,t,r,n),f=this[ose];f[Wit]===!0&&(f.lastLevel=r,f.lastObj=c,f.lastMsg=t,f.lastTime=n.slice(this[Vit]),f.lastLogger=this),f.write(l)}s(hst,"write");function mst(){}s(mst,"noop");function _st(e){if(e!=null&&typeof e!="function")throw Error("callback must be a function");let t=this[ose];typeof t.flush=="function"?t.flush(e||mst):e&&e()}s(_st,"flush")});var mse=h((Z2,hse)=>{"use strict";var{hasOwnProperty:DT}=Object.prototype,jd=X2();jd.configure=X2;jd.stringify=jd;jd.default=jd;Z2.stringify=jd;Z2.configure=X2;hse.exports=jd;var gst=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function zc(e){return e.length<5e3&&!gst.test(e)?`"${e}"`:JSON.stringify(e)}s(zc,"strEscape");function Y2(e){if(e.length>200)return e.sort();for(let t=1;t<e.length;t++){let r=e[t],n=t;for(;n!==0&&e[n-1]>r;)e[n]=e[n-1],n--;e[n]=r}return e}s(Y2,"insertSort");var yst=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function J2(e){return yst.call(e)!==void 0&&e.length!==0}s(J2,"isTypedArrayWithEntries");function fse(e,t,r){e.length<r&&(r=e.length);let n=t===","?"":" ",i=`"0":${n}${e[0]}`;for(let o=1;o<r;o++)i+=`${t}"${o}":${n}${e[o]}`;return i}s(fse,"stringifyTypedArray");function Est(e){if(DT.call(e,"circularValue")){let t=e.circularValue;if(typeof t=="string")return`"${t}"`;if(t==null)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}s(Est,"getCircularValueOption");function dse(e,t){let r;if(DT.call(e,t)&&(r=e[t],typeof r!="boolean"))throw new TypeError(`The "${t}" argument must be of type boolean`);return r===void 0?!0:r}s(dse,"getBooleanOption");function pse(e,t){let r;if(DT.call(e,t)){if(r=e[t],typeof r!="number")throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${t}" argument must be an integer`);if(r<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return r===void 0?1/0:r}s(pse,"getPositiveIntegerOption");function Ld(e){return e===1?"1 item":`${e} items`}s(Ld,"getItemCount");function bst(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}s(bst,"getUniqueReplacerSet");function Sst(e){if(DT.call(e,"strict")){let t=e.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)return r=>{let n=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(n+=` (${r.toString()})`),new Error(n)}}}s(Sst,"getStrictOption");function X2(e){e={...e};let t=Sst(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=Est(e),n=dse(e,"bigint"),i=dse(e,"deterministic"),o=pse(e,"maximumDepth"),a=pse(e,"maximumBreadth");function u(_,m,g,y,b,E){let S=m[_];switch(typeof S=="object"&&S!==null&&typeof S.toJSON=="function"&&(S=S.toJSON(_)),S=y.call(m,_,S),typeof S){case"string":return zc(S);case"object":{if(S===null)return"null";if(g.indexOf(S)!==-1)return r;let O="",P=",",I=E;if(Array.isArray(S)){if(S.length===0)return"[]";if(o<g.length+1)return'"[Array]"';g.push(S),b!==""&&(E+=b,O+=`
272
+ `}s(vrt,"restoreTmpl")});var cie=h((bUt,uie)=>{"use strict";uie.exports=Ort;function Ort(e){let{secret:t,censor:r,compileRestore:n,serialize:i,groupRedact:o,nestedRedact:a,wildcards:u,wcLen:c}=e,l=[{secret:t,censor:r,compileRestore:n}];return i!==!1&&l.push({serialize:i}),c>0&&l.push({groupRedact:o,nestedRedact:a,wildcards:u,wcLen:c}),Object.assign(...l)}s(Ort,"state")});var die=h((vUt,fie)=>{"use strict";var lie=Zne(),Prt=tie(),wrt=nie(),Irt=aie(),{groupRedact:Trt,nestedRedact:Nrt}=w2(),Art=cie(),Rrt=OT(),Crt=lie(),I2=s(e=>e,"noop");I2.restore=I2;var $rt="[REDACTED]";T2.rx=Rrt;T2.validator=lie;fie.exports=T2;function T2(e={}){let t=Array.from(new Set(e.paths||[])),r="serialize"in e&&(e.serialize===!1||typeof e.serialize=="function")?e.serialize:JSON.stringify,n=e.remove;if(n===!0&&r!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let i=n===!0?void 0:"censor"in e?e.censor:$rt,o=typeof i=="function",a=o&&i.length>1;if(t.length===0)return r||I2;Crt({paths:t,serialize:r,censor:i});let{wildcards:u,wcLen:c,secret:l}=Prt({paths:t,censor:i}),f=Irt({secret:l,wcLen:c}),d="strict"in e?e.strict:!0;return wrt({secret:l,wcLen:c,serialize:r,strict:d,isCensorFct:o,censorFctTakesPath:a},Art({secret:l,censor:i,compileRestore:f,serialize:r,groupRedact:Trt,nestedRedact:Nrt,wildcards:u,wcLen:c}))}s(T2,"fastRedact")});var Mm=h((PUt,pie)=>{"use strict";var Drt=Symbol("pino.setLevel"),Lrt=Symbol("pino.getLevel"),jrt=Symbol("pino.levelVal"),Mrt=Symbol("pino.levelComp"),Urt=Symbol("pino.useLevelLabels"),xrt=Symbol("pino.useOnlyCustomLevels"),qrt=Symbol("pino.mixin"),Frt=Symbol("pino.lsCache"),krt=Symbol("pino.chindings"),Brt=Symbol("pino.asJson"),Grt=Symbol("pino.write"),Vrt=Symbol("pino.redactFmt"),zrt=Symbol("pino.time"),Hrt=Symbol("pino.timeSliceIndex"),Krt=Symbol("pino.stream"),Wrt=Symbol("pino.stringify"),Yrt=Symbol("pino.stringifySafe"),Jrt=Symbol("pino.stringifiers"),Xrt=Symbol("pino.end"),Zrt=Symbol("pino.formatOpts"),Qrt=Symbol("pino.messageKey"),ent=Symbol("pino.errorKey"),tnt=Symbol("pino.nestedKey"),rnt=Symbol("pino.nestedKeyStr"),nnt=Symbol("pino.mixinMergeStrategy"),int=Symbol("pino.msgPrefix"),snt=Symbol("pino.wildcardFirst"),ont=Symbol.for("pino.serializers"),ant=Symbol.for("pino.formatters"),unt=Symbol.for("pino.hooks"),cnt=Symbol.for("pino.metadata");pie.exports={setLevelSym:Drt,getLevelSym:Lrt,levelValSym:jrt,levelCompSym:Mrt,useLevelLabelsSym:Urt,mixinSym:qrt,lsCacheSym:Frt,chindingsSym:krt,asJsonSym:Brt,writeSym:Grt,serializersSym:ont,redactFmtSym:Vrt,timeSym:zrt,timeSliceIndexSym:Hrt,streamSym:Krt,stringifySym:Wrt,stringifySafeSym:Yrt,stringifiersSym:Jrt,endSym:Xrt,formatOptsSym:Zrt,messageKeySym:Qrt,errorKeySym:ent,nestedKeySym:tnt,wildcardFirstSym:snt,needsMetadataGsym:cnt,useOnlyCustomLevelsSym:xrt,formattersSym:ant,hooksSym:unt,nestedKeyStrSym:rnt,mixinMergeStrategySym:nnt,msgPrefixSym:int}});var R2=h((wUt,gie)=>{"use strict";var A2=die(),{redactFmtSym:lnt,wildcardFirstSym:wT}=Mm(),{rx:N2,validator:fnt}=A2,hie=fnt({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:e=>`pino \u2013 redact paths array contains an invalid path (${e})`}),mie="[Redacted]",_ie=!1;function dnt(e,t){let{paths:r,censor:n}=pnt(e),i=r.reduce((u,c)=>{N2.lastIndex=0;let l=N2.exec(c),f=N2.exec(c),d=l[1]!==void 0?l[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):l[0];if(d==="*"&&(d=wT),f===null)return u[d]=null,u;if(u[d]===null)return u;let{index:_}=f,m=`${c.substr(_,c.length-1)}`;return u[d]=u[d]||[],d!==wT&&u[d].length===0&&u[d].push(...u[wT]||[]),d===wT&&Object.keys(u).forEach(function(g){u[g]&&u[g].push(m)}),u[d].push(m),u},{}),o={[lnt]:A2({paths:r,censor:n,serialize:t,strict:_ie})},a=s((...u)=>t(typeof n=="function"?n(...u):n),"topCensor");return[...Object.keys(i),...Object.getOwnPropertySymbols(i)].reduce((u,c)=>{if(i[c]===null)u[c]=l=>a(l,[c]);else{let l=typeof n=="function"?(f,d)=>n(f,[c,...d]):n;u[c]=A2({paths:i[c],censor:l,serialize:t,strict:_ie})}return u},o)}s(dnt,"redaction");function pnt(e){if(Array.isArray(e))return e={paths:e,censor:mie},hie(e),e;let{paths:t,censor:r=mie,remove:n}=e;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return n===!0&&(r=void 0),hie({paths:t,censor:r}),{paths:t,censor:r}}s(pnt,"handle");gie.exports=dnt});var Eie=h((TUt,yie)=>{"use strict";var hnt=s(()=>"","nullTime"),mnt=s(()=>`,"time":${Date.now()}`,"epochTime"),_nt=s(()=>`,"time":${Math.round(Date.now()/1e3)}`,"unixTime"),gnt=s(()=>`,"time":"${new Date(Date.now()).toISOString()}"`,"isoTime");yie.exports={nullTime:hnt,epochTime:mnt,unixTime:_nt,isoTime:gnt}});var Sie=h((AUt,bie)=>{"use strict";function ynt(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}s(ynt,"tryStringify");bie.exports=Ent;function Ent(e,t,r){var n=r&&r.stringify||ynt,i=1;if(typeof e=="object"&&e!==null){var o=t.length+i;if(o===1)return e;var a=new Array(o);a[0]=n(e);for(var u=1;u<o;u++)a[u]=n(t[u]);return a.join(" ")}if(typeof e!="string")return e;var c=t.length;if(c===0)return e;for(var l="",f=1-i,d=-1,_=e&&e.length||0,m=0;m<_;){if(e.charCodeAt(m)===37&&m+1<_){switch(d=d>-1?d:0,e.charCodeAt(m+1)){case 100:case 102:if(f>=c||t[f]==null)break;d<m&&(l+=e.slice(d,m)),l+=Number(t[f]),d=m+2,m++;break;case 105:if(f>=c||t[f]==null)break;d<m&&(l+=e.slice(d,m)),l+=Math.floor(Number(t[f])),d=m+2,m++;break;case 79:case 111:case 106:if(f>=c||t[f]===void 0)break;d<m&&(l+=e.slice(d,m));var g=typeof t[f];if(g==="string"){l+="'"+t[f]+"'",d=m+2,m++;break}if(g==="function"){l+=t[f].name||"<anonymous>",d=m+2,m++;break}l+=n(t[f]),d=m+2,m++;break;case 115:if(f>=c)break;d<m&&(l+=e.slice(d,m)),l+=String(t[f]),d=m+2,m++;break;case 37:d<m&&(l+=e.slice(d,m)),l+="%",d=m+2,m++,f--;break}++f}++m}return d===-1?e:(d<_&&(l+=e.slice(d)),l)}s(Ent,"format")});var $2=h((CUt,C2)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let t=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(e,0,0,Number(r))};s(t,"sleep");let e=new Int32Array(new SharedArrayBuffer(4));C2.exports=t}else{let e=function(t){if((t>0&&t<1/0)===!1)throw typeof t!="number"&&typeof t!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let n=Date.now()+Number(t);for(;n>Date.now(););};s(e,"sleep"),C2.exports=e}});var Aie=h((DUt,Nie)=>{"use strict";var _r=require("fs"),bnt=require("events"),Snt=require("util").inherits,vie=require("path"),L2=$2(),IT=100,TT=Buffer.allocUnsafe(0),vnt=16*1024,Oie="buffer",Pie="utf8";function wie(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(o,a){if(o){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",o)}):t.emit("error",o);return}t.fd=a,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!(t._reopening||t.destroyed)&&(!t._writing&&t._len>t.minLength||t._flushPending)&&t._actualWrite()}s(r,"fileOpened");let n=t.append?"a":"w",i=t.mode;if(t.sync)try{t.mkdir&&_r.mkdirSync(vie.dirname(e),{recursive:!0});let o=_r.openSync(e,n,i);r(null,o)}catch(o){throw r(o),o}else t.mkdir?_r.mkdir(vie.dirname(e),{recursive:!0},o=>{if(o)return r(o);_r.open(e,n,i,r)}):_r.open(e,n,i,r)}s(wie,"openFile");function Oo(e){if(!(this instanceof Oo))return new Oo(e);let{fd:t,dest:r,minLength:n,maxLength:i,maxWrite:o,sync:a,append:u=!0,mkdir:c,retryEAGAIN:l,fsync:f,contentMode:d,mode:_}=e||{};t=t||r,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(n||0,16387),this.file=null,this.destroyed=!1,this.minLength=n||0,this.maxLength=i||0,this.maxWrite=o||vnt,this.sync=a||!1,this.writable=!0,this._fsync=f||!1,this.append=u||!1,this.mode=_,this.retryEAGAIN=l||(()=>!0),this.mkdir=c||!1;let m,g;if(d===Oie)this._writingBuf=TT,this.write=wnt,this.flush=Tnt,this.flushSync=Ant,this._actualWrite=Cnt,m=s(()=>_r.writeSync(this.fd,this._writingBuf),"fsWriteSync"),g=s(()=>_r.write(this.fd,this._writingBuf,this.release),"fsWrite");else if(d===void 0||d===Pie)this._writingBuf="",this.write=Pnt,this.flush=Int,this.flushSync=Nnt,this._actualWrite=Rnt,m=s(()=>_r.writeSync(this.fd,this._writingBuf,"utf8"),"fsWriteSync"),g=s(()=>_r.write(this.fd,this._writingBuf,"utf8",this.release),"fsWrite");else throw new Error(`SonicBoom supports "${Pie}" and "${Oie}", but passed ${d}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")wie(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(y,b)=>{if(y){if((y.code==="EAGAIN"||y.code==="EBUSY")&&this.retryEAGAIN(y,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{L2(IT),this.release(void 0,0)}catch(O){this.release(O)}else setTimeout(g,IT);else this._writing=!1,this.emit("error",y);return}this.emit("write",b);let E=D2(this._writingBuf,this._len,b);if(this._len=E.len,this._writingBuf=E.writingBuf,this._writingBuf.length){if(!this.sync){g();return}try{do{let O=m(),P=D2(this._writingBuf,this._len,O);this._len=P.len,this._writingBuf=P.writingBuf}while(this._writingBuf.length)}catch(O){this.release(O);return}}this._fsync&&_r.fsyncSync(this.fd);let v=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):v>this.minLength?this._actualWrite():this._ending?v>0?this._actualWrite():(this._writing=!1,NT(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(Ont,this)):this.emit("drain"))},this.on("newListener",function(y){y==="drain"&&(this._asyncDrainScheduled=!1)})}s(Oo,"SonicBoom");function D2(e,t,r){return typeof e=="string"&&Buffer.byteLength(e)!==r&&(r=Buffer.from(e).subarray(0,r).toString().length),t=Math.max(t-r,0),e=e.slice(r),{writingBuf:e,len:t}}s(D2,"releaseWritingBuf");function Ont(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}s(Ont,"emitDrain");Snt(Oo,bnt);function Iie(e,t){return e.length===0?TT:e.length===1?e[0]:Buffer.concat(e,t)}s(Iie,"mergeBuf");function Pnt(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||r[r.length-1].length+e.length>this.maxWrite?r.push(""+e):r[r.length-1]+=e,this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}s(Pnt,"write");function wnt(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs,n=this._lens;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||n[n.length-1]+e.length>this.maxWrite?(r.push([e]),n.push(e.length)):(r[r.length-1].push(e),n[n.length-1]+=e.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}s(wnt,"writeBuffer");function Tie(e){this._flushPending=!0;let t=s(()=>{this._fsync?(this._flushPending=!1,e()):_r.fsync(this.fd,n=>{this._flushPending=!1,e(n)}),this.off("error",r)},"onDrain"),r=s(n=>{this._flushPending=!1,e(n),this.off("drain",t)},"onError");this.once("drain",t),this.once("error",r)}s(Tie,"callFlushCallbackOnDrain");function Int(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&Tie.call(this,e),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}s(Int,"flush");function Tnt(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&Tie.call(this,e),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}s(Tnt,"flushBuffer");Oo.prototype.reopen=function(e){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(e)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&_r.close(t,r=>{if(r)return this.emit("error",r)})}),wie(e||this.file,this)};Oo.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():NT(this)))};function Nnt(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let e="";for(;this._bufs.length||e;){e.length<=0&&(e=this._bufs[0]);try{let t=_r.writeSync(this.fd,e,"utf8"),r=D2(e,this._len,t);e=r.writingBuf,this._len=r.len,e.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;L2(IT)}}try{_r.fsyncSync(this.fd)}catch{}}s(Nnt,"flushSync");function Ant(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=TT);let e=TT;for(;this._bufs.length||e.length;){e.length<=0&&(e=Iie(this._bufs[0],this._lens[0]));try{let t=_r.writeSync(this.fd,e);e=e.subarray(t),this._len=Math.max(this._len-t,0),e.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;L2(IT)}}}s(Ant,"flushBufferSync");Oo.prototype.destroy=function(){this.destroyed||NT(this)};function Rnt(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf||this._bufs.shift()||"",this.sync)try{let t=_r.writeSync(this.fd,this._writingBuf,"utf8");e(null,t)}catch(t){e(t)}else _r.write(this.fd,this._writingBuf,"utf8",e)}s(Rnt,"actualWrite");function Cnt(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:Iie(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=_r.writeSync(this.fd,this._writingBuf);e(null,t)}catch(t){e(t)}else _r.write(this.fd,this._writingBuf,e)}s(Cnt,"actualWriteBuffer");function NT(e){if(e.fd===-1){e.once("ready",NT.bind(null,e));return}e.destroyed=!0,e._bufs=[],e._lens=[],_r.fsync(e.fd,t);function t(){e.fd!==1&&e.fd!==2?_r.close(e.fd,r):r()}s(t,"closeWrapped");function r(n){if(n){e.emit("error",n);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}s(r,"done")}s(NT,"actualClose");Oo.SonicBoom=Oo;Oo.default=Oo;Nie.exports=Oo});var j2=h((jUt,jie)=>{"use strict";var Vc={exit:[],beforeExit:[]},Rie={exit:Dnt,beforeExit:Lnt},Cie=new FinalizationRegistry(jnt);function $nt(e){Vc[e].length>0||process.on(e,Rie[e])}s($nt,"install");function $ie(e){Vc[e].length>0||process.removeListener(e,Rie[e])}s($ie,"uninstall");function Dnt(){Die("exit")}s(Dnt,"onExit");function Lnt(){Die("beforeExit")}s(Lnt,"onBeforeExit");function Die(e){for(let t of Vc[e]){let r=t.deref(),n=t.fn;r!==void 0&&n(r,e)}}s(Die,"callRefs");function jnt(e){for(let t of["exit","beforeExit"]){let r=Vc[t].indexOf(e);Vc[t].splice(r,r+1),$ie(t)}}s(jnt,"clear");function Lie(e,t,r){if(t===void 0)throw new Error("the object can't be undefined");$nt(e);let n=new WeakRef(t);n.fn=r,Cie.register(t,n),Vc[e].push(n)}s(Lie,"_register");function Mnt(e,t){Lie("exit",e,t)}s(Mnt,"register");function Unt(e,t){Lie("beforeExit",e,t)}s(Unt,"registerBeforeExit");function xnt(e){Cie.unregister(e);for(let t of["exit","beforeExit"])Vc[t]=Vc[t].filter(r=>{let n=r.deref();return n&&n!==e}),$ie(t)}s(xnt,"unregister");jie.exports={register:Mnt,registerBeforeExit:Unt,unregister:xnt}});var x2=h((UUt,Mie)=>{"use strict";var{createRequire:qnt}=require("module"),Fnt=P2(),{join:M2,isAbsolute:knt,sep:Bnt}=require("path"),Gnt=$2(),U2=j2(),Vnt=require("thread-stream");function znt(e){U2.register(e,Knt),U2.registerBeforeExit(e,Wnt),e.on("close",function(){U2.unregister(e)})}s(znt,"setupOnExit");function Hnt(e,t,r){let n=new Vnt({filename:e,workerData:t,workerOpts:r});n.on("ready",i),n.on("close",function(){process.removeListener("exit",o)}),process.on("exit",o);function i(){process.removeListener("exit",o),n.unref(),r.autoEnd!==!1&&znt(n)}s(i,"onReady");function o(){n.closed||(n.flushSync(),Gnt(100),n.end())}return s(o,"onExit"),n}s(Hnt,"buildStream");function Knt(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}s(Knt,"autoEnd");function Wnt(e){e.flushSync()}s(Wnt,"flush");function Ynt(e){let{pipeline:t,targets:r,levels:n,dedupe:i,options:o={},worker:a={},caller:u=Fnt()}=e,c=typeof u=="string"?[u]:u,l="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},f=e.target;if(f&&r)throw new Error("only one of target or targets can be specified");return r?(f=l["pino-worker"]||M2(__dirname,"worker.js"),o.targets=r.map(_=>({..._,target:d(_.target)}))):t&&(f=l["pino-pipeline-worker"]||M2(__dirname,"worker-pipeline.js"),o.targets=t.map(_=>({..._,target:d(_.target)}))),n&&(o.levels=n),i&&(o.dedupe=i),Hnt(d(f),o,a);function d(_){if(_=l[_]||_,knt(_)||_.indexOf("file://")===0)return _;if(_==="pino/file")return M2(__dirname,"..","file.js");let m;for(let g of c)try{let y=g==="node:repl"?process.cwd()+Bnt:g;m=qnt(y).resolve(_);break}catch{continue}if(!m)throw new Error(`unable to determine transport target for "${_}"`);return m}s(d,"fixTarget")}s(Ynt,"transport");Mie.exports=Ynt});var CT=h((qUt,Kie)=>{"use strict";var Uie=Sie(),{mapHttpRequest:Jnt,mapHttpResponse:Xnt}=O2(),F2=Aie(),xie=j2(),{lsCacheSym:Znt,chindingsSym:kie,writeSym:qie,serializersSym:Bie,formatOptsSym:Fie,endSym:Qnt,stringifiersSym:Gie,stringifySym:Vie,stringifySafeSym:k2,wildcardFirstSym:zie,nestedKeySym:eit,formattersSym:Hie,messageKeySym:tit,errorKeySym:rit,nestedKeyStrSym:nit,msgPrefixSym:AT}=Mm(),{isMainThread:iit}=require("worker_threads"),sit=x2();function Um(){}s(Um,"noop");function oit(e,t){if(!t)return r;return s(function(...i){t.call(this,i,r,e)},"hookWrappedLog");function r(n,...i){if(typeof n=="object"){let o=n;n!==null&&(n.method&&n.headers&&n.socket?n=Jnt(n):typeof n.setHeader=="function"&&(n=Xnt(n)));let a;o===null&&i.length===0?a=[null]:(o=i.shift(),a=i),typeof this[AT]=="string"&&o!==void 0&&o!==null&&(o=this[AT]+o),this[qie](n,Uie(o,a,this[Fie]),e)}else{let o=n===void 0?i.shift():n;typeof this[AT]=="string"&&o!==void 0&&o!==null&&(o=this[AT]+o),this[qie](null,Uie(o,i,this[Fie]),e)}}}s(oit,"genLog");function q2(e){let t="",r=0,n=!1,i=255,o=e.length;if(o>100)return JSON.stringify(e);for(var a=0;a<o&&i>=32;a++)i=e.charCodeAt(a),(i===34||i===92)&&(t+=e.slice(r,a)+"\\",r=a,n=!0);return n?t+=e.slice(r):t=e,i<32?JSON.stringify(e):'"'+t+'"'}s(q2,"asString");function ait(e,t,r,n){let i=this[Vie],o=this[k2],a=this[Gie],u=this[Qnt],c=this[kie],l=this[Bie],f=this[Hie],d=this[tit],_=this[rit],m=this[Znt][r]+n;m=m+c;let g;f.log&&(e=f.log(e));let y=a[zie],b="";for(let v in e)if(g=e[v],Object.prototype.hasOwnProperty.call(e,v)&&g!==void 0){l[v]?g=l[v](g):v===_&&l.err&&(g=l.err(g));let O=a[v]||y;switch(typeof g){case"undefined":case"function":continue;case"number":Number.isFinite(g)===!1&&(g=null);case"boolean":O&&(g=O(g));break;case"string":g=(O||q2)(g);break;default:g=(O||i)(g,o)}if(g===void 0)continue;let P=q2(v);b+=","+P+":"+g}let E="";if(t!==void 0){g=l[d]?l[d](t):t;let v=a[d]||y;switch(typeof g){case"function":break;case"number":Number.isFinite(g)===!1&&(g=null);case"boolean":v&&(g=v(g)),E=',"'+d+'":'+g;break;case"string":g=(v||q2)(g),E=',"'+d+'":'+g;break;default:g=(v||i)(g,o),E=',"'+d+'":'+g}}return this[eit]&&b?m+this[nit]+b.slice(1)+"}"+E+u:m+b+E+u}s(ait,"asJson");function uit(e,t){let r,n=e[kie],i=e[Vie],o=e[k2],a=e[Gie],u=a[zie],c=e[Bie],l=e[Hie].bindings;t=l(t);for(let f in t)if(r=t[f],(f!=="level"&&f!=="serializers"&&f!=="formatters"&&f!=="customLevels"&&t.hasOwnProperty(f)&&r!==void 0)===!0){if(r=c[f]?c[f](r):r,r=(a[f]||u||i)(r,o),r===void 0)continue;n+=',"'+f+'":'+r}return n}s(uit,"asChindings");function cit(e){return e.write!==e.constructor.prototype.write}s(cit,"hasBeenTampered");var lit=process.env.NODE_V8_COVERAGE||process.env.V8_COVERAGE;function RT(e){let t=new F2(e);return t.on("error",r),!lit&&!e.sync&&iit&&(xie.register(t,fit),t.on("close",function(){xie.unregister(t)})),t;function r(n){if(n.code==="EPIPE"){t.write=Um,t.end=Um,t.flushSync=Um,t.destroy=Um;return}t.removeListener("error",r),t.emit("error",n)}s(r,"filterBrokenPipe")}s(RT,"buildSafeSonicBoom");function fit(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}s(fit,"autoEnd");function dit(e){return s(function(r,n,i={},o){if(typeof i=="string")o=RT({dest:i}),i={};else if(typeof o=="string"){if(i&&i.transport)throw Error("only one of option.transport or stream can be specified");o=RT({dest:o})}else if(i instanceof F2||i.writable||i._writableState)o=i,i={};else if(i.transport){if(i.transport instanceof F2||i.transport.writable||i.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(i.transport.targets&&i.transport.targets.length&&i.formatters&&typeof i.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let c;i.customLevels&&(c=i.useOnlyCustomLevels?i.customLevels:Object.assign({},i.levels,i.customLevels)),o=sit({caller:n,...i.transport,levels:c})}if(i=Object.assign({},e,i),i.serializers=Object.assign({},e.serializers,i.serializers),i.formatters=Object.assign({},e.formatters,i.formatters),i.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:a,onChild:u}=i;return a===!1&&(i.level="silent"),u||(i.onChild=Um),o||(cit(process.stdout)?o=process.stdout:o=RT({fd:process.stdout.fd||1})),{opts:i,stream:o}},"normalizeArgs")}s(dit,"createArgsNormalizer");function pit(e,t){try{return JSON.stringify(e)}catch{try{return(t||this[k2])(e)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}s(pit,"stringify");function hit(e,t,r){return{level:e,bindings:t,log:r}}s(hit,"buildFormatters");function mit(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e===void 0?1:e}s(mit,"normalizeDestFileDescriptor");Kie.exports={noop:Um,buildSafeSonicBoom:RT,asChindings:uit,asJson:ait,genLog:oit,createArgsNormalizer:dit,stringify:pit,buildFormatters:hit,normalizeDestFileDescriptor:mit}});var $T=h((kUt,Wie)=>{var _it={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},git={ASC:"ASC",DESC:"DESC"};Wie.exports={DEFAULT_LEVELS:_it,SORTING_ORDER:git}});var V2=h((BUt,Zie)=>{"use strict";var{lsCacheSym:yit,levelValSym:B2,useOnlyCustomLevelsSym:Eit,streamSym:bit,formattersSym:Sit,hooksSym:vit,levelCompSym:Yie}=Mm(),{noop:Oit,genLog:$d}=CT(),{DEFAULT_LEVELS:ba,SORTING_ORDER:Jie}=$T(),Xie={fatal:e=>{let t=$d(ba.fatal,e);return function(...r){let n=this[bit];if(t.call(this,...r),typeof n.flushSync=="function")try{n.flushSync()}catch{}}},error:e=>$d(ba.error,e),warn:e=>$d(ba.warn,e),info:e=>$d(ba.info,e),debug:e=>$d(ba.debug,e),trace:e=>$d(ba.trace,e)},G2=Object.keys(ba).reduce((e,t)=>(e[ba[t]]=t,e),{}),Pit=Object.keys(G2).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function wit(e){let t=e[Sit].level,{labels:r}=e.levels,n={};for(let i in r){let o=t(r[i],Number(i));n[i]=JSON.stringify(o).slice(0,-1)}return e[yit]=n,e}s(wit,"genLsCache");function Iit(e,t){if(t)return!1;switch(e){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}s(Iit,"isStandardLevel");function Tit(e){let{labels:t,values:r}=this.levels;if(typeof e=="number"){if(t[e]===void 0)throw Error("unknown level value"+e);e=t[e]}if(r[e]===void 0)throw Error("unknown level "+e);let n=this[B2],i=this[B2]=r[e],o=this[Eit],a=this[Yie],u=this[vit].logMethod;for(let c in r){if(a(r[c],i)===!1){this[c]=Oit;continue}this[c]=Iit(c,o)?Xie[c](u):$d(r[c],u)}this.emit("level-change",e,i,t[n],n,this)}s(Tit,"setLevel");function Nit(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}s(Nit,"getLevel");function Ait(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&this[Yie](r,this[B2])}s(Ait,"isLevelEnabled");function Rit(e,t,r){return e===Jie.DESC?t<=r:t>=r}s(Rit,"compareLevel");function Cit(e){return typeof e=="string"?Rit.bind(null,e):e}s(Cit,"genLevelComparison");function $it(e=null,t=!1){let r=e?Object.keys(e).reduce((o,a)=>(o[e[a]]=a,o),{}):null,n=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:G2,r),i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:ba,e);return{labels:n,values:i}}s($it,"mappings");function Dit(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(o=>t[o]),r?[]:Object.keys(G2).map(o=>+o),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:ba,t);if(!(e in n))throw Error(`default level:${e} must be included in custom levels`)}s(Dit,"assertDefaultLevelFound");function Lit(e,t){let{labels:r,values:n}=e;for(let i in t){if(i in n)throw Error("levels cannot be overridden");if(t[i]in r)throw Error("pre-existing level values cannot be used for new levels")}}s(Lit,"assertNoLevelCollisions");function jit(e){if(typeof e!="function"&&!(typeof e=="string"&&Object.values(Jie).includes(e)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}s(jit,"assertLevelComparison");Zie.exports={initialLsCache:Pit,genLsCache:wit,levelMethods:Xie,getLevel:Nit,setLevel:Tit,isLevelEnabled:Ait,mappings:$it,assertNoLevelCollisions:Lit,assertDefaultLevelFound:Dit,genLevelComparison:Cit,assertLevelComparison:jit}});var z2=h((VUt,Qie)=>{"use strict";Qie.exports={version:"8.19.0"}});var lse=h((HUt,cse)=>{"use strict";var{EventEmitter:Mit}=require("events"),{lsCacheSym:Uit,levelValSym:xit,setLevelSym:K2,getLevelSym:ese,chindingsSym:W2,parsedChindingsSym:qit,mixinSym:Fit,asJsonSym:sse,writeSym:kit,mixinMergeStrategySym:Bit,timeSym:Git,timeSliceIndexSym:Vit,streamSym:ose,serializersSym:Dd,formattersSym:H2,errorKeySym:zit,messageKeySym:Hit,useOnlyCustomLevelsSym:Kit,needsMetadataGsym:Wit,redactFmtSym:Yit,stringifySym:Jit,formatOptsSym:Xit,stringifiersSym:Zit,msgPrefixSym:tse}=Mm(),{getLevel:Qit,setLevel:est,isLevelEnabled:tst,mappings:rst,initialLsCache:nst,genLsCache:ist,assertNoLevelCollisions:sst}=V2(),{asChindings:ase,asJson:ost,buildFormatters:rse,stringify:nse}=CT(),{version:ast}=z2(),ust=R2(),cst=class{static{s(this,"Pino")}},use={constructor:cst,child:lst,bindings:fst,setBindings:dst,flush:_st,isLevelEnabled:tst,version:ast,get level(){return this[ese]()},set level(e){this[K2](e)},get levelVal(){return this[xit]},set levelVal(e){throw Error("levelVal is read-only")},[Uit]:nst,[kit]:hst,[sse]:ost,[ese]:Qit,[K2]:est};Object.setPrototypeOf(use,Mit.prototype);cse.exports=function(){return Object.create(use)};var ise=s(e=>e,"resetChildingsFormatter");function lst(e,t){if(!e)throw Error("missing bindings for child Pino");t=t||{};let r=this[Dd],n=this[H2],i=Object.create(this);if(t.hasOwnProperty("serializers")===!0){i[Dd]=Object.create(null);for(let f in r)i[Dd][f]=r[f];let c=Object.getOwnPropertySymbols(r);for(var o=0;o<c.length;o++){let f=c[o];i[Dd][f]=r[f]}for(let f in t.serializers)i[Dd][f]=t.serializers[f];let l=Object.getOwnPropertySymbols(t.serializers);for(var a=0;a<l.length;a++){let f=l[a];i[Dd][f]=t.serializers[f]}}else i[Dd]=r;if(t.hasOwnProperty("formatters")){let{level:c,bindings:l,log:f}=t.formatters;i[H2]=rse(c||n.level,l||ise,f||n.log)}else i[H2]=rse(n.level,ise,n.log);if(t.hasOwnProperty("customLevels")===!0&&(sst(this.levels,t.customLevels),i.levels=rst(t.customLevels,i[Kit]),ist(i)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){i.redact=t.redact;let c=ust(i.redact,nse),l={stringify:c[Yit]};i[Jit]=nse,i[Zit]=c,i[Xit]=l}typeof t.msgPrefix=="string"&&(i[tse]=(this[tse]||"")+t.msgPrefix),i[W2]=ase(i,e);let u=t.level||this.level;return i[K2](u),this.onChild(i),i}s(lst,"child");function fst(){let t=`{${this[W2].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}s(fst,"bindings");function dst(e){let t=ase(this,e);this[W2]=t,delete this[qit]}s(dst,"setBindings");function pst(e,t){return Object.assign(t,e)}s(pst,"defaultMixinMergeStrategy");function hst(e,t,r){let n=this[Git](),i=this[Fit],o=this[zit],a=this[Hit],u=this[Bit]||pst,c;e==null?c={}:e instanceof Error?(c={[o]:e},t===void 0&&(t=e.message)):(c=e,t===void 0&&e[a]===void 0&&e[o]&&(t=e[o].message)),i&&(c=u(c,i(c,r,this)));let l=this[sse](c,t,r,n),f=this[ose];f[Wit]===!0&&(f.lastLevel=r,f.lastObj=c,f.lastMsg=t,f.lastTime=n.slice(this[Vit]),f.lastLogger=this),f.write(l)}s(hst,"write");function mst(){}s(mst,"noop");function _st(e){if(e!=null&&typeof e!="function")throw Error("callback must be a function");let t=this[ose];typeof t.flush=="function"?t.flush(e||mst):e&&e()}s(_st,"flush")});var mse=h((Z2,hse)=>{"use strict";var{hasOwnProperty:DT}=Object.prototype,jd=X2();jd.configure=X2;jd.stringify=jd;jd.default=jd;Z2.stringify=jd;Z2.configure=X2;hse.exports=jd;var gst=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function zc(e){return e.length<5e3&&!gst.test(e)?`"${e}"`:JSON.stringify(e)}s(zc,"strEscape");function Y2(e){if(e.length>200)return e.sort();for(let t=1;t<e.length;t++){let r=e[t],n=t;for(;n!==0&&e[n-1]>r;)e[n]=e[n-1],n--;e[n]=r}return e}s(Y2,"insertSort");var yst=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function J2(e){return yst.call(e)!==void 0&&e.length!==0}s(J2,"isTypedArrayWithEntries");function fse(e,t,r){e.length<r&&(r=e.length);let n=t===","?"":" ",i=`"0":${n}${e[0]}`;for(let o=1;o<r;o++)i+=`${t}"${o}":${n}${e[o]}`;return i}s(fse,"stringifyTypedArray");function Est(e){if(DT.call(e,"circularValue")){let t=e.circularValue;if(typeof t=="string")return`"${t}"`;if(t==null)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}s(Est,"getCircularValueOption");function dse(e,t){let r;if(DT.call(e,t)&&(r=e[t],typeof r!="boolean"))throw new TypeError(`The "${t}" argument must be of type boolean`);return r===void 0?!0:r}s(dse,"getBooleanOption");function pse(e,t){let r;if(DT.call(e,t)){if(r=e[t],typeof r!="number")throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${t}" argument must be an integer`);if(r<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return r===void 0?1/0:r}s(pse,"getPositiveIntegerOption");function Ld(e){return e===1?"1 item":`${e} items`}s(Ld,"getItemCount");function bst(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}s(bst,"getUniqueReplacerSet");function Sst(e){if(DT.call(e,"strict")){let t=e.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)return r=>{let n=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(n+=` (${r.toString()})`),new Error(n)}}}s(Sst,"getStrictOption");function X2(e){e={...e};let t=Sst(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=Est(e),n=dse(e,"bigint"),i=dse(e,"deterministic"),o=pse(e,"maximumDepth"),a=pse(e,"maximumBreadth");function u(_,m,g,y,b,E){let v=m[_];switch(typeof v=="object"&&v!==null&&typeof v.toJSON=="function"&&(v=v.toJSON(_)),v=y.call(m,_,v),typeof v){case"string":return zc(v);case"object":{if(v===null)return"null";if(g.indexOf(v)!==-1)return r;let O="",P=",",I=E;if(Array.isArray(v)){if(v.length===0)return"[]";if(o<g.length+1)return'"[Array]"';g.push(v),b!==""&&(E+=b,O+=`
273
273
  ${E}`,P=`,
274
- ${E}`);let de=Math.min(S.length,a),re=0;for(;re<de-1;re++){let $e=u(String(re),S,g,y,b,E);O+=$e!==void 0?$e:"null",O+=P}let he=u(String(re),S,g,y,b,E);if(O+=he!==void 0?he:"null",S.length-1>a){let $e=S.length-a-1;O+=`${P}"... ${Ld($e)} not stringified"`}return b!==""&&(O+=`
275
- ${I}`),g.pop(),`[${O}]`}let j=Object.keys(S),x=j.length;if(x===0)return"{}";if(o<g.length+1)return'"[Object]"';let H="",K="";b!==""&&(E+=b,P=`,
276
- ${E}`,H=" ");let Q=Math.min(x,a);i&&!J2(S)&&(j=Y2(j)),g.push(S);for(let de=0;de<Q;de++){let re=j[de],he=u(re,S,g,y,b,E);he!==void 0&&(O+=`${K}${zc(re)}:${H}${he}`,K=P)}if(x>a){let de=x-a;O+=`${K}"...":${H}"${Ld(de)} not stringified"`,K=P}return b!==""&&K.length>1&&(O=`
274
+ ${E}`);let de=Math.min(v.length,a),re=0;for(;re<de-1;re++){let $e=u(String(re),v,g,y,b,E);O+=$e!==void 0?$e:"null",O+=P}let he=u(String(re),v,g,y,b,E);if(O+=he!==void 0?he:"null",v.length-1>a){let $e=v.length-a-1;O+=`${P}"... ${Ld($e)} not stringified"`}return b!==""&&(O+=`
275
+ ${I}`),g.pop(),`[${O}]`}let j=Object.keys(v),x=j.length;if(x===0)return"{}";if(o<g.length+1)return'"[Object]"';let H="",K="";b!==""&&(E+=b,P=`,
276
+ ${E}`,H=" ");let Q=Math.min(x,a);i&&!J2(v)&&(j=Y2(j)),g.push(v);for(let de=0;de<Q;de++){let re=j[de],he=u(re,v,g,y,b,E);he!==void 0&&(O+=`${K}${zc(re)}:${H}${he}`,K=P)}if(x>a){let de=x-a;O+=`${K}"...":${H}"${Ld(de)} not stringified"`,K=P}return b!==""&&K.length>1&&(O=`
277
277
  ${E}${O}
278
- ${I}`),g.pop(),`{${O}}`}case"number":return isFinite(S)?String(S):t?t(S):"null";case"boolean":return S===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(S);default:return t?t(S):void 0}}s(u,"stringifyFnReplacer");function c(_,m,g,y,b,E){switch(typeof m=="object"&&m!==null&&typeof m.toJSON=="function"&&(m=m.toJSON(_)),typeof m){case"string":return zc(m);case"object":{if(m===null)return"null";if(g.indexOf(m)!==-1)return r;let S=E,O="",P=",";if(Array.isArray(m)){if(m.length===0)return"[]";if(o<g.length+1)return'"[Array]"';g.push(m),b!==""&&(E+=b,O+=`
278
+ ${I}`),g.pop(),`{${O}}`}case"number":return isFinite(v)?String(v):t?t(v):"null";case"boolean":return v===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(v);default:return t?t(v):void 0}}s(u,"stringifyFnReplacer");function c(_,m,g,y,b,E){switch(typeof m=="object"&&m!==null&&typeof m.toJSON=="function"&&(m=m.toJSON(_)),typeof m){case"string":return zc(m);case"object":{if(m===null)return"null";if(g.indexOf(m)!==-1)return r;let v=E,O="",P=",";if(Array.isArray(m)){if(m.length===0)return"[]";if(o<g.length+1)return'"[Array]"';g.push(m),b!==""&&(E+=b,O+=`
279
279
  ${E}`,P=`,
280
280
  ${E}`);let x=Math.min(m.length,a),H=0;for(;H<x-1;H++){let Q=c(String(H),m[H],g,y,b,E);O+=Q!==void 0?Q:"null",O+=P}let K=c(String(H),m[H],g,y,b,E);if(O+=K!==void 0?K:"null",m.length-1>a){let Q=m.length-a-1;O+=`${P}"... ${Ld(Q)} not stringified"`}return b!==""&&(O+=`
281
- ${S}`),g.pop(),`[${O}]`}g.push(m);let I="";b!==""&&(E+=b,P=`,
281
+ ${v}`),g.pop(),`[${O}]`}g.push(m);let I="";b!==""&&(E+=b,P=`,
282
282
  ${E}`,I=" ");let j="";for(let x of y){let H=c(x,m[x],g,y,b,E);H!==void 0&&(O+=`${j}${zc(x)}:${I}${H}`,j=P)}return b!==""&&j.length>1&&(O=`
283
283
  ${E}${O}
284
- ${S}`),g.pop(),`{${O}}`}case"number":return isFinite(m)?String(m):t?t(m):"null";case"boolean":return m===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(m);default:return t?t(m):void 0}}s(c,"stringifyArrayReplacer");function l(_,m,g,y,b){switch(typeof m){case"string":return zc(m);case"object":{if(m===null)return"null";if(typeof m.toJSON=="function"){if(m=m.toJSON(_),typeof m!="object")return l(_,m,g,y,b);if(m===null)return"null"}if(g.indexOf(m)!==-1)return r;let E=b;if(Array.isArray(m)){if(m.length===0)return"[]";if(o<g.length+1)return'"[Array]"';g.push(m),b+=y;let H=`
284
+ ${v}`),g.pop(),`{${O}}`}case"number":return isFinite(m)?String(m):t?t(m):"null";case"boolean":return m===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(m);default:return t?t(m):void 0}}s(c,"stringifyArrayReplacer");function l(_,m,g,y,b){switch(typeof m){case"string":return zc(m);case"object":{if(m===null)return"null";if(typeof m.toJSON=="function"){if(m=m.toJSON(_),typeof m!="object")return l(_,m,g,y,b);if(m===null)return"null"}if(g.indexOf(m)!==-1)return r;let E=b;if(Array.isArray(m)){if(m.length===0)return"[]";if(o<g.length+1)return'"[Array]"';g.push(m),b+=y;let H=`
285
285
  ${b}`,K=`,
286
286
  ${b}`,Q=Math.min(m.length,a),de=0;for(;de<Q-1;de++){let he=l(String(de),m[de],g,y,b);H+=he!==void 0?he:"null",H+=K}let re=l(String(de),m[de],g,y,b);if(H+=re!==void 0?re:"null",m.length-1>a){let he=m.length-a-1;H+=`${K}"... ${Ld(he)} not stringified"`}return H+=`
287
- ${E}`,g.pop(),`[${H}]`}let S=Object.keys(m),O=S.length;if(O===0)return"{}";if(o<g.length+1)return'"[Object]"';b+=y;let P=`,
288
- ${b}`,I="",j="",x=Math.min(O,a);J2(m)&&(I+=fse(m,P,a),S=S.slice(m.length),x-=m.length,j=P),i&&(S=Y2(S)),g.push(m);for(let H=0;H<x;H++){let K=S[H],Q=l(K,m[K],g,y,b);Q!==void 0&&(I+=`${j}${zc(K)}: ${Q}`,j=P)}if(O>a){let H=O-a;I+=`${j}"...": "${Ld(H)} not stringified"`,j=P}return j!==""&&(I=`
287
+ ${E}`,g.pop(),`[${H}]`}let v=Object.keys(m),O=v.length;if(O===0)return"{}";if(o<g.length+1)return'"[Object]"';b+=y;let P=`,
288
+ ${b}`,I="",j="",x=Math.min(O,a);J2(m)&&(I+=fse(m,P,a),v=v.slice(m.length),x-=m.length,j=P),i&&(v=Y2(v)),g.push(m);for(let H=0;H<x;H++){let K=v[H],Q=l(K,m[K],g,y,b);Q!==void 0&&(I+=`${j}${zc(K)}: ${Q}`,j=P)}if(O>a){let H=O-a;I+=`${j}"...": "${Ld(H)} not stringified"`,j=P}return j!==""&&(I=`
289
289
  ${b}${I}
290
- ${E}`),g.pop(),`{${I}}`}case"number":return isFinite(m)?String(m):t?t(m):"null";case"boolean":return m===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(m);default:return t?t(m):void 0}}s(l,"stringifyIndent");function f(_,m,g){switch(typeof m){case"string":return zc(m);case"object":{if(m===null)return"null";if(typeof m.toJSON=="function"){if(m=m.toJSON(_),typeof m!="object")return f(_,m,g);if(m===null)return"null"}if(g.indexOf(m)!==-1)return r;let y="";if(Array.isArray(m)){if(m.length===0)return"[]";if(o<g.length+1)return'"[Array]"';g.push(m);let P=Math.min(m.length,a),I=0;for(;I<P-1;I++){let x=f(String(I),m[I],g);y+=x!==void 0?x:"null",y+=","}let j=f(String(I),m[I],g);if(y+=j!==void 0?j:"null",m.length-1>a){let x=m.length-a-1;y+=`,"... ${Ld(x)} not stringified"`}return g.pop(),`[${y}]`}let b=Object.keys(m),E=b.length;if(E===0)return"{}";if(o<g.length+1)return'"[Object]"';let S="",O=Math.min(E,a);J2(m)&&(y+=fse(m,",",a),b=b.slice(m.length),O-=m.length,S=","),i&&(b=Y2(b)),g.push(m);for(let P=0;P<O;P++){let I=b[P],j=f(I,m[I],g);j!==void 0&&(y+=`${S}${zc(I)}:${j}`,S=",")}if(E>a){let P=E-a;y+=`${S}"...":"${Ld(P)} not stringified"`}return g.pop(),`{${y}}`}case"number":return isFinite(m)?String(m):t?t(m):"null";case"boolean":return m===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(m);default:return t?t(m):void 0}}s(f,"stringifySimple");function d(_,m,g){if(arguments.length>1){let y="";if(typeof g=="number"?y=" ".repeat(Math.min(g,10)):typeof g=="string"&&(y=g.slice(0,10)),m!=null){if(typeof m=="function")return u("",{"":_},[],m,y,"");if(Array.isArray(m))return c("",_,[],bst(m),y,"")}if(y.length!==0)return l("",_,[],y,"")}return f("",_,[])}return s(d,"stringify"),d}s(X2,"configure")});var yse=h((YUt,gse)=>{"use strict";var Q2=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:_se}=$T(),vst=_se.info;function Ost(e,t){let r=0;e=e||[],t=t||{dedupe:!1};let n=Object.create(_se);n.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(f=>{n[f]=t.levels[f]});let i={write:o,add:u,flushSync:a,end:c,minLevel:0,streams:[],clone:l,[Q2]:!0,streamLevels:n};return Array.isArray(e)?e.forEach(u,i):u.call(i,e),e=null,i;function o(f){let d,_=this.lastLevel,{streams:m}=this,g=0,y;for(let b=wst(m.length,t.dedupe);Tst(b,m.length,t.dedupe);b=Ist(b,t.dedupe))if(d=m[b],d.level<=_){if(g!==0&&g!==d.level)break;if(y=d.stream,y[Q2]){let{lastTime:E,lastMsg:S,lastObj:O,lastLogger:P}=this;y.lastLevel=_,y.lastTime=E,y.lastMsg=S,y.lastObj=O,y.lastLogger=P}y.write(f),t.dedupe&&(g=d.level)}else if(!t.dedupe)break}s(o,"write");function a(){for(let{stream:f}of this.streams)typeof f.flushSync=="function"&&f.flushSync()}s(a,"flushSync");function u(f){if(!f)return i;let d=typeof f.write=="function"||f.stream,_=f.write?f:f.stream;if(!d)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:m,streamLevels:g}=this,y;typeof f.levelVal=="number"?y=f.levelVal:typeof f.level=="string"?y=g[f.level]:typeof f.level=="number"?y=f.level:y=vst;let b={stream:_,level:y,levelVal:void 0,id:r++};return m.unshift(b),m.sort(Pst),this.minLevel=m[0].level,i}s(u,"add");function c(){for(let{stream:f}of this.streams)typeof f.flushSync=="function"&&f.flushSync(),f.end()}s(c,"end");function l(f){let d=new Array(this.streams.length);for(let _=0;_<d.length;_++)d[_]={level:f,stream:this.streams[_].stream};return{write:o,add:u,minLevel:f,streams:d,clone:l,flushSync:a,[Q2]:!0}}s(l,"clone")}s(Ost,"multistream");function Pst(e,t){return e.level-t.level}s(Pst,"compareByLevel");function wst(e,t){return t?e-1:0}s(wst,"initLoopVar");function Ist(e,t){return t?e-1:e+1}s(Ist,"adjustLoopVar");function Tst(e,t,r){return r?e>=0:e<t}s(Tst,"checkLoopVar");gse.exports=Ost});var Cse=h((XUt,$s)=>{"use strict";var Nst=require("os"),Ise=O2(),Ast=P2(),Rst=R2(),Tse=Eie(),Cst=lse(),Nse=Mm(),{configure:$st}=mse(),{assertDefaultLevelFound:Dst,mappings:Ase,genLsCache:Lst,genLevelComparison:jst,assertLevelComparison:Mst}=V2(),{DEFAULT_LEVELS:Ust,SORTING_ORDER:xst}=$T(),{createArgsNormalizer:qst,asChindings:Fst,buildSafeSonicBoom:Ese,buildFormatters:kst,stringify:eF,normalizeDestFileDescriptor:bse,noop:Bst}=CT(),{version:Gst}=z2(),{chindingsSym:Sse,redactFmtSym:Vst,serializersSym:vse,timeSym:zst,timeSliceIndexSym:Hst,streamSym:Kst,stringifySym:Ose,stringifySafeSym:tF,stringifiersSym:Pse,setLevelSym:Wst,endSym:Yst,formatOptsSym:Jst,messageKeySym:Xst,errorKeySym:Zst,nestedKeySym:Qst,mixinSym:eot,levelCompSym:tot,useOnlyCustomLevelsSym:rot,formattersSym:wse,hooksSym:not,nestedKeyStrSym:iot,mixinMergeStrategySym:sot,msgPrefixSym:oot}=Nse,{epochTime:Rse,nullTime:aot}=Tse,{pid:uot}=process,cot=Nst.hostname(),lot=Ise.err,fot={level:"info",levelComparison:xst.ASC,levels:Ust,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:uot,hostname:cot},serializers:Object.assign(Object.create(null),{err:lot}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0},timestamp:Rse,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},dot=qst(fot),pot=Object.assign(Object.create(null),Ise);function rF(...e){let t={},{opts:r,stream:n}=dot(t,Ast(),...e),{redact:i,crlf:o,serializers:a,timestamp:u,messageKey:c,errorKey:l,nestedKey:f,base:d,name:_,level:m,customLevels:g,levelComparison:y,mixin:b,mixinMergeStrategy:E,useOnlyCustomLevels:S,formatters:O,hooks:P,depthLimit:I,edgeLimit:j,onChild:x,msgPrefix:H}=r,K=$st({maximumDepth:I,maximumBreadth:j}),Q=kst(O.level,O.bindings,O.log),de=eF.bind({[tF]:K}),re=i?Rst(i,de):{},he=i?{stringify:re[Vst]}:{stringify:de},$e="}"+(o?`\r
290
+ ${E}`),g.pop(),`{${I}}`}case"number":return isFinite(m)?String(m):t?t(m):"null";case"boolean":return m===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(m);default:return t?t(m):void 0}}s(l,"stringifyIndent");function f(_,m,g){switch(typeof m){case"string":return zc(m);case"object":{if(m===null)return"null";if(typeof m.toJSON=="function"){if(m=m.toJSON(_),typeof m!="object")return f(_,m,g);if(m===null)return"null"}if(g.indexOf(m)!==-1)return r;let y="";if(Array.isArray(m)){if(m.length===0)return"[]";if(o<g.length+1)return'"[Array]"';g.push(m);let P=Math.min(m.length,a),I=0;for(;I<P-1;I++){let x=f(String(I),m[I],g);y+=x!==void 0?x:"null",y+=","}let j=f(String(I),m[I],g);if(y+=j!==void 0?j:"null",m.length-1>a){let x=m.length-a-1;y+=`,"... ${Ld(x)} not stringified"`}return g.pop(),`[${y}]`}let b=Object.keys(m),E=b.length;if(E===0)return"{}";if(o<g.length+1)return'"[Object]"';let v="",O=Math.min(E,a);J2(m)&&(y+=fse(m,",",a),b=b.slice(m.length),O-=m.length,v=","),i&&(b=Y2(b)),g.push(m);for(let P=0;P<O;P++){let I=b[P],j=f(I,m[I],g);j!==void 0&&(y+=`${v}${zc(I)}:${j}`,v=",")}if(E>a){let P=E-a;y+=`${v}"...":"${Ld(P)} not stringified"`}return g.pop(),`{${y}}`}case"number":return isFinite(m)?String(m):t?t(m):"null";case"boolean":return m===!0?"true":"false";case"undefined":return;case"bigint":if(n)return String(m);default:return t?t(m):void 0}}s(f,"stringifySimple");function d(_,m,g){if(arguments.length>1){let y="";if(typeof g=="number"?y=" ".repeat(Math.min(g,10)):typeof g=="string"&&(y=g.slice(0,10)),m!=null){if(typeof m=="function")return u("",{"":_},[],m,y,"");if(Array.isArray(m))return c("",_,[],bst(m),y,"")}if(y.length!==0)return l("",_,[],y,"")}return f("",_,[])}return s(d,"stringify"),d}s(X2,"configure")});var yse=h((YUt,gse)=>{"use strict";var Q2=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:_se}=$T(),vst=_se.info;function Ost(e,t){let r=0;e=e||[],t=t||{dedupe:!1};let n=Object.create(_se);n.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(f=>{n[f]=t.levels[f]});let i={write:o,add:u,flushSync:a,end:c,minLevel:0,streams:[],clone:l,[Q2]:!0,streamLevels:n};return Array.isArray(e)?e.forEach(u,i):u.call(i,e),e=null,i;function o(f){let d,_=this.lastLevel,{streams:m}=this,g=0,y;for(let b=wst(m.length,t.dedupe);Tst(b,m.length,t.dedupe);b=Ist(b,t.dedupe))if(d=m[b],d.level<=_){if(g!==0&&g!==d.level)break;if(y=d.stream,y[Q2]){let{lastTime:E,lastMsg:v,lastObj:O,lastLogger:P}=this;y.lastLevel=_,y.lastTime=E,y.lastMsg=v,y.lastObj=O,y.lastLogger=P}y.write(f),t.dedupe&&(g=d.level)}else if(!t.dedupe)break}s(o,"write");function a(){for(let{stream:f}of this.streams)typeof f.flushSync=="function"&&f.flushSync()}s(a,"flushSync");function u(f){if(!f)return i;let d=typeof f.write=="function"||f.stream,_=f.write?f:f.stream;if(!d)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:m,streamLevels:g}=this,y;typeof f.levelVal=="number"?y=f.levelVal:typeof f.level=="string"?y=g[f.level]:typeof f.level=="number"?y=f.level:y=vst;let b={stream:_,level:y,levelVal:void 0,id:r++};return m.unshift(b),m.sort(Pst),this.minLevel=m[0].level,i}s(u,"add");function c(){for(let{stream:f}of this.streams)typeof f.flushSync=="function"&&f.flushSync(),f.end()}s(c,"end");function l(f){let d=new Array(this.streams.length);for(let _=0;_<d.length;_++)d[_]={level:f,stream:this.streams[_].stream};return{write:o,add:u,minLevel:f,streams:d,clone:l,flushSync:a,[Q2]:!0}}s(l,"clone")}s(Ost,"multistream");function Pst(e,t){return e.level-t.level}s(Pst,"compareByLevel");function wst(e,t){return t?e-1:0}s(wst,"initLoopVar");function Ist(e,t){return t?e-1:e+1}s(Ist,"adjustLoopVar");function Tst(e,t,r){return r?e>=0:e<t}s(Tst,"checkLoopVar");gse.exports=Ost});var Cse=h((XUt,$s)=>{"use strict";var Nst=require("os"),Ise=O2(),Ast=P2(),Rst=R2(),Tse=Eie(),Cst=lse(),Nse=Mm(),{configure:$st}=mse(),{assertDefaultLevelFound:Dst,mappings:Ase,genLsCache:Lst,genLevelComparison:jst,assertLevelComparison:Mst}=V2(),{DEFAULT_LEVELS:Ust,SORTING_ORDER:xst}=$T(),{createArgsNormalizer:qst,asChindings:Fst,buildSafeSonicBoom:Ese,buildFormatters:kst,stringify:eF,normalizeDestFileDescriptor:bse,noop:Bst}=CT(),{version:Gst}=z2(),{chindingsSym:Sse,redactFmtSym:Vst,serializersSym:vse,timeSym:zst,timeSliceIndexSym:Hst,streamSym:Kst,stringifySym:Ose,stringifySafeSym:tF,stringifiersSym:Pse,setLevelSym:Wst,endSym:Yst,formatOptsSym:Jst,messageKeySym:Xst,errorKeySym:Zst,nestedKeySym:Qst,mixinSym:eot,levelCompSym:tot,useOnlyCustomLevelsSym:rot,formattersSym:wse,hooksSym:not,nestedKeyStrSym:iot,mixinMergeStrategySym:sot,msgPrefixSym:oot}=Nse,{epochTime:Rse,nullTime:aot}=Tse,{pid:uot}=process,cot=Nst.hostname(),lot=Ise.err,fot={level:"info",levelComparison:xst.ASC,levels:Ust,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:uot,hostname:cot},serializers:Object.assign(Object.create(null),{err:lot}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0},timestamp:Rse,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},dot=qst(fot),pot=Object.assign(Object.create(null),Ise);function rF(...e){let t={},{opts:r,stream:n}=dot(t,Ast(),...e),{redact:i,crlf:o,serializers:a,timestamp:u,messageKey:c,errorKey:l,nestedKey:f,base:d,name:_,level:m,customLevels:g,levelComparison:y,mixin:b,mixinMergeStrategy:E,useOnlyCustomLevels:v,formatters:O,hooks:P,depthLimit:I,edgeLimit:j,onChild:x,msgPrefix:H}=r,K=$st({maximumDepth:I,maximumBreadth:j}),Q=kst(O.level,O.bindings,O.log),de=eF.bind({[tF]:K}),re=i?Rst(i,de):{},he=i?{stringify:re[Vst]}:{stringify:de},$e="}"+(o?`\r
291
291
  `:`
292
- `),bt=Fst.bind(null,{[Sse]:"",[vse]:a,[Pse]:re,[Ose]:eF,[tF]:K,[wse]:Q}),_t="";d!==null&&(_===void 0?_t=bt(d):_t=bt(Object.assign({},d,{name:_})));let zr=u instanceof Function?u:u?Rse:aot,Rn=zr().indexOf(":")+1;if(S&&!g)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(b&&typeof b!="function")throw Error(`Unknown mixin type "${typeof b}" - expected "function"`);if(H&&typeof H!="string")throw Error(`Unknown msgPrefix type "${typeof H}" - expected "string"`);Dst(m,g,S);let Qi=Ase(g,S);Mst(y);let ja=jst(y);return Object.assign(t,{levels:Qi,[tot]:ja,[rot]:S,[Kst]:n,[zst]:zr,[Hst]:Rn,[Ose]:eF,[tF]:K,[Pse]:re,[Yst]:$e,[Jst]:he,[Xst]:c,[Zst]:l,[Qst]:f,[iot]:f?`,${JSON.stringify(f)}:{`:"",[vse]:a,[eot]:b,[sot]:E,[Sse]:_t,[wse]:Q,[not]:P,silent:Bst,onChild:x,[oot]:H}),Object.setPrototypeOf(t,Cst()),Lst(t),t[Wst](m),t}s(rF,"pino");$s.exports=rF;$s.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=bse(e.dest||process.stdout.fd),Ese(e)):Ese({dest:bse(e),minLength:0});$s.exports.transport=x2();$s.exports.multistream=yse();$s.exports.levels=Ase();$s.exports.stdSerializers=pot;$s.exports.stdTimeFunctions=Object.assign({},Tse);$s.exports.symbols=Nse;$s.exports.version=Gst;$s.exports.default=rF;$s.exports.pino=rF});var $se=h(nF=>{"use strict";Object.defineProperty(nF,"__esModule",{value:!0});var vE="<unknown>";function hot(e){var t=e.split(`
292
+ `),bt=Fst.bind(null,{[Sse]:"",[vse]:a,[Pse]:re,[Ose]:eF,[tF]:K,[wse]:Q}),_t="";d!==null&&(_===void 0?_t=bt(d):_t=bt(Object.assign({},d,{name:_})));let zr=u instanceof Function?u:u?Rse:aot,Rn=zr().indexOf(":")+1;if(v&&!g)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(b&&typeof b!="function")throw Error(`Unknown mixin type "${typeof b}" - expected "function"`);if(H&&typeof H!="string")throw Error(`Unknown msgPrefix type "${typeof H}" - expected "string"`);Dst(m,g,v);let Qi=Ase(g,v);Mst(y);let ja=jst(y);return Object.assign(t,{levels:Qi,[tot]:ja,[rot]:v,[Kst]:n,[zst]:zr,[Hst]:Rn,[Ose]:eF,[tF]:K,[Pse]:re,[Yst]:$e,[Jst]:he,[Xst]:c,[Zst]:l,[Qst]:f,[iot]:f?`,${JSON.stringify(f)}:{`:"",[vse]:a,[eot]:b,[sot]:E,[Sse]:_t,[wse]:Q,[not]:P,silent:Bst,onChild:x,[oot]:H}),Object.setPrototypeOf(t,Cst()),Lst(t),t[Wst](m),t}s(rF,"pino");$s.exports=rF;$s.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=bse(e.dest||process.stdout.fd),Ese(e)):Ese({dest:bse(e),minLength:0});$s.exports.transport=x2();$s.exports.multistream=yse();$s.exports.levels=Ase();$s.exports.stdSerializers=pot;$s.exports.stdTimeFunctions=Object.assign({},Tse);$s.exports.symbols=Nse;$s.exports.version=Gst;$s.exports.default=rF;$s.exports.pino=rF});var $se=h(nF=>{"use strict";Object.defineProperty(nF,"__esModule",{value:!0});var vE="<unknown>";function hot(e){var t=e.split(`
293
293
  `);return t.reduce(function(r,n){var i=got(n)||Eot(n)||vot(n)||Iot(n)||Pot(n);return i&&r.push(i),r},[])}s(hot,"parse");var mot=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,_ot=/\((\S*)(?::(\d+))(?::(\d+))\)/;function got(e){var t=mot.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=_ot.exec(t[2]);return n&&i!=null&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{file:r?null:t[2],methodName:t[1]||vE,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}s(got,"parseChrome");var yot=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Eot(e){var t=yot.exec(e);return t?{file:t[2],methodName:t[1]||vE,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}s(Eot,"parseWinjs");var bot=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Sot=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function vot(e){var t=bot.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=Sot.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||vE,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}s(vot,"parseGecko");var Oot=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Pot(e){var t=Oot.exec(e);return t?{file:t[3],methodName:t[1]||vE,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}s(Pot,"parseJSC");var wot=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Iot(e){var t=wot.exec(e);return t?{file:t[2],methodName:t[1]||vE,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}s(Iot,"parseNode");nF.parse=hot});var iF=h(Sa=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});Sa.getLoggerContext=Sa.requestIdGenerator=Sa.REQUEST_ID_HEADER=Sa.LEGACY_REQUEST_ID_HEADER=void 0;var Tot=require("crypto");Sa.LEGACY_REQUEST_ID_HEADER="zuplo-request-id";Sa.REQUEST_ID_HEADER="zp-rid";var Not=s(e=>{let t=e.headers["zuplo-request-id"],r=e.headers["X-GitHub-Delivery"];return t?`${t}`:r?`${r}`:(0,Tot.randomUUID)()},"requestIdGenerator");Sa.requestIdGenerator=Not;function Aot(e){let t=e.raw.url??"",r={};try{let n=e.headers["zuplo-user"]??e.user?.sub;n&&(r.userSub=`${n}`);let i=t.match(/(deployments)\/([a-zA-Z-0-9]*)/);i&&i!==null&&i.length>=2&&(r.deployment=i[2]);let o=t.match(/(accounts)\/([a-zA-Z-0-9]*)/);o&&o!==null&&o.length>=2&&(r.account=o[2]);let a=t.match(/(projects)\/([a-zA-Z-0-9]*)/);a&&a!==null&&a.length>=2&&(r.project=a[2])}catch{}return r}s(Aot,"getLoggerContext");Sa.getLoggerContext=Aot});var jse=h(Tn=>{"use strict";var Rot=Tn&&Tn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tn,"__esModule",{value:!0});Tn.createNewLogger=Tn.logger=Tn.GOOGLE_LABELS_PROPERTY=Tn.GOOGLE_TRACE_PROPERTY=void 0;var LT=Rot(Cse()),Cot=$se(),$ot=iF();Tn.GOOGLE_TRACE_PROPERTY="logging.googleapis.com/trace";Tn.GOOGLE_LABELS_PROPERTY="logging.googleapis.com/labels";var Dse="zuplo-production";Tn.logger=Lse();function Dot(e){return JSON.stringify(e).replace(/^{/,"").replace(/}$/,"")}s(Dot,"flatJSONString");function Lot(e,t,r){if(e.length===2&&typeof e[1]=="object"&&e[1]!==null&&(e[0]=`${e[0]} ${JSON.stringify(e[1])}`),e.length>1&&typeof e[0]=="object"&&typeof e[1]=="string"){let i=e[0];i.err instanceof Error&&i.err.stack&&(e[1]=i.err.stack,delete i.err.stack)}let n;try{let i=`{${this?.[LT.default.symbols.chindingsSym]?.slice(1)||""}}`;if(n=JSON.parse(i),n){if(n.trace&&(n[Tn.GOOGLE_TRACE_PROPERTY]=`projects/${Dse}/traces/${n.trace}`),!n.trace&&n[Tn.GOOGLE_TRACE_PROPERTY]&&delete n[Tn.GOOGLE_TRACE_PROPERTY],r>=50){let u=Error().stack?.split(`
294
- `).slice(2).filter(c=>!c.includes("node_modules/pino")&&!c.includes("node_modules\\pino")&&!c.includes("node_modules/launchdarkly-node-server-sdk")&&!c.includes("node_modules\\launchdarkly-node-server-sdk"))[0].substr(7);n.caller=u}return n.caller&&r<50&&delete n.caller,this[LT.default.symbols.chindingsSym]=`,${Dot(n)}`,t.apply(this,e)}}catch{}return t.apply(this,e)}s(Lot,"logMethod");function Lse({defaultLabels:e={},logStream:t,loggerOptions:r}={}){let n={level:r?.level??process.env.LOG_LEVEL??"info",redact:['requestHeaders["authorization"]','requestHeaders["cookie"]','requestHeaders["cf-access-jwt-assertion"]','requestHeaders["cf-access-client-secret"]','requestHeaders["cf-access-client-id"]','responseHeaders["authorization"]','responseHeaders["cookie"]','responseHeaders["cf-access-jwt-assertion"]','responseHeaders["cf-access-client-secret"]','responseHeaders["cf-access-client-id"]',"cookie"]},i={project_id:Dse};return n.hooks=r?.hooks??{logMethod:Lot},n.formatters={bindings(o){return i.pid=o.pid,i.hostname=o.hostname,i}},process.env.LOG_FORMAT===void 0||process.env.LOG_FORMAT==="pretty"?n.transport={target:"@zuplo/pino-pretty-configurations"}:process.env.LOG_FORMAT==="gcp"&&(n.messageKey="message",n.formatters={level(o,a){return{severity:jot(a)}},log(o){let a=e;if(o.err&&o.err.stack)try{let u=(0,Cot.parse)(o.err.stack);u.length>0&&(o["logging.googleapis.com/sourceLocation"]={file:u[0].file,line:u[0].lineNumber,function:u[0].methodName})}catch{}if(o.req){let u=o.req;o.requestHeaders=u.raw.headers,o.httpRequest={...(o.httpRequest,{requestMethod:u.method,requestUrl:u.url,userAgent:u.headers["user-agent"],remoteIp:u.ip,protocol:u.protocol})};let c=u.headers["zp-rid"]??o.trace;a.requestId=c,u.headers["cf-ray"]&&(a.rayId=u.headers["cf-ray"]),u.headers["cf-worker"]&&(a.worker=u.headers["cf-worker"]);let l=(0,$ot.getLoggerContext)(u);l&&(o={...o,...l})}if(o.res){let u=o.res;o.responseHeaders=u.getHeaders(),o.httpRequest={...(o.httpRequest,{requestMethod:u.request?u.request.method:"",requestUrl:u.request?u.request.url:"",status:u.statusCode,userAgent:u.request?u.request.headers["user-agent"]:"",latency:`${Mot(u.getResponseTime()/1e3,9)}s`,remoteIp:u.request?u.request.ip:"",protocol:u.request?u.request.protocol:""})}}return o[Tn.GOOGLE_LABELS_PROPERTY]=a,o}},n.serializers={req(o){},res(o){},responseTime:function(o){}}),t?(0,LT.default)(n,t):(0,LT.default)(n)}s(Lse,"createNewLogger");Tn.createNewLogger=Lse;function jot(e){return e===10||e===20?"debug":e===30?"info":e===40?"warning":e===50?"error":e===5?"internal":e>=60?"critical":"default"}s(jot,"pinoLevelToStackDriverSeverity");function Mot(e,t){return Math.trunc(e*Math.pow(10,t))/Math.pow(10,t)}s(Mot,"truncateToDecimalPlace")});var xm=h(Hc=>{"use strict";var Uot=Hc&&Hc.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Mse=Hc&&Hc.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Uot(t,e,r)};Object.defineProperty(Hc,"__esModule",{value:!0});Mse(jse(),Hc);Mse(iF(),Hc)});var kse=h((oxt,Fse)=>{"use strict";Fse.exports=xse;function xse(e,t,r){e instanceof RegExp&&(e=Use(e,r)),t instanceof RegExp&&(t=Use(t,r));var n=qse(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}s(xse,"balanced");function Use(e,t){var r=t.match(e);return r?r[0]:null}s(Use,"maybeMatch");xse.range=qse;function qse(e,t,r){var n,i,o,a,u,c=r.indexOf(e),l=r.indexOf(t,c+1),f=c;if(c>=0&&l>0){if(e===t)return[c,l];for(n=[],o=r.length;f>=0&&!u;)f==c?(n.push(f),c=r.indexOf(e,f+1)):n.length==1?u=[n.pop(),l]:(i=n.pop(),i<o&&(o=i,a=l),l=r.indexOf(t,f+1)),f=c<l&&c>=0?c:l;n.length&&(u=[o,a])}return u}s(qse,"range")});var Yse=h((uxt,Wse)=>{var Bse=kse();Wse.exports=Fot;var Gse="\0SLASH"+Math.random()+"\0",Vse="\0OPEN"+Math.random()+"\0",oF="\0CLOSE"+Math.random()+"\0",zse="\0COMMA"+Math.random()+"\0",Hse="\0PERIOD"+Math.random()+"\0";function sF(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}s(sF,"numeric");function xot(e){return e.split("\\\\").join(Gse).split("\\{").join(Vse).split("\\}").join(oF).split("\\,").join(zse).split("\\.").join(Hse)}s(xot,"escapeBraces");function qot(e){return e.split(Gse).join("\\").split(Vse).join("{").split(oF).join("}").split(zse).join(",").split(Hse).join(".")}s(qot,"unescapeBraces");function Kse(e){if(!e)return[""];var t=[],r=Bse("{","}",e);if(!r)return e.split(",");var n=r.pre,i=r.body,o=r.post,a=n.split(",");a[a.length-1]+="{"+i+"}";var u=Kse(o);return o.length&&(a[a.length-1]+=u.shift(),a.push.apply(a,u)),t.push.apply(t,a),t}s(Kse,"parseCommaParts");function Fot(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),OE(xot(e),!0).map(qot)):[]}s(Fot,"expandTop");function kot(e){return"{"+e+"}"}s(kot,"embrace");function Bot(e){return/^-?0\d/.test(e)}s(Bot,"isPadded");function Got(e,t){return e<=t}s(Got,"lte");function Vot(e,t){return e>=t}s(Vot,"gte");function OE(e,t){var r=[],n=Bse("{","}",e);if(!n)return[e];var i=n.pre,o=n.post.length?OE(n.post,!1):[""];if(/\$$/.test(n.pre))for(var a=0;a<o.length;a++){var u=i+"{"+n.body+"}"+o[a];r.push(u)}else{var c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),f=c||l,d=n.body.indexOf(",")>=0;if(!f&&!d)return n.post.match(/,.*\}/)?(e=n.pre+"{"+n.body+oF+n.post,OE(e)):[e];var _;if(f)_=n.body.split(/\.\./);else if(_=Kse(n.body),_.length===1&&(_=OE(_[0],!1).map(kot),_.length===1))return o.map(function(Q){return n.pre+_[0]+Q});var m;if(f){var g=sF(_[0]),y=sF(_[1]),b=Math.max(_[0].length,_[1].length),E=_.length==3?Math.abs(sF(_[2])):1,S=Got,O=y<g;O&&(E*=-1,S=Vot);var P=_.some(Bot);m=[];for(var I=g;S(I,y);I+=E){var j;if(l)j=String.fromCharCode(I),j==="\\"&&(j="");else if(j=String(I),P){var x=b-j.length;if(x>0){var H=new Array(x+1).join("0");I<0?j="-"+H+j.slice(1):j=H+j}}m.push(j)}}else{m=[];for(var K=0;K<_.length;K++)m.push.apply(m,OE(_[K],!1))}for(var K=0;K<m.length;K++)for(var a=0;a<o.length;a++){var u=i+m[K]+o[a];(!t||f||u)&&r.push(u)}}return r}s(OE,"expand")});var Jse=h(jT=>{"use strict";Object.defineProperty(jT,"__esModule",{value:!0});jT.assertValidPattern=void 0;var zot=1024*64,Hot=s(e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>zot)throw new TypeError("pattern is too long")},"assertValidPattern");jT.assertValidPattern=Hot});var Zse=h(MT=>{"use strict";Object.defineProperty(MT,"__esModule",{value:!0});MT.parseClass=void 0;var Kot={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},PE=s(e=>e.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),Wot=s(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),Xse=s(e=>e.join(""),"rangesToString"),Yot=s((e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],i=[],o=r+1,a=!1,u=!1,c=!1,l=!1,f=r,d="";e:for(;o<e.length;){let y=e.charAt(o);if((y==="!"||y==="^")&&o===r+1){l=!0,o++;continue}if(y==="]"&&a&&!c){f=o+1;break}if(a=!0,y==="\\"&&!c){c=!0,o++;continue}if(y==="["&&!c){for(let[b,[E,S,O]]of Object.entries(Kot))if(e.startsWith(b,o)){if(d)return["$.",!1,e.length-r,!0];o+=b.length,O?i.push(E):n.push(E),u=u||S;continue e}}if(c=!1,d){y>d?n.push(PE(d)+"-"+PE(y)):y===d&&n.push(PE(y)),d="",o++;continue}if(e.startsWith("-]",o+1)){n.push(PE(y+"-")),o+=2;continue}if(e.startsWith("-",o+1)){d=y,o+=2;continue}n.push(PE(y)),o++}if(f<o)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,e.length-r,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!l){let y=n[0].length===2?n[0].slice(-1):n[0];return[Wot(y),!1,f-r,!1]}let _="["+(l?"^":"")+Xse(n)+"]",m="["+(l?"":"^")+Xse(i)+"]";return[n.length&&i.length?"("+_+"|"+m+")":n.length?_:m,u,f-r,!0]},"parseClass");MT.parseClass=Yot});var xT=h(UT=>{"use strict";Object.defineProperty(UT,"__esModule",{value:!0});UT.unescape=void 0;var Jot=s((e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");UT.unescape=Jot});var cF=h(kT=>{"use strict";Object.defineProperty(kT,"__esModule",{value:!0});kT.AST=void 0;var Xot=Zse(),qT=xT(),Zot=new Set(["!","?","+","*","@"]),Qse=s(e=>Zot.has(e),"isExtglobType"),Qot="(?!(?:^|/)\\.\\.?(?:$|/))",FT="(?!\\.)",eat=new Set(["[","."]),tat=new Set(["..","."]),rat=new Set("().*{}+?[]^$\\!"),nat=s(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),uF="[^/]",eoe=uF+"*?",toe=uF+"+?",aF=class e{static{s(this,"AST")}type;#t;#r;#n=!1;#e=[];#s;#c;#f;#l=!1;#a;#i;#u=!1;constructor(t,r,n={}){this.type=t,t&&(this.#r=!0),this.#s=r,this.#t=this.#s?this.#s.#t:this,this.#a=this.#t===this?n:this.#t.#a,this.#f=this.#t===this?[]:this.#t.#f,t==="!"&&!this.#t.#l&&this.#f.push(this),this.#c=this.#s?this.#s.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#i!==void 0?this.#i:this.type?this.#i=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#i=this.#e.map(t=>String(t)).join("")}#E(){if(this!==this.#t)throw new Error("should only call on root");if(this.#l)return this;this.toString(),this.#l=!0;let t;for(;t=this.#f.pop();){if(t.type!=="!")continue;let r=t,n=r.#s;for(;n;){for(let i=r.#c+1;!n.type&&i<n.#e.length;i++)for(let o of t.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(n.#e[i])}r=n,n=r.#s}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof e&&r.#s===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let t=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#l&&this.#s?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#s?.isStart())return!1;if(this.#c===0)return!0;let t=this.#s;for(let r=0;r<this.#c;r++){let n=t.#e[r];if(!(n instanceof e&&n.type==="!"))return!1}return!0}isEnd(){if(this.#t===this||this.#s?.type==="!")return!0;if(!this.#s?.isEnd())return!1;if(!this.type)return this.#s?.isEnd();let t=this.#s?this.#s.#e.length:0;return this.#c===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new e(this.type,t);for(let n of this.#e)r.copyIn(n);return r}static#_(t,r,n,i){let o=!1,a=!1,u=-1,c=!1;if(r.type===null){let m=n,g="";for(;m<t.length;){let y=t.charAt(m++);if(o||y==="\\"){o=!o,g+=y;continue}if(a){m===u+1?(y==="^"||y==="!")&&(c=!0):y==="]"&&!(m===u+2&&c)&&(a=!1),g+=y;continue}else if(y==="["){a=!0,u=m,c=!1,g+=y;continue}if(!i.noext&&Qse(y)&&t.charAt(m)==="("){r.push(g),g="";let b=new e(y,r);m=e.#_(t,b,m,i),r.push(b);continue}g+=y}return r.push(g),m}let l=n+1,f=new e(null,r),d=[],_="";for(;l<t.length;){let m=t.charAt(l++);if(o||m==="\\"){o=!o,_+=m;continue}if(a){l===u+1?(m==="^"||m==="!")&&(c=!0):m==="]"&&!(l===u+2&&c)&&(a=!1),_+=m;continue}else if(m==="["){a=!0,u=l,c=!1,_+=m;continue}if(Qse(m)&&t.charAt(l)==="("){f.push(_),_="";let g=new e(m,f);f.push(g),l=e.#_(t,g,l,i);continue}if(m==="|"){f.push(_),_="",d.push(f),f=new e(null,r);continue}if(m===")")return _===""&&r.#e.length===0&&(r.#u=!0),f.push(_),_="",r.push(...d,f),l;_+=m}return r.type=null,r.#r=void 0,r.#e=[t.substring(n-1)],l}static fromGlob(t,r={}){let n=new e(null,void 0,r);return e.#_(t,n,0,r),n}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let t=this.toString(),[r,n,i,o]=this.toRegExpSource();if(!(i||this.#r||this.#a.nocase&&!this.#a.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;let u=(this.#a.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,u),{_src:r,_glob:t})}toRegExpSource(t){let r=t??!!this.#a.dot;if(this.#t===this&&this.#E(),!this.type){let c=this.isStart()&&this.isEnd(),l=this.#e.map(m=>{let[g,y,b,E]=typeof m=="string"?e.#b(m,this.#r,c):m.toRegExpSource(t);return this.#r=this.#r||b,this.#n=this.#n||E,g}).join(""),f="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&tat.has(this.#e[0]))){let g=eat,y=r&&g.has(l.charAt(0))||l.startsWith("\\.")&&g.has(l.charAt(2))||l.startsWith("\\.\\.")&&g.has(l.charAt(4)),b=!r&&!t&&g.has(l.charAt(0));f=y?Qot:b?FT:""}let d="";return this.isEnd()&&this.#t.#l&&this.#s?.type==="!"&&(d="(?:$|\\/)"),[f+l+d,(0,qT.unescape)(l),this.#r=!!this.#r,this.#n]}let n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#p(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let c=this.toString();return this.#e=[c],this.type=null,this.#r=void 0,[c,(0,qT.unescape)(this.toString()),!1,!1]}let a=!n||t||r||!FT?"":this.#p(!0);a===o&&(a=""),a&&(o=`(?:${o})(?:${a})*?`);let u="";if(this.type==="!"&&this.#u)u=(this.isStart()&&!r?FT:"")+toe;else{let c=this.type==="!"?"))"+(this.isStart()&&!r&&!t?FT:"")+eoe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;u=i+o+c}return[u,(0,qT.unescape)(o),this.#r=!!this.#r,this.#n]}#p(t){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,i,o,a]=r.toRegExpSource(t);return this.#n=this.#n||a,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#b(t,r,n=!1){let i=!1,o="",a=!1;for(let u=0;u<t.length;u++){let c=t.charAt(u);if(i){i=!1,o+=(rat.has(c)?"\\":"")+c;continue}if(c==="\\"){u===t.length-1?o+="\\\\":i=!0;continue}if(c==="["){let[l,f,d,_]=(0,Xot.parseClass)(t,u);if(d){o+=l,a=a||f,u+=d-1,r=r||_;continue}}if(c==="*"){n&&t==="*"?o+=toe:o+=eoe,r=!0;continue}if(c==="?"){o+=uF,r=!0;continue}o+=nat(c)}return[o,(0,qT.unescape)(t),!!r,a]}};kT.AST=aF});var lF=h(BT=>{"use strict";Object.defineProperty(BT,"__esModule",{value:!0});BT.escape=void 0;var iat=s((e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),"escape");BT.escape=iat});var Kc=h(oe=>{"use strict";var sat=oe&&oe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oe,"__esModule",{value:!0});oe.unescape=oe.escape=oe.AST=oe.Minimatch=oe.match=oe.makeRe=oe.braceExpand=oe.defaults=oe.filter=oe.GLOBSTAR=oe.sep=oe.minimatch=void 0;var oat=sat(Yse()),GT=Jse(),ioe=cF(),aat=lF(),uat=xT(),cat=s((e,t,r={})=>((0,GT.assertValidPattern)(t),!r.nocomment&&t.charAt(0)==="#"?!1:new Md(t,r).match(e)),"minimatch");oe.minimatch=cat;var lat=/^\*+([^+@!?\*\[\(]*)$/,fat=s(e=>t=>!t.startsWith(".")&&t.endsWith(e),"starDotExtTest"),dat=s(e=>t=>t.endsWith(e),"starDotExtTestDot"),pat=s(e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),"starDotExtTestNocase"),hat=s(e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),"starDotExtTestNocaseDot"),mat=/^\*+\.\*+$/,_at=s(e=>!e.startsWith(".")&&e.includes("."),"starDotStarTest"),gat=s(e=>e!=="."&&e!==".."&&e.includes("."),"starDotStarTestDot"),yat=/^\.\*+$/,Eat=s(e=>e!=="."&&e!==".."&&e.startsWith("."),"dotStarTest"),bat=/^\*+$/,Sat=s(e=>e.length!==0&&!e.startsWith("."),"starTest"),vat=s(e=>e.length!==0&&e!=="."&&e!=="..","starTestDot"),Oat=/^\?+([^+@!?\*\[\(]*)?$/,Pat=s(([e,t=""])=>{let r=soe([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},"qmarksTestNocase"),wat=s(([e,t=""])=>{let r=ooe([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},"qmarksTestNocaseDot"),Iat=s(([e,t=""])=>{let r=ooe([e]);return t?n=>r(n)&&n.endsWith(t):r},"qmarksTestDot"),Tat=s(([e,t=""])=>{let r=soe([e]);return t?n=>r(n)&&n.endsWith(t):r},"qmarksTest"),soe=s(([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},"qmarksTestNoExt"),ooe=s(([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},"qmarksTestNoExtDot"),aoe=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",roe={win32:{sep:"\\"},posix:{sep:"/"}};oe.sep=aoe==="win32"?roe.win32.sep:roe.posix.sep;oe.minimatch.sep=oe.sep;oe.GLOBSTAR=Symbol("globstar **");oe.minimatch.GLOBSTAR=oe.GLOBSTAR;var Nat="[^/]",Aat=Nat+"*?",Rat="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Cat="(?:(?!(?:\\/|^)\\.).)*?",$at=s((e,t={})=>r=>(0,oe.minimatch)(r,e,t),"filter");oe.filter=$at;oe.minimatch.filter=oe.filter;var Ds=s((e,t={})=>Object.assign({},e,t),"ext"),Dat=s(e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return oe.minimatch;let t=oe.minimatch;return Object.assign(s((n,i,o={})=>t(n,i,Ds(e,o)),"m"),{Minimatch:class extends t.Minimatch{static{s(this,"Minimatch")}constructor(i,o={}){super(i,Ds(e,o))}static defaults(i){return t.defaults(Ds(e,i)).Minimatch}},AST:class extends t.AST{static{s(this,"AST")}constructor(i,o,a={}){super(i,o,Ds(e,a))}static fromGlob(i,o={}){return t.AST.fromGlob(i,Ds(e,o))}},unescape:(n,i={})=>t.unescape(n,Ds(e,i)),escape:(n,i={})=>t.escape(n,Ds(e,i)),filter:(n,i={})=>t.filter(n,Ds(e,i)),defaults:n=>t.defaults(Ds(e,n)),makeRe:(n,i={})=>t.makeRe(n,Ds(e,i)),braceExpand:(n,i={})=>t.braceExpand(n,Ds(e,i)),match:(n,i,o={})=>t.match(n,i,Ds(e,o)),sep:t.sep,GLOBSTAR:oe.GLOBSTAR})},"defaults");oe.defaults=Dat;oe.minimatch.defaults=oe.defaults;var Lat=s((e,t={})=>((0,GT.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,oat.default)(e)),"braceExpand");oe.braceExpand=Lat;oe.minimatch.braceExpand=oe.braceExpand;var jat=s((e,t={})=>new Md(e,t).makeRe(),"makeRe");oe.makeRe=jat;oe.minimatch.makeRe=oe.makeRe;var Mat=s((e,t,r={})=>{let n=new Md(t,r);return e=e.filter(i=>n.match(i)),n.options.nonull&&!e.length&&e.push(t),e},"match");oe.match=Mat;oe.minimatch.match=oe.match;var noe=/[?*]|[+@!]\(.*?\)|\[|\]/,Uat=s(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Md=class{static{s(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,r={}){(0,GT.assertValidPattern)(t),r=r||{},this.options=r,this.pattern=t,this.platform=r.platform||aoe,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((o,a,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=o[0]===""&&o[1]===""&&(o[2]==="?"||!noe.test(o[2]))&&!noe.test(o[3]),l=/^[a-z]:/i.test(o[0]);if(c)return[...o.slice(0,4),...o.slice(4).map(f=>this.parse(f))];if(l)return[o[0],...o.slice(1).map(f=>this.parse(f))]}return o.map(c=>this.parse(c))});if(this.debug(this.pattern,i),this.set=i.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let a=this.set[o];a[0]===""&&a[1]===""&&this.globParts[o][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n=0;n<t.length;n++)for(let i=0;i<t[n].length;i++)t[n][i]==="**"&&(t[n][i]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let i=n;for(;r[i+1]==="**";)i++;i!==n&&r.splice(n,i-n)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((n,i)=>{let o=n[n.length-1];return i==="**"&&o==="**"?n:i===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(n.pop(),n):(n.push(i),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let o=t[i];i===1&&o===""&&t[0]===""||(o==="."||o==="")&&(r=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){let i=t[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&(r=!0,t.splice(n-1,2),n-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let n of t){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let a=i;for(;n[a+1]==="**";)a++;a>i&&n.splice(i+1,a-i);let u=n[i+1],c=n[i+2],l=n[i+3];if(u!==".."||!c||c==="."||c===".."||!l||l==="."||l==="..")continue;r=!0,n.splice(i,1);let f=n.slice(0);f[i]="**",t.push(f),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<n.length-1;a++){let u=n[a];a===1&&u===""&&n[0]===""||(u==="."||u==="")&&(r=!0,n.splice(a,1),a--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let o=0;for(;(o=n.indexOf("..",o+1))!==-1;){let a=n[o-1];if(a&&a!=="."&&a!==".."&&a!=="**"){r=!0;let c=o===1&&n[o+1]==="**"?["."]:[];n.splice(o-1,2,...c),n.length===0&&n.push(""),o-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let n=r+1;n<t.length;n++){let i=this.partsMatch(t[r],t[n],!this.preserveMultipleSlashes);i&&(t[r]=i,t[n]=[])}return t.filter(r=>r.length)}partsMatch(t,r,n=!1){let i=0,o=0,a=[],u="";for(;i<t.length&&o<r.length;)if(t[i]===r[o])a.push(u==="b"?r[o]:t[i]),i++,o++;else if(n&&t[i]==="**"&&r[o]===t[i+1])a.push(t[i]),i++;else if(n&&r[o]==="**"&&t[i]===r[o+1])a.push(r[o]),o++;else if(t[i]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(u==="b")return!1;u="a",a.push(t[i]),i++,o++}else if(r[o]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(u==="a")return!1;u="b",a.push(r[o]),i++,o++}else return!1;return t.length===r.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,n=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=t.slice(n)),this.negate=r}matchOne(t,r,n=!1){let i=this.options;if(this.isWindows){let y=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),b=!y&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),E=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),S=!E&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),O=b?3:y?0:void 0,P=S?3:E?0:void 0;if(typeof O=="number"&&typeof P=="number"){let[I,j]=[t[O],r[P]];I.toLowerCase()===j.toLowerCase()&&(r[P]=I,P>O?r=r.slice(P):O>P&&(t=t.slice(O)))}}let{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:r}),this.debug("matchOne",t.length,r.length);for(var a=0,u=0,c=t.length,l=r.length;a<c&&u<l;a++,u++){this.debug("matchOne loop");var f=r[u],d=t[a];if(this.debug(r,f,d),f===!1)return!1;if(f===oe.GLOBSTAR){this.debug("GLOBSTAR",[r,f,d]);var _=a,m=u+1;if(m===l){for(this.debug("** at the end");a<c;a++)if(t[a]==="."||t[a]===".."||!i.dot&&t[a].charAt(0)===".")return!1;return!0}for(;_<c;){var g=t[_];if(this.debug(`
294
+ `).slice(2).filter(c=>!c.includes("node_modules/pino")&&!c.includes("node_modules\\pino")&&!c.includes("node_modules/launchdarkly-node-server-sdk")&&!c.includes("node_modules\\launchdarkly-node-server-sdk"))[0].substr(7);n.caller=u}return n.caller&&r<50&&delete n.caller,this[LT.default.symbols.chindingsSym]=`,${Dot(n)}`,t.apply(this,e)}}catch{}return t.apply(this,e)}s(Lot,"logMethod");function Lse({defaultLabels:e={},logStream:t,loggerOptions:r}={}){let n={level:r?.level??process.env.LOG_LEVEL??"info",redact:['requestHeaders["authorization"]','requestHeaders["cookie"]','requestHeaders["cf-access-jwt-assertion"]','requestHeaders["cf-access-client-secret"]','requestHeaders["cf-access-client-id"]','responseHeaders["authorization"]','responseHeaders["cookie"]','responseHeaders["cf-access-jwt-assertion"]','responseHeaders["cf-access-client-secret"]','responseHeaders["cf-access-client-id"]',"cookie"]},i={project_id:Dse};return n.hooks=r?.hooks??{logMethod:Lot},n.formatters={bindings(o){return i.pid=o.pid,i.hostname=o.hostname,i}},process.env.LOG_FORMAT===void 0||process.env.LOG_FORMAT==="pretty"?n.transport={target:"@zuplo/pino-pretty-configurations"}:process.env.LOG_FORMAT==="gcp"&&(n.messageKey="message",n.formatters={level(o,a){return{severity:jot(a)}},log(o){let a=e;if(o.err&&o.err.stack)try{let u=(0,Cot.parse)(o.err.stack);u.length>0&&(o["logging.googleapis.com/sourceLocation"]={file:u[0].file,line:u[0].lineNumber,function:u[0].methodName})}catch{}if(o.req){let u=o.req;o.requestHeaders=u.raw.headers,o.httpRequest={...(o.httpRequest,{requestMethod:u.method,requestUrl:u.url,userAgent:u.headers["user-agent"],remoteIp:u.ip,protocol:u.protocol})};let c=u.headers["zp-rid"]??o.trace;a.requestId=c,u.headers["cf-ray"]&&(a.rayId=u.headers["cf-ray"]),u.headers["cf-worker"]&&(a.worker=u.headers["cf-worker"]);let l=(0,$ot.getLoggerContext)(u);l&&(o={...o,...l})}if(o.res){let u=o.res;o.responseHeaders=u.getHeaders(),o.httpRequest={...(o.httpRequest,{requestMethod:u.request?u.request.method:"",requestUrl:u.request?u.request.url:"",status:u.statusCode,userAgent:u.request?u.request.headers["user-agent"]:"",latency:`${Mot(u.getResponseTime()/1e3,9)}s`,remoteIp:u.request?u.request.ip:"",protocol:u.request?u.request.protocol:""})}}return o[Tn.GOOGLE_LABELS_PROPERTY]=a,o}},n.serializers={req(o){},res(o){},responseTime:function(o){}}),t?(0,LT.default)(n,t):(0,LT.default)(n)}s(Lse,"createNewLogger");Tn.createNewLogger=Lse;function jot(e){return e===10||e===20?"debug":e===30?"info":e===40?"warning":e===50?"error":e===5?"internal":e>=60?"critical":"default"}s(jot,"pinoLevelToStackDriverSeverity");function Mot(e,t){return Math.trunc(e*Math.pow(10,t))/Math.pow(10,t)}s(Mot,"truncateToDecimalPlace")});var xm=h(Hc=>{"use strict";var Uot=Hc&&Hc.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Mse=Hc&&Hc.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Uot(t,e,r)};Object.defineProperty(Hc,"__esModule",{value:!0});Mse(jse(),Hc);Mse(iF(),Hc)});var kse=h((oxt,Fse)=>{"use strict";Fse.exports=xse;function xse(e,t,r){e instanceof RegExp&&(e=Use(e,r)),t instanceof RegExp&&(t=Use(t,r));var n=qse(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}s(xse,"balanced");function Use(e,t){var r=t.match(e);return r?r[0]:null}s(Use,"maybeMatch");xse.range=qse;function qse(e,t,r){var n,i,o,a,u,c=r.indexOf(e),l=r.indexOf(t,c+1),f=c;if(c>=0&&l>0){if(e===t)return[c,l];for(n=[],o=r.length;f>=0&&!u;)f==c?(n.push(f),c=r.indexOf(e,f+1)):n.length==1?u=[n.pop(),l]:(i=n.pop(),i<o&&(o=i,a=l),l=r.indexOf(t,f+1)),f=c<l&&c>=0?c:l;n.length&&(u=[o,a])}return u}s(qse,"range")});var Yse=h((uxt,Wse)=>{var Bse=kse();Wse.exports=Fot;var Gse="\0SLASH"+Math.random()+"\0",Vse="\0OPEN"+Math.random()+"\0",oF="\0CLOSE"+Math.random()+"\0",zse="\0COMMA"+Math.random()+"\0",Hse="\0PERIOD"+Math.random()+"\0";function sF(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}s(sF,"numeric");function xot(e){return e.split("\\\\").join(Gse).split("\\{").join(Vse).split("\\}").join(oF).split("\\,").join(zse).split("\\.").join(Hse)}s(xot,"escapeBraces");function qot(e){return e.split(Gse).join("\\").split(Vse).join("{").split(oF).join("}").split(zse).join(",").split(Hse).join(".")}s(qot,"unescapeBraces");function Kse(e){if(!e)return[""];var t=[],r=Bse("{","}",e);if(!r)return e.split(",");var n=r.pre,i=r.body,o=r.post,a=n.split(",");a[a.length-1]+="{"+i+"}";var u=Kse(o);return o.length&&(a[a.length-1]+=u.shift(),a.push.apply(a,u)),t.push.apply(t,a),t}s(Kse,"parseCommaParts");function Fot(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),OE(xot(e),!0).map(qot)):[]}s(Fot,"expandTop");function kot(e){return"{"+e+"}"}s(kot,"embrace");function Bot(e){return/^-?0\d/.test(e)}s(Bot,"isPadded");function Got(e,t){return e<=t}s(Got,"lte");function Vot(e,t){return e>=t}s(Vot,"gte");function OE(e,t){var r=[],n=Bse("{","}",e);if(!n)return[e];var i=n.pre,o=n.post.length?OE(n.post,!1):[""];if(/\$$/.test(n.pre))for(var a=0;a<o.length;a++){var u=i+"{"+n.body+"}"+o[a];r.push(u)}else{var c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),f=c||l,d=n.body.indexOf(",")>=0;if(!f&&!d)return n.post.match(/,.*\}/)?(e=n.pre+"{"+n.body+oF+n.post,OE(e)):[e];var _;if(f)_=n.body.split(/\.\./);else if(_=Kse(n.body),_.length===1&&(_=OE(_[0],!1).map(kot),_.length===1))return o.map(function(Q){return n.pre+_[0]+Q});var m;if(f){var g=sF(_[0]),y=sF(_[1]),b=Math.max(_[0].length,_[1].length),E=_.length==3?Math.abs(sF(_[2])):1,v=Got,O=y<g;O&&(E*=-1,v=Vot);var P=_.some(Bot);m=[];for(var I=g;v(I,y);I+=E){var j;if(l)j=String.fromCharCode(I),j==="\\"&&(j="");else if(j=String(I),P){var x=b-j.length;if(x>0){var H=new Array(x+1).join("0");I<0?j="-"+H+j.slice(1):j=H+j}}m.push(j)}}else{m=[];for(var K=0;K<_.length;K++)m.push.apply(m,OE(_[K],!1))}for(var K=0;K<m.length;K++)for(var a=0;a<o.length;a++){var u=i+m[K]+o[a];(!t||f||u)&&r.push(u)}}return r}s(OE,"expand")});var Jse=h(jT=>{"use strict";Object.defineProperty(jT,"__esModule",{value:!0});jT.assertValidPattern=void 0;var zot=1024*64,Hot=s(e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>zot)throw new TypeError("pattern is too long")},"assertValidPattern");jT.assertValidPattern=Hot});var Zse=h(MT=>{"use strict";Object.defineProperty(MT,"__esModule",{value:!0});MT.parseClass=void 0;var Kot={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},PE=s(e=>e.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),Wot=s(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),Xse=s(e=>e.join(""),"rangesToString"),Yot=s((e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],i=[],o=r+1,a=!1,u=!1,c=!1,l=!1,f=r,d="";e:for(;o<e.length;){let y=e.charAt(o);if((y==="!"||y==="^")&&o===r+1){l=!0,o++;continue}if(y==="]"&&a&&!c){f=o+1;break}if(a=!0,y==="\\"&&!c){c=!0,o++;continue}if(y==="["&&!c){for(let[b,[E,v,O]]of Object.entries(Kot))if(e.startsWith(b,o)){if(d)return["$.",!1,e.length-r,!0];o+=b.length,O?i.push(E):n.push(E),u=u||v;continue e}}if(c=!1,d){y>d?n.push(PE(d)+"-"+PE(y)):y===d&&n.push(PE(y)),d="",o++;continue}if(e.startsWith("-]",o+1)){n.push(PE(y+"-")),o+=2;continue}if(e.startsWith("-",o+1)){d=y,o+=2;continue}n.push(PE(y)),o++}if(f<o)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,e.length-r,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!l){let y=n[0].length===2?n[0].slice(-1):n[0];return[Wot(y),!1,f-r,!1]}let _="["+(l?"^":"")+Xse(n)+"]",m="["+(l?"":"^")+Xse(i)+"]";return[n.length&&i.length?"("+_+"|"+m+")":n.length?_:m,u,f-r,!0]},"parseClass");MT.parseClass=Yot});var xT=h(UT=>{"use strict";Object.defineProperty(UT,"__esModule",{value:!0});UT.unescape=void 0;var Jot=s((e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");UT.unescape=Jot});var cF=h(kT=>{"use strict";Object.defineProperty(kT,"__esModule",{value:!0});kT.AST=void 0;var Xot=Zse(),qT=xT(),Zot=new Set(["!","?","+","*","@"]),Qse=s(e=>Zot.has(e),"isExtglobType"),Qot="(?!(?:^|/)\\.\\.?(?:$|/))",FT="(?!\\.)",eat=new Set(["[","."]),tat=new Set(["..","."]),rat=new Set("().*{}+?[]^$\\!"),nat=s(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),uF="[^/]",eoe=uF+"*?",toe=uF+"+?",aF=class e{static{s(this,"AST")}type;#t;#r;#n=!1;#e=[];#s;#c;#f;#l=!1;#a;#i;#u=!1;constructor(t,r,n={}){this.type=t,t&&(this.#r=!0),this.#s=r,this.#t=this.#s?this.#s.#t:this,this.#a=this.#t===this?n:this.#t.#a,this.#f=this.#t===this?[]:this.#t.#f,t==="!"&&!this.#t.#l&&this.#f.push(this),this.#c=this.#s?this.#s.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#i!==void 0?this.#i:this.type?this.#i=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#i=this.#e.map(t=>String(t)).join("")}#E(){if(this!==this.#t)throw new Error("should only call on root");if(this.#l)return this;this.toString(),this.#l=!0;let t;for(;t=this.#f.pop();){if(t.type!=="!")continue;let r=t,n=r.#s;for(;n;){for(let i=r.#c+1;!n.type&&i<n.#e.length;i++)for(let o of t.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(n.#e[i])}r=n,n=r.#s}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof e&&r.#s===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let t=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#l&&this.#s?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#s?.isStart())return!1;if(this.#c===0)return!0;let t=this.#s;for(let r=0;r<this.#c;r++){let n=t.#e[r];if(!(n instanceof e&&n.type==="!"))return!1}return!0}isEnd(){if(this.#t===this||this.#s?.type==="!")return!0;if(!this.#s?.isEnd())return!1;if(!this.type)return this.#s?.isEnd();let t=this.#s?this.#s.#e.length:0;return this.#c===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new e(this.type,t);for(let n of this.#e)r.copyIn(n);return r}static#_(t,r,n,i){let o=!1,a=!1,u=-1,c=!1;if(r.type===null){let m=n,g="";for(;m<t.length;){let y=t.charAt(m++);if(o||y==="\\"){o=!o,g+=y;continue}if(a){m===u+1?(y==="^"||y==="!")&&(c=!0):y==="]"&&!(m===u+2&&c)&&(a=!1),g+=y;continue}else if(y==="["){a=!0,u=m,c=!1,g+=y;continue}if(!i.noext&&Qse(y)&&t.charAt(m)==="("){r.push(g),g="";let b=new e(y,r);m=e.#_(t,b,m,i),r.push(b);continue}g+=y}return r.push(g),m}let l=n+1,f=new e(null,r),d=[],_="";for(;l<t.length;){let m=t.charAt(l++);if(o||m==="\\"){o=!o,_+=m;continue}if(a){l===u+1?(m==="^"||m==="!")&&(c=!0):m==="]"&&!(l===u+2&&c)&&(a=!1),_+=m;continue}else if(m==="["){a=!0,u=l,c=!1,_+=m;continue}if(Qse(m)&&t.charAt(l)==="("){f.push(_),_="";let g=new e(m,f);f.push(g),l=e.#_(t,g,l,i);continue}if(m==="|"){f.push(_),_="",d.push(f),f=new e(null,r);continue}if(m===")")return _===""&&r.#e.length===0&&(r.#u=!0),f.push(_),_="",r.push(...d,f),l;_+=m}return r.type=null,r.#r=void 0,r.#e=[t.substring(n-1)],l}static fromGlob(t,r={}){let n=new e(null,void 0,r);return e.#_(t,n,0,r),n}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let t=this.toString(),[r,n,i,o]=this.toRegExpSource();if(!(i||this.#r||this.#a.nocase&&!this.#a.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;let u=(this.#a.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,u),{_src:r,_glob:t})}toRegExpSource(t){let r=t??!!this.#a.dot;if(this.#t===this&&this.#E(),!this.type){let c=this.isStart()&&this.isEnd(),l=this.#e.map(m=>{let[g,y,b,E]=typeof m=="string"?e.#b(m,this.#r,c):m.toRegExpSource(t);return this.#r=this.#r||b,this.#n=this.#n||E,g}).join(""),f="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&tat.has(this.#e[0]))){let g=eat,y=r&&g.has(l.charAt(0))||l.startsWith("\\.")&&g.has(l.charAt(2))||l.startsWith("\\.\\.")&&g.has(l.charAt(4)),b=!r&&!t&&g.has(l.charAt(0));f=y?Qot:b?FT:""}let d="";return this.isEnd()&&this.#t.#l&&this.#s?.type==="!"&&(d="(?:$|\\/)"),[f+l+d,(0,qT.unescape)(l),this.#r=!!this.#r,this.#n]}let n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#p(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let c=this.toString();return this.#e=[c],this.type=null,this.#r=void 0,[c,(0,qT.unescape)(this.toString()),!1,!1]}let a=!n||t||r||!FT?"":this.#p(!0);a===o&&(a=""),a&&(o=`(?:${o})(?:${a})*?`);let u="";if(this.type==="!"&&this.#u)u=(this.isStart()&&!r?FT:"")+toe;else{let c=this.type==="!"?"))"+(this.isStart()&&!r&&!t?FT:"")+eoe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;u=i+o+c}return[u,(0,qT.unescape)(o),this.#r=!!this.#r,this.#n]}#p(t){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,i,o,a]=r.toRegExpSource(t);return this.#n=this.#n||a,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#b(t,r,n=!1){let i=!1,o="",a=!1;for(let u=0;u<t.length;u++){let c=t.charAt(u);if(i){i=!1,o+=(rat.has(c)?"\\":"")+c;continue}if(c==="\\"){u===t.length-1?o+="\\\\":i=!0;continue}if(c==="["){let[l,f,d,_]=(0,Xot.parseClass)(t,u);if(d){o+=l,a=a||f,u+=d-1,r=r||_;continue}}if(c==="*"){n&&t==="*"?o+=toe:o+=eoe,r=!0;continue}if(c==="?"){o+=uF,r=!0;continue}o+=nat(c)}return[o,(0,qT.unescape)(t),!!r,a]}};kT.AST=aF});var lF=h(BT=>{"use strict";Object.defineProperty(BT,"__esModule",{value:!0});BT.escape=void 0;var iat=s((e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),"escape");BT.escape=iat});var Kc=h(oe=>{"use strict";var sat=oe&&oe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oe,"__esModule",{value:!0});oe.unescape=oe.escape=oe.AST=oe.Minimatch=oe.match=oe.makeRe=oe.braceExpand=oe.defaults=oe.filter=oe.GLOBSTAR=oe.sep=oe.minimatch=void 0;var oat=sat(Yse()),GT=Jse(),ioe=cF(),aat=lF(),uat=xT(),cat=s((e,t,r={})=>((0,GT.assertValidPattern)(t),!r.nocomment&&t.charAt(0)==="#"?!1:new Md(t,r).match(e)),"minimatch");oe.minimatch=cat;var lat=/^\*+([^+@!?\*\[\(]*)$/,fat=s(e=>t=>!t.startsWith(".")&&t.endsWith(e),"starDotExtTest"),dat=s(e=>t=>t.endsWith(e),"starDotExtTestDot"),pat=s(e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),"starDotExtTestNocase"),hat=s(e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),"starDotExtTestNocaseDot"),mat=/^\*+\.\*+$/,_at=s(e=>!e.startsWith(".")&&e.includes("."),"starDotStarTest"),gat=s(e=>e!=="."&&e!==".."&&e.includes("."),"starDotStarTestDot"),yat=/^\.\*+$/,Eat=s(e=>e!=="."&&e!==".."&&e.startsWith("."),"dotStarTest"),bat=/^\*+$/,Sat=s(e=>e.length!==0&&!e.startsWith("."),"starTest"),vat=s(e=>e.length!==0&&e!=="."&&e!=="..","starTestDot"),Oat=/^\?+([^+@!?\*\[\(]*)?$/,Pat=s(([e,t=""])=>{let r=soe([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},"qmarksTestNocase"),wat=s(([e,t=""])=>{let r=ooe([e]);return t?(t=t.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(t)):r},"qmarksTestNocaseDot"),Iat=s(([e,t=""])=>{let r=ooe([e]);return t?n=>r(n)&&n.endsWith(t):r},"qmarksTestDot"),Tat=s(([e,t=""])=>{let r=soe([e]);return t?n=>r(n)&&n.endsWith(t):r},"qmarksTest"),soe=s(([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},"qmarksTestNoExt"),ooe=s(([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},"qmarksTestNoExtDot"),aoe=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",roe={win32:{sep:"\\"},posix:{sep:"/"}};oe.sep=aoe==="win32"?roe.win32.sep:roe.posix.sep;oe.minimatch.sep=oe.sep;oe.GLOBSTAR=Symbol("globstar **");oe.minimatch.GLOBSTAR=oe.GLOBSTAR;var Nat="[^/]",Aat=Nat+"*?",Rat="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Cat="(?:(?!(?:\\/|^)\\.).)*?",$at=s((e,t={})=>r=>(0,oe.minimatch)(r,e,t),"filter");oe.filter=$at;oe.minimatch.filter=oe.filter;var Ds=s((e,t={})=>Object.assign({},e,t),"ext"),Dat=s(e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return oe.minimatch;let t=oe.minimatch;return Object.assign(s((n,i,o={})=>t(n,i,Ds(e,o)),"m"),{Minimatch:class extends t.Minimatch{static{s(this,"Minimatch")}constructor(i,o={}){super(i,Ds(e,o))}static defaults(i){return t.defaults(Ds(e,i)).Minimatch}},AST:class extends t.AST{static{s(this,"AST")}constructor(i,o,a={}){super(i,o,Ds(e,a))}static fromGlob(i,o={}){return t.AST.fromGlob(i,Ds(e,o))}},unescape:(n,i={})=>t.unescape(n,Ds(e,i)),escape:(n,i={})=>t.escape(n,Ds(e,i)),filter:(n,i={})=>t.filter(n,Ds(e,i)),defaults:n=>t.defaults(Ds(e,n)),makeRe:(n,i={})=>t.makeRe(n,Ds(e,i)),braceExpand:(n,i={})=>t.braceExpand(n,Ds(e,i)),match:(n,i,o={})=>t.match(n,i,Ds(e,o)),sep:t.sep,GLOBSTAR:oe.GLOBSTAR})},"defaults");oe.defaults=Dat;oe.minimatch.defaults=oe.defaults;var Lat=s((e,t={})=>((0,GT.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,oat.default)(e)),"braceExpand");oe.braceExpand=Lat;oe.minimatch.braceExpand=oe.braceExpand;var jat=s((e,t={})=>new Md(e,t).makeRe(),"makeRe");oe.makeRe=jat;oe.minimatch.makeRe=oe.makeRe;var Mat=s((e,t,r={})=>{let n=new Md(t,r);return e=e.filter(i=>n.match(i)),n.options.nonull&&!e.length&&e.push(t),e},"match");oe.match=Mat;oe.minimatch.match=oe.match;var noe=/[?*]|[+@!]\(.*?\)|\[|\]/,Uat=s(e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Md=class{static{s(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,r={}){(0,GT.assertValidPattern)(t),r=r||{},this.options=r,this.pattern=t,this.platform=r.platform||aoe,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((o,a,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=o[0]===""&&o[1]===""&&(o[2]==="?"||!noe.test(o[2]))&&!noe.test(o[3]),l=/^[a-z]:/i.test(o[0]);if(c)return[...o.slice(0,4),...o.slice(4).map(f=>this.parse(f))];if(l)return[o[0],...o.slice(1).map(f=>this.parse(f))]}return o.map(c=>this.parse(c))});if(this.debug(this.pattern,i),this.set=i.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let a=this.set[o];a[0]===""&&a[1]===""&&this.globParts[o][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n=0;n<t.length;n++)for(let i=0;i<t[n].length;i++)t[n][i]==="**"&&(t[n][i]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let i=n;for(;r[i+1]==="**";)i++;i!==n&&r.splice(n,i-n)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((n,i)=>{let o=n[n.length-1];return i==="**"&&o==="**"?n:i===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(n.pop(),n):(n.push(i),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let o=t[i];i===1&&o===""&&t[0]===""||(o==="."||o==="")&&(r=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){let i=t[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&(r=!0,t.splice(n-1,2),n-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let n of t){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let a=i;for(;n[a+1]==="**";)a++;a>i&&n.splice(i+1,a-i);let u=n[i+1],c=n[i+2],l=n[i+3];if(u!==".."||!c||c==="."||c===".."||!l||l==="."||l==="..")continue;r=!0,n.splice(i,1);let f=n.slice(0);f[i]="**",t.push(f),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<n.length-1;a++){let u=n[a];a===1&&u===""&&n[0]===""||(u==="."||u==="")&&(r=!0,n.splice(a,1),a--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let o=0;for(;(o=n.indexOf("..",o+1))!==-1;){let a=n[o-1];if(a&&a!=="."&&a!==".."&&a!=="**"){r=!0;let c=o===1&&n[o+1]==="**"?["."]:[];n.splice(o-1,2,...c),n.length===0&&n.push(""),o-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let n=r+1;n<t.length;n++){let i=this.partsMatch(t[r],t[n],!this.preserveMultipleSlashes);i&&(t[r]=i,t[n]=[])}return t.filter(r=>r.length)}partsMatch(t,r,n=!1){let i=0,o=0,a=[],u="";for(;i<t.length&&o<r.length;)if(t[i]===r[o])a.push(u==="b"?r[o]:t[i]),i++,o++;else if(n&&t[i]==="**"&&r[o]===t[i+1])a.push(t[i]),i++;else if(n&&r[o]==="**"&&t[i]===r[o+1])a.push(r[o]),o++;else if(t[i]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(u==="b")return!1;u="a",a.push(t[i]),i++,o++}else if(r[o]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(u==="a")return!1;u="b",a.push(r[o]),i++,o++}else return!1;return t.length===r.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,n=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=t.slice(n)),this.negate=r}matchOne(t,r,n=!1){let i=this.options;if(this.isWindows){let y=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),b=!y&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),E=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),v=!E&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),O=b?3:y?0:void 0,P=v?3:E?0:void 0;if(typeof O=="number"&&typeof P=="number"){let[I,j]=[t[O],r[P]];I.toLowerCase()===j.toLowerCase()&&(r[P]=I,P>O?r=r.slice(P):O>P&&(t=t.slice(O)))}}let{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:r}),this.debug("matchOne",t.length,r.length);for(var a=0,u=0,c=t.length,l=r.length;a<c&&u<l;a++,u++){this.debug("matchOne loop");var f=r[u],d=t[a];if(this.debug(r,f,d),f===!1)return!1;if(f===oe.GLOBSTAR){this.debug("GLOBSTAR",[r,f,d]);var _=a,m=u+1;if(m===l){for(this.debug("** at the end");a<c;a++)if(t[a]==="."||t[a]===".."||!i.dot&&t[a].charAt(0)===".")return!1;return!0}for(;_<c;){var g=t[_];if(this.debug(`
295
295
  globstar while`,t,_,r,m,g),this.matchOne(t.slice(_),r.slice(m),n))return this.debug("globstar found match!",_,c,g),!0;if(g==="."||g===".."||!i.dot&&g.charAt(0)==="."){this.debug("dot detected!",t,_,r,m);break}this.debug("globstar swallow a segment, and continue"),_++}return!!(n&&(this.debug(`
296
- >>> no match, partial?`,t,_,r,m),_===c))}let y;if(typeof f=="string"?(y=d===f,this.debug("string match",f,d,y)):(y=f.test(d),this.debug("pattern match",f,d,y)),!y)return!1}if(a===c&&u===l)return!0;if(a===c)return n;if(u===l)return a===c-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return(0,oe.braceExpand)(this.pattern,this.options)}parse(t){(0,GT.assertValidPattern)(t);let r=this.options;if(t==="**")return oe.GLOBSTAR;if(t==="")return"";let n,i=null;(n=t.match(bat))?i=r.dot?vat:Sat:(n=t.match(lat))?i=(r.nocase?r.dot?hat:pat:r.dot?dat:fat)(n[1]):(n=t.match(Oat))?i=(r.nocase?r.dot?wat:Pat:r.dot?Iat:Tat)(n):(n=t.match(mat))?i=r.dot?gat:_at:(n=t.match(yat))&&(i=Eat);let o=ioe.AST.fromGlob(t,this.options).toMMPattern();return i?Object.assign(o,{test:i}):o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?Aat:r.dot?Rat:Cat,i=new Set(r.nocase?["i"]:[]),o=t.map(c=>{let l=c.map(f=>{if(f instanceof RegExp)for(let d of f.flags.split(""))i.add(d);return typeof f=="string"?Uat(f):f===oe.GLOBSTAR?oe.GLOBSTAR:f._src});return l.forEach((f,d)=>{let _=l[d+1],m=l[d-1];f!==oe.GLOBSTAR||m===oe.GLOBSTAR||(m===void 0?_!==void 0&&_!==oe.GLOBSTAR?l[d+1]="(?:\\/|"+n+"\\/)?"+_:l[d]=n:_===void 0?l[d-1]=m+"(?:\\/|"+n+")?":_!==oe.GLOBSTAR&&(l[d-1]=m+"(?:\\/|\\/"+n+"\\/)"+_,l[d+1]=oe.GLOBSTAR))}),l.filter(f=>f!==oe.GLOBSTAR).join("/")}).join("|"),[a,u]=t.length>1?["(?:",")"]:["",""];o="^"+a+o+u+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let n=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let o=this.set;this.debug(this.pattern,"set",o);let a=i[i.length-1];if(!a)for(let u=i.length-2;!a&&u>=0;u--)a=i[u];for(let u=0;u<o.length;u++){let c=o[u],l=i;if(n.matchBase&&c.length===1&&(l=[a]),this.matchOne(l,c,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return oe.minimatch.defaults(t).Minimatch}};oe.Minimatch=Md;var xat=cF();Object.defineProperty(oe,"AST",{enumerable:!0,get:function(){return xat.AST}});var qat=lF();Object.defineProperty(oe,"escape",{enumerable:!0,get:function(){return qat.escape}});var Fat=xT();Object.defineProperty(oe,"unescape",{enumerable:!0,get:function(){return Fat.unescape}});oe.minimatch.AST=ioe.AST;oe.minimatch.Minimatch=Md;oe.minimatch.escape=aat.escape;oe.minimatch.unescape=uat.unescape});var doe=h(zT=>{"use strict";Object.defineProperty(zT,"__esModule",{value:!0});zT.LRUCache=void 0;var wE=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,coe=new Set,fF=typeof process=="object"&&process?process:{},loe=s((e,t,r,n)=>{typeof fF.emitWarning=="function"?fF.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)},"emitWarning"),VT=globalThis.AbortController,uoe=globalThis.AbortSignal;if(typeof VT>"u"){uoe=class{static{s(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(n,i){this._onabort.push(i)}},VT=class{static{s(this,"AbortController")}constructor(){t()}signal=new uoe;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let i of this.signal._onabort)i(n);this.signal.onabort?.(n)}}};let e=fF.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=s(()=>{e&&(e=!1,loe("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))},"warnACPolyfill")}var kat=s(e=>!coe.has(e),"shouldWarn"),Ixt=Symbol("type"),Wc=s(e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),"isPosInt"),foe=s(e=>Wc(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?qm:null:null,"getUintArray"),qm=class extends Array{static{s(this,"ZeroArray")}constructor(t){super(t),this.fill(0)}},dF=class e{static{s(this,"Stack")}heap;length;static#t=!1;static create(t){let r=foe(t);if(!r)return[];e.#t=!0;let n=new e(t,r);return e.#t=!1,n}constructor(t,r){if(!e.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},pF=class e{static{s(this,"LRUCache")}#t;#r;#n;#e;#s;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#f;#l;#a;#i;#u;#E;#_;#p;#b;#d;#I;#A;#O;#v;#T;#m;static unsafeExposeInternals(t){return{starts:t.#A,ttls:t.#O,sizes:t.#I,keyMap:t.#l,keyList:t.#a,valList:t.#i,next:t.#u,prev:t.#E,get head(){return t.#_},get tail(){return t.#p},free:t.#b,isBackgroundFetch:r=>t.#h(r),backgroundFetch:(r,n,i,o)=>t.#j(r,n,i,o),moveToTail:r=>t.#L(r),indexes:r=>t.#N(r),rindexes:r=>t.#C(r),isStale:r=>t.#S(r)}}get max(){return this.#t}get maxSize(){return this.#r}get calculatedSize(){return this.#f}get size(){return this.#c}get fetchMethod(){return this.#s}get dispose(){return this.#n}get disposeAfter(){return this.#e}constructor(t){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:a,updateAgeOnHas:u,allowStale:c,dispose:l,disposeAfter:f,noDisposeOnSet:d,noUpdateTTL:_,maxSize:m=0,maxEntrySize:g=0,sizeCalculation:y,fetchMethod:b,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:O,allowStaleOnFetchAbort:P,ignoreFetchAbort:I}=t;if(r!==0&&!Wc(r))throw new TypeError("max option must be a nonnegative integer");let j=r?foe(r):Array;if(!j)throw new Error("invalid max value: "+r);if(this.#t=r,this.#r=m,this.maxEntrySize=g||this.#r,this.sizeCalculation=y,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#s=b,this.#T=!!b,this.#l=new Map,this.#a=new Array(r).fill(void 0),this.#i=new Array(r).fill(void 0),this.#u=new j(r),this.#E=new j(r),this.#_=0,this.#p=0,this.#b=dF.create(r),this.#c=0,this.#f=0,typeof l=="function"&&(this.#n=l),typeof f=="function"?(this.#e=f,this.#d=[]):(this.#e=void 0,this.#d=void 0),this.#v=!!this.#n,this.#m=!!this.#e,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!_,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!O,this.allowStaleOnFetchAbort=!!P,this.ignoreFetchAbort=!!I,this.maxEntrySize!==0){if(this.#r!==0&&!Wc(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!Wc(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#R()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!u,this.ttlResolution=Wc(i)||i===0?i:1,this.ttlAutopurge=!!o,this.ttl=n||0,this.ttl){if(!Wc(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(this.#t===0&&this.ttl===0&&this.#r===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#r){let x="LRU_CACHE_UNBOUNDED";kat(x)&&(coe.add(x),loe("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",x,e))}}getRemainingTTL(t){return this.#l.has(t)?1/0:0}#P(){let t=new qm(this.#t),r=new qm(this.#t);this.#O=t,this.#A=r,this.#o=(o,a,u=wE.now())=>{if(r[o]=a!==0?u:0,t[o]=a,a!==0&&this.ttlAutopurge){let c=setTimeout(()=>{this.#S(o)&&this.delete(this.#a[o])},a+1);c.unref&&c.unref()}},this.#y=o=>{r[o]=t[o]!==0?wE.now():0},this.#w=(o,a)=>{if(t[a]){let u=t[a],c=r[a];o.ttl=u,o.start=c,o.now=n||i();let l=o.now-c;o.remainingTTL=u-l}};let n=0,i=s(()=>{let o=wE.now();if(this.ttlResolution>0){n=o;let a=setTimeout(()=>n=0,this.ttlResolution);a.unref&&a.unref()}return o},"getNow");this.getRemainingTTL=o=>{let a=this.#l.get(o);if(a===void 0)return 0;let u=t[a],c=r[a];if(u===0||c===0)return 1/0;let l=(n||i())-c;return u-l},this.#S=o=>t[o]!==0&&r[o]!==0&&(n||i())-r[o]>t[o]}#y=()=>{};#w=()=>{};#o=()=>{};#S=()=>!1;#R(){let t=new qm(this.#t);this.#f=0,this.#I=t,this.#g=r=>{this.#f-=t[r],t[r]=0},this.#M=(r,n,i,o)=>{if(this.#h(n))return 0;if(!Wc(i))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(i=o(n,r),!Wc(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#$=(r,n,i)=>{if(t[r]=n,this.#r){let o=this.#r-t[r];for(;this.#f>o;)this.#D(!0)}this.#f+=t[r],i&&(i.entrySize=n,i.totalCalculatedSize=this.#f)}}#g=t=>{};#$=(t,r,n)=>{};#M=(t,r,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#N({allowStale:t=this.allowStale}={}){if(this.#c)for(let r=this.#p;!(!this.#U(r)||((t||!this.#S(r))&&(yield r),r===this.#_));)r=this.#E[r]}*#C({allowStale:t=this.allowStale}={}){if(this.#c)for(let r=this.#_;!(!this.#U(r)||((t||!this.#S(r))&&(yield r),r===this.#p));)r=this.#u[r]}#U(t){return t!==void 0&&this.#l.get(this.#a[t])===t}*entries(){for(let t of this.#N())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#h(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*rentries(){for(let t of this.#C())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#h(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*keys(){for(let t of this.#N()){let r=this.#a[t];r!==void 0&&!this.#h(this.#i[t])&&(yield r)}}*rkeys(){for(let t of this.#C()){let r=this.#a[t];r!==void 0&&!this.#h(this.#i[t])&&(yield r)}}*values(){for(let t of this.#N())this.#i[t]!==void 0&&!this.#h(this.#i[t])&&(yield this.#i[t])}*rvalues(){for(let t of this.#C())this.#i[t]!==void 0&&!this.#h(this.#i[t])&&(yield this.#i[t])}[Symbol.iterator](){return this.entries()}find(t,r={}){for(let n of this.#N()){let i=this.#i[n],o=this.#h(i)?i.__staleWhileFetching:i;if(o!==void 0&&t(o,this.#a[n],this))return this.get(this.#a[n],r)}}forEach(t,r=this){for(let n of this.#N()){let i=this.#i[n],o=this.#h(i)?i.__staleWhileFetching:i;o!==void 0&&t.call(r,o,this.#a[n],this)}}rforEach(t,r=this){for(let n of this.#C()){let i=this.#i[n],o=this.#h(i)?i.__staleWhileFetching:i;o!==void 0&&t.call(r,o,this.#a[n],this)}}purgeStale(){let t=!1;for(let r of this.#C({allowStale:!0}))this.#S(r)&&(this.delete(this.#a[r]),t=!0);return t}dump(){let t=[];for(let r of this.#N({allowStale:!0})){let n=this.#a[r],i=this.#i[r],o=this.#h(i)?i.__staleWhileFetching:i;if(o===void 0||n===void 0)continue;let a={value:o};if(this.#O&&this.#A){a.ttl=this.#O[r];let u=wE.now()-this.#A[r];a.start=Math.floor(Date.now()-u)}this.#I&&(a.size=this.#I[r]),t.unshift([n,a])}return t}load(t){this.clear();for(let[r,n]of t){if(n.start){let i=Date.now()-n.start;n.start=wE.now()-i}this.set(r,n.value,n)}}set(t,r,n={}){if(r===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:c}=n,{noUpdateTTL:l=this.noUpdateTTL}=n,f=this.#M(t,r,n.size||0,u);if(this.maxEntrySize&&f>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this.delete(t),this;let d=this.#c===0?void 0:this.#l.get(t);if(d===void 0)d=this.#c===0?this.#p:this.#b.length!==0?this.#b.pop():this.#c===this.#t?this.#D(!1):this.#c,this.#a[d]=t,this.#i[d]=r,this.#l.set(t,d),this.#u[this.#p]=d,this.#E[d]=this.#p,this.#p=d,this.#c++,this.#$(d,f,c),c&&(c.set="add"),l=!1;else{this.#L(d);let _=this.#i[d];if(r!==_){if(this.#T&&this.#h(_)){_.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=_;m!==void 0&&!a&&(this.#v&&this.#n?.(m,t,"set"),this.#m&&this.#d?.push([m,t,"set"]))}else a||(this.#v&&this.#n?.(_,t,"set"),this.#m&&this.#d?.push([_,t,"set"]));if(this.#g(d),this.#$(d,f,c),this.#i[d]=r,c){c.set="replace";let m=_&&this.#h(_)?_.__staleWhileFetching:_;m!==void 0&&(c.oldValue=m)}}else c&&(c.set="update")}if(i!==0&&!this.#O&&this.#P(),this.#O&&(l||this.#o(d,i,o),c&&this.#w(c,d)),!a&&this.#m&&this.#d){let _=this.#d,m;for(;m=_?.shift();)this.#e?.(...m)}return this}pop(){try{for(;this.#c;){let t=this.#i[this.#_];if(this.#D(!0),this.#h(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#m&&this.#d){let t=this.#d,r;for(;r=t?.shift();)this.#e?.(...r)}}}#D(t){let r=this.#_,n=this.#a[r],i=this.#i[r];return this.#T&&this.#h(i)?i.__abortController.abort(new Error("evicted")):(this.#v||this.#m)&&(this.#v&&this.#n?.(i,n,"evict"),this.#m&&this.#d?.push([i,n,"evict"])),this.#g(r),t&&(this.#a[r]=void 0,this.#i[r]=void 0,this.#b.push(r)),this.#c===1?(this.#_=this.#p=0,this.#b.length=0):this.#_=this.#u[r],this.#l.delete(n),this.#c--,r}has(t,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,o=this.#l.get(t);if(o!==void 0){let a=this.#i[o];if(this.#h(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#S(o))i&&(i.has="stale",this.#w(i,o));else return n&&this.#y(o),i&&(i.has="hit",this.#w(i,o)),!0}else i&&(i.has="miss");return!1}peek(t,r={}){let{allowStale:n=this.allowStale}=r,i=this.#l.get(t);if(i!==void 0&&(n||!this.#S(i))){let o=this.#i[i];return this.#h(o)?o.__staleWhileFetching:o}}#j(t,r,n,i){let o=r===void 0?void 0:this.#i[r];if(this.#h(o))return o;let a=new VT,{signal:u}=n;u?.addEventListener("abort",()=>a.abort(u.reason),{signal:a.signal});let c={signal:a.signal,options:n,context:i},l=s((y,b=!1)=>{let{aborted:E}=a.signal,S=n.ignoreFetchAbort&&y!==void 0;if(n.status&&(E&&!b?(n.status.fetchAborted=!0,n.status.fetchError=a.signal.reason,S&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),E&&!S&&!b)return d(a.signal.reason);let O=m;return this.#i[r]===m&&(y===void 0?O.__staleWhileFetching?this.#i[r]=O.__staleWhileFetching:this.delete(t):(n.status&&(n.status.fetchUpdated=!0),this.set(t,y,c.options))),y},"cb"),f=s(y=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=y),d(y)),"eb"),d=s(y=>{let{aborted:b}=a.signal,E=b&&n.allowStaleOnFetchAbort,S=E||n.allowStaleOnFetchRejection,O=S||n.noDeleteOnFetchRejection,P=m;if(this.#i[r]===m&&(!O||P.__staleWhileFetching===void 0?this.delete(t):E||(this.#i[r]=P.__staleWhileFetching)),S)return n.status&&P.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),P.__staleWhileFetching;if(P.__returned===P)throw y},"fetchFail"),_=s((y,b)=>{let E=this.#s?.(t,o,c);E&&E instanceof Promise&&E.then(S=>y(S===void 0?void 0:S),b),a.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(y(void 0),n.allowStaleOnFetchAbort&&(y=s(S=>l(S,!0),"res")))})},"pcall");n.status&&(n.status.fetchDispatched=!0);let m=new Promise(_).then(l,f),g=Object.assign(m,{__abortController:a,__staleWhileFetching:o,__returned:void 0});return r===void 0?(this.set(t,g,{...c.options,status:void 0}),r=this.#l.get(t)):this.#i[r]=g,g}#h(t){if(!this.#T)return!1;let r=t;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof VT}async fetch(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:c=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:_=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:y,forceRefresh:b=!1,status:E,signal:S}=r;if(!this.#T)return E&&(E.fetch="get"),this.get(t,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,status:E});let O={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,ttl:a,noDisposeOnSet:u,size:c,sizeCalculation:l,noUpdateTTL:f,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:_,allowStaleOnFetchAbort:g,ignoreFetchAbort:m,status:E,signal:S},P=this.#l.get(t);if(P===void 0){E&&(E.fetch="miss");let I=this.#j(t,P,O,y);return I.__returned=I}else{let I=this.#i[P];if(this.#h(I)){let Q=n&&I.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",Q&&(E.returnedStale=!0)),Q?I.__staleWhileFetching:I.__returned=I}let j=this.#S(P);if(!b&&!j)return E&&(E.fetch="hit"),this.#L(P),i&&this.#y(P),E&&this.#w(E,P),I;let x=this.#j(t,P,O,y),K=x.__staleWhileFetching!==void 0&&n;return E&&(E.fetch=j?"stale":"refresh",K&&j&&(E.returnedStale=!0)),K?x.__staleWhileFetching:x.__returned=x}}get(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:a}=r,u=this.#l.get(t);if(u!==void 0){let c=this.#i[u],l=this.#h(c);return a&&this.#w(a,u),this.#S(u)?(a&&(a.get="stale"),l?(a&&n&&c.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?c.__staleWhileFetching:void 0):(o||this.delete(t),a&&n&&(a.returnedStale=!0),n?c:void 0)):(a&&(a.get="hit"),l?c.__staleWhileFetching:(this.#L(u),i&&this.#y(u),c))}else a&&(a.get="miss")}#x(t,r){this.#E[r]=t,this.#u[t]=r}#L(t){t!==this.#p&&(t===this.#_?this.#_=this.#u[t]:this.#x(this.#E[t],this.#u[t]),this.#x(this.#p,t),this.#p=t)}delete(t){let r=!1;if(this.#c!==0){let n=this.#l.get(t);if(n!==void 0)if(r=!0,this.#c===1)this.clear();else{this.#g(n);let i=this.#i[n];this.#h(i)?i.__abortController.abort(new Error("deleted")):(this.#v||this.#m)&&(this.#v&&this.#n?.(i,t,"delete"),this.#m&&this.#d?.push([i,t,"delete"])),this.#l.delete(t),this.#a[n]=void 0,this.#i[n]=void 0,n===this.#p?this.#p=this.#E[n]:n===this.#_?this.#_=this.#u[n]:(this.#u[this.#E[n]]=this.#u[n],this.#E[this.#u[n]]=this.#E[n]),this.#c--,this.#b.push(n)}}if(this.#m&&this.#d?.length){let n=this.#d,i;for(;i=n?.shift();)this.#e?.(...i)}return r}clear(){for(let t of this.#C({allowStale:!0})){let r=this.#i[t];if(this.#h(r))r.__abortController.abort(new Error("deleted"));else{let n=this.#a[t];this.#v&&this.#n?.(r,n,"delete"),this.#m&&this.#d?.push([r,n,"delete"])}}if(this.#l.clear(),this.#i.fill(void 0),this.#a.fill(void 0),this.#O&&this.#A&&(this.#O.fill(0),this.#A.fill(0)),this.#I&&this.#I.fill(0),this.#_=0,this.#p=0,this.#b.length=0,this.#f=0,this.#c=0,this.#m&&this.#d){let t=this.#d,r;for(;r=t?.shift();)this.#e?.(...r)}}};zT.LRUCache=pF});var SF=h(Jn=>{"use strict";var Bat=Jn&&Jn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jn,"__esModule",{value:!0});Jn.Minipass=Jn.isWritable=Jn.isReadable=Jn.isStream=void 0;var poe=typeof process=="object"&&process?process:{stdout:null,stderr:null},bF=require("events"),goe=Bat(require("stream")),Gat=require("string_decoder"),Vat=s(e=>!!e&&typeof e=="object"&&(e instanceof ZT||e instanceof goe.default||(0,Jn.isReadable)(e)||(0,Jn.isWritable)(e)),"isStream");Jn.isStream=Vat;var zat=s(e=>!!e&&typeof e=="object"&&e instanceof bF.EventEmitter&&typeof e.pipe=="function"&&e.pipe!==goe.default.Writable.prototype.pipe,"isReadable");Jn.isReadable=zat;var Hat=s(e=>!!e&&typeof e=="object"&&e instanceof bF.EventEmitter&&typeof e.write=="function"&&typeof e.end=="function","isWritable");Jn.isWritable=Hat;var Ou=Symbol("EOF"),Pu=Symbol("maybeEmitEnd"),Yc=Symbol("emittedEnd"),HT=Symbol("emittingEnd"),IE=Symbol("emittedError"),KT=Symbol("closed"),hoe=Symbol("read"),WT=Symbol("flush"),moe=Symbol("flushChunk"),Po=Symbol("encoding"),Fm=Symbol("decoder"),Fr=Symbol("flowing"),TE=Symbol("paused"),km=Symbol("resume"),kr=Symbol("buffer"),Yn=Symbol("pipes"),Br=Symbol("bufferLength"),hF=Symbol("bufferPush"),YT=Symbol("bufferShift"),Nn=Symbol("objectMode"),gr=Symbol("destroyed"),mF=Symbol("error"),_F=Symbol("emitData"),_oe=Symbol("emitEnd"),gF=Symbol("emitEnd2"),va=Symbol("async"),yF=Symbol("abort"),JT=Symbol("aborted"),NE=Symbol("signal"),Ud=Symbol("dataListeners"),Yi=Symbol("discarded"),AE=s(e=>Promise.resolve().then(e),"defer"),Kat=s(e=>e(),"nodefer"),Wat=s(e=>e==="end"||e==="finish"||e==="prefinish","isEndish"),Yat=s(e=>e instanceof ArrayBuffer||!!e&&typeof e=="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0,"isArrayBufferLike"),Jat=s(e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e),"isArrayBufferView"),XT=class{static{s(this,"Pipe")}src;dest;opts;ondrain;constructor(t,r,n){this.src=t,this.dest=r,this.opts=n,this.ondrain=()=>t[km](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},EF=class extends XT{static{s(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,r,n){super(t,r,n),this.proxyErrors=i=>r.emit("error",i),t.on("error",this.proxyErrors)}},Xat=s(e=>!!e.objectMode,"isObjectModeOptions"),Zat=s(e=>!e.objectMode&&!!e.encoding&&e.encoding!=="buffer","isEncodingOptions"),ZT=class extends bF.EventEmitter{static{s(this,"Minipass")}[Fr]=!1;[TE]=!1;[Yn]=[];[kr]=[];[Nn];[Po];[va];[Fm];[Ou]=!1;[Yc]=!1;[HT]=!1;[KT]=!1;[IE]=null;[Br]=0;[gr]=!1;[NE];[JT]=!1;[Ud]=0;[Yi]=!1;writable=!0;readable=!0;constructor(...t){let r=t[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Xat(r)?(this[Nn]=!0,this[Po]=null):Zat(r)?(this[Po]=r.encoding,this[Nn]=!1):(this[Nn]=!1,this[Po]=null),this[va]=!!r.async,this[Fm]=this[Po]?new Gat.StringDecoder(this[Po]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[kr]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Yn]});let{signal:n}=r;n&&(this[NE]=n,n.aborted?this[yF]():n.addEventListener("abort",()=>this[yF]()))}get bufferLength(){return this[Br]}get encoding(){return this[Po]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Nn]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[va]}set async(t){this[va]=this[va]||!!t}[yF](){this[JT]=!0,this.emit("abort",this[NE]?.reason),this.destroy(this[NE]?.reason)}get aborted(){return this[JT]}set aborted(t){}write(t,r,n){if(this[JT])return!1;if(this[Ou])throw new Error("write after end");if(this[gr])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(n=r,r="utf8"),r||(r="utf8");let i=this[va]?AE:Kat;if(!this[Nn]&&!Buffer.isBuffer(t)){if(Jat(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(Yat(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[Nn]?(this[Fr]&&this[Br]!==0&&this[WT](!0),this[Fr]?this.emit("data",t):this[hF](t),this[Br]!==0&&this.emit("readable"),n&&i(n),this[Fr]):t.length?(typeof t=="string"&&!(r===this[Po]&&!this[Fm]?.lastNeed)&&(t=Buffer.from(t,r)),Buffer.isBuffer(t)&&this[Po]&&(t=this[Fm].write(t)),this[Fr]&&this[Br]!==0&&this[WT](!0),this[Fr]?this.emit("data",t):this[hF](t),this[Br]!==0&&this.emit("readable"),n&&i(n),this[Fr]):(this[Br]!==0&&this.emit("readable"),n&&i(n),this[Fr])}read(t){if(this[gr])return null;if(this[Yi]=!1,this[Br]===0||t===0||t&&t>this[Br])return this[Pu](),null;this[Nn]&&(t=null),this[kr].length>1&&!this[Nn]&&(this[kr]=[this[Po]?this[kr].join(""):Buffer.concat(this[kr],this[Br])]);let r=this[hoe](t||null,this[kr][0]);return this[Pu](),r}[hoe](t,r){if(this[Nn])this[YT]();else{let n=r;t===n.length||t===null?this[YT]():typeof n=="string"?(this[kr][0]=n.slice(t),r=n.slice(0,t),this[Br]-=t):(this[kr][0]=n.subarray(t),r=n.subarray(0,t),this[Br]-=t)}return this.emit("data",r),!this[kr].length&&!this[Ou]&&this.emit("drain"),r}end(t,r,n){return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r="utf8"),t!==void 0&&this.write(t,r),n&&this.once("end",n),this[Ou]=!0,this.writable=!1,(this[Fr]||!this[TE])&&this[Pu](),this}[km](){this[gr]||(!this[Ud]&&!this[Yn].length&&(this[Yi]=!0),this[TE]=!1,this[Fr]=!0,this.emit("resume"),this[kr].length?this[WT]():this[Ou]?this[Pu]():this.emit("drain"))}resume(){return this[km]()}pause(){this[Fr]=!1,this[TE]=!0,this[Yi]=!1}get destroyed(){return this[gr]}get flowing(){return this[Fr]}get paused(){return this[TE]}[hF](t){this[Nn]?this[Br]+=1:this[Br]+=t.length,this[kr].push(t)}[YT](){return this[Nn]?this[Br]-=1:this[Br]-=this[kr][0].length,this[kr].shift()}[WT](t=!1){do;while(this[moe](this[YT]())&&this[kr].length);!t&&!this[kr].length&&!this[Ou]&&this.emit("drain")}[moe](t){return this.emit("data",t),this[Fr]}pipe(t,r){if(this[gr])return t;this[Yi]=!1;let n=this[Yc];return r=r||{},t===poe.stdout||t===poe.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,n?r.end&&t.end():(this[Yn].push(r.proxyErrors?new EF(this,t,r):new XT(this,t,r)),this[va]?AE(()=>this[km]()):this[km]()),t}unpipe(t){let r=this[Yn].find(n=>n.dest===t);r&&(this[Yn].length===1?(this[Fr]&&this[Ud]===0&&(this[Fr]=!1),this[Yn]=[]):this[Yn].splice(this[Yn].indexOf(r),1),r.unpipe())}addListener(t,r){return this.on(t,r)}on(t,r){let n=super.on(t,r);if(t==="data")this[Yi]=!1,this[Ud]++,!this[Yn].length&&!this[Fr]&&this[km]();else if(t==="readable"&&this[Br]!==0)super.emit("readable");else if(Wat(t)&&this[Yc])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[IE]){let i=r;this[va]?AE(()=>i.call(this,this[IE])):i.call(this,this[IE])}return n}removeListener(t,r){return this.off(t,r)}off(t,r){let n=super.off(t,r);return t==="data"&&(this[Ud]=this.listeners("data").length,this[Ud]===0&&!this[Yi]&&!this[Yn].length&&(this[Fr]=!1)),n}removeAllListeners(t){let r=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[Ud]=0,!this[Yi]&&!this[Yn].length&&(this[Fr]=!1)),r}get emittedEnd(){return this[Yc]}[Pu](){!this[HT]&&!this[Yc]&&!this[gr]&&this[kr].length===0&&this[Ou]&&(this[HT]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[KT]&&this.emit("close"),this[HT]=!1)}emit(t,...r){let n=r[0];if(t!=="error"&&t!=="close"&&t!==gr&&this[gr])return!1;if(t==="data")return!this[Nn]&&!n?!1:this[va]?(AE(()=>this[_F](n)),!0):this[_F](n);if(t==="end")return this[_oe]();if(t==="close"){if(this[KT]=!0,!this[Yc]&&!this[gr])return!1;let o=super.emit("close");return this.removeAllListeners("close"),o}else if(t==="error"){this[IE]=n,super.emit(mF,n);let o=!this[NE]||this.listeners("error").length?super.emit("error",n):!1;return this[Pu](),o}else if(t==="resume"){let o=super.emit("resume");return this[Pu](),o}else if(t==="finish"||t==="prefinish"){let o=super.emit(t);return this.removeAllListeners(t),o}let i=super.emit(t,...r);return this[Pu](),i}[_F](t){for(let n of this[Yn])n.dest.write(t)===!1&&this.pause();let r=this[Yi]?!1:super.emit("data",t);return this[Pu](),r}[_oe](){return this[Yc]?!1:(this[Yc]=!0,this.readable=!1,this[va]?(AE(()=>this[gF]()),!0):this[gF]())}[gF](){if(this[Fm]){let r=this[Fm].end();if(r){for(let n of this[Yn])n.dest.write(r);this[Yi]||super.emit("data",r)}}for(let r of this[Yn])r.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[Nn]||(t.dataLength=0);let r=this.promise();return this.on("data",n=>{t.push(n),this[Nn]||(t.dataLength+=n.length)}),await r,t}async concat(){if(this[Nn])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[Po]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,r)=>{this.on(gr,()=>r(new Error("stream destroyed"))),this.on("error",n=>r(n)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[Yi]=!1;let t=!1,r=s(async()=>(this.pause(),t=!0,{value:void 0,done:!0}),"stop");return{next:s(()=>{if(t)return r();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[Ou])return r();let o,a,u=s(d=>{this.off("data",c),this.off("end",l),this.off(gr,f),r(),a(d)},"onerr"),c=s(d=>{this.off("error",u),this.off("end",l),this.off(gr,f),this.pause(),o({value:d,done:!!this[Ou]})},"ondata"),l=s(()=>{this.off("error",u),this.off("data",c),this.off(gr,f),r(),o({done:!0,value:void 0})},"onend"),f=s(()=>u(new Error("stream destroyed")),"ondestroy");return new Promise((d,_)=>{a=_,o=d,this.once(gr,f),this.once("error",u),this.once("end",l),this.once("data",c)})},"next"),throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Yi]=!1;let t=!1,r=s(()=>(this.pause(),this.off(mF,r),this.off(gr,r),this.off("end",r),t=!0,{done:!0,value:void 0}),"stop"),n=s(()=>{if(t)return r();let i=this.read();return i===null?r():{done:!1,value:i}},"next");return this.once("end",r),this.once(mF,r),this.once(gr,r),{next:n,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(t){if(this[gr])return t?this.emit("error",t):this.emit(gr),this;this[gr]=!0,this[Yi]=!0,this[kr].length=0,this[Br]=0;let r=this;return typeof r.close=="function"&&!this[KT]&&r.close(),t?this.emit("error",t):this.emit(gr),this}static get isStream(){return Jn.isStream}};Jn.Minipass=ZT});var $oe=h(Ot=>{"use strict";var Qat=Ot&&Ot.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),eut=Ot&&Ot.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),tut=Ot&&Ot.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Qat(t,e,r);return eut(t,e),t};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.PathScurry=Ot.Path=Ot.PathScurryDarwin=Ot.PathScurryPosix=Ot.PathScurryWin32=Ot.PathScurryBase=Ot.PathPosix=Ot.PathWin32=Ot.PathBase=Ot.ChildrenCache=Ot.ResolveCache=void 0;var Ooe=doe(),n1=require("path"),rut=require("url"),nut=tut(require("fs")),CE=require("fs"),iut=CE.realpathSync.native,QT=require("fs/promises"),yoe=SF(),$E={lstatSync:CE.lstatSync,readdir:CE.readdir,readdirSync:CE.readdirSync,readlinkSync:CE.readlinkSync,realpathSync:iut,promises:{lstat:QT.lstat,readdir:QT.readdir,readlink:QT.readlink,realpath:QT.realpath}},Poe=s(e=>!e||e===$E||e===nut?$E:{...$E,...e,promises:{...$E.promises,...e.promises||{}}},"fsFromOption"),woe=/^\\\\\?\\([a-z]:)\\?$/i,sut=s(e=>e.replace(/\//g,"\\").replace(woe,"$1\\"),"uncToDrive"),out=/[\\\/]/,js=0,Ioe=1,Toe=2,Oa=4,Noe=6,Aoe=8,xd=10,Roe=12,Ls=15,RE=~Ls,vF=16,Eoe=32,DE=64,wo=128,e1=256,r1=512,boe=DE|wo|r1,aut=1023,OF=s(e=>e.isFile()?Aoe:e.isDirectory()?Oa:e.isSymbolicLink()?xd:e.isCharacterDevice()?Toe:e.isBlockDevice()?Noe:e.isSocket()?Roe:e.isFIFO()?Ioe:js,"entToType"),Soe=new Map,LE=s(e=>{let t=Soe.get(e);if(t)return t;let r=e.normalize("NFKD");return Soe.set(e,r),r},"normalize"),voe=new Map,t1=s(e=>{let t=voe.get(e);if(t)return t;let r=LE(e.toLowerCase());return voe.set(e,r),r},"normalizeNocase"),jE=class extends Ooe.LRUCache{static{s(this,"ResolveCache")}constructor(){super({max:256})}};Ot.ResolveCache=jE;var i1=class extends Ooe.LRUCache{static{s(this,"ChildrenCache")}constructor(t=16*1024){super({maxSize:t,sizeCalculation:r=>r.length+1})}};Ot.ChildrenCache=i1;var Coe=Symbol("PathScurry setAsCwd"),un=class{static{s(this,"PathBase")}name;root;roots;parent;nocase;#t;#r;get dev(){return this.#r}#n;get mode(){return this.#n}#e;get nlink(){return this.#e}#s;get uid(){return this.#s}#c;get gid(){return this.#c}#f;get rdev(){return this.#f}#l;get blksize(){return this.#l}#a;get ino(){return this.#a}#i;get size(){return this.#i}#u;get blocks(){return this.#u}#E;get atimeMs(){return this.#E}#_;get mtimeMs(){return this.#_}#p;get ctimeMs(){return this.#p}#b;get birthtimeMs(){return this.#b}#d;get atime(){return this.#d}#I;get mtime(){return this.#I}#A;get ctime(){return this.#A}#O;get birthtime(){return this.#O}#v;#T;#m;#P;#y;#w;#o;#S;#R;#g;get path(){return(this.parent||this).fullpath()}constructor(t,r=js,n,i,o,a,u){this.name=t,this.#v=o?t1(t):LE(t),this.#o=r&aut,this.nocase=o,this.roots=i,this.root=n||this,this.#S=a,this.#m=u.fullpath,this.#y=u.relative,this.#w=u.relativePosix,this.parent=u.parent,this.parent?this.#t=this.parent.#t:this.#t=Poe(u.fs)}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#S}resolve(t){if(!t)return this;let r=this.getRootString(t),i=t.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#$(i):this.#$(i)}#$(t){let r=this;for(let n of t)r=r.child(n);return r}children(){let t=this.#S.get(this);if(t)return t;let r=Object.assign([],{provisional:0});return this.#S.set(this,r),this.#o&=~vF,r}child(t,r){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let n=this.children(),i=this.nocase?t1(t):LE(t);for(let c of n)if(c.#v===i)return c;let o=this.parent?this.sep:"",a=this.#m?this.#m+o+t:void 0,u=this.newChild(t,js,{...r,parent:this,fullpath:a});return this.canReaddir()||(u.#o|=wo),n.push(u),u}relative(){if(this.#y!==void 0)return this.#y;let t=this.name,r=this.parent;if(!r)return this.#y=this.name;let n=r.relative();return n+(!n||!r.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.#w!==void 0)return this.#w;let t=this.name,r=this.parent;if(!r)return this.#w=this.fullpathPosix();let n=r.relativePosix();return n+(!n||!r.parent?"":"/")+t}fullpath(){if(this.#m!==void 0)return this.#m;let t=this.name,r=this.parent;if(!r)return this.#m=this.name;let i=r.fullpath()+(r.parent?this.sep:"")+t;return this.#m=i}fullpathPosix(){if(this.#P!==void 0)return this.#P;if(this.sep==="/")return this.#P=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#P=`//?/${i}`:this.#P=i}let t=this.parent,r=t.fullpathPosix(),n=r+(!r||!t.parent?"":"/")+this.name;return this.#P=n}isUnknown(){return(this.#o&Ls)===js}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#o&Ls)===Aoe}isDirectory(){return(this.#o&Ls)===Oa}isCharacterDevice(){return(this.#o&Ls)===Toe}isBlockDevice(){return(this.#o&Ls)===Noe}isFIFO(){return(this.#o&Ls)===Ioe}isSocket(){return(this.#o&Ls)===Roe}isSymbolicLink(){return(this.#o&xd)===xd}lstatCached(){return this.#o&Eoe?this:void 0}readlinkCached(){return this.#R}realpathCached(){return this.#g}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#R)return!0;if(!this.parent)return!1;let t=this.#o&Ls;return!(t!==js&&t!==xd||this.#o&e1||this.#o&wo)}calledReaddir(){return!!(this.#o&vF)}isENOENT(){return!!(this.#o&wo)}isNamed(t){return this.nocase?this.#v===t1(t):this.#v===LE(t)}async readlink(){let t=this.#R;if(t)return t;if(this.canReadlink()&&this.parent)try{let r=await this.#t.promises.readlink(this.fullpath()),n=this.parent.resolve(r);if(n)return this.#R=n}catch(r){this.#x(r.code);return}}readlinkSync(){let t=this.#R;if(t)return t;if(this.canReadlink()&&this.parent)try{let r=this.#t.readlinkSync(this.fullpath()),n=this.parent.resolve(r);if(n)return this.#R=n}catch(r){this.#x(r.code);return}}#M(t){this.#o|=vF;for(let r=t.provisional;r<t.length;r++)t[r].#N()}#N(){this.#o&wo||(this.#o=(this.#o|wo)&RE,this.#C())}#C(){let t=this.children();t.provisional=0;for(let r of t)r.#N()}#U(){this.#o|=r1,this.#D()}#D(){if(this.#o&DE)return;let t=this.#o;(t&Ls)===Oa&&(t&=RE),this.#o=t|DE,this.#C()}#j(t=""){t==="ENOTDIR"||t==="EPERM"?this.#D():t==="ENOENT"?this.#N():this.children().provisional=0}#h(t=""){t==="ENOTDIR"?this.parent.#D():t==="ENOENT"&&this.#N()}#x(t=""){let r=this.#o;r|=e1,t==="ENOENT"&&(r|=wo),(t==="EINVAL"||t==="UNKNOWN")&&(r&=RE),this.#o=r,t==="ENOTDIR"&&this.parent&&this.parent.#D()}#L(t,r){return this.#V(t,r)||this.#G(t,r)}#G(t,r){let n=OF(t),i=this.newChild(t.name,n,{parent:this}),o=i.#o&Ls;return o!==Oa&&o!==xd&&o!==js&&(i.#o|=DE),r.unshift(i),r.provisional++,i}#V(t,r){for(let n=r.provisional;n<r.length;n++){let i=r[n];if((this.nocase?t1(t.name):LE(t.name))===i.#v)return this.#z(t,i,n,r)}}#z(t,r,n,i){let o=r.name;return r.#o=r.#o&RE|OF(t),o!==t.name&&(r.name=t.name),n!==i.provisional&&(n===i.length-1?i.pop():i.splice(n,1),i.unshift(r)),i.provisional++,r}async lstat(){if(!(this.#o&wo))try{return this.#B(await this.#t.promises.lstat(this.fullpath())),this}catch(t){this.#h(t.code)}}lstatSync(){if(!(this.#o&wo))try{return this.#B(this.#t.lstatSync(this.fullpath())),this}catch(t){this.#h(t.code)}}#B(t){let{atime:r,atimeMs:n,birthtime:i,birthtimeMs:o,blksize:a,blocks:u,ctime:c,ctimeMs:l,dev:f,gid:d,ino:_,mode:m,mtime:g,mtimeMs:y,nlink:b,rdev:E,size:S,uid:O}=t;this.#d=r,this.#E=n,this.#O=i,this.#b=o,this.#l=a,this.#u=u,this.#A=c,this.#p=l,this.#r=f,this.#c=d,this.#a=_,this.#n=m,this.#I=g,this.#_=y,this.#e=b,this.#f=E,this.#i=S,this.#s=O;let P=OF(t);this.#o=this.#o&RE|P|Eoe,P!==js&&P!==Oa&&P!==xd&&(this.#o|=DE)}#F=[];#k=!1;#H(t){this.#k=!1;let r=this.#F.slice();this.#F.length=0,r.forEach(n=>n(null,t))}readdirCB(t,r=!1){if(!this.canReaddir()){r?t(null,[]):queueMicrotask(()=>t(null,[]));return}let n=this.children();if(this.calledReaddir()){let o=n.slice(0,n.provisional);r?t(null,o):queueMicrotask(()=>t(null,o));return}if(this.#F.push(t),this.#k)return;this.#k=!0;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:!0},(o,a)=>{if(o)this.#j(o.code),n.provisional=0;else{for(let u of a)this.#L(u,n);this.#M(n)}this.#H(n.slice(0,n.provisional))})}#q;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let r=this.fullpath();if(this.#q)await this.#q;else{let n=s(()=>{},"resolve");this.#q=new Promise(i=>n=i);try{for(let i of await this.#t.promises.readdir(r,{withFileTypes:!0}))this.#L(i,t);this.#M(t)}catch(i){this.#j(i.code),t.provisional=0}this.#q=void 0,n()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let r=this.fullpath();try{for(let n of this.#t.readdirSync(r,{withFileTypes:!0}))this.#L(n,t);this.#M(t)}catch(n){this.#j(n.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#o&boe)return!1;let t=Ls&this.#o;return t===js||t===Oa||t===xd}shouldWalk(t,r){return(this.#o&Oa)===Oa&&!(this.#o&boe)&&!t.has(this)&&(!r||r(this))}async realpath(){if(this.#g)return this.#g;if(!((r1|e1|wo)&this.#o))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#g=this.resolve(t)}catch{this.#U()}}realpathSync(){if(this.#g)return this.#g;if(!((r1|e1|wo)&this.#o))try{let t=this.#t.realpathSync(this.fullpath());return this.#g=this.resolve(t)}catch{this.#U()}}[Coe](t){if(t===this)return;let r=new Set([]),n=[],i=this;for(;i&&i.parent;)r.add(i),i.#y=n.join(this.sep),i.#w=n.join("/"),i=i.parent,n.push("..");for(i=t;i&&i.parent&&!r.has(i);)i.#y=void 0,i.#w=void 0,i=i.parent}};Ot.PathBase=un;var ME=class e extends un{static{s(this,"PathWin32")}sep="\\";splitSep=out;constructor(t,r=js,n,i,o,a,u){super(t,r,n,i,o,a,u)}newChild(t,r=js,n={}){return new e(t,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(t){return n1.win32.parse(t).root}getRoot(t){if(t=sut(t.toUpperCase()),t===this.root.name)return this.root;for(let[r,n]of Object.entries(this.roots))if(this.sameRoot(t,r))return this.roots[t]=n;return this.roots[t]=new qE(t,this).root}sameRoot(t,r=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace(woe,"$1\\"),t===r}};Ot.PathWin32=ME;var UE=class e extends un{static{s(this,"PathPosix")}splitSep="/";sep="/";constructor(t,r=js,n,i,o,a,u){super(t,r,n,i,o,a,u)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,r=js,n={}){return new e(t,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}};Ot.PathPosix=UE;var xE=class{static{s(this,"PathScurryBase")}root;rootPath;roots;cwd;#t;#r;#n;nocase;#e;constructor(t=process.cwd(),r,n,{nocase:i,childrenCacheSize:o=16*1024,fs:a=$E}={}){this.#e=Poe(a),(t instanceof URL||t.startsWith("file://"))&&(t=(0,rut.fileURLToPath)(t));let u=r.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(u),this.#t=new jE,this.#r=new jE,this.#n=new i1(o);let c=u.substring(this.rootPath.length).split(n);if(c.length===1&&!c[0]&&c.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#e),this.roots[this.rootPath]=this.root;let l=this.root,f=c.length-1,d=r.sep,_=this.rootPath,m=!1;for(let g of c){let y=f--;l=l.child(g,{relative:new Array(y).fill("..").join(d),relativePosix:new Array(y).fill("..").join("/"),fullpath:_+=(m?"":d)+g}),m=!0}this.cwd=l}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#n}resolve(...t){let r="";for(let o=t.length-1;o>=0;o--){let a=t[o];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let n=this.#t.get(r);if(n!==void 0)return n;let i=this.cwd.resolve(r).fullpath();return this.#t.set(r,i),i}resolvePosix(...t){let r="";for(let o=t.length-1;o>=0;o--){let a=t[o];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let n=this.#r.get(r);if(n!==void 0)return n;let i=this.cwd.resolve(r).fullpathPosix();return this.#r.set(r,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,r={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n}=r;if(t.canReaddir()){let i=await t.readdir();return n?i:i.map(o=>o.name)}else return[]}readdirSync(t=this.cwd,r={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0}=r;return t.canReaddir()?n?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t.withFileTypes,t=this.cwd);let n=await t.readlink();return r?n:n?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t.withFileTypes,t=this.cwd);let n=t.readlinkSync();return r?n:n?.fullpath()}async realpath(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t.withFileTypes,t=this.cwd);let n=await t.realpath();return r?n:n?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t.withFileTypes,t=this.cwd);let n=t.realpathSync();return r?n:n?.fullpath()}async walk(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,u=[];(!o||o(t))&&u.push(n?t:t.fullpath());let c=new Set,l=s((d,_)=>{c.add(d),d.readdirCB((m,g)=>{if(m)return _(m);let y=g.length;if(!y)return _();let b=s(()=>{--y===0&&_()},"next");for(let E of g)(!o||o(E))&&u.push(n?E:E.fullpath()),i&&E.isSymbolicLink()?E.realpath().then(S=>S?.isUnknown()?S.lstat():S).then(S=>S?.shouldWalk(c,a)?l(S,b):b()):E.shouldWalk(c,a)?l(E,b):b()},!0)},"walk"),f=t;return new Promise((d,_)=>{l(f,m=>{if(m)return _(m);d(u)})})}walkSync(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,u=[];(!o||o(t))&&u.push(n?t:t.fullpath());let c=new Set([t]);for(let l of c){let f=l.readdirSync();for(let d of f){(!o||o(d))&&u.push(n?d:d.fullpath());let _=d;if(d.isSymbolicLink()){if(!(i&&(_=d.realpathSync())))continue;_.isUnknown()&&_.lstatSync()}_.shouldWalk(c,a)&&c.add(_)}}return u}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,r={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd),this.stream(t,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r;(!o||o(t))&&(yield n?t:t.fullpath());let u=new Set([t]);for(let c of u){let l=c.readdirSync();for(let f of l){(!o||o(f))&&(yield n?f:f.fullpath());let d=f;if(f.isSymbolicLink()){if(!(i&&(d=f.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(u,a)&&u.add(d)}}}stream(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,u=new yoe.Minipass({objectMode:!0});(!o||o(t))&&u.write(n?t:t.fullpath());let c=new Set,l=[t],f=0,d=s(()=>{let _=!1;for(;!_;){let m=l.shift();if(!m){f===0&&u.end();return}f++,c.add(m);let g=s((b,E,S=!1)=>{if(b)return u.emit("error",b);if(i&&!S){let O=[];for(let P of E)P.isSymbolicLink()&&O.push(P.realpath().then(I=>I?.isUnknown()?I.lstat():I));if(O.length){Promise.all(O).then(()=>g(null,E,!0));return}}for(let O of E)O&&(!o||o(O))&&(u.write(n?O:O.fullpath())||(_=!0));f--;for(let O of E){let P=O.realpathCached()||O;P.shouldWalk(c,a)&&l.push(P)}_&&!u.flowing?u.once("drain",d):y||d()},"onReaddir"),y=!0;m.readdirCB(g,!0),y=!1}},"process");return d(),u}streamSync(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,u=new yoe.Minipass({objectMode:!0}),c=new Set;(!o||o(t))&&u.write(n?t:t.fullpath());let l=[t],f=0,d=s(()=>{let _=!1;for(;!_;){let m=l.shift();if(!m){f===0&&u.end();return}f++,c.add(m);let g=m.readdirSync();for(let y of g)(!o||o(y))&&(u.write(n?y:y.fullpath())||(_=!0));f--;for(let y of g){let b=y;if(y.isSymbolicLink()){if(!(i&&(b=y.realpathSync())))continue;b.isUnknown()&&b.lstatSync()}b.shouldWalk(c,a)&&l.push(b)}}_&&!u.flowing&&u.once("drain",d)},"process");return d(),u}chdir(t=this.cwd){let r=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[Coe](r)}};Ot.PathScurryBase=xE;var qE=class extends xE{static{s(this,"PathScurryWin32")}sep="\\";constructor(t=process.cwd(),r={}){let{nocase:n=!0}=r;super(t,n1.win32,"\\",{...r,nocase:n}),this.nocase=n;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(t){return n1.win32.parse(t).root.toUpperCase()}newRoot(t){return new ME(this.rootPath,Oa,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}};Ot.PathScurryWin32=qE;var FE=class extends xE{static{s(this,"PathScurryPosix")}sep="/";constructor(t=process.cwd(),r={}){let{nocase:n=!1}=r;super(t,n1.posix,"/",{...r,nocase:n}),this.nocase=n}parseRootPath(t){return"/"}newRoot(t){return new UE(this.rootPath,Oa,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}};Ot.PathScurryPosix=FE;var s1=class extends FE{static{s(this,"PathScurryDarwin")}constructor(t=process.cwd(),r={}){let{nocase:n=!0}=r;super(t,{...r,nocase:n})}};Ot.PathScurryDarwin=s1;Ot.Path=process.platform==="win32"?ME:UE;Ot.PathScurry=process.platform==="win32"?qE:process.platform==="darwin"?s1:FE});var wF=h(o1=>{"use strict";Object.defineProperty(o1,"__esModule",{value:!0});o1.Pattern=void 0;var uut=Kc(),cut=s(e=>e.length>=1,"isPatternList"),lut=s(e=>e.length>=1,"isGlobList"),PF=class e{static{s(this,"Pattern")}#t;#r;#n;length;#e;#s;#c;#f;#l;#a;#i=!0;constructor(t,r,n,i){if(!cut(t))throw new TypeError("empty pattern list");if(!lut(r))throw new TypeError("empty glob list");if(r.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#t=t,this.#r=r,this.#n=n,this.#e=i,this.#n===0){if(this.isUNC()){let[o,a,u,c,...l]=this.#t,[f,d,_,m,...g]=this.#r;l[0]===""&&(l.shift(),g.shift());let y=[o,a,u,c,""].join("/"),b=[f,d,_,m,""].join("/");this.#t=[y,...l],this.#r=[b,...g],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[o,...a]=this.#t,[u,...c]=this.#r;a[0]===""&&(a.shift(),c.shift());let l=o+"/",f=u+"/";this.#t=[l,...a],this.#r=[f,...c],this.length=this.#t.length}}}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===uut.GLOBSTAR}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#c=this.#c||(this.#n===0?this.isAbsolute()?this.#r[0]+this.#r.slice(1).join("/"):this.#r.join("/"):this.#r.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#s!==void 0?this.#s:this.hasMore()?(this.#s=new e(this.#t,this.#r,this.#n+1,this.#e),this.#s.#a=this.#a,this.#s.#l=this.#l,this.#s.#f=this.#f,this.#s):this.#s=null}isUNC(){let t=this.#t;return this.#l!==void 0?this.#l:this.#l=this.#e==="win32"&&this.#n===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#t;return this.#f!==void 0?this.#f:this.#f=this.#e==="win32"&&this.#n===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return this.#a!==void 0?this.#a:this.#a=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return typeof t=="string"&&this.isAbsolute()&&this.#n===0?t:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#i)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#i?!1:(this.#i=!1,!0)}};o1.Pattern=PF});var Loe=h(a1=>{"use strict";Object.defineProperty(a1,"__esModule",{value:!0});a1.Ignore=void 0;var Doe=Kc(),fut=wF(),dut=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",IF=class{static{s(this,"Ignore")}relative;relativeChildren;absolute;absoluteChildren;constructor(t,{nobrace:r,nocase:n,noext:i,noglobstar:o,platform:a=dut}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[];let u={dot:!0,nobrace:r,nocase:n,noext:i,noglobstar:o,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let c of t){let l=new Doe.Minimatch(c,u);for(let f=0;f<l.set.length;f++){let d=l.set[f],_=l.globParts[f];if(!d||!_)throw new Error("invalid pattern object");let m=new fut.Pattern(d,_,0,a),g=new Doe.Minimatch(m.globString(),u),y=_[_.length-1]==="**",b=m.isAbsolute();b?this.absolute.push(g):this.relative.push(g),y&&(b?this.absoluteChildren.push(g):this.relativeChildren.push(g))}}}ignored(t){let r=t.fullpath(),n=`${r}/`,i=t.relative()||".",o=`${i}/`;for(let a of this.relative)if(a.match(i)||a.match(o))return!0;for(let a of this.absolute)if(a.match(r)||a.match(n))return!0;return!1}childrenIgnored(t){let r=t.fullpath()+"/",n=(t.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(n))return!0;for(let i of this.absoluteChildren)if(i.match(r))return!0;return!1}};a1.Ignore=IF});var Moe=h(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.Processor=Pa.SubWalks=Pa.MatchRecord=Pa.HasWalkedCache=void 0;var joe=Kc(),u1=class e{static{s(this,"HasWalkedCache")}store;constructor(t=new Map){this.store=t}copy(){return new e(new Map(this.store))}hasWalked(t,r){return this.store.get(t.fullpath())?.has(r.globString())}storeWalked(t,r){let n=t.fullpath(),i=this.store.get(n);i?i.add(r.globString()):this.store.set(n,new Set([r.globString()]))}};Pa.HasWalkedCache=u1;var c1=class{static{s(this,"MatchRecord")}store=new Map;add(t,r,n){let i=(r?2:0)|(n?1:0),o=this.store.get(t);this.store.set(t,o===void 0?i:i&o)}entries(){return[...this.store.entries()].map(([t,r])=>[t,!!(r&2),!!(r&1)])}};Pa.MatchRecord=c1;var l1=class{static{s(this,"SubWalks")}store=new Map;add(t,r){if(!t.canReaddir())return;let n=this.store.get(t);n?n.find(i=>i.globString()===r.globString())||n.push(r):this.store.set(t,[r])}get(t){let r=this.store.get(t);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}};Pa.SubWalks=l1;var TF=class e{static{s(this,"Processor")}hasWalkedCache;matches=new c1;subwalks=new l1;patterns;follow;dot;opts;constructor(t,r){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=r?r.copy():new u1}processPatterns(t,r){this.patterns=r;let n=r.map(i=>[t,i]);for(let[i,o]of n){this.hasWalkedCache.storeWalked(i,o);let a=o.root(),u=o.isAbsolute()&&this.opts.absolute!==!1;if(a){i=i.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let d=o.rest();if(d)o=d;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let c,l,f=!1;for(;typeof(c=o.pattern())=="string"&&(l=o.rest());)i=i.resolve(c),o=l,f=!0;if(c=o.pattern(),l=o.rest(),f){if(this.hasWalkedCache.hasWalked(i,o))continue;this.hasWalkedCache.storeWalked(i,o)}if(typeof c=="string"){let d=c===".."||c===""||c===".";this.matches.add(i.resolve(c),u,d);continue}else if(c===joe.GLOBSTAR){(!i.isSymbolicLink()||this.follow||o.checkFollowGlobstar())&&this.subwalks.add(i,o);let d=l?.pattern(),_=l?.rest();if(!l||(d===""||d===".")&&!_)this.matches.add(i,u,d===""||d===".");else if(d===".."){let m=i.parent||i;_?this.hasWalkedCache.hasWalked(m,_)||this.subwalks.add(m,_):this.matches.add(m,u,!0)}}else c instanceof RegExp&&this.subwalks.add(i,o)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new e(this.opts,this.hasWalkedCache)}filterEntries(t,r){let n=this.subwalks.get(t),i=this.child();for(let o of r)for(let a of n){let u=a.isAbsolute(),c=a.pattern(),l=a.rest();c===joe.GLOBSTAR?i.testGlobstar(o,a,l,u):c instanceof RegExp?i.testRegExp(o,c,l,u):i.testString(o,c,l,u)}return i}testGlobstar(t,r,n,i){if((this.dot||!t.name.startsWith("."))&&(r.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,r):t.isSymbolicLink()&&(n&&r.checkFollowGlobstar()?this.subwalks.add(t,n):r.markFollowGlobstar()&&this.subwalks.add(t,r)))),n){let o=n.pattern();if(typeof o=="string"&&o!==".."&&o!==""&&o!==".")this.testString(t,o,n.rest(),i);else if(o===".."){let a=t.parent||t;this.subwalks.add(a,n)}else o instanceof RegExp&&this.testRegExp(t,o,n.rest(),i)}}testRegExp(t,r,n,i){r.test(t.name)&&(n?this.subwalks.add(t,n):this.matches.add(t,i,!1))}testString(t,r,n,i){t.isNamed(r)&&(n?this.subwalks.add(t,n):this.matches.add(t,i,!1))}};Pa.Processor=TF});var qoe=h(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.GlobStream=Jc.GlobWalker=Jc.GlobUtil=void 0;var put=SF(),Uoe=Loe(),xoe=Moe(),hut=s((e,t)=>typeof e=="string"?new Uoe.Ignore([e],t):Array.isArray(e)?new Uoe.Ignore(e,t):e,"makeIgnore"),kE=class{static{s(this,"GlobUtil")}path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#r;#n;signal;maxDepth;constructor(t,r,n){this.patterns=t,this.path=r,this.opts=n,this.#n=!n.posix&&n.platform==="win32"?"\\":"/",n.ignore&&(this.#r=hut(n.ignore,n)),this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#e(t){return this.seen.has(t)||!!this.#r?.ignored?.(t)}#s(t){return!!this.#r?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=this.#t.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t())}async matchCheck(t,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=t.realpathCached()||await t.realpath(),!n)return;t=n}let i=t.isUnknown()||this.opts.stat;return this.matchCheckTest(i?await t.lstat():t,r)}matchCheckTest(t,r){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!r||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&!this.#e(t)?t:void 0}matchCheckSync(t,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=t.realpathCached()||t.realpathSync(),!n)return;t=n}let i=t.isUnknown()||this.opts.stat;return this.matchCheckTest(i?t.lstatSync():t,r)}matchFinish(t,r){if(this.#e(t))return;let n=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(n){let o=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(o+i)}else{let o=this.opts.posix?t.relativePosix():t.relative(),a=this.opts.dotRelative&&!o.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(o?a+o+i:"."+i)}}async match(t,r,n){let i=await this.matchCheck(t,n);i&&this.matchFinish(i,r)}matchSync(t,r,n){let i=this.matchCheckSync(t,n);i&&this.matchFinish(i,r)}walkCB(t,r,n){this.signal?.aborted&&n(),this.walkCB2(t,r,new xoe.Processor(this.opts),n)}walkCB2(t,r,n,i){if(this.#s(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,r,n,i));return}n.processPatterns(t,r);let o=1,a=s(()=>{--o===0&&i()},"next");for(let[u,c,l]of n.matches.entries())this.#e(u)||(o++,this.match(u,c,l).then(()=>a()));for(let u of n.subwalkTargets()){if(this.maxDepth!==1/0&&u.depth()>=this.maxDepth)continue;o++;let c=u.readdirCached();u.calledReaddir()?this.walkCB3(u,c,n,a):u.readdirCB((l,f)=>this.walkCB3(u,f,n,a),!0)}a()}walkCB3(t,r,n,i){n=n.filterEntries(t,r);let o=1,a=s(()=>{--o===0&&i()},"next");for(let[u,c,l]of n.matches.entries())this.#e(u)||(o++,this.match(u,c,l).then(()=>a()));for(let[u,c]of n.subwalks.entries())o++,this.walkCB2(u,c,n.child(),a);a()}walkCBSync(t,r,n){this.signal?.aborted&&n(),this.walkCB2Sync(t,r,new xoe.Processor(this.opts),n)}walkCB2Sync(t,r,n,i){if(this.#s(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,r,n,i));return}n.processPatterns(t,r);let o=1,a=s(()=>{--o===0&&i()},"next");for(let[u,c,l]of n.matches.entries())this.#e(u)||this.matchSync(u,c,l);for(let u of n.subwalkTargets()){if(this.maxDepth!==1/0&&u.depth()>=this.maxDepth)continue;o++;let c=u.readdirSync();this.walkCB3Sync(u,c,n,a)}a()}walkCB3Sync(t,r,n,i){n=n.filterEntries(t,r);let o=1,a=s(()=>{--o===0&&i()},"next");for(let[u,c,l]of n.matches.entries())this.#e(u)||this.matchSync(u,c,l);for(let[u,c]of n.subwalks.entries())o++,this.walkCB2Sync(u,c,n.child(),a);a()}};Jc.GlobUtil=kE;var NF=class extends kE{static{s(this,"GlobWalker")}matches;constructor(t,r,n){super(t,r,n),this.matches=new Set}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,r)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?r(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};Jc.GlobWalker=NF;var AF=class extends kE{static{s(this,"GlobStream")}results;constructor(t,r,n){super(t,r,n),this.results=new put.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};Jc.GlobStream=AF});var CF=h(p1=>{"use strict";Object.defineProperty(p1,"__esModule",{value:!0});p1.Glob=void 0;var mut=Kc(),f1=$oe(),_ut=require("url"),gut=wF(),d1=qoe(),yut=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",RF=class{static{s(this,"Glob")}absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(t,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=(0,_ut.fileURLToPath)(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(c=>c.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(c=>c.includes("/")?c:`./**/${c}`)}if(this.pattern=t,this.platform=r.platform||yut,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let c=r.platform==="win32"?f1.PathScurryWin32:r.platform==="darwin"?f1.PathScurryDarwin:r.platform?f1.PathScurryPosix:f1.PathScurry;this.scurry=new c(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",i={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},o=this.pattern.map(c=>new mut.Minimatch(c,i)),[a,u]=o.reduce((c,l)=>(c[0].push(...l.set),c[1].push(...l.globParts),c),[[],[]]);this.patterns=a.map((c,l)=>{let f=u[l];if(!f)throw new Error("invalid pattern object");return new gut.Pattern(c,f,0,this.platform)})}async walk(){return[...await new d1.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walk()]}walkSync(){return[...new d1.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walkSync()]}stream(){return new d1.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).stream()}streamSync(){return new d1.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};p1.Glob=RF});var $F=h(h1=>{"use strict";Object.defineProperty(h1,"__esModule",{value:!0});h1.hasMagic=void 0;var Eut=Kc(),but=s((e,t={})=>{Array.isArray(e)||(e=[e]);for(let r of e)if(new Eut.Minimatch(r,t).hasMagic())return!0;return!1},"hasMagic");h1.hasMagic=but});var Goe=h(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.glob=Fe.hasMagic=Fe.Glob=Fe.unescape=Fe.escape=Fe.sync=Fe.iterate=Fe.iterateSync=Fe.stream=Fe.streamSync=Fe.globIterate=Fe.globIterateSync=Fe.globSync=Fe.globStream=Fe.globStreamSync=void 0;var Foe=Kc(),qd=CF(),Sut=$F();function BE(e,t={}){return new qd.Glob(e,t).streamSync()}s(BE,"globStreamSync");Fe.globStreamSync=BE;function DF(e,t={}){return new qd.Glob(e,t).stream()}s(DF,"globStream");Fe.globStream=DF;function LF(e,t={}){return new qd.Glob(e,t).walkSync()}s(LF,"globSync");Fe.globSync=LF;async function koe(e,t={}){return new qd.Glob(e,t).walk()}s(koe,"glob_");function GE(e,t={}){return new qd.Glob(e,t).iterateSync()}s(GE,"globIterateSync");Fe.globIterateSync=GE;function jF(e,t={}){return new qd.Glob(e,t).iterate()}s(jF,"globIterate");Fe.globIterate=jF;Fe.streamSync=BE;Fe.stream=Object.assign(DF,{sync:BE});Fe.iterateSync=GE;Fe.iterate=Object.assign(jF,{sync:GE});Fe.sync=Object.assign(LF,{stream:BE,iterate:GE});var Boe=Kc();Object.defineProperty(Fe,"escape",{enumerable:!0,get:function(){return Boe.escape}});Object.defineProperty(Fe,"unescape",{enumerable:!0,get:function(){return Boe.unescape}});var vut=CF();Object.defineProperty(Fe,"Glob",{enumerable:!0,get:function(){return vut.Glob}});var Out=$F();Object.defineProperty(Fe,"hasMagic",{enumerable:!0,get:function(){return Out.hasMagic}});Fe.glob=Object.assign(koe,{glob:koe,globSync:LF,sync:Fe.sync,globStream:DF,stream:Fe.stream,globStreamSync:BE,streamSync:Fe.streamSync,globIterate:jF,iterate:Fe.iterate,globIterateSync:GE,iterateSync:Fe.iterateSync,Glob:qd.Glob,hasMagic:Sut.hasMagic,escape:Foe.escape,unescape:Foe.unescape});Fe.glob.glob=Fe.glob});var Koe=h(Bm=>{"use strict";var MF=Bm&&Bm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bm,"__esModule",{value:!0});Bm.lookupFiles=void 0;var Put=xm(),Voe=MF(Goe()),m1=MF(require("fs")),zoe=MF(require("path")),wut=s(e=>zoe.default.basename(e).startsWith("."),"isHiddenOnUnix"),Iut=s((e,t=[])=>t.map(r=>r.startsWith(".")?r:`.${r}`).some(r=>e.endsWith(r)),"hasMatchingExtname");function Hoe(e,t=[],r=!1){let n=[],i;if(!m1.default.existsSync(e)){let o;if(Voe.default.hasMagic(e))o=e;else{let a=t.map(u=>u.startsWith(".")?u:`.${u}`).join("|");o=`${e}+(${a})`,Put.logger.debug("looking for files using glob pattern: %s",o)}if(n.push(...Voe.default.sync(o,{nodir:!0})),!n.length)throw Error(`Cannot find any files matching pattern "${e}"`);return n}try{if(i=m1.default.statSync(e),i.isFile())return[e]}catch{return[]}return m1.default.readdirSync(e).forEach(o=>{let a=zoe.default.join(e,o),u;try{if(u=m1.default.statSync(a),u.isDirectory()){r&&n.push(...Hoe(a,t,r));return}}catch{return}if(!t.length)throw Error(`Argument '${t}' required when argument '${e}' is a directory`);!u.isFile()||!Iut(a,t)||wut(a)||n.push(a)}),n}s(Hoe,"lookupFiles");Bm.lookupFiles=Hoe});var Woe=h(Vm=>{"use strict";var VE=Vm&&Vm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vm,"__esModule",{value:!0});Vm.openApiRoutesPlugin=void 0;var UF=Gf(),Tut=Dne(),xF=VE(_n()),qF=VE(require("fs/promises")),Io=VE(require("path")),FF=kt(),Nut=VE(Xs()),Aut=VE(mn()),Rut=Koe(),Gm="open-api-routes-plugin",_1="open-api-routes-json";function Cut(e){return{name:"open-api-routes-plugin",setup(t){t.onResolve({filter:/routes.json$/},r=>({watchFiles:[...(0,Rut.lookupFiles)(Io.default.join(e.sourceDirectory,FF.USER_CONFIG_DIR_NAME),[".oas.json"],!0),Io.default.join(e.sourceDirectory,FF.USER_CONFIG_DIR_NAME,FF.POLICIES_CONFIG_FILE)],namespace:_1,path:Io.default.isAbsolute(r.path)?r.path:Io.default.join(r.resolveDir,r.path),pluginName:Gm})),t.onResolve({filter:/^\.\.\/modules\/.*/,namespace:_1},async r=>{let n=Io.default.join(r.resolveDir,`${r.path}.ts`);if(!await xF.default.fileExists(n)){let i=`$import(.${r.path.replace(/^../,"")})`,o=Io.default.resolve(e.sourceDirectory,"config"),a=await(0,UF.getOpenApiFilesByAlphabetical)(o),u=await(0,UF.getRouteLocationByValue)(a[0],i,"Update your route configuration to use code from the 'modules' folder");return{errors:[{id:"route-build-error",text:`Invalid handler reference in routes.json. Unable to resolve reference to '${i}' from routes.json`,location:u,detail:"RouteReferenceError",pluginName:Gm}],namespace:_1,path:r.path,pluginName:Gm}}}),t.onLoad({filter:/.*/,namespace:_1},async r=>Aut.default.timeFn("Generating route.json data",async()=>{let n=Io.default.resolve(e.sourceDirectory,"config"),i=await(0,UF.getOpenApiFilesByAlphabetical)(n),o=await Promise.all(i.map(async l=>({content:await qF.default.readFile(l,"utf-8"),fileName:l}))),a=Io.default.resolve(n,"policies.json");if(!await xF.default.fileExists(a))return{errors:[{text:"The project must include a policies file ('/config/policies.json')",detail:"OASPoliciesFileMissing",pluginName:Gm,location:{line:0,column:0,file:"/config/policies.json"}}],pluginName:Gm};let u={content:await qF.default.readFile(a,"utf-8"),fileName:a},c=await(0,Tut.compileRoutes)(o,u);if(Nut.default.DEBUG_BUILD_MODE&&c.content){let l=Io.default.join(e.sourceDirectory,"dist"),f=Io.default.resolve(l,"routes.js");await xF.default.mkdirForFilePathIfNotExits(f),await qF.default.writeFile(f,c.content,"utf-8")}return{contents:c.content,errors:c.errors,pluginName:Gm,resolveDir:Io.default.dirname(r.path),watchFiles:[r.path]}}))}}}s(Cut,"openApiRoutesPlugin");Vm.openApiRoutesPlugin=Cut});var tae=h(Xc=>{"use strict";var zE=Xc&&Xc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xc,"__esModule",{value:!0});Xc.generateRawRouteSource=Xc.rawRoutePlugin=void 0;var Hm=Gf(),Xoe=require("@zuplo/runtime/internal"),Yoe=zE(_n()),Zoe=zE(require("fs/promises")),zm=zE(require("path")),$ut=zE(require("prettier")),Dut=kt(),Lut=zE(Xs()),kF="raw-route-plugin",Joe="raw-route";function jut(e){return{name:"raw-route-plugin",setup(t){t.onResolve({filter:/raw.json$/},r=>({namespace:Joe,path:r.path,pluginName:kF})),t.onLoad({filter:/.*/,namespace:Joe},async r=>{let n=zm.default.resolve(e.sourceDirectory,Dut.USER_CONFIG_DIR_NAME);if(!await Yoe.default.dirExists(n))return{loader:"js",resolveDir:zm.default.dirname(r.path),pluginName:kF};let i=await(0,Hm.getOpenApiFilesByAlphabetical)(n),o=await Qoe({oasFiles:i,sourceDirectory:e.sourceDirectory,logger:e.logger});if(Lut.default.DEBUG_BUILD_MODE&&o){let a=zm.default.join(e.sourceDirectory,"dist"),u=zm.default.resolve(a,"raw-routes.js");await Yoe.default.mkdirForFilePathIfNotExits(u);let c=await $ut.default.format(o,{parser:"babel"});await Zoe.default.writeFile(u,c,"utf-8")}return{contents:o,loader:"js",resolveDir:zm.default.dirname(r.path),pluginName:kF}})}}}s(jut,"rawRoutePlugin");Xc.rawRoutePlugin=jut;async function Qoe({oasFiles:e,sourceDirectory:t,logger:r}){let n=[],i=[],o=[],a=new Hm.RefParser(t,r);n.push("const rawRouteData = {");for(let c of e){let l=await Zoe.default.readFile(c,"utf-8"),f=zm.default.basename(c,".oas.json"),d=JSON.parse(l),_=await a.resolve(c),m=d.paths,g=[],y=new Map;for(let b in m){let E=m[b];for(let S in E){let{description:O,...P}=E[S],I=(0,Xoe.getRawOperationDataIdentifierName)(f,b,S);o.push(Uut(c,f,I,P,_,g,y))}}i.push(Mut(c,f,_,g,y))}return n.push(o.join(",")),n.push("};"),n.push("export default rawRouteData;"),i.join(`
296
+ >>> no match, partial?`,t,_,r,m),_===c))}let y;if(typeof f=="string"?(y=d===f,this.debug("string match",f,d,y)):(y=f.test(d),this.debug("pattern match",f,d,y)),!y)return!1}if(a===c&&u===l)return!0;if(a===c)return n;if(u===l)return a===c-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return(0,oe.braceExpand)(this.pattern,this.options)}parse(t){(0,GT.assertValidPattern)(t);let r=this.options;if(t==="**")return oe.GLOBSTAR;if(t==="")return"";let n,i=null;(n=t.match(bat))?i=r.dot?vat:Sat:(n=t.match(lat))?i=(r.nocase?r.dot?hat:pat:r.dot?dat:fat)(n[1]):(n=t.match(Oat))?i=(r.nocase?r.dot?wat:Pat:r.dot?Iat:Tat)(n):(n=t.match(mat))?i=r.dot?gat:_at:(n=t.match(yat))&&(i=Eat);let o=ioe.AST.fromGlob(t,this.options).toMMPattern();return i?Object.assign(o,{test:i}):o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?Aat:r.dot?Rat:Cat,i=new Set(r.nocase?["i"]:[]),o=t.map(c=>{let l=c.map(f=>{if(f instanceof RegExp)for(let d of f.flags.split(""))i.add(d);return typeof f=="string"?Uat(f):f===oe.GLOBSTAR?oe.GLOBSTAR:f._src});return l.forEach((f,d)=>{let _=l[d+1],m=l[d-1];f!==oe.GLOBSTAR||m===oe.GLOBSTAR||(m===void 0?_!==void 0&&_!==oe.GLOBSTAR?l[d+1]="(?:\\/|"+n+"\\/)?"+_:l[d]=n:_===void 0?l[d-1]=m+"(?:\\/|"+n+")?":_!==oe.GLOBSTAR&&(l[d-1]=m+"(?:\\/|\\/"+n+"\\/)"+_,l[d+1]=oe.GLOBSTAR))}),l.filter(f=>f!==oe.GLOBSTAR).join("/")}).join("|"),[a,u]=t.length>1?["(?:",")"]:["",""];o="^"+a+o+u+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let n=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let o=this.set;this.debug(this.pattern,"set",o);let a=i[i.length-1];if(!a)for(let u=i.length-2;!a&&u>=0;u--)a=i[u];for(let u=0;u<o.length;u++){let c=o[u],l=i;if(n.matchBase&&c.length===1&&(l=[a]),this.matchOne(l,c,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return oe.minimatch.defaults(t).Minimatch}};oe.Minimatch=Md;var xat=cF();Object.defineProperty(oe,"AST",{enumerable:!0,get:function(){return xat.AST}});var qat=lF();Object.defineProperty(oe,"escape",{enumerable:!0,get:function(){return qat.escape}});var Fat=xT();Object.defineProperty(oe,"unescape",{enumerable:!0,get:function(){return Fat.unescape}});oe.minimatch.AST=ioe.AST;oe.minimatch.Minimatch=Md;oe.minimatch.escape=aat.escape;oe.minimatch.unescape=uat.unescape});var doe=h(zT=>{"use strict";Object.defineProperty(zT,"__esModule",{value:!0});zT.LRUCache=void 0;var wE=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,coe=new Set,fF=typeof process=="object"&&process?process:{},loe=s((e,t,r,n)=>{typeof fF.emitWarning=="function"?fF.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)},"emitWarning"),VT=globalThis.AbortController,uoe=globalThis.AbortSignal;if(typeof VT>"u"){uoe=class{static{s(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(n,i){this._onabort.push(i)}},VT=class{static{s(this,"AbortController")}constructor(){t()}signal=new uoe;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let i of this.signal._onabort)i(n);this.signal.onabort?.(n)}}};let e=fF.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=s(()=>{e&&(e=!1,loe("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))},"warnACPolyfill")}var kat=s(e=>!coe.has(e),"shouldWarn"),Ixt=Symbol("type"),Wc=s(e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),"isPosInt"),foe=s(e=>Wc(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?qm:null:null,"getUintArray"),qm=class extends Array{static{s(this,"ZeroArray")}constructor(t){super(t),this.fill(0)}},dF=class e{static{s(this,"Stack")}heap;length;static#t=!1;static create(t){let r=foe(t);if(!r)return[];e.#t=!0;let n=new e(t,r);return e.#t=!1,n}constructor(t,r){if(!e.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},pF=class e{static{s(this,"LRUCache")}#t;#r;#n;#e;#s;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#f;#l;#a;#i;#u;#E;#_;#p;#b;#d;#I;#A;#O;#v;#T;#m;static unsafeExposeInternals(t){return{starts:t.#A,ttls:t.#O,sizes:t.#I,keyMap:t.#l,keyList:t.#a,valList:t.#i,next:t.#u,prev:t.#E,get head(){return t.#_},get tail(){return t.#p},free:t.#b,isBackgroundFetch:r=>t.#h(r),backgroundFetch:(r,n,i,o)=>t.#j(r,n,i,o),moveToTail:r=>t.#L(r),indexes:r=>t.#N(r),rindexes:r=>t.#C(r),isStale:r=>t.#S(r)}}get max(){return this.#t}get maxSize(){return this.#r}get calculatedSize(){return this.#f}get size(){return this.#c}get fetchMethod(){return this.#s}get dispose(){return this.#n}get disposeAfter(){return this.#e}constructor(t){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:a,updateAgeOnHas:u,allowStale:c,dispose:l,disposeAfter:f,noDisposeOnSet:d,noUpdateTTL:_,maxSize:m=0,maxEntrySize:g=0,sizeCalculation:y,fetchMethod:b,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:v,allowStaleOnFetchRejection:O,allowStaleOnFetchAbort:P,ignoreFetchAbort:I}=t;if(r!==0&&!Wc(r))throw new TypeError("max option must be a nonnegative integer");let j=r?foe(r):Array;if(!j)throw new Error("invalid max value: "+r);if(this.#t=r,this.#r=m,this.maxEntrySize=g||this.#r,this.sizeCalculation=y,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#s=b,this.#T=!!b,this.#l=new Map,this.#a=new Array(r).fill(void 0),this.#i=new Array(r).fill(void 0),this.#u=new j(r),this.#E=new j(r),this.#_=0,this.#p=0,this.#b=dF.create(r),this.#c=0,this.#f=0,typeof l=="function"&&(this.#n=l),typeof f=="function"?(this.#e=f,this.#d=[]):(this.#e=void 0,this.#d=void 0),this.#v=!!this.#n,this.#m=!!this.#e,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!_,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!O,this.allowStaleOnFetchAbort=!!P,this.ignoreFetchAbort=!!I,this.maxEntrySize!==0){if(this.#r!==0&&!Wc(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!Wc(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#R()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!v,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!u,this.ttlResolution=Wc(i)||i===0?i:1,this.ttlAutopurge=!!o,this.ttl=n||0,this.ttl){if(!Wc(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(this.#t===0&&this.ttl===0&&this.#r===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#r){let x="LRU_CACHE_UNBOUNDED";kat(x)&&(coe.add(x),loe("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",x,e))}}getRemainingTTL(t){return this.#l.has(t)?1/0:0}#P(){let t=new qm(this.#t),r=new qm(this.#t);this.#O=t,this.#A=r,this.#o=(o,a,u=wE.now())=>{if(r[o]=a!==0?u:0,t[o]=a,a!==0&&this.ttlAutopurge){let c=setTimeout(()=>{this.#S(o)&&this.delete(this.#a[o])},a+1);c.unref&&c.unref()}},this.#y=o=>{r[o]=t[o]!==0?wE.now():0},this.#w=(o,a)=>{if(t[a]){let u=t[a],c=r[a];o.ttl=u,o.start=c,o.now=n||i();let l=o.now-c;o.remainingTTL=u-l}};let n=0,i=s(()=>{let o=wE.now();if(this.ttlResolution>0){n=o;let a=setTimeout(()=>n=0,this.ttlResolution);a.unref&&a.unref()}return o},"getNow");this.getRemainingTTL=o=>{let a=this.#l.get(o);if(a===void 0)return 0;let u=t[a],c=r[a];if(u===0||c===0)return 1/0;let l=(n||i())-c;return u-l},this.#S=o=>t[o]!==0&&r[o]!==0&&(n||i())-r[o]>t[o]}#y=()=>{};#w=()=>{};#o=()=>{};#S=()=>!1;#R(){let t=new qm(this.#t);this.#f=0,this.#I=t,this.#g=r=>{this.#f-=t[r],t[r]=0},this.#M=(r,n,i,o)=>{if(this.#h(n))return 0;if(!Wc(i))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(i=o(n,r),!Wc(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#$=(r,n,i)=>{if(t[r]=n,this.#r){let o=this.#r-t[r];for(;this.#f>o;)this.#D(!0)}this.#f+=t[r],i&&(i.entrySize=n,i.totalCalculatedSize=this.#f)}}#g=t=>{};#$=(t,r,n)=>{};#M=(t,r,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#N({allowStale:t=this.allowStale}={}){if(this.#c)for(let r=this.#p;!(!this.#U(r)||((t||!this.#S(r))&&(yield r),r===this.#_));)r=this.#E[r]}*#C({allowStale:t=this.allowStale}={}){if(this.#c)for(let r=this.#_;!(!this.#U(r)||((t||!this.#S(r))&&(yield r),r===this.#p));)r=this.#u[r]}#U(t){return t!==void 0&&this.#l.get(this.#a[t])===t}*entries(){for(let t of this.#N())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#h(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*rentries(){for(let t of this.#C())this.#i[t]!==void 0&&this.#a[t]!==void 0&&!this.#h(this.#i[t])&&(yield[this.#a[t],this.#i[t]])}*keys(){for(let t of this.#N()){let r=this.#a[t];r!==void 0&&!this.#h(this.#i[t])&&(yield r)}}*rkeys(){for(let t of this.#C()){let r=this.#a[t];r!==void 0&&!this.#h(this.#i[t])&&(yield r)}}*values(){for(let t of this.#N())this.#i[t]!==void 0&&!this.#h(this.#i[t])&&(yield this.#i[t])}*rvalues(){for(let t of this.#C())this.#i[t]!==void 0&&!this.#h(this.#i[t])&&(yield this.#i[t])}[Symbol.iterator](){return this.entries()}find(t,r={}){for(let n of this.#N()){let i=this.#i[n],o=this.#h(i)?i.__staleWhileFetching:i;if(o!==void 0&&t(o,this.#a[n],this))return this.get(this.#a[n],r)}}forEach(t,r=this){for(let n of this.#N()){let i=this.#i[n],o=this.#h(i)?i.__staleWhileFetching:i;o!==void 0&&t.call(r,o,this.#a[n],this)}}rforEach(t,r=this){for(let n of this.#C()){let i=this.#i[n],o=this.#h(i)?i.__staleWhileFetching:i;o!==void 0&&t.call(r,o,this.#a[n],this)}}purgeStale(){let t=!1;for(let r of this.#C({allowStale:!0}))this.#S(r)&&(this.delete(this.#a[r]),t=!0);return t}dump(){let t=[];for(let r of this.#N({allowStale:!0})){let n=this.#a[r],i=this.#i[r],o=this.#h(i)?i.__staleWhileFetching:i;if(o===void 0||n===void 0)continue;let a={value:o};if(this.#O&&this.#A){a.ttl=this.#O[r];let u=wE.now()-this.#A[r];a.start=Math.floor(Date.now()-u)}this.#I&&(a.size=this.#I[r]),t.unshift([n,a])}return t}load(t){this.clear();for(let[r,n]of t){if(n.start){let i=Date.now()-n.start;n.start=wE.now()-i}this.set(r,n.value,n)}}set(t,r,n={}){if(r===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:c}=n,{noUpdateTTL:l=this.noUpdateTTL}=n,f=this.#M(t,r,n.size||0,u);if(this.maxEntrySize&&f>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this.delete(t),this;let d=this.#c===0?void 0:this.#l.get(t);if(d===void 0)d=this.#c===0?this.#p:this.#b.length!==0?this.#b.pop():this.#c===this.#t?this.#D(!1):this.#c,this.#a[d]=t,this.#i[d]=r,this.#l.set(t,d),this.#u[this.#p]=d,this.#E[d]=this.#p,this.#p=d,this.#c++,this.#$(d,f,c),c&&(c.set="add"),l=!1;else{this.#L(d);let _=this.#i[d];if(r!==_){if(this.#T&&this.#h(_)){_.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=_;m!==void 0&&!a&&(this.#v&&this.#n?.(m,t,"set"),this.#m&&this.#d?.push([m,t,"set"]))}else a||(this.#v&&this.#n?.(_,t,"set"),this.#m&&this.#d?.push([_,t,"set"]));if(this.#g(d),this.#$(d,f,c),this.#i[d]=r,c){c.set="replace";let m=_&&this.#h(_)?_.__staleWhileFetching:_;m!==void 0&&(c.oldValue=m)}}else c&&(c.set="update")}if(i!==0&&!this.#O&&this.#P(),this.#O&&(l||this.#o(d,i,o),c&&this.#w(c,d)),!a&&this.#m&&this.#d){let _=this.#d,m;for(;m=_?.shift();)this.#e?.(...m)}return this}pop(){try{for(;this.#c;){let t=this.#i[this.#_];if(this.#D(!0),this.#h(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#m&&this.#d){let t=this.#d,r;for(;r=t?.shift();)this.#e?.(...r)}}}#D(t){let r=this.#_,n=this.#a[r],i=this.#i[r];return this.#T&&this.#h(i)?i.__abortController.abort(new Error("evicted")):(this.#v||this.#m)&&(this.#v&&this.#n?.(i,n,"evict"),this.#m&&this.#d?.push([i,n,"evict"])),this.#g(r),t&&(this.#a[r]=void 0,this.#i[r]=void 0,this.#b.push(r)),this.#c===1?(this.#_=this.#p=0,this.#b.length=0):this.#_=this.#u[r],this.#l.delete(n),this.#c--,r}has(t,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,o=this.#l.get(t);if(o!==void 0){let a=this.#i[o];if(this.#h(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#S(o))i&&(i.has="stale",this.#w(i,o));else return n&&this.#y(o),i&&(i.has="hit",this.#w(i,o)),!0}else i&&(i.has="miss");return!1}peek(t,r={}){let{allowStale:n=this.allowStale}=r,i=this.#l.get(t);if(i!==void 0&&(n||!this.#S(i))){let o=this.#i[i];return this.#h(o)?o.__staleWhileFetching:o}}#j(t,r,n,i){let o=r===void 0?void 0:this.#i[r];if(this.#h(o))return o;let a=new VT,{signal:u}=n;u?.addEventListener("abort",()=>a.abort(u.reason),{signal:a.signal});let c={signal:a.signal,options:n,context:i},l=s((y,b=!1)=>{let{aborted:E}=a.signal,v=n.ignoreFetchAbort&&y!==void 0;if(n.status&&(E&&!b?(n.status.fetchAborted=!0,n.status.fetchError=a.signal.reason,v&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),E&&!v&&!b)return d(a.signal.reason);let O=m;return this.#i[r]===m&&(y===void 0?O.__staleWhileFetching?this.#i[r]=O.__staleWhileFetching:this.delete(t):(n.status&&(n.status.fetchUpdated=!0),this.set(t,y,c.options))),y},"cb"),f=s(y=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=y),d(y)),"eb"),d=s(y=>{let{aborted:b}=a.signal,E=b&&n.allowStaleOnFetchAbort,v=E||n.allowStaleOnFetchRejection,O=v||n.noDeleteOnFetchRejection,P=m;if(this.#i[r]===m&&(!O||P.__staleWhileFetching===void 0?this.delete(t):E||(this.#i[r]=P.__staleWhileFetching)),v)return n.status&&P.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),P.__staleWhileFetching;if(P.__returned===P)throw y},"fetchFail"),_=s((y,b)=>{let E=this.#s?.(t,o,c);E&&E instanceof Promise&&E.then(v=>y(v===void 0?void 0:v),b),a.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(y(void 0),n.allowStaleOnFetchAbort&&(y=s(v=>l(v,!0),"res")))})},"pcall");n.status&&(n.status.fetchDispatched=!0);let m=new Promise(_).then(l,f),g=Object.assign(m,{__abortController:a,__staleWhileFetching:o,__returned:void 0});return r===void 0?(this.set(t,g,{...c.options,status:void 0}),r=this.#l.get(t)):this.#i[r]=g,g}#h(t){if(!this.#T)return!1;let r=t;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof VT}async fetch(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:c=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:_=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:y,forceRefresh:b=!1,status:E,signal:v}=r;if(!this.#T)return E&&(E.fetch="get"),this.get(t,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,status:E});let O={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,ttl:a,noDisposeOnSet:u,size:c,sizeCalculation:l,noUpdateTTL:f,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:_,allowStaleOnFetchAbort:g,ignoreFetchAbort:m,status:E,signal:v},P=this.#l.get(t);if(P===void 0){E&&(E.fetch="miss");let I=this.#j(t,P,O,y);return I.__returned=I}else{let I=this.#i[P];if(this.#h(I)){let Q=n&&I.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",Q&&(E.returnedStale=!0)),Q?I.__staleWhileFetching:I.__returned=I}let j=this.#S(P);if(!b&&!j)return E&&(E.fetch="hit"),this.#L(P),i&&this.#y(P),E&&this.#w(E,P),I;let x=this.#j(t,P,O,y),K=x.__staleWhileFetching!==void 0&&n;return E&&(E.fetch=j?"stale":"refresh",K&&j&&(E.returnedStale=!0)),K?x.__staleWhileFetching:x.__returned=x}}get(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:a}=r,u=this.#l.get(t);if(u!==void 0){let c=this.#i[u],l=this.#h(c);return a&&this.#w(a,u),this.#S(u)?(a&&(a.get="stale"),l?(a&&n&&c.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?c.__staleWhileFetching:void 0):(o||this.delete(t),a&&n&&(a.returnedStale=!0),n?c:void 0)):(a&&(a.get="hit"),l?c.__staleWhileFetching:(this.#L(u),i&&this.#y(u),c))}else a&&(a.get="miss")}#x(t,r){this.#E[r]=t,this.#u[t]=r}#L(t){t!==this.#p&&(t===this.#_?this.#_=this.#u[t]:this.#x(this.#E[t],this.#u[t]),this.#x(this.#p,t),this.#p=t)}delete(t){let r=!1;if(this.#c!==0){let n=this.#l.get(t);if(n!==void 0)if(r=!0,this.#c===1)this.clear();else{this.#g(n);let i=this.#i[n];this.#h(i)?i.__abortController.abort(new Error("deleted")):(this.#v||this.#m)&&(this.#v&&this.#n?.(i,t,"delete"),this.#m&&this.#d?.push([i,t,"delete"])),this.#l.delete(t),this.#a[n]=void 0,this.#i[n]=void 0,n===this.#p?this.#p=this.#E[n]:n===this.#_?this.#_=this.#u[n]:(this.#u[this.#E[n]]=this.#u[n],this.#E[this.#u[n]]=this.#E[n]),this.#c--,this.#b.push(n)}}if(this.#m&&this.#d?.length){let n=this.#d,i;for(;i=n?.shift();)this.#e?.(...i)}return r}clear(){for(let t of this.#C({allowStale:!0})){let r=this.#i[t];if(this.#h(r))r.__abortController.abort(new Error("deleted"));else{let n=this.#a[t];this.#v&&this.#n?.(r,n,"delete"),this.#m&&this.#d?.push([r,n,"delete"])}}if(this.#l.clear(),this.#i.fill(void 0),this.#a.fill(void 0),this.#O&&this.#A&&(this.#O.fill(0),this.#A.fill(0)),this.#I&&this.#I.fill(0),this.#_=0,this.#p=0,this.#b.length=0,this.#f=0,this.#c=0,this.#m&&this.#d){let t=this.#d,r;for(;r=t?.shift();)this.#e?.(...r)}}};zT.LRUCache=pF});var SF=h(Jn=>{"use strict";var Bat=Jn&&Jn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jn,"__esModule",{value:!0});Jn.Minipass=Jn.isWritable=Jn.isReadable=Jn.isStream=void 0;var poe=typeof process=="object"&&process?process:{stdout:null,stderr:null},bF=require("events"),goe=Bat(require("stream")),Gat=require("string_decoder"),Vat=s(e=>!!e&&typeof e=="object"&&(e instanceof ZT||e instanceof goe.default||(0,Jn.isReadable)(e)||(0,Jn.isWritable)(e)),"isStream");Jn.isStream=Vat;var zat=s(e=>!!e&&typeof e=="object"&&e instanceof bF.EventEmitter&&typeof e.pipe=="function"&&e.pipe!==goe.default.Writable.prototype.pipe,"isReadable");Jn.isReadable=zat;var Hat=s(e=>!!e&&typeof e=="object"&&e instanceof bF.EventEmitter&&typeof e.write=="function"&&typeof e.end=="function","isWritable");Jn.isWritable=Hat;var Ou=Symbol("EOF"),Pu=Symbol("maybeEmitEnd"),Yc=Symbol("emittedEnd"),HT=Symbol("emittingEnd"),IE=Symbol("emittedError"),KT=Symbol("closed"),hoe=Symbol("read"),WT=Symbol("flush"),moe=Symbol("flushChunk"),Po=Symbol("encoding"),Fm=Symbol("decoder"),Fr=Symbol("flowing"),TE=Symbol("paused"),km=Symbol("resume"),kr=Symbol("buffer"),Yn=Symbol("pipes"),Br=Symbol("bufferLength"),hF=Symbol("bufferPush"),YT=Symbol("bufferShift"),Nn=Symbol("objectMode"),gr=Symbol("destroyed"),mF=Symbol("error"),_F=Symbol("emitData"),_oe=Symbol("emitEnd"),gF=Symbol("emitEnd2"),va=Symbol("async"),yF=Symbol("abort"),JT=Symbol("aborted"),NE=Symbol("signal"),Ud=Symbol("dataListeners"),Yi=Symbol("discarded"),AE=s(e=>Promise.resolve().then(e),"defer"),Kat=s(e=>e(),"nodefer"),Wat=s(e=>e==="end"||e==="finish"||e==="prefinish","isEndish"),Yat=s(e=>e instanceof ArrayBuffer||!!e&&typeof e=="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0,"isArrayBufferLike"),Jat=s(e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e),"isArrayBufferView"),XT=class{static{s(this,"Pipe")}src;dest;opts;ondrain;constructor(t,r,n){this.src=t,this.dest=r,this.opts=n,this.ondrain=()=>t[km](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},EF=class extends XT{static{s(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,r,n){super(t,r,n),this.proxyErrors=i=>r.emit("error",i),t.on("error",this.proxyErrors)}},Xat=s(e=>!!e.objectMode,"isObjectModeOptions"),Zat=s(e=>!e.objectMode&&!!e.encoding&&e.encoding!=="buffer","isEncodingOptions"),ZT=class extends bF.EventEmitter{static{s(this,"Minipass")}[Fr]=!1;[TE]=!1;[Yn]=[];[kr]=[];[Nn];[Po];[va];[Fm];[Ou]=!1;[Yc]=!1;[HT]=!1;[KT]=!1;[IE]=null;[Br]=0;[gr]=!1;[NE];[JT]=!1;[Ud]=0;[Yi]=!1;writable=!0;readable=!0;constructor(...t){let r=t[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Xat(r)?(this[Nn]=!0,this[Po]=null):Zat(r)?(this[Po]=r.encoding,this[Nn]=!1):(this[Nn]=!1,this[Po]=null),this[va]=!!r.async,this[Fm]=this[Po]?new Gat.StringDecoder(this[Po]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[kr]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Yn]});let{signal:n}=r;n&&(this[NE]=n,n.aborted?this[yF]():n.addEventListener("abort",()=>this[yF]()))}get bufferLength(){return this[Br]}get encoding(){return this[Po]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Nn]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[va]}set async(t){this[va]=this[va]||!!t}[yF](){this[JT]=!0,this.emit("abort",this[NE]?.reason),this.destroy(this[NE]?.reason)}get aborted(){return this[JT]}set aborted(t){}write(t,r,n){if(this[JT])return!1;if(this[Ou])throw new Error("write after end");if(this[gr])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(n=r,r="utf8"),r||(r="utf8");let i=this[va]?AE:Kat;if(!this[Nn]&&!Buffer.isBuffer(t)){if(Jat(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(Yat(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[Nn]?(this[Fr]&&this[Br]!==0&&this[WT](!0),this[Fr]?this.emit("data",t):this[hF](t),this[Br]!==0&&this.emit("readable"),n&&i(n),this[Fr]):t.length?(typeof t=="string"&&!(r===this[Po]&&!this[Fm]?.lastNeed)&&(t=Buffer.from(t,r)),Buffer.isBuffer(t)&&this[Po]&&(t=this[Fm].write(t)),this[Fr]&&this[Br]!==0&&this[WT](!0),this[Fr]?this.emit("data",t):this[hF](t),this[Br]!==0&&this.emit("readable"),n&&i(n),this[Fr]):(this[Br]!==0&&this.emit("readable"),n&&i(n),this[Fr])}read(t){if(this[gr])return null;if(this[Yi]=!1,this[Br]===0||t===0||t&&t>this[Br])return this[Pu](),null;this[Nn]&&(t=null),this[kr].length>1&&!this[Nn]&&(this[kr]=[this[Po]?this[kr].join(""):Buffer.concat(this[kr],this[Br])]);let r=this[hoe](t||null,this[kr][0]);return this[Pu](),r}[hoe](t,r){if(this[Nn])this[YT]();else{let n=r;t===n.length||t===null?this[YT]():typeof n=="string"?(this[kr][0]=n.slice(t),r=n.slice(0,t),this[Br]-=t):(this[kr][0]=n.subarray(t),r=n.subarray(0,t),this[Br]-=t)}return this.emit("data",r),!this[kr].length&&!this[Ou]&&this.emit("drain"),r}end(t,r,n){return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r="utf8"),t!==void 0&&this.write(t,r),n&&this.once("end",n),this[Ou]=!0,this.writable=!1,(this[Fr]||!this[TE])&&this[Pu](),this}[km](){this[gr]||(!this[Ud]&&!this[Yn].length&&(this[Yi]=!0),this[TE]=!1,this[Fr]=!0,this.emit("resume"),this[kr].length?this[WT]():this[Ou]?this[Pu]():this.emit("drain"))}resume(){return this[km]()}pause(){this[Fr]=!1,this[TE]=!0,this[Yi]=!1}get destroyed(){return this[gr]}get flowing(){return this[Fr]}get paused(){return this[TE]}[hF](t){this[Nn]?this[Br]+=1:this[Br]+=t.length,this[kr].push(t)}[YT](){return this[Nn]?this[Br]-=1:this[Br]-=this[kr][0].length,this[kr].shift()}[WT](t=!1){do;while(this[moe](this[YT]())&&this[kr].length);!t&&!this[kr].length&&!this[Ou]&&this.emit("drain")}[moe](t){return this.emit("data",t),this[Fr]}pipe(t,r){if(this[gr])return t;this[Yi]=!1;let n=this[Yc];return r=r||{},t===poe.stdout||t===poe.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,n?r.end&&t.end():(this[Yn].push(r.proxyErrors?new EF(this,t,r):new XT(this,t,r)),this[va]?AE(()=>this[km]()):this[km]()),t}unpipe(t){let r=this[Yn].find(n=>n.dest===t);r&&(this[Yn].length===1?(this[Fr]&&this[Ud]===0&&(this[Fr]=!1),this[Yn]=[]):this[Yn].splice(this[Yn].indexOf(r),1),r.unpipe())}addListener(t,r){return this.on(t,r)}on(t,r){let n=super.on(t,r);if(t==="data")this[Yi]=!1,this[Ud]++,!this[Yn].length&&!this[Fr]&&this[km]();else if(t==="readable"&&this[Br]!==0)super.emit("readable");else if(Wat(t)&&this[Yc])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[IE]){let i=r;this[va]?AE(()=>i.call(this,this[IE])):i.call(this,this[IE])}return n}removeListener(t,r){return this.off(t,r)}off(t,r){let n=super.off(t,r);return t==="data"&&(this[Ud]=this.listeners("data").length,this[Ud]===0&&!this[Yi]&&!this[Yn].length&&(this[Fr]=!1)),n}removeAllListeners(t){let r=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[Ud]=0,!this[Yi]&&!this[Yn].length&&(this[Fr]=!1)),r}get emittedEnd(){return this[Yc]}[Pu](){!this[HT]&&!this[Yc]&&!this[gr]&&this[kr].length===0&&this[Ou]&&(this[HT]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[KT]&&this.emit("close"),this[HT]=!1)}emit(t,...r){let n=r[0];if(t!=="error"&&t!=="close"&&t!==gr&&this[gr])return!1;if(t==="data")return!this[Nn]&&!n?!1:this[va]?(AE(()=>this[_F](n)),!0):this[_F](n);if(t==="end")return this[_oe]();if(t==="close"){if(this[KT]=!0,!this[Yc]&&!this[gr])return!1;let o=super.emit("close");return this.removeAllListeners("close"),o}else if(t==="error"){this[IE]=n,super.emit(mF,n);let o=!this[NE]||this.listeners("error").length?super.emit("error",n):!1;return this[Pu](),o}else if(t==="resume"){let o=super.emit("resume");return this[Pu](),o}else if(t==="finish"||t==="prefinish"){let o=super.emit(t);return this.removeAllListeners(t),o}let i=super.emit(t,...r);return this[Pu](),i}[_F](t){for(let n of this[Yn])n.dest.write(t)===!1&&this.pause();let r=this[Yi]?!1:super.emit("data",t);return this[Pu](),r}[_oe](){return this[Yc]?!1:(this[Yc]=!0,this.readable=!1,this[va]?(AE(()=>this[gF]()),!0):this[gF]())}[gF](){if(this[Fm]){let r=this[Fm].end();if(r){for(let n of this[Yn])n.dest.write(r);this[Yi]||super.emit("data",r)}}for(let r of this[Yn])r.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[Nn]||(t.dataLength=0);let r=this.promise();return this.on("data",n=>{t.push(n),this[Nn]||(t.dataLength+=n.length)}),await r,t}async concat(){if(this[Nn])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[Po]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,r)=>{this.on(gr,()=>r(new Error("stream destroyed"))),this.on("error",n=>r(n)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[Yi]=!1;let t=!1,r=s(async()=>(this.pause(),t=!0,{value:void 0,done:!0}),"stop");return{next:s(()=>{if(t)return r();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[Ou])return r();let o,a,u=s(d=>{this.off("data",c),this.off("end",l),this.off(gr,f),r(),a(d)},"onerr"),c=s(d=>{this.off("error",u),this.off("end",l),this.off(gr,f),this.pause(),o({value:d,done:!!this[Ou]})},"ondata"),l=s(()=>{this.off("error",u),this.off("data",c),this.off(gr,f),r(),o({done:!0,value:void 0})},"onend"),f=s(()=>u(new Error("stream destroyed")),"ondestroy");return new Promise((d,_)=>{a=_,o=d,this.once(gr,f),this.once("error",u),this.once("end",l),this.once("data",c)})},"next"),throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Yi]=!1;let t=!1,r=s(()=>(this.pause(),this.off(mF,r),this.off(gr,r),this.off("end",r),t=!0,{done:!0,value:void 0}),"stop"),n=s(()=>{if(t)return r();let i=this.read();return i===null?r():{done:!1,value:i}},"next");return this.once("end",r),this.once(mF,r),this.once(gr,r),{next:n,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(t){if(this[gr])return t?this.emit("error",t):this.emit(gr),this;this[gr]=!0,this[Yi]=!0,this[kr].length=0,this[Br]=0;let r=this;return typeof r.close=="function"&&!this[KT]&&r.close(),t?this.emit("error",t):this.emit(gr),this}static get isStream(){return Jn.isStream}};Jn.Minipass=ZT});var $oe=h(Ot=>{"use strict";var Qat=Ot&&Ot.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),eut=Ot&&Ot.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),tut=Ot&&Ot.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Qat(t,e,r);return eut(t,e),t};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.PathScurry=Ot.Path=Ot.PathScurryDarwin=Ot.PathScurryPosix=Ot.PathScurryWin32=Ot.PathScurryBase=Ot.PathPosix=Ot.PathWin32=Ot.PathBase=Ot.ChildrenCache=Ot.ResolveCache=void 0;var Ooe=doe(),n1=require("path"),rut=require("url"),nut=tut(require("fs")),CE=require("fs"),iut=CE.realpathSync.native,QT=require("fs/promises"),yoe=SF(),$E={lstatSync:CE.lstatSync,readdir:CE.readdir,readdirSync:CE.readdirSync,readlinkSync:CE.readlinkSync,realpathSync:iut,promises:{lstat:QT.lstat,readdir:QT.readdir,readlink:QT.readlink,realpath:QT.realpath}},Poe=s(e=>!e||e===$E||e===nut?$E:{...$E,...e,promises:{...$E.promises,...e.promises||{}}},"fsFromOption"),woe=/^\\\\\?\\([a-z]:)\\?$/i,sut=s(e=>e.replace(/\//g,"\\").replace(woe,"$1\\"),"uncToDrive"),out=/[\\\/]/,js=0,Ioe=1,Toe=2,Oa=4,Noe=6,Aoe=8,xd=10,Roe=12,Ls=15,RE=~Ls,vF=16,Eoe=32,DE=64,wo=128,e1=256,r1=512,boe=DE|wo|r1,aut=1023,OF=s(e=>e.isFile()?Aoe:e.isDirectory()?Oa:e.isSymbolicLink()?xd:e.isCharacterDevice()?Toe:e.isBlockDevice()?Noe:e.isSocket()?Roe:e.isFIFO()?Ioe:js,"entToType"),Soe=new Map,LE=s(e=>{let t=Soe.get(e);if(t)return t;let r=e.normalize("NFKD");return Soe.set(e,r),r},"normalize"),voe=new Map,t1=s(e=>{let t=voe.get(e);if(t)return t;let r=LE(e.toLowerCase());return voe.set(e,r),r},"normalizeNocase"),jE=class extends Ooe.LRUCache{static{s(this,"ResolveCache")}constructor(){super({max:256})}};Ot.ResolveCache=jE;var i1=class extends Ooe.LRUCache{static{s(this,"ChildrenCache")}constructor(t=16*1024){super({maxSize:t,sizeCalculation:r=>r.length+1})}};Ot.ChildrenCache=i1;var Coe=Symbol("PathScurry setAsCwd"),un=class{static{s(this,"PathBase")}name;root;roots;parent;nocase;#t;#r;get dev(){return this.#r}#n;get mode(){return this.#n}#e;get nlink(){return this.#e}#s;get uid(){return this.#s}#c;get gid(){return this.#c}#f;get rdev(){return this.#f}#l;get blksize(){return this.#l}#a;get ino(){return this.#a}#i;get size(){return this.#i}#u;get blocks(){return this.#u}#E;get atimeMs(){return this.#E}#_;get mtimeMs(){return this.#_}#p;get ctimeMs(){return this.#p}#b;get birthtimeMs(){return this.#b}#d;get atime(){return this.#d}#I;get mtime(){return this.#I}#A;get ctime(){return this.#A}#O;get birthtime(){return this.#O}#v;#T;#m;#P;#y;#w;#o;#S;#R;#g;get path(){return(this.parent||this).fullpath()}constructor(t,r=js,n,i,o,a,u){this.name=t,this.#v=o?t1(t):LE(t),this.#o=r&aut,this.nocase=o,this.roots=i,this.root=n||this,this.#S=a,this.#m=u.fullpath,this.#y=u.relative,this.#w=u.relativePosix,this.parent=u.parent,this.parent?this.#t=this.parent.#t:this.#t=Poe(u.fs)}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#S}resolve(t){if(!t)return this;let r=this.getRootString(t),i=t.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#$(i):this.#$(i)}#$(t){let r=this;for(let n of t)r=r.child(n);return r}children(){let t=this.#S.get(this);if(t)return t;let r=Object.assign([],{provisional:0});return this.#S.set(this,r),this.#o&=~vF,r}child(t,r){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let n=this.children(),i=this.nocase?t1(t):LE(t);for(let c of n)if(c.#v===i)return c;let o=this.parent?this.sep:"",a=this.#m?this.#m+o+t:void 0,u=this.newChild(t,js,{...r,parent:this,fullpath:a});return this.canReaddir()||(u.#o|=wo),n.push(u),u}relative(){if(this.#y!==void 0)return this.#y;let t=this.name,r=this.parent;if(!r)return this.#y=this.name;let n=r.relative();return n+(!n||!r.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.#w!==void 0)return this.#w;let t=this.name,r=this.parent;if(!r)return this.#w=this.fullpathPosix();let n=r.relativePosix();return n+(!n||!r.parent?"":"/")+t}fullpath(){if(this.#m!==void 0)return this.#m;let t=this.name,r=this.parent;if(!r)return this.#m=this.name;let i=r.fullpath()+(r.parent?this.sep:"")+t;return this.#m=i}fullpathPosix(){if(this.#P!==void 0)return this.#P;if(this.sep==="/")return this.#P=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#P=`//?/${i}`:this.#P=i}let t=this.parent,r=t.fullpathPosix(),n=r+(!r||!t.parent?"":"/")+this.name;return this.#P=n}isUnknown(){return(this.#o&Ls)===js}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#o&Ls)===Aoe}isDirectory(){return(this.#o&Ls)===Oa}isCharacterDevice(){return(this.#o&Ls)===Toe}isBlockDevice(){return(this.#o&Ls)===Noe}isFIFO(){return(this.#o&Ls)===Ioe}isSocket(){return(this.#o&Ls)===Roe}isSymbolicLink(){return(this.#o&xd)===xd}lstatCached(){return this.#o&Eoe?this:void 0}readlinkCached(){return this.#R}realpathCached(){return this.#g}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#R)return!0;if(!this.parent)return!1;let t=this.#o&Ls;return!(t!==js&&t!==xd||this.#o&e1||this.#o&wo)}calledReaddir(){return!!(this.#o&vF)}isENOENT(){return!!(this.#o&wo)}isNamed(t){return this.nocase?this.#v===t1(t):this.#v===LE(t)}async readlink(){let t=this.#R;if(t)return t;if(this.canReadlink()&&this.parent)try{let r=await this.#t.promises.readlink(this.fullpath()),n=this.parent.resolve(r);if(n)return this.#R=n}catch(r){this.#x(r.code);return}}readlinkSync(){let t=this.#R;if(t)return t;if(this.canReadlink()&&this.parent)try{let r=this.#t.readlinkSync(this.fullpath()),n=this.parent.resolve(r);if(n)return this.#R=n}catch(r){this.#x(r.code);return}}#M(t){this.#o|=vF;for(let r=t.provisional;r<t.length;r++)t[r].#N()}#N(){this.#o&wo||(this.#o=(this.#o|wo)&RE,this.#C())}#C(){let t=this.children();t.provisional=0;for(let r of t)r.#N()}#U(){this.#o|=r1,this.#D()}#D(){if(this.#o&DE)return;let t=this.#o;(t&Ls)===Oa&&(t&=RE),this.#o=t|DE,this.#C()}#j(t=""){t==="ENOTDIR"||t==="EPERM"?this.#D():t==="ENOENT"?this.#N():this.children().provisional=0}#h(t=""){t==="ENOTDIR"?this.parent.#D():t==="ENOENT"&&this.#N()}#x(t=""){let r=this.#o;r|=e1,t==="ENOENT"&&(r|=wo),(t==="EINVAL"||t==="UNKNOWN")&&(r&=RE),this.#o=r,t==="ENOTDIR"&&this.parent&&this.parent.#D()}#L(t,r){return this.#V(t,r)||this.#G(t,r)}#G(t,r){let n=OF(t),i=this.newChild(t.name,n,{parent:this}),o=i.#o&Ls;return o!==Oa&&o!==xd&&o!==js&&(i.#o|=DE),r.unshift(i),r.provisional++,i}#V(t,r){for(let n=r.provisional;n<r.length;n++){let i=r[n];if((this.nocase?t1(t.name):LE(t.name))===i.#v)return this.#z(t,i,n,r)}}#z(t,r,n,i){let o=r.name;return r.#o=r.#o&RE|OF(t),o!==t.name&&(r.name=t.name),n!==i.provisional&&(n===i.length-1?i.pop():i.splice(n,1),i.unshift(r)),i.provisional++,r}async lstat(){if(!(this.#o&wo))try{return this.#B(await this.#t.promises.lstat(this.fullpath())),this}catch(t){this.#h(t.code)}}lstatSync(){if(!(this.#o&wo))try{return this.#B(this.#t.lstatSync(this.fullpath())),this}catch(t){this.#h(t.code)}}#B(t){let{atime:r,atimeMs:n,birthtime:i,birthtimeMs:o,blksize:a,blocks:u,ctime:c,ctimeMs:l,dev:f,gid:d,ino:_,mode:m,mtime:g,mtimeMs:y,nlink:b,rdev:E,size:v,uid:O}=t;this.#d=r,this.#E=n,this.#O=i,this.#b=o,this.#l=a,this.#u=u,this.#A=c,this.#p=l,this.#r=f,this.#c=d,this.#a=_,this.#n=m,this.#I=g,this.#_=y,this.#e=b,this.#f=E,this.#i=v,this.#s=O;let P=OF(t);this.#o=this.#o&RE|P|Eoe,P!==js&&P!==Oa&&P!==xd&&(this.#o|=DE)}#F=[];#k=!1;#H(t){this.#k=!1;let r=this.#F.slice();this.#F.length=0,r.forEach(n=>n(null,t))}readdirCB(t,r=!1){if(!this.canReaddir()){r?t(null,[]):queueMicrotask(()=>t(null,[]));return}let n=this.children();if(this.calledReaddir()){let o=n.slice(0,n.provisional);r?t(null,o):queueMicrotask(()=>t(null,o));return}if(this.#F.push(t),this.#k)return;this.#k=!0;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:!0},(o,a)=>{if(o)this.#j(o.code),n.provisional=0;else{for(let u of a)this.#L(u,n);this.#M(n)}this.#H(n.slice(0,n.provisional))})}#q;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let r=this.fullpath();if(this.#q)await this.#q;else{let n=s(()=>{},"resolve");this.#q=new Promise(i=>n=i);try{for(let i of await this.#t.promises.readdir(r,{withFileTypes:!0}))this.#L(i,t);this.#M(t)}catch(i){this.#j(i.code),t.provisional=0}this.#q=void 0,n()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let r=this.fullpath();try{for(let n of this.#t.readdirSync(r,{withFileTypes:!0}))this.#L(n,t);this.#M(t)}catch(n){this.#j(n.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#o&boe)return!1;let t=Ls&this.#o;return t===js||t===Oa||t===xd}shouldWalk(t,r){return(this.#o&Oa)===Oa&&!(this.#o&boe)&&!t.has(this)&&(!r||r(this))}async realpath(){if(this.#g)return this.#g;if(!((r1|e1|wo)&this.#o))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#g=this.resolve(t)}catch{this.#U()}}realpathSync(){if(this.#g)return this.#g;if(!((r1|e1|wo)&this.#o))try{let t=this.#t.realpathSync(this.fullpath());return this.#g=this.resolve(t)}catch{this.#U()}}[Coe](t){if(t===this)return;let r=new Set([]),n=[],i=this;for(;i&&i.parent;)r.add(i),i.#y=n.join(this.sep),i.#w=n.join("/"),i=i.parent,n.push("..");for(i=t;i&&i.parent&&!r.has(i);)i.#y=void 0,i.#w=void 0,i=i.parent}};Ot.PathBase=un;var ME=class e extends un{static{s(this,"PathWin32")}sep="\\";splitSep=out;constructor(t,r=js,n,i,o,a,u){super(t,r,n,i,o,a,u)}newChild(t,r=js,n={}){return new e(t,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(t){return n1.win32.parse(t).root}getRoot(t){if(t=sut(t.toUpperCase()),t===this.root.name)return this.root;for(let[r,n]of Object.entries(this.roots))if(this.sameRoot(t,r))return this.roots[t]=n;return this.roots[t]=new qE(t,this).root}sameRoot(t,r=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace(woe,"$1\\"),t===r}};Ot.PathWin32=ME;var UE=class e extends un{static{s(this,"PathPosix")}splitSep="/";sep="/";constructor(t,r=js,n,i,o,a,u){super(t,r,n,i,o,a,u)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,r=js,n={}){return new e(t,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}};Ot.PathPosix=UE;var xE=class{static{s(this,"PathScurryBase")}root;rootPath;roots;cwd;#t;#r;#n;nocase;#e;constructor(t=process.cwd(),r,n,{nocase:i,childrenCacheSize:o=16*1024,fs:a=$E}={}){this.#e=Poe(a),(t instanceof URL||t.startsWith("file://"))&&(t=(0,rut.fileURLToPath)(t));let u=r.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(u),this.#t=new jE,this.#r=new jE,this.#n=new i1(o);let c=u.substring(this.rootPath.length).split(n);if(c.length===1&&!c[0]&&c.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#e),this.roots[this.rootPath]=this.root;let l=this.root,f=c.length-1,d=r.sep,_=this.rootPath,m=!1;for(let g of c){let y=f--;l=l.child(g,{relative:new Array(y).fill("..").join(d),relativePosix:new Array(y).fill("..").join("/"),fullpath:_+=(m?"":d)+g}),m=!0}this.cwd=l}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#n}resolve(...t){let r="";for(let o=t.length-1;o>=0;o--){let a=t[o];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let n=this.#t.get(r);if(n!==void 0)return n;let i=this.cwd.resolve(r).fullpath();return this.#t.set(r,i),i}resolvePosix(...t){let r="";for(let o=t.length-1;o>=0;o--){let a=t[o];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let n=this.#r.get(r);if(n!==void 0)return n;let i=this.cwd.resolve(r).fullpathPosix();return this.#r.set(r,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,r={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n}=r;if(t.canReaddir()){let i=await t.readdir();return n?i:i.map(o=>o.name)}else return[]}readdirSync(t=this.cwd,r={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0}=r;return t.canReaddir()?n?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t.withFileTypes,t=this.cwd);let n=await t.readlink();return r?n:n?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t.withFileTypes,t=this.cwd);let n=t.readlinkSync();return r?n:n?.fullpath()}async realpath(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t.withFileTypes,t=this.cwd);let n=await t.realpath();return r?n:n?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t.withFileTypes,t=this.cwd);let n=t.realpathSync();return r?n:n?.fullpath()}async walk(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,u=[];(!o||o(t))&&u.push(n?t:t.fullpath());let c=new Set,l=s((d,_)=>{c.add(d),d.readdirCB((m,g)=>{if(m)return _(m);let y=g.length;if(!y)return _();let b=s(()=>{--y===0&&_()},"next");for(let E of g)(!o||o(E))&&u.push(n?E:E.fullpath()),i&&E.isSymbolicLink()?E.realpath().then(v=>v?.isUnknown()?v.lstat():v).then(v=>v?.shouldWalk(c,a)?l(v,b):b()):E.shouldWalk(c,a)?l(E,b):b()},!0)},"walk"),f=t;return new Promise((d,_)=>{l(f,m=>{if(m)return _(m);d(u)})})}walkSync(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,u=[];(!o||o(t))&&u.push(n?t:t.fullpath());let c=new Set([t]);for(let l of c){let f=l.readdirSync();for(let d of f){(!o||o(d))&&u.push(n?d:d.fullpath());let _=d;if(d.isSymbolicLink()){if(!(i&&(_=d.realpathSync())))continue;_.isUnknown()&&_.lstatSync()}_.shouldWalk(c,a)&&c.add(_)}}return u}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,r={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd),this.stream(t,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r;(!o||o(t))&&(yield n?t:t.fullpath());let u=new Set([t]);for(let c of u){let l=c.readdirSync();for(let f of l){(!o||o(f))&&(yield n?f:f.fullpath());let d=f;if(f.isSymbolicLink()){if(!(i&&(d=f.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(u,a)&&u.add(d)}}}stream(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,u=new yoe.Minipass({objectMode:!0});(!o||o(t))&&u.write(n?t:t.fullpath());let c=new Set,l=[t],f=0,d=s(()=>{let _=!1;for(;!_;){let m=l.shift();if(!m){f===0&&u.end();return}f++,c.add(m);let g=s((b,E,v=!1)=>{if(b)return u.emit("error",b);if(i&&!v){let O=[];for(let P of E)P.isSymbolicLink()&&O.push(P.realpath().then(I=>I?.isUnknown()?I.lstat():I));if(O.length){Promise.all(O).then(()=>g(null,E,!0));return}}for(let O of E)O&&(!o||o(O))&&(u.write(n?O:O.fullpath())||(_=!0));f--;for(let O of E){let P=O.realpathCached()||O;P.shouldWalk(c,a)&&l.push(P)}_&&!u.flowing?u.once("drain",d):y||d()},"onReaddir"),y=!0;m.readdirCB(g,!0),y=!1}},"process");return d(),u}streamSync(t=this.cwd,r={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof un||(r=t,t=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,u=new yoe.Minipass({objectMode:!0}),c=new Set;(!o||o(t))&&u.write(n?t:t.fullpath());let l=[t],f=0,d=s(()=>{let _=!1;for(;!_;){let m=l.shift();if(!m){f===0&&u.end();return}f++,c.add(m);let g=m.readdirSync();for(let y of g)(!o||o(y))&&(u.write(n?y:y.fullpath())||(_=!0));f--;for(let y of g){let b=y;if(y.isSymbolicLink()){if(!(i&&(b=y.realpathSync())))continue;b.isUnknown()&&b.lstatSync()}b.shouldWalk(c,a)&&l.push(b)}}_&&!u.flowing&&u.once("drain",d)},"process");return d(),u}chdir(t=this.cwd){let r=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[Coe](r)}};Ot.PathScurryBase=xE;var qE=class extends xE{static{s(this,"PathScurryWin32")}sep="\\";constructor(t=process.cwd(),r={}){let{nocase:n=!0}=r;super(t,n1.win32,"\\",{...r,nocase:n}),this.nocase=n;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(t){return n1.win32.parse(t).root.toUpperCase()}newRoot(t){return new ME(this.rootPath,Oa,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}};Ot.PathScurryWin32=qE;var FE=class extends xE{static{s(this,"PathScurryPosix")}sep="/";constructor(t=process.cwd(),r={}){let{nocase:n=!1}=r;super(t,n1.posix,"/",{...r,nocase:n}),this.nocase=n}parseRootPath(t){return"/"}newRoot(t){return new UE(this.rootPath,Oa,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}};Ot.PathScurryPosix=FE;var s1=class extends FE{static{s(this,"PathScurryDarwin")}constructor(t=process.cwd(),r={}){let{nocase:n=!0}=r;super(t,{...r,nocase:n})}};Ot.PathScurryDarwin=s1;Ot.Path=process.platform==="win32"?ME:UE;Ot.PathScurry=process.platform==="win32"?qE:process.platform==="darwin"?s1:FE});var wF=h(o1=>{"use strict";Object.defineProperty(o1,"__esModule",{value:!0});o1.Pattern=void 0;var uut=Kc(),cut=s(e=>e.length>=1,"isPatternList"),lut=s(e=>e.length>=1,"isGlobList"),PF=class e{static{s(this,"Pattern")}#t;#r;#n;length;#e;#s;#c;#f;#l;#a;#i=!0;constructor(t,r,n,i){if(!cut(t))throw new TypeError("empty pattern list");if(!lut(r))throw new TypeError("empty glob list");if(r.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#t=t,this.#r=r,this.#n=n,this.#e=i,this.#n===0){if(this.isUNC()){let[o,a,u,c,...l]=this.#t,[f,d,_,m,...g]=this.#r;l[0]===""&&(l.shift(),g.shift());let y=[o,a,u,c,""].join("/"),b=[f,d,_,m,""].join("/");this.#t=[y,...l],this.#r=[b,...g],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[o,...a]=this.#t,[u,...c]=this.#r;a[0]===""&&(a.shift(),c.shift());let l=o+"/",f=u+"/";this.#t=[l,...a],this.#r=[f,...c],this.length=this.#t.length}}}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===uut.GLOBSTAR}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#c=this.#c||(this.#n===0?this.isAbsolute()?this.#r[0]+this.#r.slice(1).join("/"):this.#r.join("/"):this.#r.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#s!==void 0?this.#s:this.hasMore()?(this.#s=new e(this.#t,this.#r,this.#n+1,this.#e),this.#s.#a=this.#a,this.#s.#l=this.#l,this.#s.#f=this.#f,this.#s):this.#s=null}isUNC(){let t=this.#t;return this.#l!==void 0?this.#l:this.#l=this.#e==="win32"&&this.#n===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#t;return this.#f!==void 0?this.#f:this.#f=this.#e==="win32"&&this.#n===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return this.#a!==void 0?this.#a:this.#a=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return typeof t=="string"&&this.isAbsolute()&&this.#n===0?t:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#i)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#i?!1:(this.#i=!1,!0)}};o1.Pattern=PF});var Loe=h(a1=>{"use strict";Object.defineProperty(a1,"__esModule",{value:!0});a1.Ignore=void 0;var Doe=Kc(),fut=wF(),dut=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",IF=class{static{s(this,"Ignore")}relative;relativeChildren;absolute;absoluteChildren;constructor(t,{nobrace:r,nocase:n,noext:i,noglobstar:o,platform:a=dut}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[];let u={dot:!0,nobrace:r,nocase:n,noext:i,noglobstar:o,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let c of t){let l=new Doe.Minimatch(c,u);for(let f=0;f<l.set.length;f++){let d=l.set[f],_=l.globParts[f];if(!d||!_)throw new Error("invalid pattern object");let m=new fut.Pattern(d,_,0,a),g=new Doe.Minimatch(m.globString(),u),y=_[_.length-1]==="**",b=m.isAbsolute();b?this.absolute.push(g):this.relative.push(g),y&&(b?this.absoluteChildren.push(g):this.relativeChildren.push(g))}}}ignored(t){let r=t.fullpath(),n=`${r}/`,i=t.relative()||".",o=`${i}/`;for(let a of this.relative)if(a.match(i)||a.match(o))return!0;for(let a of this.absolute)if(a.match(r)||a.match(n))return!0;return!1}childrenIgnored(t){let r=t.fullpath()+"/",n=(t.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(n))return!0;for(let i of this.absoluteChildren)if(i.match(r))return!0;return!1}};a1.Ignore=IF});var Moe=h(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.Processor=Pa.SubWalks=Pa.MatchRecord=Pa.HasWalkedCache=void 0;var joe=Kc(),u1=class e{static{s(this,"HasWalkedCache")}store;constructor(t=new Map){this.store=t}copy(){return new e(new Map(this.store))}hasWalked(t,r){return this.store.get(t.fullpath())?.has(r.globString())}storeWalked(t,r){let n=t.fullpath(),i=this.store.get(n);i?i.add(r.globString()):this.store.set(n,new Set([r.globString()]))}};Pa.HasWalkedCache=u1;var c1=class{static{s(this,"MatchRecord")}store=new Map;add(t,r,n){let i=(r?2:0)|(n?1:0),o=this.store.get(t);this.store.set(t,o===void 0?i:i&o)}entries(){return[...this.store.entries()].map(([t,r])=>[t,!!(r&2),!!(r&1)])}};Pa.MatchRecord=c1;var l1=class{static{s(this,"SubWalks")}store=new Map;add(t,r){if(!t.canReaddir())return;let n=this.store.get(t);n?n.find(i=>i.globString()===r.globString())||n.push(r):this.store.set(t,[r])}get(t){let r=this.store.get(t);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}};Pa.SubWalks=l1;var TF=class e{static{s(this,"Processor")}hasWalkedCache;matches=new c1;subwalks=new l1;patterns;follow;dot;opts;constructor(t,r){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=r?r.copy():new u1}processPatterns(t,r){this.patterns=r;let n=r.map(i=>[t,i]);for(let[i,o]of n){this.hasWalkedCache.storeWalked(i,o);let a=o.root(),u=o.isAbsolute()&&this.opts.absolute!==!1;if(a){i=i.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let d=o.rest();if(d)o=d;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let c,l,f=!1;for(;typeof(c=o.pattern())=="string"&&(l=o.rest());)i=i.resolve(c),o=l,f=!0;if(c=o.pattern(),l=o.rest(),f){if(this.hasWalkedCache.hasWalked(i,o))continue;this.hasWalkedCache.storeWalked(i,o)}if(typeof c=="string"){let d=c===".."||c===""||c===".";this.matches.add(i.resolve(c),u,d);continue}else if(c===joe.GLOBSTAR){(!i.isSymbolicLink()||this.follow||o.checkFollowGlobstar())&&this.subwalks.add(i,o);let d=l?.pattern(),_=l?.rest();if(!l||(d===""||d===".")&&!_)this.matches.add(i,u,d===""||d===".");else if(d===".."){let m=i.parent||i;_?this.hasWalkedCache.hasWalked(m,_)||this.subwalks.add(m,_):this.matches.add(m,u,!0)}}else c instanceof RegExp&&this.subwalks.add(i,o)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new e(this.opts,this.hasWalkedCache)}filterEntries(t,r){let n=this.subwalks.get(t),i=this.child();for(let o of r)for(let a of n){let u=a.isAbsolute(),c=a.pattern(),l=a.rest();c===joe.GLOBSTAR?i.testGlobstar(o,a,l,u):c instanceof RegExp?i.testRegExp(o,c,l,u):i.testString(o,c,l,u)}return i}testGlobstar(t,r,n,i){if((this.dot||!t.name.startsWith("."))&&(r.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,r):t.isSymbolicLink()&&(n&&r.checkFollowGlobstar()?this.subwalks.add(t,n):r.markFollowGlobstar()&&this.subwalks.add(t,r)))),n){let o=n.pattern();if(typeof o=="string"&&o!==".."&&o!==""&&o!==".")this.testString(t,o,n.rest(),i);else if(o===".."){let a=t.parent||t;this.subwalks.add(a,n)}else o instanceof RegExp&&this.testRegExp(t,o,n.rest(),i)}}testRegExp(t,r,n,i){r.test(t.name)&&(n?this.subwalks.add(t,n):this.matches.add(t,i,!1))}testString(t,r,n,i){t.isNamed(r)&&(n?this.subwalks.add(t,n):this.matches.add(t,i,!1))}};Pa.Processor=TF});var qoe=h(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Jc.GlobStream=Jc.GlobWalker=Jc.GlobUtil=void 0;var put=SF(),Uoe=Loe(),xoe=Moe(),hut=s((e,t)=>typeof e=="string"?new Uoe.Ignore([e],t):Array.isArray(e)?new Uoe.Ignore(e,t):e,"makeIgnore"),kE=class{static{s(this,"GlobUtil")}path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#r;#n;signal;maxDepth;constructor(t,r,n){this.patterns=t,this.path=r,this.opts=n,this.#n=!n.posix&&n.platform==="win32"?"\\":"/",n.ignore&&(this.#r=hut(n.ignore,n)),this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#e(t){return this.seen.has(t)||!!this.#r?.ignored?.(t)}#s(t){return!!this.#r?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=this.#t.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t())}async matchCheck(t,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=t.realpathCached()||await t.realpath(),!n)return;t=n}let i=t.isUnknown()||this.opts.stat;return this.matchCheckTest(i?await t.lstat():t,r)}matchCheckTest(t,r){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!r||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&!this.#e(t)?t:void 0}matchCheckSync(t,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=t.realpathCached()||t.realpathSync(),!n)return;t=n}let i=t.isUnknown()||this.opts.stat;return this.matchCheckTest(i?t.lstatSync():t,r)}matchFinish(t,r){if(this.#e(t))return;let n=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(n){let o=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(o+i)}else{let o=this.opts.posix?t.relativePosix():t.relative(),a=this.opts.dotRelative&&!o.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(o?a+o+i:"."+i)}}async match(t,r,n){let i=await this.matchCheck(t,n);i&&this.matchFinish(i,r)}matchSync(t,r,n){let i=this.matchCheckSync(t,n);i&&this.matchFinish(i,r)}walkCB(t,r,n){this.signal?.aborted&&n(),this.walkCB2(t,r,new xoe.Processor(this.opts),n)}walkCB2(t,r,n,i){if(this.#s(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,r,n,i));return}n.processPatterns(t,r);let o=1,a=s(()=>{--o===0&&i()},"next");for(let[u,c,l]of n.matches.entries())this.#e(u)||(o++,this.match(u,c,l).then(()=>a()));for(let u of n.subwalkTargets()){if(this.maxDepth!==1/0&&u.depth()>=this.maxDepth)continue;o++;let c=u.readdirCached();u.calledReaddir()?this.walkCB3(u,c,n,a):u.readdirCB((l,f)=>this.walkCB3(u,f,n,a),!0)}a()}walkCB3(t,r,n,i){n=n.filterEntries(t,r);let o=1,a=s(()=>{--o===0&&i()},"next");for(let[u,c,l]of n.matches.entries())this.#e(u)||(o++,this.match(u,c,l).then(()=>a()));for(let[u,c]of n.subwalks.entries())o++,this.walkCB2(u,c,n.child(),a);a()}walkCBSync(t,r,n){this.signal?.aborted&&n(),this.walkCB2Sync(t,r,new xoe.Processor(this.opts),n)}walkCB2Sync(t,r,n,i){if(this.#s(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,r,n,i));return}n.processPatterns(t,r);let o=1,a=s(()=>{--o===0&&i()},"next");for(let[u,c,l]of n.matches.entries())this.#e(u)||this.matchSync(u,c,l);for(let u of n.subwalkTargets()){if(this.maxDepth!==1/0&&u.depth()>=this.maxDepth)continue;o++;let c=u.readdirSync();this.walkCB3Sync(u,c,n,a)}a()}walkCB3Sync(t,r,n,i){n=n.filterEntries(t,r);let o=1,a=s(()=>{--o===0&&i()},"next");for(let[u,c,l]of n.matches.entries())this.#e(u)||this.matchSync(u,c,l);for(let[u,c]of n.subwalks.entries())o++,this.walkCB2Sync(u,c,n.child(),a);a()}};Jc.GlobUtil=kE;var NF=class extends kE{static{s(this,"GlobWalker")}matches;constructor(t,r,n){super(t,r,n),this.matches=new Set}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,r)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?r(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};Jc.GlobWalker=NF;var AF=class extends kE{static{s(this,"GlobStream")}results;constructor(t,r,n){super(t,r,n),this.results=new put.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};Jc.GlobStream=AF});var CF=h(p1=>{"use strict";Object.defineProperty(p1,"__esModule",{value:!0});p1.Glob=void 0;var mut=Kc(),f1=$oe(),_ut=require("url"),gut=wF(),d1=qoe(),yut=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",RF=class{static{s(this,"Glob")}absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(t,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=(0,_ut.fileURLToPath)(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(c=>c.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(c=>c.includes("/")?c:`./**/${c}`)}if(this.pattern=t,this.platform=r.platform||yut,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let c=r.platform==="win32"?f1.PathScurryWin32:r.platform==="darwin"?f1.PathScurryDarwin:r.platform?f1.PathScurryPosix:f1.PathScurry;this.scurry=new c(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",i={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},o=this.pattern.map(c=>new mut.Minimatch(c,i)),[a,u]=o.reduce((c,l)=>(c[0].push(...l.set),c[1].push(...l.globParts),c),[[],[]]);this.patterns=a.map((c,l)=>{let f=u[l];if(!f)throw new Error("invalid pattern object");return new gut.Pattern(c,f,0,this.platform)})}async walk(){return[...await new d1.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walk()]}walkSync(){return[...new d1.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walkSync()]}stream(){return new d1.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).stream()}streamSync(){return new d1.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};p1.Glob=RF});var $F=h(h1=>{"use strict";Object.defineProperty(h1,"__esModule",{value:!0});h1.hasMagic=void 0;var Eut=Kc(),but=s((e,t={})=>{Array.isArray(e)||(e=[e]);for(let r of e)if(new Eut.Minimatch(r,t).hasMagic())return!0;return!1},"hasMagic");h1.hasMagic=but});var Goe=h(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.glob=Fe.hasMagic=Fe.Glob=Fe.unescape=Fe.escape=Fe.sync=Fe.iterate=Fe.iterateSync=Fe.stream=Fe.streamSync=Fe.globIterate=Fe.globIterateSync=Fe.globSync=Fe.globStream=Fe.globStreamSync=void 0;var Foe=Kc(),qd=CF(),Sut=$F();function BE(e,t={}){return new qd.Glob(e,t).streamSync()}s(BE,"globStreamSync");Fe.globStreamSync=BE;function DF(e,t={}){return new qd.Glob(e,t).stream()}s(DF,"globStream");Fe.globStream=DF;function LF(e,t={}){return new qd.Glob(e,t).walkSync()}s(LF,"globSync");Fe.globSync=LF;async function koe(e,t={}){return new qd.Glob(e,t).walk()}s(koe,"glob_");function GE(e,t={}){return new qd.Glob(e,t).iterateSync()}s(GE,"globIterateSync");Fe.globIterateSync=GE;function jF(e,t={}){return new qd.Glob(e,t).iterate()}s(jF,"globIterate");Fe.globIterate=jF;Fe.streamSync=BE;Fe.stream=Object.assign(DF,{sync:BE});Fe.iterateSync=GE;Fe.iterate=Object.assign(jF,{sync:GE});Fe.sync=Object.assign(LF,{stream:BE,iterate:GE});var Boe=Kc();Object.defineProperty(Fe,"escape",{enumerable:!0,get:function(){return Boe.escape}});Object.defineProperty(Fe,"unescape",{enumerable:!0,get:function(){return Boe.unescape}});var vut=CF();Object.defineProperty(Fe,"Glob",{enumerable:!0,get:function(){return vut.Glob}});var Out=$F();Object.defineProperty(Fe,"hasMagic",{enumerable:!0,get:function(){return Out.hasMagic}});Fe.glob=Object.assign(koe,{glob:koe,globSync:LF,sync:Fe.sync,globStream:DF,stream:Fe.stream,globStreamSync:BE,streamSync:Fe.streamSync,globIterate:jF,iterate:Fe.iterate,globIterateSync:GE,iterateSync:Fe.iterateSync,Glob:qd.Glob,hasMagic:Sut.hasMagic,escape:Foe.escape,unescape:Foe.unescape});Fe.glob.glob=Fe.glob});var Koe=h(Bm=>{"use strict";var MF=Bm&&Bm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bm,"__esModule",{value:!0});Bm.lookupFiles=void 0;var Put=xm(),Voe=MF(Goe()),m1=MF(require("fs")),zoe=MF(require("path")),wut=s(e=>zoe.default.basename(e).startsWith("."),"isHiddenOnUnix"),Iut=s((e,t=[])=>t.map(r=>r.startsWith(".")?r:`.${r}`).some(r=>e.endsWith(r)),"hasMatchingExtname");function Hoe(e,t=[],r=!1){let n=[],i;if(!m1.default.existsSync(e)){let o;if(Voe.default.hasMagic(e))o=e;else{let a=t.map(u=>u.startsWith(".")?u:`.${u}`).join("|");o=`${e}+(${a})`,Put.logger.debug("looking for files using glob pattern: %s",o)}if(n.push(...Voe.default.sync(o,{nodir:!0})),!n.length)throw Error(`Cannot find any files matching pattern "${e}"`);return n}try{if(i=m1.default.statSync(e),i.isFile())return[e]}catch{return[]}return m1.default.readdirSync(e).forEach(o=>{let a=zoe.default.join(e,o),u;try{if(u=m1.default.statSync(a),u.isDirectory()){r&&n.push(...Hoe(a,t,r));return}}catch{return}if(!t.length)throw Error(`Argument '${t}' required when argument '${e}' is a directory`);!u.isFile()||!Iut(a,t)||wut(a)||n.push(a)}),n}s(Hoe,"lookupFiles");Bm.lookupFiles=Hoe});var Woe=h(Vm=>{"use strict";var VE=Vm&&Vm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vm,"__esModule",{value:!0});Vm.openApiRoutesPlugin=void 0;var UF=Gf(),Tut=Dne(),xF=VE(_n()),qF=VE(require("fs/promises")),Io=VE(require("path")),FF=kt(),Nut=VE(Xs()),Aut=VE(mn()),Rut=Koe(),Gm="open-api-routes-plugin",_1="open-api-routes-json";function Cut(e){return{name:"open-api-routes-plugin",setup(t){t.onResolve({filter:/routes.json$/},r=>({watchFiles:[...(0,Rut.lookupFiles)(Io.default.join(e.sourceDirectory,FF.USER_CONFIG_DIR_NAME),[".oas.json"],!0),Io.default.join(e.sourceDirectory,FF.USER_CONFIG_DIR_NAME,FF.POLICIES_CONFIG_FILE)],namespace:_1,path:Io.default.isAbsolute(r.path)?r.path:Io.default.join(r.resolveDir,r.path),pluginName:Gm})),t.onResolve({filter:/^\.\.\/modules\/.*/,namespace:_1},async r=>{let n=Io.default.join(r.resolveDir,`${r.path}.ts`);if(!await xF.default.fileExists(n)){let i=`$import(.${r.path.replace(/^../,"")})`,o=Io.default.resolve(e.sourceDirectory,"config"),a=await(0,UF.getOpenApiFilesByAlphabetical)(o),u=await(0,UF.getRouteLocationByValue)(a[0],i,"Update your route configuration to use code from the 'modules' folder");return{errors:[{id:"route-build-error",text:`Invalid handler reference in routes.json. Unable to resolve reference to '${i}' from routes.json`,location:u,detail:"RouteReferenceError",pluginName:Gm}],namespace:_1,path:r.path,pluginName:Gm}}}),t.onLoad({filter:/.*/,namespace:_1},async r=>Aut.default.timeFn("Generating route.json data",async()=>{let n=Io.default.resolve(e.sourceDirectory,"config"),i=await(0,UF.getOpenApiFilesByAlphabetical)(n),o=await Promise.all(i.map(async l=>({content:await qF.default.readFile(l,"utf-8"),fileName:l}))),a=Io.default.resolve(n,"policies.json");if(!await xF.default.fileExists(a))return{errors:[{text:"The project must include a policies file ('/config/policies.json')",detail:"OASPoliciesFileMissing",pluginName:Gm,location:{line:0,column:0,file:"/config/policies.json"}}],pluginName:Gm};let u={content:await qF.default.readFile(a,"utf-8"),fileName:a},c=await(0,Tut.compileRoutes)(o,u);if(Nut.default.DEBUG_BUILD_MODE&&c.content){let l=Io.default.join(e.sourceDirectory,"dist"),f=Io.default.resolve(l,"routes.js");await xF.default.mkdirForFilePathIfNotExits(f),await qF.default.writeFile(f,c.content,"utf-8")}return{contents:c.content,errors:c.errors,pluginName:Gm,resolveDir:Io.default.dirname(r.path),watchFiles:[r.path]}}))}}}s(Cut,"openApiRoutesPlugin");Vm.openApiRoutesPlugin=Cut});var tae=h(Xc=>{"use strict";var zE=Xc&&Xc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xc,"__esModule",{value:!0});Xc.generateRawRouteSource=Xc.rawRoutePlugin=void 0;var Hm=Gf(),Xoe=require("@zuplo/runtime/internal"),Yoe=zE(_n()),Zoe=zE(require("fs/promises")),zm=zE(require("path")),$ut=zE(require("prettier")),Dut=kt(),Lut=zE(Xs()),kF="raw-route-plugin",Joe="raw-route";function jut(e){return{name:"raw-route-plugin",setup(t){t.onResolve({filter:/raw.json$/},r=>({namespace:Joe,path:r.path,pluginName:kF})),t.onLoad({filter:/.*/,namespace:Joe},async r=>{let n=zm.default.resolve(e.sourceDirectory,Dut.USER_CONFIG_DIR_NAME);if(!await Yoe.default.dirExists(n))return{loader:"js",resolveDir:zm.default.dirname(r.path),pluginName:kF};let i=await(0,Hm.getOpenApiFilesByAlphabetical)(n),o=await Qoe({oasFiles:i,sourceDirectory:e.sourceDirectory,logger:e.logger});if(Lut.default.DEBUG_BUILD_MODE&&o){let a=zm.default.join(e.sourceDirectory,"dist"),u=zm.default.resolve(a,"raw-routes.js");await Yoe.default.mkdirForFilePathIfNotExits(u);let c=await $ut.default.format(o,{parser:"babel"});await Zoe.default.writeFile(u,c,"utf-8")}return{contents:o,loader:"js",resolveDir:zm.default.dirname(r.path),pluginName:kF}})}}}s(jut,"rawRoutePlugin");Xc.rawRoutePlugin=jut;async function Qoe({oasFiles:e,sourceDirectory:t,logger:r}){let n=[],i=[],o=[],a=new Hm.RefParser(t,r);n.push("const rawRouteData = {");for(let c of e){let l=await Zoe.default.readFile(c,"utf-8"),f=zm.default.basename(c,".oas.json"),d=JSON.parse(l),_=await a.resolve(c),m=d.paths,g=[],y=new Map;for(let b in m){let E=m[b];for(let v in E){let{description:O,...P}=E[v],I=(0,Xoe.getRawOperationDataIdentifierName)(f,b,v);o.push(Uut(c,f,I,P,_,g,y))}}i.push(Mut(c,f,_,g,y))}return n.push(o.join(",")),n.push("};"),n.push("export default rawRouteData;"),i.join(`
297
297
  `)+n.join(`
298
298
  `)}s(Qoe,"generateRawRouteSource");Xc.generateRawRouteSource=Qoe;function Mut(e,t,r,n,i){let o=[];for(let u=0;u<n.length;u++){let c=eae(t,u);o.push(`const ${c} = {`);let l=r.get(n.at(u));o.push(g1((0,Hm.getFilePathNameFromRefName)(n.at(u)),t,l,r,n,i)),o.push("};")}return o.join(`
299
299
  `)}s(Mut,"generateRefs");function Uut(e,t,r,n,i,o,a){let u=[];u.push(`${r}: {`);let c=g1(e,t,n,i,o,a);return u.push(c),u.push("}"),u.join(`
300
300
  `)}s(Uut,"getJsonEntry");function g1(e,t,r,n,i,o){let a=[];for(let u in r){let c=r[u];if(u==="$ref")return(0,Hm.chaseRefs)(e,t,(0,Hm.getFullyQualifiedRefName)(e,c),n,i,o),`$REF:${eae(t,o.get((0,Hm.getFullyQualifiedRefName)(e,c)))}`;switch(typeof c){case"string":{a.push(`"${u}": ${JSON.stringify(c)},`);break}case"number":case"boolean":{a.push(`"${u}":${c},`);break}default:if(Array.isArray(c))a.push(`"${u}":[`),c.forEach(l=>{if(typeof l=="object"){let f=g1(e,t,l,n,i,o);if(f.startsWith("$REF")){let d=f.split(":")[1];a.push(`${d},`)}else a.push("{"),a.push(f),a.push("},")}else a.push(`${JSON.stringify(l)},`)}),a.push("],");else{let l=g1(e,t,c,n,i,o);if(l.startsWith("$REF")){let f=l.split(":")[1];a.push(`${u}: ${f},`)}else a.push(`"${u}":{`),a.push(l),a.push("},")}}}return a.join(`
301
- `)}s(g1,"processNode");function eae(e,t){return(0,Xoe.sanitizedIdentifierName)(e)+`_refsData_${t}`}s(eae,"getRefIdentifierName")});var nae=h(Km=>{"use strict";var E1=Km&&Km.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Km,"__esModule",{value:!0});Km.runtimeConfigPlugin=void 0;var xut=E1(_n()),qut=E1(require("fs/promises")),BF=E1(require("path")),Fut=E1(mn()),y1="runtime-config",rae="runtime-config-plugin";function kut(){return{name:y1,setup(e){e.onResolve({filter:/^\.\.\/modules\/zuplo.runtime.ts$/},t=>({namespace:rae,path:BF.default.isAbsolute(t.path)?t.path:BF.default.join(t.resolveDir,t.path),pluginName:y1})),e.onLoad({filter:/.*/,namespace:rae},async t=>Fut.default.timeFn("Generating zuplo.runtime.ts data",async()=>{let r="export const runtimeInit = undefined;",n=[];return await xut.default.fileExists(t.path)?(r=await qut.default.readFile(t.path,"utf-8"),{contents:r,loader:"ts",resolveDir:BF.default.dirname(t.path),errors:n,pluginName:y1,watchFiles:[t.path]}):{contents:r,loader:"ts",errors:n,pluginName:y1}}))}}}s(kut,"runtimeConfigPlugin");Km.runtimeConfigPlugin=kut});var cae=h(Ms=>{"use strict";var Fd=Ms&&Ms.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ms,"__esModule",{value:!0});Ms.isPolicyPresentInOperation=Ms.getPolicyNamesReferencingPolicyHandlers=Ms.schemaValidationSource=Ms.schemaValidationPlugin=void 0;var Wm=Gf(),HE=require("@zuplo/runtime/internal"),iae=Fd(_n()),But=Fd(cU()),Gut=Fd(lU()),b1=Fd(require("fs/promises")),Zc=Fd(require("path")),Vut=Fd(require("prettier")),GF=kt(),zut=Fd(Xs()),VF="schema-validation-plugin",sae="schema-validation",Hut="module.exports = {}";function Kut(e){return{name:"schema-validation-plugin",setup(t){t.onResolve({filter:/ajv-schema.json$/},r=>({namespace:sae,path:r.path,pluginName:VF})),t.onLoad({filter:/.*/,namespace:sae},async r=>{let n=Zc.default.resolve(e.sourceDirectory,GF.USER_CONFIG_DIR_NAME,"policies.json");if(!e.isOpenApiBased||!await iae.default.fileExists(n))return{contents:Hut,loader:"js",resolveDir:Zc.default.dirname(r.path),pluginName:VF};let i=await Wut(e.sourceDirectory),o=Zc.default.resolve(e.sourceDirectory,GF.USER_CONFIG_DIR_NAME),a=await(0,Wm.getOpenApiFilesByAlphabetical)(o),u=await Jut(a,i),c=await oae({oasFiles:a,routesWithSchemaValidation:u,sourceDirectory:e.sourceDirectory,logger:e.logger});if(zut.default.DEBUG_BUILD_MODE&&c){let l=Zc.default.join(e.sourceDirectory,GF.BUILD_OUTPUT_DIR),f=Zc.default.resolve(l,"schema-validation.js");await iae.default.mkdirForFilePathIfNotExits(f);let d=await Vut.default.format(c,{parser:"babel"});await b1.default.writeFile(f,d,"utf-8")}return{contents:c,loader:"js",resolveDir:Zc.default.dirname(r.path),pluginName:VF}})}}}s(Kut,"schemaValidationPlugin");Ms.schemaValidationPlugin=Kut;async function oae({oasFiles:e,routesWithSchemaValidation:t,sourceDirectory:r,logger:n}){let i="",o=new Wm.RefParser(r,n);if(t.length===0)return i;let a=new But.default({code:{source:!0},allErrors:!0,strict:!1,verbose:!0,meta:!0});for(let u of e){let c=await b1.default.readFile(u,"utf-8"),l=Zc.default.basename(u,".oas.json"),f=t.filter(y=>y.fileName===l),d=await o.resolve(u),_=JSON.parse(c),m=[],g=new Map;f.forEach(y=>{let b=_.paths[y.path][y.method];if(b.requestBody){let E;if(b.requestBody.$ref){let S=b.requestBody.$ref;E=d.get(S)?.content}else b.requestBody.content&&(E=b.requestBody.content);if(E)for(let S in E){let O=E[S].schema,P=(0,HE.getIdForRequestBodySchema)(y.path,y.method,S);O.$id=P,a.addSchema(O),zF(O,u,l,a,d,m,g)}}if(b.parameters)for(let E of b.parameters){let S=E.$ref?d.get(E.$ref):E,O=S.schema.$ref?d.get(S.schema.$ref):S.schema,P=(0,HE.getIdForParameterSchema)(y.path,y.method,S.in,S.name);O.$id=P,a.addSchema(O),zF(S,u,l,a,d,m,g)}});for(let y of m){let b=d.get(y),E=(0,HE.getIdForRefSchema)(l,y);a.addSchema(b,E)}}return i=(0,Gut.default)(a),i}s(oae,"schemaValidationSource");Ms.schemaValidationSource=oae;function zF(e,t,r,n,i,o,a){for(let u in e){let c=e[u];if(u==="$ref"){let l=(0,HE.getIdForRefSchema)(r,(0,Wm.getFullyQualifiedRefName)(t,c));e[u]=l,(0,Wm.chaseRefs)(t,r,(0,Wm.getFullyQualifiedRefName)(t,c),i,o,a,(f,d)=>(0,HE.getIdForRefSchema)(f,(0,Wm.getFullyQualifiedRefName)(t,d)))}else typeof c=="object"&&zF(c,t,r,n,i,o,a)}}s(zF,"addRefsToSchema");async function Wut(e){let t=new Set(["RequestValidationInboundPolicy"]),r=await b1.default.readFile(`${e}/config/policies.json`,"utf-8"),n=JSON.parse(r);return aae(n,t)}s(Wut,"getPolicyNamesUsingSchemaValidationPolicies");function aae(e,t){let r=new Set;e.policies?.forEach(i=>{i.handler?.export&&t.has(i.handler.export)&&i.handler.module==="$import(@zuplo/runtime)"&&r.add(i.name)});let n=Yut(e,r);return new Set([...r,...n])}s(aae,"getPolicyNamesReferencingPolicyHandlers");Ms.getPolicyNamesReferencingPolicyHandlers=aae;function Yut(e,t){let r=new Set;return e.policies?.forEach(n=>{n.handler?.export==="CompositeInboundPolicy"&&n.handler?.options?.policies?.forEach(i=>{t.has(i)&&r.add(n.name)})}),r}s(Yut,"getCompositePoliciesContainingPolicy");function uae(e,t){if(!e["x-zuplo-route"]||!e["x-zuplo-route"].policies)return!1;let r=e["x-zuplo-route"].policies.inbound;if(r){for(let i of r)if(t.has(i))return!0}let n=e["x-zuplo-route"].policies.outbound;if(n){for(let i of n)if(t.has(i))return!0}return!1}s(uae,"isPolicyPresentInOperation");Ms.isPolicyPresentInOperation=uae;async function Jut(e,t){let r=[];for(let n of e){let i=await b1.default.readFile(n,"utf-8"),a=JSON.parse(i).paths;for(let u in a){let c=a[u];for(let l in c){let f=c[l];uae(f,t)&&r.push({fileName:Zc.default.basename(n,".oas.json"),path:u,method:l})}}}return r}s(Jut,"getRoutesContainingPolicies")});var HF=h(Qc=>{"use strict";var Xut=Qc&&Qc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qc,"__esModule",{value:!0});Qc.BUILD_CONDITIONS=void 0;var Zut=A9(),S1=Xut(require("path")),Qut=hy(),ect=R9(),tct=L9(),rct=x9(),nct=JX(),ict=QX(),sct=Woe(),oct=tae(),act=nae(),uct=cae(),cct=(0,Zut.debug)("zuplo:core:build");Qc.BUILD_CONDITIONS=["workerd","worker","browser"];var lae=[...process.env.GLOBAL_MODULE_LOCATION?[process.env.GLOBAL_MODULE_LOCATION]:[],S1.default.resolve(__dirname,"..","..","..","node_modules"),S1.default.resolve(__dirname,"..","..","..","..","..","node_modules"),...require.main?.paths??[]];async function lct({dev:e=!1,targetPlatform:t,systemDirectory:r,outputDirectory:n,sourceDirectory:i,logger:o,flags:a}){let u=S1.default.join(r,(0,Qut.getBuildEntry)(t));cct(`Building with node paths: ${lae.join(", ")}`);let c=e===!1?{minify:!0}:{minify:!1,keepNames:!0,metafile:!0},l={platform:"browser",target:"es2022",outfile:S1.default.join(n,"worker.js")};return{format:a?.esmWorker===!0?"esm":"iife",banner:{js:`'use strict';
302
- `},nodePaths:lae,entryPoints:[u],...l,sourcemap:"linked",legalComments:"linked",treeShaking:!0,bundle:!0,...c,external:[],logLevel:"silent",conditions:Qc.BUILD_CONDITIONS,plugins:[(0,rct.environmentPlugin)({sourceDirectory:i,targetPlatform:t}),(0,ect.blockRemoteModulePlugin)({logger:o}),(0,sct.openApiRoutesPlugin)({sourceDirectory:i,outputDirectory:n}),(0,oct.rawRoutePlugin)({sourceDirectory:i,targetPlatform:t,logger:o}),(0,uct.schemaValidationPlugin)({sourceDirectory:i,logger:o,isOpenApiBased:!0}),(0,act.runtimeConfigPlugin)(),(0,tct.devPortalConfigPlugin)({sourceDirectory:i}),(0,nct.jsonSchemaPlugin)({sourceDirectory:i,outputDirectory:n}),(0,ict.nodejsCompatPlugin)({nodeCompatEnabled:a?.esmWorker===!0,sourceDirectory:i})]}}s(lct,"getBaseESBuildConfig");Qc.default=lct});var pae=h(Us=>{"use strict";var fct=Us&&Us.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),dct=Us&&Us.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),pct=Us&&Us.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&fct(t,e,r);return dct(t,e),t},dae=Us&&Us.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Us,"__esModule",{value:!0});Us.getRunEsBuildPlugin=void 0;var hct=Gf(),fae=Yo(),mct=pct(require("esbuild")),_ct=dae(mn()),gct=$P(),yct=dae(HF()),KF=hy(),Ect=s(function(e){return s(async function({systemDirectory:r,outputDirectory:n,sourceDirectory:i,dev:o,targetPlatform:a,generateSourceMaps:u,buildId:c,logger:l,config:f}){return _ct.default.timeFn("Running esbuild",async()=>{l.info(`Running build for platform ${a}, build_id: ${c}`);let d=await(0,yct.default)({systemDirectory:r,outputDirectory:n,targetPlatform:a,generateSourceMaps:u,sourceDirectory:i,dev:o,logger:l,flags:f.flags}),_,m=new Date;try{if(!await(0,hct.oasFileInProject)(i))throw new Error("Failed to build project because no open-api file was found on the 'config' folder");_=await mct.build(d)}catch(y){if(l.error(y),y.errors||y.warnings)_=y;else if(y.message.includes("Failed to build project because no open-api file was found on the 'config' folder"))_={warnings:[],errors:[{id:"missing-open-api-file",text:"Failed to build project because no open-api file was found on the 'config' folder",pluginName:KF.ESBUILD_PLUGIN_NAME,location:null,notes:[],detail:"Failed to build project because no open-api file was found on the 'config' folder"}],outputFiles:void 0,metafile:void 0,mangleCache:void 0};else throw y}let g=new Date;if(e(new gct.CompilerResult(_,{endBuildTime:g,startBuildTime:m,buildId:c??""})),_.errors.length>0){_.errors.length>1&&(_.errors.length=1);let y=_.errors[0];l.debug(y)}return{warnings:[..._.warnings.map(y=>({message:y.text,pluginName:KF.ESBUILD_PLUGIN_NAME,severity:fae.WARNING_SEVERITY}))],errors:[..._.errors.map(y=>({message:y.text,pluginName:KF.ESBUILD_PLUGIN_NAME,severity:fae.ERROR_SEVERITY}))]}})},"runEsbuild")},"getRunEsBuildPlugin");Us.getRunEsBuildPlugin=Ect});var YF=h(Jm=>{"use strict";var mae=Jm&&Jm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jm,"__esModule",{value:!0});Jm.build=void 0;var Ym=Yo(),bct=require("crypto"),Sct=require("fs"),KE=mae(require("path")),hae=kt(),vct=rc(),Oct=mae(mn()),Pct=Bz(),wct=th(),Ict=zz(),Tct=Hz(),Nct=Kz(),Act=Zz(),Rct=Qz(),Cct=nH(),$ct=p9(),Dct=m9(),Lct=pae(),WF=hy(),v1;try{let e=(0,Sct.readFileSync)(KE.default.resolve(__dirname,"../../package.json"),"utf-8");v1=JSON.parse(e).version}catch{v1="0.0.0"}async function jct({sourceDirectory:e,dev:t,targetPlatform:r,generateSourceMaps:n=!1,noCompile:i=!1,deploymentName:o=KE.default.basename(e),logger:a,publicZuploEnvironmentVariables:u={},entitlements:c,projectId:l,customDomain:f,environmentType:d,postBuildTasks:_}){let m=(0,bct.randomUUID)(),g=a.child({buildId:m});return Oct.default.timeFn(`Run Build for platform: ${r}, build_id: ${m}`,async()=>{let y=await(0,Pct.getZuploConfig)(e),b=KE.default.join(e,hae.BUILD_OUTPUT_DIR),E;if("errors"in y)E={status:"Failed",flags:void 0,compatibilityDate:void 0,runtimeVersion:v1,outputPath:b,buildTaskResult:{buildTime:"",buildTimeMs:0,status:Ym.FAILURE_STATUS,buildId:m,warnings:[],errors:y.errors}};else{let O={dev:t,targetPlatform:r,generateSourceMaps:n,deploymentName:o,sourceDirectory:e,outputDirectory:b,systemDirectory:KE.default.join(e,hae.GENERATED_SOURCE_DIR_NAME),buildId:m,logger:g,config:y.config,publicZuploEnvironmentVariables:u,projectId:l,entitlements:c,customDomain:f,environmentType:d},P=[];P.push(Ict.cleanOutput),P.push(Tct.createSystemDir),P.push(Nct.checkForDeprecations),P.push(Act.generateBuildData),P.push(Cct.validateDevPortalJSON),P.push($ct.validateOpenAPIFiles),r==wct.TargetPlatform.Worker&&P.push(Rct.generateWorker);let I,j=s(Q=>{I=Q},"compileCallback");i||P.push((0,Lct.getRunEsBuildPlugin)(j)),P.push(Dct.verifyWorkerOutput),_&&P.push(..._);let x=await(0,vct.runPlugins)(P,O),H=x.errors.length>0?Ym.FAILURE_STATUS:x.warnings.length>0?Ym.WARNING_STATUS:Ym.GOOD_STATUS;E={status:H==="Failed"||I===void 0||I.status==="Failed"?"Failed":H==="Warnings"||I.status==="Warnings"?"Warnings":"Good",compatibilityDate:y.config.compatibilityDate,runtimeVersion:v1,outputPath:b,compilerResult:I,buildTaskResult:{buildTime:"",buildTimeMs:0,status:H,buildId:m,warnings:x.warnings,errors:x.errors},flags:y.config.flags}}if(E.buildTaskResult.warnings.length>0){E.buildTaskResult.warnings.forEach(P=>{g.warn(P)});let O=E.buildTaskResult.warnings.filter(P=>P.pluginName!=="runEsbuild"&&P.pluginName!==WF.ESBUILD_PLUGIN_NAME);O.length>0&&(E.buildTaskResult.warnings=O),E.buildTaskResult.status=Ym.WARNING_STATUS}if(E.buildTaskResult.errors.length>0){E.buildTaskResult.errors.forEach(P=>{g.error(P)});let O=E.buildTaskResult.errors.filter(P=>P.pluginName!=="runEsbuild"&&P.pluginName!==WF.ESBUILD_PLUGIN_NAME);O.length>0&&(E.buildTaskResult.errors=O),E.buildTaskResult.status=Ym.FAILURE_STATUS}if(g.debug(`Build ${E.compilerResult?.buildId??m} completed ${i?"on watch mode":"with compiler status "+E.compilerResult?.status} and build task status ${E.buildTaskResult.status}`),E.compilerResult){let{metafile:O,...P}=E.compilerResult;g.debug(`Compiler results for build ${E.compilerResult?.buildId??m}`,P)}g.debug(`Build task results for build ${E.buildTaskResult?.buildId??m}`,E.buildTaskResult);let S=KE.default.basename(e);return(0,WF.formatBuildResult)(E,S,g)})}s(jct,"build");Jm.build=jct});var P1=h(xs=>{"use strict";var Mct=xs&&xs.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Uct=xs&&xs.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),xct=xs&&xs.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Mct(t,e,r);return Uct(t,e),t},O1=xs&&xs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xs,"__esModule",{value:!0});xs.BuildWatcher=void 0;var _ae=Yo(),qct=O1(require("chokidar")),Fct=xct(require("esbuild")),gae=require("crypto"),kct=O1(require("events")),WE=O1(require("path")),yae=kt(),Bct=YF(),Eae=$P(),Gct=O1(HF()),bae=hy(),JF=class extends kct.default{static{s(this,"WatchEmitter")}},XF=class{static{s(this,"BuildWatcher")}esbuildContext;emitter=new JF;envFilesWatcher;outputDirectory;sourceDirectory;dev;targetPlatform;generateSourceMaps;logger;publicZuploEnvironmentVariables;projectName;constructor({sourceDirectory:t,dev:r,targetPlatform:n,generateSourceMaps:i,logger:o,publicZuploEnvironmentVariables:a={}}){this.sourceDirectory=t,this.dev=r,this.targetPlatform=n,this.outputDirectory=WE.default.join(t,yae.BUILD_OUTPUT_DIR),this.generateSourceMaps=i??!1,this.logger=o,this.publicZuploEnvironmentVariables=a,this.projectName=WE.default.basename(t),this.envFilesWatcher=qct.default.watch([WE.default.join(t,".env"),WE.default.join(t,".env.zuplo")])}watchEnvFiles(){this.envFilesWatcher.on("change",async()=>{this.emitter.emit("reload",null,null)}),this.envFilesWatcher.on("add",async()=>{this.emitter.emit("reload",null,null)}),this.envFilesWatcher.on("unlink",async()=>{this.emitter.emit("reload",null,null)})}onReload=t=>{this.emitter.on("reload",t)};async start(){let{sourceDirectory:t}=this;if(this.esbuildContext!==void 0)throw new Error("Watcher cannot be started more than once");let r=await(0,Bct.build)({sourceDirectory:t,noCompile:!0,dev:this.dev,targetPlatform:this.targetPlatform,generateSourceMaps:this.generateSourceMaps,publicZuploEnvironmentVariables:this.publicZuploEnvironmentVariables,logger:this.logger}),n=await(0,Gct.default)({systemDirectory:WE.default.join(t,yae.GENERATED_SOURCE_DIR_NAME),outputDirectory:this.outputDirectory,targetPlatform:this.targetPlatform,sourceDirectory:t,dev:this.dev,generateSourceMaps:this.generateSourceMaps,logger:this.logger,flags:r.flags}),i=this;n.plugins?.push({name:"on-end",setup(o){o.onEnd(a=>{i.logger.debug("Watcher (build) reloaded");let u;if(a)if(u=new Eae.CompilerResult(a),u.errors.length>0){let c={status:"Failed",runtimeVersion:"0.0.0",buildTaskResult:{buildTime:"",buildTimeMs:0,status:_ae.FAILURE_STATUS,buildId:(0,gae.randomUUID)(),warnings:[],errors:[]}};c.compilerResult=u,(0,bae.formatBuildResult)(c,i.projectName,i.logger),i.logger.error(c.compilerResult.errors,"Build errors")}else i.logger.debug(`Successfully rebuilt watched project. Build id ${u.buildId}`);i.emitter.emit("reload",r,null,u)})}}),this.esbuildContext=await Fct.context(n);try{let o=await this.esbuildContext.rebuild();if(o.errors.length>0){let a={status:"Failed",runtimeVersion:"0.0.0",buildTaskResult:{buildTime:"",buildTimeMs:0,status:_ae.FAILURE_STATUS,buildId:(0,gae.randomUUID)(),warnings:[],errors:[]}};a.compilerResult=new Eae.CompilerResult(o),(0,bae.formatBuildResult)(a,this.projectName,this.logger),this.logger.error(a.compilerResult.errors,"Build errors")}}catch(o){throw await this.close(),o}await this.esbuildContext.watch()}async close(){try{await this.envFilesWatcher.close(),this.esbuildContext&&(await this.esbuildContext.dispose(),this.logger.debug("ESBuild watcher closed"))}catch(t){this.logger.error(t)}}};xs.BuildWatcher=XF});var ZF=h(w1=>{"use strict";Object.defineProperty(w1,"__esModule",{value:!0});w1.HttpStatusCode=void 0;var Sae;(function(e){e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.ALREADY_REPORTED=208]="ALREADY_REPORTED",e[e.IM_USED=226]="IM_USED",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.FOUND=302]="FOUND",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.SWITCH_PROXY=306]="SWITCH_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",e[e.URI_TOO_LONG=414]="URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.LOOP_DETECTED=508]="LOOP_DETECTED",e[e.NOT_EXTENDED=510]="NOT_EXTENDED",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED"})(Sae||(w1.HttpStatusCode=Sae={}))});var vae=h(I1=>{"use strict";Object.defineProperty(I1,"__esModule",{value:!0});I1.getSourceControlProviderLabel=void 0;function Vct(e){let t="";switch(e){case"GITLAB":t="GitLab";break;case"GITHUB":t="GitHub";break;case"BITBUCKET":t="BitBucket";break;default:t=e;break}return t}s(Vct,"getSourceControlProviderLabel");I1.getSourceControlProviderLabel=Vct});var Pae=h(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.DEPLOYMENT_NO_ACCESS=v.INVALID_SOURCE_REPO_URL=v.SHARED_PROJECT_PREVIOUSLY_INITIALIZED=v.PROJECT_MUST_HAVE_ONE_MEMBER=v.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS=v.PROJECT_MEMBER_ALREADY_EXISTS=v.PROJECT_MEMBER_NOT_FOUND=v.INVALID_TEMPLATE_REPOSITORY=v.INCORRECT_PROJECT_TEMPLATE=v.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS=v.PROJECT_NOT_FOUND=v.PROJECT_NOT_FOUND_FOR_SOURCE_REPO=v.PROJECT_SHARING_DISABLED_ON_ACCOUNT=v.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED=v.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED=v.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE=v.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER=v.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND=v.ACCOUNT_MEMBER_INVITE_INVALID=v.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST=v.ACCOUNT_MEMBER_DOES_NOT_EXIST=v.ACCOUNT_MEMBER_INFO_MISSING=v.ACCOUNT_MEMBER_ALREADY_EXISTS=v.ACCOUNT_UPDATE_INFO_MISSING=v.ACCOUNT_INFO_MISSING=v.ACCOUNT_DOES_NOT_EXISTS=v.INVALID_ACCOUNT_LABEL_ENDING=v.INVALID_ACCOUNT_NAME_ENDING=v.ACCOUNT_NAME_ALREADY_IN_USE=v.INVALID_ACCOUNT_LABEL=v.INVALID_ACCOUNT_NAME=v.ACCOUNT_LABEL_LENGTH_LIMIT_REACHED=v.ACCOUNT_NAME_LENGTH_LIMIT_REACHED=v.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD=v.ACCOUNT_NAME_USES_RESERVED_KEYWORD=v.ACCOUNT_ALREADY_EXISTS=v.ACCOUNT_NOT_FOUND=v.USER_IS_NOT_SERVICE_ACCOUNT=v.USER_REMOVE_NOT_MEMBER_ACCOUNT=v.USER_HAS_NO_ACCESS_TO_ACCOUNT=v.USER_DETAILS_CANNOT_BE_FOUND=v.USER_ALREADY_EXISTS=v.CLIENT_NOT_FOUND=v.FORBIDDEN=v.UNAUTHORIZED=v.METHOD_NOT_ALLOWED=v.NOT_FOUND=v.CONFLICT=v.BAD_REQUEST=v.INTERNAL_SERVER_ERROR=void 0;v.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=v.GITHUB_INTEGRATION_ALREADY_EXISTS=v.FEATURE_FLAGS_NOT_FOUND=v.MAX_ALLOWED_PROJECTS_LIMIT_REACHED=v.PROJECT_ALREADY_HAS_REPO=v.PROJECT_INVALID_NAME=v.FAILED_TO_REVOKE_GH_TOKEN=v.USER_ACCOUNT_NOT_FS_MIGRATED=v.USER_NO_ACCESS_GITLAB_REPO=v.USER_NO_ACCESS_BITBUCKET_REPO=v.GITHUB_APP_CONFIGURATION_NOT_FOUND=v.GITHUB_APP_NO_USER_ACCESS_=v.GITHUB_APP_NO_NAMESPACE_ACCESS=v.GENERIC_GITHUB_BRANCH_INFO_ERROR=v.GITHUB_USER_NO_READ_ACCESS_REPO=v.USER_NO_PULL_ACCESS_GITHUB_REPO=v.USER_NO_ACCESS_GITHUB_REPO=v.PROJECT_SHARING_REQUIRES_GIT_REPO=v.PROJECT_INVALID_GIT_REPO=v.PROJECT_INVALID_GIT_CLONE=v.USER_IS_PROJECT_MEMBER=v.USER_HAS_NO_ACCESS_TO_PROJECT=v.RUNTIME_FLAG_KEY_NOT_VALID=v.RUNTIME_FLAG_NOT_FOUND=v.RUNTIME_FLAG_ALREADY_EXISTS=v.PROJECT_NO_MEMBERS=v.PROJECT_ALREADY_EXISTS=v.SERVICE_CONFIGURATION_FAILED_DECRYPTION=v.WORKING_COPY_SERVICE_NOT_CREATED=v.WORKING_COPY_SERVICE_NOT_DELETED=v.WORKING_COPY_SERVICE_NOT_FOUND=v.SERVICE_CONFIGURATION_NOT_FOUND=v.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE=v.DEPLOYMENT_INCORRECT_STATUS_PAUSE=v.DEPLOYMENT_NOT_WORKING_COPY=v.DEPLOYMENT_LOG_NOT_FOUND=v.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY=v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB=v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT=v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT=v.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED=v.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE=v.DEPLOYMENT_DELETE_ERROR=v.DEPLOYMENT_CANNOT_DELETE_INSTANCE=v.DEPLOYMENT_INVALID_MULTI_PART=v.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART=v.DEPLOYMENT_FILE_DOES_NOT_EXISTS=v.DEPLOYMENT_NOT_FOUND=v.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST=v.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH=void 0;v.DUPLICATE_ENVIRONMENT_VARIABLE=v.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION=v.THIRD_PARTY_APP_CONNECTION_NOT_FOUND=v.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND=v.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR=v.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR=v.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST=v.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR=v.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED=v.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND=v.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION=v.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING=v.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING=v.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS=v.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS=v.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED=v.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS=v.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND=v.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND=v.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE=v.SOURCE_CONTROL_REPO_OPERATION_ERROR=v.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE=v.SOURCE_CONTROL_REPO_NOT_FOUND=v.SOURCE_CONTROL_AUTHENTICATION_FAILED=v.EXTERNAL_SERVICE_GENERIC_ERROR=v.API_USER_NO_ACCESS=v.EXTERNAL_USER_NOT_CONFIGURED=v.EXTERNAL_USER_NO_ACCESS=v.CONSUMER_CANNOT_BE_CREATED=v.CONSUMER_DOES_NOT_EXIST=v.CONSUMER_NO_ACCESS=v.GITLAB_ACCESS_LEVEL_CHECK_FAIL=v.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=v.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=v.GITLAB_DUPLICATE_REPO=v.GITLAB_FAILED_DURING_REPO_CREATION=v.GITLAB_QUERY_USER_INFO_FAILED=v.BITBUCKET_FAILED_DURING_REPO_CREATION=v.BITBUCKET_WORKSPACE_MISCONFIGURATION=v.BITBUCKET_QUERY_USER_INFO_FAILED=v.GITHUB_INTEGRATION_INVALID_REPO=v.GIT_CREATE_PROJECT_WITH_INVALID_REPO=v.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=v.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=v.GITHUB_INTEGRATION_DUPLICATE_REPO=v.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED=v.GITHUB_INTEGRATION_AUTHENTICATION_FAILED=v.GITHUB_INTEGRATION_BRANCH_BEHIND=v.GITHUB_INTEGRATION_NOT_FOUND=v.GITHUB_REPOSITORY_NOT_FOUND=void 0;v.METERING_BUCKET_CREATION_FAILED=v.UNABLE_UPGRADE_PLAN=v.BUCKET_NOT_FOUND=v.BUCKET_API_KEY_SERVICE_CONFLICT=v.DIRECTORY_DELETE_FAILED=v.FILE_DELETE_FAILED=v.CANNOT_DELETE_SOLE_OPEN_API_FILE=v.CANNOT_DELETE_ESSENTIAL_DIRECTORY=v.CANNOT_DELETE_ESSENTIAL_FILE=v.FILE_WRITE_FAILED=v.FILE_RENAME_FAILED=v.FILE_RENAME_FILE_ALREADY_EXISTS=v.FILE_RENAME_CANNOT_CHANGE_EXTENSION=v.FILE_RENAME_PATHS_MATCH=v.DIRECTORY_CREATION_FAILED=v.DIRECTORY_OR_FILE_DOES_NOT_EXIST=v.DIRECTORY_DOES_NOT_EXIST=v.DIRECTORY_ALREADY_EXISTS=v.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=v.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=v.FAILED_DOWNLOAD_FROM_STORAGE=v.CANNOT_FIND_SRC_DIRECTORY=v.CANNOT_READ_PACKAGE_JSON=v.PACKAGE_JSON_NOT_FOUND=v.RUNTIME_VERSION_INCORRECT_FORMAT=v.MIGRATIONS_ONLY_ON_WORKING_COPY=v.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=v.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=v.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR=v.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2=v.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE=v.NO_GLOBAL_SYMBOLS=v.NO_ZUPLO_PREFIXED_VARIABLES=v.NON_EMPTY_TARGETS_REQUIRED=v.CONFLICTING_TYPES=v.OVERLAPPING_TARGETS=v.INVALID_BRANCH_NAME=v.TARGET_BRANCH_ONLY_FOR_PREVIEW=v.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY=v.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE=v.DEPLOYMENT_NAME_MISSING=v.NON_EXISTENT_ENVIRONMENT_VARIABLE=v.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE=v.ENVIRONMENT_VARIABLE_VALIDATION_ERROR=void 0;var A=ZF(),Oae=vae(),zct="https://github.com/apps/zuplo/installations/new";v.INTERNAL_SERVER_ERROR={type:"https://zup.fail/http-status/500",title:"Internal Server Error",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};v.BAD_REQUEST={type:"https://zup.fail/http-status/400",title:"Bad Request",status:A.HttpStatusCode.BAD_REQUEST};v.CONFLICT={type:"https://zup.fail/http-status/409",title:"Conflict",status:A.HttpStatusCode.CONFLICT};v.NOT_FOUND={type:"https://zup.fail/http-status/404",title:"Not Found",status:A.HttpStatusCode.NOT_FOUND};v.METHOD_NOT_ALLOWED={type:"https://zup.fail/http-status/405",title:"Method Not Allowed",status:A.HttpStatusCode.METHOD_NOT_ALLOWED};v.UNAUTHORIZED={type:"https://zup.fail/http-status/401",title:"Unauthorized",status:A.HttpStatusCode.UNAUTHORIZED};v.FORBIDDEN={type:"https://zup.fail/http-status/403",title:"Forbidden",status:A.HttpStatusCode.FORBIDDEN};v.CLIENT_NOT_FOUND={type:"https://zup.fail/client-not-found",title:"Client not found",status:A.HttpStatusCode.NOT_FOUND};v.USER_ALREADY_EXISTS={type:"https://zup.fail/user-already-exists",title:"User already exists",status:A.HttpStatusCode.CONFLICT};v.USER_DETAILS_CANNOT_BE_FOUND={type:"https://zup.fail/user-details-cannot-be-found",title:"User cannot be found",status:A.HttpStatusCode.NOT_FOUND};v.USER_HAS_NO_ACCESS_TO_ACCOUNT={type:"https://zup.fail/user-has-no-access-to-account",title:"Not a member of the account",status:A.HttpStatusCode.UNAUTHORIZED};v.USER_REMOVE_NOT_MEMBER_ACCOUNT={type:"https://zup.fail/removed-user-not-account-member",title:"The user being removed is not a member of the account",status:A.HttpStatusCode.BAD_REQUEST};v.USER_IS_NOT_SERVICE_ACCOUNT={type:"https://zup.fail/user-not-service-account",title:"User is not a service account",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_NOT_FOUND={type:"https://zup.fail/account-not-found",title:"Account not found",status:A.HttpStatusCode.NOT_FOUND};v.ACCOUNT_ALREADY_EXISTS={type:"https://zup.fail/account-already-exists",title:"Account already exists",status:A.HttpStatusCode.CONFLICT};v.ACCOUNT_NAME_USES_RESERVED_KEYWORD={type:"https://zup.fail/account-name-reserved-keyword",title:"The account name can not use reserved keyword 'zuplo'",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD={type:"https://zup.fail/account-use-reserved-keyword",title:"The account name can not start with a reserved keyword",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_NAME_LENGTH_LIMIT_REACHED={type:"https://zup.fail/account-name-length-limit",title:"The account name exceeds the 200 character limit",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_LABEL_LENGTH_LIMIT_REACHED={type:"https://zup.fail/account-label-length-limit",title:"The account label exceeds the 200 character limit",status:A.HttpStatusCode.BAD_REQUEST};v.INVALID_ACCOUNT_NAME={type:"https://zup.fail/invalid-account-name",title:"The account name can only contain lower-cased characters, numbers, dashes and underscores",status:A.HttpStatusCode.BAD_REQUEST};v.INVALID_ACCOUNT_LABEL={type:"https://zup.fail/invalid-account-label",title:"The account label can only contain alpha-numeric characters, spaces, dashes and underscores",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_NAME_ALREADY_IN_USE={type:"https://zup.fail/account-name-in-use",title:"The account name is already taken. Please try again using a different name.",status:A.HttpStatusCode.BAD_REQUEST};v.INVALID_ACCOUNT_NAME_ENDING={type:"https://zup.fail/invalid-account-name-ending",title:"The account name can not end with a dash or underscore character",status:A.HttpStatusCode.BAD_REQUEST};v.INVALID_ACCOUNT_LABEL_ENDING={type:"https://zup.fail/invalid-account-label-ending",title:"The account label can not end with a dash or underscore character",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_DOES_NOT_EXISTS={type:"https://zup.fail/account-does-not-exists",title:"You are not a member of any accounts",status:A.HttpStatusCode.NOT_FOUND};v.ACCOUNT_INFO_MISSING={type:"https://zup.fail/account-info-missing",title:"Account information is required",status:A.HttpStatusCode.NOT_FOUND};v.ACCOUNT_UPDATE_INFO_MISSING={type:"https://zup.fail/account-update-info-missing",title:"Account information is insufficient for this operation.",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/account-member-already-exists",title:"Account member already exists",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_INFO_MISSING={type:"https://zup.fail/account-member-info-missing",title:"Account member information is required",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_DOES_NOT_EXIST={type:"https://zup.fail/account-member-does-not-exists",title:"Account member information cannot be found",status:A.HttpStatusCode.NOT_FOUND};v.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST={type:"https://zup.fail/account-member-invite-does-not-exist",title:"Account member invite cannot be found",status:A.HttpStatusCode.NOT_FOUND};v.ACCOUNT_MEMBER_INVITE_INVALID={type:"https://zup.fail/account-member-invite-invalid",title:"Account member invite is invalid",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND={type:"https://zup.fail/account-member-invite-failed-send",title:"We were not able to send the account member invite. Please try again or contact support.",status:A.HttpStatusCode.BAD_REQUEST};v.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER={type:"https://zup.fail/account-member-cannot-be-invited",title:"The user is already part of the account.",status:A.HttpStatusCode.BAD_REQUEST};v.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE={type:"https://zup.fail/existing-pending-account-member-invites",title:"The user has a pending invitation to this account.",status:A.HttpStatusCode.BAD_REQUEST};v.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED={type:"https://zup.fail/no-multi-account-members",title:"Account is not configured for multiple members",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED={type:"https://zup.fail/account-members-limit-reached",title:"This account has reached the limit of users allowed by its current billing plan.",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_SHARING_DISABLED_ON_ACCOUNT={type:"https://zup.fail/project-sharing-disabled-on-account",title:"Project sharing is not enabled on account",status:A.HttpStatusCode.FORBIDDEN};v.PROJECT_NOT_FOUND_FOR_SOURCE_REPO={type:"https://zup.fail/project-not-found-for-source-repo",title:"Project not found for provided repository",status:A.HttpStatusCode.NOT_FOUND};v.PROJECT_NOT_FOUND={type:"https://zup.fail/project-not-found",title:"Project not found",status:A.HttpStatusCode.NOT_FOUND};v.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS={type:"https://zup.fail/project-cannot-be-deleted-protected-deployments-exists",title:"Project cannot be deleted because it has protected deployments",detail:"Project has protected deployments. Make sure to remove the use of custom domains before trying to delete the project.",status:A.HttpStatusCode.FORBIDDEN};v.INCORRECT_PROJECT_TEMPLATE={type:"https://zup.fail/incorrect-project-template",title:"Incorrect project template name",status:A.HttpStatusCode.BAD_REQUEST};var Hct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:`The repository '${e} is not a valid Zuplo template repository`,status:A.HttpStatusCode.FORBIDDEN}),"INVALID_TEMPLATE_REPOSITORY");v.INVALID_TEMPLATE_REPOSITORY=Hct;v.PROJECT_MEMBER_NOT_FOUND={type:"https://zup.fail/project-member-not-found",title:"Project Member not found",status:A.HttpStatusCode.NOT_FOUND};v.PROJECT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/project-member-already-exists",title:"Project Member already exists",status:A.HttpStatusCode.BAD_REQUEST};v.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS={type:"https://zup.fail/cannt-delete-your-own-project-member",title:"Can not delete your own Project Member record",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_MUST_HAVE_ONE_MEMBER={type:"https://zup.fail/project-must-have-one-member",title:"Project must have at least one member",status:A.HttpStatusCode.BAD_REQUEST};v.SHARED_PROJECT_PREVIOUSLY_INITIALIZED={type:"https://zup.fail/project-previously-initialized",title:"Project was previously initialized",status:A.HttpStatusCode.BAD_REQUEST};v.INVALID_SOURCE_REPO_URL={type:"https://zup.fail/invalid-source-repo-url",title:"Project is not connected to source control, a sourceRepoUrl property must be specified and valid",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_NO_ACCESS={type:"https://zup.fail/deployment-no-access",title:"User does not have access to deployment",status:A.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH={type:"https://zup.fail/deployment-branch-does-not-exist",title:"A deployment record cannot be found for the provided branch.",detail:"You can only update a project's default branch to one that has been deployed.",status:A.HttpStatusCode.FORBIDDEN};v.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST={type:"https://zup.fail/default-deployment-does-not-exist",title:"A default deployment record cannot be found for the project.",detail:"You can only update a project's default branch to one that has been deployed.",status:A.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_NOT_FOUND={type:"https://zup.fail/deployment-not-found",title:"Deployment was not found",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_FILE_DOES_NOT_EXISTS={type:"https://zup.fail/deployment-file-does-not-exists",title:"Files were not found",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART={type:"https://zup.fail/deployment-request-is-not-multi-part",title:"Request is not multipart.",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_INVALID_MULTI_PART={type:"https://zup.fail/deployment-invalid-multi-part",title:"Invalid request format. Must be multi-part file upload.",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_CANNOT_DELETE_INSTANCE={type:"https://zup.fail/deployment-cannot-delete-instance",title:"Cannot delete instance of the deployment. Invalid account or project.",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_DELETE_ERROR={type:"https://zup.fail/deployment-delete-error",title:"Error deleting deployment instance.",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE={type:"https://zup.fail/deployment-invalid-environment-to-delete",title:"Invalid environment to delete deployment",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED={type:"https://zup.fail/deployment-is-protected-cannot-be-deleted",title:"Deployment is protected and cannot be deleted",status:A.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid account",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid project name",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid user sub",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY={type:"https://zup.fail/deployment-cannot-be-deleted",title:"Deployment cannot be deleted since is a working copy",status:A.HttpStatusCode.FORBIDDEN};v.DEPLOYMENT_LOG_NOT_FOUND={type:"https://zup.fail/deployment-log-not-found",title:"DeploymentLog was not found",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_NOT_WORKING_COPY={type:"https://zup.fail/deployment-not-working-copy",title:"Deployment is not working copy.",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_INCORRECT_STATUS_PAUSE={type:"https://zup.fail/deployment-incorrect-status-pause",title:"Deployment is not in a state to be paused.",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE={type:"https://zup.fail/deployment-incorrect-status-unpause",title:"Deployment is not in a state to be unpaused.",status:A.HttpStatusCode.BAD_REQUEST};v.SERVICE_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Service configuration not found.",status:A.HttpStatusCode.NOT_FOUND};v.WORKING_COPY_SERVICE_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Working Copy service not found.",status:A.HttpStatusCode.NOT_FOUND};v.WORKING_COPY_SERVICE_NOT_DELETED={type:"https://zup.fail/working-copy-service-not-deleted",title:"Working Copy service failed to be deleted.",status:A.HttpStatusCode.BAD_REQUEST};v.WORKING_COPY_SERVICE_NOT_CREATED={type:"https://zup.fail/working-copy-service-not-created",title:"Working Copy service failed to be created.",status:A.HttpStatusCode.BAD_REQUEST};v.SERVICE_CONFIGURATION_FAILED_DECRYPTION={type:"https://zup.fail/service-config-not-decrypted",title:"Service configuration failed to decrypt.",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_ALREADY_EXISTS={type:"https://zup.fail/project-already-exists",title:"Project already exists.",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_NO_MEMBERS={type:"https://zup.fail/project-no-members",title:"Cannot find project members.",status:A.HttpStatusCode.NOT_FOUND};v.RUNTIME_FLAG_ALREADY_EXISTS={type:"https://zup.fail/runtime-flag-already-exists",title:"RuntimeFlag already exists.",status:A.HttpStatusCode.BAD_REQUEST};v.RUNTIME_FLAG_NOT_FOUND={type:"https://zup.fail/runtime-flag-not-found",title:"RuntimeFlag was not found.",status:A.HttpStatusCode.NOT_FOUND};v.RUNTIME_FLAG_KEY_NOT_VALID={type:"https://zup.fail/runtime-flag-key-not-valid",title:"RuntimeFlag key must be snake case",status:A.HttpStatusCode.BAD_REQUEST};v.USER_HAS_NO_ACCESS_TO_PROJECT={type:"https://zup.fail/user-has-no-access-to-project",title:"Not a member of the project",status:A.HttpStatusCode.FORBIDDEN};v.USER_IS_PROJECT_MEMBER={type:"https://zup.fail/user-is-project-member",title:"The user is already a project member.",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_INVALID_GIT_CLONE={type:"https://zup.fail/project-invalid-git-clone",title:"Project requires defaultBranch & sourceRepoUrl for creation from a GitHub repository.",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_INVALID_GIT_REPO={type:"https://zup.fail/project-invalid-git-repo",title:"The current source control repository is already in use by a Zuplo project",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_SHARING_REQUIRES_GIT_REPO={type:"https://zup.fail/project-sharing-requires-git-repo",title:"The current project is not connected to a source control repository.",status:A.HttpStatusCode.BAD_REQUEST};var Kct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITHUB_REPO");v.USER_NO_ACCESS_GITHUB_REPO=Kct;var Wct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have pull access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"USER_NO_PULL_ACCESS_GITHUB_REPO");v.USER_NO_PULL_ACCESS_GITHUB_REPO=Wct;var Yct=s(({repositoryUrl:e})=>({type:"https://zup.fail/no-read-access-github-repo",title:"You do not have read access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"GITHUB_USER_NO_READ_ACCESS_REPO");v.GITHUB_USER_NO_READ_ACCESS_REPO=Yct;v.GENERIC_GITHUB_BRANCH_INFO_ERROR={type:"https://zup.fail/gh-branch-info-error",title:"There was an error getting branch information for the GitHub repository associated to the project.",status:A.HttpStatusCode.BAD_REQUEST};v.GITHUB_APP_NO_NAMESPACE_ACCESS={type:"https://zup.fail/no-namespace-access-github-app",title:"The Zuplo GitHub app does not have access to the repositories under the namespace provided. Make sure to configure the GitHub Zuplo App on the repository.",status:A.HttpStatusCode.FORBIDDEN};var Jct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:"The Zuplo GitHub app does not have access to the repository. Make sure to configure the GitHub Zuplo App on the repository.",detail:`The Zuplo GitHub app has not been granted access to the repository '${e}'. Go to '${zct}' to add the repository.`,status:A.HttpStatusCode.FORBIDDEN}),"GITHUB_APP_NO_USER_ACCESS_");v.GITHUB_APP_NO_USER_ACCESS_=Jct;v.GITHUB_APP_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/gh-app-not-found",title:"Global GitHub App configuration not found",status:A.HttpStatusCode.NOT_FOUND};var Xct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-bitbucket-repo",title:"You do not have access to the Bitbucket repository associated to the project. Ask your Bitbucket admin for access and try again.",detail:`User does not have access to the Bitbucket repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_BITBUCKET_REPO");v.USER_NO_ACCESS_BITBUCKET_REPO=Xct;var Zct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-gitlab-repo",title:"You do not have access to the GitLab repository associated to the project. Ask your GitLab admin for access and try again.",detail:`User does not have access to the GitLab repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITLAB_REPO");v.USER_NO_ACCESS_GITLAB_REPO=Zct;v.USER_ACCOUNT_NOT_FS_MIGRATED={type:"https://zup.fail/user-account-not-fs-migrated",title:"User account is in a plan that does not allow project sharing. Please contact your account admin.",status:A.HttpStatusCode.FORBIDDEN};v.FAILED_TO_REVOKE_GH_TOKEN={type:"https://zup.fail/failed-to-revoke-gh-token",title:"Failed to revoke GitHub token for the user",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};v.PROJECT_INVALID_NAME={type:"https://zup.fail/project-invalid-name",title:"Project name is invalid, it only can contain letter, number and dashes.",status:A.HttpStatusCode.BAD_REQUEST};v.PROJECT_ALREADY_HAS_REPO={type:"https://zup.fail/project-already-has-repo",title:"The current project has been previously linked to a source control repository",status:A.HttpStatusCode.BAD_REQUEST};v.MAX_ALLOWED_PROJECTS_LIMIT_REACHED={type:"https://zup.fail/max-allowed-projects-limit-reached",title:"Your account has reached the maximum number of projects allowed.",status:A.HttpStatusCode.BAD_REQUEST};v.FEATURE_FLAGS_NOT_FOUND={type:"https://zup.fail/feature-flags-not-found",title:"Error trying to retrieve feature flags for this user",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};v.GITHUB_INTEGRATION_ALREADY_EXISTS={type:"https://zup.fail/github-integration-already-exists",title:"Error trying to create GitHub Integration, already exists.",status:A.HttpStatusCode.BAD_REQUEST};var Qct=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-not-found",title:"Cannot find a project configured for this repository",status:A.HttpStatusCode.CONFLICT,detail:`The repository ${e} does not have a GitHub configured project.`}),"GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND");v.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=Qct;var elt=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-repo-not-found",title:"Cannot find a provided GitHub repository",status:A.HttpStatusCode.CONFLICT,detail:`The GitHub repository ${e} was not found.`}),"GITHUB_REPOSITORY_NOT_FOUND");v.GITHUB_REPOSITORY_NOT_FOUND=elt;v.GITHUB_INTEGRATION_NOT_FOUND={type:"https://zup.fail/github-integration-not-found",title:"Project is not integrated with GitHub",status:A.HttpStatusCode.NOT_FOUND,detail:"The project does not have a GitHub integration configured."};v.GITHUB_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/github-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:A.HttpStatusCode.BAD_REQUEST};v.GITHUB_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/github-integration-authentication-failed",title:"GitHub integration: Authentication failed",status:A.HttpStatusCode.FORBIDDEN};v.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED={type:"https://zup.fail/github-integration-query-user-info-failed",title:"Failed while requesting basic user info from GitHub",status:A.HttpStatusCode.FORBIDDEN};var tlt=s(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/github-integration-duplicate-repo",title:"A repository with that name already exists in GitHub",details:`A repository named '${e}' already exists on GitHub org '${t}'.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_DUPLICATE_REPO");v.GITHUB_INTEGRATION_DUPLICATE_REPO=tlt;var rlt=s(({repositoryName:e,details:t})=>({type:"https://zup.fail/github-integration-failed-repo-creation",title:"Failed to create a new repository in GitHub",details:t,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION");v.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=rlt;var nlt=s(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-empty-repo",title:"The repository is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_EMPTY_REPO");v.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=nlt;var ilt=s(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-git-repo",title:"We can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is not a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_INVALID_REPO");v.GIT_CREATE_PROJECT_WITH_INVALID_REPO=ilt;var slt=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-invalid-repo",title:"We can only connect to an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.",details:`Repository '${e}' is not an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_INVALID_REPO");v.GITHUB_INTEGRATION_INVALID_REPO=slt;v.BITBUCKET_QUERY_USER_INFO_FAILED={type:"https://zup.fail/bitbucket-query-user-info-failed",title:"Failed while requesting basic user info from Bitbucket",status:A.HttpStatusCode.FORBIDDEN};v.BITBUCKET_WORKSPACE_MISCONFIGURATION={type:"https://zup.fail/bitbucket-workspace-misconfiguration",title:"Bitbucket source control configuration is missing workspace information",status:A.HttpStatusCode.FORBIDDEN};var olt=s(({details:e})=>({type:"https://zup.fail/bitbucket-failed-repo-creation",title:"Failed to create a new repository in Bitbucket",details:e,status:A.HttpStatusCode.BAD_REQUEST}),"BITBUCKET_FAILED_DURING_REPO_CREATION");v.BITBUCKET_FAILED_DURING_REPO_CREATION=olt;v.GITLAB_QUERY_USER_INFO_FAILED={type:"https://zup.fail/gitlab-query-user-info-failed",title:"Failed while requesting basic user info from GitLab",status:A.HttpStatusCode.FORBIDDEN};var alt=s(({details:e})=>({type:"https://zup.fail/gitlab-failed-repo-creation",title:"Failed to create a new repository in GitLab",details:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_FAILED_DURING_REPO_CREATION");v.GITLAB_FAILED_DURING_REPO_CREATION=alt;var ult=s(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/gitlab-duplicate-repo",title:"A repository with that name already exists in GitLab",details:`A repository named '${e}' already exists in GitLab team '${t}'.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_DUPLICATE_REPO");v.GITLAB_DUPLICATE_REPO=ult;var clt=s(({orgName:e})=>({type:"https://zup.fail/gitlab-create-repo-perm",title:"The user's GitLab group access level does not allow for repository creation.",details:"The user's GitLab group access level does not allow for repository creation.",instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_PERM_CREATE_REPO");v.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=clt;var llt=s(({namespaceLabel:e})=>({type:"https://zup.fail/gitlab-insufficient-namespace-access",title:`The user's GitLab access level does not allow the use of namespace '${e}'.`,details:`The user's GitLab access level does not allow the use of namespace '${e}'.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_NAMESPACE_ACCESS");v.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=llt;var flt=s(({orgName:e})=>({type:"https://zup.fail/gitlab-access-check-fail",title:"Failed to verify user's GitLab group access level",instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_ACCESS_LEVEL_CHECK_FAIL");v.GITLAB_ACCESS_LEVEL_CHECK_FAIL=flt;v.CONSUMER_NO_ACCESS={type:"https://zup.fail/consumer-no-access",title:"User does not have access to this consumer.",status:A.HttpStatusCode.UNAUTHORIZED};v.CONSUMER_DOES_NOT_EXIST={type:"https://zup.fail/consumer-does-not-exist",title:"Consumer does not exist or cannot be accessed.",status:A.HttpStatusCode.NOT_FOUND};v.CONSUMER_CANNOT_BE_CREATED={type:"https://zup.fail/consumer-not-created",title:"Failed to create consumer",status:A.HttpStatusCode.BAD_GATEWAY};v.EXTERNAL_USER_NO_ACCESS={type:"https://zup.fail/external-user-no-access",title:"User does not have access to this external user.",status:A.HttpStatusCode.UNAUTHORIZED};v.EXTERNAL_USER_NOT_CONFIGURED={type:"https://zup.fail/external-user-not-configured",title:"User is not setup as an External User (Key Manager)",status:A.HttpStatusCode.FORBIDDEN};v.API_USER_NO_ACCESS={type:"https://zup.fail/api-user-no-access",title:"Api user does not have access to this endpoint.",status:A.HttpStatusCode.FORBIDDEN};v.EXTERNAL_SERVICE_GENERIC_ERROR={type:"https://zup.fail/external-service-generic-error",title:"Unable to complete API request for External Service.",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};var dlt=s(({sourceControlProvider:e})=>({type:"https://zup.fail/source-control-authentication-failed",title:"Source provider authentication failed",detail:`Could not authenticate to ${(0,Oae.getSourceControlProviderLabel)(e)}`,status:A.HttpStatusCode.UNAUTHORIZED}),"SOURCE_CONTROL_AUTHENTICATION_FAILED");v.SOURCE_CONTROL_AUTHENTICATION_FAILED=dlt;var plt=s(({sourceControlProvider:e})=>({type:"https://zup.fail/source-control-repo-not-found",title:"We cannot connect to the repository associated to the project, verify your source control access configuration and try again.",detail:`Could not connect to ${(0,Oae.getSourceControlProviderLabel)(e)} repository`,status:A.HttpStatusCode.NOT_FOUND}),"SOURCE_CONTROL_REPO_NOT_FOUND");v.SOURCE_CONTROL_REPO_NOT_FOUND=plt;v.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE={type:"https://zup.fail/source-control-empty-commit",title:"Commit operation failed because you provided an empty message. Please try again by providing a commit message.",status:A.HttpStatusCode.BAD_REQUEST};var hlt=s(({repoURL:e,operation:t})=>({type:`https://zup.fail/source-control-repo-${t}-error`,title:`Failed on ${t} operation to repository '${e}'. Verify you have read & write access to the repository and try again.`,detail:"Verify your source control configuration and make sure you have been granted read & write access to the repository",status:A.HttpStatusCode.FORBIDDEN}),"SOURCE_CONTROL_REPO_OPERATION_ERROR");v.SOURCE_CONTROL_REPO_OPERATION_ERROR=hlt;v.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE={type:"https://zup.fail/source-control-write-access-issue",title:"You do not have write access to the repository, verify your source control access configuration and try again.",detail:"Verify your source control configuration and make sure you have been granted access to the repository",status:A.HttpStatusCode.FORBIDDEN};v.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/source-control-configuration-not-found",title:"Source control configuration not found for this account.",status:A.HttpStatusCode.NOT_FOUND};v.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND={type:"https://zup.fail/source-control-credentials-not-found",title:"Source control credentials not found for this user. Verify your user's source control connection and try again.",status:A.HttpStatusCode.NOT_FOUND};v.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-refresh-source-control-credentials",title:"Failed to refresh Source Control credentials. Verify your user's source control connection and try again.",status:A.HttpStatusCode.FORBIDDEN};v.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED={type:"https://zup.fail/new-gh-config-required",title:"Current Source Control credentials are using the previous Zuplo GitHup App. Re-authenticate using the latest Zuplo GitHup App via Profile UI and try again.",status:A.HttpStatusCode.FORBIDDEN};v.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS={type:"https://zup.fail/gh-app-revoked-access",title:"Current Source Control credentials are invalid. Re-authenticate to GitHub via Profile UI and try again.",status:A.HttpStatusCode.UNAUTHORIZED};v.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-revoke-source-control-credentials",title:"Failed to revoke Source Control access token for the user",status:A.HttpStatusCode.FORBIDDEN};v.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING={type:"https://zup.fail/source-control-configuration-info-missing",title:"Source Control Configuration information is insufficient for this operation.",status:A.HttpStatusCode.BAD_REQUEST};v.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING={type:"https://zup.fail/source-control-configuration-bb-workspace-missing",title:"Source Control Configuration for Bitbucket must include a workspace configuration (additionalMetadata).",status:A.HttpStatusCode.BAD_REQUEST};v.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION={type:"https://zup.fail/preexisiting-source-control-configuration-on-account",title:"This account already has a Source Control Configuration for this provider.",detail:"This account has a pre-existing Source Control Configuration for this provider. Delete or update the existing configuration.",status:A.HttpStatusCode.BAD_REQUEST};v.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/source-control-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:A.HttpStatusCode.BAD_REQUEST};v.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/source-control-integration-authentication-failed",title:"Source control integration: Authentication failed",status:A.HttpStatusCode.FORBIDDEN};v.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR={type:"https://zup.fail/third-party-app-auth0-clients-endpoint-error",title:"Error Creating an Auth0 Client through tenant api",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};v.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST={type:"https://zup.fail/third-party-app-auth0-config-does-not-exist",title:"Auth0 Configuration does not exist for account and environment",status:A.HttpStatusCode.NOT_FOUND};v.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR={type:"https://zup.fail/third-party-app-auth0-client-not-found-error",title:"Third Party App Not Found",status:A.HttpStatusCode.NOT_FOUND};v.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR={type:"https://zup.fail/third-party-app-auth-scope-config-error",title:"API Scope configuration at Auth0 end Error",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};v.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND={type:"https://zup.fail/third-party-app-connections-not-found",title:"Cannot find auth0 tenant connections",status:A.HttpStatusCode.FAILED_DEPENDENCY};v.THIRD_PARTY_APP_CONNECTION_NOT_FOUND={type:"https://zup.fail/third-party-app-connection-not-found",title:"Cannot find connection with the given name",status:A.HttpStatusCode.FAILED_DEPENDENCY};v.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION={type:"https://zup.fail/third-party-app-cannot-link-tpa-to-connection",title:"Cannot link a connection to a third party app",status:A.HttpStatusCode.FAILED_DEPENDENCY};v.DUPLICATE_ENVIRONMENT_VARIABLE={type:"https://zup.fail/duplicate-environment-variable",title:"Duplicate environment variable",status:A.HttpStatusCode.BAD_REQUEST};v.ENVIRONMENT_VARIABLE_VALIDATION_ERROR={type:"https://zup.fail/environment-variables-validation-error",title:"Environment variable configuration is invalid",status:A.HttpStatusCode.BAD_REQUEST};v.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE={type:"https://zup.fail/environment-variables-cannot-be-retrieved-invalid-env-type",title:"Env vars will not be retrieved since the deployment is from non valid environment type",status:A.HttpStatusCode.BAD_REQUEST};v.NON_EXISTENT_ENVIRONMENT_VARIABLE={type:"https://zup.fail/non-existent-environment-variable",title:"Environment variable doesn't exist",status:A.HttpStatusCode.NOT_FOUND};v.DEPLOYMENT_NAME_MISSING={type:"https://zup.fail/deployment-name-missing",title:"Deployment name missing",status:A.HttpStatusCode.BAD_REQUEST};v.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE={type:"https://zup.fail/invalidly-named-environment-variable",title:"Environment variable needs a valid name",status:A.HttpStatusCode.BAD_REQUEST};v.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY={type:"https://zup.fail/personal-override-only-for-working-copy",title:"A personal override can only be used for a working-copy environment variable",status:A.HttpStatusCode.BAD_REQUEST};v.TARGET_BRANCH_ONLY_FOR_PREVIEW={type:"https://zup.fail/target-branch-only-for-preview",title:"A target branch can only be used for preview environment variables",status:A.HttpStatusCode.BAD_REQUEST};v.INVALID_BRANCH_NAME={type:"https://zup.fail/invalid-branch-name",title:"Branch name is invalid",status:A.HttpStatusCode.BAD_REQUEST};v.OVERLAPPING_TARGETS={type:"https://zup.fail/overlapping-targets",title:"The environments of this environment variable overlaps with an existing environment variable",status:A.HttpStatusCode.BAD_REQUEST};v.CONFLICTING_TYPES={type:"https://zup.fail/conflicting-types",title:"The type of this environment variable conflicts with an existing environment variable with the same name",status:A.HttpStatusCode.BAD_REQUEST};v.NON_EMPTY_TARGETS_REQUIRED={type:"https://zup.fail/non-empty-targets-required",title:"The environment targets for this environment variable cannot be empty.",status:A.HttpStatusCode.BAD_REQUEST};v.NO_ZUPLO_PREFIXED_VARIABLES={type:"https://zup.fail/no-zuplo-prefixed-variables",title:"Environment variables should not start with the reserved prefix of ZUPLO or __ZUPLO",status:A.HttpStatusCode.BAD_REQUEST};v.NO_GLOBAL_SYMBOLS={type:"https://zup.fail/no-global-symbols",title:"Environment variables cannot be named after global variables.",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE={type:"https://zup.fail/deployer-non-valid-deployment-environment-type",title:"Deployment cannot be different than preview or production",status:A.HttpStatusCode.BAD_REQUEST};v.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2={type:"https://zup.fail/deployer-cannot-deploy-using-env-vars-v2",title:"Deployer was not able to deploy zup using environment variables v2",status:A.HttpStatusCode.FORBIDDEN};v.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR={type:"https://zup.fail/deleting-zuplo-environment-variables-error",title:"Problems deleting ZUPLO environment variables for deployment",status:A.HttpStatusCode.NOT_FOUND};var mlt=s(({operation:e,path:t})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:"Cannot modify file on read-only environment",detail:`Cannot ${e} file ${t} for a read-only environment. Read-only environments cannot be edited.`,status:A.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT");v.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=mlt;var _lt=s(()=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:"Cannot modify files on read-only environment",detail:"Cannot save files on a read-only environment. Read-only environments cannot be edited.",status:A.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT");v.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=_lt;v.MIGRATIONS_ONLY_ON_WORKING_COPY={type:"https://zup.fail/migration-only-on-working-copy",title:"Migrations can only run on working copies.",status:A.HttpStatusCode.BAD_REQUEST};v.RUNTIME_VERSION_INCORRECT_FORMAT={type:"https://zup.fail/migration-incorrect-runtime-version-format",title:"Runtime version is in an incorrect format.",status:A.HttpStatusCode.BAD_REQUEST};v.PACKAGE_JSON_NOT_FOUND={type:"https://zup.fail/no-pkg-file-found",title:"No package.json file found.",status:A.HttpStatusCode.NOT_FOUND};v.CANNOT_READ_PACKAGE_JSON={type:"https://zup.fail/cannot-read-pkg-file",title:"Cannot read package.json file.",status:A.HttpStatusCode.BAD_REQUEST};v.CANNOT_FIND_SRC_DIRECTORY={type:"https://zup.fail/cannot-find-src-dir",title:"Cannot find source directory.",status:A.HttpStatusCode.BAD_REQUEST};v.FAILED_DOWNLOAD_FROM_STORAGE={type:"https://zup.fail/failed-download-storage",title:"Failed to download content from storage.",status:A.HttpStatusCode.BAD_REQUEST};var glt=s(({path:e})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:"Cannot create directory on read-only environment",detail:`Cannot create folder ${e} for a read-only environment. Read-only environments cannot be edited.`,status:A.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT");v.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=glt;var ylt=s(({path:e})=>({type:"https://zup.fail/directory-creation-in-non-allowed-location",title:"Directory creation attempted in non allowed location",detail:`Directory creation in ${e} is not allowed.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION");v.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=ylt;var Elt=s(({path:e})=>({type:"https://zup.fail/directory-already-exists",title:"Directory already exists",status:A.HttpStatusCode.BAD_REQUEST,detail:`Directory already exists at ${e}.`}),"DIRECTORY_ALREADY_EXISTS");v.DIRECTORY_ALREADY_EXISTS=Elt;var blt=s(({path:e})=>({type:"https://zup.fail/directory-does-not-exist",title:"Directory does not exist",status:A.HttpStatusCode.BAD_REQUEST,detail:`No directory at ${e}`}),"DIRECTORY_DOES_NOT_EXIST");v.DIRECTORY_DOES_NOT_EXIST=blt;var Slt=s(({path:e})=>({type:"https://zup.fail/directory-or-file-does-not-exist",title:"Directory or File does not exist",status:A.HttpStatusCode.BAD_REQUEST,detail:`No file/directory at ${e}`}),"DIRECTORY_OR_FILE_DOES_NOT_EXIST");v.DIRECTORY_OR_FILE_DOES_NOT_EXIST=Slt;var vlt=s(({path:e})=>({type:"https://zup.fail/directory-creation-failure",title:"Directory creation failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to create directory at ${e}. Please try again or contact support.`}),"DIRECTORY_CREATION_FAILED");v.DIRECTORY_CREATION_FAILED=vlt;var Olt=s(({path:e})=>({type:"https://zup.fail/file-rename-paths-match",title:"New file name matches old file name",status:A.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the old path ${e} matched the provided new path. Please choose a different name.`}),"FILE_RENAME_PATHS_MATCH");v.FILE_RENAME_PATHS_MATCH=Olt;var Plt=s(({oldExtension:e,newExtension:t})=>({type:"https://zup.fail/file-rename-cannot-change-extension",title:"Cannot change extension of renamed file",status:A.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the new extension ${t} must match the old extension ${e}.`}),"FILE_RENAME_CANNOT_CHANGE_EXTENSION");v.FILE_RENAME_CANNOT_CHANGE_EXTENSION=Plt;var wlt=s(({path:e})=>({type:"https://zup.fail/file-rename-file-exists",title:"File already exists",status:A.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, there already exists a file at ${e}. Please choose a different name.`}),"FILE_RENAME_FILE_ALREADY_EXISTS");v.FILE_RENAME_FILE_ALREADY_EXISTS=wlt;var Ilt=s(({path:e})=>({type:"https://zup.fail/file-rename-failure",title:"File rename failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to rename file ${e}. Please try again or contact support.`}),"FILE_RENAME_FAILED");v.FILE_RENAME_FAILED=Ilt;var Tlt=s(({path:e})=>({type:"https://zup.fail/file-write-failure",title:"File write failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to write file ${e}. Please try again or contact support.`}),"FILE_WRITE_FAILED");v.FILE_WRITE_FAILED=Tlt;var Nlt=s(({path:e})=>({type:"https://zup.fail/essential-file-deletion",title:"Cannot delete essential file",status:A.HttpStatusCode.BAD_REQUEST,detail:`File '${e}' cannot be deleted. It is an essential file.`}),"CANNOT_DELETE_ESSENTIAL_FILE");v.CANNOT_DELETE_ESSENTIAL_FILE=Nlt;var Alt=s(({path:e})=>({type:"https://zup.fail/essential-directory-deletion",title:"Cannot delete essential file",status:A.HttpStatusCode.BAD_REQUEST,detail:`Directory '${e}' cannot be deleted. It is an essential directory.`}),"CANNOT_DELETE_ESSENTIAL_DIRECTORY");v.CANNOT_DELETE_ESSENTIAL_DIRECTORY=Alt;var Rlt=s(()=>({type:"https://zup.fail/sole-open-api-file-deletion",title:"Cannot delete sole OpenAPI file",status:A.HttpStatusCode.BAD_REQUEST,detail:"Your project must have at least 1 OpenAPI file."}),"CANNOT_DELETE_SOLE_OPEN_API_FILE");v.CANNOT_DELETE_SOLE_OPEN_API_FILE=Rlt;var Clt=s(({path:e})=>({type:"https://zup.fail/file-delete-failure",title:"File deletion failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete file ${e}. Please try again or contact support.`}),"FILE_DELETE_FAILED");v.FILE_DELETE_FAILED=Clt;var $lt=s(({path:e})=>({type:"https://zup.fail/directory-delete-failure",title:"Directory deletion failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete directory ${e}. Please try again or contact support.`}),"DIRECTORY_DELETE_FAILED");v.DIRECTORY_DELETE_FAILED=$lt;v.BUCKET_API_KEY_SERVICE_CONFLICT={type:"https://zup.fail/bucket-api-key-service-error",title:"Bucket name conflicts",status:A.HttpStatusCode.CONFLICT};v.BUCKET_NOT_FOUND={type:"https://zup.fail/bucket-not-found",title:"Bucket cannot be found",status:A.HttpStatusCode.NOT_FOUND};v.UNABLE_UPGRADE_PLAN={type:"https://zup.fail/cant-upgrade-plan",title:"Can't upgrade to selected plan",status:A.HttpStatusCode.BAD_REQUEST};v.METERING_BUCKET_CREATION_FAILED={type:"https://zup.fail/metering-bucket-creation-failed",title:"Failed to create metering buckets for project",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR}});var Iae=h(Ti=>{"use strict";var Dlt=Ti&&Ti.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Llt=Ti&&Ti.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),jlt=Ti&&Ti.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Dlt(t,e,r);return Llt(t,e),t};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.ApiNotFoundError=Ti.ApiError=Ti.Problems=void 0;var wae=jlt(Pae());Ti.Problems=wae;var T1=class extends Error{static{s(this,"ApiError")}type;status;detail;instance;constructor(t){if(super(t.title),!t.type.startsWith("https://zup.fail/"))throw new Error(`Invalid 'type' specified on ApiError, must be a URI starting with 'https://zup.fail/'. Type was set to ${t.type}`);this.name="ApiProblemError",this.type=t.type,this.status=t.status,this.detail=t.detail,this.instance=t.instance}};Ti.ApiError=T1;var QF=class extends T1{static{s(this,"ApiNotFoundError")}constructor(t={}){super({...t,...wae.NOT_FOUND}),this.name="ApiNotFoundProblemError"}};Ti.ApiNotFoundError=QF});var Tae=h(wu=>{"use strict";var Mlt=wu&&wu.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Ult=wu&&wu.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Mlt(t,e,r)};Object.defineProperty(wu,"__esModule",{value:!0});wu.HttpStatusCode=void 0;Ult(Iae(),wu);var xlt=ZF();Object.defineProperty(wu,"HttpStatusCode",{enumerable:!0,get:function(){return xlt.HttpStatusCode}})});var Aae=h((Eqt,Nae)=>{"use strict";function qlt(e){return e>=55296&&e<=56319}s(qlt,"isHighSurrogate");function Flt(e){return e>=56320&&e<=57343}s(Flt,"isLowSurrogate");Nae.exports=s(function(t,r,n){if(typeof r!="string")throw new Error("Input must be string");for(var i=r.length,o=0,a,u,c=0;c<i;c+=1){if(a=r.charCodeAt(c),u=r[c],qlt(a)&&Flt(r.charCodeAt(c+1))&&(c+=1,u+=r[c]),o+=t(u),o===n)return r.slice(0,c+1);if(o>n)return r.slice(0,c-u.length+1)}return r},"truncate")});var Cae=h((Sqt,Rae)=>{"use strict";var klt=Aae(),Blt=Buffer.byteLength.bind(Buffer);Rae.exports=klt.bind(null,Blt)});var ek=h(Xm=>{"use strict";var Glt=Xm&&Xm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xm,"__esModule",{value:!0});Xm.sanitize=void 0;var Vlt=Glt(Cae()),zlt=/[/?<>\\:*|"]/g,Hlt=/[\x00-\x1f\x80-\x9f]/g,Klt=/^\.+$/,Wlt=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Ylt=/[. ]+$/;function Jlt(e,t=""){if(typeof e!="string")throw new Error("Input must be string");let r=e.replace(zlt,t).replace(Hlt,t).replace(Klt,t).replace(Wlt,t).replace(Ylt,t);return(0,Vlt.default)(r,255)}s(Jlt,"sanitize");Xm.sanitize=Jlt});var jae=h(Zm=>{"use strict";var Lae=Zm&&Zm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zm,"__esModule",{value:!0});Zm.createProjectDirs=void 0;var $ae=Lae(require("fs/promises")),Xlt=Lae(require("path")),YE=kt(),Dae=rc(),Zlt=s(async function({sourceDirectory:e,logger:t}){t.debug("Creating project directories");let r=[YE.USER_MODULES_DIR_NAME,YE.USER_CONFIG_DIR_NAME,YE.USER_TEST_DIR_NAME,YE.USER_SCHEMAS_DIR_NAME,YE.USER_DOCS_DIR_NAME,".vscode"];try{await $ae.default.mkdir(e);for(let n of r)await $ae.default.mkdir(Xlt.default.join(e,n),{recursive:!0})}catch(n){return t.error(n),new Dae.PluginResult({message:`Cannot create project directory tree at ${e}`,pluginName:"create-project-dirs",severity:"error"})}return new Dae.PluginResult},"createProjectDirs");Zm.createProjectDirs=Zlt});var qae=h(Qm=>{"use strict";var xae=Qm&&Qm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qm,"__esModule",{value:!0});Qm.generateFromTemplate=void 0;var Qlt=require("fs"),Mae=xae(require("fs/promises")),Uae=xae(require("path"));async function eft(e){let t=Uae.default.resolve(__dirname,"..","templates",e);if((0,Qlt.existsSync)(t))return await Mae.default.readFile(t,"utf-8");{let r=Uae.default.resolve(__dirname,"templates",e);return await Mae.default.readFile(r,"utf-8")}}s(eft,"generateFromTemplate");Qm.generateFromTemplate=eft});var Ni=h(e_=>{"use strict";var N1=e_&&e_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e_,"__esModule",{value:!0});e_.generateFileFromTemplate=void 0;var tft=N1(_n()),rft=N1(require("fs/promises")),nft=N1(require("path")),ift=N1(mn()),sft=qae(),oft=s(function(e,t){return async({sourceDirectory:r,logger:n})=>ift.default.timeFn(`Generating ${e}`,async()=>{n.debug(`Generating ${e}`);let i=nft.default.join(r,e);return await tft.default.fileExists(i)?(n.debug({sourceDirectory:r},`${e} already exists, skipping`),{warnings:[],errors:[]}):aft(i,t,n)})},"generateFileFromTemplate");e_.generateFileFromTemplate=oft;async function aft(e,t,r){let n=await(0,sft.generateFromTemplate)(t);try{await rft.default.writeFile(e,n,"utf-8"),r.debug(`File written to ${e}`)}catch(i){r.error(i);let o={message:`Error creating file at ${e}`,pluginName:"generate-file",severity:"error"};return{warnings:[],errors:[o]}}return{warnings:[],errors:[]}}s(aft,"writeTemplate")});var kae=h(t_=>{"use strict";var uft=t_&&t_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t_,"__esModule",{value:!0});t_.generateDefaultDocsMarkdown=void 0;var cft=uft(require("path")),Fae=kt(),lft=Ni();t_.generateDefaultDocsMarkdown=(0,lft.generateFileFromTemplate)(cft.default.join(Fae.USER_DOCS_DIR_NAME,Fae.DEFAULT_DOCS_MARKDOWN_FILE),"markdown.template.md")});var Gae=h(r_=>{"use strict";var fft=r_&&r_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r_,"__esModule",{value:!0});r_.generateDefaultDocsSidebar=void 0;var dft=fft(require("path")),Bae=kt(),pft=Ni();r_.generateDefaultDocsSidebar=(0,pft.generateFileFromTemplate)(dft.default.join(Bae.USER_DOCS_DIR_NAME,Bae.DOCS_SIDEBAR_FILE),"sidebar.template.json")});var zae=h(n_=>{"use strict";var hft=n_&&n_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n_,"__esModule",{value:!0});n_.generateDefaultDocsTheme=void 0;var mft=hft(require("path")),Vae=kt(),_ft=Ni();n_.generateDefaultDocsTheme=(0,_ft.generateFileFromTemplate)(mft.default.join(Vae.USER_DOCS_DIR_NAME,Vae.DOCS_THEME_FILE),"dev-portal.theme.template.css")});var Kae=h(i_=>{"use strict";var gft=i_&&i_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i_,"__esModule",{value:!0});i_.generateDefaultModule=void 0;var yft=gft(require("path")),Hae=kt(),Eft=Ni();i_.generateDefaultModule=(0,Eft.generateFileFromTemplate)(yft.default.join(Hae.USER_MODULES_DIR_NAME,Hae.DEFAULT_MODULE_FILE),"hello-world.template.ts")});var Yae=h(s_=>{"use strict";var bft=s_&&s_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s_,"__esModule",{value:!0});s_.generateDevPortalConfigJson=void 0;var Sft=bft(require("path")),Wae=kt(),vft=Ni();s_.generateDevPortalConfigJson=(0,vft.generateFileFromTemplate)(Sft.default.join(Wae.USER_CONFIG_DIR_NAME,Wae.DEV_PORTAL_CONFIG_FILE),"dev-portal.template.json")});var Jae=h(A1=>{"use strict";Object.defineProperty(A1,"__esModule",{value:!0});A1.generateEnvironment=void 0;var Oft=Ni();A1.generateEnvironment=(0,Oft.generateFileFromTemplate)(".env","env.template")});var Xae=h(R1=>{"use strict";Object.defineProperty(R1,"__esModule",{value:!0});R1.generateESLint=void 0;var Pft=Ni();R1.generateESLint=(0,Pft.generateFileFromTemplate)(".eslintrc.js","eslintrc.template.js")});var Zae=h(C1=>{"use strict";Object.defineProperty(C1,"__esModule",{value:!0});C1.generateGitignore=void 0;var wft=Ni();C1.generateGitignore=(0,wft.generateFileFromTemplate)(".gitignore","gitignore.template.ignore")});var Qae=h(o_=>{"use strict";var Ift=o_&&o_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o_,"__esModule",{value:!0});o_.generateLaunchJson=void 0;var Tft=Ift(require("path")),Nft=Ni();o_.generateLaunchJson=(0,Nft.generateFileFromTemplate)(Tft.default.join(".vscode","launch.json"),"launch.template.jsonc")});var tue=h(a_=>{"use strict";var Aft=a_&&a_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a_,"__esModule",{value:!0});a_.generateRouteOasConfig=void 0;var Rft=Aft(require("path")),eue=kt(),Cft=Ni();a_.generateRouteOasConfig=(0,Cft.generateFileFromTemplate)(Rft.default.join(eue.USER_CONFIG_DIR_NAME,eue.ROUTES_OAS_CONFIG_FILE),"routes.oas.template.json")});var iue=h(qs=>{"use strict";var tk=qs&&qs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qs,"__esModule",{value:!0});qs.updateProjectPackageJson=qs.getProjectPackageJson=qs.getPackageOverrides=qs.generateDefaultPackageJson=void 0;var rue=tk(require("fs/promises")),rk=tk(require("path")),$ft=tk(Xs());async function Dft(e,t=$ft.default.USE_MONOREPO_PACKAGES){let r={name:e,version:"1.0.0",author:"",copyright:"",scripts:{dev:"zup dev",test:"zup test"},dependencies:{zuplo:"latest"}};if(t){let n=nue();r.overrides=n,r.dependencies["@zuplo/runtime"]=n["@zuplo/runtime"],r.devDependencies&&"@zuplo/core"in r.devDependencies&&(r.devDependencies["@zuplo/core"]=n["@zuplo/core"]),"@zuplo/core"in r.dependencies&&(r.dependencies["@zuplo/core"]=n["@zuplo/core"])}return r}s(Dft,"generateDefaultPackageJson");qs.generateDefaultPackageJson=Dft;function nue(){let e=rk.default.resolve(__dirname,"..","..");return{"@zuplo/core":`file:${e}/core`,"@zuplo/runtime":`file:${e}/runtime`,"@zuplo/debug":`file:${e}/debug`,"@zuplo/errors":`file:${e}/errors`}}s(nue,"getPackageOverrides");qs.getPackageOverrides=nue;async function Lft(e){let t=rk.default.join(e,"package.json"),r=await rue.default.readFile(t,"utf-8");return JSON.parse(r)}s(Lft,"getProjectPackageJson");qs.getProjectPackageJson=Lft;async function jft(e,t){let r=rk.default.join(e,"package.json"),n=JSON.stringify(t,void 0,2);await rue.default.writeFile(r,n,"utf-8")}s(jft,"updateProjectPackageJson");qs.updateProjectPackageJson=jft});var aue=h($1=>{"use strict";Object.defineProperty($1,"__esModule",{value:!0});$1.generatePackageJson=void 0;var sue=iue(),oue=rc(),Mft=s(async function({sourceDirectory:e,name:t,logger:r}){let n=await(0,sue.generateDefaultPackageJson)(t);try{await(0,sue.updateProjectPackageJson)(e,n)}catch(i){return r.error(i),new oue.PluginResult({message:"Error creating package.json",pluginName:"generate-package-json",severity:"error"})}return new oue.PluginResult},"generatePackageJson");$1.generatePackageJson=Mft});var cue=h(u_=>{"use strict";var Uft=u_&&u_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(u_,"__esModule",{value:!0});u_.generatePoliciesConfig=void 0;var xft=Uft(require("path")),uue=kt(),qft=Ni();u_.generatePoliciesConfig=(0,qft.generateFileFromTemplate)(xft.default.join(uue.USER_CONFIG_DIR_NAME,uue.POLICIES_CONFIG_FILE),"policies.template.json")});var lue=h(c_=>{"use strict";var Fft=c_&&c_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(c_,"__esModule",{value:!0});c_.generateSettingsJson=void 0;var kft=Fft(require("path")),Bft=Ni();c_.generateSettingsJson=(0,Bft.generateFileFromTemplate)(kft.default.join(".vscode","settings.json"),"settings.template.jsonc")});var fue=h(D1=>{"use strict";Object.defineProperty(D1,"__esModule",{value:!0});D1.generateTSConfig=void 0;var Gft=Ni();D1.generateTSConfig=(0,Gft.generateFileFromTemplate)("tsconfig.json","tsconfig.template.json")});var pue=h(l_=>{"use strict";var Vft=l_&&l_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l_,"__esModule",{value:!0});l_.generateZuploJson=void 0;var zft=Yo(),Hft=require("fs/promises"),Kft=Vft(require("path")),Wft=kt(),due=rc(),Yft=s(async function({name:e,sourceDirectory:t,logger:r}){let n={version:1,project:e,compatibilityDate:zft.DEFAULT_COMPATIBILITY_DATE},i=Kft.default.join(t,Wft.ZUPLO_PREFERRED_JSON_FILE),o=JSON.stringify(n,null,2);try{await(0,Hft.writeFile)(i,o,"utf-8")}catch(a){return r.error(a),new due.PluginResult({message:"Error creating zuplo.jsonc",pluginName:"generate-zuplo-json",severity:"error"})}return new due.PluginResult},"generateZuploJson");l_.generateZuploJson=Yft});var gue=h(f_=>{"use strict";var _ue=f_&&f_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(f_,"__esModule",{value:!0});f_.create=void 0;var hue=Tae(),Jft=_ue(_n()),Xft=require("fs/promises"),Zft=_ue(require("path")),Qft=rc(),mue=ek(),edt=jae(),tdt=kae(),rdt=Gae(),ndt=zae(),idt=Kae(),sdt=Yae(),odt=Jae(),adt=Xae(),udt=Zae(),cdt=Qae(),ldt=tue(),fdt=aue(),ddt=cue(),pdt=lue(),hdt=fue(),mdt=pue();async function _dt({name:e,accountName:t="",rootDirectory:r,logger:n}){let i=(0,mue.sanitize)(e),o=(0,mue.sanitize)(t),a=Zft.default.join(r,o,i),u={name:e,sourceDirectory:a,logger:n},c=[];if(await Jft.default.dirExists(a))throw new hue.ApiError({type:"https://zup.fail/project-already-exists-at-directory",title:"The project already exists in the specified directory",status:hue.HttpStatusCode.BAD_REQUEST,detail:`Project already exists at ${a}`});c.push(edt.createProjectDirs,ldt.generateRouteOasConfig,mdt.generateZuploJson,sdt.generateDevPortalConfigJson,idt.generateDefaultModule,rdt.generateDefaultDocsSidebar,tdt.generateDefaultDocsMarkdown,ndt.generateDefaultDocsTheme,ddt.generatePoliciesConfig),c.push(hdt.generateTSConfig,udt.generateGitignore,fdt.generatePackageJson,odt.generateEnvironment,adt.generateESLint,cdt.generateLaunchJson,pdt.generateSettingsJson);let{errors:l,warnings:f}=await(0,Qft.runPlugins)(c,u);if(f.length>0&&f.forEach(_=>{n.warn(_)}),l.length>0){await(0,Xft.rm)(a,{recursive:!0,force:!0});let _=l[0];throw _ instanceof Error?_:new Error(_.message)}return{sourceDirectory:a,projectName:e}}s(_dt,"create");f_.create=_dt});var vue=h((Xqt,Sue)=>{Sue.exports=bue;bue.sync=ydt;var yue=require("fs");function gdt(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}s(gdt,"checkPathExt");function Eue(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:gdt(t,r)}s(Eue,"checkStat");function bue(e,t,r){yue.stat(e,function(n,i){r(n,n?!1:Eue(i,e,t))})}s(bue,"isexe");function ydt(e,t){return Eue(yue.statSync(e),e,t)}s(ydt,"sync")});var Tue=h((Qqt,Iue)=>{Iue.exports=Pue;Pue.sync=Edt;var Oue=require("fs");function Pue(e,t,r){Oue.stat(e,function(n,i){r(n,n?!1:wue(i,t))})}s(Pue,"isexe");function Edt(e,t){return wue(Oue.statSync(e),t)}s(Edt,"sync");function wue(e,t){return e.isFile()&&bdt(e,t)}s(wue,"checkStat");function bdt(e,t){var r=e.mode,n=e.uid,i=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),a=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),u=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),f=u|c,d=r&l||r&c&&i===a||r&u&&n===o||r&f&&o===0;return d}s(bdt,"checkMode")});var Aue=h((r2t,Nue)=>{var t2t=require("fs"),L1;process.platform==="win32"||global.TESTING_WINDOWS?L1=vue():L1=Tue();Nue.exports=nk;nk.sync=Sdt;function nk(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,i){nk(e,t||{},function(o,a){o?i(o):n(a)})})}L1(e,t||{},function(n,i){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,i=!1),r(n,i)})}s(nk,"isexe");function Sdt(e,t){try{return L1.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}s(Sdt,"sync")});var Mue=h((i2t,jue)=>{var d_=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Rue=require("path"),vdt=d_?";":":",Cue=Aue(),$ue=s(e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),"getNotFoundError"),Due=s((e,t)=>{let r=t.colon||vdt,n=e.match(/\//)||d_&&e.match(/\\/)?[""]:[...d_?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],i=d_?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=d_?i.split(r):[""];return d_&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:i}},"getPathInfo"),Lue=s((e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:i,pathExtExe:o}=Due(e,t),a=[],u=s(l=>new Promise((f,d)=>{if(l===n.length)return t.all&&a.length?f(a):d($ue(e));let _=n[l],m=/^".*"$/.test(_)?_.slice(1,-1):_,g=Rue.join(m,e),y=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+g:g;f(c(y,l,0))}),"step"),c=s((l,f,d)=>new Promise((_,m)=>{if(d===i.length)return _(u(f+1));let g=i[d];Cue(l+g,{pathExt:o},(y,b)=>{if(!y&&b)if(t.all)a.push(l+g);else return _(l+g);return _(c(l,f,d+1))})}),"subStep");return r?u(0).then(l=>r(null,l),r):u(0)},"which"),Odt=s((e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=Due(e,t),o=[];for(let a=0;a<r.length;a++){let u=r[a],c=/^".*"$/.test(u)?u.slice(1,-1):u,l=Rue.join(c,e),f=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+l:l;for(let d=0;d<n.length;d++){let _=f+n[d];try{if(Cue.sync(_,{pathExt:i}))if(t.all)o.push(_);else return _}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw $ue(e)},"whichSync");jue.exports=Lue;Lue.sync=Odt});var sk=h((o2t,ik)=>{"use strict";var Uue=s((e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"},"pathKey");ik.exports=Uue;ik.exports.default=Uue});var kue=h((u2t,Fue)=>{"use strict";var xue=require("path"),Pdt=Mue(),wdt=sk();function que(e,t){let r=e.options.env||process.env,n=process.cwd(),i=e.options.cwd!=null,o=i&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let a;try{a=Pdt.sync(e.command,{path:r[wdt({env:r})],pathExt:t?xue.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return a&&(a=xue.resolve(i?e.options.cwd:"",a)),a}s(que,"resolveCommandAttempt");function Idt(e){return que(e)||que(e,!0)}s(Idt,"resolveCommand");Fue.exports=Idt});var Bue=h((l2t,ak)=>{"use strict";var ok=/([()\][%!^"`<>&|;, *?])/g;function Tdt(e){return e=e.replace(ok,"^$1"),e}s(Tdt,"escapeCommand");function Ndt(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(ok,"^$1"),t&&(e=e.replace(ok,"^$1")),e}s(Ndt,"escapeArgument");ak.exports.command=Tdt;ak.exports.argument=Ndt});var Vue=h((d2t,Gue)=>{"use strict";Gue.exports=/^#!(.*)/});var Hue=h((p2t,zue)=>{"use strict";var Adt=Vue();zue.exports=(e="")=>{let t=e.match(Adt);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var Wue=h((h2t,Kue)=>{"use strict";var uk=require("fs"),Rdt=Hue();function Cdt(e){let r=Buffer.alloc(150),n;try{n=uk.openSync(e,"r"),uk.readSync(n,r,0,150,0),uk.closeSync(n)}catch{}return Rdt(r.toString())}s(Cdt,"readShebang");Kue.exports=Cdt});var Zue=h((_2t,Xue)=>{"use strict";var $dt=require("path"),Yue=kue(),Jue=Bue(),Ddt=Wue(),Ldt=process.platform==="win32",jdt=/\.(?:com|exe)$/i,Mdt=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Udt(e){e.file=Yue(e);let t=e.file&&Ddt(e.file);return t?(e.args.unshift(e.file),e.command=t,Yue(e)):e.file}s(Udt,"detectShebang");function xdt(e){if(!Ldt)return e;let t=Udt(e),r=!jdt.test(t);if(e.options.forceShell||r){let n=Mdt.test(t);e.command=$dt.normalize(e.command),e.command=Jue.command(e.command),e.args=e.args.map(o=>Jue.argument(o,n));let i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}s(xdt,"parseNonShell");function qdt(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:xdt(n)}s(qdt,"parse");Xue.exports=qdt});var tce=h((y2t,ece)=>{"use strict";var ck=process.platform==="win32";function lk(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}s(lk,"notFoundError");function Fdt(e,t){if(!ck)return;let r=e.emit;e.emit=function(n,i){if(n==="exit"){let o=Que(i,t,"spawn");if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}s(Fdt,"hookChildProcess");function Que(e,t){return ck&&e===1&&!t.file?lk(t.original,"spawn"):null}s(Que,"verifyENOENT");function kdt(e,t){return ck&&e===1&&!t.file?lk(t.original,"spawnSync"):null}s(kdt,"verifyENOENTSync");ece.exports={hookChildProcess:Fdt,verifyENOENT:Que,verifyENOENTSync:kdt,notFoundError:lk}});var ice=h((b2t,p_)=>{"use strict";var rce=require("child_process"),fk=Zue(),dk=tce();function nce(e,t,r){let n=fk(e,t,r),i=rce.spawn(n.command,n.args,n.options);return dk.hookChildProcess(i,n),i}s(nce,"spawn");function Bdt(e,t,r){let n=fk(e,t,r),i=rce.spawnSync(n.command,n.args,n.options);return i.error=i.error||dk.verifyENOENTSync(i.status,n),i}s(Bdt,"spawnSync");p_.exports=nce;p_.exports.spawn=nce;p_.exports.sync=Bdt;p_.exports._parse=fk;p_.exports._enoent=dk});var oce=h((v2t,sce)=>{"use strict";sce.exports=e=>{let t=typeof e=="string"?`
301
+ `)}s(g1,"processNode");function eae(e,t){return(0,Xoe.sanitizedIdentifierName)(e)+`_refsData_${t}`}s(eae,"getRefIdentifierName")});var nae=h(Km=>{"use strict";var E1=Km&&Km.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Km,"__esModule",{value:!0});Km.runtimeConfigPlugin=void 0;var xut=E1(_n()),qut=E1(require("fs/promises")),BF=E1(require("path")),Fut=E1(mn()),y1="runtime-config",rae="runtime-config-plugin";function kut(){return{name:y1,setup(e){e.onResolve({filter:/^\.\.\/modules\/zuplo.runtime.ts$/},t=>({namespace:rae,path:BF.default.isAbsolute(t.path)?t.path:BF.default.join(t.resolveDir,t.path),pluginName:y1})),e.onLoad({filter:/.*/,namespace:rae},async t=>Fut.default.timeFn("Generating zuplo.runtime.ts data",async()=>{let r="export const runtimeInit = undefined;",n=[];return await xut.default.fileExists(t.path)?(r=await qut.default.readFile(t.path,"utf-8"),{contents:r,loader:"ts",resolveDir:BF.default.dirname(t.path),errors:n,pluginName:y1,watchFiles:[t.path]}):{contents:r,loader:"ts",errors:n,pluginName:y1}}))}}}s(kut,"runtimeConfigPlugin");Km.runtimeConfigPlugin=kut});var cae=h(Ms=>{"use strict";var Fd=Ms&&Ms.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ms,"__esModule",{value:!0});Ms.isPolicyPresentInOperation=Ms.getPolicyNamesReferencingPolicyHandlers=Ms.schemaValidationSource=Ms.schemaValidationPlugin=void 0;var Wm=Gf(),HE=require("@zuplo/runtime/internal"),iae=Fd(_n()),But=Fd(cU()),Gut=Fd(lU()),b1=Fd(require("fs/promises")),Zc=Fd(require("path")),Vut=Fd(require("prettier")),GF=kt(),zut=Fd(Xs()),VF="schema-validation-plugin",sae="schema-validation",Hut="module.exports = {}";function Kut(e){return{name:"schema-validation-plugin",setup(t){t.onResolve({filter:/ajv-schema.json$/},r=>({namespace:sae,path:r.path,pluginName:VF})),t.onLoad({filter:/.*/,namespace:sae},async r=>{let n=Zc.default.resolve(e.sourceDirectory,GF.USER_CONFIG_DIR_NAME,"policies.json");if(!e.isOpenApiBased||!await iae.default.fileExists(n))return{contents:Hut,loader:"js",resolveDir:Zc.default.dirname(r.path),pluginName:VF};let i=await Wut(e.sourceDirectory),o=Zc.default.resolve(e.sourceDirectory,GF.USER_CONFIG_DIR_NAME),a=await(0,Wm.getOpenApiFilesByAlphabetical)(o),u=await Jut(a,i),c=await oae({oasFiles:a,routesWithSchemaValidation:u,sourceDirectory:e.sourceDirectory,logger:e.logger});if(zut.default.DEBUG_BUILD_MODE&&c){let l=Zc.default.join(e.sourceDirectory,GF.BUILD_OUTPUT_DIR),f=Zc.default.resolve(l,"schema-validation.js");await iae.default.mkdirForFilePathIfNotExits(f);let d=await Vut.default.format(c,{parser:"babel"});await b1.default.writeFile(f,d,"utf-8")}return{contents:c,loader:"js",resolveDir:Zc.default.dirname(r.path),pluginName:VF}})}}}s(Kut,"schemaValidationPlugin");Ms.schemaValidationPlugin=Kut;async function oae({oasFiles:e,routesWithSchemaValidation:t,sourceDirectory:r,logger:n}){let i="",o=new Wm.RefParser(r,n);if(t.length===0)return i;let a=new But.default({code:{source:!0},allErrors:!0,strict:!1,verbose:!0,meta:!0});for(let u of e){let c=await b1.default.readFile(u,"utf-8"),l=Zc.default.basename(u,".oas.json"),f=t.filter(y=>y.fileName===l),d=await o.resolve(u),_=JSON.parse(c),m=[],g=new Map;f.forEach(y=>{let b=_.paths[y.path][y.method];if(b.requestBody){let E;if(b.requestBody.$ref){let v=b.requestBody.$ref;E=d.get(v)?.content}else b.requestBody.content&&(E=b.requestBody.content);if(E)for(let v in E){let O=E[v].schema,P=(0,HE.getIdForRequestBodySchema)(y.path,y.method,v);O.$id=P,a.addSchema(O),zF(O,u,l,a,d,m,g)}}if(b.parameters)for(let E of b.parameters){let v=E.$ref?d.get(E.$ref):E,O=v.schema.$ref?d.get(v.schema.$ref):v.schema,P=(0,HE.getIdForParameterSchema)(y.path,y.method,v.in,v.name);O.$id=P,a.addSchema(O),zF(v,u,l,a,d,m,g)}});for(let y of m){let b=d.get(y),E=(0,HE.getIdForRefSchema)(l,y);a.addSchema(b,E)}}return i=(0,Gut.default)(a),i}s(oae,"schemaValidationSource");Ms.schemaValidationSource=oae;function zF(e,t,r,n,i,o,a){for(let u in e){let c=e[u];if(u==="$ref"){let l=(0,HE.getIdForRefSchema)(r,(0,Wm.getFullyQualifiedRefName)(t,c));e[u]=l,(0,Wm.chaseRefs)(t,r,(0,Wm.getFullyQualifiedRefName)(t,c),i,o,a,(f,d)=>(0,HE.getIdForRefSchema)(f,(0,Wm.getFullyQualifiedRefName)(t,d)))}else typeof c=="object"&&zF(c,t,r,n,i,o,a)}}s(zF,"addRefsToSchema");async function Wut(e){let t=new Set(["RequestValidationInboundPolicy"]),r=await b1.default.readFile(`${e}/config/policies.json`,"utf-8"),n=JSON.parse(r);return aae(n,t)}s(Wut,"getPolicyNamesUsingSchemaValidationPolicies");function aae(e,t){let r=new Set;e.policies?.forEach(i=>{i.handler?.export&&t.has(i.handler.export)&&i.handler.module==="$import(@zuplo/runtime)"&&r.add(i.name)});let n=Yut(e,r);return new Set([...r,...n])}s(aae,"getPolicyNamesReferencingPolicyHandlers");Ms.getPolicyNamesReferencingPolicyHandlers=aae;function Yut(e,t){let r=new Set;return e.policies?.forEach(n=>{n.handler?.export==="CompositeInboundPolicy"&&n.handler?.options?.policies?.forEach(i=>{t.has(i)&&r.add(n.name)})}),r}s(Yut,"getCompositePoliciesContainingPolicy");function uae(e,t){if(!e["x-zuplo-route"]||!e["x-zuplo-route"].policies)return!1;let r=e["x-zuplo-route"].policies.inbound;if(r){for(let i of r)if(t.has(i))return!0}let n=e["x-zuplo-route"].policies.outbound;if(n){for(let i of n)if(t.has(i))return!0}return!1}s(uae,"isPolicyPresentInOperation");Ms.isPolicyPresentInOperation=uae;async function Jut(e,t){let r=[];for(let n of e){let i=await b1.default.readFile(n,"utf-8"),a=JSON.parse(i).paths;for(let u in a){let c=a[u];for(let l in c){let f=c[l];uae(f,t)&&r.push({fileName:Zc.default.basename(n,".oas.json"),path:u,method:l})}}}return r}s(Jut,"getRoutesContainingPolicies")});var HF=h(Qc=>{"use strict";var Xut=Qc&&Qc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qc,"__esModule",{value:!0});Qc.BUILD_CONDITIONS=void 0;var Zut=A9(),S1=Xut(require("path")),Qut=hy(),ect=R9(),tct=L9(),rct=x9(),nct=JX(),ict=QX(),sct=Woe(),oct=tae(),act=nae(),uct=cae(),cct=(0,Zut.debug)("zuplo:core:build");Qc.BUILD_CONDITIONS=["workerd","worker","browser"];var lae=[...process.env.GLOBAL_MODULE_LOCATION?[process.env.GLOBAL_MODULE_LOCATION]:[],S1.default.resolve(__dirname,"..","..","..","node_modules"),S1.default.resolve(__dirname,"..","..","..","..","..","node_modules"),...require.main?.paths??[]];async function lct({dev:e=!1,targetPlatform:t,systemDirectory:r,outputDirectory:n,sourceDirectory:i,logger:o,flags:a}){let u=S1.default.join(r,(0,Qut.getBuildEntry)(t));cct(`Building with node paths: ${lae.join(", ")}`);let c=e===!1?{minify:!0}:{minify:!1,keepNames:!0,metafile:!0},l={platform:"browser",target:"es2022",outfile:S1.default.join(n,"worker.js")};return{format:a?.esmWorker===!0?"esm":"iife",banner:{js:`'use strict';
302
+ `},nodePaths:lae,entryPoints:[u],...l,sourcemap:"linked",legalComments:"linked",treeShaking:!0,bundle:!0,...c,external:[],logLevel:"silent",conditions:Qc.BUILD_CONDITIONS,plugins:[(0,rct.environmentPlugin)({sourceDirectory:i,targetPlatform:t}),(0,ect.blockRemoteModulePlugin)({logger:o}),(0,sct.openApiRoutesPlugin)({sourceDirectory:i,outputDirectory:n}),(0,oct.rawRoutePlugin)({sourceDirectory:i,targetPlatform:t,logger:o}),(0,uct.schemaValidationPlugin)({sourceDirectory:i,logger:o,isOpenApiBased:!0}),(0,act.runtimeConfigPlugin)(),(0,tct.devPortalConfigPlugin)({sourceDirectory:i}),(0,nct.jsonSchemaPlugin)({sourceDirectory:i,outputDirectory:n}),(0,ict.nodejsCompatPlugin)({nodeCompatEnabled:a?.esmWorker===!0,sourceDirectory:i})]}}s(lct,"getBaseESBuildConfig");Qc.default=lct});var pae=h(Us=>{"use strict";var fct=Us&&Us.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),dct=Us&&Us.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),pct=Us&&Us.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&fct(t,e,r);return dct(t,e),t},dae=Us&&Us.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Us,"__esModule",{value:!0});Us.getRunEsBuildPlugin=void 0;var hct=Gf(),fae=Yo(),mct=pct(require("esbuild")),_ct=dae(mn()),gct=$P(),yct=dae(HF()),KF=hy(),Ect=s(function(e){return s(async function({systemDirectory:r,outputDirectory:n,sourceDirectory:i,dev:o,targetPlatform:a,generateSourceMaps:u,buildId:c,logger:l,config:f}){return _ct.default.timeFn("Running esbuild",async()=>{l.info(`Running build for platform ${a}, build_id: ${c}`);let d=await(0,yct.default)({systemDirectory:r,outputDirectory:n,targetPlatform:a,generateSourceMaps:u,sourceDirectory:i,dev:o,logger:l,flags:f.flags}),_,m=new Date;try{if(!await(0,hct.oasFileInProject)(i))throw new Error("Failed to build project because no open-api file was found on the 'config' folder");_=await mct.build(d)}catch(y){if(l.error(y),y.errors||y.warnings)_=y;else if(y.message.includes("Failed to build project because no open-api file was found on the 'config' folder"))_={warnings:[],errors:[{id:"missing-open-api-file",text:"Failed to build project because no open-api file was found on the 'config' folder",pluginName:KF.ESBUILD_PLUGIN_NAME,location:null,notes:[],detail:"Failed to build project because no open-api file was found on the 'config' folder"}],outputFiles:void 0,metafile:void 0,mangleCache:void 0};else throw y}let g=new Date;if(e(new gct.CompilerResult(_,{endBuildTime:g,startBuildTime:m,buildId:c??""})),_.errors.length>0){_.errors.length>1&&(_.errors.length=1);let y=_.errors[0];l.debug(y)}return{warnings:[..._.warnings.map(y=>({message:y.text,pluginName:KF.ESBUILD_PLUGIN_NAME,severity:fae.WARNING_SEVERITY}))],errors:[..._.errors.map(y=>({message:y.text,pluginName:KF.ESBUILD_PLUGIN_NAME,severity:fae.ERROR_SEVERITY}))]}})},"runEsbuild")},"getRunEsBuildPlugin");Us.getRunEsBuildPlugin=Ect});var YF=h(Jm=>{"use strict";var mae=Jm&&Jm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jm,"__esModule",{value:!0});Jm.build=void 0;var Ym=Yo(),bct=require("crypto"),Sct=require("fs"),KE=mae(require("path")),hae=kt(),vct=rc(),Oct=mae(mn()),Pct=Bz(),wct=th(),Ict=zz(),Tct=Hz(),Nct=Kz(),Act=Zz(),Rct=Qz(),Cct=nH(),$ct=p9(),Dct=m9(),Lct=pae(),WF=hy(),v1;try{let e=(0,Sct.readFileSync)(KE.default.resolve(__dirname,"../../package.json"),"utf-8");v1=JSON.parse(e).version}catch{v1="0.0.0"}async function jct({sourceDirectory:e,dev:t,targetPlatform:r,generateSourceMaps:n=!1,noCompile:i=!1,deploymentName:o=KE.default.basename(e),logger:a,publicZuploEnvironmentVariables:u={},entitlements:c,projectId:l,customDomain:f,environmentType:d,postBuildTasks:_}){let m=(0,bct.randomUUID)(),g=a.child({buildId:m});return Oct.default.timeFn(`Run Build for platform: ${r}, build_id: ${m}`,async()=>{let y=await(0,Pct.getZuploConfig)(e),b=KE.default.join(e,hae.BUILD_OUTPUT_DIR),E;if("errors"in y)E={status:"Failed",flags:void 0,compatibilityDate:void 0,runtimeVersion:v1,outputPath:b,buildTaskResult:{buildTime:"",buildTimeMs:0,status:Ym.FAILURE_STATUS,buildId:m,warnings:[],errors:y.errors}};else{let O={dev:t,targetPlatform:r,generateSourceMaps:n,deploymentName:o,sourceDirectory:e,outputDirectory:b,systemDirectory:KE.default.join(e,hae.GENERATED_SOURCE_DIR_NAME),buildId:m,logger:g,config:y.config,publicZuploEnvironmentVariables:u,projectId:l,entitlements:c,customDomain:f,environmentType:d},P=[];P.push(Ict.cleanOutput),P.push(Tct.createSystemDir),P.push(Nct.checkForDeprecations),P.push(Act.generateBuildData),P.push(Cct.validateDevPortalJSON),P.push($ct.validateOpenAPIFiles),r==wct.TargetPlatform.Worker&&P.push(Rct.generateWorker);let I,j=s(Q=>{I=Q},"compileCallback");i||P.push((0,Lct.getRunEsBuildPlugin)(j)),P.push(Dct.verifyWorkerOutput),_&&P.push(..._);let x=await(0,vct.runPlugins)(P,O),H=x.errors.length>0?Ym.FAILURE_STATUS:x.warnings.length>0?Ym.WARNING_STATUS:Ym.GOOD_STATUS;E={status:H==="Failed"||I===void 0||I.status==="Failed"?"Failed":H==="Warnings"||I.status==="Warnings"?"Warnings":"Good",compatibilityDate:y.config.compatibilityDate,runtimeVersion:v1,outputPath:b,compilerResult:I,buildTaskResult:{buildTime:"",buildTimeMs:0,status:H,buildId:m,warnings:x.warnings,errors:x.errors},flags:y.config.flags}}if(E.buildTaskResult.warnings.length>0){E.buildTaskResult.warnings.forEach(P=>{g.warn(P)});let O=E.buildTaskResult.warnings.filter(P=>P.pluginName!=="runEsbuild"&&P.pluginName!==WF.ESBUILD_PLUGIN_NAME);O.length>0&&(E.buildTaskResult.warnings=O),E.buildTaskResult.status=Ym.WARNING_STATUS}if(E.buildTaskResult.errors.length>0){E.buildTaskResult.errors.forEach(P=>{g.error(P)});let O=E.buildTaskResult.errors.filter(P=>P.pluginName!=="runEsbuild"&&P.pluginName!==WF.ESBUILD_PLUGIN_NAME);O.length>0&&(E.buildTaskResult.errors=O),E.buildTaskResult.status=Ym.FAILURE_STATUS}if(g.debug(`Build ${E.compilerResult?.buildId??m} completed ${i?"on watch mode":"with compiler status "+E.compilerResult?.status} and build task status ${E.buildTaskResult.status}`),E.compilerResult){let{metafile:O,...P}=E.compilerResult;g.debug(`Compiler results for build ${E.compilerResult?.buildId??m}`,P)}g.debug(`Build task results for build ${E.buildTaskResult?.buildId??m}`,E.buildTaskResult);let v=KE.default.basename(e);return(0,WF.formatBuildResult)(E,v,g)})}s(jct,"build");Jm.build=jct});var P1=h(xs=>{"use strict";var Mct=xs&&xs.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Uct=xs&&xs.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),xct=xs&&xs.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Mct(t,e,r);return Uct(t,e),t},O1=xs&&xs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xs,"__esModule",{value:!0});xs.BuildWatcher=void 0;var _ae=Yo(),qct=O1(require("chokidar")),Fct=xct(require("esbuild")),gae=require("crypto"),kct=O1(require("events")),WE=O1(require("path")),yae=kt(),Bct=YF(),Eae=$P(),Gct=O1(HF()),bae=hy(),JF=class extends kct.default{static{s(this,"WatchEmitter")}},XF=class{static{s(this,"BuildWatcher")}esbuildContext;emitter=new JF;envFilesWatcher;outputDirectory;sourceDirectory;dev;targetPlatform;generateSourceMaps;logger;publicZuploEnvironmentVariables;projectName;constructor({sourceDirectory:t,dev:r,targetPlatform:n,generateSourceMaps:i,logger:o,publicZuploEnvironmentVariables:a={}}){this.sourceDirectory=t,this.dev=r,this.targetPlatform=n,this.outputDirectory=WE.default.join(t,yae.BUILD_OUTPUT_DIR),this.generateSourceMaps=i??!1,this.logger=o,this.publicZuploEnvironmentVariables=a,this.projectName=WE.default.basename(t),this.envFilesWatcher=qct.default.watch([WE.default.join(t,".env"),WE.default.join(t,".env.zuplo")])}watchEnvFiles(){this.envFilesWatcher.on("change",async()=>{this.emitter.emit("reload",null,null)}),this.envFilesWatcher.on("add",async()=>{this.emitter.emit("reload",null,null)}),this.envFilesWatcher.on("unlink",async()=>{this.emitter.emit("reload",null,null)})}onReload=t=>{this.emitter.on("reload",t)};async start(){let{sourceDirectory:t}=this;if(this.esbuildContext!==void 0)throw new Error("Watcher cannot be started more than once");let r=await(0,Bct.build)({sourceDirectory:t,noCompile:!0,dev:this.dev,targetPlatform:this.targetPlatform,generateSourceMaps:this.generateSourceMaps,publicZuploEnvironmentVariables:this.publicZuploEnvironmentVariables,logger:this.logger}),n=await(0,Gct.default)({systemDirectory:WE.default.join(t,yae.GENERATED_SOURCE_DIR_NAME),outputDirectory:this.outputDirectory,targetPlatform:this.targetPlatform,sourceDirectory:t,dev:this.dev,generateSourceMaps:this.generateSourceMaps,logger:this.logger,flags:r.flags}),i=this;n.plugins?.push({name:"on-end",setup(o){o.onEnd(a=>{i.logger.debug("Watcher (build) reloaded");let u;if(a)if(u=new Eae.CompilerResult(a),u.errors.length>0){let c={status:"Failed",runtimeVersion:"0.0.0",buildTaskResult:{buildTime:"",buildTimeMs:0,status:_ae.FAILURE_STATUS,buildId:(0,gae.randomUUID)(),warnings:[],errors:[]}};c.compilerResult=u,(0,bae.formatBuildResult)(c,i.projectName,i.logger),i.logger.error(c.compilerResult.errors,"Build errors")}else i.logger.debug(`Successfully rebuilt watched project. Build id ${u.buildId}`);i.emitter.emit("reload",r,null,u)})}}),this.esbuildContext=await Fct.context(n);try{let o=await this.esbuildContext.rebuild();if(o.errors.length>0){let a={status:"Failed",runtimeVersion:"0.0.0",buildTaskResult:{buildTime:"",buildTimeMs:0,status:_ae.FAILURE_STATUS,buildId:(0,gae.randomUUID)(),warnings:[],errors:[]}};a.compilerResult=new Eae.CompilerResult(o),(0,bae.formatBuildResult)(a,this.projectName,this.logger),this.logger.error(a.compilerResult.errors,"Build errors")}}catch(o){throw await this.close(),o}await this.esbuildContext.watch()}async close(){try{await this.envFilesWatcher.close(),this.esbuildContext&&(await this.esbuildContext.dispose(),this.logger.debug("ESBuild watcher closed"))}catch(t){this.logger.error(t)}}};xs.BuildWatcher=XF});var ZF=h(w1=>{"use strict";Object.defineProperty(w1,"__esModule",{value:!0});w1.HttpStatusCode=void 0;var Sae;(function(e){e[e.CONTINUE=100]="CONTINUE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.PROCESSING=102]="PROCESSING",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.ALREADY_REPORTED=208]="ALREADY_REPORTED",e[e.IM_USED=226]="IM_USED",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.FOUND=302]="FOUND",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.USE_PROXY=305]="USE_PROXY",e[e.SWITCH_PROXY=306]="SWITCH_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",e[e.URI_TOO_LONG=414]="URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.LOOP_DETECTED=508]="LOOP_DETECTED",e[e.NOT_EXTENDED=510]="NOT_EXTENDED",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED"})(Sae||(w1.HttpStatusCode=Sae={}))});var vae=h(I1=>{"use strict";Object.defineProperty(I1,"__esModule",{value:!0});I1.getSourceControlProviderLabel=void 0;function Vct(e){let t="";switch(e){case"GITLAB":t="GitLab";break;case"GITHUB":t="GitHub";break;case"BITBUCKET":t="BitBucket";break;default:t=e;break}return t}s(Vct,"getSourceControlProviderLabel");I1.getSourceControlProviderLabel=Vct});var Pae=h(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.DEPLOYMENT_NO_ACCESS=S.INVALID_SOURCE_REPO_URL=S.SHARED_PROJECT_PREVIOUSLY_INITIALIZED=S.PROJECT_MUST_HAVE_ONE_MEMBER=S.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS=S.PROJECT_MEMBER_ALREADY_EXISTS=S.PROJECT_MEMBER_NOT_FOUND=S.INVALID_TEMPLATE_REPOSITORY=S.INCORRECT_PROJECT_TEMPLATE=S.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS=S.PROJECT_NOT_FOUND=S.PROJECT_NOT_FOUND_FOR_SOURCE_REPO=S.PROJECT_SHARING_DISABLED_ON_ACCOUNT=S.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED=S.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED=S.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE=S.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER=S.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND=S.ACCOUNT_MEMBER_INVITE_INVALID=S.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST=S.ACCOUNT_MEMBER_DOES_NOT_EXIST=S.ACCOUNT_MEMBER_INFO_MISSING=S.ACCOUNT_MEMBER_ALREADY_EXISTS=S.ACCOUNT_UPDATE_INFO_MISSING=S.ACCOUNT_INFO_MISSING=S.ACCOUNT_DOES_NOT_EXISTS=S.INVALID_ACCOUNT_LABEL_ENDING=S.INVALID_ACCOUNT_NAME_ENDING=S.ACCOUNT_NAME_ALREADY_IN_USE=S.INVALID_ACCOUNT_LABEL=S.INVALID_ACCOUNT_NAME=S.ACCOUNT_LABEL_LENGTH_LIMIT_REACHED=S.ACCOUNT_NAME_LENGTH_LIMIT_REACHED=S.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD=S.ACCOUNT_NAME_USES_RESERVED_KEYWORD=S.ACCOUNT_ALREADY_EXISTS=S.ACCOUNT_NOT_FOUND=S.USER_IS_NOT_SERVICE_ACCOUNT=S.USER_REMOVE_NOT_MEMBER_ACCOUNT=S.USER_HAS_NO_ACCESS_TO_ACCOUNT=S.USER_DETAILS_CANNOT_BE_FOUND=S.USER_ALREADY_EXISTS=S.CLIENT_NOT_FOUND=S.FORBIDDEN=S.UNAUTHORIZED=S.METHOD_NOT_ALLOWED=S.NOT_FOUND=S.CONFLICT=S.BAD_REQUEST=S.INTERNAL_SERVER_ERROR=void 0;S.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=S.GITHUB_INTEGRATION_ALREADY_EXISTS=S.FEATURE_FLAGS_NOT_FOUND=S.MAX_ALLOWED_PROJECTS_LIMIT_REACHED=S.PROJECT_ALREADY_HAS_REPO=S.PROJECT_INVALID_NAME=S.FAILED_TO_REVOKE_GH_TOKEN=S.USER_ACCOUNT_NOT_FS_MIGRATED=S.USER_NO_ACCESS_GITLAB_REPO=S.USER_NO_ACCESS_BITBUCKET_REPO=S.GITHUB_APP_CONFIGURATION_NOT_FOUND=S.GITHUB_APP_NO_USER_ACCESS_=S.GITHUB_APP_NO_NAMESPACE_ACCESS=S.GENERIC_GITHUB_BRANCH_INFO_ERROR=S.GITHUB_USER_NO_READ_ACCESS_REPO=S.USER_NO_PULL_ACCESS_GITHUB_REPO=S.USER_NO_ACCESS_GITHUB_REPO=S.PROJECT_SHARING_REQUIRES_GIT_REPO=S.PROJECT_INVALID_GIT_REPO=S.PROJECT_INVALID_GIT_CLONE=S.USER_IS_PROJECT_MEMBER=S.USER_HAS_NO_ACCESS_TO_PROJECT=S.RUNTIME_FLAG_KEY_NOT_VALID=S.RUNTIME_FLAG_NOT_FOUND=S.RUNTIME_FLAG_ALREADY_EXISTS=S.PROJECT_NO_MEMBERS=S.PROJECT_ALREADY_EXISTS=S.SERVICE_CONFIGURATION_FAILED_DECRYPTION=S.WORKING_COPY_SERVICE_NOT_CREATED=S.WORKING_COPY_SERVICE_NOT_DELETED=S.WORKING_COPY_SERVICE_NOT_FOUND=S.SERVICE_CONFIGURATION_NOT_FOUND=S.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE=S.DEPLOYMENT_INCORRECT_STATUS_PAUSE=S.DEPLOYMENT_NOT_WORKING_COPY=S.DEPLOYMENT_LOG_NOT_FOUND=S.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY=S.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB=S.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT=S.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT=S.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED=S.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE=S.DEPLOYMENT_DELETE_ERROR=S.DEPLOYMENT_CANNOT_DELETE_INSTANCE=S.DEPLOYMENT_INVALID_MULTI_PART=S.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART=S.DEPLOYMENT_FILE_DOES_NOT_EXISTS=S.DEPLOYMENT_NOT_FOUND=S.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST=S.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH=void 0;S.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION=S.THIRD_PARTY_APP_CONNECTION_NOT_FOUND=S.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND=S.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR=S.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR=S.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST=S.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR=S.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED=S.SOURCE_CONTROL_REMOTE_BRANCH_EXISTS=S.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND=S.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION=S.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING=S.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING=S.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS=S.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS=S.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED=S.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS=S.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND=S.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND=S.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE=S.SOURCE_CONTROL_REPO_OPERATION_ERROR=S.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE=S.SOURCE_CONTROL_REPO_NOT_FOUND=S.SOURCE_CONTROL_AUTHENTICATION_FAILED=S.EXTERNAL_SERVICE_GENERIC_ERROR=S.API_USER_NO_ACCESS=S.EXTERNAL_USER_NOT_CONFIGURED=S.EXTERNAL_USER_NO_ACCESS=S.CONSUMER_CANNOT_BE_CREATED=S.CONSUMER_DOES_NOT_EXIST=S.CONSUMER_NO_ACCESS=S.GITLAB_ACCESS_LEVEL_CHECK_FAIL=S.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=S.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=S.GITLAB_DUPLICATE_REPO=S.GITLAB_FAILED_DURING_REPO_CREATION=S.GITLAB_QUERY_USER_INFO_FAILED=S.BITBUCKET_FAILED_DURING_REPO_CREATION=S.BITBUCKET_WORKSPACE_MISCONFIGURATION=S.BITBUCKET_QUERY_USER_INFO_FAILED=S.GITHUB_INTEGRATION_INVALID_REPO=S.GIT_CREATE_PROJECT_WITH_INVALID_REPO=S.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=S.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=S.GITHUB_INTEGRATION_DUPLICATE_REPO=S.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED=S.GITHUB_INTEGRATION_AUTHENTICATION_FAILED=S.GITHUB_INTEGRATION_BRANCH_BEHIND=S.GITHUB_INTEGRATION_NOT_FOUND=S.GITHUB_REPOSITORY_NOT_FOUND=void 0;S.METERING_BUCKET_CREATION_FAILED=S.UNABLE_UPGRADE_PLAN=S.BUCKET_NOT_FOUND=S.BUCKET_API_KEY_SERVICE_CONFLICT=S.DIRECTORY_DELETE_FAILED=S.FILE_DELETE_FAILED=S.CANNOT_DELETE_SOLE_OPEN_API_FILE=S.CANNOT_DELETE_ESSENTIAL_DIRECTORY=S.CANNOT_DELETE_ESSENTIAL_FILE=S.FILE_WRITE_FAILED=S.FILE_RENAME_FAILED=S.FILE_RENAME_FILE_ALREADY_EXISTS=S.FILE_RENAME_CANNOT_CHANGE_EXTENSION=S.FILE_RENAME_PATHS_MATCH=S.DIRECTORY_CREATION_FAILED=S.DIRECTORY_OR_FILE_DOES_NOT_EXIST=S.DIRECTORY_DOES_NOT_EXIST=S.DIRECTORY_ALREADY_EXISTS=S.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=S.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=S.FAILED_DOWNLOAD_FROM_STORAGE=S.CANNOT_FIND_SRC_DIRECTORY=S.CANNOT_READ_PACKAGE_JSON=S.PACKAGE_JSON_NOT_FOUND=S.RUNTIME_VERSION_INCORRECT_FORMAT=S.MIGRATIONS_ONLY_ON_WORKING_COPY=S.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=S.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=S.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR=S.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2=S.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE=S.NO_GLOBAL_SYMBOLS=S.NO_ZUPLO_PREFIXED_VARIABLES=S.NON_EMPTY_TARGETS_REQUIRED=S.CONFLICTING_TYPES=S.OVERLAPPING_TARGETS=S.INVALID_BRANCH_NAME=S.TARGET_BRANCH_ONLY_FOR_PREVIEW=S.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY=S.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE=S.DEPLOYMENT_NAME_MISSING=S.NON_EXISTENT_ENVIRONMENT_VARIABLE=S.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE=S.ENVIRONMENT_VARIABLE_VALIDATION_ERROR=S.DUPLICATE_ENVIRONMENT_VARIABLE=void 0;var A=ZF(),Oae=vae(),zct="https://github.com/apps/zuplo/installations/new";S.INTERNAL_SERVER_ERROR={type:"https://zup.fail/http-status/500",title:"Internal Server Error",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};S.BAD_REQUEST={type:"https://zup.fail/http-status/400",title:"Bad Request",status:A.HttpStatusCode.BAD_REQUEST};S.CONFLICT={type:"https://zup.fail/http-status/409",title:"Conflict",status:A.HttpStatusCode.CONFLICT};S.NOT_FOUND={type:"https://zup.fail/http-status/404",title:"Not Found",status:A.HttpStatusCode.NOT_FOUND};S.METHOD_NOT_ALLOWED={type:"https://zup.fail/http-status/405",title:"Method Not Allowed",status:A.HttpStatusCode.METHOD_NOT_ALLOWED};S.UNAUTHORIZED={type:"https://zup.fail/http-status/401",title:"Unauthorized",status:A.HttpStatusCode.UNAUTHORIZED};S.FORBIDDEN={type:"https://zup.fail/http-status/403",title:"Forbidden",status:A.HttpStatusCode.FORBIDDEN};S.CLIENT_NOT_FOUND={type:"https://zup.fail/client-not-found",title:"Client not found",status:A.HttpStatusCode.NOT_FOUND};S.USER_ALREADY_EXISTS={type:"https://zup.fail/user-already-exists",title:"User already exists",status:A.HttpStatusCode.CONFLICT};S.USER_DETAILS_CANNOT_BE_FOUND={type:"https://zup.fail/user-details-cannot-be-found",title:"User cannot be found",status:A.HttpStatusCode.NOT_FOUND};S.USER_HAS_NO_ACCESS_TO_ACCOUNT={type:"https://zup.fail/user-has-no-access-to-account",title:"Not a member of the account",status:A.HttpStatusCode.UNAUTHORIZED};S.USER_REMOVE_NOT_MEMBER_ACCOUNT={type:"https://zup.fail/removed-user-not-account-member",title:"The user being removed is not a member of the account",status:A.HttpStatusCode.BAD_REQUEST};S.USER_IS_NOT_SERVICE_ACCOUNT={type:"https://zup.fail/user-not-service-account",title:"User is not a service account",status:A.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_NOT_FOUND={type:"https://zup.fail/account-not-found",title:"Account not found",status:A.HttpStatusCode.NOT_FOUND};S.ACCOUNT_ALREADY_EXISTS={type:"https://zup.fail/account-already-exists",title:"Account already exists",status:A.HttpStatusCode.CONFLICT};S.ACCOUNT_NAME_USES_RESERVED_KEYWORD={type:"https://zup.fail/account-name-reserved-keyword",title:"The account name can not use reserved keyword 'zuplo'",status:A.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD={type:"https://zup.fail/account-use-reserved-keyword",title:"The account name can not start with a reserved keyword",status:A.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_NAME_LENGTH_LIMIT_REACHED={type:"https://zup.fail/account-name-length-limit",title:"The account name exceeds the 200 character limit",status:A.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_LABEL_LENGTH_LIMIT_REACHED={type:"https://zup.fail/account-label-length-limit",title:"The account label exceeds the 200 character limit",status:A.HttpStatusCode.BAD_REQUEST};S.INVALID_ACCOUNT_NAME={type:"https://zup.fail/invalid-account-name",title:"The account name can only contain lower-cased characters, numbers, dashes and underscores",status:A.HttpStatusCode.BAD_REQUEST};S.INVALID_ACCOUNT_LABEL={type:"https://zup.fail/invalid-account-label",title:"The account label can only contain alpha-numeric characters, spaces, dashes and underscores",status:A.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_NAME_ALREADY_IN_USE={type:"https://zup.fail/account-name-in-use",title:"The account name is already taken. Please try again using a different name.",status:A.HttpStatusCode.BAD_REQUEST};S.INVALID_ACCOUNT_NAME_ENDING={type:"https://zup.fail/invalid-account-name-ending",title:"The account name can not end with a dash or underscore character",status:A.HttpStatusCode.BAD_REQUEST};S.INVALID_ACCOUNT_LABEL_ENDING={type:"https://zup.fail/invalid-account-label-ending",title:"The account label can not end with a dash or underscore character",status:A.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_DOES_NOT_EXISTS={type:"https://zup.fail/account-does-not-exists",title:"You are not a member of any accounts",status:A.HttpStatusCode.NOT_FOUND};S.ACCOUNT_INFO_MISSING={type:"https://zup.fail/account-info-missing",title:"Account information is required",status:A.HttpStatusCode.NOT_FOUND};S.ACCOUNT_UPDATE_INFO_MISSING={type:"https://zup.fail/account-update-info-missing",title:"Account information is insufficient for this operation.",status:A.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/account-member-already-exists",title:"Account member already exists",status:A.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_MEMBER_INFO_MISSING={type:"https://zup.fail/account-member-info-missing",title:"Account member information is required",status:A.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_MEMBER_DOES_NOT_EXIST={type:"https://zup.fail/account-member-does-not-exists",title:"Account member information cannot be found",status:A.HttpStatusCode.NOT_FOUND};S.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST={type:"https://zup.fail/account-member-invite-does-not-exist",title:"Account member invite cannot be found",status:A.HttpStatusCode.NOT_FOUND};S.ACCOUNT_MEMBER_INVITE_INVALID={type:"https://zup.fail/account-member-invite-invalid",title:"Account member invite is invalid",status:A.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND={type:"https://zup.fail/account-member-invite-failed-send",title:"We were not able to send the account member invite. Please try again or contact support.",status:A.HttpStatusCode.BAD_REQUEST};S.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER={type:"https://zup.fail/account-member-cannot-be-invited",title:"The user is already part of the account.",status:A.HttpStatusCode.BAD_REQUEST};S.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE={type:"https://zup.fail/existing-pending-account-member-invites",title:"The user has a pending invitation to this account.",status:A.HttpStatusCode.BAD_REQUEST};S.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED={type:"https://zup.fail/no-multi-account-members",title:"Account is not configured for multiple members",status:A.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED={type:"https://zup.fail/account-members-limit-reached",title:"This account has reached the limit of users allowed by its current billing plan.",status:A.HttpStatusCode.BAD_REQUEST};S.PROJECT_SHARING_DISABLED_ON_ACCOUNT={type:"https://zup.fail/project-sharing-disabled-on-account",title:"Project sharing is not enabled on account",status:A.HttpStatusCode.FORBIDDEN};S.PROJECT_NOT_FOUND_FOR_SOURCE_REPO={type:"https://zup.fail/project-not-found-for-source-repo",title:"Project not found for provided repository",status:A.HttpStatusCode.NOT_FOUND};S.PROJECT_NOT_FOUND={type:"https://zup.fail/project-not-found",title:"Project not found",status:A.HttpStatusCode.NOT_FOUND};S.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS={type:"https://zup.fail/project-cannot-be-deleted-protected-deployments-exists",title:"Project cannot be deleted because it has protected deployments",detail:"Project has protected deployments. Make sure to remove the use of custom domains before trying to delete the project.",status:A.HttpStatusCode.FORBIDDEN};S.INCORRECT_PROJECT_TEMPLATE={type:"https://zup.fail/incorrect-project-template",title:"Incorrect project template name",status:A.HttpStatusCode.BAD_REQUEST};var Hct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:`The repository '${e} is not a valid Zuplo template repository`,status:A.HttpStatusCode.FORBIDDEN}),"INVALID_TEMPLATE_REPOSITORY");S.INVALID_TEMPLATE_REPOSITORY=Hct;S.PROJECT_MEMBER_NOT_FOUND={type:"https://zup.fail/project-member-not-found",title:"Project Member not found",status:A.HttpStatusCode.NOT_FOUND};S.PROJECT_MEMBER_ALREADY_EXISTS={type:"https://zup.fail/project-member-already-exists",title:"Project Member already exists",status:A.HttpStatusCode.BAD_REQUEST};S.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS={type:"https://zup.fail/cannt-delete-your-own-project-member",title:"Can not delete your own Project Member record",status:A.HttpStatusCode.BAD_REQUEST};S.PROJECT_MUST_HAVE_ONE_MEMBER={type:"https://zup.fail/project-must-have-one-member",title:"Project must have at least one member",status:A.HttpStatusCode.BAD_REQUEST};S.SHARED_PROJECT_PREVIOUSLY_INITIALIZED={type:"https://zup.fail/project-previously-initialized",title:"Project was previously initialized",status:A.HttpStatusCode.BAD_REQUEST};S.INVALID_SOURCE_REPO_URL={type:"https://zup.fail/invalid-source-repo-url",title:"Project is not connected to source control, a sourceRepoUrl property must be specified and valid",status:A.HttpStatusCode.BAD_REQUEST};S.DEPLOYMENT_NO_ACCESS={type:"https://zup.fail/deployment-no-access",title:"User does not have access to deployment",status:A.HttpStatusCode.FORBIDDEN};S.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH={type:"https://zup.fail/deployment-branch-does-not-exist",title:"A deployment record cannot be found for the provided branch.",detail:"You can only update a project's default branch to one that has been deployed.",status:A.HttpStatusCode.FORBIDDEN};S.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST={type:"https://zup.fail/default-deployment-does-not-exist",title:"A default deployment record cannot be found for the project.",detail:"You can only update a project's default branch to one that has been deployed.",status:A.HttpStatusCode.FORBIDDEN};S.DEPLOYMENT_NOT_FOUND={type:"https://zup.fail/deployment-not-found",title:"Deployment was not found",status:A.HttpStatusCode.NOT_FOUND};S.DEPLOYMENT_FILE_DOES_NOT_EXISTS={type:"https://zup.fail/deployment-file-does-not-exists",title:"Files were not found",status:A.HttpStatusCode.NOT_FOUND};S.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART={type:"https://zup.fail/deployment-request-is-not-multi-part",title:"Request is not multipart.",status:A.HttpStatusCode.BAD_REQUEST};S.DEPLOYMENT_INVALID_MULTI_PART={type:"https://zup.fail/deployment-invalid-multi-part",title:"Invalid request format. Must be multi-part file upload.",status:A.HttpStatusCode.BAD_REQUEST};S.DEPLOYMENT_CANNOT_DELETE_INSTANCE={type:"https://zup.fail/deployment-cannot-delete-instance",title:"Cannot delete instance of the deployment. Invalid account or project.",status:A.HttpStatusCode.NOT_FOUND};S.DEPLOYMENT_DELETE_ERROR={type:"https://zup.fail/deployment-delete-error",title:"Error deleting deployment instance.",status:A.HttpStatusCode.NOT_FOUND};S.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE={type:"https://zup.fail/deployment-invalid-environment-to-delete",title:"Invalid environment to delete deployment",status:A.HttpStatusCode.BAD_REQUEST};S.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED={type:"https://zup.fail/deployment-is-protected-cannot-be-deleted",title:"Deployment is protected and cannot be deleted",status:A.HttpStatusCode.FORBIDDEN};S.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid account",status:A.HttpStatusCode.NOT_FOUND};S.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid project name",status:A.HttpStatusCode.NOT_FOUND};S.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB={type:"https://zup.fail/deployment-log-not-found",title:"Deployment cannot be redeployed due to invalid user sub",status:A.HttpStatusCode.NOT_FOUND};S.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY={type:"https://zup.fail/deployment-cannot-be-deleted",title:"Deployment cannot be deleted since is a working copy",status:A.HttpStatusCode.FORBIDDEN};S.DEPLOYMENT_LOG_NOT_FOUND={type:"https://zup.fail/deployment-log-not-found",title:"DeploymentLog was not found",status:A.HttpStatusCode.NOT_FOUND};S.DEPLOYMENT_NOT_WORKING_COPY={type:"https://zup.fail/deployment-not-working-copy",title:"Deployment is not working copy.",status:A.HttpStatusCode.BAD_REQUEST};S.DEPLOYMENT_INCORRECT_STATUS_PAUSE={type:"https://zup.fail/deployment-incorrect-status-pause",title:"Deployment is not in a state to be paused.",status:A.HttpStatusCode.BAD_REQUEST};S.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE={type:"https://zup.fail/deployment-incorrect-status-unpause",title:"Deployment is not in a state to be unpaused.",status:A.HttpStatusCode.BAD_REQUEST};S.SERVICE_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Service configuration not found.",status:A.HttpStatusCode.NOT_FOUND};S.WORKING_COPY_SERVICE_NOT_FOUND={type:"https://zup.fail/service-config-not-found",title:"Working Copy service not found.",status:A.HttpStatusCode.NOT_FOUND};S.WORKING_COPY_SERVICE_NOT_DELETED={type:"https://zup.fail/working-copy-service-not-deleted",title:"Working Copy service failed to be deleted.",status:A.HttpStatusCode.BAD_REQUEST};S.WORKING_COPY_SERVICE_NOT_CREATED={type:"https://zup.fail/working-copy-service-not-created",title:"Working Copy service failed to be created.",status:A.HttpStatusCode.BAD_REQUEST};S.SERVICE_CONFIGURATION_FAILED_DECRYPTION={type:"https://zup.fail/service-config-not-decrypted",title:"Service configuration failed to decrypt.",status:A.HttpStatusCode.BAD_REQUEST};S.PROJECT_ALREADY_EXISTS={type:"https://zup.fail/project-already-exists",title:"Project already exists.",status:A.HttpStatusCode.BAD_REQUEST};S.PROJECT_NO_MEMBERS={type:"https://zup.fail/project-no-members",title:"Cannot find project members.",status:A.HttpStatusCode.NOT_FOUND};S.RUNTIME_FLAG_ALREADY_EXISTS={type:"https://zup.fail/runtime-flag-already-exists",title:"RuntimeFlag already exists.",status:A.HttpStatusCode.BAD_REQUEST};S.RUNTIME_FLAG_NOT_FOUND={type:"https://zup.fail/runtime-flag-not-found",title:"RuntimeFlag was not found.",status:A.HttpStatusCode.NOT_FOUND};S.RUNTIME_FLAG_KEY_NOT_VALID={type:"https://zup.fail/runtime-flag-key-not-valid",title:"RuntimeFlag key must be snake case",status:A.HttpStatusCode.BAD_REQUEST};S.USER_HAS_NO_ACCESS_TO_PROJECT={type:"https://zup.fail/user-has-no-access-to-project",title:"Not a member of the project",status:A.HttpStatusCode.FORBIDDEN};S.USER_IS_PROJECT_MEMBER={type:"https://zup.fail/user-is-project-member",title:"The user is already a project member.",status:A.HttpStatusCode.BAD_REQUEST};S.PROJECT_INVALID_GIT_CLONE={type:"https://zup.fail/project-invalid-git-clone",title:"Project requires defaultBranch & sourceRepoUrl for creation from a GitHub repository.",status:A.HttpStatusCode.BAD_REQUEST};S.PROJECT_INVALID_GIT_REPO={type:"https://zup.fail/project-invalid-git-repo",title:"The current source control repository is already in use by a Zuplo project",status:A.HttpStatusCode.BAD_REQUEST};S.PROJECT_SHARING_REQUIRES_GIT_REPO={type:"https://zup.fail/project-sharing-requires-git-repo",title:"The current project is not connected to a source control repository.",status:A.HttpStatusCode.BAD_REQUEST};var Kct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITHUB_REPO");S.USER_NO_ACCESS_GITHUB_REPO=Kct;var Wct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-repo",title:"You do not have pull access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"USER_NO_PULL_ACCESS_GITHUB_REPO");S.USER_NO_PULL_ACCESS_GITHUB_REPO=Wct;var Yct=s(({repositoryUrl:e})=>({type:"https://zup.fail/no-read-access-github-repo",title:"You do not have read access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",detail:`User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"GITHUB_USER_NO_READ_ACCESS_REPO");S.GITHUB_USER_NO_READ_ACCESS_REPO=Yct;S.GENERIC_GITHUB_BRANCH_INFO_ERROR={type:"https://zup.fail/gh-branch-info-error",title:"There was an error getting branch information for the GitHub repository associated to the project.",status:A.HttpStatusCode.BAD_REQUEST};S.GITHUB_APP_NO_NAMESPACE_ACCESS={type:"https://zup.fail/no-namespace-access-github-app",title:"The Zuplo GitHub app does not have access to the repositories under the namespace provided. Make sure to configure the GitHub Zuplo App on the repository.",status:A.HttpStatusCode.FORBIDDEN};var Jct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-github-app-repo",title:"The Zuplo GitHub app does not have access to the repository. Make sure to configure the GitHub Zuplo App on the repository.",detail:`The Zuplo GitHub app has not been granted access to the repository '${e}'. Go to '${zct}' to add the repository.`,status:A.HttpStatusCode.FORBIDDEN}),"GITHUB_APP_NO_USER_ACCESS_");S.GITHUB_APP_NO_USER_ACCESS_=Jct;S.GITHUB_APP_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/gh-app-not-found",title:"Global GitHub App configuration not found",status:A.HttpStatusCode.NOT_FOUND};var Xct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-bitbucket-repo",title:"You do not have access to the Bitbucket repository associated to the project. Ask your Bitbucket admin for access and try again.",detail:`User does not have access to the Bitbucket repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_BITBUCKET_REPO");S.USER_NO_ACCESS_BITBUCKET_REPO=Xct;var Zct=s(({repositoryUrl:e})=>({type:"https://zup.fail/user-no-access-gitlab-repo",title:"You do not have access to the GitLab repository associated to the project. Ask your GitLab admin for access and try again.",detail:`User does not have access to the GitLab repository associated to the project. Update the user permissions in '${e}' to add a new collaborator.`,status:A.HttpStatusCode.FORBIDDEN}),"USER_NO_ACCESS_GITLAB_REPO");S.USER_NO_ACCESS_GITLAB_REPO=Zct;S.USER_ACCOUNT_NOT_FS_MIGRATED={type:"https://zup.fail/user-account-not-fs-migrated",title:"User account is in a plan that does not allow project sharing. Please contact your account admin.",status:A.HttpStatusCode.FORBIDDEN};S.FAILED_TO_REVOKE_GH_TOKEN={type:"https://zup.fail/failed-to-revoke-gh-token",title:"Failed to revoke GitHub token for the user",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};S.PROJECT_INVALID_NAME={type:"https://zup.fail/project-invalid-name",title:"Project name is invalid, it only can contain letter, number and dashes.",status:A.HttpStatusCode.BAD_REQUEST};S.PROJECT_ALREADY_HAS_REPO={type:"https://zup.fail/project-already-has-repo",title:"The current project has been previously linked to a source control repository",status:A.HttpStatusCode.BAD_REQUEST};S.MAX_ALLOWED_PROJECTS_LIMIT_REACHED={type:"https://zup.fail/max-allowed-projects-limit-reached",title:"Your account has reached the maximum number of projects allowed.",status:A.HttpStatusCode.BAD_REQUEST};S.FEATURE_FLAGS_NOT_FOUND={type:"https://zup.fail/feature-flags-not-found",title:"Error trying to retrieve feature flags for this user",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};S.GITHUB_INTEGRATION_ALREADY_EXISTS={type:"https://zup.fail/github-integration-already-exists",title:"Error trying to create GitHub Integration, already exists.",status:A.HttpStatusCode.BAD_REQUEST};var Qct=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-not-found",title:"Cannot find a project configured for this repository",status:A.HttpStatusCode.CONFLICT,detail:`The repository ${e} does not have a GitHub configured project.`}),"GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND");S.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND=Qct;var elt=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-repo-not-found",title:"Cannot find a provided GitHub repository",status:A.HttpStatusCode.CONFLICT,detail:`The GitHub repository ${e} was not found.`}),"GITHUB_REPOSITORY_NOT_FOUND");S.GITHUB_REPOSITORY_NOT_FOUND=elt;S.GITHUB_INTEGRATION_NOT_FOUND={type:"https://zup.fail/github-integration-not-found",title:"Project is not integrated with GitHub",status:A.HttpStatusCode.NOT_FOUND,detail:"The project does not have a GitHub integration configured."};S.GITHUB_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/github-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:A.HttpStatusCode.BAD_REQUEST};S.GITHUB_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/github-integration-authentication-failed",title:"GitHub integration: Authentication failed",status:A.HttpStatusCode.FORBIDDEN};S.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED={type:"https://zup.fail/github-integration-query-user-info-failed",title:"Failed while requesting basic user info from GitHub",status:A.HttpStatusCode.FORBIDDEN};var tlt=s(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/github-integration-duplicate-repo",title:"A repository with that name already exists in GitHub",details:`A repository named '${e}' already exists on GitHub org '${t}'.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_DUPLICATE_REPO");S.GITHUB_INTEGRATION_DUPLICATE_REPO=tlt;var rlt=s(({repositoryName:e,details:t})=>({type:"https://zup.fail/github-integration-failed-repo-creation",title:"Failed to create a new repository in GitHub",details:t,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION");S.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION=rlt;var nlt=s(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-empty-repo",title:"The repository is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_EMPTY_REPO");S.GIT_CREATE_PROJECT_WITH_EMPTY_REPO=nlt;var ilt=s(({repositoryUrl:e})=>({type:"https://zup.fail/create-project-invalid-git-repo",title:"We can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",details:`Repository '${e}' is not a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GIT_CREATE_PROJECT_WITH_INVALID_REPO");S.GIT_CREATE_PROJECT_WITH_INVALID_REPO=ilt;var slt=s(({repositoryUrl:e})=>({type:"https://zup.fail/github-integration-invalid-repo",title:"We can only connect to an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.",details:`Repository '${e}' is not an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITHUB_INTEGRATION_INVALID_REPO");S.GITHUB_INTEGRATION_INVALID_REPO=slt;S.BITBUCKET_QUERY_USER_INFO_FAILED={type:"https://zup.fail/bitbucket-query-user-info-failed",title:"Failed while requesting basic user info from Bitbucket",status:A.HttpStatusCode.FORBIDDEN};S.BITBUCKET_WORKSPACE_MISCONFIGURATION={type:"https://zup.fail/bitbucket-workspace-misconfiguration",title:"Bitbucket source control configuration is missing workspace information",status:A.HttpStatusCode.FORBIDDEN};var olt=s(({details:e})=>({type:"https://zup.fail/bitbucket-failed-repo-creation",title:"Failed to create a new repository in Bitbucket",details:e,status:A.HttpStatusCode.BAD_REQUEST}),"BITBUCKET_FAILED_DURING_REPO_CREATION");S.BITBUCKET_FAILED_DURING_REPO_CREATION=olt;S.GITLAB_QUERY_USER_INFO_FAILED={type:"https://zup.fail/gitlab-query-user-info-failed",title:"Failed while requesting basic user info from GitLab",status:A.HttpStatusCode.FORBIDDEN};var alt=s(({details:e})=>({type:"https://zup.fail/gitlab-failed-repo-creation",title:"Failed to create a new repository in GitLab",details:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_FAILED_DURING_REPO_CREATION");S.GITLAB_FAILED_DURING_REPO_CREATION=alt;var ult=s(({repositoryName:e,orgName:t})=>({type:"https://zup.fail/gitlab-duplicate-repo",title:"A repository with that name already exists in GitLab",details:`A repository named '${e}' already exists in GitLab team '${t}'.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_DUPLICATE_REPO");S.GITLAB_DUPLICATE_REPO=ult;var clt=s(({orgName:e})=>({type:"https://zup.fail/gitlab-create-repo-perm",title:"The user's GitLab group access level does not allow for repository creation.",details:"The user's GitLab group access level does not allow for repository creation.",instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_PERM_CREATE_REPO");S.GITLAB_INSUFFICIENT_PERM_CREATE_REPO=clt;var llt=s(({namespaceLabel:e})=>({type:"https://zup.fail/gitlab-insufficient-namespace-access",title:`The user's GitLab access level does not allow the use of namespace '${e}'.`,details:`The user's GitLab access level does not allow the use of namespace '${e}'.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_INSUFFICIENT_NAMESPACE_ACCESS");S.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS=llt;var flt=s(({orgName:e})=>({type:"https://zup.fail/gitlab-access-check-fail",title:"Failed to verify user's GitLab group access level",instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"GITLAB_ACCESS_LEVEL_CHECK_FAIL");S.GITLAB_ACCESS_LEVEL_CHECK_FAIL=flt;S.CONSUMER_NO_ACCESS={type:"https://zup.fail/consumer-no-access",title:"User does not have access to this consumer.",status:A.HttpStatusCode.UNAUTHORIZED};S.CONSUMER_DOES_NOT_EXIST={type:"https://zup.fail/consumer-does-not-exist",title:"Consumer does not exist or cannot be accessed.",status:A.HttpStatusCode.NOT_FOUND};S.CONSUMER_CANNOT_BE_CREATED={type:"https://zup.fail/consumer-not-created",title:"Failed to create consumer",status:A.HttpStatusCode.BAD_GATEWAY};S.EXTERNAL_USER_NO_ACCESS={type:"https://zup.fail/external-user-no-access",title:"User does not have access to this external user.",status:A.HttpStatusCode.UNAUTHORIZED};S.EXTERNAL_USER_NOT_CONFIGURED={type:"https://zup.fail/external-user-not-configured",title:"User is not setup as an External User (Key Manager)",status:A.HttpStatusCode.FORBIDDEN};S.API_USER_NO_ACCESS={type:"https://zup.fail/api-user-no-access",title:"Api user does not have access to this endpoint.",status:A.HttpStatusCode.FORBIDDEN};S.EXTERNAL_SERVICE_GENERIC_ERROR={type:"https://zup.fail/external-service-generic-error",title:"Unable to complete API request for External Service.",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};var dlt=s(({sourceControlProvider:e})=>({type:"https://zup.fail/source-control-authentication-failed",title:"Source provider authentication failed",detail:`Could not authenticate to ${(0,Oae.getSourceControlProviderLabel)(e)}`,status:A.HttpStatusCode.UNAUTHORIZED}),"SOURCE_CONTROL_AUTHENTICATION_FAILED");S.SOURCE_CONTROL_AUTHENTICATION_FAILED=dlt;var plt=s(({sourceControlProvider:e})=>({type:"https://zup.fail/source-control-repo-not-found",title:"We cannot connect to the repository associated to the project, verify your source control access configuration and try again.",detail:`Could not connect to ${(0,Oae.getSourceControlProviderLabel)(e)} repository`,status:A.HttpStatusCode.NOT_FOUND}),"SOURCE_CONTROL_REPO_NOT_FOUND");S.SOURCE_CONTROL_REPO_NOT_FOUND=plt;S.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE={type:"https://zup.fail/source-control-empty-commit",title:"Commit operation failed because you provided an empty message. Please try again by providing a commit message.",status:A.HttpStatusCode.BAD_REQUEST};var hlt=s(({repoURL:e,operation:t})=>({type:`https://zup.fail/source-control-repo-${t}-error`,title:`Failed on ${t} operation to repository '${e}'. Verify you have read & write access to the repository and try again.`,detail:"Verify your source control configuration and make sure you have been granted read & write access to the repository",status:A.HttpStatusCode.FORBIDDEN}),"SOURCE_CONTROL_REPO_OPERATION_ERROR");S.SOURCE_CONTROL_REPO_OPERATION_ERROR=hlt;S.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE={type:"https://zup.fail/source-control-write-access-issue",title:"You do not have write access to the repository, verify your source control access configuration and try again.",detail:"Verify your source control configuration and make sure you have been granted access to the repository",status:A.HttpStatusCode.FORBIDDEN};S.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND={type:"https://zup.fail/source-control-configuration-not-found",title:"Source control configuration not found for this account.",status:A.HttpStatusCode.NOT_FOUND};S.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND={type:"https://zup.fail/source-control-credentials-not-found",title:"Source control credentials not found for this user. Verify your user's source control connection and try again.",status:A.HttpStatusCode.NOT_FOUND};S.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-refresh-source-control-credentials",title:"Failed to refresh Source Control credentials. Verify your user's source control connection and try again.",status:A.HttpStatusCode.FORBIDDEN};S.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED={type:"https://zup.fail/new-gh-config-required",title:"Current Source Control credentials are using the previous Zuplo GitHup App. Re-authenticate using the latest Zuplo GitHup App via Profile UI and try again.",status:A.HttpStatusCode.FORBIDDEN};S.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS={type:"https://zup.fail/gh-app-revoked-access",title:"Current Source Control credentials are invalid. Re-authenticate to GitHub via Profile UI and try again.",status:A.HttpStatusCode.UNAUTHORIZED};S.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS={type:"https://zup.fail/failed-to-revoke-source-control-credentials",title:"Failed to revoke Source Control access token for the user",status:A.HttpStatusCode.FORBIDDEN};S.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING={type:"https://zup.fail/source-control-configuration-info-missing",title:"Source Control Configuration information is insufficient for this operation.",status:A.HttpStatusCode.BAD_REQUEST};S.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING={type:"https://zup.fail/source-control-configuration-bb-workspace-missing",title:"Source Control Configuration for Bitbucket must include a workspace configuration (additionalMetadata).",status:A.HttpStatusCode.BAD_REQUEST};S.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION={type:"https://zup.fail/preexisiting-source-control-configuration-on-account",title:"This account already has a Source Control Configuration for this provider.",detail:"This account has a pre-existing Source Control Configuration for this provider. Delete or update the existing configuration.",status:A.HttpStatusCode.BAD_REQUEST};S.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND={type:"https://zup.fail/source-control-integration-branch-behind",title:"The current branch is behind, sync with remote repo for avoid conflicts.",status:A.HttpStatusCode.BAD_REQUEST};S.SOURCE_CONTROL_REMOTE_BRANCH_EXISTS={type:"https://zup.fail/source-control-integration-branch-behind",title:"The branch exists in the remote repository. Please try again with a different branch name.",status:A.HttpStatusCode.BAD_REQUEST};S.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED={type:"https://zup.fail/source-control-integration-authentication-failed",title:"Source control integration: Authentication failed",status:A.HttpStatusCode.FORBIDDEN};S.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR={type:"https://zup.fail/third-party-app-auth0-clients-endpoint-error",title:"Error Creating an Auth0 Client through tenant api",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};S.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST={type:"https://zup.fail/third-party-app-auth0-config-does-not-exist",title:"Auth0 Configuration does not exist for account and environment",status:A.HttpStatusCode.NOT_FOUND};S.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR={type:"https://zup.fail/third-party-app-auth0-client-not-found-error",title:"Third Party App Not Found",status:A.HttpStatusCode.NOT_FOUND};S.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR={type:"https://zup.fail/third-party-app-auth-scope-config-error",title:"API Scope configuration at Auth0 end Error",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR};S.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND={type:"https://zup.fail/third-party-app-connections-not-found",title:"Cannot find auth0 tenant connections",status:A.HttpStatusCode.FAILED_DEPENDENCY};S.THIRD_PARTY_APP_CONNECTION_NOT_FOUND={type:"https://zup.fail/third-party-app-connection-not-found",title:"Cannot find connection with the given name",status:A.HttpStatusCode.FAILED_DEPENDENCY};S.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION={type:"https://zup.fail/third-party-app-cannot-link-tpa-to-connection",title:"Cannot link a connection to a third party app",status:A.HttpStatusCode.FAILED_DEPENDENCY};S.DUPLICATE_ENVIRONMENT_VARIABLE={type:"https://zup.fail/duplicate-environment-variable",title:"Duplicate environment variable",status:A.HttpStatusCode.BAD_REQUEST};S.ENVIRONMENT_VARIABLE_VALIDATION_ERROR={type:"https://zup.fail/environment-variables-validation-error",title:"Environment variable configuration is invalid",status:A.HttpStatusCode.BAD_REQUEST};S.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE={type:"https://zup.fail/environment-variables-cannot-be-retrieved-invalid-env-type",title:"Env vars will not be retrieved since the deployment is from non valid environment type",status:A.HttpStatusCode.BAD_REQUEST};S.NON_EXISTENT_ENVIRONMENT_VARIABLE={type:"https://zup.fail/non-existent-environment-variable",title:"Environment variable doesn't exist",status:A.HttpStatusCode.NOT_FOUND};S.DEPLOYMENT_NAME_MISSING={type:"https://zup.fail/deployment-name-missing",title:"Deployment name missing",status:A.HttpStatusCode.BAD_REQUEST};S.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE={type:"https://zup.fail/invalidly-named-environment-variable",title:"Environment variable needs a valid name",status:A.HttpStatusCode.BAD_REQUEST};S.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY={type:"https://zup.fail/personal-override-only-for-working-copy",title:"A personal override can only be used for a working-copy environment variable",status:A.HttpStatusCode.BAD_REQUEST};S.TARGET_BRANCH_ONLY_FOR_PREVIEW={type:"https://zup.fail/target-branch-only-for-preview",title:"A target branch can only be used for preview environment variables",status:A.HttpStatusCode.BAD_REQUEST};S.INVALID_BRANCH_NAME={type:"https://zup.fail/invalid-branch-name",title:"Branch name is invalid",status:A.HttpStatusCode.BAD_REQUEST};S.OVERLAPPING_TARGETS={type:"https://zup.fail/overlapping-targets",title:"The environments of this environment variable overlaps with an existing environment variable",status:A.HttpStatusCode.BAD_REQUEST};S.CONFLICTING_TYPES={type:"https://zup.fail/conflicting-types",title:"The type of this environment variable conflicts with an existing environment variable with the same name",status:A.HttpStatusCode.BAD_REQUEST};S.NON_EMPTY_TARGETS_REQUIRED={type:"https://zup.fail/non-empty-targets-required",title:"The environment targets for this environment variable cannot be empty.",status:A.HttpStatusCode.BAD_REQUEST};S.NO_ZUPLO_PREFIXED_VARIABLES={type:"https://zup.fail/no-zuplo-prefixed-variables",title:"Environment variables should not start with the reserved prefix of ZUPLO or __ZUPLO",status:A.HttpStatusCode.BAD_REQUEST};S.NO_GLOBAL_SYMBOLS={type:"https://zup.fail/no-global-symbols",title:"Environment variables cannot be named after global variables.",status:A.HttpStatusCode.BAD_REQUEST};S.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE={type:"https://zup.fail/deployer-non-valid-deployment-environment-type",title:"Deployment cannot be different than preview or production",status:A.HttpStatusCode.BAD_REQUEST};S.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2={type:"https://zup.fail/deployer-cannot-deploy-using-env-vars-v2",title:"Deployer was not able to deploy zup using environment variables v2",status:A.HttpStatusCode.FORBIDDEN};S.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR={type:"https://zup.fail/deleting-zuplo-environment-variables-error",title:"Problems deleting ZUPLO environment variables for deployment",status:A.HttpStatusCode.NOT_FOUND};var mlt=s(({operation:e,path:t})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:"Cannot modify file on read-only environment",detail:`Cannot ${e} file ${t} for a read-only environment. Read-only environments cannot be edited.`,status:A.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT");S.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT=mlt;var _lt=s(()=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:"Cannot modify files on read-only environment",detail:"Cannot save files on a read-only environment. Read-only environments cannot be edited.",status:A.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT");S.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT=_lt;S.MIGRATIONS_ONLY_ON_WORKING_COPY={type:"https://zup.fail/migration-only-on-working-copy",title:"Migrations can only run on working copies.",status:A.HttpStatusCode.BAD_REQUEST};S.RUNTIME_VERSION_INCORRECT_FORMAT={type:"https://zup.fail/migration-incorrect-runtime-version-format",title:"Runtime version is in an incorrect format.",status:A.HttpStatusCode.BAD_REQUEST};S.PACKAGE_JSON_NOT_FOUND={type:"https://zup.fail/no-pkg-file-found",title:"No package.json file found.",status:A.HttpStatusCode.NOT_FOUND};S.CANNOT_READ_PACKAGE_JSON={type:"https://zup.fail/cannot-read-pkg-file",title:"Cannot read package.json file.",status:A.HttpStatusCode.BAD_REQUEST};S.CANNOT_FIND_SRC_DIRECTORY={type:"https://zup.fail/cannot-find-src-dir",title:"Cannot find source directory.",status:A.HttpStatusCode.BAD_REQUEST};S.FAILED_DOWNLOAD_FROM_STORAGE={type:"https://zup.fail/failed-download-storage",title:"Failed to download content from storage.",status:A.HttpStatusCode.BAD_REQUEST};var glt=s(({path:e})=>({type:"https://zup.fail/cannot-modify-file-on-read-only-environment",title:"Cannot create directory on read-only environment",detail:`Cannot create folder ${e} for a read-only environment. Read-only environments cannot be edited.`,status:A.HttpStatusCode.METHOD_NOT_ALLOWED}),"CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT");S.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT=glt;var ylt=s(({path:e})=>({type:"https://zup.fail/directory-creation-in-non-allowed-location",title:"Directory creation attempted in non allowed location",detail:`Directory creation in ${e} is not allowed.`,instance:e,status:A.HttpStatusCode.BAD_REQUEST}),"CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION");S.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION=ylt;var Elt=s(({path:e})=>({type:"https://zup.fail/directory-already-exists",title:"Directory already exists",status:A.HttpStatusCode.BAD_REQUEST,detail:`Directory already exists at ${e}.`}),"DIRECTORY_ALREADY_EXISTS");S.DIRECTORY_ALREADY_EXISTS=Elt;var blt=s(({path:e})=>({type:"https://zup.fail/directory-does-not-exist",title:"Directory does not exist",status:A.HttpStatusCode.BAD_REQUEST,detail:`No directory at ${e}`}),"DIRECTORY_DOES_NOT_EXIST");S.DIRECTORY_DOES_NOT_EXIST=blt;var Slt=s(({path:e})=>({type:"https://zup.fail/directory-or-file-does-not-exist",title:"Directory or File does not exist",status:A.HttpStatusCode.BAD_REQUEST,detail:`No file/directory at ${e}`}),"DIRECTORY_OR_FILE_DOES_NOT_EXIST");S.DIRECTORY_OR_FILE_DOES_NOT_EXIST=Slt;var vlt=s(({path:e})=>({type:"https://zup.fail/directory-creation-failure",title:"Directory creation failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to create directory at ${e}. Please try again or contact support.`}),"DIRECTORY_CREATION_FAILED");S.DIRECTORY_CREATION_FAILED=vlt;var Olt=s(({path:e})=>({type:"https://zup.fail/file-rename-paths-match",title:"New file name matches old file name",status:A.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the old path ${e} matched the provided new path. Please choose a different name.`}),"FILE_RENAME_PATHS_MATCH");S.FILE_RENAME_PATHS_MATCH=Olt;var Plt=s(({oldExtension:e,newExtension:t})=>({type:"https://zup.fail/file-rename-cannot-change-extension",title:"Cannot change extension of renamed file",status:A.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, the new extension ${t} must match the old extension ${e}.`}),"FILE_RENAME_CANNOT_CHANGE_EXTENSION");S.FILE_RENAME_CANNOT_CHANGE_EXTENSION=Plt;var wlt=s(({path:e})=>({type:"https://zup.fail/file-rename-file-exists",title:"File already exists",status:A.HttpStatusCode.BAD_REQUEST,detail:`Failed to rename file, there already exists a file at ${e}. Please choose a different name.`}),"FILE_RENAME_FILE_ALREADY_EXISTS");S.FILE_RENAME_FILE_ALREADY_EXISTS=wlt;var Ilt=s(({path:e})=>({type:"https://zup.fail/file-rename-failure",title:"File rename failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to rename file ${e}. Please try again or contact support.`}),"FILE_RENAME_FAILED");S.FILE_RENAME_FAILED=Ilt;var Tlt=s(({path:e})=>({type:"https://zup.fail/file-write-failure",title:"File write failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to write file ${e}. Please try again or contact support.`}),"FILE_WRITE_FAILED");S.FILE_WRITE_FAILED=Tlt;var Nlt=s(({path:e})=>({type:"https://zup.fail/essential-file-deletion",title:"Cannot delete essential file",status:A.HttpStatusCode.BAD_REQUEST,detail:`File '${e}' cannot be deleted. It is an essential file.`}),"CANNOT_DELETE_ESSENTIAL_FILE");S.CANNOT_DELETE_ESSENTIAL_FILE=Nlt;var Alt=s(({path:e})=>({type:"https://zup.fail/essential-directory-deletion",title:"Cannot delete essential file",status:A.HttpStatusCode.BAD_REQUEST,detail:`Directory '${e}' cannot be deleted. It is an essential directory.`}),"CANNOT_DELETE_ESSENTIAL_DIRECTORY");S.CANNOT_DELETE_ESSENTIAL_DIRECTORY=Alt;var Rlt=s(()=>({type:"https://zup.fail/sole-open-api-file-deletion",title:"Cannot delete sole OpenAPI file",status:A.HttpStatusCode.BAD_REQUEST,detail:"Your project must have at least 1 OpenAPI file."}),"CANNOT_DELETE_SOLE_OPEN_API_FILE");S.CANNOT_DELETE_SOLE_OPEN_API_FILE=Rlt;var Clt=s(({path:e})=>({type:"https://zup.fail/file-delete-failure",title:"File deletion failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete file ${e}. Please try again or contact support.`}),"FILE_DELETE_FAILED");S.FILE_DELETE_FAILED=Clt;var $lt=s(({path:e})=>({type:"https://zup.fail/directory-delete-failure",title:"Directory deletion failed",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR,detail:`Failed to delete directory ${e}. Please try again or contact support.`}),"DIRECTORY_DELETE_FAILED");S.DIRECTORY_DELETE_FAILED=$lt;S.BUCKET_API_KEY_SERVICE_CONFLICT={type:"https://zup.fail/bucket-api-key-service-error",title:"Bucket name conflicts",status:A.HttpStatusCode.CONFLICT};S.BUCKET_NOT_FOUND={type:"https://zup.fail/bucket-not-found",title:"Bucket cannot be found",status:A.HttpStatusCode.NOT_FOUND};S.UNABLE_UPGRADE_PLAN={type:"https://zup.fail/cant-upgrade-plan",title:"Can't upgrade to selected plan",status:A.HttpStatusCode.BAD_REQUEST};S.METERING_BUCKET_CREATION_FAILED={type:"https://zup.fail/metering-bucket-creation-failed",title:"Failed to create metering buckets for project",status:A.HttpStatusCode.INTERNAL_SERVER_ERROR}});var Iae=h(Ti=>{"use strict";var Dlt=Ti&&Ti.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Llt=Ti&&Ti.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),jlt=Ti&&Ti.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Dlt(t,e,r);return Llt(t,e),t};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.ApiNotFoundError=Ti.ApiError=Ti.Problems=void 0;var wae=jlt(Pae());Ti.Problems=wae;var T1=class extends Error{static{s(this,"ApiError")}type;status;detail;instance;constructor(t){if(super(t.title),!t.type.startsWith("https://zup.fail/"))throw new Error(`Invalid 'type' specified on ApiError, must be a URI starting with 'https://zup.fail/'. Type was set to ${t.type}`);this.name="ApiProblemError",this.type=t.type,this.status=t.status,this.detail=t.detail,this.instance=t.instance}};Ti.ApiError=T1;var QF=class extends T1{static{s(this,"ApiNotFoundError")}constructor(t={}){super({...t,...wae.NOT_FOUND}),this.name="ApiNotFoundProblemError"}};Ti.ApiNotFoundError=QF});var Tae=h(wu=>{"use strict";var Mlt=wu&&wu.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Ult=wu&&wu.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Mlt(t,e,r)};Object.defineProperty(wu,"__esModule",{value:!0});wu.HttpStatusCode=void 0;Ult(Iae(),wu);var xlt=ZF();Object.defineProperty(wu,"HttpStatusCode",{enumerable:!0,get:function(){return xlt.HttpStatusCode}})});var Aae=h((Eqt,Nae)=>{"use strict";function qlt(e){return e>=55296&&e<=56319}s(qlt,"isHighSurrogate");function Flt(e){return e>=56320&&e<=57343}s(Flt,"isLowSurrogate");Nae.exports=s(function(t,r,n){if(typeof r!="string")throw new Error("Input must be string");for(var i=r.length,o=0,a,u,c=0;c<i;c+=1){if(a=r.charCodeAt(c),u=r[c],qlt(a)&&Flt(r.charCodeAt(c+1))&&(c+=1,u+=r[c]),o+=t(u),o===n)return r.slice(0,c+1);if(o>n)return r.slice(0,c-u.length+1)}return r},"truncate")});var Cae=h((Sqt,Rae)=>{"use strict";var klt=Aae(),Blt=Buffer.byteLength.bind(Buffer);Rae.exports=klt.bind(null,Blt)});var ek=h(Xm=>{"use strict";var Glt=Xm&&Xm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xm,"__esModule",{value:!0});Xm.sanitize=void 0;var Vlt=Glt(Cae()),zlt=/[/?<>\\:*|"]/g,Hlt=/[\x00-\x1f\x80-\x9f]/g,Klt=/^\.+$/,Wlt=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Ylt=/[. ]+$/;function Jlt(e,t=""){if(typeof e!="string")throw new Error("Input must be string");let r=e.replace(zlt,t).replace(Hlt,t).replace(Klt,t).replace(Wlt,t).replace(Ylt,t);return(0,Vlt.default)(r,255)}s(Jlt,"sanitize");Xm.sanitize=Jlt});var jae=h(Zm=>{"use strict";var Lae=Zm&&Zm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zm,"__esModule",{value:!0});Zm.createProjectDirs=void 0;var $ae=Lae(require("fs/promises")),Xlt=Lae(require("path")),YE=kt(),Dae=rc(),Zlt=s(async function({sourceDirectory:e,logger:t}){t.debug("Creating project directories");let r=[YE.USER_MODULES_DIR_NAME,YE.USER_CONFIG_DIR_NAME,YE.USER_TEST_DIR_NAME,YE.USER_SCHEMAS_DIR_NAME,YE.USER_DOCS_DIR_NAME,".vscode"];try{await $ae.default.mkdir(e);for(let n of r)await $ae.default.mkdir(Xlt.default.join(e,n),{recursive:!0})}catch(n){return t.error(n),new Dae.PluginResult({message:`Cannot create project directory tree at ${e}`,pluginName:"create-project-dirs",severity:"error"})}return new Dae.PluginResult},"createProjectDirs");Zm.createProjectDirs=Zlt});var qae=h(Qm=>{"use strict";var xae=Qm&&Qm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qm,"__esModule",{value:!0});Qm.generateFromTemplate=void 0;var Qlt=require("fs"),Mae=xae(require("fs/promises")),Uae=xae(require("path"));async function eft(e){let t=Uae.default.resolve(__dirname,"..","templates",e);if((0,Qlt.existsSync)(t))return await Mae.default.readFile(t,"utf-8");{let r=Uae.default.resolve(__dirname,"templates",e);return await Mae.default.readFile(r,"utf-8")}}s(eft,"generateFromTemplate");Qm.generateFromTemplate=eft});var Ni=h(e_=>{"use strict";var N1=e_&&e_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e_,"__esModule",{value:!0});e_.generateFileFromTemplate=void 0;var tft=N1(_n()),rft=N1(require("fs/promises")),nft=N1(require("path")),ift=N1(mn()),sft=qae(),oft=s(function(e,t){return async({sourceDirectory:r,logger:n})=>ift.default.timeFn(`Generating ${e}`,async()=>{n.debug(`Generating ${e}`);let i=nft.default.join(r,e);return await tft.default.fileExists(i)?(n.debug({sourceDirectory:r},`${e} already exists, skipping`),{warnings:[],errors:[]}):aft(i,t,n)})},"generateFileFromTemplate");e_.generateFileFromTemplate=oft;async function aft(e,t,r){let n=await(0,sft.generateFromTemplate)(t);try{await rft.default.writeFile(e,n,"utf-8"),r.debug(`File written to ${e}`)}catch(i){r.error(i);let o={message:`Error creating file at ${e}`,pluginName:"generate-file",severity:"error"};return{warnings:[],errors:[o]}}return{warnings:[],errors:[]}}s(aft,"writeTemplate")});var kae=h(t_=>{"use strict";var uft=t_&&t_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t_,"__esModule",{value:!0});t_.generateDefaultDocsMarkdown=void 0;var cft=uft(require("path")),Fae=kt(),lft=Ni();t_.generateDefaultDocsMarkdown=(0,lft.generateFileFromTemplate)(cft.default.join(Fae.USER_DOCS_DIR_NAME,Fae.DEFAULT_DOCS_MARKDOWN_FILE),"markdown.template.md")});var Gae=h(r_=>{"use strict";var fft=r_&&r_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r_,"__esModule",{value:!0});r_.generateDefaultDocsSidebar=void 0;var dft=fft(require("path")),Bae=kt(),pft=Ni();r_.generateDefaultDocsSidebar=(0,pft.generateFileFromTemplate)(dft.default.join(Bae.USER_DOCS_DIR_NAME,Bae.DOCS_SIDEBAR_FILE),"sidebar.template.json")});var zae=h(n_=>{"use strict";var hft=n_&&n_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n_,"__esModule",{value:!0});n_.generateDefaultDocsTheme=void 0;var mft=hft(require("path")),Vae=kt(),_ft=Ni();n_.generateDefaultDocsTheme=(0,_ft.generateFileFromTemplate)(mft.default.join(Vae.USER_DOCS_DIR_NAME,Vae.DOCS_THEME_FILE),"dev-portal.theme.template.css")});var Kae=h(i_=>{"use strict";var gft=i_&&i_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i_,"__esModule",{value:!0});i_.generateDefaultModule=void 0;var yft=gft(require("path")),Hae=kt(),Eft=Ni();i_.generateDefaultModule=(0,Eft.generateFileFromTemplate)(yft.default.join(Hae.USER_MODULES_DIR_NAME,Hae.DEFAULT_MODULE_FILE),"hello-world.template.ts")});var Yae=h(s_=>{"use strict";var bft=s_&&s_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s_,"__esModule",{value:!0});s_.generateDevPortalConfigJson=void 0;var Sft=bft(require("path")),Wae=kt(),vft=Ni();s_.generateDevPortalConfigJson=(0,vft.generateFileFromTemplate)(Sft.default.join(Wae.USER_CONFIG_DIR_NAME,Wae.DEV_PORTAL_CONFIG_FILE),"dev-portal.template.json")});var Jae=h(A1=>{"use strict";Object.defineProperty(A1,"__esModule",{value:!0});A1.generateEnvironment=void 0;var Oft=Ni();A1.generateEnvironment=(0,Oft.generateFileFromTemplate)(".env","env.template")});var Xae=h(R1=>{"use strict";Object.defineProperty(R1,"__esModule",{value:!0});R1.generateESLint=void 0;var Pft=Ni();R1.generateESLint=(0,Pft.generateFileFromTemplate)(".eslintrc.js","eslintrc.template.js")});var Zae=h(C1=>{"use strict";Object.defineProperty(C1,"__esModule",{value:!0});C1.generateGitignore=void 0;var wft=Ni();C1.generateGitignore=(0,wft.generateFileFromTemplate)(".gitignore","gitignore.template.ignore")});var Qae=h(o_=>{"use strict";var Ift=o_&&o_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o_,"__esModule",{value:!0});o_.generateLaunchJson=void 0;var Tft=Ift(require("path")),Nft=Ni();o_.generateLaunchJson=(0,Nft.generateFileFromTemplate)(Tft.default.join(".vscode","launch.json"),"launch.template.jsonc")});var tue=h(a_=>{"use strict";var Aft=a_&&a_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a_,"__esModule",{value:!0});a_.generateRouteOasConfig=void 0;var Rft=Aft(require("path")),eue=kt(),Cft=Ni();a_.generateRouteOasConfig=(0,Cft.generateFileFromTemplate)(Rft.default.join(eue.USER_CONFIG_DIR_NAME,eue.ROUTES_OAS_CONFIG_FILE),"routes.oas.template.json")});var iue=h(qs=>{"use strict";var tk=qs&&qs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qs,"__esModule",{value:!0});qs.updateProjectPackageJson=qs.getProjectPackageJson=qs.getPackageOverrides=qs.generateDefaultPackageJson=void 0;var rue=tk(require("fs/promises")),rk=tk(require("path")),$ft=tk(Xs());async function Dft(e,t=$ft.default.USE_MONOREPO_PACKAGES){let r={name:e,version:"1.0.0",author:"",copyright:"",scripts:{dev:"zup dev",test:"zup test"},dependencies:{zuplo:"latest"}};if(t){let n=nue();r.overrides=n,r.dependencies["@zuplo/runtime"]=n["@zuplo/runtime"],r.devDependencies&&"@zuplo/core"in r.devDependencies&&(r.devDependencies["@zuplo/core"]=n["@zuplo/core"]),"@zuplo/core"in r.dependencies&&(r.dependencies["@zuplo/core"]=n["@zuplo/core"])}return r}s(Dft,"generateDefaultPackageJson");qs.generateDefaultPackageJson=Dft;function nue(){let e=rk.default.resolve(__dirname,"..","..");return{"@zuplo/core":`file:${e}/core`,"@zuplo/runtime":`file:${e}/runtime`,"@zuplo/debug":`file:${e}/debug`,"@zuplo/errors":`file:${e}/errors`}}s(nue,"getPackageOverrides");qs.getPackageOverrides=nue;async function Lft(e){let t=rk.default.join(e,"package.json"),r=await rue.default.readFile(t,"utf-8");return JSON.parse(r)}s(Lft,"getProjectPackageJson");qs.getProjectPackageJson=Lft;async function jft(e,t){let r=rk.default.join(e,"package.json"),n=JSON.stringify(t,void 0,2);await rue.default.writeFile(r,n,"utf-8")}s(jft,"updateProjectPackageJson");qs.updateProjectPackageJson=jft});var aue=h($1=>{"use strict";Object.defineProperty($1,"__esModule",{value:!0});$1.generatePackageJson=void 0;var sue=iue(),oue=rc(),Mft=s(async function({sourceDirectory:e,name:t,logger:r}){let n=await(0,sue.generateDefaultPackageJson)(t);try{await(0,sue.updateProjectPackageJson)(e,n)}catch(i){return r.error(i),new oue.PluginResult({message:"Error creating package.json",pluginName:"generate-package-json",severity:"error"})}return new oue.PluginResult},"generatePackageJson");$1.generatePackageJson=Mft});var cue=h(u_=>{"use strict";var Uft=u_&&u_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(u_,"__esModule",{value:!0});u_.generatePoliciesConfig=void 0;var xft=Uft(require("path")),uue=kt(),qft=Ni();u_.generatePoliciesConfig=(0,qft.generateFileFromTemplate)(xft.default.join(uue.USER_CONFIG_DIR_NAME,uue.POLICIES_CONFIG_FILE),"policies.template.json")});var lue=h(c_=>{"use strict";var Fft=c_&&c_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(c_,"__esModule",{value:!0});c_.generateSettingsJson=void 0;var kft=Fft(require("path")),Bft=Ni();c_.generateSettingsJson=(0,Bft.generateFileFromTemplate)(kft.default.join(".vscode","settings.json"),"settings.template.jsonc")});var fue=h(D1=>{"use strict";Object.defineProperty(D1,"__esModule",{value:!0});D1.generateTSConfig=void 0;var Gft=Ni();D1.generateTSConfig=(0,Gft.generateFileFromTemplate)("tsconfig.json","tsconfig.template.json")});var pue=h(l_=>{"use strict";var Vft=l_&&l_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l_,"__esModule",{value:!0});l_.generateZuploJson=void 0;var zft=Yo(),Hft=require("fs/promises"),Kft=Vft(require("path")),Wft=kt(),due=rc(),Yft=s(async function({name:e,sourceDirectory:t,logger:r}){let n={version:1,project:e,compatibilityDate:zft.DEFAULT_COMPATIBILITY_DATE},i=Kft.default.join(t,Wft.ZUPLO_PREFERRED_JSON_FILE),o=JSON.stringify(n,null,2);try{await(0,Hft.writeFile)(i,o,"utf-8")}catch(a){return r.error(a),new due.PluginResult({message:"Error creating zuplo.jsonc",pluginName:"generate-zuplo-json",severity:"error"})}return new due.PluginResult},"generateZuploJson");l_.generateZuploJson=Yft});var gue=h(f_=>{"use strict";var _ue=f_&&f_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(f_,"__esModule",{value:!0});f_.create=void 0;var hue=Tae(),Jft=_ue(_n()),Xft=require("fs/promises"),Zft=_ue(require("path")),Qft=rc(),mue=ek(),edt=jae(),tdt=kae(),rdt=Gae(),ndt=zae(),idt=Kae(),sdt=Yae(),odt=Jae(),adt=Xae(),udt=Zae(),cdt=Qae(),ldt=tue(),fdt=aue(),ddt=cue(),pdt=lue(),hdt=fue(),mdt=pue();async function _dt({name:e,accountName:t="",rootDirectory:r,logger:n}){let i=(0,mue.sanitize)(e),o=(0,mue.sanitize)(t),a=Zft.default.join(r,o,i),u={name:e,sourceDirectory:a,logger:n},c=[];if(await Jft.default.dirExists(a))throw new hue.ApiError({type:"https://zup.fail/project-already-exists-at-directory",title:"The project already exists in the specified directory",status:hue.HttpStatusCode.BAD_REQUEST,detail:`Project already exists at ${a}`});c.push(edt.createProjectDirs,ldt.generateRouteOasConfig,mdt.generateZuploJson,sdt.generateDevPortalConfigJson,idt.generateDefaultModule,rdt.generateDefaultDocsSidebar,tdt.generateDefaultDocsMarkdown,ndt.generateDefaultDocsTheme,ddt.generatePoliciesConfig),c.push(hdt.generateTSConfig,udt.generateGitignore,fdt.generatePackageJson,odt.generateEnvironment,adt.generateESLint,cdt.generateLaunchJson,pdt.generateSettingsJson);let{errors:l,warnings:f}=await(0,Qft.runPlugins)(c,u);if(f.length>0&&f.forEach(_=>{n.warn(_)}),l.length>0){await(0,Xft.rm)(a,{recursive:!0,force:!0});let _=l[0];throw _ instanceof Error?_:new Error(_.message)}return{sourceDirectory:a,projectName:e}}s(_dt,"create");f_.create=_dt});var vue=h((Xqt,Sue)=>{Sue.exports=bue;bue.sync=ydt;var yue=require("fs");function gdt(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}s(gdt,"checkPathExt");function Eue(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:gdt(t,r)}s(Eue,"checkStat");function bue(e,t,r){yue.stat(e,function(n,i){r(n,n?!1:Eue(i,e,t))})}s(bue,"isexe");function ydt(e,t){return Eue(yue.statSync(e),e,t)}s(ydt,"sync")});var Tue=h((Qqt,Iue)=>{Iue.exports=Pue;Pue.sync=Edt;var Oue=require("fs");function Pue(e,t,r){Oue.stat(e,function(n,i){r(n,n?!1:wue(i,t))})}s(Pue,"isexe");function Edt(e,t){return wue(Oue.statSync(e),t)}s(Edt,"sync");function wue(e,t){return e.isFile()&&bdt(e,t)}s(wue,"checkStat");function bdt(e,t){var r=e.mode,n=e.uid,i=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),a=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),u=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),f=u|c,d=r&l||r&c&&i===a||r&u&&n===o||r&f&&o===0;return d}s(bdt,"checkMode")});var Aue=h((r2t,Nue)=>{var t2t=require("fs"),L1;process.platform==="win32"||global.TESTING_WINDOWS?L1=vue():L1=Tue();Nue.exports=nk;nk.sync=Sdt;function nk(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,i){nk(e,t||{},function(o,a){o?i(o):n(a)})})}L1(e,t||{},function(n,i){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,i=!1),r(n,i)})}s(nk,"isexe");function Sdt(e,t){try{return L1.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}s(Sdt,"sync")});var Mue=h((i2t,jue)=>{var d_=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Rue=require("path"),vdt=d_?";":":",Cue=Aue(),$ue=s(e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),"getNotFoundError"),Due=s((e,t)=>{let r=t.colon||vdt,n=e.match(/\//)||d_&&e.match(/\\/)?[""]:[...d_?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],i=d_?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=d_?i.split(r):[""];return d_&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:i}},"getPathInfo"),Lue=s((e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:i,pathExtExe:o}=Due(e,t),a=[],u=s(l=>new Promise((f,d)=>{if(l===n.length)return t.all&&a.length?f(a):d($ue(e));let _=n[l],m=/^".*"$/.test(_)?_.slice(1,-1):_,g=Rue.join(m,e),y=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+g:g;f(c(y,l,0))}),"step"),c=s((l,f,d)=>new Promise((_,m)=>{if(d===i.length)return _(u(f+1));let g=i[d];Cue(l+g,{pathExt:o},(y,b)=>{if(!y&&b)if(t.all)a.push(l+g);else return _(l+g);return _(c(l,f,d+1))})}),"subStep");return r?u(0).then(l=>r(null,l),r):u(0)},"which"),Odt=s((e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=Due(e,t),o=[];for(let a=0;a<r.length;a++){let u=r[a],c=/^".*"$/.test(u)?u.slice(1,-1):u,l=Rue.join(c,e),f=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+l:l;for(let d=0;d<n.length;d++){let _=f+n[d];try{if(Cue.sync(_,{pathExt:i}))if(t.all)o.push(_);else return _}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw $ue(e)},"whichSync");jue.exports=Lue;Lue.sync=Odt});var sk=h((o2t,ik)=>{"use strict";var Uue=s((e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"},"pathKey");ik.exports=Uue;ik.exports.default=Uue});var kue=h((u2t,Fue)=>{"use strict";var xue=require("path"),Pdt=Mue(),wdt=sk();function que(e,t){let r=e.options.env||process.env,n=process.cwd(),i=e.options.cwd!=null,o=i&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let a;try{a=Pdt.sync(e.command,{path:r[wdt({env:r})],pathExt:t?xue.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return a&&(a=xue.resolve(i?e.options.cwd:"",a)),a}s(que,"resolveCommandAttempt");function Idt(e){return que(e)||que(e,!0)}s(Idt,"resolveCommand");Fue.exports=Idt});var Bue=h((l2t,ak)=>{"use strict";var ok=/([()\][%!^"`<>&|;, *?])/g;function Tdt(e){return e=e.replace(ok,"^$1"),e}s(Tdt,"escapeCommand");function Ndt(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(ok,"^$1"),t&&(e=e.replace(ok,"^$1")),e}s(Ndt,"escapeArgument");ak.exports.command=Tdt;ak.exports.argument=Ndt});var Vue=h((d2t,Gue)=>{"use strict";Gue.exports=/^#!(.*)/});var Hue=h((p2t,zue)=>{"use strict";var Adt=Vue();zue.exports=(e="")=>{let t=e.match(Adt);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var Wue=h((h2t,Kue)=>{"use strict";var uk=require("fs"),Rdt=Hue();function Cdt(e){let r=Buffer.alloc(150),n;try{n=uk.openSync(e,"r"),uk.readSync(n,r,0,150,0),uk.closeSync(n)}catch{}return Rdt(r.toString())}s(Cdt,"readShebang");Kue.exports=Cdt});var Zue=h((_2t,Xue)=>{"use strict";var $dt=require("path"),Yue=kue(),Jue=Bue(),Ddt=Wue(),Ldt=process.platform==="win32",jdt=/\.(?:com|exe)$/i,Mdt=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Udt(e){e.file=Yue(e);let t=e.file&&Ddt(e.file);return t?(e.args.unshift(e.file),e.command=t,Yue(e)):e.file}s(Udt,"detectShebang");function xdt(e){if(!Ldt)return e;let t=Udt(e),r=!jdt.test(t);if(e.options.forceShell||r){let n=Mdt.test(t);e.command=$dt.normalize(e.command),e.command=Jue.command(e.command),e.args=e.args.map(o=>Jue.argument(o,n));let i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}s(xdt,"parseNonShell");function qdt(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let n={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?n:xdt(n)}s(qdt,"parse");Xue.exports=qdt});var tce=h((y2t,ece)=>{"use strict";var ck=process.platform==="win32";function lk(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}s(lk,"notFoundError");function Fdt(e,t){if(!ck)return;let r=e.emit;e.emit=function(n,i){if(n==="exit"){let o=Que(i,t,"spawn");if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}s(Fdt,"hookChildProcess");function Que(e,t){return ck&&e===1&&!t.file?lk(t.original,"spawn"):null}s(Que,"verifyENOENT");function kdt(e,t){return ck&&e===1&&!t.file?lk(t.original,"spawnSync"):null}s(kdt,"verifyENOENTSync");ece.exports={hookChildProcess:Fdt,verifyENOENT:Que,verifyENOENTSync:kdt,notFoundError:lk}});var ice=h((b2t,p_)=>{"use strict";var rce=require("child_process"),fk=Zue(),dk=tce();function nce(e,t,r){let n=fk(e,t,r),i=rce.spawn(n.command,n.args,n.options);return dk.hookChildProcess(i,n),i}s(nce,"spawn");function Bdt(e,t,r){let n=fk(e,t,r),i=rce.spawnSync(n.command,n.args,n.options);return i.error=i.error||dk.verifyENOENTSync(i.status,n),i}s(Bdt,"spawnSync");p_.exports=nce;p_.exports.spawn=nce;p_.exports.sync=Bdt;p_.exports._parse=fk;p_.exports._enoent=dk});var oce=h((v2t,sce)=>{"use strict";sce.exports=e=>{let t=typeof e=="string"?`
303
303
  `:`
304
304
  `.charCodeAt(),r=typeof e=="string"?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===r&&(e=e.slice(0,e.length-1)),e}});var cce=h((O2t,XE)=>{"use strict";var JE=require("path"),ace=sk(),uce=s(e=>{e={cwd:process.cwd(),path:process.env[ace()],execPath:process.execPath,...e};let t,r=JE.resolve(e.cwd),n=[];for(;t!==r;)n.push(JE.join(r,"node_modules/.bin")),t=r,r=JE.resolve(r,"..");let i=JE.resolve(e.cwd,e.execPath,"..");return n.push(i),n.concat(e.path).join(JE.delimiter)},"npmRunPath");XE.exports=uce;XE.exports.default=uce;XE.exports.env=e=>{e={env:process.env,...e};let t={...e.env},r=ace({env:t});return e.path=t[r],t[r]=XE.exports(e),t}});var fce=h((w2t,pk)=>{"use strict";var lce=s((e,t)=>{for(let r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e},"mimicFn");pk.exports=lce;pk.exports.default=lce});var pce=h((T2t,M1)=>{"use strict";var Gdt=fce(),j1=new WeakMap,dce=s((e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let r,n=0,i=e.displayName||e.name||"<anonymous>",o=s(function(...a){if(j1.set(o,++n),n===1)r=e.apply(this,a),e=null;else if(t.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return r},"onetime");return Gdt(o,e),j1.set(o,n),o},"onetime");M1.exports=dce;M1.exports.default=dce;M1.exports.callCount=e=>{if(!j1.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return j1.get(e)}});var hce=h(U1=>{"use strict";Object.defineProperty(U1,"__esModule",{value:!0});U1.SIGNALS=void 0;var Vdt=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];U1.SIGNALS=Vdt});var hk=h(h_=>{"use strict";Object.defineProperty(h_,"__esModule",{value:!0});h_.SIGRTMAX=h_.getRealtimeSignals=void 0;var zdt=s(function(){let e=_ce-mce+1;return Array.from({length:e},Hdt)},"getRealtimeSignals");h_.getRealtimeSignals=zdt;var Hdt=s(function(e,t){return{name:`SIGRT${t+1}`,number:mce+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},"getRealtimeSignal"),mce=34,_ce=64;h_.SIGRTMAX=_ce});var gce=h(x1=>{"use strict";Object.defineProperty(x1,"__esModule",{value:!0});x1.getSignals=void 0;var Kdt=require("os"),Wdt=hce(),Ydt=hk(),Jdt=s(function(){let e=(0,Ydt.getRealtimeSignals)();return[...Wdt.SIGNALS,...e].map(Xdt)},"getSignals");x1.getSignals=Jdt;var Xdt=s(function({name:e,number:t,description:r,action:n,forced:i=!1,standard:o}){let{signals:{[e]:a}}=Kdt.constants,u=a!==void 0;return{name:e,number:u?a:t,description:r,supported:u,action:n,forced:i,standard:o}},"normalizeSignal")});var Ece=h(m_=>{"use strict";Object.defineProperty(m_,"__esModule",{value:!0});m_.signalsByNumber=m_.signalsByName=void 0;var Zdt=require("os"),yce=gce(),Qdt=hk(),ept=s(function(){return(0,yce.getSignals)().reduce(tpt,{})},"getSignalsByName"),tpt=s(function(e,{name:t,number:r,description:n,supported:i,action:o,forced:a,standard:u}){return{...e,[t]:{name:t,number:r,description:n,supported:i,action:o,forced:a,standard:u}}},"getSignalByName"),rpt=ept();m_.signalsByName=rpt;var npt=s(function(){let e=(0,yce.getSignals)(),t=Qdt.SIGRTMAX+1,r=Array.from({length:t},(n,i)=>ipt(i,e));return Object.assign({},...r)},"getSignalsByNumber"),ipt=s(function(e,t){let r=spt(e,t);if(r===void 0)return{};let{name:n,description:i,supported:o,action:a,forced:u,standard:c}=r;return{[e]:{name:n,number:e,description:i,supported:o,action:a,forced:u,standard:c}}},"getSignalByNumber"),spt=s(function(e,t){let r=t.find(({name:n})=>Zdt.constants.signals[n]===e);return r!==void 0?r:t.find(n=>n.number===e)},"findSignalByNumber"),opt=npt();m_.signalsByNumber=opt});var Sce=h((M2t,bce)=>{"use strict";var{signalsByName:apt}=Ece(),upt=s(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:i,exitCode:o,isCanceled:a})=>e?`timed out after ${t} milliseconds`:a?"was canceled":r!==void 0?`failed with ${r}`:n!==void 0?`was killed with ${n} (${i})`:o!==void 0?`failed with exit code ${o}`:"failed","getErrorPrefix"),cpt=s(({stdout:e,stderr:t,all:r,error:n,signal:i,exitCode:o,command:a,escapedCommand:u,timedOut:c,isCanceled:l,killed:f,parsed:{options:{timeout:d}}})=>{o=o===null?void 0:o,i=i===null?void 0:i;let _=i===void 0?void 0:apt[i].description,m=n&&n.code,y=`Command ${upt({timedOut:c,timeout:d,errorCode:m,signal:i,signalDescription:_,exitCode:o,isCanceled:l})}: ${a}`,b=Object.prototype.toString.call(n)==="[object Error]",E=b?`${y}
305
- ${n.message}`:y,S=[E,t,e].filter(Boolean).join(`
306
- `);return b?(n.originalMessage=n.message,n.message=S):n=new Error(S),n.shortMessage=E,n.command=a,n.escapedCommand=u,n.exitCode=o,n.signal=i,n.signalDescription=_,n.stdout=e,n.stderr=t,r!==void 0&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!c,n.isCanceled=l,n.killed=f&&!c,n},"makeError");bce.exports=cpt});var Oce=h((x2t,mk)=>{"use strict";var q1=["stdin","stdout","stderr"],lpt=s(e=>q1.some(t=>e[t]!==void 0),"hasAlias"),vce=s(e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return q1.map(n=>e[n]);if(lpt(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${q1.map(n=>`\`${n}\``).join(", ")}`);if(typeof t=="string")return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let r=Math.max(t.length,q1.length);return Array.from({length:r},(n,i)=>t[i])},"normalizeStdio");mk.exports=vce;mk.exports.node=e=>{let t=vce(e);return t==="ipc"?"ipc":t===void 0||typeof t=="string"?[t,t,t,"ipc"]:t.includes("ipc")?t:[...t,"ipc"]}});var Pce=h((F2t,F1)=>{F1.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&F1.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&F1.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var Ace=h((k2t,y_)=>{var Wt=global.process,kd=s(function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"},"processOk");kd(Wt)?(wce=require("assert"),__=Pce(),Ice=/^win/i.test(Wt.platform),ZE=require("events"),typeof ZE!="function"&&(ZE=ZE.EventEmitter),Wt.__signal_exit_emitter__?Gr=Wt.__signal_exit_emitter__:(Gr=Wt.__signal_exit_emitter__=new ZE,Gr.count=0,Gr.emitted={}),Gr.infinite||(Gr.setMaxListeners(1/0),Gr.infinite=!0),y_.exports=function(e,t){if(!kd(global.process))return function(){};wce.equal(typeof e,"function","a callback must be provided for exit handler"),g_===!1&&_k();var r="exit";t&&t.alwaysLast&&(r="afterexit");var n=s(function(){Gr.removeListener(r,e),Gr.listeners("exit").length===0&&Gr.listeners("afterexit").length===0&&k1()},"remove");return Gr.on(r,e),n},k1=s(function(){!g_||!kd(global.process)||(g_=!1,__.forEach(function(t){try{Wt.removeListener(t,B1[t])}catch{}}),Wt.emit=G1,Wt.reallyExit=gk,Gr.count-=1)},"unload"),y_.exports.unload=k1,Bd=s(function(t,r,n){Gr.emitted[t]||(Gr.emitted[t]=!0,Gr.emit(t,r,n))},"emit"),B1={},__.forEach(function(e){B1[e]=s(function(){if(kd(global.process)){var r=Wt.listeners(e);r.length===Gr.count&&(k1(),Bd("exit",null,e),Bd("afterexit",null,e),Ice&&e==="SIGHUP"&&(e="SIGINT"),Wt.kill(Wt.pid,e))}},"listener")}),y_.exports.signals=function(){return __},g_=!1,_k=s(function(){g_||!kd(global.process)||(g_=!0,Gr.count+=1,__=__.filter(function(t){try{return Wt.on(t,B1[t]),!0}catch{return!1}}),Wt.emit=Nce,Wt.reallyExit=Tce)},"load"),y_.exports.load=_k,gk=Wt.reallyExit,Tce=s(function(t){kd(global.process)&&(Wt.exitCode=t||0,Bd("exit",Wt.exitCode,null),Bd("afterexit",Wt.exitCode,null),gk.call(Wt,Wt.exitCode))},"processReallyExit"),G1=Wt.emit,Nce=s(function(t,r){if(t==="exit"&&kd(global.process)){r!==void 0&&(Wt.exitCode=r);var n=G1.apply(this,arguments);return Bd("exit",Wt.exitCode,null),Bd("afterexit",Wt.exitCode,null),n}else return G1.apply(this,arguments)},"processEmit")):y_.exports=function(){return function(){}};var wce,__,Ice,ZE,Gr,k1,Bd,B1,g_,_k,gk,Tce,G1,Nce});var Cce=h((G2t,Rce)=>{"use strict";var fpt=require("os"),dpt=Ace(),ppt=1e3*5,hpt=s((e,t="SIGTERM",r={})=>{let n=e(t);return mpt(e,t,r,n),n},"spawnedKill"),mpt=s((e,t,r,n)=>{if(!_pt(t,r,n))return;let i=ypt(r),o=setTimeout(()=>{e("SIGKILL")},i);o.unref&&o.unref()},"setKillTimeout"),_pt=s((e,{forceKillAfterTimeout:t},r)=>gpt(e)&&t!==!1&&r,"shouldForceKill"),gpt=s(e=>e===fpt.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM","isSigterm"),ypt=s(({forceKillAfterTimeout:e=!0})=>{if(e===!0)return ppt;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},"getForceKillAfterTimeout"),Ept=s((e,t)=>{e.kill()&&(t.isCanceled=!0)},"spawnedCancel"),bpt=s((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))},"timeoutKill"),Spt=s((e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(t===0||t===void 0)return n;let i,o=new Promise((u,c)=>{i=setTimeout(()=>{bpt(e,r,c)},t)}),a=n.finally(()=>{clearTimeout(i)});return Promise.race([o,a])},"setupTimeout"),vpt=s(({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},"validateTimeout"),Opt=s(async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;let i=dpt(()=>{e.kill()});return n.finally(()=>{i()})},"setExitHandler");Rce.exports={spawnedKill:hpt,spawnedCancel:Ept,setupTimeout:Spt,validateTimeout:vpt,setExitHandler:Opt}});var Dce=h((z2t,$ce)=>{"use strict";var wa=s(e=>e!==null&&typeof e=="object"&&typeof e.pipe=="function","isStream");wa.writable=e=>wa(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object";wa.readable=e=>wa(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object";wa.duplex=e=>wa.writable(e)&&wa.readable(e);wa.transform=e=>wa.duplex(e)&&typeof e._transform=="function";$ce.exports=wa});var jce=h((K2t,Lce)=>{"use strict";var{PassThrough:Ppt}=require("stream");Lce.exports=e=>{e={...e};let{array:t}=e,{encoding:r}=e,n=r==="buffer",i=!1;t?i=!(r||n):r=r||"utf8",n&&(r=null);let o=new Ppt({objectMode:i});r&&o.setEncoding(r);let a=0,u=[];return o.on("data",c=>{u.push(c),i?a=u.length:a+=c.length}),o.getBufferedValue=()=>t?u:n?Buffer.concat(u,a):u.join(""),o.getBufferedLength=()=>a,o}});var Mce=h((W2t,QE)=>{"use strict";var{constants:wpt}=require("buffer"),Ipt=require("stream"),{promisify:Tpt}=require("util"),Npt=jce(),Apt=Tpt(Ipt.pipeline),V1=class extends Error{static{s(this,"MaxBufferError")}constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function yk(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};let{maxBuffer:r}=t,n=Npt(t);return await new Promise((i,o)=>{let a=s(u=>{u&&n.getBufferedLength()<=wpt.MAX_LENGTH&&(u.bufferedData=n.getBufferedValue()),o(u)},"rejectPromise");(async()=>{try{await Apt(e,n),i()}catch(u){a(u)}})(),n.on("data",()=>{n.getBufferedLength()>r&&a(new V1)})}),n.getBufferedValue()}s(yk,"getStream");QE.exports=yk;QE.exports.buffer=(e,t)=>yk(e,{...t,encoding:"buffer"});QE.exports.array=(e,t)=>yk(e,{...t,array:!0});QE.exports.MaxBufferError=V1});var xce=h((J2t,Uce)=>{"use strict";var{PassThrough:Rpt}=require("stream");Uce.exports=function(){var e=[],t=new Rpt({objectMode:!0});return t.setMaxListeners(0),t.add=r,t.isEmpty=n,t.on("unpipe",i),Array.prototype.slice.call(arguments).forEach(r),t;function r(o){return Array.isArray(o)?(o.forEach(r),this):(e.push(o),o.once("end",i.bind(null,o)),o.once("error",t.emit.bind(t,"error")),o.pipe(t,{end:!1}),this)}s(r,"add");function n(){return e.length==0}s(n,"isEmpty");function i(o){e=e.filter(function(a){return a!==o}),!e.length&&t.readable&&t.end()}s(i,"remove")}});var Bce=h((Z2t,kce)=>{"use strict";var Fce=Dce(),qce=Mce(),Cpt=xce(),$pt=s((e,t)=>{t===void 0||e.stdin===void 0||(Fce(t)?t.pipe(e.stdin):e.stdin.end(t))},"handleInput"),Dpt=s((e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let r=Cpt();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r},"makeAllStream"),Ek=s(async(e,t)=>{if(e){e.destroy();try{return await t}catch(r){return r.bufferedData}}},"getBufferedData"),bk=s((e,{encoding:t,buffer:r,maxBuffer:n})=>{if(!(!e||!r))return t?qce(e,{encoding:t,maxBuffer:n}):qce.buffer(e,{maxBuffer:n})},"getStreamPromise"),Lpt=s(async({stdout:e,stderr:t,all:r},{encoding:n,buffer:i,maxBuffer:o},a)=>{let u=bk(e,{encoding:n,buffer:i,maxBuffer:o}),c=bk(t,{encoding:n,buffer:i,maxBuffer:o}),l=bk(r,{encoding:n,buffer:i,maxBuffer:o*2});try{return await Promise.all([a,u,c,l])}catch(f){return Promise.all([{error:f,signal:f.signal,timedOut:f.timedOut},Ek(e,u),Ek(t,c),Ek(r,l)])}},"getSpawnedResult"),jpt=s(({input:e})=>{if(Fce(e))throw new TypeError("The `input` option cannot be a stream in sync mode")},"validateInputSync");kce.exports={handleInput:$pt,makeAllStream:Dpt,getSpawnedResult:Lpt,validateInputSync:jpt}});var Vce=h((eFt,Gce)=>{"use strict";var Mpt=(async()=>{})().constructor.prototype,Upt=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Mpt,e)]),xpt=s((e,t)=>{for(let[r,n]of Upt){let i=typeof t=="function"?(...o)=>Reflect.apply(n.value,t(),o):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:i})}return e},"mergePromise"),qpt=s(e=>new Promise((t,r)=>{e.on("exit",(n,i)=>{t({exitCode:n,signal:i})}),e.on("error",n=>{r(n)}),e.stdin&&e.stdin.on("error",n=>{r(n)})}),"getSpawnedPromise");Gce.exports={mergePromise:xpt,getSpawnedPromise:qpt}});var Kce=h((rFt,Hce)=>{"use strict";var zce=s((e,t=[])=>Array.isArray(t)?[e,...t]:[e],"normalizeArgs"),Fpt=/^[\w.-]+$/,kpt=/"/g,Bpt=s(e=>typeof e!="string"||Fpt.test(e)?e:`"${e.replace(kpt,'\\"')}"`,"escapeArg"),Gpt=s((e,t)=>zce(e,t).join(" "),"joinCommand"),Vpt=s((e,t)=>zce(e,t).map(r=>Bpt(r)).join(" "),"getEscapedCommand"),zpt=/ +/g,Hpt=s(e=>{let t=[];for(let r of e.trim().split(zpt)){let n=t[t.length-1];n&&n.endsWith("\\")?t[t.length-1]=`${n.slice(0,-1)} ${r}`:t.push(r)}return t},"parseCommand");Hce.exports={joinCommand:Gpt,getEscapedCommand:Vpt,parseCommand:Hpt}});var ele=h((iFt,E_)=>{"use strict";var Kpt=require("path"),Sk=require("child_process"),Wpt=ice(),Ypt=oce(),Jpt=cce(),Xpt=pce(),z1=Sce(),Yce=Oce(),{spawnedKill:Zpt,spawnedCancel:Qpt,setupTimeout:eht,validateTimeout:tht,setExitHandler:rht}=Cce(),{handleInput:nht,getSpawnedResult:iht,makeAllStream:sht,validateInputSync:oht}=Bce(),{mergePromise:Wce,getSpawnedPromise:aht}=Vce(),{joinCommand:Jce,parseCommand:Xce,getEscapedCommand:Zce}=Kce(),uht=1e3*1e3*100,cht=s(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:i})=>{let o=t?{...process.env,...e}:e;return r?Jpt.env({env:o,cwd:n,execPath:i}):o},"getEnv"),Qce=s((e,t,r={})=>{let n=Wpt._parse(e,t,r);return e=n.command,t=n.args,r=n.options,r={maxBuffer:uht,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:r.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...r},r.env=cht(r),r.stdio=Yce(r),process.platform==="win32"&&Kpt.basename(e,".exe")==="cmd"&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n}},"handleArguments"),eb=s((e,t,r)=>typeof t!="string"&&!Buffer.isBuffer(t)?r===void 0?void 0:"":e.stripFinalNewline?Ypt(t):t,"handleOutput"),H1=s((e,t,r)=>{let n=Qce(e,t,r),i=Jce(e,t),o=Zce(e,t);tht(n.options);let a;try{a=Sk.spawn(n.file,n.args,n.options)}catch(m){let g=new Sk.ChildProcess,y=Promise.reject(z1({error:m,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return Wce(g,y)}let u=aht(a),c=eht(a,n.options,u),l=rht(a,n.options,c),f={isCanceled:!1};a.kill=Zpt.bind(null,a.kill.bind(a)),a.cancel=Qpt.bind(null,a,f);let _=Xpt(s(async()=>{let[{error:m,exitCode:g,signal:y,timedOut:b},E,S,O]=await iht(a,n.options,l),P=eb(n.options,E),I=eb(n.options,S),j=eb(n.options,O);if(m||g!==0||y!==null){let x=z1({error:m,exitCode:g,signal:y,stdout:P,stderr:I,all:j,command:i,escapedCommand:o,parsed:n,timedOut:b,isCanceled:f.isCanceled,killed:a.killed});if(!n.options.reject)return x;throw x}return{command:i,escapedCommand:o,exitCode:0,stdout:P,stderr:I,all:j,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},"handlePromise"));return nht(a,n.options.input),a.all=sht(a,n.options),Wce(a,_)},"execa");E_.exports=H1;E_.exports.sync=(e,t,r)=>{let n=Qce(e,t,r),i=Jce(e,t),o=Zce(e,t);oht(n.options);let a;try{a=Sk.spawnSync(n.file,n.args,n.options)}catch(l){throw z1({error:l,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}let u=eb(n.options,a.stdout,a.error),c=eb(n.options,a.stderr,a.error);if(a.error||a.status!==0||a.signal!==null){let l=z1({stdout:u,stderr:c,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:o,parsed:n,timedOut:a.error&&a.error.code==="ETIMEDOUT",isCanceled:!1,killed:a.signal!==null});if(!n.options.reject)return l;throw l}return{command:i,escapedCommand:o,exitCode:0,stdout:u,stderr:c,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};E_.exports.command=(e,t)=>{let[r,...n]=Xce(e);return H1(r,n,t)};E_.exports.commandSync=(e,t)=>{let[r,...n]=Xce(e);return H1.sync(r,n,t)};E_.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&typeof t=="object"&&(r=t,t=[]);let n=Yce.node(r),i=process.execArgv.filter(u=>!u.startsWith("--inspect")),{nodePath:o=process.execPath,nodeOptions:a=i}=r;return H1(o,[...a,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})}});var Ok=h(el=>{"use strict";var vk=el&&el.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(el,"__esModule",{value:!0});el.setEnvironment=el.loadEnvironment=void 0;var lht=vk(ele()),tle=vk(CA()),K1=vk(require("path")),W1=require("fs");async function fht(e){return rle(process.env,e)}s(fht,"loadEnvironment");el.loadEnvironment=fht;async function rle(e,t){if(e.__ZUPLO_LOG_LEVEL=process.env.__ZUPLO_LOG_LEVEL??process.env.LOG_LEVEL,e.__ZUPLO_LOG_FORMAT=process.env.__ZUPLO_LOG_FORMAT??process.env.LOG_FORMAT,e.LOG_LEVEL=process.env.LOG_LEVEL??process.env.LOG_LEVEL,e.LOG_FORMAT=process.env.LOG_FORMAT??process.env.LOG_FORMAT,e.GIT_SHA=process.env.GIT_SHA??await dht(t),process.env.__ZUPLO_CONFIG&&(e.__ZUPLO_CONFIG=process.env.__ZUPLO_CONFIG),(0,W1.existsSync)(K1.default.join(t,".env"))){let r=(0,W1.readFileSync)(K1.default.join(t,".env"),"utf8"),n=tle.default.parse(r);for(let i of Object.keys(n))e[i]=n[i]}if((0,W1.existsSync)(K1.default.join(t,".env.zuplo"))){let r=(0,W1.readFileSync)(K1.default.join(t,".env.zuplo"),"utf8"),n=tle.default.parse(r);for(let i of Object.keys(n))e[i]=n[i]}for(let r of Object.keys(e))e[r]===void 0&&delete e[r];return e}s(rle,"setEnvironment");el.setEnvironment=rle;async function dht(e){let t="unknown";try{let{stdout:r}=await(0,lht.default)("git",["rev-parse","HEAD"],{cwd:e});r.trim().length===40&&(t=r.trim())}catch{}return t}s(dht,"getGitSha")});var ot={};ahe(ot,{__addDisposableResource:()=>Ole,__assign:()=>Y1,__asyncDelegator:()=>mle,__asyncGenerator:()=>hle,__asyncValues:()=>_le,__await:()=>b_,__awaiter:()=>ule,__classPrivateFieldGet:()=>ble,__classPrivateFieldIn:()=>vle,__classPrivateFieldSet:()=>Sle,__createBinding:()=>X1,__decorate:()=>sle,__disposeResources:()=>Ple,__esDecorate:()=>pht,__exportStar:()=>lle,__extends:()=>nle,__generator:()=>cle,__importDefault:()=>Ele,__importStar:()=>yle,__makeTemplateObject:()=>gle,__metadata:()=>ale,__param:()=>ole,__propKey:()=>mht,__read:()=>wk,__rest:()=>ile,__runInitializers:()=>hht,__setFunctionName:()=>_ht,__spread:()=>fle,__spreadArray:()=>ple,__spreadArrays:()=>dle,__values:()=>J1,default:()=>Eht});function nle(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Pk(e,t);function r(){this.constructor=e}s(r,"__"),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function ile(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function sle(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(a=e[u])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function ole(e,t){return function(r,n){t(r,n,e)}}function pht(e,t,r,n,i,o){function a(E){if(E!==void 0&&typeof E!="function")throw new TypeError("Function expected");return E}s(a,"accept");for(var u=n.kind,c=u==="getter"?"get":u==="setter"?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d,_=!1,m=r.length-1;m>=0;m--){var g={};for(var y in n)g[y]=y==="access"?{}:n[y];for(var y in n.access)g.access[y]=n.access[y];g.addInitializer=function(E){if(_)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(E||null))};var b=(0,r[m])(u==="accessor"?{get:f.get,set:f.set}:f[c],g);if(u==="accessor"){if(b===void 0)continue;if(b===null||typeof b!="object")throw new TypeError("Object expected");(d=a(b.get))&&(f.get=d),(d=a(b.set))&&(f.set=d),(d=a(b.init))&&i.unshift(d)}else(d=a(b))&&(u==="field"?i.unshift(d):f[c]=d)}l&&Object.defineProperty(l,n.name,f),_=!0}function hht(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function mht(e){return typeof e=="symbol"?e:"".concat(e)}function _ht(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function ale(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function ule(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return s(i,"adopt"),new(r||(r=Promise))(function(o,a){function u(f){try{l(n.next(f))}catch(d){a(d)}}s(u,"fulfilled");function c(f){try{l(n.throw(f))}catch(d){a(d)}}s(c,"rejected");function l(f){f.done?o(f.value):i(f.value).then(u,c)}s(l,"step"),l((n=n.apply(e,t||[])).next())})}function cle(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(l){return function(f){return c([l,f])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(r=0)),r;)try{if(n=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(f){l=[6,f],i=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function lle(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&X1(t,e,r)}function J1(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function wk(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function fle(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(wk(arguments[t]));return e}function dle(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var o=arguments[t],a=0,u=o.length;a<u;a++,i++)n[i]=o[a];return n}function ple(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function b_(e){return this instanceof b_?(this.v=e,this):new b_(e)}function hle(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(_){n[_]&&(i[_]=function(m){return new Promise(function(g,y){o.push([_,m,g,y])>1||u(_,m)})})}function u(_,m){try{c(n[_](m))}catch(g){d(o[0][3],g)}}function c(_){_.value instanceof b_?Promise.resolve(_.value.v).then(l,f):d(o[0][2],_)}function l(_){u("next",_)}function f(_){u("throw",_)}function d(_,m){_(m),o.shift(),o.length&&u(o[0][0],o[0][1])}}function mle(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,o){t[i]=e[i]?function(a){return(r=!r)?{value:b_(e[i](a)),done:!1}:o?o(a):a}:o}}function _le(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof J1=="function"?J1(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(a){return new Promise(function(u,c){a=e[o](a),i(u,c,a.done,a.value)})}}function i(o,a,u,c){Promise.resolve(c).then(function(l){o({value:l,done:u})},a)}}function gle(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function yle(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&X1(t,e,r);return ght(t,e),t}function Ele(e){return e&&e.__esModule?e:{default:e}}function ble(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function Sle(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}function vle(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Ole(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if(typeof n!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}function Ple(e){function t(n){e.error=e.hasError?new yht(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}s(t,"fail");function r(){for(;e.stack.length;){var n=e.stack.pop();try{var i=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(i).then(r,function(o){return t(o),r()})}catch(o){t(o)}}if(e.hasError)throw e.error}return s(r,"next"),r()}var Pk,Y1,X1,ght,yht,Eht,at=ohe(()=>{Pk=s(function(e,t){return Pk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Pk(e,t)},"extendStatics");s(nle,"__extends");Y1=s(function(){return Y1=Object.assign||s(function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},"__assign"),Y1.apply(this,arguments)},"__assign");s(ile,"__rest");s(sle,"__decorate");s(ole,"__param");s(pht,"__esDecorate");s(hht,"__runInitializers");s(mht,"__propKey");s(_ht,"__setFunctionName");s(ale,"__metadata");s(ule,"__awaiter");s(cle,"__generator");X1=Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]};s(lle,"__exportStar");s(J1,"__values");s(wk,"__read");s(fle,"__spread");s(dle,"__spreadArrays");s(ple,"__spreadArray");s(b_,"__await");s(hle,"__asyncGenerator");s(mle,"__asyncDelegator");s(_le,"__asyncValues");s(gle,"__makeTemplateObject");ght=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};s(yle,"__importStar");s(Ele,"__importDefault");s(ble,"__classPrivateFieldGet");s(Sle,"__classPrivateFieldSet");s(vle,"__classPrivateFieldIn");s(Ole,"__addDisposableResource");yht=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};s(Ple,"__disposeResources");Eht={__extends:nle,__assign:Y1,__rest:ile,__decorate:sle,__param:ole,__metadata:ale,__awaiter:ule,__generator:cle,__createBinding:X1,__exportStar:lle,__values:J1,__read:wk,__spread:fle,__spreadArrays:dle,__spreadArray:ple,__await:b_,__asyncGenerator:hle,__asyncDelegator:mle,__asyncValues:_le,__makeTemplateObject:gle,__importStar:yle,__importDefault:Ele,__classPrivateFieldGet:ble,__classPrivateFieldSet:Sle,__classPrivateFieldIn:vle,__addDisposableResource:Ole,__disposeResources:Ple}});var Ile=h((cFt,wle)=>{var S_=1e3,v_=S_*60,O_=v_*60,Gd=O_*24,bht=Gd*7,Sht=Gd*365.25;wle.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return vht(e);if(r==="number"&&isFinite(e))return t.long?Pht(e):Oht(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function vht(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Sht;case"weeks":case"week":case"w":return r*bht;case"days":case"day":case"d":return r*Gd;case"hours":case"hour":case"hrs":case"hr":case"h":return r*O_;case"minutes":case"minute":case"mins":case"min":case"m":return r*v_;case"seconds":case"second":case"secs":case"sec":case"s":return r*S_;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}s(vht,"parse");function Oht(e){var t=Math.abs(e);return t>=Gd?Math.round(e/Gd)+"d":t>=O_?Math.round(e/O_)+"h":t>=v_?Math.round(e/v_)+"m":t>=S_?Math.round(e/S_)+"s":e+"ms"}s(Oht,"fmtShort");function Pht(e){var t=Math.abs(e);return t>=Gd?Z1(e,t,Gd,"day"):t>=O_?Z1(e,t,O_,"hour"):t>=v_?Z1(e,t,v_,"minute"):t>=S_?Z1(e,t,S_,"second"):e+" ms"}s(Pht,"fmtLong");function Z1(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}s(Z1,"plural")});var Ik=h((fFt,Tle)=>{function wht(e){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=a,r.humanize=Ile(),r.destroy=l,Object.keys(e).forEach(f=>{r[f]=e[f]}),r.names=[],r.skips=[],r.formatters={};function t(f){let d=0;for(let _=0;_<f.length;_++)d=(d<<5)-d+f.charCodeAt(_),d|=0;return r.colors[Math.abs(d)%r.colors.length]}s(t,"selectColor"),r.selectColor=t;function r(f){let d,_=null,m,g;function y(...b){if(!y.enabled)return;let E=y,S=Number(new Date),O=S-(d||S);E.diff=O,E.prev=d,E.curr=S,d=S,b[0]=r.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let P=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(j,x)=>{if(j==="%%")return"%";P++;let H=r.formatters[x];if(typeof H=="function"){let K=b[P];j=H.call(E,K),b.splice(P,1),P--}return j}),r.formatArgs.call(E,b),(E.log||r.log).apply(E,b)}return s(y,"debug"),y.namespace=f,y.useColors=r.useColors(),y.color=r.selectColor(f),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>_!==null?_:(m!==r.namespaces&&(m=r.namespaces,g=r.enabled(f)),g),set:b=>{_=b}}),typeof r.init=="function"&&r.init(y),y}s(r,"createDebug");function n(f,d){let _=r(this.namespace+(typeof d>"u"?":":d)+f);return _.log=this.log,_}s(n,"extend");function i(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let d,_=(typeof f=="string"?f:"").split(/[\s,]+/),m=_.length;for(d=0;d<m;d++)_[d]&&(f=_[d].replace(/\*/g,".*?"),f[0]==="-"?r.skips.push(new RegExp("^"+f.slice(1)+"$")):r.names.push(new RegExp("^"+f+"$")))}s(i,"enable");function o(){let f=[...r.names.map(u),...r.skips.map(u).map(d=>"-"+d)].join(",");return r.enable(""),f}s(o,"disable");function a(f){if(f[f.length-1]==="*")return!0;let d,_;for(d=0,_=r.skips.length;d<_;d++)if(r.skips[d].test(f))return!1;for(d=0,_=r.names.length;d<_;d++)if(r.names[d].test(f))return!0;return!1}s(a,"enabled");function u(f){return f.toString().substring(2,f.toString().length-2).replace(/\.\*\?$/,"*")}s(u,"toNamespace");function c(f){return f instanceof Error?f.stack||f.message:f}s(c,"coerce");function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return s(l,"destroy"),r.enable(r.load()),r}s(wht,"setup");Tle.exports=wht});var Nle=h((Ji,Q1)=>{Ji.formatArgs=Tht;Ji.save=Nht;Ji.load=Aht;Ji.useColors=Iht;Ji.storage=Rht();Ji.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ji.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Iht(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}s(Iht,"useColors");function Tht(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Q1.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}s(Tht,"formatArgs");Ji.log=console.debug||console.log||(()=>{});function Nht(e){try{e?Ji.storage.setItem("debug",e):Ji.storage.removeItem("debug")}catch{}}s(Nht,"save");function Aht(){let e;try{e=Ji.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}s(Aht,"load");function Rht(){try{return localStorage}catch{}}s(Rht,"localstorage");Q1.exports=Ik()(Ji);var{formatters:Cht}=Q1.exports;Cht.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Rle=h((hFt,Ale)=>{"use strict";Ale.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}});var Dle=h((mFt,$le)=>{"use strict";var $ht=require("os"),Cle=require("tty"),Fs=Rle(),{env:Vr}=process,eN;Fs("no-color")||Fs("no-colors")||Fs("color=false")||Fs("color=never")?eN=0:(Fs("color")||Fs("colors")||Fs("color=true")||Fs("color=always"))&&(eN=1);function Dht(){if("FORCE_COLOR"in Vr)return Vr.FORCE_COLOR==="true"?1:Vr.FORCE_COLOR==="false"?0:Vr.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Vr.FORCE_COLOR,10),3)}s(Dht,"envForceColor");function Lht(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}s(Lht,"translateLevel");function jht(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=Dht();n!==void 0&&(eN=n);let i=r?eN:n;if(i===0)return 0;if(r){if(Fs("color=16m")||Fs("color=full")||Fs("color=truecolor"))return 3;if(Fs("color=256"))return 2}if(e&&!t&&i===void 0)return 0;let o=i||0;if(Vr.TERM==="dumb")return o;if(process.platform==="win32"){let a=$ht.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in Vr)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(a=>a in Vr)||Vr.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in Vr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Vr.TEAMCITY_VERSION)?1:0;if(Vr.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Vr){let a=Number.parseInt((Vr.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Vr.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Vr.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Vr.TERM)||"COLORTERM"in Vr?1:o}s(jht,"supportsColor");function Tk(e,t={}){let r=jht(e,{streamIsTTY:e&&e.isTTY,...t});return Lht(r)}s(Tk,"getSupportLevel");$le.exports={supportsColor:Tk,stdout:Tk({isTTY:Cle.isatty(1)}),stderr:Tk({isTTY:Cle.isatty(2)})}});var jle=h((cn,rN)=>{var Mht=require("tty"),tN=require("util");cn.init=Ght;cn.log=Fht;cn.formatArgs=xht;cn.save=kht;cn.load=Bht;cn.useColors=Uht;cn.destroy=tN.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");cn.colors=[6,2,3,4,5,1];try{let e=Dle();e&&(e.stderr||e).level>=2&&(cn.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}cn.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function Uht(){return"colors"in cn.inspectOpts?!!cn.inspectOpts.colors:Mht.isatty(process.stderr.fd)}s(Uht,"useColors");function xht(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${i};1m${t} \x1B[0m`;e[0]=o+e[0].split(`
305
+ ${n.message}`:y,v=[E,t,e].filter(Boolean).join(`
306
+ `);return b?(n.originalMessage=n.message,n.message=v):n=new Error(v),n.shortMessage=E,n.command=a,n.escapedCommand=u,n.exitCode=o,n.signal=i,n.signalDescription=_,n.stdout=e,n.stderr=t,r!==void 0&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!c,n.isCanceled=l,n.killed=f&&!c,n},"makeError");bce.exports=cpt});var Oce=h((x2t,mk)=>{"use strict";var q1=["stdin","stdout","stderr"],lpt=s(e=>q1.some(t=>e[t]!==void 0),"hasAlias"),vce=s(e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return q1.map(n=>e[n]);if(lpt(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${q1.map(n=>`\`${n}\``).join(", ")}`);if(typeof t=="string")return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let r=Math.max(t.length,q1.length);return Array.from({length:r},(n,i)=>t[i])},"normalizeStdio");mk.exports=vce;mk.exports.node=e=>{let t=vce(e);return t==="ipc"?"ipc":t===void 0||typeof t=="string"?[t,t,t,"ipc"]:t.includes("ipc")?t:[...t,"ipc"]}});var Pce=h((F2t,F1)=>{F1.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&F1.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&F1.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var Ace=h((k2t,y_)=>{var Wt=global.process,kd=s(function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"},"processOk");kd(Wt)?(wce=require("assert"),__=Pce(),Ice=/^win/i.test(Wt.platform),ZE=require("events"),typeof ZE!="function"&&(ZE=ZE.EventEmitter),Wt.__signal_exit_emitter__?Gr=Wt.__signal_exit_emitter__:(Gr=Wt.__signal_exit_emitter__=new ZE,Gr.count=0,Gr.emitted={}),Gr.infinite||(Gr.setMaxListeners(1/0),Gr.infinite=!0),y_.exports=function(e,t){if(!kd(global.process))return function(){};wce.equal(typeof e,"function","a callback must be provided for exit handler"),g_===!1&&_k();var r="exit";t&&t.alwaysLast&&(r="afterexit");var n=s(function(){Gr.removeListener(r,e),Gr.listeners("exit").length===0&&Gr.listeners("afterexit").length===0&&k1()},"remove");return Gr.on(r,e),n},k1=s(function(){!g_||!kd(global.process)||(g_=!1,__.forEach(function(t){try{Wt.removeListener(t,B1[t])}catch{}}),Wt.emit=G1,Wt.reallyExit=gk,Gr.count-=1)},"unload"),y_.exports.unload=k1,Bd=s(function(t,r,n){Gr.emitted[t]||(Gr.emitted[t]=!0,Gr.emit(t,r,n))},"emit"),B1={},__.forEach(function(e){B1[e]=s(function(){if(kd(global.process)){var r=Wt.listeners(e);r.length===Gr.count&&(k1(),Bd("exit",null,e),Bd("afterexit",null,e),Ice&&e==="SIGHUP"&&(e="SIGINT"),Wt.kill(Wt.pid,e))}},"listener")}),y_.exports.signals=function(){return __},g_=!1,_k=s(function(){g_||!kd(global.process)||(g_=!0,Gr.count+=1,__=__.filter(function(t){try{return Wt.on(t,B1[t]),!0}catch{return!1}}),Wt.emit=Nce,Wt.reallyExit=Tce)},"load"),y_.exports.load=_k,gk=Wt.reallyExit,Tce=s(function(t){kd(global.process)&&(Wt.exitCode=t||0,Bd("exit",Wt.exitCode,null),Bd("afterexit",Wt.exitCode,null),gk.call(Wt,Wt.exitCode))},"processReallyExit"),G1=Wt.emit,Nce=s(function(t,r){if(t==="exit"&&kd(global.process)){r!==void 0&&(Wt.exitCode=r);var n=G1.apply(this,arguments);return Bd("exit",Wt.exitCode,null),Bd("afterexit",Wt.exitCode,null),n}else return G1.apply(this,arguments)},"processEmit")):y_.exports=function(){return function(){}};var wce,__,Ice,ZE,Gr,k1,Bd,B1,g_,_k,gk,Tce,G1,Nce});var Cce=h((G2t,Rce)=>{"use strict";var fpt=require("os"),dpt=Ace(),ppt=1e3*5,hpt=s((e,t="SIGTERM",r={})=>{let n=e(t);return mpt(e,t,r,n),n},"spawnedKill"),mpt=s((e,t,r,n)=>{if(!_pt(t,r,n))return;let i=ypt(r),o=setTimeout(()=>{e("SIGKILL")},i);o.unref&&o.unref()},"setKillTimeout"),_pt=s((e,{forceKillAfterTimeout:t},r)=>gpt(e)&&t!==!1&&r,"shouldForceKill"),gpt=s(e=>e===fpt.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM","isSigterm"),ypt=s(({forceKillAfterTimeout:e=!0})=>{if(e===!0)return ppt;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},"getForceKillAfterTimeout"),Ept=s((e,t)=>{e.kill()&&(t.isCanceled=!0)},"spawnedCancel"),bpt=s((e,t,r)=>{e.kill(t),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))},"timeoutKill"),Spt=s((e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(t===0||t===void 0)return n;let i,o=new Promise((u,c)=>{i=setTimeout(()=>{bpt(e,r,c)},t)}),a=n.finally(()=>{clearTimeout(i)});return Promise.race([o,a])},"setupTimeout"),vpt=s(({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},"validateTimeout"),Opt=s(async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;let i=dpt(()=>{e.kill()});return n.finally(()=>{i()})},"setExitHandler");Rce.exports={spawnedKill:hpt,spawnedCancel:Ept,setupTimeout:Spt,validateTimeout:vpt,setExitHandler:Opt}});var Dce=h((z2t,$ce)=>{"use strict";var wa=s(e=>e!==null&&typeof e=="object"&&typeof e.pipe=="function","isStream");wa.writable=e=>wa(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object";wa.readable=e=>wa(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object";wa.duplex=e=>wa.writable(e)&&wa.readable(e);wa.transform=e=>wa.duplex(e)&&typeof e._transform=="function";$ce.exports=wa});var jce=h((K2t,Lce)=>{"use strict";var{PassThrough:Ppt}=require("stream");Lce.exports=e=>{e={...e};let{array:t}=e,{encoding:r}=e,n=r==="buffer",i=!1;t?i=!(r||n):r=r||"utf8",n&&(r=null);let o=new Ppt({objectMode:i});r&&o.setEncoding(r);let a=0,u=[];return o.on("data",c=>{u.push(c),i?a=u.length:a+=c.length}),o.getBufferedValue=()=>t?u:n?Buffer.concat(u,a):u.join(""),o.getBufferedLength=()=>a,o}});var Mce=h((W2t,QE)=>{"use strict";var{constants:wpt}=require("buffer"),Ipt=require("stream"),{promisify:Tpt}=require("util"),Npt=jce(),Apt=Tpt(Ipt.pipeline),V1=class extends Error{static{s(this,"MaxBufferError")}constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function yk(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};let{maxBuffer:r}=t,n=Npt(t);return await new Promise((i,o)=>{let a=s(u=>{u&&n.getBufferedLength()<=wpt.MAX_LENGTH&&(u.bufferedData=n.getBufferedValue()),o(u)},"rejectPromise");(async()=>{try{await Apt(e,n),i()}catch(u){a(u)}})(),n.on("data",()=>{n.getBufferedLength()>r&&a(new V1)})}),n.getBufferedValue()}s(yk,"getStream");QE.exports=yk;QE.exports.buffer=(e,t)=>yk(e,{...t,encoding:"buffer"});QE.exports.array=(e,t)=>yk(e,{...t,array:!0});QE.exports.MaxBufferError=V1});var xce=h((J2t,Uce)=>{"use strict";var{PassThrough:Rpt}=require("stream");Uce.exports=function(){var e=[],t=new Rpt({objectMode:!0});return t.setMaxListeners(0),t.add=r,t.isEmpty=n,t.on("unpipe",i),Array.prototype.slice.call(arguments).forEach(r),t;function r(o){return Array.isArray(o)?(o.forEach(r),this):(e.push(o),o.once("end",i.bind(null,o)),o.once("error",t.emit.bind(t,"error")),o.pipe(t,{end:!1}),this)}s(r,"add");function n(){return e.length==0}s(n,"isEmpty");function i(o){e=e.filter(function(a){return a!==o}),!e.length&&t.readable&&t.end()}s(i,"remove")}});var Bce=h((Z2t,kce)=>{"use strict";var Fce=Dce(),qce=Mce(),Cpt=xce(),$pt=s((e,t)=>{t===void 0||e.stdin===void 0||(Fce(t)?t.pipe(e.stdin):e.stdin.end(t))},"handleInput"),Dpt=s((e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let r=Cpt();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r},"makeAllStream"),Ek=s(async(e,t)=>{if(e){e.destroy();try{return await t}catch(r){return r.bufferedData}}},"getBufferedData"),bk=s((e,{encoding:t,buffer:r,maxBuffer:n})=>{if(!(!e||!r))return t?qce(e,{encoding:t,maxBuffer:n}):qce.buffer(e,{maxBuffer:n})},"getStreamPromise"),Lpt=s(async({stdout:e,stderr:t,all:r},{encoding:n,buffer:i,maxBuffer:o},a)=>{let u=bk(e,{encoding:n,buffer:i,maxBuffer:o}),c=bk(t,{encoding:n,buffer:i,maxBuffer:o}),l=bk(r,{encoding:n,buffer:i,maxBuffer:o*2});try{return await Promise.all([a,u,c,l])}catch(f){return Promise.all([{error:f,signal:f.signal,timedOut:f.timedOut},Ek(e,u),Ek(t,c),Ek(r,l)])}},"getSpawnedResult"),jpt=s(({input:e})=>{if(Fce(e))throw new TypeError("The `input` option cannot be a stream in sync mode")},"validateInputSync");kce.exports={handleInput:$pt,makeAllStream:Dpt,getSpawnedResult:Lpt,validateInputSync:jpt}});var Vce=h((eFt,Gce)=>{"use strict";var Mpt=(async()=>{})().constructor.prototype,Upt=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Mpt,e)]),xpt=s((e,t)=>{for(let[r,n]of Upt){let i=typeof t=="function"?(...o)=>Reflect.apply(n.value,t(),o):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:i})}return e},"mergePromise"),qpt=s(e=>new Promise((t,r)=>{e.on("exit",(n,i)=>{t({exitCode:n,signal:i})}),e.on("error",n=>{r(n)}),e.stdin&&e.stdin.on("error",n=>{r(n)})}),"getSpawnedPromise");Gce.exports={mergePromise:xpt,getSpawnedPromise:qpt}});var Kce=h((rFt,Hce)=>{"use strict";var zce=s((e,t=[])=>Array.isArray(t)?[e,...t]:[e],"normalizeArgs"),Fpt=/^[\w.-]+$/,kpt=/"/g,Bpt=s(e=>typeof e!="string"||Fpt.test(e)?e:`"${e.replace(kpt,'\\"')}"`,"escapeArg"),Gpt=s((e,t)=>zce(e,t).join(" "),"joinCommand"),Vpt=s((e,t)=>zce(e,t).map(r=>Bpt(r)).join(" "),"getEscapedCommand"),zpt=/ +/g,Hpt=s(e=>{let t=[];for(let r of e.trim().split(zpt)){let n=t[t.length-1];n&&n.endsWith("\\")?t[t.length-1]=`${n.slice(0,-1)} ${r}`:t.push(r)}return t},"parseCommand");Hce.exports={joinCommand:Gpt,getEscapedCommand:Vpt,parseCommand:Hpt}});var ele=h((iFt,E_)=>{"use strict";var Kpt=require("path"),Sk=require("child_process"),Wpt=ice(),Ypt=oce(),Jpt=cce(),Xpt=pce(),z1=Sce(),Yce=Oce(),{spawnedKill:Zpt,spawnedCancel:Qpt,setupTimeout:eht,validateTimeout:tht,setExitHandler:rht}=Cce(),{handleInput:nht,getSpawnedResult:iht,makeAllStream:sht,validateInputSync:oht}=Bce(),{mergePromise:Wce,getSpawnedPromise:aht}=Vce(),{joinCommand:Jce,parseCommand:Xce,getEscapedCommand:Zce}=Kce(),uht=1e3*1e3*100,cht=s(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:i})=>{let o=t?{...process.env,...e}:e;return r?Jpt.env({env:o,cwd:n,execPath:i}):o},"getEnv"),Qce=s((e,t,r={})=>{let n=Wpt._parse(e,t,r);return e=n.command,t=n.args,r=n.options,r={maxBuffer:uht,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:r.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...r},r.env=cht(r),r.stdio=Yce(r),process.platform==="win32"&&Kpt.basename(e,".exe")==="cmd"&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n}},"handleArguments"),eb=s((e,t,r)=>typeof t!="string"&&!Buffer.isBuffer(t)?r===void 0?void 0:"":e.stripFinalNewline?Ypt(t):t,"handleOutput"),H1=s((e,t,r)=>{let n=Qce(e,t,r),i=Jce(e,t),o=Zce(e,t);tht(n.options);let a;try{a=Sk.spawn(n.file,n.args,n.options)}catch(m){let g=new Sk.ChildProcess,y=Promise.reject(z1({error:m,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return Wce(g,y)}let u=aht(a),c=eht(a,n.options,u),l=rht(a,n.options,c),f={isCanceled:!1};a.kill=Zpt.bind(null,a.kill.bind(a)),a.cancel=Qpt.bind(null,a,f);let _=Xpt(s(async()=>{let[{error:m,exitCode:g,signal:y,timedOut:b},E,v,O]=await iht(a,n.options,l),P=eb(n.options,E),I=eb(n.options,v),j=eb(n.options,O);if(m||g!==0||y!==null){let x=z1({error:m,exitCode:g,signal:y,stdout:P,stderr:I,all:j,command:i,escapedCommand:o,parsed:n,timedOut:b,isCanceled:f.isCanceled,killed:a.killed});if(!n.options.reject)return x;throw x}return{command:i,escapedCommand:o,exitCode:0,stdout:P,stderr:I,all:j,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},"handlePromise"));return nht(a,n.options.input),a.all=sht(a,n.options),Wce(a,_)},"execa");E_.exports=H1;E_.exports.sync=(e,t,r)=>{let n=Qce(e,t,r),i=Jce(e,t),o=Zce(e,t);oht(n.options);let a;try{a=Sk.spawnSync(n.file,n.args,n.options)}catch(l){throw z1({error:l,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}let u=eb(n.options,a.stdout,a.error),c=eb(n.options,a.stderr,a.error);if(a.error||a.status!==0||a.signal!==null){let l=z1({stdout:u,stderr:c,error:a.error,signal:a.signal,exitCode:a.status,command:i,escapedCommand:o,parsed:n,timedOut:a.error&&a.error.code==="ETIMEDOUT",isCanceled:!1,killed:a.signal!==null});if(!n.options.reject)return l;throw l}return{command:i,escapedCommand:o,exitCode:0,stdout:u,stderr:c,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};E_.exports.command=(e,t)=>{let[r,...n]=Xce(e);return H1(r,n,t)};E_.exports.commandSync=(e,t)=>{let[r,...n]=Xce(e);return H1.sync(r,n,t)};E_.exports.node=(e,t,r={})=>{t&&!Array.isArray(t)&&typeof t=="object"&&(r=t,t=[]);let n=Yce.node(r),i=process.execArgv.filter(u=>!u.startsWith("--inspect")),{nodePath:o=process.execPath,nodeOptions:a=i}=r;return H1(o,[...a,e,...Array.isArray(t)?t:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})}});var Ok=h(el=>{"use strict";var vk=el&&el.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(el,"__esModule",{value:!0});el.setEnvironment=el.loadEnvironment=void 0;var lht=vk(ele()),tle=vk(CA()),K1=vk(require("path")),W1=require("fs");async function fht(e){return rle(process.env,e)}s(fht,"loadEnvironment");el.loadEnvironment=fht;async function rle(e,t){if(e.__ZUPLO_LOG_LEVEL=process.env.__ZUPLO_LOG_LEVEL??process.env.LOG_LEVEL,e.__ZUPLO_LOG_FORMAT=process.env.__ZUPLO_LOG_FORMAT??process.env.LOG_FORMAT,e.LOG_LEVEL=process.env.LOG_LEVEL??process.env.LOG_LEVEL,e.LOG_FORMAT=process.env.LOG_FORMAT??process.env.LOG_FORMAT,e.GIT_SHA=process.env.GIT_SHA??await dht(t),process.env.__ZUPLO_CONFIG&&(e.__ZUPLO_CONFIG=process.env.__ZUPLO_CONFIG),(0,W1.existsSync)(K1.default.join(t,".env"))){let r=(0,W1.readFileSync)(K1.default.join(t,".env"),"utf8"),n=tle.default.parse(r);for(let i of Object.keys(n))e[i]=n[i]}if((0,W1.existsSync)(K1.default.join(t,".env.zuplo"))){let r=(0,W1.readFileSync)(K1.default.join(t,".env.zuplo"),"utf8"),n=tle.default.parse(r);for(let i of Object.keys(n))e[i]=n[i]}for(let r of Object.keys(e))e[r]===void 0&&delete e[r];return e}s(rle,"setEnvironment");el.setEnvironment=rle;async function dht(e){let t="unknown";try{let{stdout:r}=await(0,lht.default)("git",["rev-parse","HEAD"],{cwd:e});r.trim().length===40&&(t=r.trim())}catch{}return t}s(dht,"getGitSha")});var ot={};ahe(ot,{__addDisposableResource:()=>Ole,__assign:()=>Y1,__asyncDelegator:()=>mle,__asyncGenerator:()=>hle,__asyncValues:()=>_le,__await:()=>b_,__awaiter:()=>ule,__classPrivateFieldGet:()=>ble,__classPrivateFieldIn:()=>vle,__classPrivateFieldSet:()=>Sle,__createBinding:()=>X1,__decorate:()=>sle,__disposeResources:()=>Ple,__esDecorate:()=>pht,__exportStar:()=>lle,__extends:()=>nle,__generator:()=>cle,__importDefault:()=>Ele,__importStar:()=>yle,__makeTemplateObject:()=>gle,__metadata:()=>ale,__param:()=>ole,__propKey:()=>mht,__read:()=>wk,__rest:()=>ile,__runInitializers:()=>hht,__setFunctionName:()=>_ht,__spread:()=>fle,__spreadArray:()=>ple,__spreadArrays:()=>dle,__values:()=>J1,default:()=>Eht});function nle(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Pk(e,t);function r(){this.constructor=e}s(r,"__"),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function ile(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function sle(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(a=e[u])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function ole(e,t){return function(r,n){t(r,n,e)}}function pht(e,t,r,n,i,o){function a(E){if(E!==void 0&&typeof E!="function")throw new TypeError("Function expected");return E}s(a,"accept");for(var u=n.kind,c=u==="getter"?"get":u==="setter"?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d,_=!1,m=r.length-1;m>=0;m--){var g={};for(var y in n)g[y]=y==="access"?{}:n[y];for(var y in n.access)g.access[y]=n.access[y];g.addInitializer=function(E){if(_)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(E||null))};var b=(0,r[m])(u==="accessor"?{get:f.get,set:f.set}:f[c],g);if(u==="accessor"){if(b===void 0)continue;if(b===null||typeof b!="object")throw new TypeError("Object expected");(d=a(b.get))&&(f.get=d),(d=a(b.set))&&(f.set=d),(d=a(b.init))&&i.unshift(d)}else(d=a(b))&&(u==="field"?i.unshift(d):f[c]=d)}l&&Object.defineProperty(l,n.name,f),_=!0}function hht(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function mht(e){return typeof e=="symbol"?e:"".concat(e)}function _ht(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function ale(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function ule(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return s(i,"adopt"),new(r||(r=Promise))(function(o,a){function u(f){try{l(n.next(f))}catch(d){a(d)}}s(u,"fulfilled");function c(f){try{l(n.throw(f))}catch(d){a(d)}}s(c,"rejected");function l(f){f.done?o(f.value):i(f.value).then(u,c)}s(l,"step"),l((n=n.apply(e,t||[])).next())})}function cle(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(l){return function(f){return c([l,f])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(r=0)),r;)try{if(n=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(f){l=[6,f],i=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function lle(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&X1(t,e,r)}function J1(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function wk(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function fle(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(wk(arguments[t]));return e}function dle(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var o=arguments[t],a=0,u=o.length;a<u;a++,i++)n[i]=o[a];return n}function ple(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function b_(e){return this instanceof b_?(this.v=e,this):new b_(e)}function hle(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(_){n[_]&&(i[_]=function(m){return new Promise(function(g,y){o.push([_,m,g,y])>1||u(_,m)})})}function u(_,m){try{c(n[_](m))}catch(g){d(o[0][3],g)}}function c(_){_.value instanceof b_?Promise.resolve(_.value.v).then(l,f):d(o[0][2],_)}function l(_){u("next",_)}function f(_){u("throw",_)}function d(_,m){_(m),o.shift(),o.length&&u(o[0][0],o[0][1])}}function mle(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,o){t[i]=e[i]?function(a){return(r=!r)?{value:b_(e[i](a)),done:!1}:o?o(a):a}:o}}function _le(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof J1=="function"?J1(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(a){return new Promise(function(u,c){a=e[o](a),i(u,c,a.done,a.value)})}}function i(o,a,u,c){Promise.resolve(c).then(function(l){o({value:l,done:u})},a)}}function gle(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function yle(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&X1(t,e,r);return ght(t,e),t}function Ele(e){return e&&e.__esModule?e:{default:e}}function ble(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function Sle(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}function vle(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Ole(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if(typeof n!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}function Ple(e){function t(n){e.error=e.hasError?new yht(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}s(t,"fail");function r(){for(;e.stack.length;){var n=e.stack.pop();try{var i=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(i).then(r,function(o){return t(o),r()})}catch(o){t(o)}}if(e.hasError)throw e.error}return s(r,"next"),r()}var Pk,Y1,X1,ght,yht,Eht,at=ohe(()=>{Pk=s(function(e,t){return Pk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Pk(e,t)},"extendStatics");s(nle,"__extends");Y1=s(function(){return Y1=Object.assign||s(function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},"__assign"),Y1.apply(this,arguments)},"__assign");s(ile,"__rest");s(sle,"__decorate");s(ole,"__param");s(pht,"__esDecorate");s(hht,"__runInitializers");s(mht,"__propKey");s(_ht,"__setFunctionName");s(ale,"__metadata");s(ule,"__awaiter");s(cle,"__generator");X1=Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]};s(lle,"__exportStar");s(J1,"__values");s(wk,"__read");s(fle,"__spread");s(dle,"__spreadArrays");s(ple,"__spreadArray");s(b_,"__await");s(hle,"__asyncGenerator");s(mle,"__asyncDelegator");s(_le,"__asyncValues");s(gle,"__makeTemplateObject");ght=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};s(yle,"__importStar");s(Ele,"__importDefault");s(ble,"__classPrivateFieldGet");s(Sle,"__classPrivateFieldSet");s(vle,"__classPrivateFieldIn");s(Ole,"__addDisposableResource");yht=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};s(Ple,"__disposeResources");Eht={__extends:nle,__assign:Y1,__rest:ile,__decorate:sle,__param:ole,__metadata:ale,__awaiter:ule,__generator:cle,__createBinding:X1,__exportStar:lle,__values:J1,__read:wk,__spread:fle,__spreadArrays:dle,__spreadArray:ple,__await:b_,__asyncGenerator:hle,__asyncDelegator:mle,__asyncValues:_le,__makeTemplateObject:gle,__importStar:yle,__importDefault:Ele,__classPrivateFieldGet:ble,__classPrivateFieldSet:Sle,__classPrivateFieldIn:vle,__addDisposableResource:Ole,__disposeResources:Ple}});var Ile=h((cFt,wle)=>{var S_=1e3,v_=S_*60,O_=v_*60,Gd=O_*24,bht=Gd*7,Sht=Gd*365.25;wle.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return vht(e);if(r==="number"&&isFinite(e))return t.long?Pht(e):Oht(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function vht(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Sht;case"weeks":case"week":case"w":return r*bht;case"days":case"day":case"d":return r*Gd;case"hours":case"hour":case"hrs":case"hr":case"h":return r*O_;case"minutes":case"minute":case"mins":case"min":case"m":return r*v_;case"seconds":case"second":case"secs":case"sec":case"s":return r*S_;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}s(vht,"parse");function Oht(e){var t=Math.abs(e);return t>=Gd?Math.round(e/Gd)+"d":t>=O_?Math.round(e/O_)+"h":t>=v_?Math.round(e/v_)+"m":t>=S_?Math.round(e/S_)+"s":e+"ms"}s(Oht,"fmtShort");function Pht(e){var t=Math.abs(e);return t>=Gd?Z1(e,t,Gd,"day"):t>=O_?Z1(e,t,O_,"hour"):t>=v_?Z1(e,t,v_,"minute"):t>=S_?Z1(e,t,S_,"second"):e+" ms"}s(Pht,"fmtLong");function Z1(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}s(Z1,"plural")});var Ik=h((fFt,Tle)=>{function wht(e){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=a,r.humanize=Ile(),r.destroy=l,Object.keys(e).forEach(f=>{r[f]=e[f]}),r.names=[],r.skips=[],r.formatters={};function t(f){let d=0;for(let _=0;_<f.length;_++)d=(d<<5)-d+f.charCodeAt(_),d|=0;return r.colors[Math.abs(d)%r.colors.length]}s(t,"selectColor"),r.selectColor=t;function r(f){let d,_=null,m,g;function y(...b){if(!y.enabled)return;let E=y,v=Number(new Date),O=v-(d||v);E.diff=O,E.prev=d,E.curr=v,d=v,b[0]=r.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let P=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(j,x)=>{if(j==="%%")return"%";P++;let H=r.formatters[x];if(typeof H=="function"){let K=b[P];j=H.call(E,K),b.splice(P,1),P--}return j}),r.formatArgs.call(E,b),(E.log||r.log).apply(E,b)}return s(y,"debug"),y.namespace=f,y.useColors=r.useColors(),y.color=r.selectColor(f),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>_!==null?_:(m!==r.namespaces&&(m=r.namespaces,g=r.enabled(f)),g),set:b=>{_=b}}),typeof r.init=="function"&&r.init(y),y}s(r,"createDebug");function n(f,d){let _=r(this.namespace+(typeof d>"u"?":":d)+f);return _.log=this.log,_}s(n,"extend");function i(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let d,_=(typeof f=="string"?f:"").split(/[\s,]+/),m=_.length;for(d=0;d<m;d++)_[d]&&(f=_[d].replace(/\*/g,".*?"),f[0]==="-"?r.skips.push(new RegExp("^"+f.slice(1)+"$")):r.names.push(new RegExp("^"+f+"$")))}s(i,"enable");function o(){let f=[...r.names.map(u),...r.skips.map(u).map(d=>"-"+d)].join(",");return r.enable(""),f}s(o,"disable");function a(f){if(f[f.length-1]==="*")return!0;let d,_;for(d=0,_=r.skips.length;d<_;d++)if(r.skips[d].test(f))return!1;for(d=0,_=r.names.length;d<_;d++)if(r.names[d].test(f))return!0;return!1}s(a,"enabled");function u(f){return f.toString().substring(2,f.toString().length-2).replace(/\.\*\?$/,"*")}s(u,"toNamespace");function c(f){return f instanceof Error?f.stack||f.message:f}s(c,"coerce");function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return s(l,"destroy"),r.enable(r.load()),r}s(wht,"setup");Tle.exports=wht});var Nle=h((Ji,Q1)=>{Ji.formatArgs=Tht;Ji.save=Nht;Ji.load=Aht;Ji.useColors=Iht;Ji.storage=Rht();Ji.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ji.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Iht(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}s(Iht,"useColors");function Tht(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Q1.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}s(Tht,"formatArgs");Ji.log=console.debug||console.log||(()=>{});function Nht(e){try{e?Ji.storage.setItem("debug",e):Ji.storage.removeItem("debug")}catch{}}s(Nht,"save");function Aht(){let e;try{e=Ji.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}s(Aht,"load");function Rht(){try{return localStorage}catch{}}s(Rht,"localstorage");Q1.exports=Ik()(Ji);var{formatters:Cht}=Q1.exports;Cht.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Rle=h((hFt,Ale)=>{"use strict";Ale.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}});var Dle=h((mFt,$le)=>{"use strict";var $ht=require("os"),Cle=require("tty"),Fs=Rle(),{env:Vr}=process,eN;Fs("no-color")||Fs("no-colors")||Fs("color=false")||Fs("color=never")?eN=0:(Fs("color")||Fs("colors")||Fs("color=true")||Fs("color=always"))&&(eN=1);function Dht(){if("FORCE_COLOR"in Vr)return Vr.FORCE_COLOR==="true"?1:Vr.FORCE_COLOR==="false"?0:Vr.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Vr.FORCE_COLOR,10),3)}s(Dht,"envForceColor");function Lht(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}s(Lht,"translateLevel");function jht(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=Dht();n!==void 0&&(eN=n);let i=r?eN:n;if(i===0)return 0;if(r){if(Fs("color=16m")||Fs("color=full")||Fs("color=truecolor"))return 3;if(Fs("color=256"))return 2}if(e&&!t&&i===void 0)return 0;let o=i||0;if(Vr.TERM==="dumb")return o;if(process.platform==="win32"){let a=$ht.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in Vr)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(a=>a in Vr)||Vr.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in Vr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Vr.TEAMCITY_VERSION)?1:0;if(Vr.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Vr){let a=Number.parseInt((Vr.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Vr.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Vr.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Vr.TERM)||"COLORTERM"in Vr?1:o}s(jht,"supportsColor");function Tk(e,t={}){let r=jht(e,{streamIsTTY:e&&e.isTTY,...t});return Lht(r)}s(Tk,"getSupportLevel");$le.exports={supportsColor:Tk,stdout:Tk({isTTY:Cle.isatty(1)}),stderr:Tk({isTTY:Cle.isatty(2)})}});var jle=h((cn,rN)=>{var Mht=require("tty"),tN=require("util");cn.init=Ght;cn.log=Fht;cn.formatArgs=xht;cn.save=kht;cn.load=Bht;cn.useColors=Uht;cn.destroy=tN.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");cn.colors=[6,2,3,4,5,1];try{let e=Dle();e&&(e.stderr||e).level>=2&&(cn.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}cn.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function Uht(){return"colors"in cn.inspectOpts?!!cn.inspectOpts.colors:Mht.isatty(process.stderr.fd)}s(Uht,"useColors");function xht(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${i};1m${t} \x1B[0m`;e[0]=o+e[0].split(`
307
307
  `).join(`
308
308
  `+o),e.push(i+"m+"+rN.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=qht()+t+" "+e[0]}s(xht,"formatArgs");function qht(){return cn.inspectOpts.hideDate?"":new Date().toISOString()+" "}s(qht,"getDate");function Fht(...e){return process.stderr.write(tN.format(...e)+`
309
309
  `)}s(Fht,"log");function kht(e){e?process.env.DEBUG=e:delete process.env.DEBUG}s(kht,"save");function Bht(){return process.env.DEBUG}s(Bht,"load");function Ght(e){e.inspectOpts={};let t=Object.keys(cn.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=cn.inspectOpts[t[r]]}s(Ght,"init");rN.exports=Ik()(cn);var{formatters:Lle}=rN.exports;Lle.o=function(e){return this.inspectOpts.colors=this.useColors,tN.inspect(e,this.inspectOpts).split(`
@@ -311,7 +311,7 @@ ${n.message}`:y,S=[E,t,e].filter(Boolean).join(`
311
311
  === buffer[%d] ===`,r);for(let i=0;i<r;i+=16){n+=`
312
312
  ${P_(i.toString(16),8)}: `;let o="",a;for(a=0;a<16&&i+a<t.byteLength;a++){let u=t[i+a];n+=`${P_(u.toString(16),2)} `,o+=u>31&&u<255?String.fromCharCode(u):"\xB7",a===7&&(n+=" ")}n+=`${qle((17-a)*3," ")}${o}`}return n+=`
313
313
  `,r!==t.byteLength&&(n+=Ak(`=== (truncated %d bytes) ===
314
- `,t.byteLength-r)),n}s(omt,"dumpBuffer");Yt.dumpBuffer=omt;function amt(e){let t=e.length,r=new Uint8Array(new ArrayBuffer(t*4)),n=0;for(let i=0;i<t;i++){let o=e.charCodeAt(i);if(o<=127)r[n++]=o;else if(o<=2047)r[n++]=192|o>>>6,r[n++]=128|o>>>0&63;else if(o<=55295||o>=57344)r[n++]=224|o>>>12,r[n++]=128|o>>>6&63,r[n++]=128|o>>>0&63;else{if(i+1>=t)throw new RangeError(rl.RANGE_INVALID_UTF8);let a=o-55296,u=e.charCodeAt(++i)-56320,c=(a<<10|u)+65536;r[n++]=240|c>>>18,r[n++]=128|c>>>12&63,r[n++]=128|c>>>6&63,r[n++]=128|c>>>0&63}}return r.subarray(0,n)}s(amt,"encodeUtf8");Yt.encodeUtf8=amt;function Ak(e,...t){let r=e.length,n,i=0,o,a=!1,u=0,c=!1,l,f="";function d(){return t[i++]}s(d,"nextArg");function _(){let m="";for(;/\d/.test(e[u]);)m+=e[u++],o=e[u];return m.length>0?parseInt(m,10):null}for(s(_,"slurpNumber");u<r;++u)if(o=e[u],a)switch(a=!1,o==="."?(c=!1,o=e[++u]):o==="0"&&e[u+1]==="."?(c=!0,u+=2,o=e[u]):c=!0,l=_(),o){case"a":f+="0x"+P_(parseInt(String(d()),10).toString(16),8);break;case"b":f+=parseInt(String(d()),10).toString(2);break;case"c":n=d(),typeof n=="string"||n instanceof String?f+=n:f+=String.fromCharCode(parseInt(String(n),10));break;case"d":f+=parseInt(String(d()),10);break;case"f":{let m=parseFloat(String(d())).toFixed(l||6);f+=c?m:m.replace(/^0/,"");break}case"j":f+=JSON.stringify(d());break;case"o":f+="0"+parseInt(String(d()),10).toString(8);break;case"s":f+=d();break;case"x":f+="0x"+parseInt(String(d()),10).toString(16);break;case"X":f+="0x"+parseInt(String(d()),10).toString(16).toUpperCase();break;default:f+=o;break}else o==="%"?a=!0:f+=o;return f}s(Ak,"format");Yt.format=Ak;function umt(e){return e}s(umt,"identity");Yt.identity=umt;function P_(e,t,r="0"){return e.length>=t?e:new Array(t-e.length+1).join(r)+e}s(P_,"pad");Yt.pad=P_;function cmt(e){return e+7&-8}s(cmt,"padToWord");Yt.padToWord=cmt;function qle(e,t){let r="",n=e,i=t;if(n<1||n>Number.MAX_VALUE)return r;do n%2&&(r+=i),n=Math.floor(n/2),n&&(i+=i);while(n);return r}s(qle,"repeat");Yt.repeat=qle;var iN=s(e=>parseInt(String(e)).toString(16),"hex");tb.default.formatters.h=iN;tb.default.formatters.x=e=>`0x${iN(e)}`;tb.default.formatters.a=e=>`0x${P_(iN(e),8)}`;tb.default.formatters.X=e=>`0x${iN(e).toUpperCase()}`});var nb=h(rb=>{"use strict";Object.defineProperty(rb,"__esModule",{value:!0});rb.ArenaKind=void 0;var lmt;(function(e){e[e.SINGLE_SEGMENT=0]="SINGLE_SEGMENT",e[e.MULTI_SEGMENT=1]="MULTI_SEGMENT"})(lmt=rb.ArenaKind||(rb.ArenaKind={}))});var Ck=h(sN=>{"use strict";Object.defineProperty(sN,"__esModule",{value:!0});sN.ArenaAllocationResult=void 0;var fmt=(at(),ct(ot)),dmt=fmt.__importDefault(mt()),Fle=dmt.default("capnp:serialization:arena:arena-allocation-result");Fle("load");var Rk=class{static{s(this,"ArenaAllocationResult")}constructor(t,r){this.id=t,this.buffer=r,Fle("new",this)}};sN.ArenaAllocationResult=Rk});var Lk=h(Ia=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});Ia.getNumSegments=Ia.getBuffer=Ia.allocate=Ia.MultiSegmentArena=void 0;var pmt=(at(),ct(ot)),hmt=pmt.__importDefault(mt()),mmt=Xi(),_mt=Xn(),$k=Ai(),gmt=Ck(),ymt=nb(),kle=hmt.default("capnp:arena:multi");kle("load");var w_=class{static{s(this,"MultiSegmentArena")}constructor(t=[]){this.kind=ymt.ArenaKind.MULTI_SEGMENT,this.buffers=t,kle("new %s",this)}toString(){return $k.format("MultiSegmentArena_segments:%d",Dk(this))}};Ia.MultiSegmentArena=w_;w_.allocate=Ble;w_.getBuffer=Gle;w_.getNumSegments=Dk;function Ble(e,t){let r=new ArrayBuffer($k.padToWord(Math.max(e,mmt.DEFAULT_BUFFER_SIZE)));return t.buffers.push(r),new gmt.ArenaAllocationResult(t.buffers.length-1,r)}s(Ble,"allocate");Ia.allocate=Ble;function Gle(e,t){if(e<0||e>=t.buffers.length)throw new Error($k.format(_mt.SEG_ID_OUT_OF_BOUNDS,e));return t.buffers[e]}s(Gle,"getBuffer");Ia.getBuffer=Gle;function Dk(e){return e.buffers.length}s(Dk,"getNumSegments");Ia.getNumSegments=Dk});var Uk=h(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.getNumSegments=Ta.getBuffer=Ta.allocate=Ta.SingleSegmentArena=void 0;var Emt=(at(),ct(ot)),bmt=Emt.__importDefault(mt()),jk=Xi(),Vle=Xn(),oN=Ai(),Smt=Ck(),vmt=nb(),Mk=bmt.default("capnp:arena:single");Mk("load");var I_=class{static{s(this,"SingleSegmentArena")}constructor(t=new ArrayBuffer(jk.DEFAULT_BUFFER_SIZE)){if(this.kind=vmt.ArenaKind.SINGLE_SEGMENT,t.byteLength&7)throw new Error(oN.format(Vle.SEG_NOT_WORD_ALIGNED,t.byteLength));this.buffer=t,Mk("new %s",this)}toString(){return oN.format("SingleSegmentArena_len:%x",this.buffer.byteLength)}};Ta.SingleSegmentArena=I_;I_.allocate=zle;I_.getBuffer=Hle;I_.getNumSegments=Kle;function zle(e,t,r){Mk("Allocating %x bytes for segment 0 in %s.",e,r);let n=t.length>0?t[0].buffer:r.buffer;return e<jk.MIN_SINGLE_SEGMENT_GROWTH?e=jk.MIN_SINGLE_SEGMENT_GROWTH:e=oN.padToWord(e),r.buffer=new ArrayBuffer(n.byteLength+e),new Float64Array(r.buffer).set(new Float64Array(n)),new Smt.ArenaAllocationResult(0,r.buffer)}s(zle,"allocate");Ta.allocate=zle;function Hle(e,t){if(e!==0)throw new Error(oN.format(Vle.SEG_GET_NON_ZERO_SINGLE,e));return t.buffer}s(Hle,"getBuffer");Ta.getBuffer=Hle;function Kle(){return 1}s(Kle,"getNumSegments");Ta.getNumSegments=Kle});var Xle=h(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.getNumSegments=Na.getBuffer=Na.allocate=Na.Arena=void 0;var Omt=(at(),ct(ot)),Pmt=Omt.__importDefault(mt()),xk=Xn(),T_=nb(),qk=Lk(),Fk=Uk(),wmt=Pmt.default("capnp:arena");wmt("load");var N_=class{static{s(this,"Arena")}};Na.Arena=N_;N_.allocate=Wle;N_.getBuffer=Yle;N_.getNumSegments=Jle;function Wle(e,t,r){switch(r.kind){case T_.ArenaKind.MULTI_SEGMENT:return qk.MultiSegmentArena.allocate(e,r);case T_.ArenaKind.SINGLE_SEGMENT:return Fk.SingleSegmentArena.allocate(e,t,r);default:return xk.assertNever(r)}}s(Wle,"allocate");Na.allocate=Wle;function Yle(e,t){switch(t.kind){case T_.ArenaKind.MULTI_SEGMENT:return qk.MultiSegmentArena.getBuffer(e,t);case T_.ArenaKind.SINGLE_SEGMENT:return Fk.SingleSegmentArena.getBuffer(e,t);default:return xk.assertNever(t)}}s(Yle,"getBuffer");Na.getBuffer=Yle;function Jle(e){switch(e.kind){case T_.ArenaKind.MULTI_SEGMENT:return qk.MultiSegmentArena.getNumSegments(e);case T_.ArenaKind.SINGLE_SEGMENT:return Fk.SingleSegmentArena.getNumSegments();default:return xk.assertNever(e)}}s(Jle,"getNumSegments");Na.getNumSegments=Jle});var Zle=h(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.SingleSegmentArena=Aa.MultiSegmentArena=Aa.ArenaKind=Aa.Arena=void 0;var Imt=Xle();Object.defineProperty(Aa,"Arena",{enumerable:!0,get:function(){return Imt.Arena}});var Tmt=nb();Object.defineProperty(Aa,"ArenaKind",{enumerable:!0,get:function(){return Tmt.ArenaKind}});var Nmt=Lk();Object.defineProperty(Aa,"MultiSegmentArena",{enumerable:!0,get:function(){return Nmt.MultiSegmentArena}});var Amt=Uk();Object.defineProperty(Aa,"SingleSegmentArena",{enumerable:!0,get:function(){return Amt.SingleSegmentArena}})});var ife=h(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.unpack=Ri.pack=Ri.getZeroByteCount=Ri.getUnpackedByteLength=Ri.getTagByte=Ri.getHammingWeight=void 0;var Qle=Xi(),Rmt=Xn();function efe(e){let t=e-(e>>1&1431655765);return t=(t&858993459)+(t>>2&858993459),(t+(t>>4)&252645135)*16843009>>24}s(efe,"getHammingWeight");Ri.getHammingWeight=efe;function tfe(e,t,r,n,i,o,a,u){return(e===0?0:1)|(t===0?0:2)|(r===0?0:4)|(n===0?0:8)|(i===0?0:16)|(o===0?0:32)|(a===0?0:64)|(u===0?0:128)}s(tfe,"getTagByte");Ri.getTagByte=tfe;function rfe(e){let t=new Uint8Array(e),r=0,n=119;for(let i=0;i<t.byteLength;){let o=t[i];n===0?(r+=o,i++,n=119):n===255?(r+=o,i+=o*8+1,n=119):(r++,i+=efe(o)+1,n=o)}return r*8}s(rfe,"getUnpackedByteLength");Ri.getUnpackedByteLength=rfe;function nfe(e,t,r,n,i,o,a,u){return(e===0?1:0)+(t===0?1:0)+(r===0?1:0)+(n===0?1:0)+(i===0?1:0)+(o===0?1:0)+(a===0?1:0)+(u===0?1:0)}s(nfe,"getZeroByteCount");Ri.getZeroByteCount=nfe;function Cmt(e,t=0,r){if(e.byteLength%8!==0)throw new Error(Rmt.MSG_PACK_NOT_WORD_ALIGNED);let n=new Uint8Array(e,t,r),i=[],o=119,a=NaN,u=0,c=Qle.PACK_SPAN_THRESHOLD;for(let l=0;l<n.byteLength;l+=8){let f=n[l],d=n[l+1],_=n[l+2],m=n[l+3],g=n[l+4],y=n[l+5],b=n[l+6],E=n[l+7],S=tfe(f,d,_,m,g,y,b,E),O=!0;switch(o){case 0:S!==0||u>=255?(i.push(u),u=0,O=!1):u++;break;case 255:{let P=nfe(f,d,_,m,g,y,b,E);c-=P,c<=0||u>=255?(i[a]=u,u=0,c=Qle.PACK_SPAN_THRESHOLD,O=!1):(i.push(f,d,_,m,g,y,b,E),u++);break}default:O=!1;break}O||(i.push(S),o=S,f!==0&&i.push(f),d!==0&&i.push(d),_!==0&&i.push(_),m!==0&&i.push(m),g!==0&&i.push(g),y!==0&&i.push(y),b!==0&&i.push(b),E!==0&&i.push(E),S===255&&(a=i.length,i.push(0)))}return o===0?i.push(u):o===255&&(i[a]=u),new Uint8Array(i).buffer}s(Cmt,"pack");Ri.pack=Cmt;function $mt(e){let t=new Uint8Array(e),r=new Uint8Array(new ArrayBuffer(rfe(e))),n=119;for(let i=0,o=0;i<t.byteLength;){let a=t[i];if(n===0)o+=a*8,i++,n=119;else if(n===255){let u=a*8;r.set(t.subarray(i+1,i+1+u),o),o+=u,i+=1+u,n=119}else{i++;for(let u=1;u<=128;u<<=1)a&u&&(r[o]=t[i++]),o++;n=a}}return r.buffer}s($mt,"unpack");Ri.unpack=$mt});var zd=h(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});ks.padToWord=ks.getWordLength=ks.getDataWordLength=ks.getByteLength=ks.ObjectSize=void 0;var sfe=(at(),ct(ot)),Dmt=sfe.__importDefault(mt()),ofe=sfe.__importStar(Ai()),Lmt=Dmt.default("capnp:object-size");Lmt("load");var aN=class{static{s(this,"ObjectSize")}constructor(t,r){this.dataByteLength=t,this.pointerLength=r}toString(){return ofe.format("ObjectSize_dw:%d,pc:%d",afe(this),this.pointerLength)}};ks.ObjectSize=aN;function jmt(e){return e.dataByteLength+e.pointerLength*8}s(jmt,"getByteLength");ks.getByteLength=jmt;function afe(e){return e.dataByteLength/8}s(afe,"getDataWordLength");ks.getDataWordLength=afe;function Mmt(e){return e.dataByteLength/8+e.pointerLength}s(Mmt,"getWordLength");ks.getWordLength=Mmt;function Umt(e){return new aN(ofe.padToWord(e.dataByteLength),e.pointerLength)}s(Umt,"padToWord");ks.padToWord=Umt});var Hd=h(ib=>{"use strict";Object.defineProperty(ib,"__esModule",{value:!0});ib.PointerType=void 0;var xmt;(function(e){e[e.STRUCT=0]="STRUCT",e[e.LIST=1]="LIST",e[e.FAR=2]="FAR",e[e.OTHER=3]="OTHER"})(xmt=ib.PointerType||(ib.PointerType={}))});var Gk=h(cN=>{"use strict";Object.defineProperty(cN,"__esModule",{value:!0});cN.Orphan=void 0;var qmt=(at(),ct(ot)),Fmt=qmt.__importDefault(mt()),uN=Xn(),kk=Ai(),ufe=cr(),kmt=zd(),Ci=Jt(),nl=Hd(),cfe=Fmt.default("capnp:orphan");cfe("load");var Bk=class{static{s(this,"Orphan")}constructor(t){let r=Ci.getContent(t);switch(this.segment=r.segment,this.byteOffset=r.byteOffset,this._capnp={},this._capnp.type=Ci.getTargetPointerType(t),this._capnp.type){case nl.PointerType.STRUCT:this._capnp.size=Ci.getTargetStructSize(t);break;case nl.PointerType.LIST:this._capnp.length=Ci.getTargetListLength(t),this._capnp.elementSize=Ci.getTargetListElementSize(t),this._capnp.elementSize===ufe.ListElementSize.COMPOSITE&&(this._capnp.size=Ci.getTargetCompositeListSize(t));break;case nl.PointerType.OTHER:this._capnp.capId=Ci.getCapabilityId(t);break;default:throw new Error(uN.PTR_INVALID_POINTER_TYPE)}Ci.erasePointer(t)}_moveTo(t){if(this._capnp===void 0)throw new Error(kk.format(uN.PTR_ALREADY_ADOPTED,this));if(this.segment.message!==t.segment.message)throw new Error(kk.format(uN.PTR_ADOPT_WRONG_MESSAGE,this,t));Ci.erase(t);let r=Ci.initPointer(this.segment,this.byteOffset,t);switch(this._capnp.type){case nl.PointerType.STRUCT:Ci.setStructPointer(r.offsetWords,this._capnp.size,r.pointer);break;case nl.PointerType.LIST:{let n=r.offsetWords;this._capnp.elementSize===ufe.ListElementSize.COMPOSITE&&n--,Ci.setListPointer(n,this._capnp.elementSize,this._capnp.length,r.pointer,this._capnp.size);break}case nl.PointerType.OTHER:Ci.setInterfacePointer(this._capnp.capId,r.pointer);break;default:throw new Error(uN.PTR_INVALID_POINTER_TYPE)}this._capnp=void 0}dispose(){if(this._capnp===void 0){cfe("not disposing an already disposed orphan",this);return}switch(this._capnp.type){case nl.PointerType.STRUCT:this.segment.fillZeroWords(this.byteOffset,kmt.getWordLength(this._capnp.size));break;case nl.PointerType.LIST:{let t=Ci.getListByteLength(this._capnp.elementSize,this._capnp.length,this._capnp.size);this.segment.fillZeroWords(this.byteOffset,t);break}default:break}this._capnp=void 0}toString(){return kk.format("Orphan_%d@%a,type:%s",this.segment.id,this.byteOffset,this._capnp&&this._capnp.type)}};cN.Orphan=Bk});var lfe=h(lN=>{"use strict";Object.defineProperty(lN,"__esModule",{value:!0});lN.PointerAllocationResult=void 0;var Bmt=(at(),ct(ot)),Gmt=Bmt.__importDefault(mt()),Vmt=Gmt.default("capnp:pointer-allocation-result");Vmt("load");var Vk=class{static{s(this,"PointerAllocationResult")}constructor(t,r){this.pointer=t,this.offsetWords=r}};lN.PointerAllocationResult=Vk});var Jt=h(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.trackPointerAllocation=V.copyFromStruct=V.copyFromList=V.validate=V.setStructPointer=V.setListPointer=V.setInterfacePointer=V.setFarPointer=V.relocateTo=V.isNull=V.isDoubleFar=V.initPointer=V.getTargetStructSize=V.getTargetPointerType=V.getTargetListLength=V.getTargetListElementSize=V.getTargetCompositeListSize=V.getTargetCompositeListTag=V.getStructSize=V.getStructPointerLength=V.getStructDataWords=V.getPointerType=V.getOffsetWords=V.getListLength=V.getListElementSize=V.getFarSegmentId=V.getContent=V.getCapabilityId=V.followFars=V.followFar=V.erasePointer=V.erase=V.copyFrom=V.add=V.getListElementByteLength=V.getListByteLength=V.dump=V.disown=V.adopt=V.Pointer=void 0;var zmt=(at(),ct(ot)),Hmt=zmt.__importDefault(mt()),C_=Xi(),ln=Ai(),Ht=cr(),Zi=zd(),Kmt=Gk(),zk=lfe(),$i=Hd(),Zn=Xn(),A_=Hmt.default("capnp:pointer");A_("load");var yr=class{static{s(this,"Pointer")}constructor(t,r,n=C_.MAX_DEPTH){if(this._capnp={compositeList:!1,depthLimit:n},this.segment=t,this.byteOffset=r,n===0)throw new Error(ln.format(Zn.PTR_DEPTH_LIMIT_EXCEEDED,this));if(vfe(t.message,this),r<0||r>t.byteLength)throw new Error(ln.format(Zn.PTR_OFFSET_OUT_OF_BOUNDS,r));A_("new %s",this)}toString(){return ln.format("Pointer_%d@%a,%s,limit:%x",this.segment.id,this.byteOffset,Kk(this),this._capnp.depthLimit)}};V.Pointer=yr;yr.adopt=ffe;yr.copyFrom=sb;yr.disown=dfe;yr.dump=Kk;yr.isNull=ub;yr._capnp={displayName:"Pointer"};function ffe(e,t){e._moveTo(t)}s(ffe,"adopt");V.adopt=ffe;function dfe(e){return new Kmt.Orphan(e)}s(dfe,"disown");V.disown=dfe;function Kk(e){return ln.bufferToHex(e.segment.buffer.slice(e.byteOffset,e.byteOffset+8))}s(Kk,"dump");V.dump=Kk;function Wmt(e,t,r){switch(e){case Ht.ListElementSize.BIT:return ln.padToWord(t+7>>>3);case Ht.ListElementSize.BYTE:case Ht.ListElementSize.BYTE_2:case Ht.ListElementSize.BYTE_4:case Ht.ListElementSize.BYTE_8:case Ht.ListElementSize.POINTER:case Ht.ListElementSize.VOID:return ln.padToWord(dN(e)*t);case Ht.ListElementSize.COMPOSITE:if(r===void 0)throw new Error(ln.format(Zn.PTR_INVALID_LIST_SIZE,NaN));return t*ln.padToWord(Zi.getByteLength(r));default:throw new Error(Zn.PTR_INVALID_LIST_SIZE)}}s(Wmt,"getListByteLength");V.getListByteLength=Wmt;function dN(e){switch(e){case Ht.ListElementSize.BIT:return NaN;case Ht.ListElementSize.BYTE:return 1;case Ht.ListElementSize.BYTE_2:return 2;case Ht.ListElementSize.BYTE_4:return 4;case Ht.ListElementSize.BYTE_8:case Ht.ListElementSize.POINTER:return 8;case Ht.ListElementSize.COMPOSITE:return NaN;case Ht.ListElementSize.VOID:return 0;default:throw new Error(ln.format(Zn.PTR_INVALID_LIST_SIZE,e))}}s(dN,"getListElementByteLength");V.getListElementByteLength=dN;function Hk(e,t){return new yr(t.segment,t.byteOffset+e,t._capnp.depthLimit)}s(Hk,"add");V.add=Hk;function sb(e,t){if(t.segment===e.segment&&t.byteOffset===e.byteOffset){A_("ignoring copy operation from identical pointer %s",e);return}if(R_(t),!ub(e))switch(L_(e)){case $i.PointerType.STRUCT:Sfe(e,t);break;case $i.PointerType.LIST:bfe(e,t);break;default:throw new Error(ln.format(Zn.PTR_INVALID_POINTER_TYPE,L_(t)))}}s(sb,"copyFrom");V.copyFrom=sb;function R_(e){if(ub(e))return;let t;switch(L_(e)){case $i.PointerType.STRUCT:{let r=Zk(e);t=$_(e),t.segment.fillZeroWords(t.byteOffset,r.dataByteLength/8);for(let n=0;n<r.pointerLength;n++)R_(Hk(n*8,t));break}case $i.PointerType.LIST:{let r=hN(e),n=Xk(e),i=ln.padToWord(n*dN(r));if(t=$_(e),r===Ht.ListElementSize.POINTER){for(let o=0;o<n;o++)R_(new yr(t.segment,t.byteOffset+o*8,e._capnp.depthLimit-1));break}else if(r===Ht.ListElementSize.COMPOSITE){let o=Hk(-8,t),a=ab(o),u=Zi.getByteLength(a);i=D_(o),t.segment.setWordZero(t.byteOffset-8);for(let c=0;c<n;c++)for(let l=0;l<a.pointerLength;l++)R_(new yr(t.segment,t.byteOffset+c*u+l*8,e._capnp.depthLimit-1))}t.segment.fillZeroWords(t.byteOffset,i);break}case $i.PointerType.OTHER:break;default:throw new Error(ln.format(Zn.PTR_INVALID_POINTER_TYPE,L_(e)))}Wk(e)}s(R_,"erase");V.erase=R_;function Wk(e){if(ob(e)===$i.PointerType.FAR){let t=pN(e);_N(e)&&t.segment.setWordZero(t.byteOffset+8),t.segment.setWordZero(t.byteOffset)}e.segment.setWordZero(e.byteOffset)}s(Wk,"erasePointer");V.erasePointer=Wk;function pN(e){let t=e.segment.message.getSegment(e.segment.getUint32(e.byteOffset+4)),r=e.segment.getUint32(e.byteOffset)>>>3;return new yr(t,r*8,e._capnp.depthLimit-1)}s(pN,"followFar");V.followFar=pN;function il(e){if(ob(e)===$i.PointerType.FAR){let t=pN(e);return _N(e)&&(t.byteOffset+=8),t}return e}s(il,"followFars");V.followFars=il;function Ymt(e){return e.segment.getUint32(e.byteOffset+4)}s(Ymt,"getCapabilityId");V.getCapabilityId=Ymt;function Jmt(e){return L_(e)===$i.PointerType.LIST&&hN(e)===Ht.ListElementSize.COMPOSITE}s(Jmt,"isCompositeList");function $_(e,t){let r;if(_N(e)){let n=pN(e);r=new yr(e.segment.message.getSegment(pfe(n)),D_(n)*8)}else{let n=il(e);r=new yr(n.segment,n.byteOffset+8+D_(n)*8)}return Jmt(e)&&(r.byteOffset+=8),!t&&e._capnp.compositeIndex!==void 0&&(r.byteOffset-=8,r.byteOffset+=8+e._capnp.compositeIndex*Zi.getByteLength(Zi.padToWord(ab(r)))),r}s($_,"getContent");V.getContent=$_;function pfe(e){return e.segment.getUint32(e.byteOffset+4)}s(pfe,"getFarSegmentId");V.getFarSegmentId=pfe;function Yk(e){return e.segment.getUint32(e.byteOffset+4)&C_.LIST_SIZE_MASK}s(Yk,"getListElementSize");V.getListElementSize=Yk;function hfe(e){return e.segment.getUint32(e.byteOffset+4)>>>3}s(hfe,"getListLength");V.getListLength=hfe;function D_(e){let t=e.segment.getInt32(e.byteOffset);return t&2?t>>3:t>>2}s(D_,"getOffsetWords");V.getOffsetWords=D_;function ob(e){return e.segment.getUint32(e.byteOffset)&C_.POINTER_TYPE_MASK}s(ob,"getPointerType");V.getPointerType=ob;function mfe(e){return e.segment.getUint16(e.byteOffset+4)}s(mfe,"getStructDataWords");V.getStructDataWords=mfe;function _fe(e){return e.segment.getUint16(e.byteOffset+6)}s(_fe,"getStructPointerLength");V.getStructPointerLength=_fe;function ab(e){return new Zi.ObjectSize(mfe(e)*8,_fe(e))}s(ab,"getStructSize");V.getStructSize=ab;function Jk(e){let t=$_(e);return t.byteOffset-=8,t}s(Jk,"getTargetCompositeListTag");V.getTargetCompositeListTag=Jk;function gfe(e){return ab(Jk(e))}s(gfe,"getTargetCompositeListSize");V.getTargetCompositeListSize=gfe;function hN(e){return Yk(il(e))}s(hN,"getTargetListElementSize");V.getTargetListElementSize=hN;function Xk(e){let t=il(e);return Yk(t)===Ht.ListElementSize.COMPOSITE?D_(Jk(e)):hfe(t)}s(Xk,"getTargetListLength");V.getTargetListLength=Xk;function L_(e){let t=ob(il(e));if(t===$i.PointerType.FAR)throw new Error(ln.format(Zn.PTR_INVALID_FAR_TARGET,e));return t}s(L_,"getTargetPointerType");V.getTargetPointerType=L_;function Zk(e){return ab(il(e))}s(Zk,"getTargetStructSize");V.getTargetStructSize=Zk;function mN(e,t,r){if(r.segment!==e){if(A_("Initializing far pointer %s -> %s.",r,e),!e.hasCapacity(8)){let i=r.segment.allocate(16);return A_("GAH! Initializing double-far pointer in %s from %s -> %s.",r,e,i),fN(!0,i.byteOffset/8,i.segment.id,r),fN(!1,t/8,e.id,i),i.byteOffset+=8,new zk.PointerAllocationResult(i,0)}let n=e.allocate(8);if(n.segment.id!==e.id)throw new Error(Zn.INVARIANT_UNREACHABLE_CODE);return fN(!1,n.byteOffset/8,n.segment.id,r),new zk.PointerAllocationResult(n,(t-n.byteOffset-8)/8)}return A_("Initializing intra-segment pointer %s -> %a.",r,t),new zk.PointerAllocationResult(r,(t-r.byteOffset-8)/8)}s(mN,"initPointer");V.initPointer=mN;function _N(e){return ob(e)===$i.PointerType.FAR&&(e.segment.getUint32(e.byteOffset)&C_.POINTER_DOUBLE_FAR_MASK)!==0}s(_N,"isDoubleFar");V.isDoubleFar=_N;function ub(e){return e.segment.isWordZero(e.byteOffset)}s(ub,"isNull");V.isNull=ub;function Xmt(e,t){let r=il(t),n=r.segment.getUint8(r.byteOffset)&3,i=r.segment.getUint32(r.byteOffset+4);R_(e);let o=mN(r.segment,r.byteOffset+8+D_(r)*8,e);o.pointer.segment.setUint32(o.pointer.byteOffset,n|o.offsetWords<<2),o.pointer.segment.setUint32(o.pointer.byteOffset+4,i),Wk(t)}s(Xmt,"relocateTo");V.relocateTo=Xmt;function fN(e,t,r,n){let i=$i.PointerType.FAR,o=e?1:0,a=t,u=r;n.segment.setUint32(n.byteOffset,i|o<<2|a<<3),n.segment.setUint32(n.byteOffset+4,u)}s(fN,"setFarPointer");V.setFarPointer=fN;function Zmt(e,t){t.segment.setUint32(t.byteOffset,$i.PointerType.OTHER),t.segment.setUint32(t.byteOffset+4,e)}s(Zmt,"setInterfacePointer");V.setInterfacePointer=Zmt;function yfe(e,t,r,n,i){let o=$i.PointerType.LIST,a=e,u=t,c=r;if(t===Ht.ListElementSize.COMPOSITE){if(i===void 0)throw new TypeError(Zn.TYPE_COMPOSITE_SIZE_UNDEFINED);c*=Zi.getWordLength(i)}n.segment.setUint32(n.byteOffset,o|a<<2),n.segment.setUint32(n.byteOffset+4,u|c<<3)}s(yfe,"setListPointer");V.setListPointer=yfe;function Efe(e,t,r){let n=$i.PointerType.STRUCT,i=e,o=Zi.getDataWordLength(t),a=t.pointerLength;r.segment.setUint32(r.byteOffset,n|i<<2),r.segment.setUint16(r.byteOffset+4,o),r.segment.setUint16(r.byteOffset+6,a)}s(Efe,"setStructPointer");V.setStructPointer=Efe;function Qmt(e,t,r){if(ub(t))return;let n=il(t);if((n.segment.getUint32(n.byteOffset)&C_.POINTER_TYPE_MASK)!==e)throw new Error(ln.format(Zn.PTR_WRONG_POINTER_TYPE,t,e));if(r!==void 0&&(n.segment.getUint32(n.byteOffset+4)&C_.LIST_SIZE_MASK)!==r)throw new Error(ln.format(Zn.PTR_WRONG_LIST_TYPE,t,Ht.ListElementSize[r]))}s(Qmt,"validate");V.validate=Qmt;function bfe(e,t){if(t._capnp.depthLimit<=0)throw new Error(Zn.PTR_DEPTH_LIMIT_EXCEEDED);let r=$_(e),n=hN(e),i=Xk(e),o,a,u;if(n===Ht.ListElementSize.POINTER){u=t.segment.allocate(i<<3);for(let l=0;l<i;l++){let f=new yr(r.segment,r.byteOffset+(l<<3),e._capnp.depthLimit-1),d=new yr(u.segment,u.byteOffset+(l<<3),t._capnp.depthLimit-1);sb(f,d)}}else if(n===Ht.ListElementSize.COMPOSITE){if(o=Zi.padToWord(gfe(e)),a=Zi.getByteLength(o),u=t.segment.allocate(Zi.getByteLength(o)*i+8),u.segment.copyWord(u.byteOffset,r.segment,r.byteOffset-8),o.dataByteLength>0){let l=Zi.getWordLength(o)*i;u.segment.copyWords(u.byteOffset+8,r.segment,r.byteOffset,l)}for(let l=0;l<i;l++)for(let f=0;f<o.pointerLength;f++){let d=l*a+o.dataByteLength+(f<<3),_=new yr(r.segment,r.byteOffset+d,e._capnp.depthLimit-1),m=new yr(u.segment,u.byteOffset+d+8,t._capnp.depthLimit-1);sb(_,m)}}else{let l=ln.padToWord(n===Ht.ListElementSize.BIT?i+7>>>3:dN(n)*i),f=l>>>3;u=t.segment.allocate(l),u.segment.copyWords(u.byteOffset,r.segment,r.byteOffset,f)}let c=mN(u.segment,u.byteOffset,t);yfe(c.offsetWords,n,i,c.pointer,o)}s(bfe,"copyFromList");V.copyFromList=bfe;function Sfe(e,t){if(t._capnp.depthLimit<=0)throw new Error(Zn.PTR_DEPTH_LIMIT_EXCEEDED);let r=$_(e),n=Zk(e),i=Zi.getDataWordLength(n),o=t.segment.allocate(Zi.getByteLength(n));o.segment.copyWords(o.byteOffset,r.segment,r.byteOffset,i);for(let u=0;u<n.pointerLength;u++){let c=n.dataByteLength+u*8,l=new yr(r.segment,r.byteOffset+c,e._capnp.depthLimit-1),f=new yr(o.segment,o.byteOffset+c,t._capnp.depthLimit-1);sb(l,f)}if(t._capnp.compositeList)return;let a=mN(o.segment,o.byteOffset,t);Efe(a.offsetWords,n,a.pointer)}s(Sfe,"copyFromStruct");V.copyFromStruct=Sfe;function vfe(e,t){if(e._capnp.traversalLimit-=8,e._capnp.traversalLimit<=0)throw new Error(ln.format(Zn.PTR_TRAVERSAL_LIMIT_EXCEEDED,t))}s(vfe,"trackPointerAllocation");V.trackPointerAllocation=vfe});var Lr=h(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.set=Ra.get=Ra.initList=Ra.List=void 0;var e_t=(at(),ct(ot)),t_t=e_t.__importDefault(mt()),Ofe=Xn(),Qk=Ai(),Iu=cr(),Pfe=zd(),Kd=Jt(),wfe=t_t.default("capnp:list");wfe("load");var Wd=class extends Kd.Pointer{static{s(this,"List")}static toString(){return this._capnp.displayName}all(t){let r=this.getLength();for(let n=0;n<r;n++)if(!t(this.get(n),n))return!1;return!0}any(t){let r=this.getLength();for(let n=0;n<r;n++)if(t(this.get(n),n))return!0;return!1}ap(t){let r=this.getLength(),n=[];for(let i=0;i<r;i++)n.push(...t.map(o=>o(this.get(i),i)));return n}concat(t){let r=this.getLength(),n=t.getLength(),i=new Array(r+n);for(let o=0;o<r;o++)i[o]=this.get(o);for(let o=0;o<n;o++)i[o+r]=t.get(o);return i}drop(t){let r=this.getLength(),n=new Array(r);for(let i=t;i<r;i++)n[i]=this.get(i);return n}dropWhile(t){let r=this.getLength(),n=[],i=!0;for(let o=0;o<r;o++){let a=this.get(o);i&&(i=t(a,o)),i||n.push(a)}return n}empty(){return[]}every(t){return this.all(t)}filter(t){let r=this.getLength(),n=[];for(let i=0;i<r;i++){let o=this.get(i);t(o,i)&&n.push(o)}return n}find(t){let r=this.getLength();for(let n=0;n<r;n++){let i=this.get(n);if(t(i,n))return i}}findIndex(t){let r=this.getLength();for(let n=0;n<r;n++){let i=this.get(n);if(t(i,n))return n}return-1}forEach(t){let r=this.getLength();for(let n=0;n<r;n++)t(this.get(n),n)}get(t){return eB(t,this)}getLength(){return Kd.getTargetListLength(this)}groupBy(t){let r=this.getLength(),n={};for(let i=0;i<r;i++){let o=this.get(i);n[t(o,i)]=o}return n}intersperse(t){let r=this.getLength(),n=new Array(r);for(let i=0;i<r;i++)i>0&&n.push(t),n.push(this.get(i));return n}map(t){let r=this.getLength(),n=new Array(r);for(let i=0;i<r;i++)n[i]=t(this.get(i),i);return n}reduce(t,r){let n=0,i;for(r===void 0?(i=this.get(0),n++):i=r;n<this.getLength();n++)i=t(i,this.get(n),n);return i}set(t,r){tB(t,r,this)}slice(t=0,r){let n=r?Math.min(this.getLength(),r):this.getLength(),i=new Array(n-t);for(let o=t;o<n;o++)i[o]=this.get(o);return i}some(t){return this.any(t)}take(t){let r=Math.min(this.getLength(),t),n=new Array(r);for(let i=0;i<r;i++)n[i]=this.get(i);return n}takeWhile(t){let r=this.getLength(),n=[],i;for(let o=0;o<r;o++){let a=this.get(o);if(i=t(a,o),!i)return n;n.push(a)}return n}toArray(){return this.map(Qk.identity)}toString(){return`List_${super.toString()}`}};Ra.List=Wd;Wd._capnp={displayName:"List<Generic>",size:Iu.ListElementSize.VOID};Wd.get=eB;Wd.initList=Ife;Wd.set=tB;function Ife(e,t,r,n){let i;switch(e){case Iu.ListElementSize.BIT:i=r.segment.allocate(Math.ceil(t/8));break;case Iu.ListElementSize.BYTE:case Iu.ListElementSize.BYTE_2:case Iu.ListElementSize.BYTE_4:case Iu.ListElementSize.BYTE_8:case Iu.ListElementSize.POINTER:i=r.segment.allocate(t*Kd.getListElementByteLength(e));break;case Iu.ListElementSize.COMPOSITE:{if(n===void 0)throw new Error(Qk.format(Ofe.PTR_COMPOSITE_SIZE_UNDEFINED));n=Pfe.padToWord(n);let a=Pfe.getByteLength(n)*t;i=r.segment.allocate(a+8),Kd.setStructPointer(t,n,i),wfe("Wrote composite tag word %s for %s.",i,r);break}case Iu.ListElementSize.VOID:Kd.setListPointer(0,e,t,r);return;default:throw new Error(Qk.format(Ofe.PTR_INVALID_LIST_SIZE,e))}let o=Kd.initPointer(i.segment,i.byteOffset,r);Kd.setListPointer(o.offsetWords,e,t,o.pointer,n)}s(Ife,"initList");Ra.initList=Ife;function eB(e,t){throw new TypeError}s(eB,"get");Ra.get=eB;function tB(e,t,r){throw new TypeError}s(tB,"set");Ra.set=tB});var j_=h(gN=>{"use strict";Object.defineProperty(gN,"__esModule",{value:!0});gN.PointerList=void 0;var r_t=(at(),ct(ot)),n_t=r_t.__importDefault(mt()),i_t=cr(),s_t=Lr(),Tfe=Jt(),o_t=n_t.default("capnp:list:composite");o_t("load");function a_t(e){var t;return t=class extends s_t.List{static{s(this,"_a")}get(r){let n=Tfe.getContent(this);return new e(n.segment,n.byteOffset+r*8,this._capnp.depthLimit-1)}set(r,n){Tfe.copyFrom(n,this.get(r))}toString(){return`Pointer_${super.toString()},cls:${e.toString()}`}},t._capnp={displayName:`List<${e._capnp.displayName}>`,size:i_t.ListElementSize.POINTER},t}s(a_t,"PointerList");gN.PointerList=a_t});var Nfe=h(yN=>{"use strict";Object.defineProperty(yN,"__esModule",{value:!0});yN.AnyPointerList=void 0;var u_t=Jt(),c_t=j_();yN.AnyPointerList=c_t.PointerList(u_t.Pointer)});var Rfe=h(bN=>{"use strict";Object.defineProperty(bN,"__esModule",{value:!0});bN.BoolList=void 0;var l_t=(at(),ct(ot)),f_t=l_t.__importDefault(mt()),d_t=cr(),p_t=Lr(),Afe=Jt(),h_t=f_t.default("capnp:list:composite");h_t("load");var EN=class extends p_t.List{static{s(this,"BoolList")}get(t){let r=1<<t%8,n=t>>>3,i=Afe.getContent(this);return(i.segment.getUint8(i.byteOffset+n)&r)!==0}set(t,r){let n=1<<t%8,i=Afe.getContent(this),o=i.byteOffset+(t>>>3),a=i.segment.getUint8(o);i.segment.setUint8(o,r?a|n:a&~n)}toString(){return`Bool_${super.toString()}`}};bN.BoolList=EN;EN._capnp={displayName:"List<boolean>",size:d_t.ListElementSize.BIT}});var Cfe=h(SN=>{"use strict";Object.defineProperty(SN,"__esModule",{value:!0});SN.CompositeList=void 0;var m_t=(at(),ct(ot)),__t=m_t.__importDefault(mt()),g_t=cr(),y_t=Lr(),E_t=Jt(),b_t=__t.default("capnp:list:composite");b_t("load");function S_t(e){var t;return t=class extends y_t.List{static{s(this,"_a")}get(r){return new e(this.segment,this.byteOffset,this._capnp.depthLimit-1,r)}set(r,n){E_t.copyFrom(n,this.get(r))}toString(){return`Composite_${super.toString()},cls:${e.toString()}`}},t._capnp={compositeSize:e._capnp.size,displayName:`List<${e._capnp.displayName}>`,size:g_t.ListElementSize.COMPOSITE},t}s(S_t,"CompositeList");SN.CompositeList=S_t});var ON=h(vN=>{"use strict";Object.defineProperty(vN,"__esModule",{value:!0});vN.Data=void 0;var v_t=(at(),ct(ot)),O_t=v_t.__importDefault(mt()),P_t=cr(),w_t=Lr(),Yd=Jt(),I_t=Hd(),rB=O_t.default("capnp:data");rB("load");var nB=class extends w_t.List{static{s(this,"Data")}static fromPointer(t){return Yd.validate(I_t.PointerType.LIST,t,P_t.ListElementSize.BYTE),this._fromPointerUnchecked(t)}static _fromPointerUnchecked(t){return new this(t.segment,t.byteOffset,t._capnp.depthLimit)}copyBuffer(t){let r=Yd.getContent(this),n=this.getLength(),i=t.byteLength,o=t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,Math.min(n,i)),a=new Uint8Array(r.segment.buffer,r.byteOffset,this.getLength());a.set(o),n>i?(rB("Zeroing out remaining %d bytes after copy into %s.",n-i,this),a.fill(0,i,n)):n<i&&rB("Truncated %d bytes from source buffer while copying to %s.",i-n,this)}get(t){let r=Yd.getContent(this);return r.segment.getUint8(r.byteOffset+t)}set(t,r){let n=Yd.getContent(this);n.segment.setUint8(n.byteOffset+t,r)}toArrayBuffer(){let t=Yd.getContent(this);return t.segment.buffer.slice(t.byteOffset,t.byteOffset+this.getLength())}toDataView(){let t=Yd.getContent(this);return new DataView(t.segment.buffer,t.byteOffset,this.getLength())}toString(){return`Data_${super.toString()}`}toUint8Array(){let t=Yd.getContent(this);return new Uint8Array(t.segment.buffer,t.byteOffset,this.getLength())}};vN.Data=nB});var $fe=h(PN=>{"use strict";Object.defineProperty(PN,"__esModule",{value:!0});PN.DataList=void 0;var T_t=ON(),N_t=j_();PN.DataList=N_t.PointerList(T_t.Data)});var Lfe=h(IN=>{"use strict";Object.defineProperty(IN,"__esModule",{value:!0});IN.Float32List=void 0;var A_t=(at(),ct(ot)),R_t=A_t.__importDefault(mt()),C_t=cr(),$_t=Lr(),Dfe=Jt(),D_t=R_t.default("capnp:list:composite");D_t("load");var wN=class extends $_t.List{static{s(this,"Float32List")}get(t){let r=Dfe.getContent(this);return r.segment.getFloat32(r.byteOffset+t*4)}set(t,r){let n=Dfe.getContent(this);n.segment.setFloat32(n.byteOffset+t*4,r)}toString(){return`Float32_${super.toString()}`}};IN.Float32List=wN;wN._capnp={displayName:"List<Float32>",size:C_t.ListElementSize.BYTE_4}});var Mfe=h(NN=>{"use strict";Object.defineProperty(NN,"__esModule",{value:!0});NN.Float64List=void 0;var L_t=(at(),ct(ot)),j_t=L_t.__importDefault(mt()),M_t=cr(),U_t=Lr(),jfe=Jt(),x_t=j_t.default("capnp:list:composite");x_t("load");var TN=class extends U_t.List{static{s(this,"Float64List")}get(t){let r=jfe.getContent(this);return r.segment.getFloat64(r.byteOffset+t*8)}set(t,r){let n=jfe.getContent(this);n.segment.setFloat64(n.byteOffset+t*8,r)}toString(){return`Float64_${super.toString()}`}};NN.Float64List=TN;TN._capnp={displayName:"List<Float64>",size:M_t.ListElementSize.BYTE_8}});var xfe=h(RN=>{"use strict";Object.defineProperty(RN,"__esModule",{value:!0});RN.Int8List=void 0;var q_t=(at(),ct(ot)),F_t=q_t.__importDefault(mt()),k_t=cr(),B_t=Lr(),Ufe=Jt(),G_t=F_t.default("capnp:list:composite");G_t("load");var AN=class extends B_t.List{static{s(this,"Int8List")}get(t){let r=Ufe.getContent(this);return r.segment.getInt8(r.byteOffset+t)}set(t,r){let n=Ufe.getContent(this);n.segment.setInt8(n.byteOffset+t,r)}toString(){return`Int8_${super.toString()}`}};RN.Int8List=AN;AN._capnp={displayName:"List<Int8>",size:k_t.ListElementSize.BYTE}});var Ffe=h($N=>{"use strict";Object.defineProperty($N,"__esModule",{value:!0});$N.Int16List=void 0;var V_t=(at(),ct(ot)),z_t=V_t.__importDefault(mt()),H_t=cr(),K_t=Lr(),qfe=Jt(),W_t=z_t.default("capnp:list:composite");W_t("load");var CN=class extends K_t.List{static{s(this,"Int16List")}get(t){let r=qfe.getContent(this);return r.segment.getInt16(r.byteOffset+t*2)}set(t,r){let n=qfe.getContent(this);n.segment.setInt16(n.byteOffset+t*2,r)}toString(){return`Int16_${super.toString()}`}};$N.Int16List=CN;CN._capnp={displayName:"List<Int16>",size:H_t.ListElementSize.BYTE_2}});var Bfe=h(LN=>{"use strict";Object.defineProperty(LN,"__esModule",{value:!0});LN.Int32List=void 0;var Y_t=(at(),ct(ot)),J_t=Y_t.__importDefault(mt()),X_t=cr(),Z_t=Lr(),kfe=Jt(),Q_t=J_t.default("capnp:list:composite");Q_t("load");var DN=class extends Z_t.List{static{s(this,"Int32List")}get(t){let r=kfe.getContent(this);return r.segment.getInt32(r.byteOffset+t*4)}set(t,r){let n=kfe.getContent(this);n.segment.setInt32(n.byteOffset+t*4,r)}toString(){return`Int32_${super.toString()}`}};LN.Int32List=DN;DN._capnp={displayName:"List<Int32>",size:X_t.ListElementSize.BYTE_4}});var Vfe=h(MN=>{"use strict";Object.defineProperty(MN,"__esModule",{value:!0});MN.Int64List=void 0;var egt=(at(),ct(ot)),tgt=egt.__importDefault(mt()),rgt=cr(),ngt=Lr(),Gfe=Jt(),igt=tgt.default("capnp:list:composite");igt("load");var jN=class extends ngt.List{static{s(this,"Int64List")}get(t){let r=Gfe.getContent(this);return r.segment.getInt64(r.byteOffset+t*8)}set(t,r){let n=Gfe.getContent(this);n.segment.setInt64(n.byteOffset+t*8,r)}toString(){return`Int64_${super.toString()}`}};MN.Int64List=jN;jN._capnp={displayName:"List<Int64>",size:rgt.ListElementSize.BYTE_8}});var sB=h(UN=>{"use strict";Object.defineProperty(UN,"__esModule",{value:!0});UN.Interface=void 0;var sgt=Xi(),ogt=Xn(),agt=Ai(),ugt=Jt(),iB=class extends ugt.Pointer{static{s(this,"Interface")}constructor(t,r,n=sgt.MAX_DEPTH){throw super(t,r,n),new Error(agt.format(ogt.NOT_IMPLEMENTED,"new Interface"))}};UN.Interface=iB});var zfe=h(xN=>{"use strict";Object.defineProperty(xN,"__esModule",{value:!0});xN.InterfaceList=void 0;var cgt=sB(),lgt=j_();xN.InterfaceList=lgt.PointerList(cgt.Interface)});var aB=h(FN=>{"use strict";Object.defineProperty(FN,"__esModule",{value:!0});FN.Uint64=void 0;var fgt=(at(),ct(ot)),dgt=fgt.__importDefault(mt()),qN=Xi(),pgt=Xn(),hgt=Ai(),Hfe=dgt.default("capnp:uint64");Hfe("load");var oB=class e{static{s(this,"Uint64")}constructor(t){if(t.byteLength<8)throw new RangeError(pgt.RANGE_INT64_UNDERFLOW);this.buffer=t}static fromArrayBuffer(t,r=0,n=!1){return n?new this(new Uint8Array(t,r,8)):new this(new Uint8Array(t.slice(r,r+8)))}static fromDataView(t,r=0,n=!1){return n?new this(new Uint8Array(t.buffer,t.byteOffset+r,8)):new this(new Uint8Array(t.buffer.slice(t.byteOffset+r,t.byteLength+r+8)))}static fromHexString(t){if(t.substr(0,2)==="0x"&&(t=t.substr(2)),t.length<1)return e.fromNumber(0);if(t[0]==="-")throw new RangeError("Source must not be negative.");if(t=hgt.pad(t,16),t.length!==16)throw new RangeError("Source string must contain at most 16 hexadecimal digits.");let r=t.toLowerCase().replace(/[^\da-f]/g,""),n=new Uint8Array(new ArrayBuffer(8));for(let i=0;i<8;i++)n[7-i]=parseInt(r.substr(i*2,2),16);return new e(n)}static fromNumber(t){let r=new this(new Uint8Array(8));return r.setValue(t),r}static fromUint8Array(t,r=0,n=!1){return n?new this(t.subarray(r,r+8)):new this(new Uint8Array(t.buffer.slice(t.byteOffset+r,t.byteOffset+r+8)))}equals(t){for(let r=0;r<8;r++)if(this.buffer[r]!==t.buffer[r])return!1;return!0}inspect(){return`[Uint64 ${this.toString(10)} 0x${this.toHexString()}]`}isZero(){for(let t=0;t<8;t++)if(this.buffer[t]!==0)return!1;return!0}setValue(t,r){let n=t,i=r;if(i===void 0){if(i=n,i=Math.abs(i),n=i%qN.VAL32,i=i/qN.VAL32,i>qN.VAL32)throw new RangeError(`${t} is outside Uint64 range`);i=i>>>0}for(let o=0;o<8;o++)this.buffer[o]=n&255,n=o===3?i:n>>>8}toNumber(t){let r=this.buffer,n=0,i=0,o=1;for(;i<8;){let a=r[i];n+=a*o,o*=256,i++}return!t&&n>=qN.MAX_SAFE_INTEGER?(Hfe("Coercing out of range value %d to Infinity.",n),1/0):n}valueOf(){return this.toNumber(!1)}toArrayBuffer(){return this.buffer.buffer}toDataView(){return new DataView(this.buffer.buffer)}toHexString(){let t="";for(let r=7;r>=0;r--){let n=this.buffer[r].toString(16);n.length===1&&(n="0"+n),t+=n}return t}toString(t){return this.toNumber(!0).toString(t)}toUint8Array(){return this.buffer}};FN.Uint64=oB});var Wfe=h(BN=>{"use strict";Object.defineProperty(BN,"__esModule",{value:!0});BN.Int64=void 0;var mgt=(at(),ct(ot)),_gt=mgt.__importDefault(mt()),kN=Xi(),ggt=Ai(),ygt=aB(),Kfe=_gt.default("capnp:int64");Kfe("load");var uB=class e extends ygt.Uint64{static{s(this,"Int64")}static fromArrayBuffer(t,r=0,n=!1){return n?new this(new Uint8Array(t,r,8)):new this(new Uint8Array(t.slice(r,r+8)))}static fromDataView(t,r=0,n=!1){return n?new this(new Uint8Array(t.buffer,t.byteOffset+r,8)):new this(new Uint8Array(t.buffer.slice(t.byteOffset+r,t.byteLength+r+8)))}static fromNumber(t){let r=new this(new Uint8Array(8));return r.setValue(t),r}static fromHexString(t){if(t.substr(0,2)==="0x"&&(t=t.substr(2)),t.length<1)return e.fromNumber(0);let r=t[0]==="-";if(r&&(t=t.substr(1)),t=ggt.pad(t,16),t.length!==16)throw new RangeError("Source string must contain at most 16 hexadecimal digits.");let n=t.toLowerCase().replace(/[^\da-f]/g,""),i=new Uint8Array(new ArrayBuffer(8));for(let a=0;a<8;a++)i[7-a]=parseInt(n.substr(a*2,2),16);let o=new e(i);return r&&o.negate(),o}static fromUint8Array(t,r=0,n=!1){return n?new this(t.subarray(r,r+8)):new this(new Uint8Array(t.buffer.slice(t.byteOffset+r,t.byteOffset+r+8)))}equals(t){return super.equals(t)}inspect(){return`[Int64 ${this.toString(10)} 0x${this.toHexString()}]`}negate(){for(let t=this.buffer,r=1,n=0;n<8;n++){let i=(t[n]^255)+r;t[n]=i&255,r=i>>8}}setValue(t,r){let n=!1,i=t,o=r;if(o===void 0){if(o=i,n=o<0,o=Math.abs(o),i=o%kN.VAL32,o=o/kN.VAL32,o>kN.VAL32)throw new RangeError(`${t} is outside Int64 range`);o=o>>>0}for(let a=0;a<8;a++)this.buffer[a]=i&255,i=a===3?o:i>>>8;n&&this.negate()}toHexString(){let t=this.buffer,r=t[7]&128;r&&this.negate();let n="";for(let i=7;i>=0;i--){let o=t[i].toString(16);o.length===1&&(o="0"+o),n+=o}return r&&(this.negate(),n="-"+n),n}toNumber(t){let r=this.buffer,n=r[7]&128,i=0,o=1,a=0,u=1;for(;a<8;){let c=r[a];n&&(c=(c^255)+o,o=c>>8,c=c&255),i+=c*u,u*=256,a++}return!t&&i>=kN.MAX_SAFE_INTEGER?(Kfe("Coercing out of range value %d to Infinity.",i),n?-1/0:1/0):n?-i:i}};BN.Int64=uB});var GN=h(M_=>{"use strict";Object.defineProperty(M_,"__esModule",{value:!0});M_.Uint64=M_.Int64=void 0;var Egt=Wfe();Object.defineProperty(M_,"Int64",{enumerable:!0,get:function(){return Egt.Int64}});var bgt=aB();Object.defineProperty(M_,"Uint64",{enumerable:!0,get:function(){return bgt.Uint64}})});var KN=h(HN=>{"use strict";Object.defineProperty(HN,"__esModule",{value:!0});HN.Text=void 0;var Sgt=(at(),ct(ot)),vgt=Sgt.__importDefault(mt()),Yfe=Ai(),Jfe=cr(),Xfe=Lr(),Jd=Jt(),Ogt=Hd(),VN=vgt.default("capnp:text");VN("load");var zN=class extends Xfe.List{static{s(this,"Text")}static fromPointer(t){return Jd.validate(Ogt.PointerType.LIST,t,Jfe.ListElementSize.BYTE),Pgt(t)}get(t=0){if(t!==0&&VN("Called get() on %s with a strange index (%d).",this,t),Jd.isNull(this))return"";let r=Jd.getContent(this);return Yfe.decodeUtf8(new Uint8Array(r.segment.buffer,r.byteOffset+t,this.getLength()-t))}getLength(){return super.getLength()-1}set(t,r){t!==0&&VN("Called set() on %s with a strange index (%d).",this,t);let n=Yfe.encodeUtf8(r),i=n.byteLength+t,o,a;if(!Jd.isNull(this)){o=Jd.getContent(this);let c=this.getLength();c>=t?c=t:VN("%d byte gap exists between original text and new text in %s.",t-c,this),a=new Uint8Array(o.segment.buffer.slice(o.byteOffset,o.byteOffset+Math.min(c,t))),Jd.erase(this)}Xfe.initList(Jfe.ListElementSize.BYTE,i+1,this),o=Jd.getContent(this);let u=new Uint8Array(o.segment.buffer,o.byteOffset,i);a&&u.set(a),u.set(n,t)}toString(){return`Text_${super.toString()}`}};HN.Text=zN;function Pgt(e){return new zN(e.segment,e.byteOffset,e._capnp.depthLimit)}s(Pgt,"textFromPointerUnchecked")});var ZN=h(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.checkPointerBounds=F.checkDataBounds=F.testWhich=F.setVoid=F.setUint8=F.setUint64=F.setUint32=F.setUint16=F.setText=F.setPointer=F.setInt8=F.setInt64=F.setInt32=F.setInt16=F.setFloat64=F.setFloat32=F.setBit=F.initList=F.initData=F.getVoid=F.getUint8=F.getUint64=F.getUint32=F.getUint16=F.getText=F.getStruct=F.getSize=F.getPointerSection=F.getPointerAs=F.getPointer=F.getList=F.getInt8=F.getInt64=F.getInt32=F.getInt16=F.getFloat64=F.getFloat32=F.getDataSection=F.getData=F.getBit=F.getAs=F.disown=F.adopt=F.resize=F.initStructAt=F.initStruct=F.Struct=void 0;var wgt=(at(),ct(ot)),Igt=wgt.__importDefault(mt()),sr=Xi(),Zfe=GN(),Xd=Ai(),WN=cr(),To=zd(),Qfe=ON(),YN=Lr(),me=Jt(),cB=Hd(),ede=KN(),sl=Xn(),lB=Igt.default("capnp:struct");lB("load");var Dt=new DataView(new ArrayBuffer(8)),ke=class extends me.Pointer{static{s(this,"Struct")}constructor(t,r,n=sr.MAX_DEPTH,i){super(t,r,n),this._capnp.compositeIndex=i,this._capnp.compositeList=i!==void 0}static toString(){return this._capnp.displayName}toString(){return`Struct_${super.toString()}${this._capnp.compositeIndex===void 0?"":`,ci:${this._capnp.compositeIndex}`}`}};F.Struct=ke;ke._capnp={displayName:"Struct"};ke.getAs=nde;ke.getBit=ide;ke.getData=sde;ke.getFloat32=ode;ke.getFloat64=ade;ke.getUint8=yde;ke.getUint16=mde;ke.getUint32=_de;ke.getUint64=gde;ke.getInt8=fde;ke.getInt16=ude;ke.getInt32=cde;ke.getInt64=lde;ke.getList=dde;ke.getPointer=cb;ke.getPointerAs=XN;ke.getStruct=pde;ke.getText=hde;ke.initData=Ede;ke.initList=bde;ke.initStruct=JN;ke.initStructAt=tde;ke.setBit=Sde;ke.setFloat32=vde;ke.setFloat64=Ode;ke.setUint8=$de;ke.setUint16=Ade;ke.setUint32=Rde;ke.setUint64=Cde;ke.setInt8=Tde;ke.setInt16=Pde;ke.setInt32=wde;ke.setInt64=Ide;ke.setText=Nde;ke.testWhich=Dde;function JN(e,t){if(t._capnp.compositeIndex!==void 0)throw new Error(Xd.format(sl.PTR_INIT_COMPOSITE_STRUCT,t));me.erase(t);let r=t.segment.allocate(To.getByteLength(e)),n=me.initPointer(r.segment,r.byteOffset,t);me.setStructPointer(n.offsetWords,e,n.pointer)}s(JN,"initStruct");F.initStruct=JN;function tde(e,t,r){let n=XN(e,t,r);return JN(t._capnp.size,n),n}s(tde,"initStructAt");F.initStructAt=tde;function rde(e,t){let r=lb(t),n=me.getContent(t),i=t.segment.allocate(To.getByteLength(e));i.segment.copyWords(i.byteOffset,n.segment,n.byteOffset,Math.min(To.getDataWordLength(r),To.getDataWordLength(e)));let o=me.initPointer(i.segment,i.byteOffset,t);me.setStructPointer(o.offsetWords,e,o.pointer);for(let a=0;a<Math.min(r.pointerLength,e.pointerLength);a++){let u=new me.Pointer(n.segment,n.byteOffset+r.dataByteLength+a*8);if(me.isNull(u))continue;let c=me.followFars(u),l=me.getContent(u),f=new me.Pointer(i.segment,i.byteOffset+e.dataByteLength+a*8);me.getTargetPointerType(u)===cB.PointerType.LIST&&me.getTargetListElementSize(u)===WN.ListElementSize.COMPOSITE&&(l.byteOffset-=8);let d=me.initPointer(l.segment,l.byteOffset,f),_=c.segment.getUint8(c.byteOffset)&3,m=c.segment.getUint32(c.byteOffset+4);d.pointer.segment.setUint32(d.pointer.byteOffset,_|d.offsetWords<<2),d.pointer.segment.setUint32(d.pointer.byteOffset+4,m)}n.segment.fillZeroWords(n.byteOffset,To.getWordLength(r))}s(rde,"resize");F.resize=rde;function Tgt(e,t){if(t._capnp.compositeIndex!==void 0)throw new Error(Xd.format(sl.PTR_ADOPT_COMPOSITE_STRUCT,t));me.Pointer.adopt(e,t)}s(Tgt,"adopt");F.adopt=Tgt;function Ngt(e){if(e._capnp.compositeIndex!==void 0)throw new Error(Xd.format(sl.PTR_DISOWN_COMPOSITE_STRUCT,e));return me.Pointer.disown(e)}s(Ngt,"disown");F.disown=Ngt;function nde(e,t){return new e(t.segment,t.byteOffset,t._capnp.depthLimit,t._capnp.compositeIndex)}s(nde,"getAs");F.getAs=nde;function ide(e,t,r){let n=Math.floor(e/8),i=1<<e%8;ar(n,1,t);let o=or(t),a=o.segment.getUint8(o.byteOffset+n);if(r===void 0)return(a&i)!==0;let u=r.getUint8(0);return((a^u)&i)!==0}s(ide,"getBit");F.getBit=ide;function sde(e,t,r){Qd(e,t);let n=Zd(t);n.byteOffset+=e*8;let i=new Qfe.Data(n.segment,n.byteOffset,t._capnp.depthLimit-1);return me.isNull(i)&&(r?me.Pointer.copyFrom(r,i):YN.List.initList(WN.ListElementSize.BYTE,0,i)),i}s(sde,"getData");F.getData=sde;function or(e){return me.getContent(e)}s(or,"getDataSection");F.getDataSection=or;function ode(e,t,r){ar(e,4,t);let n=or(t);if(r===void 0)return n.segment.getFloat32(n.byteOffset+e);let i=n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.getFloat32(0,sr.NATIVE_LITTLE_ENDIAN)}s(ode,"getFloat32");F.getFloat32=ode;function ade(e,t,r){ar(e,8,t);let n=or(t);if(r!==void 0){let i=n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0),o=n.segment.getUint32(n.byteOffset+e+4)^r.getUint32(4,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.setUint32(4,o,sr.NATIVE_LITTLE_ENDIAN),Dt.getFloat64(0,sr.NATIVE_LITTLE_ENDIAN)}return n.segment.getFloat64(n.byteOffset+e)}s(ade,"getFloat64");F.getFloat64=ade;function ude(e,t,r){ar(e,2,t);let n=or(t);if(r===void 0)return n.segment.getInt16(n.byteOffset+e);let i=n.segment.getUint16(n.byteOffset+e)^r.getUint16(0,!0);return Dt.setUint16(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.getInt16(0,sr.NATIVE_LITTLE_ENDIAN)}s(ude,"getInt16");F.getInt16=ude;function cde(e,t,r){ar(e,4,t);let n=or(t);if(r===void 0)return n.segment.getInt32(n.byteOffset+e);let i=n.segment.getUint32(n.byteOffset+e)^r.getUint16(0,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.getInt32(0,sr.NATIVE_LITTLE_ENDIAN)}s(cde,"getInt32");F.getInt32=cde;function lde(e,t,r){ar(e,8,t);let n=or(t);if(r===void 0)return n.segment.getInt64(n.byteOffset+e);let i=n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0),o=n.segment.getUint32(n.byteOffset+e+4)^r.getUint32(4,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.setUint32(4,o,sr.NATIVE_LITTLE_ENDIAN),new Zfe.Int64(new Uint8Array(Dt.buffer.slice(0)))}s(lde,"getInt64");F.getInt64=lde;function fde(e,t,r){ar(e,1,t);let n=or(t);if(r===void 0)return n.segment.getInt8(n.byteOffset+e);let i=n.segment.getUint8(n.byteOffset+e)^r.getUint8(0);return Dt.setUint8(0,i),Dt.getInt8(0)}s(fde,"getInt8");F.getInt8=fde;function dde(e,t,r,n){Qd(e,r);let i=Zd(r);i.byteOffset+=e*8;let o=new t(i.segment,i.byteOffset,r._capnp.depthLimit-1);if(me.isNull(o))n?me.Pointer.copyFrom(n,o):YN.List.initList(t._capnp.size,0,o,t._capnp.compositeSize);else if(t._capnp.compositeSize!==void 0){let a=me.getTargetCompositeListSize(o),u=t._capnp.compositeSize;if(u.dataByteLength>a.dataByteLength||u.pointerLength>a.pointerLength){let c=me.getContent(o),l=me.getTargetListLength(o);lB("resizing composite list %s due to protocol upgrade, new size: %d",o,To.getByteLength(u)*l);let f=o.segment.allocate(To.getByteLength(u)*l+8),d=me.initPointer(f.segment,f.byteOffset,o);me.setListPointer(d.offsetWords,t._capnp.size,l,d.pointer,u),me.setStructPointer(l,u,f),f.byteOffset+=8;for(let _=0;_<l;_++){let m=c.byteOffset+_*To.getByteLength(a),g=f.byteOffset+_*To.getByteLength(u);f.segment.copyWords(g,c.segment,m,To.getWordLength(a));for(let y=0;y<a.pointerLength;y++){let b=new me.Pointer(c.segment,m+a.dataByteLength+y*8),E=new me.Pointer(f.segment,g+u.dataByteLength+y*8),S=me.followFars(b),O=me.getContent(b);me.getTargetPointerType(b)===cB.PointerType.LIST&&me.getTargetListElementSize(b)===WN.ListElementSize.COMPOSITE&&(O.byteOffset-=8);let P=me.initPointer(O.segment,O.byteOffset,E),I=S.segment.getUint8(S.byteOffset)&3,j=S.segment.getUint32(S.byteOffset+4);P.pointer.segment.setUint32(P.pointer.byteOffset,I|P.offsetWords<<2),P.pointer.segment.setUint32(P.pointer.byteOffset+4,j)}}c.segment.fillZeroWords(c.byteOffset,To.getWordLength(a)*l)}}return o}s(dde,"getList");F.getList=dde;function cb(e,t){Qd(e,t);let r=Zd(t);return r.byteOffset+=e*8,new me.Pointer(r.segment,r.byteOffset,t._capnp.depthLimit-1)}s(cb,"getPointer");F.getPointer=cb;function XN(e,t,r){Qd(e,r);let n=Zd(r);return n.byteOffset+=e*8,new t(n.segment,n.byteOffset,r._capnp.depthLimit-1)}s(XN,"getPointerAs");F.getPointerAs=XN;function Zd(e){let t=me.getContent(e);return t.byteOffset+=Xd.padToWord(lb(e).dataByteLength),t}s(Zd,"getPointerSection");F.getPointerSection=Zd;function lb(e){if(e._capnp.compositeIndex!==void 0){let t=me.getContent(e,!0);return t.byteOffset-=8,me.getStructSize(t)}return me.getTargetStructSize(e)}s(lb,"getSize");F.getSize=lb;function pde(e,t,r,n){let i=XN(e,t,r);if(me.isNull(i))n?me.Pointer.copyFrom(n,i):JN(t._capnp.size,i);else{me.validate(cB.PointerType.STRUCT,i);let o=me.getTargetStructSize(i);(o.dataByteLength<t._capnp.size.dataByteLength||o.pointerLength<t._capnp.size.pointerLength)&&(lB("need to resize child struct %s",i),rde(t._capnp.size,i))}return i}s(pde,"getStruct");F.getStruct=pde;function hde(e,t,r){let n=ede.Text.fromPointer(cb(e,t));return me.isNull(n)&&r&&n.set(0,r),n.get(0)}s(hde,"getText");F.getText=hde;function mde(e,t,r){ar(e,2,t);let n=or(t);return r===void 0?n.segment.getUint16(n.byteOffset+e):n.segment.getUint16(n.byteOffset+e)^r.getUint16(0,!0)}s(mde,"getUint16");F.getUint16=mde;function _de(e,t,r){ar(e,4,t);let n=or(t);return r===void 0?n.segment.getUint32(n.byteOffset+e):n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0)}s(_de,"getUint32");F.getUint32=_de;function gde(e,t,r){ar(e,8,t);let n=or(t);if(r===void 0)return n.segment.getUint64(n.byteOffset+e);let i=n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0),o=n.segment.getUint32(n.byteOffset+e+4)^r.getUint32(4,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.setUint32(4,o,sr.NATIVE_LITTLE_ENDIAN),new Zfe.Uint64(new Uint8Array(Dt.buffer.slice(0)))}s(gde,"getUint64");F.getUint64=gde;function yde(e,t,r){ar(e,1,t);let n=or(t);return r===void 0?n.segment.getUint8(n.byteOffset+e):n.segment.getUint8(n.byteOffset+e)^r.getUint8(0)}s(yde,"getUint8");F.getUint8=yde;function Agt(){throw new Error(sl.INVARIANT_UNREACHABLE_CODE)}s(Agt,"getVoid");F.getVoid=Agt;function Ede(e,t,r){Qd(e,r);let n=Zd(r);n.byteOffset+=e*8;let i=new Qfe.Data(n.segment,n.byteOffset,r._capnp.depthLimit-1);return me.erase(i),YN.List.initList(WN.ListElementSize.BYTE,t,i),i}s(Ede,"initData");F.initData=Ede;function bde(e,t,r,n){Qd(e,n);let i=Zd(n);i.byteOffset+=e*8;let o=new t(i.segment,i.byteOffset,n._capnp.depthLimit-1);return me.erase(o),YN.List.initList(t._capnp.size,r,o,t._capnp.compositeSize),o}s(bde,"initList");F.initList=bde;function Sde(e,t,r,n){let i=Math.floor(e/8),o=1<<e%8;ar(i,1,r);let a=or(r),u=a.segment.getUint8(a.byteOffset+i);n!==void 0&&(t=n.getUint8(0)&o?!t:t),a.segment.setUint8(a.byteOffset+i,t?u|o:u&~o)}s(Sde,"setBit");F.setBit=Sde;function vde(e,t,r,n){ar(e,4,r);let i=or(r);if(n!==void 0){Dt.setFloat32(0,t,sr.NATIVE_LITTLE_ENDIAN);let o=Dt.getUint32(0,sr.NATIVE_LITTLE_ENDIAN)^n.getUint32(0,!0);i.segment.setUint32(i.byteOffset+e,o);return}i.segment.setFloat32(i.byteOffset+e,t)}s(vde,"setFloat32");F.setFloat32=vde;function Ode(e,t,r,n){ar(e,8,r);let i=or(r);if(n!==void 0){Dt.setFloat64(0,t,sr.NATIVE_LITTLE_ENDIAN);let o=Dt.getUint32(0,sr.NATIVE_LITTLE_ENDIAN)^n.getUint32(0,!0),a=Dt.getUint32(4,sr.NATIVE_LITTLE_ENDIAN)^n.getUint32(4,!0);i.segment.setUint32(i.byteOffset+e,o),i.segment.setUint32(i.byteOffset+e+4,a);return}i.segment.setFloat64(i.byteOffset+e,t)}s(Ode,"setFloat64");F.setFloat64=Ode;function Pde(e,t,r,n){ar(e,2,r);let i=or(r);if(n!==void 0){Dt.setInt16(0,t,sr.NATIVE_LITTLE_ENDIAN);let o=Dt.getUint16(0,sr.NATIVE_LITTLE_ENDIAN)^n.getUint16(0,!0);i.segment.setUint16(i.byteOffset+e,o);return}i.segment.setInt16(i.byteOffset+e,t)}s(Pde,"setInt16");F.setInt16=Pde;function wde(e,t,r,n){ar(e,4,r);let i=or(r);if(n!==void 0){Dt.setInt32(0,t,sr.NATIVE_LITTLE_ENDIAN);let o=Dt.getUint32(0,sr.NATIVE_LITTLE_ENDIAN)^n.getUint32(0,!0);i.segment.setUint32(i.byteOffset+e,o);return}i.segment.setInt32(i.byteOffset+e,t)}s(wde,"setInt32");F.setInt32=wde;function Ide(e,t,r,n){ar(e,8,r);let i=or(r);if(n!==void 0){for(let o=0;o<8;o++)i.segment.setUint8(i.byteOffset+e+o,t.buffer[o]^n.getUint8(o));return}i.segment.setInt64(i.byteOffset+e,t)}s(Ide,"setInt64");F.setInt64=Ide;function Tde(e,t,r,n){ar(e,1,r);let i=or(r);if(n!==void 0){Dt.setInt8(0,t);let o=Dt.getUint8(0)^n.getUint8(0);i.segment.setUint8(i.byteOffset+e,o);return}i.segment.setInt8(i.byteOffset+e,t)}s(Tde,"setInt8");F.setInt8=Tde;function Rgt(e,t,r){me.copyFrom(t,cb(e,r))}s(Rgt,"setPointer");F.setPointer=Rgt;function Nde(e,t,r){ede.Text.fromPointer(cb(e,r)).set(0,t)}s(Nde,"setText");F.setText=Nde;function Ade(e,t,r,n){ar(e,2,r);let i=or(r);n!==void 0&&(t^=n.getUint16(0,!0)),i.segment.setUint16(i.byteOffset+e,t)}s(Ade,"setUint16");F.setUint16=Ade;function Rde(e,t,r,n){ar(e,4,r);let i=or(r);n!==void 0&&(t^=n.getUint32(0,!0)),i.segment.setUint32(i.byteOffset+e,t)}s(Rde,"setUint32");F.setUint32=Rde;function Cde(e,t,r,n){ar(e,8,r);let i=or(r);if(n!==void 0){for(let o=0;o<8;o++)i.segment.setUint8(i.byteOffset+e+o,t.buffer[o]^n.getUint8(o));return}i.segment.setUint64(i.byteOffset+e,t)}s(Cde,"setUint64");F.setUint64=Cde;function $de(e,t,r,n){ar(e,1,r);let i=or(r);n!==void 0&&(t^=n.getUint8(0)),i.segment.setUint8(i.byteOffset+e,t)}s($de,"setUint8");F.setUint8=$de;function Cgt(){throw new Error(sl.INVARIANT_UNREACHABLE_CODE)}s(Cgt,"setVoid");F.setVoid=Cgt;function Dde(e,t,r,n){if(t!==r)throw new Error(Xd.format(sl.PTR_INVALID_UNION_ACCESS,n,e,t,r))}s(Dde,"testWhich");F.testWhich=Dde;function ar(e,t,r){let n=lb(r).dataByteLength;if(e<0||t<0||e+t>n)throw new Error(Xd.format(sl.PTR_STRUCT_DATA_OUT_OF_BOUNDS,r,t,e,n))}s(ar,"checkDataBounds");F.checkDataBounds=ar;function Qd(e,t){let r=lb(t).pointerLength;if(e<0||e>=r)throw new Error(Xd.format(sl.PTR_STRUCT_POINTER_OUT_OF_BOUNDS,t,e,r))}s(Qd,"checkPointerBounds");F.checkPointerBounds=Qd});var Mde=h(eA=>{"use strict";Object.defineProperty(eA,"__esModule",{value:!0});eA.TextList=void 0;var $gt=(at(),ct(ot)),Dgt=$gt.__importDefault(mt()),Lgt=cr(),jgt=Lr(),Lde=KN(),jde=Jt(),Mgt=Dgt.default("capnp:list:composite");Mgt("load");var QN=class extends jgt.List{static{s(this,"TextList")}get(t){let r=jde.getContent(this);return r.byteOffset+=t*8,Lde.Text.fromPointer(r).get(0)}set(t,r){let n=jde.getContent(this);n.byteOffset+=t*8,Lde.Text.fromPointer(n).set(0,r)}toString(){return`Text_${super.toString()}`}};eA.TextList=QN;QN._capnp={displayName:"List<Text>",size:Lgt.ListElementSize.POINTER}});var xde=h(rA=>{"use strict";Object.defineProperty(rA,"__esModule",{value:!0});rA.Uint8List=void 0;var Ugt=(at(),ct(ot)),xgt=Ugt.__importDefault(mt()),qgt=cr(),Fgt=Lr(),Ude=Jt(),kgt=xgt.default("capnp:list:composite");kgt("load");var tA=class extends Fgt.List{static{s(this,"Uint8List")}get(t){let r=Ude.getContent(this);return r.segment.getUint8(r.byteOffset+t)}set(t,r){let n=Ude.getContent(this);n.segment.setUint8(n.byteOffset+t,r)}toString(){return`Uint8_${super.toString()}`}};rA.Uint8List=tA;tA._capnp={displayName:"List<Uint8>",size:qgt.ListElementSize.BYTE}});var Fde=h(iA=>{"use strict";Object.defineProperty(iA,"__esModule",{value:!0});iA.Uint16List=void 0;var Bgt=(at(),ct(ot)),Ggt=Bgt.__importDefault(mt()),Vgt=cr(),zgt=Lr(),qde=Jt(),Hgt=Ggt.default("capnp:list:composite");Hgt("load");var nA=class extends zgt.List{static{s(this,"Uint16List")}get(t){let r=qde.getContent(this);return r.segment.getUint16(r.byteOffset+t*2)}set(t,r){let n=qde.getContent(this);n.segment.setUint16(n.byteOffset+t*2,r)}toString(){return`Uint16_${super.toString()}`}};iA.Uint16List=nA;nA._capnp={displayName:"List<Uint16>",size:Vgt.ListElementSize.BYTE_2}});var Bde=h(oA=>{"use strict";Object.defineProperty(oA,"__esModule",{value:!0});oA.Uint32List=void 0;var Kgt=(at(),ct(ot)),Wgt=Kgt.__importDefault(mt()),Ygt=cr(),Jgt=Lr(),kde=Jt(),Xgt=Wgt.default("capnp:list:composite");Xgt("load");var sA=class extends Jgt.List{static{s(this,"Uint32List")}get(t){let r=kde.getContent(this);return r.segment.getUint32(r.byteOffset+t*4)}set(t,r){let n=kde.getContent(this);n.segment.setUint32(n.byteOffset+t*4,r)}toString(){return`Uint32_${super.toString()}`}};oA.Uint32List=sA;sA._capnp={displayName:"List<Uint32>",size:Ygt.ListElementSize.BYTE_4}});var Vde=h(uA=>{"use strict";Object.defineProperty(uA,"__esModule",{value:!0});uA.Uint64List=void 0;var Zgt=(at(),ct(ot)),Qgt=Zgt.__importDefault(mt()),eyt=cr(),tyt=Lr(),Gde=Jt(),ryt=Qgt.default("capnp:list:composite");ryt("load");var aA=class extends tyt.List{static{s(this,"Uint64List")}get(t){let r=Gde.getContent(this);return r.segment.getUint64(r.byteOffset+t*8)}set(t,r){let n=Gde.getContent(this);n.segment.setUint64(n.byteOffset+t*8,r)}toString(){return`Uint64_${super.toString()}`}};uA.Uint64List=aA;aA._capnp={displayName:"List<Uint64>",size:eyt.ListElementSize.BYTE_8}});var fB=h(U_=>{"use strict";Object.defineProperty(U_,"__esModule",{value:!0});U_.VOID=U_.Void=void 0;var nyt=zd(),iyt=ZN(),cA=class extends iyt.Struct{static{s(this,"Void")}};U_.Void=cA;cA._capnp={displayName:"Void",id:"0",size:new nyt.ObjectSize(0,0)};U_.VOID=void 0});var zde=h(lA=>{"use strict";Object.defineProperty(lA,"__esModule",{value:!0});lA.VoidList=void 0;var syt=j_(),oyt=fB();lA.VoidList=syt.PointerList(oyt.Void)});var fA=h(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.VoidList=le.VOID=le.Void=le.Uint64List=le.Uint32List=le.Uint16List=le.Uint8List=le.TextList=le.Text=le.Struct=le.Pointer=le.PointerType=le.PointerList=le.Orphan=le.List=le.InterfaceList=le.Interface=le.Int64List=le.Int32List=le.Int16List=le.Int8List=le.Float64List=le.Float32List=le.DataList=le.Data=le.CompositeList=le.BoolList=le.AnyPointerList=void 0;var ayt=Nfe();Object.defineProperty(le,"AnyPointerList",{enumerable:!0,get:function(){return ayt.AnyPointerList}});var uyt=Rfe();Object.defineProperty(le,"BoolList",{enumerable:!0,get:function(){return uyt.BoolList}});var cyt=Cfe();Object.defineProperty(le,"CompositeList",{enumerable:!0,get:function(){return cyt.CompositeList}});var lyt=ON();Object.defineProperty(le,"Data",{enumerable:!0,get:function(){return lyt.Data}});var fyt=$fe();Object.defineProperty(le,"DataList",{enumerable:!0,get:function(){return fyt.DataList}});var dyt=Lfe();Object.defineProperty(le,"Float32List",{enumerable:!0,get:function(){return dyt.Float32List}});var pyt=Mfe();Object.defineProperty(le,"Float64List",{enumerable:!0,get:function(){return pyt.Float64List}});var hyt=xfe();Object.defineProperty(le,"Int8List",{enumerable:!0,get:function(){return hyt.Int8List}});var myt=Ffe();Object.defineProperty(le,"Int16List",{enumerable:!0,get:function(){return myt.Int16List}});var _yt=Bfe();Object.defineProperty(le,"Int32List",{enumerable:!0,get:function(){return _yt.Int32List}});var gyt=Vfe();Object.defineProperty(le,"Int64List",{enumerable:!0,get:function(){return gyt.Int64List}});var yyt=sB();Object.defineProperty(le,"Interface",{enumerable:!0,get:function(){return yyt.Interface}});var Eyt=zfe();Object.defineProperty(le,"InterfaceList",{enumerable:!0,get:function(){return Eyt.InterfaceList}});var byt=Lr();Object.defineProperty(le,"List",{enumerable:!0,get:function(){return byt.List}});var Syt=Gk();Object.defineProperty(le,"Orphan",{enumerable:!0,get:function(){return Syt.Orphan}});var vyt=j_();Object.defineProperty(le,"PointerList",{enumerable:!0,get:function(){return vyt.PointerList}});var Oyt=Hd();Object.defineProperty(le,"PointerType",{enumerable:!0,get:function(){return Oyt.PointerType}});var Pyt=Jt();Object.defineProperty(le,"Pointer",{enumerable:!0,get:function(){return Pyt.Pointer}});var wyt=ZN();Object.defineProperty(le,"Struct",{enumerable:!0,get:function(){return wyt.Struct}});var Iyt=KN();Object.defineProperty(le,"Text",{enumerable:!0,get:function(){return Iyt.Text}});var Tyt=Mde();Object.defineProperty(le,"TextList",{enumerable:!0,get:function(){return Tyt.TextList}});var Nyt=xde();Object.defineProperty(le,"Uint8List",{enumerable:!0,get:function(){return Nyt.Uint8List}});var Ayt=Fde();Object.defineProperty(le,"Uint16List",{enumerable:!0,get:function(){return Ayt.Uint16List}});var Ryt=Bde();Object.defineProperty(le,"Uint32List",{enumerable:!0,get:function(){return Ryt.Uint32List}});var Cyt=Vde();Object.defineProperty(le,"Uint64List",{enumerable:!0,get:function(){return Cyt.Uint64List}});var Hde=fB();Object.defineProperty(le,"Void",{enumerable:!0,get:function(){return Hde.Void}});Object.defineProperty(le,"VOID",{enumerable:!0,get:function(){return Hde.VOID}});var $yt=zde();Object.defineProperty(le,"VoidList",{enumerable:!0,get:function(){return $yt.VoidList}})});var Yde=h(dA=>{"use strict";var Wde;Object.defineProperty(dA,"__esModule",{value:!0});dA.Segment=void 0;var Dyt=(at(),ct(ot)),Lyt=Dyt.__importDefault(mt()),fb=Xi(),x_=Xn(),Kde=GN(),ep=Ai(),jyt=fA(),db=Lyt.default("capnp:segment");db("load");var dB=class{static{s(this,"Segment")}constructor(t,r,n,i=0){this[Wde]="Segment",this.id=t,this.message=r,this.buffer=n,this._dv=new DataView(n),this.byteOffset=0,this.byteLength=i}allocate(t){db("allocate(%d)",t);let r=this;if(t=ep.padToWord(t),t>fb.MAX_SEGMENT_LENGTH-8)throw new Error(ep.format(x_.SEG_SIZE_OVERFLOW,t));r.hasCapacity(t)||(r=r.message.allocateSegment(t));let n=r.byteLength;return r.byteLength=r.byteLength+t,db("Allocated %x bytes in %s (requested segment: %s).",t,this,r),new jyt.Pointer(r,n)}copyWord(t,r,n){let i=r._dv.getFloat64(n,fb.NATIVE_LITTLE_ENDIAN);this._dv.setFloat64(t,i,fb.NATIVE_LITTLE_ENDIAN)}copyWords(t,r,n,i){let o=new Float64Array(this.buffer,t,i),a=new Float64Array(r.buffer,n,i);o.set(a)}fillZeroWords(t,r){new Float64Array(this.buffer,t,r).fill(0)}getBigInt64(t,r){throw new Error(ep.format(x_.NOT_IMPLEMENTED,t,r))}getBigUint64(t,r){throw new Error(ep.format(x_.NOT_IMPLEMENTED,t,r))}getCapacity(){return this.buffer.byteLength}getFloat32(t){return this._dv.getFloat32(t,!0)}getFloat64(t){return this._dv.getFloat64(t,!0)}getInt16(t){return this._dv.getInt16(t,!0)}getInt32(t){return this._dv.getInt32(t,!0)}getInt64(t){return new Kde.Int64(new Uint8Array(this.buffer.slice(t,t+8)))}getInt8(t){return this._dv.getInt8(t)}getUint16(t){return this._dv.getUint16(t,!0)}getUint32(t){return this._dv.getUint32(t,!0)}getUint64(t){return new Kde.Uint64(new Uint8Array(this.buffer.slice(t,t+8)))}getUint8(t){return this._dv.getUint8(t)}hasCapacity(t){return db("hasCapacity(%d)",t),this.buffer.byteLength-this.byteLength>=t}isWordZero(t){return this._dv.getFloat64(t,fb.NATIVE_LITTLE_ENDIAN)===0}replaceBuffer(t){if(db("replaceBuffer(%p)",t),this.buffer!==t){if(t.byteLength<this.byteLength)throw new Error(x_.SEG_REPLACEMENT_BUFFER_TOO_SMALL);this._dv=new DataView(t),this.buffer=t}}setBigInt64(t,r,n){throw new Error(ep.format(x_.NOT_IMPLEMENTED,t,r,n))}setBigUint64(t,r,n){throw new Error(ep.format(x_.NOT_IMPLEMENTED,t,r,n))}setFloat32(t,r){this._dv.setFloat32(t,r,!0)}setFloat64(t,r){this._dv.setFloat64(t,r,!0)}setInt16(t,r){this._dv.setInt16(t,r,!0)}setInt32(t,r){this._dv.setInt32(t,r,!0)}setInt8(t,r){this._dv.setInt8(t,r)}setInt64(t,r){this._dv.setUint8(t,r.buffer[0]),this._dv.setUint8(t+1,r.buffer[1]),this._dv.setUint8(t+2,r.buffer[2]),this._dv.setUint8(t+3,r.buffer[3]),this._dv.setUint8(t+4,r.buffer[4]),this._dv.setUint8(t+5,r.buffer[5]),this._dv.setUint8(t+6,r.buffer[6]),this._dv.setUint8(t+7,r.buffer[7])}setUint16(t,r){this._dv.setUint16(t,r,!0)}setUint32(t,r){this._dv.setUint32(t,r,!0)}setUint64(t,r){this._dv.setUint8(t+0,r.buffer[0]),this._dv.setUint8(t+1,r.buffer[1]),this._dv.setUint8(t+2,r.buffer[2]),this._dv.setUint8(t+3,r.buffer[3]),this._dv.setUint8(t+4,r.buffer[4]),this._dv.setUint8(t+5,r.buffer[5]),this._dv.setUint8(t+6,r.buffer[6]),this._dv.setUint8(t+7,r.buffer[7])}setUint8(t,r){this._dv.setUint8(t,r)}setWordZero(t){this._dv.setFloat64(t,0,fb.NATIVE_LITTLE_ENDIAN)}toString(){return ep.format("Segment_id:%d,off:%a,len:%a,cap:%a",this.id,this.byteLength,this.byteOffset,this.buffer.byteLength)}};dA.Segment=dB;Wde=Symbol.toStringTag});var ipe=h(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.getStreamFrame=Pt.toPackedArrayBuffer=Pt.toArrayBuffer=Pt.setRoot=Pt.readRawPointer=Pt.initRoot=Pt.getSegment=Pt.getRoot=Pt.dump=Pt.allocateSegment=Pt.preallocateSegments=Pt.getFramedSegments=Pt.initMessage=Pt.Message=void 0;var Myt=(at(),ct(ot)),Uyt=Myt.__importDefault(mt()),pb=Xi(),q_=Xn(),F_=Ai(),ol=Zle(),pB=ife(),pA=fA(),hB=Yde(),Jde=Jt(),Xde=ZN(),Ca=Uyt.default("capnp:message");Ca("load");var Bs=class{static{s(this,"Message")}constructor(t,r=!0,n=!1){this._capnp=Zde(t,r,n),t&&!tpe(t)&&epe(this),Ca("new %s",this)}allocateSegment(t){return hA(t,this)}dump(){return mB(this)}getRoot(t){return _B(t,this)}getSegment(t){return mA(t,this)}initRoot(t){return gB(t,this)}setRoot(t){npe(t,this)}toArrayBuffer(){return yB(this)}toPackedArrayBuffer(){return EB(this)}toString(){return`Message_arena:${this._capnp.arena}`}};Pt.Message=Bs;Bs.allocateSegment=hA;Bs.dump=mB;Bs.getRoot=_B;Bs.getSegment=mA;Bs.initRoot=gB;Bs.readRawPointer=rpe;Bs.toArrayBuffer=yB;Bs.toPackedArrayBuffer=EB;function Zde(e,t=!0,r=!1){if(e===void 0)return{arena:new ol.SingleSegmentArena,segments:[],traversalLimit:pb.DEFAULT_TRAVERSE_LIMIT};if(tpe(e))return{arena:e,segments:[],traversalLimit:pb.DEFAULT_TRAVERSE_LIMIT};let n=e;return xyt(n)&&(n=n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength)),t&&(n=pB.unpack(n)),r?{arena:new ol.SingleSegmentArena(n),segments:[],traversalLimit:pb.DEFAULT_TRAVERSE_LIMIT}:{arena:new ol.MultiSegmentArena(Qde(n)),segments:[],traversalLimit:pb.DEFAULT_TRAVERSE_LIMIT}}s(Zde,"initMessage");Pt.initMessage=Zde;function Qde(e){let t=new DataView(e),r=t.getUint32(0,!0)+1,n=new Array(r);Ca("reading %d framed segments from stream",r);let i=4+r*4;if(i+=i%8,i+r*4>e.byteLength)throw new Error(q_.MSG_INVALID_FRAME_HEADER);for(let o=0;o<r;o++){let a=t.getUint32(4+o*4,!0)*8;if(i+a>e.byteLength)throw new Error(q_.MSG_INVALID_FRAME_HEADER);n[o]=e.slice(i,i+a),i+=a}return n}s(Qde,"getFramedSegments");Pt.getFramedSegments=Qde;function epe(e){let t=ol.Arena.getNumSegments(e._capnp.arena);if(t<1)throw new Error(q_.MSG_NO_SEGMENTS_IN_ARENA);e._capnp.segments=new Array(t);for(let r=0;r<t;r++){let n=ol.Arena.getBuffer(r,e._capnp.arena),i=new hB.Segment(r,e,n,n.byteLength);e._capnp.segments[r]=i}}s(epe,"preallocateSegments");Pt.preallocateSegments=epe;function xyt(e){return e.byteOffset!==void 0}s(xyt,"isArrayBufferView");function tpe(e){return e.kind!==void 0}s(tpe,"isAnyArena");function hA(e,t){Ca("allocating %x bytes for %s",e,t);let r=ol.Arena.allocate(e,t._capnp.segments,t._capnp.arena),n;if(r.id===t._capnp.segments.length)n=new hB.Segment(r.id,t,r.buffer),Ca("adding new segment %s",n),t._capnp.segments.push(n);else{if(r.id<0||r.id>t._capnp.segments.length)throw new Error(F_.format(q_.MSG_SEGMENT_OUT_OF_BOUNDS,r.id,t));n=t._capnp.segments[r.id],Ca("replacing segment %s with buffer (len:%d)",n,r.buffer.byteLength),n.replaceBuffer(r.buffer)}return n}s(hA,"allocateSegment");Pt.allocateSegment=hA;function mB(e){let t="";if(e._capnp.segments.length===0)return`================
314
+ `,t.byteLength-r)),n}s(omt,"dumpBuffer");Yt.dumpBuffer=omt;function amt(e){let t=e.length,r=new Uint8Array(new ArrayBuffer(t*4)),n=0;for(let i=0;i<t;i++){let o=e.charCodeAt(i);if(o<=127)r[n++]=o;else if(o<=2047)r[n++]=192|o>>>6,r[n++]=128|o>>>0&63;else if(o<=55295||o>=57344)r[n++]=224|o>>>12,r[n++]=128|o>>>6&63,r[n++]=128|o>>>0&63;else{if(i+1>=t)throw new RangeError(rl.RANGE_INVALID_UTF8);let a=o-55296,u=e.charCodeAt(++i)-56320,c=(a<<10|u)+65536;r[n++]=240|c>>>18,r[n++]=128|c>>>12&63,r[n++]=128|c>>>6&63,r[n++]=128|c>>>0&63}}return r.subarray(0,n)}s(amt,"encodeUtf8");Yt.encodeUtf8=amt;function Ak(e,...t){let r=e.length,n,i=0,o,a=!1,u=0,c=!1,l,f="";function d(){return t[i++]}s(d,"nextArg");function _(){let m="";for(;/\d/.test(e[u]);)m+=e[u++],o=e[u];return m.length>0?parseInt(m,10):null}for(s(_,"slurpNumber");u<r;++u)if(o=e[u],a)switch(a=!1,o==="."?(c=!1,o=e[++u]):o==="0"&&e[u+1]==="."?(c=!0,u+=2,o=e[u]):c=!0,l=_(),o){case"a":f+="0x"+P_(parseInt(String(d()),10).toString(16),8);break;case"b":f+=parseInt(String(d()),10).toString(2);break;case"c":n=d(),typeof n=="string"||n instanceof String?f+=n:f+=String.fromCharCode(parseInt(String(n),10));break;case"d":f+=parseInt(String(d()),10);break;case"f":{let m=parseFloat(String(d())).toFixed(l||6);f+=c?m:m.replace(/^0/,"");break}case"j":f+=JSON.stringify(d());break;case"o":f+="0"+parseInt(String(d()),10).toString(8);break;case"s":f+=d();break;case"x":f+="0x"+parseInt(String(d()),10).toString(16);break;case"X":f+="0x"+parseInt(String(d()),10).toString(16).toUpperCase();break;default:f+=o;break}else o==="%"?a=!0:f+=o;return f}s(Ak,"format");Yt.format=Ak;function umt(e){return e}s(umt,"identity");Yt.identity=umt;function P_(e,t,r="0"){return e.length>=t?e:new Array(t-e.length+1).join(r)+e}s(P_,"pad");Yt.pad=P_;function cmt(e){return e+7&-8}s(cmt,"padToWord");Yt.padToWord=cmt;function qle(e,t){let r="",n=e,i=t;if(n<1||n>Number.MAX_VALUE)return r;do n%2&&(r+=i),n=Math.floor(n/2),n&&(i+=i);while(n);return r}s(qle,"repeat");Yt.repeat=qle;var iN=s(e=>parseInt(String(e)).toString(16),"hex");tb.default.formatters.h=iN;tb.default.formatters.x=e=>`0x${iN(e)}`;tb.default.formatters.a=e=>`0x${P_(iN(e),8)}`;tb.default.formatters.X=e=>`0x${iN(e).toUpperCase()}`});var nb=h(rb=>{"use strict";Object.defineProperty(rb,"__esModule",{value:!0});rb.ArenaKind=void 0;var lmt;(function(e){e[e.SINGLE_SEGMENT=0]="SINGLE_SEGMENT",e[e.MULTI_SEGMENT=1]="MULTI_SEGMENT"})(lmt=rb.ArenaKind||(rb.ArenaKind={}))});var Ck=h(sN=>{"use strict";Object.defineProperty(sN,"__esModule",{value:!0});sN.ArenaAllocationResult=void 0;var fmt=(at(),ct(ot)),dmt=fmt.__importDefault(mt()),Fle=dmt.default("capnp:serialization:arena:arena-allocation-result");Fle("load");var Rk=class{static{s(this,"ArenaAllocationResult")}constructor(t,r){this.id=t,this.buffer=r,Fle("new",this)}};sN.ArenaAllocationResult=Rk});var Lk=h(Ia=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});Ia.getNumSegments=Ia.getBuffer=Ia.allocate=Ia.MultiSegmentArena=void 0;var pmt=(at(),ct(ot)),hmt=pmt.__importDefault(mt()),mmt=Xi(),_mt=Xn(),$k=Ai(),gmt=Ck(),ymt=nb(),kle=hmt.default("capnp:arena:multi");kle("load");var w_=class{static{s(this,"MultiSegmentArena")}constructor(t=[]){this.kind=ymt.ArenaKind.MULTI_SEGMENT,this.buffers=t,kle("new %s",this)}toString(){return $k.format("MultiSegmentArena_segments:%d",Dk(this))}};Ia.MultiSegmentArena=w_;w_.allocate=Ble;w_.getBuffer=Gle;w_.getNumSegments=Dk;function Ble(e,t){let r=new ArrayBuffer($k.padToWord(Math.max(e,mmt.DEFAULT_BUFFER_SIZE)));return t.buffers.push(r),new gmt.ArenaAllocationResult(t.buffers.length-1,r)}s(Ble,"allocate");Ia.allocate=Ble;function Gle(e,t){if(e<0||e>=t.buffers.length)throw new Error($k.format(_mt.SEG_ID_OUT_OF_BOUNDS,e));return t.buffers[e]}s(Gle,"getBuffer");Ia.getBuffer=Gle;function Dk(e){return e.buffers.length}s(Dk,"getNumSegments");Ia.getNumSegments=Dk});var Uk=h(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.getNumSegments=Ta.getBuffer=Ta.allocate=Ta.SingleSegmentArena=void 0;var Emt=(at(),ct(ot)),bmt=Emt.__importDefault(mt()),jk=Xi(),Vle=Xn(),oN=Ai(),Smt=Ck(),vmt=nb(),Mk=bmt.default("capnp:arena:single");Mk("load");var I_=class{static{s(this,"SingleSegmentArena")}constructor(t=new ArrayBuffer(jk.DEFAULT_BUFFER_SIZE)){if(this.kind=vmt.ArenaKind.SINGLE_SEGMENT,t.byteLength&7)throw new Error(oN.format(Vle.SEG_NOT_WORD_ALIGNED,t.byteLength));this.buffer=t,Mk("new %s",this)}toString(){return oN.format("SingleSegmentArena_len:%x",this.buffer.byteLength)}};Ta.SingleSegmentArena=I_;I_.allocate=zle;I_.getBuffer=Hle;I_.getNumSegments=Kle;function zle(e,t,r){Mk("Allocating %x bytes for segment 0 in %s.",e,r);let n=t.length>0?t[0].buffer:r.buffer;return e<jk.MIN_SINGLE_SEGMENT_GROWTH?e=jk.MIN_SINGLE_SEGMENT_GROWTH:e=oN.padToWord(e),r.buffer=new ArrayBuffer(n.byteLength+e),new Float64Array(r.buffer).set(new Float64Array(n)),new Smt.ArenaAllocationResult(0,r.buffer)}s(zle,"allocate");Ta.allocate=zle;function Hle(e,t){if(e!==0)throw new Error(oN.format(Vle.SEG_GET_NON_ZERO_SINGLE,e));return t.buffer}s(Hle,"getBuffer");Ta.getBuffer=Hle;function Kle(){return 1}s(Kle,"getNumSegments");Ta.getNumSegments=Kle});var Xle=h(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.getNumSegments=Na.getBuffer=Na.allocate=Na.Arena=void 0;var Omt=(at(),ct(ot)),Pmt=Omt.__importDefault(mt()),xk=Xn(),T_=nb(),qk=Lk(),Fk=Uk(),wmt=Pmt.default("capnp:arena");wmt("load");var N_=class{static{s(this,"Arena")}};Na.Arena=N_;N_.allocate=Wle;N_.getBuffer=Yle;N_.getNumSegments=Jle;function Wle(e,t,r){switch(r.kind){case T_.ArenaKind.MULTI_SEGMENT:return qk.MultiSegmentArena.allocate(e,r);case T_.ArenaKind.SINGLE_SEGMENT:return Fk.SingleSegmentArena.allocate(e,t,r);default:return xk.assertNever(r)}}s(Wle,"allocate");Na.allocate=Wle;function Yle(e,t){switch(t.kind){case T_.ArenaKind.MULTI_SEGMENT:return qk.MultiSegmentArena.getBuffer(e,t);case T_.ArenaKind.SINGLE_SEGMENT:return Fk.SingleSegmentArena.getBuffer(e,t);default:return xk.assertNever(t)}}s(Yle,"getBuffer");Na.getBuffer=Yle;function Jle(e){switch(e.kind){case T_.ArenaKind.MULTI_SEGMENT:return qk.MultiSegmentArena.getNumSegments(e);case T_.ArenaKind.SINGLE_SEGMENT:return Fk.SingleSegmentArena.getNumSegments();default:return xk.assertNever(e)}}s(Jle,"getNumSegments");Na.getNumSegments=Jle});var Zle=h(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.SingleSegmentArena=Aa.MultiSegmentArena=Aa.ArenaKind=Aa.Arena=void 0;var Imt=Xle();Object.defineProperty(Aa,"Arena",{enumerable:!0,get:function(){return Imt.Arena}});var Tmt=nb();Object.defineProperty(Aa,"ArenaKind",{enumerable:!0,get:function(){return Tmt.ArenaKind}});var Nmt=Lk();Object.defineProperty(Aa,"MultiSegmentArena",{enumerable:!0,get:function(){return Nmt.MultiSegmentArena}});var Amt=Uk();Object.defineProperty(Aa,"SingleSegmentArena",{enumerable:!0,get:function(){return Amt.SingleSegmentArena}})});var ife=h(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.unpack=Ri.pack=Ri.getZeroByteCount=Ri.getUnpackedByteLength=Ri.getTagByte=Ri.getHammingWeight=void 0;var Qle=Xi(),Rmt=Xn();function efe(e){let t=e-(e>>1&1431655765);return t=(t&858993459)+(t>>2&858993459),(t+(t>>4)&252645135)*16843009>>24}s(efe,"getHammingWeight");Ri.getHammingWeight=efe;function tfe(e,t,r,n,i,o,a,u){return(e===0?0:1)|(t===0?0:2)|(r===0?0:4)|(n===0?0:8)|(i===0?0:16)|(o===0?0:32)|(a===0?0:64)|(u===0?0:128)}s(tfe,"getTagByte");Ri.getTagByte=tfe;function rfe(e){let t=new Uint8Array(e),r=0,n=119;for(let i=0;i<t.byteLength;){let o=t[i];n===0?(r+=o,i++,n=119):n===255?(r+=o,i+=o*8+1,n=119):(r++,i+=efe(o)+1,n=o)}return r*8}s(rfe,"getUnpackedByteLength");Ri.getUnpackedByteLength=rfe;function nfe(e,t,r,n,i,o,a,u){return(e===0?1:0)+(t===0?1:0)+(r===0?1:0)+(n===0?1:0)+(i===0?1:0)+(o===0?1:0)+(a===0?1:0)+(u===0?1:0)}s(nfe,"getZeroByteCount");Ri.getZeroByteCount=nfe;function Cmt(e,t=0,r){if(e.byteLength%8!==0)throw new Error(Rmt.MSG_PACK_NOT_WORD_ALIGNED);let n=new Uint8Array(e,t,r),i=[],o=119,a=NaN,u=0,c=Qle.PACK_SPAN_THRESHOLD;for(let l=0;l<n.byteLength;l+=8){let f=n[l],d=n[l+1],_=n[l+2],m=n[l+3],g=n[l+4],y=n[l+5],b=n[l+6],E=n[l+7],v=tfe(f,d,_,m,g,y,b,E),O=!0;switch(o){case 0:v!==0||u>=255?(i.push(u),u=0,O=!1):u++;break;case 255:{let P=nfe(f,d,_,m,g,y,b,E);c-=P,c<=0||u>=255?(i[a]=u,u=0,c=Qle.PACK_SPAN_THRESHOLD,O=!1):(i.push(f,d,_,m,g,y,b,E),u++);break}default:O=!1;break}O||(i.push(v),o=v,f!==0&&i.push(f),d!==0&&i.push(d),_!==0&&i.push(_),m!==0&&i.push(m),g!==0&&i.push(g),y!==0&&i.push(y),b!==0&&i.push(b),E!==0&&i.push(E),v===255&&(a=i.length,i.push(0)))}return o===0?i.push(u):o===255&&(i[a]=u),new Uint8Array(i).buffer}s(Cmt,"pack");Ri.pack=Cmt;function $mt(e){let t=new Uint8Array(e),r=new Uint8Array(new ArrayBuffer(rfe(e))),n=119;for(let i=0,o=0;i<t.byteLength;){let a=t[i];if(n===0)o+=a*8,i++,n=119;else if(n===255){let u=a*8;r.set(t.subarray(i+1,i+1+u),o),o+=u,i+=1+u,n=119}else{i++;for(let u=1;u<=128;u<<=1)a&u&&(r[o]=t[i++]),o++;n=a}}return r.buffer}s($mt,"unpack");Ri.unpack=$mt});var zd=h(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});ks.padToWord=ks.getWordLength=ks.getDataWordLength=ks.getByteLength=ks.ObjectSize=void 0;var sfe=(at(),ct(ot)),Dmt=sfe.__importDefault(mt()),ofe=sfe.__importStar(Ai()),Lmt=Dmt.default("capnp:object-size");Lmt("load");var aN=class{static{s(this,"ObjectSize")}constructor(t,r){this.dataByteLength=t,this.pointerLength=r}toString(){return ofe.format("ObjectSize_dw:%d,pc:%d",afe(this),this.pointerLength)}};ks.ObjectSize=aN;function jmt(e){return e.dataByteLength+e.pointerLength*8}s(jmt,"getByteLength");ks.getByteLength=jmt;function afe(e){return e.dataByteLength/8}s(afe,"getDataWordLength");ks.getDataWordLength=afe;function Mmt(e){return e.dataByteLength/8+e.pointerLength}s(Mmt,"getWordLength");ks.getWordLength=Mmt;function Umt(e){return new aN(ofe.padToWord(e.dataByteLength),e.pointerLength)}s(Umt,"padToWord");ks.padToWord=Umt});var Hd=h(ib=>{"use strict";Object.defineProperty(ib,"__esModule",{value:!0});ib.PointerType=void 0;var xmt;(function(e){e[e.STRUCT=0]="STRUCT",e[e.LIST=1]="LIST",e[e.FAR=2]="FAR",e[e.OTHER=3]="OTHER"})(xmt=ib.PointerType||(ib.PointerType={}))});var Gk=h(cN=>{"use strict";Object.defineProperty(cN,"__esModule",{value:!0});cN.Orphan=void 0;var qmt=(at(),ct(ot)),Fmt=qmt.__importDefault(mt()),uN=Xn(),kk=Ai(),ufe=cr(),kmt=zd(),Ci=Jt(),nl=Hd(),cfe=Fmt.default("capnp:orphan");cfe("load");var Bk=class{static{s(this,"Orphan")}constructor(t){let r=Ci.getContent(t);switch(this.segment=r.segment,this.byteOffset=r.byteOffset,this._capnp={},this._capnp.type=Ci.getTargetPointerType(t),this._capnp.type){case nl.PointerType.STRUCT:this._capnp.size=Ci.getTargetStructSize(t);break;case nl.PointerType.LIST:this._capnp.length=Ci.getTargetListLength(t),this._capnp.elementSize=Ci.getTargetListElementSize(t),this._capnp.elementSize===ufe.ListElementSize.COMPOSITE&&(this._capnp.size=Ci.getTargetCompositeListSize(t));break;case nl.PointerType.OTHER:this._capnp.capId=Ci.getCapabilityId(t);break;default:throw new Error(uN.PTR_INVALID_POINTER_TYPE)}Ci.erasePointer(t)}_moveTo(t){if(this._capnp===void 0)throw new Error(kk.format(uN.PTR_ALREADY_ADOPTED,this));if(this.segment.message!==t.segment.message)throw new Error(kk.format(uN.PTR_ADOPT_WRONG_MESSAGE,this,t));Ci.erase(t);let r=Ci.initPointer(this.segment,this.byteOffset,t);switch(this._capnp.type){case nl.PointerType.STRUCT:Ci.setStructPointer(r.offsetWords,this._capnp.size,r.pointer);break;case nl.PointerType.LIST:{let n=r.offsetWords;this._capnp.elementSize===ufe.ListElementSize.COMPOSITE&&n--,Ci.setListPointer(n,this._capnp.elementSize,this._capnp.length,r.pointer,this._capnp.size);break}case nl.PointerType.OTHER:Ci.setInterfacePointer(this._capnp.capId,r.pointer);break;default:throw new Error(uN.PTR_INVALID_POINTER_TYPE)}this._capnp=void 0}dispose(){if(this._capnp===void 0){cfe("not disposing an already disposed orphan",this);return}switch(this._capnp.type){case nl.PointerType.STRUCT:this.segment.fillZeroWords(this.byteOffset,kmt.getWordLength(this._capnp.size));break;case nl.PointerType.LIST:{let t=Ci.getListByteLength(this._capnp.elementSize,this._capnp.length,this._capnp.size);this.segment.fillZeroWords(this.byteOffset,t);break}default:break}this._capnp=void 0}toString(){return kk.format("Orphan_%d@%a,type:%s",this.segment.id,this.byteOffset,this._capnp&&this._capnp.type)}};cN.Orphan=Bk});var lfe=h(lN=>{"use strict";Object.defineProperty(lN,"__esModule",{value:!0});lN.PointerAllocationResult=void 0;var Bmt=(at(),ct(ot)),Gmt=Bmt.__importDefault(mt()),Vmt=Gmt.default("capnp:pointer-allocation-result");Vmt("load");var Vk=class{static{s(this,"PointerAllocationResult")}constructor(t,r){this.pointer=t,this.offsetWords=r}};lN.PointerAllocationResult=Vk});var Jt=h(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.trackPointerAllocation=V.copyFromStruct=V.copyFromList=V.validate=V.setStructPointer=V.setListPointer=V.setInterfacePointer=V.setFarPointer=V.relocateTo=V.isNull=V.isDoubleFar=V.initPointer=V.getTargetStructSize=V.getTargetPointerType=V.getTargetListLength=V.getTargetListElementSize=V.getTargetCompositeListSize=V.getTargetCompositeListTag=V.getStructSize=V.getStructPointerLength=V.getStructDataWords=V.getPointerType=V.getOffsetWords=V.getListLength=V.getListElementSize=V.getFarSegmentId=V.getContent=V.getCapabilityId=V.followFars=V.followFar=V.erasePointer=V.erase=V.copyFrom=V.add=V.getListElementByteLength=V.getListByteLength=V.dump=V.disown=V.adopt=V.Pointer=void 0;var zmt=(at(),ct(ot)),Hmt=zmt.__importDefault(mt()),C_=Xi(),ln=Ai(),Ht=cr(),Zi=zd(),Kmt=Gk(),zk=lfe(),$i=Hd(),Zn=Xn(),A_=Hmt.default("capnp:pointer");A_("load");var yr=class{static{s(this,"Pointer")}constructor(t,r,n=C_.MAX_DEPTH){if(this._capnp={compositeList:!1,depthLimit:n},this.segment=t,this.byteOffset=r,n===0)throw new Error(ln.format(Zn.PTR_DEPTH_LIMIT_EXCEEDED,this));if(vfe(t.message,this),r<0||r>t.byteLength)throw new Error(ln.format(Zn.PTR_OFFSET_OUT_OF_BOUNDS,r));A_("new %s",this)}toString(){return ln.format("Pointer_%d@%a,%s,limit:%x",this.segment.id,this.byteOffset,Kk(this),this._capnp.depthLimit)}};V.Pointer=yr;yr.adopt=ffe;yr.copyFrom=sb;yr.disown=dfe;yr.dump=Kk;yr.isNull=ub;yr._capnp={displayName:"Pointer"};function ffe(e,t){e._moveTo(t)}s(ffe,"adopt");V.adopt=ffe;function dfe(e){return new Kmt.Orphan(e)}s(dfe,"disown");V.disown=dfe;function Kk(e){return ln.bufferToHex(e.segment.buffer.slice(e.byteOffset,e.byteOffset+8))}s(Kk,"dump");V.dump=Kk;function Wmt(e,t,r){switch(e){case Ht.ListElementSize.BIT:return ln.padToWord(t+7>>>3);case Ht.ListElementSize.BYTE:case Ht.ListElementSize.BYTE_2:case Ht.ListElementSize.BYTE_4:case Ht.ListElementSize.BYTE_8:case Ht.ListElementSize.POINTER:case Ht.ListElementSize.VOID:return ln.padToWord(dN(e)*t);case Ht.ListElementSize.COMPOSITE:if(r===void 0)throw new Error(ln.format(Zn.PTR_INVALID_LIST_SIZE,NaN));return t*ln.padToWord(Zi.getByteLength(r));default:throw new Error(Zn.PTR_INVALID_LIST_SIZE)}}s(Wmt,"getListByteLength");V.getListByteLength=Wmt;function dN(e){switch(e){case Ht.ListElementSize.BIT:return NaN;case Ht.ListElementSize.BYTE:return 1;case Ht.ListElementSize.BYTE_2:return 2;case Ht.ListElementSize.BYTE_4:return 4;case Ht.ListElementSize.BYTE_8:case Ht.ListElementSize.POINTER:return 8;case Ht.ListElementSize.COMPOSITE:return NaN;case Ht.ListElementSize.VOID:return 0;default:throw new Error(ln.format(Zn.PTR_INVALID_LIST_SIZE,e))}}s(dN,"getListElementByteLength");V.getListElementByteLength=dN;function Hk(e,t){return new yr(t.segment,t.byteOffset+e,t._capnp.depthLimit)}s(Hk,"add");V.add=Hk;function sb(e,t){if(t.segment===e.segment&&t.byteOffset===e.byteOffset){A_("ignoring copy operation from identical pointer %s",e);return}if(R_(t),!ub(e))switch(L_(e)){case $i.PointerType.STRUCT:Sfe(e,t);break;case $i.PointerType.LIST:bfe(e,t);break;default:throw new Error(ln.format(Zn.PTR_INVALID_POINTER_TYPE,L_(t)))}}s(sb,"copyFrom");V.copyFrom=sb;function R_(e){if(ub(e))return;let t;switch(L_(e)){case $i.PointerType.STRUCT:{let r=Zk(e);t=$_(e),t.segment.fillZeroWords(t.byteOffset,r.dataByteLength/8);for(let n=0;n<r.pointerLength;n++)R_(Hk(n*8,t));break}case $i.PointerType.LIST:{let r=hN(e),n=Xk(e),i=ln.padToWord(n*dN(r));if(t=$_(e),r===Ht.ListElementSize.POINTER){for(let o=0;o<n;o++)R_(new yr(t.segment,t.byteOffset+o*8,e._capnp.depthLimit-1));break}else if(r===Ht.ListElementSize.COMPOSITE){let o=Hk(-8,t),a=ab(o),u=Zi.getByteLength(a);i=D_(o),t.segment.setWordZero(t.byteOffset-8);for(let c=0;c<n;c++)for(let l=0;l<a.pointerLength;l++)R_(new yr(t.segment,t.byteOffset+c*u+l*8,e._capnp.depthLimit-1))}t.segment.fillZeroWords(t.byteOffset,i);break}case $i.PointerType.OTHER:break;default:throw new Error(ln.format(Zn.PTR_INVALID_POINTER_TYPE,L_(e)))}Wk(e)}s(R_,"erase");V.erase=R_;function Wk(e){if(ob(e)===$i.PointerType.FAR){let t=pN(e);_N(e)&&t.segment.setWordZero(t.byteOffset+8),t.segment.setWordZero(t.byteOffset)}e.segment.setWordZero(e.byteOffset)}s(Wk,"erasePointer");V.erasePointer=Wk;function pN(e){let t=e.segment.message.getSegment(e.segment.getUint32(e.byteOffset+4)),r=e.segment.getUint32(e.byteOffset)>>>3;return new yr(t,r*8,e._capnp.depthLimit-1)}s(pN,"followFar");V.followFar=pN;function il(e){if(ob(e)===$i.PointerType.FAR){let t=pN(e);return _N(e)&&(t.byteOffset+=8),t}return e}s(il,"followFars");V.followFars=il;function Ymt(e){return e.segment.getUint32(e.byteOffset+4)}s(Ymt,"getCapabilityId");V.getCapabilityId=Ymt;function Jmt(e){return L_(e)===$i.PointerType.LIST&&hN(e)===Ht.ListElementSize.COMPOSITE}s(Jmt,"isCompositeList");function $_(e,t){let r;if(_N(e)){let n=pN(e);r=new yr(e.segment.message.getSegment(pfe(n)),D_(n)*8)}else{let n=il(e);r=new yr(n.segment,n.byteOffset+8+D_(n)*8)}return Jmt(e)&&(r.byteOffset+=8),!t&&e._capnp.compositeIndex!==void 0&&(r.byteOffset-=8,r.byteOffset+=8+e._capnp.compositeIndex*Zi.getByteLength(Zi.padToWord(ab(r)))),r}s($_,"getContent");V.getContent=$_;function pfe(e){return e.segment.getUint32(e.byteOffset+4)}s(pfe,"getFarSegmentId");V.getFarSegmentId=pfe;function Yk(e){return e.segment.getUint32(e.byteOffset+4)&C_.LIST_SIZE_MASK}s(Yk,"getListElementSize");V.getListElementSize=Yk;function hfe(e){return e.segment.getUint32(e.byteOffset+4)>>>3}s(hfe,"getListLength");V.getListLength=hfe;function D_(e){let t=e.segment.getInt32(e.byteOffset);return t&2?t>>3:t>>2}s(D_,"getOffsetWords");V.getOffsetWords=D_;function ob(e){return e.segment.getUint32(e.byteOffset)&C_.POINTER_TYPE_MASK}s(ob,"getPointerType");V.getPointerType=ob;function mfe(e){return e.segment.getUint16(e.byteOffset+4)}s(mfe,"getStructDataWords");V.getStructDataWords=mfe;function _fe(e){return e.segment.getUint16(e.byteOffset+6)}s(_fe,"getStructPointerLength");V.getStructPointerLength=_fe;function ab(e){return new Zi.ObjectSize(mfe(e)*8,_fe(e))}s(ab,"getStructSize");V.getStructSize=ab;function Jk(e){let t=$_(e);return t.byteOffset-=8,t}s(Jk,"getTargetCompositeListTag");V.getTargetCompositeListTag=Jk;function gfe(e){return ab(Jk(e))}s(gfe,"getTargetCompositeListSize");V.getTargetCompositeListSize=gfe;function hN(e){return Yk(il(e))}s(hN,"getTargetListElementSize");V.getTargetListElementSize=hN;function Xk(e){let t=il(e);return Yk(t)===Ht.ListElementSize.COMPOSITE?D_(Jk(e)):hfe(t)}s(Xk,"getTargetListLength");V.getTargetListLength=Xk;function L_(e){let t=ob(il(e));if(t===$i.PointerType.FAR)throw new Error(ln.format(Zn.PTR_INVALID_FAR_TARGET,e));return t}s(L_,"getTargetPointerType");V.getTargetPointerType=L_;function Zk(e){return ab(il(e))}s(Zk,"getTargetStructSize");V.getTargetStructSize=Zk;function mN(e,t,r){if(r.segment!==e){if(A_("Initializing far pointer %s -> %s.",r,e),!e.hasCapacity(8)){let i=r.segment.allocate(16);return A_("GAH! Initializing double-far pointer in %s from %s -> %s.",r,e,i),fN(!0,i.byteOffset/8,i.segment.id,r),fN(!1,t/8,e.id,i),i.byteOffset+=8,new zk.PointerAllocationResult(i,0)}let n=e.allocate(8);if(n.segment.id!==e.id)throw new Error(Zn.INVARIANT_UNREACHABLE_CODE);return fN(!1,n.byteOffset/8,n.segment.id,r),new zk.PointerAllocationResult(n,(t-n.byteOffset-8)/8)}return A_("Initializing intra-segment pointer %s -> %a.",r,t),new zk.PointerAllocationResult(r,(t-r.byteOffset-8)/8)}s(mN,"initPointer");V.initPointer=mN;function _N(e){return ob(e)===$i.PointerType.FAR&&(e.segment.getUint32(e.byteOffset)&C_.POINTER_DOUBLE_FAR_MASK)!==0}s(_N,"isDoubleFar");V.isDoubleFar=_N;function ub(e){return e.segment.isWordZero(e.byteOffset)}s(ub,"isNull");V.isNull=ub;function Xmt(e,t){let r=il(t),n=r.segment.getUint8(r.byteOffset)&3,i=r.segment.getUint32(r.byteOffset+4);R_(e);let o=mN(r.segment,r.byteOffset+8+D_(r)*8,e);o.pointer.segment.setUint32(o.pointer.byteOffset,n|o.offsetWords<<2),o.pointer.segment.setUint32(o.pointer.byteOffset+4,i),Wk(t)}s(Xmt,"relocateTo");V.relocateTo=Xmt;function fN(e,t,r,n){let i=$i.PointerType.FAR,o=e?1:0,a=t,u=r;n.segment.setUint32(n.byteOffset,i|o<<2|a<<3),n.segment.setUint32(n.byteOffset+4,u)}s(fN,"setFarPointer");V.setFarPointer=fN;function Zmt(e,t){t.segment.setUint32(t.byteOffset,$i.PointerType.OTHER),t.segment.setUint32(t.byteOffset+4,e)}s(Zmt,"setInterfacePointer");V.setInterfacePointer=Zmt;function yfe(e,t,r,n,i){let o=$i.PointerType.LIST,a=e,u=t,c=r;if(t===Ht.ListElementSize.COMPOSITE){if(i===void 0)throw new TypeError(Zn.TYPE_COMPOSITE_SIZE_UNDEFINED);c*=Zi.getWordLength(i)}n.segment.setUint32(n.byteOffset,o|a<<2),n.segment.setUint32(n.byteOffset+4,u|c<<3)}s(yfe,"setListPointer");V.setListPointer=yfe;function Efe(e,t,r){let n=$i.PointerType.STRUCT,i=e,o=Zi.getDataWordLength(t),a=t.pointerLength;r.segment.setUint32(r.byteOffset,n|i<<2),r.segment.setUint16(r.byteOffset+4,o),r.segment.setUint16(r.byteOffset+6,a)}s(Efe,"setStructPointer");V.setStructPointer=Efe;function Qmt(e,t,r){if(ub(t))return;let n=il(t);if((n.segment.getUint32(n.byteOffset)&C_.POINTER_TYPE_MASK)!==e)throw new Error(ln.format(Zn.PTR_WRONG_POINTER_TYPE,t,e));if(r!==void 0&&(n.segment.getUint32(n.byteOffset+4)&C_.LIST_SIZE_MASK)!==r)throw new Error(ln.format(Zn.PTR_WRONG_LIST_TYPE,t,Ht.ListElementSize[r]))}s(Qmt,"validate");V.validate=Qmt;function bfe(e,t){if(t._capnp.depthLimit<=0)throw new Error(Zn.PTR_DEPTH_LIMIT_EXCEEDED);let r=$_(e),n=hN(e),i=Xk(e),o,a,u;if(n===Ht.ListElementSize.POINTER){u=t.segment.allocate(i<<3);for(let l=0;l<i;l++){let f=new yr(r.segment,r.byteOffset+(l<<3),e._capnp.depthLimit-1),d=new yr(u.segment,u.byteOffset+(l<<3),t._capnp.depthLimit-1);sb(f,d)}}else if(n===Ht.ListElementSize.COMPOSITE){if(o=Zi.padToWord(gfe(e)),a=Zi.getByteLength(o),u=t.segment.allocate(Zi.getByteLength(o)*i+8),u.segment.copyWord(u.byteOffset,r.segment,r.byteOffset-8),o.dataByteLength>0){let l=Zi.getWordLength(o)*i;u.segment.copyWords(u.byteOffset+8,r.segment,r.byteOffset,l)}for(let l=0;l<i;l++)for(let f=0;f<o.pointerLength;f++){let d=l*a+o.dataByteLength+(f<<3),_=new yr(r.segment,r.byteOffset+d,e._capnp.depthLimit-1),m=new yr(u.segment,u.byteOffset+d+8,t._capnp.depthLimit-1);sb(_,m)}}else{let l=ln.padToWord(n===Ht.ListElementSize.BIT?i+7>>>3:dN(n)*i),f=l>>>3;u=t.segment.allocate(l),u.segment.copyWords(u.byteOffset,r.segment,r.byteOffset,f)}let c=mN(u.segment,u.byteOffset,t);yfe(c.offsetWords,n,i,c.pointer,o)}s(bfe,"copyFromList");V.copyFromList=bfe;function Sfe(e,t){if(t._capnp.depthLimit<=0)throw new Error(Zn.PTR_DEPTH_LIMIT_EXCEEDED);let r=$_(e),n=Zk(e),i=Zi.getDataWordLength(n),o=t.segment.allocate(Zi.getByteLength(n));o.segment.copyWords(o.byteOffset,r.segment,r.byteOffset,i);for(let u=0;u<n.pointerLength;u++){let c=n.dataByteLength+u*8,l=new yr(r.segment,r.byteOffset+c,e._capnp.depthLimit-1),f=new yr(o.segment,o.byteOffset+c,t._capnp.depthLimit-1);sb(l,f)}if(t._capnp.compositeList)return;let a=mN(o.segment,o.byteOffset,t);Efe(a.offsetWords,n,a.pointer)}s(Sfe,"copyFromStruct");V.copyFromStruct=Sfe;function vfe(e,t){if(e._capnp.traversalLimit-=8,e._capnp.traversalLimit<=0)throw new Error(ln.format(Zn.PTR_TRAVERSAL_LIMIT_EXCEEDED,t))}s(vfe,"trackPointerAllocation");V.trackPointerAllocation=vfe});var Lr=h(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.set=Ra.get=Ra.initList=Ra.List=void 0;var e_t=(at(),ct(ot)),t_t=e_t.__importDefault(mt()),Ofe=Xn(),Qk=Ai(),Iu=cr(),Pfe=zd(),Kd=Jt(),wfe=t_t.default("capnp:list");wfe("load");var Wd=class extends Kd.Pointer{static{s(this,"List")}static toString(){return this._capnp.displayName}all(t){let r=this.getLength();for(let n=0;n<r;n++)if(!t(this.get(n),n))return!1;return!0}any(t){let r=this.getLength();for(let n=0;n<r;n++)if(t(this.get(n),n))return!0;return!1}ap(t){let r=this.getLength(),n=[];for(let i=0;i<r;i++)n.push(...t.map(o=>o(this.get(i),i)));return n}concat(t){let r=this.getLength(),n=t.getLength(),i=new Array(r+n);for(let o=0;o<r;o++)i[o]=this.get(o);for(let o=0;o<n;o++)i[o+r]=t.get(o);return i}drop(t){let r=this.getLength(),n=new Array(r);for(let i=t;i<r;i++)n[i]=this.get(i);return n}dropWhile(t){let r=this.getLength(),n=[],i=!0;for(let o=0;o<r;o++){let a=this.get(o);i&&(i=t(a,o)),i||n.push(a)}return n}empty(){return[]}every(t){return this.all(t)}filter(t){let r=this.getLength(),n=[];for(let i=0;i<r;i++){let o=this.get(i);t(o,i)&&n.push(o)}return n}find(t){let r=this.getLength();for(let n=0;n<r;n++){let i=this.get(n);if(t(i,n))return i}}findIndex(t){let r=this.getLength();for(let n=0;n<r;n++){let i=this.get(n);if(t(i,n))return n}return-1}forEach(t){let r=this.getLength();for(let n=0;n<r;n++)t(this.get(n),n)}get(t){return eB(t,this)}getLength(){return Kd.getTargetListLength(this)}groupBy(t){let r=this.getLength(),n={};for(let i=0;i<r;i++){let o=this.get(i);n[t(o,i)]=o}return n}intersperse(t){let r=this.getLength(),n=new Array(r);for(let i=0;i<r;i++)i>0&&n.push(t),n.push(this.get(i));return n}map(t){let r=this.getLength(),n=new Array(r);for(let i=0;i<r;i++)n[i]=t(this.get(i),i);return n}reduce(t,r){let n=0,i;for(r===void 0?(i=this.get(0),n++):i=r;n<this.getLength();n++)i=t(i,this.get(n),n);return i}set(t,r){tB(t,r,this)}slice(t=0,r){let n=r?Math.min(this.getLength(),r):this.getLength(),i=new Array(n-t);for(let o=t;o<n;o++)i[o]=this.get(o);return i}some(t){return this.any(t)}take(t){let r=Math.min(this.getLength(),t),n=new Array(r);for(let i=0;i<r;i++)n[i]=this.get(i);return n}takeWhile(t){let r=this.getLength(),n=[],i;for(let o=0;o<r;o++){let a=this.get(o);if(i=t(a,o),!i)return n;n.push(a)}return n}toArray(){return this.map(Qk.identity)}toString(){return`List_${super.toString()}`}};Ra.List=Wd;Wd._capnp={displayName:"List<Generic>",size:Iu.ListElementSize.VOID};Wd.get=eB;Wd.initList=Ife;Wd.set=tB;function Ife(e,t,r,n){let i;switch(e){case Iu.ListElementSize.BIT:i=r.segment.allocate(Math.ceil(t/8));break;case Iu.ListElementSize.BYTE:case Iu.ListElementSize.BYTE_2:case Iu.ListElementSize.BYTE_4:case Iu.ListElementSize.BYTE_8:case Iu.ListElementSize.POINTER:i=r.segment.allocate(t*Kd.getListElementByteLength(e));break;case Iu.ListElementSize.COMPOSITE:{if(n===void 0)throw new Error(Qk.format(Ofe.PTR_COMPOSITE_SIZE_UNDEFINED));n=Pfe.padToWord(n);let a=Pfe.getByteLength(n)*t;i=r.segment.allocate(a+8),Kd.setStructPointer(t,n,i),wfe("Wrote composite tag word %s for %s.",i,r);break}case Iu.ListElementSize.VOID:Kd.setListPointer(0,e,t,r);return;default:throw new Error(Qk.format(Ofe.PTR_INVALID_LIST_SIZE,e))}let o=Kd.initPointer(i.segment,i.byteOffset,r);Kd.setListPointer(o.offsetWords,e,t,o.pointer,n)}s(Ife,"initList");Ra.initList=Ife;function eB(e,t){throw new TypeError}s(eB,"get");Ra.get=eB;function tB(e,t,r){throw new TypeError}s(tB,"set");Ra.set=tB});var j_=h(gN=>{"use strict";Object.defineProperty(gN,"__esModule",{value:!0});gN.PointerList=void 0;var r_t=(at(),ct(ot)),n_t=r_t.__importDefault(mt()),i_t=cr(),s_t=Lr(),Tfe=Jt(),o_t=n_t.default("capnp:list:composite");o_t("load");function a_t(e){var t;return t=class extends s_t.List{static{s(this,"_a")}get(r){let n=Tfe.getContent(this);return new e(n.segment,n.byteOffset+r*8,this._capnp.depthLimit-1)}set(r,n){Tfe.copyFrom(n,this.get(r))}toString(){return`Pointer_${super.toString()},cls:${e.toString()}`}},t._capnp={displayName:`List<${e._capnp.displayName}>`,size:i_t.ListElementSize.POINTER},t}s(a_t,"PointerList");gN.PointerList=a_t});var Nfe=h(yN=>{"use strict";Object.defineProperty(yN,"__esModule",{value:!0});yN.AnyPointerList=void 0;var u_t=Jt(),c_t=j_();yN.AnyPointerList=c_t.PointerList(u_t.Pointer)});var Rfe=h(bN=>{"use strict";Object.defineProperty(bN,"__esModule",{value:!0});bN.BoolList=void 0;var l_t=(at(),ct(ot)),f_t=l_t.__importDefault(mt()),d_t=cr(),p_t=Lr(),Afe=Jt(),h_t=f_t.default("capnp:list:composite");h_t("load");var EN=class extends p_t.List{static{s(this,"BoolList")}get(t){let r=1<<t%8,n=t>>>3,i=Afe.getContent(this);return(i.segment.getUint8(i.byteOffset+n)&r)!==0}set(t,r){let n=1<<t%8,i=Afe.getContent(this),o=i.byteOffset+(t>>>3),a=i.segment.getUint8(o);i.segment.setUint8(o,r?a|n:a&~n)}toString(){return`Bool_${super.toString()}`}};bN.BoolList=EN;EN._capnp={displayName:"List<boolean>",size:d_t.ListElementSize.BIT}});var Cfe=h(SN=>{"use strict";Object.defineProperty(SN,"__esModule",{value:!0});SN.CompositeList=void 0;var m_t=(at(),ct(ot)),__t=m_t.__importDefault(mt()),g_t=cr(),y_t=Lr(),E_t=Jt(),b_t=__t.default("capnp:list:composite");b_t("load");function S_t(e){var t;return t=class extends y_t.List{static{s(this,"_a")}get(r){return new e(this.segment,this.byteOffset,this._capnp.depthLimit-1,r)}set(r,n){E_t.copyFrom(n,this.get(r))}toString(){return`Composite_${super.toString()},cls:${e.toString()}`}},t._capnp={compositeSize:e._capnp.size,displayName:`List<${e._capnp.displayName}>`,size:g_t.ListElementSize.COMPOSITE},t}s(S_t,"CompositeList");SN.CompositeList=S_t});var ON=h(vN=>{"use strict";Object.defineProperty(vN,"__esModule",{value:!0});vN.Data=void 0;var v_t=(at(),ct(ot)),O_t=v_t.__importDefault(mt()),P_t=cr(),w_t=Lr(),Yd=Jt(),I_t=Hd(),rB=O_t.default("capnp:data");rB("load");var nB=class extends w_t.List{static{s(this,"Data")}static fromPointer(t){return Yd.validate(I_t.PointerType.LIST,t,P_t.ListElementSize.BYTE),this._fromPointerUnchecked(t)}static _fromPointerUnchecked(t){return new this(t.segment,t.byteOffset,t._capnp.depthLimit)}copyBuffer(t){let r=Yd.getContent(this),n=this.getLength(),i=t.byteLength,o=t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,Math.min(n,i)),a=new Uint8Array(r.segment.buffer,r.byteOffset,this.getLength());a.set(o),n>i?(rB("Zeroing out remaining %d bytes after copy into %s.",n-i,this),a.fill(0,i,n)):n<i&&rB("Truncated %d bytes from source buffer while copying to %s.",i-n,this)}get(t){let r=Yd.getContent(this);return r.segment.getUint8(r.byteOffset+t)}set(t,r){let n=Yd.getContent(this);n.segment.setUint8(n.byteOffset+t,r)}toArrayBuffer(){let t=Yd.getContent(this);return t.segment.buffer.slice(t.byteOffset,t.byteOffset+this.getLength())}toDataView(){let t=Yd.getContent(this);return new DataView(t.segment.buffer,t.byteOffset,this.getLength())}toString(){return`Data_${super.toString()}`}toUint8Array(){let t=Yd.getContent(this);return new Uint8Array(t.segment.buffer,t.byteOffset,this.getLength())}};vN.Data=nB});var $fe=h(PN=>{"use strict";Object.defineProperty(PN,"__esModule",{value:!0});PN.DataList=void 0;var T_t=ON(),N_t=j_();PN.DataList=N_t.PointerList(T_t.Data)});var Lfe=h(IN=>{"use strict";Object.defineProperty(IN,"__esModule",{value:!0});IN.Float32List=void 0;var A_t=(at(),ct(ot)),R_t=A_t.__importDefault(mt()),C_t=cr(),$_t=Lr(),Dfe=Jt(),D_t=R_t.default("capnp:list:composite");D_t("load");var wN=class extends $_t.List{static{s(this,"Float32List")}get(t){let r=Dfe.getContent(this);return r.segment.getFloat32(r.byteOffset+t*4)}set(t,r){let n=Dfe.getContent(this);n.segment.setFloat32(n.byteOffset+t*4,r)}toString(){return`Float32_${super.toString()}`}};IN.Float32List=wN;wN._capnp={displayName:"List<Float32>",size:C_t.ListElementSize.BYTE_4}});var Mfe=h(NN=>{"use strict";Object.defineProperty(NN,"__esModule",{value:!0});NN.Float64List=void 0;var L_t=(at(),ct(ot)),j_t=L_t.__importDefault(mt()),M_t=cr(),U_t=Lr(),jfe=Jt(),x_t=j_t.default("capnp:list:composite");x_t("load");var TN=class extends U_t.List{static{s(this,"Float64List")}get(t){let r=jfe.getContent(this);return r.segment.getFloat64(r.byteOffset+t*8)}set(t,r){let n=jfe.getContent(this);n.segment.setFloat64(n.byteOffset+t*8,r)}toString(){return`Float64_${super.toString()}`}};NN.Float64List=TN;TN._capnp={displayName:"List<Float64>",size:M_t.ListElementSize.BYTE_8}});var xfe=h(RN=>{"use strict";Object.defineProperty(RN,"__esModule",{value:!0});RN.Int8List=void 0;var q_t=(at(),ct(ot)),F_t=q_t.__importDefault(mt()),k_t=cr(),B_t=Lr(),Ufe=Jt(),G_t=F_t.default("capnp:list:composite");G_t("load");var AN=class extends B_t.List{static{s(this,"Int8List")}get(t){let r=Ufe.getContent(this);return r.segment.getInt8(r.byteOffset+t)}set(t,r){let n=Ufe.getContent(this);n.segment.setInt8(n.byteOffset+t,r)}toString(){return`Int8_${super.toString()}`}};RN.Int8List=AN;AN._capnp={displayName:"List<Int8>",size:k_t.ListElementSize.BYTE}});var Ffe=h($N=>{"use strict";Object.defineProperty($N,"__esModule",{value:!0});$N.Int16List=void 0;var V_t=(at(),ct(ot)),z_t=V_t.__importDefault(mt()),H_t=cr(),K_t=Lr(),qfe=Jt(),W_t=z_t.default("capnp:list:composite");W_t("load");var CN=class extends K_t.List{static{s(this,"Int16List")}get(t){let r=qfe.getContent(this);return r.segment.getInt16(r.byteOffset+t*2)}set(t,r){let n=qfe.getContent(this);n.segment.setInt16(n.byteOffset+t*2,r)}toString(){return`Int16_${super.toString()}`}};$N.Int16List=CN;CN._capnp={displayName:"List<Int16>",size:H_t.ListElementSize.BYTE_2}});var Bfe=h(LN=>{"use strict";Object.defineProperty(LN,"__esModule",{value:!0});LN.Int32List=void 0;var Y_t=(at(),ct(ot)),J_t=Y_t.__importDefault(mt()),X_t=cr(),Z_t=Lr(),kfe=Jt(),Q_t=J_t.default("capnp:list:composite");Q_t("load");var DN=class extends Z_t.List{static{s(this,"Int32List")}get(t){let r=kfe.getContent(this);return r.segment.getInt32(r.byteOffset+t*4)}set(t,r){let n=kfe.getContent(this);n.segment.setInt32(n.byteOffset+t*4,r)}toString(){return`Int32_${super.toString()}`}};LN.Int32List=DN;DN._capnp={displayName:"List<Int32>",size:X_t.ListElementSize.BYTE_4}});var Vfe=h(MN=>{"use strict";Object.defineProperty(MN,"__esModule",{value:!0});MN.Int64List=void 0;var egt=(at(),ct(ot)),tgt=egt.__importDefault(mt()),rgt=cr(),ngt=Lr(),Gfe=Jt(),igt=tgt.default("capnp:list:composite");igt("load");var jN=class extends ngt.List{static{s(this,"Int64List")}get(t){let r=Gfe.getContent(this);return r.segment.getInt64(r.byteOffset+t*8)}set(t,r){let n=Gfe.getContent(this);n.segment.setInt64(n.byteOffset+t*8,r)}toString(){return`Int64_${super.toString()}`}};MN.Int64List=jN;jN._capnp={displayName:"List<Int64>",size:rgt.ListElementSize.BYTE_8}});var sB=h(UN=>{"use strict";Object.defineProperty(UN,"__esModule",{value:!0});UN.Interface=void 0;var sgt=Xi(),ogt=Xn(),agt=Ai(),ugt=Jt(),iB=class extends ugt.Pointer{static{s(this,"Interface")}constructor(t,r,n=sgt.MAX_DEPTH){throw super(t,r,n),new Error(agt.format(ogt.NOT_IMPLEMENTED,"new Interface"))}};UN.Interface=iB});var zfe=h(xN=>{"use strict";Object.defineProperty(xN,"__esModule",{value:!0});xN.InterfaceList=void 0;var cgt=sB(),lgt=j_();xN.InterfaceList=lgt.PointerList(cgt.Interface)});var aB=h(FN=>{"use strict";Object.defineProperty(FN,"__esModule",{value:!0});FN.Uint64=void 0;var fgt=(at(),ct(ot)),dgt=fgt.__importDefault(mt()),qN=Xi(),pgt=Xn(),hgt=Ai(),Hfe=dgt.default("capnp:uint64");Hfe("load");var oB=class e{static{s(this,"Uint64")}constructor(t){if(t.byteLength<8)throw new RangeError(pgt.RANGE_INT64_UNDERFLOW);this.buffer=t}static fromArrayBuffer(t,r=0,n=!1){return n?new this(new Uint8Array(t,r,8)):new this(new Uint8Array(t.slice(r,r+8)))}static fromDataView(t,r=0,n=!1){return n?new this(new Uint8Array(t.buffer,t.byteOffset+r,8)):new this(new Uint8Array(t.buffer.slice(t.byteOffset+r,t.byteLength+r+8)))}static fromHexString(t){if(t.substr(0,2)==="0x"&&(t=t.substr(2)),t.length<1)return e.fromNumber(0);if(t[0]==="-")throw new RangeError("Source must not be negative.");if(t=hgt.pad(t,16),t.length!==16)throw new RangeError("Source string must contain at most 16 hexadecimal digits.");let r=t.toLowerCase().replace(/[^\da-f]/g,""),n=new Uint8Array(new ArrayBuffer(8));for(let i=0;i<8;i++)n[7-i]=parseInt(r.substr(i*2,2),16);return new e(n)}static fromNumber(t){let r=new this(new Uint8Array(8));return r.setValue(t),r}static fromUint8Array(t,r=0,n=!1){return n?new this(t.subarray(r,r+8)):new this(new Uint8Array(t.buffer.slice(t.byteOffset+r,t.byteOffset+r+8)))}equals(t){for(let r=0;r<8;r++)if(this.buffer[r]!==t.buffer[r])return!1;return!0}inspect(){return`[Uint64 ${this.toString(10)} 0x${this.toHexString()}]`}isZero(){for(let t=0;t<8;t++)if(this.buffer[t]!==0)return!1;return!0}setValue(t,r){let n=t,i=r;if(i===void 0){if(i=n,i=Math.abs(i),n=i%qN.VAL32,i=i/qN.VAL32,i>qN.VAL32)throw new RangeError(`${t} is outside Uint64 range`);i=i>>>0}for(let o=0;o<8;o++)this.buffer[o]=n&255,n=o===3?i:n>>>8}toNumber(t){let r=this.buffer,n=0,i=0,o=1;for(;i<8;){let a=r[i];n+=a*o,o*=256,i++}return!t&&n>=qN.MAX_SAFE_INTEGER?(Hfe("Coercing out of range value %d to Infinity.",n),1/0):n}valueOf(){return this.toNumber(!1)}toArrayBuffer(){return this.buffer.buffer}toDataView(){return new DataView(this.buffer.buffer)}toHexString(){let t="";for(let r=7;r>=0;r--){let n=this.buffer[r].toString(16);n.length===1&&(n="0"+n),t+=n}return t}toString(t){return this.toNumber(!0).toString(t)}toUint8Array(){return this.buffer}};FN.Uint64=oB});var Wfe=h(BN=>{"use strict";Object.defineProperty(BN,"__esModule",{value:!0});BN.Int64=void 0;var mgt=(at(),ct(ot)),_gt=mgt.__importDefault(mt()),kN=Xi(),ggt=Ai(),ygt=aB(),Kfe=_gt.default("capnp:int64");Kfe("load");var uB=class e extends ygt.Uint64{static{s(this,"Int64")}static fromArrayBuffer(t,r=0,n=!1){return n?new this(new Uint8Array(t,r,8)):new this(new Uint8Array(t.slice(r,r+8)))}static fromDataView(t,r=0,n=!1){return n?new this(new Uint8Array(t.buffer,t.byteOffset+r,8)):new this(new Uint8Array(t.buffer.slice(t.byteOffset+r,t.byteLength+r+8)))}static fromNumber(t){let r=new this(new Uint8Array(8));return r.setValue(t),r}static fromHexString(t){if(t.substr(0,2)==="0x"&&(t=t.substr(2)),t.length<1)return e.fromNumber(0);let r=t[0]==="-";if(r&&(t=t.substr(1)),t=ggt.pad(t,16),t.length!==16)throw new RangeError("Source string must contain at most 16 hexadecimal digits.");let n=t.toLowerCase().replace(/[^\da-f]/g,""),i=new Uint8Array(new ArrayBuffer(8));for(let a=0;a<8;a++)i[7-a]=parseInt(n.substr(a*2,2),16);let o=new e(i);return r&&o.negate(),o}static fromUint8Array(t,r=0,n=!1){return n?new this(t.subarray(r,r+8)):new this(new Uint8Array(t.buffer.slice(t.byteOffset+r,t.byteOffset+r+8)))}equals(t){return super.equals(t)}inspect(){return`[Int64 ${this.toString(10)} 0x${this.toHexString()}]`}negate(){for(let t=this.buffer,r=1,n=0;n<8;n++){let i=(t[n]^255)+r;t[n]=i&255,r=i>>8}}setValue(t,r){let n=!1,i=t,o=r;if(o===void 0){if(o=i,n=o<0,o=Math.abs(o),i=o%kN.VAL32,o=o/kN.VAL32,o>kN.VAL32)throw new RangeError(`${t} is outside Int64 range`);o=o>>>0}for(let a=0;a<8;a++)this.buffer[a]=i&255,i=a===3?o:i>>>8;n&&this.negate()}toHexString(){let t=this.buffer,r=t[7]&128;r&&this.negate();let n="";for(let i=7;i>=0;i--){let o=t[i].toString(16);o.length===1&&(o="0"+o),n+=o}return r&&(this.negate(),n="-"+n),n}toNumber(t){let r=this.buffer,n=r[7]&128,i=0,o=1,a=0,u=1;for(;a<8;){let c=r[a];n&&(c=(c^255)+o,o=c>>8,c=c&255),i+=c*u,u*=256,a++}return!t&&i>=kN.MAX_SAFE_INTEGER?(Kfe("Coercing out of range value %d to Infinity.",i),n?-1/0:1/0):n?-i:i}};BN.Int64=uB});var GN=h(M_=>{"use strict";Object.defineProperty(M_,"__esModule",{value:!0});M_.Uint64=M_.Int64=void 0;var Egt=Wfe();Object.defineProperty(M_,"Int64",{enumerable:!0,get:function(){return Egt.Int64}});var bgt=aB();Object.defineProperty(M_,"Uint64",{enumerable:!0,get:function(){return bgt.Uint64}})});var KN=h(HN=>{"use strict";Object.defineProperty(HN,"__esModule",{value:!0});HN.Text=void 0;var Sgt=(at(),ct(ot)),vgt=Sgt.__importDefault(mt()),Yfe=Ai(),Jfe=cr(),Xfe=Lr(),Jd=Jt(),Ogt=Hd(),VN=vgt.default("capnp:text");VN("load");var zN=class extends Xfe.List{static{s(this,"Text")}static fromPointer(t){return Jd.validate(Ogt.PointerType.LIST,t,Jfe.ListElementSize.BYTE),Pgt(t)}get(t=0){if(t!==0&&VN("Called get() on %s with a strange index (%d).",this,t),Jd.isNull(this))return"";let r=Jd.getContent(this);return Yfe.decodeUtf8(new Uint8Array(r.segment.buffer,r.byteOffset+t,this.getLength()-t))}getLength(){return super.getLength()-1}set(t,r){t!==0&&VN("Called set() on %s with a strange index (%d).",this,t);let n=Yfe.encodeUtf8(r),i=n.byteLength+t,o,a;if(!Jd.isNull(this)){o=Jd.getContent(this);let c=this.getLength();c>=t?c=t:VN("%d byte gap exists between original text and new text in %s.",t-c,this),a=new Uint8Array(o.segment.buffer.slice(o.byteOffset,o.byteOffset+Math.min(c,t))),Jd.erase(this)}Xfe.initList(Jfe.ListElementSize.BYTE,i+1,this),o=Jd.getContent(this);let u=new Uint8Array(o.segment.buffer,o.byteOffset,i);a&&u.set(a),u.set(n,t)}toString(){return`Text_${super.toString()}`}};HN.Text=zN;function Pgt(e){return new zN(e.segment,e.byteOffset,e._capnp.depthLimit)}s(Pgt,"textFromPointerUnchecked")});var ZN=h(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.checkPointerBounds=F.checkDataBounds=F.testWhich=F.setVoid=F.setUint8=F.setUint64=F.setUint32=F.setUint16=F.setText=F.setPointer=F.setInt8=F.setInt64=F.setInt32=F.setInt16=F.setFloat64=F.setFloat32=F.setBit=F.initList=F.initData=F.getVoid=F.getUint8=F.getUint64=F.getUint32=F.getUint16=F.getText=F.getStruct=F.getSize=F.getPointerSection=F.getPointerAs=F.getPointer=F.getList=F.getInt8=F.getInt64=F.getInt32=F.getInt16=F.getFloat64=F.getFloat32=F.getDataSection=F.getData=F.getBit=F.getAs=F.disown=F.adopt=F.resize=F.initStructAt=F.initStruct=F.Struct=void 0;var wgt=(at(),ct(ot)),Igt=wgt.__importDefault(mt()),sr=Xi(),Zfe=GN(),Xd=Ai(),WN=cr(),To=zd(),Qfe=ON(),YN=Lr(),me=Jt(),cB=Hd(),ede=KN(),sl=Xn(),lB=Igt.default("capnp:struct");lB("load");var Dt=new DataView(new ArrayBuffer(8)),ke=class extends me.Pointer{static{s(this,"Struct")}constructor(t,r,n=sr.MAX_DEPTH,i){super(t,r,n),this._capnp.compositeIndex=i,this._capnp.compositeList=i!==void 0}static toString(){return this._capnp.displayName}toString(){return`Struct_${super.toString()}${this._capnp.compositeIndex===void 0?"":`,ci:${this._capnp.compositeIndex}`}`}};F.Struct=ke;ke._capnp={displayName:"Struct"};ke.getAs=nde;ke.getBit=ide;ke.getData=sde;ke.getFloat32=ode;ke.getFloat64=ade;ke.getUint8=yde;ke.getUint16=mde;ke.getUint32=_de;ke.getUint64=gde;ke.getInt8=fde;ke.getInt16=ude;ke.getInt32=cde;ke.getInt64=lde;ke.getList=dde;ke.getPointer=cb;ke.getPointerAs=XN;ke.getStruct=pde;ke.getText=hde;ke.initData=Ede;ke.initList=bde;ke.initStruct=JN;ke.initStructAt=tde;ke.setBit=Sde;ke.setFloat32=vde;ke.setFloat64=Ode;ke.setUint8=$de;ke.setUint16=Ade;ke.setUint32=Rde;ke.setUint64=Cde;ke.setInt8=Tde;ke.setInt16=Pde;ke.setInt32=wde;ke.setInt64=Ide;ke.setText=Nde;ke.testWhich=Dde;function JN(e,t){if(t._capnp.compositeIndex!==void 0)throw new Error(Xd.format(sl.PTR_INIT_COMPOSITE_STRUCT,t));me.erase(t);let r=t.segment.allocate(To.getByteLength(e)),n=me.initPointer(r.segment,r.byteOffset,t);me.setStructPointer(n.offsetWords,e,n.pointer)}s(JN,"initStruct");F.initStruct=JN;function tde(e,t,r){let n=XN(e,t,r);return JN(t._capnp.size,n),n}s(tde,"initStructAt");F.initStructAt=tde;function rde(e,t){let r=lb(t),n=me.getContent(t),i=t.segment.allocate(To.getByteLength(e));i.segment.copyWords(i.byteOffset,n.segment,n.byteOffset,Math.min(To.getDataWordLength(r),To.getDataWordLength(e)));let o=me.initPointer(i.segment,i.byteOffset,t);me.setStructPointer(o.offsetWords,e,o.pointer);for(let a=0;a<Math.min(r.pointerLength,e.pointerLength);a++){let u=new me.Pointer(n.segment,n.byteOffset+r.dataByteLength+a*8);if(me.isNull(u))continue;let c=me.followFars(u),l=me.getContent(u),f=new me.Pointer(i.segment,i.byteOffset+e.dataByteLength+a*8);me.getTargetPointerType(u)===cB.PointerType.LIST&&me.getTargetListElementSize(u)===WN.ListElementSize.COMPOSITE&&(l.byteOffset-=8);let d=me.initPointer(l.segment,l.byteOffset,f),_=c.segment.getUint8(c.byteOffset)&3,m=c.segment.getUint32(c.byteOffset+4);d.pointer.segment.setUint32(d.pointer.byteOffset,_|d.offsetWords<<2),d.pointer.segment.setUint32(d.pointer.byteOffset+4,m)}n.segment.fillZeroWords(n.byteOffset,To.getWordLength(r))}s(rde,"resize");F.resize=rde;function Tgt(e,t){if(t._capnp.compositeIndex!==void 0)throw new Error(Xd.format(sl.PTR_ADOPT_COMPOSITE_STRUCT,t));me.Pointer.adopt(e,t)}s(Tgt,"adopt");F.adopt=Tgt;function Ngt(e){if(e._capnp.compositeIndex!==void 0)throw new Error(Xd.format(sl.PTR_DISOWN_COMPOSITE_STRUCT,e));return me.Pointer.disown(e)}s(Ngt,"disown");F.disown=Ngt;function nde(e,t){return new e(t.segment,t.byteOffset,t._capnp.depthLimit,t._capnp.compositeIndex)}s(nde,"getAs");F.getAs=nde;function ide(e,t,r){let n=Math.floor(e/8),i=1<<e%8;ar(n,1,t);let o=or(t),a=o.segment.getUint8(o.byteOffset+n);if(r===void 0)return(a&i)!==0;let u=r.getUint8(0);return((a^u)&i)!==0}s(ide,"getBit");F.getBit=ide;function sde(e,t,r){Qd(e,t);let n=Zd(t);n.byteOffset+=e*8;let i=new Qfe.Data(n.segment,n.byteOffset,t._capnp.depthLimit-1);return me.isNull(i)&&(r?me.Pointer.copyFrom(r,i):YN.List.initList(WN.ListElementSize.BYTE,0,i)),i}s(sde,"getData");F.getData=sde;function or(e){return me.getContent(e)}s(or,"getDataSection");F.getDataSection=or;function ode(e,t,r){ar(e,4,t);let n=or(t);if(r===void 0)return n.segment.getFloat32(n.byteOffset+e);let i=n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.getFloat32(0,sr.NATIVE_LITTLE_ENDIAN)}s(ode,"getFloat32");F.getFloat32=ode;function ade(e,t,r){ar(e,8,t);let n=or(t);if(r!==void 0){let i=n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0),o=n.segment.getUint32(n.byteOffset+e+4)^r.getUint32(4,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.setUint32(4,o,sr.NATIVE_LITTLE_ENDIAN),Dt.getFloat64(0,sr.NATIVE_LITTLE_ENDIAN)}return n.segment.getFloat64(n.byteOffset+e)}s(ade,"getFloat64");F.getFloat64=ade;function ude(e,t,r){ar(e,2,t);let n=or(t);if(r===void 0)return n.segment.getInt16(n.byteOffset+e);let i=n.segment.getUint16(n.byteOffset+e)^r.getUint16(0,!0);return Dt.setUint16(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.getInt16(0,sr.NATIVE_LITTLE_ENDIAN)}s(ude,"getInt16");F.getInt16=ude;function cde(e,t,r){ar(e,4,t);let n=or(t);if(r===void 0)return n.segment.getInt32(n.byteOffset+e);let i=n.segment.getUint32(n.byteOffset+e)^r.getUint16(0,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.getInt32(0,sr.NATIVE_LITTLE_ENDIAN)}s(cde,"getInt32");F.getInt32=cde;function lde(e,t,r){ar(e,8,t);let n=or(t);if(r===void 0)return n.segment.getInt64(n.byteOffset+e);let i=n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0),o=n.segment.getUint32(n.byteOffset+e+4)^r.getUint32(4,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.setUint32(4,o,sr.NATIVE_LITTLE_ENDIAN),new Zfe.Int64(new Uint8Array(Dt.buffer.slice(0)))}s(lde,"getInt64");F.getInt64=lde;function fde(e,t,r){ar(e,1,t);let n=or(t);if(r===void 0)return n.segment.getInt8(n.byteOffset+e);let i=n.segment.getUint8(n.byteOffset+e)^r.getUint8(0);return Dt.setUint8(0,i),Dt.getInt8(0)}s(fde,"getInt8");F.getInt8=fde;function dde(e,t,r,n){Qd(e,r);let i=Zd(r);i.byteOffset+=e*8;let o=new t(i.segment,i.byteOffset,r._capnp.depthLimit-1);if(me.isNull(o))n?me.Pointer.copyFrom(n,o):YN.List.initList(t._capnp.size,0,o,t._capnp.compositeSize);else if(t._capnp.compositeSize!==void 0){let a=me.getTargetCompositeListSize(o),u=t._capnp.compositeSize;if(u.dataByteLength>a.dataByteLength||u.pointerLength>a.pointerLength){let c=me.getContent(o),l=me.getTargetListLength(o);lB("resizing composite list %s due to protocol upgrade, new size: %d",o,To.getByteLength(u)*l);let f=o.segment.allocate(To.getByteLength(u)*l+8),d=me.initPointer(f.segment,f.byteOffset,o);me.setListPointer(d.offsetWords,t._capnp.size,l,d.pointer,u),me.setStructPointer(l,u,f),f.byteOffset+=8;for(let _=0;_<l;_++){let m=c.byteOffset+_*To.getByteLength(a),g=f.byteOffset+_*To.getByteLength(u);f.segment.copyWords(g,c.segment,m,To.getWordLength(a));for(let y=0;y<a.pointerLength;y++){let b=new me.Pointer(c.segment,m+a.dataByteLength+y*8),E=new me.Pointer(f.segment,g+u.dataByteLength+y*8),v=me.followFars(b),O=me.getContent(b);me.getTargetPointerType(b)===cB.PointerType.LIST&&me.getTargetListElementSize(b)===WN.ListElementSize.COMPOSITE&&(O.byteOffset-=8);let P=me.initPointer(O.segment,O.byteOffset,E),I=v.segment.getUint8(v.byteOffset)&3,j=v.segment.getUint32(v.byteOffset+4);P.pointer.segment.setUint32(P.pointer.byteOffset,I|P.offsetWords<<2),P.pointer.segment.setUint32(P.pointer.byteOffset+4,j)}}c.segment.fillZeroWords(c.byteOffset,To.getWordLength(a)*l)}}return o}s(dde,"getList");F.getList=dde;function cb(e,t){Qd(e,t);let r=Zd(t);return r.byteOffset+=e*8,new me.Pointer(r.segment,r.byteOffset,t._capnp.depthLimit-1)}s(cb,"getPointer");F.getPointer=cb;function XN(e,t,r){Qd(e,r);let n=Zd(r);return n.byteOffset+=e*8,new t(n.segment,n.byteOffset,r._capnp.depthLimit-1)}s(XN,"getPointerAs");F.getPointerAs=XN;function Zd(e){let t=me.getContent(e);return t.byteOffset+=Xd.padToWord(lb(e).dataByteLength),t}s(Zd,"getPointerSection");F.getPointerSection=Zd;function lb(e){if(e._capnp.compositeIndex!==void 0){let t=me.getContent(e,!0);return t.byteOffset-=8,me.getStructSize(t)}return me.getTargetStructSize(e)}s(lb,"getSize");F.getSize=lb;function pde(e,t,r,n){let i=XN(e,t,r);if(me.isNull(i))n?me.Pointer.copyFrom(n,i):JN(t._capnp.size,i);else{me.validate(cB.PointerType.STRUCT,i);let o=me.getTargetStructSize(i);(o.dataByteLength<t._capnp.size.dataByteLength||o.pointerLength<t._capnp.size.pointerLength)&&(lB("need to resize child struct %s",i),rde(t._capnp.size,i))}return i}s(pde,"getStruct");F.getStruct=pde;function hde(e,t,r){let n=ede.Text.fromPointer(cb(e,t));return me.isNull(n)&&r&&n.set(0,r),n.get(0)}s(hde,"getText");F.getText=hde;function mde(e,t,r){ar(e,2,t);let n=or(t);return r===void 0?n.segment.getUint16(n.byteOffset+e):n.segment.getUint16(n.byteOffset+e)^r.getUint16(0,!0)}s(mde,"getUint16");F.getUint16=mde;function _de(e,t,r){ar(e,4,t);let n=or(t);return r===void 0?n.segment.getUint32(n.byteOffset+e):n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0)}s(_de,"getUint32");F.getUint32=_de;function gde(e,t,r){ar(e,8,t);let n=or(t);if(r===void 0)return n.segment.getUint64(n.byteOffset+e);let i=n.segment.getUint32(n.byteOffset+e)^r.getUint32(0,!0),o=n.segment.getUint32(n.byteOffset+e+4)^r.getUint32(4,!0);return Dt.setUint32(0,i,sr.NATIVE_LITTLE_ENDIAN),Dt.setUint32(4,o,sr.NATIVE_LITTLE_ENDIAN),new Zfe.Uint64(new Uint8Array(Dt.buffer.slice(0)))}s(gde,"getUint64");F.getUint64=gde;function yde(e,t,r){ar(e,1,t);let n=or(t);return r===void 0?n.segment.getUint8(n.byteOffset+e):n.segment.getUint8(n.byteOffset+e)^r.getUint8(0)}s(yde,"getUint8");F.getUint8=yde;function Agt(){throw new Error(sl.INVARIANT_UNREACHABLE_CODE)}s(Agt,"getVoid");F.getVoid=Agt;function Ede(e,t,r){Qd(e,r);let n=Zd(r);n.byteOffset+=e*8;let i=new Qfe.Data(n.segment,n.byteOffset,r._capnp.depthLimit-1);return me.erase(i),YN.List.initList(WN.ListElementSize.BYTE,t,i),i}s(Ede,"initData");F.initData=Ede;function bde(e,t,r,n){Qd(e,n);let i=Zd(n);i.byteOffset+=e*8;let o=new t(i.segment,i.byteOffset,n._capnp.depthLimit-1);return me.erase(o),YN.List.initList(t._capnp.size,r,o,t._capnp.compositeSize),o}s(bde,"initList");F.initList=bde;function Sde(e,t,r,n){let i=Math.floor(e/8),o=1<<e%8;ar(i,1,r);let a=or(r),u=a.segment.getUint8(a.byteOffset+i);n!==void 0&&(t=n.getUint8(0)&o?!t:t),a.segment.setUint8(a.byteOffset+i,t?u|o:u&~o)}s(Sde,"setBit");F.setBit=Sde;function vde(e,t,r,n){ar(e,4,r);let i=or(r);if(n!==void 0){Dt.setFloat32(0,t,sr.NATIVE_LITTLE_ENDIAN);let o=Dt.getUint32(0,sr.NATIVE_LITTLE_ENDIAN)^n.getUint32(0,!0);i.segment.setUint32(i.byteOffset+e,o);return}i.segment.setFloat32(i.byteOffset+e,t)}s(vde,"setFloat32");F.setFloat32=vde;function Ode(e,t,r,n){ar(e,8,r);let i=or(r);if(n!==void 0){Dt.setFloat64(0,t,sr.NATIVE_LITTLE_ENDIAN);let o=Dt.getUint32(0,sr.NATIVE_LITTLE_ENDIAN)^n.getUint32(0,!0),a=Dt.getUint32(4,sr.NATIVE_LITTLE_ENDIAN)^n.getUint32(4,!0);i.segment.setUint32(i.byteOffset+e,o),i.segment.setUint32(i.byteOffset+e+4,a);return}i.segment.setFloat64(i.byteOffset+e,t)}s(Ode,"setFloat64");F.setFloat64=Ode;function Pde(e,t,r,n){ar(e,2,r);let i=or(r);if(n!==void 0){Dt.setInt16(0,t,sr.NATIVE_LITTLE_ENDIAN);let o=Dt.getUint16(0,sr.NATIVE_LITTLE_ENDIAN)^n.getUint16(0,!0);i.segment.setUint16(i.byteOffset+e,o);return}i.segment.setInt16(i.byteOffset+e,t)}s(Pde,"setInt16");F.setInt16=Pde;function wde(e,t,r,n){ar(e,4,r);let i=or(r);if(n!==void 0){Dt.setInt32(0,t,sr.NATIVE_LITTLE_ENDIAN);let o=Dt.getUint32(0,sr.NATIVE_LITTLE_ENDIAN)^n.getUint32(0,!0);i.segment.setUint32(i.byteOffset+e,o);return}i.segment.setInt32(i.byteOffset+e,t)}s(wde,"setInt32");F.setInt32=wde;function Ide(e,t,r,n){ar(e,8,r);let i=or(r);if(n!==void 0){for(let o=0;o<8;o++)i.segment.setUint8(i.byteOffset+e+o,t.buffer[o]^n.getUint8(o));return}i.segment.setInt64(i.byteOffset+e,t)}s(Ide,"setInt64");F.setInt64=Ide;function Tde(e,t,r,n){ar(e,1,r);let i=or(r);if(n!==void 0){Dt.setInt8(0,t);let o=Dt.getUint8(0)^n.getUint8(0);i.segment.setUint8(i.byteOffset+e,o);return}i.segment.setInt8(i.byteOffset+e,t)}s(Tde,"setInt8");F.setInt8=Tde;function Rgt(e,t,r){me.copyFrom(t,cb(e,r))}s(Rgt,"setPointer");F.setPointer=Rgt;function Nde(e,t,r){ede.Text.fromPointer(cb(e,r)).set(0,t)}s(Nde,"setText");F.setText=Nde;function Ade(e,t,r,n){ar(e,2,r);let i=or(r);n!==void 0&&(t^=n.getUint16(0,!0)),i.segment.setUint16(i.byteOffset+e,t)}s(Ade,"setUint16");F.setUint16=Ade;function Rde(e,t,r,n){ar(e,4,r);let i=or(r);n!==void 0&&(t^=n.getUint32(0,!0)),i.segment.setUint32(i.byteOffset+e,t)}s(Rde,"setUint32");F.setUint32=Rde;function Cde(e,t,r,n){ar(e,8,r);let i=or(r);if(n!==void 0){for(let o=0;o<8;o++)i.segment.setUint8(i.byteOffset+e+o,t.buffer[o]^n.getUint8(o));return}i.segment.setUint64(i.byteOffset+e,t)}s(Cde,"setUint64");F.setUint64=Cde;function $de(e,t,r,n){ar(e,1,r);let i=or(r);n!==void 0&&(t^=n.getUint8(0)),i.segment.setUint8(i.byteOffset+e,t)}s($de,"setUint8");F.setUint8=$de;function Cgt(){throw new Error(sl.INVARIANT_UNREACHABLE_CODE)}s(Cgt,"setVoid");F.setVoid=Cgt;function Dde(e,t,r,n){if(t!==r)throw new Error(Xd.format(sl.PTR_INVALID_UNION_ACCESS,n,e,t,r))}s(Dde,"testWhich");F.testWhich=Dde;function ar(e,t,r){let n=lb(r).dataByteLength;if(e<0||t<0||e+t>n)throw new Error(Xd.format(sl.PTR_STRUCT_DATA_OUT_OF_BOUNDS,r,t,e,n))}s(ar,"checkDataBounds");F.checkDataBounds=ar;function Qd(e,t){let r=lb(t).pointerLength;if(e<0||e>=r)throw new Error(Xd.format(sl.PTR_STRUCT_POINTER_OUT_OF_BOUNDS,t,e,r))}s(Qd,"checkPointerBounds");F.checkPointerBounds=Qd});var Mde=h(eA=>{"use strict";Object.defineProperty(eA,"__esModule",{value:!0});eA.TextList=void 0;var $gt=(at(),ct(ot)),Dgt=$gt.__importDefault(mt()),Lgt=cr(),jgt=Lr(),Lde=KN(),jde=Jt(),Mgt=Dgt.default("capnp:list:composite");Mgt("load");var QN=class extends jgt.List{static{s(this,"TextList")}get(t){let r=jde.getContent(this);return r.byteOffset+=t*8,Lde.Text.fromPointer(r).get(0)}set(t,r){let n=jde.getContent(this);n.byteOffset+=t*8,Lde.Text.fromPointer(n).set(0,r)}toString(){return`Text_${super.toString()}`}};eA.TextList=QN;QN._capnp={displayName:"List<Text>",size:Lgt.ListElementSize.POINTER}});var xde=h(rA=>{"use strict";Object.defineProperty(rA,"__esModule",{value:!0});rA.Uint8List=void 0;var Ugt=(at(),ct(ot)),xgt=Ugt.__importDefault(mt()),qgt=cr(),Fgt=Lr(),Ude=Jt(),kgt=xgt.default("capnp:list:composite");kgt("load");var tA=class extends Fgt.List{static{s(this,"Uint8List")}get(t){let r=Ude.getContent(this);return r.segment.getUint8(r.byteOffset+t)}set(t,r){let n=Ude.getContent(this);n.segment.setUint8(n.byteOffset+t,r)}toString(){return`Uint8_${super.toString()}`}};rA.Uint8List=tA;tA._capnp={displayName:"List<Uint8>",size:qgt.ListElementSize.BYTE}});var Fde=h(iA=>{"use strict";Object.defineProperty(iA,"__esModule",{value:!0});iA.Uint16List=void 0;var Bgt=(at(),ct(ot)),Ggt=Bgt.__importDefault(mt()),Vgt=cr(),zgt=Lr(),qde=Jt(),Hgt=Ggt.default("capnp:list:composite");Hgt("load");var nA=class extends zgt.List{static{s(this,"Uint16List")}get(t){let r=qde.getContent(this);return r.segment.getUint16(r.byteOffset+t*2)}set(t,r){let n=qde.getContent(this);n.segment.setUint16(n.byteOffset+t*2,r)}toString(){return`Uint16_${super.toString()}`}};iA.Uint16List=nA;nA._capnp={displayName:"List<Uint16>",size:Vgt.ListElementSize.BYTE_2}});var Bde=h(oA=>{"use strict";Object.defineProperty(oA,"__esModule",{value:!0});oA.Uint32List=void 0;var Kgt=(at(),ct(ot)),Wgt=Kgt.__importDefault(mt()),Ygt=cr(),Jgt=Lr(),kde=Jt(),Xgt=Wgt.default("capnp:list:composite");Xgt("load");var sA=class extends Jgt.List{static{s(this,"Uint32List")}get(t){let r=kde.getContent(this);return r.segment.getUint32(r.byteOffset+t*4)}set(t,r){let n=kde.getContent(this);n.segment.setUint32(n.byteOffset+t*4,r)}toString(){return`Uint32_${super.toString()}`}};oA.Uint32List=sA;sA._capnp={displayName:"List<Uint32>",size:Ygt.ListElementSize.BYTE_4}});var Vde=h(uA=>{"use strict";Object.defineProperty(uA,"__esModule",{value:!0});uA.Uint64List=void 0;var Zgt=(at(),ct(ot)),Qgt=Zgt.__importDefault(mt()),eyt=cr(),tyt=Lr(),Gde=Jt(),ryt=Qgt.default("capnp:list:composite");ryt("load");var aA=class extends tyt.List{static{s(this,"Uint64List")}get(t){let r=Gde.getContent(this);return r.segment.getUint64(r.byteOffset+t*8)}set(t,r){let n=Gde.getContent(this);n.segment.setUint64(n.byteOffset+t*8,r)}toString(){return`Uint64_${super.toString()}`}};uA.Uint64List=aA;aA._capnp={displayName:"List<Uint64>",size:eyt.ListElementSize.BYTE_8}});var fB=h(U_=>{"use strict";Object.defineProperty(U_,"__esModule",{value:!0});U_.VOID=U_.Void=void 0;var nyt=zd(),iyt=ZN(),cA=class extends iyt.Struct{static{s(this,"Void")}};U_.Void=cA;cA._capnp={displayName:"Void",id:"0",size:new nyt.ObjectSize(0,0)};U_.VOID=void 0});var zde=h(lA=>{"use strict";Object.defineProperty(lA,"__esModule",{value:!0});lA.VoidList=void 0;var syt=j_(),oyt=fB();lA.VoidList=syt.PointerList(oyt.Void)});var fA=h(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.VoidList=le.VOID=le.Void=le.Uint64List=le.Uint32List=le.Uint16List=le.Uint8List=le.TextList=le.Text=le.Struct=le.Pointer=le.PointerType=le.PointerList=le.Orphan=le.List=le.InterfaceList=le.Interface=le.Int64List=le.Int32List=le.Int16List=le.Int8List=le.Float64List=le.Float32List=le.DataList=le.Data=le.CompositeList=le.BoolList=le.AnyPointerList=void 0;var ayt=Nfe();Object.defineProperty(le,"AnyPointerList",{enumerable:!0,get:function(){return ayt.AnyPointerList}});var uyt=Rfe();Object.defineProperty(le,"BoolList",{enumerable:!0,get:function(){return uyt.BoolList}});var cyt=Cfe();Object.defineProperty(le,"CompositeList",{enumerable:!0,get:function(){return cyt.CompositeList}});var lyt=ON();Object.defineProperty(le,"Data",{enumerable:!0,get:function(){return lyt.Data}});var fyt=$fe();Object.defineProperty(le,"DataList",{enumerable:!0,get:function(){return fyt.DataList}});var dyt=Lfe();Object.defineProperty(le,"Float32List",{enumerable:!0,get:function(){return dyt.Float32List}});var pyt=Mfe();Object.defineProperty(le,"Float64List",{enumerable:!0,get:function(){return pyt.Float64List}});var hyt=xfe();Object.defineProperty(le,"Int8List",{enumerable:!0,get:function(){return hyt.Int8List}});var myt=Ffe();Object.defineProperty(le,"Int16List",{enumerable:!0,get:function(){return myt.Int16List}});var _yt=Bfe();Object.defineProperty(le,"Int32List",{enumerable:!0,get:function(){return _yt.Int32List}});var gyt=Vfe();Object.defineProperty(le,"Int64List",{enumerable:!0,get:function(){return gyt.Int64List}});var yyt=sB();Object.defineProperty(le,"Interface",{enumerable:!0,get:function(){return yyt.Interface}});var Eyt=zfe();Object.defineProperty(le,"InterfaceList",{enumerable:!0,get:function(){return Eyt.InterfaceList}});var byt=Lr();Object.defineProperty(le,"List",{enumerable:!0,get:function(){return byt.List}});var Syt=Gk();Object.defineProperty(le,"Orphan",{enumerable:!0,get:function(){return Syt.Orphan}});var vyt=j_();Object.defineProperty(le,"PointerList",{enumerable:!0,get:function(){return vyt.PointerList}});var Oyt=Hd();Object.defineProperty(le,"PointerType",{enumerable:!0,get:function(){return Oyt.PointerType}});var Pyt=Jt();Object.defineProperty(le,"Pointer",{enumerable:!0,get:function(){return Pyt.Pointer}});var wyt=ZN();Object.defineProperty(le,"Struct",{enumerable:!0,get:function(){return wyt.Struct}});var Iyt=KN();Object.defineProperty(le,"Text",{enumerable:!0,get:function(){return Iyt.Text}});var Tyt=Mde();Object.defineProperty(le,"TextList",{enumerable:!0,get:function(){return Tyt.TextList}});var Nyt=xde();Object.defineProperty(le,"Uint8List",{enumerable:!0,get:function(){return Nyt.Uint8List}});var Ayt=Fde();Object.defineProperty(le,"Uint16List",{enumerable:!0,get:function(){return Ayt.Uint16List}});var Ryt=Bde();Object.defineProperty(le,"Uint32List",{enumerable:!0,get:function(){return Ryt.Uint32List}});var Cyt=Vde();Object.defineProperty(le,"Uint64List",{enumerable:!0,get:function(){return Cyt.Uint64List}});var Hde=fB();Object.defineProperty(le,"Void",{enumerable:!0,get:function(){return Hde.Void}});Object.defineProperty(le,"VOID",{enumerable:!0,get:function(){return Hde.VOID}});var $yt=zde();Object.defineProperty(le,"VoidList",{enumerable:!0,get:function(){return $yt.VoidList}})});var Yde=h(dA=>{"use strict";var Wde;Object.defineProperty(dA,"__esModule",{value:!0});dA.Segment=void 0;var Dyt=(at(),ct(ot)),Lyt=Dyt.__importDefault(mt()),fb=Xi(),x_=Xn(),Kde=GN(),ep=Ai(),jyt=fA(),db=Lyt.default("capnp:segment");db("load");var dB=class{static{s(this,"Segment")}constructor(t,r,n,i=0){this[Wde]="Segment",this.id=t,this.message=r,this.buffer=n,this._dv=new DataView(n),this.byteOffset=0,this.byteLength=i}allocate(t){db("allocate(%d)",t);let r=this;if(t=ep.padToWord(t),t>fb.MAX_SEGMENT_LENGTH-8)throw new Error(ep.format(x_.SEG_SIZE_OVERFLOW,t));r.hasCapacity(t)||(r=r.message.allocateSegment(t));let n=r.byteLength;return r.byteLength=r.byteLength+t,db("Allocated %x bytes in %s (requested segment: %s).",t,this,r),new jyt.Pointer(r,n)}copyWord(t,r,n){let i=r._dv.getFloat64(n,fb.NATIVE_LITTLE_ENDIAN);this._dv.setFloat64(t,i,fb.NATIVE_LITTLE_ENDIAN)}copyWords(t,r,n,i){let o=new Float64Array(this.buffer,t,i),a=new Float64Array(r.buffer,n,i);o.set(a)}fillZeroWords(t,r){new Float64Array(this.buffer,t,r).fill(0)}getBigInt64(t,r){throw new Error(ep.format(x_.NOT_IMPLEMENTED,t,r))}getBigUint64(t,r){throw new Error(ep.format(x_.NOT_IMPLEMENTED,t,r))}getCapacity(){return this.buffer.byteLength}getFloat32(t){return this._dv.getFloat32(t,!0)}getFloat64(t){return this._dv.getFloat64(t,!0)}getInt16(t){return this._dv.getInt16(t,!0)}getInt32(t){return this._dv.getInt32(t,!0)}getInt64(t){return new Kde.Int64(new Uint8Array(this.buffer.slice(t,t+8)))}getInt8(t){return this._dv.getInt8(t)}getUint16(t){return this._dv.getUint16(t,!0)}getUint32(t){return this._dv.getUint32(t,!0)}getUint64(t){return new Kde.Uint64(new Uint8Array(this.buffer.slice(t,t+8)))}getUint8(t){return this._dv.getUint8(t)}hasCapacity(t){return db("hasCapacity(%d)",t),this.buffer.byteLength-this.byteLength>=t}isWordZero(t){return this._dv.getFloat64(t,fb.NATIVE_LITTLE_ENDIAN)===0}replaceBuffer(t){if(db("replaceBuffer(%p)",t),this.buffer!==t){if(t.byteLength<this.byteLength)throw new Error(x_.SEG_REPLACEMENT_BUFFER_TOO_SMALL);this._dv=new DataView(t),this.buffer=t}}setBigInt64(t,r,n){throw new Error(ep.format(x_.NOT_IMPLEMENTED,t,r,n))}setBigUint64(t,r,n){throw new Error(ep.format(x_.NOT_IMPLEMENTED,t,r,n))}setFloat32(t,r){this._dv.setFloat32(t,r,!0)}setFloat64(t,r){this._dv.setFloat64(t,r,!0)}setInt16(t,r){this._dv.setInt16(t,r,!0)}setInt32(t,r){this._dv.setInt32(t,r,!0)}setInt8(t,r){this._dv.setInt8(t,r)}setInt64(t,r){this._dv.setUint8(t,r.buffer[0]),this._dv.setUint8(t+1,r.buffer[1]),this._dv.setUint8(t+2,r.buffer[2]),this._dv.setUint8(t+3,r.buffer[3]),this._dv.setUint8(t+4,r.buffer[4]),this._dv.setUint8(t+5,r.buffer[5]),this._dv.setUint8(t+6,r.buffer[6]),this._dv.setUint8(t+7,r.buffer[7])}setUint16(t,r){this._dv.setUint16(t,r,!0)}setUint32(t,r){this._dv.setUint32(t,r,!0)}setUint64(t,r){this._dv.setUint8(t+0,r.buffer[0]),this._dv.setUint8(t+1,r.buffer[1]),this._dv.setUint8(t+2,r.buffer[2]),this._dv.setUint8(t+3,r.buffer[3]),this._dv.setUint8(t+4,r.buffer[4]),this._dv.setUint8(t+5,r.buffer[5]),this._dv.setUint8(t+6,r.buffer[6]),this._dv.setUint8(t+7,r.buffer[7])}setUint8(t,r){this._dv.setUint8(t,r)}setWordZero(t){this._dv.setFloat64(t,0,fb.NATIVE_LITTLE_ENDIAN)}toString(){return ep.format("Segment_id:%d,off:%a,len:%a,cap:%a",this.id,this.byteLength,this.byteOffset,this.buffer.byteLength)}};dA.Segment=dB;Wde=Symbol.toStringTag});var ipe=h(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.getStreamFrame=Pt.toPackedArrayBuffer=Pt.toArrayBuffer=Pt.setRoot=Pt.readRawPointer=Pt.initRoot=Pt.getSegment=Pt.getRoot=Pt.dump=Pt.allocateSegment=Pt.preallocateSegments=Pt.getFramedSegments=Pt.initMessage=Pt.Message=void 0;var Myt=(at(),ct(ot)),Uyt=Myt.__importDefault(mt()),pb=Xi(),q_=Xn(),F_=Ai(),ol=Zle(),pB=ife(),pA=fA(),hB=Yde(),Jde=Jt(),Xde=ZN(),Ca=Uyt.default("capnp:message");Ca("load");var Bs=class{static{s(this,"Message")}constructor(t,r=!0,n=!1){this._capnp=Zde(t,r,n),t&&!tpe(t)&&epe(this),Ca("new %s",this)}allocateSegment(t){return hA(t,this)}dump(){return mB(this)}getRoot(t){return _B(t,this)}getSegment(t){return mA(t,this)}initRoot(t){return gB(t,this)}setRoot(t){npe(t,this)}toArrayBuffer(){return yB(this)}toPackedArrayBuffer(){return EB(this)}toString(){return`Message_arena:${this._capnp.arena}`}};Pt.Message=Bs;Bs.allocateSegment=hA;Bs.dump=mB;Bs.getRoot=_B;Bs.getSegment=mA;Bs.initRoot=gB;Bs.readRawPointer=rpe;Bs.toArrayBuffer=yB;Bs.toPackedArrayBuffer=EB;function Zde(e,t=!0,r=!1){if(e===void 0)return{arena:new ol.SingleSegmentArena,segments:[],traversalLimit:pb.DEFAULT_TRAVERSE_LIMIT};if(tpe(e))return{arena:e,segments:[],traversalLimit:pb.DEFAULT_TRAVERSE_LIMIT};let n=e;return xyt(n)&&(n=n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength)),t&&(n=pB.unpack(n)),r?{arena:new ol.SingleSegmentArena(n),segments:[],traversalLimit:pb.DEFAULT_TRAVERSE_LIMIT}:{arena:new ol.MultiSegmentArena(Qde(n)),segments:[],traversalLimit:pb.DEFAULT_TRAVERSE_LIMIT}}s(Zde,"initMessage");Pt.initMessage=Zde;function Qde(e){let t=new DataView(e),r=t.getUint32(0,!0)+1,n=new Array(r);Ca("reading %d framed segments from stream",r);let i=4+r*4;if(i+=i%8,i+r*4>e.byteLength)throw new Error(q_.MSG_INVALID_FRAME_HEADER);for(let o=0;o<r;o++){let a=t.getUint32(4+o*4,!0)*8;if(i+a>e.byteLength)throw new Error(q_.MSG_INVALID_FRAME_HEADER);n[o]=e.slice(i,i+a),i+=a}return n}s(Qde,"getFramedSegments");Pt.getFramedSegments=Qde;function epe(e){let t=ol.Arena.getNumSegments(e._capnp.arena);if(t<1)throw new Error(q_.MSG_NO_SEGMENTS_IN_ARENA);e._capnp.segments=new Array(t);for(let r=0;r<t;r++){let n=ol.Arena.getBuffer(r,e._capnp.arena),i=new hB.Segment(r,e,n,n.byteLength);e._capnp.segments[r]=i}}s(epe,"preallocateSegments");Pt.preallocateSegments=epe;function xyt(e){return e.byteOffset!==void 0}s(xyt,"isArrayBufferView");function tpe(e){return e.kind!==void 0}s(tpe,"isAnyArena");function hA(e,t){Ca("allocating %x bytes for %s",e,t);let r=ol.Arena.allocate(e,t._capnp.segments,t._capnp.arena),n;if(r.id===t._capnp.segments.length)n=new hB.Segment(r.id,t,r.buffer),Ca("adding new segment %s",n),t._capnp.segments.push(n);else{if(r.id<0||r.id>t._capnp.segments.length)throw new Error(F_.format(q_.MSG_SEGMENT_OUT_OF_BOUNDS,r.id,t));n=t._capnp.segments[r.id],Ca("replacing segment %s with buffer (len:%d)",n,r.buffer.byteLength),n.replaceBuffer(r.buffer)}return n}s(hA,"allocateSegment");Pt.allocateSegment=hA;function mB(e){let t="";if(e._capnp.segments.length===0)return`================
315
315
  No Segments
316
316
  ================
317
317
  `;for(let r=0;r<e._capnp.segments.length;r++){t+=`================