@zuplo/core 5.1655.0 → 5.1659.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
@@ -407,7 +407,7 @@ ${p}
407
407
  ${f}`;const h=`${o}/${e.region}/${n}/${BSn}`;const g=`${BCt}
408
408
  ${s}
409
409
  ${h}
410
- `+await e.crypto.sha256DigestHex(m);const _=await MSn(e.crypto,e.securityCredentials.secretAccessKey,o,e.region,n);const v=await bF(e.crypto,_,g);const S=`${BCt} Credential=${e.securityCredentials.accessKeyId}/${h}, SignedHeaders=${p}, Signature=${(0,MCt.fromArrayBufferToHex)(v)}`;return{amzDate:u.date?void 0:s,authorizationHeader:S,canonicalQuerystring:e.canonicalQuerystring}}a(qSn,"generateAuthenticationHeaderMap")});var nxe=y(eJ=>{"use strict";Object.defineProperty(eJ,"__esModule",{value:true});eJ.AwsClient=void 0;var USn=qCt();var $Sn=qE();var SF=class extends $Sn.BaseExternalAccountClient{static{a(this,"AwsClient")}constructor(t,r){super(t,r);this.environmentId=t.credential_source.environment_id;this.regionUrl=t.credential_source.region_url;this.securityCredentialsUrl=t.credential_source.url;this.regionalCredVerificationUrl=t.credential_source.regional_cred_verification_url;this.imdsV2SessionTokenUrl=t.credential_source.imdsv2_session_token_url;this.awsRequestSigner=null;this.region="";this.validateEnvironmentId()}validateEnvironmentId(){var t;const r=(t=this.environmentId)===null||t===void 0?void 0:t.match(/^(aws)(\d+)$/);if(!r||!this.regionalCredVerificationUrl){throw new Error('No valid AWS "credential_source" provided')}else if(parseInt(r[2],10)!==1){throw new Error(`aws version "${r[2]}" is not supported in the current build.`)}}async retrieveSubjectToken(){if(!this.awsRequestSigner){const i={};if(this.shouldUseMetadataServer()&&this.imdsV2SessionTokenUrl){i["x-aws-ec2-metadata-token"]=await this.getImdsV2SessionToken()}this.region=await this.getAwsRegion(i);this.awsRequestSigner=new USn.AwsRequestSigner(async()=>{if(this.securityCredentialsFromEnv){return this.securityCredentialsFromEnv}const s=await this.getAwsRoleName(i);const o=await this.getAwsSecurityCredentials(s,i);return{accessKeyId:o.AccessKeyId,secretAccessKey:o.SecretAccessKey,token:o.Token}},this.region)}const t=await this.awsRequestSigner.getRequestOptions({url:this.regionalCredVerificationUrl.replace("{region}",this.region),method:"POST"});const r=[];const n=Object.assign({"x-goog-cloud-target-resource":this.audience},t.headers);for(const i in n){r.push({key:i,value:n[i]})}return encodeURIComponent(JSON.stringify({url:t.url,method:t.method,headers:r}))}async getImdsV2SessionToken(){const t={url:this.imdsV2SessionTokenUrl,method:"PUT",responseType:"text",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"300"}};const r=await this.transporter.request(t);return r.data}async getAwsRegion(t){if(this.regionFromEnv){return this.regionFromEnv}if(!this.regionUrl){throw new Error('Unable to determine AWS region due to missing "options.credential_source.region_url"')}const r={url:this.regionUrl,method:"GET",responseType:"text",headers:t};const n=await this.transporter.request(r);return n.data.substr(0,n.data.length-1)}async getAwsRoleName(t){if(!this.securityCredentialsUrl){throw new Error('Unable to determine AWS role name due to missing "options.credential_source.url"')}const r={url:this.securityCredentialsUrl,method:"GET",responseType:"text",headers:t};const n=await this.transporter.request(r);return n.data}async getAwsSecurityCredentials(t,r){const n=await this.transporter.request({url:`${this.securityCredentialsUrl}/${t}`,responseType:"json",headers:r});return n.data}shouldUseMetadataServer(){return!this.regionFromEnv||!this.securityCredentialsFromEnv}get regionFromEnv(){return process.env["AWS_REGION"]||process.env["AWS_DEFAULT_REGION"]||null}get securityCredentialsFromEnv(){if(process.env["AWS_ACCESS_KEY_ID"]&&process.env["AWS_SECRET_ACCESS_KEY"]){return{accessKeyId:process.env["AWS_ACCESS_KEY_ID"],secretAccessKey:process.env["AWS_SECRET_ACCESS_KEY"],token:process.env["AWS_SESSION_TOKEN"]}}return null}};eJ.AwsClient=SF;SF.AWS_EC2_METADATA_IPV4_ADDRESS="169.254.169.254";SF.AWS_EC2_METADATA_IPV6_ADDRESS="fd00:ec2::254"});var uxe=y(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:true});Do.InvalidSubjectTokenError=Do.InvalidMessageFieldError=Do.InvalidCodeFieldError=Do.InvalidTokenTypeFieldError=Do.InvalidExpirationTimeFieldError=Do.InvalidSuccessFieldError=Do.InvalidVersionFieldError=Do.ExecutableResponseError=Do.ExecutableResponse=void 0;var tJ="urn:ietf:params:oauth:token-type:saml2";var ixe="urn:ietf:params:oauth:token-type:id_token";var sxe="urn:ietf:params:oauth:token-type:jwt";var axe=class{static{a(this,"ExecutableResponse")}constructor(t){if(!t.version){throw new rJ("Executable response must contain a 'version' field.")}if(t.success===void 0){throw new nJ("Executable response must contain a 'success' field.")}this.version=t.version;this.success=t.success;if(this.success){this.expirationTime=t.expiration_time;this.tokenType=t.token_type;if(this.tokenType!==tJ&&this.tokenType!==ixe&&this.tokenType!==sxe){throw new iJ(`Executable response must contain a 'token_type' field when successful and it must be one of ${ixe}, ${sxe}, or ${tJ}.`)}if(this.tokenType===tJ){if(!t.saml_response){throw new AF(`Executable response must contain a 'saml_response' field when token_type=${tJ}.`)}this.subjectToken=t.saml_response}else{if(!t.id_token){throw new AF(`Executable response must contain a 'id_token' field when token_type=${ixe} or ${sxe}.`)}this.subjectToken=t.id_token}}else{if(!t.code){throw new sJ("Executable response must contain a 'code' field when unsuccessful.")}if(!t.message){throw new aJ("Executable response must contain a 'message' field when unsuccessful.")}this.errorCode=t.code;this.errorMessage=t.message}}isValid(){return!this.isExpired()&&this.success}isExpired(){return this.expirationTime!==void 0&&this.expirationTime<Math.round(Date.now()/1e3)}};Do.ExecutableResponse=axe;var tg=class extends Error{static{a(this,"ExecutableResponseError")}constructor(t){super(t);Object.setPrototypeOf(this,new.target.prototype)}};Do.ExecutableResponseError=tg;var rJ=class extends tg{static{a(this,"InvalidVersionFieldError")}};Do.InvalidVersionFieldError=rJ;var nJ=class extends tg{static{a(this,"InvalidSuccessFieldError")}};Do.InvalidSuccessFieldError=nJ;var oxe=class extends tg{static{a(this,"InvalidExpirationTimeFieldError")}};Do.InvalidExpirationTimeFieldError=oxe;var iJ=class extends tg{static{a(this,"InvalidTokenTypeFieldError")}};Do.InvalidTokenTypeFieldError=iJ;var sJ=class extends tg{static{a(this,"InvalidCodeFieldError")}};Do.InvalidCodeFieldError=sJ;var aJ=class extends tg{static{a(this,"InvalidMessageFieldError")}};Do.InvalidMessageFieldError=aJ;var AF=class extends tg{static{a(this,"InvalidSubjectTokenError")}};Do.InvalidSubjectTokenError=AF});var UCt=y(oJ=>{"use strict";Object.defineProperty(oJ,"__esModule",{value:true});oJ.PluggableAuthHandler=void 0;var jSn=uJ();var eC=uxe();var GSn=require("child_process");var lxe=require("fs");var cxe=class e{static{a(this,"PluggableAuthHandler")}constructor(t){if(!t.command){throw new Error("No command provided.")}this.commandComponents=e.parseCommand(t.command);this.timeoutMillis=t.timeoutMillis;if(!this.timeoutMillis){throw new Error("No timeoutMillis provided.")}this.outputFile=t.outputFile}retrieveResponseFromExecutable(t){return new Promise((r,n)=>{const i=GSn.spawn(this.commandComponents[0],this.commandComponents.slice(1),{env:{...process.env,...Object.fromEntries(t)}});let s="";i.stdout.on("data",u=>{s+=u});i.stderr.on("data",u=>{s+=u});const o=setTimeout(()=>{i.removeAllListeners();i.kill();return n(new Error("The executable failed to finish within the timeout specified."))},this.timeoutMillis);i.on("close",u=>{clearTimeout(o);if(u===0){try{const l=JSON.parse(s);const c=new eC.ExecutableResponse(l);return r(c)}catch(l){if(l instanceof eC.ExecutableResponseError){return n(l)}return n(new eC.ExecutableResponseError(`The executable returned an invalid response: ${s}`))}}else{return n(new jSn.ExecutableError(s,u.toString()))}})})}async retrieveCachedResponse(){if(!this.outputFile||this.outputFile.length===0){return void 0}let t;try{t=await lxe.promises.realpath(this.outputFile)}catch(n){return void 0}if(!(await lxe.promises.lstat(t)).isFile()){return void 0}const r=await lxe.promises.readFile(t,{encoding:"utf8"});if(r===""){return void 0}try{const n=JSON.parse(r);const i=new eC.ExecutableResponse(n);if(i.isValid()){return new eC.ExecutableResponse(n)}return void 0}catch(n){if(n instanceof eC.ExecutableResponseError){throw n}throw new eC.ExecutableResponseError(`The output file contained an invalid response: ${r}`)}}static parseCommand(t){const r=t.match(/(?:[^\s"]+|"[^"]*")+/g);if(!r){throw new Error(`Provided command: "${t}" could not be parsed.`)}for(let n=0;n<r.length;n++){if(r[n][0]==='"'&&r[n].slice(-1)==='"'){r[n]=r[n].slice(1,-1)}}return r}};oJ.PluggableAuthHandler=cxe});var uJ=y(XO=>{"use strict";Object.defineProperty(XO,"__esModule",{value:true});XO.PluggableAuthClient=XO.ExecutableError=void 0;var HSn=qE();var VSn=uxe();var zSn=UCt();var lJ=class extends Error{static{a(this,"ExecutableError")}constructor(t,r){super(`The executable failed with exit code: ${r} and error message: ${t}.`);this.code=r;Object.setPrototypeOf(this,new.target.prototype)}};XO.ExecutableError=lJ;var KSn=30*1e3;var $Ct=5*1e3;var jCt=120*1e3;var WSn="GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES";var GCt=1;var dxe=class extends HSn.BaseExternalAccountClient{static{a(this,"PluggableAuthClient")}constructor(t,r){super(t,r);if(!t.credential_source.executable){throw new Error('No valid Pluggable Auth "credential_source" provided.')}this.command=t.credential_source.executable.command;if(!this.command){throw new Error('No valid Pluggable Auth "credential_source" provided.')}if(t.credential_source.executable.timeout_millis===void 0){this.timeoutMillis=KSn}else{this.timeoutMillis=t.credential_source.executable.timeout_millis;if(this.timeoutMillis<$Ct||this.timeoutMillis>jCt){throw new Error(`Timeout must be between ${$Ct} and ${jCt} milliseconds.`)}}this.outputFile=t.credential_source.executable.output_file;this.handler=new zSn.PluggableAuthHandler({command:this.command,timeoutMillis:this.timeoutMillis,outputFile:this.outputFile})}async retrieveSubjectToken(){if(process.env[WSn]!=="1"){throw new Error("Pluggable Auth executables need to be explicitly allowed to run by setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment Variable to 1.")}let t=void 0;if(this.outputFile){t=await this.handler.retrieveCachedResponse()}if(!t){const r=new Map;r.set("GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE",this.audience);r.set("GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE",this.subjectTokenType);r.set("GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE","0");if(this.outputFile){r.set("GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE",this.outputFile)}const n=this.getServiceAccountEmail();if(n){r.set("GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL",n)}t=await this.handler.retrieveResponseFromExecutable(r)}if(t.version>GCt){throw new Error(`Version of executable is not currently supported, maximum supported version is ${GCt}.`)}if(!t.success){throw new lJ(t.errorMessage,t.errorCode)}if(this.outputFile){if(!t.expirationTime){throw new VSn.InvalidExpirationTimeFieldError("The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.")}}if(t.isExpired()){throw new Error("Executable response is expired.")}return t.subjectToken}};XO.PluggableAuthClient=dxe});var fxe=y(cJ=>{"use strict";Object.defineProperty(cJ,"__esModule",{value:true});cJ.ExternalAccountClient=void 0;var YSn=qE();var XSn=txe();var JSn=nxe();var QSn=uJ();var pxe=class{static{a(this,"ExternalAccountClient")}constructor(){throw new Error("ExternalAccountClients should be initialized via: ExternalAccountClient.fromJSON(), directly via explicit constructors, eg. new AwsClient(options), new IdentityPoolClient(options), newPluggableAuthClientOptions, or via new GoogleAuth(options).getClient()")}static fromJSON(t,r){var n,i;if(t&&t.type===YSn.EXTERNAL_ACCOUNT_TYPE){if((n=t.credential_source)===null||n===void 0?void 0:n.environment_id){return new JSn.AwsClient(t,r)}else if((i=t.credential_source)===null||i===void 0?void 0:i.executable){return new QSn.PluggableAuthClient(t,r)}else{return new XSn.IdentityPoolClient(t,r)}}else{return null}}};cJ.ExternalAccountClient=pxe});var VCt=y(JO=>{"use strict";Object.defineProperty(JO,"__esModule",{value:true});JO.ExternalAccountAuthorizedUserClient=JO.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=void 0;var ZSn=PO();var HCt=HTe();var eAn=Ey();var tAn=require("stream");var rAn=qE();JO.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE="external_account_authorized_user";var mxe=class extends HCt.OAuthClientAuthHandler{static{a(this,"ExternalAccountAuthorizedUserHandler")}constructor(t,r,n){super(n);this.url=t;this.transporter=r}async refreshToken(t,r){const n=new URLSearchParams({grant_type:"refresh_token",refresh_token:t});const i={"Content-Type":"application/x-www-form-urlencoded",...r};const s={url:this.url,method:"POST",headers:i,data:n.toString(),responseType:"json"};this.applyClientAuthenticationOptions(s);try{const o=await this.transporter.request(s);const u=o.data;u.res=o;return u}catch(o){if(o instanceof eAn.GaxiosError&&o.response){throw(0,HCt.getErrorFromOAuthErrorResponse)(o.response.data,o)}throw o}}};var hxe=class extends ZSn.AuthClient{static{a(this,"ExternalAccountAuthorizedUserClient")}constructor(t,r){super();this.refreshToken=t.refresh_token;const n={confidentialClientType:"basic",clientId:t.client_id,clientSecret:t.client_secret};this.externalAccountAuthorizedUserHandler=new mxe(t.token_url,this.transporter,n);this.cachedAccessToken=null;this.quotaProjectId=t.quota_project_id;if(typeof(r===null||r===void 0?void 0:r.eagerRefreshThresholdMillis)!=="number"){this.eagerRefreshThresholdMillis=rAn.EXPIRATION_TIME_OFFSET}else{this.eagerRefreshThresholdMillis=r.eagerRefreshThresholdMillis}this.forceRefreshOnFailure=!!(r===null||r===void 0?void 0:r.forceRefreshOnFailure)}async getAccessToken(){if(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken)){await this.refreshAccessTokenAsync()}return{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){const t=await this.getAccessToken();const r={Authorization:`Bearer ${t.token}`};return this.addSharedMetadataHeaders(r)}request(t,r){if(r){this.requestAsync(t).then(n=>r(null,n),n=>{return r(n,n.response)})}else{return this.requestAsync(t)}}async requestAsync(t,r=false){let n;try{const i=await this.getRequestHeaders();t.headers=t.headers||{};if(i&&i["x-goog-user-project"]){t.headers["x-goog-user-project"]=i["x-goog-user-project"]}if(i&&i.Authorization){t.headers.Authorization=i.Authorization}n=await this.transporter.request(t)}catch(i){const s=i.response;if(s){const o=s.status;const u=s.config.data instanceof tAn.Readable;const l=o===401||o===403;if(!r&&l&&!u&&this.forceRefreshOnFailure){await this.refreshAccessTokenAsync();return await this.requestAsync(t,true)}}throw i}return n}async refreshAccessTokenAsync(){const t=await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken);this.cachedAccessToken={access_token:t.access_token,expiry_date:new Date().getTime()+t.expires_in*1e3,res:t.res};if(t.refresh_token!==void 0){this.refreshToken=t.refresh_token}return this.cachedAccessToken}isExpired(t){const r=new Date().getTime();return t.expiry_date?r>=t.expiry_date-this.eagerRefreshThresholdMillis:false}};JO.ExternalAccountAuthorizedUserClient=hxe});var WCt=y(ZO=>{"use strict";Object.defineProperty(ZO,"__esModule",{value:true});ZO.GoogleAuth=ZO.CLOUD_SDK_CLIENT_ID=void 0;var nAn=require("child_process");var CF=require("fs");var gxe=nX();var iAn=require("os");var yxe=require("path");var sAn=RO();var aAn=iF();var oAn=Twe();var uAn=Rwe();var lAn=Owe();var QO=MTe();var _xe=UTe();var dJ=jTe();var cAn=fxe();var wF=qE();var zCt=VCt();ZO.CLOUD_SDK_CLIENT_ID="764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com";var KCt={NO_PROJECT_ID_FOUND:"Unable to detect a Project Id in the current environment. \nTo learn more about authentication and Google APIs, visit: \nhttps://cloud.google.com/docs/authentication/getting-started"};var pJ=class{static{a(this,"GoogleAuth")}get isGCE(){return this.checkIsGCE}constructor(t){this.checkIsGCE=void 0;this.jsonContent=null;this.cachedCredential=null;t=t||{};this._cachedProjectId=t.projectId||null;this.cachedCredential=t.authClient||null;this.keyFilename=t.keyFilename||t.keyFile;this.scopes=t.scopes;this.jsonContent=t.credentials||null;this.clientOptions=t.clientOptions}setGapicJWTValues(t){t.defaultServicePath=this.defaultServicePath;t.useJWTAccessWithScope=this.useJWTAccessWithScope;t.defaultScopes=this.defaultScopes}getProjectId(t){if(t){this.getProjectIdAsync().then(r=>t(null,r),t)}else{return this.getProjectIdAsync()}}async getProjectIdOptional(){try{return await this.getProjectId()}catch(t){if(t instanceof Error&&t.message===KCt.NO_PROJECT_ID_FOUND){return null}else{throw t}}}async findAndCacheProjectId(){let t=null;t||(t=await this.getProductionProjectId());t||(t=await this.getFileProjectId());t||(t=await this.getDefaultServiceProjectId());t||(t=await this.getGCEProjectId());t||(t=await this.getExternalAccountClientProjectId());if(t){this._cachedProjectId=t;return t}else{throw new Error(KCt.NO_PROJECT_ID_FOUND)}}async getProjectIdAsync(){if(this._cachedProjectId){return this._cachedProjectId}if(!this._findProjectIdPromise){this._findProjectIdPromise=this.findAndCacheProjectId()}return this._findProjectIdPromise}getAnyScopes(){return this.scopes||this.defaultScopes}getApplicationDefault(t={},r){let n;if(typeof t==="function"){r=t}else{n=t}if(r){this.getApplicationDefaultAsync(n).then(i=>r(null,i.credential,i.projectId),r)}else{return this.getApplicationDefaultAsync(n)}}async getApplicationDefaultAsync(t={}){if(this.cachedCredential){return await this.prepareAndCacheADC(this.cachedCredential)}const r=process.env["GOOGLE_CLOUD_QUOTA_PROJECT"];let n;n=await this._tryGetApplicationCredentialsFromEnvironmentVariable(t);if(n){if(n instanceof QO.JWT){n.scopes=this.scopes}else if(n instanceof wF.BaseExternalAccountClient){n.scopes=this.getAnyScopes()}return await this.prepareAndCacheADC(n,r)}n=await this._tryGetApplicationCredentialsFromWellKnownFile(t);if(n){if(n instanceof QO.JWT){n.scopes=this.scopes}else if(n instanceof wF.BaseExternalAccountClient){n.scopes=this.getAnyScopes()}return await this.prepareAndCacheADC(n,r)}let i;try{i=await this._checkIsGCE()}catch(s){if(s instanceof Error){s.message=`Unexpected error determining execution environment: ${s.message}`}throw s}if(!i){throw new Error("Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.")}t.scopes=this.getAnyScopes();return await this.prepareAndCacheADC(new oAn.Compute(t),r)}async prepareAndCacheADC(t,r){const n=await this.getProjectIdOptional();if(r){t.quotaProjectId=r}this.cachedCredential=t;return{credential:t,projectId:n}}async _checkIsGCE(){if(this.checkIsGCE===void 0){this.checkIsGCE=await gxe.isAvailable()}return this.checkIsGCE}async _tryGetApplicationCredentialsFromEnvironmentVariable(t){const r=process.env["GOOGLE_APPLICATION_CREDENTIALS"]||process.env["google_application_credentials"];if(!r||r.length===0){return null}try{return this._getApplicationCredentialsFromFilePath(r,t)}catch(n){if(n instanceof Error){n.message=`Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${n.message}`}throw n}}async _tryGetApplicationCredentialsFromWellKnownFile(t){let r=null;if(this._isWindows()){r=process.env["APPDATA"]}else{const i=process.env["HOME"];if(i){r=yxe.join(i,".config")}}if(r){r=yxe.join(r,"gcloud","application_default_credentials.json");if(!CF.existsSync(r)){r=null}}if(!r){return null}const n=await this._getApplicationCredentialsFromFilePath(r,t);return n}async _getApplicationCredentialsFromFilePath(t,r={}){if(!t||t.length===0){throw new Error("The file path is invalid.")}try{t=CF.realpathSync(t);if(!CF.lstatSync(t).isFile()){throw new Error}}catch(i){if(i instanceof Error){i.message=`The file at ${t} does not exist, or it is not a file. ${i.message}`}throw i}const n=CF.createReadStream(t);return this.fromStream(n,r)}fromImpersonatedJSON(t){var r,n,i,s;if(!t){throw new Error("Must pass in a JSON object containing an impersonated refresh token")}if(t.type!==dJ.IMPERSONATED_ACCOUNT_TYPE){throw new Error(`The incoming JSON object does not have the "${dJ.IMPERSONATED_ACCOUNT_TYPE}" type`)}if(!t.source_credentials){throw new Error("The incoming JSON object does not contain a source_credentials field")}if(!t.service_account_impersonation_url){throw new Error("The incoming JSON object does not contain a service_account_impersonation_url field")}const o=new _xe.UserRefreshClient(t.source_credentials.client_id,t.source_credentials.client_secret,t.source_credentials.refresh_token);const u=(n=(r=/(?<target>[^/]+):generateAccessToken$/.exec(t.service_account_impersonation_url))===null||r===void 0?void 0:r.groups)===null||n===void 0?void 0:n.target;if(!u){throw new RangeError(`Cannot extract target principal from ${t.service_account_impersonation_url}`)}const l=(i=this.getAnyScopes())!==null&&i!==void 0?i:[];const c=new dJ.Impersonated({delegates:(s=t.delegates)!==null&&s!==void 0?s:[],sourceClient:o,targetPrincipal:u,targetScopes:Array.isArray(l)?l:[l]});return c}fromJSON(t,r={}){let n;r=r||{};if(t.type===_xe.USER_REFRESH_ACCOUNT_TYPE){n=new _xe.UserRefreshClient(r);n.fromJSON(t)}else if(t.type===dJ.IMPERSONATED_ACCOUNT_TYPE){n=this.fromImpersonatedJSON(t)}else if(t.type===wF.EXTERNAL_ACCOUNT_TYPE){n=cAn.ExternalAccountClient.fromJSON(t,r);n.scopes=this.getAnyScopes()}else if(t.type===zCt.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE){n=new zCt.ExternalAccountAuthorizedUserClient(t,r)}else{r.scopes=this.scopes;n=new QO.JWT(r);this.setGapicJWTValues(n);n.fromJSON(t)}return n}_cacheClientFromJSON(t,r){const n=this.fromJSON(t,r);this.jsonContent=t;this.cachedCredential=n;return n}fromStream(t,r={},n){let i={};if(typeof r==="function"){n=r}else{i=r}if(n){this.fromStreamAsync(t,i).then(s=>n(null,s),n)}else{return this.fromStreamAsync(t,i)}}fromStreamAsync(t,r){return new Promise((n,i)=>{if(!t){throw new Error("Must pass in a stream containing the Google auth settings.")}let s="";t.setEncoding("utf8").on("error",i).on("data",o=>s+=o).on("end",()=>{try{try{const o=JSON.parse(s);const u=this._cacheClientFromJSON(o,r);return n(u)}catch(o){if(!this.keyFilename)throw o;const u=new QO.JWT({...this.clientOptions,keyFile:this.keyFilename});this.cachedCredential=u;this.setGapicJWTValues(u);return n(u)}}catch(o){return i(o)}})})}fromAPIKey(t,r){r=r||{};const n=new QO.JWT(r);n.fromAPIKey(t);return n}_isWindows(){const t=iAn.platform();if(t&&t.length>=3){if(t.substring(0,3).toLowerCase()==="win"){return true}}return false}async getDefaultServiceProjectId(){return new Promise(t=>{(0,nAn.exec)("gcloud config config-helper --format json",(r,n)=>{if(!r&&n){try{const i=JSON.parse(n).configuration.properties.core.project;t(i);return}catch(i){}}t(null)})})}getProductionProjectId(){return process.env["GCLOUD_PROJECT"]||process.env["GOOGLE_CLOUD_PROJECT"]||process.env["gcloud_project"]||process.env["google_cloud_project"]}async getFileProjectId(){if(this.cachedCredential){return this.cachedCredential.projectId}if(this.keyFilename){const r=await this.getClient();if(r&&r.projectId){return r.projectId}}const t=await this._tryGetApplicationCredentialsFromEnvironmentVariable();if(t){return t.projectId}else{return null}}async getExternalAccountClientProjectId(){if(!this.jsonContent||this.jsonContent.type!==wF.EXTERNAL_ACCOUNT_TYPE){return null}const t=await this.getClient();return await t.getProjectId()}async getGCEProjectId(){try{const t=await gxe.project("project-id");return t}catch(t){return null}}getCredentials(t){if(t){this.getCredentialsAsync().then(r=>t(null,r),t)}else{return this.getCredentialsAsync()}}async getCredentialsAsync(){const t=await this.getClient();if(t instanceof wF.BaseExternalAccountClient){const i=t.getServiceAccountEmail();if(i){return{client_email:i}}}if(this.jsonContent){const i={client_email:this.jsonContent.client_email,private_key:this.jsonContent.private_key};return i}const r=await this._checkIsGCE();if(!r){throw new Error("Unknown error.")}const n=await gxe.instance({property:"service-accounts/",params:{recursive:"true"}});if(!n||!n.default||!n.default.email){throw new Error("Failure from metadata server.")}return{client_email:n.default.email}}async getClient(){if(!this.cachedCredential){if(this.jsonContent){this._cacheClientFromJSON(this.jsonContent,this.clientOptions)}else if(this.keyFilename){const t=yxe.resolve(this.keyFilename);const r=CF.createReadStream(t);await this.fromStreamAsync(r,this.clientOptions)}else{await this.getApplicationDefaultAsync(this.clientOptions)}}return this.cachedCredential}async getIdTokenClient(t){const r=await this.getClient();if(!("fetchIdToken"in r)){throw new Error("Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file.")}return new uAn.IdTokenClient({targetAudience:t,idTokenProvider:r})}async getAccessToken(){const t=await this.getClient();return(await t.getAccessToken()).token}async getRequestHeaders(t){const r=await this.getClient();return r.getRequestHeaders(t)}async authorizeRequest(t){t=t||{};const r=t.url||t.uri;const n=await this.getClient();const i=await n.getRequestHeaders(r);t.headers=Object.assign(t.headers||{},i);return t}async request(t){const r=await this.getClient();return r.request(t)}getEnv(){return(0,lAn.getEnv)()}async sign(t){const r=await this.getClient();const n=(0,sAn.createCrypto)();if(r instanceof QO.JWT&&r.key){const s=await n.sign(r.key,t);return s}const i=await this.getCredentials();if(!i.client_email){throw new Error("Cannot sign data without `client_email`.")}return this.signBlob(n,i.client_email,t)}async signBlob(t,r,n){const i=`https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/${r}:signBlob`;const s=await this.request({method:"POST",url:i,data:{payload:t.encodeBase64StringUtf8(n)}});return s.data.signedBlob}};ZO.GoogleAuth=pJ;pJ.DefaultTransporter=aAn.DefaultTransporter});var YCt=y(fJ=>{"use strict";Object.defineProperty(fJ,"__esModule",{value:true});fJ.IAMAuth=void 0;var vxe=class{static{a(this,"IAMAuth")}constructor(t,r){this.selector=t;this.token=r;this.selector=t;this.token=r}getRequestHeaders(){return{"x-goog-iam-authority-selector":this.selector,"x-goog-iam-authorization-token":this.token}}};fJ.IAMAuth=vxe});var XCt=y(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:true});dh.DownscopedClient=dh.EXPIRATION_TIME_OFFSET=dh.MAX_ACCESS_BOUNDARY_RULES_COUNT=void 0;var dAn=require("stream");var pAn=PO();var fAn=zTe();var mAn="urn:ietf:params:oauth:grant-type:token-exchange";var hAn="urn:ietf:params:oauth:token-type:access_token";var gAn="urn:ietf:params:oauth:token-type:access_token";var yAn="https://sts.googleapis.com/v1/token";dh.MAX_ACCESS_BOUNDARY_RULES_COUNT=10;dh.EXPIRATION_TIME_OFFSET=5*60*1e3;var Exe=class extends pAn.AuthClient{static{a(this,"DownscopedClient")}constructor(t,r,n,i){super();this.authClient=t;this.credentialAccessBoundary=r;if(r.accessBoundary.accessBoundaryRules.length===0){throw new Error("At least one access boundary rule needs to be defined.")}else if(r.accessBoundary.accessBoundaryRules.length>dh.MAX_ACCESS_BOUNDARY_RULES_COUNT){throw new Error(`The provided access boundary has more than ${dh.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`)}for(const s of r.accessBoundary.accessBoundaryRules){if(s.availablePermissions.length===0){throw new Error("At least one permission should be defined in access boundary rules.")}}this.stsCredential=new fAn.StsCredentials(yAn);this.cachedDownscopedAccessToken=null;if(typeof(n===null||n===void 0?void 0:n.eagerRefreshThresholdMillis)!=="number"){this.eagerRefreshThresholdMillis=dh.EXPIRATION_TIME_OFFSET}else{this.eagerRefreshThresholdMillis=n.eagerRefreshThresholdMillis}this.forceRefreshOnFailure=!!(n===null||n===void 0?void 0:n.forceRefreshOnFailure);this.quotaProjectId=i}setCredentials(t){if(!t.expiry_date){throw new Error("The access token expiry_date field is missing in the provided credentials.")}super.setCredentials(t);this.cachedDownscopedAccessToken=t}async getAccessToken(){if(!this.cachedDownscopedAccessToken||this.isExpired(this.cachedDownscopedAccessToken)){await this.refreshAccessTokenAsync()}return{token:this.cachedDownscopedAccessToken.access_token,expirationTime:this.cachedDownscopedAccessToken.expiry_date,res:this.cachedDownscopedAccessToken.res}}async getRequestHeaders(){const t=await this.getAccessToken();const r={Authorization:`Bearer ${t.token}`};return this.addSharedMetadataHeaders(r)}request(t,r){if(r){this.requestAsync(t).then(n=>r(null,n),n=>{return r(n,n.response)})}else{return this.requestAsync(t)}}async requestAsync(t,r=false){let n;try{const i=await this.getRequestHeaders();t.headers=t.headers||{};if(i&&i["x-goog-user-project"]){t.headers["x-goog-user-project"]=i["x-goog-user-project"]}if(i&&i.Authorization){t.headers.Authorization=i.Authorization}n=await this.transporter.request(t)}catch(i){const s=i.response;if(s){const o=s.status;const u=s.config.data instanceof dAn.Readable;const l=o===401||o===403;if(!r&&l&&!u&&this.forceRefreshOnFailure){await this.refreshAccessTokenAsync();return await this.requestAsync(t,true)}}throw i}return n}async refreshAccessTokenAsync(){var t;const r=(await this.authClient.getAccessToken()).token;const n={grantType:mAn,requestedTokenType:hAn,subjectToken:r,subjectTokenType:gAn};const i=await this.stsCredential.exchangeToken(n,void 0,this.credentialAccessBoundary);const s=((t=this.authClient.credentials)===null||t===void 0?void 0:t.expiry_date)||null;const o=i.expires_in?new Date().getTime()+i.expires_in*1e3:s;this.cachedDownscopedAccessToken={access_token:i.access_token,expiry_date:o,res:i.res};this.credentials={};Object.assign(this.credentials,this.cachedDownscopedAccessToken);delete this.credentials.res;this.emit("tokens",{refresh_token:null,expiry_date:this.cachedDownscopedAccessToken.expiry_date,access_token:this.cachedDownscopedAccessToken.access_token,token_type:"Bearer",id_token:null});return this.cachedDownscopedAccessToken}isExpired(t){const r=new Date().getTime();return t.expiry_date?r>=t.expiry_date-this.eagerRefreshThresholdMillis:false}};dh.DownscopedClient=Exe});var bxe=y(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:true});mn.GoogleAuth=mn.auth=mn.DefaultTransporter=mn.PluggableAuthClient=mn.DownscopedClient=mn.BaseExternalAccountClient=mn.ExternalAccountClient=mn.IdentityPoolClient=mn.AwsClient=mn.UserRefreshClient=mn.LoginTicket=mn.OAuth2Client=mn.CodeChallengeMethod=mn.Impersonated=mn.JWT=mn.JWTAccess=mn.IdTokenClient=mn.IAMAuth=mn.GCPEnv=mn.Compute=mn.AuthClient=void 0;var JCt=WCt();Object.defineProperty(mn,"GoogleAuth",{enumerable:true,get:function(){return JCt.GoogleAuth}});var _An=PO();Object.defineProperty(mn,"AuthClient",{enumerable:true,get:function(){return _An.AuthClient}});var vAn=Twe();Object.defineProperty(mn,"Compute",{enumerable:true,get:function(){return vAn.Compute}});var EAn=Owe();Object.defineProperty(mn,"GCPEnv",{enumerable:true,get:function(){return EAn.GCPEnv}});var bAn=YCt();Object.defineProperty(mn,"IAMAuth",{enumerable:true,get:function(){return bAn.IAMAuth}});var SAn=Rwe();Object.defineProperty(mn,"IdTokenClient",{enumerable:true,get:function(){return SAn.IdTokenClient}});var AAn=FTe();Object.defineProperty(mn,"JWTAccess",{enumerable:true,get:function(){return AAn.JWTAccess}});var CAn=MTe();Object.defineProperty(mn,"JWT",{enumerable:true,get:function(){return CAn.JWT}});var wAn=jTe();Object.defineProperty(mn,"Impersonated",{enumerable:true,get:function(){return wAn.Impersonated}});var QCt=HA();Object.defineProperty(mn,"CodeChallengeMethod",{enumerable:true,get:function(){return QCt.CodeChallengeMethod}});Object.defineProperty(mn,"OAuth2Client",{enumerable:true,get:function(){return QCt.OAuth2Client}});var TAn=Awe();Object.defineProperty(mn,"LoginTicket",{enumerable:true,get:function(){return TAn.LoginTicket}});var xAn=UTe();Object.defineProperty(mn,"UserRefreshClient",{enumerable:true,get:function(){return xAn.UserRefreshClient}});var RAn=nxe();Object.defineProperty(mn,"AwsClient",{enumerable:true,get:function(){return RAn.AwsClient}});var OAn=txe();Object.defineProperty(mn,"IdentityPoolClient",{enumerable:true,get:function(){return OAn.IdentityPoolClient}});var PAn=fxe();Object.defineProperty(mn,"ExternalAccountClient",{enumerable:true,get:function(){return PAn.ExternalAccountClient}});var NAn=qE();Object.defineProperty(mn,"BaseExternalAccountClient",{enumerable:true,get:function(){return NAn.BaseExternalAccountClient}});var IAn=XCt();Object.defineProperty(mn,"DownscopedClient",{enumerable:true,get:function(){return IAn.DownscopedClient}});var kAn=uJ();Object.defineProperty(mn,"PluggableAuthClient",{enumerable:true,get:function(){return kAn.PluggableAuthClient}});var DAn=iF();Object.defineProperty(mn,"DefaultTransporter",{enumerable:true,get:function(){return DAn.DefaultTransporter}});var LAn=new JCt.GoogleAuth;mn.auth=LAn});var tP=y(eP=>{"use strict";var FAn=eP&&eP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(eP,"__esModule",{value:true});eP.getServiceAccountIdToken=void 0;var BAn=bxe();var MAn=FAn(n0());var qAn=new BAn.GoogleAuth;var ZCt=new MAn.default({max:50,maxAge:1e3*60*50});async function UAn(e){let t=ZCt.get(e);if(!t){const r=await qAn.getIdTokenClient(e);t=await r.idTokenProvider.fetchIdToken(e);ZCt.set(e,t)}return t}a(UAn,"getServiceAccountIdToken");eP.getServiceAccountIdToken=UAn});var iwt=y(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:true});kf.mergeHeaders=kf.createFinalURL=kf.defaultBodySerializer=kf.defaultQuerySerializer=kf.createClient=void 0;var rP=ac();var $An=tP();var jAn={"Content-Type":"application/json"};var GAn=/\/*$/;async function HAn(e){const{baseUrl:t,fetch:r=globalThis.fetch,querySerializer:n,bodySerializer:i,zuploExtensions:s,...o}=e;const u=s?.fastifyRequest.log;const l=s?.fastifyRequest.id;const c=s?.options?.userSub??s?.fastifyRequest.getUserSub();const d=new Headers({...jAn,"zuplo-user":c,"zp-rid":l,...o.headers??{}});const p=await(0,$An.getServiceAccountIdToken)(t);d.set("Authorization",`Bearer ${p}`);async function f(m,h){const{headers:g,body:_,params:v={},parseAs:S="json",querySerializer:E=n??ewt,bodySerializer:b=i??twt,...A}=h||{};const C=rwt(m,{baseUrl:t,params:v,querySerializer:E});const T=nwt(d,g,v.header);const O={redirect:"follow",...o,...A,headers:T};if(_)O.body=b(_);if(O.body instanceof FormData)T.delete("Content-Type");const P=await r(C,O);if(P.status===404){const R=await P.json();if(R&&R.hasOwnProperty("type")&&R.hasOwnProperty("title")&&R.hasOwnProperty("status")){throw new rP.ApiError(R)}throw new rP.ApiError(rP.Problems.NOT_FOUND)}if(P.status===204||P.headers.get("Content-Length")==="0"){return P.ok?{data:{},response:P}:{error:{},response:P}}if(P.ok){let R=P.body;if(S!=="stream"){const I=P.clone();R=typeof I[S]==="function"?await I[S]():await I.text()}return{data:R,response:P}}else{u.debug(`Error on internal api: path: ${C}, status: ${P.status}, headers: ${JSON.stringify(P.headers)}, body: ${await P.clone().text()}`);let R={};try{R=await P.clone().json();if(R.type&&R.status&&R.title){throw new rP.ApiError(R)}}catch(I){}throw new rP.ApiError(rP.Problems.INTERNAL_SERVER_ERROR)}}a(f,"coreFetch");return{async GET(m,h){return f(m,{...h,method:"GET"})},async PUT(m,h){return f(m,{...h,method:"PUT"})},async POST(m,h){return f(m,{...h,method:"POST"})},async DELETE(m,h){return f(m,{...h,method:"DELETE"})},async OPTIONS(m,h){return f(m,{...h,method:"OPTIONS"})},async HEAD(m,h){return f(m,{...h,method:"HEAD"})},async PATCH(m,h){return f(m,{...h,method:"PATCH"})},async TRACE(m,h){return f(m,{...h,method:"TRACE"})}}}a(HAn,"createClient");kf.createClient=HAn;function ewt(e){const t=new URLSearchParams;if(e&&typeof e==="object"){for(const[r,n]of Object.entries(e)){if(n===void 0||n===null)continue;t.set(r,n)}}return t.toString()}a(ewt,"defaultQuerySerializer");kf.defaultQuerySerializer=ewt;function twt(e){return JSON.stringify(e)}a(twt,"defaultBodySerializer");kf.defaultBodySerializer=twt;function rwt(e,t){let r=`${t.baseUrl?t.baseUrl.replace(GAn,""):""}${e}`;if(t.params.path){for(const[n,i]of Object.entries(t.params.path))r=r.replace(`{${n}}`,encodeURIComponent(String(i)))}if(t.params.query){const n=t.querySerializer(t.params.query);if(n)r+=`?${n}`}return r}a(rwt,"createFinalURL");kf.createFinalURL=rwt;function nwt(...e){const t=new Headers;for(const r of e){if(!r||typeof r!=="object")continue;const n=r instanceof Headers?r.entries():Object.entries(r);for(const[i,s]of n){if(s!==void 0&&s!==null){t.set(i,s)}}}return t}a(nwt,"mergeHeaders");kf.mergeHeaders=nwt});var swt=y(UE=>{"use strict";var VAn=UE&&UE.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(UE,"__esModule",{value:true});UE.ApiKeyService=UE.createApiKeyServiceClient=void 0;var nP=ac();var zAn=bxe();var mJ=VAn(qp());var KAn=iwt();async function WAn(e){return(0,KAn.createClient)({baseUrl:mJ.default.API_KEY_MANAGEMENT_SERVICE_URL,zuploExtensions:{fastifyRequest:e}})}a(WAn,"createApiKeyServiceClient");UE.createApiKeyServiceClient=WAn;var Sxe=class{static{a(this,"ApiKeyService")}logger;requestId;constructor(t){this.logger=t.log;this.requestId=t.id}async fetchGCP(t,r={}){this.logger.info(`Fetching with GCP JWT ${r.method} ${t} from Api Key Service API.`);const n=new zAn.GoogleAuth;const i=await n.getIdTokenClient(mJ.default.API_KEY_MANAGEMENT_SERVICE_URL);this.logger.info(`Payload to send: ${JSON.stringify({url:`${mJ.default.API_KEY_MANAGEMENT_SERVICE_URL}/${t}`,method:"GET",body:r.body,headers:{...r.headers,...r.method!=="DELETE"&&{"content-type":"application/json"}}})}`);const s=await i.getRequestHeaders();const o=await i.request({url:`${mJ.default.API_KEY_MANAGEMENT_SERVICE_URL}/${t}`,method:r.method||"GET",body:r.body,headers:{...s,...r.headers,...r.method!=="DELETE"&&{"content-type":"application/json"}},validateStatus:u=>u>=200&&u<500});if(o.status===404){const u=await o.data;if(u&&u.hasOwnProperty("type")&&u.hasOwnProperty("title")&&u.hasOwnProperty("status")){throw new nP.ApiError(u)}throw new nP.ApiError(nP.Problems.NOT_FOUND)}if(o.status>=300){this.logger.debug(`Error on api-key-service: path: ${t}, status: ${o.status}, headers: ${JSON.stringify(o.headers)}, body: ${JSON.stringify(o.data)}`);const u=o.data;if(u.type&&u.status&&u.title){throw new nP.ApiError(u)}this.logger.error(`Error not handled on api-key-service: path: ${t}, status: ${o.status}`);throw new nP.ApiError(nP.Problems.INTERNAL_SERVER_ERROR)}if(o.status===204){return{}}return o.data}};UE.ApiKeyService=Sxe});var owt=y(iP=>{"use strict";var YAn=iP&&iP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(iP,"__esModule",{value:true});iP.AuthApiService=void 0;var tC=ac();var awt=YAn(qp());var XAn=tP();var Axe=class{static{a(this,"AuthApiService")}logger;requestId;baseUrl;constructor(t){this.logger=t.log;this.requestId=t.id;if(!awt.default.AUTH_API_URL){throw new Error("AUTH_API_URL is not set")}this.baseUrl=awt.default.AUTH_API_URL}async getClientJWT(t,r){let n;try{n=await this.fetch(`/v1/clients/${t}`,{method:"GET"})}catch(s){if(s.status===tC.Problems.NOT_FOUND.status){n=await this.fetch(`/v1/clients`,{method:"POST",body:JSON.stringify({client_id:t})})}else{throw s}}const i=await this.fetch(`/v1/oauth/token`,{method:"POST",body:JSON.stringify({client_id:t,client_secret:n.client_secret,grant_type:"client_credentials",custom_claims:r})});return i.access_token}async fetch(t,r){this.logger.info(`Fetching internally ${t} from Auth API V2.`);const n=new Headers({"content-type":"application/json","zp-rid":this.requestId,authorization:""});if(process.env.K_SERVICE){const s=await(0,XAn.getServiceAccountIdToken)(this.baseUrl);n.set("Authorization",`Bearer ${s}`)}const i=await fetch(`${this.baseUrl}${t}`,{...r,headers:n});if(i.status===tC.HttpStatusCode.NOT_FOUND){throw new tC.ApiError(tC.Problems.NOT_FOUND)}if(!i.ok){this.logger.debug(`Error on auth-api: path: ${t}, status: ${i.status}`);const s=await i.clone().json();if(s.type&&s.status&&s.title){throw new tC.ApiError(s)}this.logger.error(`Error not handled on auth-api: path: ${t}, status: ${i.status}`);throw new tC.ApiError(tC.Problems.INTERNAL_SERVER_ERROR)}return i.clone().json()}};iP.AuthApiService=Axe});var gJ=y(hJ=>{"use strict";Object.defineProperty(hJ,"__esModule",{value:true});hJ.ApiServiceClient=void 0;var sP=ac();var JAn=tP();var Cxe=class{static{a(this,"ApiServiceClient")}userSub;logger;requestId;baseUrl;cache;constructor(t,r,n){this.userSub=n.userSub;this.logger=n.logger;this.requestId=n.requestId;this.baseUrl=t;this.cache=r}async cachedFetch(t,r,n){if(!this.userSub||!n){throw new Error("userSub and cacheKey parameters are required to use cachedFetch")}const i=`${this.userSub}@${n}`;if(this.cache.has(i)){return this.cache.get(i)}const s=await this.fetchInternally(t,r);this.cache.set(i,s);return s}async fetchInternally(t,r){this.logger.info(`Fetching internally ${r.method} ${this.baseUrl}${t}`);const n=new Headers({...r.headers,"zuplo-user":this.userSub,"content-type":"application/json","zp-rid":this.requestId});if(process.env.K_SERVICE){const s=await(0,JAn.getServiceAccountIdToken)(this.baseUrl);n.set("Authorization",`Bearer ${s}`)}const i=await fetch(`${this.baseUrl}${t}`,{...r,headers:n});if(i.status===404){const s=await i.json();if(s&&s.hasOwnProperty("type")&&s.hasOwnProperty("title")&&s.hasOwnProperty("status")){throw new sP.ApiError(s)}throw new sP.ApiError(sP.Problems.NOT_FOUND)}if(!i.ok){this.logger.debug(`Error on internal api: path: ${t}, status: ${i.status}, headers: ${JSON.stringify(i.headers)}, body: ${JSON.stringify(i.clone().text())}`);const s=await i.clone().json();if(s.type&&s.status&&s.title){throw new sP.ApiError(s)}this.logger.error(`Error not handled on internal api: path: ${t}, status: ${i.status}`);throw new sP.ApiError(sP.Problems.INTERNAL_SERVER_ERROR)}if(i.status===204){return{}}return i.clone().json()}};hJ.ApiServiceClient=Cxe});var dwt=y(rg=>{"use strict";var lwt=rg&&rg.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(rg,"__esModule",{value:true});rg.ContentApiService=rg.getContentApiStorageTarballPath=rg.contentApiTarballFileName=void 0;var QAn=lwt(n0());var uwt=lwt(qp());var ZAn=gJ();var eCn=new QAn.default({max:500,maxAge:1e3*60*50});function cwt(e,t){return`${e}--${t}.tar.gz`}a(cwt,"contentApiTarballFileName");rg.contentApiTarballFileName=cwt;function tCn(e,t){const r=cwt(e,t);return`${e}/builds/${r}`}a(tCn,"getContentApiStorageTarballPath");rg.getContentApiStorageTarballPath=tCn;var wxe=class extends ZAn.ApiServiceClient{static{a(this,"ContentApiService")}constructor(t){if(!uwt.default.CONTENT_API_URL){throw new Error("CONTENT_API_URL is not set")}super(uwt.default.CONTENT_API_URL,eCn,t)}};rg.ContentApiService=wxe});var mwt=y(aP=>{"use strict";var fwt=aP&&aP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(aP,"__esModule",{value:true});aP.DevApiService=void 0;var rCn=fwt(n0());var pwt=fwt(qp());var nCn=gJ();var iCn=new rCn.default({max:500,maxAge:1e3*60*50});var Txe=class extends nCn.ApiServiceClient{static{a(this,"DevApiService")}constructor(t,r){if(!pwt.default.DEV_API_URL){throw new Error("DEV_API_URL is not set")}const n=r&&r.userSub?r.userSub:t.getUserSub();super(pwt.default.DEV_API_URL,iCn,{userSub:n,logger:t.log,requestId:t.id})}};aP.DevApiService=Txe});var ywt=y((_6s,gwt)=>{var hwt=require("stream").Stream;var sCn=require("util");gwt.exports=ph;function ph(){this.source=null;this.dataSize=0;this.maxDataSize=1024*1024;this.pauseStream=true;this._maxDataSizeExceeded=false;this._released=false;this._bufferedEvents=[]}a(ph,"DelayedStream");sCn.inherits(ph,hwt);ph.create=function(e,t){var r=new this;t=t||{};for(var n in t){r[n]=t[n]}r.source=e;var i=e.emit;e.emit=function(){r._handleEmit(arguments);return i.apply(e,arguments)};e.on("error",function(){});if(r.pauseStream){e.pause()}return r};Object.defineProperty(ph.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});ph.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ph.prototype.resume=function(){if(!this._released){this.release()}this.source.resume()};ph.prototype.pause=function(){this.source.pause()};ph.prototype.release=function(){this._released=true;this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this));this._bufferedEvents=[]};ph.prototype.pipe=function(){var e=hwt.prototype.pipe.apply(this,arguments);this.resume();return e};ph.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}if(e[0]==="data"){this.dataSize+=e[1].length;this._checkIfMaxDataSizeExceeded()}this._bufferedEvents.push(e)};ph.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded){return}if(this.dataSize<=this.maxDataSize){return}this._maxDataSizeExceeded=true;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}});var bwt=y((E6s,Ewt)=>{var aCn=require("util");var vwt=require("stream").Stream;var _wt=ywt();Ewt.exports=ao;function ao(){this.writable=false;this.readable=true;this.dataSize=0;this.maxDataSize=2*1024*1024;this.pauseStreams=true;this._released=false;this._streams=[];this._currentStream=null;this._insideLoop=false;this._pendingNext=false}a(ao,"CombinedStream");aCn.inherits(ao,vwt);ao.create=function(e){var t=new this;e=e||{};for(var r in e){t[r]=e[r]}return t};ao.isStreamLike=function(e){return typeof e!=="function"&&typeof e!=="string"&&typeof e!=="boolean"&&typeof e!=="number"&&!Buffer.isBuffer(e)};ao.prototype.append=function(e){var t=ao.isStreamLike(e);if(t){if(!(e instanceof _wt)){var r=_wt.create(e,{maxDataSize:Infinity,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this));e=r}this._handleErrors(e);if(this.pauseStreams){e.pause()}}this._streams.push(e);return this};ao.prototype.pipe=function(e,t){vwt.prototype.pipe.call(this,e,t);this.resume();return e};ao.prototype._getNext=function(){this._currentStream=null;if(this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do{this._pendingNext=false;this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=false}};ao.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e=="undefined"){this.end();return}if(typeof e!=="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=ao.isStreamLike(r);if(n){r.on("data",this._checkDataSize.bind(this));this._handleErrors(r)}this._pipeNext(r)}.bind(this))};ao.prototype._pipeNext=function(e){this._currentStream=e;var t=ao.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this));e.pipe(this,{end:false});return}var r=e;this.write(r);this._getNext()};ao.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};ao.prototype.write=function(e){this.emit("data",e)};ao.prototype.pause=function(){if(!this.pauseStreams){return}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};ao.prototype.resume=function(){if(!this._released){this._released=true;this.writable=true;this._getNext()}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function")this._currentStream.resume();this.emit("resume")};ao.prototype.end=function(){this._reset();this.emit("end")};ao.prototype.destroy=function(){this._reset();this.emit("close")};ao.prototype._reset=function(){this.writable=false;this._streams=[];this._currentStream=null};ao.prototype._checkDataSize=function(){this._updateDataSize();if(this.dataSize<=this.maxDataSize){return}var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))};ao.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){if(!t.dataSize){return}e.dataSize+=t.dataSize});if(this._currentStream&&this._currentStream.dataSize){this.dataSize+=this._currentStream.dataSize}};ao.prototype._emitError=function(e){this._reset();this.emit("error",e)}});var Awt=y((S6s,Swt)=>{Swt.exports=oCn;function oCn(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(t){t(e)}else{setTimeout(e,0)}}a(oCn,"defer")});var xxe=y((C6s,wwt)=>{var Cwt=Awt();wwt.exports=uCn;function uCn(e){var t=false;Cwt(function(){t=true});return a(function r(n,i){if(t){e(n,i)}else{Cwt(a(function s(){e(n,i)},"nextTick_callback"))}},"async_callback")}a(uCn,"async")});var Rxe=y((T6s,Twt)=>{Twt.exports=lCn;function lCn(e){Object.keys(e.jobs).forEach(cCn.bind(e));e.jobs={}}a(lCn,"abort");function cCn(e){if(typeof this.jobs[e]=="function"){this.jobs[e]()}}a(cCn,"clean")});var Oxe=y((R6s,Rwt)=>{var xwt=xxe();var dCn=Rxe();Rwt.exports=pCn;function pCn(e,t,r,n){var i=r["keyedList"]?r["keyedList"][r.index]:r.index;r.jobs[i]=fCn(t,i,e[i],function(s,o){if(!(i in r.jobs)){return}delete r.jobs[i];if(s){dCn(r)}else{r.results[i]=o}n(s,r.results)})}a(pCn,"iterate");function fCn(e,t,r,n){var i;if(e.length==2){i=e(r,xwt(n))}else{i=e(r,t,xwt(n))}return i}a(fCn,"runJob")});var Pxe=y((P6s,Owt)=>{Owt.exports=mCn;function mCn(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};if(t){n.keyedList.sort(r?t:function(i,s){return t(e[i],e[s])})}return n}a(mCn,"state")});var Nxe=y((I6s,Pwt)=>{var hCn=Rxe();var gCn=xxe();Pwt.exports=yCn;function yCn(e){if(!Object.keys(this.jobs).length){return}this.index=this.size;hCn(this);gCn(e)(null,this.results)}a(yCn,"terminator")});var Iwt=y((D6s,Nwt)=>{var _Cn=Oxe();var vCn=Pxe();var ECn=Nxe();Nwt.exports=bCn;function bCn(e,t,r){var n=vCn(e);while(n.index<(n["keyedList"]||e).length){_Cn(e,t,n,function(i,s){if(i){r(i,s);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}});n.index++}return ECn.bind(n,r)}a(bCn,"parallel")});var Ixe=y((F6s,yJ)=>{var kwt=Oxe();var SCn=Pxe();var ACn=Nxe();yJ.exports=CCn;yJ.exports.ascending=Dwt;yJ.exports.descending=wCn;function CCn(e,t,r,n){var i=SCn(e,r);kwt(e,t,i,a(function s(o,u){if(o){n(o,u);return}i.index++;if(i.index<(i["keyedList"]||e).length){kwt(e,t,i,s);return}n(null,i.results)},"iteratorHandler"));return ACn.bind(i,n)}a(CCn,"serialOrdered");function Dwt(e,t){return e<t?-1:e>t?1:0}a(Dwt,"ascending");function wCn(e,t){return-1*Dwt(e,t)}a(wCn,"descending")});var Fwt=y((M6s,Lwt)=>{var TCn=Ixe();Lwt.exports=xCn;function xCn(e,t,r){return TCn(e,t,null,r)}a(xCn,"serial")});var Mwt=y((U6s,Bwt)=>{Bwt.exports={parallel:Iwt(),serial:Fwt(),serialOrdered:Ixe()}});var Uwt=y(($6s,qwt)=>{qwt.exports=function(e,t){Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]});return e}});var Gwt=y((j6s,jwt)=>{var Fxe=bwt();var $wt=require("util");var kxe=require("path");var RCn=require("http");var OCn=require("https");var PCn=require("url").parse;var NCn=require("fs");var ICn=require("stream").Stream;var Dxe=hSe();var kCn=Mwt();var Lxe=Uwt();jwt.exports=es;$wt.inherits(es,Fxe);function es(e){if(!(this instanceof es)){return new es(e)}this._overheadLength=0;this._valueLength=0;this._valuesToMeasure=[];Fxe.call(this);e=e||{};for(var t in e){this[t]=e[t]}}a(es,"FormData");es.LINE_BREAK="\r\n";es.DEFAULT_CONTENT_TYPE="application/octet-stream";es.prototype.append=function(e,t,r){r=r||{};if(typeof r=="string"){r={filename:r}}var n=Fxe.prototype.append.bind(this);if(typeof t=="number"){t=""+t}if($wt.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(e,t,r);var s=this._multiPartFooter();n(i);n(t);n(s);this._trackLength(i,t,r)};es.prototype._trackLength=function(e,t,r){var n=0;if(r.knownLength!=null){n+=+r.knownLength}else if(Buffer.isBuffer(t)){n=t.length}else if(typeof t==="string"){n=Buffer.byteLength(t)}this._valueLength+=n;this._overheadLength+=Buffer.byteLength(e)+es.LINE_BREAK.length;if(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof ICn)){return}if(!r.knownLength){this._valuesToMeasure.push(t)}};es.prototype._lengthRetriever=function(e,t){if(e.hasOwnProperty("fd")){if(e.end!=void 0&&e.end!=Infinity&&e.start!=void 0){t(null,e.end+1-(e.start?e.start:0))}else{NCn.stat(e.path,function(r,n){var i;if(r){t(r);return}i=n.size-(e.start?e.start:0);t(null,i)})}}else if(e.hasOwnProperty("httpVersion")){t(null,+e.headers["content-length"])}else if(e.hasOwnProperty("httpModule")){e.on("response",function(r){e.pause();t(null,+r.headers["content-length"])});e.resume()}else{t("Unknown stream")}};es.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string"){return r.header}var n=this._getContentDisposition(t,r);var i=this._getContentType(t,r);var s="";var o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};if(typeof r.header=="object"){Lxe(o,r.header)}var u;for(var l in o){if(!o.hasOwnProperty(l))continue;u=o[l];if(u==null){continue}if(!Array.isArray(u)){u=[u]}if(u.length){s+=l+": "+u.join("; ")+es.LINE_BREAK}}return"--"+this.getBoundary()+es.LINE_BREAK+s+es.LINE_BREAK};es.prototype._getContentDisposition=function(e,t){var r,n;if(typeof t.filepath==="string"){r=kxe.normalize(t.filepath).replace(/\\/g,"/")}else if(t.filename||e.name||e.path){r=kxe.basename(t.filename||e.name||e.path)}else if(e.readable&&e.hasOwnProperty("httpVersion")){r=kxe.basename(e.client._httpMessage.path||"")}if(r){n='filename="'+r+'"'}return n};es.prototype._getContentType=function(e,t){var r=t.contentType;if(!r&&e.name){r=Dxe.lookup(e.name)}if(!r&&e.path){r=Dxe.lookup(e.path)}if(!r&&e.readable&&e.hasOwnProperty("httpVersion")){r=e.headers["content-type"]}if(!r&&(t.filepath||t.filename)){r=Dxe.lookup(t.filepath||t.filename)}if(!r&&typeof e=="object"){r=es.DEFAULT_CONTENT_TYPE}return r};es.prototype._multiPartFooter=function(){return function(e){var t=es.LINE_BREAK;var r=this._streams.length===0;if(r){t+=this._lastBoundary()}e(t)}.bind(this)};es.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+es.LINE_BREAK};es.prototype.getHeaders=function(e){var t;var r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e){if(e.hasOwnProperty(t)){r[t.toLowerCase()]=e[t]}}return r};es.prototype.setBoundary=function(e){this._boundary=e};es.prototype.getBoundary=function(){if(!this._boundary){this._generateBoundary()}return this._boundary};es.prototype.getBuffer=function(){var e=new Buffer.alloc(0);var t=this.getBoundary();for(var r=0,n=this._streams.length;r<n;r++){if(typeof this._streams[r]!=="function"){if(Buffer.isBuffer(this._streams[r])){e=Buffer.concat([e,this._streams[r]])}else{e=Buffer.concat([e,Buffer.from(this._streams[r])])}if(typeof this._streams[r]!=="string"||this._streams[r].substring(2,t.length+2)!==t){e=Buffer.concat([e,Buffer.from(es.LINE_BREAK)])}}}return Buffer.concat([e,Buffer.from(this._lastBoundary())])};es.prototype._generateBoundary=function(){var e="--------------------------";for(var t=0;t<24;t++){e+=Math.floor(Math.random()*10).toString(16)}this._boundary=e};es.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;if(this._streams.length){e+=this._lastBoundary().length}if(!this.hasKnownLength()){this._error(new Error("Cannot calculate proper length in synchronous way."))}return e};es.prototype.hasKnownLength=function(){var e=true;if(this._valuesToMeasure.length){e=false}return e};es.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length){t+=this._lastBoundary().length}if(!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}kCn.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i});e(null,t)})};es.prototype.submit=function(e,t){var r,n,i={method:"post"};if(typeof e=="string"){e=PCn(e);n=Lxe({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)}else{n=Lxe(e,i);if(!n.port){n.port=n.protocol=="https:"?443:80}}n.headers=this.getHeaders(e.headers);if(n.protocol=="https:"){r=OCn.request(n)}else{r=RCn.request(n)}this.getLength(function(s,o){if(s&&s!=="Unknown stream"){this._error(s);return}if(o){r.setHeader("Content-Length",o)}this.pipe(r);if(t){var u;var l=a(function(c,d){r.removeListener("error",l);r.removeListener("response",u);return t.call(this,c,d)},"callback");u=l.bind(this,null);r.on("error",l);r.on("response",u)}}.bind(this));return r};es.prototype._error=function(e){if(!this.error){this.error=e;this.pause();this.emit("error",e)}};es.prototype.toString=function(){return"[object FormData]"}});var Vwt=y(Hwt=>{"use strict";var DCn=require("url").parse;var LCn={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};var FCn=String.prototype.endsWith||function(e){return e.length<=this.length&&this.indexOf(e,this.length-e.length)!==-1};function BCn(e){var t=typeof e==="string"?DCn(e):e||{};var r=t.protocol;var n=t.host;var i=t.port;if(typeof n!=="string"||!n||typeof r!=="string"){return""}r=r.split(":",1)[0];n=n.replace(/:\d*$/,"");i=parseInt(i)||LCn[r]||0;if(!MCn(n,i)){return""}var s=oP("npm_config_"+r+"_proxy")||oP(r+"_proxy")||oP("npm_config_proxy")||oP("all_proxy");if(s&&s.indexOf("://")===-1){s=r+"://"+s}return s}a(BCn,"getProxyForUrl");function MCn(e,t){var r=(oP("npm_config_no_proxy")||oP("no_proxy")).toLowerCase();if(!r){return true}if(r==="*"){return false}return r.split(/[,\s]/).every(function(n){if(!n){return true}var i=n.match(/^(.+):(\d+)$/);var s=i?i[1]:n;var o=i?parseInt(i[2]):0;if(o&&o!==t){return true}if(!/^[.*]/.test(s)){return e!==s}if(s.charAt(0)==="*"){s=s.slice(1)}return!FCn.call(e,s)})}a(MCn,"shouldProxy");function oP(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}a(oP,"getEnv");Hwt.getProxyForUrl=BCn});var Kwt=y((z6s,zwt)=>{var TF;zwt.exports=function(){if(!TF){try{TF=Wc()("follow-redirects")}catch(e){}if(typeof TF!=="function"){TF=a(function(){},"debug")}}TF.apply(null,arguments)}});var Qwt=y((W6s,Wxe)=>{var OF=require("url");var xF=OF.URL;var qCn=require("http");var UCn=require("https");var $xe=require("stream").Writable;var jxe=require("assert");var Wwt=Kwt();var Gxe=false;try{jxe(new xF)}catch(e){Gxe=e.code==="ERR_INVALID_URL"}var $Cn=["auth","host","hostname","href","path","pathname","port","protocol","query","search"];var Hxe=["abort","aborted","connect","error","socket","timeout"];var Vxe=Object.create(null);Hxe.forEach(function(e){Vxe[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var Mxe=PF("ERR_INVALID_URL","Invalid URL",TypeError);var qxe=PF("ERR_FR_REDIRECTION_FAILURE","Redirected request failed");var jCn=PF("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",qxe);var GCn=PF("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit");var HCn=PF("ERR_STREAM_WRITE_AFTER_END","write after end");var VCn=$xe.prototype.destroy||Xwt;function _d(e,t){$xe.call(this);this._sanitizeOptions(e);this._options=e;this._ended=false;this._ending=false;this._redirectCount=0;this._redirects=[];this._requestBodyLength=0;this._requestBodyBuffers=[];if(t){this.on("response",t)}var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(i){r.emit("error",i instanceof qxe?i:new qxe({cause:i}))}};this._performRequest()}a(_d,"RedirectableRequest");_d.prototype=Object.create($xe.prototype);_d.prototype.abort=function(){Kxe(this._currentRequest);this._currentRequest.abort();this.emit("abort")};_d.prototype.destroy=function(e){Kxe(this._currentRequest,e);VCn.call(this,e);return this};_d.prototype.write=function(e,t,r){if(this._ending){throw new HCn}if(!rC(e)&&!WCn(e)){throw new TypeError("data should be a string, Buffer or Uint8Array")}if(RF(t)){r=t;t=null}if(e.length===0){if(r){r()}return}if(this._requestBodyLength+e.length<=this._options.maxBodyLength){this._requestBodyLength+=e.length;this._requestBodyBuffers.push({data:e,encoding:t});this._currentRequest.write(e,t,r)}else{this.emit("error",new GCn);this.abort()}};_d.prototype.end=function(e,t,r){if(RF(e)){r=e;e=t=null}else if(RF(t)){r=t;t=null}if(!e){this._ended=this._ending=true;this._currentRequest.end(null,null,r)}else{var n=this;var i=this._currentRequest;this.write(e,t,function(){n._ended=true;i.end(null,null,r)});this._ending=true}};_d.prototype.setHeader=function(e,t){this._options.headers[e]=t;this._currentRequest.setHeader(e,t)};_d.prototype.removeHeader=function(e){delete this._options.headers[e];this._currentRequest.removeHeader(e)};_d.prototype.setTimeout=function(e,t){var r=this;function n(o){o.setTimeout(e);o.removeListener("timeout",o.destroy);o.addListener("timeout",o.destroy)}a(n,"destroyOnTimeout");function i(o){if(r._timeout){clearTimeout(r._timeout)}r._timeout=setTimeout(function(){r.emit("timeout");s()},e);n(o)}a(i,"startTimer");function s(){if(r._timeout){clearTimeout(r._timeout);r._timeout=null}r.removeListener("abort",s);r.removeListener("error",s);r.removeListener("response",s);r.removeListener("close",s);if(t){r.removeListener("timeout",t)}if(!r.socket){r._currentRequest.removeListener("socket",i)}}a(s,"clearTimer");if(t){this.on("timeout",t)}if(this.socket){i(this.socket)}else{this._currentRequest.once("socket",i)}this.on("socket",n);this.on("abort",s);this.on("error",s);this.on("response",s);this.on("close",s);return this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){_d.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(_d.prototype,e,{get:function(){return this._currentRequest[e]}})});_d.prototype._sanitizeOptions=function(e){if(!e.headers){e.headers={}}if(e.host){if(!e.hostname){e.hostname=e.host}delete e.host}if(!e.pathname&&e.path){var t=e.path.indexOf("?");if(t<0){e.pathname=e.path}else{e.pathname=e.path.substring(0,t);e.search=e.path.substring(t)}}};_d.prototype._performRequest=function(){var e=this._options.protocol;var t=this._options.nativeProtocols[e];if(!t){throw new TypeError("Unsupported protocol "+e)}if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var i of Hxe){n.on(i,Vxe[i])}this._currentUrl=/^\//.test(this._options.path)?OF.format(this._options):this._options.path;if(this._isRedirect){var s=0;var o=this;var u=this._requestBodyBuffers;a(function l(c){if(n===o._currentRequest){if(c){o.emit("error",c)}else if(s<u.length){var d=u[s++];if(!n.finished){n.write(d.data,d.encoding,l)}}else if(o._ended){n.end()}}},"writeNext")()}};_d.prototype._processResponse=function(e){var t=e.statusCode;if(this._options.trackRedirects){this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t})}var r=e.headers.location;if(!r||this._options.followRedirects===false||t<300||t>=400){e.responseUrl=this._currentUrl;e.redirects=this._redirects;this.emit("response",e);this._requestBodyBuffers=[];return}Kxe(this._currentRequest);e.destroy();if(++this._redirectCount>this._options.maxRedirects){throw new jCn}var n;var i=this._options.beforeRedirect;if(i){n=Object.assign({Host:e.req.getHeader("host")},this._options.headers)}var s=this._options.method;if((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method)){this._options.method="GET";this._requestBodyBuffers=[];Bxe(/^content-/i,this._options.headers)}var o=Bxe(/^host$/i,this._options.headers);var u=zxe(this._currentUrl);var l=o||u.host;var c=/^\w+:/.test(r)?this._currentUrl:OF.format(Object.assign(u,{host:l}));var d=zCn(r,c);Wwt("redirecting to",d.href);this._isRedirect=true;Uxe(d,this._options);if(d.protocol!==u.protocol&&d.protocol!=="https:"||d.host!==l&&!KCn(d.host,l)){Bxe(/^(?:authorization|cookie)$/i,this._options.headers)}if(RF(i)){var p={headers:e.headers,statusCode:t};var f={url:c,method:s,headers:n};i(this._options,p,f);this._sanitizeOptions(this._options)}this._performRequest()};function Ywt(e){var t={maxRedirects:21,maxBodyLength:10*1024*1024};var r={};Object.keys(e).forEach(function(n){var i=n+":";var s=r[i]=e[n];var o=t[n]=Object.create(s);function u(c,d,p){if(YCn(c)){c=Uxe(c)}else if(rC(c)){c=Uxe(zxe(c))}else{p=d;d=Jwt(c);c={protocol:i}}if(RF(d)){p=d;d=null}d=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},c,d);d.nativeProtocols=r;if(!rC(d.host)&&!rC(d.hostname)){d.hostname="::1"}jxe.equal(d.protocol,i,"protocol mismatch");Wwt("options",d);return new _d(d,p)}a(u,"request");function l(c,d,p){var f=o.request(c,d,p);f.end();return f}a(l,"get");Object.defineProperties(o,{request:{value:u,configurable:true,enumerable:true,writable:true},get:{value:l,configurable:true,enumerable:true,writable:true}})});return t}a(Ywt,"wrap");function Xwt(){}a(Xwt,"noop");function zxe(e){var t;if(Gxe){t=new xF(e)}else{t=Jwt(OF.parse(e));if(!rC(t.protocol)){throw new Mxe({input:e})}}return t}a(zxe,"parseUrl");function zCn(e,t){return Gxe?new xF(e,t):zxe(OF.resolve(t,e))}a(zCn,"resolveUrl");function Jwt(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname)){throw new Mxe({input:e.href||e})}if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host)){throw new Mxe({input:e.href||e})}return e}a(Jwt,"validateUrl");function Uxe(e,t){var r=t||{};for(var n of $Cn){r[n]=e[n]}if(r.hostname.startsWith("[")){r.hostname=r.hostname.slice(1,-1)}if(r.port!==""){r.port=Number(r.port)}r.path=r.search?r.pathname+r.search:r.pathname;return r}a(Uxe,"spreadUrlObject");function Bxe(e,t){var r;for(var n in t){if(e.test(n)){r=t[n];delete t[n]}}return r===null||typeof r==="undefined"?void 0:String(r).trim()}a(Bxe,"removeMatchingHeaders");function PF(e,t,r){function n(i){Error.captureStackTrace(this,this.constructor);Object.assign(this,i||{});this.code=e;this.message=this.cause?t+": "+this.cause.message:t}a(n,"CustomError");n.prototype=new(r||Error);Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:false},name:{value:"Error ["+e+"]",enumerable:false}});return n}a(PF,"createErrorType");function Kxe(e,t){for(var r of Hxe){e.removeListener(r,Vxe[r])}e.on("error",Xwt);e.destroy(t)}a(Kxe,"destroyRequest");function KCn(e,t){jxe(rC(e)&&rC(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}a(KCn,"isSubdomain");function rC(e){return typeof e==="string"||e instanceof String}a(rC,"isString");function RF(e){return typeof e==="function"}a(RF,"isFunction");function WCn(e){return typeof e==="object"&&"length"in e}a(WCn,"isBuffer");function YCn(e){return xF&&e instanceof xF}a(YCn,"isURL");Wxe.exports=Ywt({http:qCn,https:UCn});Wxe.exports.wrap=Ywt});var xJ=y((X6s,$Tt)=>{"use strict";var XCn=Gwt();var JCn=require("url");var QCn=Vwt();var ZCn=require("http");var ewn=require("https");var gTt=require("util");var twn=Qwt();var rwn=require("zlib");var yTt=require("stream");var nwn=require("events");function Ty(e){return e&&typeof e==="object"&&"default"in e?e:{"default":e}}a(Ty,"_interopDefaultLegacy");var _Tt=Ty(XCn);var iwn=Ty(JCn);var swn=Ty(ZCn);var awn=Ty(ewn);var own=Ty(gTt);var uwn=Ty(twn);var HE=Ty(rwn);var jE=Ty(yTt);var lwn=Ty(nwn);function vTt(e,t){return a(function r(){return e.apply(t,arguments)},"wrap")}a(vTt,"bind");var{toString:cwn}=Object.prototype;var{getPrototypeOf:lRe}=Object;var AJ=(e=>t=>{const r=cwn.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null));var ng=a(e=>{e=e.toLowerCase();return t=>AJ(t)===e},"kindOfTest");var CJ=a(e=>t=>typeof t===e,"typeOfTest");var{isArray:dP}=Array;var kF=CJ("undefined");function dwn(e){return e!==null&&!kF(e)&&e.constructor!==null&&!kF(e.constructor)&&Lf(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}a(dwn,"isBuffer");var ETt=ng("ArrayBuffer");function pwn(e){let t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&ETt(e.buffer)}return t}a(pwn,"isArrayBufferView");var fwn=CJ("string");var Lf=CJ("function");var bTt=CJ("number");var wJ=a(e=>e!==null&&typeof e==="object","isObject");var mwn=a(e=>e===true||e===false,"isBoolean");var vJ=a(e=>{if(AJ(e)!=="object"){return false}const t=lRe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},"isPlainObject");var hwn=ng("Date");var gwn=ng("File");var ywn=ng("Blob");var _wn=ng("FileList");var vwn=a(e=>wJ(e)&&Lf(e.pipe),"isStream");var Ewn=a(e=>{let t;return e&&(typeof FormData==="function"&&e instanceof FormData||Lf(e.append)&&((t=AJ(e))==="formdata"||t==="object"&&Lf(e.toString)&&e.toString()==="[object FormData]"))},"isFormData");var bwn=ng("URLSearchParams");var Swn=a(e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function LF(e,t,{allOwnKeys:r=false}={}){if(e===null||typeof e==="undefined"){return}let n;let i;if(typeof e!=="object"){e=[e]}if(dP(e)){for(n=0,i=e.length;n<i;n++){t.call(null,e[n],n,e)}}else{const s=r?Object.getOwnPropertyNames(e):Object.keys(e);const o=s.length;let u;for(n=0;n<o;n++){u=s[n];t.call(null,e[u],u,e)}}}a(LF,"forEach");function STt(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length;let i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}a(STt,"findKey");var ATt=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})();var CTt=a(e=>!kF(e)&&e!==ATt,"isContextDefined");function Zxe(){const{caseless:e}=CTt(this)&&this||{};const t={};const r=a((n,i)=>{const s=e&&STt(t,i)||i;if(vJ(t[s])&&vJ(n)){t[s]=Zxe(t[s],n)}else if(vJ(n)){t[s]=Zxe({},n)}else if(dP(n)){t[s]=n.slice()}else{t[s]=n}},"assignValue");for(let n=0,i=arguments.length;n<i;n++){arguments[n]&&LF(arguments[n],r)}return t}a(Zxe,"merge");var Awn=a((e,t,r,{allOwnKeys:n}={})=>{LF(t,(i,s)=>{if(r&&Lf(i)){e[s]=vTt(i,r)}else{e[s]=i}},{allOwnKeys:n});return e},"extend");var Cwn=a(e=>{if(e.charCodeAt(0)===65279){e=e.slice(1)}return e},"stripBOM");var wwn=a((e,t,r,n)=>{e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)},"inherits");var Twn=a((e,t,r,n)=>{let i;let s;let o;const u={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);s=i.length;while(s-- >0){o=i[s];if((!n||n(o,e,t))&&!u[o]){t[o]=e[o];u[o]=true}}e=r!==false&&lRe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},"toFlatObject");var xwn=a((e,t,r)=>{e=String(e);if(r===void 0||r>e.length){r=e.length}r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},"endsWith");var Rwn=a(e=>{if(!e)return null;if(dP(e))return e;let t=e.length;if(!bTt(t))return null;const r=new Array(t);while(t-- >0){r[t]=e[t]}return r},"toArray");var Own=(e=>{return t=>{return e&&t instanceof e}})(typeof Uint8Array!=="undefined"&&lRe(Uint8Array));var Pwn=a((e,t)=>{const r=e&&e[Symbol.iterator];const n=r.call(e);let i;while((i=n.next())&&!i.done){const s=i.value;t.call(e,s[0],s[1])}},"forEachEntry");var Nwn=a((e,t)=>{let r;const n=[];while((r=e.exec(t))!==null){n.push(r)}return n},"matchAll");var Iwn=ng("HTMLFormElement");var kwn=a(e=>{return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,a(function t(r,n,i){return n.toUpperCase()+i},"replacer"))},"toCamelCase");var Zwt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype);var Dwn=ng("RegExp");var wTt=a((e,t)=>{const r=Object.getOwnPropertyDescriptors(e);const n={};LF(r,(i,s)=>{let o;if((o=t(i,s,e))!==false){n[s]=o||i}});Object.defineProperties(e,n)},"reduceDescriptors");var Lwn=a(e=>{wTt(e,(t,r)=>{if(Lf(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}const n=e[r];if(!Lf(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}}})},"freezeMethods");var Fwn=a((e,t)=>{const r={};const n=a(i=>{i.forEach(s=>{r[s]=true})},"define");dP(e)?n(e):n(String(e).split(t));return r},"toObjectSet");var Bwn=a(()=>{},"noop");var Mwn=a((e,t)=>{e=+e;return Number.isFinite(e)?e:t},"toFiniteNumber");var Yxe="abcdefghijklmnopqrstuvwxyz";var eTt="0123456789";var TTt={DIGIT:eTt,ALPHA:Yxe,ALPHA_DIGIT:Yxe+Yxe.toUpperCase()+eTt};var qwn=a((e=16,t=TTt.ALPHA_DIGIT)=>{let r="";const{length:n}=t;while(e--){r+=t[Math.random()*n|0]}return r},"generateString");function Uwn(e){return!!(e&&Lf(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}a(Uwn,"isSpecCompliantForm");var $wn=a(e=>{const t=new Array(10);const r=a((n,i)=>{if(wJ(n)){if(t.indexOf(n)>=0){return}if(!("toJSON"in n)){t[i]=n;const s=dP(n)?[]:{};LF(n,(o,u)=>{const l=r(o,i+1);!kF(l)&&(s[u]=l)});t[i]=void 0;return s}}return n},"visit");return r(e,0)},"toJSONObject");var jwn=ng("AsyncFunction");var Gwn=a(e=>e&&(wJ(e)||Lf(e))&&Lf(e.then)&&Lf(e.catch),"isThenable");var Je={isArray:dP,isArrayBuffer:ETt,isBuffer:dwn,isFormData:Ewn,isArrayBufferView:pwn,isString:fwn,isNumber:bTt,isBoolean:mwn,isObject:wJ,isPlainObject:vJ,isUndefined:kF,isDate:hwn,isFile:gwn,isBlob:ywn,isRegExp:Dwn,isFunction:Lf,isStream:vwn,isURLSearchParams:bwn,isTypedArray:Own,isFileList:_wn,forEach:LF,merge:Zxe,extend:Awn,trim:Swn,stripBOM:Cwn,inherits:wwn,toFlatObject:Twn,kindOf:AJ,kindOfTest:ng,endsWith:xwn,toArray:Rwn,forEachEntry:Pwn,matchAll:Nwn,isHTMLForm:Iwn,hasOwnProperty:Zwt,hasOwnProp:Zwt,reduceDescriptors:wTt,freezeMethods:Lwn,toObjectSet:Fwn,toCamelCase:kwn,noop:Bwn,toFiniteNumber:Mwn,findKey:STt,global:ATt,isContextDefined:CTt,ALPHABET:TTt,generateString:qwn,isSpecCompliantForm:Uwn,toJSONObject:$wn,isAsyncFn:jwn,isThenable:Gwn};function yr(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=new Error().stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}a(yr,"AxiosError");Je.inherits(yr,Error,{toJSON:a(function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Je.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}},"toJSON")});var xTt=yr.prototype;var RTt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{RTt[e]={value:e}});Object.defineProperties(yr,RTt);Object.defineProperty(xTt,"isAxiosError",{value:true});yr.from=(e,t,r,n,i,s)=>{const o=Object.create(xTt);Je.toFlatObject(e,o,a(function u(l){return l!==Error.prototype},"filter"),u=>{return u!=="isAxiosError"});yr.call(o,e.message,t,r,n,i);o.cause=e;o.name=e.name;s&&Object.assign(o,s);return o};function eRe(e){return Je.isPlainObject(e)||Je.isArray(e)}a(eRe,"isVisitable");function OTt(e){return Je.endsWith(e,"[]")?e.slice(0,-2):e}a(OTt,"removeBrackets");function tTt(e,t,r){if(!e)return t;return e.concat(t).map(a(function n(i,s){i=OTt(i);return!r&&s?"["+i+"]":i},"each")).join(r?".":"")}a(tTt,"renderKey");function Hwn(e){return Je.isArray(e)&&!e.some(eRe)}a(Hwn,"isFlatArray");var Vwn=Je.toFlatObject(Je,{},null,a(function e(t){return/^is[A-Z]/.test(t)},"filter"));function TJ(e,t,r){if(!Je.isObject(e)){throw new TypeError("target must be an object")}t=t||new(_Tt["default"]||FormData);r=Je.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,a(function h(g,_){return!Je.isUndefined(_[g])},"defined"));const n=r.metaTokens;const i=r.visitor||d;const s=r.dots;const o=r.indexes;const u=r.Blob||typeof Blob!=="undefined"&&Blob;const l=u&&Je.isSpecCompliantForm(t);if(!Je.isFunction(i)){throw new TypeError("visitor must be a function")}function c(h){if(h===null)return"";if(Je.isDate(h)){return h.toISOString()}if(!l&&Je.isBlob(h)){throw new yr("Blob is not supported. Use a Buffer instead.")}if(Je.isArrayBuffer(h)||Je.isTypedArray(h)){return l&&typeof Blob==="function"?new Blob([h]):Buffer.from(h)}return h}a(c,"convertValue");function d(h,g,_){let v=h;if(h&&!_&&typeof h==="object"){if(Je.endsWith(g,"{}")){g=n?g:g.slice(0,-2);h=JSON.stringify(h)}else if(Je.isArray(h)&&Hwn(h)||(Je.isFileList(h)||Je.endsWith(g,"[]"))&&(v=Je.toArray(h))){g=OTt(g);v.forEach(a(function S(E,b){!(Je.isUndefined(E)||E===null)&&t.append(o===true?tTt([g],b,s):o===null?g:g+"[]",c(E))},"each"));return false}}if(eRe(h)){return true}t.append(tTt(_,g,s),c(h));return false}a(d,"defaultVisitor");const p=[];const f=Object.assign(Vwn,{defaultVisitor:d,convertValue:c,isVisitable:eRe});function m(h,g){if(Je.isUndefined(h))return;if(p.indexOf(h)!==-1){throw Error("Circular reference detected in "+g.join("."))}p.push(h);Je.forEach(h,a(function _(v,S){const E=!(Je.isUndefined(v)||v===null)&&i.call(t,v,Je.isString(S)?S.trim():S,g,f);if(E===true){m(v,g?g.concat(S):[S])}},"each"));p.pop()}a(m,"build");if(!Je.isObject(e)){throw new TypeError("data must be an object")}m(e);return t}a(TJ,"toFormData");function rTt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,a(function r(n){return t[n]},"replacer"))}a(rTt,"encode$1");function PTt(e,t){this._pairs=[];e&&TJ(e,this,t)}a(PTt,"AxiosURLSearchParams");var NTt=PTt.prototype;NTt.append=a(function e(t,r){this._pairs.push([t,r])},"append");NTt.toString=a(function e(t){const r=t?function(n){return t.call(this,n,rTt)}:rTt;return this._pairs.map(a(function n(i){return r(i[0])+"="+r(i[1])},"each"),"").join("&")},"toString");function zwn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}a(zwn,"encode");function cRe(e,t,r){if(!t){return e}const n=r&&r.encode||zwn;const i=r&&r.serialize;let s;if(i){s=i(t,r)}else{s=Je.isURLSearchParams(t)?t.toString():new PTt(t,r).toString(n)}if(s){const o=e.indexOf("#");if(o!==-1){e=e.slice(0,o)}e+=(e.indexOf("?")===-1?"?":"&")+s}return e}a(cRe,"buildURL");var tRe=class{static{a(this,"InterceptorManager")}constructor(){this.handlers=[]}use(t,r,n){this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:false,runWhen:n?n.runWhen:null});return this.handlers.length-1}eject(t){if(this.handlers[t]){this.handlers[t]=null}}clear(){if(this.handlers){this.handlers=[]}}forEach(t){Je.forEach(this.handlers,a(function r(n){if(n!==null){t(n)}},"forEachHandler"))}};var nTt=tRe;var dRe={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var Kwn=iwn["default"].URLSearchParams;var Wwn={isNode:true,classes:{URLSearchParams:Kwn,FormData:_Tt["default"],Blob:typeof Blob!=="undefined"&&Blob||null},protocols:["http","https","file","data"]};var ITt=typeof window!=="undefined"&&typeof document!=="undefined";var Ywn=(e=>{return ITt&&["ReactNative","NativeScript","NS"].indexOf(e)<0})(typeof navigator!=="undefined"&&navigator.product);var Xwn=(()=>{return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})();var Jwn=Object.freeze({__proto__:null,hasBrowserEnv:ITt,hasStandardBrowserWebWorkerEnv:Xwn,hasStandardBrowserEnv:Ywn});var Df={...Jwn,...Wwn};function Qwn(e,t){return TJ(e,new Df.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,s){if(Df.isNode&&Je.isBuffer(r)){this.append(n,r.toString("base64"));return false}return s.defaultVisitor.apply(this,arguments)}},t))}a(Qwn,"toURLEncodedForm");function Zwn(e){return Je.matchAll(/\w+|\[(\w*)]/g,e).map(t=>{return t[0]==="[]"?"":t[1]||t[0]})}a(Zwn,"parsePropPath");function eTn(e){const t={};const r=Object.keys(e);let n;const i=r.length;let s;for(n=0;n<i;n++){s=r[n];t[s]=e[s]}return t}a(eTn,"arrayToObject");function kTt(e){function t(r,n,i,s){let o=r[s++];const u=Number.isFinite(+o);const l=s>=r.length;o=!o&&Je.isArray(i)?i.length:o;if(l){if(Je.hasOwnProp(i,o)){i[o]=[i[o],n]}else{i[o]=n}return!u}if(!i[o]||!Je.isObject(i[o])){i[o]=[]}const c=t(r,n,i[o],s);if(c&&Je.isArray(i[o])){i[o]=eTn(i[o])}return!u}a(t,"buildPath");if(Je.isFormData(e)&&Je.isFunction(e.entries)){const r={};Je.forEachEntry(e,(n,i)=>{t(Zwn(n),i,r,0)});return r}return null}a(kTt,"formDataToJSON");function tTn(e,t,r){if(Je.isString(e)){try{(t||JSON.parse)(e);return Je.trim(e)}catch(n){if(n.name!=="SyntaxError"){throw n}}}return(r||JSON.stringify)(e)}a(tTn,"stringifySafely");var pRe={transitional:dRe,adapter:["xhr","http"],transformRequest:[a(function e(t,r){const n=r.getContentType()||"";const i=n.indexOf("application/json")>-1;const s=Je.isObject(t);if(s&&Je.isHTMLForm(t)){t=new FormData(t)}const o=Je.isFormData(t);if(o){if(!i){return t}return i?JSON.stringify(kTt(t)):t}if(Je.isArrayBuffer(t)||Je.isBuffer(t)||Je.isStream(t)||Je.isFile(t)||Je.isBlob(t)){return t}if(Je.isArrayBufferView(t)){return t.buffer}if(Je.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}let u;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1){return Qwn(t,this.formSerializer).toString()}if((u=Je.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return TJ(u?{"files[]":t}:t,l&&new l,this.formSerializer)}}if(s||i){r.setContentType("application/json",false);return tTn(t)}return t},"transformRequest")],transformResponse:[a(function e(t){const r=this.transitional||pRe.transitional;const n=r&&r.forcedJSONParsing;const i=this.responseType==="json";if(t&&Je.isString(t)&&(n&&!this.responseType||i)){const s=r&&r.silentJSONParsing;const o=!s&&i;try{return JSON.parse(t)}catch(u){if(o){if(u.name==="SyntaxError"){throw yr.from(u,yr.ERR_BAD_RESPONSE,this,null,this.response)}throw u}}}return t},"transformResponse")],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Df.classes.FormData,Blob:Df.classes.Blob},validateStatus:a(function e(t){return t>=200&&t<300},"validateStatus"),headers:{common:{"Accept":"application/json, text/plain, */*","Content-Type":void 0}}};Je.forEach(["delete","get","head","post","put","patch"],e=>{pRe.headers[e]={}});var fRe=pRe;var rTn=Je.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var nTn=a(e=>{const t={};let r;let n;let i;e&&e.split("\n").forEach(a(function s(o){i=o.indexOf(":");r=o.substring(0,i).trim().toLowerCase();n=o.substring(i+1).trim();if(!r||t[r]&&rTn[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}},"parser"));return t},"parseHeaders");var iTt=Symbol("internals");function NF(e){return e&&String(e).trim().toLowerCase()}a(NF,"normalizeHeader");function EJ(e){if(e===false||e==null){return e}return Je.isArray(e)?e.map(EJ):String(e)}a(EJ,"normalizeValue");function iTn(e){const t=Object.create(null);const r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}a(iTn,"parseTokens");var sTn=a(e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()),"isValidHeaderName");function Xxe(e,t,r,n,i){if(Je.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!Je.isString(t))return;if(Je.isString(n)){return t.indexOf(n)!==-1}if(Je.isRegExp(n)){return n.test(t)}}a(Xxe,"matchHeaderValue");function aTn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>{return r.toUpperCase()+n})}a(aTn,"formatHeader");function oTn(e,t){const r=Je.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,s,o){return this[n].call(this,t,i,s,o)},configurable:true})})}a(oTn,"buildAccessors");var uP=class{static{a(this,"AxiosHeaders")}constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function s(u,l,c){const d=NF(l);if(!d){throw new Error("header name must be a non-empty string")}const p=Je.findKey(i,d);if(!p||i[p]===void 0||c===true||c===void 0&&i[p]!==false){i[p||l]=EJ(u)}}a(s,"setHeader");const o=a((u,l)=>Je.forEach(u,(c,d)=>s(c,d,l)),"setHeaders");if(Je.isPlainObject(t)||t instanceof this.constructor){o(t,r)}else if(Je.isString(t)&&(t=t.trim())&&!sTn(t)){o(nTn(t),r)}else{t!=null&&s(r,t,n)}return this}get(t,r){t=NF(t);if(t){const n=Je.findKey(this,t);if(n){const i=this[n];if(!r){return i}if(r===true){return iTn(i)}if(Je.isFunction(r)){return r.call(this,i,n)}if(Je.isRegExp(r)){return r.exec(i)}throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){t=NF(t);if(t){const n=Je.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Xxe(this,this[n],n,r)))}return false}delete(t,r){const n=this;let i=false;function s(o){o=NF(o);if(o){const u=Je.findKey(n,o);if(u&&(!r||Xxe(n,n[u],u,r))){delete n[u];i=true}}}a(s,"deleteHeader");if(Je.isArray(t)){t.forEach(s)}else{s(t)}return i}clear(t){const r=Object.keys(this);let n=r.length;let i=false;while(n--){const s=r[n];if(!t||Xxe(this,this[s],s,t,true)){delete this[s];i=true}}return i}normalize(t){const r=this;const n={};Je.forEach(this,(i,s)=>{const o=Je.findKey(n,s);if(o){r[o]=EJ(i);delete r[s];return}const u=t?aTn(s):String(s).trim();if(u!==s){delete r[s]}r[u]=EJ(i);n[u]=true});return this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);Je.forEach(this,(n,i)=>{n!=null&&n!==false&&(r[i]=t&&Je.isArray(n)?n.join(", "):n)});return r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);r.forEach(i=>n.set(i));return n}static accessor(t){const r=this[iTt]=this[iTt]={accessors:{}};const n=r.accessors;const i=this.prototype;function s(o){const u=NF(o);if(!n[u]){oTn(i,o);n[u]=true}}a(s,"defineAccessor");Je.isArray(t)?t.forEach(s):s(t);return this}};uP.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Je.reduceDescriptors(uP.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});Je.freezeMethods(uP);var Ff=uP;function Jxe(e,t){const r=this||fRe;const n=t||r;const i=Ff.from(n.headers);let s=n.data;Je.forEach(e,a(function o(u){s=u.call(r,s,i.normalize(),t?t.status:void 0)},"transform"));i.normalize();return s}a(Jxe,"transformData");function DTt(e){return!!(e&&e.__CANCEL__)}a(DTt,"isCancel");function nC(e,t,r){yr.call(this,e==null?"canceled":e,yr.ERR_CANCELED,t,r);this.name="CanceledError"}a(nC,"CanceledError");Je.inherits(nC,yr,{__CANCEL__:true});function IF(e,t,r){const n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new yr("Request failed with status code "+r.status,[yr.ERR_BAD_REQUEST,yr.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}a(IF,"settle");function uTn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}a(uTn,"isAbsoluteURL");function lTn(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}a(lTn,"combineURLs");function mRe(e,t){if(e&&!uTn(t)){return lTn(e,t)}return t}a(mRe,"buildFullPath");var SJ="1.6.2";function LTt(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}a(LTt,"parseProtocol");var cTn=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function dTn(e,t,r){const n=r&&r.Blob||Df.classes.Blob;const i=LTt(e);if(t===void 0&&n){t=true}if(i==="data"){e=i.length?e.slice(i.length+1):e;const s=cTn.exec(e);if(!s){throw new yr("Invalid URL",yr.ERR_INVALID_URL)}const o=s[1];const u=s[2];const l=s[3];const c=Buffer.from(decodeURIComponent(l),u?"base64":"utf8");if(t){if(!n){throw new yr("Blob is not supported",yr.ERR_NOT_SUPPORT)}return new n([c],{type:o})}return c}throw new yr("Unsupported protocol "+i,yr.ERR_NOT_SUPPORT)}a(dTn,"fromDataURI");function pTn(e,t){let r=0;const n=1e3/t;let i=null;return a(function s(o,u){const l=Date.now();if(o||l-r>n){if(i){clearTimeout(i);i=null}r=l;return e.apply(null,u)}if(!i){i=setTimeout(()=>{i=null;r=Date.now();return e.apply(null,u)},n-(l-r))}},"throttled")}a(pTn,"throttle");function FTt(e,t){e=e||10;const r=new Array(e);const n=new Array(e);let i=0;let s=0;let o;t=t!==void 0?t:1e3;return a(function u(l){const c=Date.now();const d=n[s];if(!o){o=c}r[i]=l;n[i]=c;let p=s;let f=0;while(p!==i){f+=r[p++];p=p%e}i=(i+1)%e;if(i===s){s=(s+1)%e}if(c-o<t){return}const m=d&&c-d;return m?Math.round(f*1e3/m):void 0},"push")}a(FTt,"speedometer");var _J=Symbol("internals");var rRe=class extends jE["default"].Transform{static{a(this,"AxiosTransformStream")}constructor(t){t=Je.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(u,l)=>{return!Je.isUndefined(l[u])});super({readableHighWaterMark:t.chunkSize});const r=this;const n=this[_J]={length:t.length,timeWindow:t.timeWindow,ticksRate:t.ticksRate,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:false,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};const i=FTt(n.ticksRate*t.samplesCount,n.timeWindow);this.on("newListener",u=>{if(u==="progress"){if(!n.isCaptured){n.isCaptured=true}}});let s=0;n.updateProgress=pTn(a(function u(){const l=n.length;const c=n.bytesSeen;const d=c-s;if(!d||r.destroyed)return;const p=i(d);s=c;process.nextTick(()=>{r.emit("progress",{"loaded":c,"total":l,"progress":l?c/l:void 0,"bytes":d,"rate":p?p:void 0,"estimated":p&&l&&c<=l?(l-c)/p:void 0})})},"throttledHandler"),n.ticksRate);const o=a(()=>{n.updateProgress(true)},"onFinish");this.once("end",o);this.once("error",o)}_read(t){const r=this[_J];if(r.onReadCallback){r.onReadCallback()}return super._read(t)}_transform(t,r,n){const i=this;const s=this[_J];const o=s.maxRate;const u=this.readableHighWaterMark;const l=s.timeWindow;const c=1e3/l;const d=o/c;const p=s.minChunkSize!==false?Math.max(s.minChunkSize,d*.01):0;function f(h,g){const _=Buffer.byteLength(h);s.bytesSeen+=_;s.bytes+=_;if(s.isCaptured){s.updateProgress()}if(i.push(h)){process.nextTick(g)}else{s.onReadCallback=()=>{s.onReadCallback=null;process.nextTick(g)}}}a(f,"pushChunk");const m=a((h,g)=>{const _=Buffer.byteLength(h);let v=null;let S=u;let E;let b=0;if(o){const A=Date.now();if(!s.ts||(b=A-s.ts)>=l){s.ts=A;E=d-s.bytes;s.bytes=E<0?-E:0;b=0}E=d-s.bytes}if(o){if(E<=0){return setTimeout(()=>{g(null,h)},l-b)}if(E<S){S=E}}if(S&&_>S&&_-S>p){v=h.subarray(S);h=h.subarray(0,S)}f(h,v?()=>{process.nextTick(g,null,v)}:g)},"transformChunk");m(t,a(function h(g,_){if(g){return n(g)}if(_){m(_,h)}else{n(null)}},"transformNextChunk"))}setLength(t){this[_J].length=+t;return this}};var sTt=rRe;var{asyncIterator:aTt}=Symbol;var fTn=a(async function*(e){if(e.stream){yield*e.stream()}else if(e.arrayBuffer){yield await e.arrayBuffer()}else if(e[aTt]){yield*e[aTt]()}else{yield e}},"readBlob");var BTt=fTn;var mTn=Je.ALPHABET.ALPHA_DIGIT+"-_";var DF=new gTt.TextEncoder;var GE="\r\n";var hTn=DF.encode(GE);var gTn=2;var nRe=class{static{a(this,"FormDataPart")}constructor(t,r){const{escapeName:n}=this.constructor;const i=Je.isString(r);let s=`Content-Disposition: form-data; name="${n(t)}"${!i&&r.name?`; filename="${n(r.name)}"`:""}${GE}`;if(i){r=DF.encode(String(r).replace(/\r?\n|\r\n?/g,GE))}else{s+=`Content-Type: ${r.type||"application/octet-stream"}${GE}`}this.headers=DF.encode(s+GE);this.contentLength=i?r.byteLength:r.size;this.size=this.headers.byteLength+this.contentLength+gTn;this.name=t;this.value=r}async*encode(){yield this.headers;const{value:t}=this;if(Je.isTypedArray(t)){yield t}else{yield*BTt(t)}yield hTn}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}};var yTn=a((e,t,r)=>{const{tag:n="form-data-boundary",size:i=25,boundary:s=n+"-"+Je.generateString(i,mTn)}=r||{};if(!Je.isFormData(e)){throw TypeError("FormData instance required")}if(s.length<1||s.length>70){throw Error("boundary must be 10-70 characters long")}const o=DF.encode("--"+s+GE);const u=DF.encode("--"+s+"--"+GE+GE);let l=u.byteLength;const c=Array.from(e.entries()).map(([p,f])=>{const m=new nRe(p,f);l+=m.size;return m});l+=o.byteLength*c.length;l=Je.toFiniteNumber(l);const d={"Content-Type":`multipart/form-data; boundary=${s}`};if(Number.isFinite(l)){d["Content-Length"]=l}t&&t(d);return yTt.Readable.from(async function*(){for(const p of c){yield o;yield*p.encode()}yield u}())},"formDataToStream");var _Tn=yTn;var iRe=class extends jE["default"].Transform{static{a(this,"ZlibHeaderTransformStream")}__transform(t,r,n){this.push(t);n()}_transform(t,r,n){if(t.length!==0){this._transform=this.__transform;if(t[0]!==120){const i=Buffer.alloc(2);i[0]=120;i[1]=156;this.push(i,r)}}this.__transform(t,r,n)}};var vTn=iRe;var ETn=a((e,t)=>{return Je.isAsyncFn(e)?function(...r){const n=r.pop();e.apply(this,r).then(i=>{try{t?n(null,...t(i)):n(null,i)}catch(s){n(s)}},n)}:e},"callbackify");var bTn=ETn;var oTt={flush:HE["default"].constants.Z_SYNC_FLUSH,finishFlush:HE["default"].constants.Z_SYNC_FLUSH};var STn={flush:HE["default"].constants.BROTLI_OPERATION_FLUSH,finishFlush:HE["default"].constants.BROTLI_OPERATION_FLUSH};var uTt=Je.isFunction(HE["default"].createBrotliDecompress);var{http:ATn,https:CTn}=uwn["default"];var wTn=/https:?/;var lTt=Df.protocols.map(e=>{return e+":"});function TTn(e){if(e.beforeRedirects.proxy){e.beforeRedirects.proxy(e)}if(e.beforeRedirects.config){e.beforeRedirects.config(e)}}a(TTn,"dispatchBeforeRedirect");function MTt(e,t,r){let n=t;if(!n&&n!==false){const i=QCn.getProxyForUrl(r);if(i){n=new URL(i)}}if(n){if(n.username){n.auth=(n.username||"")+":"+(n.password||"")}if(n.auth){if(n.auth.username||n.auth.password){n.auth=(n.auth.username||"")+":"+(n.auth.password||"")}const s=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+s}e.headers.host=e.hostname+(e.port?":"+e.port:"");const i=n.hostname||n.host;e.hostname=i;e.host=i;e.port=n.port;e.path=r;if(n.protocol){e.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`}}e.beforeRedirects.proxy=a(function i(s){MTt(s,t,s.href)},"beforeRedirect")}a(MTt,"setProxy");var xTn=typeof process!=="undefined"&&Je.kindOf(process)==="process";var RTn=a(e=>{return new Promise((t,r)=>{let n;let i;const s=a((l,c)=>{if(i)return;i=true;n&&n(l,c)},"done");const o=a(l=>{s(l);t(l)},"_resolve");const u=a(l=>{s(l,true);r(l)},"_reject");e(o,u,l=>n=l).catch(u)})},"wrapAsync");var OTn=a(({address:e,family:t})=>{if(!Je.isString(e)){throw TypeError("address must be a string")}return{address:e,family:t||(e.indexOf(".")<0?6:4)}},"resolveFamily");var cTt=a((e,t)=>OTn(Je.isObject(e)?e:{address:e,family:t}),"buildAddressEntry");var PTn=xTn&&a(function e(t){return RTn(a(async function r(n,i,s){let{data:o,lookup:u,family:l}=t;const{responseType:c,responseEncoding:d}=t;const p=t.method.toUpperCase();let f;let m=false;let h;if(u){const he=bTn(u,Fe=>Je.isArray(Fe)?Fe:[Fe]);u=a((Fe,Oe,M)=>{he(Fe,Oe,(Q,fe,B)=>{const ye=Je.isArray(fe)?fe.map(De=>cTt(De)):[cTt(fe,B)];Oe.all?M(Q,ye):M(Q,ye[0].address,ye[0].family)})},"lookup")}const g=new lwn["default"];const _=a(()=>{if(t.cancelToken){t.cancelToken.unsubscribe(v)}if(t.signal){t.signal.removeEventListener("abort",v)}g.removeAllListeners()},"onFinished");s((he,Fe)=>{f=true;if(Fe){m=true;_()}});function v(he){g.emit("abort",!he||he.type?new nC(null,t,h):he)}a(v,"abort");g.once("abort",i);if(t.cancelToken||t.signal){t.cancelToken&&t.cancelToken.subscribe(v);if(t.signal){t.signal.aborted?v():t.signal.addEventListener("abort",v)}}const S=mRe(t.baseURL,t.url);const E=new URL(S,"http://localhost");const b=E.protocol||lTt[0];if(b==="data:"){let he;if(p!=="GET"){return IF(n,i,{status:405,statusText:"method not allowed",headers:{},config:t})}try{he=dTn(t.url,c==="blob",{Blob:t.env&&t.env.Blob})}catch(Fe){throw yr.from(Fe,yr.ERR_BAD_REQUEST,t)}if(c==="text"){he=he.toString(d);if(!d||d==="utf8"){he=Je.stripBOM(he)}}else if(c==="stream"){he=jE["default"].Readable.from(he)}return IF(n,i,{data:he,status:200,statusText:"OK",headers:new Ff,config:t})}if(lTt.indexOf(b)===-1){return i(new yr("Unsupported protocol "+b,yr.ERR_BAD_REQUEST,t))}const A=Ff.from(t.headers).normalize();A.set("User-Agent","axios/"+SJ,false);const C=t.onDownloadProgress;const T=t.onUploadProgress;const O=t.maxRate;let P=void 0;let R=void 0;if(Je.isSpecCompliantForm(o)){const he=A.getContentType(/boundary=([-_\w\d]{10,70})/i);o=_Tn(o,Fe=>{A.set(Fe)},{tag:`axios-${SJ}-boundary`,boundary:he&&he[1]||void 0})}else if(Je.isFormData(o)&&Je.isFunction(o.getHeaders)){A.set(o.getHeaders());if(!A.hasContentLength()){try{const he=await own["default"].promisify(o.getLength).call(o);Number.isFinite(he)&&he>=0&&A.setContentLength(he)}catch(he){}}}else if(Je.isBlob(o)){o.size&&A.setContentType(o.type||"application/octet-stream");A.setContentLength(o.size||0);o=jE["default"].Readable.from(BTt(o))}else if(o&&!Je.isStream(o)){if(Buffer.isBuffer(o));else if(Je.isArrayBuffer(o)){o=Buffer.from(new Uint8Array(o))}else if(Je.isString(o)){o=Buffer.from(o,"utf-8")}else{return i(new yr("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",yr.ERR_BAD_REQUEST,t))}A.setContentLength(o.length,false);if(t.maxBodyLength>-1&&o.length>t.maxBodyLength){return i(new yr("Request body larger than maxBodyLength limit",yr.ERR_BAD_REQUEST,t))}}const I=Je.toFiniteNumber(A.getContentLength());if(Je.isArray(O)){P=O[0];R=O[1]}else{P=R=O}if(o&&(T||P)){if(!Je.isStream(o)){o=jE["default"].Readable.from(o,{objectMode:false})}o=jE["default"].pipeline([o,new sTt({length:I,maxRate:Je.toFiniteNumber(P)})],Je.noop);T&&o.on("progress",he=>{T(Object.assign(he,{upload:true}))})}let D=void 0;if(t.auth){const he=t.auth.username||"";const Fe=t.auth.password||"";D=he+":"+Fe}if(!D&&E.username){const he=E.username;const Fe=E.password;D=he+":"+Fe}D&&A.delete("authorization");let U;try{U=cRe(E.pathname+E.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(he){const Fe=new Error(he.message);Fe.config=t;Fe.url=t.url;Fe.exists=true;return i(Fe)}A.set("Accept-Encoding","gzip, compress, deflate"+(uTt?", br":""),false);const te={path:U,method:p,headers:A.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:D,protocol:b,family:l,beforeRedirect:TTn,beforeRedirects:{}};!Je.isUndefined(u)&&(te.lookup=u);if(t.socketPath){te.socketPath=t.socketPath}else{te.hostname=E.hostname;te.port=E.port;MTt(te,t.proxy,b+"//"+E.hostname+(E.port?":"+E.port:"")+te.path)}let ve;const me=wTn.test(te.protocol);te.agent=me?t.httpsAgent:t.httpAgent;if(t.transport){ve=t.transport}else if(t.maxRedirects===0){ve=me?awn["default"]:swn["default"]}else{if(t.maxRedirects){te.maxRedirects=t.maxRedirects}if(t.beforeRedirect){te.beforeRedirects.config=t.beforeRedirect}ve=me?CTn:ATn}if(t.maxBodyLength>-1){te.maxBodyLength=t.maxBodyLength}else{te.maxBodyLength=Infinity}if(t.insecureHTTPParser){te.insecureHTTPParser=t.insecureHTTPParser}h=ve.request(te,a(function he(Fe){if(h.destroyed)return;const Oe=[Fe];const M=+Fe.headers["content-length"];if(C){const De=new sTt({length:Je.toFiniteNumber(M),maxRate:Je.toFiniteNumber(R)});C&&De.on("progress",$e=>{C(Object.assign($e,{download:true}))});Oe.push(De)}let Q=Fe;const fe=Fe.req||h;if(t.decompress!==false&&Fe.headers["content-encoding"]){if(p==="HEAD"||Fe.statusCode===204){delete Fe.headers["content-encoding"]}switch((Fe.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Oe.push(HE["default"].createUnzip(oTt));delete Fe.headers["content-encoding"];break;case"deflate":Oe.push(new vTn);Oe.push(HE["default"].createUnzip(oTt));delete Fe.headers["content-encoding"];break;case"br":if(uTt){Oe.push(HE["default"].createBrotliDecompress(STn));delete Fe.headers["content-encoding"]}}}Q=Oe.length>1?jE["default"].pipeline(Oe,Je.noop):Oe[0];const B=jE["default"].finished(Q,()=>{B();_()});const ye={status:Fe.statusCode,statusText:Fe.statusMessage,headers:new Ff(Fe.headers),config:t,request:fe};if(c==="stream"){ye.data=Q;IF(n,i,ye)}else{const De=[];let $e=0;Q.on("data",a(function gt(ut){De.push(ut);$e+=ut.length;if(t.maxContentLength>-1&&$e>t.maxContentLength){m=true;Q.destroy();i(new yr("maxContentLength size of "+t.maxContentLength+" exceeded",yr.ERR_BAD_RESPONSE,t,fe))}},"handleStreamData"));Q.on("aborted",a(function gt(){if(m){return}const ut=new yr("maxContentLength size of "+t.maxContentLength+" exceeded",yr.ERR_BAD_RESPONSE,t,fe);Q.destroy(ut);i(ut)},"handlerStreamAborted"));Q.on("error",a(function gt(ut){if(h.destroyed)return;i(yr.from(ut,null,t,fe))},"handleStreamError"));Q.on("end",a(function gt(){try{let ut=De.length===1?De[0]:Buffer.concat(De);if(c!=="arraybuffer"){ut=ut.toString(d);if(!d||d==="utf8"){ut=Je.stripBOM(ut)}}ye.data=ut}catch(ut){return i(yr.from(ut,null,t,ye.request,ye))}IF(n,i,ye)},"handleStreamEnd"))}g.once("abort",De=>{if(!Q.destroyed){Q.emit("error",De);Q.destroy()}})},"handleResponse"));g.once("abort",he=>{i(he);h.destroy(he)});h.on("error",a(function he(Fe){i(yr.from(Fe,null,t,h))},"handleRequestError"));h.on("socket",a(function he(Fe){Fe.setKeepAlive(true,1e3*60)},"handleRequestSocket"));if(t.timeout){const he=parseInt(t.timeout,10);if(Number.isNaN(he)){i(new yr("error trying to parse `config.timeout` to int",yr.ERR_BAD_OPTION_VALUE,t,h));return}h.setTimeout(he,a(function Fe(){if(f)return;let Oe=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const M=t.transitional||dRe;if(t.timeoutErrorMessage){Oe=t.timeoutErrorMessage}i(new yr(Oe,M.clarifyTimeoutError?yr.ETIMEDOUT:yr.ECONNABORTED,t,h));v()},"handleRequestTimeout"))}if(Je.isStream(o)){let he=false;let Fe=false;o.on("end",()=>{he=true});o.once("error",Oe=>{Fe=true;h.destroy(Oe)});o.on("close",()=>{if(!he&&!Fe){v(new nC("Request stream has been aborted",t,h))}});o.pipe(h)}else{h.end(o)}},"dispatchHttpRequest"))},"httpAdapter");var NTn=Df.hasStandardBrowserEnv?{write(e,t,r,n,i,s){const o=[e+"="+encodeURIComponent(t)];Je.isNumber(r)&&o.push("expires="+new Date(r).toGMTString());Je.isString(n)&&o.push("path="+n);Je.isString(i)&&o.push("domain="+i);s===true&&o.push("secure");document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};var ITn=Df.hasStandardBrowserEnv?a(function e(){const t=/(msie|trident)/i.test(navigator.userAgent);const r=document.createElement("a");let n;function i(s){let o=s;if(t){r.setAttribute("href",o);o=r.href}r.setAttribute("href",o);return{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}a(i,"resolveURL");n=i(window.location.href);return a(function s(o){const u=Je.isString(o)?i(o):o;return u.protocol===n.protocol&&u.host===n.host},"isURLSameOrigin")},"standardBrowserEnv")():a(function e(){return a(function t(){return true},"isURLSameOrigin")},"nonStandardBrowserEnv")();function dTt(e,t){let r=0;const n=FTt(50,250);return i=>{const s=i.loaded;const o=i.lengthComputable?i.total:void 0;const u=s-r;const l=n(u);const c=s<=o;r=s;const d={loaded:s,total:o,progress:o?s/o:void 0,bytes:u,rate:l?l:void 0,estimated:l&&o&&c?(o-s)/l:void 0,event:i};d[t?"download":"upload"]=true;e(d)}}a(dTt,"progressEventReducer");var kTn=typeof XMLHttpRequest!=="undefined";var DTn=kTn&&function(e){return new Promise(a(function t(r,n){let i=e.data;const s=Ff.from(e.headers).normalize();let{responseType:o,withXSRFToken:u}=e;let l;function c(){if(e.cancelToken){e.cancelToken.unsubscribe(l)}if(e.signal){e.signal.removeEventListener("abort",l)}}a(c,"done");let d;if(Je.isFormData(i)){if(Df.hasStandardBrowserEnv||Df.hasStandardBrowserWebWorkerEnv){s.setContentType(false)}else if((d=s.getContentType())!==false){const[g,..._]=d?d.split(";").map(v=>v.trim()).filter(Boolean):[];s.setContentType([g||"multipart/form-data",..._].join("; "))}}let p=new XMLHttpRequest;if(e.auth){const g=e.auth.username||"";const _=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(g+":"+_))}const f=mRe(e.baseURL,e.url);p.open(e.method.toUpperCase(),cRe(f,e.params,e.paramsSerializer),true);p.timeout=e.timeout;function m(){if(!p){return}const g=Ff.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders());const _=!o||o==="text"||o==="json"?p.responseText:p.response;const v={data:_,status:p.status,statusText:p.statusText,headers:g,config:e,request:p};IF(a(function S(E){r(E);c()},"_resolve"),a(function S(E){n(E);c()},"_reject"),v);p=null}a(m,"onloadend");if("onloadend"in p){p.onloadend=m}else{p.onreadystatechange=a(function g(){if(!p||p.readyState!==4){return}if(p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)){return}setTimeout(m)},"handleLoad")}p.onabort=a(function g(){if(!p){return}n(new yr("Request aborted",yr.ECONNABORTED,e,p));p=null},"handleAbort");p.onerror=a(function g(){n(new yr("Network Error",yr.ERR_NETWORK,e,p));p=null},"handleError");p.ontimeout=a(function g(){let _=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const v=e.transitional||dRe;if(e.timeoutErrorMessage){_=e.timeoutErrorMessage}n(new yr(_,v.clarifyTimeoutError?yr.ETIMEDOUT:yr.ECONNABORTED,e,p));p=null},"handleTimeout");if(Df.hasStandardBrowserEnv){u&&Je.isFunction(u)&&(u=u(e));if(u||u!==false&&ITn(f)){const g=e.xsrfHeaderName&&e.xsrfCookieName&&NTn.read(e.xsrfCookieName);if(g){s.set(e.xsrfHeaderName,g)}}}i===void 0&&s.setContentType(null);if("setRequestHeader"in p){Je.forEach(s.toJSON(),a(function g(_,v){p.setRequestHeader(v,_)},"setRequestHeader"))}if(!Je.isUndefined(e.withCredentials)){p.withCredentials=!!e.withCredentials}if(o&&o!=="json"){p.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){p.addEventListener("progress",dTt(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&p.upload){p.upload.addEventListener("progress",dTt(e.onUploadProgress))}if(e.cancelToken||e.signal){l=a(g=>{if(!p){return}n(!g||g.type?new nC(null,e,p):g);p.abort();p=null},"onCanceled");e.cancelToken&&e.cancelToken.subscribe(l);if(e.signal){e.signal.aborted?l():e.signal.addEventListener("abort",l)}}const h=LTt(f);if(h&&Df.protocols.indexOf(h)===-1){n(new yr("Unsupported protocol "+h+":",yr.ERR_BAD_REQUEST,e));return}p.send(i||null)},"dispatchXhrRequest"))};var sRe={http:PTn,xhr:DTn};Je.forEach(sRe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}});var pTt=a(e=>`- ${e}`,"renderReason");var LTn=a(e=>Je.isFunction(e)||e===null||e===false,"isResolvedHandle");var qTt={getAdapter:e=>{e=Je.isArray(e)?e:[e];const{length:t}=e;let r;let n;const i={};for(let s=0;s<t;s++){r=e[s];let o;n=r;if(!LTn(r)){n=sRe[(o=String(r)).toLowerCase()];if(n===void 0){throw new yr(`Unknown adapter '${o}'`)}}if(n){break}i[o||"#"+s]=n}if(!n){const s=Object.entries(i).map(([u,l])=>`adapter ${u} `+(l===false?"is not supported by the environment":"is not available in the build"));let o=t?s.length>1?"since :\n"+s.map(pTt).join("\n"):" "+pTt(s[0]):"as no adapter specified";throw new yr(`There is no suitable adapter to dispatch the request `+o,"ERR_NOT_SUPPORT")}return n},adapters:sRe};function Qxe(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new nC(null,e)}}a(Qxe,"throwIfCancellationRequested");function fTt(e){Qxe(e);e.headers=Ff.from(e.headers);e.data=Jxe.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}const t=qTt.getAdapter(e.adapter||fRe.adapter);return t(e).then(a(function r(n){Qxe(e);n.data=Jxe.call(e,e.transformResponse,n);n.headers=Ff.from(n.headers);return n},"onAdapterResolution"),a(function r(n){if(!DTt(n)){Qxe(e);if(n&&n.response){n.response.data=Jxe.call(e,e.transformResponse,n.response);n.response.headers=Ff.from(n.response.headers)}}return Promise.reject(n)},"onAdapterRejection"))}a(fTt,"dispatchRequest");var mTt=a(e=>e instanceof Ff?e.toJSON():e,"headersToObject");function lP(e,t){t=t||{};const r={};function n(c,d,p){if(Je.isPlainObject(c)&&Je.isPlainObject(d)){return Je.merge.call({caseless:p},c,d)}else if(Je.isPlainObject(d)){return Je.merge({},d)}else if(Je.isArray(d)){return d.slice()}return d}a(n,"getMergedValue");function i(c,d,p){if(!Je.isUndefined(d)){return n(c,d,p)}else if(!Je.isUndefined(c)){return n(void 0,c,p)}}a(i,"mergeDeepProperties");function s(c,d){if(!Je.isUndefined(d)){return n(void 0,d)}}a(s,"valueFromConfig2");function o(c,d){if(!Je.isUndefined(d)){return n(void 0,d)}else if(!Je.isUndefined(c)){return n(void 0,c)}}a(o,"defaultToConfig2");function u(c,d,p){if(p in t){return n(c,d)}else if(p in e){return n(void 0,c)}}a(u,"mergeDirectKeys");const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u,headers:(c,d)=>i(mTt(c),mTt(d),true)};Je.forEach(Object.keys(Object.assign({},e,t)),a(function c(d){const p=l[d]||i;const f=p(e[d],t[d],d);Je.isUndefined(f)&&p!==u||(r[d]=f)},"computeConfigValue"));return r}a(lP,"mergeConfig");var hRe={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{hRe[e]=a(function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e},"validator")});var hTt={};hRe.transitional=a(function e(t,r,n){function i(s,o){return"[Axios v"+SJ+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}a(i,"formatMessage");return(s,o,u)=>{if(t===false){throw new yr(i(o," has been removed"+(r?" in "+r:"")),yr.ERR_DEPRECATED)}if(r&&!hTt[o]){hTt[o]=true;console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(s,o,u):true}},"transitional");function FTn(e,t,r){if(typeof e!=="object"){throw new yr("options must be an object",yr.ERR_BAD_OPTION_VALUE)}const n=Object.keys(e);let i=n.length;while(i-- >0){const s=n[i];const o=t[s];if(o){const u=e[s];const l=u===void 0||o(u,s,e);if(l!==true){throw new yr("option "+s+" must be "+l,yr.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new yr("Unknown option "+s,yr.ERR_BAD_OPTION)}}}a(FTn,"assertOptions");var aRe={assertOptions:FTn,validators:hRe};var $E=aRe.validators;var cP=class{static{a(this,"Axios")}constructor(t){this.defaults=t;this.interceptors={request:new nTt,response:new nTt}}request(t,r){if(typeof t==="string"){r=r||{};r.url=t}else{r=t||{}}r=lP(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:s}=r;if(n!==void 0){aRe.assertOptions(n,{silentJSONParsing:$E.transitional($E.boolean),forcedJSONParsing:$E.transitional($E.boolean),clarifyTimeoutError:$E.transitional($E.boolean)},false)}if(i!=null){if(Je.isFunction(i)){r.paramsSerializer={serialize:i}}else{aRe.assertOptions(i,{encode:$E.function,serialize:$E.function},true)}}r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=s&&Je.merge(s.common,s[r.method]);s&&Je.forEach(["delete","get","head","post","put","patch","common"],h=>{delete s[h]});r.headers=Ff.concat(o,s);const u=[];let l=true;this.interceptors.request.forEach(a(function h(g){if(typeof g.runWhen==="function"&&g.runWhen(r)===false){return}l=l&&g.synchronous;u.unshift(g.fulfilled,g.rejected)},"unshiftRequestInterceptors"));const c=[];this.interceptors.response.forEach(a(function h(g){c.push(g.fulfilled,g.rejected)},"pushResponseInterceptors"));let d;let p=0;let f;if(!l){const h=[fTt.bind(this),void 0];h.unshift.apply(h,u);h.push.apply(h,c);f=h.length;d=Promise.resolve(r);while(p<f){d=d.then(h[p++],h[p++])}return d}f=u.length;let m=r;p=0;while(p<f){const h=u[p++];const g=u[p++];try{m=h(m)}catch(_){g.call(this,_);break}}try{d=fTt.call(this,m)}catch(h){return Promise.reject(h)}p=0;f=c.length;while(p<f){d=d.then(c[p++],c[p++])}return d}getUri(t){t=lP(this.defaults,t);const r=mRe(t.baseURL,t.url);return cRe(r,t.params,t.paramsSerializer)}};Je.forEach(["delete","get","head","options"],a(function e(t){cP.prototype[t]=function(r,n){return this.request(lP(n||{},{method:t,url:r,data:(n||{}).data}))}},"forEachMethodNoData"));Je.forEach(["post","put","patch"],a(function e(t){function r(n){return a(function i(s,o,u){return this.request(lP(u||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))},"httpMethod")}a(r,"generateHTTPMethod");cP.prototype[t]=r();cP.prototype[t+"Form"]=r(true)},"forEachMethodWithData"));var bJ=cP;var oRe=class e{static{a(this,"CancelToken")}constructor(t){if(typeof t!=="function"){throw new TypeError("executor must be a function.")}let r;this.promise=new Promise(a(function i(s){r=s},"promiseExecutor"));const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;while(s-- >0){n._listeners[s](i)}n._listeners=null});this.promise.then=i=>{let s;const o=new Promise(u=>{n.subscribe(u);s=u}).then(i);o.cancel=a(function u(){n.unsubscribe(s)},"reject");return o};t(a(function i(s,o,u){if(n.reason){return}n.reason=new nC(s,o,u);r(n.reason)},"cancel"))}throwIfRequested(){if(this.reason){throw this.reason}}subscribe(t){if(this.reason){t(this.reason);return}if(this._listeners){this._listeners.push(t)}else{this._listeners=[t]}}unsubscribe(t){if(!this._listeners){return}const r=this._listeners.indexOf(t);if(r!==-1){this._listeners.splice(r,1)}}static source(){let t;const r=new e(a(function n(i){t=i},"executor"));return{token:r,cancel:t}}};var BTn=oRe;function MTn(e){return a(function t(r){return e.apply(null,r)},"wrap")}a(MTn,"spread");function qTn(e){return Je.isObject(e)&&e.isAxiosError===true}a(qTn,"isAxiosError");var uRe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(uRe).forEach(([e,t])=>{uRe[t]=e});var UTn=uRe;function UTt(e){const t=new bJ(e);const r=vTt(bJ.prototype.request,t);Je.extend(r,bJ.prototype,t,{allOwnKeys:true});Je.extend(r,t,null,{allOwnKeys:true});r.create=a(function n(i){return UTt(lP(e,i))},"create");return r}a(UTt,"createInstance");var Lo=UTt(fRe);Lo.Axios=bJ;Lo.CanceledError=nC;Lo.CancelToken=BTn;Lo.isCancel=DTt;Lo.VERSION=SJ;Lo.toFormData=TJ;Lo.AxiosError=yr;Lo.Cancel=Lo.CanceledError;Lo.all=a(function e(t){return Promise.all(t)},"all");Lo.spread=MTn;Lo.isAxiosError=qTn;Lo.mergeConfig=lP;Lo.AxiosHeaders=Ff;Lo.formToJSON=e=>kTt(Je.isHTMLForm(e)?new FormData(e):e);Lo.getAdapter=qTt.getAdapter;Lo.HttpStatusCode=UTn;Lo.default=Lo;$Tt.exports=Lo});var OJ=y(RJ=>{"use strict";Object.defineProperty(RJ,"__esModule",{value:true});RJ.CredentialsMethod=void 0;var jTt;(function(e){e["None"]="none";e["ApiToken"]="api_token";e["ClientCredentials"]="client_credentials"})(jTt||(RJ.CredentialsMethod=jTt={}))});var sC=y(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:true});Fo.FgaRequiredParamError=Fo.FgaValidationError=Fo.FgaApiAuthenticationError=Fo.FgaApiInternalError=Fo.FgaApiRateLimitExceededError=Fo.FgaApiNotFoundError=Fo.FgaApiValidationError=Fo.FgaApiError=Fo.FgaError=void 0;var pP=class extends Error{static{a(this,"FgaError")}constructor(t,r){super(r||typeof t==="string"?t:`FGA Error${(t===null||t===void 0?void 0:t.message)?`: ${t.message}`:""}`);this.name="FgaError";if(t===null||t===void 0?void 0:t.stack){this.stack=t.stack}}};Fo.FgaError=pP;function NJ(e){let t=(e||"").split("/");if(t.length<4){t=[]}const r=t[2]||"";const n=t[3]||"";return{storeId:r,endpointCategory:n}}a(NJ,"getRequestMetadataFromPath");var GTt="fga-request-id";function SRe(e){return e.response?Object.fromEntries(Object.entries(e.response.headers).map(([t,r])=>[t.toLowerCase(),r])):{}}a(SRe,"getResponseHeaders");var iC=class extends pP{static{a(this,"FgaApiError")}constructor(t,r){var n,i,s,o,u,l,c,d,p,f;super(r?r:t);this.name="FgaApiError";this.statusCode=(n=t.response)===null||n===void 0?void 0:n.status;this.statusText=(i=t.response)===null||i===void 0?void 0:i.statusText;this.requestData=(s=t.config)===null||s===void 0?void 0:s.data;this.requestURL=(o=t.config)===null||o===void 0?void 0:o.url;this.method=(u=t.config)===null||u===void 0?void 0:u.method;const{storeId:m,endpointCategory:h}=NJ((l=t.request)===null||l===void 0?void 0:l.path);this.storeId=m;this.endpointCategory=h;this.apiErrorMessage=(d=(c=t.response)===null||c===void 0?void 0:c.data)===null||d===void 0?void 0:d.message;this.responseData=(p=t.response)===null||p===void 0?void 0:p.data;this.responseHeader=(f=t.response)===null||f===void 0?void 0:f.headers;const g=SRe(t);this.requestId=g[GTt];if(t===null||t===void 0?void 0:t.stack){this.stack=t.stack}}};Fo.FgaApiError=iC;var gRe=class extends iC{static{a(this,"FgaApiValidationError")}constructor(t,r){var n,i,s,o,u,l,c,d;super(t);this.name="FgaApiValidationError";this.apiErrorCode=(i=(n=t.response)===null||n===void 0?void 0:n.data)===null||i===void 0?void 0:i.code;const{endpointCategory:p}=NJ((s=t.request)===null||s===void 0?void 0:s.path);this.message=r?r:((u=(o=t.response)===null||o===void 0?void 0:o.data)===null||u===void 0?void 0:u.message)?`FGA API Validation Error: ${(l=t.config)===null||l===void 0?void 0:l.method} ${p} : Error ${(d=(c=t.response)===null||c===void 0?void 0:c.data)===null||d===void 0?void 0:d.message}`:t.message}};Fo.FgaApiValidationError=gRe;var yRe=class extends iC{static{a(this,"FgaApiNotFoundError")}constructor(t,r){var n,i,s,o,u,l,c;super(t);this.name="FgaApiNotFoundError";this.apiErrorCode=(i=(n=t.response)===null||n===void 0?void 0:n.data)===null||i===void 0?void 0:i.code;this.message=r?r:((o=(s=t.response)===null||s===void 0?void 0:s.data)===null||o===void 0?void 0:o.message)?`FGA API NotFound Error: ${(u=t.config)===null||u===void 0?void 0:u.method} : Error ${(c=(l=t.response)===null||l===void 0?void 0:l.data)===null||c===void 0?void 0:c.message}`:t.message}};Fo.FgaApiNotFoundError=yRe;var _Re=class extends iC{static{a(this,"FgaApiRateLimitExceededError")}constructor(t,r){var n,i,s;super(t);this.name="FgaApiRateLimitExceededError";this.apiErrorCode=(i=(n=t.response)===null||n===void 0?void 0:n.data)===null||i===void 0?void 0:i.code;const{endpointCategory:o}=NJ((s=t.request)===null||s===void 0?void 0:s.path);const u=SRe(t);this.message=r?r:`FGA API Rate Limit Error for ${this.method} ${o}`}};Fo.FgaApiRateLimitExceededError=_Re;var vRe=class extends iC{static{a(this,"FgaApiInternalError")}constructor(t,r){var n,i,s,o,u,l,c,d;super(t);this.name="FgaApiInternalError";const{endpointCategory:p}=NJ((n=t.request)===null||n===void 0?void 0:n.path);this.apiErrorCode=(s=(i=t.response)===null||i===void 0?void 0:i.data)===null||s===void 0?void 0:s.code;this.message=r?r:((u=(o=t.response)===null||o===void 0?void 0:o.data)===null||u===void 0?void 0:u.message)?`FGA API Internal Error: ${(l=t.config)===null||l===void 0?void 0:l.method} ${p} : Error ${(d=(c=t.response)===null||c===void 0?void 0:c.data)===null||d===void 0?void 0:d.message}`:t.message}};Fo.FgaApiInternalError=vRe;var ERe=class extends pP{static{a(this,"FgaApiAuthenticationError")}constructor(t){var r,n,i,s,o,u,l,c,d,p;super(`FGA Authentication Error.${((r=t.response)===null||r===void 0?void 0:r.statusText)?` ${t.response.statusText}`:""}`);this.name="FgaApiAuthenticationError";this.statusCode=(n=t.response)===null||n===void 0?void 0:n.status;this.statusText=(i=t.response)===null||i===void 0?void 0:i.statusText;this.requestURL=(s=t.config)===null||s===void 0?void 0:s.url;this.method=(o=t.config)===null||o===void 0?void 0:o.method;this.responseData=(u=t.response)===null||u===void 0?void 0:u.data;this.responseHeader=(l=t.response)===null||l===void 0?void 0:l.headers;this.apiErrorCode=(d=(c=t.response)===null||c===void 0?void 0:c.data)===null||d===void 0?void 0:d.code;const f=SRe(t);this.requestId=f[GTt];let m;try{m=JSON.parse(((p=t.config)===null||p===void 0?void 0:p.data)||"{}")}catch(h){}this.clientId=m===null||m===void 0?void 0:m.client_id;this.audience=m===null||m===void 0?void 0:m.audience;this.grantType=m===null||m===void 0?void 0:m.grant_type;if(t===null||t===void 0?void 0:t.stack){this.stack=t.stack}}};Fo.FgaApiAuthenticationError=ERe;var PJ=class extends pP{static{a(this,"FgaValidationError")}constructor(t,r){super(r);this.field=t;this.name="FgaValidationError"}};Fo.FgaValidationError=PJ;var bRe=class extends PJ{static{a(this,"FgaRequiredParamError")}constructor(t,r,n){super(r,n);this.functionName=t;this.name="FgaRequiredParamError"}};Fo.FgaRequiredParamError=bRe});var FF=y(VE=>{"use strict";Object.defineProperty(VE,"__esModule",{value:true});VE.isWellFormedUlidString=VE.isWellFormedUriString=VE.assertParamExists=void 0;var $Tn=sC();var jTn=a(function(e,t,r){if(r===null||r===void 0){throw new $Tn.FgaRequiredParamError(e,t,`Required parameter ${t} was null or undefined when calling ${e}.`)}},"assertParamExists");VE.assertParamExists=jTn;var GTn=a(e=>{try{const t=new URL(e);return(t.toString()===e||t.toString()===`${e}/`)&&(t.protocol==="https:"||t.protocol==="http:")}catch(t){return false}},"isWellFormedUriString");VE.isWellFormedUriString=GTn;var HTn=a(e=>{var t;const r=/^[0-7][0-9A-HJKMNP-TV-Z]{25}$/;return!!(typeof e==="string"&&((t=e.match(r))===null||t===void 0?void 0:t.length))},"isWellFormedUlidString");VE.isWellFormedUlidString=HTn});var CRe=y(fP=>{"use strict";Object.defineProperty(fP,"__esModule",{value:true});fP.Configuration=fP.GetDefaultRetryParams=void 0;var BF=OJ();var ARe=sC();var IJ=FF();var VTn=15;var zTn=100;var KTn="openfga-sdk js/0.3.0";function WTn(e=VTn,t=zTn){return{maxRetry:e,minWaitInMs:t}}a(WTn,"GetDefaultRetryParams");fP.GetDefaultRetryParams=WTn;var kJ=class{static{a(this,"Configuration")}constructor(t={}){this.apiScheme="https";this.getBasePath=()=>`${this.apiScheme}://${this.apiHost}`;this.apiScheme=t.apiScheme||this.apiScheme;this.apiHost=t.apiHost;this.storeId=t.storeId;const r=t.credentials;if(r){switch(r===null||r===void 0?void 0:r.method){case BF.CredentialsMethod.ApiToken:this.credentials={method:r.method,config:{token:r.config.token,headerName:"Authorization",headerValuePrefix:"Bearer"}};break;case BF.CredentialsMethod.ClientCredentials:this.credentials={method:BF.CredentialsMethod.ClientCredentials,config:{clientId:r.config.clientId,clientSecret:r.config.clientSecret,apiAudience:r.config.apiAudience,apiTokenIssuer:r.config.apiTokenIssuer}};break;case BF.CredentialsMethod.None:default:this.credentials={method:BF.CredentialsMethod.None};break}}const n=t.baseOptions||{};n.headers=n.headers||{};if(typeof process==="object"&&process.title==="node"&&!n.headers["User-Agent"]){n.headers["User-Agent"]=KTn}this.baseOptions=n;this.retryParams=t.retryParams}isValid(){var t;(0,IJ.assertParamExists)("Configuration","apiScheme",this.apiScheme);(0,IJ.assertParamExists)("Configuration","apiHost",this.apiHost);if(!(0,IJ.isWellFormedUriString)(this.getBasePath())){throw new ARe.FgaValidationError(`Configuration.apiScheme (${this.apiScheme}) and Configuration.apiHost (${this.apiHost}) do not form a valid URI (${this.getBasePath()})`)}if(this.storeId&&!(0,IJ.isWellFormedUlidString)(this.storeId)){throw new ARe.FgaValidationError("storeId")}if(((t=this.retryParams)===null||t===void 0?void 0:t.maxRetry)&&this.retryParams.maxRetry>15){throw new ARe.FgaValidationError("Configuration.retryParams.maxRetry exceeds maximum allowed limit of 15")}return true}};fP.Configuration=kJ;kJ.sdkVersion="0.3.0"});var HTt=y(DJ=>{"use strict";Object.defineProperty(DJ,"__esModule",{value:true});DJ.assertNever=void 0;function YTn(e){throw new Error(`Assertion failed. Unacceptable value: '${e}'`)}a(YTn,"assertNever");DJ.assertNever=YTn});var VTt=y(LJ=>{"use strict";Object.defineProperty(LJ,"__esModule",{value:true});LJ.chunkArray=void 0;function XTn(e,t){const r=[];const n=[...e];while(n.length>0){r.push(n.splice(0,t))}return r}a(XTn,"chunkArray");LJ.chunkArray=XTn});var KTt=y(mP=>{"use strict";Object.defineProperty(mP,"__esModule",{value:true});mP.generateRandomIdWithNonUniqueFallback=mP.generateRandomId=void 0;var FJ=require("crypto");function zTt(){if(typeof FJ.randomUUID==="function"){return(0,FJ.randomUUID)()}if(typeof FJ.randomBytes==="function"){return(0,FJ.randomBytes)(20).toString("hex")}return}a(zTt,"generateRandomId");mP.generateRandomId=zTt;function JTn(){return zTt()||"00000000-0000-0000-0000-000000000000"}a(JTn,"generateRandomIdWithNonUniqueFallback");mP.generateRandomIdWithNonUniqueFallback=JTn});var WTt=y(BJ=>{"use strict";Object.defineProperty(BJ,"__esModule",{value:true});BJ.setHeaderIfNotSet=void 0;function QTn(e,t,r){if(!e[t]&&r){e[t]=r}}a(QTn,"setHeaderIfNotSet");BJ.setHeaderIfNotSet=QTn});var YTt=y(MJ=>{"use strict";Object.defineProperty(MJ,"__esModule",{value:true});MJ.setNotEnumerableProperty=void 0;function ZTn(e,t,r){Object.defineProperty(e,t,{enumerable:false,writable:false,value:r})}a(ZTn,"setNotEnumerableProperty");MJ.setNotEnumerableProperty=ZTn});var wRe=y(fh=>{"use strict";var exn=fh&&fh.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var MF=fh&&fh.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))exn(t,e,r)};Object.defineProperty(fh,"__esModule",{value:true});MF(HTt(),fh);MF(VTt(),fh);MF(KTt(),fh);MF(WTt(),fh);MF(YTt(),fh)});var xRe=y(eu=>{"use strict";var TRe=eu&&eu.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}a(i,"adopt");return new(r||(r=Promise))(function(s,o){function u(d){try{c(n.next(d))}catch(p){o(p)}}a(u,"fulfilled");function l(d){try{c(n["throw"](d))}catch(p){o(p)}}a(l,"rejected");function c(d){d.done?s(d.value):i(d.value).then(u,l)}a(c,"step");c((n=n.apply(e,t||[])).next())})};Object.defineProperty(eu,"__esModule",{value:true});eu.createRequestFunction=eu.attemptHttpRequest=eu.toPathString=eu.serializeDataIfNeeded=eu.setSearchParams=eu.setBearerAuthToObject=eu.DUMMY_BASE_URL=void 0;var txn=qJ();var aC=sC();var rxn=wRe();eu.DUMMY_BASE_URL="https://example.com";var nxn=a(function(e,t){return TRe(this,void 0,void 0,function*(){const r=yield t.getAccessTokenHeader();if(r&&!e[r.name]){e[r.name]=r.value}})},"setBearerAuthToObject");eu.setBearerAuthToObject=nxn;var ixn=a(function(e,...t){const r=new URLSearchParams(e.search);for(const n of t){for(const i in n){if(Array.isArray(n[i])){r.delete(i);for(const s of n[i]){r.append(i,s)}}else{r.set(i,n[i])}}}e.search=r.toString()},"setSearchParams");eu.setSearchParams=ixn;var sxn=a(e=>{const t=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return e!==null&&(t.test(e)||e.toLowerCase()==="application/json-patch+json")},"isJsonMime");var axn=a(function(e,t){const r=typeof e!=="string";const n=r?sxn(t.headers["Content-Type"]):r;return n?JSON.stringify(e!==void 0?e:{}):e||""},"serializeDataIfNeeded");eu.serializeDataIfNeeded=axn;var oxn=a(function(e){return e.pathname+e.search+e.hash},"toPathString");eu.toPathString=oxn;function uxn(e){return e&&typeof e==="object"&&e.isAxiosError===true}a(uxn,"isAxiosError");function lxn(e,t){const r=Math.ceil(Math.pow(2,e)*t);const n=Math.ceil(Math.pow(2,e+1)*t);return Math.floor(Math.random()*(n-r)+r)}a(lxn,"randomTime");function XTt(e,t,r){var n;return TRe(this,void 0,void 0,function*(){let i=0;do{i++;try{return yield r(e)}catch(s){if(!uxn(s)){throw new aC.FgaError(s)}const o=(n=s===null||s===void 0?void 0:s.response)===null||n===void 0?void 0:n.status;if(o===400||o===422){throw new aC.FgaApiValidationError(s)}else if(o===401||o===403){throw new aC.FgaApiAuthenticationError(s)}else if(o===404){throw new aC.FgaApiNotFoundError(s)}else if(o===429||o>=500){if(i>=t.maxRetry){if(o===429){throw new aC.FgaApiRateLimitExceededError(s)}else{throw new aC.FgaApiInternalError(s)}}yield new Promise(u=>setTimeout(u,lxn(i,t.minWaitInMs)))}else{throw new aC.FgaApiError(s)}}}while(i<t.maxRetry+1)})}a(XTt,"attemptHttpRequest");eu.attemptHttpRequest=XTt;var cxn=a(function(e,t,r,n){var i,s;r.isValid();const o=((i=e.options)===null||i===void 0?void 0:i.retryParams)?(s=e.options)===null||s===void 0?void 0:s.retryParams:r.retryParams;const u=o?o.maxRetry:0;const l=o?o.minWaitInMs:0;if(!n){n=txn.Credentials.init(r)}return(c=t)=>TRe(this,void 0,void 0,function*(){yield(0,eu.setBearerAuthToObject)(e.options.headers,n);const d=Object.assign(Object.assign({},e.options),{url:r.getBasePath()+e.url});const p=yield XTt(d,{maxRetry:u,minWaitInMs:l},c);const f=typeof(p===null||p===void 0?void 0:p.data)==="undefined"?{}:p===null||p===void 0?void 0:p.data;const m=Object.assign({},f);(0,rxn.setNotEnumerableProperty)(m,"$response",p);return m})},"createRequestFunction");eu.createRequestFunction=cxn});var QTt=y(hP=>{"use strict";var RRe=hP&&hP.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}a(i,"adopt");return new(r||(r=Promise))(function(s,o){function u(d){try{c(n.next(d))}catch(p){o(p)}}a(u,"fulfilled");function l(d){try{c(n["throw"](d))}catch(p){o(p)}}a(l,"rejected");function c(d){d.done?s(d.value):i(d.value).then(u,l)}a(c,"step");c((n=n.apply(e,t||[])).next())})};Object.defineProperty(hP,"__esModule",{value:true});hP.Credentials=void 0;var JTt=xJ();var zE=FF();var ORe=sC();var dxn=xRe();var Bf=OJ();var PRe=class e{static{a(this,"Credentials")}static init(t){return new e(t.credentials)}constructor(t,r=JTt.default){this.authConfig=t;this.axios=r;this.initConfig();this.isValid()}initConfig(){var t;switch((t=this.authConfig)===null||t===void 0?void 0:t.method){case Bf.CredentialsMethod.ApiToken:if(this.authConfig.config){if(!this.authConfig.config.headerName){this.authConfig.config.headerName="Authorization"}if(!this.authConfig.config.headerValuePrefix){this.authConfig.config.headerValuePrefix="Bearer"}}break;case Bf.CredentialsMethod.ClientCredentials:case Bf.CredentialsMethod.None:default:break}}isValid(){var t,r,n,i,s,o,u,l,c;const{authConfig:d}=this;switch(d===null||d===void 0?void 0:d.method){case Bf.CredentialsMethod.None:break;case Bf.CredentialsMethod.ApiToken:(0,zE.assertParamExists)("Credentials","config.token",(t=d.config)===null||t===void 0?void 0:t.token);(0,zE.assertParamExists)("Credentials","config.headerName",(r=d.config)===null||r===void 0?void 0:r.headerName);(0,zE.assertParamExists)("Credentials","config.headerName",(n=d.config)===null||n===void 0?void 0:n.headerName);break;case Bf.CredentialsMethod.ClientCredentials:(0,zE.assertParamExists)("Credentials","config.clientId",(i=d.config)===null||i===void 0?void 0:i.clientId);(0,zE.assertParamExists)("Credentials","config.clientSecret",(s=d.config)===null||s===void 0?void 0:s.clientSecret);(0,zE.assertParamExists)("Credentials","config.apiTokenIssuer",(o=d.config)===null||o===void 0?void 0:o.apiTokenIssuer);(0,zE.assertParamExists)("Credentials","config.apiAudience",(u=d.config)===null||u===void 0?void 0:u.apiAudience);if(!(0,zE.isWellFormedUriString)(`https://${(l=d.config)===null||l===void 0?void 0:l.apiTokenIssuer}`)){throw new ORe.FgaValidationError(`Configuration.apiTokenIssuer does not form a valid URI (https://${(c=d.config)===null||c===void 0?void 0:c.apiTokenIssuer})`)}break}}getAccessTokenHeader(){var t;return RRe(this,void 0,void 0,function*(){const r=yield this.getAccessTokenValue();switch((t=this.authConfig)===null||t===void 0?void 0:t.method){case Bf.CredentialsMethod.None:return;case Bf.CredentialsMethod.ApiToken:return{name:this.authConfig.config.headerName,value:`${this.authConfig.config.headerValuePrefix?`${this.authConfig.config.headerValuePrefix} `:""}${r}`};case Bf.CredentialsMethod.ClientCredentials:return{name:"Authorization",value:`Bearer ${r}`}}})}getAccessTokenValue(){var t;return RRe(this,void 0,void 0,function*(){switch((t=this.authConfig)===null||t===void 0?void 0:t.method){case Bf.CredentialsMethod.None:return;case Bf.CredentialsMethod.ApiToken:return this.authConfig.config.token;case Bf.CredentialsMethod.ClientCredentials:if(this.accessToken&&(!this.accessTokenExpiryDate||this.accessTokenExpiryDate>new Date)){return this.accessToken}return this.refreshAccessToken()}})}refreshAccessToken(){var t;return RRe(this,void 0,void 0,function*(){const r=(t=this.authConfig)===null||t===void 0?void 0:t.config;try{const n=yield(0,dxn.attemptHttpRequest)({url:`https://${r.apiTokenIssuer}/oauth/token`,method:"post",data:{client_id:r.clientId,client_secret:r.clientSecret,audience:r.apiAudience,grant_type:"client_credentials"}},{maxRetry:3,minWaitInMs:100},JTt.default);if(n){this.accessToken=n.data.access_token;this.accessTokenExpiryDate=new Date(Date.now()+n.data.expires_in*1e3)}return this.accessToken}catch(n){if(n instanceof ORe.FgaApiError){n.constructor=ORe.FgaApiAuthenticationError;n.name="FgaApiAuthenticationError";n.clientId=r.clientId;n.audience=r.apiAudience;n.grantType="client_credentials"}throw n}})}};hP.Credentials=PRe});var qJ=y(KE=>{"use strict";var pxn=KE&&KE.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var ZTt=KE&&KE.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))pxn(t,e,r)};Object.defineProperty(KE,"__esModule",{value:true});ZTt(QTt(),KE);ZTt(OJ(),KE)});var IRe=y(UJ=>{"use strict";Object.defineProperty(UJ,"__esModule",{value:true});UJ.BaseAPI=void 0;var fxn=xJ();var mxn=require("http");var hxn=require("https");var ext=CRe();var gxn=qJ();var yxn=1e4;var NRe=class{static{a(this,"BaseAPI")}constructor(t,r){var n;this.axios=r;if(t instanceof ext.Configuration){this.configuration=t}else{this.configuration=new ext.Configuration(t)}this.configuration.isValid();this.credentials=gxn.Credentials.init(this.configuration);if(!this.axios){const i=new mxn.Agent({keepAlive:true});const s=new hxn.Agent({keepAlive:true});this.axios=fxn.default.create({httpAgent:i,httpsAgent:s,timeout:yxn,headers:(n=this.configuration.baseOptions)===null||n===void 0?void 0:n.headers})}}get storeId(){return this.configuration.storeId}set storeId(t){this.configuration.storeId=t}};UJ.BaseAPI=NRe});var DRe=y(Ts=>{"use strict";var As=Ts&&Ts.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}a(i,"adopt");return new(r||(r=Promise))(function(s,o){function u(d){try{c(n.next(d))}catch(p){o(p)}}a(u,"fulfilled");function l(d){try{c(n["throw"](d))}catch(p){o(p)}}a(l,"rejected");function c(d){d.done?s(d.value):i(d.value).then(u,l)}a(c,"step");c((n=n.apply(e,t||[])).next())})};Object.defineProperty(Ts,"__esModule",{value:true});Ts.OpenFgaApi=Ts.OpenFgaApiFactory=Ts.OpenFgaApiFp=Ts.OpenFgaApiAxiosParamCreator=void 0;var Tc=xJ();var _xn=IRe();var sr=xRe();var za=FF();var vxn=a(function(e,t){return{check:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("check","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/check".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),createStore:(r,n={})=>As(this,void 0,void 0,function*(){const i="/stores";const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),deleteStore:(r={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("Configuration","storeId",e.storeId);const n="/stores/{store_id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const i=new URL(n,sr.DUMMY_BASE_URL);let s;if(e){s=e.baseOptions}const o=Object.assign(Object.assign({method:"DELETE"},s),r);const u={};const l={};(0,sr.setSearchParams)(i,l,r.query);o.headers=Object.assign(Object.assign({},u),r.headers);return{url:(0,sr.toPathString)(i),options:o}}),expand:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("expand","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/expand".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),getStore:(r={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("Configuration","storeId",e.storeId);const n="/stores/{store_id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const i=new URL(n,sr.DUMMY_BASE_URL);let s;if(e){s=e.baseOptions}const o=Object.assign(Object.assign({method:"GET"},s),r);const u={};const l={};(0,sr.setSearchParams)(i,l,r.query);o.headers=Object.assign(Object.assign({},u),r.headers);return{url:(0,sr.toPathString)(i),options:o}}),listObjects:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("listObjects","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/list-objects".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),listStores:(r,n,i={})=>As(this,void 0,void 0,function*(){const s="/stores";const o=new URL(s,sr.DUMMY_BASE_URL);let u;if(e){u=e.baseOptions}const l=Object.assign(Object.assign({method:"GET"},u),i);const c={};const d={};if(r!==void 0){d["page_size"]=r}if(n!==void 0){d["continuation_token"]=n}(0,sr.setSearchParams)(o,d,i.query);l.headers=Object.assign(Object.assign({},c),i.headers);return{url:(0,sr.toPathString)(o),options:l}}),read:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("read","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/read".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),readAssertions:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("readAssertions","authorizationModelId",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/assertions/{authorization_model_id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId))).replace(`{${"authorization_model_id"}}`,encodeURIComponent(String(r)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"GET"},o),n);const l={};const c={};(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);return{url:(0,sr.toPathString)(s),options:u}}),readAuthorizationModel:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("readAuthorizationModel","id",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/authorization-models/{id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId))).replace(`{${"id"}}`,encodeURIComponent(String(r)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"GET"},o),n);const l={};const c={};(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);return{url:(0,sr.toPathString)(s),options:u}}),readAuthorizationModels:(r,n,i={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("Configuration","storeId",e.storeId);const s="/stores/{store_id}/authorization-models".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const o=new URL(s,sr.DUMMY_BASE_URL);let u;if(e){u=e.baseOptions}const l=Object.assign(Object.assign({method:"GET"},u),i);const c={};const d={};if(r!==void 0){d["page_size"]=r}if(n!==void 0){d["continuation_token"]=n}(0,sr.setSearchParams)(o,d,i.query);l.headers=Object.assign(Object.assign({},c),i.headers);return{url:(0,sr.toPathString)(o),options:l}}),readChanges:(r,n,i,s={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("Configuration","storeId",e.storeId);const o="/stores/{store_id}/changes".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const u=new URL(o,sr.DUMMY_BASE_URL);let l;if(e){l=e.baseOptions}const c=Object.assign(Object.assign({method:"GET"},l),s);const d={};const p={};if(r!==void 0){p["type"]=r}if(n!==void 0){p["page_size"]=n}if(i!==void 0){p["continuation_token"]=i}(0,sr.setSearchParams)(u,p,s.query);c.headers=Object.assign(Object.assign({},d),s.headers);return{url:(0,sr.toPathString)(u),options:c}}),write:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("write","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/write".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),writeAssertions:(r,n,i={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("writeAssertions","authorizationModelId",r);(0,za.assertParamExists)("writeAssertions","body",n);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const s="/stores/{store_id}/assertions/{authorization_model_id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId))).replace(`{${"authorization_model_id"}}`,encodeURIComponent(String(r)));const o=new URL(s,sr.DUMMY_BASE_URL);let u;if(e){u=e.baseOptions}const l=Object.assign(Object.assign({method:"PUT"},u),i);const c={};const d={};c["Content-Type"]="application/json";(0,sr.setSearchParams)(o,d,i.query);l.headers=Object.assign(Object.assign({},c),i.headers);l.data=(0,sr.serializeDataIfNeeded)(n,l);return{url:(0,sr.toPathString)(o),options:l}}),writeAuthorizationModel:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("writeAuthorizationModel","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/authorization-models".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}})}},"OpenFgaApiAxiosParamCreator");Ts.OpenFgaApiAxiosParamCreator=vxn;var Exn=a(function(e,t){const r=(0,Ts.OpenFgaApiAxiosParamCreator)(e,t);return{check(n,i){return As(this,void 0,void 0,function*(){const s=yield r.check(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},createStore(n,i){return As(this,void 0,void 0,function*(){const s=yield r.createStore(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},deleteStore(n){return As(this,void 0,void 0,function*(){const i=yield r.deleteStore(n);return(0,sr.createRequestFunction)(i,Tc.default,e,t)})},expand(n,i){return As(this,void 0,void 0,function*(){const s=yield r.expand(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},getStore(n){return As(this,void 0,void 0,function*(){const i=yield r.getStore(n);return(0,sr.createRequestFunction)(i,Tc.default,e,t)})},listObjects(n,i){return As(this,void 0,void 0,function*(){const s=yield r.listObjects(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},listStores(n,i,s){return As(this,void 0,void 0,function*(){const o=yield r.listStores(n,i,s);return(0,sr.createRequestFunction)(o,Tc.default,e,t)})},read(n,i){return As(this,void 0,void 0,function*(){const s=yield r.read(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},readAssertions(n,i){return As(this,void 0,void 0,function*(){const s=yield r.readAssertions(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},readAuthorizationModel(n,i){return As(this,void 0,void 0,function*(){const s=yield r.readAuthorizationModel(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},readAuthorizationModels(n,i,s){return As(this,void 0,void 0,function*(){const o=yield r.readAuthorizationModels(n,i,s);return(0,sr.createRequestFunction)(o,Tc.default,e,t)})},readChanges(n,i,s,o){return As(this,void 0,void 0,function*(){const u=yield r.readChanges(n,i,s,o);return(0,sr.createRequestFunction)(u,Tc.default,e,t)})},write(n,i){return As(this,void 0,void 0,function*(){const s=yield r.write(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},writeAssertions(n,i,s){return As(this,void 0,void 0,function*(){const o=yield r.writeAssertions(n,i,s);return(0,sr.createRequestFunction)(o,Tc.default,e,t)})},writeAuthorizationModel(n,i){return As(this,void 0,void 0,function*(){const s=yield r.writeAuthorizationModel(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})}}},"OpenFgaApiFp");Ts.OpenFgaApiFp=Exn;var bxn=a(function(e,t,r){const n=(0,Ts.OpenFgaApiFp)(e,t);return{check(i,s){return n.check(i,s).then(o=>o(r))},createStore(i,s){return n.createStore(i,s).then(o=>o(r))},deleteStore(i){return n.deleteStore(i).then(s=>s(r))},expand(i,s){return n.expand(i,s).then(o=>o(r))},getStore(i){return n.getStore(i).then(s=>s(r))},listObjects(i,s){return n.listObjects(i,s).then(o=>o(r))},listStores(i,s,o){return n.listStores(i,s,o).then(u=>u(r))},read(i,s){return n.read(i,s).then(o=>o(r))},readAssertions(i,s){return n.readAssertions(i,s).then(o=>o(r))},readAuthorizationModel(i,s){return n.readAuthorizationModel(i,s).then(o=>o(r))},readAuthorizationModels(i,s,o){return n.readAuthorizationModels(i,s,o).then(u=>u(r))},readChanges(i,s,o,u){return n.readChanges(i,s,o,u).then(l=>l(r))},write(i,s){return n.write(i,s).then(o=>o(r))},writeAssertions(i,s,o){return n.writeAssertions(i,s,o).then(u=>u(r))},writeAuthorizationModel(i,s){return n.writeAuthorizationModel(i,s).then(o=>o(r))}}},"OpenFgaApiFactory");Ts.OpenFgaApiFactory=bxn;var kRe=class extends _xn.BaseAPI{static{a(this,"OpenFgaApi")}check(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).check(t,r).then(n=>n(this.axios))}createStore(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).createStore(t,r).then(n=>n(this.axios))}deleteStore(t){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).deleteStore(t).then(r=>r(this.axios))}expand(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).expand(t,r).then(n=>n(this.axios))}getStore(t){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).getStore(t).then(r=>r(this.axios))}listObjects(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).listObjects(t,r).then(n=>n(this.axios))}listStores(t,r,n){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).listStores(t,r,n).then(i=>i(this.axios))}read(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).read(t,r).then(n=>n(this.axios))}readAssertions(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).readAssertions(t,r).then(n=>n(this.axios))}readAuthorizationModel(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).readAuthorizationModel(t,r).then(n=>n(this.axios))}readAuthorizationModels(t,r,n){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).readAuthorizationModels(t,r,n).then(i=>i(this.axios))}readChanges(t,r,n,i){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).readChanges(t,r,n,i).then(s=>s(this.axios))}write(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).write(t,r).then(n=>n(this.axios))}writeAssertions(t,r,n){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).writeAssertions(t,r,n).then(i=>i(this.axios))}writeAuthorizationModel(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).writeAuthorizationModel(t,r).then(n=>n(this.axios))}};Ts.OpenFgaApi=kRe});var rxt=y((w5s,txt)=>{async function*Sxn(e,t,r){const n=new Set;async function i(){const[s,o]=await Promise.race(n);n.delete(s);return o}a(i,"consume");for(const s of t){const o=(async()=>await r(s,t))().then(u=>[o,u]);n.add(o);if(n.size>=e){yield await i()}}while(n.size){yield await i()}}a(Sxn,"asyncPool");txt.exports=Sxn});var nxt=y(ig=>{"use strict";var Ka=ig&&ig.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}a(i,"adopt");return new(r||(r=Promise))(function(s,o){function u(d){try{c(n.next(d))}catch(p){o(p)}}a(u,"fulfilled");function l(d){try{c(n["throw"](d))}catch(p){o(p)}}a(l,"rejected");function c(d){d.done?s(d.value):i(d.value).then(u,l)}a(c,"step");c((n=n.apply(e,t||[])).next())})};var LRe=ig&&ig.__asyncValues||function(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 __values==="function"?__values(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(o){return new Promise(function(u,l){o=e[s](o),i(u,l,o.done,o.value)})}}a(n,"verb");function i(s,o,u,l){Promise.resolve(l).then(function(c){s({value:c,done:u})},o)}a(i,"settle")};Object.defineProperty(ig,"__esModule",{value:true});ig.OpenFgaClient=ig.ClientWriteStatus=void 0;var FRe=rxt();var Axn=DRe();var Cxn=IRe();var BRe=sC();var vd=wRe();var wxn=FF();var MRe=10;var gP="X-OpenFGA-Client-Method";var qRe="X-OpenFGA-Client-Bulk-Request-Id";var yP;(function(e){e["SUCCESS"]="success";e["FAILURE"]="failure"})(yP||(ig.ClientWriteStatus=yP={}));var URe=class extends Cxn.BaseAPI{static{a(this,"OpenFgaClient")}constructor(t,r){super(t,r);this.axios=r;this.api=new Axn.OpenFgaApi(this.configuration,r);this.authorizationModelId=t.authorizationModelId;this.getAuthorizationModelId()}getAuthorizationModelId(t={}){const r=(t===null||t===void 0?void 0:t.authorizationModelId)||this.authorizationModelId;if(r&&!(0,wxn.isWellFormedUlidString)(r)){throw new BRe.FgaValidationError("authorizationModelId")}return r}checkValidApiConnection(t={}){return Ka(this,void 0,void 0,function*(){if(this.getAuthorizationModelId(t)){yield this.readAuthorizationModel(t)}else{yield this.readLatestAuthorizationModel(t)}})}listStores(t={}){return Ka(this,void 0,void 0,function*(){return this.api.listStores(t.pageSize,t.continuationToken,t)})}createStore(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.createStore(t,r)})}getStore(t={}){return Ka(this,void 0,void 0,function*(){return this.api.getStore(t)})}deleteStore(t={}){return Ka(this,void 0,void 0,function*(){return this.api.deleteStore(t)})}readAuthorizationModels(t={}){return Ka(this,void 0,void 0,function*(){return this.api.readAuthorizationModels(t.pageSize,t.continuationToken,t)})}writeAuthorizationModel(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.writeAuthorizationModel(t,r)})}readAuthorizationModel(t={}){return Ka(this,void 0,void 0,function*(){const r=this.getAuthorizationModelId(t);if(!r){throw new BRe.FgaRequiredParamError("ClientConfiguration","authorizationModelId")}return this.api.readAuthorizationModel(r,t)})}readLatestAuthorizationModel(t={}){var r;return Ka(this,void 0,void 0,function*(){const{headers:n={}}=t;(0,vd.setHeaderIfNotSet)(n,gP,"ReadLatestAuthorizationModel");const i=yield this.readAuthorizationModels(Object.assign(Object.assign({},t),{pageSize:1,headers:n}));const s=i;s.authorization_model=(r=i.authorization_models)===null||r===void 0?void 0:r[0];delete s.authorization_models;return s})}readChanges(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.readChanges(t.type,r.pageSize,r.continuationToken,r)})}read(t={},r={}){return Ka(this,void 0,void 0,function*(){const n={page_size:r.pageSize,continuation_token:r.continuationToken};if(t.user||t.object||t.relation){n.tuple_key=t}return this.api.read(n,r)})}write(t,r={}){return Ka(this,void 0,void 0,function*(){const{transaction:n={},headers:i={}}=r;const{maxPerChunk:s=1,maxParallelRequests:o=MRe}=n;const{writes:u,deletes:l}=t;const c=this.getAuthorizationModelId(r);if(!(n===null||n===void 0?void 0:n.disable)){const d={authorization_model_id:c};if(u===null||u===void 0?void 0:u.length){d.writes={tuple_keys:u}}if(l===null||l===void 0?void 0:l.length){d.deletes={tuple_keys:l}}yield this.api.write(d,r);return{writes:(u===null||u===void 0?void 0:u.map(p=>({tuple_key:p,status:yP.SUCCESS})))||[],deletes:(l===null||l===void 0?void 0:l.map(p=>({tuple_key:p,status:yP.SUCCESS})))||[]}}return Promise.all([(()=>Ka(this,void 0,void 0,function*(){var d,p,f,m,h,g,_,v;(0,vd.setHeaderIfNotSet)(i,gP,"Write");(0,vd.setHeaderIfNotSet)(i,qRe,(0,vd.generateRandomIdWithNonUniqueFallback)());const S=[];if(u===null||u===void 0?void 0:u.length){try{for(var E=true,b=LRe(FRe(o,(0,vd.chunkArray)(u,s),R=>this.writeTuples(R,Object.assign(Object.assign({},r),{headers:i,transaction:void 0})).catch(I=>({writes:R.map(D=>({tuple_key:D,status:yP.FAILURE,err:I})),deletes:[]})))),A;A=yield b.next(),d=A.done,!d;E=true){m=A.value;E=false;const R=m;S.push(R.writes)}}catch(R){p={error:R}}finally{try{if(!E&&!d&&(f=b.return))yield f.call(b)}finally{if(p)throw p.error}}}const C=[];if(l===null||l===void 0?void 0:l.length){try{for(var T=true,O=LRe(FRe(o,(0,vd.chunkArray)(l,s),R=>this.deleteTuples(R,Object.assign(Object.assign({},r),{headers:i,transaction:void 0})).catch(I=>({writes:[],deletes:R.map(D=>({tuple_key:D,status:yP.FAILURE,err:I}))})))),P;P=yield O.next(),h=P.done,!h;T=true){v=P.value;T=false;const R=v;C.push(R.deletes)}}catch(R){g={error:R}}finally{try{if(!T&&!h&&(_=O.return))yield _.call(O)}finally{if(g)throw g.error}}}return{writes:S.flat(),deletes:C.flat()}}))(),this.checkValidApiConnection(r)]).then(d=>d[0])})}writeTuples(t,r={}){return Ka(this,void 0,void 0,function*(){const{headers:n={}}=r;(0,vd.setHeaderIfNotSet)(n,gP,"WriteTuples");return this.write({writes:t},Object.assign(Object.assign({},r),{headers:n}))})}deleteTuples(t,r={}){return Ka(this,void 0,void 0,function*(){const{headers:n={}}=r;(0,vd.setHeaderIfNotSet)(n,gP,"DeleteTuples");return this.write({deletes:t},Object.assign(Object.assign({},r),{headers:n}))})}check(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.check({tuple_key:{user:t.user,relation:t.relation,object:t.object},context:t.context,contextual_tuples:{tuple_keys:t.contextualTuples||[]},authorization_model_id:this.getAuthorizationModelId(r)},r)})}batchCheck(t,r={}){return Ka(this,void 0,void 0,function*(){return Promise.all([(()=>Ka(this,void 0,void 0,function*(){var n,i,s,o;const{headers:u={},maxParallelRequests:l=MRe}=r;(0,vd.setHeaderIfNotSet)(u,gP,"BatchCheck");(0,vd.setHeaderIfNotSet)(u,qRe,(0,vd.generateRandomIdWithNonUniqueFallback)());const c=[];try{for(var d=true,p=LRe(FRe(l,t,m=>this.check(m,Object.assign(Object.assign({},r),{headers:u})).then(h=>{h._request=m;return h}).catch(h=>{return{allowed:void 0,error:h,_request:m}}))),f;f=yield p.next(),n=f.done,!n;d=true){o=f.value;d=false;const m=o;c.push(m)}}catch(m){i={error:m}}finally{try{if(!d&&!n&&(s=p.return))yield s.call(p)}finally{if(i)throw i.error}}return{responses:c}}))(),this.checkValidApiConnection(r)]).then(n=>n[0])})}expand(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.expand({authorization_model_id:this.getAuthorizationModelId(r),tuple_key:t},r)})}listObjects(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.listObjects({authorization_model_id:this.getAuthorizationModelId(r),user:t.user,relation:t.relation,type:t.type,context:t.context,contextual_tuples:{tuple_keys:t.contextualTuples||[]}},r)})}listRelations(t,r={}){return Ka(this,void 0,void 0,function*(){const{user:n,object:i,relations:s,contextualTuples:o,context:u}=t;const{headers:l={},maxParallelRequests:c=MRe}=r;(0,vd.setHeaderIfNotSet)(l,gP,"ListRelations");(0,vd.setHeaderIfNotSet)(l,qRe,(0,vd.generateRandomIdWithNonUniqueFallback)());if(!(s===null||s===void 0?void 0:s.length)){throw new BRe.FgaValidationError("relations","When calling listRelations, at least one relation must be passed in the relations field")}const d=yield this.batchCheck(s.map(f=>({user:n,relation:f,object:i,contextualTuples:o,context:u})),Object.assign(Object.assign({},r),{headers:l,maxParallelRequests:c}));const p=d.responses.find(f=>f.error);if(p){throw p.error}return{relations:d.responses.filter(f=>f.allowed).map(f=>f._request.relation)}})}readAssertions(t={}){return Ka(this,void 0,void 0,function*(){return this.api.readAssertions(this.getAuthorizationModelId(t),t)})}writeAssertions(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.writeAssertions(this.getAuthorizationModelId(r),{assertions:t.map(n=>({tuple_key:{user:n.user,relation:n.relation,object:n.object},expectation:n.expectation}))},r)})}};ig.OpenFgaClient=URe});var cxt=y(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:true});Ed.TypeName=Ed.TupleOperation=Ed.NullValue=Ed.NotFoundErrorCode=Ed.InternalErrorCode=Ed.ErrorCode=void 0;var ixt;(function(e){e["NoError"]="no_error";e["ValidationError"]="validation_error";e["AuthorizationModelNotFound"]="authorization_model_not_found";e["AuthorizationModelResolutionTooComplex"]="authorization_model_resolution_too_complex";e["InvalidWriteInput"]="invalid_write_input";e["CannotAllowDuplicateTuplesInOneRequest"]="cannot_allow_duplicate_tuples_in_one_request";e["CannotAllowDuplicateTypesInOneRequest"]="cannot_allow_duplicate_types_in_one_request";e["CannotAllowMultipleReferencesToOneRelation"]="cannot_allow_multiple_references_to_one_relation";e["InvalidContinuationToken"]="invalid_continuation_token";e["InvalidTupleSet"]="invalid_tuple_set";e["InvalidCheckInput"]="invalid_check_input";e["InvalidExpandInput"]="invalid_expand_input";e["UnsupportedUserSet"]="unsupported_user_set";e["InvalidObjectFormat"]="invalid_object_format";e["WriteFailedDueToInvalidInput"]="write_failed_due_to_invalid_input";e["AuthorizationModelAssertionsNotFound"]="authorization_model_assertions_not_found";e["LatestAuthorizationModelNotFound"]="latest_authorization_model_not_found";e["TypeNotFound"]="type_not_found";e["RelationNotFound"]="relation_not_found";e["EmptyRelationDefinition"]="empty_relation_definition";e["InvalidUser"]="invalid_user";e["InvalidTuple"]="invalid_tuple";e["UnknownRelation"]="unknown_relation";e["StoreIdInvalidLength"]="store_id_invalid_length";e["AssertionsTooManyItems"]="assertions_too_many_items";e["IdTooLong"]="id_too_long";e["AuthorizationModelIdTooLong"]="authorization_model_id_too_long";e["TupleKeyValueNotSpecified"]="tuple_key_value_not_specified";e["TupleKeysTooManyOrTooFewItems"]="tuple_keys_too_many_or_too_few_items";e["PageSizeInvalid"]="page_size_invalid";e["ParamMissingValue"]="param_missing_value";e["DifferenceBaseMissingValue"]="difference_base_missing_value";e["SubtractBaseMissingValue"]="subtract_base_missing_value";e["ObjectTooLong"]="object_too_long";e["RelationTooLong"]="relation_too_long";e["TypeDefinitionsTooFewItems"]="type_definitions_too_few_items";e["TypeInvalidLength"]="type_invalid_length";e["TypeInvalidPattern"]="type_invalid_pattern";e["RelationsTooFewItems"]="relations_too_few_items";e["RelationsTooLong"]="relations_too_long";e["RelationsInvalidPattern"]="relations_invalid_pattern";e["ObjectInvalidPattern"]="object_invalid_pattern";e["QueryStringTypeContinuationTokenMismatch"]="query_string_type_continuation_token_mismatch";e["ExceededEntityLimit"]="exceeded_entity_limit";e["InvalidContextualTuple"]="invalid_contextual_tuple";e["DuplicateContextualTuple"]="duplicate_contextual_tuple";e["InvalidAuthorizationModel"]="invalid_authorization_model";e["UnsupportedSchemaVersion"]="unsupported_schema_version"})(ixt||(Ed.ErrorCode=ixt={}));var sxt;(function(e){e["NoInternalError"]="no_internal_error";e["InternalError"]="internal_error";e["Cancelled"]="cancelled";e["DeadlineExceeded"]="deadline_exceeded";e["AlreadyExists"]="already_exists";e["ResourceExhausted"]="resource_exhausted";e["FailedPrecondition"]="failed_precondition";e["Aborted"]="aborted";e["OutOfRange"]="out_of_range";e["Unavailable"]="unavailable";e["DataLoss"]="data_loss"})(sxt||(Ed.InternalErrorCode=sxt={}));var axt;(function(e){e["NoNotFoundError"]="no_not_found_error";e["UndefinedEndpoint"]="undefined_endpoint";e["StoreIdNotFound"]="store_id_not_found";e["Unimplemented"]="unimplemented"})(axt||(Ed.NotFoundErrorCode=axt={}));var oxt;(function(e){e["NullValue"]="NULL_VALUE"})(oxt||(Ed.NullValue=oxt={}));var uxt;(function(e){e["Write"]="TUPLE_OPERATION_WRITE";e["Delete"]="TUPLE_OPERATION_DELETE"})(uxt||(Ed.TupleOperation=uxt={}));var lxt;(function(e){e["Unspecified"]="TYPE_NAME_UNSPECIFIED";e["Any"]="TYPE_NAME_ANY";e["Bool"]="TYPE_NAME_BOOL";e["String"]="TYPE_NAME_STRING";e["Int"]="TYPE_NAME_INT";e["Uint"]="TYPE_NAME_UINT";e["Double"]="TYPE_NAME_DOUBLE";e["Duration"]="TYPE_NAME_DURATION";e["Timestamp"]="TYPE_NAME_TIMESTAMP";e["Map"]="TYPE_NAME_MAP";e["List"]="TYPE_NAME_LIST";e["Ipaddress"]="TYPE_NAME_IPADDRESS"})(lxt||(Ed.TypeName=lxt={}))});var fxt=y(Au=>{"use strict";var Txn=Au&&Au.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var $J=Au&&Au.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))Txn(t,e,r)};Object.defineProperty(Au,"__esModule",{value:true});Au.CredentialsMethod=Au.Credentials=Au.GetDefaultRetryParams=Au.Configuration=void 0;$J(DRe(),Au);$J(nxt(),Au);$J(cxt(),Au);var dxt=CRe();Object.defineProperty(Au,"Configuration",{enumerable:true,get:function(){return dxt.Configuration}});Object.defineProperty(Au,"GetDefaultRetryParams",{enumerable:true,get:function(){return dxt.GetDefaultRetryParams}});var pxt=qJ();Object.defineProperty(Au,"Credentials",{enumerable:true,get:function(){return pxt.Credentials}});Object.defineProperty(Au,"CredentialsMethod",{enumerable:true,get:function(){return pxt.CredentialsMethod}});$J(sC(),Au)});var hxt=y(_P=>{"use strict";var xxn=_P&&_P.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(_P,"__esModule",{value:true});_P.OpenFGAService=void 0;var qF=xxn(qp());var mxt=fxt();var Rxn=tP();var $Re=class{static{a(this,"OpenFGAService")}logger;openFGAClient;baseUrl;apiHost;storeId;modelId;userSub;constructor(t,r){if(!qF.default.OPENFGA_SERVICE_URL){throw new Error("OPENFGA_SERVICE_URL is not set")}this.userSub=r&&r.userSub?r.userSub:t.getUserSub();this.baseUrl=qF.default.OPENFGA_SERVICE_URL;this.apiHost=qF.default.OPENFGA_SERVICE_URL.replace(/^(https:\/\/)/,"");this.storeId=qF.default.OPENFGA_STORE_ID;this.modelId=qF.default.OPENFGA_MODEL_ID;this.logger=t.log}async getOpenFgaClient(){if(!this.openFGAClient){const t=await(0,Rxn.getServiceAccountIdToken)(this.baseUrl);this.openFGAClient=new mxt.OpenFgaClient({apiScheme:"https",apiHost:this.apiHost,storeId:this.storeId,authorizationModelId:this.modelId,credentials:{method:mxt.CredentialsMethod.ApiToken,config:{token:t}}})}return this.openFGAClient}async createAccountMember(t){try{const r=await this.getOpenFgaClient();await r.write({writes:[{user:`user:${this.userSub}`,relation:"admin",object:`account:${t}`}]})}catch(r){this.logger.warn(`RBAC failed to create account membership. Error: ${r.message}`)}}async getAccountMemberships(){const t=await this.getOpenFgaClient();const r=await t.listObjects({user:`user:${this.userSub}`,relation:"member",type:"account"});if(r){return r.objects.map(n=>n.replace(/^(account:)/,""))}return[]}async isAccountMember(t){try{const r=await this.getOpenFgaClient();const{allowed:n}=await r.check({user:`user:${this.userSub}`,relation:"member",object:`account:${t}`});if(!n){return false}return n}catch(r){this.logger.warn(`RBAC failed to check account membership. Error: ${r.message}`);return false}}async createProjectAccountAssociation(t,r){try{const n=await this.getOpenFgaClient();await n.write({writes:[{user:`account:${t}`,relation:"associated_account",object:`project:${r}`}]})}catch(n){this.logger.warn(`RBAC failed to create account-project association. Error: ${n.message}`)}}async deleteProjectAccountAssociation(t,r){try{const n=await this.getOpenFgaClient();await n.write({deletes:[{user:`account:${t}`,relation:"associated_account",object:`project:${r}`}]})}catch(n){this.logger.warn(`RBAC failed to delete account-project association. Error: ${n.message}`)}}};_P.OpenFGAService=$Re});var _xt=y(vP=>{"use strict";var yxt=vP&&vP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(vP,"__esModule",{value:true});vP.TenantService=void 0;var Oxn=yxt(n0());var gxt=yxt(qp());var Pxn=gJ();var Nxn=new Oxn.default({max:500,maxAge:1e3*60*50});var jRe=class extends Pxn.ApiServiceClient{static{a(this,"TenantService")}constructor(t,r){if(!gxt.default.TENANT_API_URL){throw new Error("TENANT_API_URL is not set")}const n=r&&r.userSub?r.userSub:t.getUserSub();super(gxt.default.TENANT_API_URL,Nxn,{userSub:n,logger:t.log,requestId:t.id})}};vP.TenantService=jRe});var vxt=y(sg=>{"use strict";Object.defineProperty(sg,"__esModule",{value:true});sg.validateHostname=sg.kebabCase=sg.snakeCase=sg.sizeInBytes=void 0;function Ixn(e){return new TextEncoder().encode(JSON.stringify(e)).length}a(Ixn,"sizeInBytes");sg.sizeInBytes=Ixn;function kxn(e){if(!e||e===null){return""}return e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)?.map(t=>t.toLowerCase()).join("_")}a(kxn,"snakeCase");sg.snakeCase=kxn;function Dxn(e){if(!e||e===null){return""}const t=e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g);if(t===null){return""}return t.map(r=>r.toLowerCase()).join("-")}a(Dxn,"kebabCase");sg.kebabCase=Dxn;function Lxn(e){try{const t=/^(?!https?:\/\/)([a-zA-Z0-9.-]*|(\*))*\.[a-zA-Z]+$/;if(e&&!t.test(e)){return false}return true}catch(t){}return false}a(Lxn,"validateHostname");sg.validateHostname=Lxn});var Sxt=y(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:true});_e.Type=_e.JsonType=_e.JavaScriptTypeBuilder=_e.JsonTypeBuilder=_e.TypeBuilder=_e.TypeBuilderError=_e.TransformEncodeBuilder=_e.TransformDecodeBuilder=_e.TemplateLiteralDslParser=_e.TemplateLiteralGenerator=_e.TemplateLiteralGeneratorError=_e.TemplateLiteralFinite=_e.TemplateLiteralFiniteError=_e.TemplateLiteralParser=_e.TemplateLiteralParserError=_e.TemplateLiteralResolver=_e.TemplateLiteralPattern=_e.TemplateLiteralPatternError=_e.UnionResolver=_e.KeyArrayResolver=_e.KeyArrayResolverError=_e.KeyResolver=_e.ObjectMap=_e.Intrinsic=_e.IndexedAccessor=_e.TypeClone=_e.TypeExtends=_e.TypeExtendsResult=_e.TypeExtendsError=_e.ExtendsUndefined=_e.TypeGuard=_e.TypeGuardUnknownTypeError=_e.ValueGuard=_e.FormatRegistry=_e.TypeBoxError=_e.TypeRegistry=_e.PatternStringExact=_e.PatternNumberExact=_e.PatternBooleanExact=_e.PatternString=_e.PatternNumber=_e.PatternBoolean=_e.Kind=_e.Hint=_e.Optional=_e.Readonly=_e.Transform=void 0;_e.Transform=Symbol.for("TypeBox.Transform");_e.Readonly=Symbol.for("TypeBox.Readonly");_e.Optional=Symbol.for("TypeBox.Optional");_e.Hint=Symbol.for("TypeBox.Hint");_e.Kind=Symbol.for("TypeBox.Kind");_e.PatternBoolean="(true|false)";_e.PatternNumber="(0|[1-9][0-9]*)";_e.PatternString="(.*)";_e.PatternBooleanExact=`^${_e.PatternBoolean}$`;_e.PatternNumberExact=`^${_e.PatternNumber}$`;_e.PatternStringExact=`^${_e.PatternString}$`;var GRe;(function(e){const t=new Map;function r(){return new Map(t)}a(r,"Entries");e.Entries=r;function n(){return t.clear()}a(n,"Clear");e.Clear=n;function i(l){return t.delete(l)}a(i,"Delete");e.Delete=i;function s(l){return t.has(l)}a(s,"Has");e.Has=s;function o(l,c){t.set(l,c)}a(o,"Set");e.Set=o;function u(l){return t.get(l)}a(u,"Get");e.Get=u})(GRe||(_e.TypeRegistry=GRe={}));var mh=class extends Error{static{a(this,"TypeBoxError")}constructor(t){super(t)}};_e.TypeBoxError=mh;var Ext;(function(e){const t=new Map;function r(){return new Map(t)}a(r,"Entries");e.Entries=r;function n(){return t.clear()}a(n,"Clear");e.Clear=n;function i(l){return t.delete(l)}a(i,"Delete");e.Delete=i;function s(l){return t.has(l)}a(s,"Has");e.Has=s;function o(l,c){t.set(l,c)}a(o,"Set");e.Set=o;function u(l){return t.get(l)}a(u,"Get");e.Get=u})(Ext||(_e.FormatRegistry=Ext={}));var Jt;(function(e){function t(c){return Array.isArray(c)}a(t,"IsArray");e.IsArray=t;function r(c){return typeof c==="bigint"}a(r,"IsBigInt");e.IsBigInt=r;function n(c){return typeof c==="boolean"}a(n,"IsBoolean");e.IsBoolean=n;function i(c){return c===null}a(i,"IsNull");e.IsNull=i;function s(c){return typeof c==="number"}a(s,"IsNumber");e.IsNumber=s;function o(c){return typeof c==="object"&&c!==null}a(o,"IsObject");e.IsObject=o;function u(c){return typeof c==="string"}a(u,"IsString");e.IsString=u;function l(c){return c===void 0}a(l,"IsUndefined");e.IsUndefined=l})(Jt||(_e.ValueGuard=Jt={}));var HRe=class extends mh{static{a(this,"TypeGuardUnknownTypeError")}};_e.TypeGuardUnknownTypeError=HRe;var Ee;(function(e){function t(L){try{new RegExp(L);return true}catch{return false}}a(t,"IsPattern");function r(L){if(!Jt.IsString(L))return false;for(let Se=0;Se<L.length;Se++){const Le=L.charCodeAt(Se);if(Le>=7&&Le<=13||Le===27||Le===127){return false}}return true}a(r,"IsControlCharacterFree");function n(L){return o(L)||se(L)}a(n,"IsAdditionalProperties");function i(L){return Jt.IsUndefined(L)||Jt.IsBigInt(L)}a(i,"IsOptionalBigInt");function s(L){return Jt.IsUndefined(L)||Jt.IsNumber(L)}a(s,"IsOptionalNumber");function o(L){return Jt.IsUndefined(L)||Jt.IsBoolean(L)}a(o,"IsOptionalBoolean");function u(L){return Jt.IsUndefined(L)||Jt.IsString(L)}a(u,"IsOptionalString");function l(L){return Jt.IsUndefined(L)||Jt.IsString(L)&&r(L)&&t(L)}a(l,"IsOptionalPattern");function c(L){return Jt.IsUndefined(L)||Jt.IsString(L)&&r(L)}a(c,"IsOptionalFormat");function d(L){return Jt.IsUndefined(L)||se(L)}a(d,"IsOptionalSchema");function p(L){return C(L,"Any")&&u(L.$id)}a(p,"TAny");e.TAny=p;function f(L){return C(L,"Array")&&L.type==="array"&&u(L.$id)&&se(L.items)&&s(L.minItems)&&s(L.maxItems)&&o(L.uniqueItems)&&d(L.contains)&&s(L.minContains)&&s(L.maxContains)}a(f,"TArray");e.TArray=f;function m(L){return C(L,"AsyncIterator")&&L.type==="AsyncIterator"&&u(L.$id)&&se(L.items)}a(m,"TAsyncIterator");e.TAsyncIterator=m;function h(L){return C(L,"BigInt")&&L.type==="bigint"&&u(L.$id)&&i(L.exclusiveMaximum)&&i(L.exclusiveMinimum)&&i(L.maximum)&&i(L.minimum)&&i(L.multipleOf)}a(h,"TBigInt");e.TBigInt=h;function g(L){return C(L,"Boolean")&&L.type==="boolean"&&u(L.$id)}a(g,"TBoolean");e.TBoolean=g;function _(L){return C(L,"Constructor")&&L.type==="constructor"&&u(L.$id)&&Jt.IsArray(L.parameters)&&L.parameters.every(Se=>se(Se))&&se(L.returns)}a(_,"TConstructor");e.TConstructor=_;function v(L){return C(L,"Date")&&L.type==="Date"&&u(L.$id)&&s(L.exclusiveMaximumTimestamp)&&s(L.exclusiveMinimumTimestamp)&&s(L.maximumTimestamp)&&s(L.minimumTimestamp)&&s(L.multipleOfTimestamp)}a(v,"TDate");e.TDate=v;function S(L){return C(L,"Function")&&L.type==="function"&&u(L.$id)&&Jt.IsArray(L.parameters)&&L.parameters.every(Se=>se(Se))&&se(L.returns)}a(S,"TFunction");e.TFunction=S;function E(L){return C(L,"Integer")&&L.type==="integer"&&u(L.$id)&&s(L.exclusiveMaximum)&&s(L.exclusiveMinimum)&&s(L.maximum)&&s(L.minimum)&&s(L.multipleOf)}a(E,"TInteger");e.TInteger=E;function b(L){return C(L,"Intersect")&&(Jt.IsString(L.type)&&L.type!=="object"?false:true)&&Jt.IsArray(L.allOf)&&L.allOf.every(Se=>se(Se)&&!De(Se))&&u(L.type)&&(o(L.unevaluatedProperties)||d(L.unevaluatedProperties))&&u(L.$id)}a(b,"TIntersect");e.TIntersect=b;function A(L){return C(L,"Iterator")&&L.type==="Iterator"&&u(L.$id)&&se(L.items)}a(A,"TIterator");e.TIterator=A;function C(L,Se){return T(L)&&L[_e.Kind]===Se}a(C,"TKindOf");e.TKindOf=C;function T(L){return Jt.IsObject(L)&&_e.Kind in L&&Jt.IsString(L[_e.Kind])}a(T,"TKind");e.TKind=T;function O(L){return I(L)&&Jt.IsString(L.const)}a(O,"TLiteralString");e.TLiteralString=O;function P(L){return I(L)&&Jt.IsNumber(L.const)}a(P,"TLiteralNumber");e.TLiteralNumber=P;function R(L){return I(L)&&Jt.IsBoolean(L.const)}a(R,"TLiteralBoolean");e.TLiteralBoolean=R;function I(L){return C(L,"Literal")&&u(L.$id)&&(Jt.IsBoolean(L.const)||Jt.IsNumber(L.const)||Jt.IsString(L.const))}a(I,"TLiteral");e.TLiteral=I;function D(L){return C(L,"Never")&&Jt.IsObject(L.not)&&Object.getOwnPropertyNames(L.not).length===0}a(D,"TNever");e.TNever=D;function U(L){return C(L,"Not")&&se(L.not)}a(U,"TNot");e.TNot=U;function te(L){return C(L,"Null")&&L.type==="null"&&u(L.$id)}a(te,"TNull");e.TNull=te;function ve(L){return C(L,"Number")&&L.type==="number"&&u(L.$id)&&s(L.exclusiveMaximum)&&s(L.exclusiveMinimum)&&s(L.maximum)&&s(L.minimum)&&s(L.multipleOf)}a(ve,"TNumber");e.TNumber=ve;function me(L){return C(L,"Object")&&L.type==="object"&&u(L.$id)&&Jt.IsObject(L.properties)&&n(L.additionalProperties)&&s(L.minProperties)&&s(L.maxProperties)&&Object.entries(L.properties).every(([Se,Le])=>r(Se)&&se(Le))}a(me,"TObject");e.TObject=me;function he(L){return C(L,"Promise")&&L.type==="Promise"&&u(L.$id)&&se(L.item)}a(he,"TPromise");e.TPromise=he;function Fe(L){return C(L,"Record")&&L.type==="object"&&u(L.$id)&&n(L.additionalProperties)&&Jt.IsObject(L.patternProperties)&&(Se=>{const Le=Object.getOwnPropertyNames(Se.patternProperties);return Le.length===1&&t(Le[0])&&Jt.IsObject(Se.patternProperties)&&se(Se.patternProperties[Le[0]])})(L)}a(Fe,"TRecord");e.TRecord=Fe;function Oe(L){return Jt.IsObject(L)&&_e.Hint in L&&L[_e.Hint]==="Recursive"}a(Oe,"TRecursive");e.TRecursive=Oe;function M(L){return C(L,"Ref")&&u(L.$id)&&Jt.IsString(L.$ref)}a(M,"TRef");e.TRef=M;function Q(L){return C(L,"String")&&L.type==="string"&&u(L.$id)&&s(L.minLength)&&s(L.maxLength)&&l(L.pattern)&&c(L.format)}a(Q,"TString");e.TString=Q;function fe(L){return C(L,"Symbol")&&L.type==="symbol"&&u(L.$id)}a(fe,"TSymbol");e.TSymbol=fe;function B(L){return C(L,"TemplateLiteral")&&L.type==="string"&&Jt.IsString(L.pattern)&&L.pattern[0]==="^"&&L.pattern[L.pattern.length-1]==="$"}a(B,"TTemplateLiteral");e.TTemplateLiteral=B;function ye(L){return C(L,"This")&&u(L.$id)&&Jt.IsString(L.$ref)}a(ye,"TThis");e.TThis=ye;function De(L){return Jt.IsObject(L)&&_e.Transform in L}a(De,"TTransform");e.TTransform=De;function $e(L){return C(L,"Tuple")&&L.type==="array"&&u(L.$id)&&Jt.IsNumber(L.minItems)&&Jt.IsNumber(L.maxItems)&&L.minItems===L.maxItems&&(Jt.IsUndefined(L.items)&&Jt.IsUndefined(L.additionalItems)&&L.minItems===0||Jt.IsArray(L.items)&&L.items.every(Se=>se(Se)))}a($e,"TTuple");e.TTuple=$e;function gt(L){return C(L,"Undefined")&&L.type==="undefined"&&u(L.$id)}a(gt,"TUndefined");e.TUndefined=gt;function ut(L){return F(L)&&L.anyOf.every(Se=>O(Se)||P(Se))}a(ut,"TUnionLiteral");e.TUnionLiteral=ut;function F(L){return C(L,"Union")&&u(L.$id)&&Jt.IsObject(L)&&Jt.IsArray(L.anyOf)&&L.anyOf.every(Se=>se(Se))}a(F,"TUnion");e.TUnion=F;function G(L){return C(L,"Uint8Array")&&L.type==="Uint8Array"&&u(L.$id)&&s(L.minByteLength)&&s(L.maxByteLength)}a(G,"TUint8Array");e.TUint8Array=G;function $(L){return C(L,"Unknown")&&u(L.$id)}a($,"TUnknown");e.TUnknown=$;function K(L){return C(L,"Unsafe")}a(K,"TUnsafe");e.TUnsafe=K;function pe(L){return C(L,"Void")&&L.type==="void"&&u(L.$id)}a(pe,"TVoid");e.TVoid=pe;function H(L){return Jt.IsObject(L)&&L[_e.Readonly]==="Readonly"}a(H,"TReadonly");e.TReadonly=H;function de(L){return Jt.IsObject(L)&&L[_e.Optional]==="Optional"}a(de,"TOptional");e.TOptional=de;function se(L){return Jt.IsObject(L)&&(p(L)||f(L)||g(L)||h(L)||m(L)||_(L)||v(L)||S(L)||E(L)||b(L)||A(L)||I(L)||D(L)||U(L)||te(L)||ve(L)||me(L)||he(L)||Fe(L)||M(L)||Q(L)||fe(L)||B(L)||ye(L)||$e(L)||gt(L)||F(L)||G(L)||$(L)||K(L)||pe(L)||T(L)&&GRe.Has(L[_e.Kind]))}a(se,"TSchema");e.TSchema=se})(Ee||(_e.TypeGuard=Ee={}));var bxt;(function(e){function t(r){return r[_e.Kind]==="Intersect"?r.allOf.every(n=>t(n)):r[_e.Kind]==="Union"?r.anyOf.some(n=>t(n)):r[_e.Kind]==="Undefined"?true:r[_e.Kind]==="Not"?!t(r.not):false}a(t,"Check");e.Check=t})(bxt||(_e.ExtendsUndefined=bxt={}));var jJ=class extends mh{static{a(this,"TypeExtendsError")}};_e.TypeExtendsError=jJ;var at;(function(e){e[e["Union"]=0]="Union";e[e["True"]=1]="True";e[e["False"]=2]="False"})(at||(_e.TypeExtendsResult=at={}));var oC;(function(e){function t(N){return N===at.False?N:at.True}a(t,"IntoBooleanResult");function r(N){throw new jJ(N)}a(r,"Throw");function n(N){return Ee.TNever(N)||Ee.TIntersect(N)||Ee.TUnion(N)||Ee.TUnknown(N)||Ee.TAny(N)}a(n,"IsStructuralRight");function i(N,k){return Ee.TNever(k)?C(N,k):Ee.TIntersect(k)?S(N,k):Ee.TUnion(k)?Mt(N,k):Ee.TUnknown(k)?Ur(N,k):Ee.TAny(k)?s(N,k):r("StructuralRight")}a(i,"StructuralRight");function s(N,k){return at.True}a(s,"TAnyRight");function o(N,k){return Ee.TIntersect(k)?S(N,k):Ee.TUnion(k)&&k.anyOf.some(Ae=>Ee.TAny(Ae)||Ee.TUnknown(Ae))?at.True:Ee.TUnion(k)?at.Union:Ee.TUnknown(k)?at.True:Ee.TAny(k)?at.True:at.Union}a(o,"TAny");function u(N,k){return Ee.TUnknown(N)?at.False:Ee.TAny(N)?at.Union:Ee.TNever(N)?at.True:at.False}a(u,"TArrayRight");function l(N,k){return Ee.TObject(k)&&B(k)?at.True:n(k)?i(N,k):!Ee.TArray(k)?at.False:t(J(N.items,k.items))}a(l,"TArray");function c(N,k){return n(k)?i(N,k):!Ee.TAsyncIterator(k)?at.False:t(J(N.items,k.items))}a(c,"TAsyncIterator");function d(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TBigInt(k)?at.True:at.False}a(d,"TBigInt");function p(N,k){return Ee.TLiteral(N)&&Jt.IsBoolean(N.const)?at.True:Ee.TBoolean(N)?at.True:at.False}a(p,"TBooleanRight");function f(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TBoolean(k)?at.True:at.False}a(f,"TBoolean");function m(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):!Ee.TConstructor(k)?at.False:N.parameters.length>k.parameters.length?at.False:!N.parameters.every((Ae,Be)=>t(J(k.parameters[Be],Ae))===at.True)?at.False:t(J(N.returns,k.returns))}a(m,"TConstructor");function h(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TDate(k)?at.True:at.False}a(h,"TDate");function g(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):!Ee.TFunction(k)?at.False:N.parameters.length>k.parameters.length?at.False:!N.parameters.every((Ae,Be)=>t(J(k.parameters[Be],Ae))===at.True)?at.False:t(J(N.returns,k.returns))}a(g,"TFunction");function _(N,k){return Ee.TLiteral(N)&&Jt.IsNumber(N.const)?at.True:Ee.TNumber(N)||Ee.TInteger(N)?at.True:at.False}a(_,"TIntegerRight");function v(N,k){return Ee.TInteger(k)||Ee.TNumber(k)?at.True:n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):at.False}a(v,"TInteger");function S(N,k){return k.allOf.every(Ae=>J(N,Ae)===at.True)?at.True:at.False}a(S,"TIntersectRight");function E(N,k){return N.allOf.some(Ae=>J(Ae,k)===at.True)?at.True:at.False}a(E,"TIntersect");function b(N,k){return n(k)?i(N,k):!Ee.TIterator(k)?at.False:t(J(N.items,k.items))}a(b,"TIterator");function A(N,k){return Ee.TLiteral(k)&&k.const===N.const?at.True:n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TString(k)?pe(N,k):Ee.TNumber(k)?I(N,k):Ee.TInteger(k)?_(N,k):Ee.TBoolean(k)?p(N,k):at.False}a(A,"TLiteral");function C(N,k){return at.False}a(C,"TNeverRight");function T(N,k){return at.True}a(T,"TNever");function O(N){let[k,Ae]=[N,0];while(true){if(!Ee.TNot(k))break;k=k.not;Ae+=1}return Ae%2===0?k:_e.Type.Unknown()}a(O,"UnwrapTNot");function P(N,k){return Ee.TNot(N)?J(O(N),k):Ee.TNot(k)?J(N,O(k)):r("Invalid fallthrough for Not")}a(P,"TNot");function R(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TNull(k)?at.True:at.False}a(R,"TNull");function I(N,k){return Ee.TLiteralNumber(N)?at.True:Ee.TNumber(N)||Ee.TInteger(N)?at.True:at.False}a(I,"TNumberRight");function D(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TInteger(k)||Ee.TNumber(k)?at.True:at.False}a(D,"TNumber");function U(N,k){return Object.getOwnPropertyNames(N.properties).length===k}a(U,"IsObjectPropertyCount");function te(N){return B(N)}a(te,"IsObjectStringLike");function ve(N){return U(N,0)||U(N,1)&&"description"in N.properties&&Ee.TUnion(N.properties.description)&&N.properties.description.anyOf.length===2&&(Ee.TString(N.properties.description.anyOf[0])&&Ee.TUndefined(N.properties.description.anyOf[1])||Ee.TString(N.properties.description.anyOf[1])&&Ee.TUndefined(N.properties.description.anyOf[0]))}a(ve,"IsObjectSymbolLike");function me(N){return U(N,0)}a(me,"IsObjectNumberLike");function he(N){return U(N,0)}a(he,"IsObjectBooleanLike");function Fe(N){return U(N,0)}a(Fe,"IsObjectBigIntLike");function Oe(N){return U(N,0)}a(Oe,"IsObjectDateLike");function M(N){return B(N)}a(M,"IsObjectUint8ArrayLike");function Q(N){const k=_e.Type.Number();return U(N,0)||U(N,1)&&"length"in N.properties&&t(J(N.properties["length"],k))===at.True}a(Q,"IsObjectFunctionLike");function fe(N){return U(N,0)}a(fe,"IsObjectConstructorLike");function B(N){const k=_e.Type.Number();return U(N,0)||U(N,1)&&"length"in N.properties&&t(J(N.properties["length"],k))===at.True}a(B,"IsObjectArrayLike");function ye(N){const k=_e.Type.Function([_e.Type.Any()],_e.Type.Any());return U(N,0)||U(N,1)&&"then"in N.properties&&t(J(N.properties["then"],k))===at.True}a(ye,"IsObjectPromiseLike");function De(N,k){return J(N,k)===at.False?at.False:Ee.TOptional(N)&&!Ee.TOptional(k)?at.False:at.True}a(De,"Property");function $e(N,k){return Ee.TUnknown(N)?at.False:Ee.TAny(N)?at.Union:Ee.TNever(N)||Ee.TLiteralString(N)&&te(k)||Ee.TLiteralNumber(N)&&me(k)||Ee.TLiteralBoolean(N)&&he(k)||Ee.TSymbol(N)&&ve(k)||Ee.TBigInt(N)&&Fe(k)||Ee.TString(N)&&te(k)||Ee.TSymbol(N)&&ve(k)||Ee.TNumber(N)&&me(k)||Ee.TInteger(N)&&me(k)||Ee.TBoolean(N)&&he(k)||Ee.TUint8Array(N)&&M(k)||Ee.TDate(N)&&Oe(k)||Ee.TConstructor(N)&&fe(k)||Ee.TFunction(N)&&Q(k)?at.True:Ee.TRecord(N)&&Ee.TString(F(N))?(()=>{return k[_e.Hint]==="Record"?at.True:at.False})():Ee.TRecord(N)&&Ee.TNumber(F(N))?(()=>{return U(k,0)?at.True:at.False})():at.False}a($e,"TObjectRight");function gt(N,k){return n(k)?i(N,k):Ee.TRecord(k)?$(N,k):!Ee.TObject(k)?at.False:(()=>{for(const Ae of Object.getOwnPropertyNames(k.properties)){if(!(Ae in N.properties))return at.False;if(De(N.properties[Ae],k.properties[Ae])===at.False){return at.False}}return at.True})()}a(gt,"TObject");function ut(N,k){return n(k)?i(N,k):Ee.TObject(k)&&ye(k)?at.True:!Ee.TPromise(k)?at.False:t(J(N.item,k.item))}a(ut,"TPromise");function F(N){return _e.PatternNumberExact in N.patternProperties?_e.Type.Number():_e.PatternStringExact in N.patternProperties?_e.Type.String():r("Unknown record key pattern")}a(F,"RecordKey");function G(N){return _e.PatternNumberExact in N.patternProperties?N.patternProperties[_e.PatternNumberExact]:_e.PatternStringExact in N.patternProperties?N.patternProperties[_e.PatternStringExact]:r("Unable to get record value schema")}a(G,"RecordValue");function $(N,k){const[Ae,Be]=[F(k),G(k)];return Ee.TLiteralString(N)&&Ee.TNumber(Ae)&&t(J(N,Be))===at.True?at.True:Ee.TUint8Array(N)&&Ee.TNumber(Ae)?J(N,Be):Ee.TString(N)&&Ee.TNumber(Ae)?J(N,Be):Ee.TArray(N)&&Ee.TNumber(Ae)?J(N,Be):Ee.TObject(N)?(()=>{for(const et of Object.getOwnPropertyNames(N.properties)){if(De(Be,N.properties[et])===at.False){return at.False}}return at.True})():at.False}a($,"TRecordRight");function K(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):!Ee.TRecord(k)?at.False:J(G(N),G(k))}a(K,"TRecord");function pe(N,k){return Ee.TLiteral(N)&&Jt.IsString(N.const)?at.True:Ee.TString(N)?at.True:at.False}a(pe,"TStringRight");function H(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TString(k)?at.True:at.False}a(H,"TString");function de(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TSymbol(k)?at.True:at.False}a(de,"TSymbol");function se(N,k){return Ee.TTemplateLiteral(N)?J(xy.Resolve(N),k):Ee.TTemplateLiteral(k)?J(N,xy.Resolve(k)):r("Invalid fallthrough for TemplateLiteral")}a(se,"TTemplateLiteral");function L(N,k){return Ee.TArray(k)&&N.items!==void 0&&N.items.every(Ae=>J(Ae,k.items)===at.True)}a(L,"IsArrayOfTuple");function Se(N,k){return Ee.TNever(N)?at.True:Ee.TUnknown(N)?at.False:Ee.TAny(N)?at.Union:at.False}a(Se,"TTupleRight");function Le(N,k){return n(k)?i(N,k):Ee.TObject(k)&&B(k)?at.True:Ee.TArray(k)&&L(N,k)?at.True:!Ee.TTuple(k)?at.False:Jt.IsUndefined(N.items)&&!Jt.IsUndefined(k.items)||!Jt.IsUndefined(N.items)&&Jt.IsUndefined(k.items)?at.False:Jt.IsUndefined(N.items)&&!Jt.IsUndefined(k.items)?at.True:N.items.every((Ae,Be)=>J(Ae,k.items[Be])===at.True)?at.True:at.False}a(Le,"TTuple");function Ke(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TUint8Array(k)?at.True:at.False}a(Ke,"TUint8Array");function St(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TVoid(k)?j(N,k):Ee.TUndefined(k)?at.True:at.False}a(St,"TUndefined");function Mt(N,k){return k.anyOf.some(Ae=>J(N,Ae)===at.True)?at.True:at.False}a(Mt,"TUnionRight");function _r(N,k){return N.anyOf.every(Ae=>J(Ae,k)===at.True)?at.True:at.False}a(_r,"TUnion");function Ur(N,k){return at.True}a(Ur,"TUnknownRight");function Ve(N,k){return Ee.TNever(k)?C(N,k):Ee.TIntersect(k)?S(N,k):Ee.TUnion(k)?Mt(N,k):Ee.TAny(k)?s(N,k):Ee.TString(k)?pe(N,k):Ee.TNumber(k)?I(N,k):Ee.TInteger(k)?_(N,k):Ee.TBoolean(k)?p(N,k):Ee.TArray(k)?u(N,k):Ee.TTuple(k)?Se(N,k):Ee.TObject(k)?$e(N,k):Ee.TUnknown(k)?at.True:at.False}a(Ve,"TUnknown");function j(N,k){return Ee.TUndefined(N)?at.True:Ee.TUndefined(N)?at.True:at.False}a(j,"VoidRight");function q(N,k){return Ee.TIntersect(k)?S(N,k):Ee.TUnion(k)?Mt(N,k):Ee.TUnknown(k)?Ur(N,k):Ee.TAny(k)?s(N,k):Ee.TObject(k)?$e(N,k):Ee.TVoid(k)?at.True:at.False}a(q,"TVoid");function J(N,k){return Ee.TTemplateLiteral(N)||Ee.TTemplateLiteral(k)?se(N,k):Ee.TNot(N)||Ee.TNot(k)?P(N,k):Ee.TAny(N)?o(N,k):Ee.TArray(N)?l(N,k):Ee.TBigInt(N)?d(N,k):Ee.TBoolean(N)?f(N,k):Ee.TAsyncIterator(N)?c(N,k):Ee.TConstructor(N)?m(N,k):Ee.TDate(N)?h(N,k):Ee.TFunction(N)?g(N,k):Ee.TInteger(N)?v(N,k):Ee.TIntersect(N)?E(N,k):Ee.TIterator(N)?b(N,k):Ee.TLiteral(N)?A(N,k):Ee.TNever(N)?T(N,k):Ee.TNull(N)?R(N,k):Ee.TNumber(N)?D(N,k):Ee.TObject(N)?gt(N,k):Ee.TRecord(N)?K(N,k):Ee.TString(N)?H(N,k):Ee.TSymbol(N)?de(N,k):Ee.TTuple(N)?Le(N,k):Ee.TPromise(N)?ut(N,k):Ee.TUint8Array(N)?Ke(N,k):Ee.TUndefined(N)?St(N,k):Ee.TUnion(N)?_r(N,k):Ee.TUnknown(N)?Ve(N,k):Ee.TVoid(N)?q(N,k):r(`Unknown left type operand '${N[_e.Kind]}'`)}a(J,"Visit");function ae(N,k){return J(N,k)}a(ae,"Extends");e.Extends=ae})(oC||(_e.TypeExtends=oC={}));var Rr;(function(e){function t(o){const u=Object.getOwnPropertyNames(o).reduce((c,d)=>({...c,[d]:n(o[d])}),{});const l=Object.getOwnPropertySymbols(o).reduce((c,d)=>({...c,[d]:n(o[d])}),{});return{...u,...l}}a(t,"ObjectType");function r(o){return o.map(u=>n(u))}a(r,"ArrayType");function n(o){return Jt.IsArray(o)?r(o):Jt.IsObject(o)?t(o):o}a(n,"Visit");function i(o){return o.map(u=>s(u))}a(i,"Rest");e.Rest=i;function s(o,u={}){return{...n(o),...u}}a(s,"Type");e.Type=s})(Rr||(_e.TypeClone=Rr={}));var VRe;(function(e){function t(m){return m.map(h=>{const{[_e.Optional]:g,..._}=Rr.Type(h);return _})}a(t,"OptionalUnwrap");function r(m){return m.every(h=>Ee.TOptional(h))}a(r,"IsIntersectOptional");function n(m){return m.some(h=>Ee.TOptional(h))}a(n,"IsUnionOptional");function i(m){return r(m.allOf)?_e.Type.Optional(_e.Type.Intersect(t(m.allOf))):m}a(i,"ResolveIntersect");function s(m){return n(m.anyOf)?_e.Type.Optional(_e.Type.Union(t(m.anyOf))):m}a(s,"ResolveUnion");function o(m){return m[_e.Kind]==="Intersect"?i(m):m[_e.Kind]==="Union"?s(m):m}a(o,"ResolveOptional");function u(m,h){const g=m.allOf.reduce((_,v)=>{const S=p(v,h);return S[_e.Kind]==="Never"?_:[..._,S]},[]);return o(_e.Type.Intersect(g))}a(u,"TIntersect");function l(m,h){const g=m.anyOf.map(_=>p(_,h));return o(_e.Type.Union(g))}a(l,"TUnion");function c(m,h){const g=m.properties[h];return Jt.IsUndefined(g)?_e.Type.Never():_e.Type.Union([g])}a(c,"TObject");function d(m,h){const g=m.items;if(Jt.IsUndefined(g))return _e.Type.Never();const _=g[h];if(Jt.IsUndefined(_))return _e.Type.Never();return _}a(d,"TTuple");function p(m,h){return m[_e.Kind]==="Intersect"?u(m,h):m[_e.Kind]==="Union"?l(m,h):m[_e.Kind]==="Object"?c(m,h):m[_e.Kind]==="Tuple"?d(m,h):_e.Type.Never()}a(p,"Visit");function f(m,h,g={}){const _=h.map(v=>p(m,v.toString()));return o(_e.Type.Union(_,g))}a(f,"Resolve");e.Resolve=f})(VRe||(_e.IndexedAccessor=VRe={}));var EP;(function(e){function t(d){const[p,f]=[d.slice(0,1),d.slice(1)];return`${p.toLowerCase()}${f}`}a(t,"Uncapitalize");function r(d){const[p,f]=[d.slice(0,1),d.slice(1)];return`${p.toUpperCase()}${f}`}a(r,"Capitalize");function n(d){return d.toUpperCase()}a(n,"Uppercase");function i(d){return d.toLowerCase()}a(i,"Lowercase");function s(d,p){const f=SP.ParseExact(d.pattern);const m=AP.Check(f);if(!m)return{...d,pattern:o(d.pattern,p)};const h=[...CP.Generate(f)];const g=h.map(S=>_e.Type.Literal(S));const _=u(g,p);const v=_e.Type.Union(_);return _e.Type.TemplateLiteral([v])}a(s,"IntrinsicTemplateLiteral");function o(d,p){return typeof d==="string"?p==="Uncapitalize"?t(d):p==="Capitalize"?r(d):p==="Uppercase"?n(d):p==="Lowercase"?i(d):d:d.toString()}a(o,"IntrinsicLiteral");function u(d,p){if(d.length===0)return[];const[f,...m]=d;return[c(f,p),...u(m,p)]}a(u,"IntrinsicRest");function l(d,p){return Ee.TTemplateLiteral(d)?s(d,p):Ee.TUnion(d)?_e.Type.Union(u(d.anyOf,p)):Ee.TLiteral(d)?_e.Type.Literal(o(d.const,p)):d}a(l,"Visit");function c(d,p){return l(d,p)}a(c,"Map");e.Map=c})(EP||(_e.Intrinsic=EP={}));var bP;(function(e){function t(o,u){return _e.Type.Intersect(o.allOf.map(l=>i(l,u)),{...o})}a(t,"TIntersect");function r(o,u){return _e.Type.Union(o.anyOf.map(l=>i(l,u)),{...o})}a(r,"TUnion");function n(o,u){return u(o)}a(n,"TObject");function i(o,u){return o[_e.Kind]==="Intersect"?t(o,u):o[_e.Kind]==="Union"?r(o,u):o[_e.Kind]==="Object"?n(o,u):o}a(i,"Visit");function s(o,u,l){return{...i(Rr.Type(o),u),...l}}a(s,"Map");e.Map=s})(bP||(_e.ObjectMap=bP={}));var GJ;(function(e){function t(c){return c[0]==="^"&&c[c.length-1]==="$"?c.slice(1,c.length-1):c}a(t,"UnwrapPattern");function r(c,d){return c.allOf.reduce((p,f)=>[...p,...o(f,d)],[])}a(r,"TIntersect");function n(c,d){const p=c.anyOf.map(f=>o(f,d));return[...p.reduce((f,m)=>m.map(h=>p.every(g=>g.includes(h))?f.add(h):f)[0],new Set)]}a(n,"TUnion");function i(c,d){return Object.getOwnPropertyNames(c.properties)}a(i,"TObject");function s(c,d){return d.includePatterns?Object.getOwnPropertyNames(c.patternProperties):[]}a(s,"TRecord");function o(c,d){return Ee.TIntersect(c)?r(c,d):Ee.TUnion(c)?n(c,d):Ee.TObject(c)?i(c,d):Ee.TRecord(c)?s(c,d):[]}a(o,"Visit");function u(c,d){return[...new Set(o(c,d))]}a(u,"ResolveKeys");e.ResolveKeys=u;function l(c){const d=u(c,{includePatterns:true});const p=d.map(f=>`(${t(f)})`);return`^(${p.join("|")})$`}a(l,"ResolvePattern");e.ResolvePattern=l})(GJ||(_e.KeyResolver=GJ={}));var HJ=class extends mh{static{a(this,"KeyArrayResolverError")}};_e.KeyArrayResolverError=HJ;var UF;(function(e){function t(r){return Array.isArray(r)?r:Ee.TUnionLiteral(r)?r.anyOf.map(n=>n.const.toString()):Ee.TLiteral(r)?[r.const]:Ee.TTemplateLiteral(r)?(()=>{const n=SP.ParseExact(r.pattern);if(!AP.Check(n))throw new HJ("Cannot resolve keys from infinite template expression");return[...CP.Generate(n)]})():[]}a(t,"Resolve");e.Resolve=t})(UF||(_e.KeyArrayResolver=UF={}));var zRe;(function(e){function*t(n){for(const i of n.anyOf){if(i[_e.Kind]==="Union"){yield*t(i)}else{yield i}}}a(t,"TUnion");function r(n){return _e.Type.Union([...t(n)],{...n})}a(r,"Resolve");e.Resolve=r})(zRe||(_e.UnionResolver=zRe={}));var VJ=class extends mh{static{a(this,"TemplateLiteralPatternError")}};_e.TemplateLiteralPatternError=VJ;var zJ;(function(e){function t(s){throw new VJ(s)}a(t,"Throw");function r(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(r,"Escape");function n(s,o){return Ee.TTemplateLiteral(s)?s.pattern.slice(1,s.pattern.length-1):Ee.TUnion(s)?`(${s.anyOf.map(u=>n(u,o)).join("|")})`:Ee.TNumber(s)?`${o}${_e.PatternNumber}`:Ee.TInteger(s)?`${o}${_e.PatternNumber}`:Ee.TBigInt(s)?`${o}${_e.PatternNumber}`:Ee.TString(s)?`${o}${_e.PatternString}`:Ee.TLiteral(s)?`${o}${r(s.const.toString())}`:Ee.TBoolean(s)?`${o}${_e.PatternBoolean}`:t(`Unexpected Kind '${s[_e.Kind]}'`)}a(n,"Visit");function i(s){return`^${s.map(o=>n(o,"")).join("")}$`}a(i,"Create");e.Create=i})(zJ||(_e.TemplateLiteralPattern=zJ={}));var xy;(function(e){function t(r){const n=SP.ParseExact(r.pattern);if(!AP.Check(n))return _e.Type.String();const i=[...CP.Generate(n)].map(s=>_e.Type.Literal(s));return _e.Type.Union(i)}a(t,"Resolve");e.Resolve=t})(xy||(_e.TemplateLiteralResolver=xy={}));var $F=class extends mh{static{a(this,"TemplateLiteralParserError")}};_e.TemplateLiteralParserError=$F;var SP;(function(e){function t(m,h,g){return m[h]===g&&m.charCodeAt(h-1)!==92}a(t,"IsNonEscaped");function r(m,h){return t(m,h,"(")}a(r,"IsOpenParen");function n(m,h){return t(m,h,")")}a(n,"IsCloseParen");function i(m,h){return t(m,h,"|")}a(i,"IsSeparator");function s(m){if(!(r(m,0)&&n(m,m.length-1)))return false;let h=0;for(let g=0;g<m.length;g++){if(r(m,g))h+=1;if(n(m,g))h-=1;if(h===0&&g!==m.length-1)return false}return true}a(s,"IsGroup");function o(m){return m.slice(1,m.length-1)}a(o,"InGroup");function u(m){let h=0;for(let g=0;g<m.length;g++){if(r(m,g))h+=1;if(n(m,g))h-=1;if(i(m,g)&&h===0)return true}return false}a(u,"IsPrecedenceOr");function l(m){for(let h=0;h<m.length;h++){if(r(m,h))return true}return false}a(l,"IsPrecedenceAnd");function c(m){let[h,g]=[0,0];const _=[];for(let S=0;S<m.length;S++){if(r(m,S))h+=1;if(n(m,S))h-=1;if(i(m,S)&&h===0){const E=m.slice(g,S);if(E.length>0)_.push(p(E));g=S+1}}const v=m.slice(g);if(v.length>0)_.push(p(v));if(_.length===0)return{type:"const",const:""};if(_.length===1)return _[0];return{type:"or",expr:_}}a(c,"Or");function d(m){function h(v,S){if(!r(v,S))throw new $F(`TemplateLiteralParser: Index must point to open parens`);let E=0;for(let b=S;b<v.length;b++){if(r(v,b))E+=1;if(n(v,b))E-=1;if(E===0)return[S,b]}throw new $F(`TemplateLiteralParser: Unclosed group parens in expression`)}a(h,"Group");function g(v,S){for(let E=S;E<v.length;E++){if(r(v,E))return[S,E]}return[S,v.length]}a(g,"Range");const _=[];for(let v=0;v<m.length;v++){if(r(m,v)){const[S,E]=h(m,v);const b=m.slice(S,E+1);_.push(p(b));v=E}else{const[S,E]=g(m,v);const b=m.slice(S,E);if(b.length>0)_.push(p(b));v=E-1}}return _.length===0?{type:"const",const:""}:_.length===1?_[0]:{type:"and",expr:_}}a(d,"And");function p(m){return s(m)?p(o(m)):u(m)?c(m):l(m)?d(m):{type:"const",const:m}}a(p,"Parse");e.Parse=p;function f(m){return p(m.slice(1,m.length-1))}a(f,"ParseExact");e.ParseExact=f})(SP||(_e.TemplateLiteralParser=SP={}));var KJ=class extends mh{static{a(this,"TemplateLiteralFiniteError")}};_e.TemplateLiteralFiniteError=KJ;var AP;(function(e){function t(o){throw new KJ(o)}a(t,"Throw");function r(o){return o.type==="or"&&o.expr.length===2&&o.expr[0].type==="const"&&o.expr[0].const==="0"&&o.expr[1].type==="const"&&o.expr[1].const==="[1-9][0-9]*"}a(r,"IsNumber");function n(o){return o.type==="or"&&o.expr.length===2&&o.expr[0].type==="const"&&o.expr[0].const==="true"&&o.expr[1].type==="const"&&o.expr[1].const==="false"}a(n,"IsBoolean");function i(o){return o.type==="const"&&o.const===".*"}a(i,"IsString");function s(o){return n(o)?true:r(o)||i(o)?false:o.type==="and"?o.expr.every(u=>s(u)):o.type==="or"?o.expr.every(u=>s(u)):o.type==="const"?true:t(`Unknown expression type`)}a(s,"Check");e.Check=s})(AP||(_e.TemplateLiteralFinite=AP={}));var WJ=class extends mh{static{a(this,"TemplateLiteralGeneratorError")}};_e.TemplateLiteralGeneratorError=WJ;var CP;(function(e){function*t(o){if(o.length===1)return yield*o[0];for(const u of o[0]){for(const l of t(o.slice(1))){yield`${u}${l}`}}}a(t,"Reduce");function*r(o){return yield*t(o.expr.map(u=>[...s(u)]))}a(r,"And");function*n(o){for(const u of o.expr)yield*s(u)}a(n,"Or");function*i(o){return yield o.const}a(i,"Const");function*s(o){return o.type==="and"?yield*r(o):o.type==="or"?yield*n(o):o.type==="const"?yield*i(o):(()=>{throw new WJ("Unknown expression")})()}a(s,"Generate");e.Generate=s})(CP||(_e.TemplateLiteralGenerator=CP={}));var KRe;(function(e){function*t(s){const o=s.trim().replace(/"|'/g,"");return o==="boolean"?yield _e.Type.Boolean():o==="number"?yield _e.Type.Number():o==="bigint"?yield _e.Type.BigInt():o==="string"?yield _e.Type.String():yield(()=>{const u=o.split("|").map(l=>_e.Type.Literal(l.trim()));return u.length===0?_e.Type.Never():u.length===1?u[0]:_e.Type.Union(u)})()}a(t,"ParseUnion");function*r(s){if(s[1]!=="{"){const o=_e.Type.Literal("$");const u=n(s.slice(1));return yield*[o,...u]}for(let o=2;o<s.length;o++){if(s[o]==="}"){const u=t(s.slice(2,o));const l=n(s.slice(o+1));return yield*[...u,...l]}}yield _e.Type.Literal(s)}a(r,"ParseTerminal");function*n(s){for(let o=0;o<s.length;o++){if(s[o]==="$"){const u=_e.Type.Literal(s.slice(0,o));const l=r(s.slice(o));return yield*[u,...l]}}yield _e.Type.Literal(s)}a(n,"ParseLiteral");function i(s){return[...n(s)]}a(i,"Parse");e.Parse=i})(KRe||(_e.TemplateLiteralDslParser=KRe={}));var YJ=class{static{a(this,"TransformDecodeBuilder")}constructor(t){this.schema=t}Decode(t){return new XJ(this.schema,t)}};_e.TransformDecodeBuilder=YJ;var XJ=class{static{a(this,"TransformEncodeBuilder")}constructor(t,r){this.schema=t;this.decode=r}Encode(t){const r=Rr.Type(this.schema);return Ee.TTransform(r)?(()=>{const n=a(o=>r[_e.Transform].Encode(t(o)),"Encode");const i=a(o=>this.decode(r[_e.Transform].Decode(o)),"Decode");const s={Encode:n,Decode:i};return{...r,[_e.Transform]:s}})():(()=>{const n={Decode:this.decode,Encode:t};return{...r,[_e.Transform]:n}})()}};_e.TransformEncodeBuilder=XJ;var Fxn=0;var JJ=class extends mh{static{a(this,"TypeBuilderError")}};_e.TypeBuilderError=JJ;var QJ=class{static{a(this,"TypeBuilder")}Create(t){return t}Throw(t){throw new JJ(t)}Discard(t,r){const{[r]:n,...i}=t;return i}Strict(t){return JSON.parse(JSON.stringify(t))}};_e.TypeBuilder=QJ;var jF=class extends QJ{static{a(this,"JsonTypeBuilder")}ReadonlyOptional(t){return this.Readonly(this.Optional(t))}Readonly(t){return{...Rr.Type(t),[_e.Readonly]:"Readonly"}}Optional(t){return{...Rr.Type(t),[_e.Optional]:"Optional"}}Any(t={}){return this.Create({...t,[_e.Kind]:"Any"})}Array(t,r={}){return this.Create({...r,[_e.Kind]:"Array",type:"array",items:Rr.Type(t)})}Boolean(t={}){return this.Create({...t,[_e.Kind]:"Boolean",type:"boolean"})}Capitalize(t,r={}){return{...EP.Map(Rr.Type(t),"Capitalize"),...r}}Composite(t,r){const n=_e.Type.Intersect(t,{});const i=GJ.ResolveKeys(n,{includePatterns:false});const s=i.reduce((o,u)=>({...o,[u]:_e.Type.Index(n,[u])}),{});return _e.Type.Object(s,r)}Enum(t,r={}){const n=Object.getOwnPropertyNames(t).filter(s=>isNaN(s)).map(s=>t[s]);const i=n.map(s=>Jt.IsString(s)?{[_e.Kind]:"Literal",type:"string",const:s}:{[_e.Kind]:"Literal",type:"number",const:s});return this.Create({...r,[_e.Kind]:"Union",anyOf:i})}Extends(t,r,n,i,s={}){switch(oC.Extends(t,r)){case at.Union:return this.Union([Rr.Type(n,s),Rr.Type(i,s)]);case at.True:return Rr.Type(n,s);case at.False:return Rr.Type(i,s)}}Exclude(t,r,n={}){return Ee.TTemplateLiteral(t)?this.Exclude(xy.Resolve(t),r,n):Ee.TTemplateLiteral(r)?this.Exclude(t,xy.Resolve(r),n):Ee.TUnion(t)?(()=>{const i=t.anyOf.filter(s=>oC.Extends(s,r)===at.False);return i.length===1?Rr.Type(i[0],n):this.Union(i,n)})():oC.Extends(t,r)!==at.False?this.Never(n):Rr.Type(t,n)}Extract(t,r,n={}){return Ee.TTemplateLiteral(t)?this.Extract(xy.Resolve(t),r,n):Ee.TTemplateLiteral(r)?this.Extract(t,xy.Resolve(r),n):Ee.TUnion(t)?(()=>{const i=t.anyOf.filter(s=>oC.Extends(s,r)!==at.False);return i.length===1?Rr.Type(i[0],n):this.Union(i,n)})():oC.Extends(t,r)!==at.False?Rr.Type(t,n):this.Never(n)}Index(t,r,n={}){return Ee.TArray(t)&&Ee.TNumber(r)?(()=>{return Rr.Type(t.items,n)})():Ee.TTuple(t)&&Ee.TNumber(r)?(()=>{const i=Jt.IsUndefined(t.items)?[]:t.items;const s=i.map(o=>Rr.Type(o));return this.Union(s,n)})():(()=>{const i=UF.Resolve(r);const s=Rr.Type(t);return VRe.Resolve(s,i,n)})()}Integer(t={}){return this.Create({...t,[_e.Kind]:"Integer",type:"integer"})}Intersect(t,r={}){if(t.length===0)return _e.Type.Never();if(t.length===1)return Rr.Type(t[0],r);if(t.some(o=>Ee.TTransform(o)))this.Throw("Cannot intersect transform types");const n=t.every(o=>Ee.TObject(o));const i=Rr.Rest(t);const s=Ee.TSchema(r.unevaluatedProperties)?{unevaluatedProperties:Rr.Type(r.unevaluatedProperties)}:{};return r.unevaluatedProperties===false||Ee.TSchema(r.unevaluatedProperties)||n?this.Create({...r,...s,[_e.Kind]:"Intersect",type:"object",allOf:i}):this.Create({...r,...s,[_e.Kind]:"Intersect",allOf:i})}KeyOf(t,r={}){return Ee.TRecord(t)?(()=>{const n=Object.getOwnPropertyNames(t.patternProperties)[0];return n===_e.PatternNumberExact?this.Number(r):n===_e.PatternStringExact?this.String(r):this.Throw("Unable to resolve key type from Record key pattern")})():Ee.TTuple(t)?(()=>{const n=Jt.IsUndefined(t.items)?[]:t.items;const i=n.map((s,o)=>_e.Type.Literal(o.toString()));return this.Union(i,r)})():Ee.TArray(t)?(()=>{return this.Number(r)})():(()=>{const n=GJ.ResolveKeys(t,{includePatterns:false});if(n.length===0)return this.Never(r);const i=n.map(s=>this.Literal(s));return this.Union(i,r)})()}Literal(t,r={}){return this.Create({...r,[_e.Kind]:"Literal",const:t,type:typeof t})}Lowercase(t,r={}){return{...EP.Map(Rr.Type(t),"Lowercase"),...r}}Never(t={}){return this.Create({...t,[_e.Kind]:"Never",not:{}})}Not(t,r){return this.Create({...r,[_e.Kind]:"Not",not:Rr.Type(t)})}Null(t={}){return this.Create({...t,[_e.Kind]:"Null",type:"null"})}Number(t={}){return this.Create({...t,[_e.Kind]:"Number",type:"number"})}Object(t,r={}){const n=Object.getOwnPropertyNames(t);const i=n.filter(l=>Ee.TOptional(t[l]));const s=n.filter(l=>!i.includes(l));const o=Ee.TSchema(r.additionalProperties)?{additionalProperties:Rr.Type(r.additionalProperties)}:{};const u=n.reduce((l,c)=>({...l,[c]:Rr.Type(t[c])}),{});return s.length>0?this.Create({...r,...o,[_e.Kind]:"Object",type:"object",properties:u,required:s}):this.Create({...r,...o,[_e.Kind]:"Object",type:"object",properties:u})}Omit(t,r,n={}){const i=UF.Resolve(r);return bP.Map(this.Discard(Rr.Type(t),_e.Transform),s=>{if(Jt.IsArray(s.required)){s.required=s.required.filter(o=>!i.includes(o));if(s.required.length===0)delete s.required}for(const o of Object.getOwnPropertyNames(s.properties)){if(i.includes(o))delete s.properties[o]}return this.Create(s)},n)}Partial(t,r={}){return bP.Map(this.Discard(Rr.Type(t),_e.Transform),n=>{const i=Object.getOwnPropertyNames(n.properties).reduce((s,o)=>{return{...s,[o]:this.Optional(n.properties[o])}},{});return this.Object(i,this.Discard(n,"required"))},r)}Pick(t,r,n={}){const i=UF.Resolve(r);return bP.Map(this.Discard(Rr.Type(t),_e.Transform),s=>{if(Jt.IsArray(s.required)){s.required=s.required.filter(o=>i.includes(o));if(s.required.length===0)delete s.required}for(const o of Object.getOwnPropertyNames(s.properties)){if(!i.includes(o))delete s.properties[o]}return this.Create(s)},n)}Record(t,r,n={}){return Ee.TTemplateLiteral(t)?(()=>{const i=SP.ParseExact(t.pattern);return AP.Check(i)?this.Object([...CP.Generate(i)].reduce((s,o)=>({...s,[o]:Rr.Type(r)}),{}),n):this.Create({...n,[_e.Kind]:"Record",type:"object",patternProperties:{[t.pattern]:Rr.Type(r)}})})():Ee.TUnion(t)?(()=>{const i=zRe.Resolve(t);if(Ee.TUnionLiteral(i)){const s=i.anyOf.reduce((o,u)=>({...o,[u.const]:Rr.Type(r)}),{});return this.Object(s,{...n,[_e.Hint]:"Record"})}else this.Throw("Record key of type union contains non-literal types")})():Ee.TLiteral(t)?(()=>{return Jt.IsString(t.const)||Jt.IsNumber(t.const)?this.Object({[t.const]:Rr.Type(r)},n):this.Throw("Record key of type literal is not of type string or number")})():Ee.TInteger(t)||Ee.TNumber(t)?(()=>{return this.Create({...n,[_e.Kind]:"Record",type:"object",patternProperties:{[_e.PatternNumberExact]:Rr.Type(r)}})})():Ee.TString(t)?(()=>{const i=Jt.IsUndefined(t.pattern)?_e.PatternStringExact:t.pattern;return this.Create({...n,[_e.Kind]:"Record",type:"object",patternProperties:{[i]:Rr.Type(r)}})})():this.Never()}Recursive(t,r={}){if(Jt.IsUndefined(r.$id))r.$id=`T${Fxn++}`;const n=t({[_e.Kind]:"This",$ref:`${r.$id}`});n.$id=r.$id;return this.Create({...r,[_e.Hint]:"Recursive",...n})}Ref(t,r={}){if(Jt.IsString(t))return this.Create({...r,[_e.Kind]:"Ref",$ref:t});if(Jt.IsUndefined(t.$id))this.Throw("Reference target type must specify an $id");return this.Create({...r,[_e.Kind]:"Ref",$ref:t.$id})}Required(t,r={}){return bP.Map(this.Discard(Rr.Type(t),_e.Transform),n=>{const i=Object.getOwnPropertyNames(n.properties).reduce((s,o)=>{return{...s,[o]:this.Discard(n.properties[o],_e.Optional)}},{});return this.Object(i,n)},r)}Rest(t){return Ee.TTuple(t)&&!Jt.IsUndefined(t.items)?Rr.Rest(t.items):Ee.TIntersect(t)?Rr.Rest(t.allOf):Ee.TUnion(t)?Rr.Rest(t.anyOf):[]}String(t={}){return this.Create({...t,[_e.Kind]:"String",type:"string"})}TemplateLiteral(t,r={}){const n=Jt.IsString(t)?zJ.Create(KRe.Parse(t)):zJ.Create(t);return this.Create({...r,[_e.Kind]:"TemplateLiteral",type:"string",pattern:n})}Transform(t){return new YJ(t)}Tuple(t,r={}){const[n,i,s]=[false,t.length,t.length];const o=Rr.Rest(t);const u=t.length>0?{...r,[_e.Kind]:"Tuple",type:"array",items:o,additionalItems:n,minItems:i,maxItems:s}:{...r,[_e.Kind]:"Tuple",type:"array",minItems:i,maxItems:s};return this.Create(u)}Uncapitalize(t,r={}){return{...EP.Map(Rr.Type(t),"Uncapitalize"),...r}}Union(t,r={}){return Ee.TTemplateLiteral(t)?xy.Resolve(t):(()=>{const n=t;if(n.length===0)return this.Never(r);if(n.length===1)return this.Create(Rr.Type(n[0],r));const i=Rr.Rest(n);return this.Create({...r,[_e.Kind]:"Union",anyOf:i})})()}Unknown(t={}){return this.Create({...t,[_e.Kind]:"Unknown"})}Unsafe(t={}){return this.Create({...t,[_e.Kind]:t[_e.Kind]||"Unsafe"})}Uppercase(t,r={}){return{...EP.Map(Rr.Type(t),"Uppercase"),...r}}};_e.JsonTypeBuilder=jF;var ZJ=class extends jF{static{a(this,"JavaScriptTypeBuilder")}AsyncIterator(t,r={}){return this.Create({...r,[_e.Kind]:"AsyncIterator",type:"AsyncIterator",items:Rr.Type(t)})}Awaited(t,r={}){const n=a(i=>i.length>0?(()=>{const[s,...o]=i;return[this.Awaited(s),...n(o)]})():i,"Unwrap");return Ee.TIntersect(t)?_e.Type.Intersect(n(t.allOf)):Ee.TUnion(t)?_e.Type.Union(n(t.anyOf)):Ee.TPromise(t)?this.Awaited(t.item):Rr.Type(t,r)}BigInt(t={}){return this.Create({...t,[_e.Kind]:"BigInt",type:"bigint"})}ConstructorParameters(t,r={}){return this.Tuple([...t.parameters],{...r})}Constructor(t,r,n){const[i,s]=[Rr.Rest(t),Rr.Type(r)];return this.Create({...n,[_e.Kind]:"Constructor",type:"constructor",parameters:i,returns:s})}Date(t={}){return this.Create({...t,[_e.Kind]:"Date",type:"Date"})}Function(t,r,n){const[i,s]=[Rr.Rest(t),Rr.Type(r)];return this.Create({...n,[_e.Kind]:"Function",type:"function",parameters:i,returns:s})}InstanceType(t,r={}){return Rr.Type(t.returns,r)}Iterator(t,r={}){return this.Create({...r,[_e.Kind]:"Iterator",type:"Iterator",items:Rr.Type(t)})}Parameters(t,r={}){return this.Tuple(t.parameters,{...r})}Promise(t,r={}){return this.Create({...r,[_e.Kind]:"Promise",type:"Promise",item:Rr.Type(t)})}RegExp(t,r={}){const n=Jt.IsString(t)?t:t.source;return this.Create({...r,[_e.Kind]:"String",type:"string",pattern:n})}RegEx(t,r={}){return this.RegExp(t,r)}ReturnType(t,r={}){return Rr.Type(t.returns,r)}Symbol(t){return this.Create({...t,[_e.Kind]:"Symbol",type:"symbol"})}Undefined(t={}){return this.Create({...t,[_e.Kind]:"Undefined",type:"undefined"})}Uint8Array(t={}){return this.Create({...t,[_e.Kind]:"Uint8Array",type:"Uint8Array"})}Void(t={}){return this.Create({...t,[_e.Kind]:"Void",type:"void"})}};_e.JavaScriptTypeBuilder=ZJ;_e.JsonType=new jF;_e.Type=new ZJ});var Axt=y(eQ=>{"use strict";Object.defineProperty(eQ,"__esModule",{value:true});eQ.CustomTypeBuilder=void 0;var GF=Sxt();var WRe=class extends GF.TypeBuilder{static{a(this,"CustomTypeBuilder")}static Date(){return GF.Type.Unsafe({type:"string",format:"date-time"})}static Nullable(t){return GF.Type.Union([t,GF.Type.Null()])}static StringEnum(t){return GF.Type.Unsafe({type:"string",enum:t})}};eQ.CustomTypeBuilder=WRe});var xxt=y(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:true});Tr.throwIfNotNumber=Tr.throwIfNotString=Tr.throwIfUndefinedOrNull=Tr.throwIfUndefined=Tr.ArgumentTypeError=Tr.ArgumentUndefinedError=Tr.ValidationError=Tr.withUndefinedAsNull=Tr.withNullAsUndefined=Tr.validateConstraint=Tr.validateConstraints=Tr.areFunctions=Tr.isFunction=Tr.isEmptyObject=Tr.assertAllDefined=Tr.assertIsDefined=Tr.assertType=Tr.isUndefinedOrNull=Tr.isDefined=Tr.isUndefined=Tr.isBoolean=Tr.isIterable=Tr.isNumber=Tr.isTypedArray=Tr.isObject=Tr.isStringArray=Tr.isString=void 0;function tQ(e){return typeof e==="string"}a(tQ,"isString");Tr.isString=tQ;function Bxn(e){return Array.isArray(e)&&e.every(t=>tQ(t))}a(Bxn,"isStringArray");Tr.isStringArray=Bxn;function Cxt(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}a(Cxt,"isObject");Tr.isObject=Cxt;function Mxn(e){const t=Object.getPrototypeOf(Uint8Array);return typeof e==="object"&&e instanceof t}a(Mxn,"isTypedArray");Tr.isTypedArray=Mxn;function wxt(e){return typeof e==="number"&&!isNaN(e)}a(wxt,"isNumber");Tr.isNumber=wxt;function qxn(e){return!!e&&typeof e[Symbol.iterator]==="function"}a(qxn,"isIterable");Tr.isIterable=qxn;function Uxn(e){return e===true||e===false}a(Uxn,"isBoolean");Tr.isBoolean=Uxn;function YRe(e){return typeof e==="undefined"}a(YRe,"isUndefined");Tr.isUndefined=YRe;function $xn(e){return!wP(e)}a($xn,"isDefined");Tr.isDefined=$xn;function wP(e){return YRe(e)||e===null}a(wP,"isUndefinedOrNull");Tr.isUndefinedOrNull=wP;function jxn(e,t){if(!e){throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}}a(jxn,"assertType");Tr.assertType=jxn;function Gxn(e){if(wP(e)){throw new Error("Assertion Failed: argument is undefined or null")}return e}a(Gxn,"assertIsDefined");Tr.assertIsDefined=Gxn;function Hxn(...e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];if(wP(n)){throw new Error(`Assertion Failed: argument at index ${r} is undefined or null`)}t.push(n)}return t}a(Hxn,"assertAllDefined");Tr.assertAllDefined=Hxn;var Vxn=Object.prototype.hasOwnProperty;function zxn(e){if(!Cxt(e)){return false}for(const t in e){if(Vxn.call(e,t)){return false}}return true}a(zxn,"isEmptyObject");Tr.isEmptyObject=zxn;function XRe(e){return typeof e==="function"}a(XRe,"isFunction");Tr.isFunction=XRe;function Kxn(...e){return e.length>0&&e.every(XRe)}a(Kxn,"areFunctions");Tr.areFunctions=Kxn;function Wxn(e,t){const r=Math.min(e.length,t.length);for(let n=0;n<r;n++){Txt(e[n],t[n])}}a(Wxn,"validateConstraints");Tr.validateConstraints=Wxn;function Txt(e,t){if(tQ(t)){if(typeof e!==t){throw new Error(`argument does not match constraint: typeof ${t}`)}}else if(XRe(t)){try{if(e instanceof t){return}}catch{}if(!wP(e)&&e.constructor===t){return}if(t.length===1&&t.call(void 0,e)===true){return}throw new Error(`argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true`)}}a(Txt,"validateConstraint");Tr.validateConstraint=Txt;function Yxn(e){return e===null?void 0:e}a(Yxn,"withNullAsUndefined");Tr.withNullAsUndefined=Yxn;function Xxn(e){return typeof e==="undefined"?null:e}a(Xxn,"withUndefinedAsNull");Tr.withUndefinedAsNull=Xxn;var HF=class extends Error{static{a(this,"ValidationError")}constructor(t){super(t)}};Tr.ValidationError=HF;var VF=class extends HF{static{a(this,"ArgumentUndefinedError")}constructor(t){super(`The argument '${t}' is undefined.`)}};Tr.ArgumentUndefinedError=VF;var zF=class extends HF{static{a(this,"ArgumentTypeError")}constructor(t,r){super(`The argument '${t}' must be of type '${r}'.`)}};Tr.ArgumentTypeError=zF;function Jxn(e,t){if(YRe(e)){throw new VF(t)}return true}a(Jxn,"throwIfUndefined");Tr.throwIfUndefined=Jxn;function JRe(e,t){if(wP(e)){throw new VF(t)}}a(JRe,"throwIfUndefinedOrNull");Tr.throwIfUndefinedOrNull=JRe;function Qxn(e,t){JRe(e,t);if(!tQ(e)){throw new zF(t,"string")}return true}a(Qxn,"throwIfNotString");Tr.throwIfNotString=Qxn;function Zxn(e,t){JRe(e,t);if(!wxt(e)){throw new zF(t,"number")}return true}a(Zxn,"throwIfNotNumber");Tr.throwIfNotNumber=Zxn});var hn=y(mt=>{"use strict";var Rxt=mt&&mt.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var eRn=mt&&mt.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var rQ=mt&&mt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null){for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))Rxt(t,e,r)}eRn(t,e);return t};var WE=mt&&mt.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))Rxt(t,e,r)};Object.defineProperty(mt,"__esModule",{value:true});mt.getRequiredEnvVar=mt.env=mt.EnvironmentalVariableRequiredError=mt.xfs=mt.RouteValidator=mt.JsonValidator=mt.TenantService=mt.OpenFGAService=mt.DevApiService=mt.getContentApiStorageTarballPath=mt.contentApiTarballFileName=mt.ContentApiService=mt.AuthApiService=mt.getServiceAccountIdToken=mt.createApiKeyServiceClient=mt.ApiKeyService=mt.RouteVersions=mt.startsWithReservedKeyword=mt.logger=mt.createNewLogger=mt.graphQL=mt.CloudStorage=mt.fly=mt.ApiServer=mt.featureFlagsPlugin=mt.ensureZuploUserPlugin=mt.ensureZuploAdminPlugin=mt.ensureServiceAccountPlugin=mt.apiKeyAuthPlugin=mt.errorHandler=mt.DeploymentLogState=mt.signString=mt.FeatureFlags=mt.VALID_COMPATIBILITY_DATES=mt.DEFAULT_COMPATIBILITY_DATE=mt.COMPATIBILITY_FLAG_MAPPINGS=mt.WARNING_STATUS=mt.WARNING_SEVERITY=mt.GOOD_STATUS=mt.FAILURE_STATUS=mt.ERROR_SEVERITY=mt.BuildIssueError=mt.hasBlockedNotifications=mt.getDefaultFlags=mt.getBuildFlagsForDeployment=mt.CommonAuth=void 0;var QRe=rQ(qp());mt.env=QRe.default;Object.defineProperty(mt,"EnvironmentalVariableRequiredError",{enumerable:true,get:function(){return QRe.EnvironmentalVariableRequiredError}});Object.defineProperty(mt,"getRequiredEnvVar",{enumerable:true,get:function(){return QRe.getRequiredEnvVar}});WE(ac(),mt);var tRn=Vce();Object.defineProperty(mt,"CommonAuth",{enumerable:true,get:function(){return tRn.CommonAuth}});var ZRe=WGe();Object.defineProperty(mt,"getBuildFlagsForDeployment",{enumerable:true,get:function(){return ZRe.getBuildFlagsForDeployment}});Object.defineProperty(mt,"getDefaultFlags",{enumerable:true,get:function(){return ZRe.getDefaultFlags}});Object.defineProperty(mt,"hasBlockedNotifications",{enumerable:true,get:function(){return ZRe.hasBlockedNotifications}});var TP=YGe();Object.defineProperty(mt,"BuildIssueError",{enumerable:true,get:function(){return TP.BuildIssueError}});Object.defineProperty(mt,"ERROR_SEVERITY",{enumerable:true,get:function(){return TP.ERROR_SEVERITY}});Object.defineProperty(mt,"FAILURE_STATUS",{enumerable:true,get:function(){return TP.FAILURE_STATUS}});Object.defineProperty(mt,"GOOD_STATUS",{enumerable:true,get:function(){return TP.GOOD_STATUS}});Object.defineProperty(mt,"WARNING_SEVERITY",{enumerable:true,get:function(){return TP.WARNING_SEVERITY}});Object.defineProperty(mt,"WARNING_STATUS",{enumerable:true,get:function(){return TP.WARNING_STATUS}});var rRn=XGe();Object.defineProperty(mt,"COMPATIBILITY_FLAG_MAPPINGS",{enumerable:true,get:function(){return rRn.COMPATIBILITY_FLAG_MAPPINGS}});var Oxt=ZGe();Object.defineProperty(mt,"DEFAULT_COMPATIBILITY_DATE",{enumerable:true,get:function(){return Oxt.DEFAULT_COMPATIBILITY_DATE}});Object.defineProperty(mt,"VALID_COMPATIBILITY_DATES",{enumerable:true,get:function(){return Oxt.VALID_COMPATIBILITY_DATES}});var nRn=zce();Object.defineProperty(mt,"FeatureFlags",{enumerable:true,get:function(){return nRn.FeatureFlags}});var iRn=eHe();Object.defineProperty(mt,"signString",{enumerable:true,get:function(){return iRn.signString}});WE(tHe(),mt);var sRn=Yce();Object.defineProperty(mt,"DeploymentLogState",{enumerable:true,get:function(){return sRn.DeploymentLogState}});WE(lHe(),mt);WE(Xce(),mt);var aRn=Jce();Object.defineProperty(mt,"errorHandler",{enumerable:true,get:function(){return aRn.errorHandler}});var KF=rde();Object.defineProperty(mt,"apiKeyAuthPlugin",{enumerable:true,get:function(){return KF.apiKeyAuthPlugin}});Object.defineProperty(mt,"ensureServiceAccountPlugin",{enumerable:true,get:function(){return KF.ensureServiceAccountPlugin}});Object.defineProperty(mt,"ensureZuploAdminPlugin",{enumerable:true,get:function(){return KF.ensureZuploAdminPlugin}});Object.defineProperty(mt,"ensureZuploUserPlugin",{enumerable:true,get:function(){return KF.ensureZuploUserPlugin}});Object.defineProperty(mt,"featureFlagsPlugin",{enumerable:true,get:function(){return KF.featureFlagsPlugin}});var oRn=Sft();Object.defineProperty(mt,"ApiServer",{enumerable:true,get:function(){return oRn.ApiServer}});mt.fly=rQ(wft());mt.CloudStorage=rQ(cvt());var uRn=dvt();Object.defineProperty(mt,"graphQL",{enumerable:true,get:function(){return uRn.graphQL}});WE(D2t(),mt);var Pxt=cEe();Object.defineProperty(mt,"createNewLogger",{enumerable:true,get:function(){return Pxt.createNewLogger}});Object.defineProperty(mt,"logger",{enumerable:true,get:function(){return Pxt.logger}});var lRn=twe();Object.defineProperty(mt,"startsWithReservedKeyword",{enumerable:true,get:function(){return lRn.startsWithReservedKeyword}});var cRn=L2t();Object.defineProperty(mt,"RouteVersions",{enumerable:true,get:function(){return cRn.RouteVersions}});var Nxt=swt();Object.defineProperty(mt,"ApiKeyService",{enumerable:true,get:function(){return Nxt.ApiKeyService}});Object.defineProperty(mt,"createApiKeyServiceClient",{enumerable:true,get:function(){return Nxt.createApiKeyServiceClient}});var dRn=tP();Object.defineProperty(mt,"getServiceAccountIdToken",{enumerable:true,get:function(){return dRn.getServiceAccountIdToken}});var pRn=owt();Object.defineProperty(mt,"AuthApiService",{enumerable:true,get:function(){return pRn.AuthApiService}});var eOe=dwt();Object.defineProperty(mt,"ContentApiService",{enumerable:true,get:function(){return eOe.ContentApiService}});Object.defineProperty(mt,"contentApiTarballFileName",{enumerable:true,get:function(){return eOe.contentApiTarballFileName}});Object.defineProperty(mt,"getContentApiStorageTarballPath",{enumerable:true,get:function(){return eOe.getContentApiStorageTarballPath}});var fRn=mwt();Object.defineProperty(mt,"DevApiService",{enumerable:true,get:function(){return fRn.DevApiService}});var mRn=hxt();Object.defineProperty(mt,"OpenFGAService",{enumerable:true,get:function(){return mRn.OpenFGAService}});var hRn=_xt();Object.defineProperty(mt,"TenantService",{enumerable:true,get:function(){return hRn.TenantService}});WE(vxt(),mt);WE(Axt(),mt);WE(xxt(),mt);var gRn=zY();Object.defineProperty(mt,"JsonValidator",{enumerable:true,get:function(){return gRn.JsonValidator}});var yRn=uwe();Object.defineProperty(mt,"RouteValidator",{enumerable:true,get:function(){return yRn.RouteValidator}});mt.xfs=rQ(sAe())});var Fn=y(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:true});Vt.NODE_BUILD_OPEN_API_OUTPUT_FILE=Vt.NODE_BUILD_OUTPUT_FILE=Vt.NODE_ENTRY_NAME=Vt.WORKER_BUILD_OUTPUT_SOURCEMAP_FILE=Vt.WORKER_BUILD_OUTPUT_FILE=Vt.WORKER_ENTRY_NAME=Vt.ENV_MODULE_FILE=Vt.ZUPLO_SYSTEM_ENV_FILE=Vt.ENV_FILE=Vt.CACHE_DIRECTORY=Vt.BUILD_CACHE_FILE=Vt.ZUPLO_FILE_SCHEMA=Vt.NON_STANDARD_NODE_ENV=Vt.GENERATED_TYPES_DIR_NAME=Vt.GENERATED_BUILD_JSON_FILE=Vt.GENERATED_SOURCE_DIR_NAME=Vt.BUILD_OUTPUT_DIR=Vt.DEFAULT_TEST_FILE=Vt.DEFAULT_DOCS_MARKDOWN_FILE=Vt.DOCS_THEME_FILE=Vt.DOCS_SIDEBAR_FILE=Vt.ZUPLO_FALLBACK_JSON_FILE=Vt.ZUPLO_PREFERRED_JSON_FILE=Vt.DEFAULT_MODULE_FILE=Vt.OPEN_API_FILE_SUFFIX=Vt.OPEN_API_CONFIG_FILE=Vt.OPEN_API_UNVERSIONED_DIR_NAME=Vt.DEV_PORTAL_OUTPUT_DIR_NAME=Vt.DEV_PORTAL_CONFIG_FILE=Vt.POLICIES_CONFIG_FILE=Vt.ROUTES_OAS_CONFIG_FILE=Vt.LOCAL_API_KEYS_CONFIG_FILE=Vt.DEV_PORTAL_V4_PATH=Vt.USER_DOCS_DIR_NAME=Vt.USER_SCHEMAS_DIR_NAME=Vt.USER_CONFIG_DIR_NAME=Vt.USER_TEST_DIR_NAME=Vt.USER_MODULES_DIR_NAME=void 0;Vt.USER_MODULES_DIR_NAME="modules";Vt.USER_TEST_DIR_NAME="tests";Vt.USER_CONFIG_DIR_NAME="config";Vt.USER_SCHEMAS_DIR_NAME="schemas";Vt.USER_DOCS_DIR_NAME="docs";Vt.DEV_PORTAL_V4_PATH="v4";Vt.LOCAL_API_KEYS_CONFIG_FILE="api-keys.json";Vt.ROUTES_OAS_CONFIG_FILE="routes.oas.json";Vt.POLICIES_CONFIG_FILE="policies.json";Vt.DEV_PORTAL_CONFIG_FILE="dev-portal.json";Vt.DEV_PORTAL_OUTPUT_DIR_NAME="dev-portal";Vt.OPEN_API_UNVERSIONED_DIR_NAME="unversioned";Vt.OPEN_API_CONFIG_FILE="open-api.json";Vt.OPEN_API_FILE_SUFFIX=".oas.json";Vt.DEFAULT_MODULE_FILE="hello-world.ts";Vt.ZUPLO_PREFERRED_JSON_FILE="zuplo.jsonc";Vt.ZUPLO_FALLBACK_JSON_FILE="zuplo.json";Vt.DOCS_SIDEBAR_FILE="sidebar.json";Vt.DOCS_THEME_FILE="theme.css";Vt.DEFAULT_DOCS_MARKDOWN_FILE="index.md";Vt.DEFAULT_TEST_FILE="hello-world.json";Vt.BUILD_OUTPUT_DIR="dist";Vt.GENERATED_SOURCE_DIR_NAME=".zuplo";Vt.GENERATED_BUILD_JSON_FILE="build.json";Vt.GENERATED_TYPES_DIR_NAME="types";Vt.NON_STANDARD_NODE_ENV=`You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against.`;Vt.ZUPLO_FILE_SCHEMA="zuplo";Vt.BUILD_CACHE_FILE="buildstate.json";Vt.CACHE_DIRECTORY=".cache";Vt.ENV_FILE=".env";Vt.ZUPLO_SYSTEM_ENV_FILE=".env.zuplo";Vt.ENV_MODULE_FILE="environment.ts";Vt.WORKER_ENTRY_NAME="worker.ts";Vt.WORKER_BUILD_OUTPUT_FILE="worker.js";Vt.WORKER_BUILD_OUTPUT_SOURCEMAP_FILE="worker.js.map";Vt.NODE_ENTRY_NAME="server.ts";Vt.NODE_BUILD_OUTPUT_FILE="main.js";Vt.NODE_BUILD_OPEN_API_OUTPUT_FILE=Vt.OPEN_API_CONFIG_FILE});var tu=y(xP=>{"use strict";Object.defineProperty(xP,"__esModule",{value:true});xP.runPlugins=xP.PluginResult=void 0;var tOe=class{static{a(this,"PluginResult")}errors=[];warnings=[];constructor(t){if(t){this.errors.push(t)}}};xP.PluginResult=tOe;async function _Rn(e,t){const r=[];const n=[];const i=new Map;for await(const s of e){try{const o=await s(t,i);n.push(...o.errors.map(u=>{if(u.pluginName===""){u.pluginName=s.name}return u}));r.push(...o.warnings);if(o.errors.length>0){break}}catch(o){n.push(o);break}}return{errors:n,warnings:r}}a(_Rn,"runPlugins");xP.runPlugins=_Rn});var xs=y(nOe=>{"use strict";Object.defineProperty(nOe,"__esModule",{value:true});var nQ=require("perf_hooks");var rOe=[];async function vRn(e,t){const r=nQ.performance.timerify(t);const n=new nQ.PerformanceObserver(i=>{const s=i.getEntries()[0];rOe.push({name:e,duration:s.duration});n.disconnect()});n.observe({entryTypes:["function"]});return r()}a(vRn,"timeFn");var ERn={mark:e=>{nQ.performance.mark(e)},measure:(e,t,r)=>{nQ.performance.measure(e,t,r)},timeFn:vRn,report:()=>{if(rOe.length>0){console.table(rOe)}}};nOe.default=ERn});var iOe=y(RP=>{"use strict";var bRn=RP&&RP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(RP,"__esModule",{value:true});RP.getZuploConfig=void 0;var WF=hn();var SRn=require("jsonc-parser");var ARn=require("fs/promises");var Ixt=bRn(require("path"));var kxt=Fn();async function CRn(e){const t=Ixt.default.join(e,kxt.ZUPLO_PREFERRED_JSON_FILE);const r=Ixt.default.join(e,kxt.ZUPLO_FALLBACK_JSON_FILE);let n=false;let i=t;if(await WF.xfs.fileExists(t)){n=true;i=t}else if(await WF.xfs.fileExists(r)){n=true;i=r}const s={};if(n){const o=await(0,ARn.readFile)(i,"utf-8");const u=[];const l=(0,SRn.parse)(o,u);if(typeof l!=="object"){const c={message:`Invalid zuplo.json file`,detail:`The zuplo.json file is not a valid JSON object`,pluginName:"buildData",severity:"error"};return{errors:[c]}}if("version"in l&&l.version!==1){const c={message:`Invalid version set in zuplo.config`,detail:`version in zuplo.json must be set to 1`,pluginName:"buildData",severity:"error"};return{errors:[c]}}if("compatibilityDate"in l&&WF.VALID_COMPATIBILITY_DATES&&typeof l.compatibilityDate==="string"){if(!WF.VALID_COMPATIBILITY_DATES.includes(l.compatibilityDate)){const c={message:`Invalid compatibilityDate set in zuplo.config`,detail:`compatibilityDate was set to ${l.compatibilityDate}. Valid compatibility dates are ${WF.VALID_COMPATIBILITY_DATES.join(", ")}`,pluginName:"buildData",severity:"error"};return{errors:[c]}}s.compatibilityDate=l.compatibilityDate}}return{config:s,errors:[]}}a(CRn,"getZuploConfig");RP.getZuploConfig=CRn});var YF=y(iQ=>{"use strict";Object.defineProperty(iQ,"__esModule",{value:true});iQ.TargetPlatform=void 0;var Dxt;(function(e){e["Worker"]="worker"})(Dxt||(iQ.TargetPlatform=Dxt={}))});var Fxt=y(OP=>{"use strict";var Lxt=OP&&OP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(OP,"__esModule",{value:true});OP.cleanOutput=void 0;var wRn=Lxt(require("fs/promises"));var TRn=Lxt(xs());var xRn=a(async function({outputDirectory:e,systemDirectory:t,logger:r}){return TRn.default.timeFn("Cleaning output",async()=>{r.debug("Cleaning output");const n=[e,t];for await(const i of n){try{await wRn.default.rm(i,{recursive:true,force:true})}catch(s){r.error(s)}}return{warnings:[],errors:[]}})},"cleanOutput");OP.cleanOutput=xRn});var Mxt=y(PP=>{"use strict";var Bxt=PP&&PP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(PP,"__esModule",{value:true});PP.createSystemDir=void 0;var RRn=hn();var ORn=Bxt(require("fs/promises"));var PRn=Bxt(xs());var NRn=a(async function({systemDirectory:e,logger:t}){return PRn.default.timeFn("Creating system directory",async()=>{t.debug("Creating system directory");try{if(await RRn.xfs.dirExists(e)){t.debug("System directory already exists, skipping");return{warnings:[],errors:[]}}await ORn.default.mkdir(e)}catch(r){t.error(r);return{warnings:[],errors:[]}}return{warnings:[],errors:[]}})},"createSystemDir");PP.createSystemDir=NRn});var qxt=y(NP=>{"use strict";var IRn=NP&&NP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(NP,"__esModule",{value:true});NP.checkForDeprecations=void 0;var kRn=IRn(xs());var DRn=a(async function({logger:e}){return kRn.default.timeFn("Checking for breaking changes",async()=>{e.debug("Checking for breaking changes");return{warnings:[],errors:[]}})},"checkForDeprecations");NP.checkForDeprecations=DRn});var Uxt=y(sOe=>{var uC=require("path");var XE=process.platform==="win32";var YE=require("fs");var LRn=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function FRn(){var e;if(LRn){var t=new Error;e=r}else e=n;return e;function r(i){if(i){t.message=i.message;i=t;n(i)}}a(r,"debugCallback");function n(i){if(i){if(process.throwDeprecation)throw i;else if(!process.noDeprecation){var s="fs: missing callback "+(i.stack||i.message);if(process.traceDeprecation)console.trace(s);else console.error(s)}}}a(n,"missingCallback")}a(FRn,"rethrow");function BRn(e){return typeof e==="function"?e:FRn()}a(BRn,"maybeCallback");var i8s=uC.normalize;if(XE){Ry=/(.*?)(?:[\/\\]+|$)/g}else{Ry=/(.*?)(?:[\/]+|$)/g}var Ry;if(XE){XF=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/}else{XF=/^[\/]*/}var XF;sOe.realpathSync=a(function e(t,r){t=uC.resolve(t);if(r&&Object.prototype.hasOwnProperty.call(r,t)){return r[t]}var n=t,i={},s={};var o;var u;var l;var c;d();function d(){var _=XF.exec(t);o=_[0].length;u=_[0];l=_[0];c="";if(XE&&!s[l]){YE.lstatSync(l);s[l]=true}}a(d,"start");while(o<t.length){Ry.lastIndex=o;var p=Ry.exec(t);c=u;u+=p[0];l=c+p[1];o=Ry.lastIndex;if(s[l]||r&&r[l]===l){continue}var f;if(r&&Object.prototype.hasOwnProperty.call(r,l)){f=r[l]}else{var m=YE.lstatSync(l);if(!m.isSymbolicLink()){s[l]=true;if(r)r[l]=l;continue}var h=null;if(!XE){var g=m.dev.toString(32)+":"+m.ino.toString(32);if(i.hasOwnProperty(g)){h=i[g]}}if(h===null){YE.statSync(l);h=YE.readlinkSync(l)}f=uC.resolve(c,h);if(r)r[l]=f;if(!XE)i[g]=h}t=uC.resolve(f,t.slice(o));d()}if(r)r[n]=t;return t},"realpathSync");sOe.realpath=a(function e(t,r,n){if(typeof n!=="function"){n=BRn(r);r=null}t=uC.resolve(t);if(r&&Object.prototype.hasOwnProperty.call(r,t)){return process.nextTick(n.bind(null,null,r[t]))}var i=t,s={},o={};var u;var l;var c;var d;p();function p(){var _=XF.exec(t);u=_[0].length;l=_[0];c=_[0];d="";if(XE&&!o[c]){YE.lstat(c,function(v){if(v)return n(v);o[c]=true;f()})}else{process.nextTick(f)}}a(p,"start");function f(){if(u>=t.length){if(r)r[i]=t;return n(null,t)}Ry.lastIndex=u;var _=Ry.exec(t);d=l;l+=_[0];c=d+_[1];u=Ry.lastIndex;if(o[c]||r&&r[c]===c){return process.nextTick(f)}if(r&&Object.prototype.hasOwnProperty.call(r,c)){return g(r[c])}return YE.lstat(c,m)}a(f,"LOOP");function m(_,v){if(_)return n(_);if(!v.isSymbolicLink()){o[c]=true;if(r)r[c]=c;return process.nextTick(f)}if(!XE){var S=v.dev.toString(32)+":"+v.ino.toString(32);if(s.hasOwnProperty(S)){return h(null,s[S],c)}}YE.stat(c,function(E){if(E)return n(E);YE.readlink(c,function(b,A){if(!XE)s[S]=A;h(b,A)})})}a(m,"gotStat");function h(_,v,S){if(_)return n(_);var E=uC.resolve(d,v);if(r)r[S]=E;g(E)}a(h,"gotTarget");function g(_){t=uC.resolve(_,t.slice(u));p()}a(g,"gotResolvedLink")},"realpath")});var lOe=y((o8s,Hxt)=>{Hxt.exports=JE;JE.realpath=JE;JE.sync=uOe;JE.realpathSync=uOe;JE.monkeypatch=qRn;JE.unmonkeypatch=URn;var IP=require("fs");var aOe=IP.realpath;var oOe=IP.realpathSync;var MRn=process.version;var $xt=/^v[0-5]\./.test(MRn);var jxt=Uxt();function Gxt(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}a(Gxt,"newError");function JE(e,t,r){if($xt){return aOe(e,t,r)}if(typeof t==="function"){r=t;t=null}aOe(e,t,function(n,i){if(Gxt(n)){jxt.realpath(e,t,r)}else{r(n,i)}})}a(JE,"realpath");function uOe(e,t){if($xt){return oOe(e,t)}try{return oOe(e,t)}catch(r){if(Gxt(r)){return jxt.realpathSync(e,t)}else{throw r}}}a(uOe,"realpathSync");function qRn(){IP.realpath=JE;IP.realpathSync=uOe}a(qRn,"monkeypatch");function URn(){IP.realpath=aOe;IP.realpathSync=oOe}a(URn,"unmonkeypatch")});var zxt=y((l8s,Vxt)=>{Vxt.exports=function(e,t){var r=[];for(var n=0;n<e.length;n++){var i=t(e[n],n);if($Rn(i))r.push.apply(r,i);else r.push(i)}return r};var $Rn=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"}});var cOe=y((c8s,Xxt)=>{"use strict";Xxt.exports=Wxt;function Wxt(e,t,r){if(e instanceof RegExp)e=Kxt(e,r);if(t instanceof RegExp)t=Kxt(t,r);var n=Yxt(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)}}a(Wxt,"balanced");function Kxt(e,t){var r=t.match(e);return r?r[0]:null}a(Kxt,"maybeMatch");Wxt.range=Yxt;function Yxt(e,t,r){var n,i,s,o,u;var l=r.indexOf(e);var c=r.indexOf(t,l+1);var d=l;if(l>=0&&c>0){if(e===t){return[l,c]}n=[];s=r.length;while(d>=0&&!u){if(d==l){n.push(d);l=r.indexOf(e,d+1)}else if(n.length==1){u=[n.pop(),c]}else{i=n.pop();if(i<s){s=i;o=c}c=r.indexOf(t,d+1)}d=l<c&&l>=0?l:c}if(n.length){u=[s,o]}}return u}a(Yxt,"range")});var iRt=y((p8s,nRt)=>{var jRn=zxt();var Jxt=cOe();nRt.exports=VRn;var Qxt="\0SLASH"+Math.random()+"\0";var Zxt="\0OPEN"+Math.random()+"\0";var pOe="\0CLOSE"+Math.random()+"\0";var eRt="\0COMMA"+Math.random()+"\0";var tRt="\0PERIOD"+Math.random()+"\0";function dOe(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}a(dOe,"numeric");function GRn(e){return e.split("\\\\").join(Qxt).split("\\{").join(Zxt).split("\\}").join(pOe).split("\\,").join(eRt).split("\\.").join(tRt)}a(GRn,"escapeBraces");function HRn(e){return e.split(Qxt).join("\\").split(Zxt).join("{").split(pOe).join("}").split(eRt).join(",").split(tRt).join(".")}a(HRn,"unescapeBraces");function rRt(e){if(!e)return[""];var t=[];var r=Jxt("{","}",e);if(!r)return e.split(",");var n=r.pre;var i=r.body;var s=r.post;var o=n.split(",");o[o.length-1]+="{"+i+"}";var u=rRt(s);if(s.length){o[o.length-1]+=u.shift();o.push.apply(o,u)}t.push.apply(t,o);return t}a(rRt,"parseCommaParts");function VRn(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return kP(GRn(e),true).map(HRn)}a(VRn,"expandTop");function zRn(e){return"{"+e+"}"}a(zRn,"embrace");function KRn(e){return/^-?0\d/.test(e)}a(KRn,"isPadded");function WRn(e,t){return e<=t}a(WRn,"lte");function YRn(e,t){return e>=t}a(YRn,"gte");function kP(e,t){var r=[];var n=Jxt("{","}",e);if(!n||/\$$/.test(n.pre))return[e];var i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body);var s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body);var o=i||s;var u=n.body.indexOf(",")>=0;if(!o&&!u){if(n.post.match(/,.*\}/)){e=n.pre+"{"+n.body+pOe+n.post;return kP(e)}return[e]}var l;if(o){l=n.body.split(/\.\./)}else{l=rRt(n.body);if(l.length===1){l=kP(l[0],false).map(zRn);if(l.length===1){var d=n.post.length?kP(n.post,false):[""];return d.map(function(I){return n.pre+l[0]+I})}}}var c=n.pre;var d=n.post.length?kP(n.post,false):[""];var p;if(o){var f=dOe(l[0]);var m=dOe(l[1]);var h=Math.max(l[0].length,l[1].length);var g=l.length==3?Math.abs(dOe(l[2])):1;var _=WRn;var v=m<f;if(v){g*=-1;_=YRn}var S=l.some(KRn);p=[];for(var E=f;_(E,m);E+=g){var b;if(s){b=String.fromCharCode(E);if(b==="\\")b=""}else{b=String(E);if(S){var A=h-b.length;if(A>0){var C=new Array(A+1).join("0");if(E<0)b="-"+C+b.slice(1);else b=C+b}}}p.push(b)}}else{p=jRn(l,function(R){return kP(R,false)})}for(var T=0;T<p.length;T++){for(var O=0;O<d.length;O++){var P=c+p[T]+d[O];if(!t||o||P)r.push(P)}}return r}a(kP,"expand")});var oQ=y((m8s,lRt)=>{lRt.exports=fp;fp.Minimatch=ol;var JF=function(){try{return require("path")}catch(e){}}()||{sep:"/"};fp.sep=JF.sep;var hOe=fp.GLOBSTAR=ol.GLOBSTAR={};var XRn=iRt();var sRt={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var fOe="[^/]";var mOe=fOe+"*?";var JRn="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var QRn="(?:(?!(?:\\/|^)\\.).)*?";var aRt=ZRn("().*{}+?[]^$\\!");function ZRn(e){return e.split("").reduce(function(t,r){t[r]=true;return t},{})}a(ZRn,"charSet");var oRt=/\/+/;fp.filter=eOn;function eOn(e,t){t=t||{};return function(r,n,i){return fp(r,e,t)}}a(eOn,"filter");function QE(e,t){t=t||{};var r={};Object.keys(e).forEach(function(n){r[n]=e[n]});Object.keys(t).forEach(function(n){r[n]=t[n]});return r}a(QE,"ext");fp.defaults=function(e){if(!e||typeof e!=="object"||!Object.keys(e).length){return fp}var t=fp;var r=a(function n(i,s,o){return t(i,s,QE(e,o))},"minimatch");r.Minimatch=a(function n(i,s){return new t.Minimatch(i,QE(e,s))},"Minimatch");r.Minimatch.defaults=a(function n(i){return t.defaults(QE(e,i)).Minimatch},"defaults");r.filter=a(function n(i,s){return t.filter(i,QE(e,s))},"filter");r.defaults=a(function n(i){return t.defaults(QE(e,i))},"defaults");r.makeRe=a(function n(i,s){return t.makeRe(i,QE(e,s))},"makeRe");r.braceExpand=a(function n(i,s){return t.braceExpand(i,QE(e,s))},"braceExpand");r.match=function(n,i,s){return t.match(n,i,QE(e,s))};return r};ol.defaults=function(e){return fp.defaults(e).Minimatch};function fp(e,t,r){aQ(t);if(!r)r={};if(!r.nocomment&&t.charAt(0)==="#"){return false}return new ol(t,r).match(e)}a(fp,"minimatch");function ol(e,t){if(!(this instanceof ol)){return new ol(e,t)}aQ(e);if(!t)t={};e=e.trim();if(!t.allowWindowsEscape&&JF.sep!=="/"){e=e.split(JF.sep).join("/")}this.options=t;this.set=[];this.pattern=e;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!t.partial;this.make()}a(ol,"Minimatch");ol.prototype.debug=function(){};ol.prototype.make=tOn;function tOn(){var e=this.pattern;var t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();var r=this.globSet=this.braceExpand();if(t.debug)this.debug=a(function n(){console.error.apply(console,arguments)},"debug");this.debug(this.pattern,r);r=this.globParts=r.map(function(n){return n.split(oRt)});this.debug(this.pattern,r);r=r.map(function(n,i,s){return n.map(this.parse,this)},this);this.debug(this.pattern,r);r=r.filter(function(n){return n.indexOf(false)===-1});this.debug(this.pattern,r);this.set=r}a(tOn,"make");ol.prototype.parseNegate=rOn;function rOn(){var e=this.pattern;var t=false;var r=this.options;var n=0;if(r.nonegate)return;for(var i=0,s=e.length;i<s&&e.charAt(i)==="!";i++){t=!t;n++}if(n)this.pattern=e.substr(n);this.negate=t}a(rOn,"parseNegate");fp.braceExpand=function(e,t){return uRt(e,t)};ol.prototype.braceExpand=uRt;function uRt(e,t){if(!t){if(this instanceof ol){t=this.options}else{t={}}}e=typeof e==="undefined"?this.pattern:e;aQ(e);if(t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)){return[e]}return XRn(e)}a(uRt,"braceExpand");var nOn=1024*64;var aQ=a(function(e){if(typeof e!=="string"){throw new TypeError("invalid pattern")}if(e.length>nOn){throw new TypeError("pattern is too long")}},"assertValidPattern");ol.prototype.parse=iOn;var sQ={};function iOn(e,t){aQ(e);var r=this.options;if(e==="**"){if(!r.noglobstar)return hOe;else e="*"}if(e==="")return"";var n="";var i=!!r.nocase;var s=false;var o=[];var u=[];var l;var c=false;var d=-1;var p=-1;var f=e.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var m=this;function h(){if(l){switch(l){case"*":n+=mOe;i=true;break;case"?":n+=fOe;i=true;break;default:n+="\\"+l;break}m.debug("clearStateChar %j %j",l,n);l=false}}a(h,"clearStateChar");for(var g=0,_=e.length,v;g<_&&(v=e.charAt(g));g++){this.debug("%s %s %s %j",e,g,n,v);if(s&&aRt[v]){n+="\\"+v;s=false;continue}switch(v){case"/":{return false}case"\\":h();s=true;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s %s %s %j <-- stateChar",e,g,n,v);if(c){this.debug(" in class");if(v==="!"&&g===p+1)v="^";n+=v;continue}m.debug("call clearStateChar %j",l);h();l=v;if(r.noext)h();continue;case"(":if(c){n+="(";continue}if(!l){n+="\\(";continue}o.push({type:l,start:g-1,reStart:n.length,open:sRt[l].open,close:sRt[l].close});n+=l==="!"?"(?:(?!(?:":"(?:";this.debug("plType %j %j",l,n);l=false;continue;case")":if(c||!o.length){n+="\\)";continue}h();i=true;var S=o.pop();n+=S.close;if(S.type==="!"){u.push(S)}S.reEnd=n.length;continue;case"|":if(c||!o.length||s){n+="\\|";s=false;continue}h();n+="|";continue;case"[":h();if(c){n+="\\"+v;continue}c=true;p=g;d=n.length;n+=v;continue;case"]":if(g===p+1||!c){n+="\\"+v;s=false;continue}var E=e.substring(p+1,g);try{RegExp("["+E+"]")}catch(M){var b=this.parse(E,sQ);n=n.substr(0,d)+"\\["+b[0]+"\\]";i=i||b[1];c=false;continue}i=true;c=false;n+=v;continue;default:h();if(s){s=false}else if(aRt[v]&&!(v==="^"&&c)){n+="\\"}n+=v}}if(c){E=e.substr(p+1);b=this.parse(E,sQ);n=n.substr(0,d)+"\\["+b[0];i=i||b[1]}for(S=o.pop();S;S=o.pop()){var A=n.slice(S.reStart+S.open.length);this.debug("setting tail",n,S);A=A.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(M,Q,fe){if(!fe){fe="\\"}return Q+Q+fe+"|"});this.debug("tail=%j\n %s",A,A,S,n);var C=S.type==="*"?mOe:S.type==="?"?fOe:"\\"+S.type;i=true;n=n.slice(0,S.reStart)+C+"\\("+A}h();if(s){n+="\\\\"}var T=false;switch(n.charAt(0)){case"[":case".":case"(":T=true}for(var O=u.length-1;O>-1;O--){var P=u[O];var R=n.slice(0,P.reStart);var I=n.slice(P.reStart,P.reEnd-8);var D=n.slice(P.reEnd-8,P.reEnd);var U=n.slice(P.reEnd);D+=U;var te=R.split("(").length-1;var ve=U;for(g=0;g<te;g++){ve=ve.replace(/\)[+*?]?/,"")}U=ve;var me="";if(U===""&&t!==sQ){me="$"}var he=R+I+U+me+D;n=he}if(n!==""&&i){n="(?=.)"+n}if(T){n=f+n}if(t===sQ){return[n,i]}if(!i){return aOn(e)}var Fe=r.nocase?"i":"";try{var Oe=new RegExp("^"+n+"$",Fe)}catch(M){return new RegExp("$.")}Oe._glob=e;Oe._src=n;return Oe}a(iOn,"parse");fp.makeRe=function(e,t){return new ol(e,t||{}).makeRe()};ol.prototype.makeRe=sOn;function sOn(){if(this.regexp||this.regexp===false)return this.regexp;var e=this.set;if(!e.length){this.regexp=false;return this.regexp}var t=this.options;var r=t.noglobstar?mOe:t.dot?JRn:QRn;var n=t.nocase?"i":"";var i=e.map(function(s){return s.map(function(o){return o===hOe?r:typeof o==="string"?oOn(o):o._src}).join("\\/")}).join("|");i="^(?:"+i+")$";if(this.negate)i="^(?!"+i+").*$";try{this.regexp=new RegExp(i,n)}catch(s){this.regexp=false}return this.regexp}a(sOn,"makeRe");fp.match=function(e,t,r){r=r||{};var n=new ol(t,r);e=e.filter(function(i){return n.match(i)});if(n.options.nonull&&!e.length){e.push(t)}return e};ol.prototype.match=a(function e(t,r){if(typeof r==="undefined")r=this.partial;this.debug("match",t,this.pattern);if(this.comment)return false;if(this.empty)return t==="";if(t==="/"&&r)return true;var n=this.options;if(JF.sep!=="/"){t=t.split(JF.sep).join("/")}t=t.split(oRt);this.debug(this.pattern,"split",t);var i=this.set;this.debug(this.pattern,"set",i);var s;var o;for(o=t.length-1;o>=0;o--){s=t[o];if(s)break}for(o=0;o<i.length;o++){var u=i[o];var l=t;if(n.matchBase&&u.length===1){l=[s]}var c=this.matchOne(l,u,r);if(c){if(n.flipNegate)return true;return!this.negate}}if(n.flipNegate)return false;return this.negate},"match");ol.prototype.matchOne=function(e,t,r){var n=this.options;this.debug("matchOne",{"this":this,file:e,pattern:t});this.debug("matchOne",e.length,t.length);for(var i=0,s=0,o=e.length,u=t.length;i<o&&s<u;i++,s++){this.debug("matchOne loop");var l=t[s];var c=e[i];this.debug(t,l,c);if(l===false)return false;if(l===hOe){this.debug("GLOBSTAR",[t,l,c]);var d=i;var p=s+1;if(p===u){this.debug("** at the end");for(;i<o;i++){if(e[i]==="."||e[i]===".."||!n.dot&&e[i].charAt(0)===".")return false}return true}while(d<o){var f=e[d];this.debug("\nglobstar while",e,d,t,p,f);if(this.matchOne(e.slice(d),t.slice(p),r)){this.debug("globstar found match!",d,o,f);return true}else{if(f==="."||f===".."||!n.dot&&f.charAt(0)==="."){this.debug("dot detected!",e,d,t,p);break}this.debug("globstar swallow a segment, and continue");d++}}if(r){this.debug("\n>>> no match, partial?",e,d,t,p);if(d===o)return true}return false}var m;if(typeof l==="string"){m=c===l;this.debug("string match",l,c,m)}else{m=c.match(l);this.debug("pattern match",l,c,m)}if(!m)return false}if(i===o&&s===u){return true}else if(i===o){return r}else if(s===u){return i===o-1&&e[i]===""}throw new Error("wtf?")};function aOn(e){return e.replace(/\\(.)/g,"$1")}a(aOn,"globUnescape");function oOn(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}a(oOn,"regExpEscape")});var lQ=y((g8s,uQ)=>{"use strict";function cRt(e){return e.charAt(0)==="/"}a(cRt,"posix");function dRt(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;var r=t.exec(e);var n=r[1]||"";var i=Boolean(n&&n.charAt(1)!==":");return Boolean(r[2]||i)}a(dRt,"win32");uQ.exports=process.platform==="win32"?dRt:cRt;uQ.exports.posix=cRt;uQ.exports.win32=dRt});var yOe=y(ZE=>{ZE.setopts=fOn;ZE.ownProp=pRt;ZE.makeAbs=QF;ZE.finish=mOn;ZE.mark=hOn;ZE.isIgnored=mRt;ZE.childrenIgnored=gOn;function pRt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}a(pRt,"ownProp");var uOn=require("fs");var DP=require("path");var lOn=oQ();var fRt=lQ();var gOe=lOn.Minimatch;function cOn(e,t){return e.localeCompare(t,"en")}a(cOn,"alphasort");function dOn(e,t){e.ignore=t.ignore||[];if(!Array.isArray(e.ignore))e.ignore=[e.ignore];if(e.ignore.length){e.ignore=e.ignore.map(pOn)}}a(dOn,"setupIgnores");function pOn(e){var t=null;if(e.slice(-3)==="/**"){var r=e.replace(/(\/\*\*)+$/,"");t=new gOe(r,{dot:true})}return{matcher:new gOe(e,{dot:true}),gmatcher:t}}a(pOn,"ignoreMap");function fOn(e,t,r){if(!r)r={};if(r.matchBase&&-1===t.indexOf("/")){if(r.noglobstar){throw new Error("base matching requires globstar")}t="**/"+t}e.silent=!!r.silent;e.pattern=t;e.strict=r.strict!==false;e.realpath=!!r.realpath;e.realpathCache=r.realpathCache||Object.create(null);e.follow=!!r.follow;e.dot=!!r.dot;e.mark=!!r.mark;e.nodir=!!r.nodir;if(e.nodir)e.mark=true;e.sync=!!r.sync;e.nounique=!!r.nounique;e.nonull=!!r.nonull;e.nosort=!!r.nosort;e.nocase=!!r.nocase;e.stat=!!r.stat;e.noprocess=!!r.noprocess;e.absolute=!!r.absolute;e.fs=r.fs||uOn;e.maxLength=r.maxLength||Infinity;e.cache=r.cache||Object.create(null);e.statCache=r.statCache||Object.create(null);e.symlinks=r.symlinks||Object.create(null);dOn(e,r);e.changedCwd=false;var n=process.cwd();if(!pRt(r,"cwd"))e.cwd=n;else{e.cwd=DP.resolve(r.cwd);e.changedCwd=e.cwd!==n}e.root=r.root||DP.resolve(e.cwd,"/");e.root=DP.resolve(e.root);if(process.platform==="win32")e.root=e.root.replace(/\\/g,"/");e.cwdAbs=fRt(e.cwd)?e.cwd:QF(e,e.cwd);if(process.platform==="win32")e.cwdAbs=e.cwdAbs.replace(/\\/g,"/");e.nomount=!!r.nomount;r.nonegate=true;r.nocomment=true;r.allowWindowsEscape=false;e.minimatch=new gOe(t,r);e.options=e.minimatch.options}a(fOn,"setopts");function mOn(e){var t=e.nounique;var r=t?[]:Object.create(null);for(var n=0,i=e.matches.length;n<i;n++){var s=e.matches[n];if(!s||Object.keys(s).length===0){if(e.nonull){var o=e.minimatch.globSet[n];if(t)r.push(o);else r[o]=true}}else{var u=Object.keys(s);if(t)r.push.apply(r,u);else u.forEach(function(l){r[l]=true})}}if(!t)r=Object.keys(r);if(!e.nosort)r=r.sort(cOn);if(e.mark){for(var n=0;n<r.length;n++){r[n]=e._mark(r[n])}if(e.nodir){r=r.filter(function(l){var c=!/\/$/.test(l);var d=e.cache[l]||e.cache[QF(e,l)];if(c&&d)c=d!=="DIR"&&!Array.isArray(d);return c})}}if(e.ignore.length)r=r.filter(function(l){return!mRt(e,l)});e.found=r}a(mOn,"finish");function hOn(e,t){var r=QF(e,t);var n=e.cache[r];var i=t;if(n){var s=n==="DIR"||Array.isArray(n);var o=t.slice(-1)==="/";if(s&&!o)i+="/";else if(!s&&o)i=i.slice(0,-1);if(i!==t){var u=QF(e,i);e.statCache[u]=e.statCache[r];e.cache[u]=e.cache[r]}}return i}a(hOn,"mark");function QF(e,t){var r=t;if(t.charAt(0)==="/"){r=DP.join(e.root,t)}else if(fRt(t)||t===""){r=t}else if(e.changedCwd){r=DP.resolve(e.cwd,t)}else{r=DP.resolve(t)}if(process.platform==="win32")r=r.replace(/\\/g,"/");return r}a(QF,"makeAbs");function mRt(e,t){if(!e.ignore.length)return false;return e.ignore.some(function(r){return r.matcher.match(t)||!!(r.gmatcher&&r.gmatcher.match(t))})}a(mRt,"isIgnored");function gOn(e,t){if(!e.ignore.length)return false;return e.ignore.some(function(r){return!!(r.gmatcher&&r.gmatcher.match(t))})}a(gOn,"childrenIgnored")});var vRt=y((A8s,_Rt)=>{_Rt.exports=yRt;yRt.GlobSync=ru;var yOn=lOe();var hRt=oQ();var E8s=hRt.Minimatch;var b8s=EOe().Glob;var S8s=require("util");var _Oe=require("path");var gRt=require("assert");var cQ=lQ();var lC=yOe();var _On=lC.setopts;var vOe=lC.ownProp;var vOn=lC.childrenIgnored;var EOn=lC.isIgnored;function yRt(e,t){if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new ru(e,t).found}a(yRt,"globSync");function ru(e,t){if(!e)throw new Error("must provide pattern");if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof ru))return new ru(e,t);_On(this,e,t);if(this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;n<r;n++){this._process(this.minimatch.set[n],n,false)}this._finish()}a(ru,"GlobSync");ru.prototype._finish=function(){gRt.ok(this instanceof ru);if(this.realpath){var e=this;this.matches.forEach(function(t,r){var n=e.matches[r]=Object.create(null);for(var i in t){try{i=e._makeAbs(i);var s=yOn.realpathSync(i,e.realpathCache);n[s]=true}catch(o){if(o.syscall==="stat")n[e._makeAbs(i)]=true;else throw o}}})}lC.finish(this)};ru.prototype._process=function(e,t,r){gRt.ok(this instanceof ru);var n=0;while(typeof e[n]==="string"){n++}var i;switch(n){case e.length:this._processSimple(e.join("/"),t);return;case 0:i=null;break;default:i=e.slice(0,n).join("/");break}var s=e.slice(n);var o;if(i===null)o=".";else if(cQ(i)||cQ(e.map(function(c){return typeof c==="string"?c:"[*]"}).join("/"))){if(!i||!cQ(i))i="/"+i;o=i}else o=i;var u=this._makeAbs(o);if(vOn(this,o))return;var l=s[0]===hRt.GLOBSTAR;if(l)this._processGlobStar(i,o,u,s,t,r);else this._processReaddir(i,o,u,s,t,r)};ru.prototype._processReaddir=function(e,t,r,n,i,s){var o=this._readdir(r,s);if(!o)return;var u=n[0];var l=!!this.minimatch.negate;var c=u._glob;var d=this.dot||c.charAt(0)===".";var p=[];for(var f=0;f<o.length;f++){var m=o[f];if(m.charAt(0)!=="."||d){var h;if(l&&!e){h=!m.match(u)}else{h=m.match(u)}if(h)p.push(m)}}var g=p.length;if(g===0)return;if(n.length===1&&!this.mark&&!this.stat){if(!this.matches[i])this.matches[i]=Object.create(null);for(var f=0;f<g;f++){var m=p[f];if(e){if(e.slice(-1)!=="/")m=e+"/"+m;else m=e+m}if(m.charAt(0)==="/"&&!this.nomount){m=_Oe.join(this.root,m)}this._emitMatch(i,m)}return}n.shift();for(var f=0;f<g;f++){var m=p[f];var _;if(e)_=[e,m];else _=[m];this._process(_.concat(n),i,s)}};ru.prototype._emitMatch=function(e,t){if(EOn(this,t))return;var r=this._makeAbs(t);if(this.mark)t=this._mark(t);if(this.absolute){t=r}if(this.matches[e][t])return;if(this.nodir){var n=this.cache[r];if(n==="DIR"||Array.isArray(n))return}this.matches[e][t]=true;if(this.stat)this._stat(t)};ru.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,false);var t;var r;var n;try{r=this.fs.lstatSync(e)}catch(s){if(s.code==="ENOENT"){return null}}var i=r&&r.isSymbolicLink();this.symlinks[e]=i;if(!i&&r&&!r.isDirectory())this.cache[e]="FILE";else t=this._readdir(e,false);return t};ru.prototype._readdir=function(e,t){var r;if(t&&!vOe(this.symlinks,e))return this._readdirInGlobStar(e);if(vOe(this.cache,e)){var n=this.cache[e];if(!n||n==="FILE")return null;if(Array.isArray(n))return n}try{return this._readdirEntries(e,this.fs.readdirSync(e))}catch(i){this._readdirError(e,i);return null}};ru.prototype._readdirEntries=function(e,t){if(!this.mark&&!this.stat){for(var r=0;r<t.length;r++){var n=t[r];if(e==="/")n=e+n;else n=e+"/"+n;this.cache[n]=true}}this.cache[e]=t;return t};ru.prototype._readdirError=function(e,t){switch(t.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(e);this.cache[r]="FILE";if(r===this.cwdAbs){var n=new Error(t.code+" invalid cwd "+this.cwd);n.path=this.cwd;n.code=t.code;throw n}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=false;break;default:this.cache[this._makeAbs(e)]=false;if(this.strict)throw t;if(!this.silent)console.error("glob error",t);break}};ru.prototype._processGlobStar=function(e,t,r,n,i,s){var o=this._readdir(r,s);if(!o)return;var u=n.slice(1);var l=e?[e]:[];var c=l.concat(u);this._process(c,i,false);var d=o.length;var p=this.symlinks[r];if(p&&s)return;for(var f=0;f<d;f++){var m=o[f];if(m.charAt(0)==="."&&!this.dot)continue;var h=l.concat(o[f],u);this._process(h,i,true);var g=l.concat(o[f],n);this._process(g,i,true)}};ru.prototype._processSimple=function(e,t){var r=this._stat(e);if(!this.matches[t])this.matches[t]=Object.create(null);if(!r)return;if(e&&cQ(e)&&!this.nomount){var n=/[\/\\]$/.test(e);if(e.charAt(0)==="/"){e=_Oe.join(this.root,e)}else{e=_Oe.resolve(this.root,e);if(n)e+="/"}}if(process.platform==="win32")e=e.replace(/\\/g,"/");this._emitMatch(t,e)};ru.prototype._stat=function(e){var t=this._makeAbs(e);var r=e.slice(-1)==="/";if(e.length>this.maxLength)return false;if(!this.stat&&vOe(this.cache,t)){var o=this.cache[t];if(Array.isArray(o))o="DIR";if(!r||o==="DIR")return o;if(r&&o==="FILE")return false}var n;var i=this.statCache[t];if(!i){var s;try{s=this.fs.lstatSync(t)}catch(u){if(u&&(u.code==="ENOENT"||u.code==="ENOTDIR")){this.statCache[t]=false;return false}}if(s&&s.isSymbolicLink()){try{i=this.fs.statSync(t)}catch(u){i=s}}else{i=s}}this.statCache[t]=i;var o=true;if(i)o=i.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||o;if(r&&o==="FILE")return false;return o};ru.prototype._mark=function(e){return lC.mark(this,e)};ru.prototype._makeAbs=function(e){return lC.makeAbs(this,e)}});var bRt=y((w8s,ERt)=>{var bOn=eSe();var ZF=Object.create(null);var SOn=OW();ERt.exports=bOn(AOn);function AOn(e,t){if(ZF[e]){ZF[e].push(t);return null}else{ZF[e]=[t];return COn(e)}}a(AOn,"inflight");function COn(e){return SOn(a(function t(){var r=ZF[e];var n=r.length;var i=wOn(arguments);try{for(var s=0;s<n;s++){r[s].apply(null,i)}}finally{if(r.length>n){r.splice(0,n);process.nextTick(function(){t.apply(null,i)})}else{delete ZF[e]}}},"RES"))}a(COn,"makeres");function wOn(e){var t=e.length;var r=[];for(var n=0;n<t;n++)r[n]=e[n];return r}a(wOn,"slice")});var EOe=y((O8s,ARt)=>{ARt.exports=cC;var TOn=lOe();var SRt=oQ();var x8s=SRt.Minimatch;var xOn=Jv();var ROn=require("events").EventEmitter;var bOe=require("path");var SOe=require("assert");var e7=lQ();var COe=vRt();var dC=yOe();var OOn=dC.setopts;var AOe=dC.ownProp;var wOe=bRt();var R8s=require("util");var POn=dC.childrenIgnored;var NOn=dC.isIgnored;var IOn=OW();function cC(e,t,r){if(typeof t==="function")r=t,t={};if(!t)t={};if(t.sync){if(r)throw new TypeError("callback provided to sync glob");return COe(e,t)}return new Cs(e,t,r)}a(cC,"glob");cC.sync=COe;var kOn=cC.GlobSync=COe.GlobSync;cC.glob=cC;function DOn(e,t){if(t===null||typeof t!=="object"){return e}var r=Object.keys(t);var n=r.length;while(n--){e[r[n]]=t[r[n]]}return e}a(DOn,"extend");cC.hasMagic=function(e,t){var r=DOn({},t);r.noprocess=true;var n=new Cs(e,r);var i=n.minimatch.set;if(!e)return false;if(i.length>1)return true;for(var s=0;s<i[0].length;s++){if(typeof i[0][s]!=="string")return true}return false};cC.Glob=Cs;xOn(Cs,ROn);function Cs(e,t,r){if(typeof t==="function"){r=t;t=null}if(t&&t.sync){if(r)throw new TypeError("callback provided to sync glob");return new kOn(e,t)}if(!(this instanceof Cs))return new Cs(e,t,r);OOn(this,e,t);this._didRealPath=false;var n=this.minimatch.set.length;this.matches=new Array(n);if(typeof r==="function"){r=IOn(r);this.on("error",r);this.on("end",function(l){r(null,l)})}var i=this;this._processing=0;this._emitQueue=[];this._processQueue=[];this.paused=false;if(this.noprocess)return this;if(n===0)return u();var s=true;for(var o=0;o<n;o++){this._process(this.minimatch.set[o],o,false,u)}s=false;function u(){--i._processing;if(i._processing<=0){if(s){process.nextTick(function(){i._finish()})}else{i._finish()}}}a(u,"done")}a(Cs,"Glob");Cs.prototype._finish=function(){SOe(this instanceof Cs);if(this.aborted)return;if(this.realpath&&!this._didRealpath)return this._realpath();dC.finish(this);this.emit("end",this.found)};Cs.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=true;var e=this.matches.length;if(e===0)return this._finish();var t=this;for(var r=0;r<this.matches.length;r++)this._realpathSet(r,n);function n(){if(--e===0)t._finish()}a(n,"next")};Cs.prototype._realpathSet=function(e,t){var r=this.matches[e];if(!r)return t();var n=Object.keys(r);var i=this;var s=n.length;if(s===0)return t();var o=this.matches[e]=Object.create(null);n.forEach(function(u,l){u=i._makeAbs(u);TOn.realpath(u,i.realpathCache,function(c,d){if(!c)o[d]=true;else if(c.syscall==="stat")o[u]=true;else i.emit("error",c);if(--s===0){i.matches[e]=o;t()}})})};Cs.prototype._mark=function(e){return dC.mark(this,e)};Cs.prototype._makeAbs=function(e){return dC.makeAbs(this,e)};Cs.prototype.abort=function(){this.aborted=true;this.emit("abort")};Cs.prototype.pause=function(){if(!this.paused){this.paused=true;this.emit("pause")}};Cs.prototype.resume=function(){if(this.paused){this.emit("resume");this.paused=false;if(this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var t=0;t<e.length;t++){var r=e[t];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(var t=0;t<n.length;t++){var i=n[t];this._processing--;this._process(i[0],i[1],i[2],i[3])}}}};Cs.prototype._process=function(e,t,r,n){SOe(this instanceof Cs);SOe(typeof n==="function");if(this.aborted)return;this._processing++;if(this.paused){this._processQueue.push([e,t,r,n]);return}var i=0;while(typeof e[i]==="string"){i++}var s;switch(i){case e.length:this._processSimple(e.join("/"),t,n);return;case 0:s=null;break;default:s=e.slice(0,i).join("/");break}var o=e.slice(i);var u;if(s===null)u=".";else if(e7(s)||e7(e.map(function(d){return typeof d==="string"?d:"[*]"}).join("/"))){if(!s||!e7(s))s="/"+s;u=s}else u=s;var l=this._makeAbs(u);if(POn(this,u))return n();var c=o[0]===SRt.GLOBSTAR;if(c)this._processGlobStar(s,u,l,o,t,r,n);else this._processReaddir(s,u,l,o,t,r,n)};Cs.prototype._processReaddir=function(e,t,r,n,i,s,o){var u=this;this._readdir(r,s,function(l,c){return u._processReaddir2(e,t,r,n,i,s,c,o)})};Cs.prototype._processReaddir2=function(e,t,r,n,i,s,o,u){if(!o)return u();var l=n[0];var c=!!this.minimatch.negate;var d=l._glob;var p=this.dot||d.charAt(0)===".";var f=[];for(var m=0;m<o.length;m++){var h=o[m];if(h.charAt(0)!=="."||p){var g;if(c&&!e){g=!h.match(l)}else{g=h.match(l)}if(g)f.push(h)}}var _=f.length;if(_===0)return u();if(n.length===1&&!this.mark&&!this.stat){if(!this.matches[i])this.matches[i]=Object.create(null);for(var m=0;m<_;m++){var h=f[m];if(e){if(e!=="/")h=e+"/"+h;else h=e+h}if(h.charAt(0)==="/"&&!this.nomount){h=bOe.join(this.root,h)}this._emitMatch(i,h)}return u()}n.shift();for(var m=0;m<_;m++){var h=f[m];var v;if(e){if(e!=="/")h=e+"/"+h;else h=e+h}this._process([h].concat(n),i,s,u)}u()};Cs.prototype._emitMatch=function(e,t){if(this.aborted)return;if(NOn(this,t))return;if(this.paused){this._emitQueue.push([e,t]);return}var r=e7(t)?t:this._makeAbs(t);if(this.mark)t=this._mark(t);if(this.absolute)t=r;if(this.matches[e][t])return;if(this.nodir){var n=this.cache[r];if(n==="DIR"||Array.isArray(n))return}this.matches[e][t]=true;var i=this.statCache[r];if(i)this.emit("stat",t,i);this.emit("match",t)};Cs.prototype._readdirInGlobStar=function(e,t){if(this.aborted)return;if(this.follow)return this._readdir(e,false,t);var r="lstat\0"+e;var n=this;var i=wOe(r,s);if(i)n.fs.lstat(e,i);function s(o,u){if(o&&o.code==="ENOENT")return t();var l=u&&u.isSymbolicLink();n.symlinks[e]=l;if(!l&&u&&!u.isDirectory()){n.cache[e]="FILE";t()}else n._readdir(e,false,t)}a(s,"lstatcb_")};Cs.prototype._readdir=function(e,t,r){if(this.aborted)return;r=wOe("readdir\0"+e+"\0"+t,r);if(!r)return;if(t&&!AOe(this.symlinks,e))return this._readdirInGlobStar(e,r);if(AOe(this.cache,e)){var n=this.cache[e];if(!n||n==="FILE")return r();if(Array.isArray(n))return r(null,n)}var i=this;i.fs.readdir(e,LOn(this,e,r))};function LOn(e,t,r){return function(n,i){if(n)e._readdirError(t,n,r);else e._readdirEntries(t,i,r)}}a(LOn,"readdirCb");Cs.prototype._readdirEntries=function(e,t,r){if(this.aborted)return;if(!this.mark&&!this.stat){for(var n=0;n<t.length;n++){var i=t[n];if(e==="/")i=e+i;else i=e+"/"+i;this.cache[i]=true}}this.cache[e]=t;return r(null,t)};Cs.prototype._readdirError=function(e,t,r){if(this.aborted)return;switch(t.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(e);this.cache[n]="FILE";if(n===this.cwdAbs){var i=new Error(t.code+" invalid cwd "+this.cwd);i.path=this.cwd;i.code=t.code;this.emit("error",i);this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=false;break;default:this.cache[this._makeAbs(e)]=false;if(this.strict){this.emit("error",t);this.abort()}if(!this.silent)console.error("glob error",t);break}return r()};Cs.prototype._processGlobStar=function(e,t,r,n,i,s,o){var u=this;this._readdir(r,s,function(l,c){u._processGlobStar2(e,t,r,n,i,s,c,o)})};Cs.prototype._processGlobStar2=function(e,t,r,n,i,s,o,u){if(!o)return u();var l=n.slice(1);var c=e?[e]:[];var d=c.concat(l);this._process(d,i,false,u);var p=this.symlinks[r];var f=o.length;if(p&&s)return u();for(var m=0;m<f;m++){var h=o[m];if(h.charAt(0)==="."&&!this.dot)continue;var g=c.concat(o[m],l);this._process(g,i,true,u);var _=c.concat(o[m],n);this._process(_,i,true,u)}u()};Cs.prototype._processSimple=function(e,t,r){var n=this;this._stat(e,function(i,s){n._processSimple2(e,t,i,s,r)})};Cs.prototype._processSimple2=function(e,t,r,n,i){if(!this.matches[t])this.matches[t]=Object.create(null);if(!n)return i();if(e&&e7(e)&&!this.nomount){var s=/[\/\\]$/.test(e);if(e.charAt(0)==="/"){e=bOe.join(this.root,e)}else{e=bOe.resolve(this.root,e);if(s)e+="/"}}if(process.platform==="win32")e=e.replace(/\\/g,"/");this._emitMatch(t,e);i()};Cs.prototype._stat=function(e,t){var r=this._makeAbs(e);var n=e.slice(-1)==="/";if(e.length>this.maxLength)return t();if(!this.stat&&AOe(this.cache,r)){var i=this.cache[r];if(Array.isArray(i))i="DIR";if(!n||i==="DIR")return t(null,i);if(n&&i==="FILE")return t()}var s;var o=this.statCache[r];if(o!==void 0){if(o===false)return t(null,o);else{var u=o.isDirectory()?"DIR":"FILE";if(n&&u==="FILE")return t();else return t(null,u,o)}}var l=this;var c=wOe("stat\0"+r,d);if(c)l.fs.lstat(r,c);function d(p,f){if(f&&f.isSymbolicLink()){return l.fs.stat(r,function(m,h){if(m)l._stat2(e,r,null,f,t);else l._stat2(e,r,m,h,t)})}else{l._stat2(e,r,p,f,t)}}a(d,"lstatcb_")};Cs.prototype._stat2=function(e,t,r,n,i){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[t]=false;return i()}var s=e.slice(-1)==="/";this.statCache[t]=n;if(t.slice(-1)==="/"&&n&&!n.isDirectory())return i(null,false,n);var o=true;if(n)o=n.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||o;if(s&&o==="FILE")return i();return i(null,o,n)}});var IRt=y((N8s,NRt)=>{NRt.exports=ROe;ROe.sync=PRt;var ds=require("assert");var xRt=require("path");var CRt=require("fs");var fQ=EOe();var RRt=parseInt("666",8);var FOn={nosort:true,silent:true};var TOe=0;var t7=process.platform==="win32";function ORt(e){var t=["unlink","chmod","stat","lstat","rmdir","readdir"];t.forEach(function(r){e[r]=e[r]||CRt[r];r=r+"Sync";e[r]=e[r]||CRt[r]});e.maxBusyTries=e.maxBusyTries||3;e.emfileWait=e.emfileWait||1e3;if(e.glob===false){e.disableGlob=true}e.disableGlob=e.disableGlob||false;e.glob=e.glob||FOn}a(ORt,"defaults");function ROe(e,t,r){if(typeof t==="function"){r=t;t={}}ds(e,"rimraf: missing path");ds.equal(typeof e,"string","rimraf: path should be a string");ds.equal(typeof r,"function","rimraf: callback function required");ds(t,"rimraf: invalid options argument provided");ds.equal(typeof t,"object","rimraf: options should be object");ORt(t);var n=0;var i=null;var s=0;if(t.disableGlob||!fQ.hasMagic(e))return u(null,[e]);t.lstat(e,function(l,c){if(!l)return u(null,[e]);fQ(e,t.glob,u)});function o(l){i=i||l;if(--s===0)r(i)}a(o,"next");function u(l,c){if(l)return r(l);s=c.length;if(s===0)return r();c.forEach(function(d){xOe(d,t,a(function p(f){if(f){if((f.code==="EBUSY"||f.code==="ENOTEMPTY"||f.code==="EPERM")&&n<t.maxBusyTries){n++;var m=n*100;return setTimeout(function(){xOe(d,t,p)},m)}if(f.code==="EMFILE"&&TOe<t.emfileWait){return setTimeout(function(){xOe(d,t,p)},TOe++)}if(f.code==="ENOENT")f=null}TOe=0;o(f)},"CB"))})}a(u,"afterGlob")}a(ROe,"rimraf");function xOe(e,t,r){ds(e);ds(t);ds(typeof r==="function");t.lstat(e,function(n,i){if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&t7)wRt(e,t,n,r);if(i&&i.isDirectory())return dQ(e,t,n,r);t.unlink(e,function(s){if(s){if(s.code==="ENOENT")return r(null);if(s.code==="EPERM")return t7?wRt(e,t,s,r):dQ(e,t,s,r);if(s.code==="EISDIR")return dQ(e,t,s,r)}return r(s)})})}a(xOe,"rimraf_");function wRt(e,t,r,n){ds(e);ds(t);ds(typeof n==="function");if(r)ds(r instanceof Error);t.chmod(e,RRt,function(i){if(i)n(i.code==="ENOENT"?null:r);else t.stat(e,function(s,o){if(s)n(s.code==="ENOENT"?null:r);else if(o.isDirectory())dQ(e,t,r,n);else t.unlink(e,n)})})}a(wRt,"fixWinEPERM");function TRt(e,t,r){ds(e);ds(t);if(r)ds(r instanceof Error);try{t.chmodSync(e,RRt)}catch(i){if(i.code==="ENOENT")return;else throw r}try{var n=t.statSync(e)}catch(i){if(i.code==="ENOENT")return;else throw r}if(n.isDirectory())pQ(e,t,r);else t.unlinkSync(e)}a(TRt,"fixWinEPERMSync");function dQ(e,t,r,n){ds(e);ds(t);if(r)ds(r instanceof Error);ds(typeof n==="function");t.rmdir(e,function(i){if(i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM"))BOn(e,t,n);else if(i&&i.code==="ENOTDIR")n(r);else n(i)})}a(dQ,"rmdir");function BOn(e,t,r){ds(e);ds(t);ds(typeof r==="function");t.readdir(e,function(n,i){if(n)return r(n);var s=i.length;if(s===0)return t.rmdir(e,r);var o;i.forEach(function(u){ROe(xRt.join(e,u),t,function(l){if(o)return;if(l)return r(o=l);if(--s===0)t.rmdir(e,r)})})})}a(BOn,"rmkids");function PRt(e,t){t=t||{};ORt(t);ds(e,"rimraf: missing path");ds.equal(typeof e,"string","rimraf: path should be a string");ds(t,"rimraf: missing options");ds.equal(typeof t,"object","rimraf: options should be object");var r;if(t.disableGlob||!fQ.hasMagic(e)){r=[e]}else{try{t.lstatSync(e);r=[e]}catch(s){r=fQ.sync(e,t.glob)}}if(!r.length)return;for(var n=0;n<r.length;n++){var e=r[n];try{var i=t.lstatSync(e)}catch(o){if(o.code==="ENOENT")return;if(o.code==="EPERM"&&t7)TRt(e,t,o)}try{if(i&&i.isDirectory())pQ(e,t,null);else t.unlinkSync(e)}catch(o){if(o.code==="ENOENT")return;if(o.code==="EPERM")return t7?TRt(e,t,o):pQ(e,t,o);if(o.code!=="EISDIR")throw o;pQ(e,t,o)}}}a(PRt,"rimrafSync");function pQ(e,t,r){ds(e);ds(t);if(r)ds(r instanceof Error);try{t.rmdirSync(e)}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")MOn(e,t)}}a(pQ,"rmdirSync");function MOn(e,t){ds(e);ds(t);t.readdirSync(e).forEach(function(o){PRt(xRt.join(e,o),t)});var r=t7?100:1;var n=0;do{var i=true;try{var s=t.rmdirSync(e,t);i=false;return s}finally{if(++n<r&&i)continue}}while(true)}a(MOn,"rmkidsSync")});var FRt=y((k8s,LRt)=>{var r7=require("path");var kRt=require("fs");var DRt=parseInt("0777",8);LRt.exports=LP.mkdirp=LP.mkdirP=LP;function LP(e,t,r,n){if(typeof t==="function"){r=t;t={}}else if(!t||typeof t!=="object"){t={mode:t}}var i=t.mode;var s=t.fs||kRt;if(i===void 0){i=DRt}if(!n)n=null;var o=r||function(){};e=r7.resolve(e);s.mkdir(e,i,function(u){if(!u){n=n||e;return o(null,n)}switch(u.code){case"ENOENT":if(r7.dirname(e)===e)return o(u);LP(r7.dirname(e),t,function(l,c){if(l)o(l,c);else LP(e,t,o,c)});break;default:s.stat(e,function(l,c){if(l||!c.isDirectory())o(u,n);else o(null,n)});break}})}a(LP,"mkdirP");LP.sync=a(function e(t,r,n){if(!r||typeof r!=="object"){r={mode:r}}var i=r.mode;var s=r.fs||kRt;if(i===void 0){i=DRt}if(!n)n=null;t=r7.resolve(t);try{s.mkdirSync(t,i);n=n||t}catch(u){switch(u.code){case"ENOENT":n=e(r7.dirname(t),r,n);e(t,r,n);break;default:var o;try{o=s.statSync(t)}catch(l){throw u}if(!o.isDirectory())throw u;break}}return n},"sync")});var zRt=y((hh,VRt)=>{var OOe=require("fs");var MRt=require("path");var mQ=require("constants");var qOn=require("os");var POe=IRt();var qRt=FRt();var L8s=require("os").tmpdir();var URt=POe.sync;var $Rt=MRt.resolve(qOn.tmpdir());var NOe=mQ.O_CREAT|mQ.O_TRUNC|mQ.O_RDWR|mQ.O_EXCL;var n7=a(function(e){if(typeof e==="function"){return[void 0,e]}var t;var r=new Promise(function(n,i){t=a(function(){var s=Array.from(arguments);var o=s.shift();process.nextTick(function(){if(o){i(o)}else if(s.length===1){n(s[0])}else{n(s)}})},"promiseCallback")});return[r,t]},"promisify");var FP=a(function(e,t){var r=UOn(e,t);var n=new Date;var i=[r.prefix,n.getFullYear(),n.getMonth(),n.getDate(),"-",process.pid,"-",(Math.random()*4294967296+1).toString(36),r.suffix].join("");return MRt.join(r.dir||$Rt,i)},"generateName");var UOn=a(function(e,t){var r={prefix:null,suffix:null};if(e){switch(typeof e){case"string":r.prefix=e;break;case"object":r=e;break;default:throw new Error("Unknown affix declaration: "+r)}}else{r.prefix=t}return r},"parseAffixes");var ag=false;var $On=a(function(e){ag=e!==false;return VRt.exports},"track");var BRt=false;var hQ=[];var gQ=[];function IOe(e){if(!ag)return false;GRt();hQ.push(e)}a(IOe,"deleteFileOnExit");function jRt(e){if(!ag)return false;GRt();gQ.push(e)}a(jRt,"deleteDirOnExit");function GRt(){if(!ag)return false;if(!BRt){process.addListener("exit",function(){try{HRt()}catch(e){console.warn("Fail to clean temporary files on exit : ",e);throw e}});BRt=true}}a(GRt,"attachExitListener");function jOn(){if(!ag){return false}var e=0;var t;while((t=hQ.shift())!==void 0){URt(t,{maxBusyTries:6});e++}return e}a(jOn,"cleanupFilesSync");function GOn(e){var t=n7(e);var r=t[0];e=t[1];if(!ag){e(new Error("not tracking"));return r}var n=0;var i=hQ.length;if(!i){e(null,n);return r}var s;var o=a(function(u){if(!i){return}if(u){e(u);i=0;return}else{n++}i--;if(!i){e(null,n)}},"rimrafCallback");while((s=hQ.shift())!==void 0){POe(s,{maxBusyTries:6},o)}return r}a(GOn,"cleanupFiles");function HOn(){if(!ag){return false}var e=0;var t;while((t=gQ.shift())!==void 0){URt(t,{maxBusyTries:6});e++}return e}a(HOn,"cleanupDirsSync");function VOn(e){var t=n7(e);var r=t[0];e=t[1];if(!ag){e(new Error("not tracking"));return r}var n=0;var i=gQ.length;if(!i){e(null,n);return r}var s;var o=a(function(u){if(!i){return}if(u){e(u,n);i=0;return}else{n++}i--;if(!i){e(null,n)}},"rimrafCallback");while((s=gQ.shift())!==void 0){POe(s,{maxBusyTries:6},o)}return r}a(VOn,"cleanupDirs");function HRt(){if(!ag){return false}var e=jOn();var t=HOn();return{files:e,dirs:t}}a(HRt,"cleanupSync");function zOn(e){var t=n7(e);var r=t[0];e=t[1];if(!ag){e(new Error("not tracking"));return r}GOn(function(n,i){if(n){e(n,{files:i})}else{VOn(function(s,o){e(s,{files:i,dirs:o})})}});return r}a(zOn,"cleanup");var KOn=a((e,t)=>{const r=n7(t);const n=r[0];t=r[1];let i=FP(e,"d-");qRt(i,448,s=>{if(!s){jRt(i)}t(s,i)});return n},"mkdir");var WOn=a(e=>{let t=FP(e,"d-");qRt.sync(t,448);jRt(t);return t},"mkdirSync");var YOn=a((e,t)=>{const r=n7(t);const n=r[0];t=r[1];const i=FP(e,"f-");OOe.open(i,NOe,384,(s,o)=>{if(!s){IOe(i)}t(s,{path:i,fd:o})});return n},"open");var XOn=a(e=>{const t=FP(e,"f-");let r=OOe.openSync(t,NOe,384);IOe(t);return{path:t,fd:r}},"openSync");var JOn=a(e=>{const t=FP(e,"s-");let r=OOe.createWriteStream(t,{flags:NOe,mode:384});IOe(t);return r},"createWriteStream");hh.dir=$Rt;hh.track=$On;hh.mkdir=KOn;hh.mkdirSync=WOn;hh.open=YOn;hh.openSync=XOn;hh.path=FP;hh.cleanup=zOn;hh.cleanupSync=HRt;hh.createWriteStream=JOn});var XRt=y(BP=>{"use strict";var YRt=BP&&BP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(BP,"__esModule",{value:true});BP.generateBuildData=void 0;var yQ=hn();var KRt=require("fs/promises");var WRt=YRt(require("path"));var QOn=Fn();var ZOn=YRt(xs());var ePn=a(async function({systemDirectory:e,buildId:t,logger:r,config:n,publicZuploEnvironmentVariables:i}){return ZOn.default.timeFn("Generating build data",async()=>{r.debug(`Generating build data`);const s=await(0,KRt.readFile)(WRt.default.resolve(__dirname,"../../../package.json"),"utf-8");const o=JSON.parse(s);const u={BUILD_ID:t??"",GIT_SHA:process.env.GIT_SHA,TIMESTAMP:new Date().toISOString(),IS_PRODUCTION:yQ.env.isProduction(),BUILD_ENV:yQ.env.NODE_ENV,ZUPLO_VERSION:o.version,API_VERSION:process.env.API_VERSION,COMPATIBILITY_DATE:n?.compatibilityDate,ACCOUNT_NAME:i?.ZUPLO_ACCOUNT_NAME,PROJECT_NAME:i?.ZUPLO_PROJECT_NAME,ENVIRONMENT_TYPE:i?.ZUPLO_ENVIRONMENT_TYPE,COMPATIBILITY_FLAGS:yQ.COMPATIBILITY_FLAG_MAPPINGS?yQ.COMPATIBILITY_FLAG_MAPPINGS[n?.compatibilityDate??"none"]:{runOutboundPoliciesOnHandlerOnAllStatuses:false}};const l=JSON.stringify(u,void 0,2);const c=WRt.default.join(e,QOn.GENERATED_BUILD_JSON_FILE);try{await(0,KRt.writeFile)(c,l.trimStart(),"utf-8")}catch(d){r.error(d);const p={message:`Error creating file at ${c}`,pluginName:"buildData",severity:"error"};return{warnings:[],errors:[p]}}return{warnings:[],errors:[]}})},"generateBuildData");BP.generateBuildData=ePn});var JRt=y(MP=>{"use strict";var DOe=MP&&MP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(MP,"__esModule",{value:true});MP.generateWorker=void 0;var tPn=DOe(require("fs/promises"));var rPn=DOe(require("path"));var kOe=Fn();var nPn=DOe(xs());var iPn=a(async function({systemDirectory:e,logger:t}){return nPn.default.timeFn("Generating Worker shim",async()=>{t.debug("Generating Worker shim");const r=`import { Handler, ServiceProviderImpl } from "@zuplo/runtime";
410
+ `+await e.crypto.sha256DigestHex(m);const _=await MSn(e.crypto,e.securityCredentials.secretAccessKey,o,e.region,n);const v=await bF(e.crypto,_,g);const S=`${BCt} Credential=${e.securityCredentials.accessKeyId}/${h}, SignedHeaders=${p}, Signature=${(0,MCt.fromArrayBufferToHex)(v)}`;return{amzDate:u.date?void 0:s,authorizationHeader:S,canonicalQuerystring:e.canonicalQuerystring}}a(qSn,"generateAuthenticationHeaderMap")});var nxe=y(eJ=>{"use strict";Object.defineProperty(eJ,"__esModule",{value:true});eJ.AwsClient=void 0;var USn=qCt();var $Sn=qE();var SF=class extends $Sn.BaseExternalAccountClient{static{a(this,"AwsClient")}constructor(t,r){super(t,r);this.environmentId=t.credential_source.environment_id;this.regionUrl=t.credential_source.region_url;this.securityCredentialsUrl=t.credential_source.url;this.regionalCredVerificationUrl=t.credential_source.regional_cred_verification_url;this.imdsV2SessionTokenUrl=t.credential_source.imdsv2_session_token_url;this.awsRequestSigner=null;this.region="";this.validateEnvironmentId()}validateEnvironmentId(){var t;const r=(t=this.environmentId)===null||t===void 0?void 0:t.match(/^(aws)(\d+)$/);if(!r||!this.regionalCredVerificationUrl){throw new Error('No valid AWS "credential_source" provided')}else if(parseInt(r[2],10)!==1){throw new Error(`aws version "${r[2]}" is not supported in the current build.`)}}async retrieveSubjectToken(){if(!this.awsRequestSigner){const i={};if(this.shouldUseMetadataServer()&&this.imdsV2SessionTokenUrl){i["x-aws-ec2-metadata-token"]=await this.getImdsV2SessionToken()}this.region=await this.getAwsRegion(i);this.awsRequestSigner=new USn.AwsRequestSigner(async()=>{if(this.securityCredentialsFromEnv){return this.securityCredentialsFromEnv}const s=await this.getAwsRoleName(i);const o=await this.getAwsSecurityCredentials(s,i);return{accessKeyId:o.AccessKeyId,secretAccessKey:o.SecretAccessKey,token:o.Token}},this.region)}const t=await this.awsRequestSigner.getRequestOptions({url:this.regionalCredVerificationUrl.replace("{region}",this.region),method:"POST"});const r=[];const n=Object.assign({"x-goog-cloud-target-resource":this.audience},t.headers);for(const i in n){r.push({key:i,value:n[i]})}return encodeURIComponent(JSON.stringify({url:t.url,method:t.method,headers:r}))}async getImdsV2SessionToken(){const t={url:this.imdsV2SessionTokenUrl,method:"PUT",responseType:"text",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"300"}};const r=await this.transporter.request(t);return r.data}async getAwsRegion(t){if(this.regionFromEnv){return this.regionFromEnv}if(!this.regionUrl){throw new Error('Unable to determine AWS region due to missing "options.credential_source.region_url"')}const r={url:this.regionUrl,method:"GET",responseType:"text",headers:t};const n=await this.transporter.request(r);return n.data.substr(0,n.data.length-1)}async getAwsRoleName(t){if(!this.securityCredentialsUrl){throw new Error('Unable to determine AWS role name due to missing "options.credential_source.url"')}const r={url:this.securityCredentialsUrl,method:"GET",responseType:"text",headers:t};const n=await this.transporter.request(r);return n.data}async getAwsSecurityCredentials(t,r){const n=await this.transporter.request({url:`${this.securityCredentialsUrl}/${t}`,responseType:"json",headers:r});return n.data}shouldUseMetadataServer(){return!this.regionFromEnv||!this.securityCredentialsFromEnv}get regionFromEnv(){return process.env["AWS_REGION"]||process.env["AWS_DEFAULT_REGION"]||null}get securityCredentialsFromEnv(){if(process.env["AWS_ACCESS_KEY_ID"]&&process.env["AWS_SECRET_ACCESS_KEY"]){return{accessKeyId:process.env["AWS_ACCESS_KEY_ID"],secretAccessKey:process.env["AWS_SECRET_ACCESS_KEY"],token:process.env["AWS_SESSION_TOKEN"]}}return null}};eJ.AwsClient=SF;SF.AWS_EC2_METADATA_IPV4_ADDRESS="169.254.169.254";SF.AWS_EC2_METADATA_IPV6_ADDRESS="fd00:ec2::254"});var uxe=y(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:true});Do.InvalidSubjectTokenError=Do.InvalidMessageFieldError=Do.InvalidCodeFieldError=Do.InvalidTokenTypeFieldError=Do.InvalidExpirationTimeFieldError=Do.InvalidSuccessFieldError=Do.InvalidVersionFieldError=Do.ExecutableResponseError=Do.ExecutableResponse=void 0;var tJ="urn:ietf:params:oauth:token-type:saml2";var ixe="urn:ietf:params:oauth:token-type:id_token";var sxe="urn:ietf:params:oauth:token-type:jwt";var axe=class{static{a(this,"ExecutableResponse")}constructor(t){if(!t.version){throw new rJ("Executable response must contain a 'version' field.")}if(t.success===void 0){throw new nJ("Executable response must contain a 'success' field.")}this.version=t.version;this.success=t.success;if(this.success){this.expirationTime=t.expiration_time;this.tokenType=t.token_type;if(this.tokenType!==tJ&&this.tokenType!==ixe&&this.tokenType!==sxe){throw new iJ(`Executable response must contain a 'token_type' field when successful and it must be one of ${ixe}, ${sxe}, or ${tJ}.`)}if(this.tokenType===tJ){if(!t.saml_response){throw new AF(`Executable response must contain a 'saml_response' field when token_type=${tJ}.`)}this.subjectToken=t.saml_response}else{if(!t.id_token){throw new AF(`Executable response must contain a 'id_token' field when token_type=${ixe} or ${sxe}.`)}this.subjectToken=t.id_token}}else{if(!t.code){throw new sJ("Executable response must contain a 'code' field when unsuccessful.")}if(!t.message){throw new aJ("Executable response must contain a 'message' field when unsuccessful.")}this.errorCode=t.code;this.errorMessage=t.message}}isValid(){return!this.isExpired()&&this.success}isExpired(){return this.expirationTime!==void 0&&this.expirationTime<Math.round(Date.now()/1e3)}};Do.ExecutableResponse=axe;var tg=class extends Error{static{a(this,"ExecutableResponseError")}constructor(t){super(t);Object.setPrototypeOf(this,new.target.prototype)}};Do.ExecutableResponseError=tg;var rJ=class extends tg{static{a(this,"InvalidVersionFieldError")}};Do.InvalidVersionFieldError=rJ;var nJ=class extends tg{static{a(this,"InvalidSuccessFieldError")}};Do.InvalidSuccessFieldError=nJ;var oxe=class extends tg{static{a(this,"InvalidExpirationTimeFieldError")}};Do.InvalidExpirationTimeFieldError=oxe;var iJ=class extends tg{static{a(this,"InvalidTokenTypeFieldError")}};Do.InvalidTokenTypeFieldError=iJ;var sJ=class extends tg{static{a(this,"InvalidCodeFieldError")}};Do.InvalidCodeFieldError=sJ;var aJ=class extends tg{static{a(this,"InvalidMessageFieldError")}};Do.InvalidMessageFieldError=aJ;var AF=class extends tg{static{a(this,"InvalidSubjectTokenError")}};Do.InvalidSubjectTokenError=AF});var UCt=y(oJ=>{"use strict";Object.defineProperty(oJ,"__esModule",{value:true});oJ.PluggableAuthHandler=void 0;var jSn=uJ();var eC=uxe();var GSn=require("child_process");var lxe=require("fs");var cxe=class e{static{a(this,"PluggableAuthHandler")}constructor(t){if(!t.command){throw new Error("No command provided.")}this.commandComponents=e.parseCommand(t.command);this.timeoutMillis=t.timeoutMillis;if(!this.timeoutMillis){throw new Error("No timeoutMillis provided.")}this.outputFile=t.outputFile}retrieveResponseFromExecutable(t){return new Promise((r,n)=>{const i=GSn.spawn(this.commandComponents[0],this.commandComponents.slice(1),{env:{...process.env,...Object.fromEntries(t)}});let s="";i.stdout.on("data",u=>{s+=u});i.stderr.on("data",u=>{s+=u});const o=setTimeout(()=>{i.removeAllListeners();i.kill();return n(new Error("The executable failed to finish within the timeout specified."))},this.timeoutMillis);i.on("close",u=>{clearTimeout(o);if(u===0){try{const l=JSON.parse(s);const c=new eC.ExecutableResponse(l);return r(c)}catch(l){if(l instanceof eC.ExecutableResponseError){return n(l)}return n(new eC.ExecutableResponseError(`The executable returned an invalid response: ${s}`))}}else{return n(new jSn.ExecutableError(s,u.toString()))}})})}async retrieveCachedResponse(){if(!this.outputFile||this.outputFile.length===0){return void 0}let t;try{t=await lxe.promises.realpath(this.outputFile)}catch(n){return void 0}if(!(await lxe.promises.lstat(t)).isFile()){return void 0}const r=await lxe.promises.readFile(t,{encoding:"utf8"});if(r===""){return void 0}try{const n=JSON.parse(r);const i=new eC.ExecutableResponse(n);if(i.isValid()){return new eC.ExecutableResponse(n)}return void 0}catch(n){if(n instanceof eC.ExecutableResponseError){throw n}throw new eC.ExecutableResponseError(`The output file contained an invalid response: ${r}`)}}static parseCommand(t){const r=t.match(/(?:[^\s"]+|"[^"]*")+/g);if(!r){throw new Error(`Provided command: "${t}" could not be parsed.`)}for(let n=0;n<r.length;n++){if(r[n][0]==='"'&&r[n].slice(-1)==='"'){r[n]=r[n].slice(1,-1)}}return r}};oJ.PluggableAuthHandler=cxe});var uJ=y(XO=>{"use strict";Object.defineProperty(XO,"__esModule",{value:true});XO.PluggableAuthClient=XO.ExecutableError=void 0;var HSn=qE();var VSn=uxe();var zSn=UCt();var lJ=class extends Error{static{a(this,"ExecutableError")}constructor(t,r){super(`The executable failed with exit code: ${r} and error message: ${t}.`);this.code=r;Object.setPrototypeOf(this,new.target.prototype)}};XO.ExecutableError=lJ;var KSn=30*1e3;var $Ct=5*1e3;var jCt=120*1e3;var WSn="GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES";var GCt=1;var dxe=class extends HSn.BaseExternalAccountClient{static{a(this,"PluggableAuthClient")}constructor(t,r){super(t,r);if(!t.credential_source.executable){throw new Error('No valid Pluggable Auth "credential_source" provided.')}this.command=t.credential_source.executable.command;if(!this.command){throw new Error('No valid Pluggable Auth "credential_source" provided.')}if(t.credential_source.executable.timeout_millis===void 0){this.timeoutMillis=KSn}else{this.timeoutMillis=t.credential_source.executable.timeout_millis;if(this.timeoutMillis<$Ct||this.timeoutMillis>jCt){throw new Error(`Timeout must be between ${$Ct} and ${jCt} milliseconds.`)}}this.outputFile=t.credential_source.executable.output_file;this.handler=new zSn.PluggableAuthHandler({command:this.command,timeoutMillis:this.timeoutMillis,outputFile:this.outputFile})}async retrieveSubjectToken(){if(process.env[WSn]!=="1"){throw new Error("Pluggable Auth executables need to be explicitly allowed to run by setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment Variable to 1.")}let t=void 0;if(this.outputFile){t=await this.handler.retrieveCachedResponse()}if(!t){const r=new Map;r.set("GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE",this.audience);r.set("GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE",this.subjectTokenType);r.set("GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE","0");if(this.outputFile){r.set("GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE",this.outputFile)}const n=this.getServiceAccountEmail();if(n){r.set("GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL",n)}t=await this.handler.retrieveResponseFromExecutable(r)}if(t.version>GCt){throw new Error(`Version of executable is not currently supported, maximum supported version is ${GCt}.`)}if(!t.success){throw new lJ(t.errorMessage,t.errorCode)}if(this.outputFile){if(!t.expirationTime){throw new VSn.InvalidExpirationTimeFieldError("The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.")}}if(t.isExpired()){throw new Error("Executable response is expired.")}return t.subjectToken}};XO.PluggableAuthClient=dxe});var fxe=y(cJ=>{"use strict";Object.defineProperty(cJ,"__esModule",{value:true});cJ.ExternalAccountClient=void 0;var YSn=qE();var XSn=txe();var JSn=nxe();var QSn=uJ();var pxe=class{static{a(this,"ExternalAccountClient")}constructor(){throw new Error("ExternalAccountClients should be initialized via: ExternalAccountClient.fromJSON(), directly via explicit constructors, eg. new AwsClient(options), new IdentityPoolClient(options), newPluggableAuthClientOptions, or via new GoogleAuth(options).getClient()")}static fromJSON(t,r){var n,i;if(t&&t.type===YSn.EXTERNAL_ACCOUNT_TYPE){if((n=t.credential_source)===null||n===void 0?void 0:n.environment_id){return new JSn.AwsClient(t,r)}else if((i=t.credential_source)===null||i===void 0?void 0:i.executable){return new QSn.PluggableAuthClient(t,r)}else{return new XSn.IdentityPoolClient(t,r)}}else{return null}}};cJ.ExternalAccountClient=pxe});var VCt=y(JO=>{"use strict";Object.defineProperty(JO,"__esModule",{value:true});JO.ExternalAccountAuthorizedUserClient=JO.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=void 0;var ZSn=PO();var HCt=HTe();var eAn=Ey();var tAn=require("stream");var rAn=qE();JO.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE="external_account_authorized_user";var mxe=class extends HCt.OAuthClientAuthHandler{static{a(this,"ExternalAccountAuthorizedUserHandler")}constructor(t,r,n){super(n);this.url=t;this.transporter=r}async refreshToken(t,r){const n=new URLSearchParams({grant_type:"refresh_token",refresh_token:t});const i={"Content-Type":"application/x-www-form-urlencoded",...r};const s={url:this.url,method:"POST",headers:i,data:n.toString(),responseType:"json"};this.applyClientAuthenticationOptions(s);try{const o=await this.transporter.request(s);const u=o.data;u.res=o;return u}catch(o){if(o instanceof eAn.GaxiosError&&o.response){throw(0,HCt.getErrorFromOAuthErrorResponse)(o.response.data,o)}throw o}}};var hxe=class extends ZSn.AuthClient{static{a(this,"ExternalAccountAuthorizedUserClient")}constructor(t,r){super();this.refreshToken=t.refresh_token;const n={confidentialClientType:"basic",clientId:t.client_id,clientSecret:t.client_secret};this.externalAccountAuthorizedUserHandler=new mxe(t.token_url,this.transporter,n);this.cachedAccessToken=null;this.quotaProjectId=t.quota_project_id;if(typeof(r===null||r===void 0?void 0:r.eagerRefreshThresholdMillis)!=="number"){this.eagerRefreshThresholdMillis=rAn.EXPIRATION_TIME_OFFSET}else{this.eagerRefreshThresholdMillis=r.eagerRefreshThresholdMillis}this.forceRefreshOnFailure=!!(r===null||r===void 0?void 0:r.forceRefreshOnFailure)}async getAccessToken(){if(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken)){await this.refreshAccessTokenAsync()}return{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){const t=await this.getAccessToken();const r={Authorization:`Bearer ${t.token}`};return this.addSharedMetadataHeaders(r)}request(t,r){if(r){this.requestAsync(t).then(n=>r(null,n),n=>{return r(n,n.response)})}else{return this.requestAsync(t)}}async requestAsync(t,r=false){let n;try{const i=await this.getRequestHeaders();t.headers=t.headers||{};if(i&&i["x-goog-user-project"]){t.headers["x-goog-user-project"]=i["x-goog-user-project"]}if(i&&i.Authorization){t.headers.Authorization=i.Authorization}n=await this.transporter.request(t)}catch(i){const s=i.response;if(s){const o=s.status;const u=s.config.data instanceof tAn.Readable;const l=o===401||o===403;if(!r&&l&&!u&&this.forceRefreshOnFailure){await this.refreshAccessTokenAsync();return await this.requestAsync(t,true)}}throw i}return n}async refreshAccessTokenAsync(){const t=await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken);this.cachedAccessToken={access_token:t.access_token,expiry_date:new Date().getTime()+t.expires_in*1e3,res:t.res};if(t.refresh_token!==void 0){this.refreshToken=t.refresh_token}return this.cachedAccessToken}isExpired(t){const r=new Date().getTime();return t.expiry_date?r>=t.expiry_date-this.eagerRefreshThresholdMillis:false}};JO.ExternalAccountAuthorizedUserClient=hxe});var WCt=y(ZO=>{"use strict";Object.defineProperty(ZO,"__esModule",{value:true});ZO.GoogleAuth=ZO.CLOUD_SDK_CLIENT_ID=void 0;var nAn=require("child_process");var CF=require("fs");var gxe=nX();var iAn=require("os");var yxe=require("path");var sAn=RO();var aAn=iF();var oAn=Twe();var uAn=Rwe();var lAn=Owe();var QO=MTe();var _xe=UTe();var dJ=jTe();var cAn=fxe();var wF=qE();var zCt=VCt();ZO.CLOUD_SDK_CLIENT_ID="764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com";var KCt={NO_PROJECT_ID_FOUND:"Unable to detect a Project Id in the current environment. \nTo learn more about authentication and Google APIs, visit: \nhttps://cloud.google.com/docs/authentication/getting-started"};var pJ=class{static{a(this,"GoogleAuth")}get isGCE(){return this.checkIsGCE}constructor(t){this.checkIsGCE=void 0;this.jsonContent=null;this.cachedCredential=null;t=t||{};this._cachedProjectId=t.projectId||null;this.cachedCredential=t.authClient||null;this.keyFilename=t.keyFilename||t.keyFile;this.scopes=t.scopes;this.jsonContent=t.credentials||null;this.clientOptions=t.clientOptions}setGapicJWTValues(t){t.defaultServicePath=this.defaultServicePath;t.useJWTAccessWithScope=this.useJWTAccessWithScope;t.defaultScopes=this.defaultScopes}getProjectId(t){if(t){this.getProjectIdAsync().then(r=>t(null,r),t)}else{return this.getProjectIdAsync()}}async getProjectIdOptional(){try{return await this.getProjectId()}catch(t){if(t instanceof Error&&t.message===KCt.NO_PROJECT_ID_FOUND){return null}else{throw t}}}async findAndCacheProjectId(){let t=null;t||(t=await this.getProductionProjectId());t||(t=await this.getFileProjectId());t||(t=await this.getDefaultServiceProjectId());t||(t=await this.getGCEProjectId());t||(t=await this.getExternalAccountClientProjectId());if(t){this._cachedProjectId=t;return t}else{throw new Error(KCt.NO_PROJECT_ID_FOUND)}}async getProjectIdAsync(){if(this._cachedProjectId){return this._cachedProjectId}if(!this._findProjectIdPromise){this._findProjectIdPromise=this.findAndCacheProjectId()}return this._findProjectIdPromise}getAnyScopes(){return this.scopes||this.defaultScopes}getApplicationDefault(t={},r){let n;if(typeof t==="function"){r=t}else{n=t}if(r){this.getApplicationDefaultAsync(n).then(i=>r(null,i.credential,i.projectId),r)}else{return this.getApplicationDefaultAsync(n)}}async getApplicationDefaultAsync(t={}){if(this.cachedCredential){return await this.prepareAndCacheADC(this.cachedCredential)}const r=process.env["GOOGLE_CLOUD_QUOTA_PROJECT"];let n;n=await this._tryGetApplicationCredentialsFromEnvironmentVariable(t);if(n){if(n instanceof QO.JWT){n.scopes=this.scopes}else if(n instanceof wF.BaseExternalAccountClient){n.scopes=this.getAnyScopes()}return await this.prepareAndCacheADC(n,r)}n=await this._tryGetApplicationCredentialsFromWellKnownFile(t);if(n){if(n instanceof QO.JWT){n.scopes=this.scopes}else if(n instanceof wF.BaseExternalAccountClient){n.scopes=this.getAnyScopes()}return await this.prepareAndCacheADC(n,r)}let i;try{i=await this._checkIsGCE()}catch(s){if(s instanceof Error){s.message=`Unexpected error determining execution environment: ${s.message}`}throw s}if(!i){throw new Error("Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.")}t.scopes=this.getAnyScopes();return await this.prepareAndCacheADC(new oAn.Compute(t),r)}async prepareAndCacheADC(t,r){const n=await this.getProjectIdOptional();if(r){t.quotaProjectId=r}this.cachedCredential=t;return{credential:t,projectId:n}}async _checkIsGCE(){if(this.checkIsGCE===void 0){this.checkIsGCE=await gxe.isAvailable()}return this.checkIsGCE}async _tryGetApplicationCredentialsFromEnvironmentVariable(t){const r=process.env["GOOGLE_APPLICATION_CREDENTIALS"]||process.env["google_application_credentials"];if(!r||r.length===0){return null}try{return this._getApplicationCredentialsFromFilePath(r,t)}catch(n){if(n instanceof Error){n.message=`Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${n.message}`}throw n}}async _tryGetApplicationCredentialsFromWellKnownFile(t){let r=null;if(this._isWindows()){r=process.env["APPDATA"]}else{const i=process.env["HOME"];if(i){r=yxe.join(i,".config")}}if(r){r=yxe.join(r,"gcloud","application_default_credentials.json");if(!CF.existsSync(r)){r=null}}if(!r){return null}const n=await this._getApplicationCredentialsFromFilePath(r,t);return n}async _getApplicationCredentialsFromFilePath(t,r={}){if(!t||t.length===0){throw new Error("The file path is invalid.")}try{t=CF.realpathSync(t);if(!CF.lstatSync(t).isFile()){throw new Error}}catch(i){if(i instanceof Error){i.message=`The file at ${t} does not exist, or it is not a file. ${i.message}`}throw i}const n=CF.createReadStream(t);return this.fromStream(n,r)}fromImpersonatedJSON(t){var r,n,i,s;if(!t){throw new Error("Must pass in a JSON object containing an impersonated refresh token")}if(t.type!==dJ.IMPERSONATED_ACCOUNT_TYPE){throw new Error(`The incoming JSON object does not have the "${dJ.IMPERSONATED_ACCOUNT_TYPE}" type`)}if(!t.source_credentials){throw new Error("The incoming JSON object does not contain a source_credentials field")}if(!t.service_account_impersonation_url){throw new Error("The incoming JSON object does not contain a service_account_impersonation_url field")}const o=new _xe.UserRefreshClient(t.source_credentials.client_id,t.source_credentials.client_secret,t.source_credentials.refresh_token);const u=(n=(r=/(?<target>[^/]+):generateAccessToken$/.exec(t.service_account_impersonation_url))===null||r===void 0?void 0:r.groups)===null||n===void 0?void 0:n.target;if(!u){throw new RangeError(`Cannot extract target principal from ${t.service_account_impersonation_url}`)}const l=(i=this.getAnyScopes())!==null&&i!==void 0?i:[];const c=new dJ.Impersonated({delegates:(s=t.delegates)!==null&&s!==void 0?s:[],sourceClient:o,targetPrincipal:u,targetScopes:Array.isArray(l)?l:[l]});return c}fromJSON(t,r={}){let n;r=r||{};if(t.type===_xe.USER_REFRESH_ACCOUNT_TYPE){n=new _xe.UserRefreshClient(r);n.fromJSON(t)}else if(t.type===dJ.IMPERSONATED_ACCOUNT_TYPE){n=this.fromImpersonatedJSON(t)}else if(t.type===wF.EXTERNAL_ACCOUNT_TYPE){n=cAn.ExternalAccountClient.fromJSON(t,r);n.scopes=this.getAnyScopes()}else if(t.type===zCt.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE){n=new zCt.ExternalAccountAuthorizedUserClient(t,r)}else{r.scopes=this.scopes;n=new QO.JWT(r);this.setGapicJWTValues(n);n.fromJSON(t)}return n}_cacheClientFromJSON(t,r){const n=this.fromJSON(t,r);this.jsonContent=t;this.cachedCredential=n;return n}fromStream(t,r={},n){let i={};if(typeof r==="function"){n=r}else{i=r}if(n){this.fromStreamAsync(t,i).then(s=>n(null,s),n)}else{return this.fromStreamAsync(t,i)}}fromStreamAsync(t,r){return new Promise((n,i)=>{if(!t){throw new Error("Must pass in a stream containing the Google auth settings.")}let s="";t.setEncoding("utf8").on("error",i).on("data",o=>s+=o).on("end",()=>{try{try{const o=JSON.parse(s);const u=this._cacheClientFromJSON(o,r);return n(u)}catch(o){if(!this.keyFilename)throw o;const u=new QO.JWT({...this.clientOptions,keyFile:this.keyFilename});this.cachedCredential=u;this.setGapicJWTValues(u);return n(u)}}catch(o){return i(o)}})})}fromAPIKey(t,r){r=r||{};const n=new QO.JWT(r);n.fromAPIKey(t);return n}_isWindows(){const t=iAn.platform();if(t&&t.length>=3){if(t.substring(0,3).toLowerCase()==="win"){return true}}return false}async getDefaultServiceProjectId(){return new Promise(t=>{(0,nAn.exec)("gcloud config config-helper --format json",(r,n)=>{if(!r&&n){try{const i=JSON.parse(n).configuration.properties.core.project;t(i);return}catch(i){}}t(null)})})}getProductionProjectId(){return process.env["GCLOUD_PROJECT"]||process.env["GOOGLE_CLOUD_PROJECT"]||process.env["gcloud_project"]||process.env["google_cloud_project"]}async getFileProjectId(){if(this.cachedCredential){return this.cachedCredential.projectId}if(this.keyFilename){const r=await this.getClient();if(r&&r.projectId){return r.projectId}}const t=await this._tryGetApplicationCredentialsFromEnvironmentVariable();if(t){return t.projectId}else{return null}}async getExternalAccountClientProjectId(){if(!this.jsonContent||this.jsonContent.type!==wF.EXTERNAL_ACCOUNT_TYPE){return null}const t=await this.getClient();return await t.getProjectId()}async getGCEProjectId(){try{const t=await gxe.project("project-id");return t}catch(t){return null}}getCredentials(t){if(t){this.getCredentialsAsync().then(r=>t(null,r),t)}else{return this.getCredentialsAsync()}}async getCredentialsAsync(){const t=await this.getClient();if(t instanceof wF.BaseExternalAccountClient){const i=t.getServiceAccountEmail();if(i){return{client_email:i}}}if(this.jsonContent){const i={client_email:this.jsonContent.client_email,private_key:this.jsonContent.private_key};return i}const r=await this._checkIsGCE();if(!r){throw new Error("Unknown error.")}const n=await gxe.instance({property:"service-accounts/",params:{recursive:"true"}});if(!n||!n.default||!n.default.email){throw new Error("Failure from metadata server.")}return{client_email:n.default.email}}async getClient(){if(!this.cachedCredential){if(this.jsonContent){this._cacheClientFromJSON(this.jsonContent,this.clientOptions)}else if(this.keyFilename){const t=yxe.resolve(this.keyFilename);const r=CF.createReadStream(t);await this.fromStreamAsync(r,this.clientOptions)}else{await this.getApplicationDefaultAsync(this.clientOptions)}}return this.cachedCredential}async getIdTokenClient(t){const r=await this.getClient();if(!("fetchIdToken"in r)){throw new Error("Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file.")}return new uAn.IdTokenClient({targetAudience:t,idTokenProvider:r})}async getAccessToken(){const t=await this.getClient();return(await t.getAccessToken()).token}async getRequestHeaders(t){const r=await this.getClient();return r.getRequestHeaders(t)}async authorizeRequest(t){t=t||{};const r=t.url||t.uri;const n=await this.getClient();const i=await n.getRequestHeaders(r);t.headers=Object.assign(t.headers||{},i);return t}async request(t){const r=await this.getClient();return r.request(t)}getEnv(){return(0,lAn.getEnv)()}async sign(t){const r=await this.getClient();const n=(0,sAn.createCrypto)();if(r instanceof QO.JWT&&r.key){const s=await n.sign(r.key,t);return s}const i=await this.getCredentials();if(!i.client_email){throw new Error("Cannot sign data without `client_email`.")}return this.signBlob(n,i.client_email,t)}async signBlob(t,r,n){const i=`https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/${r}:signBlob`;const s=await this.request({method:"POST",url:i,data:{payload:t.encodeBase64StringUtf8(n)}});return s.data.signedBlob}};ZO.GoogleAuth=pJ;pJ.DefaultTransporter=aAn.DefaultTransporter});var YCt=y(fJ=>{"use strict";Object.defineProperty(fJ,"__esModule",{value:true});fJ.IAMAuth=void 0;var vxe=class{static{a(this,"IAMAuth")}constructor(t,r){this.selector=t;this.token=r;this.selector=t;this.token=r}getRequestHeaders(){return{"x-goog-iam-authority-selector":this.selector,"x-goog-iam-authorization-token":this.token}}};fJ.IAMAuth=vxe});var XCt=y(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:true});dh.DownscopedClient=dh.EXPIRATION_TIME_OFFSET=dh.MAX_ACCESS_BOUNDARY_RULES_COUNT=void 0;var dAn=require("stream");var pAn=PO();var fAn=zTe();var mAn="urn:ietf:params:oauth:grant-type:token-exchange";var hAn="urn:ietf:params:oauth:token-type:access_token";var gAn="urn:ietf:params:oauth:token-type:access_token";var yAn="https://sts.googleapis.com/v1/token";dh.MAX_ACCESS_BOUNDARY_RULES_COUNT=10;dh.EXPIRATION_TIME_OFFSET=5*60*1e3;var Exe=class extends pAn.AuthClient{static{a(this,"DownscopedClient")}constructor(t,r,n,i){super();this.authClient=t;this.credentialAccessBoundary=r;if(r.accessBoundary.accessBoundaryRules.length===0){throw new Error("At least one access boundary rule needs to be defined.")}else if(r.accessBoundary.accessBoundaryRules.length>dh.MAX_ACCESS_BOUNDARY_RULES_COUNT){throw new Error(`The provided access boundary has more than ${dh.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`)}for(const s of r.accessBoundary.accessBoundaryRules){if(s.availablePermissions.length===0){throw new Error("At least one permission should be defined in access boundary rules.")}}this.stsCredential=new fAn.StsCredentials(yAn);this.cachedDownscopedAccessToken=null;if(typeof(n===null||n===void 0?void 0:n.eagerRefreshThresholdMillis)!=="number"){this.eagerRefreshThresholdMillis=dh.EXPIRATION_TIME_OFFSET}else{this.eagerRefreshThresholdMillis=n.eagerRefreshThresholdMillis}this.forceRefreshOnFailure=!!(n===null||n===void 0?void 0:n.forceRefreshOnFailure);this.quotaProjectId=i}setCredentials(t){if(!t.expiry_date){throw new Error("The access token expiry_date field is missing in the provided credentials.")}super.setCredentials(t);this.cachedDownscopedAccessToken=t}async getAccessToken(){if(!this.cachedDownscopedAccessToken||this.isExpired(this.cachedDownscopedAccessToken)){await this.refreshAccessTokenAsync()}return{token:this.cachedDownscopedAccessToken.access_token,expirationTime:this.cachedDownscopedAccessToken.expiry_date,res:this.cachedDownscopedAccessToken.res}}async getRequestHeaders(){const t=await this.getAccessToken();const r={Authorization:`Bearer ${t.token}`};return this.addSharedMetadataHeaders(r)}request(t,r){if(r){this.requestAsync(t).then(n=>r(null,n),n=>{return r(n,n.response)})}else{return this.requestAsync(t)}}async requestAsync(t,r=false){let n;try{const i=await this.getRequestHeaders();t.headers=t.headers||{};if(i&&i["x-goog-user-project"]){t.headers["x-goog-user-project"]=i["x-goog-user-project"]}if(i&&i.Authorization){t.headers.Authorization=i.Authorization}n=await this.transporter.request(t)}catch(i){const s=i.response;if(s){const o=s.status;const u=s.config.data instanceof dAn.Readable;const l=o===401||o===403;if(!r&&l&&!u&&this.forceRefreshOnFailure){await this.refreshAccessTokenAsync();return await this.requestAsync(t,true)}}throw i}return n}async refreshAccessTokenAsync(){var t;const r=(await this.authClient.getAccessToken()).token;const n={grantType:mAn,requestedTokenType:hAn,subjectToken:r,subjectTokenType:gAn};const i=await this.stsCredential.exchangeToken(n,void 0,this.credentialAccessBoundary);const s=((t=this.authClient.credentials)===null||t===void 0?void 0:t.expiry_date)||null;const o=i.expires_in?new Date().getTime()+i.expires_in*1e3:s;this.cachedDownscopedAccessToken={access_token:i.access_token,expiry_date:o,res:i.res};this.credentials={};Object.assign(this.credentials,this.cachedDownscopedAccessToken);delete this.credentials.res;this.emit("tokens",{refresh_token:null,expiry_date:this.cachedDownscopedAccessToken.expiry_date,access_token:this.cachedDownscopedAccessToken.access_token,token_type:"Bearer",id_token:null});return this.cachedDownscopedAccessToken}isExpired(t){const r=new Date().getTime();return t.expiry_date?r>=t.expiry_date-this.eagerRefreshThresholdMillis:false}};dh.DownscopedClient=Exe});var bxe=y(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:true});mn.GoogleAuth=mn.auth=mn.DefaultTransporter=mn.PluggableAuthClient=mn.DownscopedClient=mn.BaseExternalAccountClient=mn.ExternalAccountClient=mn.IdentityPoolClient=mn.AwsClient=mn.UserRefreshClient=mn.LoginTicket=mn.OAuth2Client=mn.CodeChallengeMethod=mn.Impersonated=mn.JWT=mn.JWTAccess=mn.IdTokenClient=mn.IAMAuth=mn.GCPEnv=mn.Compute=mn.AuthClient=void 0;var JCt=WCt();Object.defineProperty(mn,"GoogleAuth",{enumerable:true,get:function(){return JCt.GoogleAuth}});var _An=PO();Object.defineProperty(mn,"AuthClient",{enumerable:true,get:function(){return _An.AuthClient}});var vAn=Twe();Object.defineProperty(mn,"Compute",{enumerable:true,get:function(){return vAn.Compute}});var EAn=Owe();Object.defineProperty(mn,"GCPEnv",{enumerable:true,get:function(){return EAn.GCPEnv}});var bAn=YCt();Object.defineProperty(mn,"IAMAuth",{enumerable:true,get:function(){return bAn.IAMAuth}});var SAn=Rwe();Object.defineProperty(mn,"IdTokenClient",{enumerable:true,get:function(){return SAn.IdTokenClient}});var AAn=FTe();Object.defineProperty(mn,"JWTAccess",{enumerable:true,get:function(){return AAn.JWTAccess}});var CAn=MTe();Object.defineProperty(mn,"JWT",{enumerable:true,get:function(){return CAn.JWT}});var wAn=jTe();Object.defineProperty(mn,"Impersonated",{enumerable:true,get:function(){return wAn.Impersonated}});var QCt=HA();Object.defineProperty(mn,"CodeChallengeMethod",{enumerable:true,get:function(){return QCt.CodeChallengeMethod}});Object.defineProperty(mn,"OAuth2Client",{enumerable:true,get:function(){return QCt.OAuth2Client}});var TAn=Awe();Object.defineProperty(mn,"LoginTicket",{enumerable:true,get:function(){return TAn.LoginTicket}});var xAn=UTe();Object.defineProperty(mn,"UserRefreshClient",{enumerable:true,get:function(){return xAn.UserRefreshClient}});var RAn=nxe();Object.defineProperty(mn,"AwsClient",{enumerable:true,get:function(){return RAn.AwsClient}});var OAn=txe();Object.defineProperty(mn,"IdentityPoolClient",{enumerable:true,get:function(){return OAn.IdentityPoolClient}});var PAn=fxe();Object.defineProperty(mn,"ExternalAccountClient",{enumerable:true,get:function(){return PAn.ExternalAccountClient}});var NAn=qE();Object.defineProperty(mn,"BaseExternalAccountClient",{enumerable:true,get:function(){return NAn.BaseExternalAccountClient}});var IAn=XCt();Object.defineProperty(mn,"DownscopedClient",{enumerable:true,get:function(){return IAn.DownscopedClient}});var kAn=uJ();Object.defineProperty(mn,"PluggableAuthClient",{enumerable:true,get:function(){return kAn.PluggableAuthClient}});var DAn=iF();Object.defineProperty(mn,"DefaultTransporter",{enumerable:true,get:function(){return DAn.DefaultTransporter}});var LAn=new JCt.GoogleAuth;mn.auth=LAn});var tP=y(eP=>{"use strict";var FAn=eP&&eP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(eP,"__esModule",{value:true});eP.getServiceAccountIdToken=void 0;var BAn=bxe();var MAn=FAn(n0());var qAn=new BAn.GoogleAuth;var ZCt=new MAn.default({max:50,maxAge:1e3*60*50});async function UAn(e){let t=ZCt.get(e);if(!t){const r=await qAn.getIdTokenClient(e);t=await r.idTokenProvider.fetchIdToken(e);ZCt.set(e,t)}return t}a(UAn,"getServiceAccountIdToken");eP.getServiceAccountIdToken=UAn});var iwt=y(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:true});kf.mergeHeaders=kf.createFinalURL=kf.defaultBodySerializer=kf.defaultQuerySerializer=kf.createClient=void 0;var rP=ac();var $An=tP();var jAn={"Content-Type":"application/json"};var GAn=/\/*$/;async function HAn(e){const{baseUrl:t,fetch:r=globalThis.fetch,querySerializer:n,bodySerializer:i,zuploExtensions:s,...o}=e;const u=s?.fastifyRequest.log;const l=s?.fastifyRequest.id;const c=s?.options?.userSub??s?.fastifyRequest.getUserSub();const d=new Headers({...jAn,"zuplo-user":c,"zp-rid":l,...o.headers??{}});const p=await(0,$An.getServiceAccountIdToken)(t);d.set("Authorization",`Bearer ${p}`);async function f(m,h){const{headers:g,body:_,params:v={},parseAs:S="json",querySerializer:E=n??ewt,bodySerializer:b=i??twt,...A}=h||{};const C=rwt(m,{baseUrl:t,params:v,querySerializer:E});const T=nwt(d,g,v.header);const O={redirect:"follow",...o,...A,headers:T};if(_)O.body=b(_);if(O.body instanceof FormData)T.delete("Content-Type");const P=await r(C,O);if(P.status===404){const R=await P.json();if(R&&R.hasOwnProperty("type")&&R.hasOwnProperty("title")&&R.hasOwnProperty("status")){throw new rP.ApiError(R)}throw new rP.ApiError(rP.Problems.NOT_FOUND)}if(P.status===204||P.headers.get("Content-Length")==="0"){return P.ok?{data:{},response:P}:{error:{},response:P}}if(P.ok){let R=P.body;if(S!=="stream"){const I=P.clone();R=typeof I[S]==="function"?await I[S]():await I.text()}return{data:R,response:P}}else{u.debug(`Error on internal api: path: ${C}, status: ${P.status}, headers: ${JSON.stringify(P.headers)}, body: ${await P.clone().text()}`);let R={};try{R=await P.clone().json();if(R.type&&R.status&&R.title){throw new rP.ApiError(R)}}catch(I){}throw new rP.ApiError(rP.Problems.INTERNAL_SERVER_ERROR)}}a(f,"coreFetch");return{async GET(m,h){return f(m,{...h,method:"GET"})},async PUT(m,h){return f(m,{...h,method:"PUT"})},async POST(m,h){return f(m,{...h,method:"POST"})},async DELETE(m,h){return f(m,{...h,method:"DELETE"})},async OPTIONS(m,h){return f(m,{...h,method:"OPTIONS"})},async HEAD(m,h){return f(m,{...h,method:"HEAD"})},async PATCH(m,h){return f(m,{...h,method:"PATCH"})},async TRACE(m,h){return f(m,{...h,method:"TRACE"})}}}a(HAn,"createClient");kf.createClient=HAn;function ewt(e){const t=new URLSearchParams;if(e&&typeof e==="object"){for(const[r,n]of Object.entries(e)){if(n===void 0||n===null)continue;t.set(r,n)}}return t.toString()}a(ewt,"defaultQuerySerializer");kf.defaultQuerySerializer=ewt;function twt(e){return JSON.stringify(e)}a(twt,"defaultBodySerializer");kf.defaultBodySerializer=twt;function rwt(e,t){let r=`${t.baseUrl?t.baseUrl.replace(GAn,""):""}${e}`;if(t.params.path){for(const[n,i]of Object.entries(t.params.path))r=r.replace(`{${n}}`,encodeURIComponent(String(i)))}if(t.params.query){const n=t.querySerializer(t.params.query);if(n)r+=`?${n}`}return r}a(rwt,"createFinalURL");kf.createFinalURL=rwt;function nwt(...e){const t=new Headers;for(const r of e){if(!r||typeof r!=="object")continue;const n=r instanceof Headers?r.entries():Object.entries(r);for(const[i,s]of n){if(s!==void 0&&s!==null){t.set(i,s)}}}return t}a(nwt,"mergeHeaders");kf.mergeHeaders=nwt});var swt=y(UE=>{"use strict";var VAn=UE&&UE.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(UE,"__esModule",{value:true});UE.ApiKeyService=UE.createApiKeyServiceClient=void 0;var nP=ac();var zAn=bxe();var mJ=VAn(qp());var KAn=iwt();async function WAn(e){return(0,KAn.createClient)({baseUrl:mJ.default.API_KEY_MANAGEMENT_SERVICE_URL,zuploExtensions:{fastifyRequest:e}})}a(WAn,"createApiKeyServiceClient");UE.createApiKeyServiceClient=WAn;var Sxe=class{static{a(this,"ApiKeyService")}logger;requestId;constructor(t){this.logger=t.log;this.requestId=t.id}async fetchGCP(t,r={}){this.logger.info(`Fetching with GCP JWT ${r.method} ${t} from Api Key Service API.`);const n=new zAn.GoogleAuth;const i=await n.getIdTokenClient(mJ.default.API_KEY_MANAGEMENT_SERVICE_URL);this.logger.info(`Payload to send: ${JSON.stringify({url:`${mJ.default.API_KEY_MANAGEMENT_SERVICE_URL}/${t}`,method:"GET",body:r.body,headers:{...r.headers,...r.method!=="DELETE"&&{"content-type":"application/json"}}})}`);const s=await i.getRequestHeaders();const o=await i.request({url:`${mJ.default.API_KEY_MANAGEMENT_SERVICE_URL}/${t}`,method:r.method||"GET",body:r.body,headers:{...s,...r.headers,...r.method!=="DELETE"&&{"content-type":"application/json"}},validateStatus:u=>u>=200&&u<500});if(o.status===404){const u=await o.data;if(u&&u.hasOwnProperty("type")&&u.hasOwnProperty("title")&&u.hasOwnProperty("status")){throw new nP.ApiError(u)}throw new nP.ApiError(nP.Problems.NOT_FOUND)}if(o.status>=300){this.logger.debug(`Error on api-key-service: path: ${t}, status: ${o.status}, headers: ${JSON.stringify(o.headers)}, body: ${JSON.stringify(o.data)}`);const u=o.data;if(u.type&&u.status&&u.title){throw new nP.ApiError(u)}this.logger.error(`Error not handled on api-key-service: path: ${t}, status: ${o.status}`);throw new nP.ApiError(nP.Problems.INTERNAL_SERVER_ERROR)}if(o.status===204){return{}}return o.data}};UE.ApiKeyService=Sxe});var owt=y(iP=>{"use strict";var YAn=iP&&iP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(iP,"__esModule",{value:true});iP.AuthApiService=void 0;var tC=ac();var awt=YAn(qp());var XAn=tP();var Axe=class{static{a(this,"AuthApiService")}logger;requestId;baseUrl;constructor(t){this.logger=t.log;this.requestId=t.id;if(!awt.default.AUTH_API_URL){throw new Error("AUTH_API_URL is not set")}this.baseUrl=awt.default.AUTH_API_URL}async getClientJWT(t,r){let n;try{n=await this.fetch(`/v1/clients/${t}`,{method:"GET"})}catch(s){if(s.status===tC.Problems.NOT_FOUND.status){n=await this.fetch(`/v1/clients`,{method:"POST",body:JSON.stringify({client_id:t})})}else{throw s}}const i=await this.fetch(`/v1/oauth/token`,{method:"POST",body:JSON.stringify({client_id:t,client_secret:n.client_secret,grant_type:"client_credentials",custom_claims:r})});return i.access_token}async fetch(t,r){this.logger.info(`Fetching internally ${t} from Auth API V2.`);const n=new Headers({"content-type":"application/json","zp-rid":this.requestId,authorization:""});if(process.env.K_SERVICE){const s=await(0,XAn.getServiceAccountIdToken)(this.baseUrl);n.set("Authorization",`Bearer ${s}`)}const i=await fetch(`${this.baseUrl}${t}`,{...r,headers:n});if(i.status===tC.HttpStatusCode.NOT_FOUND){throw new tC.ApiError(tC.Problems.NOT_FOUND)}if(!i.ok){this.logger.debug(`Error on auth-api: path: ${t}, status: ${i.status}`);const s=await i.clone().json();if(s.type&&s.status&&s.title){throw new tC.ApiError(s)}this.logger.error(`Error not handled on auth-api: path: ${t}, status: ${i.status}`);throw new tC.ApiError(tC.Problems.INTERNAL_SERVER_ERROR)}return i.clone().json()}};iP.AuthApiService=Axe});var gJ=y(hJ=>{"use strict";Object.defineProperty(hJ,"__esModule",{value:true});hJ.ApiServiceClient=void 0;var sP=ac();var JAn=tP();var Cxe=class{static{a(this,"ApiServiceClient")}userSub;logger;requestId;baseUrl;cache;constructor(t,r,n){this.userSub=n.userSub;this.logger=n.logger;this.requestId=n.requestId;this.baseUrl=t;this.cache=r}async cachedFetch(t,r,n){if(!this.userSub||!n){throw new Error("userSub and cacheKey parameters are required to use cachedFetch")}const i=`${this.userSub}@${n}`;if(this.cache.has(i)){return this.cache.get(i)}const s=await this.fetchInternally(t,r);this.cache.set(i,s);return s}async fetchInternally(t,r){this.logger.info(`Fetching internally ${r.method} ${this.baseUrl}${t}`);const n=new Headers({...r.headers,"zuplo-user":this.userSub,"content-type":"application/json","zp-rid":this.requestId});if(process.env.K_SERVICE){const s=await(0,JAn.getServiceAccountIdToken)(this.baseUrl);n.set("Authorization",`Bearer ${s}`)}const i=await fetch(`${this.baseUrl}${t}`,{...r,headers:n});if(i.status===404){const s=await i.json();if(s&&s.hasOwnProperty("type")&&s.hasOwnProperty("title")&&s.hasOwnProperty("status")){throw new sP.ApiError(s)}throw new sP.ApiError(sP.Problems.NOT_FOUND)}if(!i.ok){this.logger.debug(`Error on internal api: path: ${t}, status: ${i.status}, headers: ${JSON.stringify(i.headers)}, body: ${JSON.stringify(i.clone().text())}`);const s=await i.clone().json();if(s.type&&s.status&&s.title){throw new sP.ApiError(s)}this.logger.error(`Error not handled on internal api: path: ${t}, status: ${i.status}`);throw new sP.ApiError(sP.Problems.INTERNAL_SERVER_ERROR)}if(i.status===204){return{}}return i.clone().json()}};hJ.ApiServiceClient=Cxe});var dwt=y(rg=>{"use strict";var lwt=rg&&rg.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(rg,"__esModule",{value:true});rg.ContentApiService=rg.getContentApiStorageTarballPath=rg.contentApiTarballFileName=void 0;var QAn=lwt(n0());var uwt=lwt(qp());var ZAn=gJ();var eCn=new QAn.default({max:500,maxAge:1e3*60*50});function cwt(e,t){return`${e}--${t}.tar.gz`}a(cwt,"contentApiTarballFileName");rg.contentApiTarballFileName=cwt;function tCn(e,t){const r=cwt(e,t);return`${e}/builds/${r}`}a(tCn,"getContentApiStorageTarballPath");rg.getContentApiStorageTarballPath=tCn;var wxe=class extends ZAn.ApiServiceClient{static{a(this,"ContentApiService")}constructor(t){if(!uwt.default.CONTENT_API_URL){throw new Error("CONTENT_API_URL is not set")}super(uwt.default.CONTENT_API_URL,eCn,t)}};rg.ContentApiService=wxe});var mwt=y(aP=>{"use strict";var fwt=aP&&aP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(aP,"__esModule",{value:true});aP.DevApiService=void 0;var rCn=fwt(n0());var pwt=fwt(qp());var nCn=gJ();var iCn=new rCn.default({max:500,maxAge:1e3*60*50});var Txe=class extends nCn.ApiServiceClient{static{a(this,"DevApiService")}constructor(t,r){if(!pwt.default.DEV_API_URL){throw new Error("DEV_API_URL is not set")}const n=r&&r.userSub?r.userSub:t.getUserSub();super(pwt.default.DEV_API_URL,iCn,{userSub:n,logger:t.log,requestId:t.id})}};aP.DevApiService=Txe});var ywt=y((_6s,gwt)=>{var hwt=require("stream").Stream;var sCn=require("util");gwt.exports=ph;function ph(){this.source=null;this.dataSize=0;this.maxDataSize=1024*1024;this.pauseStream=true;this._maxDataSizeExceeded=false;this._released=false;this._bufferedEvents=[]}a(ph,"DelayedStream");sCn.inherits(ph,hwt);ph.create=function(e,t){var r=new this;t=t||{};for(var n in t){r[n]=t[n]}r.source=e;var i=e.emit;e.emit=function(){r._handleEmit(arguments);return i.apply(e,arguments)};e.on("error",function(){});if(r.pauseStream){e.pause()}return r};Object.defineProperty(ph.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});ph.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ph.prototype.resume=function(){if(!this._released){this.release()}this.source.resume()};ph.prototype.pause=function(){this.source.pause()};ph.prototype.release=function(){this._released=true;this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this));this._bufferedEvents=[]};ph.prototype.pipe=function(){var e=hwt.prototype.pipe.apply(this,arguments);this.resume();return e};ph.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}if(e[0]==="data"){this.dataSize+=e[1].length;this._checkIfMaxDataSizeExceeded()}this._bufferedEvents.push(e)};ph.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded){return}if(this.dataSize<=this.maxDataSize){return}this._maxDataSizeExceeded=true;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}});var bwt=y((E6s,Ewt)=>{var aCn=require("util");var vwt=require("stream").Stream;var _wt=ywt();Ewt.exports=ao;function ao(){this.writable=false;this.readable=true;this.dataSize=0;this.maxDataSize=2*1024*1024;this.pauseStreams=true;this._released=false;this._streams=[];this._currentStream=null;this._insideLoop=false;this._pendingNext=false}a(ao,"CombinedStream");aCn.inherits(ao,vwt);ao.create=function(e){var t=new this;e=e||{};for(var r in e){t[r]=e[r]}return t};ao.isStreamLike=function(e){return typeof e!=="function"&&typeof e!=="string"&&typeof e!=="boolean"&&typeof e!=="number"&&!Buffer.isBuffer(e)};ao.prototype.append=function(e){var t=ao.isStreamLike(e);if(t){if(!(e instanceof _wt)){var r=_wt.create(e,{maxDataSize:Infinity,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this));e=r}this._handleErrors(e);if(this.pauseStreams){e.pause()}}this._streams.push(e);return this};ao.prototype.pipe=function(e,t){vwt.prototype.pipe.call(this,e,t);this.resume();return e};ao.prototype._getNext=function(){this._currentStream=null;if(this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do{this._pendingNext=false;this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=false}};ao.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e=="undefined"){this.end();return}if(typeof e!=="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=ao.isStreamLike(r);if(n){r.on("data",this._checkDataSize.bind(this));this._handleErrors(r)}this._pipeNext(r)}.bind(this))};ao.prototype._pipeNext=function(e){this._currentStream=e;var t=ao.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this));e.pipe(this,{end:false});return}var r=e;this.write(r);this._getNext()};ao.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};ao.prototype.write=function(e){this.emit("data",e)};ao.prototype.pause=function(){if(!this.pauseStreams){return}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};ao.prototype.resume=function(){if(!this._released){this._released=true;this.writable=true;this._getNext()}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function")this._currentStream.resume();this.emit("resume")};ao.prototype.end=function(){this._reset();this.emit("end")};ao.prototype.destroy=function(){this._reset();this.emit("close")};ao.prototype._reset=function(){this.writable=false;this._streams=[];this._currentStream=null};ao.prototype._checkDataSize=function(){this._updateDataSize();if(this.dataSize<=this.maxDataSize){return}var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))};ao.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){if(!t.dataSize){return}e.dataSize+=t.dataSize});if(this._currentStream&&this._currentStream.dataSize){this.dataSize+=this._currentStream.dataSize}};ao.prototype._emitError=function(e){this._reset();this.emit("error",e)}});var Awt=y((S6s,Swt)=>{Swt.exports=oCn;function oCn(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(t){t(e)}else{setTimeout(e,0)}}a(oCn,"defer")});var xxe=y((C6s,wwt)=>{var Cwt=Awt();wwt.exports=uCn;function uCn(e){var t=false;Cwt(function(){t=true});return a(function r(n,i){if(t){e(n,i)}else{Cwt(a(function s(){e(n,i)},"nextTick_callback"))}},"async_callback")}a(uCn,"async")});var Rxe=y((T6s,Twt)=>{Twt.exports=lCn;function lCn(e){Object.keys(e.jobs).forEach(cCn.bind(e));e.jobs={}}a(lCn,"abort");function cCn(e){if(typeof this.jobs[e]=="function"){this.jobs[e]()}}a(cCn,"clean")});var Oxe=y((R6s,Rwt)=>{var xwt=xxe();var dCn=Rxe();Rwt.exports=pCn;function pCn(e,t,r,n){var i=r["keyedList"]?r["keyedList"][r.index]:r.index;r.jobs[i]=fCn(t,i,e[i],function(s,o){if(!(i in r.jobs)){return}delete r.jobs[i];if(s){dCn(r)}else{r.results[i]=o}n(s,r.results)})}a(pCn,"iterate");function fCn(e,t,r,n){var i;if(e.length==2){i=e(r,xwt(n))}else{i=e(r,t,xwt(n))}return i}a(fCn,"runJob")});var Pxe=y((P6s,Owt)=>{Owt.exports=mCn;function mCn(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};if(t){n.keyedList.sort(r?t:function(i,s){return t(e[i],e[s])})}return n}a(mCn,"state")});var Nxe=y((I6s,Pwt)=>{var hCn=Rxe();var gCn=xxe();Pwt.exports=yCn;function yCn(e){if(!Object.keys(this.jobs).length){return}this.index=this.size;hCn(this);gCn(e)(null,this.results)}a(yCn,"terminator")});var Iwt=y((D6s,Nwt)=>{var _Cn=Oxe();var vCn=Pxe();var ECn=Nxe();Nwt.exports=bCn;function bCn(e,t,r){var n=vCn(e);while(n.index<(n["keyedList"]||e).length){_Cn(e,t,n,function(i,s){if(i){r(i,s);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}});n.index++}return ECn.bind(n,r)}a(bCn,"parallel")});var Ixe=y((F6s,yJ)=>{var kwt=Oxe();var SCn=Pxe();var ACn=Nxe();yJ.exports=CCn;yJ.exports.ascending=Dwt;yJ.exports.descending=wCn;function CCn(e,t,r,n){var i=SCn(e,r);kwt(e,t,i,a(function s(o,u){if(o){n(o,u);return}i.index++;if(i.index<(i["keyedList"]||e).length){kwt(e,t,i,s);return}n(null,i.results)},"iteratorHandler"));return ACn.bind(i,n)}a(CCn,"serialOrdered");function Dwt(e,t){return e<t?-1:e>t?1:0}a(Dwt,"ascending");function wCn(e,t){return-1*Dwt(e,t)}a(wCn,"descending")});var Fwt=y((M6s,Lwt)=>{var TCn=Ixe();Lwt.exports=xCn;function xCn(e,t,r){return TCn(e,t,null,r)}a(xCn,"serial")});var Mwt=y((U6s,Bwt)=>{Bwt.exports={parallel:Iwt(),serial:Fwt(),serialOrdered:Ixe()}});var Uwt=y(($6s,qwt)=>{qwt.exports=function(e,t){Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]});return e}});var Gwt=y((j6s,jwt)=>{var Fxe=bwt();var $wt=require("util");var kxe=require("path");var RCn=require("http");var OCn=require("https");var PCn=require("url").parse;var NCn=require("fs");var ICn=require("stream").Stream;var Dxe=hSe();var kCn=Mwt();var Lxe=Uwt();jwt.exports=es;$wt.inherits(es,Fxe);function es(e){if(!(this instanceof es)){return new es(e)}this._overheadLength=0;this._valueLength=0;this._valuesToMeasure=[];Fxe.call(this);e=e||{};for(var t in e){this[t]=e[t]}}a(es,"FormData");es.LINE_BREAK="\r\n";es.DEFAULT_CONTENT_TYPE="application/octet-stream";es.prototype.append=function(e,t,r){r=r||{};if(typeof r=="string"){r={filename:r}}var n=Fxe.prototype.append.bind(this);if(typeof t=="number"){t=""+t}if($wt.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(e,t,r);var s=this._multiPartFooter();n(i);n(t);n(s);this._trackLength(i,t,r)};es.prototype._trackLength=function(e,t,r){var n=0;if(r.knownLength!=null){n+=+r.knownLength}else if(Buffer.isBuffer(t)){n=t.length}else if(typeof t==="string"){n=Buffer.byteLength(t)}this._valueLength+=n;this._overheadLength+=Buffer.byteLength(e)+es.LINE_BREAK.length;if(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof ICn)){return}if(!r.knownLength){this._valuesToMeasure.push(t)}};es.prototype._lengthRetriever=function(e,t){if(e.hasOwnProperty("fd")){if(e.end!=void 0&&e.end!=Infinity&&e.start!=void 0){t(null,e.end+1-(e.start?e.start:0))}else{NCn.stat(e.path,function(r,n){var i;if(r){t(r);return}i=n.size-(e.start?e.start:0);t(null,i)})}}else if(e.hasOwnProperty("httpVersion")){t(null,+e.headers["content-length"])}else if(e.hasOwnProperty("httpModule")){e.on("response",function(r){e.pause();t(null,+r.headers["content-length"])});e.resume()}else{t("Unknown stream")}};es.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string"){return r.header}var n=this._getContentDisposition(t,r);var i=this._getContentType(t,r);var s="";var o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};if(typeof r.header=="object"){Lxe(o,r.header)}var u;for(var l in o){if(!o.hasOwnProperty(l))continue;u=o[l];if(u==null){continue}if(!Array.isArray(u)){u=[u]}if(u.length){s+=l+": "+u.join("; ")+es.LINE_BREAK}}return"--"+this.getBoundary()+es.LINE_BREAK+s+es.LINE_BREAK};es.prototype._getContentDisposition=function(e,t){var r,n;if(typeof t.filepath==="string"){r=kxe.normalize(t.filepath).replace(/\\/g,"/")}else if(t.filename||e.name||e.path){r=kxe.basename(t.filename||e.name||e.path)}else if(e.readable&&e.hasOwnProperty("httpVersion")){r=kxe.basename(e.client._httpMessage.path||"")}if(r){n='filename="'+r+'"'}return n};es.prototype._getContentType=function(e,t){var r=t.contentType;if(!r&&e.name){r=Dxe.lookup(e.name)}if(!r&&e.path){r=Dxe.lookup(e.path)}if(!r&&e.readable&&e.hasOwnProperty("httpVersion")){r=e.headers["content-type"]}if(!r&&(t.filepath||t.filename)){r=Dxe.lookup(t.filepath||t.filename)}if(!r&&typeof e=="object"){r=es.DEFAULT_CONTENT_TYPE}return r};es.prototype._multiPartFooter=function(){return function(e){var t=es.LINE_BREAK;var r=this._streams.length===0;if(r){t+=this._lastBoundary()}e(t)}.bind(this)};es.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+es.LINE_BREAK};es.prototype.getHeaders=function(e){var t;var r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e){if(e.hasOwnProperty(t)){r[t.toLowerCase()]=e[t]}}return r};es.prototype.setBoundary=function(e){this._boundary=e};es.prototype.getBoundary=function(){if(!this._boundary){this._generateBoundary()}return this._boundary};es.prototype.getBuffer=function(){var e=new Buffer.alloc(0);var t=this.getBoundary();for(var r=0,n=this._streams.length;r<n;r++){if(typeof this._streams[r]!=="function"){if(Buffer.isBuffer(this._streams[r])){e=Buffer.concat([e,this._streams[r]])}else{e=Buffer.concat([e,Buffer.from(this._streams[r])])}if(typeof this._streams[r]!=="string"||this._streams[r].substring(2,t.length+2)!==t){e=Buffer.concat([e,Buffer.from(es.LINE_BREAK)])}}}return Buffer.concat([e,Buffer.from(this._lastBoundary())])};es.prototype._generateBoundary=function(){var e="--------------------------";for(var t=0;t<24;t++){e+=Math.floor(Math.random()*10).toString(16)}this._boundary=e};es.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;if(this._streams.length){e+=this._lastBoundary().length}if(!this.hasKnownLength()){this._error(new Error("Cannot calculate proper length in synchronous way."))}return e};es.prototype.hasKnownLength=function(){var e=true;if(this._valuesToMeasure.length){e=false}return e};es.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length){t+=this._lastBoundary().length}if(!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}kCn.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(i){t+=i});e(null,t)})};es.prototype.submit=function(e,t){var r,n,i={method:"post"};if(typeof e=="string"){e=PCn(e);n=Lxe({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)}else{n=Lxe(e,i);if(!n.port){n.port=n.protocol=="https:"?443:80}}n.headers=this.getHeaders(e.headers);if(n.protocol=="https:"){r=OCn.request(n)}else{r=RCn.request(n)}this.getLength(function(s,o){if(s&&s!=="Unknown stream"){this._error(s);return}if(o){r.setHeader("Content-Length",o)}this.pipe(r);if(t){var u;var l=a(function(c,d){r.removeListener("error",l);r.removeListener("response",u);return t.call(this,c,d)},"callback");u=l.bind(this,null);r.on("error",l);r.on("response",u)}}.bind(this));return r};es.prototype._error=function(e){if(!this.error){this.error=e;this.pause();this.emit("error",e)}};es.prototype.toString=function(){return"[object FormData]"}});var Vwt=y(Hwt=>{"use strict";var DCn=require("url").parse;var LCn={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};var FCn=String.prototype.endsWith||function(e){return e.length<=this.length&&this.indexOf(e,this.length-e.length)!==-1};function BCn(e){var t=typeof e==="string"?DCn(e):e||{};var r=t.protocol;var n=t.host;var i=t.port;if(typeof n!=="string"||!n||typeof r!=="string"){return""}r=r.split(":",1)[0];n=n.replace(/:\d*$/,"");i=parseInt(i)||LCn[r]||0;if(!MCn(n,i)){return""}var s=oP("npm_config_"+r+"_proxy")||oP(r+"_proxy")||oP("npm_config_proxy")||oP("all_proxy");if(s&&s.indexOf("://")===-1){s=r+"://"+s}return s}a(BCn,"getProxyForUrl");function MCn(e,t){var r=(oP("npm_config_no_proxy")||oP("no_proxy")).toLowerCase();if(!r){return true}if(r==="*"){return false}return r.split(/[,\s]/).every(function(n){if(!n){return true}var i=n.match(/^(.+):(\d+)$/);var s=i?i[1]:n;var o=i?parseInt(i[2]):0;if(o&&o!==t){return true}if(!/^[.*]/.test(s)){return e!==s}if(s.charAt(0)==="*"){s=s.slice(1)}return!FCn.call(e,s)})}a(MCn,"shouldProxy");function oP(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}a(oP,"getEnv");Hwt.getProxyForUrl=BCn});var Kwt=y((z6s,zwt)=>{var TF;zwt.exports=function(){if(!TF){try{TF=Wc()("follow-redirects")}catch(e){}if(typeof TF!=="function"){TF=a(function(){},"debug")}}TF.apply(null,arguments)}});var Qwt=y((W6s,Wxe)=>{var OF=require("url");var xF=OF.URL;var qCn=require("http");var UCn=require("https");var $xe=require("stream").Writable;var jxe=require("assert");var Wwt=Kwt();var Gxe=false;try{jxe(new xF)}catch(e){Gxe=e.code==="ERR_INVALID_URL"}var $Cn=["auth","host","hostname","href","path","pathname","port","protocol","query","search"];var Hxe=["abort","aborted","connect","error","socket","timeout"];var Vxe=Object.create(null);Hxe.forEach(function(e){Vxe[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var Mxe=PF("ERR_INVALID_URL","Invalid URL",TypeError);var qxe=PF("ERR_FR_REDIRECTION_FAILURE","Redirected request failed");var jCn=PF("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",qxe);var GCn=PF("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit");var HCn=PF("ERR_STREAM_WRITE_AFTER_END","write after end");var VCn=$xe.prototype.destroy||Xwt;function _d(e,t){$xe.call(this);this._sanitizeOptions(e);this._options=e;this._ended=false;this._ending=false;this._redirectCount=0;this._redirects=[];this._requestBodyLength=0;this._requestBodyBuffers=[];if(t){this.on("response",t)}var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(i){r.emit("error",i instanceof qxe?i:new qxe({cause:i}))}};this._performRequest()}a(_d,"RedirectableRequest");_d.prototype=Object.create($xe.prototype);_d.prototype.abort=function(){Kxe(this._currentRequest);this._currentRequest.abort();this.emit("abort")};_d.prototype.destroy=function(e){Kxe(this._currentRequest,e);VCn.call(this,e);return this};_d.prototype.write=function(e,t,r){if(this._ending){throw new HCn}if(!rC(e)&&!WCn(e)){throw new TypeError("data should be a string, Buffer or Uint8Array")}if(RF(t)){r=t;t=null}if(e.length===0){if(r){r()}return}if(this._requestBodyLength+e.length<=this._options.maxBodyLength){this._requestBodyLength+=e.length;this._requestBodyBuffers.push({data:e,encoding:t});this._currentRequest.write(e,t,r)}else{this.emit("error",new GCn);this.abort()}};_d.prototype.end=function(e,t,r){if(RF(e)){r=e;e=t=null}else if(RF(t)){r=t;t=null}if(!e){this._ended=this._ending=true;this._currentRequest.end(null,null,r)}else{var n=this;var i=this._currentRequest;this.write(e,t,function(){n._ended=true;i.end(null,null,r)});this._ending=true}};_d.prototype.setHeader=function(e,t){this._options.headers[e]=t;this._currentRequest.setHeader(e,t)};_d.prototype.removeHeader=function(e){delete this._options.headers[e];this._currentRequest.removeHeader(e)};_d.prototype.setTimeout=function(e,t){var r=this;function n(o){o.setTimeout(e);o.removeListener("timeout",o.destroy);o.addListener("timeout",o.destroy)}a(n,"destroyOnTimeout");function i(o){if(r._timeout){clearTimeout(r._timeout)}r._timeout=setTimeout(function(){r.emit("timeout");s()},e);n(o)}a(i,"startTimer");function s(){if(r._timeout){clearTimeout(r._timeout);r._timeout=null}r.removeListener("abort",s);r.removeListener("error",s);r.removeListener("response",s);r.removeListener("close",s);if(t){r.removeListener("timeout",t)}if(!r.socket){r._currentRequest.removeListener("socket",i)}}a(s,"clearTimer");if(t){this.on("timeout",t)}if(this.socket){i(this.socket)}else{this._currentRequest.once("socket",i)}this.on("socket",n);this.on("abort",s);this.on("error",s);this.on("response",s);this.on("close",s);return this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){_d.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(_d.prototype,e,{get:function(){return this._currentRequest[e]}})});_d.prototype._sanitizeOptions=function(e){if(!e.headers){e.headers={}}if(e.host){if(!e.hostname){e.hostname=e.host}delete e.host}if(!e.pathname&&e.path){var t=e.path.indexOf("?");if(t<0){e.pathname=e.path}else{e.pathname=e.path.substring(0,t);e.search=e.path.substring(t)}}};_d.prototype._performRequest=function(){var e=this._options.protocol;var t=this._options.nativeProtocols[e];if(!t){throw new TypeError("Unsupported protocol "+e)}if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var i of Hxe){n.on(i,Vxe[i])}this._currentUrl=/^\//.test(this._options.path)?OF.format(this._options):this._options.path;if(this._isRedirect){var s=0;var o=this;var u=this._requestBodyBuffers;a(function l(c){if(n===o._currentRequest){if(c){o.emit("error",c)}else if(s<u.length){var d=u[s++];if(!n.finished){n.write(d.data,d.encoding,l)}}else if(o._ended){n.end()}}},"writeNext")()}};_d.prototype._processResponse=function(e){var t=e.statusCode;if(this._options.trackRedirects){this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t})}var r=e.headers.location;if(!r||this._options.followRedirects===false||t<300||t>=400){e.responseUrl=this._currentUrl;e.redirects=this._redirects;this.emit("response",e);this._requestBodyBuffers=[];return}Kxe(this._currentRequest);e.destroy();if(++this._redirectCount>this._options.maxRedirects){throw new jCn}var n;var i=this._options.beforeRedirect;if(i){n=Object.assign({Host:e.req.getHeader("host")},this._options.headers)}var s=this._options.method;if((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method)){this._options.method="GET";this._requestBodyBuffers=[];Bxe(/^content-/i,this._options.headers)}var o=Bxe(/^host$/i,this._options.headers);var u=zxe(this._currentUrl);var l=o||u.host;var c=/^\w+:/.test(r)?this._currentUrl:OF.format(Object.assign(u,{host:l}));var d=zCn(r,c);Wwt("redirecting to",d.href);this._isRedirect=true;Uxe(d,this._options);if(d.protocol!==u.protocol&&d.protocol!=="https:"||d.host!==l&&!KCn(d.host,l)){Bxe(/^(?:authorization|cookie)$/i,this._options.headers)}if(RF(i)){var p={headers:e.headers,statusCode:t};var f={url:c,method:s,headers:n};i(this._options,p,f);this._sanitizeOptions(this._options)}this._performRequest()};function Ywt(e){var t={maxRedirects:21,maxBodyLength:10*1024*1024};var r={};Object.keys(e).forEach(function(n){var i=n+":";var s=r[i]=e[n];var o=t[n]=Object.create(s);function u(c,d,p){if(YCn(c)){c=Uxe(c)}else if(rC(c)){c=Uxe(zxe(c))}else{p=d;d=Jwt(c);c={protocol:i}}if(RF(d)){p=d;d=null}d=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},c,d);d.nativeProtocols=r;if(!rC(d.host)&&!rC(d.hostname)){d.hostname="::1"}jxe.equal(d.protocol,i,"protocol mismatch");Wwt("options",d);return new _d(d,p)}a(u,"request");function l(c,d,p){var f=o.request(c,d,p);f.end();return f}a(l,"get");Object.defineProperties(o,{request:{value:u,configurable:true,enumerable:true,writable:true},get:{value:l,configurable:true,enumerable:true,writable:true}})});return t}a(Ywt,"wrap");function Xwt(){}a(Xwt,"noop");function zxe(e){var t;if(Gxe){t=new xF(e)}else{t=Jwt(OF.parse(e));if(!rC(t.protocol)){throw new Mxe({input:e})}}return t}a(zxe,"parseUrl");function zCn(e,t){return Gxe?new xF(e,t):zxe(OF.resolve(t,e))}a(zCn,"resolveUrl");function Jwt(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname)){throw new Mxe({input:e.href||e})}if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host)){throw new Mxe({input:e.href||e})}return e}a(Jwt,"validateUrl");function Uxe(e,t){var r=t||{};for(var n of $Cn){r[n]=e[n]}if(r.hostname.startsWith("[")){r.hostname=r.hostname.slice(1,-1)}if(r.port!==""){r.port=Number(r.port)}r.path=r.search?r.pathname+r.search:r.pathname;return r}a(Uxe,"spreadUrlObject");function Bxe(e,t){var r;for(var n in t){if(e.test(n)){r=t[n];delete t[n]}}return r===null||typeof r==="undefined"?void 0:String(r).trim()}a(Bxe,"removeMatchingHeaders");function PF(e,t,r){function n(i){Error.captureStackTrace(this,this.constructor);Object.assign(this,i||{});this.code=e;this.message=this.cause?t+": "+this.cause.message:t}a(n,"CustomError");n.prototype=new(r||Error);Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:false},name:{value:"Error ["+e+"]",enumerable:false}});return n}a(PF,"createErrorType");function Kxe(e,t){for(var r of Hxe){e.removeListener(r,Vxe[r])}e.on("error",Xwt);e.destroy(t)}a(Kxe,"destroyRequest");function KCn(e,t){jxe(rC(e)&&rC(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}a(KCn,"isSubdomain");function rC(e){return typeof e==="string"||e instanceof String}a(rC,"isString");function RF(e){return typeof e==="function"}a(RF,"isFunction");function WCn(e){return typeof e==="object"&&"length"in e}a(WCn,"isBuffer");function YCn(e){return xF&&e instanceof xF}a(YCn,"isURL");Wxe.exports=Ywt({http:qCn,https:UCn});Wxe.exports.wrap=Ywt});var xJ=y((X6s,$Tt)=>{"use strict";var XCn=Gwt();var JCn=require("url");var QCn=Vwt();var ZCn=require("http");var ewn=require("https");var gTt=require("util");var twn=Qwt();var rwn=require("zlib");var yTt=require("stream");var nwn=require("events");function Ty(e){return e&&typeof e==="object"&&"default"in e?e:{"default":e}}a(Ty,"_interopDefaultLegacy");var _Tt=Ty(XCn);var iwn=Ty(JCn);var swn=Ty(ZCn);var awn=Ty(ewn);var own=Ty(gTt);var uwn=Ty(twn);var HE=Ty(rwn);var jE=Ty(yTt);var lwn=Ty(nwn);function vTt(e,t){return a(function r(){return e.apply(t,arguments)},"wrap")}a(vTt,"bind");var{toString:cwn}=Object.prototype;var{getPrototypeOf:lRe}=Object;var AJ=(e=>t=>{const r=cwn.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null));var ng=a(e=>{e=e.toLowerCase();return t=>AJ(t)===e},"kindOfTest");var CJ=a(e=>t=>typeof t===e,"typeOfTest");var{isArray:dP}=Array;var kF=CJ("undefined");function dwn(e){return e!==null&&!kF(e)&&e.constructor!==null&&!kF(e.constructor)&&Lf(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}a(dwn,"isBuffer");var ETt=ng("ArrayBuffer");function pwn(e){let t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&ETt(e.buffer)}return t}a(pwn,"isArrayBufferView");var fwn=CJ("string");var Lf=CJ("function");var bTt=CJ("number");var wJ=a(e=>e!==null&&typeof e==="object","isObject");var mwn=a(e=>e===true||e===false,"isBoolean");var vJ=a(e=>{if(AJ(e)!=="object"){return false}const t=lRe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},"isPlainObject");var hwn=ng("Date");var gwn=ng("File");var ywn=ng("Blob");var _wn=ng("FileList");var vwn=a(e=>wJ(e)&&Lf(e.pipe),"isStream");var Ewn=a(e=>{let t;return e&&(typeof FormData==="function"&&e instanceof FormData||Lf(e.append)&&((t=AJ(e))==="formdata"||t==="object"&&Lf(e.toString)&&e.toString()==="[object FormData]"))},"isFormData");var bwn=ng("URLSearchParams");var Swn=a(e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function LF(e,t,{allOwnKeys:r=false}={}){if(e===null||typeof e==="undefined"){return}let n;let i;if(typeof e!=="object"){e=[e]}if(dP(e)){for(n=0,i=e.length;n<i;n++){t.call(null,e[n],n,e)}}else{const s=r?Object.getOwnPropertyNames(e):Object.keys(e);const o=s.length;let u;for(n=0;n<o;n++){u=s[n];t.call(null,e[u],u,e)}}}a(LF,"forEach");function STt(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length;let i;while(n-- >0){i=r[n];if(t===i.toLowerCase()){return i}}return null}a(STt,"findKey");var ATt=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})();var CTt=a(e=>!kF(e)&&e!==ATt,"isContextDefined");function Zxe(){const{caseless:e}=CTt(this)&&this||{};const t={};const r=a((n,i)=>{const s=e&&STt(t,i)||i;if(vJ(t[s])&&vJ(n)){t[s]=Zxe(t[s],n)}else if(vJ(n)){t[s]=Zxe({},n)}else if(dP(n)){t[s]=n.slice()}else{t[s]=n}},"assignValue");for(let n=0,i=arguments.length;n<i;n++){arguments[n]&&LF(arguments[n],r)}return t}a(Zxe,"merge");var Awn=a((e,t,r,{allOwnKeys:n}={})=>{LF(t,(i,s)=>{if(r&&Lf(i)){e[s]=vTt(i,r)}else{e[s]=i}},{allOwnKeys:n});return e},"extend");var Cwn=a(e=>{if(e.charCodeAt(0)===65279){e=e.slice(1)}return e},"stripBOM");var wwn=a((e,t,r,n)=>{e.prototype=Object.create(t.prototype,n);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});r&&Object.assign(e.prototype,r)},"inherits");var Twn=a((e,t,r,n)=>{let i;let s;let o;const u={};t=t||{};if(e==null)return t;do{i=Object.getOwnPropertyNames(e);s=i.length;while(s-- >0){o=i[s];if((!n||n(o,e,t))&&!u[o]){t[o]=e[o];u[o]=true}}e=r!==false&&lRe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},"toFlatObject");var xwn=a((e,t,r)=>{e=String(e);if(r===void 0||r>e.length){r=e.length}r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},"endsWith");var Rwn=a(e=>{if(!e)return null;if(dP(e))return e;let t=e.length;if(!bTt(t))return null;const r=new Array(t);while(t-- >0){r[t]=e[t]}return r},"toArray");var Own=(e=>{return t=>{return e&&t instanceof e}})(typeof Uint8Array!=="undefined"&&lRe(Uint8Array));var Pwn=a((e,t)=>{const r=e&&e[Symbol.iterator];const n=r.call(e);let i;while((i=n.next())&&!i.done){const s=i.value;t.call(e,s[0],s[1])}},"forEachEntry");var Nwn=a((e,t)=>{let r;const n=[];while((r=e.exec(t))!==null){n.push(r)}return n},"matchAll");var Iwn=ng("HTMLFormElement");var kwn=a(e=>{return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,a(function t(r,n,i){return n.toUpperCase()+i},"replacer"))},"toCamelCase");var Zwt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype);var Dwn=ng("RegExp");var wTt=a((e,t)=>{const r=Object.getOwnPropertyDescriptors(e);const n={};LF(r,(i,s)=>{let o;if((o=t(i,s,e))!==false){n[s]=o||i}});Object.defineProperties(e,n)},"reduceDescriptors");var Lwn=a(e=>{wTt(e,(t,r)=>{if(Lf(e)&&["arguments","caller","callee"].indexOf(r)!==-1){return false}const n=e[r];if(!Lf(n))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}}})},"freezeMethods");var Fwn=a((e,t)=>{const r={};const n=a(i=>{i.forEach(s=>{r[s]=true})},"define");dP(e)?n(e):n(String(e).split(t));return r},"toObjectSet");var Bwn=a(()=>{},"noop");var Mwn=a((e,t)=>{e=+e;return Number.isFinite(e)?e:t},"toFiniteNumber");var Yxe="abcdefghijklmnopqrstuvwxyz";var eTt="0123456789";var TTt={DIGIT:eTt,ALPHA:Yxe,ALPHA_DIGIT:Yxe+Yxe.toUpperCase()+eTt};var qwn=a((e=16,t=TTt.ALPHA_DIGIT)=>{let r="";const{length:n}=t;while(e--){r+=t[Math.random()*n|0]}return r},"generateString");function Uwn(e){return!!(e&&Lf(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}a(Uwn,"isSpecCompliantForm");var $wn=a(e=>{const t=new Array(10);const r=a((n,i)=>{if(wJ(n)){if(t.indexOf(n)>=0){return}if(!("toJSON"in n)){t[i]=n;const s=dP(n)?[]:{};LF(n,(o,u)=>{const l=r(o,i+1);!kF(l)&&(s[u]=l)});t[i]=void 0;return s}}return n},"visit");return r(e,0)},"toJSONObject");var jwn=ng("AsyncFunction");var Gwn=a(e=>e&&(wJ(e)||Lf(e))&&Lf(e.then)&&Lf(e.catch),"isThenable");var Je={isArray:dP,isArrayBuffer:ETt,isBuffer:dwn,isFormData:Ewn,isArrayBufferView:pwn,isString:fwn,isNumber:bTt,isBoolean:mwn,isObject:wJ,isPlainObject:vJ,isUndefined:kF,isDate:hwn,isFile:gwn,isBlob:ywn,isRegExp:Dwn,isFunction:Lf,isStream:vwn,isURLSearchParams:bwn,isTypedArray:Own,isFileList:_wn,forEach:LF,merge:Zxe,extend:Awn,trim:Swn,stripBOM:Cwn,inherits:wwn,toFlatObject:Twn,kindOf:AJ,kindOfTest:ng,endsWith:xwn,toArray:Rwn,forEachEntry:Pwn,matchAll:Nwn,isHTMLForm:Iwn,hasOwnProperty:Zwt,hasOwnProp:Zwt,reduceDescriptors:wTt,freezeMethods:Lwn,toObjectSet:Fwn,toCamelCase:kwn,noop:Bwn,toFiniteNumber:Mwn,findKey:STt,global:ATt,isContextDefined:CTt,ALPHABET:TTt,generateString:qwn,isSpecCompliantForm:Uwn,toJSONObject:$wn,isAsyncFn:jwn,isThenable:Gwn};function yr(e,t,r,n,i){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=new Error().stack}this.message=e;this.name="AxiosError";t&&(this.code=t);r&&(this.config=r);n&&(this.request=n);i&&(this.response=i)}a(yr,"AxiosError");Je.inherits(yr,Error,{toJSON:a(function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Je.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}},"toJSON")});var xTt=yr.prototype;var RTt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{RTt[e]={value:e}});Object.defineProperties(yr,RTt);Object.defineProperty(xTt,"isAxiosError",{value:true});yr.from=(e,t,r,n,i,s)=>{const o=Object.create(xTt);Je.toFlatObject(e,o,a(function u(l){return l!==Error.prototype},"filter"),u=>{return u!=="isAxiosError"});yr.call(o,e.message,t,r,n,i);o.cause=e;o.name=e.name;s&&Object.assign(o,s);return o};function eRe(e){return Je.isPlainObject(e)||Je.isArray(e)}a(eRe,"isVisitable");function OTt(e){return Je.endsWith(e,"[]")?e.slice(0,-2):e}a(OTt,"removeBrackets");function tTt(e,t,r){if(!e)return t;return e.concat(t).map(a(function n(i,s){i=OTt(i);return!r&&s?"["+i+"]":i},"each")).join(r?".":"")}a(tTt,"renderKey");function Hwn(e){return Je.isArray(e)&&!e.some(eRe)}a(Hwn,"isFlatArray");var Vwn=Je.toFlatObject(Je,{},null,a(function e(t){return/^is[A-Z]/.test(t)},"filter"));function TJ(e,t,r){if(!Je.isObject(e)){throw new TypeError("target must be an object")}t=t||new(_Tt["default"]||FormData);r=Je.toFlatObject(r,{metaTokens:true,dots:false,indexes:false},false,a(function h(g,_){return!Je.isUndefined(_[g])},"defined"));const n=r.metaTokens;const i=r.visitor||d;const s=r.dots;const o=r.indexes;const u=r.Blob||typeof Blob!=="undefined"&&Blob;const l=u&&Je.isSpecCompliantForm(t);if(!Je.isFunction(i)){throw new TypeError("visitor must be a function")}function c(h){if(h===null)return"";if(Je.isDate(h)){return h.toISOString()}if(!l&&Je.isBlob(h)){throw new yr("Blob is not supported. Use a Buffer instead.")}if(Je.isArrayBuffer(h)||Je.isTypedArray(h)){return l&&typeof Blob==="function"?new Blob([h]):Buffer.from(h)}return h}a(c,"convertValue");function d(h,g,_){let v=h;if(h&&!_&&typeof h==="object"){if(Je.endsWith(g,"{}")){g=n?g:g.slice(0,-2);h=JSON.stringify(h)}else if(Je.isArray(h)&&Hwn(h)||(Je.isFileList(h)||Je.endsWith(g,"[]"))&&(v=Je.toArray(h))){g=OTt(g);v.forEach(a(function S(E,b){!(Je.isUndefined(E)||E===null)&&t.append(o===true?tTt([g],b,s):o===null?g:g+"[]",c(E))},"each"));return false}}if(eRe(h)){return true}t.append(tTt(_,g,s),c(h));return false}a(d,"defaultVisitor");const p=[];const f=Object.assign(Vwn,{defaultVisitor:d,convertValue:c,isVisitable:eRe});function m(h,g){if(Je.isUndefined(h))return;if(p.indexOf(h)!==-1){throw Error("Circular reference detected in "+g.join("."))}p.push(h);Je.forEach(h,a(function _(v,S){const E=!(Je.isUndefined(v)||v===null)&&i.call(t,v,Je.isString(S)?S.trim():S,g,f);if(E===true){m(v,g?g.concat(S):[S])}},"each"));p.pop()}a(m,"build");if(!Je.isObject(e)){throw new TypeError("data must be an object")}m(e);return t}a(TJ,"toFormData");function rTt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,a(function r(n){return t[n]},"replacer"))}a(rTt,"encode$1");function PTt(e,t){this._pairs=[];e&&TJ(e,this,t)}a(PTt,"AxiosURLSearchParams");var NTt=PTt.prototype;NTt.append=a(function e(t,r){this._pairs.push([t,r])},"append");NTt.toString=a(function e(t){const r=t?function(n){return t.call(this,n,rTt)}:rTt;return this._pairs.map(a(function n(i){return r(i[0])+"="+r(i[1])},"each"),"").join("&")},"toString");function zwn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}a(zwn,"encode");function cRe(e,t,r){if(!t){return e}const n=r&&r.encode||zwn;const i=r&&r.serialize;let s;if(i){s=i(t,r)}else{s=Je.isURLSearchParams(t)?t.toString():new PTt(t,r).toString(n)}if(s){const o=e.indexOf("#");if(o!==-1){e=e.slice(0,o)}e+=(e.indexOf("?")===-1?"?":"&")+s}return e}a(cRe,"buildURL");var tRe=class{static{a(this,"InterceptorManager")}constructor(){this.handlers=[]}use(t,r,n){this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:false,runWhen:n?n.runWhen:null});return this.handlers.length-1}eject(t){if(this.handlers[t]){this.handlers[t]=null}}clear(){if(this.handlers){this.handlers=[]}}forEach(t){Je.forEach(this.handlers,a(function r(n){if(n!==null){t(n)}},"forEachHandler"))}};var nTt=tRe;var dRe={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};var Kwn=iwn["default"].URLSearchParams;var Wwn={isNode:true,classes:{URLSearchParams:Kwn,FormData:_Tt["default"],Blob:typeof Blob!=="undefined"&&Blob||null},protocols:["http","https","file","data"]};var ITt=typeof window!=="undefined"&&typeof document!=="undefined";var Ywn=(e=>{return ITt&&["ReactNative","NativeScript","NS"].indexOf(e)<0})(typeof navigator!=="undefined"&&navigator.product);var Xwn=(()=>{return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})();var Jwn=Object.freeze({__proto__:null,hasBrowserEnv:ITt,hasStandardBrowserWebWorkerEnv:Xwn,hasStandardBrowserEnv:Ywn});var Df={...Jwn,...Wwn};function Qwn(e,t){return TJ(e,new Df.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,s){if(Df.isNode&&Je.isBuffer(r)){this.append(n,r.toString("base64"));return false}return s.defaultVisitor.apply(this,arguments)}},t))}a(Qwn,"toURLEncodedForm");function Zwn(e){return Je.matchAll(/\w+|\[(\w*)]/g,e).map(t=>{return t[0]==="[]"?"":t[1]||t[0]})}a(Zwn,"parsePropPath");function eTn(e){const t={};const r=Object.keys(e);let n;const i=r.length;let s;for(n=0;n<i;n++){s=r[n];t[s]=e[s]}return t}a(eTn,"arrayToObject");function kTt(e){function t(r,n,i,s){let o=r[s++];const u=Number.isFinite(+o);const l=s>=r.length;o=!o&&Je.isArray(i)?i.length:o;if(l){if(Je.hasOwnProp(i,o)){i[o]=[i[o],n]}else{i[o]=n}return!u}if(!i[o]||!Je.isObject(i[o])){i[o]=[]}const c=t(r,n,i[o],s);if(c&&Je.isArray(i[o])){i[o]=eTn(i[o])}return!u}a(t,"buildPath");if(Je.isFormData(e)&&Je.isFunction(e.entries)){const r={};Je.forEachEntry(e,(n,i)=>{t(Zwn(n),i,r,0)});return r}return null}a(kTt,"formDataToJSON");function tTn(e,t,r){if(Je.isString(e)){try{(t||JSON.parse)(e);return Je.trim(e)}catch(n){if(n.name!=="SyntaxError"){throw n}}}return(r||JSON.stringify)(e)}a(tTn,"stringifySafely");var pRe={transitional:dRe,adapter:["xhr","http"],transformRequest:[a(function e(t,r){const n=r.getContentType()||"";const i=n.indexOf("application/json")>-1;const s=Je.isObject(t);if(s&&Je.isHTMLForm(t)){t=new FormData(t)}const o=Je.isFormData(t);if(o){if(!i){return t}return i?JSON.stringify(kTt(t)):t}if(Je.isArrayBuffer(t)||Je.isBuffer(t)||Je.isStream(t)||Je.isFile(t)||Je.isBlob(t)){return t}if(Je.isArrayBufferView(t)){return t.buffer}if(Je.isURLSearchParams(t)){r.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}let u;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1){return Qwn(t,this.formSerializer).toString()}if((u=Je.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return TJ(u?{"files[]":t}:t,l&&new l,this.formSerializer)}}if(s||i){r.setContentType("application/json",false);return tTn(t)}return t},"transformRequest")],transformResponse:[a(function e(t){const r=this.transitional||pRe.transitional;const n=r&&r.forcedJSONParsing;const i=this.responseType==="json";if(t&&Je.isString(t)&&(n&&!this.responseType||i)){const s=r&&r.silentJSONParsing;const o=!s&&i;try{return JSON.parse(t)}catch(u){if(o){if(u.name==="SyntaxError"){throw yr.from(u,yr.ERR_BAD_RESPONSE,this,null,this.response)}throw u}}}return t},"transformResponse")],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Df.classes.FormData,Blob:Df.classes.Blob},validateStatus:a(function e(t){return t>=200&&t<300},"validateStatus"),headers:{common:{"Accept":"application/json, text/plain, */*","Content-Type":void 0}}};Je.forEach(["delete","get","head","post","put","patch"],e=>{pRe.headers[e]={}});var fRe=pRe;var rTn=Je.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var nTn=a(e=>{const t={};let r;let n;let i;e&&e.split("\n").forEach(a(function s(o){i=o.indexOf(":");r=o.substring(0,i).trim().toLowerCase();n=o.substring(i+1).trim();if(!r||t[r]&&rTn[r]){return}if(r==="set-cookie"){if(t[r]){t[r].push(n)}else{t[r]=[n]}}else{t[r]=t[r]?t[r]+", "+n:n}},"parser"));return t},"parseHeaders");var iTt=Symbol("internals");function NF(e){return e&&String(e).trim().toLowerCase()}a(NF,"normalizeHeader");function EJ(e){if(e===false||e==null){return e}return Je.isArray(e)?e.map(EJ):String(e)}a(EJ,"normalizeValue");function iTn(e){const t=Object.create(null);const r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;while(n=r.exec(e)){t[n[1]]=n[2]}return t}a(iTn,"parseTokens");var sTn=a(e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()),"isValidHeaderName");function Xxe(e,t,r,n,i){if(Je.isFunction(n)){return n.call(this,t,r)}if(i){t=r}if(!Je.isString(t))return;if(Je.isString(n)){return t.indexOf(n)!==-1}if(Je.isRegExp(n)){return n.test(t)}}a(Xxe,"matchHeaderValue");function aTn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>{return r.toUpperCase()+n})}a(aTn,"formatHeader");function oTn(e,t){const r=Je.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,s,o){return this[n].call(this,t,i,s,o)},configurable:true})})}a(oTn,"buildAccessors");var uP=class{static{a(this,"AxiosHeaders")}constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function s(u,l,c){const d=NF(l);if(!d){throw new Error("header name must be a non-empty string")}const p=Je.findKey(i,d);if(!p||i[p]===void 0||c===true||c===void 0&&i[p]!==false){i[p||l]=EJ(u)}}a(s,"setHeader");const o=a((u,l)=>Je.forEach(u,(c,d)=>s(c,d,l)),"setHeaders");if(Je.isPlainObject(t)||t instanceof this.constructor){o(t,r)}else if(Je.isString(t)&&(t=t.trim())&&!sTn(t)){o(nTn(t),r)}else{t!=null&&s(r,t,n)}return this}get(t,r){t=NF(t);if(t){const n=Je.findKey(this,t);if(n){const i=this[n];if(!r){return i}if(r===true){return iTn(i)}if(Je.isFunction(r)){return r.call(this,i,n)}if(Je.isRegExp(r)){return r.exec(i)}throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){t=NF(t);if(t){const n=Je.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Xxe(this,this[n],n,r)))}return false}delete(t,r){const n=this;let i=false;function s(o){o=NF(o);if(o){const u=Je.findKey(n,o);if(u&&(!r||Xxe(n,n[u],u,r))){delete n[u];i=true}}}a(s,"deleteHeader");if(Je.isArray(t)){t.forEach(s)}else{s(t)}return i}clear(t){const r=Object.keys(this);let n=r.length;let i=false;while(n--){const s=r[n];if(!t||Xxe(this,this[s],s,t,true)){delete this[s];i=true}}return i}normalize(t){const r=this;const n={};Je.forEach(this,(i,s)=>{const o=Je.findKey(n,s);if(o){r[o]=EJ(i);delete r[s];return}const u=t?aTn(s):String(s).trim();if(u!==s){delete r[s]}r[u]=EJ(i);n[u]=true});return this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);Je.forEach(this,(n,i)=>{n!=null&&n!==false&&(r[i]=t&&Je.isArray(n)?n.join(", "):n)});return r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);r.forEach(i=>n.set(i));return n}static accessor(t){const r=this[iTt]=this[iTt]={accessors:{}};const n=r.accessors;const i=this.prototype;function s(o){const u=NF(o);if(!n[u]){oTn(i,o);n[u]=true}}a(s,"defineAccessor");Je.isArray(t)?t.forEach(s):s(t);return this}};uP.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Je.reduceDescriptors(uP.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});Je.freezeMethods(uP);var Ff=uP;function Jxe(e,t){const r=this||fRe;const n=t||r;const i=Ff.from(n.headers);let s=n.data;Je.forEach(e,a(function o(u){s=u.call(r,s,i.normalize(),t?t.status:void 0)},"transform"));i.normalize();return s}a(Jxe,"transformData");function DTt(e){return!!(e&&e.__CANCEL__)}a(DTt,"isCancel");function nC(e,t,r){yr.call(this,e==null?"canceled":e,yr.ERR_CANCELED,t,r);this.name="CanceledError"}a(nC,"CanceledError");Je.inherits(nC,yr,{__CANCEL__:true});function IF(e,t,r){const n=r.config.validateStatus;if(!r.status||!n||n(r.status)){e(r)}else{t(new yr("Request failed with status code "+r.status,[yr.ERR_BAD_REQUEST,yr.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}}a(IF,"settle");function uTn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}a(uTn,"isAbsoluteURL");function lTn(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}a(lTn,"combineURLs");function mRe(e,t){if(e&&!uTn(t)){return lTn(e,t)}return t}a(mRe,"buildFullPath");var SJ="1.6.2";function LTt(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}a(LTt,"parseProtocol");var cTn=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function dTn(e,t,r){const n=r&&r.Blob||Df.classes.Blob;const i=LTt(e);if(t===void 0&&n){t=true}if(i==="data"){e=i.length?e.slice(i.length+1):e;const s=cTn.exec(e);if(!s){throw new yr("Invalid URL",yr.ERR_INVALID_URL)}const o=s[1];const u=s[2];const l=s[3];const c=Buffer.from(decodeURIComponent(l),u?"base64":"utf8");if(t){if(!n){throw new yr("Blob is not supported",yr.ERR_NOT_SUPPORT)}return new n([c],{type:o})}return c}throw new yr("Unsupported protocol "+i,yr.ERR_NOT_SUPPORT)}a(dTn,"fromDataURI");function pTn(e,t){let r=0;const n=1e3/t;let i=null;return a(function s(o,u){const l=Date.now();if(o||l-r>n){if(i){clearTimeout(i);i=null}r=l;return e.apply(null,u)}if(!i){i=setTimeout(()=>{i=null;r=Date.now();return e.apply(null,u)},n-(l-r))}},"throttled")}a(pTn,"throttle");function FTt(e,t){e=e||10;const r=new Array(e);const n=new Array(e);let i=0;let s=0;let o;t=t!==void 0?t:1e3;return a(function u(l){const c=Date.now();const d=n[s];if(!o){o=c}r[i]=l;n[i]=c;let p=s;let f=0;while(p!==i){f+=r[p++];p=p%e}i=(i+1)%e;if(i===s){s=(s+1)%e}if(c-o<t){return}const m=d&&c-d;return m?Math.round(f*1e3/m):void 0},"push")}a(FTt,"speedometer");var _J=Symbol("internals");var rRe=class extends jE["default"].Transform{static{a(this,"AxiosTransformStream")}constructor(t){t=Je.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(u,l)=>{return!Je.isUndefined(l[u])});super({readableHighWaterMark:t.chunkSize});const r=this;const n=this[_J]={length:t.length,timeWindow:t.timeWindow,ticksRate:t.ticksRate,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:false,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};const i=FTt(n.ticksRate*t.samplesCount,n.timeWindow);this.on("newListener",u=>{if(u==="progress"){if(!n.isCaptured){n.isCaptured=true}}});let s=0;n.updateProgress=pTn(a(function u(){const l=n.length;const c=n.bytesSeen;const d=c-s;if(!d||r.destroyed)return;const p=i(d);s=c;process.nextTick(()=>{r.emit("progress",{"loaded":c,"total":l,"progress":l?c/l:void 0,"bytes":d,"rate":p?p:void 0,"estimated":p&&l&&c<=l?(l-c)/p:void 0})})},"throttledHandler"),n.ticksRate);const o=a(()=>{n.updateProgress(true)},"onFinish");this.once("end",o);this.once("error",o)}_read(t){const r=this[_J];if(r.onReadCallback){r.onReadCallback()}return super._read(t)}_transform(t,r,n){const i=this;const s=this[_J];const o=s.maxRate;const u=this.readableHighWaterMark;const l=s.timeWindow;const c=1e3/l;const d=o/c;const p=s.minChunkSize!==false?Math.max(s.minChunkSize,d*.01):0;function f(h,g){const _=Buffer.byteLength(h);s.bytesSeen+=_;s.bytes+=_;if(s.isCaptured){s.updateProgress()}if(i.push(h)){process.nextTick(g)}else{s.onReadCallback=()=>{s.onReadCallback=null;process.nextTick(g)}}}a(f,"pushChunk");const m=a((h,g)=>{const _=Buffer.byteLength(h);let v=null;let S=u;let E;let b=0;if(o){const A=Date.now();if(!s.ts||(b=A-s.ts)>=l){s.ts=A;E=d-s.bytes;s.bytes=E<0?-E:0;b=0}E=d-s.bytes}if(o){if(E<=0){return setTimeout(()=>{g(null,h)},l-b)}if(E<S){S=E}}if(S&&_>S&&_-S>p){v=h.subarray(S);h=h.subarray(0,S)}f(h,v?()=>{process.nextTick(g,null,v)}:g)},"transformChunk");m(t,a(function h(g,_){if(g){return n(g)}if(_){m(_,h)}else{n(null)}},"transformNextChunk"))}setLength(t){this[_J].length=+t;return this}};var sTt=rRe;var{asyncIterator:aTt}=Symbol;var fTn=a(async function*(e){if(e.stream){yield*e.stream()}else if(e.arrayBuffer){yield await e.arrayBuffer()}else if(e[aTt]){yield*e[aTt]()}else{yield e}},"readBlob");var BTt=fTn;var mTn=Je.ALPHABET.ALPHA_DIGIT+"-_";var DF=new gTt.TextEncoder;var GE="\r\n";var hTn=DF.encode(GE);var gTn=2;var nRe=class{static{a(this,"FormDataPart")}constructor(t,r){const{escapeName:n}=this.constructor;const i=Je.isString(r);let s=`Content-Disposition: form-data; name="${n(t)}"${!i&&r.name?`; filename="${n(r.name)}"`:""}${GE}`;if(i){r=DF.encode(String(r).replace(/\r?\n|\r\n?/g,GE))}else{s+=`Content-Type: ${r.type||"application/octet-stream"}${GE}`}this.headers=DF.encode(s+GE);this.contentLength=i?r.byteLength:r.size;this.size=this.headers.byteLength+this.contentLength+gTn;this.name=t;this.value=r}async*encode(){yield this.headers;const{value:t}=this;if(Je.isTypedArray(t)){yield t}else{yield*BTt(t)}yield hTn}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}};var yTn=a((e,t,r)=>{const{tag:n="form-data-boundary",size:i=25,boundary:s=n+"-"+Je.generateString(i,mTn)}=r||{};if(!Je.isFormData(e)){throw TypeError("FormData instance required")}if(s.length<1||s.length>70){throw Error("boundary must be 10-70 characters long")}const o=DF.encode("--"+s+GE);const u=DF.encode("--"+s+"--"+GE+GE);let l=u.byteLength;const c=Array.from(e.entries()).map(([p,f])=>{const m=new nRe(p,f);l+=m.size;return m});l+=o.byteLength*c.length;l=Je.toFiniteNumber(l);const d={"Content-Type":`multipart/form-data; boundary=${s}`};if(Number.isFinite(l)){d["Content-Length"]=l}t&&t(d);return yTt.Readable.from(async function*(){for(const p of c){yield o;yield*p.encode()}yield u}())},"formDataToStream");var _Tn=yTn;var iRe=class extends jE["default"].Transform{static{a(this,"ZlibHeaderTransformStream")}__transform(t,r,n){this.push(t);n()}_transform(t,r,n){if(t.length!==0){this._transform=this.__transform;if(t[0]!==120){const i=Buffer.alloc(2);i[0]=120;i[1]=156;this.push(i,r)}}this.__transform(t,r,n)}};var vTn=iRe;var ETn=a((e,t)=>{return Je.isAsyncFn(e)?function(...r){const n=r.pop();e.apply(this,r).then(i=>{try{t?n(null,...t(i)):n(null,i)}catch(s){n(s)}},n)}:e},"callbackify");var bTn=ETn;var oTt={flush:HE["default"].constants.Z_SYNC_FLUSH,finishFlush:HE["default"].constants.Z_SYNC_FLUSH};var STn={flush:HE["default"].constants.BROTLI_OPERATION_FLUSH,finishFlush:HE["default"].constants.BROTLI_OPERATION_FLUSH};var uTt=Je.isFunction(HE["default"].createBrotliDecompress);var{http:ATn,https:CTn}=uwn["default"];var wTn=/https:?/;var lTt=Df.protocols.map(e=>{return e+":"});function TTn(e){if(e.beforeRedirects.proxy){e.beforeRedirects.proxy(e)}if(e.beforeRedirects.config){e.beforeRedirects.config(e)}}a(TTn,"dispatchBeforeRedirect");function MTt(e,t,r){let n=t;if(!n&&n!==false){const i=QCn.getProxyForUrl(r);if(i){n=new URL(i)}}if(n){if(n.username){n.auth=(n.username||"")+":"+(n.password||"")}if(n.auth){if(n.auth.username||n.auth.password){n.auth=(n.auth.username||"")+":"+(n.auth.password||"")}const s=Buffer.from(n.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+s}e.headers.host=e.hostname+(e.port?":"+e.port:"");const i=n.hostname||n.host;e.hostname=i;e.host=i;e.port=n.port;e.path=r;if(n.protocol){e.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`}}e.beforeRedirects.proxy=a(function i(s){MTt(s,t,s.href)},"beforeRedirect")}a(MTt,"setProxy");var xTn=typeof process!=="undefined"&&Je.kindOf(process)==="process";var RTn=a(e=>{return new Promise((t,r)=>{let n;let i;const s=a((l,c)=>{if(i)return;i=true;n&&n(l,c)},"done");const o=a(l=>{s(l);t(l)},"_resolve");const u=a(l=>{s(l,true);r(l)},"_reject");e(o,u,l=>n=l).catch(u)})},"wrapAsync");var OTn=a(({address:e,family:t})=>{if(!Je.isString(e)){throw TypeError("address must be a string")}return{address:e,family:t||(e.indexOf(".")<0?6:4)}},"resolveFamily");var cTt=a((e,t)=>OTn(Je.isObject(e)?e:{address:e,family:t}),"buildAddressEntry");var PTn=xTn&&a(function e(t){return RTn(a(async function r(n,i,s){let{data:o,lookup:u,family:l}=t;const{responseType:c,responseEncoding:d}=t;const p=t.method.toUpperCase();let f;let m=false;let h;if(u){const he=bTn(u,Fe=>Je.isArray(Fe)?Fe:[Fe]);u=a((Fe,Oe,M)=>{he(Fe,Oe,(Q,fe,B)=>{const ye=Je.isArray(fe)?fe.map(De=>cTt(De)):[cTt(fe,B)];Oe.all?M(Q,ye):M(Q,ye[0].address,ye[0].family)})},"lookup")}const g=new lwn["default"];const _=a(()=>{if(t.cancelToken){t.cancelToken.unsubscribe(v)}if(t.signal){t.signal.removeEventListener("abort",v)}g.removeAllListeners()},"onFinished");s((he,Fe)=>{f=true;if(Fe){m=true;_()}});function v(he){g.emit("abort",!he||he.type?new nC(null,t,h):he)}a(v,"abort");g.once("abort",i);if(t.cancelToken||t.signal){t.cancelToken&&t.cancelToken.subscribe(v);if(t.signal){t.signal.aborted?v():t.signal.addEventListener("abort",v)}}const S=mRe(t.baseURL,t.url);const E=new URL(S,"http://localhost");const b=E.protocol||lTt[0];if(b==="data:"){let he;if(p!=="GET"){return IF(n,i,{status:405,statusText:"method not allowed",headers:{},config:t})}try{he=dTn(t.url,c==="blob",{Blob:t.env&&t.env.Blob})}catch(Fe){throw yr.from(Fe,yr.ERR_BAD_REQUEST,t)}if(c==="text"){he=he.toString(d);if(!d||d==="utf8"){he=Je.stripBOM(he)}}else if(c==="stream"){he=jE["default"].Readable.from(he)}return IF(n,i,{data:he,status:200,statusText:"OK",headers:new Ff,config:t})}if(lTt.indexOf(b)===-1){return i(new yr("Unsupported protocol "+b,yr.ERR_BAD_REQUEST,t))}const A=Ff.from(t.headers).normalize();A.set("User-Agent","axios/"+SJ,false);const C=t.onDownloadProgress;const T=t.onUploadProgress;const O=t.maxRate;let P=void 0;let R=void 0;if(Je.isSpecCompliantForm(o)){const he=A.getContentType(/boundary=([-_\w\d]{10,70})/i);o=_Tn(o,Fe=>{A.set(Fe)},{tag:`axios-${SJ}-boundary`,boundary:he&&he[1]||void 0})}else if(Je.isFormData(o)&&Je.isFunction(o.getHeaders)){A.set(o.getHeaders());if(!A.hasContentLength()){try{const he=await own["default"].promisify(o.getLength).call(o);Number.isFinite(he)&&he>=0&&A.setContentLength(he)}catch(he){}}}else if(Je.isBlob(o)){o.size&&A.setContentType(o.type||"application/octet-stream");A.setContentLength(o.size||0);o=jE["default"].Readable.from(BTt(o))}else if(o&&!Je.isStream(o)){if(Buffer.isBuffer(o));else if(Je.isArrayBuffer(o)){o=Buffer.from(new Uint8Array(o))}else if(Je.isString(o)){o=Buffer.from(o,"utf-8")}else{return i(new yr("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",yr.ERR_BAD_REQUEST,t))}A.setContentLength(o.length,false);if(t.maxBodyLength>-1&&o.length>t.maxBodyLength){return i(new yr("Request body larger than maxBodyLength limit",yr.ERR_BAD_REQUEST,t))}}const I=Je.toFiniteNumber(A.getContentLength());if(Je.isArray(O)){P=O[0];R=O[1]}else{P=R=O}if(o&&(T||P)){if(!Je.isStream(o)){o=jE["default"].Readable.from(o,{objectMode:false})}o=jE["default"].pipeline([o,new sTt({length:I,maxRate:Je.toFiniteNumber(P)})],Je.noop);T&&o.on("progress",he=>{T(Object.assign(he,{upload:true}))})}let D=void 0;if(t.auth){const he=t.auth.username||"";const Fe=t.auth.password||"";D=he+":"+Fe}if(!D&&E.username){const he=E.username;const Fe=E.password;D=he+":"+Fe}D&&A.delete("authorization");let U;try{U=cRe(E.pathname+E.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(he){const Fe=new Error(he.message);Fe.config=t;Fe.url=t.url;Fe.exists=true;return i(Fe)}A.set("Accept-Encoding","gzip, compress, deflate"+(uTt?", br":""),false);const te={path:U,method:p,headers:A.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:D,protocol:b,family:l,beforeRedirect:TTn,beforeRedirects:{}};!Je.isUndefined(u)&&(te.lookup=u);if(t.socketPath){te.socketPath=t.socketPath}else{te.hostname=E.hostname;te.port=E.port;MTt(te,t.proxy,b+"//"+E.hostname+(E.port?":"+E.port:"")+te.path)}let ve;const me=wTn.test(te.protocol);te.agent=me?t.httpsAgent:t.httpAgent;if(t.transport){ve=t.transport}else if(t.maxRedirects===0){ve=me?awn["default"]:swn["default"]}else{if(t.maxRedirects){te.maxRedirects=t.maxRedirects}if(t.beforeRedirect){te.beforeRedirects.config=t.beforeRedirect}ve=me?CTn:ATn}if(t.maxBodyLength>-1){te.maxBodyLength=t.maxBodyLength}else{te.maxBodyLength=Infinity}if(t.insecureHTTPParser){te.insecureHTTPParser=t.insecureHTTPParser}h=ve.request(te,a(function he(Fe){if(h.destroyed)return;const Oe=[Fe];const M=+Fe.headers["content-length"];if(C){const De=new sTt({length:Je.toFiniteNumber(M),maxRate:Je.toFiniteNumber(R)});C&&De.on("progress",$e=>{C(Object.assign($e,{download:true}))});Oe.push(De)}let Q=Fe;const fe=Fe.req||h;if(t.decompress!==false&&Fe.headers["content-encoding"]){if(p==="HEAD"||Fe.statusCode===204){delete Fe.headers["content-encoding"]}switch((Fe.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Oe.push(HE["default"].createUnzip(oTt));delete Fe.headers["content-encoding"];break;case"deflate":Oe.push(new vTn);Oe.push(HE["default"].createUnzip(oTt));delete Fe.headers["content-encoding"];break;case"br":if(uTt){Oe.push(HE["default"].createBrotliDecompress(STn));delete Fe.headers["content-encoding"]}}}Q=Oe.length>1?jE["default"].pipeline(Oe,Je.noop):Oe[0];const B=jE["default"].finished(Q,()=>{B();_()});const ye={status:Fe.statusCode,statusText:Fe.statusMessage,headers:new Ff(Fe.headers),config:t,request:fe};if(c==="stream"){ye.data=Q;IF(n,i,ye)}else{const De=[];let $e=0;Q.on("data",a(function gt(ut){De.push(ut);$e+=ut.length;if(t.maxContentLength>-1&&$e>t.maxContentLength){m=true;Q.destroy();i(new yr("maxContentLength size of "+t.maxContentLength+" exceeded",yr.ERR_BAD_RESPONSE,t,fe))}},"handleStreamData"));Q.on("aborted",a(function gt(){if(m){return}const ut=new yr("maxContentLength size of "+t.maxContentLength+" exceeded",yr.ERR_BAD_RESPONSE,t,fe);Q.destroy(ut);i(ut)},"handlerStreamAborted"));Q.on("error",a(function gt(ut){if(h.destroyed)return;i(yr.from(ut,null,t,fe))},"handleStreamError"));Q.on("end",a(function gt(){try{let ut=De.length===1?De[0]:Buffer.concat(De);if(c!=="arraybuffer"){ut=ut.toString(d);if(!d||d==="utf8"){ut=Je.stripBOM(ut)}}ye.data=ut}catch(ut){return i(yr.from(ut,null,t,ye.request,ye))}IF(n,i,ye)},"handleStreamEnd"))}g.once("abort",De=>{if(!Q.destroyed){Q.emit("error",De);Q.destroy()}})},"handleResponse"));g.once("abort",he=>{i(he);h.destroy(he)});h.on("error",a(function he(Fe){i(yr.from(Fe,null,t,h))},"handleRequestError"));h.on("socket",a(function he(Fe){Fe.setKeepAlive(true,1e3*60)},"handleRequestSocket"));if(t.timeout){const he=parseInt(t.timeout,10);if(Number.isNaN(he)){i(new yr("error trying to parse `config.timeout` to int",yr.ERR_BAD_OPTION_VALUE,t,h));return}h.setTimeout(he,a(function Fe(){if(f)return;let Oe=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const M=t.transitional||dRe;if(t.timeoutErrorMessage){Oe=t.timeoutErrorMessage}i(new yr(Oe,M.clarifyTimeoutError?yr.ETIMEDOUT:yr.ECONNABORTED,t,h));v()},"handleRequestTimeout"))}if(Je.isStream(o)){let he=false;let Fe=false;o.on("end",()=>{he=true});o.once("error",Oe=>{Fe=true;h.destroy(Oe)});o.on("close",()=>{if(!he&&!Fe){v(new nC("Request stream has been aborted",t,h))}});o.pipe(h)}else{h.end(o)}},"dispatchHttpRequest"))},"httpAdapter");var NTn=Df.hasStandardBrowserEnv?{write(e,t,r,n,i,s){const o=[e+"="+encodeURIComponent(t)];Je.isNumber(r)&&o.push("expires="+new Date(r).toGMTString());Je.isString(n)&&o.push("path="+n);Je.isString(i)&&o.push("domain="+i);s===true&&o.push("secure");document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};var ITn=Df.hasStandardBrowserEnv?a(function e(){const t=/(msie|trident)/i.test(navigator.userAgent);const r=document.createElement("a");let n;function i(s){let o=s;if(t){r.setAttribute("href",o);o=r.href}r.setAttribute("href",o);return{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}a(i,"resolveURL");n=i(window.location.href);return a(function s(o){const u=Je.isString(o)?i(o):o;return u.protocol===n.protocol&&u.host===n.host},"isURLSameOrigin")},"standardBrowserEnv")():a(function e(){return a(function t(){return true},"isURLSameOrigin")},"nonStandardBrowserEnv")();function dTt(e,t){let r=0;const n=FTt(50,250);return i=>{const s=i.loaded;const o=i.lengthComputable?i.total:void 0;const u=s-r;const l=n(u);const c=s<=o;r=s;const d={loaded:s,total:o,progress:o?s/o:void 0,bytes:u,rate:l?l:void 0,estimated:l&&o&&c?(o-s)/l:void 0,event:i};d[t?"download":"upload"]=true;e(d)}}a(dTt,"progressEventReducer");var kTn=typeof XMLHttpRequest!=="undefined";var DTn=kTn&&function(e){return new Promise(a(function t(r,n){let i=e.data;const s=Ff.from(e.headers).normalize();let{responseType:o,withXSRFToken:u}=e;let l;function c(){if(e.cancelToken){e.cancelToken.unsubscribe(l)}if(e.signal){e.signal.removeEventListener("abort",l)}}a(c,"done");let d;if(Je.isFormData(i)){if(Df.hasStandardBrowserEnv||Df.hasStandardBrowserWebWorkerEnv){s.setContentType(false)}else if((d=s.getContentType())!==false){const[g,..._]=d?d.split(";").map(v=>v.trim()).filter(Boolean):[];s.setContentType([g||"multipart/form-data",..._].join("; "))}}let p=new XMLHttpRequest;if(e.auth){const g=e.auth.username||"";const _=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(g+":"+_))}const f=mRe(e.baseURL,e.url);p.open(e.method.toUpperCase(),cRe(f,e.params,e.paramsSerializer),true);p.timeout=e.timeout;function m(){if(!p){return}const g=Ff.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders());const _=!o||o==="text"||o==="json"?p.responseText:p.response;const v={data:_,status:p.status,statusText:p.statusText,headers:g,config:e,request:p};IF(a(function S(E){r(E);c()},"_resolve"),a(function S(E){n(E);c()},"_reject"),v);p=null}a(m,"onloadend");if("onloadend"in p){p.onloadend=m}else{p.onreadystatechange=a(function g(){if(!p||p.readyState!==4){return}if(p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)){return}setTimeout(m)},"handleLoad")}p.onabort=a(function g(){if(!p){return}n(new yr("Request aborted",yr.ECONNABORTED,e,p));p=null},"handleAbort");p.onerror=a(function g(){n(new yr("Network Error",yr.ERR_NETWORK,e,p));p=null},"handleError");p.ontimeout=a(function g(){let _=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const v=e.transitional||dRe;if(e.timeoutErrorMessage){_=e.timeoutErrorMessage}n(new yr(_,v.clarifyTimeoutError?yr.ETIMEDOUT:yr.ECONNABORTED,e,p));p=null},"handleTimeout");if(Df.hasStandardBrowserEnv){u&&Je.isFunction(u)&&(u=u(e));if(u||u!==false&&ITn(f)){const g=e.xsrfHeaderName&&e.xsrfCookieName&&NTn.read(e.xsrfCookieName);if(g){s.set(e.xsrfHeaderName,g)}}}i===void 0&&s.setContentType(null);if("setRequestHeader"in p){Je.forEach(s.toJSON(),a(function g(_,v){p.setRequestHeader(v,_)},"setRequestHeader"))}if(!Je.isUndefined(e.withCredentials)){p.withCredentials=!!e.withCredentials}if(o&&o!=="json"){p.responseType=e.responseType}if(typeof e.onDownloadProgress==="function"){p.addEventListener("progress",dTt(e.onDownloadProgress,true))}if(typeof e.onUploadProgress==="function"&&p.upload){p.upload.addEventListener("progress",dTt(e.onUploadProgress))}if(e.cancelToken||e.signal){l=a(g=>{if(!p){return}n(!g||g.type?new nC(null,e,p):g);p.abort();p=null},"onCanceled");e.cancelToken&&e.cancelToken.subscribe(l);if(e.signal){e.signal.aborted?l():e.signal.addEventListener("abort",l)}}const h=LTt(f);if(h&&Df.protocols.indexOf(h)===-1){n(new yr("Unsupported protocol "+h+":",yr.ERR_BAD_REQUEST,e));return}p.send(i||null)},"dispatchXhrRequest"))};var sRe={http:PTn,xhr:DTn};Je.forEach(sRe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}});var pTt=a(e=>`- ${e}`,"renderReason");var LTn=a(e=>Je.isFunction(e)||e===null||e===false,"isResolvedHandle");var qTt={getAdapter:e=>{e=Je.isArray(e)?e:[e];const{length:t}=e;let r;let n;const i={};for(let s=0;s<t;s++){r=e[s];let o;n=r;if(!LTn(r)){n=sRe[(o=String(r)).toLowerCase()];if(n===void 0){throw new yr(`Unknown adapter '${o}'`)}}if(n){break}i[o||"#"+s]=n}if(!n){const s=Object.entries(i).map(([u,l])=>`adapter ${u} `+(l===false?"is not supported by the environment":"is not available in the build"));let o=t?s.length>1?"since :\n"+s.map(pTt).join("\n"):" "+pTt(s[0]):"as no adapter specified";throw new yr(`There is no suitable adapter to dispatch the request `+o,"ERR_NOT_SUPPORT")}return n},adapters:sRe};function Qxe(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new nC(null,e)}}a(Qxe,"throwIfCancellationRequested");function fTt(e){Qxe(e);e.headers=Ff.from(e.headers);e.data=Jxe.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}const t=qTt.getAdapter(e.adapter||fRe.adapter);return t(e).then(a(function r(n){Qxe(e);n.data=Jxe.call(e,e.transformResponse,n);n.headers=Ff.from(n.headers);return n},"onAdapterResolution"),a(function r(n){if(!DTt(n)){Qxe(e);if(n&&n.response){n.response.data=Jxe.call(e,e.transformResponse,n.response);n.response.headers=Ff.from(n.response.headers)}}return Promise.reject(n)},"onAdapterRejection"))}a(fTt,"dispatchRequest");var mTt=a(e=>e instanceof Ff?e.toJSON():e,"headersToObject");function lP(e,t){t=t||{};const r={};function n(c,d,p){if(Je.isPlainObject(c)&&Je.isPlainObject(d)){return Je.merge.call({caseless:p},c,d)}else if(Je.isPlainObject(d)){return Je.merge({},d)}else if(Je.isArray(d)){return d.slice()}return d}a(n,"getMergedValue");function i(c,d,p){if(!Je.isUndefined(d)){return n(c,d,p)}else if(!Je.isUndefined(c)){return n(void 0,c,p)}}a(i,"mergeDeepProperties");function s(c,d){if(!Je.isUndefined(d)){return n(void 0,d)}}a(s,"valueFromConfig2");function o(c,d){if(!Je.isUndefined(d)){return n(void 0,d)}else if(!Je.isUndefined(c)){return n(void 0,c)}}a(o,"defaultToConfig2");function u(c,d,p){if(p in t){return n(c,d)}else if(p in e){return n(void 0,c)}}a(u,"mergeDirectKeys");const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u,headers:(c,d)=>i(mTt(c),mTt(d),true)};Je.forEach(Object.keys(Object.assign({},e,t)),a(function c(d){const p=l[d]||i;const f=p(e[d],t[d],d);Je.isUndefined(f)&&p!==u||(r[d]=f)},"computeConfigValue"));return r}a(lP,"mergeConfig");var hRe={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{hRe[e]=a(function r(n){return typeof n===e||"a"+(t<1?"n ":" ")+e},"validator")});var hTt={};hRe.transitional=a(function e(t,r,n){function i(s,o){return"[Axios v"+SJ+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}a(i,"formatMessage");return(s,o,u)=>{if(t===false){throw new yr(i(o," has been removed"+(r?" in "+r:"")),yr.ERR_DEPRECATED)}if(r&&!hTt[o]){hTt[o]=true;console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))}return t?t(s,o,u):true}},"transitional");function FTn(e,t,r){if(typeof e!=="object"){throw new yr("options must be an object",yr.ERR_BAD_OPTION_VALUE)}const n=Object.keys(e);let i=n.length;while(i-- >0){const s=n[i];const o=t[s];if(o){const u=e[s];const l=u===void 0||o(u,s,e);if(l!==true){throw new yr("option "+s+" must be "+l,yr.ERR_BAD_OPTION_VALUE)}continue}if(r!==true){throw new yr("Unknown option "+s,yr.ERR_BAD_OPTION)}}}a(FTn,"assertOptions");var aRe={assertOptions:FTn,validators:hRe};var $E=aRe.validators;var cP=class{static{a(this,"Axios")}constructor(t){this.defaults=t;this.interceptors={request:new nTt,response:new nTt}}request(t,r){if(typeof t==="string"){r=r||{};r.url=t}else{r=t||{}}r=lP(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:s}=r;if(n!==void 0){aRe.assertOptions(n,{silentJSONParsing:$E.transitional($E.boolean),forcedJSONParsing:$E.transitional($E.boolean),clarifyTimeoutError:$E.transitional($E.boolean)},false)}if(i!=null){if(Je.isFunction(i)){r.paramsSerializer={serialize:i}}else{aRe.assertOptions(i,{encode:$E.function,serialize:$E.function},true)}}r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=s&&Je.merge(s.common,s[r.method]);s&&Je.forEach(["delete","get","head","post","put","patch","common"],h=>{delete s[h]});r.headers=Ff.concat(o,s);const u=[];let l=true;this.interceptors.request.forEach(a(function h(g){if(typeof g.runWhen==="function"&&g.runWhen(r)===false){return}l=l&&g.synchronous;u.unshift(g.fulfilled,g.rejected)},"unshiftRequestInterceptors"));const c=[];this.interceptors.response.forEach(a(function h(g){c.push(g.fulfilled,g.rejected)},"pushResponseInterceptors"));let d;let p=0;let f;if(!l){const h=[fTt.bind(this),void 0];h.unshift.apply(h,u);h.push.apply(h,c);f=h.length;d=Promise.resolve(r);while(p<f){d=d.then(h[p++],h[p++])}return d}f=u.length;let m=r;p=0;while(p<f){const h=u[p++];const g=u[p++];try{m=h(m)}catch(_){g.call(this,_);break}}try{d=fTt.call(this,m)}catch(h){return Promise.reject(h)}p=0;f=c.length;while(p<f){d=d.then(c[p++],c[p++])}return d}getUri(t){t=lP(this.defaults,t);const r=mRe(t.baseURL,t.url);return cRe(r,t.params,t.paramsSerializer)}};Je.forEach(["delete","get","head","options"],a(function e(t){cP.prototype[t]=function(r,n){return this.request(lP(n||{},{method:t,url:r,data:(n||{}).data}))}},"forEachMethodNoData"));Je.forEach(["post","put","patch"],a(function e(t){function r(n){return a(function i(s,o,u){return this.request(lP(u||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))},"httpMethod")}a(r,"generateHTTPMethod");cP.prototype[t]=r();cP.prototype[t+"Form"]=r(true)},"forEachMethodWithData"));var bJ=cP;var oRe=class e{static{a(this,"CancelToken")}constructor(t){if(typeof t!=="function"){throw new TypeError("executor must be a function.")}let r;this.promise=new Promise(a(function i(s){r=s},"promiseExecutor"));const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;while(s-- >0){n._listeners[s](i)}n._listeners=null});this.promise.then=i=>{let s;const o=new Promise(u=>{n.subscribe(u);s=u}).then(i);o.cancel=a(function u(){n.unsubscribe(s)},"reject");return o};t(a(function i(s,o,u){if(n.reason){return}n.reason=new nC(s,o,u);r(n.reason)},"cancel"))}throwIfRequested(){if(this.reason){throw this.reason}}subscribe(t){if(this.reason){t(this.reason);return}if(this._listeners){this._listeners.push(t)}else{this._listeners=[t]}}unsubscribe(t){if(!this._listeners){return}const r=this._listeners.indexOf(t);if(r!==-1){this._listeners.splice(r,1)}}static source(){let t;const r=new e(a(function n(i){t=i},"executor"));return{token:r,cancel:t}}};var BTn=oRe;function MTn(e){return a(function t(r){return e.apply(null,r)},"wrap")}a(MTn,"spread");function qTn(e){return Je.isObject(e)&&e.isAxiosError===true}a(qTn,"isAxiosError");var uRe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(uRe).forEach(([e,t])=>{uRe[t]=e});var UTn=uRe;function UTt(e){const t=new bJ(e);const r=vTt(bJ.prototype.request,t);Je.extend(r,bJ.prototype,t,{allOwnKeys:true});Je.extend(r,t,null,{allOwnKeys:true});r.create=a(function n(i){return UTt(lP(e,i))},"create");return r}a(UTt,"createInstance");var Lo=UTt(fRe);Lo.Axios=bJ;Lo.CanceledError=nC;Lo.CancelToken=BTn;Lo.isCancel=DTt;Lo.VERSION=SJ;Lo.toFormData=TJ;Lo.AxiosError=yr;Lo.Cancel=Lo.CanceledError;Lo.all=a(function e(t){return Promise.all(t)},"all");Lo.spread=MTn;Lo.isAxiosError=qTn;Lo.mergeConfig=lP;Lo.AxiosHeaders=Ff;Lo.formToJSON=e=>kTt(Je.isHTMLForm(e)?new FormData(e):e);Lo.getAdapter=qTt.getAdapter;Lo.HttpStatusCode=UTn;Lo.default=Lo;$Tt.exports=Lo});var OJ=y(RJ=>{"use strict";Object.defineProperty(RJ,"__esModule",{value:true});RJ.CredentialsMethod=void 0;var jTt;(function(e){e["None"]="none";e["ApiToken"]="api_token";e["ClientCredentials"]="client_credentials"})(jTt||(RJ.CredentialsMethod=jTt={}))});var sC=y(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:true});Fo.FgaRequiredParamError=Fo.FgaValidationError=Fo.FgaApiAuthenticationError=Fo.FgaApiInternalError=Fo.FgaApiRateLimitExceededError=Fo.FgaApiNotFoundError=Fo.FgaApiValidationError=Fo.FgaApiError=Fo.FgaError=void 0;var pP=class extends Error{static{a(this,"FgaError")}constructor(t,r){super(r||typeof t==="string"?t:`FGA Error${(t===null||t===void 0?void 0:t.message)?`: ${t.message}`:""}`);this.name="FgaError";if(t===null||t===void 0?void 0:t.stack){this.stack=t.stack}}};Fo.FgaError=pP;function NJ(e){let t=(e||"").split("/");if(t.length<4){t=[]}const r=t[2]||"";const n=t[3]||"";return{storeId:r,endpointCategory:n}}a(NJ,"getRequestMetadataFromPath");var GTt="fga-request-id";function SRe(e){return e.response?Object.fromEntries(Object.entries(e.response.headers).map(([t,r])=>[t.toLowerCase(),r])):{}}a(SRe,"getResponseHeaders");var iC=class extends pP{static{a(this,"FgaApiError")}constructor(t,r){var n,i,s,o,u,l,c,d,p,f;super(r?r:t);this.name="FgaApiError";this.statusCode=(n=t.response)===null||n===void 0?void 0:n.status;this.statusText=(i=t.response)===null||i===void 0?void 0:i.statusText;this.requestData=(s=t.config)===null||s===void 0?void 0:s.data;this.requestURL=(o=t.config)===null||o===void 0?void 0:o.url;this.method=(u=t.config)===null||u===void 0?void 0:u.method;const{storeId:m,endpointCategory:h}=NJ((l=t.request)===null||l===void 0?void 0:l.path);this.storeId=m;this.endpointCategory=h;this.apiErrorMessage=(d=(c=t.response)===null||c===void 0?void 0:c.data)===null||d===void 0?void 0:d.message;this.responseData=(p=t.response)===null||p===void 0?void 0:p.data;this.responseHeader=(f=t.response)===null||f===void 0?void 0:f.headers;const g=SRe(t);this.requestId=g[GTt];if(t===null||t===void 0?void 0:t.stack){this.stack=t.stack}}};Fo.FgaApiError=iC;var gRe=class extends iC{static{a(this,"FgaApiValidationError")}constructor(t,r){var n,i,s,o,u,l,c,d;super(t);this.name="FgaApiValidationError";this.apiErrorCode=(i=(n=t.response)===null||n===void 0?void 0:n.data)===null||i===void 0?void 0:i.code;const{endpointCategory:p}=NJ((s=t.request)===null||s===void 0?void 0:s.path);this.message=r?r:((u=(o=t.response)===null||o===void 0?void 0:o.data)===null||u===void 0?void 0:u.message)?`FGA API Validation Error: ${(l=t.config)===null||l===void 0?void 0:l.method} ${p} : Error ${(d=(c=t.response)===null||c===void 0?void 0:c.data)===null||d===void 0?void 0:d.message}`:t.message}};Fo.FgaApiValidationError=gRe;var yRe=class extends iC{static{a(this,"FgaApiNotFoundError")}constructor(t,r){var n,i,s,o,u,l,c;super(t);this.name="FgaApiNotFoundError";this.apiErrorCode=(i=(n=t.response)===null||n===void 0?void 0:n.data)===null||i===void 0?void 0:i.code;this.message=r?r:((o=(s=t.response)===null||s===void 0?void 0:s.data)===null||o===void 0?void 0:o.message)?`FGA API NotFound Error: ${(u=t.config)===null||u===void 0?void 0:u.method} : Error ${(c=(l=t.response)===null||l===void 0?void 0:l.data)===null||c===void 0?void 0:c.message}`:t.message}};Fo.FgaApiNotFoundError=yRe;var _Re=class extends iC{static{a(this,"FgaApiRateLimitExceededError")}constructor(t,r){var n,i,s;super(t);this.name="FgaApiRateLimitExceededError";this.apiErrorCode=(i=(n=t.response)===null||n===void 0?void 0:n.data)===null||i===void 0?void 0:i.code;const{endpointCategory:o}=NJ((s=t.request)===null||s===void 0?void 0:s.path);const u=SRe(t);this.message=r?r:`FGA API Rate Limit Error for ${this.method} ${o}`}};Fo.FgaApiRateLimitExceededError=_Re;var vRe=class extends iC{static{a(this,"FgaApiInternalError")}constructor(t,r){var n,i,s,o,u,l,c,d;super(t);this.name="FgaApiInternalError";const{endpointCategory:p}=NJ((n=t.request)===null||n===void 0?void 0:n.path);this.apiErrorCode=(s=(i=t.response)===null||i===void 0?void 0:i.data)===null||s===void 0?void 0:s.code;this.message=r?r:((u=(o=t.response)===null||o===void 0?void 0:o.data)===null||u===void 0?void 0:u.message)?`FGA API Internal Error: ${(l=t.config)===null||l===void 0?void 0:l.method} ${p} : Error ${(d=(c=t.response)===null||c===void 0?void 0:c.data)===null||d===void 0?void 0:d.message}`:t.message}};Fo.FgaApiInternalError=vRe;var ERe=class extends pP{static{a(this,"FgaApiAuthenticationError")}constructor(t){var r,n,i,s,o,u,l,c,d,p;super(`FGA Authentication Error.${((r=t.response)===null||r===void 0?void 0:r.statusText)?` ${t.response.statusText}`:""}`);this.name="FgaApiAuthenticationError";this.statusCode=(n=t.response)===null||n===void 0?void 0:n.status;this.statusText=(i=t.response)===null||i===void 0?void 0:i.statusText;this.requestURL=(s=t.config)===null||s===void 0?void 0:s.url;this.method=(o=t.config)===null||o===void 0?void 0:o.method;this.responseData=(u=t.response)===null||u===void 0?void 0:u.data;this.responseHeader=(l=t.response)===null||l===void 0?void 0:l.headers;this.apiErrorCode=(d=(c=t.response)===null||c===void 0?void 0:c.data)===null||d===void 0?void 0:d.code;const f=SRe(t);this.requestId=f[GTt];let m;try{m=JSON.parse(((p=t.config)===null||p===void 0?void 0:p.data)||"{}")}catch(h){}this.clientId=m===null||m===void 0?void 0:m.client_id;this.audience=m===null||m===void 0?void 0:m.audience;this.grantType=m===null||m===void 0?void 0:m.grant_type;if(t===null||t===void 0?void 0:t.stack){this.stack=t.stack}}};Fo.FgaApiAuthenticationError=ERe;var PJ=class extends pP{static{a(this,"FgaValidationError")}constructor(t,r){super(r);this.field=t;this.name="FgaValidationError"}};Fo.FgaValidationError=PJ;var bRe=class extends PJ{static{a(this,"FgaRequiredParamError")}constructor(t,r,n){super(r,n);this.functionName=t;this.name="FgaRequiredParamError"}};Fo.FgaRequiredParamError=bRe});var FF=y(VE=>{"use strict";Object.defineProperty(VE,"__esModule",{value:true});VE.isWellFormedUlidString=VE.isWellFormedUriString=VE.assertParamExists=void 0;var $Tn=sC();var jTn=a(function(e,t,r){if(r===null||r===void 0){throw new $Tn.FgaRequiredParamError(e,t,`Required parameter ${t} was null or undefined when calling ${e}.`)}},"assertParamExists");VE.assertParamExists=jTn;var GTn=a(e=>{try{const t=new URL(e);return(t.toString()===e||t.toString()===`${e}/`)&&(t.protocol==="https:"||t.protocol==="http:")}catch(t){return false}},"isWellFormedUriString");VE.isWellFormedUriString=GTn;var HTn=a(e=>{var t;const r=/^[0-7][0-9A-HJKMNP-TV-Z]{25}$/;return!!(typeof e==="string"&&((t=e.match(r))===null||t===void 0?void 0:t.length))},"isWellFormedUlidString");VE.isWellFormedUlidString=HTn});var CRe=y(fP=>{"use strict";Object.defineProperty(fP,"__esModule",{value:true});fP.Configuration=fP.GetDefaultRetryParams=void 0;var BF=OJ();var ARe=sC();var IJ=FF();var VTn=15;var zTn=100;var KTn="openfga-sdk js/0.3.0";function WTn(e=VTn,t=zTn){return{maxRetry:e,minWaitInMs:t}}a(WTn,"GetDefaultRetryParams");fP.GetDefaultRetryParams=WTn;var kJ=class{static{a(this,"Configuration")}constructor(t={}){this.apiScheme="https";this.getBasePath=()=>`${this.apiScheme}://${this.apiHost}`;this.apiScheme=t.apiScheme||this.apiScheme;this.apiHost=t.apiHost;this.storeId=t.storeId;const r=t.credentials;if(r){switch(r===null||r===void 0?void 0:r.method){case BF.CredentialsMethod.ApiToken:this.credentials={method:r.method,config:{token:r.config.token,headerName:"Authorization",headerValuePrefix:"Bearer"}};break;case BF.CredentialsMethod.ClientCredentials:this.credentials={method:BF.CredentialsMethod.ClientCredentials,config:{clientId:r.config.clientId,clientSecret:r.config.clientSecret,apiAudience:r.config.apiAudience,apiTokenIssuer:r.config.apiTokenIssuer}};break;case BF.CredentialsMethod.None:default:this.credentials={method:BF.CredentialsMethod.None};break}}const n=t.baseOptions||{};n.headers=n.headers||{};if(typeof process==="object"&&process.title==="node"&&!n.headers["User-Agent"]){n.headers["User-Agent"]=KTn}this.baseOptions=n;this.retryParams=t.retryParams}isValid(){var t;(0,IJ.assertParamExists)("Configuration","apiScheme",this.apiScheme);(0,IJ.assertParamExists)("Configuration","apiHost",this.apiHost);if(!(0,IJ.isWellFormedUriString)(this.getBasePath())){throw new ARe.FgaValidationError(`Configuration.apiScheme (${this.apiScheme}) and Configuration.apiHost (${this.apiHost}) do not form a valid URI (${this.getBasePath()})`)}if(this.storeId&&!(0,IJ.isWellFormedUlidString)(this.storeId)){throw new ARe.FgaValidationError("storeId")}if(((t=this.retryParams)===null||t===void 0?void 0:t.maxRetry)&&this.retryParams.maxRetry>15){throw new ARe.FgaValidationError("Configuration.retryParams.maxRetry exceeds maximum allowed limit of 15")}return true}};fP.Configuration=kJ;kJ.sdkVersion="0.3.0"});var HTt=y(DJ=>{"use strict";Object.defineProperty(DJ,"__esModule",{value:true});DJ.assertNever=void 0;function YTn(e){throw new Error(`Assertion failed. Unacceptable value: '${e}'`)}a(YTn,"assertNever");DJ.assertNever=YTn});var VTt=y(LJ=>{"use strict";Object.defineProperty(LJ,"__esModule",{value:true});LJ.chunkArray=void 0;function XTn(e,t){const r=[];const n=[...e];while(n.length>0){r.push(n.splice(0,t))}return r}a(XTn,"chunkArray");LJ.chunkArray=XTn});var KTt=y(mP=>{"use strict";Object.defineProperty(mP,"__esModule",{value:true});mP.generateRandomIdWithNonUniqueFallback=mP.generateRandomId=void 0;var FJ=require("crypto");function zTt(){if(typeof FJ.randomUUID==="function"){return(0,FJ.randomUUID)()}if(typeof FJ.randomBytes==="function"){return(0,FJ.randomBytes)(20).toString("hex")}return}a(zTt,"generateRandomId");mP.generateRandomId=zTt;function JTn(){return zTt()||"00000000-0000-0000-0000-000000000000"}a(JTn,"generateRandomIdWithNonUniqueFallback");mP.generateRandomIdWithNonUniqueFallback=JTn});var WTt=y(BJ=>{"use strict";Object.defineProperty(BJ,"__esModule",{value:true});BJ.setHeaderIfNotSet=void 0;function QTn(e,t,r){if(!e[t]&&r){e[t]=r}}a(QTn,"setHeaderIfNotSet");BJ.setHeaderIfNotSet=QTn});var YTt=y(MJ=>{"use strict";Object.defineProperty(MJ,"__esModule",{value:true});MJ.setNotEnumerableProperty=void 0;function ZTn(e,t,r){Object.defineProperty(e,t,{enumerable:false,writable:false,value:r})}a(ZTn,"setNotEnumerableProperty");MJ.setNotEnumerableProperty=ZTn});var wRe=y(fh=>{"use strict";var exn=fh&&fh.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var MF=fh&&fh.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))exn(t,e,r)};Object.defineProperty(fh,"__esModule",{value:true});MF(HTt(),fh);MF(VTt(),fh);MF(KTt(),fh);MF(WTt(),fh);MF(YTt(),fh)});var xRe=y(eu=>{"use strict";var TRe=eu&&eu.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}a(i,"adopt");return new(r||(r=Promise))(function(s,o){function u(d){try{c(n.next(d))}catch(p){o(p)}}a(u,"fulfilled");function l(d){try{c(n["throw"](d))}catch(p){o(p)}}a(l,"rejected");function c(d){d.done?s(d.value):i(d.value).then(u,l)}a(c,"step");c((n=n.apply(e,t||[])).next())})};Object.defineProperty(eu,"__esModule",{value:true});eu.createRequestFunction=eu.attemptHttpRequest=eu.toPathString=eu.serializeDataIfNeeded=eu.setSearchParams=eu.setBearerAuthToObject=eu.DUMMY_BASE_URL=void 0;var txn=qJ();var aC=sC();var rxn=wRe();eu.DUMMY_BASE_URL="https://example.com";var nxn=a(function(e,t){return TRe(this,void 0,void 0,function*(){const r=yield t.getAccessTokenHeader();if(r&&!e[r.name]){e[r.name]=r.value}})},"setBearerAuthToObject");eu.setBearerAuthToObject=nxn;var ixn=a(function(e,...t){const r=new URLSearchParams(e.search);for(const n of t){for(const i in n){if(Array.isArray(n[i])){r.delete(i);for(const s of n[i]){r.append(i,s)}}else{r.set(i,n[i])}}}e.search=r.toString()},"setSearchParams");eu.setSearchParams=ixn;var sxn=a(e=>{const t=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return e!==null&&(t.test(e)||e.toLowerCase()==="application/json-patch+json")},"isJsonMime");var axn=a(function(e,t){const r=typeof e!=="string";const n=r?sxn(t.headers["Content-Type"]):r;return n?JSON.stringify(e!==void 0?e:{}):e||""},"serializeDataIfNeeded");eu.serializeDataIfNeeded=axn;var oxn=a(function(e){return e.pathname+e.search+e.hash},"toPathString");eu.toPathString=oxn;function uxn(e){return e&&typeof e==="object"&&e.isAxiosError===true}a(uxn,"isAxiosError");function lxn(e,t){const r=Math.ceil(Math.pow(2,e)*t);const n=Math.ceil(Math.pow(2,e+1)*t);return Math.floor(Math.random()*(n-r)+r)}a(lxn,"randomTime");function XTt(e,t,r){var n;return TRe(this,void 0,void 0,function*(){let i=0;do{i++;try{return yield r(e)}catch(s){if(!uxn(s)){throw new aC.FgaError(s)}const o=(n=s===null||s===void 0?void 0:s.response)===null||n===void 0?void 0:n.status;if(o===400||o===422){throw new aC.FgaApiValidationError(s)}else if(o===401||o===403){throw new aC.FgaApiAuthenticationError(s)}else if(o===404){throw new aC.FgaApiNotFoundError(s)}else if(o===429||o>=500){if(i>=t.maxRetry){if(o===429){throw new aC.FgaApiRateLimitExceededError(s)}else{throw new aC.FgaApiInternalError(s)}}yield new Promise(u=>setTimeout(u,lxn(i,t.minWaitInMs)))}else{throw new aC.FgaApiError(s)}}}while(i<t.maxRetry+1)})}a(XTt,"attemptHttpRequest");eu.attemptHttpRequest=XTt;var cxn=a(function(e,t,r,n){var i,s;r.isValid();const o=((i=e.options)===null||i===void 0?void 0:i.retryParams)?(s=e.options)===null||s===void 0?void 0:s.retryParams:r.retryParams;const u=o?o.maxRetry:0;const l=o?o.minWaitInMs:0;if(!n){n=txn.Credentials.init(r)}return(c=t)=>TRe(this,void 0,void 0,function*(){yield(0,eu.setBearerAuthToObject)(e.options.headers,n);const d=Object.assign(Object.assign({},e.options),{url:r.getBasePath()+e.url});const p=yield XTt(d,{maxRetry:u,minWaitInMs:l},c);const f=typeof(p===null||p===void 0?void 0:p.data)==="undefined"?{}:p===null||p===void 0?void 0:p.data;const m=Object.assign({},f);(0,rxn.setNotEnumerableProperty)(m,"$response",p);return m})},"createRequestFunction");eu.createRequestFunction=cxn});var QTt=y(hP=>{"use strict";var RRe=hP&&hP.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}a(i,"adopt");return new(r||(r=Promise))(function(s,o){function u(d){try{c(n.next(d))}catch(p){o(p)}}a(u,"fulfilled");function l(d){try{c(n["throw"](d))}catch(p){o(p)}}a(l,"rejected");function c(d){d.done?s(d.value):i(d.value).then(u,l)}a(c,"step");c((n=n.apply(e,t||[])).next())})};Object.defineProperty(hP,"__esModule",{value:true});hP.Credentials=void 0;var JTt=xJ();var zE=FF();var ORe=sC();var dxn=xRe();var Bf=OJ();var PRe=class e{static{a(this,"Credentials")}static init(t){return new e(t.credentials)}constructor(t,r=JTt.default){this.authConfig=t;this.axios=r;this.initConfig();this.isValid()}initConfig(){var t;switch((t=this.authConfig)===null||t===void 0?void 0:t.method){case Bf.CredentialsMethod.ApiToken:if(this.authConfig.config){if(!this.authConfig.config.headerName){this.authConfig.config.headerName="Authorization"}if(!this.authConfig.config.headerValuePrefix){this.authConfig.config.headerValuePrefix="Bearer"}}break;case Bf.CredentialsMethod.ClientCredentials:case Bf.CredentialsMethod.None:default:break}}isValid(){var t,r,n,i,s,o,u,l,c;const{authConfig:d}=this;switch(d===null||d===void 0?void 0:d.method){case Bf.CredentialsMethod.None:break;case Bf.CredentialsMethod.ApiToken:(0,zE.assertParamExists)("Credentials","config.token",(t=d.config)===null||t===void 0?void 0:t.token);(0,zE.assertParamExists)("Credentials","config.headerName",(r=d.config)===null||r===void 0?void 0:r.headerName);(0,zE.assertParamExists)("Credentials","config.headerName",(n=d.config)===null||n===void 0?void 0:n.headerName);break;case Bf.CredentialsMethod.ClientCredentials:(0,zE.assertParamExists)("Credentials","config.clientId",(i=d.config)===null||i===void 0?void 0:i.clientId);(0,zE.assertParamExists)("Credentials","config.clientSecret",(s=d.config)===null||s===void 0?void 0:s.clientSecret);(0,zE.assertParamExists)("Credentials","config.apiTokenIssuer",(o=d.config)===null||o===void 0?void 0:o.apiTokenIssuer);(0,zE.assertParamExists)("Credentials","config.apiAudience",(u=d.config)===null||u===void 0?void 0:u.apiAudience);if(!(0,zE.isWellFormedUriString)(`https://${(l=d.config)===null||l===void 0?void 0:l.apiTokenIssuer}`)){throw new ORe.FgaValidationError(`Configuration.apiTokenIssuer does not form a valid URI (https://${(c=d.config)===null||c===void 0?void 0:c.apiTokenIssuer})`)}break}}getAccessTokenHeader(){var t;return RRe(this,void 0,void 0,function*(){const r=yield this.getAccessTokenValue();switch((t=this.authConfig)===null||t===void 0?void 0:t.method){case Bf.CredentialsMethod.None:return;case Bf.CredentialsMethod.ApiToken:return{name:this.authConfig.config.headerName,value:`${this.authConfig.config.headerValuePrefix?`${this.authConfig.config.headerValuePrefix} `:""}${r}`};case Bf.CredentialsMethod.ClientCredentials:return{name:"Authorization",value:`Bearer ${r}`}}})}getAccessTokenValue(){var t;return RRe(this,void 0,void 0,function*(){switch((t=this.authConfig)===null||t===void 0?void 0:t.method){case Bf.CredentialsMethod.None:return;case Bf.CredentialsMethod.ApiToken:return this.authConfig.config.token;case Bf.CredentialsMethod.ClientCredentials:if(this.accessToken&&(!this.accessTokenExpiryDate||this.accessTokenExpiryDate>new Date)){return this.accessToken}return this.refreshAccessToken()}})}refreshAccessToken(){var t;return RRe(this,void 0,void 0,function*(){const r=(t=this.authConfig)===null||t===void 0?void 0:t.config;try{const n=yield(0,dxn.attemptHttpRequest)({url:`https://${r.apiTokenIssuer}/oauth/token`,method:"post",data:{client_id:r.clientId,client_secret:r.clientSecret,audience:r.apiAudience,grant_type:"client_credentials"}},{maxRetry:3,minWaitInMs:100},JTt.default);if(n){this.accessToken=n.data.access_token;this.accessTokenExpiryDate=new Date(Date.now()+n.data.expires_in*1e3)}return this.accessToken}catch(n){if(n instanceof ORe.FgaApiError){n.constructor=ORe.FgaApiAuthenticationError;n.name="FgaApiAuthenticationError";n.clientId=r.clientId;n.audience=r.apiAudience;n.grantType="client_credentials"}throw n}})}};hP.Credentials=PRe});var qJ=y(KE=>{"use strict";var pxn=KE&&KE.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var ZTt=KE&&KE.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))pxn(t,e,r)};Object.defineProperty(KE,"__esModule",{value:true});ZTt(QTt(),KE);ZTt(OJ(),KE)});var IRe=y(UJ=>{"use strict";Object.defineProperty(UJ,"__esModule",{value:true});UJ.BaseAPI=void 0;var fxn=xJ();var mxn=require("http");var hxn=require("https");var ext=CRe();var gxn=qJ();var yxn=1e4;var NRe=class{static{a(this,"BaseAPI")}constructor(t,r){var n;this.axios=r;if(t instanceof ext.Configuration){this.configuration=t}else{this.configuration=new ext.Configuration(t)}this.configuration.isValid();this.credentials=gxn.Credentials.init(this.configuration);if(!this.axios){const i=new mxn.Agent({keepAlive:true});const s=new hxn.Agent({keepAlive:true});this.axios=fxn.default.create({httpAgent:i,httpsAgent:s,timeout:yxn,headers:(n=this.configuration.baseOptions)===null||n===void 0?void 0:n.headers})}}get storeId(){return this.configuration.storeId}set storeId(t){this.configuration.storeId=t}};UJ.BaseAPI=NRe});var DRe=y(Ts=>{"use strict";var As=Ts&&Ts.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}a(i,"adopt");return new(r||(r=Promise))(function(s,o){function u(d){try{c(n.next(d))}catch(p){o(p)}}a(u,"fulfilled");function l(d){try{c(n["throw"](d))}catch(p){o(p)}}a(l,"rejected");function c(d){d.done?s(d.value):i(d.value).then(u,l)}a(c,"step");c((n=n.apply(e,t||[])).next())})};Object.defineProperty(Ts,"__esModule",{value:true});Ts.OpenFgaApi=Ts.OpenFgaApiFactory=Ts.OpenFgaApiFp=Ts.OpenFgaApiAxiosParamCreator=void 0;var Tc=xJ();var _xn=IRe();var sr=xRe();var za=FF();var vxn=a(function(e,t){return{check:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("check","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/check".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),createStore:(r,n={})=>As(this,void 0,void 0,function*(){const i="/stores";const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),deleteStore:(r={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("Configuration","storeId",e.storeId);const n="/stores/{store_id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const i=new URL(n,sr.DUMMY_BASE_URL);let s;if(e){s=e.baseOptions}const o=Object.assign(Object.assign({method:"DELETE"},s),r);const u={};const l={};(0,sr.setSearchParams)(i,l,r.query);o.headers=Object.assign(Object.assign({},u),r.headers);return{url:(0,sr.toPathString)(i),options:o}}),expand:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("expand","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/expand".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),getStore:(r={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("Configuration","storeId",e.storeId);const n="/stores/{store_id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const i=new URL(n,sr.DUMMY_BASE_URL);let s;if(e){s=e.baseOptions}const o=Object.assign(Object.assign({method:"GET"},s),r);const u={};const l={};(0,sr.setSearchParams)(i,l,r.query);o.headers=Object.assign(Object.assign({},u),r.headers);return{url:(0,sr.toPathString)(i),options:o}}),listObjects:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("listObjects","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/list-objects".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),listStores:(r,n,i={})=>As(this,void 0,void 0,function*(){const s="/stores";const o=new URL(s,sr.DUMMY_BASE_URL);let u;if(e){u=e.baseOptions}const l=Object.assign(Object.assign({method:"GET"},u),i);const c={};const d={};if(r!==void 0){d["page_size"]=r}if(n!==void 0){d["continuation_token"]=n}(0,sr.setSearchParams)(o,d,i.query);l.headers=Object.assign(Object.assign({},c),i.headers);return{url:(0,sr.toPathString)(o),options:l}}),read:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("read","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/read".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),readAssertions:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("readAssertions","authorizationModelId",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/assertions/{authorization_model_id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId))).replace(`{${"authorization_model_id"}}`,encodeURIComponent(String(r)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"GET"},o),n);const l={};const c={};(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);return{url:(0,sr.toPathString)(s),options:u}}),readAuthorizationModel:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("readAuthorizationModel","id",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/authorization-models/{id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId))).replace(`{${"id"}}`,encodeURIComponent(String(r)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"GET"},o),n);const l={};const c={};(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);return{url:(0,sr.toPathString)(s),options:u}}),readAuthorizationModels:(r,n,i={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("Configuration","storeId",e.storeId);const s="/stores/{store_id}/authorization-models".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const o=new URL(s,sr.DUMMY_BASE_URL);let u;if(e){u=e.baseOptions}const l=Object.assign(Object.assign({method:"GET"},u),i);const c={};const d={};if(r!==void 0){d["page_size"]=r}if(n!==void 0){d["continuation_token"]=n}(0,sr.setSearchParams)(o,d,i.query);l.headers=Object.assign(Object.assign({},c),i.headers);return{url:(0,sr.toPathString)(o),options:l}}),readChanges:(r,n,i,s={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("Configuration","storeId",e.storeId);const o="/stores/{store_id}/changes".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const u=new URL(o,sr.DUMMY_BASE_URL);let l;if(e){l=e.baseOptions}const c=Object.assign(Object.assign({method:"GET"},l),s);const d={};const p={};if(r!==void 0){p["type"]=r}if(n!==void 0){p["page_size"]=n}if(i!==void 0){p["continuation_token"]=i}(0,sr.setSearchParams)(u,p,s.query);c.headers=Object.assign(Object.assign({},d),s.headers);return{url:(0,sr.toPathString)(u),options:c}}),write:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("write","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/write".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}}),writeAssertions:(r,n,i={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("writeAssertions","authorizationModelId",r);(0,za.assertParamExists)("writeAssertions","body",n);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const s="/stores/{store_id}/assertions/{authorization_model_id}".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId))).replace(`{${"authorization_model_id"}}`,encodeURIComponent(String(r)));const o=new URL(s,sr.DUMMY_BASE_URL);let u;if(e){u=e.baseOptions}const l=Object.assign(Object.assign({method:"PUT"},u),i);const c={};const d={};c["Content-Type"]="application/json";(0,sr.setSearchParams)(o,d,i.query);l.headers=Object.assign(Object.assign({},c),i.headers);l.data=(0,sr.serializeDataIfNeeded)(n,l);return{url:(0,sr.toPathString)(o),options:l}}),writeAuthorizationModel:(r,n={})=>As(this,void 0,void 0,function*(){(0,za.assertParamExists)("writeAuthorizationModel","body",r);(0,za.assertParamExists)("Configuration","storeId",e.storeId);const i="/stores/{store_id}/authorization-models".replace(`{${"store_id"}}`,encodeURIComponent(String(e.storeId)));const s=new URL(i,sr.DUMMY_BASE_URL);let o;if(e){o=e.baseOptions}const u=Object.assign(Object.assign({method:"POST"},o),n);const l={};const c={};l["Content-Type"]="application/json";(0,sr.setSearchParams)(s,c,n.query);u.headers=Object.assign(Object.assign({},l),n.headers);u.data=(0,sr.serializeDataIfNeeded)(r,u);return{url:(0,sr.toPathString)(s),options:u}})}},"OpenFgaApiAxiosParamCreator");Ts.OpenFgaApiAxiosParamCreator=vxn;var Exn=a(function(e,t){const r=(0,Ts.OpenFgaApiAxiosParamCreator)(e,t);return{check(n,i){return As(this,void 0,void 0,function*(){const s=yield r.check(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},createStore(n,i){return As(this,void 0,void 0,function*(){const s=yield r.createStore(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},deleteStore(n){return As(this,void 0,void 0,function*(){const i=yield r.deleteStore(n);return(0,sr.createRequestFunction)(i,Tc.default,e,t)})},expand(n,i){return As(this,void 0,void 0,function*(){const s=yield r.expand(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},getStore(n){return As(this,void 0,void 0,function*(){const i=yield r.getStore(n);return(0,sr.createRequestFunction)(i,Tc.default,e,t)})},listObjects(n,i){return As(this,void 0,void 0,function*(){const s=yield r.listObjects(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},listStores(n,i,s){return As(this,void 0,void 0,function*(){const o=yield r.listStores(n,i,s);return(0,sr.createRequestFunction)(o,Tc.default,e,t)})},read(n,i){return As(this,void 0,void 0,function*(){const s=yield r.read(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},readAssertions(n,i){return As(this,void 0,void 0,function*(){const s=yield r.readAssertions(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},readAuthorizationModel(n,i){return As(this,void 0,void 0,function*(){const s=yield r.readAuthorizationModel(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},readAuthorizationModels(n,i,s){return As(this,void 0,void 0,function*(){const o=yield r.readAuthorizationModels(n,i,s);return(0,sr.createRequestFunction)(o,Tc.default,e,t)})},readChanges(n,i,s,o){return As(this,void 0,void 0,function*(){const u=yield r.readChanges(n,i,s,o);return(0,sr.createRequestFunction)(u,Tc.default,e,t)})},write(n,i){return As(this,void 0,void 0,function*(){const s=yield r.write(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})},writeAssertions(n,i,s){return As(this,void 0,void 0,function*(){const o=yield r.writeAssertions(n,i,s);return(0,sr.createRequestFunction)(o,Tc.default,e,t)})},writeAuthorizationModel(n,i){return As(this,void 0,void 0,function*(){const s=yield r.writeAuthorizationModel(n,i);return(0,sr.createRequestFunction)(s,Tc.default,e,t)})}}},"OpenFgaApiFp");Ts.OpenFgaApiFp=Exn;var bxn=a(function(e,t,r){const n=(0,Ts.OpenFgaApiFp)(e,t);return{check(i,s){return n.check(i,s).then(o=>o(r))},createStore(i,s){return n.createStore(i,s).then(o=>o(r))},deleteStore(i){return n.deleteStore(i).then(s=>s(r))},expand(i,s){return n.expand(i,s).then(o=>o(r))},getStore(i){return n.getStore(i).then(s=>s(r))},listObjects(i,s){return n.listObjects(i,s).then(o=>o(r))},listStores(i,s,o){return n.listStores(i,s,o).then(u=>u(r))},read(i,s){return n.read(i,s).then(o=>o(r))},readAssertions(i,s){return n.readAssertions(i,s).then(o=>o(r))},readAuthorizationModel(i,s){return n.readAuthorizationModel(i,s).then(o=>o(r))},readAuthorizationModels(i,s,o){return n.readAuthorizationModels(i,s,o).then(u=>u(r))},readChanges(i,s,o,u){return n.readChanges(i,s,o,u).then(l=>l(r))},write(i,s){return n.write(i,s).then(o=>o(r))},writeAssertions(i,s,o){return n.writeAssertions(i,s,o).then(u=>u(r))},writeAuthorizationModel(i,s){return n.writeAuthorizationModel(i,s).then(o=>o(r))}}},"OpenFgaApiFactory");Ts.OpenFgaApiFactory=bxn;var kRe=class extends _xn.BaseAPI{static{a(this,"OpenFgaApi")}check(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).check(t,r).then(n=>n(this.axios))}createStore(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).createStore(t,r).then(n=>n(this.axios))}deleteStore(t){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).deleteStore(t).then(r=>r(this.axios))}expand(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).expand(t,r).then(n=>n(this.axios))}getStore(t){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).getStore(t).then(r=>r(this.axios))}listObjects(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).listObjects(t,r).then(n=>n(this.axios))}listStores(t,r,n){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).listStores(t,r,n).then(i=>i(this.axios))}read(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).read(t,r).then(n=>n(this.axios))}readAssertions(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).readAssertions(t,r).then(n=>n(this.axios))}readAuthorizationModel(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).readAuthorizationModel(t,r).then(n=>n(this.axios))}readAuthorizationModels(t,r,n){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).readAuthorizationModels(t,r,n).then(i=>i(this.axios))}readChanges(t,r,n,i){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).readChanges(t,r,n,i).then(s=>s(this.axios))}write(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).write(t,r).then(n=>n(this.axios))}writeAssertions(t,r,n){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).writeAssertions(t,r,n).then(i=>i(this.axios))}writeAuthorizationModel(t,r){return(0,Ts.OpenFgaApiFp)(this.configuration,this.credentials).writeAuthorizationModel(t,r).then(n=>n(this.axios))}};Ts.OpenFgaApi=kRe});var rxt=y((w5s,txt)=>{async function*Sxn(e,t,r){const n=new Set;async function i(){const[s,o]=await Promise.race(n);n.delete(s);return o}a(i,"consume");for(const s of t){const o=(async()=>await r(s,t))().then(u=>[o,u]);n.add(o);if(n.size>=e){yield await i()}}while(n.size){yield await i()}}a(Sxn,"asyncPool");txt.exports=Sxn});var nxt=y(ig=>{"use strict";var Ka=ig&&ig.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}a(i,"adopt");return new(r||(r=Promise))(function(s,o){function u(d){try{c(n.next(d))}catch(p){o(p)}}a(u,"fulfilled");function l(d){try{c(n["throw"](d))}catch(p){o(p)}}a(l,"rejected");function c(d){d.done?s(d.value):i(d.value).then(u,l)}a(c,"step");c((n=n.apply(e,t||[])).next())})};var LRe=ig&&ig.__asyncValues||function(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 __values==="function"?__values(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(o){return new Promise(function(u,l){o=e[s](o),i(u,l,o.done,o.value)})}}a(n,"verb");function i(s,o,u,l){Promise.resolve(l).then(function(c){s({value:c,done:u})},o)}a(i,"settle")};Object.defineProperty(ig,"__esModule",{value:true});ig.OpenFgaClient=ig.ClientWriteStatus=void 0;var FRe=rxt();var Axn=DRe();var Cxn=IRe();var BRe=sC();var vd=wRe();var wxn=FF();var MRe=10;var gP="X-OpenFGA-Client-Method";var qRe="X-OpenFGA-Client-Bulk-Request-Id";var yP;(function(e){e["SUCCESS"]="success";e["FAILURE"]="failure"})(yP||(ig.ClientWriteStatus=yP={}));var URe=class extends Cxn.BaseAPI{static{a(this,"OpenFgaClient")}constructor(t,r){super(t,r);this.axios=r;this.api=new Axn.OpenFgaApi(this.configuration,r);this.authorizationModelId=t.authorizationModelId;this.getAuthorizationModelId()}getAuthorizationModelId(t={}){const r=(t===null||t===void 0?void 0:t.authorizationModelId)||this.authorizationModelId;if(r&&!(0,wxn.isWellFormedUlidString)(r)){throw new BRe.FgaValidationError("authorizationModelId")}return r}checkValidApiConnection(t={}){return Ka(this,void 0,void 0,function*(){if(this.getAuthorizationModelId(t)){yield this.readAuthorizationModel(t)}else{yield this.readLatestAuthorizationModel(t)}})}listStores(t={}){return Ka(this,void 0,void 0,function*(){return this.api.listStores(t.pageSize,t.continuationToken,t)})}createStore(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.createStore(t,r)})}getStore(t={}){return Ka(this,void 0,void 0,function*(){return this.api.getStore(t)})}deleteStore(t={}){return Ka(this,void 0,void 0,function*(){return this.api.deleteStore(t)})}readAuthorizationModels(t={}){return Ka(this,void 0,void 0,function*(){return this.api.readAuthorizationModels(t.pageSize,t.continuationToken,t)})}writeAuthorizationModel(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.writeAuthorizationModel(t,r)})}readAuthorizationModel(t={}){return Ka(this,void 0,void 0,function*(){const r=this.getAuthorizationModelId(t);if(!r){throw new BRe.FgaRequiredParamError("ClientConfiguration","authorizationModelId")}return this.api.readAuthorizationModel(r,t)})}readLatestAuthorizationModel(t={}){var r;return Ka(this,void 0,void 0,function*(){const{headers:n={}}=t;(0,vd.setHeaderIfNotSet)(n,gP,"ReadLatestAuthorizationModel");const i=yield this.readAuthorizationModels(Object.assign(Object.assign({},t),{pageSize:1,headers:n}));const s=i;s.authorization_model=(r=i.authorization_models)===null||r===void 0?void 0:r[0];delete s.authorization_models;return s})}readChanges(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.readChanges(t.type,r.pageSize,r.continuationToken,r)})}read(t={},r={}){return Ka(this,void 0,void 0,function*(){const n={page_size:r.pageSize,continuation_token:r.continuationToken};if(t.user||t.object||t.relation){n.tuple_key=t}return this.api.read(n,r)})}write(t,r={}){return Ka(this,void 0,void 0,function*(){const{transaction:n={},headers:i={}}=r;const{maxPerChunk:s=1,maxParallelRequests:o=MRe}=n;const{writes:u,deletes:l}=t;const c=this.getAuthorizationModelId(r);if(!(n===null||n===void 0?void 0:n.disable)){const d={authorization_model_id:c};if(u===null||u===void 0?void 0:u.length){d.writes={tuple_keys:u}}if(l===null||l===void 0?void 0:l.length){d.deletes={tuple_keys:l}}yield this.api.write(d,r);return{writes:(u===null||u===void 0?void 0:u.map(p=>({tuple_key:p,status:yP.SUCCESS})))||[],deletes:(l===null||l===void 0?void 0:l.map(p=>({tuple_key:p,status:yP.SUCCESS})))||[]}}return Promise.all([(()=>Ka(this,void 0,void 0,function*(){var d,p,f,m,h,g,_,v;(0,vd.setHeaderIfNotSet)(i,gP,"Write");(0,vd.setHeaderIfNotSet)(i,qRe,(0,vd.generateRandomIdWithNonUniqueFallback)());const S=[];if(u===null||u===void 0?void 0:u.length){try{for(var E=true,b=LRe(FRe(o,(0,vd.chunkArray)(u,s),R=>this.writeTuples(R,Object.assign(Object.assign({},r),{headers:i,transaction:void 0})).catch(I=>({writes:R.map(D=>({tuple_key:D,status:yP.FAILURE,err:I})),deletes:[]})))),A;A=yield b.next(),d=A.done,!d;E=true){m=A.value;E=false;const R=m;S.push(R.writes)}}catch(R){p={error:R}}finally{try{if(!E&&!d&&(f=b.return))yield f.call(b)}finally{if(p)throw p.error}}}const C=[];if(l===null||l===void 0?void 0:l.length){try{for(var T=true,O=LRe(FRe(o,(0,vd.chunkArray)(l,s),R=>this.deleteTuples(R,Object.assign(Object.assign({},r),{headers:i,transaction:void 0})).catch(I=>({writes:[],deletes:R.map(D=>({tuple_key:D,status:yP.FAILURE,err:I}))})))),P;P=yield O.next(),h=P.done,!h;T=true){v=P.value;T=false;const R=v;C.push(R.deletes)}}catch(R){g={error:R}}finally{try{if(!T&&!h&&(_=O.return))yield _.call(O)}finally{if(g)throw g.error}}}return{writes:S.flat(),deletes:C.flat()}}))(),this.checkValidApiConnection(r)]).then(d=>d[0])})}writeTuples(t,r={}){return Ka(this,void 0,void 0,function*(){const{headers:n={}}=r;(0,vd.setHeaderIfNotSet)(n,gP,"WriteTuples");return this.write({writes:t},Object.assign(Object.assign({},r),{headers:n}))})}deleteTuples(t,r={}){return Ka(this,void 0,void 0,function*(){const{headers:n={}}=r;(0,vd.setHeaderIfNotSet)(n,gP,"DeleteTuples");return this.write({deletes:t},Object.assign(Object.assign({},r),{headers:n}))})}check(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.check({tuple_key:{user:t.user,relation:t.relation,object:t.object},context:t.context,contextual_tuples:{tuple_keys:t.contextualTuples||[]},authorization_model_id:this.getAuthorizationModelId(r)},r)})}batchCheck(t,r={}){return Ka(this,void 0,void 0,function*(){return Promise.all([(()=>Ka(this,void 0,void 0,function*(){var n,i,s,o;const{headers:u={},maxParallelRequests:l=MRe}=r;(0,vd.setHeaderIfNotSet)(u,gP,"BatchCheck");(0,vd.setHeaderIfNotSet)(u,qRe,(0,vd.generateRandomIdWithNonUniqueFallback)());const c=[];try{for(var d=true,p=LRe(FRe(l,t,m=>this.check(m,Object.assign(Object.assign({},r),{headers:u})).then(h=>{h._request=m;return h}).catch(h=>{return{allowed:void 0,error:h,_request:m}}))),f;f=yield p.next(),n=f.done,!n;d=true){o=f.value;d=false;const m=o;c.push(m)}}catch(m){i={error:m}}finally{try{if(!d&&!n&&(s=p.return))yield s.call(p)}finally{if(i)throw i.error}}return{responses:c}}))(),this.checkValidApiConnection(r)]).then(n=>n[0])})}expand(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.expand({authorization_model_id:this.getAuthorizationModelId(r),tuple_key:t},r)})}listObjects(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.listObjects({authorization_model_id:this.getAuthorizationModelId(r),user:t.user,relation:t.relation,type:t.type,context:t.context,contextual_tuples:{tuple_keys:t.contextualTuples||[]}},r)})}listRelations(t,r={}){return Ka(this,void 0,void 0,function*(){const{user:n,object:i,relations:s,contextualTuples:o,context:u}=t;const{headers:l={},maxParallelRequests:c=MRe}=r;(0,vd.setHeaderIfNotSet)(l,gP,"ListRelations");(0,vd.setHeaderIfNotSet)(l,qRe,(0,vd.generateRandomIdWithNonUniqueFallback)());if(!(s===null||s===void 0?void 0:s.length)){throw new BRe.FgaValidationError("relations","When calling listRelations, at least one relation must be passed in the relations field")}const d=yield this.batchCheck(s.map(f=>({user:n,relation:f,object:i,contextualTuples:o,context:u})),Object.assign(Object.assign({},r),{headers:l,maxParallelRequests:c}));const p=d.responses.find(f=>f.error);if(p){throw p.error}return{relations:d.responses.filter(f=>f.allowed).map(f=>f._request.relation)}})}readAssertions(t={}){return Ka(this,void 0,void 0,function*(){return this.api.readAssertions(this.getAuthorizationModelId(t),t)})}writeAssertions(t,r={}){return Ka(this,void 0,void 0,function*(){return this.api.writeAssertions(this.getAuthorizationModelId(r),{assertions:t.map(n=>({tuple_key:{user:n.user,relation:n.relation,object:n.object},expectation:n.expectation}))},r)})}};ig.OpenFgaClient=URe});var cxt=y(Ed=>{"use strict";Object.defineProperty(Ed,"__esModule",{value:true});Ed.TypeName=Ed.TupleOperation=Ed.NullValue=Ed.NotFoundErrorCode=Ed.InternalErrorCode=Ed.ErrorCode=void 0;var ixt;(function(e){e["NoError"]="no_error";e["ValidationError"]="validation_error";e["AuthorizationModelNotFound"]="authorization_model_not_found";e["AuthorizationModelResolutionTooComplex"]="authorization_model_resolution_too_complex";e["InvalidWriteInput"]="invalid_write_input";e["CannotAllowDuplicateTuplesInOneRequest"]="cannot_allow_duplicate_tuples_in_one_request";e["CannotAllowDuplicateTypesInOneRequest"]="cannot_allow_duplicate_types_in_one_request";e["CannotAllowMultipleReferencesToOneRelation"]="cannot_allow_multiple_references_to_one_relation";e["InvalidContinuationToken"]="invalid_continuation_token";e["InvalidTupleSet"]="invalid_tuple_set";e["InvalidCheckInput"]="invalid_check_input";e["InvalidExpandInput"]="invalid_expand_input";e["UnsupportedUserSet"]="unsupported_user_set";e["InvalidObjectFormat"]="invalid_object_format";e["WriteFailedDueToInvalidInput"]="write_failed_due_to_invalid_input";e["AuthorizationModelAssertionsNotFound"]="authorization_model_assertions_not_found";e["LatestAuthorizationModelNotFound"]="latest_authorization_model_not_found";e["TypeNotFound"]="type_not_found";e["RelationNotFound"]="relation_not_found";e["EmptyRelationDefinition"]="empty_relation_definition";e["InvalidUser"]="invalid_user";e["InvalidTuple"]="invalid_tuple";e["UnknownRelation"]="unknown_relation";e["StoreIdInvalidLength"]="store_id_invalid_length";e["AssertionsTooManyItems"]="assertions_too_many_items";e["IdTooLong"]="id_too_long";e["AuthorizationModelIdTooLong"]="authorization_model_id_too_long";e["TupleKeyValueNotSpecified"]="tuple_key_value_not_specified";e["TupleKeysTooManyOrTooFewItems"]="tuple_keys_too_many_or_too_few_items";e["PageSizeInvalid"]="page_size_invalid";e["ParamMissingValue"]="param_missing_value";e["DifferenceBaseMissingValue"]="difference_base_missing_value";e["SubtractBaseMissingValue"]="subtract_base_missing_value";e["ObjectTooLong"]="object_too_long";e["RelationTooLong"]="relation_too_long";e["TypeDefinitionsTooFewItems"]="type_definitions_too_few_items";e["TypeInvalidLength"]="type_invalid_length";e["TypeInvalidPattern"]="type_invalid_pattern";e["RelationsTooFewItems"]="relations_too_few_items";e["RelationsTooLong"]="relations_too_long";e["RelationsInvalidPattern"]="relations_invalid_pattern";e["ObjectInvalidPattern"]="object_invalid_pattern";e["QueryStringTypeContinuationTokenMismatch"]="query_string_type_continuation_token_mismatch";e["ExceededEntityLimit"]="exceeded_entity_limit";e["InvalidContextualTuple"]="invalid_contextual_tuple";e["DuplicateContextualTuple"]="duplicate_contextual_tuple";e["InvalidAuthorizationModel"]="invalid_authorization_model";e["UnsupportedSchemaVersion"]="unsupported_schema_version"})(ixt||(Ed.ErrorCode=ixt={}));var sxt;(function(e){e["NoInternalError"]="no_internal_error";e["InternalError"]="internal_error";e["Cancelled"]="cancelled";e["DeadlineExceeded"]="deadline_exceeded";e["AlreadyExists"]="already_exists";e["ResourceExhausted"]="resource_exhausted";e["FailedPrecondition"]="failed_precondition";e["Aborted"]="aborted";e["OutOfRange"]="out_of_range";e["Unavailable"]="unavailable";e["DataLoss"]="data_loss"})(sxt||(Ed.InternalErrorCode=sxt={}));var axt;(function(e){e["NoNotFoundError"]="no_not_found_error";e["UndefinedEndpoint"]="undefined_endpoint";e["StoreIdNotFound"]="store_id_not_found";e["Unimplemented"]="unimplemented"})(axt||(Ed.NotFoundErrorCode=axt={}));var oxt;(function(e){e["NullValue"]="NULL_VALUE"})(oxt||(Ed.NullValue=oxt={}));var uxt;(function(e){e["Write"]="TUPLE_OPERATION_WRITE";e["Delete"]="TUPLE_OPERATION_DELETE"})(uxt||(Ed.TupleOperation=uxt={}));var lxt;(function(e){e["Unspecified"]="TYPE_NAME_UNSPECIFIED";e["Any"]="TYPE_NAME_ANY";e["Bool"]="TYPE_NAME_BOOL";e["String"]="TYPE_NAME_STRING";e["Int"]="TYPE_NAME_INT";e["Uint"]="TYPE_NAME_UINT";e["Double"]="TYPE_NAME_DOUBLE";e["Duration"]="TYPE_NAME_DURATION";e["Timestamp"]="TYPE_NAME_TIMESTAMP";e["Map"]="TYPE_NAME_MAP";e["List"]="TYPE_NAME_LIST";e["Ipaddress"]="TYPE_NAME_IPADDRESS"})(lxt||(Ed.TypeName=lxt={}))});var fxt=y(Au=>{"use strict";var Txn=Au&&Au.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var $J=Au&&Au.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))Txn(t,e,r)};Object.defineProperty(Au,"__esModule",{value:true});Au.CredentialsMethod=Au.Credentials=Au.GetDefaultRetryParams=Au.Configuration=void 0;$J(DRe(),Au);$J(nxt(),Au);$J(cxt(),Au);var dxt=CRe();Object.defineProperty(Au,"Configuration",{enumerable:true,get:function(){return dxt.Configuration}});Object.defineProperty(Au,"GetDefaultRetryParams",{enumerable:true,get:function(){return dxt.GetDefaultRetryParams}});var pxt=qJ();Object.defineProperty(Au,"Credentials",{enumerable:true,get:function(){return pxt.Credentials}});Object.defineProperty(Au,"CredentialsMethod",{enumerable:true,get:function(){return pxt.CredentialsMethod}});$J(sC(),Au)});var hxt=y(_P=>{"use strict";var xxn=_P&&_P.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(_P,"__esModule",{value:true});_P.OpenFGAService=void 0;var qF=xxn(qp());var mxt=fxt();var Rxn=tP();var $Re=class{static{a(this,"OpenFGAService")}logger;openFGAClient;baseUrl;apiHost;storeId;modelId;userSub;constructor(t,r){if(!qF.default.OPENFGA_SERVICE_URL){throw new Error("OPENFGA_SERVICE_URL is not set")}this.userSub=r&&r.userSub?r.userSub:t.getUserSub();this.baseUrl=qF.default.OPENFGA_SERVICE_URL;this.apiHost=qF.default.OPENFGA_SERVICE_URL.replace(/^(https:\/\/)/,"");this.storeId=qF.default.OPENFGA_STORE_ID;this.modelId=qF.default.OPENFGA_MODEL_ID;this.logger=t.log}async getOpenFgaClient(){if(!this.openFGAClient){const t=await(0,Rxn.getServiceAccountIdToken)(this.baseUrl);this.openFGAClient=new mxt.OpenFgaClient({apiScheme:"https",apiHost:this.apiHost,storeId:this.storeId,authorizationModelId:this.modelId,credentials:{method:mxt.CredentialsMethod.ApiToken,config:{token:t}}})}return this.openFGAClient}async createAccountMember(t){try{const r=await this.getOpenFgaClient();await r.write({writes:[{user:`user:${this.userSub}`,relation:"admin",object:`account:${t}`}]})}catch(r){this.logger.warn(`RBAC failed to create account membership. Error: ${r.message}`)}}async getAccountMemberships(){const t=await this.getOpenFgaClient();const r=await t.listObjects({user:`user:${this.userSub}`,relation:"member",type:"account"});if(r){return r.objects.map(n=>n.replace(/^(account:)/,""))}return[]}async isAccountMember(t){try{const r=await this.getOpenFgaClient();const{allowed:n}=await r.check({user:`user:${this.userSub}`,relation:"member",object:`account:${t}`});if(!n){return false}return n}catch(r){this.logger.warn(`RBAC failed to check account membership. Error: ${r.message}`);return false}}async isZuploAdmin(){try{const t=await this.getOpenFgaClient();const{tuples:r}=await t.read({object:"role:zuplo-admin"});const n=[];r.forEach(i=>{const s=i.key.user.replace(/^(user:)/,"");n.push(s)});return n.includes(this.userSub)}catch(t){this.logger.warn(`RBAC failed to check for zuplo admin. Error: ${t.message}`);return false}}async isDeployerServiceAccount(){try{const t=await this.getOpenFgaClient();const{tuples:r}=await t.read({object:"role:zuplo-deployer"});const n=[];r.forEach(i=>{const s=i.key.user.replace(/^(user:)/,"");n.push(s)});return n.includes(this.userSub)}catch(t){this.logger.warn(`RBAC failed to check for zuplo deployer. Error: ${t.message}`);return false}}async createProjectAccountAssociation(t,r){try{const n=await this.getOpenFgaClient();await n.write({writes:[{user:`account:${t}`,relation:"associated_account",object:`project:${r}`}]})}catch(n){this.logger.warn(`RBAC failed to create account-project association. Error: ${n.message}`)}}async deleteProjectAccountAssociation(t,r){try{const n=await this.getOpenFgaClient();await n.write({deletes:[{user:`account:${t}`,relation:"associated_account",object:`project:${r}`}]})}catch(n){this.logger.warn(`RBAC failed to delete account-project association. Error: ${n.message}`)}}};_P.OpenFGAService=$Re});var _xt=y(vP=>{"use strict";var yxt=vP&&vP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(vP,"__esModule",{value:true});vP.TenantService=void 0;var Oxn=yxt(n0());var gxt=yxt(qp());var Pxn=gJ();var Nxn=new Oxn.default({max:500,maxAge:1e3*60*50});var jRe=class extends Pxn.ApiServiceClient{static{a(this,"TenantService")}constructor(t,r){if(!gxt.default.TENANT_API_URL){throw new Error("TENANT_API_URL is not set")}const n=r&&r.userSub?r.userSub:t.getUserSub();super(gxt.default.TENANT_API_URL,Nxn,{userSub:n,logger:t.log,requestId:t.id})}};vP.TenantService=jRe});var vxt=y(sg=>{"use strict";Object.defineProperty(sg,"__esModule",{value:true});sg.validateHostname=sg.kebabCase=sg.snakeCase=sg.sizeInBytes=void 0;function Ixn(e){return new TextEncoder().encode(JSON.stringify(e)).length}a(Ixn,"sizeInBytes");sg.sizeInBytes=Ixn;function kxn(e){if(!e||e===null){return""}return e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)?.map(t=>t.toLowerCase()).join("_")}a(kxn,"snakeCase");sg.snakeCase=kxn;function Dxn(e){if(!e||e===null){return""}const t=e.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g);if(t===null){return""}return t.map(r=>r.toLowerCase()).join("-")}a(Dxn,"kebabCase");sg.kebabCase=Dxn;function Lxn(e){try{const t=/^(?!https?:\/\/)([a-zA-Z0-9.-]*|(\*))*\.[a-zA-Z]+$/;if(e&&!t.test(e)){return false}return true}catch(t){}return false}a(Lxn,"validateHostname");sg.validateHostname=Lxn});var Sxt=y(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:true});_e.Type=_e.JsonType=_e.JavaScriptTypeBuilder=_e.JsonTypeBuilder=_e.TypeBuilder=_e.TypeBuilderError=_e.TransformEncodeBuilder=_e.TransformDecodeBuilder=_e.TemplateLiteralDslParser=_e.TemplateLiteralGenerator=_e.TemplateLiteralGeneratorError=_e.TemplateLiteralFinite=_e.TemplateLiteralFiniteError=_e.TemplateLiteralParser=_e.TemplateLiteralParserError=_e.TemplateLiteralResolver=_e.TemplateLiteralPattern=_e.TemplateLiteralPatternError=_e.UnionResolver=_e.KeyArrayResolver=_e.KeyArrayResolverError=_e.KeyResolver=_e.ObjectMap=_e.Intrinsic=_e.IndexedAccessor=_e.TypeClone=_e.TypeExtends=_e.TypeExtendsResult=_e.TypeExtendsError=_e.ExtendsUndefined=_e.TypeGuard=_e.TypeGuardUnknownTypeError=_e.ValueGuard=_e.FormatRegistry=_e.TypeBoxError=_e.TypeRegistry=_e.PatternStringExact=_e.PatternNumberExact=_e.PatternBooleanExact=_e.PatternString=_e.PatternNumber=_e.PatternBoolean=_e.Kind=_e.Hint=_e.Optional=_e.Readonly=_e.Transform=void 0;_e.Transform=Symbol.for("TypeBox.Transform");_e.Readonly=Symbol.for("TypeBox.Readonly");_e.Optional=Symbol.for("TypeBox.Optional");_e.Hint=Symbol.for("TypeBox.Hint");_e.Kind=Symbol.for("TypeBox.Kind");_e.PatternBoolean="(true|false)";_e.PatternNumber="(0|[1-9][0-9]*)";_e.PatternString="(.*)";_e.PatternBooleanExact=`^${_e.PatternBoolean}$`;_e.PatternNumberExact=`^${_e.PatternNumber}$`;_e.PatternStringExact=`^${_e.PatternString}$`;var GRe;(function(e){const t=new Map;function r(){return new Map(t)}a(r,"Entries");e.Entries=r;function n(){return t.clear()}a(n,"Clear");e.Clear=n;function i(l){return t.delete(l)}a(i,"Delete");e.Delete=i;function s(l){return t.has(l)}a(s,"Has");e.Has=s;function o(l,c){t.set(l,c)}a(o,"Set");e.Set=o;function u(l){return t.get(l)}a(u,"Get");e.Get=u})(GRe||(_e.TypeRegistry=GRe={}));var mh=class extends Error{static{a(this,"TypeBoxError")}constructor(t){super(t)}};_e.TypeBoxError=mh;var Ext;(function(e){const t=new Map;function r(){return new Map(t)}a(r,"Entries");e.Entries=r;function n(){return t.clear()}a(n,"Clear");e.Clear=n;function i(l){return t.delete(l)}a(i,"Delete");e.Delete=i;function s(l){return t.has(l)}a(s,"Has");e.Has=s;function o(l,c){t.set(l,c)}a(o,"Set");e.Set=o;function u(l){return t.get(l)}a(u,"Get");e.Get=u})(Ext||(_e.FormatRegistry=Ext={}));var Jt;(function(e){function t(c){return Array.isArray(c)}a(t,"IsArray");e.IsArray=t;function r(c){return typeof c==="bigint"}a(r,"IsBigInt");e.IsBigInt=r;function n(c){return typeof c==="boolean"}a(n,"IsBoolean");e.IsBoolean=n;function i(c){return c===null}a(i,"IsNull");e.IsNull=i;function s(c){return typeof c==="number"}a(s,"IsNumber");e.IsNumber=s;function o(c){return typeof c==="object"&&c!==null}a(o,"IsObject");e.IsObject=o;function u(c){return typeof c==="string"}a(u,"IsString");e.IsString=u;function l(c){return c===void 0}a(l,"IsUndefined");e.IsUndefined=l})(Jt||(_e.ValueGuard=Jt={}));var HRe=class extends mh{static{a(this,"TypeGuardUnknownTypeError")}};_e.TypeGuardUnknownTypeError=HRe;var Ee;(function(e){function t(L){try{new RegExp(L);return true}catch{return false}}a(t,"IsPattern");function r(L){if(!Jt.IsString(L))return false;for(let Se=0;Se<L.length;Se++){const Le=L.charCodeAt(Se);if(Le>=7&&Le<=13||Le===27||Le===127){return false}}return true}a(r,"IsControlCharacterFree");function n(L){return o(L)||se(L)}a(n,"IsAdditionalProperties");function i(L){return Jt.IsUndefined(L)||Jt.IsBigInt(L)}a(i,"IsOptionalBigInt");function s(L){return Jt.IsUndefined(L)||Jt.IsNumber(L)}a(s,"IsOptionalNumber");function o(L){return Jt.IsUndefined(L)||Jt.IsBoolean(L)}a(o,"IsOptionalBoolean");function u(L){return Jt.IsUndefined(L)||Jt.IsString(L)}a(u,"IsOptionalString");function l(L){return Jt.IsUndefined(L)||Jt.IsString(L)&&r(L)&&t(L)}a(l,"IsOptionalPattern");function c(L){return Jt.IsUndefined(L)||Jt.IsString(L)&&r(L)}a(c,"IsOptionalFormat");function d(L){return Jt.IsUndefined(L)||se(L)}a(d,"IsOptionalSchema");function p(L){return C(L,"Any")&&u(L.$id)}a(p,"TAny");e.TAny=p;function f(L){return C(L,"Array")&&L.type==="array"&&u(L.$id)&&se(L.items)&&s(L.minItems)&&s(L.maxItems)&&o(L.uniqueItems)&&d(L.contains)&&s(L.minContains)&&s(L.maxContains)}a(f,"TArray");e.TArray=f;function m(L){return C(L,"AsyncIterator")&&L.type==="AsyncIterator"&&u(L.$id)&&se(L.items)}a(m,"TAsyncIterator");e.TAsyncIterator=m;function h(L){return C(L,"BigInt")&&L.type==="bigint"&&u(L.$id)&&i(L.exclusiveMaximum)&&i(L.exclusiveMinimum)&&i(L.maximum)&&i(L.minimum)&&i(L.multipleOf)}a(h,"TBigInt");e.TBigInt=h;function g(L){return C(L,"Boolean")&&L.type==="boolean"&&u(L.$id)}a(g,"TBoolean");e.TBoolean=g;function _(L){return C(L,"Constructor")&&L.type==="constructor"&&u(L.$id)&&Jt.IsArray(L.parameters)&&L.parameters.every(Se=>se(Se))&&se(L.returns)}a(_,"TConstructor");e.TConstructor=_;function v(L){return C(L,"Date")&&L.type==="Date"&&u(L.$id)&&s(L.exclusiveMaximumTimestamp)&&s(L.exclusiveMinimumTimestamp)&&s(L.maximumTimestamp)&&s(L.minimumTimestamp)&&s(L.multipleOfTimestamp)}a(v,"TDate");e.TDate=v;function S(L){return C(L,"Function")&&L.type==="function"&&u(L.$id)&&Jt.IsArray(L.parameters)&&L.parameters.every(Se=>se(Se))&&se(L.returns)}a(S,"TFunction");e.TFunction=S;function E(L){return C(L,"Integer")&&L.type==="integer"&&u(L.$id)&&s(L.exclusiveMaximum)&&s(L.exclusiveMinimum)&&s(L.maximum)&&s(L.minimum)&&s(L.multipleOf)}a(E,"TInteger");e.TInteger=E;function b(L){return C(L,"Intersect")&&(Jt.IsString(L.type)&&L.type!=="object"?false:true)&&Jt.IsArray(L.allOf)&&L.allOf.every(Se=>se(Se)&&!De(Se))&&u(L.type)&&(o(L.unevaluatedProperties)||d(L.unevaluatedProperties))&&u(L.$id)}a(b,"TIntersect");e.TIntersect=b;function A(L){return C(L,"Iterator")&&L.type==="Iterator"&&u(L.$id)&&se(L.items)}a(A,"TIterator");e.TIterator=A;function C(L,Se){return T(L)&&L[_e.Kind]===Se}a(C,"TKindOf");e.TKindOf=C;function T(L){return Jt.IsObject(L)&&_e.Kind in L&&Jt.IsString(L[_e.Kind])}a(T,"TKind");e.TKind=T;function O(L){return I(L)&&Jt.IsString(L.const)}a(O,"TLiteralString");e.TLiteralString=O;function P(L){return I(L)&&Jt.IsNumber(L.const)}a(P,"TLiteralNumber");e.TLiteralNumber=P;function R(L){return I(L)&&Jt.IsBoolean(L.const)}a(R,"TLiteralBoolean");e.TLiteralBoolean=R;function I(L){return C(L,"Literal")&&u(L.$id)&&(Jt.IsBoolean(L.const)||Jt.IsNumber(L.const)||Jt.IsString(L.const))}a(I,"TLiteral");e.TLiteral=I;function D(L){return C(L,"Never")&&Jt.IsObject(L.not)&&Object.getOwnPropertyNames(L.not).length===0}a(D,"TNever");e.TNever=D;function U(L){return C(L,"Not")&&se(L.not)}a(U,"TNot");e.TNot=U;function te(L){return C(L,"Null")&&L.type==="null"&&u(L.$id)}a(te,"TNull");e.TNull=te;function ve(L){return C(L,"Number")&&L.type==="number"&&u(L.$id)&&s(L.exclusiveMaximum)&&s(L.exclusiveMinimum)&&s(L.maximum)&&s(L.minimum)&&s(L.multipleOf)}a(ve,"TNumber");e.TNumber=ve;function me(L){return C(L,"Object")&&L.type==="object"&&u(L.$id)&&Jt.IsObject(L.properties)&&n(L.additionalProperties)&&s(L.minProperties)&&s(L.maxProperties)&&Object.entries(L.properties).every(([Se,Le])=>r(Se)&&se(Le))}a(me,"TObject");e.TObject=me;function he(L){return C(L,"Promise")&&L.type==="Promise"&&u(L.$id)&&se(L.item)}a(he,"TPromise");e.TPromise=he;function Fe(L){return C(L,"Record")&&L.type==="object"&&u(L.$id)&&n(L.additionalProperties)&&Jt.IsObject(L.patternProperties)&&(Se=>{const Le=Object.getOwnPropertyNames(Se.patternProperties);return Le.length===1&&t(Le[0])&&Jt.IsObject(Se.patternProperties)&&se(Se.patternProperties[Le[0]])})(L)}a(Fe,"TRecord");e.TRecord=Fe;function Oe(L){return Jt.IsObject(L)&&_e.Hint in L&&L[_e.Hint]==="Recursive"}a(Oe,"TRecursive");e.TRecursive=Oe;function M(L){return C(L,"Ref")&&u(L.$id)&&Jt.IsString(L.$ref)}a(M,"TRef");e.TRef=M;function Q(L){return C(L,"String")&&L.type==="string"&&u(L.$id)&&s(L.minLength)&&s(L.maxLength)&&l(L.pattern)&&c(L.format)}a(Q,"TString");e.TString=Q;function fe(L){return C(L,"Symbol")&&L.type==="symbol"&&u(L.$id)}a(fe,"TSymbol");e.TSymbol=fe;function B(L){return C(L,"TemplateLiteral")&&L.type==="string"&&Jt.IsString(L.pattern)&&L.pattern[0]==="^"&&L.pattern[L.pattern.length-1]==="$"}a(B,"TTemplateLiteral");e.TTemplateLiteral=B;function ye(L){return C(L,"This")&&u(L.$id)&&Jt.IsString(L.$ref)}a(ye,"TThis");e.TThis=ye;function De(L){return Jt.IsObject(L)&&_e.Transform in L}a(De,"TTransform");e.TTransform=De;function $e(L){return C(L,"Tuple")&&L.type==="array"&&u(L.$id)&&Jt.IsNumber(L.minItems)&&Jt.IsNumber(L.maxItems)&&L.minItems===L.maxItems&&(Jt.IsUndefined(L.items)&&Jt.IsUndefined(L.additionalItems)&&L.minItems===0||Jt.IsArray(L.items)&&L.items.every(Se=>se(Se)))}a($e,"TTuple");e.TTuple=$e;function gt(L){return C(L,"Undefined")&&L.type==="undefined"&&u(L.$id)}a(gt,"TUndefined");e.TUndefined=gt;function ut(L){return F(L)&&L.anyOf.every(Se=>O(Se)||P(Se))}a(ut,"TUnionLiteral");e.TUnionLiteral=ut;function F(L){return C(L,"Union")&&u(L.$id)&&Jt.IsObject(L)&&Jt.IsArray(L.anyOf)&&L.anyOf.every(Se=>se(Se))}a(F,"TUnion");e.TUnion=F;function G(L){return C(L,"Uint8Array")&&L.type==="Uint8Array"&&u(L.$id)&&s(L.minByteLength)&&s(L.maxByteLength)}a(G,"TUint8Array");e.TUint8Array=G;function $(L){return C(L,"Unknown")&&u(L.$id)}a($,"TUnknown");e.TUnknown=$;function K(L){return C(L,"Unsafe")}a(K,"TUnsafe");e.TUnsafe=K;function pe(L){return C(L,"Void")&&L.type==="void"&&u(L.$id)}a(pe,"TVoid");e.TVoid=pe;function H(L){return Jt.IsObject(L)&&L[_e.Readonly]==="Readonly"}a(H,"TReadonly");e.TReadonly=H;function de(L){return Jt.IsObject(L)&&L[_e.Optional]==="Optional"}a(de,"TOptional");e.TOptional=de;function se(L){return Jt.IsObject(L)&&(p(L)||f(L)||g(L)||h(L)||m(L)||_(L)||v(L)||S(L)||E(L)||b(L)||A(L)||I(L)||D(L)||U(L)||te(L)||ve(L)||me(L)||he(L)||Fe(L)||M(L)||Q(L)||fe(L)||B(L)||ye(L)||$e(L)||gt(L)||F(L)||G(L)||$(L)||K(L)||pe(L)||T(L)&&GRe.Has(L[_e.Kind]))}a(se,"TSchema");e.TSchema=se})(Ee||(_e.TypeGuard=Ee={}));var bxt;(function(e){function t(r){return r[_e.Kind]==="Intersect"?r.allOf.every(n=>t(n)):r[_e.Kind]==="Union"?r.anyOf.some(n=>t(n)):r[_e.Kind]==="Undefined"?true:r[_e.Kind]==="Not"?!t(r.not):false}a(t,"Check");e.Check=t})(bxt||(_e.ExtendsUndefined=bxt={}));var jJ=class extends mh{static{a(this,"TypeExtendsError")}};_e.TypeExtendsError=jJ;var at;(function(e){e[e["Union"]=0]="Union";e[e["True"]=1]="True";e[e["False"]=2]="False"})(at||(_e.TypeExtendsResult=at={}));var oC;(function(e){function t(N){return N===at.False?N:at.True}a(t,"IntoBooleanResult");function r(N){throw new jJ(N)}a(r,"Throw");function n(N){return Ee.TNever(N)||Ee.TIntersect(N)||Ee.TUnion(N)||Ee.TUnknown(N)||Ee.TAny(N)}a(n,"IsStructuralRight");function i(N,k){return Ee.TNever(k)?C(N,k):Ee.TIntersect(k)?S(N,k):Ee.TUnion(k)?Mt(N,k):Ee.TUnknown(k)?Ur(N,k):Ee.TAny(k)?s(N,k):r("StructuralRight")}a(i,"StructuralRight");function s(N,k){return at.True}a(s,"TAnyRight");function o(N,k){return Ee.TIntersect(k)?S(N,k):Ee.TUnion(k)&&k.anyOf.some(Ae=>Ee.TAny(Ae)||Ee.TUnknown(Ae))?at.True:Ee.TUnion(k)?at.Union:Ee.TUnknown(k)?at.True:Ee.TAny(k)?at.True:at.Union}a(o,"TAny");function u(N,k){return Ee.TUnknown(N)?at.False:Ee.TAny(N)?at.Union:Ee.TNever(N)?at.True:at.False}a(u,"TArrayRight");function l(N,k){return Ee.TObject(k)&&B(k)?at.True:n(k)?i(N,k):!Ee.TArray(k)?at.False:t(J(N.items,k.items))}a(l,"TArray");function c(N,k){return n(k)?i(N,k):!Ee.TAsyncIterator(k)?at.False:t(J(N.items,k.items))}a(c,"TAsyncIterator");function d(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TBigInt(k)?at.True:at.False}a(d,"TBigInt");function p(N,k){return Ee.TLiteral(N)&&Jt.IsBoolean(N.const)?at.True:Ee.TBoolean(N)?at.True:at.False}a(p,"TBooleanRight");function f(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TBoolean(k)?at.True:at.False}a(f,"TBoolean");function m(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):!Ee.TConstructor(k)?at.False:N.parameters.length>k.parameters.length?at.False:!N.parameters.every((Ae,Be)=>t(J(k.parameters[Be],Ae))===at.True)?at.False:t(J(N.returns,k.returns))}a(m,"TConstructor");function h(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TDate(k)?at.True:at.False}a(h,"TDate");function g(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):!Ee.TFunction(k)?at.False:N.parameters.length>k.parameters.length?at.False:!N.parameters.every((Ae,Be)=>t(J(k.parameters[Be],Ae))===at.True)?at.False:t(J(N.returns,k.returns))}a(g,"TFunction");function _(N,k){return Ee.TLiteral(N)&&Jt.IsNumber(N.const)?at.True:Ee.TNumber(N)||Ee.TInteger(N)?at.True:at.False}a(_,"TIntegerRight");function v(N,k){return Ee.TInteger(k)||Ee.TNumber(k)?at.True:n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):at.False}a(v,"TInteger");function S(N,k){return k.allOf.every(Ae=>J(N,Ae)===at.True)?at.True:at.False}a(S,"TIntersectRight");function E(N,k){return N.allOf.some(Ae=>J(Ae,k)===at.True)?at.True:at.False}a(E,"TIntersect");function b(N,k){return n(k)?i(N,k):!Ee.TIterator(k)?at.False:t(J(N.items,k.items))}a(b,"TIterator");function A(N,k){return Ee.TLiteral(k)&&k.const===N.const?at.True:n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TString(k)?pe(N,k):Ee.TNumber(k)?I(N,k):Ee.TInteger(k)?_(N,k):Ee.TBoolean(k)?p(N,k):at.False}a(A,"TLiteral");function C(N,k){return at.False}a(C,"TNeverRight");function T(N,k){return at.True}a(T,"TNever");function O(N){let[k,Ae]=[N,0];while(true){if(!Ee.TNot(k))break;k=k.not;Ae+=1}return Ae%2===0?k:_e.Type.Unknown()}a(O,"UnwrapTNot");function P(N,k){return Ee.TNot(N)?J(O(N),k):Ee.TNot(k)?J(N,O(k)):r("Invalid fallthrough for Not")}a(P,"TNot");function R(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TNull(k)?at.True:at.False}a(R,"TNull");function I(N,k){return Ee.TLiteralNumber(N)?at.True:Ee.TNumber(N)||Ee.TInteger(N)?at.True:at.False}a(I,"TNumberRight");function D(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TInteger(k)||Ee.TNumber(k)?at.True:at.False}a(D,"TNumber");function U(N,k){return Object.getOwnPropertyNames(N.properties).length===k}a(U,"IsObjectPropertyCount");function te(N){return B(N)}a(te,"IsObjectStringLike");function ve(N){return U(N,0)||U(N,1)&&"description"in N.properties&&Ee.TUnion(N.properties.description)&&N.properties.description.anyOf.length===2&&(Ee.TString(N.properties.description.anyOf[0])&&Ee.TUndefined(N.properties.description.anyOf[1])||Ee.TString(N.properties.description.anyOf[1])&&Ee.TUndefined(N.properties.description.anyOf[0]))}a(ve,"IsObjectSymbolLike");function me(N){return U(N,0)}a(me,"IsObjectNumberLike");function he(N){return U(N,0)}a(he,"IsObjectBooleanLike");function Fe(N){return U(N,0)}a(Fe,"IsObjectBigIntLike");function Oe(N){return U(N,0)}a(Oe,"IsObjectDateLike");function M(N){return B(N)}a(M,"IsObjectUint8ArrayLike");function Q(N){const k=_e.Type.Number();return U(N,0)||U(N,1)&&"length"in N.properties&&t(J(N.properties["length"],k))===at.True}a(Q,"IsObjectFunctionLike");function fe(N){return U(N,0)}a(fe,"IsObjectConstructorLike");function B(N){const k=_e.Type.Number();return U(N,0)||U(N,1)&&"length"in N.properties&&t(J(N.properties["length"],k))===at.True}a(B,"IsObjectArrayLike");function ye(N){const k=_e.Type.Function([_e.Type.Any()],_e.Type.Any());return U(N,0)||U(N,1)&&"then"in N.properties&&t(J(N.properties["then"],k))===at.True}a(ye,"IsObjectPromiseLike");function De(N,k){return J(N,k)===at.False?at.False:Ee.TOptional(N)&&!Ee.TOptional(k)?at.False:at.True}a(De,"Property");function $e(N,k){return Ee.TUnknown(N)?at.False:Ee.TAny(N)?at.Union:Ee.TNever(N)||Ee.TLiteralString(N)&&te(k)||Ee.TLiteralNumber(N)&&me(k)||Ee.TLiteralBoolean(N)&&he(k)||Ee.TSymbol(N)&&ve(k)||Ee.TBigInt(N)&&Fe(k)||Ee.TString(N)&&te(k)||Ee.TSymbol(N)&&ve(k)||Ee.TNumber(N)&&me(k)||Ee.TInteger(N)&&me(k)||Ee.TBoolean(N)&&he(k)||Ee.TUint8Array(N)&&M(k)||Ee.TDate(N)&&Oe(k)||Ee.TConstructor(N)&&fe(k)||Ee.TFunction(N)&&Q(k)?at.True:Ee.TRecord(N)&&Ee.TString(F(N))?(()=>{return k[_e.Hint]==="Record"?at.True:at.False})():Ee.TRecord(N)&&Ee.TNumber(F(N))?(()=>{return U(k,0)?at.True:at.False})():at.False}a($e,"TObjectRight");function gt(N,k){return n(k)?i(N,k):Ee.TRecord(k)?$(N,k):!Ee.TObject(k)?at.False:(()=>{for(const Ae of Object.getOwnPropertyNames(k.properties)){if(!(Ae in N.properties))return at.False;if(De(N.properties[Ae],k.properties[Ae])===at.False){return at.False}}return at.True})()}a(gt,"TObject");function ut(N,k){return n(k)?i(N,k):Ee.TObject(k)&&ye(k)?at.True:!Ee.TPromise(k)?at.False:t(J(N.item,k.item))}a(ut,"TPromise");function F(N){return _e.PatternNumberExact in N.patternProperties?_e.Type.Number():_e.PatternStringExact in N.patternProperties?_e.Type.String():r("Unknown record key pattern")}a(F,"RecordKey");function G(N){return _e.PatternNumberExact in N.patternProperties?N.patternProperties[_e.PatternNumberExact]:_e.PatternStringExact in N.patternProperties?N.patternProperties[_e.PatternStringExact]:r("Unable to get record value schema")}a(G,"RecordValue");function $(N,k){const[Ae,Be]=[F(k),G(k)];return Ee.TLiteralString(N)&&Ee.TNumber(Ae)&&t(J(N,Be))===at.True?at.True:Ee.TUint8Array(N)&&Ee.TNumber(Ae)?J(N,Be):Ee.TString(N)&&Ee.TNumber(Ae)?J(N,Be):Ee.TArray(N)&&Ee.TNumber(Ae)?J(N,Be):Ee.TObject(N)?(()=>{for(const et of Object.getOwnPropertyNames(N.properties)){if(De(Be,N.properties[et])===at.False){return at.False}}return at.True})():at.False}a($,"TRecordRight");function K(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):!Ee.TRecord(k)?at.False:J(G(N),G(k))}a(K,"TRecord");function pe(N,k){return Ee.TLiteral(N)&&Jt.IsString(N.const)?at.True:Ee.TString(N)?at.True:at.False}a(pe,"TStringRight");function H(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TString(k)?at.True:at.False}a(H,"TString");function de(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TSymbol(k)?at.True:at.False}a(de,"TSymbol");function se(N,k){return Ee.TTemplateLiteral(N)?J(xy.Resolve(N),k):Ee.TTemplateLiteral(k)?J(N,xy.Resolve(k)):r("Invalid fallthrough for TemplateLiteral")}a(se,"TTemplateLiteral");function L(N,k){return Ee.TArray(k)&&N.items!==void 0&&N.items.every(Ae=>J(Ae,k.items)===at.True)}a(L,"IsArrayOfTuple");function Se(N,k){return Ee.TNever(N)?at.True:Ee.TUnknown(N)?at.False:Ee.TAny(N)?at.Union:at.False}a(Se,"TTupleRight");function Le(N,k){return n(k)?i(N,k):Ee.TObject(k)&&B(k)?at.True:Ee.TArray(k)&&L(N,k)?at.True:!Ee.TTuple(k)?at.False:Jt.IsUndefined(N.items)&&!Jt.IsUndefined(k.items)||!Jt.IsUndefined(N.items)&&Jt.IsUndefined(k.items)?at.False:Jt.IsUndefined(N.items)&&!Jt.IsUndefined(k.items)?at.True:N.items.every((Ae,Be)=>J(Ae,k.items[Be])===at.True)?at.True:at.False}a(Le,"TTuple");function Ke(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TUint8Array(k)?at.True:at.False}a(Ke,"TUint8Array");function St(N,k){return n(k)?i(N,k):Ee.TObject(k)?$e(N,k):Ee.TRecord(k)?$(N,k):Ee.TVoid(k)?j(N,k):Ee.TUndefined(k)?at.True:at.False}a(St,"TUndefined");function Mt(N,k){return k.anyOf.some(Ae=>J(N,Ae)===at.True)?at.True:at.False}a(Mt,"TUnionRight");function _r(N,k){return N.anyOf.every(Ae=>J(Ae,k)===at.True)?at.True:at.False}a(_r,"TUnion");function Ur(N,k){return at.True}a(Ur,"TUnknownRight");function Ve(N,k){return Ee.TNever(k)?C(N,k):Ee.TIntersect(k)?S(N,k):Ee.TUnion(k)?Mt(N,k):Ee.TAny(k)?s(N,k):Ee.TString(k)?pe(N,k):Ee.TNumber(k)?I(N,k):Ee.TInteger(k)?_(N,k):Ee.TBoolean(k)?p(N,k):Ee.TArray(k)?u(N,k):Ee.TTuple(k)?Se(N,k):Ee.TObject(k)?$e(N,k):Ee.TUnknown(k)?at.True:at.False}a(Ve,"TUnknown");function j(N,k){return Ee.TUndefined(N)?at.True:Ee.TUndefined(N)?at.True:at.False}a(j,"VoidRight");function q(N,k){return Ee.TIntersect(k)?S(N,k):Ee.TUnion(k)?Mt(N,k):Ee.TUnknown(k)?Ur(N,k):Ee.TAny(k)?s(N,k):Ee.TObject(k)?$e(N,k):Ee.TVoid(k)?at.True:at.False}a(q,"TVoid");function J(N,k){return Ee.TTemplateLiteral(N)||Ee.TTemplateLiteral(k)?se(N,k):Ee.TNot(N)||Ee.TNot(k)?P(N,k):Ee.TAny(N)?o(N,k):Ee.TArray(N)?l(N,k):Ee.TBigInt(N)?d(N,k):Ee.TBoolean(N)?f(N,k):Ee.TAsyncIterator(N)?c(N,k):Ee.TConstructor(N)?m(N,k):Ee.TDate(N)?h(N,k):Ee.TFunction(N)?g(N,k):Ee.TInteger(N)?v(N,k):Ee.TIntersect(N)?E(N,k):Ee.TIterator(N)?b(N,k):Ee.TLiteral(N)?A(N,k):Ee.TNever(N)?T(N,k):Ee.TNull(N)?R(N,k):Ee.TNumber(N)?D(N,k):Ee.TObject(N)?gt(N,k):Ee.TRecord(N)?K(N,k):Ee.TString(N)?H(N,k):Ee.TSymbol(N)?de(N,k):Ee.TTuple(N)?Le(N,k):Ee.TPromise(N)?ut(N,k):Ee.TUint8Array(N)?Ke(N,k):Ee.TUndefined(N)?St(N,k):Ee.TUnion(N)?_r(N,k):Ee.TUnknown(N)?Ve(N,k):Ee.TVoid(N)?q(N,k):r(`Unknown left type operand '${N[_e.Kind]}'`)}a(J,"Visit");function ae(N,k){return J(N,k)}a(ae,"Extends");e.Extends=ae})(oC||(_e.TypeExtends=oC={}));var Rr;(function(e){function t(o){const u=Object.getOwnPropertyNames(o).reduce((c,d)=>({...c,[d]:n(o[d])}),{});const l=Object.getOwnPropertySymbols(o).reduce((c,d)=>({...c,[d]:n(o[d])}),{});return{...u,...l}}a(t,"ObjectType");function r(o){return o.map(u=>n(u))}a(r,"ArrayType");function n(o){return Jt.IsArray(o)?r(o):Jt.IsObject(o)?t(o):o}a(n,"Visit");function i(o){return o.map(u=>s(u))}a(i,"Rest");e.Rest=i;function s(o,u={}){return{...n(o),...u}}a(s,"Type");e.Type=s})(Rr||(_e.TypeClone=Rr={}));var VRe;(function(e){function t(m){return m.map(h=>{const{[_e.Optional]:g,..._}=Rr.Type(h);return _})}a(t,"OptionalUnwrap");function r(m){return m.every(h=>Ee.TOptional(h))}a(r,"IsIntersectOptional");function n(m){return m.some(h=>Ee.TOptional(h))}a(n,"IsUnionOptional");function i(m){return r(m.allOf)?_e.Type.Optional(_e.Type.Intersect(t(m.allOf))):m}a(i,"ResolveIntersect");function s(m){return n(m.anyOf)?_e.Type.Optional(_e.Type.Union(t(m.anyOf))):m}a(s,"ResolveUnion");function o(m){return m[_e.Kind]==="Intersect"?i(m):m[_e.Kind]==="Union"?s(m):m}a(o,"ResolveOptional");function u(m,h){const g=m.allOf.reduce((_,v)=>{const S=p(v,h);return S[_e.Kind]==="Never"?_:[..._,S]},[]);return o(_e.Type.Intersect(g))}a(u,"TIntersect");function l(m,h){const g=m.anyOf.map(_=>p(_,h));return o(_e.Type.Union(g))}a(l,"TUnion");function c(m,h){const g=m.properties[h];return Jt.IsUndefined(g)?_e.Type.Never():_e.Type.Union([g])}a(c,"TObject");function d(m,h){const g=m.items;if(Jt.IsUndefined(g))return _e.Type.Never();const _=g[h];if(Jt.IsUndefined(_))return _e.Type.Never();return _}a(d,"TTuple");function p(m,h){return m[_e.Kind]==="Intersect"?u(m,h):m[_e.Kind]==="Union"?l(m,h):m[_e.Kind]==="Object"?c(m,h):m[_e.Kind]==="Tuple"?d(m,h):_e.Type.Never()}a(p,"Visit");function f(m,h,g={}){const _=h.map(v=>p(m,v.toString()));return o(_e.Type.Union(_,g))}a(f,"Resolve");e.Resolve=f})(VRe||(_e.IndexedAccessor=VRe={}));var EP;(function(e){function t(d){const[p,f]=[d.slice(0,1),d.slice(1)];return`${p.toLowerCase()}${f}`}a(t,"Uncapitalize");function r(d){const[p,f]=[d.slice(0,1),d.slice(1)];return`${p.toUpperCase()}${f}`}a(r,"Capitalize");function n(d){return d.toUpperCase()}a(n,"Uppercase");function i(d){return d.toLowerCase()}a(i,"Lowercase");function s(d,p){const f=SP.ParseExact(d.pattern);const m=AP.Check(f);if(!m)return{...d,pattern:o(d.pattern,p)};const h=[...CP.Generate(f)];const g=h.map(S=>_e.Type.Literal(S));const _=u(g,p);const v=_e.Type.Union(_);return _e.Type.TemplateLiteral([v])}a(s,"IntrinsicTemplateLiteral");function o(d,p){return typeof d==="string"?p==="Uncapitalize"?t(d):p==="Capitalize"?r(d):p==="Uppercase"?n(d):p==="Lowercase"?i(d):d:d.toString()}a(o,"IntrinsicLiteral");function u(d,p){if(d.length===0)return[];const[f,...m]=d;return[c(f,p),...u(m,p)]}a(u,"IntrinsicRest");function l(d,p){return Ee.TTemplateLiteral(d)?s(d,p):Ee.TUnion(d)?_e.Type.Union(u(d.anyOf,p)):Ee.TLiteral(d)?_e.Type.Literal(o(d.const,p)):d}a(l,"Visit");function c(d,p){return l(d,p)}a(c,"Map");e.Map=c})(EP||(_e.Intrinsic=EP={}));var bP;(function(e){function t(o,u){return _e.Type.Intersect(o.allOf.map(l=>i(l,u)),{...o})}a(t,"TIntersect");function r(o,u){return _e.Type.Union(o.anyOf.map(l=>i(l,u)),{...o})}a(r,"TUnion");function n(o,u){return u(o)}a(n,"TObject");function i(o,u){return o[_e.Kind]==="Intersect"?t(o,u):o[_e.Kind]==="Union"?r(o,u):o[_e.Kind]==="Object"?n(o,u):o}a(i,"Visit");function s(o,u,l){return{...i(Rr.Type(o),u),...l}}a(s,"Map");e.Map=s})(bP||(_e.ObjectMap=bP={}));var GJ;(function(e){function t(c){return c[0]==="^"&&c[c.length-1]==="$"?c.slice(1,c.length-1):c}a(t,"UnwrapPattern");function r(c,d){return c.allOf.reduce((p,f)=>[...p,...o(f,d)],[])}a(r,"TIntersect");function n(c,d){const p=c.anyOf.map(f=>o(f,d));return[...p.reduce((f,m)=>m.map(h=>p.every(g=>g.includes(h))?f.add(h):f)[0],new Set)]}a(n,"TUnion");function i(c,d){return Object.getOwnPropertyNames(c.properties)}a(i,"TObject");function s(c,d){return d.includePatterns?Object.getOwnPropertyNames(c.patternProperties):[]}a(s,"TRecord");function o(c,d){return Ee.TIntersect(c)?r(c,d):Ee.TUnion(c)?n(c,d):Ee.TObject(c)?i(c,d):Ee.TRecord(c)?s(c,d):[]}a(o,"Visit");function u(c,d){return[...new Set(o(c,d))]}a(u,"ResolveKeys");e.ResolveKeys=u;function l(c){const d=u(c,{includePatterns:true});const p=d.map(f=>`(${t(f)})`);return`^(${p.join("|")})$`}a(l,"ResolvePattern");e.ResolvePattern=l})(GJ||(_e.KeyResolver=GJ={}));var HJ=class extends mh{static{a(this,"KeyArrayResolverError")}};_e.KeyArrayResolverError=HJ;var UF;(function(e){function t(r){return Array.isArray(r)?r:Ee.TUnionLiteral(r)?r.anyOf.map(n=>n.const.toString()):Ee.TLiteral(r)?[r.const]:Ee.TTemplateLiteral(r)?(()=>{const n=SP.ParseExact(r.pattern);if(!AP.Check(n))throw new HJ("Cannot resolve keys from infinite template expression");return[...CP.Generate(n)]})():[]}a(t,"Resolve");e.Resolve=t})(UF||(_e.KeyArrayResolver=UF={}));var zRe;(function(e){function*t(n){for(const i of n.anyOf){if(i[_e.Kind]==="Union"){yield*t(i)}else{yield i}}}a(t,"TUnion");function r(n){return _e.Type.Union([...t(n)],{...n})}a(r,"Resolve");e.Resolve=r})(zRe||(_e.UnionResolver=zRe={}));var VJ=class extends mh{static{a(this,"TemplateLiteralPatternError")}};_e.TemplateLiteralPatternError=VJ;var zJ;(function(e){function t(s){throw new VJ(s)}a(t,"Throw");function r(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}a(r,"Escape");function n(s,o){return Ee.TTemplateLiteral(s)?s.pattern.slice(1,s.pattern.length-1):Ee.TUnion(s)?`(${s.anyOf.map(u=>n(u,o)).join("|")})`:Ee.TNumber(s)?`${o}${_e.PatternNumber}`:Ee.TInteger(s)?`${o}${_e.PatternNumber}`:Ee.TBigInt(s)?`${o}${_e.PatternNumber}`:Ee.TString(s)?`${o}${_e.PatternString}`:Ee.TLiteral(s)?`${o}${r(s.const.toString())}`:Ee.TBoolean(s)?`${o}${_e.PatternBoolean}`:t(`Unexpected Kind '${s[_e.Kind]}'`)}a(n,"Visit");function i(s){return`^${s.map(o=>n(o,"")).join("")}$`}a(i,"Create");e.Create=i})(zJ||(_e.TemplateLiteralPattern=zJ={}));var xy;(function(e){function t(r){const n=SP.ParseExact(r.pattern);if(!AP.Check(n))return _e.Type.String();const i=[...CP.Generate(n)].map(s=>_e.Type.Literal(s));return _e.Type.Union(i)}a(t,"Resolve");e.Resolve=t})(xy||(_e.TemplateLiteralResolver=xy={}));var $F=class extends mh{static{a(this,"TemplateLiteralParserError")}};_e.TemplateLiteralParserError=$F;var SP;(function(e){function t(m,h,g){return m[h]===g&&m.charCodeAt(h-1)!==92}a(t,"IsNonEscaped");function r(m,h){return t(m,h,"(")}a(r,"IsOpenParen");function n(m,h){return t(m,h,")")}a(n,"IsCloseParen");function i(m,h){return t(m,h,"|")}a(i,"IsSeparator");function s(m){if(!(r(m,0)&&n(m,m.length-1)))return false;let h=0;for(let g=0;g<m.length;g++){if(r(m,g))h+=1;if(n(m,g))h-=1;if(h===0&&g!==m.length-1)return false}return true}a(s,"IsGroup");function o(m){return m.slice(1,m.length-1)}a(o,"InGroup");function u(m){let h=0;for(let g=0;g<m.length;g++){if(r(m,g))h+=1;if(n(m,g))h-=1;if(i(m,g)&&h===0)return true}return false}a(u,"IsPrecedenceOr");function l(m){for(let h=0;h<m.length;h++){if(r(m,h))return true}return false}a(l,"IsPrecedenceAnd");function c(m){let[h,g]=[0,0];const _=[];for(let S=0;S<m.length;S++){if(r(m,S))h+=1;if(n(m,S))h-=1;if(i(m,S)&&h===0){const E=m.slice(g,S);if(E.length>0)_.push(p(E));g=S+1}}const v=m.slice(g);if(v.length>0)_.push(p(v));if(_.length===0)return{type:"const",const:""};if(_.length===1)return _[0];return{type:"or",expr:_}}a(c,"Or");function d(m){function h(v,S){if(!r(v,S))throw new $F(`TemplateLiteralParser: Index must point to open parens`);let E=0;for(let b=S;b<v.length;b++){if(r(v,b))E+=1;if(n(v,b))E-=1;if(E===0)return[S,b]}throw new $F(`TemplateLiteralParser: Unclosed group parens in expression`)}a(h,"Group");function g(v,S){for(let E=S;E<v.length;E++){if(r(v,E))return[S,E]}return[S,v.length]}a(g,"Range");const _=[];for(let v=0;v<m.length;v++){if(r(m,v)){const[S,E]=h(m,v);const b=m.slice(S,E+1);_.push(p(b));v=E}else{const[S,E]=g(m,v);const b=m.slice(S,E);if(b.length>0)_.push(p(b));v=E-1}}return _.length===0?{type:"const",const:""}:_.length===1?_[0]:{type:"and",expr:_}}a(d,"And");function p(m){return s(m)?p(o(m)):u(m)?c(m):l(m)?d(m):{type:"const",const:m}}a(p,"Parse");e.Parse=p;function f(m){return p(m.slice(1,m.length-1))}a(f,"ParseExact");e.ParseExact=f})(SP||(_e.TemplateLiteralParser=SP={}));var KJ=class extends mh{static{a(this,"TemplateLiteralFiniteError")}};_e.TemplateLiteralFiniteError=KJ;var AP;(function(e){function t(o){throw new KJ(o)}a(t,"Throw");function r(o){return o.type==="or"&&o.expr.length===2&&o.expr[0].type==="const"&&o.expr[0].const==="0"&&o.expr[1].type==="const"&&o.expr[1].const==="[1-9][0-9]*"}a(r,"IsNumber");function n(o){return o.type==="or"&&o.expr.length===2&&o.expr[0].type==="const"&&o.expr[0].const==="true"&&o.expr[1].type==="const"&&o.expr[1].const==="false"}a(n,"IsBoolean");function i(o){return o.type==="const"&&o.const===".*"}a(i,"IsString");function s(o){return n(o)?true:r(o)||i(o)?false:o.type==="and"?o.expr.every(u=>s(u)):o.type==="or"?o.expr.every(u=>s(u)):o.type==="const"?true:t(`Unknown expression type`)}a(s,"Check");e.Check=s})(AP||(_e.TemplateLiteralFinite=AP={}));var WJ=class extends mh{static{a(this,"TemplateLiteralGeneratorError")}};_e.TemplateLiteralGeneratorError=WJ;var CP;(function(e){function*t(o){if(o.length===1)return yield*o[0];for(const u of o[0]){for(const l of t(o.slice(1))){yield`${u}${l}`}}}a(t,"Reduce");function*r(o){return yield*t(o.expr.map(u=>[...s(u)]))}a(r,"And");function*n(o){for(const u of o.expr)yield*s(u)}a(n,"Or");function*i(o){return yield o.const}a(i,"Const");function*s(o){return o.type==="and"?yield*r(o):o.type==="or"?yield*n(o):o.type==="const"?yield*i(o):(()=>{throw new WJ("Unknown expression")})()}a(s,"Generate");e.Generate=s})(CP||(_e.TemplateLiteralGenerator=CP={}));var KRe;(function(e){function*t(s){const o=s.trim().replace(/"|'/g,"");return o==="boolean"?yield _e.Type.Boolean():o==="number"?yield _e.Type.Number():o==="bigint"?yield _e.Type.BigInt():o==="string"?yield _e.Type.String():yield(()=>{const u=o.split("|").map(l=>_e.Type.Literal(l.trim()));return u.length===0?_e.Type.Never():u.length===1?u[0]:_e.Type.Union(u)})()}a(t,"ParseUnion");function*r(s){if(s[1]!=="{"){const o=_e.Type.Literal("$");const u=n(s.slice(1));return yield*[o,...u]}for(let o=2;o<s.length;o++){if(s[o]==="}"){const u=t(s.slice(2,o));const l=n(s.slice(o+1));return yield*[...u,...l]}}yield _e.Type.Literal(s)}a(r,"ParseTerminal");function*n(s){for(let o=0;o<s.length;o++){if(s[o]==="$"){const u=_e.Type.Literal(s.slice(0,o));const l=r(s.slice(o));return yield*[u,...l]}}yield _e.Type.Literal(s)}a(n,"ParseLiteral");function i(s){return[...n(s)]}a(i,"Parse");e.Parse=i})(KRe||(_e.TemplateLiteralDslParser=KRe={}));var YJ=class{static{a(this,"TransformDecodeBuilder")}constructor(t){this.schema=t}Decode(t){return new XJ(this.schema,t)}};_e.TransformDecodeBuilder=YJ;var XJ=class{static{a(this,"TransformEncodeBuilder")}constructor(t,r){this.schema=t;this.decode=r}Encode(t){const r=Rr.Type(this.schema);return Ee.TTransform(r)?(()=>{const n=a(o=>r[_e.Transform].Encode(t(o)),"Encode");const i=a(o=>this.decode(r[_e.Transform].Decode(o)),"Decode");const s={Encode:n,Decode:i};return{...r,[_e.Transform]:s}})():(()=>{const n={Decode:this.decode,Encode:t};return{...r,[_e.Transform]:n}})()}};_e.TransformEncodeBuilder=XJ;var Fxn=0;var JJ=class extends mh{static{a(this,"TypeBuilderError")}};_e.TypeBuilderError=JJ;var QJ=class{static{a(this,"TypeBuilder")}Create(t){return t}Throw(t){throw new JJ(t)}Discard(t,r){const{[r]:n,...i}=t;return i}Strict(t){return JSON.parse(JSON.stringify(t))}};_e.TypeBuilder=QJ;var jF=class extends QJ{static{a(this,"JsonTypeBuilder")}ReadonlyOptional(t){return this.Readonly(this.Optional(t))}Readonly(t){return{...Rr.Type(t),[_e.Readonly]:"Readonly"}}Optional(t){return{...Rr.Type(t),[_e.Optional]:"Optional"}}Any(t={}){return this.Create({...t,[_e.Kind]:"Any"})}Array(t,r={}){return this.Create({...r,[_e.Kind]:"Array",type:"array",items:Rr.Type(t)})}Boolean(t={}){return this.Create({...t,[_e.Kind]:"Boolean",type:"boolean"})}Capitalize(t,r={}){return{...EP.Map(Rr.Type(t),"Capitalize"),...r}}Composite(t,r){const n=_e.Type.Intersect(t,{});const i=GJ.ResolveKeys(n,{includePatterns:false});const s=i.reduce((o,u)=>({...o,[u]:_e.Type.Index(n,[u])}),{});return _e.Type.Object(s,r)}Enum(t,r={}){const n=Object.getOwnPropertyNames(t).filter(s=>isNaN(s)).map(s=>t[s]);const i=n.map(s=>Jt.IsString(s)?{[_e.Kind]:"Literal",type:"string",const:s}:{[_e.Kind]:"Literal",type:"number",const:s});return this.Create({...r,[_e.Kind]:"Union",anyOf:i})}Extends(t,r,n,i,s={}){switch(oC.Extends(t,r)){case at.Union:return this.Union([Rr.Type(n,s),Rr.Type(i,s)]);case at.True:return Rr.Type(n,s);case at.False:return Rr.Type(i,s)}}Exclude(t,r,n={}){return Ee.TTemplateLiteral(t)?this.Exclude(xy.Resolve(t),r,n):Ee.TTemplateLiteral(r)?this.Exclude(t,xy.Resolve(r),n):Ee.TUnion(t)?(()=>{const i=t.anyOf.filter(s=>oC.Extends(s,r)===at.False);return i.length===1?Rr.Type(i[0],n):this.Union(i,n)})():oC.Extends(t,r)!==at.False?this.Never(n):Rr.Type(t,n)}Extract(t,r,n={}){return Ee.TTemplateLiteral(t)?this.Extract(xy.Resolve(t),r,n):Ee.TTemplateLiteral(r)?this.Extract(t,xy.Resolve(r),n):Ee.TUnion(t)?(()=>{const i=t.anyOf.filter(s=>oC.Extends(s,r)!==at.False);return i.length===1?Rr.Type(i[0],n):this.Union(i,n)})():oC.Extends(t,r)!==at.False?Rr.Type(t,n):this.Never(n)}Index(t,r,n={}){return Ee.TArray(t)&&Ee.TNumber(r)?(()=>{return Rr.Type(t.items,n)})():Ee.TTuple(t)&&Ee.TNumber(r)?(()=>{const i=Jt.IsUndefined(t.items)?[]:t.items;const s=i.map(o=>Rr.Type(o));return this.Union(s,n)})():(()=>{const i=UF.Resolve(r);const s=Rr.Type(t);return VRe.Resolve(s,i,n)})()}Integer(t={}){return this.Create({...t,[_e.Kind]:"Integer",type:"integer"})}Intersect(t,r={}){if(t.length===0)return _e.Type.Never();if(t.length===1)return Rr.Type(t[0],r);if(t.some(o=>Ee.TTransform(o)))this.Throw("Cannot intersect transform types");const n=t.every(o=>Ee.TObject(o));const i=Rr.Rest(t);const s=Ee.TSchema(r.unevaluatedProperties)?{unevaluatedProperties:Rr.Type(r.unevaluatedProperties)}:{};return r.unevaluatedProperties===false||Ee.TSchema(r.unevaluatedProperties)||n?this.Create({...r,...s,[_e.Kind]:"Intersect",type:"object",allOf:i}):this.Create({...r,...s,[_e.Kind]:"Intersect",allOf:i})}KeyOf(t,r={}){return Ee.TRecord(t)?(()=>{const n=Object.getOwnPropertyNames(t.patternProperties)[0];return n===_e.PatternNumberExact?this.Number(r):n===_e.PatternStringExact?this.String(r):this.Throw("Unable to resolve key type from Record key pattern")})():Ee.TTuple(t)?(()=>{const n=Jt.IsUndefined(t.items)?[]:t.items;const i=n.map((s,o)=>_e.Type.Literal(o.toString()));return this.Union(i,r)})():Ee.TArray(t)?(()=>{return this.Number(r)})():(()=>{const n=GJ.ResolveKeys(t,{includePatterns:false});if(n.length===0)return this.Never(r);const i=n.map(s=>this.Literal(s));return this.Union(i,r)})()}Literal(t,r={}){return this.Create({...r,[_e.Kind]:"Literal",const:t,type:typeof t})}Lowercase(t,r={}){return{...EP.Map(Rr.Type(t),"Lowercase"),...r}}Never(t={}){return this.Create({...t,[_e.Kind]:"Never",not:{}})}Not(t,r){return this.Create({...r,[_e.Kind]:"Not",not:Rr.Type(t)})}Null(t={}){return this.Create({...t,[_e.Kind]:"Null",type:"null"})}Number(t={}){return this.Create({...t,[_e.Kind]:"Number",type:"number"})}Object(t,r={}){const n=Object.getOwnPropertyNames(t);const i=n.filter(l=>Ee.TOptional(t[l]));const s=n.filter(l=>!i.includes(l));const o=Ee.TSchema(r.additionalProperties)?{additionalProperties:Rr.Type(r.additionalProperties)}:{};const u=n.reduce((l,c)=>({...l,[c]:Rr.Type(t[c])}),{});return s.length>0?this.Create({...r,...o,[_e.Kind]:"Object",type:"object",properties:u,required:s}):this.Create({...r,...o,[_e.Kind]:"Object",type:"object",properties:u})}Omit(t,r,n={}){const i=UF.Resolve(r);return bP.Map(this.Discard(Rr.Type(t),_e.Transform),s=>{if(Jt.IsArray(s.required)){s.required=s.required.filter(o=>!i.includes(o));if(s.required.length===0)delete s.required}for(const o of Object.getOwnPropertyNames(s.properties)){if(i.includes(o))delete s.properties[o]}return this.Create(s)},n)}Partial(t,r={}){return bP.Map(this.Discard(Rr.Type(t),_e.Transform),n=>{const i=Object.getOwnPropertyNames(n.properties).reduce((s,o)=>{return{...s,[o]:this.Optional(n.properties[o])}},{});return this.Object(i,this.Discard(n,"required"))},r)}Pick(t,r,n={}){const i=UF.Resolve(r);return bP.Map(this.Discard(Rr.Type(t),_e.Transform),s=>{if(Jt.IsArray(s.required)){s.required=s.required.filter(o=>i.includes(o));if(s.required.length===0)delete s.required}for(const o of Object.getOwnPropertyNames(s.properties)){if(!i.includes(o))delete s.properties[o]}return this.Create(s)},n)}Record(t,r,n={}){return Ee.TTemplateLiteral(t)?(()=>{const i=SP.ParseExact(t.pattern);return AP.Check(i)?this.Object([...CP.Generate(i)].reduce((s,o)=>({...s,[o]:Rr.Type(r)}),{}),n):this.Create({...n,[_e.Kind]:"Record",type:"object",patternProperties:{[t.pattern]:Rr.Type(r)}})})():Ee.TUnion(t)?(()=>{const i=zRe.Resolve(t);if(Ee.TUnionLiteral(i)){const s=i.anyOf.reduce((o,u)=>({...o,[u.const]:Rr.Type(r)}),{});return this.Object(s,{...n,[_e.Hint]:"Record"})}else this.Throw("Record key of type union contains non-literal types")})():Ee.TLiteral(t)?(()=>{return Jt.IsString(t.const)||Jt.IsNumber(t.const)?this.Object({[t.const]:Rr.Type(r)},n):this.Throw("Record key of type literal is not of type string or number")})():Ee.TInteger(t)||Ee.TNumber(t)?(()=>{return this.Create({...n,[_e.Kind]:"Record",type:"object",patternProperties:{[_e.PatternNumberExact]:Rr.Type(r)}})})():Ee.TString(t)?(()=>{const i=Jt.IsUndefined(t.pattern)?_e.PatternStringExact:t.pattern;return this.Create({...n,[_e.Kind]:"Record",type:"object",patternProperties:{[i]:Rr.Type(r)}})})():this.Never()}Recursive(t,r={}){if(Jt.IsUndefined(r.$id))r.$id=`T${Fxn++}`;const n=t({[_e.Kind]:"This",$ref:`${r.$id}`});n.$id=r.$id;return this.Create({...r,[_e.Hint]:"Recursive",...n})}Ref(t,r={}){if(Jt.IsString(t))return this.Create({...r,[_e.Kind]:"Ref",$ref:t});if(Jt.IsUndefined(t.$id))this.Throw("Reference target type must specify an $id");return this.Create({...r,[_e.Kind]:"Ref",$ref:t.$id})}Required(t,r={}){return bP.Map(this.Discard(Rr.Type(t),_e.Transform),n=>{const i=Object.getOwnPropertyNames(n.properties).reduce((s,o)=>{return{...s,[o]:this.Discard(n.properties[o],_e.Optional)}},{});return this.Object(i,n)},r)}Rest(t){return Ee.TTuple(t)&&!Jt.IsUndefined(t.items)?Rr.Rest(t.items):Ee.TIntersect(t)?Rr.Rest(t.allOf):Ee.TUnion(t)?Rr.Rest(t.anyOf):[]}String(t={}){return this.Create({...t,[_e.Kind]:"String",type:"string"})}TemplateLiteral(t,r={}){const n=Jt.IsString(t)?zJ.Create(KRe.Parse(t)):zJ.Create(t);return this.Create({...r,[_e.Kind]:"TemplateLiteral",type:"string",pattern:n})}Transform(t){return new YJ(t)}Tuple(t,r={}){const[n,i,s]=[false,t.length,t.length];const o=Rr.Rest(t);const u=t.length>0?{...r,[_e.Kind]:"Tuple",type:"array",items:o,additionalItems:n,minItems:i,maxItems:s}:{...r,[_e.Kind]:"Tuple",type:"array",minItems:i,maxItems:s};return this.Create(u)}Uncapitalize(t,r={}){return{...EP.Map(Rr.Type(t),"Uncapitalize"),...r}}Union(t,r={}){return Ee.TTemplateLiteral(t)?xy.Resolve(t):(()=>{const n=t;if(n.length===0)return this.Never(r);if(n.length===1)return this.Create(Rr.Type(n[0],r));const i=Rr.Rest(n);return this.Create({...r,[_e.Kind]:"Union",anyOf:i})})()}Unknown(t={}){return this.Create({...t,[_e.Kind]:"Unknown"})}Unsafe(t={}){return this.Create({...t,[_e.Kind]:t[_e.Kind]||"Unsafe"})}Uppercase(t,r={}){return{...EP.Map(Rr.Type(t),"Uppercase"),...r}}};_e.JsonTypeBuilder=jF;var ZJ=class extends jF{static{a(this,"JavaScriptTypeBuilder")}AsyncIterator(t,r={}){return this.Create({...r,[_e.Kind]:"AsyncIterator",type:"AsyncIterator",items:Rr.Type(t)})}Awaited(t,r={}){const n=a(i=>i.length>0?(()=>{const[s,...o]=i;return[this.Awaited(s),...n(o)]})():i,"Unwrap");return Ee.TIntersect(t)?_e.Type.Intersect(n(t.allOf)):Ee.TUnion(t)?_e.Type.Union(n(t.anyOf)):Ee.TPromise(t)?this.Awaited(t.item):Rr.Type(t,r)}BigInt(t={}){return this.Create({...t,[_e.Kind]:"BigInt",type:"bigint"})}ConstructorParameters(t,r={}){return this.Tuple([...t.parameters],{...r})}Constructor(t,r,n){const[i,s]=[Rr.Rest(t),Rr.Type(r)];return this.Create({...n,[_e.Kind]:"Constructor",type:"constructor",parameters:i,returns:s})}Date(t={}){return this.Create({...t,[_e.Kind]:"Date",type:"Date"})}Function(t,r,n){const[i,s]=[Rr.Rest(t),Rr.Type(r)];return this.Create({...n,[_e.Kind]:"Function",type:"function",parameters:i,returns:s})}InstanceType(t,r={}){return Rr.Type(t.returns,r)}Iterator(t,r={}){return this.Create({...r,[_e.Kind]:"Iterator",type:"Iterator",items:Rr.Type(t)})}Parameters(t,r={}){return this.Tuple(t.parameters,{...r})}Promise(t,r={}){return this.Create({...r,[_e.Kind]:"Promise",type:"Promise",item:Rr.Type(t)})}RegExp(t,r={}){const n=Jt.IsString(t)?t:t.source;return this.Create({...r,[_e.Kind]:"String",type:"string",pattern:n})}RegEx(t,r={}){return this.RegExp(t,r)}ReturnType(t,r={}){return Rr.Type(t.returns,r)}Symbol(t){return this.Create({...t,[_e.Kind]:"Symbol",type:"symbol"})}Undefined(t={}){return this.Create({...t,[_e.Kind]:"Undefined",type:"undefined"})}Uint8Array(t={}){return this.Create({...t,[_e.Kind]:"Uint8Array",type:"Uint8Array"})}Void(t={}){return this.Create({...t,[_e.Kind]:"Void",type:"void"})}};_e.JavaScriptTypeBuilder=ZJ;_e.JsonType=new jF;_e.Type=new ZJ});var Axt=y(eQ=>{"use strict";Object.defineProperty(eQ,"__esModule",{value:true});eQ.CustomTypeBuilder=void 0;var GF=Sxt();var WRe=class extends GF.TypeBuilder{static{a(this,"CustomTypeBuilder")}static Date(){return GF.Type.Unsafe({type:"string",format:"date-time"})}static Nullable(t){return GF.Type.Union([t,GF.Type.Null()])}static StringEnum(t){return GF.Type.Unsafe({type:"string",enum:t})}};eQ.CustomTypeBuilder=WRe});var xxt=y(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:true});Tr.throwIfNotNumber=Tr.throwIfNotString=Tr.throwIfUndefinedOrNull=Tr.throwIfUndefined=Tr.ArgumentTypeError=Tr.ArgumentUndefinedError=Tr.ValidationError=Tr.withUndefinedAsNull=Tr.withNullAsUndefined=Tr.validateConstraint=Tr.validateConstraints=Tr.areFunctions=Tr.isFunction=Tr.isEmptyObject=Tr.assertAllDefined=Tr.assertIsDefined=Tr.assertType=Tr.isUndefinedOrNull=Tr.isDefined=Tr.isUndefined=Tr.isBoolean=Tr.isIterable=Tr.isNumber=Tr.isTypedArray=Tr.isObject=Tr.isStringArray=Tr.isString=void 0;function tQ(e){return typeof e==="string"}a(tQ,"isString");Tr.isString=tQ;function Bxn(e){return Array.isArray(e)&&e.every(t=>tQ(t))}a(Bxn,"isStringArray");Tr.isStringArray=Bxn;function Cxt(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}a(Cxt,"isObject");Tr.isObject=Cxt;function Mxn(e){const t=Object.getPrototypeOf(Uint8Array);return typeof e==="object"&&e instanceof t}a(Mxn,"isTypedArray");Tr.isTypedArray=Mxn;function wxt(e){return typeof e==="number"&&!isNaN(e)}a(wxt,"isNumber");Tr.isNumber=wxt;function qxn(e){return!!e&&typeof e[Symbol.iterator]==="function"}a(qxn,"isIterable");Tr.isIterable=qxn;function Uxn(e){return e===true||e===false}a(Uxn,"isBoolean");Tr.isBoolean=Uxn;function YRe(e){return typeof e==="undefined"}a(YRe,"isUndefined");Tr.isUndefined=YRe;function $xn(e){return!wP(e)}a($xn,"isDefined");Tr.isDefined=$xn;function wP(e){return YRe(e)||e===null}a(wP,"isUndefinedOrNull");Tr.isUndefinedOrNull=wP;function jxn(e,t){if(!e){throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}}a(jxn,"assertType");Tr.assertType=jxn;function Gxn(e){if(wP(e)){throw new Error("Assertion Failed: argument is undefined or null")}return e}a(Gxn,"assertIsDefined");Tr.assertIsDefined=Gxn;function Hxn(...e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];if(wP(n)){throw new Error(`Assertion Failed: argument at index ${r} is undefined or null`)}t.push(n)}return t}a(Hxn,"assertAllDefined");Tr.assertAllDefined=Hxn;var Vxn=Object.prototype.hasOwnProperty;function zxn(e){if(!Cxt(e)){return false}for(const t in e){if(Vxn.call(e,t)){return false}}return true}a(zxn,"isEmptyObject");Tr.isEmptyObject=zxn;function XRe(e){return typeof e==="function"}a(XRe,"isFunction");Tr.isFunction=XRe;function Kxn(...e){return e.length>0&&e.every(XRe)}a(Kxn,"areFunctions");Tr.areFunctions=Kxn;function Wxn(e,t){const r=Math.min(e.length,t.length);for(let n=0;n<r;n++){Txt(e[n],t[n])}}a(Wxn,"validateConstraints");Tr.validateConstraints=Wxn;function Txt(e,t){if(tQ(t)){if(typeof e!==t){throw new Error(`argument does not match constraint: typeof ${t}`)}}else if(XRe(t)){try{if(e instanceof t){return}}catch{}if(!wP(e)&&e.constructor===t){return}if(t.length===1&&t.call(void 0,e)===true){return}throw new Error(`argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true`)}}a(Txt,"validateConstraint");Tr.validateConstraint=Txt;function Yxn(e){return e===null?void 0:e}a(Yxn,"withNullAsUndefined");Tr.withNullAsUndefined=Yxn;function Xxn(e){return typeof e==="undefined"?null:e}a(Xxn,"withUndefinedAsNull");Tr.withUndefinedAsNull=Xxn;var HF=class extends Error{static{a(this,"ValidationError")}constructor(t){super(t)}};Tr.ValidationError=HF;var VF=class extends HF{static{a(this,"ArgumentUndefinedError")}constructor(t){super(`The argument '${t}' is undefined.`)}};Tr.ArgumentUndefinedError=VF;var zF=class extends HF{static{a(this,"ArgumentTypeError")}constructor(t,r){super(`The argument '${t}' must be of type '${r}'.`)}};Tr.ArgumentTypeError=zF;function Jxn(e,t){if(YRe(e)){throw new VF(t)}return true}a(Jxn,"throwIfUndefined");Tr.throwIfUndefined=Jxn;function JRe(e,t){if(wP(e)){throw new VF(t)}}a(JRe,"throwIfUndefinedOrNull");Tr.throwIfUndefinedOrNull=JRe;function Qxn(e,t){JRe(e,t);if(!tQ(e)){throw new zF(t,"string")}return true}a(Qxn,"throwIfNotString");Tr.throwIfNotString=Qxn;function Zxn(e,t){JRe(e,t);if(!wxt(e)){throw new zF(t,"number")}return true}a(Zxn,"throwIfNotNumber");Tr.throwIfNotNumber=Zxn});var hn=y(mt=>{"use strict";var Rxt=mt&&mt.__createBinding||(Object.create?function(e,t,r,n){if(n===void 0)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]});var eRn=mt&&mt.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var rQ=mt&&mt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null){for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))Rxt(t,e,r)}eRn(t,e);return t};var WE=mt&&mt.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))Rxt(t,e,r)};Object.defineProperty(mt,"__esModule",{value:true});mt.getRequiredEnvVar=mt.env=mt.EnvironmentalVariableRequiredError=mt.xfs=mt.RouteValidator=mt.JsonValidator=mt.TenantService=mt.OpenFGAService=mt.DevApiService=mt.getContentApiStorageTarballPath=mt.contentApiTarballFileName=mt.ContentApiService=mt.AuthApiService=mt.getServiceAccountIdToken=mt.createApiKeyServiceClient=mt.ApiKeyService=mt.RouteVersions=mt.startsWithReservedKeyword=mt.logger=mt.createNewLogger=mt.graphQL=mt.CloudStorage=mt.fly=mt.ApiServer=mt.featureFlagsPlugin=mt.ensureZuploUserPlugin=mt.ensureZuploAdminPlugin=mt.ensureServiceAccountPlugin=mt.apiKeyAuthPlugin=mt.errorHandler=mt.DeploymentLogState=mt.signString=mt.FeatureFlags=mt.VALID_COMPATIBILITY_DATES=mt.DEFAULT_COMPATIBILITY_DATE=mt.COMPATIBILITY_FLAG_MAPPINGS=mt.WARNING_STATUS=mt.WARNING_SEVERITY=mt.GOOD_STATUS=mt.FAILURE_STATUS=mt.ERROR_SEVERITY=mt.BuildIssueError=mt.hasBlockedNotifications=mt.getDefaultFlags=mt.getBuildFlagsForDeployment=mt.CommonAuth=void 0;var QRe=rQ(qp());mt.env=QRe.default;Object.defineProperty(mt,"EnvironmentalVariableRequiredError",{enumerable:true,get:function(){return QRe.EnvironmentalVariableRequiredError}});Object.defineProperty(mt,"getRequiredEnvVar",{enumerable:true,get:function(){return QRe.getRequiredEnvVar}});WE(ac(),mt);var tRn=Vce();Object.defineProperty(mt,"CommonAuth",{enumerable:true,get:function(){return tRn.CommonAuth}});var ZRe=WGe();Object.defineProperty(mt,"getBuildFlagsForDeployment",{enumerable:true,get:function(){return ZRe.getBuildFlagsForDeployment}});Object.defineProperty(mt,"getDefaultFlags",{enumerable:true,get:function(){return ZRe.getDefaultFlags}});Object.defineProperty(mt,"hasBlockedNotifications",{enumerable:true,get:function(){return ZRe.hasBlockedNotifications}});var TP=YGe();Object.defineProperty(mt,"BuildIssueError",{enumerable:true,get:function(){return TP.BuildIssueError}});Object.defineProperty(mt,"ERROR_SEVERITY",{enumerable:true,get:function(){return TP.ERROR_SEVERITY}});Object.defineProperty(mt,"FAILURE_STATUS",{enumerable:true,get:function(){return TP.FAILURE_STATUS}});Object.defineProperty(mt,"GOOD_STATUS",{enumerable:true,get:function(){return TP.GOOD_STATUS}});Object.defineProperty(mt,"WARNING_SEVERITY",{enumerable:true,get:function(){return TP.WARNING_SEVERITY}});Object.defineProperty(mt,"WARNING_STATUS",{enumerable:true,get:function(){return TP.WARNING_STATUS}});var rRn=XGe();Object.defineProperty(mt,"COMPATIBILITY_FLAG_MAPPINGS",{enumerable:true,get:function(){return rRn.COMPATIBILITY_FLAG_MAPPINGS}});var Oxt=ZGe();Object.defineProperty(mt,"DEFAULT_COMPATIBILITY_DATE",{enumerable:true,get:function(){return Oxt.DEFAULT_COMPATIBILITY_DATE}});Object.defineProperty(mt,"VALID_COMPATIBILITY_DATES",{enumerable:true,get:function(){return Oxt.VALID_COMPATIBILITY_DATES}});var nRn=zce();Object.defineProperty(mt,"FeatureFlags",{enumerable:true,get:function(){return nRn.FeatureFlags}});var iRn=eHe();Object.defineProperty(mt,"signString",{enumerable:true,get:function(){return iRn.signString}});WE(tHe(),mt);var sRn=Yce();Object.defineProperty(mt,"DeploymentLogState",{enumerable:true,get:function(){return sRn.DeploymentLogState}});WE(lHe(),mt);WE(Xce(),mt);var aRn=Jce();Object.defineProperty(mt,"errorHandler",{enumerable:true,get:function(){return aRn.errorHandler}});var KF=rde();Object.defineProperty(mt,"apiKeyAuthPlugin",{enumerable:true,get:function(){return KF.apiKeyAuthPlugin}});Object.defineProperty(mt,"ensureServiceAccountPlugin",{enumerable:true,get:function(){return KF.ensureServiceAccountPlugin}});Object.defineProperty(mt,"ensureZuploAdminPlugin",{enumerable:true,get:function(){return KF.ensureZuploAdminPlugin}});Object.defineProperty(mt,"ensureZuploUserPlugin",{enumerable:true,get:function(){return KF.ensureZuploUserPlugin}});Object.defineProperty(mt,"featureFlagsPlugin",{enumerable:true,get:function(){return KF.featureFlagsPlugin}});var oRn=Sft();Object.defineProperty(mt,"ApiServer",{enumerable:true,get:function(){return oRn.ApiServer}});mt.fly=rQ(wft());mt.CloudStorage=rQ(cvt());var uRn=dvt();Object.defineProperty(mt,"graphQL",{enumerable:true,get:function(){return uRn.graphQL}});WE(D2t(),mt);var Pxt=cEe();Object.defineProperty(mt,"createNewLogger",{enumerable:true,get:function(){return Pxt.createNewLogger}});Object.defineProperty(mt,"logger",{enumerable:true,get:function(){return Pxt.logger}});var lRn=twe();Object.defineProperty(mt,"startsWithReservedKeyword",{enumerable:true,get:function(){return lRn.startsWithReservedKeyword}});var cRn=L2t();Object.defineProperty(mt,"RouteVersions",{enumerable:true,get:function(){return cRn.RouteVersions}});var Nxt=swt();Object.defineProperty(mt,"ApiKeyService",{enumerable:true,get:function(){return Nxt.ApiKeyService}});Object.defineProperty(mt,"createApiKeyServiceClient",{enumerable:true,get:function(){return Nxt.createApiKeyServiceClient}});var dRn=tP();Object.defineProperty(mt,"getServiceAccountIdToken",{enumerable:true,get:function(){return dRn.getServiceAccountIdToken}});var pRn=owt();Object.defineProperty(mt,"AuthApiService",{enumerable:true,get:function(){return pRn.AuthApiService}});var eOe=dwt();Object.defineProperty(mt,"ContentApiService",{enumerable:true,get:function(){return eOe.ContentApiService}});Object.defineProperty(mt,"contentApiTarballFileName",{enumerable:true,get:function(){return eOe.contentApiTarballFileName}});Object.defineProperty(mt,"getContentApiStorageTarballPath",{enumerable:true,get:function(){return eOe.getContentApiStorageTarballPath}});var fRn=mwt();Object.defineProperty(mt,"DevApiService",{enumerable:true,get:function(){return fRn.DevApiService}});var mRn=hxt();Object.defineProperty(mt,"OpenFGAService",{enumerable:true,get:function(){return mRn.OpenFGAService}});var hRn=_xt();Object.defineProperty(mt,"TenantService",{enumerable:true,get:function(){return hRn.TenantService}});WE(vxt(),mt);WE(Axt(),mt);WE(xxt(),mt);var gRn=zY();Object.defineProperty(mt,"JsonValidator",{enumerable:true,get:function(){return gRn.JsonValidator}});var yRn=uwe();Object.defineProperty(mt,"RouteValidator",{enumerable:true,get:function(){return yRn.RouteValidator}});mt.xfs=rQ(sAe())});var Fn=y(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:true});Vt.NODE_BUILD_OPEN_API_OUTPUT_FILE=Vt.NODE_BUILD_OUTPUT_FILE=Vt.NODE_ENTRY_NAME=Vt.WORKER_BUILD_OUTPUT_SOURCEMAP_FILE=Vt.WORKER_BUILD_OUTPUT_FILE=Vt.WORKER_ENTRY_NAME=Vt.ENV_MODULE_FILE=Vt.ZUPLO_SYSTEM_ENV_FILE=Vt.ENV_FILE=Vt.CACHE_DIRECTORY=Vt.BUILD_CACHE_FILE=Vt.ZUPLO_FILE_SCHEMA=Vt.NON_STANDARD_NODE_ENV=Vt.GENERATED_TYPES_DIR_NAME=Vt.GENERATED_BUILD_JSON_FILE=Vt.GENERATED_SOURCE_DIR_NAME=Vt.BUILD_OUTPUT_DIR=Vt.DEFAULT_TEST_FILE=Vt.DEFAULT_DOCS_MARKDOWN_FILE=Vt.DOCS_THEME_FILE=Vt.DOCS_SIDEBAR_FILE=Vt.ZUPLO_FALLBACK_JSON_FILE=Vt.ZUPLO_PREFERRED_JSON_FILE=Vt.DEFAULT_MODULE_FILE=Vt.OPEN_API_FILE_SUFFIX=Vt.OPEN_API_CONFIG_FILE=Vt.OPEN_API_UNVERSIONED_DIR_NAME=Vt.DEV_PORTAL_OUTPUT_DIR_NAME=Vt.DEV_PORTAL_CONFIG_FILE=Vt.POLICIES_CONFIG_FILE=Vt.ROUTES_OAS_CONFIG_FILE=Vt.LOCAL_API_KEYS_CONFIG_FILE=Vt.DEV_PORTAL_V4_PATH=Vt.USER_DOCS_DIR_NAME=Vt.USER_SCHEMAS_DIR_NAME=Vt.USER_CONFIG_DIR_NAME=Vt.USER_TEST_DIR_NAME=Vt.USER_MODULES_DIR_NAME=void 0;Vt.USER_MODULES_DIR_NAME="modules";Vt.USER_TEST_DIR_NAME="tests";Vt.USER_CONFIG_DIR_NAME="config";Vt.USER_SCHEMAS_DIR_NAME="schemas";Vt.USER_DOCS_DIR_NAME="docs";Vt.DEV_PORTAL_V4_PATH="v4";Vt.LOCAL_API_KEYS_CONFIG_FILE="api-keys.json";Vt.ROUTES_OAS_CONFIG_FILE="routes.oas.json";Vt.POLICIES_CONFIG_FILE="policies.json";Vt.DEV_PORTAL_CONFIG_FILE="dev-portal.json";Vt.DEV_PORTAL_OUTPUT_DIR_NAME="dev-portal";Vt.OPEN_API_UNVERSIONED_DIR_NAME="unversioned";Vt.OPEN_API_CONFIG_FILE="open-api.json";Vt.OPEN_API_FILE_SUFFIX=".oas.json";Vt.DEFAULT_MODULE_FILE="hello-world.ts";Vt.ZUPLO_PREFERRED_JSON_FILE="zuplo.jsonc";Vt.ZUPLO_FALLBACK_JSON_FILE="zuplo.json";Vt.DOCS_SIDEBAR_FILE="sidebar.json";Vt.DOCS_THEME_FILE="theme.css";Vt.DEFAULT_DOCS_MARKDOWN_FILE="index.md";Vt.DEFAULT_TEST_FILE="hello-world.json";Vt.BUILD_OUTPUT_DIR="dist";Vt.GENERATED_SOURCE_DIR_NAME=".zuplo";Vt.GENERATED_BUILD_JSON_FILE="build.json";Vt.GENERATED_TYPES_DIR_NAME="types";Vt.NON_STANDARD_NODE_ENV=`You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against.`;Vt.ZUPLO_FILE_SCHEMA="zuplo";Vt.BUILD_CACHE_FILE="buildstate.json";Vt.CACHE_DIRECTORY=".cache";Vt.ENV_FILE=".env";Vt.ZUPLO_SYSTEM_ENV_FILE=".env.zuplo";Vt.ENV_MODULE_FILE="environment.ts";Vt.WORKER_ENTRY_NAME="worker.ts";Vt.WORKER_BUILD_OUTPUT_FILE="worker.js";Vt.WORKER_BUILD_OUTPUT_SOURCEMAP_FILE="worker.js.map";Vt.NODE_ENTRY_NAME="server.ts";Vt.NODE_BUILD_OUTPUT_FILE="main.js";Vt.NODE_BUILD_OPEN_API_OUTPUT_FILE=Vt.OPEN_API_CONFIG_FILE});var tu=y(xP=>{"use strict";Object.defineProperty(xP,"__esModule",{value:true});xP.runPlugins=xP.PluginResult=void 0;var tOe=class{static{a(this,"PluginResult")}errors=[];warnings=[];constructor(t){if(t){this.errors.push(t)}}};xP.PluginResult=tOe;async function _Rn(e,t){const r=[];const n=[];const i=new Map;for await(const s of e){try{const o=await s(t,i);n.push(...o.errors.map(u=>{if(u.pluginName===""){u.pluginName=s.name}return u}));r.push(...o.warnings);if(o.errors.length>0){break}}catch(o){n.push(o);break}}return{errors:n,warnings:r}}a(_Rn,"runPlugins");xP.runPlugins=_Rn});var xs=y(nOe=>{"use strict";Object.defineProperty(nOe,"__esModule",{value:true});var nQ=require("perf_hooks");var rOe=[];async function vRn(e,t){const r=nQ.performance.timerify(t);const n=new nQ.PerformanceObserver(i=>{const s=i.getEntries()[0];rOe.push({name:e,duration:s.duration});n.disconnect()});n.observe({entryTypes:["function"]});return r()}a(vRn,"timeFn");var ERn={mark:e=>{nQ.performance.mark(e)},measure:(e,t,r)=>{nQ.performance.measure(e,t,r)},timeFn:vRn,report:()=>{if(rOe.length>0){console.table(rOe)}}};nOe.default=ERn});var iOe=y(RP=>{"use strict";var bRn=RP&&RP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(RP,"__esModule",{value:true});RP.getZuploConfig=void 0;var WF=hn();var SRn=require("jsonc-parser");var ARn=require("fs/promises");var Ixt=bRn(require("path"));var kxt=Fn();async function CRn(e){const t=Ixt.default.join(e,kxt.ZUPLO_PREFERRED_JSON_FILE);const r=Ixt.default.join(e,kxt.ZUPLO_FALLBACK_JSON_FILE);let n=false;let i=t;if(await WF.xfs.fileExists(t)){n=true;i=t}else if(await WF.xfs.fileExists(r)){n=true;i=r}const s={};if(n){const o=await(0,ARn.readFile)(i,"utf-8");const u=[];const l=(0,SRn.parse)(o,u);if(typeof l!=="object"){const c={message:`Invalid zuplo.json file`,detail:`The zuplo.json file is not a valid JSON object`,pluginName:"buildData",severity:"error"};return{errors:[c]}}if("version"in l&&l.version!==1){const c={message:`Invalid version set in zuplo.config`,detail:`version in zuplo.json must be set to 1`,pluginName:"buildData",severity:"error"};return{errors:[c]}}if("compatibilityDate"in l&&WF.VALID_COMPATIBILITY_DATES&&typeof l.compatibilityDate==="string"){if(!WF.VALID_COMPATIBILITY_DATES.includes(l.compatibilityDate)){const c={message:`Invalid compatibilityDate set in zuplo.config`,detail:`compatibilityDate was set to ${l.compatibilityDate}. Valid compatibility dates are ${WF.VALID_COMPATIBILITY_DATES.join(", ")}`,pluginName:"buildData",severity:"error"};return{errors:[c]}}s.compatibilityDate=l.compatibilityDate}}return{config:s,errors:[]}}a(CRn,"getZuploConfig");RP.getZuploConfig=CRn});var YF=y(iQ=>{"use strict";Object.defineProperty(iQ,"__esModule",{value:true});iQ.TargetPlatform=void 0;var Dxt;(function(e){e["Worker"]="worker"})(Dxt||(iQ.TargetPlatform=Dxt={}))});var Fxt=y(OP=>{"use strict";var Lxt=OP&&OP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(OP,"__esModule",{value:true});OP.cleanOutput=void 0;var wRn=Lxt(require("fs/promises"));var TRn=Lxt(xs());var xRn=a(async function({outputDirectory:e,systemDirectory:t,logger:r}){return TRn.default.timeFn("Cleaning output",async()=>{r.debug("Cleaning output");const n=[e,t];for await(const i of n){try{await wRn.default.rm(i,{recursive:true,force:true})}catch(s){r.error(s)}}return{warnings:[],errors:[]}})},"cleanOutput");OP.cleanOutput=xRn});var Mxt=y(PP=>{"use strict";var Bxt=PP&&PP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(PP,"__esModule",{value:true});PP.createSystemDir=void 0;var RRn=hn();var ORn=Bxt(require("fs/promises"));var PRn=Bxt(xs());var NRn=a(async function({systemDirectory:e,logger:t}){return PRn.default.timeFn("Creating system directory",async()=>{t.debug("Creating system directory");try{if(await RRn.xfs.dirExists(e)){t.debug("System directory already exists, skipping");return{warnings:[],errors:[]}}await ORn.default.mkdir(e)}catch(r){t.error(r);return{warnings:[],errors:[]}}return{warnings:[],errors:[]}})},"createSystemDir");PP.createSystemDir=NRn});var qxt=y(NP=>{"use strict";var IRn=NP&&NP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(NP,"__esModule",{value:true});NP.checkForDeprecations=void 0;var kRn=IRn(xs());var DRn=a(async function({logger:e}){return kRn.default.timeFn("Checking for breaking changes",async()=>{e.debug("Checking for breaking changes");return{warnings:[],errors:[]}})},"checkForDeprecations");NP.checkForDeprecations=DRn});var Uxt=y(sOe=>{var uC=require("path");var XE=process.platform==="win32";var YE=require("fs");var LRn=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function FRn(){var e;if(LRn){var t=new Error;e=r}else e=n;return e;function r(i){if(i){t.message=i.message;i=t;n(i)}}a(r,"debugCallback");function n(i){if(i){if(process.throwDeprecation)throw i;else if(!process.noDeprecation){var s="fs: missing callback "+(i.stack||i.message);if(process.traceDeprecation)console.trace(s);else console.error(s)}}}a(n,"missingCallback")}a(FRn,"rethrow");function BRn(e){return typeof e==="function"?e:FRn()}a(BRn,"maybeCallback");var i8s=uC.normalize;if(XE){Ry=/(.*?)(?:[\/\\]+|$)/g}else{Ry=/(.*?)(?:[\/]+|$)/g}var Ry;if(XE){XF=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/}else{XF=/^[\/]*/}var XF;sOe.realpathSync=a(function e(t,r){t=uC.resolve(t);if(r&&Object.prototype.hasOwnProperty.call(r,t)){return r[t]}var n=t,i={},s={};var o;var u;var l;var c;d();function d(){var _=XF.exec(t);o=_[0].length;u=_[0];l=_[0];c="";if(XE&&!s[l]){YE.lstatSync(l);s[l]=true}}a(d,"start");while(o<t.length){Ry.lastIndex=o;var p=Ry.exec(t);c=u;u+=p[0];l=c+p[1];o=Ry.lastIndex;if(s[l]||r&&r[l]===l){continue}var f;if(r&&Object.prototype.hasOwnProperty.call(r,l)){f=r[l]}else{var m=YE.lstatSync(l);if(!m.isSymbolicLink()){s[l]=true;if(r)r[l]=l;continue}var h=null;if(!XE){var g=m.dev.toString(32)+":"+m.ino.toString(32);if(i.hasOwnProperty(g)){h=i[g]}}if(h===null){YE.statSync(l);h=YE.readlinkSync(l)}f=uC.resolve(c,h);if(r)r[l]=f;if(!XE)i[g]=h}t=uC.resolve(f,t.slice(o));d()}if(r)r[n]=t;return t},"realpathSync");sOe.realpath=a(function e(t,r,n){if(typeof n!=="function"){n=BRn(r);r=null}t=uC.resolve(t);if(r&&Object.prototype.hasOwnProperty.call(r,t)){return process.nextTick(n.bind(null,null,r[t]))}var i=t,s={},o={};var u;var l;var c;var d;p();function p(){var _=XF.exec(t);u=_[0].length;l=_[0];c=_[0];d="";if(XE&&!o[c]){YE.lstat(c,function(v){if(v)return n(v);o[c]=true;f()})}else{process.nextTick(f)}}a(p,"start");function f(){if(u>=t.length){if(r)r[i]=t;return n(null,t)}Ry.lastIndex=u;var _=Ry.exec(t);d=l;l+=_[0];c=d+_[1];u=Ry.lastIndex;if(o[c]||r&&r[c]===c){return process.nextTick(f)}if(r&&Object.prototype.hasOwnProperty.call(r,c)){return g(r[c])}return YE.lstat(c,m)}a(f,"LOOP");function m(_,v){if(_)return n(_);if(!v.isSymbolicLink()){o[c]=true;if(r)r[c]=c;return process.nextTick(f)}if(!XE){var S=v.dev.toString(32)+":"+v.ino.toString(32);if(s.hasOwnProperty(S)){return h(null,s[S],c)}}YE.stat(c,function(E){if(E)return n(E);YE.readlink(c,function(b,A){if(!XE)s[S]=A;h(b,A)})})}a(m,"gotStat");function h(_,v,S){if(_)return n(_);var E=uC.resolve(d,v);if(r)r[S]=E;g(E)}a(h,"gotTarget");function g(_){t=uC.resolve(_,t.slice(u));p()}a(g,"gotResolvedLink")},"realpath")});var lOe=y((o8s,Hxt)=>{Hxt.exports=JE;JE.realpath=JE;JE.sync=uOe;JE.realpathSync=uOe;JE.monkeypatch=qRn;JE.unmonkeypatch=URn;var IP=require("fs");var aOe=IP.realpath;var oOe=IP.realpathSync;var MRn=process.version;var $xt=/^v[0-5]\./.test(MRn);var jxt=Uxt();function Gxt(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}a(Gxt,"newError");function JE(e,t,r){if($xt){return aOe(e,t,r)}if(typeof t==="function"){r=t;t=null}aOe(e,t,function(n,i){if(Gxt(n)){jxt.realpath(e,t,r)}else{r(n,i)}})}a(JE,"realpath");function uOe(e,t){if($xt){return oOe(e,t)}try{return oOe(e,t)}catch(r){if(Gxt(r)){return jxt.realpathSync(e,t)}else{throw r}}}a(uOe,"realpathSync");function qRn(){IP.realpath=JE;IP.realpathSync=uOe}a(qRn,"monkeypatch");function URn(){IP.realpath=aOe;IP.realpathSync=oOe}a(URn,"unmonkeypatch")});var zxt=y((l8s,Vxt)=>{Vxt.exports=function(e,t){var r=[];for(var n=0;n<e.length;n++){var i=t(e[n],n);if($Rn(i))r.push.apply(r,i);else r.push(i)}return r};var $Rn=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"}});var cOe=y((c8s,Xxt)=>{"use strict";Xxt.exports=Wxt;function Wxt(e,t,r){if(e instanceof RegExp)e=Kxt(e,r);if(t instanceof RegExp)t=Kxt(t,r);var n=Yxt(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)}}a(Wxt,"balanced");function Kxt(e,t){var r=t.match(e);return r?r[0]:null}a(Kxt,"maybeMatch");Wxt.range=Yxt;function Yxt(e,t,r){var n,i,s,o,u;var l=r.indexOf(e);var c=r.indexOf(t,l+1);var d=l;if(l>=0&&c>0){if(e===t){return[l,c]}n=[];s=r.length;while(d>=0&&!u){if(d==l){n.push(d);l=r.indexOf(e,d+1)}else if(n.length==1){u=[n.pop(),c]}else{i=n.pop();if(i<s){s=i;o=c}c=r.indexOf(t,d+1)}d=l<c&&l>=0?l:c}if(n.length){u=[s,o]}}return u}a(Yxt,"range")});var iRt=y((p8s,nRt)=>{var jRn=zxt();var Jxt=cOe();nRt.exports=VRn;var Qxt="\0SLASH"+Math.random()+"\0";var Zxt="\0OPEN"+Math.random()+"\0";var pOe="\0CLOSE"+Math.random()+"\0";var eRt="\0COMMA"+Math.random()+"\0";var tRt="\0PERIOD"+Math.random()+"\0";function dOe(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}a(dOe,"numeric");function GRn(e){return e.split("\\\\").join(Qxt).split("\\{").join(Zxt).split("\\}").join(pOe).split("\\,").join(eRt).split("\\.").join(tRt)}a(GRn,"escapeBraces");function HRn(e){return e.split(Qxt).join("\\").split(Zxt).join("{").split(pOe).join("}").split(eRt).join(",").split(tRt).join(".")}a(HRn,"unescapeBraces");function rRt(e){if(!e)return[""];var t=[];var r=Jxt("{","}",e);if(!r)return e.split(",");var n=r.pre;var i=r.body;var s=r.post;var o=n.split(",");o[o.length-1]+="{"+i+"}";var u=rRt(s);if(s.length){o[o.length-1]+=u.shift();o.push.apply(o,u)}t.push.apply(t,o);return t}a(rRt,"parseCommaParts");function VRn(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return kP(GRn(e),true).map(HRn)}a(VRn,"expandTop");function zRn(e){return"{"+e+"}"}a(zRn,"embrace");function KRn(e){return/^-?0\d/.test(e)}a(KRn,"isPadded");function WRn(e,t){return e<=t}a(WRn,"lte");function YRn(e,t){return e>=t}a(YRn,"gte");function kP(e,t){var r=[];var n=Jxt("{","}",e);if(!n||/\$$/.test(n.pre))return[e];var i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body);var s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body);var o=i||s;var u=n.body.indexOf(",")>=0;if(!o&&!u){if(n.post.match(/,.*\}/)){e=n.pre+"{"+n.body+pOe+n.post;return kP(e)}return[e]}var l;if(o){l=n.body.split(/\.\./)}else{l=rRt(n.body);if(l.length===1){l=kP(l[0],false).map(zRn);if(l.length===1){var d=n.post.length?kP(n.post,false):[""];return d.map(function(I){return n.pre+l[0]+I})}}}var c=n.pre;var d=n.post.length?kP(n.post,false):[""];var p;if(o){var f=dOe(l[0]);var m=dOe(l[1]);var h=Math.max(l[0].length,l[1].length);var g=l.length==3?Math.abs(dOe(l[2])):1;var _=WRn;var v=m<f;if(v){g*=-1;_=YRn}var S=l.some(KRn);p=[];for(var E=f;_(E,m);E+=g){var b;if(s){b=String.fromCharCode(E);if(b==="\\")b=""}else{b=String(E);if(S){var A=h-b.length;if(A>0){var C=new Array(A+1).join("0");if(E<0)b="-"+C+b.slice(1);else b=C+b}}}p.push(b)}}else{p=jRn(l,function(R){return kP(R,false)})}for(var T=0;T<p.length;T++){for(var O=0;O<d.length;O++){var P=c+p[T]+d[O];if(!t||o||P)r.push(P)}}return r}a(kP,"expand")});var oQ=y((m8s,lRt)=>{lRt.exports=fp;fp.Minimatch=ol;var JF=function(){try{return require("path")}catch(e){}}()||{sep:"/"};fp.sep=JF.sep;var hOe=fp.GLOBSTAR=ol.GLOBSTAR={};var XRn=iRt();var sRt={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var fOe="[^/]";var mOe=fOe+"*?";var JRn="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var QRn="(?:(?!(?:\\/|^)\\.).)*?";var aRt=ZRn("().*{}+?[]^$\\!");function ZRn(e){return e.split("").reduce(function(t,r){t[r]=true;return t},{})}a(ZRn,"charSet");var oRt=/\/+/;fp.filter=eOn;function eOn(e,t){t=t||{};return function(r,n,i){return fp(r,e,t)}}a(eOn,"filter");function QE(e,t){t=t||{};var r={};Object.keys(e).forEach(function(n){r[n]=e[n]});Object.keys(t).forEach(function(n){r[n]=t[n]});return r}a(QE,"ext");fp.defaults=function(e){if(!e||typeof e!=="object"||!Object.keys(e).length){return fp}var t=fp;var r=a(function n(i,s,o){return t(i,s,QE(e,o))},"minimatch");r.Minimatch=a(function n(i,s){return new t.Minimatch(i,QE(e,s))},"Minimatch");r.Minimatch.defaults=a(function n(i){return t.defaults(QE(e,i)).Minimatch},"defaults");r.filter=a(function n(i,s){return t.filter(i,QE(e,s))},"filter");r.defaults=a(function n(i){return t.defaults(QE(e,i))},"defaults");r.makeRe=a(function n(i,s){return t.makeRe(i,QE(e,s))},"makeRe");r.braceExpand=a(function n(i,s){return t.braceExpand(i,QE(e,s))},"braceExpand");r.match=function(n,i,s){return t.match(n,i,QE(e,s))};return r};ol.defaults=function(e){return fp.defaults(e).Minimatch};function fp(e,t,r){aQ(t);if(!r)r={};if(!r.nocomment&&t.charAt(0)==="#"){return false}return new ol(t,r).match(e)}a(fp,"minimatch");function ol(e,t){if(!(this instanceof ol)){return new ol(e,t)}aQ(e);if(!t)t={};e=e.trim();if(!t.allowWindowsEscape&&JF.sep!=="/"){e=e.split(JF.sep).join("/")}this.options=t;this.set=[];this.pattern=e;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!t.partial;this.make()}a(ol,"Minimatch");ol.prototype.debug=function(){};ol.prototype.make=tOn;function tOn(){var e=this.pattern;var t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();var r=this.globSet=this.braceExpand();if(t.debug)this.debug=a(function n(){console.error.apply(console,arguments)},"debug");this.debug(this.pattern,r);r=this.globParts=r.map(function(n){return n.split(oRt)});this.debug(this.pattern,r);r=r.map(function(n,i,s){return n.map(this.parse,this)},this);this.debug(this.pattern,r);r=r.filter(function(n){return n.indexOf(false)===-1});this.debug(this.pattern,r);this.set=r}a(tOn,"make");ol.prototype.parseNegate=rOn;function rOn(){var e=this.pattern;var t=false;var r=this.options;var n=0;if(r.nonegate)return;for(var i=0,s=e.length;i<s&&e.charAt(i)==="!";i++){t=!t;n++}if(n)this.pattern=e.substr(n);this.negate=t}a(rOn,"parseNegate");fp.braceExpand=function(e,t){return uRt(e,t)};ol.prototype.braceExpand=uRt;function uRt(e,t){if(!t){if(this instanceof ol){t=this.options}else{t={}}}e=typeof e==="undefined"?this.pattern:e;aQ(e);if(t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)){return[e]}return XRn(e)}a(uRt,"braceExpand");var nOn=1024*64;var aQ=a(function(e){if(typeof e!=="string"){throw new TypeError("invalid pattern")}if(e.length>nOn){throw new TypeError("pattern is too long")}},"assertValidPattern");ol.prototype.parse=iOn;var sQ={};function iOn(e,t){aQ(e);var r=this.options;if(e==="**"){if(!r.noglobstar)return hOe;else e="*"}if(e==="")return"";var n="";var i=!!r.nocase;var s=false;var o=[];var u=[];var l;var c=false;var d=-1;var p=-1;var f=e.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var m=this;function h(){if(l){switch(l){case"*":n+=mOe;i=true;break;case"?":n+=fOe;i=true;break;default:n+="\\"+l;break}m.debug("clearStateChar %j %j",l,n);l=false}}a(h,"clearStateChar");for(var g=0,_=e.length,v;g<_&&(v=e.charAt(g));g++){this.debug("%s %s %s %j",e,g,n,v);if(s&&aRt[v]){n+="\\"+v;s=false;continue}switch(v){case"/":{return false}case"\\":h();s=true;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s %s %s %j <-- stateChar",e,g,n,v);if(c){this.debug(" in class");if(v==="!"&&g===p+1)v="^";n+=v;continue}m.debug("call clearStateChar %j",l);h();l=v;if(r.noext)h();continue;case"(":if(c){n+="(";continue}if(!l){n+="\\(";continue}o.push({type:l,start:g-1,reStart:n.length,open:sRt[l].open,close:sRt[l].close});n+=l==="!"?"(?:(?!(?:":"(?:";this.debug("plType %j %j",l,n);l=false;continue;case")":if(c||!o.length){n+="\\)";continue}h();i=true;var S=o.pop();n+=S.close;if(S.type==="!"){u.push(S)}S.reEnd=n.length;continue;case"|":if(c||!o.length||s){n+="\\|";s=false;continue}h();n+="|";continue;case"[":h();if(c){n+="\\"+v;continue}c=true;p=g;d=n.length;n+=v;continue;case"]":if(g===p+1||!c){n+="\\"+v;s=false;continue}var E=e.substring(p+1,g);try{RegExp("["+E+"]")}catch(M){var b=this.parse(E,sQ);n=n.substr(0,d)+"\\["+b[0]+"\\]";i=i||b[1];c=false;continue}i=true;c=false;n+=v;continue;default:h();if(s){s=false}else if(aRt[v]&&!(v==="^"&&c)){n+="\\"}n+=v}}if(c){E=e.substr(p+1);b=this.parse(E,sQ);n=n.substr(0,d)+"\\["+b[0];i=i||b[1]}for(S=o.pop();S;S=o.pop()){var A=n.slice(S.reStart+S.open.length);this.debug("setting tail",n,S);A=A.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(M,Q,fe){if(!fe){fe="\\"}return Q+Q+fe+"|"});this.debug("tail=%j\n %s",A,A,S,n);var C=S.type==="*"?mOe:S.type==="?"?fOe:"\\"+S.type;i=true;n=n.slice(0,S.reStart)+C+"\\("+A}h();if(s){n+="\\\\"}var T=false;switch(n.charAt(0)){case"[":case".":case"(":T=true}for(var O=u.length-1;O>-1;O--){var P=u[O];var R=n.slice(0,P.reStart);var I=n.slice(P.reStart,P.reEnd-8);var D=n.slice(P.reEnd-8,P.reEnd);var U=n.slice(P.reEnd);D+=U;var te=R.split("(").length-1;var ve=U;for(g=0;g<te;g++){ve=ve.replace(/\)[+*?]?/,"")}U=ve;var me="";if(U===""&&t!==sQ){me="$"}var he=R+I+U+me+D;n=he}if(n!==""&&i){n="(?=.)"+n}if(T){n=f+n}if(t===sQ){return[n,i]}if(!i){return aOn(e)}var Fe=r.nocase?"i":"";try{var Oe=new RegExp("^"+n+"$",Fe)}catch(M){return new RegExp("$.")}Oe._glob=e;Oe._src=n;return Oe}a(iOn,"parse");fp.makeRe=function(e,t){return new ol(e,t||{}).makeRe()};ol.prototype.makeRe=sOn;function sOn(){if(this.regexp||this.regexp===false)return this.regexp;var e=this.set;if(!e.length){this.regexp=false;return this.regexp}var t=this.options;var r=t.noglobstar?mOe:t.dot?JRn:QRn;var n=t.nocase?"i":"";var i=e.map(function(s){return s.map(function(o){return o===hOe?r:typeof o==="string"?oOn(o):o._src}).join("\\/")}).join("|");i="^(?:"+i+")$";if(this.negate)i="^(?!"+i+").*$";try{this.regexp=new RegExp(i,n)}catch(s){this.regexp=false}return this.regexp}a(sOn,"makeRe");fp.match=function(e,t,r){r=r||{};var n=new ol(t,r);e=e.filter(function(i){return n.match(i)});if(n.options.nonull&&!e.length){e.push(t)}return e};ol.prototype.match=a(function e(t,r){if(typeof r==="undefined")r=this.partial;this.debug("match",t,this.pattern);if(this.comment)return false;if(this.empty)return t==="";if(t==="/"&&r)return true;var n=this.options;if(JF.sep!=="/"){t=t.split(JF.sep).join("/")}t=t.split(oRt);this.debug(this.pattern,"split",t);var i=this.set;this.debug(this.pattern,"set",i);var s;var o;for(o=t.length-1;o>=0;o--){s=t[o];if(s)break}for(o=0;o<i.length;o++){var u=i[o];var l=t;if(n.matchBase&&u.length===1){l=[s]}var c=this.matchOne(l,u,r);if(c){if(n.flipNegate)return true;return!this.negate}}if(n.flipNegate)return false;return this.negate},"match");ol.prototype.matchOne=function(e,t,r){var n=this.options;this.debug("matchOne",{"this":this,file:e,pattern:t});this.debug("matchOne",e.length,t.length);for(var i=0,s=0,o=e.length,u=t.length;i<o&&s<u;i++,s++){this.debug("matchOne loop");var l=t[s];var c=e[i];this.debug(t,l,c);if(l===false)return false;if(l===hOe){this.debug("GLOBSTAR",[t,l,c]);var d=i;var p=s+1;if(p===u){this.debug("** at the end");for(;i<o;i++){if(e[i]==="."||e[i]===".."||!n.dot&&e[i].charAt(0)===".")return false}return true}while(d<o){var f=e[d];this.debug("\nglobstar while",e,d,t,p,f);if(this.matchOne(e.slice(d),t.slice(p),r)){this.debug("globstar found match!",d,o,f);return true}else{if(f==="."||f===".."||!n.dot&&f.charAt(0)==="."){this.debug("dot detected!",e,d,t,p);break}this.debug("globstar swallow a segment, and continue");d++}}if(r){this.debug("\n>>> no match, partial?",e,d,t,p);if(d===o)return true}return false}var m;if(typeof l==="string"){m=c===l;this.debug("string match",l,c,m)}else{m=c.match(l);this.debug("pattern match",l,c,m)}if(!m)return false}if(i===o&&s===u){return true}else if(i===o){return r}else if(s===u){return i===o-1&&e[i]===""}throw new Error("wtf?")};function aOn(e){return e.replace(/\\(.)/g,"$1")}a(aOn,"globUnescape");function oOn(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}a(oOn,"regExpEscape")});var lQ=y((g8s,uQ)=>{"use strict";function cRt(e){return e.charAt(0)==="/"}a(cRt,"posix");function dRt(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;var r=t.exec(e);var n=r[1]||"";var i=Boolean(n&&n.charAt(1)!==":");return Boolean(r[2]||i)}a(dRt,"win32");uQ.exports=process.platform==="win32"?dRt:cRt;uQ.exports.posix=cRt;uQ.exports.win32=dRt});var yOe=y(ZE=>{ZE.setopts=fOn;ZE.ownProp=pRt;ZE.makeAbs=QF;ZE.finish=mOn;ZE.mark=hOn;ZE.isIgnored=mRt;ZE.childrenIgnored=gOn;function pRt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}a(pRt,"ownProp");var uOn=require("fs");var DP=require("path");var lOn=oQ();var fRt=lQ();var gOe=lOn.Minimatch;function cOn(e,t){return e.localeCompare(t,"en")}a(cOn,"alphasort");function dOn(e,t){e.ignore=t.ignore||[];if(!Array.isArray(e.ignore))e.ignore=[e.ignore];if(e.ignore.length){e.ignore=e.ignore.map(pOn)}}a(dOn,"setupIgnores");function pOn(e){var t=null;if(e.slice(-3)==="/**"){var r=e.replace(/(\/\*\*)+$/,"");t=new gOe(r,{dot:true})}return{matcher:new gOe(e,{dot:true}),gmatcher:t}}a(pOn,"ignoreMap");function fOn(e,t,r){if(!r)r={};if(r.matchBase&&-1===t.indexOf("/")){if(r.noglobstar){throw new Error("base matching requires globstar")}t="**/"+t}e.silent=!!r.silent;e.pattern=t;e.strict=r.strict!==false;e.realpath=!!r.realpath;e.realpathCache=r.realpathCache||Object.create(null);e.follow=!!r.follow;e.dot=!!r.dot;e.mark=!!r.mark;e.nodir=!!r.nodir;if(e.nodir)e.mark=true;e.sync=!!r.sync;e.nounique=!!r.nounique;e.nonull=!!r.nonull;e.nosort=!!r.nosort;e.nocase=!!r.nocase;e.stat=!!r.stat;e.noprocess=!!r.noprocess;e.absolute=!!r.absolute;e.fs=r.fs||uOn;e.maxLength=r.maxLength||Infinity;e.cache=r.cache||Object.create(null);e.statCache=r.statCache||Object.create(null);e.symlinks=r.symlinks||Object.create(null);dOn(e,r);e.changedCwd=false;var n=process.cwd();if(!pRt(r,"cwd"))e.cwd=n;else{e.cwd=DP.resolve(r.cwd);e.changedCwd=e.cwd!==n}e.root=r.root||DP.resolve(e.cwd,"/");e.root=DP.resolve(e.root);if(process.platform==="win32")e.root=e.root.replace(/\\/g,"/");e.cwdAbs=fRt(e.cwd)?e.cwd:QF(e,e.cwd);if(process.platform==="win32")e.cwdAbs=e.cwdAbs.replace(/\\/g,"/");e.nomount=!!r.nomount;r.nonegate=true;r.nocomment=true;r.allowWindowsEscape=false;e.minimatch=new gOe(t,r);e.options=e.minimatch.options}a(fOn,"setopts");function mOn(e){var t=e.nounique;var r=t?[]:Object.create(null);for(var n=0,i=e.matches.length;n<i;n++){var s=e.matches[n];if(!s||Object.keys(s).length===0){if(e.nonull){var o=e.minimatch.globSet[n];if(t)r.push(o);else r[o]=true}}else{var u=Object.keys(s);if(t)r.push.apply(r,u);else u.forEach(function(l){r[l]=true})}}if(!t)r=Object.keys(r);if(!e.nosort)r=r.sort(cOn);if(e.mark){for(var n=0;n<r.length;n++){r[n]=e._mark(r[n])}if(e.nodir){r=r.filter(function(l){var c=!/\/$/.test(l);var d=e.cache[l]||e.cache[QF(e,l)];if(c&&d)c=d!=="DIR"&&!Array.isArray(d);return c})}}if(e.ignore.length)r=r.filter(function(l){return!mRt(e,l)});e.found=r}a(mOn,"finish");function hOn(e,t){var r=QF(e,t);var n=e.cache[r];var i=t;if(n){var s=n==="DIR"||Array.isArray(n);var o=t.slice(-1)==="/";if(s&&!o)i+="/";else if(!s&&o)i=i.slice(0,-1);if(i!==t){var u=QF(e,i);e.statCache[u]=e.statCache[r];e.cache[u]=e.cache[r]}}return i}a(hOn,"mark");function QF(e,t){var r=t;if(t.charAt(0)==="/"){r=DP.join(e.root,t)}else if(fRt(t)||t===""){r=t}else if(e.changedCwd){r=DP.resolve(e.cwd,t)}else{r=DP.resolve(t)}if(process.platform==="win32")r=r.replace(/\\/g,"/");return r}a(QF,"makeAbs");function mRt(e,t){if(!e.ignore.length)return false;return e.ignore.some(function(r){return r.matcher.match(t)||!!(r.gmatcher&&r.gmatcher.match(t))})}a(mRt,"isIgnored");function gOn(e,t){if(!e.ignore.length)return false;return e.ignore.some(function(r){return!!(r.gmatcher&&r.gmatcher.match(t))})}a(gOn,"childrenIgnored")});var vRt=y((A8s,_Rt)=>{_Rt.exports=yRt;yRt.GlobSync=ru;var yOn=lOe();var hRt=oQ();var E8s=hRt.Minimatch;var b8s=EOe().Glob;var S8s=require("util");var _Oe=require("path");var gRt=require("assert");var cQ=lQ();var lC=yOe();var _On=lC.setopts;var vOe=lC.ownProp;var vOn=lC.childrenIgnored;var EOn=lC.isIgnored;function yRt(e,t){if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new ru(e,t).found}a(yRt,"globSync");function ru(e,t){if(!e)throw new Error("must provide pattern");if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof ru))return new ru(e,t);_On(this,e,t);if(this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;n<r;n++){this._process(this.minimatch.set[n],n,false)}this._finish()}a(ru,"GlobSync");ru.prototype._finish=function(){gRt.ok(this instanceof ru);if(this.realpath){var e=this;this.matches.forEach(function(t,r){var n=e.matches[r]=Object.create(null);for(var i in t){try{i=e._makeAbs(i);var s=yOn.realpathSync(i,e.realpathCache);n[s]=true}catch(o){if(o.syscall==="stat")n[e._makeAbs(i)]=true;else throw o}}})}lC.finish(this)};ru.prototype._process=function(e,t,r){gRt.ok(this instanceof ru);var n=0;while(typeof e[n]==="string"){n++}var i;switch(n){case e.length:this._processSimple(e.join("/"),t);return;case 0:i=null;break;default:i=e.slice(0,n).join("/");break}var s=e.slice(n);var o;if(i===null)o=".";else if(cQ(i)||cQ(e.map(function(c){return typeof c==="string"?c:"[*]"}).join("/"))){if(!i||!cQ(i))i="/"+i;o=i}else o=i;var u=this._makeAbs(o);if(vOn(this,o))return;var l=s[0]===hRt.GLOBSTAR;if(l)this._processGlobStar(i,o,u,s,t,r);else this._processReaddir(i,o,u,s,t,r)};ru.prototype._processReaddir=function(e,t,r,n,i,s){var o=this._readdir(r,s);if(!o)return;var u=n[0];var l=!!this.minimatch.negate;var c=u._glob;var d=this.dot||c.charAt(0)===".";var p=[];for(var f=0;f<o.length;f++){var m=o[f];if(m.charAt(0)!=="."||d){var h;if(l&&!e){h=!m.match(u)}else{h=m.match(u)}if(h)p.push(m)}}var g=p.length;if(g===0)return;if(n.length===1&&!this.mark&&!this.stat){if(!this.matches[i])this.matches[i]=Object.create(null);for(var f=0;f<g;f++){var m=p[f];if(e){if(e.slice(-1)!=="/")m=e+"/"+m;else m=e+m}if(m.charAt(0)==="/"&&!this.nomount){m=_Oe.join(this.root,m)}this._emitMatch(i,m)}return}n.shift();for(var f=0;f<g;f++){var m=p[f];var _;if(e)_=[e,m];else _=[m];this._process(_.concat(n),i,s)}};ru.prototype._emitMatch=function(e,t){if(EOn(this,t))return;var r=this._makeAbs(t);if(this.mark)t=this._mark(t);if(this.absolute){t=r}if(this.matches[e][t])return;if(this.nodir){var n=this.cache[r];if(n==="DIR"||Array.isArray(n))return}this.matches[e][t]=true;if(this.stat)this._stat(t)};ru.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,false);var t;var r;var n;try{r=this.fs.lstatSync(e)}catch(s){if(s.code==="ENOENT"){return null}}var i=r&&r.isSymbolicLink();this.symlinks[e]=i;if(!i&&r&&!r.isDirectory())this.cache[e]="FILE";else t=this._readdir(e,false);return t};ru.prototype._readdir=function(e,t){var r;if(t&&!vOe(this.symlinks,e))return this._readdirInGlobStar(e);if(vOe(this.cache,e)){var n=this.cache[e];if(!n||n==="FILE")return null;if(Array.isArray(n))return n}try{return this._readdirEntries(e,this.fs.readdirSync(e))}catch(i){this._readdirError(e,i);return null}};ru.prototype._readdirEntries=function(e,t){if(!this.mark&&!this.stat){for(var r=0;r<t.length;r++){var n=t[r];if(e==="/")n=e+n;else n=e+"/"+n;this.cache[n]=true}}this.cache[e]=t;return t};ru.prototype._readdirError=function(e,t){switch(t.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(e);this.cache[r]="FILE";if(r===this.cwdAbs){var n=new Error(t.code+" invalid cwd "+this.cwd);n.path=this.cwd;n.code=t.code;throw n}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=false;break;default:this.cache[this._makeAbs(e)]=false;if(this.strict)throw t;if(!this.silent)console.error("glob error",t);break}};ru.prototype._processGlobStar=function(e,t,r,n,i,s){var o=this._readdir(r,s);if(!o)return;var u=n.slice(1);var l=e?[e]:[];var c=l.concat(u);this._process(c,i,false);var d=o.length;var p=this.symlinks[r];if(p&&s)return;for(var f=0;f<d;f++){var m=o[f];if(m.charAt(0)==="."&&!this.dot)continue;var h=l.concat(o[f],u);this._process(h,i,true);var g=l.concat(o[f],n);this._process(g,i,true)}};ru.prototype._processSimple=function(e,t){var r=this._stat(e);if(!this.matches[t])this.matches[t]=Object.create(null);if(!r)return;if(e&&cQ(e)&&!this.nomount){var n=/[\/\\]$/.test(e);if(e.charAt(0)==="/"){e=_Oe.join(this.root,e)}else{e=_Oe.resolve(this.root,e);if(n)e+="/"}}if(process.platform==="win32")e=e.replace(/\\/g,"/");this._emitMatch(t,e)};ru.prototype._stat=function(e){var t=this._makeAbs(e);var r=e.slice(-1)==="/";if(e.length>this.maxLength)return false;if(!this.stat&&vOe(this.cache,t)){var o=this.cache[t];if(Array.isArray(o))o="DIR";if(!r||o==="DIR")return o;if(r&&o==="FILE")return false}var n;var i=this.statCache[t];if(!i){var s;try{s=this.fs.lstatSync(t)}catch(u){if(u&&(u.code==="ENOENT"||u.code==="ENOTDIR")){this.statCache[t]=false;return false}}if(s&&s.isSymbolicLink()){try{i=this.fs.statSync(t)}catch(u){i=s}}else{i=s}}this.statCache[t]=i;var o=true;if(i)o=i.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||o;if(r&&o==="FILE")return false;return o};ru.prototype._mark=function(e){return lC.mark(this,e)};ru.prototype._makeAbs=function(e){return lC.makeAbs(this,e)}});var bRt=y((w8s,ERt)=>{var bOn=eSe();var ZF=Object.create(null);var SOn=OW();ERt.exports=bOn(AOn);function AOn(e,t){if(ZF[e]){ZF[e].push(t);return null}else{ZF[e]=[t];return COn(e)}}a(AOn,"inflight");function COn(e){return SOn(a(function t(){var r=ZF[e];var n=r.length;var i=wOn(arguments);try{for(var s=0;s<n;s++){r[s].apply(null,i)}}finally{if(r.length>n){r.splice(0,n);process.nextTick(function(){t.apply(null,i)})}else{delete ZF[e]}}},"RES"))}a(COn,"makeres");function wOn(e){var t=e.length;var r=[];for(var n=0;n<t;n++)r[n]=e[n];return r}a(wOn,"slice")});var EOe=y((O8s,ARt)=>{ARt.exports=cC;var TOn=lOe();var SRt=oQ();var x8s=SRt.Minimatch;var xOn=Jv();var ROn=require("events").EventEmitter;var bOe=require("path");var SOe=require("assert");var e7=lQ();var COe=vRt();var dC=yOe();var OOn=dC.setopts;var AOe=dC.ownProp;var wOe=bRt();var R8s=require("util");var POn=dC.childrenIgnored;var NOn=dC.isIgnored;var IOn=OW();function cC(e,t,r){if(typeof t==="function")r=t,t={};if(!t)t={};if(t.sync){if(r)throw new TypeError("callback provided to sync glob");return COe(e,t)}return new Cs(e,t,r)}a(cC,"glob");cC.sync=COe;var kOn=cC.GlobSync=COe.GlobSync;cC.glob=cC;function DOn(e,t){if(t===null||typeof t!=="object"){return e}var r=Object.keys(t);var n=r.length;while(n--){e[r[n]]=t[r[n]]}return e}a(DOn,"extend");cC.hasMagic=function(e,t){var r=DOn({},t);r.noprocess=true;var n=new Cs(e,r);var i=n.minimatch.set;if(!e)return false;if(i.length>1)return true;for(var s=0;s<i[0].length;s++){if(typeof i[0][s]!=="string")return true}return false};cC.Glob=Cs;xOn(Cs,ROn);function Cs(e,t,r){if(typeof t==="function"){r=t;t=null}if(t&&t.sync){if(r)throw new TypeError("callback provided to sync glob");return new kOn(e,t)}if(!(this instanceof Cs))return new Cs(e,t,r);OOn(this,e,t);this._didRealPath=false;var n=this.minimatch.set.length;this.matches=new Array(n);if(typeof r==="function"){r=IOn(r);this.on("error",r);this.on("end",function(l){r(null,l)})}var i=this;this._processing=0;this._emitQueue=[];this._processQueue=[];this.paused=false;if(this.noprocess)return this;if(n===0)return u();var s=true;for(var o=0;o<n;o++){this._process(this.minimatch.set[o],o,false,u)}s=false;function u(){--i._processing;if(i._processing<=0){if(s){process.nextTick(function(){i._finish()})}else{i._finish()}}}a(u,"done")}a(Cs,"Glob");Cs.prototype._finish=function(){SOe(this instanceof Cs);if(this.aborted)return;if(this.realpath&&!this._didRealpath)return this._realpath();dC.finish(this);this.emit("end",this.found)};Cs.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=true;var e=this.matches.length;if(e===0)return this._finish();var t=this;for(var r=0;r<this.matches.length;r++)this._realpathSet(r,n);function n(){if(--e===0)t._finish()}a(n,"next")};Cs.prototype._realpathSet=function(e,t){var r=this.matches[e];if(!r)return t();var n=Object.keys(r);var i=this;var s=n.length;if(s===0)return t();var o=this.matches[e]=Object.create(null);n.forEach(function(u,l){u=i._makeAbs(u);TOn.realpath(u,i.realpathCache,function(c,d){if(!c)o[d]=true;else if(c.syscall==="stat")o[u]=true;else i.emit("error",c);if(--s===0){i.matches[e]=o;t()}})})};Cs.prototype._mark=function(e){return dC.mark(this,e)};Cs.prototype._makeAbs=function(e){return dC.makeAbs(this,e)};Cs.prototype.abort=function(){this.aborted=true;this.emit("abort")};Cs.prototype.pause=function(){if(!this.paused){this.paused=true;this.emit("pause")}};Cs.prototype.resume=function(){if(this.paused){this.emit("resume");this.paused=false;if(this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var t=0;t<e.length;t++){var r=e[t];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(var t=0;t<n.length;t++){var i=n[t];this._processing--;this._process(i[0],i[1],i[2],i[3])}}}};Cs.prototype._process=function(e,t,r,n){SOe(this instanceof Cs);SOe(typeof n==="function");if(this.aborted)return;this._processing++;if(this.paused){this._processQueue.push([e,t,r,n]);return}var i=0;while(typeof e[i]==="string"){i++}var s;switch(i){case e.length:this._processSimple(e.join("/"),t,n);return;case 0:s=null;break;default:s=e.slice(0,i).join("/");break}var o=e.slice(i);var u;if(s===null)u=".";else if(e7(s)||e7(e.map(function(d){return typeof d==="string"?d:"[*]"}).join("/"))){if(!s||!e7(s))s="/"+s;u=s}else u=s;var l=this._makeAbs(u);if(POn(this,u))return n();var c=o[0]===SRt.GLOBSTAR;if(c)this._processGlobStar(s,u,l,o,t,r,n);else this._processReaddir(s,u,l,o,t,r,n)};Cs.prototype._processReaddir=function(e,t,r,n,i,s,o){var u=this;this._readdir(r,s,function(l,c){return u._processReaddir2(e,t,r,n,i,s,c,o)})};Cs.prototype._processReaddir2=function(e,t,r,n,i,s,o,u){if(!o)return u();var l=n[0];var c=!!this.minimatch.negate;var d=l._glob;var p=this.dot||d.charAt(0)===".";var f=[];for(var m=0;m<o.length;m++){var h=o[m];if(h.charAt(0)!=="."||p){var g;if(c&&!e){g=!h.match(l)}else{g=h.match(l)}if(g)f.push(h)}}var _=f.length;if(_===0)return u();if(n.length===1&&!this.mark&&!this.stat){if(!this.matches[i])this.matches[i]=Object.create(null);for(var m=0;m<_;m++){var h=f[m];if(e){if(e!=="/")h=e+"/"+h;else h=e+h}if(h.charAt(0)==="/"&&!this.nomount){h=bOe.join(this.root,h)}this._emitMatch(i,h)}return u()}n.shift();for(var m=0;m<_;m++){var h=f[m];var v;if(e){if(e!=="/")h=e+"/"+h;else h=e+h}this._process([h].concat(n),i,s,u)}u()};Cs.prototype._emitMatch=function(e,t){if(this.aborted)return;if(NOn(this,t))return;if(this.paused){this._emitQueue.push([e,t]);return}var r=e7(t)?t:this._makeAbs(t);if(this.mark)t=this._mark(t);if(this.absolute)t=r;if(this.matches[e][t])return;if(this.nodir){var n=this.cache[r];if(n==="DIR"||Array.isArray(n))return}this.matches[e][t]=true;var i=this.statCache[r];if(i)this.emit("stat",t,i);this.emit("match",t)};Cs.prototype._readdirInGlobStar=function(e,t){if(this.aborted)return;if(this.follow)return this._readdir(e,false,t);var r="lstat\0"+e;var n=this;var i=wOe(r,s);if(i)n.fs.lstat(e,i);function s(o,u){if(o&&o.code==="ENOENT")return t();var l=u&&u.isSymbolicLink();n.symlinks[e]=l;if(!l&&u&&!u.isDirectory()){n.cache[e]="FILE";t()}else n._readdir(e,false,t)}a(s,"lstatcb_")};Cs.prototype._readdir=function(e,t,r){if(this.aborted)return;r=wOe("readdir\0"+e+"\0"+t,r);if(!r)return;if(t&&!AOe(this.symlinks,e))return this._readdirInGlobStar(e,r);if(AOe(this.cache,e)){var n=this.cache[e];if(!n||n==="FILE")return r();if(Array.isArray(n))return r(null,n)}var i=this;i.fs.readdir(e,LOn(this,e,r))};function LOn(e,t,r){return function(n,i){if(n)e._readdirError(t,n,r);else e._readdirEntries(t,i,r)}}a(LOn,"readdirCb");Cs.prototype._readdirEntries=function(e,t,r){if(this.aborted)return;if(!this.mark&&!this.stat){for(var n=0;n<t.length;n++){var i=t[n];if(e==="/")i=e+i;else i=e+"/"+i;this.cache[i]=true}}this.cache[e]=t;return r(null,t)};Cs.prototype._readdirError=function(e,t,r){if(this.aborted)return;switch(t.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(e);this.cache[n]="FILE";if(n===this.cwdAbs){var i=new Error(t.code+" invalid cwd "+this.cwd);i.path=this.cwd;i.code=t.code;this.emit("error",i);this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=false;break;default:this.cache[this._makeAbs(e)]=false;if(this.strict){this.emit("error",t);this.abort()}if(!this.silent)console.error("glob error",t);break}return r()};Cs.prototype._processGlobStar=function(e,t,r,n,i,s,o){var u=this;this._readdir(r,s,function(l,c){u._processGlobStar2(e,t,r,n,i,s,c,o)})};Cs.prototype._processGlobStar2=function(e,t,r,n,i,s,o,u){if(!o)return u();var l=n.slice(1);var c=e?[e]:[];var d=c.concat(l);this._process(d,i,false,u);var p=this.symlinks[r];var f=o.length;if(p&&s)return u();for(var m=0;m<f;m++){var h=o[m];if(h.charAt(0)==="."&&!this.dot)continue;var g=c.concat(o[m],l);this._process(g,i,true,u);var _=c.concat(o[m],n);this._process(_,i,true,u)}u()};Cs.prototype._processSimple=function(e,t,r){var n=this;this._stat(e,function(i,s){n._processSimple2(e,t,i,s,r)})};Cs.prototype._processSimple2=function(e,t,r,n,i){if(!this.matches[t])this.matches[t]=Object.create(null);if(!n)return i();if(e&&e7(e)&&!this.nomount){var s=/[\/\\]$/.test(e);if(e.charAt(0)==="/"){e=bOe.join(this.root,e)}else{e=bOe.resolve(this.root,e);if(s)e+="/"}}if(process.platform==="win32")e=e.replace(/\\/g,"/");this._emitMatch(t,e);i()};Cs.prototype._stat=function(e,t){var r=this._makeAbs(e);var n=e.slice(-1)==="/";if(e.length>this.maxLength)return t();if(!this.stat&&AOe(this.cache,r)){var i=this.cache[r];if(Array.isArray(i))i="DIR";if(!n||i==="DIR")return t(null,i);if(n&&i==="FILE")return t()}var s;var o=this.statCache[r];if(o!==void 0){if(o===false)return t(null,o);else{var u=o.isDirectory()?"DIR":"FILE";if(n&&u==="FILE")return t();else return t(null,u,o)}}var l=this;var c=wOe("stat\0"+r,d);if(c)l.fs.lstat(r,c);function d(p,f){if(f&&f.isSymbolicLink()){return l.fs.stat(r,function(m,h){if(m)l._stat2(e,r,null,f,t);else l._stat2(e,r,m,h,t)})}else{l._stat2(e,r,p,f,t)}}a(d,"lstatcb_")};Cs.prototype._stat2=function(e,t,r,n,i){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[t]=false;return i()}var s=e.slice(-1)==="/";this.statCache[t]=n;if(t.slice(-1)==="/"&&n&&!n.isDirectory())return i(null,false,n);var o=true;if(n)o=n.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||o;if(s&&o==="FILE")return i();return i(null,o,n)}});var IRt=y((N8s,NRt)=>{NRt.exports=ROe;ROe.sync=PRt;var ds=require("assert");var xRt=require("path");var CRt=require("fs");var fQ=EOe();var RRt=parseInt("666",8);var FOn={nosort:true,silent:true};var TOe=0;var t7=process.platform==="win32";function ORt(e){var t=["unlink","chmod","stat","lstat","rmdir","readdir"];t.forEach(function(r){e[r]=e[r]||CRt[r];r=r+"Sync";e[r]=e[r]||CRt[r]});e.maxBusyTries=e.maxBusyTries||3;e.emfileWait=e.emfileWait||1e3;if(e.glob===false){e.disableGlob=true}e.disableGlob=e.disableGlob||false;e.glob=e.glob||FOn}a(ORt,"defaults");function ROe(e,t,r){if(typeof t==="function"){r=t;t={}}ds(e,"rimraf: missing path");ds.equal(typeof e,"string","rimraf: path should be a string");ds.equal(typeof r,"function","rimraf: callback function required");ds(t,"rimraf: invalid options argument provided");ds.equal(typeof t,"object","rimraf: options should be object");ORt(t);var n=0;var i=null;var s=0;if(t.disableGlob||!fQ.hasMagic(e))return u(null,[e]);t.lstat(e,function(l,c){if(!l)return u(null,[e]);fQ(e,t.glob,u)});function o(l){i=i||l;if(--s===0)r(i)}a(o,"next");function u(l,c){if(l)return r(l);s=c.length;if(s===0)return r();c.forEach(function(d){xOe(d,t,a(function p(f){if(f){if((f.code==="EBUSY"||f.code==="ENOTEMPTY"||f.code==="EPERM")&&n<t.maxBusyTries){n++;var m=n*100;return setTimeout(function(){xOe(d,t,p)},m)}if(f.code==="EMFILE"&&TOe<t.emfileWait){return setTimeout(function(){xOe(d,t,p)},TOe++)}if(f.code==="ENOENT")f=null}TOe=0;o(f)},"CB"))})}a(u,"afterGlob")}a(ROe,"rimraf");function xOe(e,t,r){ds(e);ds(t);ds(typeof r==="function");t.lstat(e,function(n,i){if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&t7)wRt(e,t,n,r);if(i&&i.isDirectory())return dQ(e,t,n,r);t.unlink(e,function(s){if(s){if(s.code==="ENOENT")return r(null);if(s.code==="EPERM")return t7?wRt(e,t,s,r):dQ(e,t,s,r);if(s.code==="EISDIR")return dQ(e,t,s,r)}return r(s)})})}a(xOe,"rimraf_");function wRt(e,t,r,n){ds(e);ds(t);ds(typeof n==="function");if(r)ds(r instanceof Error);t.chmod(e,RRt,function(i){if(i)n(i.code==="ENOENT"?null:r);else t.stat(e,function(s,o){if(s)n(s.code==="ENOENT"?null:r);else if(o.isDirectory())dQ(e,t,r,n);else t.unlink(e,n)})})}a(wRt,"fixWinEPERM");function TRt(e,t,r){ds(e);ds(t);if(r)ds(r instanceof Error);try{t.chmodSync(e,RRt)}catch(i){if(i.code==="ENOENT")return;else throw r}try{var n=t.statSync(e)}catch(i){if(i.code==="ENOENT")return;else throw r}if(n.isDirectory())pQ(e,t,r);else t.unlinkSync(e)}a(TRt,"fixWinEPERMSync");function dQ(e,t,r,n){ds(e);ds(t);if(r)ds(r instanceof Error);ds(typeof n==="function");t.rmdir(e,function(i){if(i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM"))BOn(e,t,n);else if(i&&i.code==="ENOTDIR")n(r);else n(i)})}a(dQ,"rmdir");function BOn(e,t,r){ds(e);ds(t);ds(typeof r==="function");t.readdir(e,function(n,i){if(n)return r(n);var s=i.length;if(s===0)return t.rmdir(e,r);var o;i.forEach(function(u){ROe(xRt.join(e,u),t,function(l){if(o)return;if(l)return r(o=l);if(--s===0)t.rmdir(e,r)})})})}a(BOn,"rmkids");function PRt(e,t){t=t||{};ORt(t);ds(e,"rimraf: missing path");ds.equal(typeof e,"string","rimraf: path should be a string");ds(t,"rimraf: missing options");ds.equal(typeof t,"object","rimraf: options should be object");var r;if(t.disableGlob||!fQ.hasMagic(e)){r=[e]}else{try{t.lstatSync(e);r=[e]}catch(s){r=fQ.sync(e,t.glob)}}if(!r.length)return;for(var n=0;n<r.length;n++){var e=r[n];try{var i=t.lstatSync(e)}catch(o){if(o.code==="ENOENT")return;if(o.code==="EPERM"&&t7)TRt(e,t,o)}try{if(i&&i.isDirectory())pQ(e,t,null);else t.unlinkSync(e)}catch(o){if(o.code==="ENOENT")return;if(o.code==="EPERM")return t7?TRt(e,t,o):pQ(e,t,o);if(o.code!=="EISDIR")throw o;pQ(e,t,o)}}}a(PRt,"rimrafSync");function pQ(e,t,r){ds(e);ds(t);if(r)ds(r instanceof Error);try{t.rmdirSync(e)}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")MOn(e,t)}}a(pQ,"rmdirSync");function MOn(e,t){ds(e);ds(t);t.readdirSync(e).forEach(function(o){PRt(xRt.join(e,o),t)});var r=t7?100:1;var n=0;do{var i=true;try{var s=t.rmdirSync(e,t);i=false;return s}finally{if(++n<r&&i)continue}}while(true)}a(MOn,"rmkidsSync")});var FRt=y((k8s,LRt)=>{var r7=require("path");var kRt=require("fs");var DRt=parseInt("0777",8);LRt.exports=LP.mkdirp=LP.mkdirP=LP;function LP(e,t,r,n){if(typeof t==="function"){r=t;t={}}else if(!t||typeof t!=="object"){t={mode:t}}var i=t.mode;var s=t.fs||kRt;if(i===void 0){i=DRt}if(!n)n=null;var o=r||function(){};e=r7.resolve(e);s.mkdir(e,i,function(u){if(!u){n=n||e;return o(null,n)}switch(u.code){case"ENOENT":if(r7.dirname(e)===e)return o(u);LP(r7.dirname(e),t,function(l,c){if(l)o(l,c);else LP(e,t,o,c)});break;default:s.stat(e,function(l,c){if(l||!c.isDirectory())o(u,n);else o(null,n)});break}})}a(LP,"mkdirP");LP.sync=a(function e(t,r,n){if(!r||typeof r!=="object"){r={mode:r}}var i=r.mode;var s=r.fs||kRt;if(i===void 0){i=DRt}if(!n)n=null;t=r7.resolve(t);try{s.mkdirSync(t,i);n=n||t}catch(u){switch(u.code){case"ENOENT":n=e(r7.dirname(t),r,n);e(t,r,n);break;default:var o;try{o=s.statSync(t)}catch(l){throw u}if(!o.isDirectory())throw u;break}}return n},"sync")});var zRt=y((hh,VRt)=>{var OOe=require("fs");var MRt=require("path");var mQ=require("constants");var qOn=require("os");var POe=IRt();var qRt=FRt();var L8s=require("os").tmpdir();var URt=POe.sync;var $Rt=MRt.resolve(qOn.tmpdir());var NOe=mQ.O_CREAT|mQ.O_TRUNC|mQ.O_RDWR|mQ.O_EXCL;var n7=a(function(e){if(typeof e==="function"){return[void 0,e]}var t;var r=new Promise(function(n,i){t=a(function(){var s=Array.from(arguments);var o=s.shift();process.nextTick(function(){if(o){i(o)}else if(s.length===1){n(s[0])}else{n(s)}})},"promiseCallback")});return[r,t]},"promisify");var FP=a(function(e,t){var r=UOn(e,t);var n=new Date;var i=[r.prefix,n.getFullYear(),n.getMonth(),n.getDate(),"-",process.pid,"-",(Math.random()*4294967296+1).toString(36),r.suffix].join("");return MRt.join(r.dir||$Rt,i)},"generateName");var UOn=a(function(e,t){var r={prefix:null,suffix:null};if(e){switch(typeof e){case"string":r.prefix=e;break;case"object":r=e;break;default:throw new Error("Unknown affix declaration: "+r)}}else{r.prefix=t}return r},"parseAffixes");var ag=false;var $On=a(function(e){ag=e!==false;return VRt.exports},"track");var BRt=false;var hQ=[];var gQ=[];function IOe(e){if(!ag)return false;GRt();hQ.push(e)}a(IOe,"deleteFileOnExit");function jRt(e){if(!ag)return false;GRt();gQ.push(e)}a(jRt,"deleteDirOnExit");function GRt(){if(!ag)return false;if(!BRt){process.addListener("exit",function(){try{HRt()}catch(e){console.warn("Fail to clean temporary files on exit : ",e);throw e}});BRt=true}}a(GRt,"attachExitListener");function jOn(){if(!ag){return false}var e=0;var t;while((t=hQ.shift())!==void 0){URt(t,{maxBusyTries:6});e++}return e}a(jOn,"cleanupFilesSync");function GOn(e){var t=n7(e);var r=t[0];e=t[1];if(!ag){e(new Error("not tracking"));return r}var n=0;var i=hQ.length;if(!i){e(null,n);return r}var s;var o=a(function(u){if(!i){return}if(u){e(u);i=0;return}else{n++}i--;if(!i){e(null,n)}},"rimrafCallback");while((s=hQ.shift())!==void 0){POe(s,{maxBusyTries:6},o)}return r}a(GOn,"cleanupFiles");function HOn(){if(!ag){return false}var e=0;var t;while((t=gQ.shift())!==void 0){URt(t,{maxBusyTries:6});e++}return e}a(HOn,"cleanupDirsSync");function VOn(e){var t=n7(e);var r=t[0];e=t[1];if(!ag){e(new Error("not tracking"));return r}var n=0;var i=gQ.length;if(!i){e(null,n);return r}var s;var o=a(function(u){if(!i){return}if(u){e(u,n);i=0;return}else{n++}i--;if(!i){e(null,n)}},"rimrafCallback");while((s=gQ.shift())!==void 0){POe(s,{maxBusyTries:6},o)}return r}a(VOn,"cleanupDirs");function HRt(){if(!ag){return false}var e=jOn();var t=HOn();return{files:e,dirs:t}}a(HRt,"cleanupSync");function zOn(e){var t=n7(e);var r=t[0];e=t[1];if(!ag){e(new Error("not tracking"));return r}GOn(function(n,i){if(n){e(n,{files:i})}else{VOn(function(s,o){e(s,{files:i,dirs:o})})}});return r}a(zOn,"cleanup");var KOn=a((e,t)=>{const r=n7(t);const n=r[0];t=r[1];let i=FP(e,"d-");qRt(i,448,s=>{if(!s){jRt(i)}t(s,i)});return n},"mkdir");var WOn=a(e=>{let t=FP(e,"d-");qRt.sync(t,448);jRt(t);return t},"mkdirSync");var YOn=a((e,t)=>{const r=n7(t);const n=r[0];t=r[1];const i=FP(e,"f-");OOe.open(i,NOe,384,(s,o)=>{if(!s){IOe(i)}t(s,{path:i,fd:o})});return n},"open");var XOn=a(e=>{const t=FP(e,"f-");let r=OOe.openSync(t,NOe,384);IOe(t);return{path:t,fd:r}},"openSync");var JOn=a(e=>{const t=FP(e,"s-");let r=OOe.createWriteStream(t,{flags:NOe,mode:384});IOe(t);return r},"createWriteStream");hh.dir=$Rt;hh.track=$On;hh.mkdir=KOn;hh.mkdirSync=WOn;hh.open=YOn;hh.openSync=XOn;hh.path=FP;hh.cleanup=zOn;hh.cleanupSync=HRt;hh.createWriteStream=JOn});var XRt=y(BP=>{"use strict";var YRt=BP&&BP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(BP,"__esModule",{value:true});BP.generateBuildData=void 0;var yQ=hn();var KRt=require("fs/promises");var WRt=YRt(require("path"));var QOn=Fn();var ZOn=YRt(xs());var ePn=a(async function({systemDirectory:e,buildId:t,logger:r,config:n,publicZuploEnvironmentVariables:i}){return ZOn.default.timeFn("Generating build data",async()=>{r.debug(`Generating build data`);const s=await(0,KRt.readFile)(WRt.default.resolve(__dirname,"../../../package.json"),"utf-8");const o=JSON.parse(s);const u={BUILD_ID:t??"",GIT_SHA:process.env.GIT_SHA,TIMESTAMP:new Date().toISOString(),IS_PRODUCTION:yQ.env.isProduction(),BUILD_ENV:yQ.env.NODE_ENV,ZUPLO_VERSION:o.version,API_VERSION:process.env.API_VERSION,COMPATIBILITY_DATE:n?.compatibilityDate,ACCOUNT_NAME:i?.ZUPLO_ACCOUNT_NAME,PROJECT_NAME:i?.ZUPLO_PROJECT_NAME,ENVIRONMENT_TYPE:i?.ZUPLO_ENVIRONMENT_TYPE,COMPATIBILITY_FLAGS:yQ.COMPATIBILITY_FLAG_MAPPINGS?yQ.COMPATIBILITY_FLAG_MAPPINGS[n?.compatibilityDate??"none"]:{runOutboundPoliciesOnHandlerOnAllStatuses:false}};const l=JSON.stringify(u,void 0,2);const c=WRt.default.join(e,QOn.GENERATED_BUILD_JSON_FILE);try{await(0,KRt.writeFile)(c,l.trimStart(),"utf-8")}catch(d){r.error(d);const p={message:`Error creating file at ${c}`,pluginName:"buildData",severity:"error"};return{warnings:[],errors:[p]}}return{warnings:[],errors:[]}})},"generateBuildData");BP.generateBuildData=ePn});var JRt=y(MP=>{"use strict";var DOe=MP&&MP.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(MP,"__esModule",{value:true});MP.generateWorker=void 0;var tPn=DOe(require("fs/promises"));var rPn=DOe(require("path"));var kOe=Fn();var nPn=DOe(xs());var iPn=a(async function({systemDirectory:e,logger:t}){return nPn.default.timeFn("Generating Worker shim",async()=>{t.debug("Generating Worker shim");const r=`import { Handler, ServiceProviderImpl } from "@zuplo/runtime";
411
411
  import routeData from "../config/routes.json";
412
412
  import * as schemaValidations from "./ajv-schema.json";
413
413
  import { runtimeInit } from "../modules/zuplo.runtime.ts";
@@ -456,7 +456,7 @@ export default environment;`;function qNn(e){return{name:"environment",setup(t){
456
456
  || ${o} === "boolean" || ${i} === null`).assign(u,(0,Nn._)`[${i}]`)}}a(l,"coerceSpecificType")}a(FIn,"coerceData");function BIn({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Nn._)`${t} !== undefined`,()=>e.assign((0,Nn._)`${t}[${r}]`,n))}a(BIn,"assignParentData");function hPe(e,t,r,n=g7.Correct){const i=n===g7.Correct?Nn.operators.EQ:Nn.operators.NEQ;let s;switch(e){case"null":return(0,Nn._)`${t} ${i} null`;case"array":s=(0,Nn._)`Array.isArray(${t})`;break;case"object":s=(0,Nn._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=o((0,Nn._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=o();break;default:return(0,Nn._)`typeof ${t} ${i} ${e}`}return n===g7.Correct?s:(0,Nn.not)(s);function o(u=Nn.nil){return(0,Nn.and)((0,Nn._)`typeof ${t} == "number"`,u,r?(0,Nn._)`isFinite(${t})`:Nn.nil)}a(o,"numCond")}a(hPe,"checkDataType");ul.checkDataType=hPe;function gPe(e,t,r,n){if(e.length===1){return hPe(e[0],t,r,n)}let i;const s=(0,YOt.toHash)(e);if(s.array&&s.object){const o=(0,Nn._)`typeof ${t} != "object"`;i=s.null?o:(0,Nn._)`!${t} || ${o}`;delete s.null;delete s.array;delete s.object}else{i=Nn.nil}if(s.number)delete s.integer;for(const o in s)i=(0,Nn.and)(i,hPe(o,t,r,n));return i}a(gPe,"checkDataTypes");ul.checkDataTypes=gPe;var MIn={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Nn._)`{type: ${e}}`:(0,Nn._)`{type: ${t}}`};function yPe(e){const t=qIn(e);(0,IIn.reportError)(t,MIn)}a(yPe,"reportTypeError");ul.reportTypeError=yPe;function qIn(e){const{gen:t,data:r,schema:n}=e;const i=(0,YOt.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}a(qIn,"getTypeErrorContext")});var ZOt=y(FQ=>{"use strict";Object.defineProperty(FQ,"__esModule",{value:true});FQ.assignDefaults=void 0;var KP=_n();var UIn=pi();function $In(e,t){const{properties:r,items:n}=e.schema;if(t==="object"&&r){for(const i in r){QOt(e,i,r[i].default)}}else if(t==="array"&&Array.isArray(n)){n.forEach((i,s)=>QOt(e,s,i.default))}}a($In,"assignDefaults");FQ.assignDefaults=$In;function QOt(e,t,r){const{gen:n,compositeRule:i,data:s,opts:o}=e;if(r===void 0)return;const u=(0,KP._)`${s}${(0,KP.getProperty)(t)}`;if(i){(0,UIn.checkStrictMode)(e,`default is ignored for: ${u}`);return}let l=(0,KP._)`${u} === undefined`;if(o.useDefaults==="empty"){l=(0,KP._)`${l} || ${u} === null || ${u} === ""`}n.if(l,(0,KP._)`${u} = ${(0,KP.stringify)(r)}`)}a(QOt,"assignDefault")});var Uf=y(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:true});Ls.validateUnion=Ls.validateArray=Ls.usePattern=Ls.callValidateCode=Ls.schemaProperties=Ls.allSchemaProperties=Ls.noPropertyInData=Ls.propertyInData=Ls.isOwnProperty=Ls.hasPropFunc=Ls.reportMissingProp=Ls.checkMissingProp=Ls.checkReportMissingProp=void 0;var Sa=_n();var _Pe=pi();var sb=qf();var jIn=pi();function GIn(e,t){const{gen:r,data:n,it:i}=e;r.if(EPe(r,n,t,i.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Sa._)`${t}`},true);e.error()})}a(GIn,"checkReportMissingProp");Ls.checkReportMissingProp=GIn;function HIn({gen:e,data:t,it:{opts:r}},n,i){return(0,Sa.or)(...n.map(s=>(0,Sa.and)(EPe(e,t,s,r.ownProperties),(0,Sa._)`${i} = ${s}`)))}a(HIn,"checkMissingProp");Ls.checkMissingProp=HIn;function VIn(e,t){e.setParams({missingProperty:t},true);e.error()}a(VIn,"reportMissingProp");Ls.reportMissingProp=VIn;function ePt(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Sa._)`Object.prototype.hasOwnProperty`})}a(ePt,"hasPropFunc");Ls.hasPropFunc=ePt;function vPe(e,t,r){return(0,Sa._)`${ePt(e)}.call(${t}, ${r})`}a(vPe,"isOwnProperty");Ls.isOwnProperty=vPe;function zIn(e,t,r,n){const i=(0,Sa._)`${t}${(0,Sa.getProperty)(r)} !== undefined`;return n?(0,Sa._)`${i} && ${vPe(e,t,r)}`:i}a(zIn,"propertyInData");Ls.propertyInData=zIn;function EPe(e,t,r,n){const i=(0,Sa._)`${t}${(0,Sa.getProperty)(r)} === undefined`;return n?(0,Sa.or)(i,(0,Sa.not)(vPe(e,t,r))):i}a(EPe,"noPropertyInData");Ls.noPropertyInData=EPe;function tPt(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}a(tPt,"allSchemaProperties");Ls.allSchemaProperties=tPt;function KIn(e,t){return tPt(t).filter(r=>!(0,_Pe.alwaysValidSchema)(e,t[r]))}a(KIn,"schemaProperties");Ls.schemaProperties=KIn;function WIn({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:s},it:o},u,l,c){const d=c?(0,Sa._)`${e}, ${t}, ${n}${i}`:t;const p=[[sb.default.instancePath,(0,Sa.strConcat)(sb.default.instancePath,s)],[sb.default.parentData,o.parentData],[sb.default.parentDataProperty,o.parentDataProperty],[sb.default.rootData,sb.default.rootData]];if(o.opts.dynamicRef)p.push([sb.default.dynamicAnchors,sb.default.dynamicAnchors]);const f=(0,Sa._)`${d}, ${r.object(...p)}`;return l!==Sa.nil?(0,Sa._)`${u}.call(${l}, ${f})`:(0,Sa._)`${u}(${f})`}a(WIn,"callValidateCode");Ls.callValidateCode=WIn;var YIn=(0,Sa._)`new RegExp`;function XIn({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"";const{regExp:i}=t.code;const s=i(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Sa._)`${i.code==="new RegExp"?YIn:(0,jIn.useFunc)(e,i)}(${r}, ${n})`})}a(XIn,"usePattern");Ls.usePattern=XIn;function JIn(e){const{gen:t,data:r,keyword:n,it:i}=e;const s=t.name("valid");if(i.allErrors){const u=t.let("valid",true);o(()=>t.assign(u,false));return u}t.var(s,true);o(()=>t.break());return s;function o(u){const l=t.const("len",(0,Sa._)`${r}.length`);t.forRange("i",0,l,c=>{e.subschema({keyword:n,dataProp:c,dataPropType:_Pe.Type.Num},s);t.if((0,Sa.not)(s),u)})}a(o,"validateItems")}a(JIn,"validateArray");Ls.validateArray=JIn;function QIn(e){const{gen:t,schema:r,keyword:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=r.some(l=>(0,_Pe.alwaysValidSchema)(i,l));if(s&&!i.opts.unevaluated)return;const o=t.let("valid",false);const u=t.name("_valid");t.block(()=>r.forEach((l,c)=>{const d=e.subschema({keyword:n,schemaProp:c,compositeRule:true},u);t.assign(o,(0,Sa._)`${o} || ${u}`);const p=e.mergeValidEvaluated(d,u);if(!p)t.if((0,Sa.not)(o))}));e.result(o,()=>e.reset(),()=>e.error(true))}a(QIn,"validateUnion");Ls.validateUnion=QIn});var iPt=y(og=>{"use strict";Object.defineProperty(og,"__esModule",{value:true});og.validateKeywordUsage=og.validSchemaType=og.funcKeywordCode=og.macroKeywordCode=void 0;var Pc=_n();var vC=qf();var ZIn=Uf();var e3n=h7();function t3n(e,t){const{gen:r,keyword:n,schema:i,parentSchema:s,it:o}=e;const u=t.macro.call(o.self,i,s,o);const l=nPt(r,n,u);if(o.opts.validateSchema!==false)o.self.validateSchema(u,true);const c=r.name("valid");e.subschema({schema:u,schemaPath:Pc.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:l,compositeRule:true},c);e.pass(c,()=>e.error(true))}a(t3n,"macroKeywordCode");og.macroKeywordCode=t3n;function r3n(e,t){var r;const{gen:n,keyword:i,schema:s,parentSchema:o,$data:u,it:l}=e;i3n(l,t);const c=!u&&t.compile?t.compile.call(l.self,s,o,l):t.validate;const d=nPt(n,i,c);const p=n.let("valid");e.block$data(p,f);e.ok((r=t.valid)!==null&&r!==void 0?r:p);function f(){if(t.errors===false){g();if(t.modifying)rPt(e);_(()=>e.error())}else{const v=t.async?m():h();if(t.modifying)rPt(e);_(()=>n3n(e,v))}}a(f,"validateKeyword");function m(){const v=n.let("ruleErrs",null);n.try(()=>g((0,Pc._)`await `),S=>n.assign(p,false).if((0,Pc._)`${S} instanceof ${l.ValidationError}`,()=>n.assign(v,(0,Pc._)`${S}.errors`),()=>n.throw(S)));return v}a(m,"validateAsync");function h(){const v=(0,Pc._)`${d}.errors`;n.assign(v,null);g(Pc.nil);return v}a(h,"validateSync");function g(v=t.async?(0,Pc._)`await `:Pc.nil){const S=l.opts.passContext?vC.default.this:vC.default.self;const E=!("compile"in t&&!u||t.schema===false);n.assign(p,(0,Pc._)`${v}${(0,ZIn.callValidateCode)(e,d,S,E)}`,t.modifying)}a(g,"assignValid");function _(v){var S;n.if((0,Pc.not)((S=t.valid)!==null&&S!==void 0?S:p),v)}a(_,"reportErrs")}a(r3n,"funcKeywordCode");og.funcKeywordCode=r3n;function rPt(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Pc._)`${n.parentData}[${n.parentDataProperty}]`))}a(rPt,"modifyData");function n3n(e,t){const{gen:r}=e;r.if((0,Pc._)`Array.isArray(${t})`,()=>{r.assign(vC.default.vErrors,(0,Pc._)`${vC.default.vErrors} === null ? ${t} : ${vC.default.vErrors}.concat(${t})`).assign(vC.default.errors,(0,Pc._)`${vC.default.vErrors}.length`);(0,e3n.extendErrors)(e)},()=>e.error())}a(n3n,"addErrs");function i3n({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}a(i3n,"checkAsyncKeyword");function nPt(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,Pc.stringify)(r)})}a(nPt,"useKeyword");function s3n(e,t,r=false){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=="undefined")}a(s3n,"validSchemaType");og.validSchemaType=s3n;function a3n({schema:e,opts:t,self:r,errSchemaPath:n},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s){throw new Error("ajv implementation error")}const o=i.dependencies;if(o===null||o===void 0?void 0:o.some(u=>!Object.prototype.hasOwnProperty.call(e,u))){throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`)}if(i.validateSchema){const u=i.validateSchema(e[s]);if(!u){const l=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(l);else throw new Error(l)}}}a(a3n,"validateKeywordUsage");og.validateKeywordUsage=a3n});var aPt=y(ab=>{"use strict";Object.defineProperty(ab,"__esModule",{value:true});ab.extendSubschemaMode=ab.extendSubschemaData=ab.getSubschema=void 0;var ug=_n();var sPt=pi();function o3n(e,{keyword:t,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:s,topSchemaRef:o}){if(t!==void 0&&n!==void 0){throw new Error('both "keyword" and "schema" passed, only one allowed')}if(t!==void 0){const u=e.schema[t];return r===void 0?{schema:u,schemaPath:(0,ug._)`${e.schemaPath}${(0,ug.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:u[r],schemaPath:(0,ug._)`${e.schemaPath}${(0,ug.getProperty)(t)}${(0,ug.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,sPt.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||s===void 0||o===void 0){throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"')}return{schema:n,schemaPath:i,topSchemaRef:o,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}a(o3n,"getSubschema");ab.getSubschema=o3n;function u3n(e,t,{dataProp:r,dataPropType:n,data:i,dataTypes:s,propertyName:o}){if(i!==void 0&&r!==void 0){throw new Error('both "data" and "dataProp" passed, only one allowed')}const{gen:u}=t;if(r!==void 0){const{errorPath:c,dataPathArr:d,opts:p}=t;const f=u.let("data",(0,ug._)`${t.data}${(0,ug.getProperty)(r)}`,true);l(f);e.errorPath=(0,ug.str)`${c}${(0,sPt.getErrorPath)(r,n,p.jsPropertySyntax)}`;e.parentDataProperty=(0,ug._)`${r}`;e.dataPathArr=[...d,e.parentDataProperty]}if(i!==void 0){const c=i instanceof ug.Name?i:u.let("data",i,true);l(c);if(o!==void 0)e.propertyName=o}if(s)e.dataTypes=s;function l(c){e.data=c;e.dataLevel=t.dataLevel+1;e.dataTypes=[];t.definedProperties=new Set;e.parentData=t.data;e.dataNames=[...t.dataNames,c]}a(l,"dataContextProps")}a(u3n,"extendSubschemaData");ab.extendSubschemaData=u3n;function l3n(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:s}){if(n!==void 0)e.compositeRule=n;if(i!==void 0)e.createErrors=i;if(s!==void 0)e.allErrors=s;e.jtdDiscriminator=t;e.jtdMetadata=r}a(l3n,"extendSubschemaMode");ab.extendSubschemaMode=l3n});var _7=y(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:true});Cd.getSchemaRefs=Cd.resolveUrl=Cd.normalizeId=Cd._getFullPath=Cd.getFullPath=Cd.inlineRef=void 0;var c3n=pi();var d3n=rp();var p3n=dx();var f3n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function m3n(e,t=true){if(typeof e=="boolean")return true;if(t===true)return!bPe(e);if(!t)return false;return oPt(e)<=t}a(m3n,"inlineRef");Cd.inlineRef=m3n;var h3n=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function bPe(e){for(const t in e){if(h3n.has(t))return true;const r=e[t];if(Array.isArray(r)&&r.some(bPe))return true;if(typeof r=="object"&&bPe(r))return true}return false}a(bPe,"hasRef");function oPt(e){let t=0;for(const r in e){if(r==="$ref")return Infinity;t++;if(f3n.has(r))continue;if(typeof e[r]=="object"){(0,c3n.eachItem)(e[r],n=>t+=oPt(n))}if(t===Infinity)return Infinity}return t}a(oPt,"countKeys");function uPt(e,t="",r){if(r!==false)t=WP(t);const n=e.parse(t);return lPt(e,n)}a(uPt,"getFullPath");Cd.getFullPath=uPt;function lPt(e,t){const r=e.serialize(t);return r.split("#")[0]+"#"}a(lPt,"_getFullPath");Cd._getFullPath=lPt;var g3n=/#\/?$/;function WP(e){return e?e.replace(g3n,""):""}a(WP,"normalizeId");Cd.normalizeId=WP;function y3n(e,t,r){r=WP(r);return e.resolve(t,r)}a(y3n,"resolveUrl");Cd.resolveUrl=y3n;var _3n=/^[a-z_][-a-z0-9._]*$/i;function v3n(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts;const i=WP(e[r]||t);const s={"":i};const o=uPt(n,i,false);const u={};const l=new Set;p3n(e,{allKeys:true},(p,f,m,h)=>{if(h===void 0)return;const g=o+f;let _=s[h];if(typeof p[r]=="string")_=v.call(this,p[r]);S.call(this,p.$anchor);S.call(this,p.$dynamicAnchor);s[f]=_;function v(E){const b=this.opts.uriResolver.resolve;E=WP(_?b(_,E):E);if(l.has(E))throw d(E);l.add(E);let A=this.refs[E];if(typeof A=="string")A=this.refs[A];if(typeof A=="object"){c(p,A.schema,E)}else if(E!==WP(g)){if(E[0]==="#"){c(p,u[E],E);u[E]=p}else{this.refs[E]=g}}return E}a(v,"addRef");function S(E){if(typeof E=="string"){if(!_3n.test(E))throw new Error(`invalid anchor "${E}"`);v.call(this,`#${E}`)}}a(S,"addAnchor")});return u;function c(p,f,m){if(f!==void 0&&!d3n(p,f))throw d(m)}a(c,"checkAmbiguosRef");function d(p){return new Error(`reference "${p}" resolves to more than one schema`)}a(d,"ambiguos")}a(v3n,"getSchemaRefs");Cd.getSchemaRefs=v3n});var YP=y(ob=>{"use strict";Object.defineProperty(ob,"__esModule",{value:true});ob.getData=ob.KeywordCxt=ob.validateFunctionCode=void 0;var mPt=zOt();var cPt=y7();var APe=mPe();var BQ=y7();var E3n=ZOt();var E7=iPt();var SPe=aPt();var Ar=_n();var an=qf();var b3n=_7();var Iy=pi();var v7=h7();function S3n(e){if(yPt(e)){_Pt(e);if(gPt(e)){w3n(e);return}}hPt(e,()=>(0,mPt.topBoolOrEmptySchema)(e))}a(S3n,"validateFunctionCode");ob.validateFunctionCode=S3n;function hPt({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},s){if(i.code.es5){e.func(t,(0,Ar._)`${an.default.data}, ${an.default.valCxt}`,n.$async,()=>{e.code((0,Ar._)`"use strict"; ${dPt(r,i)}`);C3n(e,i);e.code(s)})}else{e.func(t,(0,Ar._)`${an.default.data}, ${A3n(i)}`,n.$async,()=>e.code(dPt(r,i)).code(s))}}a(hPt,"validateFunction");function A3n(e){return(0,Ar._)`{${an.default.instancePath}="", ${an.default.parentData}, ${an.default.parentDataProperty}, ${an.default.rootData}=${an.default.data}${e.dynamicRef?(0,Ar._)`, ${an.default.dynamicAnchors}={}`:Ar.nil}}={}`}a(A3n,"destructureValCxt");function C3n(e,t){e.if(an.default.valCxt,()=>{e.var(an.default.instancePath,(0,Ar._)`${an.default.valCxt}.${an.default.instancePath}`);e.var(an.default.parentData,(0,Ar._)`${an.default.valCxt}.${an.default.parentData}`);e.var(an.default.parentDataProperty,(0,Ar._)`${an.default.valCxt}.${an.default.parentDataProperty}`);e.var(an.default.rootData,(0,Ar._)`${an.default.valCxt}.${an.default.rootData}`);if(t.dynamicRef)e.var(an.default.dynamicAnchors,(0,Ar._)`${an.default.valCxt}.${an.default.dynamicAnchors}`)},()=>{e.var(an.default.instancePath,(0,Ar._)`""`);e.var(an.default.parentData,(0,Ar._)`undefined`);e.var(an.default.parentDataProperty,(0,Ar._)`undefined`);e.var(an.default.rootData,an.default.data);if(t.dynamicRef)e.var(an.default.dynamicAnchors,(0,Ar._)`{}`)})}a(C3n,"destructureValCxtES5");function w3n(e){const{schema:t,opts:r,gen:n}=e;hPt(e,()=>{if(r.$comment&&t.$comment)EPt(e);P3n(e);n.let(an.default.vErrors,null);n.let(an.default.errors,0);if(r.unevaluated)T3n(e);vPt(e);k3n(e)});return}a(w3n,"topSchemaObjCode");function T3n(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,Ar._)`${r}.evaluated`);t.if((0,Ar._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,Ar._)`${e.evaluated}.props`,(0,Ar._)`undefined`));t.if((0,Ar._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,Ar._)`${e.evaluated}.items`,(0,Ar._)`undefined`))}a(T3n,"resetEvaluated");function dPt(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,Ar._)`/*# sourceURL=${r} */`:Ar.nil}a(dPt,"funcSourceUrl");function x3n(e,t){if(yPt(e)){_Pt(e);if(gPt(e)){R3n(e,t);return}}(0,mPt.boolOrEmptySchema)(e,t)}a(x3n,"subschemaCode");function gPt({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return true;return false}a(gPt,"schemaCxtHasRules");function yPt(e){return typeof e.schema!="boolean"}a(yPt,"isSchemaObj");function R3n(e,t){const{schema:r,gen:n,opts:i}=e;if(i.$comment&&r.$comment)EPt(e);N3n(e);I3n(e);const s=n.const("_errs",an.default.errors);vPt(e,s);n.var(t,(0,Ar._)`${s} === ${an.default.errors}`)}a(R3n,"subSchemaObjCode");function _Pt(e){(0,Iy.checkUnknownRules)(e);O3n(e)}a(_Pt,"checkKeywords");function vPt(e,t){if(e.opts.jtd)return pPt(e,[],false,t);const r=(0,cPt.getSchemaTypes)(e.schema);const n=(0,cPt.coerceAndCheckDataType)(e,r);pPt(e,r,!n,t)}a(vPt,"typeAndKeywords");function O3n(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;if(t.$ref&&n.ignoreKeywordsWithRef&&(0,Iy.schemaHasRulesButRef)(t,i.RULES)){i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}}a(O3n,"checkRefsAndKeywords");function P3n(e){const{schema:t,opts:r}=e;if(t.default!==void 0&&r.useDefaults&&r.strictSchema){(0,Iy.checkStrictMode)(e,"default is ignored in the schema root")}}a(P3n,"checkNoDefault");function N3n(e){const t=e.schema[e.opts.schemaId];if(t)e.baseId=(0,b3n.resolveUrl)(e.opts.uriResolver,e.baseId,t)}a(N3n,"updateContext");function I3n(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}a(I3n,"checkAsyncSchema");function EPt({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const s=r.$comment;if(i.$comment===true){e.code((0,Ar._)`${an.default.self}.logger.log(${s})`)}else if(typeof i.$comment=="function"){const o=(0,Ar.str)`${n}/$comment`;const u=e.scopeValue("root",{ref:t.root});e.code((0,Ar._)`${an.default.self}.opts.$comment(${s}, ${o}, ${u}.schema)`)}}a(EPt,"commentKeyword");function k3n(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:s}=e;if(r.$async){t.if((0,Ar._)`${an.default.errors} === 0`,()=>t.return(an.default.data),()=>t.throw((0,Ar._)`new ${i}(${an.default.vErrors})`))}else{t.assign((0,Ar._)`${n}.errors`,an.default.vErrors);if(s.unevaluated)D3n(e);t.return((0,Ar._)`${an.default.errors} === 0`)}}a(k3n,"returnResults");function D3n({gen:e,evaluated:t,props:r,items:n}){if(r instanceof Ar.Name)e.assign((0,Ar._)`${t}.props`,r);if(n instanceof Ar.Name)e.assign((0,Ar._)`${t}.items`,n)}a(D3n,"assignEvaluated");function pPt(e,t,r,n){const{gen:i,schema:s,data:o,allErrors:u,opts:l,self:c}=e;const{RULES:d}=c;if(s.$ref&&(l.ignoreKeywordsWithRef||!(0,Iy.schemaHasRulesButRef)(s,d))){i.block(()=>SPt(e,"$ref",d.all.$ref.definition));return}if(!l.jtd)L3n(e,t);i.block(()=>{for(const f of d.rules)p(f);p(d.post)});function p(f){if(!(0,APe.shouldUseGroup)(s,f))return;if(f.type){i.if((0,BQ.checkDataType)(f.type,o,l.strictNumbers));fPt(e,f);if(t.length===1&&t[0]===f.type&&r){i.else();(0,BQ.reportTypeError)(e)}i.endIf()}else{fPt(e,f)}if(!u)i.if((0,Ar._)`${an.default.errors} === ${n||0}`)}a(p,"groupKeywords")}a(pPt,"schemaKeywords");function fPt(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;if(i)(0,E3n.assignDefaults)(e,t.type);r.block(()=>{for(const s of t.rules){if((0,APe.shouldUseRule)(n,s)){SPt(e,s.keyword,s.definition,t.type)}}})}a(fPt,"iterateKeywords");function L3n(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;F3n(e,t);if(!e.opts.allowUnionTypes)B3n(e,t);M3n(e,e.dataTypes)}a(L3n,"checkStrictTypes");function F3n(e,t){if(!t.length)return;if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{if(!bPt(e.dataTypes,r)){CPe(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}});U3n(e,t)}a(F3n,"checkContextTypes");function B3n(e,t){if(t.length>1&&!(t.length===2&&t.includes("null"))){CPe(e,"use allowUnionTypes to allow union type keyword")}}a(B3n,"checkMultipleTypes");function M3n(e,t){const r=e.self.RULES.all;for(const n in r){const i=r[n];if(typeof i=="object"&&(0,APe.shouldUseRule)(e.schema,i)){const{type:s}=i.definition;if(s.length&&!s.some(o=>q3n(t,o))){CPe(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}}a(M3n,"checkKeywordTypes");function q3n(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}a(q3n,"hasApplicableType");function bPt(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}a(bPt,"includesType");function U3n(e,t){const r=[];for(const n of e.dataTypes){if(bPt(t,n))r.push(n);else if(t.includes("integer")&&n==="number")r.push("integer")}e.dataTypes=r}a(U3n,"narrowSchemaTypes");function CPe(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`;(0,Iy.checkStrictMode)(e,t,e.opts.strictTypes)}a(CPe,"strictTypesError");var MQ=class{static{a(this,"KeywordCxt")}constructor(t,r,n){(0,E7.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,Iy.schemaRefOrVal)(t,this.schema,n,this.$data);this.schemaType=r.schemaType;this.parentSchema=t.schema;this.params={};this.it=t;this.def=r;if(this.$data){this.schemaCode=t.gen.const("vSchema",APt(this.$data,t))}else{this.schemaCode=this.schemaValue;if(!(0,E7.validSchemaType)(this.schema,r.schemaType,r.allowUndefined)){throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`)}}if("code"in r?r.trackErrors:r.errors!==false){this.errsCount=t.gen.const("_errs",an.default.errors)}}result(t,r,n){this.failResult((0,Ar.not)(t),r,n)}failResult(t,r,n){this.gen.if(t);if(n)n();else this.error();if(r){this.gen.else();r();if(this.allErrors)this.gen.endIf()}else{if(this.allErrors)this.gen.endIf();else this.gen.else()}}pass(t,r){this.failResult((0,Ar.not)(t),void 0,r)}fail(t){if(t===void 0){this.error();if(!this.allErrors)this.gen.if(false);return}this.gen.if(t);this.error();if(this.allErrors)this.gen.endIf();else this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail((0,Ar._)`${r} !== undefined && (${(0,Ar.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?v7.reportExtraError:v7.reportError)(this,this.def.error,r)}$dataError(){(0,v7.reportError)(this,this.def.$dataError||v7.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,v7.resetErrorsCount)(this.gen,this.errsCount)}ok(t){if(!this.allErrors)this.gen.if(t)}setParams(t,r){if(r)Object.assign(this.params,t);else this.params=t}block$data(t,r,n=Ar.nil){this.gen.block(()=>{this.check$data(t,n);r()})}check$data(t=Ar.nil,r=Ar.nil){if(!this.$data)return;const{gen:n,schemaCode:i,schemaType:s,def:o}=this;n.if((0,Ar.or)((0,Ar._)`${i} === undefined`,r));if(t!==Ar.nil)n.assign(t,true);if(s.length||o.validateSchema){n.elseIf(this.invalid$data());this.$dataError();if(t!==Ar.nil)n.assign(t,false)}n.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:n,def:i,it:s}=this;return(0,Ar.or)(o(),u());function o(){if(n.length){if(!(r instanceof Ar.Name))throw new Error("ajv implementation error");const l=Array.isArray(n)?n:[n];return(0,Ar._)`${(0,BQ.checkDataTypes)(l,r,s.opts.strictNumbers,BQ.DataType.Wrong)}`}return Ar.nil}a(o,"wrong$DataType");function u(){if(i.validateSchema){const l=t.scopeValue("validate$data",{ref:i.validateSchema});return(0,Ar._)`!${l}(${r})`}return Ar.nil}a(u,"invalid$DataSchema")}subschema(t,r){const n=(0,SPe.getSubschema)(this.it,t);(0,SPe.extendSubschemaData)(n,this.it,t);(0,SPe.extendSubschemaMode)(n,t);const i={...this.it,...n,items:void 0,props:void 0};x3n(i,r);return i}mergeEvaluated(t,r){const{it:n,gen:i}=this;if(!n.opts.unevaluated)return;if(n.props!==true&&t.props!==void 0){n.props=Iy.mergeEvaluated.props(i,t.props,n.props,r)}if(n.items!==true&&t.items!==void 0){n.items=Iy.mergeEvaluated.items(i,t.items,n.items,r)}}mergeValidEvaluated(t,r){const{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==true||n.items!==true)){i.if(r,()=>this.mergeEvaluated(t,Ar.Name));return true}}};ob.KeywordCxt=MQ;function SPt(e,t,r,n){const i=new MQ(e,r,t);if("code"in r){r.code(i,n)}else if(i.$data&&r.validate){(0,E7.funcKeywordCode)(i,r)}else if("macro"in r){(0,E7.macroKeywordCode)(i,r)}else if(r.compile||r.validate){(0,E7.funcKeywordCode)(i,r)}}a(SPt,"keywordCode");var $3n=/^\/(?:[^~]|~0|~1)*$/;var j3n=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function APt(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i;let s;if(e==="")return an.default.rootData;if(e[0]==="/"){if(!$3n.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e;s=an.default.rootData}else{const c=j3n.exec(e);if(!c)throw new Error(`Invalid JSON-pointer: ${e}`);const d=+c[1];i=c[2];if(i==="#"){if(d>=t)throw new Error(l("property/index",d));return n[t-d]}if(d>t)throw new Error(l("data",d));s=r[t-d];if(!i)return s}let o=s;const u=i.split("/");for(const c of u){if(c){s=(0,Ar._)`${s}${(0,Ar.getProperty)((0,Iy.unescapeJsonPointer)(c))}`;o=(0,Ar._)`${o} && ${s}`}}return o;function l(c,d){return`Cannot access ${c} ${d} levels up, current level is ${t}`}a(l,"errorMsg")}a(APt,"getData");ob.getData=APt});var b7=y(TPe=>{"use strict";Object.defineProperty(TPe,"__esModule",{value:true});var wPe=class extends Error{static{a(this,"ValidationError")}constructor(t){super("validation failed");this.errors=t;this.ajv=this.validation=true}};TPe.default=wPe});var S7=y(OPe=>{"use strict";Object.defineProperty(OPe,"__esModule",{value:true});var xPe=_7();var RPe=class extends Error{static{a(this,"MissingRefError")}constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`);this.missingRef=(0,xPe.resolveUrl)(t,r,n);this.missingSchema=(0,xPe.normalizeId)((0,xPe.getFullPath)(t,this.missingRef))}};OPe.default=RPe});var A7=y($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:true});$f.resolveSchema=$f.getCompilingSchema=$f.resolveRef=$f.compileSchema=$f.SchemaEnv=void 0;var _h=_n();var G3n=b7();var EC=qf();var vh=_7();var CPt=pi();var H3n=YP();var XP=class{static{a(this,"SchemaEnv")}constructor(t){var r;this.refs={};this.dynamicAnchors={};let n;if(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,vh.normalizeId)(n===null||n===void 0?void 0:n[t.schemaId||"$id"]);this.schemaPath=t.schemaPath;this.localRefs=t.localRefs;this.meta=t.meta;this.$async=n===null||n===void 0?void 0:n.$async;this.refs={}}};$f.SchemaEnv=XP;function NPe(e){const t=wPt.call(this,e);if(t)return t;const r=(0,vh.getFullPath)(this.opts.uriResolver,e.root.baseId);const{es5:n,lines:i}=this.opts.code;const{ownProperties:s}=this.opts;const o=new _h.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s});let u;if(e.$async){u=o.scopeValue("Error",{ref:G3n.default,code:(0,_h._)`require("ajv/dist/runtime/validation_error").default`})}const l=o.scopeName("validate");e.validateName=l;const c={gen:o,allErrors:this.opts.allErrors,data:EC.default.data,parentData:EC.default.parentData,parentDataProperty:EC.default.parentDataProperty,dataNames:[EC.default.data],dataPathArr:[_h.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===true?{ref:e.schema,code:(0,_h.stringify)(e.schema)}:{ref:e.schema}),validateName:l,ValidationError:u,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:_h.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,_h._)`""`,opts:this.opts,self:this};let d;try{this._compilations.add(e);(0,H3n.validateFunctionCode)(c);o.optimize(this.opts.code.optimize);const p=o.toString();d=`${o.scopeRefs(EC.default.scope)}return ${p}`;if(this.opts.code.process)d=this.opts.code.process(d,e);const f=new Function(`${EC.default.self}`,`${EC.default.scope}`,d);const m=f(this,this.scope.get());this.scope.value(l,{ref:m});m.errors=null;m.schema=e.schema;m.schemaEnv=e;if(e.$async)m.$async=true;if(this.opts.code.source===true){m.source={validateName:l,validateCode:p,scopeValues:o._values}}if(this.opts.unevaluated){const{props:h,items:g}=c;m.evaluated={props:h instanceof _h.Name?void 0:h,items:g instanceof _h.Name?void 0:g,dynamicProps:h instanceof _h.Name,dynamicItems:g instanceof _h.Name};if(m.source)m.source.evaluated=(0,_h.stringify)(m.evaluated)}e.validate=m;return e}catch(p){delete e.validate;delete e.validateName;if(d)this.logger.error("Error compiling schema, function code:",d);throw p}finally{this._compilations.delete(e)}}a(NPe,"compileSchema");$f.compileSchema=NPe;function V3n(e,t,r){var n;r=(0,vh.resolveUrl)(this.opts.uriResolver,t,r);const i=e.refs[r];if(i)return i;let s=W3n.call(this,e,r);if(s===void 0){const o=(n=e.localRefs)===null||n===void 0?void 0:n[r];const{schemaId:u}=this.opts;if(o)s=new XP({schema:o,schemaId:u,root:e,baseId:t})}if(s===void 0)return;return e.refs[r]=z3n.call(this,s)}a(V3n,"resolveRef");$f.resolveRef=V3n;function z3n(e){if((0,vh.inlineRef)(e.schema,this.opts.inlineRefs))return e.schema;return e.validate?e:NPe.call(this,e)}a(z3n,"inlineOrCompile");function wPt(e){for(const t of this._compilations){if(K3n(t,e))return t}}a(wPt,"getCompilingSchema");$f.getCompilingSchema=wPt;function K3n(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}a(K3n,"sameSchemaEnv");function W3n(e,t){let r;while(typeof(r=this.refs[t])=="string")t=r;return r||this.schemas[t]||qQ.call(this,e,t)}a(W3n,"resolve");function qQ(e,t){const r=this.opts.uriResolver.parse(t);const n=(0,vh._getFullPath)(this.opts.uriResolver,r);let i=(0,vh.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i){return PPe.call(this,r,e)}const s=(0,vh.normalizeId)(n);const o=this.refs[s]||this.schemas[s];if(typeof o=="string"){const u=qQ.call(this,e,o);if(typeof(u===null||u===void 0?void 0:u.schema)!=="object")return;return PPe.call(this,r,u)}if(typeof(o===null||o===void 0?void 0:o.schema)!=="object")return;if(!o.validate)NPe.call(this,o);if(s===(0,vh.normalizeId)(t)){const{schema:u}=o;const{schemaId:l}=this.opts;const c=u[l];if(c)i=(0,vh.resolveUrl)(this.opts.uriResolver,i,c);return new XP({schema:u,schemaId:l,root:e,baseId:i})}return PPe.call(this,r,o)}a(qQ,"resolveSchema");$f.resolveSchema=qQ;var Y3n=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function PPe(e,{baseId:t,schema:r,root:n}){var i;if(((i=e.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(const u of e.fragment.slice(1).split("/")){if(typeof r==="boolean")return;const l=r[(0,CPt.unescapeFragment)(u)];if(l===void 0)return;r=l;const c=typeof r==="object"&&r[this.opts.schemaId];if(!Y3n.has(u)&&c){t=(0,vh.resolveUrl)(this.opts.uriResolver,t,c)}}let s;if(typeof r!="boolean"&&r.$ref&&!(0,CPt.schemaHasRulesButRef)(r,this.RULES)){const u=(0,vh.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=qQ.call(this,n,u)}const{schemaId:o}=this.opts;s=s||new XP({schema:r,schemaId:o,root:n,baseId:t});if(s.schema!==s.root.schema)return s;return void 0}a(PPe,"getJsonPointer")});var TPt=y((tLs,X3n)=>{X3n.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:false}});var RPt=y(IPe=>{"use strict";Object.defineProperty(IPe,"__esModule",{value:true});var xPt=sS();xPt.code='require("ajv/dist/runtime/uri").default';IPe.default=xPt});var LPe=y(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:true});ll.CodeGen=ll.Name=ll.nil=ll.stringify=ll.str=ll._=ll.KeywordCxt=void 0;var J3n=YP();Object.defineProperty(ll,"KeywordCxt",{enumerable:true,get:function(){return J3n.KeywordCxt}});var JP=_n();Object.defineProperty(ll,"_",{enumerable:true,get:function(){return JP._}});Object.defineProperty(ll,"str",{enumerable:true,get:function(){return JP.str}});Object.defineProperty(ll,"stringify",{enumerable:true,get:function(){return JP.stringify}});Object.defineProperty(ll,"nil",{enumerable:true,get:function(){return JP.nil}});Object.defineProperty(ll,"Name",{enumerable:true,get:function(){return JP.Name}});Object.defineProperty(ll,"CodeGen",{enumerable:true,get:function(){return JP.CodeGen}});var Q3n=b7();var kPt=S7();var Z3n=fPe();var C7=A7();var ekn=_n();var w7=_7();var UQ=y7();var DPe=pi();var OPt=TPt();var tkn=RPt();var DPt=a((e,t)=>new RegExp(e,t),"defaultRegExp");DPt.code="new RegExp";var rkn=["removeAdditional","useDefaults","coerceTypes"];var nkn=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]);var ikn={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."};var skn={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};var PPt=200;function akn(e){var t,r,n,i,s,o,u,l,c,d,p,f,m,h,g,_,v,S,E,b,A,C,T,O,P;const R=e.strict;const I=(t=e.code)===null||t===void 0?void 0:t.optimize;const D=I===true||I===void 0?1:I||0;const U=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:DPt;const te=(i=e.uriResolver)!==null&&i!==void 0?i:tkn.default;return{strictSchema:(o=(s=e.strictSchema)!==null&&s!==void 0?s:R)!==null&&o!==void 0?o:true,strictNumbers:(l=(u=e.strictNumbers)!==null&&u!==void 0?u:R)!==null&&l!==void 0?l:true,strictTypes:(d=(c=e.strictTypes)!==null&&c!==void 0?c:R)!==null&&d!==void 0?d:"log",strictTuples:(f=(p=e.strictTuples)!==null&&p!==void 0?p:R)!==null&&f!==void 0?f:"log",strictRequired:(h=(m=e.strictRequired)!==null&&m!==void 0?m:R)!==null&&h!==void 0?h:false,code:e.code?{...e.code,optimize:D,regExp:U}:{optimize:D,regExp:U},loopRequired:(g=e.loopRequired)!==null&&g!==void 0?g:PPt,loopEnum:(_=e.loopEnum)!==null&&_!==void 0?_:PPt,meta:(v=e.meta)!==null&&v!==void 0?v:true,messages:(S=e.messages)!==null&&S!==void 0?S:true,inlineRefs:(E=e.inlineRefs)!==null&&E!==void 0?E:true,schemaId:(b=e.schemaId)!==null&&b!==void 0?b:"$id",addUsedSchema:(A=e.addUsedSchema)!==null&&A!==void 0?A:true,validateSchema:(C=e.validateSchema)!==null&&C!==void 0?C:true,validateFormats:(T=e.validateFormats)!==null&&T!==void 0?T:true,unicodeRegExp:(O=e.unicodeRegExp)!==null&&O!==void 0?O:true,int32range:(P=e.int32range)!==null&&P!==void 0?P:true,uriResolver:te}}a(akn,"requiredOptions");var T7=class{static{a(this,"Ajv")}constructor(t={}){this.schemas={};this.refs={};this.formats={};this._compilations=new Set;this._loading={};this._cache=new Map;t=this.opts={...t,...akn(t)};const{es5:r,lines:n}=this.opts.code;this.scope=new ekn.ValueScope({scope:{},prefixes:nkn,es5:r,lines:n});this.logger=pkn(t.logger);const i=t.validateFormats;t.validateFormats=false;this.RULES=(0,Z3n.getRules)();NPt.call(this,ikn,t,"NOT SUPPORTED");NPt.call(this,skn,t,"DEPRECATED","warn");this._metaOpts=ckn.call(this);if(t.formats)ukn.call(this);this._addVocabularies();this._addDefaultMetaSchema();if(t.keywords)lkn.call(this,t.keywords);if(typeof t.meta=="object")this.addMetaSchema(t.meta);okn.call(this);t.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:t,meta:r,schemaId:n}=this.opts;let i=OPt;if(n==="id"){i={...OPt};i.id=i.$id;delete i.$id}if(r&&t)this.addMetaSchema(i,i[n],false)}defaultMeta(){const{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"){n=this.getSchema(t);if(!n)throw new Error(`no schema with key or ref "${t}"`)}else{n=this.compile(t)}const i=n(r);if(!("$async"in n))this.errors=n.errors;return i}compile(t,r){const 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")}const{loadSchema:n}=this.opts;return i.call(this,t,r);async function i(d,p){await s.call(this,d.$schema);const f=this._addSchema(d,p);return f.validate||o.call(this,f)}a(i,"runCompileAsync");async function s(d){if(d&&!this.getSchema(d)){await i.call(this,{$ref:d},true)}}a(s,"loadMetaSchema");async function o(d){try{return this._compileSchemaEnv(d)}catch(p){if(!(p instanceof kPt.default))throw p;u.call(this,p);await l.call(this,p.missingSchema);return o.call(this,d)}}a(o,"_compileAsync");function u({missingSchema:d,missingRef:p}){if(this.refs[d]){throw new Error(`AnySchema ${d} is loaded but ${p} cannot be resolved`)}}a(u,"checkLoaded");async function l(d){const p=await c.call(this,d);if(!this.refs[d])await s.call(this,p.$schema);if(!this.refs[d])this.addSchema(p,d,r)}a(l,"loadMissingSchema");async function c(d){const p=this._loading[d];if(p)return p;try{return await(this._loading[d]=n(d))}finally{delete this._loading[d]}}a(c,"_loadSchema")}addSchema(t,r,n,i=this.opts.validateSchema){if(Array.isArray(t)){for(const o of t)this.addSchema(o,void 0,n,i);return this}let s;if(typeof t==="object"){const{schemaId:o}=this.opts;s=t[o];if(s!==void 0&&typeof s!="string"){throw new Error(`schema ${o} must be string`)}}r=(0,w7.normalizeId)(r||s);this._checkUnique(r);this.schemas[r]=this._addSchema(t,n,r,i,true);return this}addMetaSchema(t,r,n=this.opts.validateSchema){this.addSchema(t,r,true,n);return this}validateSchema(t,r){if(typeof t=="boolean")return true;let n;n=t.$schema;if(n!==void 0&&typeof n!="string"){throw new Error("$schema must be a string")}n=n||this.opts.defaultMeta||this.defaultMeta();if(!n){this.logger.warn("meta-schema not available");this.errors=null;return true}const i=this.validate(n,t);if(!i&&r){const s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return i}getSchema(t){let r;while(typeof(r=IPt.call(this,t))=="string")t=r;if(r===void 0){const{schemaId:n}=this.opts;const i=new C7.SchemaEnv({schema:{},schemaId:n});r=C7.resolveSchema.call(this,i,t);if(!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp){this._removeAllSchemas(this.schemas,t);this._removeAllSchemas(this.refs,t);return this}switch(typeof t){case"undefined":this._removeAllSchemas(this.schemas);this._removeAllSchemas(this.refs);this._cache.clear();return this;case"string":{const r=IPt.call(this,t);if(typeof r=="object")this._cache.delete(r.schema);delete this.schemas[t];delete this.refs[t];return this}case"object":{const r=t;this._cache.delete(r);let n=t[this.opts.schemaId];if(n){n=(0,w7.normalizeId)(n);delete this.schemas[n];delete this.refs[n]}return this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(const r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string"){n=t;if(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){r=t;n=r.keyword;if(Array.isArray(n)&&!n.length){throw new Error("addKeywords: keyword must be string or non-empty array")}}else{throw new Error("invalid addKeywords parameters")}mkn.call(this,n,r);if(!r){(0,DPe.eachItem)(n,s=>kPe.call(this,s));return this}gkn.call(this,r);const i={...r,type:(0,UQ.getJSONTypes)(r.type),schemaType:(0,UQ.getJSONTypes)(r.schemaType)};(0,DPe.eachItem)(n,i.type.length===0?s=>kPe.call(this,s,i):s=>i.type.forEach(o=>kPe.call(this,s,i,o)));return this}getKeyword(t){const r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){const{RULES:r}=this;delete r.keywords[t];delete r.all[t];for(const n of r.rules){const i=n.rules.findIndex(s=>s.keyword===t);if(i>=0)n.rules.splice(i,1)}return this}addFormat(t,r){if(typeof r=="string")r=new RegExp(r);this.formats[t]=r;return this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){if(!t||t.length===0)return"No errors";return t.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,s)=>i+r+s)}$dataMetaSchema(t,r){const n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(const i of r){const s=i.split("/").slice(1);let o=t;for(const u of s)o=o[u];for(const u in n){const l=n[u];if(typeof l!="object")continue;const{$data:c}=l.definition;const d=o[u];if(c&&d)o[u]=LPt(d)}}return t}_removeAllSchemas(t,r){for(const n in t){const i=t[n];if(!r||r.test(n)){if(typeof i=="string"){delete t[n]}else if(i&&!i.meta){this._cache.delete(i.schema);delete t[n]}}}}_addSchema(t,r,n,i=this.opts.validateSchema,s=this.opts.addUsedSchema){let o;const{schemaId:u}=this.opts;if(typeof t=="object"){o=t[u]}else{if(this.opts.jtd)throw new Error("schema must be object");else if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let l=this._cache.get(t);if(l!==void 0)return l;n=(0,w7.normalizeId)(o||n);const c=w7.getSchemaRefs.call(this,t,n);l=new C7.SchemaEnv({schema:t,schemaId:u,meta:r,baseId:n,localRefs:c});this._cache.set(l.schema,l);if(s&&!n.startsWith("#")){if(n)this._checkUnique(n);this.refs[n]=l}if(i)this.validateSchema(t,true);return l}_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);else C7.compileSchema.call(this,t);if(!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){const r=this.opts;this.opts=this._metaOpts;try{C7.compileSchema.call(this,t)}finally{this.opts=r}}};ll.default=T7;T7.ValidationError=Q3n.default;T7.MissingRefError=kPt.default;function NPt(e,t,r,n="error"){for(const i in e){const s=i;if(s in t)this.logger[n](`${r}: option ${i}. ${e[s]}`)}}a(NPt,"checkOptions");function IPt(e){e=(0,w7.normalizeId)(e);return this.schemas[e]||this.refs[e]}a(IPt,"getSchEnv");function okn(){const e=this.opts.schemas;if(!e)return;if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}a(okn,"addInitialSchemas");function ukn(){for(const e in this.opts.formats){const t=this.opts.formats[e];if(t)this.addFormat(e,t)}}a(ukn,"addInitialFormats");function lkn(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];if(!r.keyword)r.keyword=t;this.addKeyword(r)}}a(lkn,"addInitialKeywords");function ckn(){const e={...this.opts};for(const t of rkn)delete e[t];return e}a(ckn,"getMetaSchemaOptions");var dkn={log(){},warn(){},error(){}};function pkn(e){if(e===false)return dkn;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")}a(pkn,"getLogger");var fkn=/^[a-z_$][a-z0-9_$:-]*$/i;function mkn(e,t){const{RULES:r}=this;(0,DPe.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!fkn.test(n))throw new Error(`Keyword ${n} has invalid name`)});if(!t)return;if(t.$data&&!("code"in t||"validate"in t)){throw new Error('$data keyword must have "code" or "validate" function')}}a(mkn,"checkKeyword");function kPe(e,t,r){var n;const i=t===null||t===void 0?void 0:t.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let o=i?s.post:s.rules.find(({type:l})=>l===r);if(!o){o={type:r,rules:[]};s.rules.push(o)}s.keywords[e]=true;if(!t)return;const u={keyword:e,definition:{...t,type:(0,UQ.getJSONTypes)(t.type),schemaType:(0,UQ.getJSONTypes)(t.schemaType)}};if(t.before)hkn.call(this,o,u,t.before);else o.rules.push(u);s.all[e]=u;(n=t.implements)===null||n===void 0?void 0:n.forEach(l=>this.addKeyword(l))}a(kPe,"addRule");function hkn(e,t,r){const n=e.rules.findIndex(i=>i.keyword===r);if(n>=0){e.rules.splice(n,0,t)}else{e.rules.push(t);this.logger.warn(`rule ${r} is not defined`)}}a(hkn,"addBeforeRule");function gkn(e){let{metaSchema:t}=e;if(t===void 0)return;if(e.$data&&this.opts.$data)t=LPt(t);e.validateSchema=this.compile(t,true)}a(gkn,"keywordMetaschema");var ykn={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function LPt(e){return{anyOf:[e,ykn]}}a(LPt,"schemaOrData")});var FPt=y(FPe=>{"use strict";Object.defineProperty(FPe,"__esModule",{value:true});var _kn={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};FPe.default=_kn});var GQ=y(bC=>{"use strict";Object.defineProperty(bC,"__esModule",{value:true});bC.callRef=bC.getValidate=void 0;var vkn=S7();var BPt=Uf();var wd=_n();var QP=qf();var MPt=A7();var $Q=pi();var Ekn={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e;const{baseId:i,schemaEnv:s,validateName:o,opts:u,self:l}=n;const{root:c}=s;if((r==="#"||r==="#/")&&i===c.baseId)return p();const d=MPt.resolveRef.call(l,c,i,r);if(d===void 0)throw new vkn.default(n.opts.uriResolver,i,r);if(d instanceof MPt.SchemaEnv)return f(d);return m(d);function p(){if(s===c)return jQ(e,o,s,s.$async);const h=t.scopeValue("root",{ref:c});return jQ(e,(0,wd._)`${h}.validate`,c,c.$async)}a(p,"callRootRef");function f(h){const g=qPt(e,h);jQ(e,g,h,h.$async)}a(f,"callValidate");function m(h){const g=t.scopeValue("schema",u.code.source===true?{ref:h,code:(0,wd.stringify)(h)}:{ref:h});const _=t.name("valid");const v=e.subschema({schema:h,dataTypes:[],schemaPath:wd.nil,topSchemaRef:g,errSchemaPath:r},_);e.mergeEvaluated(v);e.ok(_)}a(m,"inlineRefSchema")}};function qPt(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,wd._)`${r.scopeValue("wrapper",{ref:t})}.validate`}a(qPt,"getValidate");bC.getValidate=qPt;function jQ(e,t,r,n){const{gen:i,it:s}=e;const{allErrors:o,schemaEnv:u,opts:l}=s;const c=l.passContext?QP.default.this:wd.nil;if(n)d();else p();function d(){if(!u.$async)throw new Error("async schema referenced by sync schema");const h=i.let("valid");i.try(()=>{i.code((0,wd._)`await ${(0,BPt.callValidateCode)(e,t,c)}`);m(t);if(!o)i.assign(h,true)},g=>{i.if((0,wd._)`!(${g} instanceof ${s.ValidationError})`,()=>i.throw(g));f(g);if(!o)i.assign(h,false)});e.ok(h)}a(d,"callAsyncRef");function p(){e.result((0,BPt.callValidateCode)(e,t,c),()=>m(t),()=>f(t))}a(p,"callSyncRef");function f(h){const g=(0,wd._)`${h}.errors`;i.assign(QP.default.vErrors,(0,wd._)`${QP.default.vErrors} === null ? ${g} : ${QP.default.vErrors}.concat(${g})`);i.assign(QP.default.errors,(0,wd._)`${QP.default.vErrors}.length`)}a(f,"addErrorsFrom");function m(h){var g;if(!s.opts.unevaluated)return;const _=(g=r===null||r===void 0?void 0:r.validate)===null||g===void 0?void 0:g.evaluated;if(s.props!==true){if(_&&!_.dynamicProps){if(_.props!==void 0){s.props=$Q.mergeEvaluated.props(i,_.props,s.props)}}else{const v=i.var("props",(0,wd._)`${h}.evaluated.props`);s.props=$Q.mergeEvaluated.props(i,v,s.props,wd.Name)}}if(s.items!==true){if(_&&!_.dynamicItems){if(_.items!==void 0){s.items=$Q.mergeEvaluated.items(i,_.items,s.items)}}else{const v=i.var("items",(0,wd._)`${h}.evaluated.items`);s.items=$Q.mergeEvaluated.items(i,v,s.items,wd.Name)}}}a(m,"addEvaluatedFrom")}a(jQ,"callRef");bC.callRef=jQ;bC.default=Ekn});var MPe=y(BPe=>{"use strict";Object.defineProperty(BPe,"__esModule",{value:true});var bkn=FPt();var Skn=GQ();var Akn=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",bkn.default,Skn.default];BPe.default=Akn});var UPt=y(qPe=>{"use strict";Object.defineProperty(qPe,"__esModule",{value:true});var HQ=_n();var ub=HQ.operators;var VQ={maximum:{okStr:"<=",ok:ub.LTE,fail:ub.GT},minimum:{okStr:">=",ok:ub.GTE,fail:ub.LT},exclusiveMaximum:{okStr:"<",ok:ub.LT,fail:ub.GTE},exclusiveMinimum:{okStr:">",ok:ub.GT,fail:ub.LTE}};var Ckn={message:({keyword:e,schemaCode:t})=>(0,HQ.str)`must be ${VQ[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,HQ._)`{comparison: ${VQ[e].okStr}, limit: ${t}}`};var wkn={keyword:Object.keys(VQ),type:"number",schemaType:"number",$data:true,error:Ckn,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,HQ._)`${r} ${VQ[t].fail} ${n} || isNaN(${r})`)}};qPe.default=wkn});var $Pt=y(UPe=>{"use strict";Object.defineProperty(UPe,"__esModule",{value:true});var x7=_n();var Tkn={message:({schemaCode:e})=>(0,x7.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,x7._)`{multipleOf: ${e}}`};var xkn={keyword:"multipleOf",type:"number",schemaType:"number",$data:true,error:Tkn,code(e){const{gen:t,data:r,schemaCode:n,it:i}=e;const s=i.opts.multipleOfPrecision;const o=t.let("res");const u=s?(0,x7._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${s}`:(0,x7._)`${o} !== parseInt(${o})`;e.fail$data((0,x7._)`(${n} === 0 || (${o} = ${r}/${n}, ${u}))`)}};UPe.default=xkn});var GPt=y($Pe=>{"use strict";Object.defineProperty($Pe,"__esModule",{value:true});function jPt(e){const t=e.length;let r=0;let n=0;let i;while(n<t){r++;i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<t){i=e.charCodeAt(n);if((i&64512)===56320)n++}}return r}a(jPt,"ucs2length");$Pe.default=jPt;jPt.code='require("ajv/dist/runtime/ucs2length").default'});var HPt=y(jPe=>{"use strict";Object.defineProperty(jPe,"__esModule",{value:true});var SC=_n();var Rkn=pi();var Okn=GPt();var Pkn={message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,SC.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,SC._)`{limit: ${e}}`};var Nkn={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:true,error:Pkn,code(e){const{keyword:t,data:r,schemaCode:n,it:i}=e;const s=t==="maxLength"?SC.operators.GT:SC.operators.LT;const o=i.opts.unicode===false?(0,SC._)`${r}.length`:(0,SC._)`${(0,Rkn.useFunc)(e.gen,Okn.default)}(${r})`;e.fail$data((0,SC._)`${o} ${s} ${n}`)}};jPe.default=Nkn});var VPt=y(GPe=>{"use strict";Object.defineProperty(GPe,"__esModule",{value:true});var Ikn=Uf();var zQ=_n();var kkn={message:({schemaCode:e})=>(0,zQ.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,zQ._)`{pattern: ${e}}`};var Dkn={keyword:"pattern",type:"string",schemaType:"string",$data:true,error:kkn,code(e){const{data:t,$data:r,schema:n,schemaCode:i,it:s}=e;const o=s.opts.unicodeRegExp?"u":"";const u=r?(0,zQ._)`(new RegExp(${i}, ${o}))`:(0,Ikn.usePattern)(e,n);e.fail$data((0,zQ._)`!${u}.test(${t})`)}};GPe.default=Dkn});var zPt=y(HPe=>{"use strict";Object.defineProperty(HPe,"__esModule",{value:true});var R7=_n();var Lkn={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,R7.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,R7._)`{limit: ${e}}`};var Fkn={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:true,error:Lkn,code(e){const{keyword:t,data:r,schemaCode:n}=e;const i=t==="maxProperties"?R7.operators.GT:R7.operators.LT;e.fail$data((0,R7._)`Object.keys(${r}).length ${i} ${n}`)}};HPe.default=Fkn});var KPt=y(VPe=>{"use strict";Object.defineProperty(VPe,"__esModule",{value:true});var O7=Uf();var P7=_n();var Bkn=pi();var Mkn={message:({params:{missingProperty:e}})=>(0,P7.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,P7._)`{missingProperty: ${e}}`};var qkn={keyword:"required",type:"object",schemaType:"array",$data:true,error:Mkn,code(e){const{gen:t,schema:r,schemaCode:n,data:i,$data:s,it:o}=e;const{opts:u}=o;if(!s&&r.length===0)return;const l=r.length>=u.loopRequired;if(o.allErrors)c();else d();if(u.strictRequired){const m=e.parentSchema.properties;const{definedProperties:h}=e.it;for(const g of r){if((m===null||m===void 0?void 0:m[g])===void 0&&!h.has(g)){const _=o.schemaEnv.baseId+o.errSchemaPath;const v=`required property "${g}" is not defined at "${_}" (strictRequired)`;(0,Bkn.checkStrictMode)(o,v,o.opts.strictRequired)}}}function c(){if(l||s){e.block$data(P7.nil,p)}else{for(const m of r){(0,O7.checkReportMissingProp)(e,m)}}}a(c,"allErrorsMode");function d(){const m=t.let("missing");if(l||s){const h=t.let("valid",true);e.block$data(h,()=>f(m,h));e.ok(h)}else{t.if((0,O7.checkMissingProp)(e,r,m));(0,O7.reportMissingProp)(e,m);t.else()}}a(d,"exitOnErrorMode");function p(){t.forOf("prop",n,m=>{e.setParams({missingProperty:m});t.if((0,O7.noPropertyInData)(t,i,m,u.ownProperties),()=>e.error())})}a(p,"loopAllRequired");function f(m,h){e.setParams({missingProperty:m});t.forOf(m,n,()=>{t.assign(h,(0,O7.propertyInData)(t,i,m,u.ownProperties));t.if((0,P7.not)(h),()=>{e.error();t.break()})},P7.nil)}a(f,"loopUntilMissing")}};VPe.default=qkn});var WPt=y(zPe=>{"use strict";Object.defineProperty(zPe,"__esModule",{value:true});var N7=_n();var Ukn={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,N7.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,N7._)`{limit: ${e}}`};var $kn={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:true,error:Ukn,code(e){const{keyword:t,data:r,schemaCode:n}=e;const i=t==="maxItems"?N7.operators.GT:N7.operators.LT;e.fail$data((0,N7._)`${r}.length ${i} ${n}`)}};zPe.default=$kn});var KQ=y(KPe=>{"use strict";Object.defineProperty(KPe,"__esModule",{value:true});var YPt=rp();YPt.code='require("ajv/dist/runtime/equal").default';KPe.default=YPt});var XPt=y(YPe=>{"use strict";Object.defineProperty(YPe,"__esModule",{value:true});var WPe=y7();var cl=_n();var jkn=pi();var Gkn=KQ();var Hkn={message:({params:{i:e,j:t}})=>(0,cl.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,cl._)`{i: ${e}, j: ${t}}`};var Vkn={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:true,error:Hkn,code(e){const{gen:t,data:r,$data:n,schema:i,parentSchema:s,schemaCode:o,it:u}=e;if(!n&&!i)return;const l=t.let("valid");const c=s.items?(0,WPe.getSchemaTypes)(s.items):[];e.block$data(l,d,(0,cl._)`${o} === false`);e.ok(l);function d(){const h=t.let("i",(0,cl._)`${r}.length`);const g=t.let("j");e.setParams({i:h,j:g});t.assign(l,true);t.if((0,cl._)`${h} > 1`,()=>(p()?f:m)(h,g))}a(d,"validateUniqueItems");function p(){return c.length>0&&!c.some(h=>h==="object"||h==="array")}a(p,"canOptimize");function f(h,g){const _=t.name("item");const v=(0,WPe.checkDataTypes)(c,_,u.opts.strictNumbers,WPe.DataType.Wrong);const S=t.const("indices",(0,cl._)`{}`);t.for((0,cl._)`;${h}--;`,()=>{t.let(_,(0,cl._)`${r}[${h}]`);t.if(v,(0,cl._)`continue`);if(c.length>1)t.if((0,cl._)`typeof ${_} == "string"`,(0,cl._)`${_} += "_"`);t.if((0,cl._)`typeof ${S}[${_}] == "number"`,()=>{t.assign(g,(0,cl._)`${S}[${_}]`);e.error();t.assign(l,false).break()}).code((0,cl._)`${S}[${_}] = ${h}`)})}a(f,"loopN");function m(h,g){const _=(0,jkn.useFunc)(t,Gkn.default);const v=t.name("outer");t.label(v).for((0,cl._)`;${h}--;`,()=>t.for((0,cl._)`${g} = ${h}; ${g}--;`,()=>t.if((0,cl._)`${_}(${r}[${h}], ${r}[${g}])`,()=>{e.error();t.assign(l,false).break(v)})))}a(m,"loopN2")}};YPe.default=Vkn});var JPt=y(JPe=>{"use strict";Object.defineProperty(JPe,"__esModule",{value:true});var XPe=_n();var zkn=pi();var Kkn=KQ();var Wkn={message:"must be equal to constant",params:({schemaCode:e})=>(0,XPe._)`{allowedValue: ${e}}`};var Ykn={keyword:"const",$data:true,error:Wkn,code(e){const{gen:t,data:r,$data:n,schemaCode:i,schema:s}=e;if(n||s&&typeof s=="object"){e.fail$data((0,XPe._)`!${(0,zkn.useFunc)(t,Kkn.default)}(${r}, ${i})`)}else{e.fail((0,XPe._)`${s} !== ${r}`)}}};JPe.default=Ykn});var QPt=y(QPe=>{"use strict";Object.defineProperty(QPe,"__esModule",{value:true});var I7=_n();var Xkn=pi();var Jkn=KQ();var Qkn={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,I7._)`{allowedValues: ${e}}`};var Zkn={keyword:"enum",schemaType:"array",$data:true,error:Qkn,code(e){const{gen:t,data:r,$data:n,schema:i,schemaCode:s,it:o}=e;if(!n&&i.length===0)throw new Error("enum must have non-empty array");const u=i.length>=o.opts.loopEnum;let l;const c=a(()=>l!==null&&l!==void 0?l:l=(0,Xkn.useFunc)(t,Jkn.default),"getEql");let d;if(u||n){d=t.let("valid");e.block$data(d,p)}else{if(!Array.isArray(i))throw new Error("ajv implementation error");const m=t.const("vSchema",s);d=(0,I7.or)(...i.map((h,g)=>f(m,g)))}e.pass(d);function p(){t.assign(d,false);t.forOf("v",s,m=>t.if((0,I7._)`${c()}(${r}, ${m})`,()=>t.assign(d,true).break()))}a(p,"loopEnum");function f(m,h){const g=i[h];return typeof g==="object"&&g!==null?(0,I7._)`${c()}(${r}, ${m}[${h}])`:(0,I7._)`${r} === ${g}`}a(f,"equalCode")}};QPe.default=Zkn});var eNe=y(ZPe=>{"use strict";Object.defineProperty(ZPe,"__esModule",{value:true});var e4n=UPt();var t4n=$Pt();var r4n=HPt();var n4n=VPt();var i4n=zPt();var s4n=KPt();var a4n=WPt();var o4n=XPt();var u4n=JPt();var l4n=QPt();var c4n=[e4n.default,t4n.default,r4n.default,n4n.default,i4n.default,s4n.default,a4n.default,o4n.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u4n.default,l4n.default];ZPe.default=c4n});var rNe=y(k7=>{"use strict";Object.defineProperty(k7,"__esModule",{value:true});k7.validateAdditionalItems=void 0;var AC=_n();var tNe=pi();var d4n={message:({params:{len:e}})=>(0,AC.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,AC._)`{limit: ${e}}`};var p4n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:d4n,code(e){const{parentSchema:t,it:r}=e;const{items:n}=t;if(!Array.isArray(n)){(0,tNe.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}ZPt(e,n)}};function ZPt(e,t){const{gen:r,schema:n,data:i,keyword:s,it:o}=e;o.items=true;const u=r.const("len",(0,AC._)`${i}.length`);if(n===false){e.setParams({len:t.length});e.pass((0,AC._)`${u} <= ${t.length}`)}else if(typeof n=="object"&&!(0,tNe.alwaysValidSchema)(o,n)){const c=r.var("valid",(0,AC._)`${u} <= ${t.length}`);r.if((0,AC.not)(c),()=>l(c));e.ok(c)}function l(c){r.forRange("i",t.length,u,d=>{e.subschema({keyword:s,dataProp:d,dataPropType:tNe.Type.Num},c);if(!o.allErrors)r.if((0,AC.not)(c),()=>r.break())})}a(l,"validateItems")}a(ZPt,"validateAdditionalItems");k7.validateAdditionalItems=ZPt;k7.default=p4n});var nNe=y(D7=>{"use strict";Object.defineProperty(D7,"__esModule",{value:true});D7.validateTuple=void 0;var eNt=_n();var WQ=pi();var f4n=Uf();var m4n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return tNt(e,"additionalItems",t);r.items=true;if((0,WQ.alwaysValidSchema)(r,t))return;e.ok((0,f4n.validateArray)(e))}};function tNt(e,t,r=e.schema){const{gen:n,parentSchema:i,data:s,keyword:o,it:u}=e;d(i);if(u.opts.unevaluated&&r.length&&u.items!==true){u.items=WQ.mergeEvaluated.items(n,r.length,u.items)}const l=n.name("valid");const c=n.const("len",(0,eNt._)`${s}.length`);r.forEach((p,f)=>{if((0,WQ.alwaysValidSchema)(u,p))return;n.if((0,eNt._)`${c} > ${f}`,()=>e.subschema({keyword:o,schemaProp:f,dataProp:f},l));e.ok(l)});function d(p){const{opts:f,errSchemaPath:m}=u;const h=r.length;const g=h===p.minItems&&(h===p.maxItems||p[t]===false);if(f.strictTuples&&!g){const _=`"${o}" is ${h}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,WQ.checkStrictMode)(u,_,f.strictTuples)}}a(d,"checkStrictTuple")}a(tNt,"validateTuple");D7.validateTuple=tNt;D7.default=m4n});var rNt=y(iNe=>{"use strict";Object.defineProperty(iNe,"__esModule",{value:true});var h4n=nNe();var g4n={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,h4n.validateTuple)(e,"items")};iNe.default=g4n});var iNt=y(sNe=>{"use strict";Object.defineProperty(sNe,"__esModule",{value:true});var nNt=_n();var y4n=pi();var _4n=Uf();var v4n=rNe();var E4n={message:({params:{len:e}})=>(0,nNt.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,nNt._)`{limit: ${e}}`};var b4n={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:E4n,code(e){const{schema:t,parentSchema:r,it:n}=e;const{prefixItems:i}=r;n.items=true;if((0,y4n.alwaysValidSchema)(n,t))return;if(i)(0,v4n.validateAdditionalItems)(e,i);else e.ok((0,_4n.validateArray)(e))}};sNe.default=b4n});var sNt=y(aNe=>{"use strict";Object.defineProperty(aNe,"__esModule",{value:true});var jf=_n();var YQ=pi();var S4n={message:({params:{min:e,max:t}})=>t===void 0?(0,jf.str)`must contain at least ${e} valid item(s)`:(0,jf.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,jf._)`{minContains: ${e}}`:(0,jf._)`{minContains: ${e}, maxContains: ${t}}`};var A4n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:true,error:S4n,code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;let o;let u;const{minContains:l,maxContains:c}=n;if(s.opts.next){o=l===void 0?1:l;u=c}else{o=1}const d=t.const("len",(0,jf._)`${i}.length`);e.setParams({min:o,max:u});if(u===void 0&&o===0){(0,YQ.checkStrictMode)(s,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(u!==void 0&&o>u){(0,YQ.checkStrictMode)(s,`"minContains" > "maxContains" is always invalid`);e.fail();return}if((0,YQ.alwaysValidSchema)(s,r)){let g=(0,jf._)`${d} >= ${o}`;if(u!==void 0)g=(0,jf._)`${g} && ${d} <= ${u}`;e.pass(g);return}s.items=true;const p=t.name("valid");if(u===void 0&&o===1){m(p,()=>t.if(p,()=>t.break()))}else if(o===0){t.let(p,true);if(u!==void 0)t.if((0,jf._)`${i}.length > 0`,f)}else{t.let(p,false);f()}e.result(p,()=>e.reset());function f(){const g=t.name("_valid");const _=t.let("count",0);m(g,()=>t.if(g,()=>h(_)))}a(f,"validateItemsWithCount");function m(g,_){t.forRange("i",0,d,v=>{e.subschema({keyword:"contains",dataProp:v,dataPropType:YQ.Type.Num,compositeRule:true},g);_()})}a(m,"validateItems");function h(g){t.code((0,jf._)`${g}++`);if(u===void 0){t.if((0,jf._)`${g} >= ${o}`,()=>t.assign(p,true).break())}else{t.if((0,jf._)`${g} > ${u}`,()=>t.assign(p,false).break());if(o===1)t.assign(p,true);else t.if((0,jf._)`${g} >= ${o}`,()=>t.assign(p,true))}}a(h,"checkLimits")}};aNe.default=A4n});var XQ=y(lg=>{"use strict";Object.defineProperty(lg,"__esModule",{value:true});lg.validateSchemaDeps=lg.validatePropertyDeps=lg.error=void 0;var oNe=_n();var C4n=pi();var L7=Uf();lg.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const n=t===1?"property":"properties";return(0,oNe.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,oNe._)`{property: ${e},
457
457
  missingProperty: ${n},
458
458
  depsCount: ${t},
459
- deps: ${r}}`};var w4n={keyword:"dependencies",type:"object",schemaType:"object",error:lg.error,code(e){const[t,r]=T4n(e);aNt(e,t);oNt(e,r)}};function T4n({schema:e}){const t={};const r={};for(const n in e){if(n==="__proto__")continue;const i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}a(T4n,"splitDependencies");function aNt(e,t=e.schema){const{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;const s=r.let("missing");for(const o in t){const u=t[o];if(u.length===0)continue;const l=(0,L7.propertyInData)(r,n,o,i.opts.ownProperties);e.setParams({property:o,depsCount:u.length,deps:u.join(", ")});if(i.allErrors){r.if(l,()=>{for(const c of u){(0,L7.checkReportMissingProp)(e,c)}})}else{r.if((0,oNe._)`${l} && (${(0,L7.checkMissingProp)(e,u,s)})`);(0,L7.reportMissingProp)(e,s);r.else()}}}a(aNt,"validatePropertyDeps");lg.validatePropertyDeps=aNt;function oNt(e,t=e.schema){const{gen:r,data:n,keyword:i,it:s}=e;const o=r.name("valid");for(const u in t){if((0,C4n.alwaysValidSchema)(s,t[u]))continue;r.if((0,L7.propertyInData)(r,n,u,s.opts.ownProperties),()=>{const l=e.subschema({keyword:i,schemaProp:u},o);e.mergeValidEvaluated(l,o)},()=>r.var(o,true));e.ok(o)}}a(oNt,"validateSchemaDeps");lg.validateSchemaDeps=oNt;lg.default=w4n});var lNt=y(uNe=>{"use strict";Object.defineProperty(uNe,"__esModule",{value:true});var uNt=_n();var x4n=pi();var R4n={message:"property name must be valid",params:({params:e})=>(0,uNt._)`{propertyName: ${e.propertyName}}`};var O4n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:R4n,code(e){const{gen:t,schema:r,data:n,it:i}=e;if((0,x4n.alwaysValidSchema)(i,r))return;const s=t.name("valid");t.forIn("key",n,o=>{e.setParams({propertyName:o});e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:true},s);t.if((0,uNt.not)(s),()=>{e.error(true);if(!i.allErrors)t.break()})});e.ok(s)}};uNe.default=O4n});var cNe=y(lNe=>{"use strict";Object.defineProperty(lNe,"__esModule",{value:true});var JQ=Uf();var Eh=_n();var P4n=qf();var QQ=pi();var N4n={message:"must NOT have additional properties",params:({params:e})=>(0,Eh._)`{additionalProperty: ${e.additionalProperty}}`};var I4n={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:true,trackErrors:true,error:N4n,code(e){const{gen:t,schema:r,parentSchema:n,data:i,errsCount:s,it:o}=e;if(!s)throw new Error("ajv implementation error");const{allErrors:u,opts:l}=o;o.props=true;if(l.removeAdditional!=="all"&&(0,QQ.alwaysValidSchema)(o,r))return;const c=(0,JQ.allSchemaProperties)(n.properties);const d=(0,JQ.allSchemaProperties)(n.patternProperties);p();e.ok((0,Eh._)`${s} === ${P4n.default.errors}`);function p(){t.forIn("key",i,_=>{if(!c.length&&!d.length)h(_);else t.if(f(_),()=>h(_))})}a(p,"checkAdditionalProperties");function f(_){let v;if(c.length>8){const S=(0,QQ.schemaRefOrVal)(o,n.properties,"properties");v=(0,JQ.isOwnProperty)(t,S,_)}else if(c.length){v=(0,Eh.or)(...c.map(S=>(0,Eh._)`${_} === ${S}`))}else{v=Eh.nil}if(d.length){v=(0,Eh.or)(v,...d.map(S=>(0,Eh._)`${(0,JQ.usePattern)(e,S)}.test(${_})`))}return(0,Eh.not)(v)}a(f,"isAdditional");function m(_){t.code((0,Eh._)`delete ${i}[${_}]`)}a(m,"deleteAdditional");function h(_){if(l.removeAdditional==="all"||l.removeAdditional&&r===false){m(_);return}if(r===false){e.setParams({additionalProperty:_});e.error();if(!u)t.break();return}if(typeof r=="object"&&!(0,QQ.alwaysValidSchema)(o,r)){const v=t.name("valid");if(l.removeAdditional==="failing"){g(_,v,false);t.if((0,Eh.not)(v),()=>{e.reset();m(_)})}else{g(_,v);if(!u)t.if((0,Eh.not)(v),()=>t.break())}}}a(h,"additionalPropertyCode");function g(_,v,S){const E={keyword:"additionalProperties",dataProp:_,dataPropType:QQ.Type.Str};if(S===false){Object.assign(E,{compositeRule:true,createErrors:false,allErrors:false})}e.subschema(E,v)}a(g,"applyAdditionalSchema")}};lNe.default=I4n});var pNt=y(pNe=>{"use strict";Object.defineProperty(pNe,"__esModule",{value:true});var k4n=YP();var cNt=Uf();var dNe=pi();var dNt=cNe();var D4n={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;if(s.opts.removeAdditional==="all"&&n.additionalProperties===void 0){dNt.default.code(new k4n.KeywordCxt(s,dNt.default,"additionalProperties"))}const o=(0,cNt.allSchemaProperties)(r);for(const p of o){s.definedProperties.add(p)}if(s.opts.unevaluated&&o.length&&s.props!==true){s.props=dNe.mergeEvaluated.props(t,(0,dNe.toHash)(o),s.props)}const u=o.filter(p=>!(0,dNe.alwaysValidSchema)(s,r[p]));if(u.length===0)return;const l=t.name("valid");for(const p of u){if(c(p)){d(p)}else{t.if((0,cNt.propertyInData)(t,i,p,s.opts.ownProperties));d(p);if(!s.allErrors)t.else().var(l,true);t.endIf()}e.it.definedProperties.add(p);e.ok(l)}function c(p){return s.opts.useDefaults&&!s.compositeRule&&r[p].default!==void 0}a(c,"hasDefault");function d(p){e.subschema({keyword:"properties",schemaProp:p,dataProp:p},l)}a(d,"applyPropertySchema")}};pNe.default=D4n});var gNt=y(fNe=>{"use strict";Object.defineProperty(fNe,"__esModule",{value:true});var fNt=Uf();var ZQ=_n();var mNt=pi();var hNt=pi();var L4n={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:i,it:s}=e;const{opts:o}=s;const u=(0,fNt.allSchemaProperties)(r);const l=u.filter(g=>(0,mNt.alwaysValidSchema)(s,r[g]));if(u.length===0||l.length===u.length&&(!s.opts.unevaluated||s.props===true)){return}const c=o.strictSchema&&!o.allowMatchingProperties&&i.properties;const d=t.name("valid");if(s.props!==true&&!(s.props instanceof ZQ.Name)){s.props=(0,hNt.evaluatedPropsToName)(t,s.props)}const{props:p}=s;f();function f(){for(const g of u){if(c)m(g);if(s.allErrors){h(g)}else{t.var(d,true);h(g);t.if(d)}}}a(f,"validatePatternProperties");function m(g){for(const _ in c){if(new RegExp(g).test(_)){(0,mNt.checkStrictMode)(s,`property ${_} matches pattern ${g} (use allowMatchingProperties)`)}}}a(m,"checkMatchingProperties");function h(g){t.forIn("key",n,_=>{t.if((0,ZQ._)`${(0,fNt.usePattern)(e,g)}.test(${_})`,()=>{const v=l.includes(g);if(!v){e.subschema({keyword:"patternProperties",schemaProp:g,dataProp:_,dataPropType:hNt.Type.Str},d)}if(s.opts.unevaluated&&p!==true){t.assign((0,ZQ._)`${p}[${_}]`,true)}else if(!v&&!s.allErrors){t.if((0,ZQ.not)(d),()=>t.break())}})})}a(h,"validateProperties")}};fNe.default=L4n});var yNt=y(mNe=>{"use strict";Object.defineProperty(mNe,"__esModule",{value:true});var F4n=pi();var B4n={keyword:"not",schemaType:["object","boolean"],trackErrors:true,code(e){const{gen:t,schema:r,it:n}=e;if((0,F4n.alwaysValidSchema)(n,r)){e.fail();return}const i=t.name("valid");e.subschema({keyword:"not",compositeRule:true,createErrors:false,allErrors:false},i);e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};mNe.default=B4n});var _Nt=y(hNe=>{"use strict";Object.defineProperty(hNe,"__esModule",{value:true});var M4n=Uf();var q4n={keyword:"anyOf",schemaType:"array",trackErrors:true,code:M4n.validateUnion,error:{message:"must match a schema in anyOf"}};hNe.default=q4n});var vNt=y(gNe=>{"use strict";Object.defineProperty(gNe,"__esModule",{value:true});var eZ=_n();var U4n=pi();var $4n={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,eZ._)`{passingSchemas: ${e.passing}}`};var j4n={keyword:"oneOf",schemaType:"array",trackErrors:true,error:$4n,code(e){const{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;const s=r;const o=t.let("valid",false);const u=t.let("passing",null);const l=t.name("_valid");e.setParams({passing:u});t.block(c);e.result(o,()=>e.reset(),()=>e.error(true));function c(){s.forEach((d,p)=>{let f;if((0,U4n.alwaysValidSchema)(i,d)){t.var(l,true)}else{f=e.subschema({keyword:"oneOf",schemaProp:p,compositeRule:true},l)}if(p>0){t.if((0,eZ._)`${l} && ${o}`).assign(o,false).assign(u,(0,eZ._)`[${u}, ${p}]`).else()}t.if(l,()=>{t.assign(o,true);t.assign(u,p);if(f)e.mergeEvaluated(f,eZ.Name)})})}a(c,"validateOneOf")}};gNe.default=j4n});var ENt=y(yNe=>{"use strict";Object.defineProperty(yNe,"__esModule",{value:true});var G4n=pi();var H4n={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach((s,o)=>{if((0,G4n.alwaysValidSchema)(n,s))return;const u=e.subschema({keyword:"allOf",schemaProp:o},i);e.ok(i);e.mergeEvaluated(u)})}};yNe.default=H4n});var ANt=y(_Ne=>{"use strict";Object.defineProperty(_Ne,"__esModule",{value:true});var tZ=_n();var SNt=pi();var V4n={message:({params:e})=>(0,tZ.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,tZ._)`{failingKeyword: ${e.ifClause}}`};var z4n={keyword:"if",schemaType:["object","boolean"],trackErrors:true,error:V4n,code(e){const{gen:t,parentSchema:r,it:n}=e;if(r.then===void 0&&r.else===void 0){(0,SNt.checkStrictMode)(n,'"if" without "then" and "else" is ignored')}const i=bNt(n,"then");const s=bNt(n,"else");if(!i&&!s)return;const o=t.let("valid",true);const u=t.name("_valid");l();e.reset();if(i&&s){const d=t.let("ifClause");e.setParams({ifClause:d});t.if(u,c("then",d),c("else",d))}else if(i){t.if(u,c("then"))}else{t.if((0,tZ.not)(u),c("else"))}e.pass(o,()=>e.error(true));function l(){const d=e.subschema({keyword:"if",compositeRule:true,createErrors:false,allErrors:false},u);e.mergeEvaluated(d)}a(l,"validateIf");function c(d,p){return()=>{const f=e.subschema({keyword:d},u);t.assign(o,u);e.mergeValidEvaluated(f,o);if(p)t.assign(p,(0,tZ._)`${d}`);else e.setParams({ifClause:d})}}a(c,"validateClause")}};function bNt(e,t){const r=e.schema[t];return r!==void 0&&!(0,SNt.alwaysValidSchema)(e,r)}a(bNt,"hasSchema");_Ne.default=z4n});var CNt=y(vNe=>{"use strict";Object.defineProperty(vNe,"__esModule",{value:true});var K4n=pi();var W4n={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){if(t.if===void 0)(0,K4n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};vNe.default=W4n});var bNe=y(ENe=>{"use strict";Object.defineProperty(ENe,"__esModule",{value:true});var Y4n=rNe();var X4n=rNt();var J4n=nNe();var Q4n=iNt();var Z4n=sNt();var eDn=XQ();var tDn=lNt();var rDn=cNe();var nDn=pNt();var iDn=gNt();var sDn=yNt();var aDn=_Nt();var oDn=vNt();var uDn=ENt();var lDn=ANt();var cDn=CNt();function dDn(e=false){const t=[sDn.default,aDn.default,oDn.default,uDn.default,lDn.default,cDn.default,tDn.default,rDn.default,eDn.default,nDn.default,iDn.default];if(e)t.push(X4n.default,Q4n.default);else t.push(Y4n.default,J4n.default);t.push(Z4n.default);return t}a(dDn,"getApplicator");ENe.default=dDn});var wNt=y(SNe=>{"use strict";Object.defineProperty(SNe,"__esModule",{value:true});var vo=_n();var pDn={message:({schemaCode:e})=>(0,vo.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,vo._)`{format: ${e}}`};var fDn={keyword:"format",type:["number","string"],schemaType:"string",$data:true,error:pDn,code(e,t){const{gen:r,data:n,$data:i,schema:s,schemaCode:o,it:u}=e;const{opts:l,errSchemaPath:c,schemaEnv:d,self:p}=u;if(!l.validateFormats)return;if(i)f();else m();function f(){const h=r.scopeValue("formats",{ref:p.formats,code:l.code.formats});const g=r.const("fDef",(0,vo._)`${h}[${o}]`);const _=r.let("fType");const v=r.let("format");r.if((0,vo._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>r.assign(_,(0,vo._)`${g}.type || "string"`).assign(v,(0,vo._)`${g}.validate`),()=>r.assign(_,(0,vo._)`"string"`).assign(v,g));e.fail$data((0,vo.or)(S(),E()));function S(){if(l.strictSchema===false)return vo.nil;return(0,vo._)`${o} && !${v}`}a(S,"unknownFmt");function E(){const b=d.$async?(0,vo._)`(${g}.async ? await ${v}(${n}) : ${v}(${n}))`:(0,vo._)`${v}(${n})`;const A=(0,vo._)`(typeof ${v} == "function" ? ${b} : ${v}.test(${n}))`;return(0,vo._)`${v} && ${v} !== true && ${_} === ${t} && !${A}`}a(E,"invalidFmt")}a(f,"validate$DataFormat");function m(){const h=p.formats[s];if(!h){S();return}if(h===true)return;const[g,_,v]=E(h);if(g===t)e.pass(b());function S(){if(l.strictSchema===false){p.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${s}" ignored in schema at path "${c}"`}a(A,"unknownMsg")}a(S,"unknownFormat");function E(A){const C=A instanceof RegExp?(0,vo.regexpCode)(A):l.code.formats?(0,vo._)`${l.code.formats}${(0,vo.getProperty)(s)}`:void 0;const T=r.scopeValue("formats",{key:s,ref:A,code:C});if(typeof A=="object"&&!(A instanceof RegExp)){return[A.type||"string",A.validate,(0,vo._)`${T}.validate`]}return["string",A,T]}a(E,"getFormat");function b(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!d.$async)throw new Error("async format in sync schema");return(0,vo._)`await ${v}(${n})`}return typeof _=="function"?(0,vo._)`${v}(${n})`:(0,vo._)`${v}.test(${n})`}a(b,"validCondition")}a(m,"validateFormat")}};SNe.default=fDn});var CNe=y(ANe=>{"use strict";Object.defineProperty(ANe,"__esModule",{value:true});var mDn=wNt();var hDn=[mDn.default];ANe.default=hDn});var wNe=y(ZP=>{"use strict";Object.defineProperty(ZP,"__esModule",{value:true});ZP.contentVocabulary=ZP.metadataVocabulary=void 0;ZP.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];ZP.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var xNt=y(TNe=>{"use strict";Object.defineProperty(TNe,"__esModule",{value:true});var gDn=MPe();var yDn=eNe();var _Dn=bNe();var vDn=CNe();var TNt=wNe();var EDn=[gDn.default,yDn.default,(0,_Dn.default)(),vDn.default,TNt.metadataVocabulary,TNt.contentVocabulary];TNe.default=EDn});var RNt=y(F7=>{"use strict";Object.defineProperty(F7,"__esModule",{value:true});F7.DiscrError=void 0;var bDn;(function(e){e["Tag"]="tag";e["Mapping"]="mapping"})(bDn=F7.DiscrError||(F7.DiscrError={}))});var ONe=y(RNe=>{"use strict";Object.defineProperty(RNe,"__esModule",{value:true});var eN=_n();var xNe=RNt();var ONt=A7();var SDn=pi();var ADn={message:({params:{discrError:e,tagName:t}})=>e===xNe.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,eN._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`};var CDn={keyword:"discriminator",type:"object",schemaType:"object",error:ADn,code(e){const{gen:t,data:r,schema:n,parentSchema:i,it:s}=e;const{oneOf:o}=i;if(!s.opts.discriminator){throw new Error("discriminator: requires discriminator option")}const 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(!o)throw new Error("discriminator: requires oneOf keyword");const l=t.let("valid",false);const c=t.const("tag",(0,eN._)`${r}${(0,eN.getProperty)(u)}`);t.if((0,eN._)`typeof ${c} == "string"`,()=>d(),()=>e.error(false,{discrError:xNe.DiscrError.Tag,tag:c,tagName:u}));e.ok(l);function d(){const m=f();t.if(false);for(const h in m){t.elseIf((0,eN._)`${c} === ${h}`);t.assign(l,p(m[h]))}t.else();e.error(false,{discrError:xNe.DiscrError.Mapping,tag:c,tagName:u});t.endIf()}a(d,"validateMapping");function p(m){const h=t.name("valid");const g=e.subschema({keyword:"oneOf",schemaProp:m},h);e.mergeEvaluated(g,eN.Name);return h}a(p,"applyTagSchema");function f(){var m;const h={};const g=v(i);let _=true;for(let b=0;b<o.length;b++){let A=o[b];if((A===null||A===void 0?void 0:A.$ref)&&!(0,SDn.schemaHasRulesButRef)(A,s.self.RULES)){A=ONt.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,A===null||A===void 0?void 0:A.$ref);if(A instanceof ONt.SchemaEnv)A=A.schema}const C=(m=A===null||A===void 0?void 0:A.properties)===null||m===void 0?void 0:m[u];if(typeof C!="object"){throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`)}_=_&&(g||v(A));S(C,b)}if(!_)throw new Error(`discriminator: "${u}" must be required`);return h;function v({required:b}){return Array.isArray(b)&&b.includes(u)}a(v,"hasRequired");function S(b,A){if(b.const){E(b.const,A)}else if(b.enum){for(const C of b.enum){E(C,A)}}else{throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`)}}a(S,"addMappings");function E(b,A){if(typeof b!="string"||b in h){throw new Error(`discriminator: "${u}" values must be unique strings`)}h[b]=A}a(E,"addMapping")}a(f,"getMapping")}};RNe.default=CDn});var PNt=y((oFs,wDn)=>{wDn.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:true,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:true,readOnly:{type:"boolean",default:false},examples:{type:"array",items:true},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:true},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:false},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:true,enum:{type:"array",items:true,minItems:1,uniqueItems:true},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:true}]},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:true}});var kNt=y((Wa,INt)=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:true});Wa.MissingRefError=Wa.ValidationError=Wa.CodeGen=Wa.Name=Wa.nil=Wa.stringify=Wa.str=Wa._=Wa.KeywordCxt=void 0;var TDn=LPe();var xDn=xNt();var RDn=ONe();var NNt=PNt();var ODn=["/properties"];var rZ="http://json-schema.org/draft-07/schema";var nZ=class extends TDn.default{static{a(this,"Ajv")}_addVocabularies(){super._addVocabularies();xDn.default.forEach(t=>this.addVocabulary(t));if(this.opts.discriminator)this.addKeyword(RDn.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();if(!this.opts.meta)return;const t=this.opts.$data?this.$dataMetaSchema(NNt,ODn):NNt;this.addMetaSchema(t,rZ,false);this.refs["http://json-schema.org/schema"]=rZ}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(rZ)?rZ:void 0)}};INt.exports=Wa=nZ;Object.defineProperty(Wa,"__esModule",{value:true});Wa.default=nZ;var PDn=YP();Object.defineProperty(Wa,"KeywordCxt",{enumerable:true,get:function(){return PDn.KeywordCxt}});var tN=_n();Object.defineProperty(Wa,"_",{enumerable:true,get:function(){return tN._}});Object.defineProperty(Wa,"str",{enumerable:true,get:function(){return tN.str}});Object.defineProperty(Wa,"stringify",{enumerable:true,get:function(){return tN.stringify}});Object.defineProperty(Wa,"nil",{enumerable:true,get:function(){return tN.nil}});Object.defineProperty(Wa,"Name",{enumerable:true,get:function(){return tN.Name}});Object.defineProperty(Wa,"CodeGen",{enumerable:true,get:function(){return tN.CodeGen}});var NDn=b7();Object.defineProperty(Wa,"ValidationError",{enumerable:true,get:function(){return NDn.default}});var IDn=S7();Object.defineProperty(Wa,"MissingRefError",{enumerable:true,get:function(){return IDn.default}})});var NNe=y(B7=>{"use strict";Object.defineProperty(B7,"__esModule",{value:true});B7.dynamicAnchor=void 0;var PNe=_n();var kDn=qf();var DNt=A7();var DDn=GQ();var LDn={keyword:"$dynamicAnchor",schemaType:"string",code:e=>LNt(e,e.schema)};function LNt(e,t){const{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=true;const i=(0,PNe._)`${kDn.default.dynamicAnchors}${(0,PNe.getProperty)(t)}`;const s=n.errSchemaPath==="#"?n.validateName:FDn(e);r.if((0,PNe._)`!${i}`,()=>r.assign(i,s))}a(LNt,"dynamicAnchor");B7.dynamicAnchor=LNt;function FDn(e){const{schemaEnv:t,schema:r,self:n}=e.it;const{root:i,baseId:s,localRefs:o,meta:u}=t.root;const{schemaId:l}=n.opts;const c=new DNt.SchemaEnv({schema:r,schemaId:l,root:i,baseId:s,localRefs:o,meta:u});DNt.compileSchema.call(n,c);return(0,DDn.getValidate)(e,c)}a(FDn,"_getValidate");B7.default=LDn});var INe=y(M7=>{"use strict";Object.defineProperty(M7,"__esModule",{value:true});M7.dynamicRef=void 0;var FNt=_n();var BDn=qf();var BNt=GQ();var MDn={keyword:"$dynamicRef",schemaType:"string",code:e=>MNt(e,e.schema)};function MNt(e,t){const{gen:r,keyword:n,it:i}=e;if(t[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);const s=t.slice(1);if(i.allErrors){o()}else{const l=r.let("valid",false);o(l);e.ok(l)}function o(l){if(i.schemaEnv.root.dynamicAnchors[s]){const c=r.let("_v",(0,FNt._)`${BDn.default.dynamicAnchors}${(0,FNt.getProperty)(s)}`);r.if(c,u(c,l),u(i.validateName,l))}else{u(i.validateName,l)()}}a(o,"_dynamicRef");function u(l,c){return c?()=>r.block(()=>{(0,BNt.callRef)(e,l);r.let(c,true)}):()=>(0,BNt.callRef)(e,l)}a(u,"_callRef")}a(MNt,"dynamicRef");M7.dynamicRef=MNt;M7.default=MDn});var qNt=y(kNe=>{"use strict";Object.defineProperty(kNe,"__esModule",{value:true});var qDn=NNe();var UDn=pi();var $Dn={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){if(e.schema)(0,qDn.dynamicAnchor)(e,"");else(0,UDn.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};kNe.default=$Dn});var UNt=y(DNe=>{"use strict";Object.defineProperty(DNe,"__esModule",{value:true});var jDn=INe();var GDn={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,jDn.dynamicRef)(e,e.schema)};DNe.default=GDn});var $Nt=y(LNe=>{"use strict";Object.defineProperty(LNe,"__esModule",{value:true});var HDn=NNe();var VDn=INe();var zDn=qNt();var KDn=UNt();var WDn=[HDn.default,VDn.default,zDn.default,KDn.default];LNe.default=WDn});var GNt=y(FNe=>{"use strict";Object.defineProperty(FNe,"__esModule",{value:true});var jNt=XQ();var YDn={keyword:"dependentRequired",type:"object",schemaType:"object",error:jNt.error,code:e=>(0,jNt.validatePropertyDeps)(e)};FNe.default=YDn});var HNt=y(BNe=>{"use strict";Object.defineProperty(BNe,"__esModule",{value:true});var XDn=XQ();var JDn={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,XDn.validateSchemaDeps)(e)};BNe.default=JDn});var VNt=y(MNe=>{"use strict";Object.defineProperty(MNe,"__esModule",{value:true});var QDn=pi();var ZDn={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){if(t.contains===void 0){(0,QDn.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}}};MNe.default=ZDn});var zNt=y(qNe=>{"use strict";Object.defineProperty(qNe,"__esModule",{value:true});var e6n=GNt();var t6n=HNt();var r6n=VNt();var n6n=[e6n.default,t6n.default,r6n.default];qNe.default=n6n});var WNt=y(UNe=>{"use strict";Object.defineProperty(UNe,"__esModule",{value:true});var lb=_n();var KNt=pi();var i6n=qf();var s6n={message:"must NOT have unevaluated properties",params:({params:e})=>(0,lb._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`};var a6n={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:true,error:s6n,code(e){const{gen:t,schema:r,data:n,errsCount:i,it:s}=e;if(!i)throw new Error("ajv implementation error");const{allErrors:o,props:u}=s;if(u instanceof lb.Name){t.if((0,lb._)`${u} !== true`,()=>t.forIn("key",n,p=>t.if(c(u,p),()=>l(p))))}else if(u!==true){t.forIn("key",n,p=>u===void 0?l(p):t.if(d(u,p),()=>l(p)))}s.props=true;e.ok((0,lb._)`${i} === ${i6n.default.errors}`);function l(p){if(r===false){e.setParams({unevaluatedProperty:p});e.error();if(!o)t.break();return}if(!(0,KNt.alwaysValidSchema)(s,r)){const f=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:p,dataPropType:KNt.Type.Str},f);if(!o)t.if((0,lb.not)(f),()=>t.break())}}a(l,"unevaluatedPropCode");function c(p,f){return(0,lb._)`!${p} || !${p}[${f}]`}a(c,"unevaluatedDynamic");function d(p,f){const m=[];for(const h in p){if(p[h]===true)m.push((0,lb._)`${f} !== ${h}`)}return(0,lb.and)(...m)}a(d,"unevaluatedStatic")}};UNe.default=a6n});var XNt=y($Ne=>{"use strict";Object.defineProperty($Ne,"__esModule",{value:true});var CC=_n();var YNt=pi();var o6n={message:({params:{len:e}})=>(0,CC.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,CC._)`{limit: ${e}}`};var u6n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:o6n,code(e){const{gen:t,schema:r,data:n,it:i}=e;const s=i.items||0;if(s===true)return;const o=t.const("len",(0,CC._)`${n}.length`);if(r===false){e.setParams({len:s});e.fail((0,CC._)`${o} > ${s}`)}else if(typeof r=="object"&&!(0,YNt.alwaysValidSchema)(i,r)){const l=t.var("valid",(0,CC._)`${o} <= ${s}`);t.if((0,CC.not)(l),()=>u(l,s));e.ok(l)}i.items=true;function u(l,c){t.forRange("i",c,o,d=>{e.subschema({keyword:"unevaluatedItems",dataProp:d,dataPropType:YNt.Type.Num},l);if(!i.allErrors)t.if((0,CC.not)(l),()=>t.break())})}a(u,"validateItems")}};$Ne.default=u6n});var JNt=y(jNe=>{"use strict";Object.defineProperty(jNe,"__esModule",{value:true});var l6n=WNt();var c6n=XNt();var d6n=[l6n.default,c6n.default];jNe.default=d6n});var ZNt=y(GNe=>{"use strict";Object.defineProperty(GNe,"__esModule",{value:true});var p6n=MPe();var f6n=eNe();var m6n=bNe();var h6n=$Nt();var g6n=zNt();var y6n=JNt();var _6n=CNe();var QNt=wNe();var v6n=[h6n.default,p6n.default,f6n.default,(0,m6n.default)(true),_6n.default,QNt.metadataVocabulary,QNt.contentVocabulary,g6n.default,y6n.default];GNe.default=v6n});var eIt=y((TFs,E6n)=>{E6n.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":true,"https://json-schema.org/draft/2020-12/vocab/applicator":true,"https://json-schema.org/draft/2020-12/vocab/unevaluated":true,"https://json-schema.org/draft/2020-12/vocab/validation":true,"https://json-schema.org/draft/2020-12/vocab/meta-data":true,"https://json-schema.org/draft/2020-12/vocab/format-annotation":true,"https://json-schema.org/draft/2020-12/vocab/content":true},$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:true,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:true,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:true},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:true}}}});var tIt=y((xFs,b6n)=>{b6n.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":true},$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 rIt=y((RFs,S6n)=>{S6n.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":true},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var nIt=y((OFs,A6n)=>{A6n.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":true},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var iIt=y((PFs,C6n)=>{C6n.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":true},$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 sIt=y((NFs,w6n)=>{w6n.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":true},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var aIt=y((IFs,T6n)=>{T6n.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":true},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:true,deprecated:{type:"boolean",default:false},readOnly:{type:"boolean",default:false},writeOnly:{type:"boolean",default:false},examples:{type:"array",items:true}}}});var oIt=y((kFs,x6n)=>{x6n.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":true},$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:true}]},const:true,enum:{type:"array",items:true},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:false},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:true,default:[]}}}});var uIt=y(HNe=>{"use strict";Object.defineProperty(HNe,"__esModule",{value:true});var R6n=eIt();var O6n=tIt();var P6n=rIt();var N6n=nIt();var I6n=iIt();var k6n=sIt();var D6n=aIt();var L6n=oIt();var F6n=["/properties"];function B6n(e){;[R6n,O6n,P6n,N6n,I6n,t(this,k6n),D6n,t(this,L6n)].forEach(r=>this.addMetaSchema(r,void 0,false));return this;function t(r,n){return e?r.$dataMetaSchema(n,F6n):n}a(t,"with$data")}a(B6n,"addMetaSchema2020");HNe.default=B6n});var zNe=y((Ya,lIt)=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:true});Ya.MissingRefError=Ya.ValidationError=Ya.CodeGen=Ya.Name=Ya.nil=Ya.stringify=Ya.str=Ya._=Ya.KeywordCxt=void 0;var M6n=LPe();var q6n=ZNt();var U6n=ONe();var $6n=uIt();var VNe="https://json-schema.org/draft/2020-12/schema";var iZ=class extends M6n.default{static{a(this,"Ajv2020")}constructor(t={}){super({...t,dynamicRef:true,next:true,unevaluated:true})}_addVocabularies(){super._addVocabularies();q6n.default.forEach(t=>this.addVocabulary(t));if(this.opts.discriminator)this.addKeyword(U6n.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:t,meta:r}=this.opts;if(!r)return;$6n.default.call(this,t);this.refs["http://json-schema.org/schema"]=VNe}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(VNe)?VNe:void 0)}};lIt.exports=Ya=iZ;Object.defineProperty(Ya,"__esModule",{value:true});Ya.default=iZ;var j6n=YP();Object.defineProperty(Ya,"KeywordCxt",{enumerable:true,get:function(){return j6n.KeywordCxt}});var rN=_n();Object.defineProperty(Ya,"_",{enumerable:true,get:function(){return rN._}});Object.defineProperty(Ya,"str",{enumerable:true,get:function(){return rN.str}});Object.defineProperty(Ya,"stringify",{enumerable:true,get:function(){return rN.stringify}});Object.defineProperty(Ya,"nil",{enumerable:true,get:function(){return rN.nil}});Object.defineProperty(Ya,"Name",{enumerable:true,get:function(){return rN.Name}});Object.defineProperty(Ya,"CodeGen",{enumerable:true,get:function(){return rN.CodeGen}});var G6n=b7();Object.defineProperty(Ya,"ValidationError",{enumerable:true,get:function(){return G6n.default}});var H6n=S7();Object.defineProperty(Ya,"MissingRefError",{enumerable:true,get:function(){return H6n.default}})});var KNe=y((U7,dIt)=>{"use strict";Object.defineProperty(U7,"__esModule",{value:true});var q7=PQ();var bh=jP();function cIt(e,t){if(!e.opts.code.source){throw new Error("moduleCode: ajv instance must have code.source option")}const{_n:r}=e.scope.opts;return typeof t=="function"?i(t.source):t!==void 0?s(t,n):s(e.schemas,u=>u.meta?void 0:e.compile(u.schema));function n(u){const l=e.getSchema(u);if(!l)throw new Error(`moduleCode: no schema with id ${u}`);return l}a(n,"getValidate");function i(u){const l={};const c=u===null||u===void 0?void 0:u.validateName;const d=o(l,u);if(e.opts.code.esm){return`"use strict";${r}export const validate = ${c};${r}export default ${c};${r}${d}`}return`"use strict";${r}module.exports = ${c};${r}module.exports.default = ${c};${r}${d}`}a(i,"funcExportCode");function s(u,l){var c;const d={};let p=(0,bh._)`"use strict";`;for(const f in u){const m=l(u[f]);if(m){const h=o(d,m.source);const g=e.opts.code.esm?(0,bh._)`export const ${(0,bh.getEsmExportName)(f)}`:(0,bh._)`exports${(0,bh.getProperty)(f)}`;p=(0,bh._)`${p}${r}${g} = ${(c=m.source)===null||c===void 0?void 0:c.validateName};${r}${h}`}}return`${p}`}a(s,"multiExportsCode");function o(u,l){if(!l)throw new Error('moduleCode: function does not have "source" property');if(f(l.validateName)===q7.UsedValueState.Completed)return bh.nil;m(l.validateName,q7.UsedValueState.Started);const c=e.scope.scopeCode(l.scopeValues,u,p);const d=new bh._Code(`${c}${r}${l.validateCode}`);return l.evaluated?(0,bh._)`${d}${l.validateName}.evaluated = ${l.evaluated};${r}`:d;function p(h){var g;const _=(g=h.value)===null||g===void 0?void 0:g.ref;if(h.prefix==="validate"&&typeof _=="function"){const v=_;return o(u,v.source)}else if((h.prefix==="root"||h.prefix==="wrapper")&&typeof _=="object"){const{validate:v,validateName:S}=_;if(!S)throw new Error("ajv internal error");const E=e.opts.code.es5?q7.varKinds.var:q7.varKinds.const;const b=(0,bh._)`${E} ${h} = {validate: ${S}};`;if(f(S)===q7.UsedValueState.Started)return b;const A=o(u,v===null||v===void 0?void 0:v.source);return(0,bh._)`${b}${r}${A}`}return void 0}a(p,"refValidateCode");function f(h){var g;return(g=u[h.prefix])===null||g===void 0?void 0:g.get(h)}a(f,"usedState");function m(h,g){const{prefix:_}=h;const v=u[_]=u[_]||new Map;v.set(h,g)}a(m,"setUsedState")}a(o,"validateCode")}a(cIt,"standaloneCode");dIt.exports=U7=cIt;Object.defineProperty(U7,"__esModule",{value:true});U7.default=cIt});var QNe=y(ky=>{"use strict";Object.defineProperty(ky,"__esModule",{value:true});var V6n="[";var z6n="]";var K6n="{";var W6n="}";var Y6n=":";var X6n=",";var gIt="true";var yIt="false";var _It="null";var pIt='"';var J6n=new Map([["t",gIt],["f",yIt],["n",_It]]);var YNe=new Map([[pIt,pIt],["\\","\\"],["/","/"],["b","\b"],["n","\n"],["f","\f"],["r","\r"],["t"," "]]);var WNe=new Map([[V6n,"Punctuator"],[z6n,"Punctuator"],[K6n,"Punctuator"],[W6n,"Punctuator"],[Y6n,"Punctuator"],[X6n,"Punctuator"],[gIt,"Boolean"],[yIt,"Boolean"],[_It,"Null"]]);var wC=class extends Error{static{a(this,"ErrorWithLocation")}constructor(t,{line:r,column:n,index:i}){super(`${t} (${r}:${n})`);this.line=r;this.column=n;this.index=i}};var XNe=class extends wC{static{a(this,"UnexpectedChar")}constructor(t,r){super(`Unexpected character ${t} found.`,r)}};var nN=class extends wC{static{a(this,"UnexpectedToken")}constructor(t){super(`Unexpected token ${t.type}(${t.value}) found.`,t.loc.start)}};var JNe=class extends wC{static{a(this,"UnexpectedEOF")}constructor(t){super("Unexpected end of input found.",t)}};var fIt='"';var mIt="/";var hIt="*";var Q6n={comments:false,ranges:false};function Z6n(e){return/[\s\n]/.test(e)}a(Z6n,"isWhitespace");function cb(e){return e>="0"&&e<="9"}a(cb,"isDigit");function e5n(e){return cb(e)||/[a-f]/i.test(e)}a(e5n,"isHexDigit");function t5n(e){return e>="1"&&e<="9"}a(t5n,"isPositiveDigit");function r5n(e){return/[tfn]/.test(e)}a(r5n,"isKeywordStart");function n5n(e){return cb(e)||e==="."||e==="-"}a(n5n,"isNumberStart");function vIt(e,t){t=Object.freeze({...Q6n,...t});let r=-1;let n=1;let i=0;let s=false;const o=[];function u(v,S,E,b){const A=E.offset+S.length;let C=t.ranges?{range:[E.offset,A]}:void 0;return{type:v,value:S,loc:{start:E,end:b||{line:E.line,column:E.column+S.length,offset:A}},...C}}a(u,"createToken");function l(){let v=e.charAt(++r);if(s){n++;i=1;s=false}else{i++}if(v==="\r"){s=true;if(e.charAt(r+1)==="\n"){r++}}else if(v==="\n"){s=true}return v}a(l,"next");function c(){return{line:n,column:i,offset:r}}a(c,"locate");function d(v){let S=J6n.get(v);if(e.slice(r,r+S.length)===S){r+=S.length-1;i+=S.length-1;return{value:S,c:l()}}for(let E=1;E<S.length;E++){if(S[E]!==e.charAt(r+E)){h(l())}}}a(d,"readKeyword");function p(v){let S=v;v=l();while(v&&v!==fIt){if(v==="\\"){S+=v;v=l();if(YNe.has(v)){S+=v}else if(v==="u"){S+=v;for(let E=0;E<4;E++){v=l();if(e5n(v)){S+=v}else{h(v)}}}else{h(v)}}else{S+=v}v=l()}if(!v){g()}S+=v;return{value:S,c:l()}}a(p,"readString");function f(v){let S="";if(v==="-"){S+=v;v=l();if(!cb(v)){h(v)}}if(v==="0"){S+=v;v=l();if(cb(v)){h(v)}}else{if(!t5n(v)){h(v)}do{S+=v;v=l()}while(cb(v))}if(v==="."){do{S+=v;v=l()}while(cb(v))}if(v==="e"||v==="E"){S+=v;v=l();if(v==="+"||v==="-"){S+=v;v=l()}if(!cb(v)){h(v)}while(cb(v)){S+=v;v=l()}}return{value:S,c:v}}a(f,"readNumber");function m(v){let S=v;v=l();if(v==="/"){do{S+=v;v=l()}while(v&&v!=="\r"&&v!=="\n");return{value:S,c:v}}if(v===hIt){while(v){S+=v;v=l();if(v===hIt){S+=v;v=l();if(v===mIt){S+=v;v=l();return{value:S,c:v}}}}g()}h(v)}a(m,"readComment");function h(v){throw new XNe(v,c())}a(h,"unexpected");function g(){throw new JNe(c())}a(g,"unexpectedEOF");let _=l();while(r<e.length){while(Z6n(_)){_=l()}if(!_){break}const v=c();if(WNe.has(_)){o.push(u(WNe.get(_),_,v));_=l()}else if(r5n(_)){const S=d(_);let E=S.value;_=S.c;o.push(u(WNe.get(E),E,v))}else if(n5n(_)){const S=f(_);let E=S.value;_=S.c;o.push(u("Number",E,v))}else if(_===fIt){const S=p(_);let E=S.value;_=S.c;o.push(u("String",E,v))}else if(_===mIt&&t.comments){const S=m(_);let E=S.value;_=S.c;o.push(u(E.startsWith("//")?"LineComment":"BlockComment",E,v,c()))}else{h(_)}}return o}a(vIt,"tokenize");var $7={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}}};var i5n={tokens:false,comments:false,ranges:false};function s5n(e){let t=e.value.slice(1,-1);let r="";let n=t.indexOf("\\");let i=0;while(n>=0){r+=t.slice(i,n);const s=t.charAt(n+1);if(YNe.has(s)){r+=YNe.get(s);i=n+2}else if(s==="u"){const o=t.slice(n+2,n+6);if(o.length<4||/[^0-9a-f]/i.test(o)){throw new wC(`Invalid unicode escape \\u${o}.`,{line:e.loc.start.line,column:e.loc.start.column+n,offset:e.loc.start.offset+n})}r+=String.fromCharCode(parseInt(o,16));i=n+6}else{throw new wC(`Invalid escape \\${s}.`,{line:e.loc.start.line,column:e.loc.start.column+n,offset:e.loc.start.offset+n})}n=t.indexOf("\\",i)}r+=t.slice(i);return r}a(s5n,"getStringValue");function a5n(e){switch(e.type){case"Boolean":return e.value==="true";case"Number":return Number(e.value);case"Null":return null;case"String":return s5n(e)}}a(a5n,"getLiteralValue");function o5n(e,t){t=Object.freeze({...i5n,...t});const r=vIt(e,{comments:!!t.comments,ranges:!!t.ranges});let n=0;function i(){return r[n++]}a(i,"nextNoComments");function s(){const S=r[n++];if(S&&S.type.endsWith("Comment")){return s()}return S}a(s,"nextSkipComments");const o=t.comments?s:i;function u(S,E){if(!S||S.value!==E){throw new nN(S)}}a(u,"assertTokenValue");function l(S,E){if(!S||S.type!==E){throw new nN(S)}}a(l,"assertTokenType");function c(S,E){return t.ranges?{range:[S.offset,E.offset]}:void 0}a(c,"createRange");function d(S){const E=c(S.loc.start,S.loc.end);return{type:S.type,value:a5n(S),loc:{start:{...S.loc.start},end:{...S.loc.end}},...E}}a(d,"createLiteralNode");function p(S){l(S,"String");const E=d(S);S=o();u(S,":");const b=h();const A=c(E.loc.start,b.loc.end);return $7.member(E,b,{loc:{start:{...E.loc.start},end:{...b.loc.end}},...A})}a(p,"parseProperty");function f(S){u(S,"{");const E=[];let b=o();if(b&&b.value!=="}"){do{E.push(p(b));b=o();if(b.value===","){b=o()}else{break}}while(b)}u(b,"}");const A=c(S.loc.start,b.loc.end);return $7.object(E,{loc:{start:{...S.loc.start},end:{...b.loc.end}},...A})}a(f,"parseObject");function m(S){u(S,"[");const E=[];let b=o();if(b&&b.value!=="]"){do{E.push(h(b));b=o();if(b.value===","){b=o()}else{break}}while(b)}u(b,"]");const A=c(S.loc.start,b.loc.end);return $7.array(E,{type:"Array",elements:E,loc:{start:{...S.loc.start},end:{...b.loc.end}},...A})}a(m,"parseArray");function h(S){S=S||o();switch(S.type){case"String":case"Boolean":case"Number":case"Null":return d(S);case"Punctuator":if(S.value==="{"){return f(S)}else if(S.value==="["){return m(S)}default:throw new nN(S)}}a(h,"parseValue");const g=h();const _=o();if(_){throw new nN(_)}const v={loc:{start:{line:1,column:1,offset:0},end:{...g.loc.end}}};if(t.tokens){v.tokens=r}if(t.ranges){v.range=c(v.loc.start,v.loc.end)}return $7.document(g,v)}a(o5n,"parse");var u5n=new Map([["Document",["body"]],["Object",["members"]],["Member",["name","value"]],["Array",["elements"]],["String",[]],["Number",[]],["Boolean",[]],["Null",[]]]);function EIt(e){return e&&typeof e==="object"}a(EIt,"isObject");function l5n(e){return EIt(e)&&typeof e.type==="string"}a(l5n,"isNode");function bIt(e,t){function r(n,i){if(typeof t.enter==="function"){t.enter(n,i)}for(const s of u5n.get(n.type)){const o=n[s];if(EIt(o)){if(Array.isArray(o)){o.forEach(u=>r(u,n))}else if(l5n(o)){r(o,n)}}}if(typeof t.exit==="function"){t.exit(n,i)}}a(r,"visitNode");r(e)}a(bIt,"traverse");function c5n(e,t=()=>true){const r=[];bIt(e,{enter(n,i){r.push({node:n,parent:i,phase:"enter"})},exit(n,i){r.push({node:n,parent:i,phase:"exit"})}});return r.filter(t).values()}a(c5n,"iterator");function iN(e){switch(e.type){case"String":case"Number":case"Boolean":return e.value;case"Null":return null;case"Array":return e.elements.map(iN);case"Object":{const t={};e.members.forEach(r=>{t[iN(r.name)]=iN(r.value)});return t}case"Document":return iN(e.body);case"Property":throw new Error("Cannot evaluate object property outside of an object.");default:throw new Error(`Unknown node type ${e.type}.`)}}a(iN,"evaluate");function d5n(e,{indent:t=0}={}){const r=iN(e);return JSON.stringify(r,null,t)}a(d5n,"print");ky.evaluate=iN;ky.iterator=c5n;ky.parse=o5n;ky.print=d5n;ky.tokenize=vIt;ky.traverse=bIt;ky.types=$7});var ZNe=y(Sh=>{"use strict";var p5n=Sh&&Sh.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(Sh,"__esModule",{value:true});Sh.getSchemaAST=Sh.getSchemaContent=Sh.getFileLineContent=void 0;var f5n=QNe();var m5n=p5n(require("fs/promises"));var h5n=a((e,t)=>{const r=e.split(/\r?\n/);return r[t-1]},"getFileLineContent");Sh.getFileLineContent=h5n;var g5n=a(async e=>{try{return await m5n.default.readFile(e,"utf-8")}catch(t){return void 0}},"getSchemaContent");Sh.getSchemaContent=g5n;var y5n=a(async e=>{try{return(0,f5n.parse)(e)}catch(t){if(t.column&&t.line&&t.message){const r=(0,Sh.getFileLineContent)(e,t.line);const n={column:t.column,line:t.line,length:void 0,lineText:r};return n}return void 0}},"getSchemaAST");Sh.getSchemaAST=y5n});var wIt=y(sN=>{"use strict";var _5n=sN&&sN.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(sN,"__esModule",{value:true});sN.getLocation=void 0;var v5n=hn();var SIt=_5n(require("path"));var AIt=Fn();var sZ=ZNe();var CIt=a(e=>{let t=null;if(e.value.type==="Object"&&e.value.members.length>0){for(const r of e.value.members){const n=CIt(r);if(n!==null){t=n}if(r.name.value==="enum"&&r.value.type==="Array"&&r.value.elements.length===0){const i=r.value;const s=i.loc.start.line;const o=i.loc.start.column;const u=i.loc.end.column;t={line:s,column:o,length:u-o,lineText:""}}}}return t},"findEmptyEnums");var E5n=a(e=>{if(e.startsWith("schema with key or id")&&e.endsWith("already exists")){return"Update your schema's '$id' to be unique across your project."}else if(e.includes("All JSON schemas must use version 2020-12")){return`All JSON schemas must use version 2020-12. See release notes for changes: https://json-schema.org/draft/2020-12/release-notes.html`}else if(e==='"nullable" cannot be used without "type"'){return`Property "nullable" can only be used when property "type" value is "object".`}else if(e==='NOT SUPPORTED: keyword "id", use "$id" for schema ID'){return`Replace keyword "id" with "$id" when defining a schema Id.`}else if(e.startsWith("can't resolve reference http")){return`Cannot resolve remote references, try adding them directly to the schema file or as a schema file in the project.`}else if(e.startsWith("can't resolve reference")){return"Make sure all references are defined in the schema."}else if(e.includes("oneOf must NOT have fewer than 1 items")){return'Property "oneOf" must have at least 1 item configured.'}else if(e.includes("enum must have non-empty array")){return'Property "enum" must be configured with at least one value.'}else if(e.includes("Unexpected")&&e.includes("in JSON at position")){return"Update your schema to only use valid properties."}return void 0},"getSuggestions");var b5n=a(async(e,t,r)=>{if(!e){return null}let n={file:SIt.default.join(AIt.USER_SCHEMAS_DIR_NAME,e),suggestion:E5n(r)};const i=SIt.default.join(t,AIt.USER_SCHEMAS_DIR_NAME);const s=v5n.xfs.safePath(t).resolve(i,e);const o=await(0,sZ.getSchemaContent)(s);if(r.includes("enum must have non-empty array")){if(o){const u=await(0,sZ.getSchemaAST)(o);if(u&&u.body.members!==null){for(const l of u.body.members){const c=CIt(l);if(c&&c!==null){const d=Object.assign(n??{},c);n=d}}}if(n){const l=n.line?n.line:0;n.lineText=(0,sZ.getFileLineContent)(o,l)}}}else if(r.includes("Unexpected")&&r.includes("in JSON at position")){if(o){const u=await(0,sZ.getSchemaAST)(o);if(u&&"lineText"in u){const l=Object.assign(n??{},u);n=l}}}return n},"getLocation");sN.getLocation=b5n});var OIt=y(aN=>{"use strict";var db=aN&&aN.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(aN,"__esModule",{value:true});aN.jsonSchemaPlugin=void 0;var TC=hn();var S5n=kNt();var A5n=db(o8());var C5n=db(zNe());var w5n=db(KNe());var TIt=db(require("fs/promises"));var mp=db(require("path"));var T5n=db(require("prettier"));var j7=Fn();var xIt=db(rb());var x5n=db(xs());var RIt=wIt();var cg="schemas";var aZ="json-schema";function R5n(e){return{name:cg,async setup(t){const r=new C5n.default({code:{source:true},allErrors:true,strict:false,verbose:true,meta:true});(0,A5n.default)(r,{mode:"fast"});r.opts.code.formats=(0,S5n._)`require("ajv-formats/dist/formats").fastFormats`;const n=mp.default.join(e.sourceDirectory,j7.USER_SCHEMAS_DIR_NAME);let i;const s=[];const o=[];if(await TC.xfs.dirExists(n)){r.addKeyword("faker");i=await TC.xfs.listFolderContents(n,j7.USER_SCHEMAS_DIR_NAME);await Promise.all(i.map(async u=>{try{const l=TC.xfs.safePath(e.sourceDirectory).resolve(n,u);if(!l.startsWith(n)){throw new Error("All schemas must be in the schemas directory")}const c=await TIt.default.readFile(l,"utf-8");if(c===""||c===void 0){throw new Error(`Schema 'schemas/${u}' is empty and will be ignored.`)}const d=JSON.parse(c);if(d.$schema&&d.$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`)}r.$dataMetaSchema;r.addSchema(d,u);if(r.errors?.length){const p=r.errors[0];s.push({id:"json-schema-validation-error",pluginName:cg,text:`Error: ${p.message}`,location:{file:mp.default.join(j7.USER_SCHEMAS_DIR_NAME,u)},detail:{params:p.params,propertyName:p.propertyName,schemaPath:p.schemaPath,data:p.data}})}}catch(l){if(l.message.endsWith("is empty and will be ignored.")){o.push({id:"empty-json-schema-file",pluginName:cg,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}const c=await(0,RIt.getLocation)(u,e.sourceDirectory,l.message);s.push({id:"json-schema-add-error",pluginName:cg,text:`Error: ${l.message}`,location:c,detail:"InvalidAddSchemaError",notes:[{text:l.message}]})}}));await Promise.all(i.map(async u=>{try{const l=r.getSchema(u);if(l){const c=r.compile(l.schema);c.errors?.forEach(d=>{s.push({text:`Failed to compile ${u}: ${d.message}`})})}}catch(l){const c=await(0,RIt.getLocation)(u,e.sourceDirectory,l.message);s.push({id:"json-schema-compile-error",pluginName:cg,text:`The schema file '${u}' is not valid. Error: ${l.message}`,location:c,detail:"InvalidSchemaError",notes:[{text:l.message}]})}}));if(xIt.default.DEBUG_BUILD_MODE){const u=mp.default.resolve(e.outputDirectory,j7.USER_SCHEMAS_DIR_NAME);await TC.xfs.mkdirIfNotExists(u)}}t.onStart(async()=>{if(!i){return}return{errors:s,warnings:o}});t.onResolve({filter:/schemas\/.*\.json$/},async u=>{const l=mp.default.isAbsolute(u.path)?u.path:mp.default.join(u.resolveDir,u.path);if(u.importer&&u.importer!==mp.default.join(e.sourceDirectory,"config/routes.json")){return{path:l}}if(!await TC.xfs.fileExists(l)){const c="policies.json";const d={id:"json-schema-build-error",text:`Unable to resolve reference to '${u.path}' from ${c}`,location:{file:mp.default.join(u.resolveDir,c),namespace:aZ,line:1,column:0,length:0,lineText:`Invalid JSON schema reference in ${c}`,suggestion:""},detail:"RouteReferenceError",pluginName:cg,notes:[{text:`Unable to resolve reference to '${u.path}' from ${c}`,location:null}]};return{errors:[d],namespace:aZ,path:l,pluginName:cg}}return{path:l,namespace:aZ,pluginName:cg}});t.onLoad({filter:/.*/,namespace:aZ},async u=>{return x5n.default.timeFn(`Generating json schema data: ${mp.default.basename(u.path)}`,async()=>{const l=[];let c;try{const d=mp.default.relative(n,u.path);const p=r.getSchema(d);if(!p){throw new Error(`Could not load schema at ${u.path}`)}c=p.source?.validateCode;const f=r.compile(p.schema);c=(0,w5n.default)(r,f)}catch(d){l.push({pluginName:cg,text:`Cannot parse project's schemas/${mp.default.basename(u.path)} file. Error: ${d.message}`,location:null,notes:[{text:d.message,location:null}],detail:d})}if(xIt.default.DEBUG_BUILD_MODE&&c){const d=mp.default.resolve(e.outputDirectory,j7.USER_SCHEMAS_DIR_NAME);const p=mp.default.relative(n,u.path);const f=await T5n.default.format(c,{parser:"babel"});const m=TC.xfs.safePath(e.sourceDirectory).resolve(d,`${p}.js`);await TC.xfs.mkdirForFilePathIfNotExits(m);await TIt.default.writeFile(m,f,"utf-8")}return{contents:c,errors:l,pluginName:cg,resolveDir:mp.default.dirname(u.path),watchFiles:[u.path]}})})}}}a(R5n,"jsonSchemaPlugin");aN.jsonSchemaPlugin=R5n});var eIe=y((zFs,O5n)=>{O5n.exports={modules:[{name:"@aws-sdk/client-dynamodb",version:">=3.58.0"},{name:"@aws-sdk/client-kinesis",version:">=3.67.0"},{name:"@aws-sdk/client-lambda",version:">=3.58.0"},{name:"@aws-sdk/client-rds-data",version:">=3.58.0"},{name:"@aws-sdk/client-rds",version:">=3.58.0"},{name:"@aws-sdk/client-s3",version:">=3.58.0"},{name:"@aws-sdk/client-sns",version:">=3.484.0"},{name:"@aws-sdk/client-sqs",version:">=3.58.0"},{name:"@azure/core-auth",version:">=1.4.0"},{name:"@azure/cosmos",version:">=3.17.1"},{name:"@cfworker/cosmos",version:">=1.13.4"},{name:"@graphql-tools/schema",version:">=9.0.0"},{name:"@sagi.io/workers-jwt",version:">=0.0.22"},{name:"@sendgrid/mail",version:">=7.7.0"},{name:"@sentry/tracing",version:">=7.11.1"},{name:"@supabase/supabase-js",version:">=2.39.1"},{name:"@xata.io/client",version:">=0.21.1"},{name:"@zuplo/firebase",version:">=1.0.0"},{name:"algoliasearch",version:">=4.14.3"},{name:"bcryptjs",version:">=2.4.3"},{name:"casbin.js",version:">=1.0.1"},{name:"cheerio",version:">=1.0.0-rc.11"},{name:"faunadb",version:">=4.5.4"},{name:"firebase",version:">=9.0.0"},{name:"graphql",version:">=16.6.0"},{name:"mmdynamo",version:">=0.3.0"},{name:"realm-web",version:">=1.7.0"},{name:"sofa-api",version:">=0.17.1"},{name:"stripe",version:">=11.1.0"},{name:"toucan-js",version:">=2.5.0"}],legacyAliases:{algoliasearch:"https://esm.sh/algoliasearch@4.14.3","@aws-sdk/client-dynamodb":"https://esm.sh/@aws-sdk/client-dynamodb@3.58.0","@aws-sdk/client-kinesis":"https://esm.sh/@aws-sdk/client-kinesis@3.67.0","@aws-sdk/client-lambda":"https://esm.sh/@aws-sdk/client-lambda@3.58.0","@aws-sdk/client-rds":"https://esm.sh/@aws-sdk/client-rds@3.58.0","@aws-sdk/client-rds-data":"https://esm.sh/@aws-sdk/client-rds-data@3.58.0","@aws-sdk/client-s3":"https://esm.sh/@aws-sdk/client-s3@3.58.0","@aws-sdk/client-sqs":"https://esm.sh/@aws-sdk/client-sqs@3.58.0","@azure/core-auth":"https://esm.sh/@azure/core-auth@1.4.0","@azure/cosmos":"https://esm.sh/@azure/cosmos@3.17.1",bcryptjs:"https://esm.sh/bcryptjs@2.4.3","casbin.js":"https://esm.sh/casbin.js@1.0.1","@cfworker/cosmos":"https://esm.sh/@cfworker/cosmos@1.13.4",cheerio:"https://esm.sh/cheerio@1.0.0-rc.11",faunadb:"https://esm.sh/faunadb@4.5.4",graphql:"https://esm.sh/graphql@16.6.0",mmdynamo:"https://esm.sh/mmdynamo@0.3.0","realm-web":"https://esm.sh/realm-web@1.7.0","@sagi.io/workers-jwt":"https://esm.sh/@sagi.io/workers-jwt@0.0.22","@sendgrid/mail":"https://esm.sh/@sendgrid/mail@7.7.0","@sentry/tracing":"https://esm.sh/@sentry/tracing@7.11.1",stripe:"https://esm.sh/stripe@11.1.0","@supabase/supabase-js":"https://esm.sh/@supabase/supabase-js@2.39.1","toucan-js":"https://esm.sh/toucan-js@2.5.0","@xata.io/client":"https://esm.sh/@xata.io/client@0.21.1"}}});var IIt=y(oN=>{"use strict";var P5n=oN&&oN.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(oN,"__esModule",{value:true});oN.moduleResolverPlugin=void 0;var N5n=hn();var PIt=require("fs/promises");var NIt=P5n(require("path"));var I5n=eIe();var k5n="module-resolver";var D5n=["@zuplo/core","@zuplo/runtime"];async function L5n(e){const t={};const r=await(0,PIt.readFile)(NIt.default.resolve(require.resolve("@zuplo/runtime"),"../../package.json"),"utf-8");const n=JSON.parse(r);const i=NIt.default.join(e,"package.json");if(await N5n.xfs.fileExists(i)){const s=await(0,PIt.readFile)(i,"utf-8");const o=JSON.parse(s);const u=["dependencies","_dependencies"];u.forEach(l=>{if(o[l]){for(const c in o[l]){if(!c.startsWith("http:")&&!c.startsWith("https:")&&![...D5n,...Object.keys(n.dependencies)].includes(c)){t[c]=`https://esm.sh/${c}@${o[l][c]}`}}}})}return t}a(L5n,"getPackageAliases");function F5n({sourceDirectory:e}){return{name:k5n,async setup(t){const r=await L5n(e);const n={...I5n.legacyAliases,...r};t.onResolve({filter:/.*/},i=>{if(!i.path.startsWith("./")&&!i.path.startsWith("/")){const s=Object.keys(n).find(o=>i.path.startsWith(o));if(s){return{path:i.path.replace(s,n[s]),namespace:"http-url"}}}})}}}a(F5n,"moduleResolverPlugin");oN.moduleResolverPlugin=F5n});var Nc=y(hp=>{"use strict";hp.__esModule=true;hp.extend=kIt;hp.indexOf=$5n;hp.escapeExpression=j5n;hp.isEmpty=G5n;hp.createFrame=H5n;hp.blockParams=V5n;hp.appendContextPath=z5n;var B5n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"};var M5n=/[&<>"'`=]/g;var q5n=/[&<>"'`=]/;function U5n(e){return B5n[e]}a(U5n,"escapeChar");function kIt(e){for(var t=1;t<arguments.length;t++){for(var r in arguments[t]){if(Object.prototype.hasOwnProperty.call(arguments[t],r)){e[r]=arguments[t][r]}}}return e}a(kIt,"extend");var rIe=Object.prototype.toString;hp.toString=rIe;var tIe=a(function e(t){return typeof t==="function"},"isFunction");if(tIe(/x/)){hp.isFunction=tIe=a(function(e){return typeof e==="function"&&rIe.call(e)==="[object Function]"},"isFunction")}hp.isFunction=tIe;var DIt=Array.isArray||function(e){return e&&typeof e==="object"?rIe.call(e)==="[object Array]":false};hp.isArray=DIt;function $5n(e,t){for(var r=0,n=e.length;r<n;r++){if(e[r]===t){return r}}return-1}a($5n,"indexOf");function j5n(e){if(typeof e!=="string"){if(e&&e.toHTML){return e.toHTML()}else if(e==null){return""}else if(!e){return e+""}e=""+e}if(!q5n.test(e)){return e}return e.replace(M5n,U5n)}a(j5n,"escapeExpression");function G5n(e){if(!e&&e!==0){return true}else if(DIt(e)&&e.length===0){return true}else{return false}}a(G5n,"isEmpty");function H5n(e){var t=kIt({},e);t._parent=e;return t}a(H5n,"createFrame");function V5n(e,t){e.path=t;return e}a(V5n,"blockParams");function z5n(e,t){return(e?e+".":"")+t}a(z5n,"appendContextPath")});var Gf=y((oZ,LIt)=>{"use strict";oZ.__esModule=true;var nIe=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function iIe(e,t){var r=t&&t.loc,n=void 0,i=void 0,s=void 0,o=void 0;if(r){n=r.start.line;i=r.end.line;s=r.start.column;o=r.end.column;e+=" - "+n+":"+s}var u=Error.prototype.constructor.call(this,e);for(var l=0;l<nIe.length;l++){this[nIe[l]]=u[nIe[l]]}if(Error.captureStackTrace){Error.captureStackTrace(this,iIe)}try{if(r){this.lineNumber=n;this.endLineNumber=i;if(Object.defineProperty){Object.defineProperty(this,"column",{value:s,enumerable:true});Object.defineProperty(this,"endColumn",{value:o,enumerable:true})}else{this.column=s;this.endColumn=o}}}catch(c){}}a(iIe,"Exception");iIe.prototype=new Error;oZ["default"]=iIe;LIt.exports=oZ["default"]});var BIt=y((uZ,FIt)=>{"use strict";uZ.__esModule=true;var sIe=Nc();uZ["default"]=function(e){e.registerHelper("blockHelperMissing",function(t,r){var n=r.inverse,i=r.fn;if(t===true){return i(this)}else if(t===false||t==null){return n(this)}else if(sIe.isArray(t)){if(t.length>0){if(r.ids){r.ids=[r.name]}return e.helpers.each(t,r)}else{return n(this)}}else{if(r.data&&r.ids){var s=sIe.createFrame(r.data);s.contextPath=sIe.appendContextPath(r.data.contextPath,r.name);r={data:s}}return i(t,r)}})};FIt.exports=uZ["default"]});var qIt=y((lZ,MIt)=>{"use strict";lZ.__esModule=true;function K5n(e){return e&&e.__esModule?e:{"default":e}}a(K5n,"_interopRequireDefault");var G7=Nc();var W5n=Gf();var Y5n=K5n(W5n);lZ["default"]=function(e){e.registerHelper("each",function(t,r){if(!r){throw new Y5n["default"]("Must pass iterator to #each")}var n=r.fn,i=r.inverse,s=0,o="",u=void 0,l=void 0;if(r.data&&r.ids){l=G7.appendContextPath(r.data.contextPath,r.ids[0])+"."}if(G7.isFunction(t)){t=t.call(this)}if(r.data){u=G7.createFrame(r.data)}function c(h,g,_){if(u){u.key=h;u.index=g;u.first=g===0;u.last=!!_;if(l){u.contextPath=l+h}}o=o+n(t[h],{data:u,blockParams:G7.blockParams([t[h],h],[l+h,null])})}a(c,"execIteration");if(t&&typeof t==="object"){if(G7.isArray(t)){for(var d=t.length;s<d;s++){if(s in t){c(s,s,s===t.length-1)}}}else if(global.Symbol&&t[global.Symbol.iterator]){var p=[];var f=t[global.Symbol.iterator]();for(var m=f.next();!m.done;m=f.next()){p.push(m.value)}t=p;for(var d=t.length;s<d;s++){c(s,s,s===t.length-1)}}else{(function(){var h=void 0;Object.keys(t).forEach(function(g){if(h!==void 0){c(h,s-1)}h=g;s++});if(h!==void 0){c(h,s-1,true)}})()}}if(s===0){o=i(this)}return o})};MIt.exports=lZ["default"]});var $It=y((cZ,UIt)=>{"use strict";cZ.__esModule=true;function X5n(e){return e&&e.__esModule?e:{"default":e}}a(X5n,"_interopRequireDefault");var J5n=Gf();var Q5n=X5n(J5n);cZ["default"]=function(e){e.registerHelper("helperMissing",function(){if(arguments.length===1){return void 0}else{throw new Q5n["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')}})};UIt.exports=cZ["default"]});var VIt=y((dZ,HIt)=>{"use strict";dZ.__esModule=true;function Z5n(e){return e&&e.__esModule?e:{"default":e}}a(Z5n,"_interopRequireDefault");var jIt=Nc();var e8n=Gf();var GIt=Z5n(e8n);dZ["default"]=function(e){e.registerHelper("if",function(t,r){if(arguments.length!=2){throw new GIt["default"]("#if requires exactly one argument")}if(jIt.isFunction(t)){t=t.call(this)}if(!r.hash.includeZero&&!t||jIt.isEmpty(t)){return r.inverse(this)}else{return r.fn(this)}});e.registerHelper("unless",function(t,r){if(arguments.length!=2){throw new GIt["default"]("#unless requires exactly one argument")}return e.helpers["if"].call(this,t,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};HIt.exports=dZ["default"]});var KIt=y((pZ,zIt)=>{"use strict";pZ.__esModule=true;pZ["default"]=function(e){e.registerHelper("log",function(){var t=[void 0],r=arguments[arguments.length-1];for(var n=0;n<arguments.length-1;n++){t.push(arguments[n])}var i=1;if(r.hash.level!=null){i=r.hash.level}else if(r.data&&r.data.level!=null){i=r.data.level}t[0]=i;e.log.apply(e,t)})};zIt.exports=pZ["default"]});var YIt=y((fZ,WIt)=>{"use strict";fZ.__esModule=true;fZ["default"]=function(e){e.registerHelper("lookup",function(t,r,n){if(!t){return t}return n.lookupProperty(t,r)})};WIt.exports=fZ["default"]});var JIt=y((mZ,XIt)=>{"use strict";mZ.__esModule=true;function t8n(e){return e&&e.__esModule?e:{"default":e}}a(t8n,"_interopRequireDefault");var H7=Nc();var r8n=Gf();var n8n=t8n(r8n);mZ["default"]=function(e){e.registerHelper("with",function(t,r){if(arguments.length!=2){throw new n8n["default"]("#with requires exactly one argument")}if(H7.isFunction(t)){t=t.call(this)}var n=r.fn;if(!H7.isEmpty(t)){var i=r.data;if(r.data&&r.ids){i=H7.createFrame(r.data);i.contextPath=H7.appendContextPath(r.data.contextPath,r.ids[0])}return n(t,{data:i,blockParams:H7.blockParams([t],[i&&i.contextPath])})}else{return r.inverse(this)}})};XIt.exports=mZ["default"]});var aIe=y(hZ=>{"use strict";hZ.__esModule=true;hZ.registerDefaultHelpers=_8n;hZ.moveHelperToHooks=v8n;function xC(e){return e&&e.__esModule?e:{"default":e}}a(xC,"_interopRequireDefault");var i8n=BIt();var s8n=xC(i8n);var a8n=qIt();var o8n=xC(a8n);var u8n=$It();var l8n=xC(u8n);var c8n=VIt();var d8n=xC(c8n);var p8n=KIt();var f8n=xC(p8n);var m8n=YIt();var h8n=xC(m8n);var g8n=JIt();var y8n=xC(g8n);function _8n(e){s8n["default"](e);o8n["default"](e);l8n["default"](e);d8n["default"](e);f8n["default"](e);h8n["default"](e);y8n["default"](e)}a(_8n,"registerDefaultHelpers");function v8n(e,t,r){if(e.helpers[t]){e.hooks[t]=e.helpers[t];if(!r){delete e.helpers[t]}}}a(v8n,"moveHelperToHooks")});var ZIt=y((gZ,QIt)=>{"use strict";gZ.__esModule=true;var E8n=Nc();gZ["default"]=function(e){e.registerDecorator("inline",function(t,r,n,i){var s=t;if(!r.partials){r.partials={};s=a(function(o,u){var l=n.partials;n.partials=E8n.extend({},l,r.partials);var c=t(o,u);n.partials=l;return c},"ret")}r.partials[i.args[0]]=i.fn;return s})};QIt.exports=gZ["default"]});var e3t=y(oIe=>{"use strict";oIe.__esModule=true;oIe.registerDefaultDecorators=C8n;function b8n(e){return e&&e.__esModule?e:{"default":e}}a(b8n,"_interopRequireDefault");var S8n=ZIt();var A8n=b8n(S8n);function C8n(e){A8n["default"](e)}a(C8n,"registerDefaultDecorators")});var uIe=y((yZ,t3t)=>{"use strict";yZ.__esModule=true;var w8n=Nc();var uN={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:a(function e(t){if(typeof t==="string"){var r=w8n.indexOf(uN.methodMap,t.toLowerCase());if(r>=0){t=r}else{t=parseInt(t,10)}}return t},"lookupLevel"),log:a(function e(t){t=uN.lookupLevel(t);if(typeof console!=="undefined"&&uN.lookupLevel(uN.level)<=t){var r=uN.methodMap[t];if(!console[r]){r="log"}for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++){i[s-1]=arguments[s]}console[r].apply(console,i)}},"log")};yZ["default"]=uN;t3t.exports=yZ["default"]});var r3t=y(lIe=>{"use strict";lIe.__esModule=true;lIe.createNewLookupObject=x8n;var T8n=Nc();function x8n(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++){t[r]=arguments[r]}return T8n.extend.apply(void 0,[Object.create(null)].concat(t))}a(x8n,"createNewLookupObject")});var cIe=y(V7=>{"use strict";V7.__esModule=true;V7.createProtoAccessControl=N8n;V7.resultIsAllowed=I8n;V7.resetLoggedProperties=D8n;function R8n(e){if(e&&e.__esModule){return e}else{var t={};if(e!=null){for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]}}t["default"]=e;return t}}a(R8n,"_interopRequireWildcard");var n3t=r3t();var O8n=uIe();var P8n=R8n(O8n);var _Z=Object.create(null);function N8n(e){var t=Object.create(null);t["constructor"]=false;t["__defineGetter__"]=false;t["__defineSetter__"]=false;t["__lookupGetter__"]=false;var r=Object.create(null);r["__proto__"]=false;return{properties:{whitelist:n3t.createNewLookupObject(r,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:n3t.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}a(N8n,"createProtoAccessControl");function I8n(e,t,r){if(typeof e==="function"){return i3t(t.methods,r)}else{return i3t(t.properties,r)}}a(I8n,"resultIsAllowed");function i3t(e,t){if(e.whitelist[t]!==void 0){return e.whitelist[t]===true}if(e.defaultValue!==void 0){return e.defaultValue}k8n(t);return false}a(i3t,"checkWhiteList");function k8n(e){if(_Z[e]!==true){_Z[e]=true;P8n.log("error",'Handlebars: Access has been denied to resolve the property "'+e+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details')}}a(k8n,"logUnexpecedPropertyAccessOnce");function D8n(){Object.keys(_Z).forEach(function(e){delete _Z[e]})}a(D8n,"resetLoggedProperties")});var EZ=y(dg=>{"use strict";dg.__esModule=true;dg.HandlebarsEnvironment=fIe;function s3t(e){return e&&e.__esModule?e:{"default":e}}a(s3t,"_interopRequireDefault");var RC=Nc();var L8n=Gf();var dIe=s3t(L8n);var F8n=aIe();var B8n=e3t();var M8n=uIe();var vZ=s3t(M8n);var q8n=cIe();var U8n="4.7.7";dg.VERSION=U8n;var $8n=8;dg.COMPILER_REVISION=$8n;var j8n=7;dg.LAST_COMPATIBLE_COMPILER_REVISION=j8n;var G8n={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"};dg.REVISION_CHANGES=G8n;var pIe="[object Object]";function fIe(e,t,r){this.helpers=e||{};this.partials=t||{};this.decorators=r||{};F8n.registerDefaultHelpers(this);B8n.registerDefaultDecorators(this)}a(fIe,"HandlebarsEnvironment");fIe.prototype={constructor:fIe,logger:vZ["default"],log:vZ["default"].log,registerHelper:a(function e(t,r){if(RC.toString.call(t)===pIe){if(r){throw new dIe["default"]("Arg not supported with multiple helpers")}RC.extend(this.helpers,t)}else{this.helpers[t]=r}},"registerHelper"),unregisterHelper:a(function e(t){delete this.helpers[t]},"unregisterHelper"),registerPartial:a(function e(t,r){if(RC.toString.call(t)===pIe){RC.extend(this.partials,t)}else{if(typeof r==="undefined"){throw new dIe["default"]('Attempting to register a partial called "'+t+'" as undefined')}this.partials[t]=r}},"registerPartial"),unregisterPartial:a(function e(t){delete this.partials[t]},"unregisterPartial"),registerDecorator:a(function e(t,r){if(RC.toString.call(t)===pIe){if(r){throw new dIe["default"]("Arg not supported with multiple decorators")}RC.extend(this.decorators,t)}else{this.decorators[t]=r}},"registerDecorator"),unregisterDecorator:a(function e(t){delete this.decorators[t]},"unregisterDecorator"),resetLoggedPropertyAccesses:a(function e(){q8n.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var H8n=vZ["default"].log;dg.log=H8n;dg.createFrame=RC.createFrame;dg.logger=vZ["default"]});var o3t=y((bZ,a3t)=>{"use strict";bZ.__esModule=true;function mIe(e){this.string=e}a(mIe,"SafeString");mIe.prototype.toString=mIe.prototype.toHTML=function(){return""+this.string};bZ["default"]=mIe;a3t.exports=bZ["default"]});var u3t=y(hIe=>{"use strict";hIe.__esModule=true;hIe.wrapHelper=V8n;function V8n(e,t){if(typeof e!=="function"){return e}var r=a(function n(){var i=arguments[arguments.length-1];arguments[arguments.length-1]=t(i);return e.apply(this,arguments)},"wrapper");return r}a(V8n,"wrapHelper")});var f3t=y(pb=>{"use strict";pb.__esModule=true;pb.checkRevision=J8n;pb.template=Q8n;pb.wrapProgram=SZ;pb.resolvePartial=Z8n;pb.invokePartial=e9n;pb.noop=d3t;function z8n(e){return e&&e.__esModule?e:{"default":e}}a(z8n,"_interopRequireDefault");function K8n(e){if(e&&e.__esModule){return e}else{var t={};if(e!=null){for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]}}t["default"]=e;return t}}a(K8n,"_interopRequireWildcard");var W8n=Nc();var Dy=K8n(W8n);var Y8n=Gf();var Ly=z8n(Y8n);var Fy=EZ();var l3t=aIe();var X8n=u3t();var c3t=cIe();function J8n(e){var t=e&&e[0]||1,r=Fy.COMPILER_REVISION;if(t>=Fy.LAST_COMPATIBLE_COMPILER_REVISION&&t<=Fy.COMPILER_REVISION){return}if(t<Fy.LAST_COMPATIBLE_COMPILER_REVISION){var n=Fy.REVISION_CHANGES[r],i=Fy.REVISION_CHANGES[t];throw new Ly["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 Ly["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}a(J8n,"checkRevision");function Q8n(e,t){if(!t){throw new Ly["default"]("No environment passed to template")}if(!e||!e.main){throw new Ly["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(o,u,l){if(l.hash){u=Dy.extend({},u,l.hash);if(l.ids){l.ids[0]=true}}o=t.VM.resolvePartial.call(this,o,u,l);var c=Dy.extend({},l,{hooks:this.hooks,protoAccessControl:this.protoAccessControl});var d=t.VM.invokePartial.call(this,o,u,c);if(d==null&&t.compile){l.partials[l.name]=t.compile(o,e.compilerOptions,t);d=l.partials[l.name](u,c)}if(d!=null){if(l.indent){var p=d.split("\n");for(var f=0,m=p.length;f<m;f++){if(!p[f]&&f+1===m){break}p[f]=l.indent+p[f]}d=p.join("\n")}return d}else{throw new Ly["default"]("The partial "+l.name+" could not be compiled when running in runtime-only mode")}}a(n,"invokePartialWrapper");var i={strict:a(function o(u,l,c){if(!u||!(l in u)){throw new Ly["default"]('"'+l+'" not defined in '+u,{loc:c})}return i.lookupProperty(u,l)},"strict"),lookupProperty:a(function o(u,l){var c=u[l];if(c==null){return c}if(Object.prototype.hasOwnProperty.call(u,l)){return c}if(c3t.resultIsAllowed(c,i.protoAccessControl,l)){return c}return void 0},"lookupProperty"),lookup:a(function o(u,l){var c=u.length;for(var d=0;d<c;d++){var p=u[d]&&i.lookupProperty(u[d],l);if(p!=null){return u[d][l]}}},"lookup"),lambda:a(function o(u,l){return typeof u==="function"?u.call(l):u},"lambda"),escapeExpression:Dy.escapeExpression,invokePartial:n,fn:a(function o(u){var l=e[u];l.decorator=e[u+"_d"];return l},"fn"),programs:[],program:a(function o(u,l,c,d,p){var f=this.programs[u],m=this.fn(u);if(l||p||d||c){f=SZ(this,u,m,l,c,d,p)}else if(!f){f=this.programs[u]=SZ(this,u,m)}return f},"program"),data:a(function o(u,l){while(u&&l--){u=u._parent}return u},"data"),mergeIfNeeded:a(function o(u,l){var c=u||l;if(u&&l&&u!==l){c=Dy.extend({},l,u)}return c},"mergeIfNeeded"),nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function s(o){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];var l=u.data;s._setup(u);if(!u.partial&&e.useData){l=t9n(o,l)}var c=void 0,d=e.useBlockParams?[]:void 0;if(e.useDepths){if(u.depths){c=o!=u.depths[0]?[o].concat(u.depths):u.depths}else{c=[o]}}function p(f){return""+e.main(i,f,i.helpers,i.partials,l,d,c)}a(p,"main");p=p3t(e.main,p,i,u.depths||[],l,d);return p(o,u)}a(s,"ret");s.isTop=true;s._setup=function(o){if(!o.partial){var u=Dy.extend({},t.helpers,o.helpers);r9n(u,i);i.helpers=u;if(e.usePartial){i.partials=i.mergeIfNeeded(o.partials,t.partials)}if(e.usePartial||e.useDecorators){i.decorators=Dy.extend({},t.decorators,o.decorators)}i.hooks={};i.protoAccessControl=c3t.createProtoAccessControl(o);var l=o.allowCallsToHelperMissing||r;l3t.moveHelperToHooks(i,"helperMissing",l);l3t.moveHelperToHooks(i,"blockHelperMissing",l)}else{i.protoAccessControl=o.protoAccessControl;i.helpers=o.helpers;i.partials=o.partials;i.decorators=o.decorators;i.hooks=o.hooks}};s._child=function(o,u,l,c){if(e.useBlockParams&&!l){throw new Ly["default"]("must pass block params")}if(e.useDepths&&!c){throw new Ly["default"]("must pass parent depths")}return SZ(i,o,e[o],u,0,l,c)};return s}a(Q8n,"template");function SZ(e,t,r,n,i,s,o){function u(l){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];var d=o;if(o&&l!=o[0]&&!(l===e.nullContext&&o[0]===null)){d=[l].concat(o)}return r(e,l,e.helpers,e.partials,c.data||n,s&&[c.blockParams].concat(s),d)}a(u,"prog");u=p3t(r,u,e,o,n,s);u.program=t;u.depth=o?o.length:0;u.blockParams=i||0;return u}a(SZ,"wrapProgram");function Z8n(e,t,r){if(!e){if(r.name==="@partial-block"){e=r.data["partial-block"]}else{e=r.partials[r.name]}}else if(!e.call&&!r.name){r.name=e;e=r.partials[e]}return e}a(Z8n,"resolvePartial");function e9n(e,t,r){var n=r.data&&r.data["partial-block"];r.partial=true;if(r.ids){r.data.contextPath=r.ids[0]||r.data.contextPath}var i=void 0;if(r.fn&&r.fn!==d3t){(function(){r.data=Fy.createFrame(r.data);var s=r.fn;i=r.data["partial-block"]=a(function o(u){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];l.data=Fy.createFrame(l.data);l.data["partial-block"]=n;return s(u,l)},"partialBlockWrapper");if(s.partials){r.partials=Dy.extend({},r.partials,s.partials)}})()}if(e===void 0&&i){e=i}if(e===void 0){throw new Ly["default"]("The partial "+r.name+" could not be found")}else if(e instanceof Function){return e(t,r)}}a(e9n,"invokePartial");function d3t(){return""}a(d3t,"noop");function t9n(e,t){if(!t||!("root"in t)){t=t?Fy.createFrame(t):{};t.root=e}return t}a(t9n,"initData");function p3t(e,t,r,n,i,s){if(e.decorator){var o={};t=e.decorator(t,o,r,n&&n[0],i,s,n);Dy.extend(t,o)}return t}a(p3t,"executeDecorators");function r9n(e,t){Object.keys(e).forEach(function(r){var n=e[r];e[r]=n9n(n,t)})}a(r9n,"wrapHelpersToPassLookupProperty");function n9n(e,t){var r=t.lookupProperty;return X8n.wrapHelper(e,function(n){return Dy.extend({lookupProperty:r},n)})}a(n9n,"passLookupPropertyOption")});var gIe=y((AZ,m3t)=>{"use strict";AZ.__esModule=true;AZ["default"]=function(e){var t=typeof global!=="undefined"?global:window,r=t.Handlebars;e.noConflict=function(){if(t.Handlebars===e){t.Handlebars=r}return e}};m3t.exports=AZ["default"]});var v3t=y((CZ,_3t)=>{"use strict";CZ.__esModule=true;function _Ie(e){return e&&e.__esModule?e:{"default":e}}a(_Ie,"_interopRequireDefault");function vIe(e){if(e&&e.__esModule){return e}else{var t={};if(e!=null){for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]}}t["default"]=e;return t}}a(vIe,"_interopRequireWildcard");var i9n=EZ();var h3t=vIe(i9n);var s9n=o3t();var a9n=_Ie(s9n);var o9n=Gf();var u9n=_Ie(o9n);var l9n=Nc();var yIe=vIe(l9n);var c9n=f3t();var g3t=vIe(c9n);var d9n=gIe();var p9n=_Ie(d9n);function y3t(){var e=new h3t.HandlebarsEnvironment;yIe.extend(e,h3t);e.SafeString=a9n["default"];e.Exception=u9n["default"];e.Utils=yIe;e.escapeExpression=yIe.escapeExpression;e.VM=g3t;e.template=function(t){return g3t.template(t,e)};return e}a(y3t,"create");var z7=y3t();z7.create=y3t;p9n["default"](z7);z7["default"]=z7;CZ["default"]=z7;_3t.exports=CZ["default"]});var EIe=y((wZ,b3t)=>{"use strict";wZ.__esModule=true;var E3t={helpers:{helperExpression:a(function e(t){return t.type==="SubExpression"||(t.type==="MustacheStatement"||t.type==="BlockStatement")&&!!(t.params&&t.params.length||t.hash)},"helperExpression"),scopedId:a(function e(t){return/^\.|this\b/.test(t.original)},"scopedId"),simpleId:a(function e(t){return t.parts.length===1&&!E3t.helpers.scopedId(t)&&!t.depth},"simpleId")}};wZ["default"]=E3t;b3t.exports=wZ["default"]});var A3t=y((TZ,S3t)=>{"use strict";TZ.__esModule=true;var f9n=function(){var e={trace:a(function n(){},"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:a(function n(i,s,o,u,l,c,d){var p=c.length-1;switch(l){case 1:return c[p-1];break;case 2:this.$=u.prepareProgram(c[p]);break;case 3:this.$=c[p];break;case 4:this.$=c[p];break;case 5:this.$=c[p];break;case 6:this.$=c[p];break;case 7:this.$=c[p];break;case 8:this.$=c[p];break;case 9:this.$={type:"CommentStatement",value:u.stripComment(c[p]),strip:u.stripFlags(c[p],c[p]),loc:u.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:c[p],value:c[p],loc:u.locInfo(this._$)};break;case 11:this.$=u.prepareRawBlock(c[p-2],c[p-1],c[p],this._$);break;case 12:this.$={path:c[p-3],params:c[p-2],hash:c[p-1]};break;case 13:this.$=u.prepareBlock(c[p-3],c[p-2],c[p-1],c[p],false,this._$);break;case 14:this.$=u.prepareBlock(c[p-3],c[p-2],c[p-1],c[p],true,this._$);break;case 15:this.$={open:c[p-5],path:c[p-4],params:c[p-3],hash:c[p-2],blockParams:c[p-1],strip:u.stripFlags(c[p-5],c[p])};break;case 16:this.$={path:c[p-4],params:c[p-3],hash:c[p-2],blockParams:c[p-1],strip:u.stripFlags(c[p-5],c[p])};break;case 17:this.$={path:c[p-4],params:c[p-3],hash:c[p-2],blockParams:c[p-1],strip:u.stripFlags(c[p-5],c[p])};break;case 18:this.$={strip:u.stripFlags(c[p-1],c[p-1]),program:c[p]};break;case 19:var f=u.prepareBlock(c[p-2],c[p-1],c[p],c[p],false,this._$),m=u.prepareProgram([f],c[p-1].loc);m.chained=true;this.$={strip:c[p-2].strip,program:m,chain:true};break;case 20:this.$=c[p];break;case 21:this.$={path:c[p-1],strip:u.stripFlags(c[p-2],c[p])};break;case 22:this.$=u.prepareMustache(c[p-3],c[p-2],c[p-1],c[p-4],u.stripFlags(c[p-4],c[p]),this._$);break;case 23:this.$=u.prepareMustache(c[p-3],c[p-2],c[p-1],c[p-4],u.stripFlags(c[p-4],c[p]),this._$);break;case 24:this.$={type:"PartialStatement",name:c[p-3],params:c[p-2],hash:c[p-1],indent:"",strip:u.stripFlags(c[p-4],c[p]),loc:u.locInfo(this._$)};break;case 25:this.$=u.preparePartialBlock(c[p-2],c[p-1],c[p],this._$);break;case 26:this.$={path:c[p-3],params:c[p-2],hash:c[p-1],strip:u.stripFlags(c[p-4],c[p])};break;case 27:this.$=c[p];break;case 28:this.$=c[p];break;case 29:this.$={type:"SubExpression",path:c[p-3],params:c[p-2],hash:c[p-1],loc:u.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:c[p],loc:u.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:u.id(c[p-2]),value:c[p],loc:u.locInfo(this._$)};break;case 32:this.$=u.id(c[p-1]);break;case 33:this.$=c[p];break;case 34:this.$=c[p];break;case 35:this.$={type:"StringLiteral",value:c[p],original:c[p],loc:u.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(c[p]),original:Number(c[p]),loc:u.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:c[p]==="true",original:c[p]==="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.$=c[p];break;case 41:this.$=c[p];break;case 42:this.$=u.preparePath(true,c[p],this._$);break;case 43:this.$=u.preparePath(false,c[p],this._$);break;case 44:c[p-2].push({part:u.id(c[p]),original:c[p],separator:c[p-1]});this.$=c[p-2];break;case 45:this.$=[{part:u.id(c[p]),original:c[p]}];break;case 46:this.$=[];break;case 47:c[p-1].push(c[p]);break;case 48:this.$=[];break;case 49:c[p-1].push(c[p]);break;case 50:this.$=[];break;case 51:c[p-1].push(c[p]);break;case 58:this.$=[];break;case 59:c[p-1].push(c[p]);break;case 64:this.$=[];break;case 65:c[p-1].push(c[p]);break;case 70:this.$=[];break;case 71:c[p-1].push(c[p]);break;case 78:this.$=[];break;case 79:c[p-1].push(c[p]);break;case 82:this.$=[];break;case 83:c[p-1].push(c[p]);break;case 86:this.$=[];break;case 87:c[p-1].push(c[p]);break;case 90:this.$=[];break;case 91:c[p-1].push(c[p]);break;case 94:this.$=[];break;case 95:c[p-1].push(c[p]);break;case 98:this.$=[c[p]];break;case 99:c[p-1].push(c[p]);break;case 100:this.$=[c[p]];break;case 101:c[p-1].push(c[p]);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:a(function n(i,s){throw new Error(i)},"parseError"),parse:a(function n(i){var s=this,o=[0],u=[null],l=[],c=this.table,d="",p=0,f=0,m=0,h=2,g=1;this.lexer.setInput(i);this.lexer.yy=this.yy;this.yy.lexer=this.lexer;this.yy.parser=this;if(typeof this.lexer.yylloc=="undefined")this.lexer.yylloc={};var _=this.lexer.yylloc;l.push(_);var v=this.lexer.options&&this.lexer.options.ranges;if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;function S(me){o.length=o.length-2*me;u.length=u.length-me;l.length=l.length-me}a(S,"popStack");function E(){var me;me=s.lexer.lex()||1;if(typeof me!=="number"){me=s.symbols_[me]||me}return me}a(E,"lex");var b,A,C,T,O,P,R={},I,D,U,te;while(true){C=o[o.length-1];if(this.defaultActions[C]){T=this.defaultActions[C]}else{if(b===null||typeof b=="undefined"){b=E()}T=c[C]&&c[C][b]}if(typeof T==="undefined"||!T.length||!T[0]){var ve="";if(!m){te=[];for(I in c[C])if(this.terminals_[I]&&I>2){te.push("'"+this.terminals_[I]+"'")}if(this.lexer.showPosition){ve="Parse error on line "+(p+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+te.join(", ")+", got '"+(this.terminals_[b]||b)+"'"}else{ve="Parse error on line "+(p+1)+": Unexpected "+(b==1?"end of input":"'"+(this.terminals_[b]||b)+"'")}this.parseError(ve,{text:this.lexer.match,token:this.terminals_[b]||b,line:this.lexer.yylineno,loc:_,expected:te})}}if(T[0]instanceof Array&&T.length>1){throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+b)}switch(T[0]){case 1:o.push(b);u.push(this.lexer.yytext);l.push(this.lexer.yylloc);o.push(T[1]);b=null;if(!A){f=this.lexer.yyleng;d=this.lexer.yytext;p=this.lexer.yylineno;_=this.lexer.yylloc;if(m>0)m--}else{b=A;A=null}break;case 2:D=this.productions_[T[1]][1];R.$=u[u.length-D];R._$={first_line:l[l.length-(D||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(D||1)].first_column,last_column:l[l.length-1].last_column};if(v){R._$.range=[l[l.length-(D||1)].range[0],l[l.length-1].range[1]]}P=this.performAction.call(R,d,f,p,this.yy,T[1],u,l);if(typeof P!=="undefined"){return P}if(D){o=o.slice(0,-1*D*2);u=u.slice(0,-1*D);l=l.slice(0,-1*D)}o.push(this.productions_[T[1]][0]);u.push(R.$);l.push(R._$);U=c[o[o.length-2]][o[o.length-1]];o.push(U);break;case 3:return true}}return true},"parse")};var t=function(){var n={EOF:1,parseError:a(function i(s,o){if(this.yy.parser){this.yy.parser.parseError(s,o)}else{throw new Error(s)}},"parseError"),setInput:a(function i(s){this._input=s;this._more=this._less=this.done=false;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};if(this.options.ranges)this.yylloc.range=[0,0];this.offset=0;return this},"setInput"),input:a(function i(){var s=this._input[0];this.yytext+=s;this.yyleng++;this.offset++;this.match+=s;this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);if(o){this.yylineno++;this.yylloc.last_line++}else{this.yylloc.last_column++}if(this.options.ranges)this.yylloc.range[1]++;this._input=this._input.slice(1);return s},"input"),unput:a(function i(s){var o=s.length;var u=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input;this.yytext=this.yytext.substr(0,this.yytext.length-o-1);this.offset-=o;var l=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);if(u.length-1)this.yylineno-=u.length-1;var c=this.yylloc.range;this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===l.length?this.yylloc.first_column:0)+l[l.length-u.length].length-u[0].length:this.yylloc.first_column-o};if(this.options.ranges){this.yylloc.range=[c[0],c[0]+this.yyleng-o]}return this},"unput"),more:a(function i(){this._more=true;return this},"more"),less:a(function i(s){this.unput(this.match.slice(s))},"less"),pastInput:a(function i(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function i(){var s=this.match;if(s.length<20){s+=this._input.substr(0,20-s.length)}return(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function i(){var s=this.pastInput();var o=new Array(s.length+1).join("-");return s+this.upcomingInput()+"\n"+o+"^"},"showPosition"),next:a(function i(){if(this.done){return this.EOF}if(!this._input)this.done=true;var s,o,u,l,c,d;if(!this._more){this.yytext="";this.match=""}var p=this._currentRules();for(var f=0;f<p.length;f++){u=this._input.match(this.rules[p[f]]);if(u&&(!o||u[0].length>o[0].length)){o=u;l=f;if(!this.options.flex)break}}if(o){d=o[0].match(/(?:\r\n?|\n).*/g);if(d)this.yylineno+=d.length;this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length};this.yytext+=o[0];this.match+=o[0];this.matches=o;this.yyleng=this.yytext.length;if(this.options.ranges){this.yylloc.range=[this.offset,this.offset+=this.yyleng]}this._more=false;this._input=this._input.slice(o[0].length);this.matched+=o[0];s=this.performAction.call(this,this.yy,this,p[l],this.conditionStack[this.conditionStack.length-1]);if(this.done&&this._input)this.done=false;if(s)return s;else return}if(this._input===""){return this.EOF}else{return this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}},"next"),lex:a(function i(){var s=this.next();if(typeof s!=="undefined"){return s}else{return this.lex()}},"lex"),begin:a(function i(s){this.conditionStack.push(s)},"begin"),popState:a(function i(){return this.conditionStack.pop()},"popState"),_currentRules:a(function i(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},"_currentRules"),topState:a(function i(){return this.conditionStack[this.conditionStack.length-2]},"topState"),pushState:a(function i(s){this.begin(s)},"begin")};n.options={};n.performAction=a(function i(s,o,u,l){function c(p,f){return o.yytext=o.yytext.substring(p,o.yyleng-f+p)}a(c,"strip");var d=l;switch(u){case 0:if(o.yytext.slice(-2)==="\\\\"){c(0,1);this.begin("mu")}else if(o.yytext.slice(-1)==="\\"){c(0,1);this.begin("emu")}else{this.begin("mu")}if(o.yytext)return 15;break;case 1:return 15;break;case 2:this.popState();return 15;break;case 3:this.begin("raw");return 15;break;case 4:this.popState();if(this.conditionStack[this.conditionStack.length-1]==="raw"){return 15}else{c(5,9);return"END_RAW_BLOCK"}break;case 5:return 15;break;case 6:this.popState();return 14;break;case 7:return 65;break;case 8:return 68;break;case 9:return 19;break;case 10:this.popState();this.begin("raw");return 23;break;case 11:return 55;break;case 12:return 60;break;case 13:return 29;break;case 14:return 47;break;case 15:this.popState();return 44;break;case 16:this.popState();return 44;break;case 17:return 34;break;case 18:return 39;break;case 19:return 51;break;case 20:return 48;break;case 21:this.unput(o.yytext);this.popState();this.begin("com");break;case 22:this.popState();return 14;break;case 23:return 48;break;case 24:return 73;break;case 25:return 72;break;case 26:return 72;break;case 27:return 87;break;case 28:break;case 29:this.popState();return 54;break;case 30:this.popState();return 33;break;case 31:o.yytext=c(1,2).replace(/\\"/g,'"');return 80;break;case 32:o.yytext=c(1,2).replace(/\\'/g,"'");return 80;break;case 33:return 85;break;case 34:return 82;break;case 35:return 82;break;case 36:return 83;break;case 37:return 84;break;case 38:return 81;break;case 39:return 75;break;case 40:return 77;break;case 41:return 72;break;case 42:o.yytext=o.yytext.replace(/\\([\\\]])/g,"$1");return 72;break;case 43:return"INVALID";break;case 44:return 5;break}},"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":false},"emu":{"rules":[2],"inclusive":false},"com":{"rules":[6],"inclusive":false},"raw":{"rules":[3,4,5],"inclusive":false},"INITIAL":{"rules":[0,1,44],"inclusive":true}};return n}();e.lexer=t;function r(){this.yy={}}a(r,"Parser");r.prototype=e;e.Parser=r;return new r}();TZ["default"]=f9n;S3t.exports=TZ["default"]});var PZ=y((OZ,T3t)=>{"use strict";OZ.__esModule=true;function m9n(e){return e&&e.__esModule?e:{"default":e}}a(m9n,"_interopRequireDefault");var h9n=Gf();var bIe=m9n(h9n);function xZ(){this.parents=[]}a(xZ,"Visitor");xZ.prototype={constructor:xZ,mutating:false,acceptKey:a(function e(t,r){var n=this.accept(t[r]);if(this.mutating){if(n&&!xZ.prototype[n.type]){throw new bIe["default"]('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+t.type)}t[r]=n}},"acceptKey"),acceptRequired:a(function e(t,r){this.acceptKey(t,r);if(!t[r]){throw new bIe["default"](t.type+" requires "+r)}},"acceptRequired"),acceptArray:a(function e(t){for(var r=0,n=t.length;r<n;r++){this.acceptKey(t,r);if(!t[r]){t.splice(r,1);r--;n--}}},"acceptArray"),accept:a(function e(t){if(!t){return}if(!this[t.type]){throw new bIe["default"]("Unknown type: "+t.type,t)}if(this.current){this.parents.unshift(this.current)}this.current=t;var r=this[t.type](t);this.current=this.parents.shift();if(!this.mutating||r){return r}else if(r!==false){return t}},"accept"),Program:a(function e(t){this.acceptArray(t.body)},"Program"),MustacheStatement:RZ,Decorator:RZ,BlockStatement:C3t,DecoratorBlock:C3t,PartialStatement:w3t,PartialBlockStatement:a(function e(t){w3t.call(this,t);this.acceptKey(t,"program")},"PartialBlockStatement"),ContentStatement:a(function e(){},"ContentStatement"),CommentStatement:a(function e(){},"CommentStatement"),SubExpression:RZ,PathExpression:a(function e(){},"PathExpression"),StringLiteral:a(function e(){},"StringLiteral"),NumberLiteral:a(function e(){},"NumberLiteral"),BooleanLiteral:a(function e(){},"BooleanLiteral"),UndefinedLiteral:a(function e(){},"UndefinedLiteral"),NullLiteral:a(function e(){},"NullLiteral"),Hash:a(function e(t){this.acceptArray(t.pairs)},"Hash"),HashPair:a(function e(t){this.acceptRequired(t,"value")},"HashPair")};function RZ(e){this.acceptRequired(e,"path");this.acceptArray(e.params);this.acceptKey(e,"hash")}a(RZ,"visitSubExpression");function C3t(e){RZ.call(this,e);this.acceptKey(e,"program");this.acceptKey(e,"inverse")}a(C3t,"visitBlock");function w3t(e){this.acceptRequired(e,"name");this.acceptArray(e.params);this.acceptKey(e,"hash")}a(w3t,"visitPartial");OZ["default"]=xZ;T3t.exports=OZ["default"]});var R3t=y((NZ,x3t)=>{"use strict";NZ.__esModule=true;function g9n(e){return e&&e.__esModule?e:{"default":e}}a(g9n,"_interopRequireDefault");var y9n=PZ();var _9n=g9n(y9n);function pg(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}a(pg,"WhitespaceControl");pg.prototype=new _9n["default"];pg.prototype.Program=function(e){var t=!this.options.ignoreStandalone;var r=!this.isRootSeen;this.isRootSeen=true;var n=e.body;for(var i=0,s=n.length;i<s;i++){var o=n[i],u=this.accept(o);if(!u){continue}var l=SIe(n,i,r),c=AIe(n,i,r),d=u.openStandalone&&l,p=u.closeStandalone&&c,f=u.inlineStandalone&&l&&c;if(u.close){OC(n,i,true)}if(u.open){fb(n,i,true)}if(t&&f){OC(n,i);if(fb(n,i)){if(o.type==="PartialStatement"){o.indent=/([ \t]+$)/.exec(n[i-1].original)[1]}}}if(t&&d){OC((o.program||o.inverse).body);fb(n,i)}if(t&&p){OC(n,i);fb((o.inverse||o.program).body)}}return e};pg.prototype.BlockStatement=pg.prototype.DecoratorBlock=pg.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){n=r.body[0].program;while(i.chained){i=i.body[i.body.length-1].program}}var s={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:AIe(t.body),closeStandalone:SIe((n||t).body)};if(e.openStrip.close){OC(t.body,null,true)}if(r){var o=e.inverseStrip;if(o.open){fb(t.body,null,true)}if(o.close){OC(n.body,null,true)}if(e.closeStrip.open){fb(i.body,null,true)}if(!this.options.ignoreStandalone&&SIe(t.body)&&AIe(n.body)){fb(t.body);OC(n.body)}}else if(e.closeStrip.open){fb(t.body,null,true)}return s};pg.prototype.Decorator=pg.prototype.MustacheStatement=function(e){return e.strip};pg.prototype.PartialStatement=pg.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:true,open:t.open,close:t.close}};function SIe(e,t,r){if(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)}}a(SIe,"isPrevWhitespace");function AIe(e,t,r){if(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)}}a(AIe,"isNextWhitespace");function OC(e,t,r){var n=e[t==null?0:t+1];if(!n||n.type!=="ContentStatement"||!r&&n.rightStripped){return}var i=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,"");n.rightStripped=n.value!==i}a(OC,"omitRight");function fb(e,t,r){var n=e[t==null?e.length-1:t-1];if(!n||n.type!=="ContentStatement"||!r&&n.leftStripped){return}var i=n.value;n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,"");n.leftStripped=n.value!==i;return n.leftStripped}a(fb,"omitLeft");NZ["default"]=pg;x3t.exports=NZ["default"]});var O3t=y(Hf=>{"use strict";Hf.__esModule=true;Hf.SourceLocation=b9n;Hf.id=S9n;Hf.stripFlags=A9n;Hf.stripComment=C9n;Hf.preparePath=w9n;Hf.prepareMustache=T9n;Hf.prepareRawBlock=x9n;Hf.prepareBlock=R9n;Hf.prepareProgram=O9n;Hf.preparePartialBlock=P9n;function v9n(e){return e&&e.__esModule?e:{"default":e}}a(v9n,"_interopRequireDefault");var E9n=Gf();var CIe=v9n(E9n);function wIe(e,t){t=t.path?t.path.original:t;if(e.path.original!==t){var r={loc:e.path.loc};throw new CIe["default"](e.path.original+" doesn't match "+t,r)}}a(wIe,"validateClose");function b9n(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}}a(b9n,"SourceLocation");function S9n(e){if(/^\[.*\]$/.test(e)){return e.substring(1,e.length-1)}else{return e}}a(S9n,"id");function A9n(e,t){return{open:e.charAt(2)==="~",close:t.charAt(t.length-3)==="~"}}a(A9n,"stripFlags");function C9n(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}a(C9n,"stripComment");function w9n(e,t,r){r=this.locInfo(r);var n=e?"@":"",i=[],s=0;for(var o=0,u=t.length;o<u;o++){var l=t[o].part,c=t[o].original!==l;n+=(t[o].separator||"")+l;if(!c&&(l===".."||l==="."||l==="this")){if(i.length>0){throw new CIe["default"]("Invalid path: "+n,{loc:r})}else if(l===".."){s++}}else{i.push(l)}}return{type:"PathExpression",data:e,depth:s,parts:i,original:n,loc:r}}a(w9n,"preparePath");function T9n(e,t,r,n,i,s){var o=n.charAt(3)||n.charAt(2),u=o!=="{"&&o!=="&";var l=/\*/.test(n);return{type:l?"Decorator":"MustacheStatement",path:e,params:t,hash:r,escaped:u,strip:i,loc:this.locInfo(s)}}a(T9n,"prepareMustache");function x9n(e,t,r,n){wIe(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}}a(x9n,"prepareRawBlock");function R9n(e,t,r,n,i,s){if(n&&n.path){wIe(e,n)}var o=/\*/.test(e.open);t.blockParams=e.blockParams;var u=void 0,l=void 0;if(r){if(o){throw new CIe["default"]("Unexpected inverse block on decorator",r)}if(r.chain){r.program.body[0].closeStrip=n.strip}l=r.strip;u=r.program}if(i){i=u;u=t;t=i}return{type:o?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:u,openStrip:e.strip,inverseStrip:l,closeStrip:n&&n.strip,loc:this.locInfo(s)}}a(R9n,"prepareBlock");function O9n(e,t){if(!t&&e.length){var r=e[0].loc,n=e[e.length-1].loc;if(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}}a(O9n,"prepareProgram");function P9n(e,t,r,n){wIe(e,r);return{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}a(P9n,"preparePartialBlock")});var I3t=y(K7=>{"use strict";K7.__esModule=true;K7.parseWithoutProcessing=N3t;K7.parse=M9n;function N9n(e){if(e&&e.__esModule){return e}else{var t={};if(e!=null){for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]}}t["default"]=e;return t}}a(N9n,"_interopRequireWildcard");function P3t(e){return e&&e.__esModule?e:{"default":e}}a(P3t,"_interopRequireDefault");var I9n=A3t();var TIe=P3t(I9n);var k9n=R3t();var D9n=P3t(k9n);var L9n=O3t();var F9n=N9n(L9n);var B9n=Nc();K7.parser=TIe["default"];var IZ={};B9n.extend(IZ,F9n);function N3t(e,t){if(e.type==="Program"){return e}TIe["default"].yy=IZ;IZ.locInfo=function(n){return new IZ.SourceLocation(t&&t.srcName,n)};var r=TIe["default"].parse(e);return r}a(N3t,"parseWithoutProcessing");function M9n(e,t){var r=N3t(e,t);var n=new D9n["default"](t);return n.accept(r)}a(M9n,"parse")});var F3t=y(J7=>{"use strict";J7.__esModule=true;J7.Compiler=xIe;J7.precompile=j9n;J7.compile=G9n;function D3t(e){return e&&e.__esModule?e:{"default":e}}a(D3t,"_interopRequireDefault");var q9n=Gf();var Y7=D3t(q9n);var X7=Nc();var U9n=EIe();var W7=D3t(U9n);var $9n=[].slice;function xIe(){}a(xIe,"Compiler");xIe.prototype={compiler:xIe,equals:a(function e(t){var r=this.opcodes.length;if(t.opcodes.length!==r){return false}for(var n=0;n<r;n++){var i=this.opcodes[n],s=t.opcodes[n];if(i.opcode!==s.opcode||!L3t(i.args,s.args)){return false}}r=this.children.length;for(var n=0;n<r;n++){if(!this.children[n].equals(t.children[n])){return false}}return true},"equals"),guid:0,compile:a(function e(t,r){this.sourceNode=[];this.opcodes=[];this.children=[];this.options=r;this.stringParams=r.stringParams;this.trackIds=r.trackIds;r.blockParams=r.blockParams||[];r.knownHelpers=X7.extend(Object.create(null),{helperMissing:true,blockHelperMissing:true,each:true,"if":true,unless:true,"with":true,log:true,lookup:true},r.knownHelpers);return this.accept(t)},"compile"),compileProgram:a(function e(t){var r=new this.compiler,n=r.compile(t,this.options),i=this.guid++;this.usePartial=this.usePartial||n.usePartial;this.children[i]=n;this.useDepths=this.useDepths||n.useDepths;return i},"compileProgram"),accept:a(function e(t){if(!this[t.type]){throw new Y7["default"]("Unknown type: "+t.type,t)}this.sourceNode.unshift(t);var r=this[t.type](t);this.sourceNode.shift();return r},"accept"),Program:a(function e(t){this.options.blockParams.unshift(t.blockParams);var r=t.body,n=r.length;for(var i=0;i<n;i++){this.accept(r[i])}this.options.blockParams.shift();this.isSimple=n===1;this.blockParams=t.blockParams?t.blockParams.length:0;return this},"Program"),BlockStatement:a(function e(t){k3t(t);var r=t.program,n=t.inverse;r=r&&this.compileProgram(r);n=n&&this.compileProgram(n);var i=this.classifySexpr(t);if(i==="helper"){this.helperSexpr(t,r,n)}else if(i==="simple"){this.simpleSexpr(t);this.opcode("pushProgram",r);this.opcode("pushProgram",n);this.opcode("emptyHash");this.opcode("blockValue",t.path.original)}else{this.ambiguousSexpr(t,r,n);this.opcode("pushProgram",r);this.opcode("pushProgram",n);this.opcode("emptyHash");this.opcode("ambiguousBlockValue")}this.opcode("append")},"BlockStatement"),DecoratorBlock:a(function e(t){var r=t.program&&this.compileProgram(t.program);var n=this.setupFullMustacheParams(t,r,void 0),i=t.path;this.useDecorators=true;this.opcode("registerDecorator",n.length,i.original)},"DecoratorBlock"),PartialStatement:a(function e(t){this.usePartial=true;var r=t.program;if(r){r=this.compileProgram(t.program)}var n=t.params;if(n.length>1){throw new Y7["default"]("Unsupported number of partial arguments: "+n.length,t)}else if(!n.length){if(this.options.explicitPartialContext){this.opcode("pushLiteral","undefined")}else{n.push({type:"PathExpression",parts:[],depth:0})}}var i=t.name.original,s=t.name.type==="SubExpression";if(s){this.accept(t.name)}this.setupFullMustacheParams(t,r,void 0,true);var o=t.indent||"";if(this.options.preventIndent&&o){this.opcode("appendContent",o);o=""}this.opcode("invokePartial",s,i,o);this.opcode("append")},"PartialStatement"),PartialBlockStatement:a(function e(t){this.PartialStatement(t)},"PartialBlockStatement"),MustacheStatement:a(function e(t){this.SubExpression(t);if(t.escaped&&!this.options.noEscape){this.opcode("appendEscaped")}else{this.opcode("append")}},"MustacheStatement"),Decorator:a(function e(t){this.DecoratorBlock(t)},"Decorator"),ContentStatement:a(function e(t){if(t.value){this.opcode("appendContent",t.value)}},"ContentStatement"),CommentStatement:a(function e(){},"CommentStatement"),SubExpression:a(function e(t){k3t(t);var r=this.classifySexpr(t);if(r==="simple"){this.simpleSexpr(t)}else if(r==="helper"){this.helperSexpr(t)}else{this.ambiguousSexpr(t)}},"SubExpression"),ambiguousSexpr:a(function e(t,r,n){var i=t.path,s=i.parts[0],o=r!=null||n!=null;this.opcode("getContext",i.depth);this.opcode("pushProgram",r);this.opcode("pushProgram",n);i.strict=true;this.accept(i);this.opcode("invokeAmbiguous",s,o)},"ambiguousSexpr"),simpleSexpr:a(function e(t){var r=t.path;r.strict=true;this.accept(r);this.opcode("resolvePossibleLambda")},"simpleSexpr"),helperSexpr:a(function e(t,r,n){var i=this.setupFullMustacheParams(t,r,n),s=t.path,o=s.parts[0];if(this.options.knownHelpers[o]){this.opcode("invokeKnownHelper",i.length,o)}else if(this.options.knownHelpersOnly){throw new Y7["default"]("You specified knownHelpersOnly, but used the unknown helper "+o,t)}else{s.strict=true;s.falsy=true;this.accept(s);this.opcode("invokeHelper",i.length,s.original,W7["default"].helpers.simpleId(s))}},"helperSexpr"),PathExpression:a(function e(t){this.addDepth(t.depth);this.opcode("getContext",t.depth);var r=t.parts[0],n=W7["default"].helpers.scopedId(t),i=!t.depth&&!n&&this.blockParamIndex(r);if(i){this.opcode("lookupBlockParam",i,t.parts)}else if(!r){this.opcode("pushContext")}else if(t.data){this.options.data=true;this.opcode("lookupData",t.depth,t.parts,t.strict)}else{this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,n)}},"PathExpression"),StringLiteral:a(function e(t){this.opcode("pushString",t.value)},"StringLiteral"),NumberLiteral:a(function e(t){this.opcode("pushLiteral",t.value)},"NumberLiteral"),BooleanLiteral:a(function e(t){this.opcode("pushLiteral",t.value)},"BooleanLiteral"),UndefinedLiteral:a(function e(){this.opcode("pushLiteral","undefined")},"UndefinedLiteral"),NullLiteral:a(function e(){this.opcode("pushLiteral","null")},"NullLiteral"),Hash:a(function e(t){var r=t.pairs,n=0,i=r.length;this.opcode("pushHash");for(;n<i;n++){this.pushParam(r[n].value)}while(n--){this.opcode("assignToHash",r[n].key)}this.opcode("popHash")},"Hash"),opcode:a(function e(t){this.opcodes.push({opcode:t,args:$9n.call(arguments,1),loc:this.sourceNode[0].loc})},"opcode"),addDepth:a(function e(t){if(!t){return}this.useDepths=true},"addDepth"),classifySexpr:a(function e(t){var r=W7["default"].helpers.simpleId(t.path);var n=r&&!!this.blockParamIndex(t.path.parts[0]);var i=!n&&W7["default"].helpers.helperExpression(t);var s=!n&&(i||r);if(s&&!i){var o=t.path.parts[0],u=this.options;if(u.knownHelpers[o]){i=true}else if(u.knownHelpersOnly){s=false}}if(i){return"helper"}else if(s){return"ambiguous"}else{return"simple"}},"classifySexpr"),pushParams:a(function e(t){for(var r=0,n=t.length;r<n;r++){this.pushParam(t[r])}},"pushParams"),pushParam:a(function e(t){var r=t.value!=null?t.value:t.original||"";if(this.stringParams){if(r.replace){r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")}if(t.depth){this.addDepth(t.depth)}this.opcode("getContext",t.depth||0);this.opcode("pushStringParam",r,t.type);if(t.type==="SubExpression"){this.accept(t)}}else{if(this.trackIds){var n=void 0;if(t.parts&&!W7["default"].helpers.scopedId(t)&&!t.depth){n=this.blockParamIndex(t.parts[0])}if(n){var i=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else{r=t.original||r;if(r.replace){r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")}this.opcode("pushId",t.type,r)}}this.accept(t)}},"pushParam"),setupFullMustacheParams:a(function e(t,r,n,i){var s=t.params;this.pushParams(s);this.opcode("pushProgram",r);this.opcode("pushProgram",n);if(t.hash){this.accept(t.hash)}else{this.opcode("emptyHash",i)}return s},"setupFullMustacheParams"),blockParamIndex:a(function e(t){for(var r=0,n=this.options.blockParams.length;r<n;r++){var i=this.options.blockParams[r],s=i&&X7.indexOf(i,t);if(i&&s>=0){return[r,s]}}},"blockParamIndex")};function j9n(e,t,r){if(e==null||typeof e!=="string"&&e.type!=="Program"){throw new Y7["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e)}t=t||{};if(!("data"in t)){t.data=true}if(t.compat){t.useDepths=true}var n=r.parse(e,t),i=new r.Compiler().compile(n,t);return new r.JavaScriptCompiler().compile(i,t)}a(j9n,"precompile");function G9n(e,t,r){if(t===void 0)t={};if(e==null||typeof e!=="string"&&e.type!=="Program"){throw new Y7["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e)}t=X7.extend({},t);if(!("data"in t)){t.data=true}if(t.compat){t.useDepths=true}var n=void 0;function i(){var o=r.parse(e,t),u=new r.Compiler().compile(o,t),l=new r.JavaScriptCompiler().compile(u,t,void 0,true);return r.template(l)}a(i,"compileInput");function s(o,u){if(!n){n=i()}return n.call(this,o,u)}a(s,"ret");s._setup=function(o){if(!n){n=i()}return n._setup(o)};s._child=function(o,u,l,c){if(!n){n=i()}return n._child(o,u,l,c)};return s}a(G9n,"compile");function L3t(e,t){if(e===t){return true}if(X7.isArray(e)&&X7.isArray(t)&&e.length===t.length){for(var r=0;r<e.length;r++){if(!L3t(e[r],t[r])){return false}}return true}}a(L3t,"argEquals");function k3t(e){if(!e.path.parts){var t=e.path;e.path={type:"PathExpression",data:false,depth:0,parts:[t.original+""],original:t.original+"",loc:t.loc}}}a(k3t,"transformLiteralToPath")});var M3t=y(RIe=>{var B3t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");RIe.encode=function(e){if(0<=e&&e<B3t.length){return B3t[e]}throw new TypeError("Must be between 0 and 63: "+e)};RIe.decode=function(e){var t=65;var r=90;var n=97;var i=122;var s=48;var o=57;var u=43;var l=47;var c=26;var d=52;if(t<=e&&e<=r){return e-t}if(n<=e&&e<=i){return e-n+c}if(s<=e&&e<=o){return e-s+d}if(e==u){return 62}if(e==l){return 63}return-1}});var NIe=y(PIe=>{var q3t=M3t();var OIe=5;var U3t=1<<OIe;var $3t=U3t-1;var j3t=U3t;function H9n(e){return e<0?(-e<<1)+1:(e<<1)+0}a(H9n,"toVLQSigned");function V9n(e){var t=(e&1)===1;var r=e>>1;return t?-r:r}a(V9n,"fromVLQSigned");PIe.encode=a(function e(t){var r="";var n;var i=H9n(t);do{n=i&$3t;i>>>=OIe;if(i>0){n|=j3t}r+=q3t.encode(n)}while(i>0);return r},"base64VLQ_encode");PIe.decode=a(function e(t,r,n){var i=t.length;var s=0;var o=0;var u,l;do{if(r>=i){throw new Error("Expected more digits in base 64 VLQ value.")}l=q3t.decode(t.charCodeAt(r++));if(l===-1){throw new Error("Invalid base64 digit: "+t.charAt(r-1))}u=!!(l&j3t);l&=$3t;s=s+(l<<o);o+=OIe}while(u);n.value=V9n(s);n.rest=r},"base64VLQ_decode")});var dN=y(Fl=>{function z9n(e,t,r){if(t in e){return e[t]}else if(arguments.length===3){return r}else{throw new Error('"'+t+'" is a required argument.')}}a(z9n,"getArg");Fl.getArg=z9n;var G3t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;var K9n=/^data:.+\,.+$/;function Q7(e){var t=e.match(G3t);if(!t){return null}return{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}}a(Q7,"urlParse");Fl.urlParse=Q7;function lN(e){var t="";if(e.scheme){t+=e.scheme+":"}t+="//";if(e.auth){t+=e.auth+"@"}if(e.host){t+=e.host}if(e.port){t+=":"+e.port}if(e.path){t+=e.path}return t}a(lN,"urlGenerate");Fl.urlGenerate=lN;function IIe(e){var t=e;var r=Q7(e);if(r){if(!r.path){return e}t=r.path}var n=Fl.isAbsolute(t);var i=t.split(/\/+/);for(var s,o=0,u=i.length-1;u>=0;u--){s=i[u];if(s==="."){i.splice(u,1)}else if(s===".."){o++}else if(o>0){if(s===""){i.splice(u+1,o);o=0}else{i.splice(u,2);o--}}}t=i.join("/");if(t===""){t=n?"/":"."}if(r){r.path=t;return lN(r)}return t}a(IIe,"normalize");Fl.normalize=IIe;function H3t(e,t){if(e===""){e="."}if(t===""){t="."}var r=Q7(t);var n=Q7(e);if(n){e=n.path||"/"}if(r&&!r.scheme){if(n){r.scheme=n.scheme}return lN(r)}if(r||t.match(K9n)){return t}if(n&&!n.host&&!n.path){n.host=t;return lN(n)}var i=t.charAt(0)==="/"?t:IIe(e.replace(/\/+$/,"")+"/"+t);if(n){n.path=i;return lN(n)}return i}a(H3t,"join");Fl.join=H3t;Fl.isAbsolute=function(e){return e.charAt(0)==="/"||G3t.test(e)};function W9n(e,t){if(e===""){e="."}e=e.replace(/\/$/,"");var r=0;while(t.indexOf(e+"/")!==0){var n=e.lastIndexOf("/");if(n<0){return t}e=e.slice(0,n);if(e.match(/^([^\/]+:\/)?\/*$/)){return t}++r}return Array(r+1).join("../")+t.substr(e.length+1)}a(W9n,"relative");Fl.relative=W9n;var V3t=function(){var e=Object.create(null);return!("__proto__"in e)}();function z3t(e){return e}a(z3t,"identity");function Y9n(e){if(K3t(e)){return"$"+e}return e}a(Y9n,"toSetString");Fl.toSetString=V3t?z3t:Y9n;function X9n(e){if(K3t(e)){return e.slice(1)}return e}a(X9n,"fromSetString");Fl.fromSetString=V3t?z3t:X9n;function K3t(e){if(!e){return false}var t=e.length;if(t<9){return false}if(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 false}for(var r=t-10;r>=0;r--){if(e.charCodeAt(r)!==36){return false}}return true}a(K3t,"isProtoString");function J9n(e,t,r){var n=cN(e.source,t.source);if(n!==0){return n}n=e.originalLine-t.originalLine;if(n!==0){return n}n=e.originalColumn-t.originalColumn;if(n!==0||r){return n}n=e.generatedColumn-t.generatedColumn;if(n!==0){return n}n=e.generatedLine-t.generatedLine;if(n!==0){return n}return cN(e.name,t.name)}a(J9n,"compareByOriginalPositions");Fl.compareByOriginalPositions=J9n;function Q9n(e,t,r){var n=e.generatedLine-t.generatedLine;if(n!==0){return n}n=e.generatedColumn-t.generatedColumn;if(n!==0||r){return n}n=cN(e.source,t.source);if(n!==0){return n}n=e.originalLine-t.originalLine;if(n!==0){return n}n=e.originalColumn-t.originalColumn;if(n!==0){return n}return cN(e.name,t.name)}a(Q9n,"compareByGeneratedPositionsDeflated");Fl.compareByGeneratedPositionsDeflated=Q9n;function cN(e,t){if(e===t){return 0}if(e===null){return 1}if(t===null){return-1}if(e>t){return 1}return-1}a(cN,"strcmp");function Z9n(e,t){var r=e.generatedLine-t.generatedLine;if(r!==0){return r}r=e.generatedColumn-t.generatedColumn;if(r!==0){return r}r=cN(e.source,t.source);if(r!==0){return r}r=e.originalLine-t.originalLine;if(r!==0){return r}r=e.originalColumn-t.originalColumn;if(r!==0){return r}return cN(e.name,t.name)}a(Z9n,"compareByGeneratedPositionsInflated");Fl.compareByGeneratedPositionsInflated=Z9n;function eLn(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}a(eLn,"parseSourceMapInput");Fl.parseSourceMapInput=eLn;function tLn(e,t,r){t=t||"";if(e){if(e[e.length-1]!=="/"&&t[0]!=="/"){e+="/"}t=e+t}if(r){var n=Q7(r);if(!n){throw new Error("sourceMapURL could not be parsed")}if(n.path){var i=n.path.lastIndexOf("/");if(i>=0){n.path=n.path.substring(0,i+1)}}t=H3t(lN(n),t)}return IIe(t)}a(tLn,"computeSourceURL");Fl.computeSourceURL=tLn});var LIe=y(W3t=>{var kIe=dN();var DIe=Object.prototype.hasOwnProperty;var PC=typeof Map!=="undefined";function By(){this._array=[];this._set=PC?new Map:Object.create(null)}a(By,"ArraySet");By.fromArray=a(function e(t,r){var n=new By;for(var i=0,s=t.length;i<s;i++){n.add(t[i],r)}return n},"ArraySet_fromArray");By.prototype.size=a(function e(){return PC?this._set.size:Object.getOwnPropertyNames(this._set).length},"ArraySet_size");By.prototype.add=a(function e(t,r){var n=PC?t:kIe.toSetString(t);var i=PC?this.has(t):DIe.call(this._set,n);var s=this._array.length;if(!i||r){this._array.push(t)}if(!i){if(PC){this._set.set(t,s)}else{this._set[n]=s}}},"ArraySet_add");By.prototype.has=a(function e(t){if(PC){return this._set.has(t)}else{var r=kIe.toSetString(t);return DIe.call(this._set,r)}},"ArraySet_has");By.prototype.indexOf=a(function e(t){if(PC){var r=this._set.get(t);if(r>=0){return r}}else{var n=kIe.toSetString(t);if(DIe.call(this._set,n)){return this._set[n]}}throw new Error('"'+t+'" is not in the set.')},"ArraySet_indexOf");By.prototype.at=a(function e(t){if(t>=0&&t<this._array.length){return this._array[t]}throw new Error("No element indexed by "+t)},"ArraySet_at");By.prototype.toArray=a(function e(){return this._array.slice()},"ArraySet_toArray");W3t.ArraySet=By});var J3t=y(X3t=>{var Y3t=dN();function rLn(e,t){var r=e.generatedLine;var n=t.generatedLine;var i=e.generatedColumn;var s=t.generatedColumn;return n>r||n==r&&s>=i||Y3t.compareByGeneratedPositionsInflated(e,t)<=0}a(rLn,"generatedPositionAfter");function kZ(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}a(kZ,"MappingList");kZ.prototype.unsortedForEach=a(function e(t,r){this._array.forEach(t,r)},"MappingList_forEach");kZ.prototype.add=a(function e(t){if(rLn(this._last,t)){this._last=t;this._array.push(t)}else{this._sorted=false;this._array.push(t)}},"MappingList_add");kZ.prototype.toArray=a(function e(){if(!this._sorted){this._array.sort(Y3t.compareByGeneratedPositionsInflated);this._sorted=true}return this._array},"MappingList_toArray");X3t.MappingList=kZ});var FIe=y(Q3t=>{var Z7=NIe();var Bo=dN();var DZ=LIe().ArraySet;var nLn=J3t().MappingList;function Vf(e){if(!e){e={}}this._file=Bo.getArg(e,"file",null);this._sourceRoot=Bo.getArg(e,"sourceRoot",null);this._skipValidation=Bo.getArg(e,"skipValidation",false);this._sources=new DZ;this._names=new DZ;this._mappings=new nLn;this._sourcesContents=null}a(Vf,"SourceMapGenerator");Vf.prototype._version=3;Vf.fromSourceMap=a(function e(t){var r=t.sourceRoot;var n=new Vf({file:t.file,sourceRoot:r});t.eachMapping(function(i){var s={generated:{line:i.generatedLine,column:i.generatedColumn}};if(i.source!=null){s.source=i.source;if(r!=null){s.source=Bo.relative(r,s.source)}s.original={line:i.originalLine,column:i.originalColumn};if(i.name!=null){s.name=i.name}}n.addMapping(s)});t.sources.forEach(function(i){var s=i;if(r!==null){s=Bo.relative(r,i)}if(!n._sources.has(s)){n._sources.add(s)}var o=t.sourceContentFor(i);if(o!=null){n.setSourceContent(i,o)}});return n},"SourceMapGenerator_fromSourceMap");Vf.prototype.addMapping=a(function e(t){var r=Bo.getArg(t,"generated");var n=Bo.getArg(t,"original",null);var i=Bo.getArg(t,"source",null);var s=Bo.getArg(t,"name",null);if(!this._skipValidation){this._validateMapping(r,n,i,s)}if(i!=null){i=String(i);if(!this._sources.has(i)){this._sources.add(i)}}if(s!=null){s=String(s);if(!this._names.has(s)){this._names.add(s)}}this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:s})},"SourceMapGenerator_addMapping");Vf.prototype.setSourceContent=a(function e(t,r){var n=t;if(this._sourceRoot!=null){n=Bo.relative(this._sourceRoot,n)}if(r!=null){if(!this._sourcesContents){this._sourcesContents=Object.create(null)}this._sourcesContents[Bo.toSetString(n)]=r}else if(this._sourcesContents){delete this._sourcesContents[Bo.toSetString(n)];if(Object.keys(this._sourcesContents).length===0){this._sourcesContents=null}}},"SourceMapGenerator_setSourceContent");Vf.prototype.applySourceMap=a(function e(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 s=this._sourceRoot;if(s!=null){i=Bo.relative(s,i)}var o=new DZ;var u=new DZ;this._mappings.unsortedForEach(function(l){if(l.source===i&&l.originalLine!=null){var c=t.originalPositionFor({line:l.originalLine,column:l.originalColumn});if(c.source!=null){l.source=c.source;if(n!=null){l.source=Bo.join(n,l.source)}if(s!=null){l.source=Bo.relative(s,l.source)}l.originalLine=c.line;l.originalColumn=c.column;if(c.name!=null){l.name=c.name}}}var d=l.source;if(d!=null&&!o.has(d)){o.add(d)}var p=l.name;if(p!=null&&!u.has(p)){u.add(p)}},this);this._sources=o;this._names=u;t.sources.forEach(function(l){var c=t.sourceContentFor(l);if(c!=null){if(n!=null){l=Bo.join(n,l)}if(s!=null){l=Bo.relative(s,l)}this.setSourceContent(l,c)}},this)},"SourceMapGenerator_applySourceMap");Vf.prototype._validateMapping=a(function e(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){return}else 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}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:i}))}},"SourceMapGenerator_validateMapping");Vf.prototype._serializeMappings=a(function e(){var t=0;var r=1;var n=0;var i=0;var s=0;var o=0;var u="";var l;var c;var d;var p;var f=this._mappings.toArray();for(var m=0,h=f.length;m<h;m++){c=f[m];l="";if(c.generatedLine!==r){t=0;while(c.generatedLine!==r){l+=";";r++}}else{if(m>0){if(!Bo.compareByGeneratedPositionsInflated(c,f[m-1])){continue}l+=","}}l+=Z7.encode(c.generatedColumn-t);t=c.generatedColumn;if(c.source!=null){p=this._sources.indexOf(c.source);l+=Z7.encode(p-o);o=p;l+=Z7.encode(c.originalLine-1-i);i=c.originalLine-1;l+=Z7.encode(c.originalColumn-n);n=c.originalColumn;if(c.name!=null){d=this._names.indexOf(c.name);l+=Z7.encode(d-s);s=d}}u+=l}return u},"SourceMapGenerator_serializeMappings");Vf.prototype._generateSourcesContent=a(function e(t,r){return t.map(function(n){if(!this._sourcesContents){return null}if(r!=null){n=Bo.relative(r,n)}var i=Bo.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)},"SourceMapGenerator_generateSourcesContent");Vf.prototype.toJSON=a(function e(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){t.file=this._file}if(this._sourceRoot!=null){t.sourceRoot=this._sourceRoot}if(this._sourcesContents){t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)}return t},"SourceMapGenerator_toJSON");Vf.prototype.toString=a(function e(){return JSON.stringify(this.toJSON())},"SourceMapGenerator_toString");Q3t.SourceMapGenerator=Vf});var Z3t=y(NC=>{NC.GREATEST_LOWER_BOUND=1;NC.LEAST_UPPER_BOUND=2;function BIe(e,t,r,n,i,s){var o=Math.floor((t-e)/2)+e;var u=i(r,n[o],true);if(u===0){return o}else if(u>0){if(t-o>1){return BIe(o,t,r,n,i,s)}if(s==NC.LEAST_UPPER_BOUND){return t<n.length?t:-1}else{return o}}else{if(o-e>1){return BIe(e,o,r,n,i,s)}if(s==NC.LEAST_UPPER_BOUND){return o}else{return e<0?-1:e}}}a(BIe,"recursiveSearch");NC.search=a(function e(t,r,n,i){if(r.length===0){return-1}var s=BIe(-1,r.length,t,r,n,i||NC.GREATEST_LOWER_BOUND);if(s<0){return-1}while(s-1>=0){if(n(r[s],r[s-1],true)!==0){break}--s}return s},"search")});var tkt=y(ekt=>{function MIe(e,t,r){var n=e[t];e[t]=e[r];e[r]=n}a(MIe,"swap");function iLn(e,t){return Math.round(e+Math.random()*(t-e))}a(iLn,"randomIntInRange");function qIe(e,t,r,n){if(r<n){var i=iLn(r,n);var s=r-1;MIe(e,i,n);var o=e[n];for(var u=r;u<n;u++){if(t(e[u],o)<=0){s+=1;MIe(e,s,u)}}MIe(e,s+1,u);var l=s+1;qIe(e,t,r,l-1);qIe(e,t,l+1,n)}}a(qIe,"doQuickSort");ekt.quickSort=function(e,t){qIe(e,t,0,e.length-1)}});var nkt=y(LZ=>{var dr=dN();var UIe=Z3t();var pN=LIe().ArraySet;var sLn=NIe();var eB=tkt().quickSort;function Aa(e,t){var r=e;if(typeof e==="string"){r=dr.parseSourceMapInput(e)}return r.sections!=null?new Ah(r,t):new dl(r,t)}a(Aa,"SourceMapConsumer");Aa.fromSourceMap=function(e,t){return dl.fromSourceMap(e,t)};Aa.prototype._version=3;Aa.prototype.__generatedMappings=null;Object.defineProperty(Aa.prototype,"_generatedMappings",{configurable:true,enumerable:true,get:function(){if(!this.__generatedMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});Aa.prototype.__originalMappings=null;Object.defineProperty(Aa.prototype,"_originalMappings",{configurable:true,enumerable:true,get:function(){if(!this.__originalMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});Aa.prototype._charIsMappingSeparator=a(function e(t,r){var n=t.charAt(r);return n===";"||n===","},"SourceMapConsumer_charIsMappingSeparator");Aa.prototype._parseMappings=a(function e(t,r){throw new Error("Subclasses must implement _parseMappings")},"SourceMapConsumer_parseMappings");Aa.GENERATED_ORDER=1;Aa.ORIGINAL_ORDER=2;Aa.GREATEST_LOWER_BOUND=1;Aa.LEAST_UPPER_BOUND=2;Aa.prototype.eachMapping=a(function e(t,r,n){var i=r||null;var s=n||Aa.GENERATED_ORDER;var o;switch(s){case Aa.GENERATED_ORDER:o=this._generatedMappings;break;case Aa.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;o.map(function(l){var c=l.source===null?null:this._sources.at(l.source);c=dr.computeSourceURL(u,c,this._sourceMapURL);return{source:c,generatedLine:l.generatedLine,generatedColumn:l.generatedColumn,originalLine:l.originalLine,originalColumn:l.originalColumn,name:l.name===null?null:this._names.at(l.name)}},this).forEach(t,i)},"SourceMapConsumer_eachMapping");Aa.prototype.allGeneratedPositionsFor=a(function e(t){var r=dr.getArg(t,"line");var n={source:dr.getArg(t,"source"),originalLine:r,originalColumn:dr.getArg(t,"column",0)};n.source=this._findSourceIndex(n.source);if(n.source<0){return[]}var i=[];var s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",dr.compareByOriginalPositions,UIe.LEAST_UPPER_BOUND);if(s>=0){var o=this._originalMappings[s];if(t.column===void 0){var u=o.originalLine;while(o&&o.originalLine===u){i.push({line:dr.getArg(o,"generatedLine",null),column:dr.getArg(o,"generatedColumn",null),lastColumn:dr.getArg(o,"lastGeneratedColumn",null)});o=this._originalMappings[++s]}}else{var l=o.originalColumn;while(o&&o.originalLine===r&&o.originalColumn==l){i.push({line:dr.getArg(o,"generatedLine",null),column:dr.getArg(o,"generatedColumn",null),lastColumn:dr.getArg(o,"lastGeneratedColumn",null)});o=this._originalMappings[++s]}}}return i},"SourceMapConsumer_allGeneratedPositionsFor");LZ.SourceMapConsumer=Aa;function dl(e,t){var r=e;if(typeof e==="string"){r=dr.parseSourceMapInput(e)}var n=dr.getArg(r,"version");var i=dr.getArg(r,"sources");var s=dr.getArg(r,"names",[]);var o=dr.getArg(r,"sourceRoot",null);var u=dr.getArg(r,"sourcesContent",null);var l=dr.getArg(r,"mappings");var c=dr.getArg(r,"file",null);if(n!=this._version){throw new Error("Unsupported version: "+n)}if(o){o=dr.normalize(o)}i=i.map(String).map(dr.normalize).map(function(d){return o&&dr.isAbsolute(o)&&dr.isAbsolute(d)?dr.relative(o,d):d});this._names=pN.fromArray(s.map(String),true);this._sources=pN.fromArray(i,true);this._absoluteSources=this._sources.toArray().map(function(d){return dr.computeSourceURL(o,d,t)});this.sourceRoot=o;this.sourcesContent=u;this._mappings=l;this._sourceMapURL=t;this.file=c}a(dl,"BasicSourceMapConsumer");dl.prototype=Object.create(Aa.prototype);dl.prototype.consumer=Aa;dl.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null){t=dr.relative(this.sourceRoot,t)}if(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};dl.fromSourceMap=a(function e(t,r){var n=Object.create(dl.prototype);var i=n._names=pN.fromArray(t._names.toArray(),true);var s=n._sources=pN.fromArray(t._sources.toArray(),true);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 dr.computeSourceURL(n.sourceRoot,m,r)});var o=t._mappings.toArray().slice();var u=n.__generatedMappings=[];var l=n.__originalMappings=[];for(var c=0,d=o.length;c<d;c++){var p=o[c];var f=new rkt;f.generatedLine=p.generatedLine;f.generatedColumn=p.generatedColumn;if(p.source){f.source=s.indexOf(p.source);f.originalLine=p.originalLine;f.originalColumn=p.originalColumn;if(p.name){f.name=i.indexOf(p.name)}l.push(f)}u.push(f)}eB(n.__originalMappings,dr.compareByOriginalPositions);return n},"SourceMapConsumer_fromSourceMap");dl.prototype._version=3;Object.defineProperty(dl.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function rkt(){this.generatedLine=0;this.generatedColumn=0;this.source=null;this.originalLine=null;this.originalColumn=null;this.name=null}a(rkt,"Mapping");dl.prototype._parseMappings=a(function e(t,r){var n=1;var i=0;var s=0;var o=0;var u=0;var l=0;var c=t.length;var d=0;var p={};var f={};var m=[];var h=[];var g,_,v,S,E;while(d<c){if(t.charAt(d)===";"){n++;d++;i=0}else if(t.charAt(d)===","){d++}else{g=new rkt;g.generatedLine=n;for(S=d;S<c;S++){if(this._charIsMappingSeparator(t,S)){break}}_=t.slice(d,S);v=p[_];if(v){d+=_.length}else{v=[];while(d<S){sLn.decode(t,d,f);E=f.value;d=f.rest;v.push(E)}if(v.length===2){throw new Error("Found a source, but no line and column")}if(v.length===3){throw new Error("Found a source and line, but no column")}p[_]=v}g.generatedColumn=i+v[0];i=g.generatedColumn;if(v.length>1){g.source=u+v[1];u+=v[1];g.originalLine=s+v[2];s=g.originalLine;g.originalLine+=1;g.originalColumn=o+v[3];o=g.originalColumn;if(v.length>4){g.name=l+v[4];l+=v[4]}}h.push(g);if(typeof g.originalLine==="number"){m.push(g)}}}eB(h,dr.compareByGeneratedPositionsDeflated);this.__generatedMappings=h;eB(m,dr.compareByOriginalPositions);this.__originalMappings=m},"SourceMapConsumer_parseMappings");dl.prototype._findMapping=a(function e(t,r,n,i,s,o){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 UIe.search(t,r,s,o)},"SourceMapConsumer_findMapping");dl.prototype.computeColumnSpans=a(function e(){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=Infinity}},"SourceMapConsumer_computeColumnSpans");dl.prototype.originalPositionFor=a(function e(t){var r={generatedLine:dr.getArg(t,"line"),generatedColumn:dr.getArg(t,"column")};var n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",dr.compareByGeneratedPositionsDeflated,dr.getArg(t,"bias",Aa.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var s=dr.getArg(i,"source",null);if(s!==null){s=this._sources.at(s);s=dr.computeSourceURL(this.sourceRoot,s,this._sourceMapURL)}var o=dr.getArg(i,"name",null);if(o!==null){o=this._names.at(o)}return{source:s,line:dr.getArg(i,"originalLine",null),column:dr.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}},"SourceMapConsumer_originalPositionFor");dl.prototype.hasContentsOfAllSources=a(function e(){if(!this.sourcesContent){return false}return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null})},"BasicSourceMapConsumer_hasContentsOfAllSources");dl.prototype.sourceContentFor=a(function e(t,r){if(!this.sourcesContent){return null}var n=this._findSourceIndex(t);if(n>=0){return this.sourcesContent[n]}var i=t;if(this.sourceRoot!=null){i=dr.relative(this.sourceRoot,i)}var s;if(this.sourceRoot!=null&&(s=dr.urlParse(this.sourceRoot))){var o=i.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(o)){return this.sourcesContent[this._sources.indexOf(o)]}if((!s.path||s.path=="/")&&this._sources.has("/"+i)){return this.sourcesContent[this._sources.indexOf("/"+i)]}}if(r){return null}else{throw new Error('"'+i+'" is not in the SourceMap.')}},"SourceMapConsumer_sourceContentFor");dl.prototype.generatedPositionFor=a(function e(t){var r=dr.getArg(t,"source");r=this._findSourceIndex(r);if(r<0){return{line:null,column:null,lastColumn:null}}var n={source:r,originalLine:dr.getArg(t,"line"),originalColumn:dr.getArg(t,"column")};var i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",dr.compareByOriginalPositions,dr.getArg(t,"bias",Aa.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source){return{line:dr.getArg(s,"generatedLine",null),column:dr.getArg(s,"generatedColumn",null),lastColumn:dr.getArg(s,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}},"SourceMapConsumer_generatedPositionFor");LZ.BasicSourceMapConsumer=dl;function Ah(e,t){var r=e;if(typeof e==="string"){r=dr.parseSourceMapInput(e)}var n=dr.getArg(r,"version");var i=dr.getArg(r,"sections");if(n!=this._version){throw new Error("Unsupported version: "+n)}this._sources=new pN;this._names=new pN;var s={line:-1,column:0};this._sections=i.map(function(o){if(o.url){throw new Error("Support for url field in sections not implemented.")}var u=dr.getArg(o,"offset");var l=dr.getArg(u,"line");var c=dr.getArg(u,"column");if(l<s.line||l===s.line&&c<s.column){throw new Error("Section offsets must be ordered and non-overlapping.")}s=u;return{generatedOffset:{generatedLine:l+1,generatedColumn:c+1},consumer:new Aa(dr.getArg(o,"map"),t)}})}a(Ah,"IndexedSourceMapConsumer");Ah.prototype=Object.create(Aa.prototype);Ah.prototype.constructor=Aa;Ah.prototype._version=3;Object.defineProperty(Ah.prototype,"sources",{get:function(){var e=[];for(var 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}});Ah.prototype.originalPositionFor=a(function e(t){var r={generatedLine:dr.getArg(t,"line"),generatedColumn:dr.getArg(t,"column")};var n=UIe.search(r,this._sections,function(s,o){var u=s.generatedLine-o.generatedOffset.generatedLine;if(u){return u}return s.generatedColumn-o.generatedOffset.generatedColumn});var i=this._sections[n];if(!i){return{source:null,line:null,column:null,name:null}}return 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})},"IndexedSourceMapConsumer_originalPositionFor");Ah.prototype.hasContentsOfAllSources=a(function e(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})},"IndexedSourceMapConsumer_hasContentsOfAllSources");Ah.prototype.sourceContentFor=a(function e(t,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n];var s=i.consumer.sourceContentFor(t,true);if(s){return s}}if(r){return null}else{throw new Error('"'+t+'" is not in the SourceMap.')}},"IndexedSourceMapConsumer_sourceContentFor");Ah.prototype.generatedPositionFor=a(function e(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(dr.getArg(t,"source"))===-1){continue}var i=n.consumer.generatedPositionFor(t);if(i){var s={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return s}}return{line:null,column:null}},"IndexedSourceMapConsumer_generatedPositionFor");Ah.prototype._parseMappings=a(function e(t,r){this.__generatedMappings=[];this.__originalMappings=[];for(var n=0;n<this._sections.length;n++){var i=this._sections[n];var s=i.consumer._generatedMappings;for(var o=0;o<s.length;o++){var u=s[o];var l=i.consumer._sources.at(u.source);l=dr.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL);this._sources.add(l);l=this._sources.indexOf(l);var c=null;if(u.name){c=i.consumer._names.at(u.name);this._names.add(c);c=this._names.indexOf(c)}var d={source:l,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:c};this.__generatedMappings.push(d);if(typeof d.originalLine==="number"){this.__originalMappings.push(d)}}}eB(this.__generatedMappings,dr.compareByGeneratedPositionsDeflated);eB(this.__originalMappings,dr.compareByOriginalPositions)},"IndexedSourceMapConsumer_parseMappings");LZ.IndexedSourceMapConsumer=Ah});var skt=y(ikt=>{var aLn=FIe().SourceMapGenerator;var FZ=dN();var oLn=/(\r?\n)/;var uLn=10;var fN="$$$isSourceNode$$$";function gp(e,t,r,n,i){this.children=[];this.sourceContents={};this.line=e==null?null:e;this.column=t==null?null:t;this.source=r==null?null:r;this.name=i==null?null:i;this[fN]=true;if(n!=null)this.add(n)}a(gp,"SourceNode");gp.fromStringWithSourceMap=a(function e(t,r,n){var i=new gp;var s=t.split(oLn);var o=0;var u=a(function(){var f=h();var m=h()||"";return f+m;function h(){return o<s.length?s[o++]:void 0}a(h,"getNextLine")},"shiftNextLine");var l=1,c=0;var d=null;r.eachMapping(function(f){if(d!==null){if(l<f.generatedLine){p(d,u());l++;c=0}else{var m=s[o]||"";var h=m.substr(0,f.generatedColumn-c);s[o]=m.substr(f.generatedColumn-c);c=f.generatedColumn;p(d,h);d=f;return}}while(l<f.generatedLine){i.add(u());l++}if(c<f.generatedColumn){var m=s[o]||"";i.add(m.substr(0,f.generatedColumn));s[o]=m.substr(f.generatedColumn);c=f.generatedColumn}d=f},this);if(o<s.length){if(d){p(d,u())}i.add(s.splice(o).join(""))}r.sources.forEach(function(f){var m=r.sourceContentFor(f);if(m!=null){if(n!=null){f=FZ.join(n,f)}i.setSourceContent(f,m)}});return i;function p(f,m){if(f===null||f.source===void 0){i.add(m)}else{var h=n?FZ.join(n,f.source):f.source;i.add(new gp(f.originalLine,f.originalColumn,h,m,f.name))}}a(p,"addMappingWithCode")},"SourceNode_fromStringWithSourceMap");gp.prototype.add=a(function e(t){if(Array.isArray(t)){t.forEach(function(r){this.add(r)},this)}else if(t[fN]||typeof t==="string"){if(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");gp.prototype.prepend=a(function e(t){if(Array.isArray(t)){for(var r=t.length-1;r>=0;r--){this.prepend(t[r])}}else if(t[fN]||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");gp.prototype.walk=a(function e(t){var r;for(var n=0,i=this.children.length;n<i;n++){r=this.children[n];if(r[fN]){r.walk(t)}else{if(r!==""){t(r,{source:this.source,line:this.line,column:this.column,name:this.name})}}}},"SourceNode_walk");gp.prototype.join=a(function e(t){var r;var n;var i=this.children.length;if(i>0){r=[];for(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");gp.prototype.replaceRight=a(function e(t,r){var n=this.children[this.children.length-1];if(n[fN]){n.replaceRight(t,r)}else if(typeof n==="string"){this.children[this.children.length-1]=n.replace(t,r)}else{this.children.push("".replace(t,r))}return this},"SourceNode_replaceRight");gp.prototype.setSourceContent=a(function e(t,r){this.sourceContents[FZ.toSetString(t)]=r},"SourceNode_setSourceContent");gp.prototype.walkSourceContents=a(function e(t){for(var r=0,n=this.children.length;r<n;r++){if(this.children[r][fN]){this.children[r].walkSourceContents(t)}}var i=Object.keys(this.sourceContents);for(var r=0,n=i.length;r<n;r++){t(FZ.fromSetString(i[r]),this.sourceContents[i[r]])}},"SourceNode_walkSourceContents");gp.prototype.toString=a(function e(){var t="";this.walk(function(r){t+=r});return t},"SourceNode_toString");gp.prototype.toStringWithSourceMap=a(function e(t){var r={code:"",line:1,column:0};var n=new aLn(t);var i=false;var s=null;var o=null;var u=null;var l=null;this.walk(function(c,d){r.code+=c;if(d.source!==null&&d.line!==null&&d.column!==null){if(s!==d.source||o!==d.line||u!==d.column||l!==d.name){n.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:r.line,column:r.column},name:d.name})}s=d.source;o=d.line;u=d.column;l=d.name;i=true}else if(i){n.addMapping({generated:{line:r.line,column:r.column}});s=null;i=false}for(var p=0,f=c.length;p<f;p++){if(c.charCodeAt(p)===uLn){r.line++;r.column=0;if(p+1===f){s=null;i=false}else if(i){n.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:r.line,column:r.column},name:d.name})}}else{r.column++}}});this.walkSourceContents(function(c,d){n.setSourceContent(c,d)});return{code:r.code,map:n}},"SourceNode_toStringWithSourceMap");ikt.SourceNode=gp});var MZ=y(BZ=>{BZ.SourceMapGenerator=FIe().SourceMapGenerator;BZ.SourceMapConsumer=nkt().SourceMapConsumer;BZ.SourceNode=skt().SourceNode});var lkt=y((qZ,ukt)=>{"use strict";qZ.__esModule=true;var jIe=Nc();var IC=void 0;try{if(typeof define!=="function"||!define.amd){akt=MZ();IC=akt.SourceNode}}catch(e){}var akt;if(!IC){IC=a(function(e,t,r,n){this.src="";if(n){this.add(n)}},"SourceNode");IC.prototype={add:a(function e(t){if(jIe.isArray(t)){t=t.join("")}this.src+=t},"add"),prepend:a(function e(t){if(jIe.isArray(t)){t=t.join("")}this.src=t+this.src},"prepend"),toStringWithSourceMap:a(function e(){return{code:this.toString()}},"toStringWithSourceMap"),toString:a(function e(){return this.src},"toString")}}function $Ie(e,t,r){if(jIe.isArray(e)){var n=[];for(var i=0,s=e.length;i<s;i++){n.push(t.wrap(e[i],r))}return n}else if(typeof e==="boolean"||typeof e==="number"){return e+""}return e}a($Ie,"castChunk");function okt(e){this.srcFile=e;this.source=[]}a(okt,"CodeGen");okt.prototype={isEmpty:a(function e(){return!this.source.length},"isEmpty"),prepend:a(function e(t,r){this.source.unshift(this.wrap(t,r))},"prepend"),push:a(function e(t,r){this.source.push(this.wrap(t,r))},"push"),merge:a(function e(){var t=this.empty();this.each(function(r){t.add([" ",r,"\n"])});return t},"merge"),each:a(function e(t){for(var r=0,n=this.source.length;r<n;r++){t(this.source[r])}},"each"),empty:a(function e(){var t=this.currentLocation||{start:{}};return new IC(t.start.line,t.start.column,this.srcFile)},"empty"),wrap:a(function e(t){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];if(t instanceof IC){return t}t=$Ie(t,this,r);return new IC(r.start.line,r.start.column,this.srcFile,t)},"wrap"),functionCall:a(function e(t,r,n){n=this.generateList(n);return this.wrap([t,r?"."+r+"(":"(",n,")"])},"functionCall"),quotedString:a(function e(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:a(function e(t){var r=this;var n=[];Object.keys(t).forEach(function(s){var o=$Ie(t[s],r);if(o!=="undefined"){n.push([r.quotedString(s),":",o])}});var i=this.generateList(n);i.prepend("{");i.add("}");return i},"objectLiteral"),generateList:a(function e(t){var r=this.empty();for(var n=0,i=t.length;n<i;n++){if(n){r.add(",")}r.add($Ie(t[n],this))}return r},"generateList"),generateArray:a(function e(t){var r=this.generateList(t);r.prepend("[");r.add("]");return r},"generateArray")};qZ["default"]=okt;ukt.exports=qZ["default"]});var mkt=y((UZ,fkt)=>{"use strict";UZ.__esModule=true;function pkt(e){return e&&e.__esModule?e:{"default":e}}a(pkt,"_interopRequireDefault");var ckt=EZ();var lLn=Gf();var GIe=pkt(lLn);var cLn=Nc();var dLn=lkt();var dkt=pkt(dLn);function mN(e){this.value=e}a(mN,"Literal");function hN(){}a(hN,"JavaScriptCompiler");hN.prototype={nameLookup:a(function e(t,r){return this.internalNameLookup(t,r)},"nameLookup"),depthedLookup:a(function e(t){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(t),")"]},"depthedLookup"),compilerInfo:a(function e(){var t=ckt.COMPILER_REVISION,r=ckt.REVISION_CHANGES[t];return[t,r]},"compilerInfo"),appendToBuffer:a(function e(t,r,n){if(!cLn.isArray(t)){t=[t]}t=this.source.wrap(t,r);if(this.environment.isSimple){return["return ",t,";"]}else if(n){return["buffer += ",t,";"]}else{t.appendToBuffer=true;return t}},"appendToBuffer"),initializeBuffer:a(function e(){return this.quotedString("")},"initializeBuffer"),internalNameLookup:a(function e(t,r){this.lookupPropertyFunctionIsUsed=true;return["lookupProperty(",t,",",JSON.stringify(r),")"]},"internalNameLookup"),lookupPropertyFunctionIsUsed:false,compile:a(function e(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 s=t.opcodes,o=void 0,u=void 0,l=void 0,c=void 0;for(l=0,c=s.length;l<c;l++){o=s[l];this.source.currentLocation=o.loc;u=u||o.loc;this[o.opcode].apply(this,o.args)}this.source.currentLocation=u;this.pushSource("");if(this.stackSlot||this.inlineStack.length||this.compileStack.length){throw new GIe["default"]("Compile completed with content left on stack")}if(!this.decorators.isEmpty()){this.useDecorators=true;this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),";\n"]);this.decorators.push("return fn;");if(i){this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()])}else{this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n");this.decorators.push("}\n");this.decorators=this.decorators.merge()}}else{this.decorators=void 0}var d=this.createFunctionContext(i);if(!this.isChild){var p={compiler:this.compilerInfo(),main:d};if(this.decorators){p.main_d=this.decorators;p.useDecorators=true}var f=this.context;var m=f.programs;var h=f.decorators;for(l=0,c=m.length;l<c;l++){if(m[l]){p[l]=m[l];if(h[l]){p[l+"_d"]=h[l];p.useDecorators=true}}}if(this.environment.usePartial){p.usePartial=true}if(this.options.data){p.useData=true}if(this.useDepths){p.useDepths=true}if(this.useBlockParams){p.useBlockParams=true}if(this.options.compat){p.compat=true}if(!i){p.compiler=JSON.stringify(p.compiler);this.source.currentLocation={start:{line:1,column:0}};p=this.objectLiteral(p);if(r.srcName){p=p.toStringWithSourceMap({file:r.destName});p.map=p.map&&p.map.toString()}else{p=p.toString()}}else{p.compilerOptions=this.options}return p}else{return d}},"compile"),preamble:a(function e(){this.lastContext=0;this.source=new dkt["default"](this.options.srcName);this.decorators=new dkt["default"](this.options.srcName)},"preamble"),createFunctionContext:a(function e(t){var r=this;var n="";var i=this.stackVars.concat(this.registers.list);if(i.length>0){n+=", "+i.join(", ")}var s=0;Object.keys(this.aliases).forEach(function(l){var c=r.aliases[l];if(c.children&&c.referenceCount>1){n+=", alias"+ ++s+"="+l;c.children[0]="alias"+s}});if(this.lookupPropertyFunctionIsUsed){n+=", "+this.lookupPropertyFunctionVarDeclaration()}var o=["container","depth0","helpers","partials","data"];if(this.useBlockParams||this.useDepths){o.push("blockParams")}if(this.useDepths){o.push("depths")}var u=this.mergeSource(n);if(t){o.push(u);return Function.apply(this,o)}else{return this.source.wrap(["function(",o.join(","),") {\n ",u,"}"])}},"createFunctionContext"),mergeSource:a(function e(t){var r=this.environment.isSimple,n=!this.forceBuffer,i=void 0,s=void 0,o=void 0,u=void 0;this.source.each(function(l){if(l.appendToBuffer){if(o){l.prepend(" + ")}else{o=l}u=l}else{if(o){if(!s){i=true}else{o.prepend("buffer += ")}u.add(";");o=u=void 0}s=true;if(!r){n=false}}});if(n){if(o){o.prepend("return ");u.add(";")}else if(!s){this.source.push('return "";')}}else{t+=", buffer = "+(i?"":this.initializeBuffer());if(o){o.prepend("return buffer + ");u.add(";")}else{this.source.push("return buffer;")}}if(t){this.source.prepend("var "+t.substring(2)+(i?"":";\n"))}return this.source.merge()},"mergeSource"),lookupPropertyFunctionVarDeclaration:a(function e(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},"lookupPropertyFunctionVarDeclaration"),blockValue:a(function e(t){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(t,0,n);var i=this.popStack();n.splice(1,0,i);this.push(this.source.functionCall(r,"call",n))},"blockValue"),ambiguousBlockValue:a(function e(){var t=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,true);this.flushInline();var n=this.topStack();r.splice(1,0,n);this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(t,"call",r),"}"])},"ambiguousBlockValue"),appendContent:a(function e(t){if(this.pendingContent){t=this.pendingContent+t}else{this.pendingLocation=this.source.currentLocation}this.pendingContent=t},"appendContent"),append:a(function e(){if(this.isInline()){this.replaceStack(function(r){return[" != null ? ",r,' : ""']});this.pushSource(this.appendToBuffer(this.popStack()))}else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,true)," }"]);if(this.environment.isSimple){this.pushSource(["else { ",this.appendToBuffer("''",void 0,true)," }"])}}},"append"),appendEscaped:a(function e(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},"appendEscaped"),getContext:a(function e(t){this.lastContext=t},"getContext"),pushContext:a(function e(){this.pushStackLiteral(this.contextName(this.lastContext))},"pushContext"),lookupOnContext:a(function e(t,r,n,i){var s=0;if(!i&&this.options.compat&&!this.lastContext){this.push(this.depthedLookup(t[s++]))}else{this.pushContext()}this.resolvePath("context",t,s,r,n)},"lookupOnContext"),lookupBlockParam:a(function e(t,r){this.useBlockParams=true;this.push(["blockParams[",t[0],"][",t[1],"]"]);this.resolvePath("context",r,1)},"lookupBlockParam"),lookupData:a(function e(t,r,n){if(!t){this.pushStackLiteral("data")}else{this.pushStackLiteral("container.data(data, "+t+")")}this.resolvePath("data",r,0,true,n)},"lookupData"),resolvePath:a(function e(t,r,n,i,s){var o=this;if(this.options.strict||this.options.assumeObjects){this.push(pLn(this.options.strict&&s,this,r,t));return}var u=r.length;for(;n<u;n++){this.replaceStack(function(l){var c=o.nameLookup(l,r[n],t);if(!i){return[" != null ? ",c," : ",l]}else{return[" && ",c]}})}},"resolvePath"),resolvePossibleLambda:a(function e(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},"resolvePossibleLambda"),pushStringParam:a(function e(t,r){this.pushContext();this.pushString(r);if(r!=="SubExpression"){if(typeof t==="string"){this.pushString(t)}else{this.pushStackLiteral(t)}}},"pushStringParam"),emptyHash:a(function e(t){if(this.trackIds){this.push("{}")}if(this.stringParams){this.push("{}");this.push("{}")}this.pushStackLiteral(t?"undefined":"{}")},"emptyHash"),pushHash:a(function e(){if(this.hash){this.hashes.push(this.hash)}this.hash={values:{},types:[],contexts:[],ids:[]}},"pushHash"),popHash:a(function e(){var t=this.hash;this.hash=this.hashes.pop();if(this.trackIds){this.push(this.objectLiteral(t.ids))}if(this.stringParams){this.push(this.objectLiteral(t.contexts));this.push(this.objectLiteral(t.types))}this.push(this.objectLiteral(t.values))},"popHash"),pushString:a(function e(t){this.pushStackLiteral(this.quotedString(t))},"pushString"),pushLiteral:a(function e(t){this.pushStackLiteral(t)},"pushLiteral"),pushProgram:a(function e(t){if(t!=null){this.pushStackLiteral(this.programExpression(t))}else{this.pushStackLiteral(null)}},"pushProgram"),registerDecorator:a(function e(t,r){var n=this.nameLookup("decorators",r,"decorator"),i=this.setupHelperArgs(r,t);this.decorators.push(["fn = ",this.decorators.functionCall(n,"",["fn","props","container",i])," || fn;"])},"registerDecorator"),invokeHelper:a(function e(t,r,n){var i=this.popStack(),s=this.setupHelper(t,r);var o=[];if(n){o.push(s.name)}o.push(i);if(!this.options.strict){o.push(this.aliasable("container.hooks.helperMissing"))}var u=["(",this.itemsSeparatedBy(o,"||"),")"];var l=this.source.functionCall(u,"call",s.callParams);this.push(l)},"invokeHelper"),itemsSeparatedBy:a(function e(t,r){var n=[];n.push(t[0]);for(var i=1;i<t.length;i++){n.push(r,t[i])}return n},"itemsSeparatedBy"),invokeKnownHelper:a(function e(t,r){var n=this.setupHelper(t,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},"invokeKnownHelper"),invokeAmbiguous:a(function e(t,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,t,r);var s=this.lastHelper=this.nameLookup("helpers",t,"helper");var o=["(","(helper = ",s," || ",n,")"];if(!this.options.strict){o[0]="(helper = ";o.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))}this.push(["(",o,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},"invokeAmbiguous"),invokePartial:a(function e(t,r,n){var i=[],s=this.setupParams(r,1,i);if(t){r=this.popStack();delete s.name}if(n){s.indent=JSON.stringify(n)}s.helpers="helpers";s.partials="partials";s.decorators="container.decorators";if(!t){i.unshift(this.nameLookup("partials",r,"partial"))}else{i.unshift(r)}if(this.options.compat){s.depths="depths"}s=this.objectLiteral(s);i.push(s);this.push(this.source.functionCall("container.invokePartial","",i))},"invokePartial"),assignToHash:a(function e(t){var r=this.popStack(),n=void 0,i=void 0,s=void 0;if(this.trackIds){s=this.popStack()}if(this.stringParams){i=this.popStack();n=this.popStack()}var o=this.hash;if(n){o.contexts[t]=n}if(i){o.types[t]=i}if(s){o.ids[t]=s}o.values[t]=r},"assignToHash"),pushId:a(function e(t,r,n){if(t==="BlockParam"){this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+JSON.stringify("."+n):""))}else if(t==="PathExpression"){this.pushString(r)}else if(t==="SubExpression"){this.pushStackLiteral("true")}else{this.pushStackLiteral("null")}},"pushId"),compiler:hN,compileChildren:a(function e(t,r){var n=t.children,i=void 0,s=void 0;for(var o=0,u=n.length;o<u;o++){i=n[o];s=new this.compiler;var l=this.matchExistingProgram(i);if(l==null){this.context.programs.push("");var c=this.context.programs.length;i.index=c;i.name="program"+c;this.context.programs[c]=s.compile(i,r,this.context,!this.precompile);this.context.decorators[c]=s.decorators;this.context.environments[c]=i;this.useDepths=this.useDepths||s.useDepths;this.useBlockParams=this.useBlockParams||s.useBlockParams;i.useDepths=this.useDepths;i.useBlockParams=this.useBlockParams}else{i.index=l.index;i.name="program"+l.index;this.useDepths=this.useDepths||l.useDepths;this.useBlockParams=this.useBlockParams||l.useBlockParams}}},"compileChildren"),matchExistingProgram:a(function e(t){for(var r=0,n=this.context.environments.length;r<n;r++){var i=this.context.environments[r];if(i&&i.equals(t)){return i}}},"matchExistingProgram"),programExpression:a(function e(t){var r=this.environment.children[t],n=[r.index,"data",r.blockParams];if(this.useBlockParams||this.useDepths){n.push("blockParams")}if(this.useDepths){n.push("depths")}return"container.program("+n.join(", ")+")"},"programExpression"),useRegister:a(function e(t){if(!this.registers[t]){this.registers[t]=true;this.registers.list.push(t)}},"useRegister"),push:a(function e(t){if(!(t instanceof mN)){t=this.source.wrap(t)}this.inlineStack.push(t);return t},"push"),pushStackLiteral:a(function e(t){this.push(new mN(t))},"pushStackLiteral"),pushSource:a(function e(t){if(this.pendingContent){this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation));this.pendingContent=void 0}if(t){this.source.push(t)}},"pushSource"),replaceStack:a(function e(t){var r=["("],n=void 0,i=void 0,s=void 0;if(!this.isInline()){throw new GIe["default"]("replaceStack on non-inline")}var o=this.popStack(true);if(o instanceof mN){n=[o.value];r=["(",n];s=true}else{i=true;var u=this.incrStack();r=["((",this.push(u)," = ",o,")"];n=this.topStack()}var l=t.call(this,n);if(!s){this.popStack()}if(i){this.stackSlot--}this.push(r.concat(l,")"))},"replaceStack"),incrStack:a(function e(){this.stackSlot++;if(this.stackSlot>this.stackVars.length){this.stackVars.push("stack"+this.stackSlot)}return this.topStackName()},"incrStack"),topStackName:a(function e(){return"stack"+this.stackSlot},"topStackName"),flushInline:a(function e(){var t=this.inlineStack;this.inlineStack=[];for(var r=0,n=t.length;r<n;r++){var i=t[r];if(i instanceof mN){this.compileStack.push(i)}else{var s=this.incrStack();this.pushSource([s," = ",i,";"]);this.compileStack.push(s)}}},"flushInline"),isInline:a(function e(){return this.inlineStack.length},"isInline"),popStack:a(function e(t){var r=this.isInline(),n=(r?this.inlineStack:this.compileStack).pop();if(!t&&n instanceof mN){return n.value}else{if(!r){if(!this.stackSlot){throw new GIe["default"]("Invalid stack pop")}this.stackSlot--}return n}},"popStack"),topStack:a(function e(){var t=this.isInline()?this.inlineStack:this.compileStack,r=t[t.length-1];if(r instanceof mN){return r.value}else{return r}},"topStack"),contextName:a(function e(t){if(this.useDepths&&t){return"depths["+t+"]"}else{return"depth"+t}},"contextName"),quotedString:a(function e(t){return this.source.quotedString(t)},"quotedString"),objectLiteral:a(function e(t){return this.source.objectLiteral(t)},"objectLiteral"),aliasable:a(function e(t){var r=this.aliases[t];if(r){r.referenceCount++;return r}r=this.aliases[t]=this.source.wrap(t);r.aliasable=true;r.referenceCount=1;return r},"aliasable"),setupHelper:a(function e(t,r,n){var i=[],s=this.setupHelperArgs(r,t,i,n);var o=this.nameLookup("helpers",r,"helper"),u=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:i,paramsInit:s,name:o,callParams:[u].concat(i)}},"setupHelper"),setupParams:a(function e(t,r,n){var i={},s=[],o=[],u=[],l=!n,c=void 0;if(l){n=[]}i.name=this.quotedString(t);i.hash=this.popStack();if(this.trackIds){i.hashIds=this.popStack()}if(this.stringParams){i.hashTypes=this.popStack();i.hashContexts=this.popStack()}var d=this.popStack(),p=this.popStack();if(p||d){i.fn=p||"container.noop";i.inverse=d||"container.noop"}var f=r;while(f--){c=this.popStack();n[f]=c;if(this.trackIds){u[f]=this.popStack()}if(this.stringParams){o[f]=this.popStack();s[f]=this.popStack()}}if(l){i.args=this.source.generateArray(n)}if(this.trackIds){i.ids=this.source.generateArray(u)}if(this.stringParams){i.types=this.source.generateArray(o);i.contexts=this.source.generateArray(s)}if(this.options.data){i.data="data"}if(this.useBlockParams){i.blockParams="blockParams"}return i},"setupParams"),setupHelperArgs:a(function e(t,r,n,i){var s=this.setupParams(t,r,n);s.loc=JSON.stringify(this.source.currentLocation);s=this.objectLiteral(s);if(i){this.useRegister("options");n.push("options");return["options=",s]}else if(n){n.push(s);return""}else{return s}},"setupHelperArgs")};(function(){var e="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" ");var t=hN.RESERVED_WORDS={};for(var r=0,n=e.length;r<n;r++){t[e[r]]=true}})();hN.isValidJavaScriptVariableName=function(e){return!hN.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)};function pLn(e,t,r,n){var i=t.popStack(),s=0,o=r.length;if(e){o--}for(;s<o;s++){i=t.nameLookup(i,r[s],n)}if(e){return[t.aliasable("container.strict"),"(",i,", ",t.quotedString(r[s]),", ",JSON.stringify(t.source.currentLocation)," )"]}else{return i}}a(pLn,"strictLookup");UZ["default"]=hN;fkt.exports=UZ["default"]});var ykt=y(($Z,gkt)=>{"use strict";$Z.__esModule=true;function tB(e){return e&&e.__esModule?e:{"default":e}}a(tB,"_interopRequireDefault");var fLn=v3t();var mLn=tB(fLn);var hLn=EIe();var gLn=tB(hLn);var HIe=I3t();var VIe=F3t();var yLn=mkt();var _Ln=tB(yLn);var vLn=PZ();var ELn=tB(vLn);var bLn=gIe();var SLn=tB(bLn);var ALn=mLn["default"].create;function hkt(){var e=ALn();e.compile=function(t,r){return VIe.compile(t,r,e)};e.precompile=function(t,r){return VIe.precompile(t,r,e)};e.AST=gLn["default"];e.Compiler=VIe.Compiler;e.JavaScriptCompiler=_Ln["default"];e.Parser=HIe.parser;e.parse=HIe.parse;e.parseWithoutProcessing=HIe.parseWithoutProcessing;return e}a(hkt,"create");var gN=hkt();gN.create=hkt;SLn["default"](gN);gN.Visitor=ELn["default"];gN["default"]=gN;$Z["default"]=gN;gkt.exports=$Z["default"]});var _kt=y(jZ=>{"use strict";jZ.__esModule=true;jZ.print=xLn;jZ.PrintVisitor=oo;function CLn(e){return e&&e.__esModule?e:{"default":e}}a(CLn,"_interopRequireDefault");var wLn=PZ();var TLn=CLn(wLn);function xLn(e){return new oo().accept(e)}a(xLn,"print");function oo(){this.padding=0}a(oo,"PrintVisitor");oo.prototype=new TLn["default"];oo.prototype.pad=function(e){var t="";for(var r=0,n=this.padding;r<n;r++){t+=" "}t+=e+"\n";return t};oo.prototype.Program=function(e){var t="",r=e.body,n=void 0,i=void 0;if(e.blockParams){var s="BLOCK PARAMS: [";for(n=0,i=e.blockParams.length;n<i;n++){s+=" "+e.blockParams[n]}s+=" ]";t+=this.pad(s)}for(n=0,i=r.length;n<i;n++){t+=this.accept(r[n])}this.padding--;return t};oo.prototype.MustacheStatement=function(e){return this.pad("{{ "+this.SubExpression(e)+" }}")};oo.prototype.Decorator=function(e){return this.pad("{{ DIRECTIVE "+this.SubExpression(e)+" }}")};oo.prototype.BlockStatement=oo.prototype.DecoratorBlock=function(e){var t="";t+=this.pad((e.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:");this.padding++;t+=this.pad(this.SubExpression(e));if(e.program){t+=this.pad("PROGRAM:");this.padding++;t+=this.accept(e.program);this.padding--}if(e.inverse){if(e.program){this.padding++}t+=this.pad("{{^}}");this.padding++;t+=this.accept(e.inverse);this.padding--;if(e.program){this.padding--}}this.padding--;return t};oo.prototype.PartialStatement=function(e){var t="PARTIAL:"+e.name.original;if(e.params[0]){t+=" "+this.accept(e.params[0])}if(e.hash){t+=" "+this.accept(e.hash)}return this.pad("{{> "+t+" }}")};oo.prototype.PartialBlockStatement=function(e){var t="PARTIAL BLOCK:"+e.name.original;if(e.params[0]){t+=" "+this.accept(e.params[0])}if(e.hash){t+=" "+this.accept(e.hash)}t+=" "+this.pad("PROGRAM:");this.padding++;t+=this.accept(e.program);this.padding--;return this.pad("{{> "+t+" }}")};oo.prototype.ContentStatement=function(e){return this.pad("CONTENT[ '"+e.value+"' ]")};oo.prototype.CommentStatement=function(e){return this.pad("{{! '"+e.value+"' }}")};oo.prototype.SubExpression=function(e){var t=e.params,r=[],n=void 0;for(var i=0,s=t.length;i<s;i++){r.push(this.accept(t[i]))}t="["+r.join(", ")+"]";n=e.hash?" "+this.accept(e.hash):"";return this.accept(e.path)+" "+t+n};oo.prototype.PathExpression=function(e){var t=e.parts.join("/");return(e.data?"@":"")+"PATH:"+t};oo.prototype.StringLiteral=function(e){return'"'+e.value+'"'};oo.prototype.NumberLiteral=function(e){return"NUMBER{"+e.value+"}"};oo.prototype.BooleanLiteral=function(e){return"BOOLEAN{"+e.value+"}"};oo.prototype.UndefinedLiteral=function(){return"UNDEFINED"};oo.prototype.NullLiteral=function(){return"NULL"};oo.prototype.Hash=function(e){var t=e.pairs,r=[];for(var n=0,i=t.length;n<i;n++){r.push(this.accept(t[n]))}return"HASH{"+r.join(", ")+"}"};oo.prototype.HashPair=function(e){return e.key+"="+this.accept(e.value)}});var Skt=y((tBs,bkt)=>{var GZ=ykt()["default"];var Ekt=_kt();GZ.PrintVisitor=Ekt.PrintVisitor;GZ.print=Ekt.print;bkt.exports=GZ;function vkt(e,t){var r=require("fs");var n=r.readFileSync(t,"utf8");e.exports=GZ.compile(n)}a(vkt,"extension");if(typeof require!=="undefined"&&require.extensions){require.extensions[".handlebars"]=vkt;require.extensions[".hbs"]=vkt}});var zIe=y(HZ=>{"use strict";Object.defineProperty(HZ,"__esModule",{value:true});HZ.assert=void 0;var RLn=require("assert");function OLn(e,t){if(e===false)throw new RLn.AssertionError({message:t})}a(OLn,"assert");HZ.assert=OLn});var mb=y(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:true});Ui.assertAstFunctionBody=Ui.assertAstFunctionCall=Ui.assertAstTemplateString=Ui.assertAstLiteral=Ui.assertAstArray=Ui.assertAstProperty=Ui.assertAstObject=Ui.isAstIdentifier=Ui.isAstFunctionBody=Ui.isAstFunctionCall=Ui.isAstTemplateString=Ui.isAstLiteral=Ui.isAstArray=Ui.isAstProperty=Ui.isAstObject=Ui.SyntaxType=void 0;var fg;(function(e){e["Object"]="Object";e["Property"]="Property";e["Array"]="Array";e["Literal"]="Literal";e["TemplateString"]="TemplateString";e["Identifier"]="Identifier";e["FunctionCall"]="FunctionCall";e["FunctionBody"]="FunctionBody"})(fg||(Ui.SyntaxType=fg={}));function Akt(e){return e.type===fg.Object}a(Akt,"isAstObject");Ui.isAstObject=Akt;function Ckt(e){return e.type===fg.Property}a(Ckt,"isAstProperty");Ui.isAstProperty=Ckt;function wkt(e){return e.type===fg.Array}a(wkt,"isAstArray");Ui.isAstArray=wkt;function Tkt(e){return e.type===fg.Literal}a(Tkt,"isAstLiteral");Ui.isAstLiteral=Tkt;function xkt(e){return e.type===fg.TemplateString}a(xkt,"isAstTemplateString");Ui.isAstTemplateString=xkt;function Rkt(e){return e.type===fg.FunctionCall}a(Rkt,"isAstFunctionCall");Ui.isAstFunctionCall=Rkt;function Okt(e){return e.type===fg.FunctionBody}a(Okt,"isAstFunctionBody");Ui.isAstFunctionBody=Okt;function PLn(e){return e.type===fg.Identifier}a(PLn,"isAstIdentifier");Ui.isAstIdentifier=PLn;function NLn(e){if(e===void 0){throw new Error("Node is undefined")}if(!Akt(e)){throw new Error("Node is not object")}}a(NLn,"assertAstObject");Ui.assertAstObject=NLn;function ILn(e){if(e===void 0){throw new Error("Node is undefined")}if(!Ckt(e)){throw new Error("Node is not property")}}a(ILn,"assertAstProperty");Ui.assertAstProperty=ILn;function kLn(e){if(e===void 0){throw new Error("Node is undefined")}if(!wkt(e)){throw new Error("Node is not array")}}a(kLn,"assertAstArray");Ui.assertAstArray=kLn;function DLn(e){if(e===void 0){throw new Error("Node is undefined")}if(!Tkt(e)){throw new Error("Node is not literal")}}a(DLn,"assertAstLiteral");Ui.assertAstLiteral=DLn;function LLn(e){if(e===void 0){throw new Error("Node is undefined")}if(!xkt(e)){throw new Error("Node is not literal")}}a(LLn,"assertAstTemplateString");Ui.assertAstTemplateString=LLn;function FLn(e){if(e===void 0){throw new Error("Node is undefined")}if(!Rkt(e)){throw new Error("Node is not function")}}a(FLn,"assertAstFunctionCall");Ui.assertAstFunctionCall=FLn;function BLn(e){if(e===void 0){throw new Error("Node is undefined")}if(!Okt(e)){throw new Error("Node is not function")}}a(BLn,"assertAstFunctionBody");Ui.assertAstFunctionBody=BLn});var KIe=y(VZ=>{"use strict";Object.defineProperty(VZ,"__esModule",{value:true});VZ.parse=void 0;var MLn=require("jsonc-parser");var qLn={DEFAULT:{allowTrailingComma:false}};function ULn(e,t=[],r=qLn.DEFAULT){let n={type:"array",offset:-1,length:-1,line:-1,column:-1,children:[],parent:void 0};function i(l){if(n.type==="property"){n.length=l-n.offset;n=n.parent}}a(i,"ensurePropertyComplete");function s(l){n.children?.push(l);return l}a(s,"onValue");const o={onObjectBegin:(l,c,d)=>{n=s({type:"object",offset:l,length:-1,line:c+1,column:d+1,parent:n,children:[]})},onObjectProperty:(l,c,d,p,f)=>{n=s({type:"property",offset:c,length:-1,line:p+1,column:f+1,parent:n,children:[]});n.children?.push({type:"string",value:l,offset:c,length:d,line:p,column:f,parent:n})},onObjectEnd:(l,c)=>{i(l+c);n.length=l+c-n.offset;n=n.parent;i(l+c)},onArrayBegin:(l,c,d,p)=>{n=s({type:"array",offset:l,length:-1,line:d+1,column:p+1,parent:n,children:[]})},onArrayEnd:(l,c)=>{n.length=l+c-n.offset;n=n.parent;i(l+c)},onLiteralValue:(l,c,d,p,f)=>{s({type:$Ln(l),offset:c,length:d,line:p+1,column:f+1,parent:n,value:l});i(c+d)},onSeparator:(l,c)=>{if(n.type==="property"){if(l===":"){n.colonOffset=c}else if(l===","){i(c)}}},onError:(l,c,d,p,f)=>{t.push({error:l,offset:c,length:d,line:p+1,column:f+1})}};(0,MLn.visit)(e,o,r);const u=n.children[0];if(u){delete u.parent}return u}a(ULn,"parse");VZ.parse=ULn;function $Ln(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(!e){return"null"}else if(Array.isArray(e)){return"array"}return"object"}default:return"null"}}a($Ln,"getNodeType")});var Pkt=y(zZ=>{"use strict";Object.defineProperty(zZ,"__esModule",{value:true});zZ.AstAdapter=void 0;var jLn=zIe();var rB=mb();var GLn=KIe();var WIe=class{static{a(this,"AstAdapter")}parse(t){const r=[];const n=(0,GLn.parse)(t,r);if(n){return this.parseNode(n,void 0)}else{throw new Error("Failed to parse JSON")}}convert(t){return this.parseNode(t,void 0)}parseNode(t,r){switch(t.type){case"object":return this.createObject(t,r);case"array":return this.createArray(t,r);case"property":return this.createProperty(t,r);case"string":return this.createLiteral(t,r);case"number":return this.createLiteral(t,r);case"boolean":return this.createLiteral(t,r);case"null":return this.createLiteral(t,r)}}createLiteral(t,r){return{type:rB.SyntaxType.Literal,location:{line:t.line,column:t.column},parent:r,value:t.type==="null"?null:t.value}}createObject(t,r){const n={type:rB.SyntaxType.Object,children:[],parent:r,location:{line:t.line,column:t.column}};t.children?.forEach(i=>{n.children.push(this.parseNode(i,n))});return n}createProperty(t,r){(0,jLn.assert)(t.children?.length===2,"Invalid property node");const n={type:rB.SyntaxType.Property,location:{line:t.line,column:t.column},parent:r,name:null,value:null};n.name={value:t.children[0].value,location:{line:t.line,column:t.column},type:rB.SyntaxType.Identifier,parent:n};n.value=this.parseNode(t.children[1],n);return n}createArray(t,r){const n={type:rB.SyntaxType.Array,location:{line:t.line,column:t.column},parent:r,children:[]};t.children?.forEach(i=>n.children.push(this.parseNode(i,n)));return n}};zZ.AstAdapter=WIe});var KZ=y(nB=>{"use strict";Object.defineProperty(nB,"__esModule",{value:true});nB.factory=void 0;var yN=mb();nB.factory={createLiteral:(e,t)=>({type:yN.SyntaxType.Literal,parent:t,value:e}),createTemplateString:(e,t)=>({type:yN.SyntaxType.TemplateString,parent:t,value:e}),createIdentifier:(e,t)=>({type:yN.SyntaxType.Identifier,value:e,parent:t}),createProperty:(e,t,r)=>{const n={type:yN.SyntaxType.Property,parent:r,name:null,value:t};n.name={value:e,type:yN.SyntaxType.Identifier,parent:n};n.value.parent=n;return n},createArrayOfLiterals:(e,t)=>{const r={type:yN.SyntaxType.Array,parent:t,children:[]};for(const n of e){r.children.push(nB.factory.createLiteral(n,r))}return r}}});var Nkt=y(WZ=>{"use strict";Object.defineProperty(WZ,"__esModule",{value:true});WZ.SourceGenerator=void 0;var kC=mb();var YIe=class{static{a(this,"SourceGenerator")}generate(t){const r=[];this.generateSource(r,t);return r.join("")}generateSource(t,r){switch(r.type){case kC.SyntaxType.Array:return this.generateArray(t,r);case kC.SyntaxType.Object:return this.generateObject(t,r);case kC.SyntaxType.Property:return this.generateProperty(t,r);case kC.SyntaxType.Literal:return this.generateLiteral(t,r);case kC.SyntaxType.FunctionCall:return this.generateFunctionCall(t,r);case kC.SyntaxType.FunctionBody:return this.generateFunctionBody(t,r);case kC.SyntaxType.TemplateString:return this.generateTemplateString(t,r)}}generateArray(t,r){t.push("[");r.children.map(n=>{this.generateSource(t,n);t.push(",")});t.push("]")}generateObject(t,r){t.push("{");r.children.forEach(n=>{this.generateSource(t,n);t.push(",")});t.push("}")}generateProperty(t,r){const n=r.name.value;const i=n.search(/(\/|\\|-|\+|@|#|%|\^|&|\*|:|\.)/g)<0?n:`'${n}'`;t.push(i);t.push(":");this.generateSource(t,r.value)}generateFunctionCall(t,r){t.push(r.name.value);t.push("(");r.children.forEach((n,i,s)=>{this.generateSource(t,n);if(i<s.length){t.push(",")}});t.push(")")}generateFunctionBody(t,r){t.push(r.value)}generateTemplateString(t,r){t.push("`");t.push(r.value.replaceAll("`","\\`"));t.push("`")}generateLiteral(t,r){if(r.value===null){return t.push(`null`)}switch(typeof r.value){case"number":case"boolean":return t.push(`${r.value}`);case"string":{const n=r.value;const i=JSON.stringify(n);return t.push(`${i}`)}}}};WZ.SourceGenerator=YIe});var Ikt=y(_N=>{"use strict";var HLn=_N&&_N.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(_N,"__esModule",{value:true});_N.getJSFileExports=void 0;var VLn=require("@swc/core");var zLn=HLn(require("fs/promises"));var KLn=a(async e=>{const t=new Set;try{const r=await zLn.default.readFile(e,"utf-8");const n=await(0,VLn.parse)(r,{syntax:"typescript"});n.body.forEach(i=>{if(i.type==="ExportDefaultDeclaration"){t.add("default")}else if(i.type==="ExportDeclaration"&&i.declaration.type==="FunctionDeclaration"){t.add(i.declaration.identifier.value)}else if(i.type==="ExportDeclaration"&&i.declaration.type==="VariableDeclaration"&&i.declaration.declarations[0].id.type==="Identifier"){t.add(i.declaration.declarations[0].id.value)}})}catch(r){return null}return t},"getJSFileExports");_N.getJSFileExports=KLn});var kkt=y((gBs,WLn)=>{WLn.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/fragments.schema.json",$defs:{corsPolicyConfiguration:{type:"object",required:["name","allowedOrigins"],additionalProperties:false,properties:{name:{type:"string",pattern:"^[0-9a-z-]+$"},allowCredentials:{type:"boolean"},maxAge:{type:"number"},allowedOrigins:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},allowedMethods:{oneOf:[{type:"array",items:{$ref:"fragments.schema.json#/$defs/httpMethod"}},{type:"string"}]},allowedHeaders:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},exposeHeaders:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]}}},handlerDefinition:{type:"object",properties:{module:{type:"string",pattern:"^\\$import\\([^ )]*?\\)$"},export:{type:"string"},options:{type:"object",additionalProperties:true}},additionalProperties:false,required:["module","export"]},httpMethod:{type:"string",enum:["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"]}}}});var Dkt=y((yBs,YLn)=>{YLn.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/policies.schema.json",title:"Policies Config File",type:"object",additionalProperties:false,properties:{policies:{type:"array",items:{$ref:"policy-configuration.schema.json"}},corsPolicies:{type:"array",items:{$ref:"fragments.schema.json#/$defs/corsPolicyConfiguration"}}}}});var Lkt=y((_Bs,XLn)=>{XLn.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/policy-configuration.schema.json",title:"Policy Configuration Fragment",type:"object",required:["name","policyType","handler"],additionalProperties:false,properties:{name:{type:"string",pattern:"^[0-9a-z-]+$"},policyType:{type:"string"},handler:{$ref:"fragments.schema.json#/$defs/handlerDefinition"},options:{type:"object",additionalProperties:true}}}});var Fkt=y((vBs,JLn)=>{JLn.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/route-configuration-open-api.schema.json",title:"Open API Route Configuration Fragment",description:"These are the properties that can appear under the x-zuplo-route extension in a PathObject in Open API. It's a subset of what can appear in Zuplo's routes.json.",type:"object",required:["handler"],additionalProperties:false,properties:{label:{type:"string",description:"An internal user-friendly identifier of the route."},key:{type:"string",deprecated:true},handler:{$ref:"fragments.schema.json#/$defs/handlerDefinition"},corsPolicy:{type:"string",pattern:"^[0-9a-z-]+$"},custom:{},policies:{type:"object",additionalProperties:false,properties:{inbound:{type:"array",items:{type:"string",pattern:"^[0-9a-z-]+$"}},outbound:{type:"array",items:{type:"string",pattern:"^[0-9a-z-]+$"}}}},tags:{type:"array",items:{type:"string"}}}}});var Bkt=y((EBs,QLn)=>{QLn.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/route-configuration.schema.json",title:"Route Configuration Fragment",description:"",type:"object",required:["path","methods","handler","version"],additionalProperties:false,$defs:{corsPolicy:{type:"string",pattern:"^[0-9a-z-]+$"}},properties:{operationId:{type:"string"},path:{type:"string",pattern:"^/[^\\s]*$"},methods:{type:"array",items:{$ref:"fragments.schema.json#/$defs/httpMethod"}},label:{type:"string",description:"An internal user-friendly identifier of the route."},enforceOpenApi:{type:"boolean",description:"If true, schema validation found in the OpenAPI spec will be enforced on requests/responses."},key:{type:"string",deprecated:true},handler:{$ref:"fragments.schema.json#/$defs/handlerDefinition"},corsPolicy:{$ref:"#/$defs/corsPolicy"},custom:{},version:{type:"string",pattern:"^[0-9a-z-]+$"},policies:{type:"object",additionalProperties:false,properties:{inbound:{type:"array",items:{type:"string",pattern:"^[0-9a-z-]+$"}},outbound:{type:"array",items:{type:"string",pattern:"^[0-9a-z-]+$"}}}},summary:{type:"string"},description:{type:"string"},excludeFromOpenApi:{type:"boolean"},tags:{type:"array",items:{type:"string"}}}}});var Mkt=y((bBs,ZLn)=>{ZLn.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/routes.schema.json",title:"Route Config File",type:"object",additionalProperties:false,required:["routes","versions"],$defs:{info:{type:"object",required:["title","version"],properties:{title:{type:"string"},summary:{type:"string"},description:{type:"string"},termsOfService:{type:"string",format:"uri"},version:{type:"string"}}},versionData:{type:"object",required:["name","pathPrefix"],additionalProperties:false,properties:{name:{type:"string",pattern:"^[0-9a-z-]+$"},pathPrefix:{type:"string",pattern:"(^$|^/[^\\s]*$)"},info:{$ref:"#/$defs/info"},openApiFile:{description:"The project relative path to the OpenAPI spec.",type:"string"},excludeFromOpenApi:{type:"boolean",description:"If false, OpenAPI documentation will not be generated for this version. If openApiFile is set this setting is ignored."},enforceOpenApi:{type:"boolean",description:"If true, schema validation found in the OpenAPI spec will be enforced on requests/responses."}}}},properties:{$schema:{type:"string"},versions:{type:"array",minItems:1,items:{$ref:"#/$defs/versionData"}},routes:{type:"array",minItems:0,items:{$ref:"route-configuration.schema.json"}},policies:{type:"array",items:{$ref:"policy-configuration.schema.json"}},corsPolicies:{type:"array",items:{$ref:"fragments.schema.json#/$defs/corsPolicyConfiguration"}},requestErrorHandler:{$ref:"fragments.schema.json#/$defs/handlerDefinition"}}}});var YZ=y(mg=>{"use strict";var vN=mg&&mg.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(mg,"__esModule",{value:true});mg.policiesConfigurationValidatorFn=mg.openAPIRouteConfigurationValidatorFn=mg.routeConfigurationValidatorFn=void 0;var eFn=hn();var tFn=vN(kkt());var qkt=vN(Dkt());var rFn=vN(Lkt());var Ukt=vN(Fkt());var $kt=vN(Bkt());var nFn=vN(Mkt());var My=eFn.JsonValidator.instance;My.addSchema(nFn.default,"routes.schema.json");My.addSchema($kt.default,"route-configuration.schema.json");My.addSchema(rFn.default,"policy-configuration.schema.json");My.addSchema(qkt.default,"policies.schema.json");My.addSchema(Ukt.default,"open-api-route-configuration.schema.json");My.addSchema(tFn.default,"fragments.schema.json");mg.routeConfigurationValidatorFn=My.compile($kt.default);mg.openAPIRouteConfigurationValidatorFn=My.compile(Ukt.default);mg.policiesConfigurationValidatorFn=My.compile(qkt.default)});var jkt=y(XZ=>{"use strict";Object.defineProperty(XZ,"__esModule",{value:true});XZ.PoliciesConfigurationValidator=void 0;var iFn=YZ();var XIe=class{static{a(this,"PoliciesConfigurationValidator")}results;validate(t){this.results=(0,iFn.policiesConfigurationValidatorFn)(t);return this.results}};XZ.PoliciesConfigurationValidator=XIe});var Gkt=y(EN=>{"use strict";Object.defineProperty(EN,"__esModule",{value:true});EN.OpenAPIGlobalValidator=EN.OpenAPILocalizedValidator=void 0;var sFn=YZ();var JIe=class{static{a(this,"OpenAPILocalizedValidator")}results;validate(t){this.results=(0,sFn.openAPIRouteConfigurationValidatorFn)(t);return this.results}};EN.OpenAPILocalizedValidator=JIe;var QIe=class{static{a(this,"OpenAPIGlobalValidator")}validate(t){return[]}};EN.OpenAPIGlobalValidator=QIe});var t3e=y(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:true});Td.testPosition=Td.CodeGenError=Td.JSON_ENV_REGEX=Td.JSON_IMPORT_REGEX=Td.ROUTE_ENV_REGEX=Td.ROUTE_IMPORT_REGEX=void 0;var ZIe=mb();Td.ROUTE_IMPORT_REGEX=/\$import\((.*)\)/;Td.ROUTE_ENV_REGEX=/\$env\((.*?)\)/g;Td.JSON_IMPORT_REGEX=/require\("(.*)"\)/;Td.JSON_ENV_REGEX=/\${environment.(.*)}/;var e3e=class extends Error{static{a(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:""}}};Td.CodeGenError=e3e;var aFn=a(e=>{const t=[];let r=e;while(r.parent){t.push(r);r=r.parent}return t.reverse()},"invertTree");var oFn=a((e,t)=>{if(!e){return false}const r=aFn(e);const n=t.split("/");const i=n.every((s,o)=>{const u=r[o];if(!u){return false}if(s==="*"){return true}else if((0,ZIe.isAstProperty)(u)&&u.name.value===s){return true}else if(s==="{}"){return u.type===ZIe.SyntaxType.Object}else if(s==="[]"){return u.type===ZIe.SyntaxType.Array}return false});return i},"testPosition");Td.testPosition=oFn});var Hkt=y(SN=>{"use strict";Object.defineProperty(SN,"__esModule",{value:true});SN.getEnvStatementTransformer=SN.AstTransformer=void 0;var bN=mb();var uFn=KZ();var iB=t3e();var r3e=class{static{a(this,"AstTransformer")}errors=[];transform(t){this.visitor(t);return t}visitor(t){this.visit(t);if((0,bN.isAstObject)(t)){t.children.forEach(r=>{this.visitor(r)})}else if((0,bN.isAstArray)(t)){t.children.forEach(r=>{this.visitor(r)})}else if((0,bN.isAstProperty)(t)){this.visitor(t.value)}}};SN.AstTransformer=r3e;var lFn=a((e,t,r)=>n=>{if(!(0,bN.isAstProperty)(n)||!(0,bN.isAstLiteral)(n.value)||typeof n.value.value!=="string"){return}if(!e.some(s=>(0,iB.testPosition)(n,s))){if(iB.ROUTE_ENV_REGEX.test(n.value.value)){t.push(new iB.CodeGenError(`An $env() statement is not expected at this location.`,r,n.location,n.value.value))}return}const i=new RegExp(iB.ROUTE_ENV_REGEX).exec(n.value.value);if(i?.length===2&&i[0]===n.value.value){const s={type:bN.SyntaxType.FunctionBody,parent:null,value:`environment["${i[1]}"]`};n.value=s}else{const s=n.value.value.replaceAll(new RegExp(iB.ROUTE_ENV_REGEX),(o,u)=>{return`\${environment["${u}"] ? environment["${u}"] : ""}`});if(s!==n.value.value){n.value=uFn.factory.createTemplateString(s,n)}}},"getEnvStatementTransformer");SN.getEnvStatementTransformer=lFn});var Wkt=y(AN=>{"use strict";var cFn=AN&&AN.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(AN,"__esModule",{value:true});AN.OpenAPIRoutesFragmentAstTransformer=void 0;var dFn=cFn(require("path"));var zf=mb();var n3e=KZ();var Vkt=Hkt();var Ch=t3e();var sB="config/routes.json";var pFn=["handler/{}/options/*","policies/[]/{}/handler/{}/options/*","corsPolicies/[]/{}/*"];var fFn=["handler/{}/module","handler/{}/options/{}/policies/{}/inbound/[]/{}/module","handler/{}/options/{}/policies/{}/outbound/[]/{}/module","policies/[]/{}/handler/{}/module","policies/[]/{}/handler/{}/options/{}/identifier/{}/module","policies/[]/{}/handler/{}/options/{}/validator"];var zkt=["handler/{}/options/*","policies/[]/{}/handler/{}/options/*"];var mFn="handler/{}/options/{}/rewritePattern";var hFn="handler/{}/options/{}/baseUrl";var i3e=class extends Vkt.AstTransformer{static{a(this,"OpenAPIRoutesFragmentAstTransformer")}visit(t){this.rewriteHandlerFunction(t);this.rewriteForwardFunction(t);this.replaceImportStatements(t);this.replaceEnvStatements(t)}rewriteHandlerFunction(t){if(!(0,zf.isAstProperty)(t)||!(0,zf.isAstLiteral)(t.value)||typeof t.value.value!=="string"){return}if((0,Ch.testPosition)(t,mFn)){if(!t.parent||!(0,zf.isAstObject)(t.parent)){this.errors.push(new Ch.CodeGenError(`Invalid node, expected object`,sB,t.parent?t.parent.location:t.location,void 0));return}const r=t.value.value;const n={type:zf.SyntaxType.FunctionBody,parent:null,value:Kkt(r)};const i=n3e.factory.createProperty("__rewriteFunction",n,t);t.parent.children.push(i)}}rewriteForwardFunction(t){if(!(0,zf.isAstProperty)(t)||!(0,zf.isAstLiteral)(t.value)||typeof t.value.value!=="string"){return}if((0,Ch.testPosition)(t,hFn)){if(!t.parent||!(0,zf.isAstObject)(t.parent)){this.errors.push(new Ch.CodeGenError(`Invalid node, expected object`,sB,t.parent?t.parent.location:t.location,void 0));return}const r=t.value.value;const n={type:zf.SyntaxType.FunctionBody,parent:null,value:Kkt(r)};const i=n3e.factory.createProperty("__rewriteFunction",n,t);t.parent.children.push(i)}}replaceImportStatements(t){if(!(0,zf.isAstProperty)(t)||!(0,zf.isAstLiteral)(t.value)){return}const r=t.value.value;if(typeof r!=="string"){return}if(!fFn.some(o=>(0,Ch.testPosition)(t,o))&&!zkt.some(o=>(0,Ch.testPosition)(t,o))){if(Ch.ROUTE_IMPORT_REGEX.test(r)){if(t.name.value==="$ref"){return}this.errors.push(new Ch.CodeGenError(`An $import() statement is not expected at this location.`,sB,t.location,r))}return}const n=Ch.ROUTE_IMPORT_REGEX.exec(r);if(zkt.some(o=>(0,Ch.testPosition)(t,o))&&!n){return}if(!n){this.errors.push(new Ch.CodeGenError(`Invalid $import() statement`,sB,t.location,r));return}let i=n[1];if(i.startsWith(".")){i=dFn.default.join("..",i)}const s={name:null,type:zf.SyntaxType.FunctionCall,parent:t.parent,children:[]};s.name={value:"require",type:zf.SyntaxType.Identifier,parent:s};s.children.push(n3e.factory.createLiteral(i,s));t.value=s}replaceEnvStatements=(0,Vkt.getEnvStatementTransformer)(pFn,this.errors,sB)};AN.OpenAPIRoutesFragmentAstTransformer=i3e;function Kkt(e){return`(request, context) => {
459
+ deps: ${r}}`};var w4n={keyword:"dependencies",type:"object",schemaType:"object",error:lg.error,code(e){const[t,r]=T4n(e);aNt(e,t);oNt(e,r)}};function T4n({schema:e}){const t={};const r={};for(const n in e){if(n==="__proto__")continue;const i=Array.isArray(e[n])?t:r;i[n]=e[n]}return[t,r]}a(T4n,"splitDependencies");function aNt(e,t=e.schema){const{gen:r,data:n,it:i}=e;if(Object.keys(t).length===0)return;const s=r.let("missing");for(const o in t){const u=t[o];if(u.length===0)continue;const l=(0,L7.propertyInData)(r,n,o,i.opts.ownProperties);e.setParams({property:o,depsCount:u.length,deps:u.join(", ")});if(i.allErrors){r.if(l,()=>{for(const c of u){(0,L7.checkReportMissingProp)(e,c)}})}else{r.if((0,oNe._)`${l} && (${(0,L7.checkMissingProp)(e,u,s)})`);(0,L7.reportMissingProp)(e,s);r.else()}}}a(aNt,"validatePropertyDeps");lg.validatePropertyDeps=aNt;function oNt(e,t=e.schema){const{gen:r,data:n,keyword:i,it:s}=e;const o=r.name("valid");for(const u in t){if((0,C4n.alwaysValidSchema)(s,t[u]))continue;r.if((0,L7.propertyInData)(r,n,u,s.opts.ownProperties),()=>{const l=e.subschema({keyword:i,schemaProp:u},o);e.mergeValidEvaluated(l,o)},()=>r.var(o,true));e.ok(o)}}a(oNt,"validateSchemaDeps");lg.validateSchemaDeps=oNt;lg.default=w4n});var lNt=y(uNe=>{"use strict";Object.defineProperty(uNe,"__esModule",{value:true});var uNt=_n();var x4n=pi();var R4n={message:"property name must be valid",params:({params:e})=>(0,uNt._)`{propertyName: ${e.propertyName}}`};var O4n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:R4n,code(e){const{gen:t,schema:r,data:n,it:i}=e;if((0,x4n.alwaysValidSchema)(i,r))return;const s=t.name("valid");t.forIn("key",n,o=>{e.setParams({propertyName:o});e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:true},s);t.if((0,uNt.not)(s),()=>{e.error(true);if(!i.allErrors)t.break()})});e.ok(s)}};uNe.default=O4n});var cNe=y(lNe=>{"use strict";Object.defineProperty(lNe,"__esModule",{value:true});var JQ=Uf();var Eh=_n();var P4n=qf();var QQ=pi();var N4n={message:"must NOT have additional properties",params:({params:e})=>(0,Eh._)`{additionalProperty: ${e.additionalProperty}}`};var I4n={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:true,trackErrors:true,error:N4n,code(e){const{gen:t,schema:r,parentSchema:n,data:i,errsCount:s,it:o}=e;if(!s)throw new Error("ajv implementation error");const{allErrors:u,opts:l}=o;o.props=true;if(l.removeAdditional!=="all"&&(0,QQ.alwaysValidSchema)(o,r))return;const c=(0,JQ.allSchemaProperties)(n.properties);const d=(0,JQ.allSchemaProperties)(n.patternProperties);p();e.ok((0,Eh._)`${s} === ${P4n.default.errors}`);function p(){t.forIn("key",i,_=>{if(!c.length&&!d.length)h(_);else t.if(f(_),()=>h(_))})}a(p,"checkAdditionalProperties");function f(_){let v;if(c.length>8){const S=(0,QQ.schemaRefOrVal)(o,n.properties,"properties");v=(0,JQ.isOwnProperty)(t,S,_)}else if(c.length){v=(0,Eh.or)(...c.map(S=>(0,Eh._)`${_} === ${S}`))}else{v=Eh.nil}if(d.length){v=(0,Eh.or)(v,...d.map(S=>(0,Eh._)`${(0,JQ.usePattern)(e,S)}.test(${_})`))}return(0,Eh.not)(v)}a(f,"isAdditional");function m(_){t.code((0,Eh._)`delete ${i}[${_}]`)}a(m,"deleteAdditional");function h(_){if(l.removeAdditional==="all"||l.removeAdditional&&r===false){m(_);return}if(r===false){e.setParams({additionalProperty:_});e.error();if(!u)t.break();return}if(typeof r=="object"&&!(0,QQ.alwaysValidSchema)(o,r)){const v=t.name("valid");if(l.removeAdditional==="failing"){g(_,v,false);t.if((0,Eh.not)(v),()=>{e.reset();m(_)})}else{g(_,v);if(!u)t.if((0,Eh.not)(v),()=>t.break())}}}a(h,"additionalPropertyCode");function g(_,v,S){const E={keyword:"additionalProperties",dataProp:_,dataPropType:QQ.Type.Str};if(S===false){Object.assign(E,{compositeRule:true,createErrors:false,allErrors:false})}e.subschema(E,v)}a(g,"applyAdditionalSchema")}};lNe.default=I4n});var pNt=y(pNe=>{"use strict";Object.defineProperty(pNe,"__esModule",{value:true});var k4n=YP();var cNt=Uf();var dNe=pi();var dNt=cNe();var D4n={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;if(s.opts.removeAdditional==="all"&&n.additionalProperties===void 0){dNt.default.code(new k4n.KeywordCxt(s,dNt.default,"additionalProperties"))}const o=(0,cNt.allSchemaProperties)(r);for(const p of o){s.definedProperties.add(p)}if(s.opts.unevaluated&&o.length&&s.props!==true){s.props=dNe.mergeEvaluated.props(t,(0,dNe.toHash)(o),s.props)}const u=o.filter(p=>!(0,dNe.alwaysValidSchema)(s,r[p]));if(u.length===0)return;const l=t.name("valid");for(const p of u){if(c(p)){d(p)}else{t.if((0,cNt.propertyInData)(t,i,p,s.opts.ownProperties));d(p);if(!s.allErrors)t.else().var(l,true);t.endIf()}e.it.definedProperties.add(p);e.ok(l)}function c(p){return s.opts.useDefaults&&!s.compositeRule&&r[p].default!==void 0}a(c,"hasDefault");function d(p){e.subschema({keyword:"properties",schemaProp:p,dataProp:p},l)}a(d,"applyPropertySchema")}};pNe.default=D4n});var gNt=y(fNe=>{"use strict";Object.defineProperty(fNe,"__esModule",{value:true});var fNt=Uf();var ZQ=_n();var mNt=pi();var hNt=pi();var L4n={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:i,it:s}=e;const{opts:o}=s;const u=(0,fNt.allSchemaProperties)(r);const l=u.filter(g=>(0,mNt.alwaysValidSchema)(s,r[g]));if(u.length===0||l.length===u.length&&(!s.opts.unevaluated||s.props===true)){return}const c=o.strictSchema&&!o.allowMatchingProperties&&i.properties;const d=t.name("valid");if(s.props!==true&&!(s.props instanceof ZQ.Name)){s.props=(0,hNt.evaluatedPropsToName)(t,s.props)}const{props:p}=s;f();function f(){for(const g of u){if(c)m(g);if(s.allErrors){h(g)}else{t.var(d,true);h(g);t.if(d)}}}a(f,"validatePatternProperties");function m(g){for(const _ in c){if(new RegExp(g).test(_)){(0,mNt.checkStrictMode)(s,`property ${_} matches pattern ${g} (use allowMatchingProperties)`)}}}a(m,"checkMatchingProperties");function h(g){t.forIn("key",n,_=>{t.if((0,ZQ._)`${(0,fNt.usePattern)(e,g)}.test(${_})`,()=>{const v=l.includes(g);if(!v){e.subschema({keyword:"patternProperties",schemaProp:g,dataProp:_,dataPropType:hNt.Type.Str},d)}if(s.opts.unevaluated&&p!==true){t.assign((0,ZQ._)`${p}[${_}]`,true)}else if(!v&&!s.allErrors){t.if((0,ZQ.not)(d),()=>t.break())}})})}a(h,"validateProperties")}};fNe.default=L4n});var yNt=y(mNe=>{"use strict";Object.defineProperty(mNe,"__esModule",{value:true});var F4n=pi();var B4n={keyword:"not",schemaType:["object","boolean"],trackErrors:true,code(e){const{gen:t,schema:r,it:n}=e;if((0,F4n.alwaysValidSchema)(n,r)){e.fail();return}const i=t.name("valid");e.subschema({keyword:"not",compositeRule:true,createErrors:false,allErrors:false},i);e.failResult(i,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};mNe.default=B4n});var _Nt=y(hNe=>{"use strict";Object.defineProperty(hNe,"__esModule",{value:true});var M4n=Uf();var q4n={keyword:"anyOf",schemaType:"array",trackErrors:true,code:M4n.validateUnion,error:{message:"must match a schema in anyOf"}};hNe.default=q4n});var vNt=y(gNe=>{"use strict";Object.defineProperty(gNe,"__esModule",{value:true});var eZ=_n();var U4n=pi();var $4n={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,eZ._)`{passingSchemas: ${e.passing}}`};var j4n={keyword:"oneOf",schemaType:"array",trackErrors:true,error:$4n,code(e){const{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;const s=r;const o=t.let("valid",false);const u=t.let("passing",null);const l=t.name("_valid");e.setParams({passing:u});t.block(c);e.result(o,()=>e.reset(),()=>e.error(true));function c(){s.forEach((d,p)=>{let f;if((0,U4n.alwaysValidSchema)(i,d)){t.var(l,true)}else{f=e.subschema({keyword:"oneOf",schemaProp:p,compositeRule:true},l)}if(p>0){t.if((0,eZ._)`${l} && ${o}`).assign(o,false).assign(u,(0,eZ._)`[${u}, ${p}]`).else()}t.if(l,()=>{t.assign(o,true);t.assign(u,p);if(f)e.mergeEvaluated(f,eZ.Name)})})}a(c,"validateOneOf")}};gNe.default=j4n});var ENt=y(yNe=>{"use strict";Object.defineProperty(yNe,"__esModule",{value:true});var G4n=pi();var H4n={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach((s,o)=>{if((0,G4n.alwaysValidSchema)(n,s))return;const u=e.subschema({keyword:"allOf",schemaProp:o},i);e.ok(i);e.mergeEvaluated(u)})}};yNe.default=H4n});var ANt=y(_Ne=>{"use strict";Object.defineProperty(_Ne,"__esModule",{value:true});var tZ=_n();var SNt=pi();var V4n={message:({params:e})=>(0,tZ.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,tZ._)`{failingKeyword: ${e.ifClause}}`};var z4n={keyword:"if",schemaType:["object","boolean"],trackErrors:true,error:V4n,code(e){const{gen:t,parentSchema:r,it:n}=e;if(r.then===void 0&&r.else===void 0){(0,SNt.checkStrictMode)(n,'"if" without "then" and "else" is ignored')}const i=bNt(n,"then");const s=bNt(n,"else");if(!i&&!s)return;const o=t.let("valid",true);const u=t.name("_valid");l();e.reset();if(i&&s){const d=t.let("ifClause");e.setParams({ifClause:d});t.if(u,c("then",d),c("else",d))}else if(i){t.if(u,c("then"))}else{t.if((0,tZ.not)(u),c("else"))}e.pass(o,()=>e.error(true));function l(){const d=e.subschema({keyword:"if",compositeRule:true,createErrors:false,allErrors:false},u);e.mergeEvaluated(d)}a(l,"validateIf");function c(d,p){return()=>{const f=e.subschema({keyword:d},u);t.assign(o,u);e.mergeValidEvaluated(f,o);if(p)t.assign(p,(0,tZ._)`${d}`);else e.setParams({ifClause:d})}}a(c,"validateClause")}};function bNt(e,t){const r=e.schema[t];return r!==void 0&&!(0,SNt.alwaysValidSchema)(e,r)}a(bNt,"hasSchema");_Ne.default=z4n});var CNt=y(vNe=>{"use strict";Object.defineProperty(vNe,"__esModule",{value:true});var K4n=pi();var W4n={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){if(t.if===void 0)(0,K4n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};vNe.default=W4n});var bNe=y(ENe=>{"use strict";Object.defineProperty(ENe,"__esModule",{value:true});var Y4n=rNe();var X4n=rNt();var J4n=nNe();var Q4n=iNt();var Z4n=sNt();var eDn=XQ();var tDn=lNt();var rDn=cNe();var nDn=pNt();var iDn=gNt();var sDn=yNt();var aDn=_Nt();var oDn=vNt();var uDn=ENt();var lDn=ANt();var cDn=CNt();function dDn(e=false){const t=[sDn.default,aDn.default,oDn.default,uDn.default,lDn.default,cDn.default,tDn.default,rDn.default,eDn.default,nDn.default,iDn.default];if(e)t.push(X4n.default,Q4n.default);else t.push(Y4n.default,J4n.default);t.push(Z4n.default);return t}a(dDn,"getApplicator");ENe.default=dDn});var wNt=y(SNe=>{"use strict";Object.defineProperty(SNe,"__esModule",{value:true});var vo=_n();var pDn={message:({schemaCode:e})=>(0,vo.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,vo._)`{format: ${e}}`};var fDn={keyword:"format",type:["number","string"],schemaType:"string",$data:true,error:pDn,code(e,t){const{gen:r,data:n,$data:i,schema:s,schemaCode:o,it:u}=e;const{opts:l,errSchemaPath:c,schemaEnv:d,self:p}=u;if(!l.validateFormats)return;if(i)f();else m();function f(){const h=r.scopeValue("formats",{ref:p.formats,code:l.code.formats});const g=r.const("fDef",(0,vo._)`${h}[${o}]`);const _=r.let("fType");const v=r.let("format");r.if((0,vo._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>r.assign(_,(0,vo._)`${g}.type || "string"`).assign(v,(0,vo._)`${g}.validate`),()=>r.assign(_,(0,vo._)`"string"`).assign(v,g));e.fail$data((0,vo.or)(S(),E()));function S(){if(l.strictSchema===false)return vo.nil;return(0,vo._)`${o} && !${v}`}a(S,"unknownFmt");function E(){const b=d.$async?(0,vo._)`(${g}.async ? await ${v}(${n}) : ${v}(${n}))`:(0,vo._)`${v}(${n})`;const A=(0,vo._)`(typeof ${v} == "function" ? ${b} : ${v}.test(${n}))`;return(0,vo._)`${v} && ${v} !== true && ${_} === ${t} && !${A}`}a(E,"invalidFmt")}a(f,"validate$DataFormat");function m(){const h=p.formats[s];if(!h){S();return}if(h===true)return;const[g,_,v]=E(h);if(g===t)e.pass(b());function S(){if(l.strictSchema===false){p.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${s}" ignored in schema at path "${c}"`}a(A,"unknownMsg")}a(S,"unknownFormat");function E(A){const C=A instanceof RegExp?(0,vo.regexpCode)(A):l.code.formats?(0,vo._)`${l.code.formats}${(0,vo.getProperty)(s)}`:void 0;const T=r.scopeValue("formats",{key:s,ref:A,code:C});if(typeof A=="object"&&!(A instanceof RegExp)){return[A.type||"string",A.validate,(0,vo._)`${T}.validate`]}return["string",A,T]}a(E,"getFormat");function b(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!d.$async)throw new Error("async format in sync schema");return(0,vo._)`await ${v}(${n})`}return typeof _=="function"?(0,vo._)`${v}(${n})`:(0,vo._)`${v}.test(${n})`}a(b,"validCondition")}a(m,"validateFormat")}};SNe.default=fDn});var CNe=y(ANe=>{"use strict";Object.defineProperty(ANe,"__esModule",{value:true});var mDn=wNt();var hDn=[mDn.default];ANe.default=hDn});var wNe=y(ZP=>{"use strict";Object.defineProperty(ZP,"__esModule",{value:true});ZP.contentVocabulary=ZP.metadataVocabulary=void 0;ZP.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];ZP.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var xNt=y(TNe=>{"use strict";Object.defineProperty(TNe,"__esModule",{value:true});var gDn=MPe();var yDn=eNe();var _Dn=bNe();var vDn=CNe();var TNt=wNe();var EDn=[gDn.default,yDn.default,(0,_Dn.default)(),vDn.default,TNt.metadataVocabulary,TNt.contentVocabulary];TNe.default=EDn});var RNt=y(F7=>{"use strict";Object.defineProperty(F7,"__esModule",{value:true});F7.DiscrError=void 0;var bDn;(function(e){e["Tag"]="tag";e["Mapping"]="mapping"})(bDn=F7.DiscrError||(F7.DiscrError={}))});var ONe=y(RNe=>{"use strict";Object.defineProperty(RNe,"__esModule",{value:true});var eN=_n();var xNe=RNt();var ONt=A7();var SDn=pi();var ADn={message:({params:{discrError:e,tagName:t}})=>e===xNe.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,eN._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`};var CDn={keyword:"discriminator",type:"object",schemaType:"object",error:ADn,code(e){const{gen:t,data:r,schema:n,parentSchema:i,it:s}=e;const{oneOf:o}=i;if(!s.opts.discriminator){throw new Error("discriminator: requires discriminator option")}const 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(!o)throw new Error("discriminator: requires oneOf keyword");const l=t.let("valid",false);const c=t.const("tag",(0,eN._)`${r}${(0,eN.getProperty)(u)}`);t.if((0,eN._)`typeof ${c} == "string"`,()=>d(),()=>e.error(false,{discrError:xNe.DiscrError.Tag,tag:c,tagName:u}));e.ok(l);function d(){const m=f();t.if(false);for(const h in m){t.elseIf((0,eN._)`${c} === ${h}`);t.assign(l,p(m[h]))}t.else();e.error(false,{discrError:xNe.DiscrError.Mapping,tag:c,tagName:u});t.endIf()}a(d,"validateMapping");function p(m){const h=t.name("valid");const g=e.subschema({keyword:"oneOf",schemaProp:m},h);e.mergeEvaluated(g,eN.Name);return h}a(p,"applyTagSchema");function f(){var m;const h={};const g=v(i);let _=true;for(let b=0;b<o.length;b++){let A=o[b];if((A===null||A===void 0?void 0:A.$ref)&&!(0,SDn.schemaHasRulesButRef)(A,s.self.RULES)){A=ONt.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,A===null||A===void 0?void 0:A.$ref);if(A instanceof ONt.SchemaEnv)A=A.schema}const C=(m=A===null||A===void 0?void 0:A.properties)===null||m===void 0?void 0:m[u];if(typeof C!="object"){throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${u}"`)}_=_&&(g||v(A));S(C,b)}if(!_)throw new Error(`discriminator: "${u}" must be required`);return h;function v({required:b}){return Array.isArray(b)&&b.includes(u)}a(v,"hasRequired");function S(b,A){if(b.const){E(b.const,A)}else if(b.enum){for(const C of b.enum){E(C,A)}}else{throw new Error(`discriminator: "properties/${u}" must have "const" or "enum"`)}}a(S,"addMappings");function E(b,A){if(typeof b!="string"||b in h){throw new Error(`discriminator: "${u}" values must be unique strings`)}h[b]=A}a(E,"addMapping")}a(f,"getMapping")}};RNe.default=CDn});var PNt=y((oFs,wDn)=>{wDn.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:true,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:true,readOnly:{type:"boolean",default:false},examples:{type:"array",items:true},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:true},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:false},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:true,enum:{type:"array",items:true,minItems:1,uniqueItems:true},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:true}]},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:true}});var kNt=y((Wa,INt)=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:true});Wa.MissingRefError=Wa.ValidationError=Wa.CodeGen=Wa.Name=Wa.nil=Wa.stringify=Wa.str=Wa._=Wa.KeywordCxt=void 0;var TDn=LPe();var xDn=xNt();var RDn=ONe();var NNt=PNt();var ODn=["/properties"];var rZ="http://json-schema.org/draft-07/schema";var nZ=class extends TDn.default{static{a(this,"Ajv")}_addVocabularies(){super._addVocabularies();xDn.default.forEach(t=>this.addVocabulary(t));if(this.opts.discriminator)this.addKeyword(RDn.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();if(!this.opts.meta)return;const t=this.opts.$data?this.$dataMetaSchema(NNt,ODn):NNt;this.addMetaSchema(t,rZ,false);this.refs["http://json-schema.org/schema"]=rZ}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(rZ)?rZ:void 0)}};INt.exports=Wa=nZ;Object.defineProperty(Wa,"__esModule",{value:true});Wa.default=nZ;var PDn=YP();Object.defineProperty(Wa,"KeywordCxt",{enumerable:true,get:function(){return PDn.KeywordCxt}});var tN=_n();Object.defineProperty(Wa,"_",{enumerable:true,get:function(){return tN._}});Object.defineProperty(Wa,"str",{enumerable:true,get:function(){return tN.str}});Object.defineProperty(Wa,"stringify",{enumerable:true,get:function(){return tN.stringify}});Object.defineProperty(Wa,"nil",{enumerable:true,get:function(){return tN.nil}});Object.defineProperty(Wa,"Name",{enumerable:true,get:function(){return tN.Name}});Object.defineProperty(Wa,"CodeGen",{enumerable:true,get:function(){return tN.CodeGen}});var NDn=b7();Object.defineProperty(Wa,"ValidationError",{enumerable:true,get:function(){return NDn.default}});var IDn=S7();Object.defineProperty(Wa,"MissingRefError",{enumerable:true,get:function(){return IDn.default}})});var NNe=y(B7=>{"use strict";Object.defineProperty(B7,"__esModule",{value:true});B7.dynamicAnchor=void 0;var PNe=_n();var kDn=qf();var DNt=A7();var DDn=GQ();var LDn={keyword:"$dynamicAnchor",schemaType:"string",code:e=>LNt(e,e.schema)};function LNt(e,t){const{gen:r,it:n}=e;n.schemaEnv.root.dynamicAnchors[t]=true;const i=(0,PNe._)`${kDn.default.dynamicAnchors}${(0,PNe.getProperty)(t)}`;const s=n.errSchemaPath==="#"?n.validateName:FDn(e);r.if((0,PNe._)`!${i}`,()=>r.assign(i,s))}a(LNt,"dynamicAnchor");B7.dynamicAnchor=LNt;function FDn(e){const{schemaEnv:t,schema:r,self:n}=e.it;const{root:i,baseId:s,localRefs:o,meta:u}=t.root;const{schemaId:l}=n.opts;const c=new DNt.SchemaEnv({schema:r,schemaId:l,root:i,baseId:s,localRefs:o,meta:u});DNt.compileSchema.call(n,c);return(0,DDn.getValidate)(e,c)}a(FDn,"_getValidate");B7.default=LDn});var INe=y(M7=>{"use strict";Object.defineProperty(M7,"__esModule",{value:true});M7.dynamicRef=void 0;var FNt=_n();var BDn=qf();var BNt=GQ();var MDn={keyword:"$dynamicRef",schemaType:"string",code:e=>MNt(e,e.schema)};function MNt(e,t){const{gen:r,keyword:n,it:i}=e;if(t[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);const s=t.slice(1);if(i.allErrors){o()}else{const l=r.let("valid",false);o(l);e.ok(l)}function o(l){if(i.schemaEnv.root.dynamicAnchors[s]){const c=r.let("_v",(0,FNt._)`${BDn.default.dynamicAnchors}${(0,FNt.getProperty)(s)}`);r.if(c,u(c,l),u(i.validateName,l))}else{u(i.validateName,l)()}}a(o,"_dynamicRef");function u(l,c){return c?()=>r.block(()=>{(0,BNt.callRef)(e,l);r.let(c,true)}):()=>(0,BNt.callRef)(e,l)}a(u,"_callRef")}a(MNt,"dynamicRef");M7.dynamicRef=MNt;M7.default=MDn});var qNt=y(kNe=>{"use strict";Object.defineProperty(kNe,"__esModule",{value:true});var qDn=NNe();var UDn=pi();var $Dn={keyword:"$recursiveAnchor",schemaType:"boolean",code(e){if(e.schema)(0,qDn.dynamicAnchor)(e,"");else(0,UDn.checkStrictMode)(e.it,"$recursiveAnchor: false is ignored")}};kNe.default=$Dn});var UNt=y(DNe=>{"use strict";Object.defineProperty(DNe,"__esModule",{value:true});var jDn=INe();var GDn={keyword:"$recursiveRef",schemaType:"string",code:e=>(0,jDn.dynamicRef)(e,e.schema)};DNe.default=GDn});var $Nt=y(LNe=>{"use strict";Object.defineProperty(LNe,"__esModule",{value:true});var HDn=NNe();var VDn=INe();var zDn=qNt();var KDn=UNt();var WDn=[HDn.default,VDn.default,zDn.default,KDn.default];LNe.default=WDn});var GNt=y(FNe=>{"use strict";Object.defineProperty(FNe,"__esModule",{value:true});var jNt=XQ();var YDn={keyword:"dependentRequired",type:"object",schemaType:"object",error:jNt.error,code:e=>(0,jNt.validatePropertyDeps)(e)};FNe.default=YDn});var HNt=y(BNe=>{"use strict";Object.defineProperty(BNe,"__esModule",{value:true});var XDn=XQ();var JDn={keyword:"dependentSchemas",type:"object",schemaType:"object",code:e=>(0,XDn.validateSchemaDeps)(e)};BNe.default=JDn});var VNt=y(MNe=>{"use strict";Object.defineProperty(MNe,"__esModule",{value:true});var QDn=pi();var ZDn={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:e,parentSchema:t,it:r}){if(t.contains===void 0){(0,QDn.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}}};MNe.default=ZDn});var zNt=y(qNe=>{"use strict";Object.defineProperty(qNe,"__esModule",{value:true});var e6n=GNt();var t6n=HNt();var r6n=VNt();var n6n=[e6n.default,t6n.default,r6n.default];qNe.default=n6n});var WNt=y(UNe=>{"use strict";Object.defineProperty(UNe,"__esModule",{value:true});var lb=_n();var KNt=pi();var i6n=qf();var s6n={message:"must NOT have unevaluated properties",params:({params:e})=>(0,lb._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`};var a6n={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:true,error:s6n,code(e){const{gen:t,schema:r,data:n,errsCount:i,it:s}=e;if(!i)throw new Error("ajv implementation error");const{allErrors:o,props:u}=s;if(u instanceof lb.Name){t.if((0,lb._)`${u} !== true`,()=>t.forIn("key",n,p=>t.if(c(u,p),()=>l(p))))}else if(u!==true){t.forIn("key",n,p=>u===void 0?l(p):t.if(d(u,p),()=>l(p)))}s.props=true;e.ok((0,lb._)`${i} === ${i6n.default.errors}`);function l(p){if(r===false){e.setParams({unevaluatedProperty:p});e.error();if(!o)t.break();return}if(!(0,KNt.alwaysValidSchema)(s,r)){const f=t.name("valid");e.subschema({keyword:"unevaluatedProperties",dataProp:p,dataPropType:KNt.Type.Str},f);if(!o)t.if((0,lb.not)(f),()=>t.break())}}a(l,"unevaluatedPropCode");function c(p,f){return(0,lb._)`!${p} || !${p}[${f}]`}a(c,"unevaluatedDynamic");function d(p,f){const m=[];for(const h in p){if(p[h]===true)m.push((0,lb._)`${f} !== ${h}`)}return(0,lb.and)(...m)}a(d,"unevaluatedStatic")}};UNe.default=a6n});var XNt=y($Ne=>{"use strict";Object.defineProperty($Ne,"__esModule",{value:true});var CC=_n();var YNt=pi();var o6n={message:({params:{len:e}})=>(0,CC.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,CC._)`{limit: ${e}}`};var u6n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:o6n,code(e){const{gen:t,schema:r,data:n,it:i}=e;const s=i.items||0;if(s===true)return;const o=t.const("len",(0,CC._)`${n}.length`);if(r===false){e.setParams({len:s});e.fail((0,CC._)`${o} > ${s}`)}else if(typeof r=="object"&&!(0,YNt.alwaysValidSchema)(i,r)){const l=t.var("valid",(0,CC._)`${o} <= ${s}`);t.if((0,CC.not)(l),()=>u(l,s));e.ok(l)}i.items=true;function u(l,c){t.forRange("i",c,o,d=>{e.subschema({keyword:"unevaluatedItems",dataProp:d,dataPropType:YNt.Type.Num},l);if(!i.allErrors)t.if((0,CC.not)(l),()=>t.break())})}a(u,"validateItems")}};$Ne.default=u6n});var JNt=y(jNe=>{"use strict";Object.defineProperty(jNe,"__esModule",{value:true});var l6n=WNt();var c6n=XNt();var d6n=[l6n.default,c6n.default];jNe.default=d6n});var ZNt=y(GNe=>{"use strict";Object.defineProperty(GNe,"__esModule",{value:true});var p6n=MPe();var f6n=eNe();var m6n=bNe();var h6n=$Nt();var g6n=zNt();var y6n=JNt();var _6n=CNe();var QNt=wNe();var v6n=[h6n.default,p6n.default,f6n.default,(0,m6n.default)(true),_6n.default,QNt.metadataVocabulary,QNt.contentVocabulary,g6n.default,y6n.default];GNe.default=v6n});var eIt=y((TFs,E6n)=>{E6n.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":true,"https://json-schema.org/draft/2020-12/vocab/applicator":true,"https://json-schema.org/draft/2020-12/vocab/unevaluated":true,"https://json-schema.org/draft/2020-12/vocab/validation":true,"https://json-schema.org/draft/2020-12/vocab/meta-data":true,"https://json-schema.org/draft/2020-12/vocab/format-annotation":true,"https://json-schema.org/draft/2020-12/vocab/content":true},$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:true,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:true,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:true},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:true}}}});var tIt=y((xFs,b6n)=>{b6n.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":true},$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 rIt=y((RFs,S6n)=>{S6n.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":true},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}});var nIt=y((OFs,A6n)=>{A6n.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":true},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}});var iIt=y((PFs,C6n)=>{C6n.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":true},$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 sIt=y((NFs,w6n)=>{w6n.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":true},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}});var aIt=y((IFs,T6n)=>{T6n.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":true},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:true,deprecated:{type:"boolean",default:false},readOnly:{type:"boolean",default:false},writeOnly:{type:"boolean",default:false},examples:{type:"array",items:true}}}});var oIt=y((kFs,x6n)=>{x6n.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":true},$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:true}]},const:true,enum:{type:"array",items:true},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:false},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:true,default:[]}}}});var uIt=y(HNe=>{"use strict";Object.defineProperty(HNe,"__esModule",{value:true});var R6n=eIt();var O6n=tIt();var P6n=rIt();var N6n=nIt();var I6n=iIt();var k6n=sIt();var D6n=aIt();var L6n=oIt();var F6n=["/properties"];function B6n(e){;[R6n,O6n,P6n,N6n,I6n,t(this,k6n),D6n,t(this,L6n)].forEach(r=>this.addMetaSchema(r,void 0,false));return this;function t(r,n){return e?r.$dataMetaSchema(n,F6n):n}a(t,"with$data")}a(B6n,"addMetaSchema2020");HNe.default=B6n});var zNe=y((Ya,lIt)=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:true});Ya.MissingRefError=Ya.ValidationError=Ya.CodeGen=Ya.Name=Ya.nil=Ya.stringify=Ya.str=Ya._=Ya.KeywordCxt=void 0;var M6n=LPe();var q6n=ZNt();var U6n=ONe();var $6n=uIt();var VNe="https://json-schema.org/draft/2020-12/schema";var iZ=class extends M6n.default{static{a(this,"Ajv2020")}constructor(t={}){super({...t,dynamicRef:true,next:true,unevaluated:true})}_addVocabularies(){super._addVocabularies();q6n.default.forEach(t=>this.addVocabulary(t));if(this.opts.discriminator)this.addKeyword(U6n.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:t,meta:r}=this.opts;if(!r)return;$6n.default.call(this,t);this.refs["http://json-schema.org/schema"]=VNe}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(VNe)?VNe:void 0)}};lIt.exports=Ya=iZ;Object.defineProperty(Ya,"__esModule",{value:true});Ya.default=iZ;var j6n=YP();Object.defineProperty(Ya,"KeywordCxt",{enumerable:true,get:function(){return j6n.KeywordCxt}});var rN=_n();Object.defineProperty(Ya,"_",{enumerable:true,get:function(){return rN._}});Object.defineProperty(Ya,"str",{enumerable:true,get:function(){return rN.str}});Object.defineProperty(Ya,"stringify",{enumerable:true,get:function(){return rN.stringify}});Object.defineProperty(Ya,"nil",{enumerable:true,get:function(){return rN.nil}});Object.defineProperty(Ya,"Name",{enumerable:true,get:function(){return rN.Name}});Object.defineProperty(Ya,"CodeGen",{enumerable:true,get:function(){return rN.CodeGen}});var G6n=b7();Object.defineProperty(Ya,"ValidationError",{enumerable:true,get:function(){return G6n.default}});var H6n=S7();Object.defineProperty(Ya,"MissingRefError",{enumerable:true,get:function(){return H6n.default}})});var KNe=y((U7,dIt)=>{"use strict";Object.defineProperty(U7,"__esModule",{value:true});var q7=PQ();var bh=jP();function cIt(e,t){if(!e.opts.code.source){throw new Error("moduleCode: ajv instance must have code.source option")}const{_n:r}=e.scope.opts;return typeof t=="function"?i(t.source):t!==void 0?s(t,n):s(e.schemas,u=>u.meta?void 0:e.compile(u.schema));function n(u){const l=e.getSchema(u);if(!l)throw new Error(`moduleCode: no schema with id ${u}`);return l}a(n,"getValidate");function i(u){const l={};const c=u===null||u===void 0?void 0:u.validateName;const d=o(l,u);if(e.opts.code.esm){return`"use strict";${r}export const validate = ${c};${r}export default ${c};${r}${d}`}return`"use strict";${r}module.exports = ${c};${r}module.exports.default = ${c};${r}${d}`}a(i,"funcExportCode");function s(u,l){var c;const d={};let p=(0,bh._)`"use strict";`;for(const f in u){const m=l(u[f]);if(m){const h=o(d,m.source);const g=e.opts.code.esm?(0,bh._)`export const ${(0,bh.getEsmExportName)(f)}`:(0,bh._)`exports${(0,bh.getProperty)(f)}`;p=(0,bh._)`${p}${r}${g} = ${(c=m.source)===null||c===void 0?void 0:c.validateName};${r}${h}`}}return`${p}`}a(s,"multiExportsCode");function o(u,l){if(!l)throw new Error('moduleCode: function does not have "source" property');if(f(l.validateName)===q7.UsedValueState.Completed)return bh.nil;m(l.validateName,q7.UsedValueState.Started);const c=e.scope.scopeCode(l.scopeValues,u,p);const d=new bh._Code(`${c}${r}${l.validateCode}`);return l.evaluated?(0,bh._)`${d}${l.validateName}.evaluated = ${l.evaluated};${r}`:d;function p(h){var g;const _=(g=h.value)===null||g===void 0?void 0:g.ref;if(h.prefix==="validate"&&typeof _=="function"){const v=_;return o(u,v.source)}else if((h.prefix==="root"||h.prefix==="wrapper")&&typeof _=="object"){const{validate:v,validateName:S}=_;if(!S)throw new Error("ajv internal error");const E=e.opts.code.es5?q7.varKinds.var:q7.varKinds.const;const b=(0,bh._)`${E} ${h} = {validate: ${S}};`;if(f(S)===q7.UsedValueState.Started)return b;const A=o(u,v===null||v===void 0?void 0:v.source);return(0,bh._)`${b}${r}${A}`}return void 0}a(p,"refValidateCode");function f(h){var g;return(g=u[h.prefix])===null||g===void 0?void 0:g.get(h)}a(f,"usedState");function m(h,g){const{prefix:_}=h;const v=u[_]=u[_]||new Map;v.set(h,g)}a(m,"setUsedState")}a(o,"validateCode")}a(cIt,"standaloneCode");dIt.exports=U7=cIt;Object.defineProperty(U7,"__esModule",{value:true});U7.default=cIt});var QNe=y(ky=>{"use strict";Object.defineProperty(ky,"__esModule",{value:true});var V6n="[";var z6n="]";var K6n="{";var W6n="}";var Y6n=":";var X6n=",";var gIt="true";var yIt="false";var _It="null";var pIt='"';var J6n=new Map([["t",gIt],["f",yIt],["n",_It]]);var YNe=new Map([[pIt,pIt],["\\","\\"],["/","/"],["b","\b"],["n","\n"],["f","\f"],["r","\r"],["t"," "]]);var WNe=new Map([[V6n,"Punctuator"],[z6n,"Punctuator"],[K6n,"Punctuator"],[W6n,"Punctuator"],[Y6n,"Punctuator"],[X6n,"Punctuator"],[gIt,"Boolean"],[yIt,"Boolean"],[_It,"Null"]]);var wC=class extends Error{static{a(this,"ErrorWithLocation")}constructor(t,{line:r,column:n,index:i}){super(`${t} (${r}:${n})`);this.line=r;this.column=n;this.index=i}};var XNe=class extends wC{static{a(this,"UnexpectedChar")}constructor(t,r){super(`Unexpected character ${t} found.`,r)}};var nN=class extends wC{static{a(this,"UnexpectedToken")}constructor(t){super(`Unexpected token ${t.type}(${t.value}) found.`,t.loc.start)}};var JNe=class extends wC{static{a(this,"UnexpectedEOF")}constructor(t){super("Unexpected end of input found.",t)}};var fIt='"';var mIt="/";var hIt="*";var Q6n={comments:false,ranges:false};function Z6n(e){return/[\s\n]/.test(e)}a(Z6n,"isWhitespace");function cb(e){return e>="0"&&e<="9"}a(cb,"isDigit");function e5n(e){return cb(e)||/[a-f]/i.test(e)}a(e5n,"isHexDigit");function t5n(e){return e>="1"&&e<="9"}a(t5n,"isPositiveDigit");function r5n(e){return/[tfn]/.test(e)}a(r5n,"isKeywordStart");function n5n(e){return cb(e)||e==="."||e==="-"}a(n5n,"isNumberStart");function vIt(e,t){t=Object.freeze({...Q6n,...t});let r=-1;let n=1;let i=0;let s=false;const o=[];function u(v,S,E,b){const A=E.offset+S.length;let C=t.ranges?{range:[E.offset,A]}:void 0;return{type:v,value:S,loc:{start:E,end:b||{line:E.line,column:E.column+S.length,offset:A}},...C}}a(u,"createToken");function l(){let v=e.charAt(++r);if(s){n++;i=1;s=false}else{i++}if(v==="\r"){s=true;if(e.charAt(r+1)==="\n"){r++}}else if(v==="\n"){s=true}return v}a(l,"next");function c(){return{line:n,column:i,offset:r}}a(c,"locate");function d(v){let S=J6n.get(v);if(e.slice(r,r+S.length)===S){r+=S.length-1;i+=S.length-1;return{value:S,c:l()}}for(let E=1;E<S.length;E++){if(S[E]!==e.charAt(r+E)){h(l())}}}a(d,"readKeyword");function p(v){let S=v;v=l();while(v&&v!==fIt){if(v==="\\"){S+=v;v=l();if(YNe.has(v)){S+=v}else if(v==="u"){S+=v;for(let E=0;E<4;E++){v=l();if(e5n(v)){S+=v}else{h(v)}}}else{h(v)}}else{S+=v}v=l()}if(!v){g()}S+=v;return{value:S,c:l()}}a(p,"readString");function f(v){let S="";if(v==="-"){S+=v;v=l();if(!cb(v)){h(v)}}if(v==="0"){S+=v;v=l();if(cb(v)){h(v)}}else{if(!t5n(v)){h(v)}do{S+=v;v=l()}while(cb(v))}if(v==="."){do{S+=v;v=l()}while(cb(v))}if(v==="e"||v==="E"){S+=v;v=l();if(v==="+"||v==="-"){S+=v;v=l()}if(!cb(v)){h(v)}while(cb(v)){S+=v;v=l()}}return{value:S,c:v}}a(f,"readNumber");function m(v){let S=v;v=l();if(v==="/"){do{S+=v;v=l()}while(v&&v!=="\r"&&v!=="\n");return{value:S,c:v}}if(v===hIt){while(v){S+=v;v=l();if(v===hIt){S+=v;v=l();if(v===mIt){S+=v;v=l();return{value:S,c:v}}}}g()}h(v)}a(m,"readComment");function h(v){throw new XNe(v,c())}a(h,"unexpected");function g(){throw new JNe(c())}a(g,"unexpectedEOF");let _=l();while(r<e.length){while(Z6n(_)){_=l()}if(!_){break}const v=c();if(WNe.has(_)){o.push(u(WNe.get(_),_,v));_=l()}else if(r5n(_)){const S=d(_);let E=S.value;_=S.c;o.push(u(WNe.get(E),E,v))}else if(n5n(_)){const S=f(_);let E=S.value;_=S.c;o.push(u("Number",E,v))}else if(_===fIt){const S=p(_);let E=S.value;_=S.c;o.push(u("String",E,v))}else if(_===mIt&&t.comments){const S=m(_);let E=S.value;_=S.c;o.push(u(E.startsWith("//")?"LineComment":"BlockComment",E,v,c()))}else{h(_)}}return o}a(vIt,"tokenize");var $7={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}}};var i5n={tokens:false,comments:false,ranges:false};function s5n(e){let t=e.value.slice(1,-1);let r="";let n=t.indexOf("\\");let i=0;while(n>=0){r+=t.slice(i,n);const s=t.charAt(n+1);if(YNe.has(s)){r+=YNe.get(s);i=n+2}else if(s==="u"){const o=t.slice(n+2,n+6);if(o.length<4||/[^0-9a-f]/i.test(o)){throw new wC(`Invalid unicode escape \\u${o}.`,{line:e.loc.start.line,column:e.loc.start.column+n,offset:e.loc.start.offset+n})}r+=String.fromCharCode(parseInt(o,16));i=n+6}else{throw new wC(`Invalid escape \\${s}.`,{line:e.loc.start.line,column:e.loc.start.column+n,offset:e.loc.start.offset+n})}n=t.indexOf("\\",i)}r+=t.slice(i);return r}a(s5n,"getStringValue");function a5n(e){switch(e.type){case"Boolean":return e.value==="true";case"Number":return Number(e.value);case"Null":return null;case"String":return s5n(e)}}a(a5n,"getLiteralValue");function o5n(e,t){t=Object.freeze({...i5n,...t});const r=vIt(e,{comments:!!t.comments,ranges:!!t.ranges});let n=0;function i(){return r[n++]}a(i,"nextNoComments");function s(){const S=r[n++];if(S&&S.type.endsWith("Comment")){return s()}return S}a(s,"nextSkipComments");const o=t.comments?s:i;function u(S,E){if(!S||S.value!==E){throw new nN(S)}}a(u,"assertTokenValue");function l(S,E){if(!S||S.type!==E){throw new nN(S)}}a(l,"assertTokenType");function c(S,E){return t.ranges?{range:[S.offset,E.offset]}:void 0}a(c,"createRange");function d(S){const E=c(S.loc.start,S.loc.end);return{type:S.type,value:a5n(S),loc:{start:{...S.loc.start},end:{...S.loc.end}},...E}}a(d,"createLiteralNode");function p(S){l(S,"String");const E=d(S);S=o();u(S,":");const b=h();const A=c(E.loc.start,b.loc.end);return $7.member(E,b,{loc:{start:{...E.loc.start},end:{...b.loc.end}},...A})}a(p,"parseProperty");function f(S){u(S,"{");const E=[];let b=o();if(b&&b.value!=="}"){do{E.push(p(b));b=o();if(b.value===","){b=o()}else{break}}while(b)}u(b,"}");const A=c(S.loc.start,b.loc.end);return $7.object(E,{loc:{start:{...S.loc.start},end:{...b.loc.end}},...A})}a(f,"parseObject");function m(S){u(S,"[");const E=[];let b=o();if(b&&b.value!=="]"){do{E.push(h(b));b=o();if(b.value===","){b=o()}else{break}}while(b)}u(b,"]");const A=c(S.loc.start,b.loc.end);return $7.array(E,{type:"Array",elements:E,loc:{start:{...S.loc.start},end:{...b.loc.end}},...A})}a(m,"parseArray");function h(S){S=S||o();switch(S.type){case"String":case"Boolean":case"Number":case"Null":return d(S);case"Punctuator":if(S.value==="{"){return f(S)}else if(S.value==="["){return m(S)}default:throw new nN(S)}}a(h,"parseValue");const g=h();const _=o();if(_){throw new nN(_)}const v={loc:{start:{line:1,column:1,offset:0},end:{...g.loc.end}}};if(t.tokens){v.tokens=r}if(t.ranges){v.range=c(v.loc.start,v.loc.end)}return $7.document(g,v)}a(o5n,"parse");var u5n=new Map([["Document",["body"]],["Object",["members"]],["Member",["name","value"]],["Array",["elements"]],["String",[]],["Number",[]],["Boolean",[]],["Null",[]]]);function EIt(e){return e&&typeof e==="object"}a(EIt,"isObject");function l5n(e){return EIt(e)&&typeof e.type==="string"}a(l5n,"isNode");function bIt(e,t){function r(n,i){if(typeof t.enter==="function"){t.enter(n,i)}for(const s of u5n.get(n.type)){const o=n[s];if(EIt(o)){if(Array.isArray(o)){o.forEach(u=>r(u,n))}else if(l5n(o)){r(o,n)}}}if(typeof t.exit==="function"){t.exit(n,i)}}a(r,"visitNode");r(e)}a(bIt,"traverse");function c5n(e,t=()=>true){const r=[];bIt(e,{enter(n,i){r.push({node:n,parent:i,phase:"enter"})},exit(n,i){r.push({node:n,parent:i,phase:"exit"})}});return r.filter(t).values()}a(c5n,"iterator");function iN(e){switch(e.type){case"String":case"Number":case"Boolean":return e.value;case"Null":return null;case"Array":return e.elements.map(iN);case"Object":{const t={};e.members.forEach(r=>{t[iN(r.name)]=iN(r.value)});return t}case"Document":return iN(e.body);case"Property":throw new Error("Cannot evaluate object property outside of an object.");default:throw new Error(`Unknown node type ${e.type}.`)}}a(iN,"evaluate");function d5n(e,{indent:t=0}={}){const r=iN(e);return JSON.stringify(r,null,t)}a(d5n,"print");ky.evaluate=iN;ky.iterator=c5n;ky.parse=o5n;ky.print=d5n;ky.tokenize=vIt;ky.traverse=bIt;ky.types=$7});var ZNe=y(Sh=>{"use strict";var p5n=Sh&&Sh.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(Sh,"__esModule",{value:true});Sh.getSchemaAST=Sh.getSchemaContent=Sh.getFileLineContent=void 0;var f5n=QNe();var m5n=p5n(require("fs/promises"));var h5n=a((e,t)=>{const r=e.split(/\r?\n/);return r[t-1]},"getFileLineContent");Sh.getFileLineContent=h5n;var g5n=a(async e=>{try{return await m5n.default.readFile(e,"utf-8")}catch(t){return void 0}},"getSchemaContent");Sh.getSchemaContent=g5n;var y5n=a(async e=>{try{return(0,f5n.parse)(e)}catch(t){if(t.column&&t.line&&t.message){const r=(0,Sh.getFileLineContent)(e,t.line);const n={column:t.column,line:t.line,length:void 0,lineText:r};return n}return void 0}},"getSchemaAST");Sh.getSchemaAST=y5n});var wIt=y(sN=>{"use strict";var _5n=sN&&sN.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(sN,"__esModule",{value:true});sN.getLocation=void 0;var v5n=hn();var SIt=_5n(require("path"));var AIt=Fn();var sZ=ZNe();var CIt=a(e=>{let t=null;if(e.value.type==="Object"&&e.value.members.length>0){for(const r of e.value.members){const n=CIt(r);if(n!==null){t=n}if(r.name.value==="enum"&&r.value.type==="Array"&&r.value.elements.length===0){const i=r.value;const s=i.loc.start.line;const o=i.loc.start.column;const u=i.loc.end.column;t={line:s,column:o,length:u-o,lineText:""}}}}return t},"findEmptyEnums");var E5n=a(e=>{if(e.startsWith("schema with key or id")&&e.endsWith("already exists")){return"Update your schema's '$id' to be unique across your project."}else if(e.includes("All JSON schemas must use version 2020-12")){return`All JSON schemas must use version 2020-12. See release notes for changes: https://json-schema.org/draft/2020-12/release-notes.html`}else if(e==='"nullable" cannot be used without "type"'){return`Property "nullable" can only be used when property "type" value is "object".`}else if(e==='NOT SUPPORTED: keyword "id", use "$id" for schema ID'){return`Replace keyword "id" with "$id" when defining a schema Id.`}else if(e.startsWith("can't resolve reference http")){return`Cannot resolve remote references, try adding them directly to the schema file or as a schema file in the project.`}else if(e.startsWith("can't resolve reference")){return"Make sure all references are defined in the schema."}else if(e.includes("oneOf must NOT have fewer than 1 items")){return'Property "oneOf" must have at least 1 item configured.'}else if(e.includes("enum must have non-empty array")){return'Property "enum" must be configured with at least one value.'}else if(e.includes("Unexpected")&&e.includes("in JSON at position")){return"Update your schema to only use valid properties."}return void 0},"getSuggestions");var b5n=a(async(e,t,r)=>{if(!e){return null}let n={file:SIt.default.join(AIt.USER_SCHEMAS_DIR_NAME,e),suggestion:E5n(r)};const i=SIt.default.join(t,AIt.USER_SCHEMAS_DIR_NAME);const s=v5n.xfs.safePath(t).resolve(i,e);const o=await(0,sZ.getSchemaContent)(s);if(r.includes("enum must have non-empty array")){if(o){const u=await(0,sZ.getSchemaAST)(o);if(u&&u.body.members!==null){for(const l of u.body.members){const c=CIt(l);if(c&&c!==null){const d=Object.assign(n??{},c);n=d}}}if(n){const l=n.line?n.line:0;n.lineText=(0,sZ.getFileLineContent)(o,l)}}}else if(r.includes("Unexpected")&&r.includes("in JSON at position")){if(o){const u=await(0,sZ.getSchemaAST)(o);if(u&&"lineText"in u){const l=Object.assign(n??{},u);n=l}}}return n},"getLocation");sN.getLocation=b5n});var OIt=y(aN=>{"use strict";var db=aN&&aN.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(aN,"__esModule",{value:true});aN.jsonSchemaPlugin=void 0;var TC=hn();var S5n=kNt();var A5n=db(o8());var C5n=db(zNe());var w5n=db(KNe());var TIt=db(require("fs/promises"));var mp=db(require("path"));var T5n=db(require("prettier"));var j7=Fn();var xIt=db(rb());var x5n=db(xs());var RIt=wIt();var cg="schemas";var aZ="json-schema";function R5n(e){return{name:cg,async setup(t){const r=new C5n.default({code:{source:true},allErrors:true,strict:false,verbose:true,meta:true});(0,A5n.default)(r,{mode:"fast"});r.opts.code.formats=(0,S5n._)`require("ajv-formats/dist/formats").fastFormats`;const n=mp.default.join(e.sourceDirectory,j7.USER_SCHEMAS_DIR_NAME);let i;const s=[];const o=[];if(await TC.xfs.dirExists(n)){r.addKeyword("faker");i=await TC.xfs.listFolderContents(n,j7.USER_SCHEMAS_DIR_NAME);await Promise.all(i.map(async u=>{try{const l=TC.xfs.safePath(e.sourceDirectory).resolve(n,u);if(!l.startsWith(n)){throw new Error("All schemas must be in the schemas directory")}const c=await TIt.default.readFile(l,"utf-8");if(c===""||c===void 0){throw new Error(`Schema 'schemas/${u}' is empty and will be ignored.`)}const d=JSON.parse(c);if(d.$schema&&d.$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`)}r.$dataMetaSchema;r.addSchema(d,u);if(r.errors?.length){const p=r.errors[0];s.push({id:"json-schema-validation-error",pluginName:cg,text:`Error: ${p.message}`,location:{file:mp.default.join(j7.USER_SCHEMAS_DIR_NAME,u)},detail:{params:p.params,propertyName:p.propertyName,schemaPath:p.schemaPath,data:p.data}})}}catch(l){if(l.message.endsWith("is empty and will be ignored.")){o.push({id:"empty-json-schema-file",pluginName:cg,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}const c=await(0,RIt.getLocation)(u,e.sourceDirectory,l.message);s.push({id:"json-schema-add-error",pluginName:cg,text:`Error: ${l.message}`,location:c,detail:"InvalidAddSchemaError",notes:[{text:l.message}]})}}));await Promise.all(i.map(async u=>{try{const l=r.getSchema(u);if(l){const c=r.compile(l.schema);c.errors?.forEach(d=>{s.push({text:`Failed to compile ${u}: ${d.message}`})})}}catch(l){const c=await(0,RIt.getLocation)(u,e.sourceDirectory,l.message);s.push({id:"json-schema-compile-error",pluginName:cg,text:`The schema file '${u}' is not valid. Error: ${l.message}`,location:c,detail:"InvalidSchemaError",notes:[{text:l.message}]})}}));if(xIt.default.DEBUG_BUILD_MODE){const u=mp.default.resolve(e.outputDirectory,j7.USER_SCHEMAS_DIR_NAME);await TC.xfs.mkdirIfNotExists(u)}}t.onStart(async()=>{if(!i){return}return{errors:s,warnings:o}});t.onResolve({filter:/schemas\/.*\.json$/},async u=>{const l=mp.default.isAbsolute(u.path)?u.path:mp.default.join(u.resolveDir,u.path);if(u.importer&&u.importer!==mp.default.join(e.sourceDirectory,"config/routes.json")){return{path:l}}if(!await TC.xfs.fileExists(l)){const c="policies.json";const d={id:"json-schema-build-error",text:`Unable to resolve reference to '${u.path}' from ${c}`,location:{file:mp.default.join(u.resolveDir,c),namespace:aZ,line:1,column:0,length:0,lineText:`Invalid JSON schema reference in ${c}`,suggestion:""},detail:"RouteReferenceError",pluginName:cg,notes:[{text:`Unable to resolve reference to '${u.path}' from ${c}`,location:null}]};return{errors:[d],namespace:aZ,path:l,pluginName:cg}}return{path:l,namespace:aZ,pluginName:cg}});t.onLoad({filter:/.*/,namespace:aZ},async u=>{return x5n.default.timeFn(`Generating json schema data: ${mp.default.basename(u.path)}`,async()=>{const l=[];let c;try{const d=mp.default.relative(n,u.path);const p=r.getSchema(d);if(!p){throw new Error(`Could not load schema at ${u.path}`)}c=p.source?.validateCode;const f=r.compile(p.schema);c=(0,w5n.default)(r,f)}catch(d){l.push({pluginName:cg,text:`Cannot parse project's schemas/${mp.default.basename(u.path)} file. Error: ${d.message}`,location:null,notes:[{text:d.message,location:null}],detail:d})}if(xIt.default.DEBUG_BUILD_MODE&&c){const d=mp.default.resolve(e.outputDirectory,j7.USER_SCHEMAS_DIR_NAME);const p=mp.default.relative(n,u.path);const f=await T5n.default.format(c,{parser:"babel"});const m=TC.xfs.safePath(e.sourceDirectory).resolve(d,`${p}.js`);await TC.xfs.mkdirForFilePathIfNotExits(m);await TIt.default.writeFile(m,f,"utf-8")}return{contents:c,errors:l,pluginName:cg,resolveDir:mp.default.dirname(u.path),watchFiles:[u.path]}})})}}}a(R5n,"jsonSchemaPlugin");aN.jsonSchemaPlugin=R5n});var eIe=y((zFs,O5n)=>{O5n.exports={modules:[{name:"@aws-sdk/client-dynamodb",version:">=3.58.0"},{name:"@aws-sdk/client-kinesis",version:">=3.67.0"},{name:"@aws-sdk/client-lambda",version:">=3.58.0"},{name:"@aws-sdk/client-rds-data",version:">=3.58.0"},{name:"@aws-sdk/client-rds",version:">=3.58.0"},{name:"@aws-sdk/client-s3",version:">=3.58.0"},{name:"@aws-sdk/client-sns",version:">=3.484.0"},{name:"@aws-sdk/client-sqs",version:">=3.58.0"},{name:"@azure/core-auth",version:">=1.4.0"},{name:"@azure/cosmos",version:">=3.17.1"},{name:"@cfworker/cosmos",version:">=1.13.4"},{name:"@graphql-tools/schema",version:">=9.0.0"},{name:"@sagi.io/workers-jwt",version:">=0.0.22"},{name:"@sendgrid/mail",version:">=7.7.0"},{name:"@sentry/tracing",version:">=7.11.1"},{name:"@supabase/supabase-js",version:">=2.39.1"},{name:"@xata.io/client",version:">=0.21.1"},{name:"@zuplo/firebase",version:">=1.0.0"},{name:"algoliasearch",version:">=4.14.3"},{name:"bcryptjs",version:">=2.4.3"},{name:"casbin.js",version:">=1.0.1"},{name:"cheerio",version:">=1.0.0-rc.11"},{name:"faunadb",version:">=4.5.4"},{name:"firebase",version:">=9.0.0"},{name:"graphql",version:">=16.6.0"},{name:"mmdynamo",version:">=0.3.0"},{name:"realm-web",version:">=1.7.0"},{name:"sofa-api",version:">=0.17.1"},{name:"stripe",version:">=11.1.0"},{name:"toucan-js",version:">=2.5.0"}],legacyAliases:{algoliasearch:"https://esm.sh/algoliasearch@4.14.3","@aws-sdk/client-dynamodb":"https://esm.sh/@aws-sdk/client-dynamodb@3.58.0","@aws-sdk/client-kinesis":"https://esm.sh/@aws-sdk/client-kinesis@3.67.0","@aws-sdk/client-lambda":"https://esm.sh/@aws-sdk/client-lambda@3.58.0","@aws-sdk/client-rds":"https://esm.sh/@aws-sdk/client-rds@3.58.0","@aws-sdk/client-rds-data":"https://esm.sh/@aws-sdk/client-rds-data@3.58.0","@aws-sdk/client-s3":"https://esm.sh/@aws-sdk/client-s3@3.58.0","@aws-sdk/client-sqs":"https://esm.sh/@aws-sdk/client-sqs@3.58.0","@azure/core-auth":"https://esm.sh/@azure/core-auth@1.4.0","@azure/cosmos":"https://esm.sh/@azure/cosmos@3.17.1",bcryptjs:"https://esm.sh/bcryptjs@2.4.3","casbin.js":"https://esm.sh/casbin.js@1.0.1","@cfworker/cosmos":"https://esm.sh/@cfworker/cosmos@1.13.4",cheerio:"https://esm.sh/cheerio@1.0.0-rc.11",faunadb:"https://esm.sh/faunadb@4.5.4",graphql:"https://esm.sh/graphql@16.6.0",mmdynamo:"https://esm.sh/mmdynamo@0.3.0","realm-web":"https://esm.sh/realm-web@1.7.0","@sagi.io/workers-jwt":"https://esm.sh/@sagi.io/workers-jwt@0.0.22","@sendgrid/mail":"https://esm.sh/@sendgrid/mail@7.7.0","@sentry/tracing":"https://esm.sh/@sentry/tracing@7.11.1",stripe:"https://esm.sh/stripe@11.1.0","@supabase/supabase-js":"https://esm.sh/@supabase/supabase-js@2.39.1","toucan-js":"https://esm.sh/toucan-js@2.5.0","@xata.io/client":"https://esm.sh/@xata.io/client@0.21.1"}}});var IIt=y(oN=>{"use strict";var P5n=oN&&oN.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(oN,"__esModule",{value:true});oN.moduleResolverPlugin=void 0;var N5n=hn();var PIt=require("fs/promises");var NIt=P5n(require("path"));var I5n=eIe();var k5n="module-resolver";var D5n=["@zuplo/core","@zuplo/runtime"];async function L5n(e){const t={};const r=await(0,PIt.readFile)(NIt.default.resolve(require.resolve("@zuplo/runtime"),"../../package.json"),"utf-8");const n=JSON.parse(r);const i=NIt.default.join(e,"package.json");if(await N5n.xfs.fileExists(i)){const s=await(0,PIt.readFile)(i,"utf-8");const o=JSON.parse(s);const u=["dependencies","_dependencies"];u.forEach(l=>{if(o[l]){for(const c in o[l]){if(!c.startsWith("http:")&&!c.startsWith("https:")&&![...D5n,...Object.keys(n.dependencies)].includes(c)){t[c]=`https://esm.sh/${c}@${o[l][c]}`}}}})}return t}a(L5n,"getPackageAliases");function F5n({sourceDirectory:e}){return{name:k5n,async setup(t){const r=await L5n(e);const n={...I5n.legacyAliases,...r};t.onResolve({filter:/.*/},i=>{if(!i.path.startsWith("./")&&!i.path.startsWith("/")){const s=Object.keys(n).find(o=>i.path.startsWith(o));if(s){return{path:i.path.replace(s,n[s]),namespace:"http-url"}}}})}}}a(F5n,"moduleResolverPlugin");oN.moduleResolverPlugin=F5n});var Nc=y(hp=>{"use strict";hp.__esModule=true;hp.extend=kIt;hp.indexOf=$5n;hp.escapeExpression=j5n;hp.isEmpty=G5n;hp.createFrame=H5n;hp.blockParams=V5n;hp.appendContextPath=z5n;var B5n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"};var M5n=/[&<>"'`=]/g;var q5n=/[&<>"'`=]/;function U5n(e){return B5n[e]}a(U5n,"escapeChar");function kIt(e){for(var t=1;t<arguments.length;t++){for(var r in arguments[t]){if(Object.prototype.hasOwnProperty.call(arguments[t],r)){e[r]=arguments[t][r]}}}return e}a(kIt,"extend");var rIe=Object.prototype.toString;hp.toString=rIe;var tIe=a(function e(t){return typeof t==="function"},"isFunction");if(tIe(/x/)){hp.isFunction=tIe=a(function(e){return typeof e==="function"&&rIe.call(e)==="[object Function]"},"isFunction")}hp.isFunction=tIe;var DIt=Array.isArray||function(e){return e&&typeof e==="object"?rIe.call(e)==="[object Array]":false};hp.isArray=DIt;function $5n(e,t){for(var r=0,n=e.length;r<n;r++){if(e[r]===t){return r}}return-1}a($5n,"indexOf");function j5n(e){if(typeof e!=="string"){if(e&&e.toHTML){return e.toHTML()}else if(e==null){return""}else if(!e){return e+""}e=""+e}if(!q5n.test(e)){return e}return e.replace(M5n,U5n)}a(j5n,"escapeExpression");function G5n(e){if(!e&&e!==0){return true}else if(DIt(e)&&e.length===0){return true}else{return false}}a(G5n,"isEmpty");function H5n(e){var t=kIt({},e);t._parent=e;return t}a(H5n,"createFrame");function V5n(e,t){e.path=t;return e}a(V5n,"blockParams");function z5n(e,t){return(e?e+".":"")+t}a(z5n,"appendContextPath")});var Gf=y((oZ,LIt)=>{"use strict";oZ.__esModule=true;var nIe=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function iIe(e,t){var r=t&&t.loc,n=void 0,i=void 0,s=void 0,o=void 0;if(r){n=r.start.line;i=r.end.line;s=r.start.column;o=r.end.column;e+=" - "+n+":"+s}var u=Error.prototype.constructor.call(this,e);for(var l=0;l<nIe.length;l++){this[nIe[l]]=u[nIe[l]]}if(Error.captureStackTrace){Error.captureStackTrace(this,iIe)}try{if(r){this.lineNumber=n;this.endLineNumber=i;if(Object.defineProperty){Object.defineProperty(this,"column",{value:s,enumerable:true});Object.defineProperty(this,"endColumn",{value:o,enumerable:true})}else{this.column=s;this.endColumn=o}}}catch(c){}}a(iIe,"Exception");iIe.prototype=new Error;oZ["default"]=iIe;LIt.exports=oZ["default"]});var BIt=y((uZ,FIt)=>{"use strict";uZ.__esModule=true;var sIe=Nc();uZ["default"]=function(e){e.registerHelper("blockHelperMissing",function(t,r){var n=r.inverse,i=r.fn;if(t===true){return i(this)}else if(t===false||t==null){return n(this)}else if(sIe.isArray(t)){if(t.length>0){if(r.ids){r.ids=[r.name]}return e.helpers.each(t,r)}else{return n(this)}}else{if(r.data&&r.ids){var s=sIe.createFrame(r.data);s.contextPath=sIe.appendContextPath(r.data.contextPath,r.name);r={data:s}}return i(t,r)}})};FIt.exports=uZ["default"]});var qIt=y((lZ,MIt)=>{"use strict";lZ.__esModule=true;function K5n(e){return e&&e.__esModule?e:{"default":e}}a(K5n,"_interopRequireDefault");var G7=Nc();var W5n=Gf();var Y5n=K5n(W5n);lZ["default"]=function(e){e.registerHelper("each",function(t,r){if(!r){throw new Y5n["default"]("Must pass iterator to #each")}var n=r.fn,i=r.inverse,s=0,o="",u=void 0,l=void 0;if(r.data&&r.ids){l=G7.appendContextPath(r.data.contextPath,r.ids[0])+"."}if(G7.isFunction(t)){t=t.call(this)}if(r.data){u=G7.createFrame(r.data)}function c(h,g,_){if(u){u.key=h;u.index=g;u.first=g===0;u.last=!!_;if(l){u.contextPath=l+h}}o=o+n(t[h],{data:u,blockParams:G7.blockParams([t[h],h],[l+h,null])})}a(c,"execIteration");if(t&&typeof t==="object"){if(G7.isArray(t)){for(var d=t.length;s<d;s++){if(s in t){c(s,s,s===t.length-1)}}}else if(global.Symbol&&t[global.Symbol.iterator]){var p=[];var f=t[global.Symbol.iterator]();for(var m=f.next();!m.done;m=f.next()){p.push(m.value)}t=p;for(var d=t.length;s<d;s++){c(s,s,s===t.length-1)}}else{(function(){var h=void 0;Object.keys(t).forEach(function(g){if(h!==void 0){c(h,s-1)}h=g;s++});if(h!==void 0){c(h,s-1,true)}})()}}if(s===0){o=i(this)}return o})};MIt.exports=lZ["default"]});var $It=y((cZ,UIt)=>{"use strict";cZ.__esModule=true;function X5n(e){return e&&e.__esModule?e:{"default":e}}a(X5n,"_interopRequireDefault");var J5n=Gf();var Q5n=X5n(J5n);cZ["default"]=function(e){e.registerHelper("helperMissing",function(){if(arguments.length===1){return void 0}else{throw new Q5n["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')}})};UIt.exports=cZ["default"]});var VIt=y((dZ,HIt)=>{"use strict";dZ.__esModule=true;function Z5n(e){return e&&e.__esModule?e:{"default":e}}a(Z5n,"_interopRequireDefault");var jIt=Nc();var e8n=Gf();var GIt=Z5n(e8n);dZ["default"]=function(e){e.registerHelper("if",function(t,r){if(arguments.length!=2){throw new GIt["default"]("#if requires exactly one argument")}if(jIt.isFunction(t)){t=t.call(this)}if(!r.hash.includeZero&&!t||jIt.isEmpty(t)){return r.inverse(this)}else{return r.fn(this)}});e.registerHelper("unless",function(t,r){if(arguments.length!=2){throw new GIt["default"]("#unless requires exactly one argument")}return e.helpers["if"].call(this,t,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};HIt.exports=dZ["default"]});var KIt=y((pZ,zIt)=>{"use strict";pZ.__esModule=true;pZ["default"]=function(e){e.registerHelper("log",function(){var t=[void 0],r=arguments[arguments.length-1];for(var n=0;n<arguments.length-1;n++){t.push(arguments[n])}var i=1;if(r.hash.level!=null){i=r.hash.level}else if(r.data&&r.data.level!=null){i=r.data.level}t[0]=i;e.log.apply(e,t)})};zIt.exports=pZ["default"]});var YIt=y((fZ,WIt)=>{"use strict";fZ.__esModule=true;fZ["default"]=function(e){e.registerHelper("lookup",function(t,r,n){if(!t){return t}return n.lookupProperty(t,r)})};WIt.exports=fZ["default"]});var JIt=y((mZ,XIt)=>{"use strict";mZ.__esModule=true;function t8n(e){return e&&e.__esModule?e:{"default":e}}a(t8n,"_interopRequireDefault");var H7=Nc();var r8n=Gf();var n8n=t8n(r8n);mZ["default"]=function(e){e.registerHelper("with",function(t,r){if(arguments.length!=2){throw new n8n["default"]("#with requires exactly one argument")}if(H7.isFunction(t)){t=t.call(this)}var n=r.fn;if(!H7.isEmpty(t)){var i=r.data;if(r.data&&r.ids){i=H7.createFrame(r.data);i.contextPath=H7.appendContextPath(r.data.contextPath,r.ids[0])}return n(t,{data:i,blockParams:H7.blockParams([t],[i&&i.contextPath])})}else{return r.inverse(this)}})};XIt.exports=mZ["default"]});var aIe=y(hZ=>{"use strict";hZ.__esModule=true;hZ.registerDefaultHelpers=_8n;hZ.moveHelperToHooks=v8n;function xC(e){return e&&e.__esModule?e:{"default":e}}a(xC,"_interopRequireDefault");var i8n=BIt();var s8n=xC(i8n);var a8n=qIt();var o8n=xC(a8n);var u8n=$It();var l8n=xC(u8n);var c8n=VIt();var d8n=xC(c8n);var p8n=KIt();var f8n=xC(p8n);var m8n=YIt();var h8n=xC(m8n);var g8n=JIt();var y8n=xC(g8n);function _8n(e){s8n["default"](e);o8n["default"](e);l8n["default"](e);d8n["default"](e);f8n["default"](e);h8n["default"](e);y8n["default"](e)}a(_8n,"registerDefaultHelpers");function v8n(e,t,r){if(e.helpers[t]){e.hooks[t]=e.helpers[t];if(!r){delete e.helpers[t]}}}a(v8n,"moveHelperToHooks")});var ZIt=y((gZ,QIt)=>{"use strict";gZ.__esModule=true;var E8n=Nc();gZ["default"]=function(e){e.registerDecorator("inline",function(t,r,n,i){var s=t;if(!r.partials){r.partials={};s=a(function(o,u){var l=n.partials;n.partials=E8n.extend({},l,r.partials);var c=t(o,u);n.partials=l;return c},"ret")}r.partials[i.args[0]]=i.fn;return s})};QIt.exports=gZ["default"]});var e3t=y(oIe=>{"use strict";oIe.__esModule=true;oIe.registerDefaultDecorators=C8n;function b8n(e){return e&&e.__esModule?e:{"default":e}}a(b8n,"_interopRequireDefault");var S8n=ZIt();var A8n=b8n(S8n);function C8n(e){A8n["default"](e)}a(C8n,"registerDefaultDecorators")});var uIe=y((yZ,t3t)=>{"use strict";yZ.__esModule=true;var w8n=Nc();var uN={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:a(function e(t){if(typeof t==="string"){var r=w8n.indexOf(uN.methodMap,t.toLowerCase());if(r>=0){t=r}else{t=parseInt(t,10)}}return t},"lookupLevel"),log:a(function e(t){t=uN.lookupLevel(t);if(typeof console!=="undefined"&&uN.lookupLevel(uN.level)<=t){var r=uN.methodMap[t];if(!console[r]){r="log"}for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++){i[s-1]=arguments[s]}console[r].apply(console,i)}},"log")};yZ["default"]=uN;t3t.exports=yZ["default"]});var r3t=y(lIe=>{"use strict";lIe.__esModule=true;lIe.createNewLookupObject=x8n;var T8n=Nc();function x8n(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++){t[r]=arguments[r]}return T8n.extend.apply(void 0,[Object.create(null)].concat(t))}a(x8n,"createNewLookupObject")});var cIe=y(V7=>{"use strict";V7.__esModule=true;V7.createProtoAccessControl=N8n;V7.resultIsAllowed=I8n;V7.resetLoggedProperties=D8n;function R8n(e){if(e&&e.__esModule){return e}else{var t={};if(e!=null){for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]}}t["default"]=e;return t}}a(R8n,"_interopRequireWildcard");var n3t=r3t();var O8n=uIe();var P8n=R8n(O8n);var _Z=Object.create(null);function N8n(e){var t=Object.create(null);t["constructor"]=false;t["__defineGetter__"]=false;t["__defineSetter__"]=false;t["__lookupGetter__"]=false;var r=Object.create(null);r["__proto__"]=false;return{properties:{whitelist:n3t.createNewLookupObject(r,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:n3t.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}a(N8n,"createProtoAccessControl");function I8n(e,t,r){if(typeof e==="function"){return i3t(t.methods,r)}else{return i3t(t.properties,r)}}a(I8n,"resultIsAllowed");function i3t(e,t){if(e.whitelist[t]!==void 0){return e.whitelist[t]===true}if(e.defaultValue!==void 0){return e.defaultValue}k8n(t);return false}a(i3t,"checkWhiteList");function k8n(e){if(_Z[e]!==true){_Z[e]=true;P8n.log("error",'Handlebars: Access has been denied to resolve the property "'+e+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details')}}a(k8n,"logUnexpecedPropertyAccessOnce");function D8n(){Object.keys(_Z).forEach(function(e){delete _Z[e]})}a(D8n,"resetLoggedProperties")});var EZ=y(dg=>{"use strict";dg.__esModule=true;dg.HandlebarsEnvironment=fIe;function s3t(e){return e&&e.__esModule?e:{"default":e}}a(s3t,"_interopRequireDefault");var RC=Nc();var L8n=Gf();var dIe=s3t(L8n);var F8n=aIe();var B8n=e3t();var M8n=uIe();var vZ=s3t(M8n);var q8n=cIe();var U8n="4.7.7";dg.VERSION=U8n;var $8n=8;dg.COMPILER_REVISION=$8n;var j8n=7;dg.LAST_COMPATIBLE_COMPILER_REVISION=j8n;var G8n={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"};dg.REVISION_CHANGES=G8n;var pIe="[object Object]";function fIe(e,t,r){this.helpers=e||{};this.partials=t||{};this.decorators=r||{};F8n.registerDefaultHelpers(this);B8n.registerDefaultDecorators(this)}a(fIe,"HandlebarsEnvironment");fIe.prototype={constructor:fIe,logger:vZ["default"],log:vZ["default"].log,registerHelper:a(function e(t,r){if(RC.toString.call(t)===pIe){if(r){throw new dIe["default"]("Arg not supported with multiple helpers")}RC.extend(this.helpers,t)}else{this.helpers[t]=r}},"registerHelper"),unregisterHelper:a(function e(t){delete this.helpers[t]},"unregisterHelper"),registerPartial:a(function e(t,r){if(RC.toString.call(t)===pIe){RC.extend(this.partials,t)}else{if(typeof r==="undefined"){throw new dIe["default"]('Attempting to register a partial called "'+t+'" as undefined')}this.partials[t]=r}},"registerPartial"),unregisterPartial:a(function e(t){delete this.partials[t]},"unregisterPartial"),registerDecorator:a(function e(t,r){if(RC.toString.call(t)===pIe){if(r){throw new dIe["default"]("Arg not supported with multiple decorators")}RC.extend(this.decorators,t)}else{this.decorators[t]=r}},"registerDecorator"),unregisterDecorator:a(function e(t){delete this.decorators[t]},"unregisterDecorator"),resetLoggedPropertyAccesses:a(function e(){q8n.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var H8n=vZ["default"].log;dg.log=H8n;dg.createFrame=RC.createFrame;dg.logger=vZ["default"]});var o3t=y((bZ,a3t)=>{"use strict";bZ.__esModule=true;function mIe(e){this.string=e}a(mIe,"SafeString");mIe.prototype.toString=mIe.prototype.toHTML=function(){return""+this.string};bZ["default"]=mIe;a3t.exports=bZ["default"]});var u3t=y(hIe=>{"use strict";hIe.__esModule=true;hIe.wrapHelper=V8n;function V8n(e,t){if(typeof e!=="function"){return e}var r=a(function n(){var i=arguments[arguments.length-1];arguments[arguments.length-1]=t(i);return e.apply(this,arguments)},"wrapper");return r}a(V8n,"wrapHelper")});var f3t=y(pb=>{"use strict";pb.__esModule=true;pb.checkRevision=J8n;pb.template=Q8n;pb.wrapProgram=SZ;pb.resolvePartial=Z8n;pb.invokePartial=e9n;pb.noop=d3t;function z8n(e){return e&&e.__esModule?e:{"default":e}}a(z8n,"_interopRequireDefault");function K8n(e){if(e&&e.__esModule){return e}else{var t={};if(e!=null){for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]}}t["default"]=e;return t}}a(K8n,"_interopRequireWildcard");var W8n=Nc();var Dy=K8n(W8n);var Y8n=Gf();var Ly=z8n(Y8n);var Fy=EZ();var l3t=aIe();var X8n=u3t();var c3t=cIe();function J8n(e){var t=e&&e[0]||1,r=Fy.COMPILER_REVISION;if(t>=Fy.LAST_COMPATIBLE_COMPILER_REVISION&&t<=Fy.COMPILER_REVISION){return}if(t<Fy.LAST_COMPATIBLE_COMPILER_REVISION){var n=Fy.REVISION_CHANGES[r],i=Fy.REVISION_CHANGES[t];throw new Ly["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 Ly["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}}a(J8n,"checkRevision");function Q8n(e,t){if(!t){throw new Ly["default"]("No environment passed to template")}if(!e||!e.main){throw new Ly["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(o,u,l){if(l.hash){u=Dy.extend({},u,l.hash);if(l.ids){l.ids[0]=true}}o=t.VM.resolvePartial.call(this,o,u,l);var c=Dy.extend({},l,{hooks:this.hooks,protoAccessControl:this.protoAccessControl});var d=t.VM.invokePartial.call(this,o,u,c);if(d==null&&t.compile){l.partials[l.name]=t.compile(o,e.compilerOptions,t);d=l.partials[l.name](u,c)}if(d!=null){if(l.indent){var p=d.split("\n");for(var f=0,m=p.length;f<m;f++){if(!p[f]&&f+1===m){break}p[f]=l.indent+p[f]}d=p.join("\n")}return d}else{throw new Ly["default"]("The partial "+l.name+" could not be compiled when running in runtime-only mode")}}a(n,"invokePartialWrapper");var i={strict:a(function o(u,l,c){if(!u||!(l in u)){throw new Ly["default"]('"'+l+'" not defined in '+u,{loc:c})}return i.lookupProperty(u,l)},"strict"),lookupProperty:a(function o(u,l){var c=u[l];if(c==null){return c}if(Object.prototype.hasOwnProperty.call(u,l)){return c}if(c3t.resultIsAllowed(c,i.protoAccessControl,l)){return c}return void 0},"lookupProperty"),lookup:a(function o(u,l){var c=u.length;for(var d=0;d<c;d++){var p=u[d]&&i.lookupProperty(u[d],l);if(p!=null){return u[d][l]}}},"lookup"),lambda:a(function o(u,l){return typeof u==="function"?u.call(l):u},"lambda"),escapeExpression:Dy.escapeExpression,invokePartial:n,fn:a(function o(u){var l=e[u];l.decorator=e[u+"_d"];return l},"fn"),programs:[],program:a(function o(u,l,c,d,p){var f=this.programs[u],m=this.fn(u);if(l||p||d||c){f=SZ(this,u,m,l,c,d,p)}else if(!f){f=this.programs[u]=SZ(this,u,m)}return f},"program"),data:a(function o(u,l){while(u&&l--){u=u._parent}return u},"data"),mergeIfNeeded:a(function o(u,l){var c=u||l;if(u&&l&&u!==l){c=Dy.extend({},l,u)}return c},"mergeIfNeeded"),nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function s(o){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];var l=u.data;s._setup(u);if(!u.partial&&e.useData){l=t9n(o,l)}var c=void 0,d=e.useBlockParams?[]:void 0;if(e.useDepths){if(u.depths){c=o!=u.depths[0]?[o].concat(u.depths):u.depths}else{c=[o]}}function p(f){return""+e.main(i,f,i.helpers,i.partials,l,d,c)}a(p,"main");p=p3t(e.main,p,i,u.depths||[],l,d);return p(o,u)}a(s,"ret");s.isTop=true;s._setup=function(o){if(!o.partial){var u=Dy.extend({},t.helpers,o.helpers);r9n(u,i);i.helpers=u;if(e.usePartial){i.partials=i.mergeIfNeeded(o.partials,t.partials)}if(e.usePartial||e.useDecorators){i.decorators=Dy.extend({},t.decorators,o.decorators)}i.hooks={};i.protoAccessControl=c3t.createProtoAccessControl(o);var l=o.allowCallsToHelperMissing||r;l3t.moveHelperToHooks(i,"helperMissing",l);l3t.moveHelperToHooks(i,"blockHelperMissing",l)}else{i.protoAccessControl=o.protoAccessControl;i.helpers=o.helpers;i.partials=o.partials;i.decorators=o.decorators;i.hooks=o.hooks}};s._child=function(o,u,l,c){if(e.useBlockParams&&!l){throw new Ly["default"]("must pass block params")}if(e.useDepths&&!c){throw new Ly["default"]("must pass parent depths")}return SZ(i,o,e[o],u,0,l,c)};return s}a(Q8n,"template");function SZ(e,t,r,n,i,s,o){function u(l){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];var d=o;if(o&&l!=o[0]&&!(l===e.nullContext&&o[0]===null)){d=[l].concat(o)}return r(e,l,e.helpers,e.partials,c.data||n,s&&[c.blockParams].concat(s),d)}a(u,"prog");u=p3t(r,u,e,o,n,s);u.program=t;u.depth=o?o.length:0;u.blockParams=i||0;return u}a(SZ,"wrapProgram");function Z8n(e,t,r){if(!e){if(r.name==="@partial-block"){e=r.data["partial-block"]}else{e=r.partials[r.name]}}else if(!e.call&&!r.name){r.name=e;e=r.partials[e]}return e}a(Z8n,"resolvePartial");function e9n(e,t,r){var n=r.data&&r.data["partial-block"];r.partial=true;if(r.ids){r.data.contextPath=r.ids[0]||r.data.contextPath}var i=void 0;if(r.fn&&r.fn!==d3t){(function(){r.data=Fy.createFrame(r.data);var s=r.fn;i=r.data["partial-block"]=a(function o(u){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];l.data=Fy.createFrame(l.data);l.data["partial-block"]=n;return s(u,l)},"partialBlockWrapper");if(s.partials){r.partials=Dy.extend({},r.partials,s.partials)}})()}if(e===void 0&&i){e=i}if(e===void 0){throw new Ly["default"]("The partial "+r.name+" could not be found")}else if(e instanceof Function){return e(t,r)}}a(e9n,"invokePartial");function d3t(){return""}a(d3t,"noop");function t9n(e,t){if(!t||!("root"in t)){t=t?Fy.createFrame(t):{};t.root=e}return t}a(t9n,"initData");function p3t(e,t,r,n,i,s){if(e.decorator){var o={};t=e.decorator(t,o,r,n&&n[0],i,s,n);Dy.extend(t,o)}return t}a(p3t,"executeDecorators");function r9n(e,t){Object.keys(e).forEach(function(r){var n=e[r];e[r]=n9n(n,t)})}a(r9n,"wrapHelpersToPassLookupProperty");function n9n(e,t){var r=t.lookupProperty;return X8n.wrapHelper(e,function(n){return Dy.extend({lookupProperty:r},n)})}a(n9n,"passLookupPropertyOption")});var gIe=y((AZ,m3t)=>{"use strict";AZ.__esModule=true;AZ["default"]=function(e){var t=typeof global!=="undefined"?global:window,r=t.Handlebars;e.noConflict=function(){if(t.Handlebars===e){t.Handlebars=r}return e}};m3t.exports=AZ["default"]});var v3t=y((CZ,_3t)=>{"use strict";CZ.__esModule=true;function _Ie(e){return e&&e.__esModule?e:{"default":e}}a(_Ie,"_interopRequireDefault");function vIe(e){if(e&&e.__esModule){return e}else{var t={};if(e!=null){for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]}}t["default"]=e;return t}}a(vIe,"_interopRequireWildcard");var i9n=EZ();var h3t=vIe(i9n);var s9n=o3t();var a9n=_Ie(s9n);var o9n=Gf();var u9n=_Ie(o9n);var l9n=Nc();var yIe=vIe(l9n);var c9n=f3t();var g3t=vIe(c9n);var d9n=gIe();var p9n=_Ie(d9n);function y3t(){var e=new h3t.HandlebarsEnvironment;yIe.extend(e,h3t);e.SafeString=a9n["default"];e.Exception=u9n["default"];e.Utils=yIe;e.escapeExpression=yIe.escapeExpression;e.VM=g3t;e.template=function(t){return g3t.template(t,e)};return e}a(y3t,"create");var z7=y3t();z7.create=y3t;p9n["default"](z7);z7["default"]=z7;CZ["default"]=z7;_3t.exports=CZ["default"]});var EIe=y((wZ,b3t)=>{"use strict";wZ.__esModule=true;var E3t={helpers:{helperExpression:a(function e(t){return t.type==="SubExpression"||(t.type==="MustacheStatement"||t.type==="BlockStatement")&&!!(t.params&&t.params.length||t.hash)},"helperExpression"),scopedId:a(function e(t){return/^\.|this\b/.test(t.original)},"scopedId"),simpleId:a(function e(t){return t.parts.length===1&&!E3t.helpers.scopedId(t)&&!t.depth},"simpleId")}};wZ["default"]=E3t;b3t.exports=wZ["default"]});var A3t=y((TZ,S3t)=>{"use strict";TZ.__esModule=true;var f9n=function(){var e={trace:a(function n(){},"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:a(function n(i,s,o,u,l,c,d){var p=c.length-1;switch(l){case 1:return c[p-1];break;case 2:this.$=u.prepareProgram(c[p]);break;case 3:this.$=c[p];break;case 4:this.$=c[p];break;case 5:this.$=c[p];break;case 6:this.$=c[p];break;case 7:this.$=c[p];break;case 8:this.$=c[p];break;case 9:this.$={type:"CommentStatement",value:u.stripComment(c[p]),strip:u.stripFlags(c[p],c[p]),loc:u.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:c[p],value:c[p],loc:u.locInfo(this._$)};break;case 11:this.$=u.prepareRawBlock(c[p-2],c[p-1],c[p],this._$);break;case 12:this.$={path:c[p-3],params:c[p-2],hash:c[p-1]};break;case 13:this.$=u.prepareBlock(c[p-3],c[p-2],c[p-1],c[p],false,this._$);break;case 14:this.$=u.prepareBlock(c[p-3],c[p-2],c[p-1],c[p],true,this._$);break;case 15:this.$={open:c[p-5],path:c[p-4],params:c[p-3],hash:c[p-2],blockParams:c[p-1],strip:u.stripFlags(c[p-5],c[p])};break;case 16:this.$={path:c[p-4],params:c[p-3],hash:c[p-2],blockParams:c[p-1],strip:u.stripFlags(c[p-5],c[p])};break;case 17:this.$={path:c[p-4],params:c[p-3],hash:c[p-2],blockParams:c[p-1],strip:u.stripFlags(c[p-5],c[p])};break;case 18:this.$={strip:u.stripFlags(c[p-1],c[p-1]),program:c[p]};break;case 19:var f=u.prepareBlock(c[p-2],c[p-1],c[p],c[p],false,this._$),m=u.prepareProgram([f],c[p-1].loc);m.chained=true;this.$={strip:c[p-2].strip,program:m,chain:true};break;case 20:this.$=c[p];break;case 21:this.$={path:c[p-1],strip:u.stripFlags(c[p-2],c[p])};break;case 22:this.$=u.prepareMustache(c[p-3],c[p-2],c[p-1],c[p-4],u.stripFlags(c[p-4],c[p]),this._$);break;case 23:this.$=u.prepareMustache(c[p-3],c[p-2],c[p-1],c[p-4],u.stripFlags(c[p-4],c[p]),this._$);break;case 24:this.$={type:"PartialStatement",name:c[p-3],params:c[p-2],hash:c[p-1],indent:"",strip:u.stripFlags(c[p-4],c[p]),loc:u.locInfo(this._$)};break;case 25:this.$=u.preparePartialBlock(c[p-2],c[p-1],c[p],this._$);break;case 26:this.$={path:c[p-3],params:c[p-2],hash:c[p-1],strip:u.stripFlags(c[p-4],c[p])};break;case 27:this.$=c[p];break;case 28:this.$=c[p];break;case 29:this.$={type:"SubExpression",path:c[p-3],params:c[p-2],hash:c[p-1],loc:u.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:c[p],loc:u.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:u.id(c[p-2]),value:c[p],loc:u.locInfo(this._$)};break;case 32:this.$=u.id(c[p-1]);break;case 33:this.$=c[p];break;case 34:this.$=c[p];break;case 35:this.$={type:"StringLiteral",value:c[p],original:c[p],loc:u.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(c[p]),original:Number(c[p]),loc:u.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:c[p]==="true",original:c[p]==="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.$=c[p];break;case 41:this.$=c[p];break;case 42:this.$=u.preparePath(true,c[p],this._$);break;case 43:this.$=u.preparePath(false,c[p],this._$);break;case 44:c[p-2].push({part:u.id(c[p]),original:c[p],separator:c[p-1]});this.$=c[p-2];break;case 45:this.$=[{part:u.id(c[p]),original:c[p]}];break;case 46:this.$=[];break;case 47:c[p-1].push(c[p]);break;case 48:this.$=[];break;case 49:c[p-1].push(c[p]);break;case 50:this.$=[];break;case 51:c[p-1].push(c[p]);break;case 58:this.$=[];break;case 59:c[p-1].push(c[p]);break;case 64:this.$=[];break;case 65:c[p-1].push(c[p]);break;case 70:this.$=[];break;case 71:c[p-1].push(c[p]);break;case 78:this.$=[];break;case 79:c[p-1].push(c[p]);break;case 82:this.$=[];break;case 83:c[p-1].push(c[p]);break;case 86:this.$=[];break;case 87:c[p-1].push(c[p]);break;case 90:this.$=[];break;case 91:c[p-1].push(c[p]);break;case 94:this.$=[];break;case 95:c[p-1].push(c[p]);break;case 98:this.$=[c[p]];break;case 99:c[p-1].push(c[p]);break;case 100:this.$=[c[p]];break;case 101:c[p-1].push(c[p]);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:a(function n(i,s){throw new Error(i)},"parseError"),parse:a(function n(i){var s=this,o=[0],u=[null],l=[],c=this.table,d="",p=0,f=0,m=0,h=2,g=1;this.lexer.setInput(i);this.lexer.yy=this.yy;this.yy.lexer=this.lexer;this.yy.parser=this;if(typeof this.lexer.yylloc=="undefined")this.lexer.yylloc={};var _=this.lexer.yylloc;l.push(_);var v=this.lexer.options&&this.lexer.options.ranges;if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;function S(me){o.length=o.length-2*me;u.length=u.length-me;l.length=l.length-me}a(S,"popStack");function E(){var me;me=s.lexer.lex()||1;if(typeof me!=="number"){me=s.symbols_[me]||me}return me}a(E,"lex");var b,A,C,T,O,P,R={},I,D,U,te;while(true){C=o[o.length-1];if(this.defaultActions[C]){T=this.defaultActions[C]}else{if(b===null||typeof b=="undefined"){b=E()}T=c[C]&&c[C][b]}if(typeof T==="undefined"||!T.length||!T[0]){var ve="";if(!m){te=[];for(I in c[C])if(this.terminals_[I]&&I>2){te.push("'"+this.terminals_[I]+"'")}if(this.lexer.showPosition){ve="Parse error on line "+(p+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+te.join(", ")+", got '"+(this.terminals_[b]||b)+"'"}else{ve="Parse error on line "+(p+1)+": Unexpected "+(b==1?"end of input":"'"+(this.terminals_[b]||b)+"'")}this.parseError(ve,{text:this.lexer.match,token:this.terminals_[b]||b,line:this.lexer.yylineno,loc:_,expected:te})}}if(T[0]instanceof Array&&T.length>1){throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+b)}switch(T[0]){case 1:o.push(b);u.push(this.lexer.yytext);l.push(this.lexer.yylloc);o.push(T[1]);b=null;if(!A){f=this.lexer.yyleng;d=this.lexer.yytext;p=this.lexer.yylineno;_=this.lexer.yylloc;if(m>0)m--}else{b=A;A=null}break;case 2:D=this.productions_[T[1]][1];R.$=u[u.length-D];R._$={first_line:l[l.length-(D||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(D||1)].first_column,last_column:l[l.length-1].last_column};if(v){R._$.range=[l[l.length-(D||1)].range[0],l[l.length-1].range[1]]}P=this.performAction.call(R,d,f,p,this.yy,T[1],u,l);if(typeof P!=="undefined"){return P}if(D){o=o.slice(0,-1*D*2);u=u.slice(0,-1*D);l=l.slice(0,-1*D)}o.push(this.productions_[T[1]][0]);u.push(R.$);l.push(R._$);U=c[o[o.length-2]][o[o.length-1]];o.push(U);break;case 3:return true}}return true},"parse")};var t=function(){var n={EOF:1,parseError:a(function i(s,o){if(this.yy.parser){this.yy.parser.parseError(s,o)}else{throw new Error(s)}},"parseError"),setInput:a(function i(s){this._input=s;this._more=this._less=this.done=false;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};if(this.options.ranges)this.yylloc.range=[0,0];this.offset=0;return this},"setInput"),input:a(function i(){var s=this._input[0];this.yytext+=s;this.yyleng++;this.offset++;this.match+=s;this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);if(o){this.yylineno++;this.yylloc.last_line++}else{this.yylloc.last_column++}if(this.options.ranges)this.yylloc.range[1]++;this._input=this._input.slice(1);return s},"input"),unput:a(function i(s){var o=s.length;var u=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input;this.yytext=this.yytext.substr(0,this.yytext.length-o-1);this.offset-=o;var l=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);if(u.length-1)this.yylineno-=u.length-1;var c=this.yylloc.range;this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===l.length?this.yylloc.first_column:0)+l[l.length-u.length].length-u[0].length:this.yylloc.first_column-o};if(this.options.ranges){this.yylloc.range=[c[0],c[0]+this.yyleng-o]}return this},"unput"),more:a(function i(){this._more=true;return this},"more"),less:a(function i(s){this.unput(this.match.slice(s))},"less"),pastInput:a(function i(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function i(){var s=this.match;if(s.length<20){s+=this._input.substr(0,20-s.length)}return(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function i(){var s=this.pastInput();var o=new Array(s.length+1).join("-");return s+this.upcomingInput()+"\n"+o+"^"},"showPosition"),next:a(function i(){if(this.done){return this.EOF}if(!this._input)this.done=true;var s,o,u,l,c,d;if(!this._more){this.yytext="";this.match=""}var p=this._currentRules();for(var f=0;f<p.length;f++){u=this._input.match(this.rules[p[f]]);if(u&&(!o||u[0].length>o[0].length)){o=u;l=f;if(!this.options.flex)break}}if(o){d=o[0].match(/(?:\r\n?|\n).*/g);if(d)this.yylineno+=d.length;this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length};this.yytext+=o[0];this.match+=o[0];this.matches=o;this.yyleng=this.yytext.length;if(this.options.ranges){this.yylloc.range=[this.offset,this.offset+=this.yyleng]}this._more=false;this._input=this._input.slice(o[0].length);this.matched+=o[0];s=this.performAction.call(this,this.yy,this,p[l],this.conditionStack[this.conditionStack.length-1]);if(this.done&&this._input)this.done=false;if(s)return s;else return}if(this._input===""){return this.EOF}else{return this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}},"next"),lex:a(function i(){var s=this.next();if(typeof s!=="undefined"){return s}else{return this.lex()}},"lex"),begin:a(function i(s){this.conditionStack.push(s)},"begin"),popState:a(function i(){return this.conditionStack.pop()},"popState"),_currentRules:a(function i(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},"_currentRules"),topState:a(function i(){return this.conditionStack[this.conditionStack.length-2]},"topState"),pushState:a(function i(s){this.begin(s)},"begin")};n.options={};n.performAction=a(function i(s,o,u,l){function c(p,f){return o.yytext=o.yytext.substring(p,o.yyleng-f+p)}a(c,"strip");var d=l;switch(u){case 0:if(o.yytext.slice(-2)==="\\\\"){c(0,1);this.begin("mu")}else if(o.yytext.slice(-1)==="\\"){c(0,1);this.begin("emu")}else{this.begin("mu")}if(o.yytext)return 15;break;case 1:return 15;break;case 2:this.popState();return 15;break;case 3:this.begin("raw");return 15;break;case 4:this.popState();if(this.conditionStack[this.conditionStack.length-1]==="raw"){return 15}else{c(5,9);return"END_RAW_BLOCK"}break;case 5:return 15;break;case 6:this.popState();return 14;break;case 7:return 65;break;case 8:return 68;break;case 9:return 19;break;case 10:this.popState();this.begin("raw");return 23;break;case 11:return 55;break;case 12:return 60;break;case 13:return 29;break;case 14:return 47;break;case 15:this.popState();return 44;break;case 16:this.popState();return 44;break;case 17:return 34;break;case 18:return 39;break;case 19:return 51;break;case 20:return 48;break;case 21:this.unput(o.yytext);this.popState();this.begin("com");break;case 22:this.popState();return 14;break;case 23:return 48;break;case 24:return 73;break;case 25:return 72;break;case 26:return 72;break;case 27:return 87;break;case 28:break;case 29:this.popState();return 54;break;case 30:this.popState();return 33;break;case 31:o.yytext=c(1,2).replace(/\\"/g,'"');return 80;break;case 32:o.yytext=c(1,2).replace(/\\'/g,"'");return 80;break;case 33:return 85;break;case 34:return 82;break;case 35:return 82;break;case 36:return 83;break;case 37:return 84;break;case 38:return 81;break;case 39:return 75;break;case 40:return 77;break;case 41:return 72;break;case 42:o.yytext=o.yytext.replace(/\\([\\\]])/g,"$1");return 72;break;case 43:return"INVALID";break;case 44:return 5;break}},"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":false},"emu":{"rules":[2],"inclusive":false},"com":{"rules":[6],"inclusive":false},"raw":{"rules":[3,4,5],"inclusive":false},"INITIAL":{"rules":[0,1,44],"inclusive":true}};return n}();e.lexer=t;function r(){this.yy={}}a(r,"Parser");r.prototype=e;e.Parser=r;return new r}();TZ["default"]=f9n;S3t.exports=TZ["default"]});var PZ=y((OZ,T3t)=>{"use strict";OZ.__esModule=true;function m9n(e){return e&&e.__esModule?e:{"default":e}}a(m9n,"_interopRequireDefault");var h9n=Gf();var bIe=m9n(h9n);function xZ(){this.parents=[]}a(xZ,"Visitor");xZ.prototype={constructor:xZ,mutating:false,acceptKey:a(function e(t,r){var n=this.accept(t[r]);if(this.mutating){if(n&&!xZ.prototype[n.type]){throw new bIe["default"]('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+t.type)}t[r]=n}},"acceptKey"),acceptRequired:a(function e(t,r){this.acceptKey(t,r);if(!t[r]){throw new bIe["default"](t.type+" requires "+r)}},"acceptRequired"),acceptArray:a(function e(t){for(var r=0,n=t.length;r<n;r++){this.acceptKey(t,r);if(!t[r]){t.splice(r,1);r--;n--}}},"acceptArray"),accept:a(function e(t){if(!t){return}if(!this[t.type]){throw new bIe["default"]("Unknown type: "+t.type,t)}if(this.current){this.parents.unshift(this.current)}this.current=t;var r=this[t.type](t);this.current=this.parents.shift();if(!this.mutating||r){return r}else if(r!==false){return t}},"accept"),Program:a(function e(t){this.acceptArray(t.body)},"Program"),MustacheStatement:RZ,Decorator:RZ,BlockStatement:C3t,DecoratorBlock:C3t,PartialStatement:w3t,PartialBlockStatement:a(function e(t){w3t.call(this,t);this.acceptKey(t,"program")},"PartialBlockStatement"),ContentStatement:a(function e(){},"ContentStatement"),CommentStatement:a(function e(){},"CommentStatement"),SubExpression:RZ,PathExpression:a(function e(){},"PathExpression"),StringLiteral:a(function e(){},"StringLiteral"),NumberLiteral:a(function e(){},"NumberLiteral"),BooleanLiteral:a(function e(){},"BooleanLiteral"),UndefinedLiteral:a(function e(){},"UndefinedLiteral"),NullLiteral:a(function e(){},"NullLiteral"),Hash:a(function e(t){this.acceptArray(t.pairs)},"Hash"),HashPair:a(function e(t){this.acceptRequired(t,"value")},"HashPair")};function RZ(e){this.acceptRequired(e,"path");this.acceptArray(e.params);this.acceptKey(e,"hash")}a(RZ,"visitSubExpression");function C3t(e){RZ.call(this,e);this.acceptKey(e,"program");this.acceptKey(e,"inverse")}a(C3t,"visitBlock");function w3t(e){this.acceptRequired(e,"name");this.acceptArray(e.params);this.acceptKey(e,"hash")}a(w3t,"visitPartial");OZ["default"]=xZ;T3t.exports=OZ["default"]});var R3t=y((NZ,x3t)=>{"use strict";NZ.__esModule=true;function g9n(e){return e&&e.__esModule?e:{"default":e}}a(g9n,"_interopRequireDefault");var y9n=PZ();var _9n=g9n(y9n);function pg(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}a(pg,"WhitespaceControl");pg.prototype=new _9n["default"];pg.prototype.Program=function(e){var t=!this.options.ignoreStandalone;var r=!this.isRootSeen;this.isRootSeen=true;var n=e.body;for(var i=0,s=n.length;i<s;i++){var o=n[i],u=this.accept(o);if(!u){continue}var l=SIe(n,i,r),c=AIe(n,i,r),d=u.openStandalone&&l,p=u.closeStandalone&&c,f=u.inlineStandalone&&l&&c;if(u.close){OC(n,i,true)}if(u.open){fb(n,i,true)}if(t&&f){OC(n,i);if(fb(n,i)){if(o.type==="PartialStatement"){o.indent=/([ \t]+$)/.exec(n[i-1].original)[1]}}}if(t&&d){OC((o.program||o.inverse).body);fb(n,i)}if(t&&p){OC(n,i);fb((o.inverse||o.program).body)}}return e};pg.prototype.BlockStatement=pg.prototype.DecoratorBlock=pg.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){n=r.body[0].program;while(i.chained){i=i.body[i.body.length-1].program}}var s={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:AIe(t.body),closeStandalone:SIe((n||t).body)};if(e.openStrip.close){OC(t.body,null,true)}if(r){var o=e.inverseStrip;if(o.open){fb(t.body,null,true)}if(o.close){OC(n.body,null,true)}if(e.closeStrip.open){fb(i.body,null,true)}if(!this.options.ignoreStandalone&&SIe(t.body)&&AIe(n.body)){fb(t.body);OC(n.body)}}else if(e.closeStrip.open){fb(t.body,null,true)}return s};pg.prototype.Decorator=pg.prototype.MustacheStatement=function(e){return e.strip};pg.prototype.PartialStatement=pg.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:true,open:t.open,close:t.close}};function SIe(e,t,r){if(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)}}a(SIe,"isPrevWhitespace");function AIe(e,t,r){if(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)}}a(AIe,"isNextWhitespace");function OC(e,t,r){var n=e[t==null?0:t+1];if(!n||n.type!=="ContentStatement"||!r&&n.rightStripped){return}var i=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,"");n.rightStripped=n.value!==i}a(OC,"omitRight");function fb(e,t,r){var n=e[t==null?e.length-1:t-1];if(!n||n.type!=="ContentStatement"||!r&&n.leftStripped){return}var i=n.value;n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,"");n.leftStripped=n.value!==i;return n.leftStripped}a(fb,"omitLeft");NZ["default"]=pg;x3t.exports=NZ["default"]});var O3t=y(Hf=>{"use strict";Hf.__esModule=true;Hf.SourceLocation=b9n;Hf.id=S9n;Hf.stripFlags=A9n;Hf.stripComment=C9n;Hf.preparePath=w9n;Hf.prepareMustache=T9n;Hf.prepareRawBlock=x9n;Hf.prepareBlock=R9n;Hf.prepareProgram=O9n;Hf.preparePartialBlock=P9n;function v9n(e){return e&&e.__esModule?e:{"default":e}}a(v9n,"_interopRequireDefault");var E9n=Gf();var CIe=v9n(E9n);function wIe(e,t){t=t.path?t.path.original:t;if(e.path.original!==t){var r={loc:e.path.loc};throw new CIe["default"](e.path.original+" doesn't match "+t,r)}}a(wIe,"validateClose");function b9n(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}}a(b9n,"SourceLocation");function S9n(e){if(/^\[.*\]$/.test(e)){return e.substring(1,e.length-1)}else{return e}}a(S9n,"id");function A9n(e,t){return{open:e.charAt(2)==="~",close:t.charAt(t.length-3)==="~"}}a(A9n,"stripFlags");function C9n(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}a(C9n,"stripComment");function w9n(e,t,r){r=this.locInfo(r);var n=e?"@":"",i=[],s=0;for(var o=0,u=t.length;o<u;o++){var l=t[o].part,c=t[o].original!==l;n+=(t[o].separator||"")+l;if(!c&&(l===".."||l==="."||l==="this")){if(i.length>0){throw new CIe["default"]("Invalid path: "+n,{loc:r})}else if(l===".."){s++}}else{i.push(l)}}return{type:"PathExpression",data:e,depth:s,parts:i,original:n,loc:r}}a(w9n,"preparePath");function T9n(e,t,r,n,i,s){var o=n.charAt(3)||n.charAt(2),u=o!=="{"&&o!=="&";var l=/\*/.test(n);return{type:l?"Decorator":"MustacheStatement",path:e,params:t,hash:r,escaped:u,strip:i,loc:this.locInfo(s)}}a(T9n,"prepareMustache");function x9n(e,t,r,n){wIe(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}}a(x9n,"prepareRawBlock");function R9n(e,t,r,n,i,s){if(n&&n.path){wIe(e,n)}var o=/\*/.test(e.open);t.blockParams=e.blockParams;var u=void 0,l=void 0;if(r){if(o){throw new CIe["default"]("Unexpected inverse block on decorator",r)}if(r.chain){r.program.body[0].closeStrip=n.strip}l=r.strip;u=r.program}if(i){i=u;u=t;t=i}return{type:o?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:u,openStrip:e.strip,inverseStrip:l,closeStrip:n&&n.strip,loc:this.locInfo(s)}}a(R9n,"prepareBlock");function O9n(e,t){if(!t&&e.length){var r=e[0].loc,n=e[e.length-1].loc;if(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}}a(O9n,"prepareProgram");function P9n(e,t,r,n){wIe(e,r);return{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}a(P9n,"preparePartialBlock")});var I3t=y(K7=>{"use strict";K7.__esModule=true;K7.parseWithoutProcessing=N3t;K7.parse=M9n;function N9n(e){if(e&&e.__esModule){return e}else{var t={};if(e!=null){for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]}}t["default"]=e;return t}}a(N9n,"_interopRequireWildcard");function P3t(e){return e&&e.__esModule?e:{"default":e}}a(P3t,"_interopRequireDefault");var I9n=A3t();var TIe=P3t(I9n);var k9n=R3t();var D9n=P3t(k9n);var L9n=O3t();var F9n=N9n(L9n);var B9n=Nc();K7.parser=TIe["default"];var IZ={};B9n.extend(IZ,F9n);function N3t(e,t){if(e.type==="Program"){return e}TIe["default"].yy=IZ;IZ.locInfo=function(n){return new IZ.SourceLocation(t&&t.srcName,n)};var r=TIe["default"].parse(e);return r}a(N3t,"parseWithoutProcessing");function M9n(e,t){var r=N3t(e,t);var n=new D9n["default"](t);return n.accept(r)}a(M9n,"parse")});var F3t=y(J7=>{"use strict";J7.__esModule=true;J7.Compiler=xIe;J7.precompile=j9n;J7.compile=G9n;function D3t(e){return e&&e.__esModule?e:{"default":e}}a(D3t,"_interopRequireDefault");var q9n=Gf();var Y7=D3t(q9n);var X7=Nc();var U9n=EIe();var W7=D3t(U9n);var $9n=[].slice;function xIe(){}a(xIe,"Compiler");xIe.prototype={compiler:xIe,equals:a(function e(t){var r=this.opcodes.length;if(t.opcodes.length!==r){return false}for(var n=0;n<r;n++){var i=this.opcodes[n],s=t.opcodes[n];if(i.opcode!==s.opcode||!L3t(i.args,s.args)){return false}}r=this.children.length;for(var n=0;n<r;n++){if(!this.children[n].equals(t.children[n])){return false}}return true},"equals"),guid:0,compile:a(function e(t,r){this.sourceNode=[];this.opcodes=[];this.children=[];this.options=r;this.stringParams=r.stringParams;this.trackIds=r.trackIds;r.blockParams=r.blockParams||[];r.knownHelpers=X7.extend(Object.create(null),{helperMissing:true,blockHelperMissing:true,each:true,"if":true,unless:true,"with":true,log:true,lookup:true},r.knownHelpers);return this.accept(t)},"compile"),compileProgram:a(function e(t){var r=new this.compiler,n=r.compile(t,this.options),i=this.guid++;this.usePartial=this.usePartial||n.usePartial;this.children[i]=n;this.useDepths=this.useDepths||n.useDepths;return i},"compileProgram"),accept:a(function e(t){if(!this[t.type]){throw new Y7["default"]("Unknown type: "+t.type,t)}this.sourceNode.unshift(t);var r=this[t.type](t);this.sourceNode.shift();return r},"accept"),Program:a(function e(t){this.options.blockParams.unshift(t.blockParams);var r=t.body,n=r.length;for(var i=0;i<n;i++){this.accept(r[i])}this.options.blockParams.shift();this.isSimple=n===1;this.blockParams=t.blockParams?t.blockParams.length:0;return this},"Program"),BlockStatement:a(function e(t){k3t(t);var r=t.program,n=t.inverse;r=r&&this.compileProgram(r);n=n&&this.compileProgram(n);var i=this.classifySexpr(t);if(i==="helper"){this.helperSexpr(t,r,n)}else if(i==="simple"){this.simpleSexpr(t);this.opcode("pushProgram",r);this.opcode("pushProgram",n);this.opcode("emptyHash");this.opcode("blockValue",t.path.original)}else{this.ambiguousSexpr(t,r,n);this.opcode("pushProgram",r);this.opcode("pushProgram",n);this.opcode("emptyHash");this.opcode("ambiguousBlockValue")}this.opcode("append")},"BlockStatement"),DecoratorBlock:a(function e(t){var r=t.program&&this.compileProgram(t.program);var n=this.setupFullMustacheParams(t,r,void 0),i=t.path;this.useDecorators=true;this.opcode("registerDecorator",n.length,i.original)},"DecoratorBlock"),PartialStatement:a(function e(t){this.usePartial=true;var r=t.program;if(r){r=this.compileProgram(t.program)}var n=t.params;if(n.length>1){throw new Y7["default"]("Unsupported number of partial arguments: "+n.length,t)}else if(!n.length){if(this.options.explicitPartialContext){this.opcode("pushLiteral","undefined")}else{n.push({type:"PathExpression",parts:[],depth:0})}}var i=t.name.original,s=t.name.type==="SubExpression";if(s){this.accept(t.name)}this.setupFullMustacheParams(t,r,void 0,true);var o=t.indent||"";if(this.options.preventIndent&&o){this.opcode("appendContent",o);o=""}this.opcode("invokePartial",s,i,o);this.opcode("append")},"PartialStatement"),PartialBlockStatement:a(function e(t){this.PartialStatement(t)},"PartialBlockStatement"),MustacheStatement:a(function e(t){this.SubExpression(t);if(t.escaped&&!this.options.noEscape){this.opcode("appendEscaped")}else{this.opcode("append")}},"MustacheStatement"),Decorator:a(function e(t){this.DecoratorBlock(t)},"Decorator"),ContentStatement:a(function e(t){if(t.value){this.opcode("appendContent",t.value)}},"ContentStatement"),CommentStatement:a(function e(){},"CommentStatement"),SubExpression:a(function e(t){k3t(t);var r=this.classifySexpr(t);if(r==="simple"){this.simpleSexpr(t)}else if(r==="helper"){this.helperSexpr(t)}else{this.ambiguousSexpr(t)}},"SubExpression"),ambiguousSexpr:a(function e(t,r,n){var i=t.path,s=i.parts[0],o=r!=null||n!=null;this.opcode("getContext",i.depth);this.opcode("pushProgram",r);this.opcode("pushProgram",n);i.strict=true;this.accept(i);this.opcode("invokeAmbiguous",s,o)},"ambiguousSexpr"),simpleSexpr:a(function e(t){var r=t.path;r.strict=true;this.accept(r);this.opcode("resolvePossibleLambda")},"simpleSexpr"),helperSexpr:a(function e(t,r,n){var i=this.setupFullMustacheParams(t,r,n),s=t.path,o=s.parts[0];if(this.options.knownHelpers[o]){this.opcode("invokeKnownHelper",i.length,o)}else if(this.options.knownHelpersOnly){throw new Y7["default"]("You specified knownHelpersOnly, but used the unknown helper "+o,t)}else{s.strict=true;s.falsy=true;this.accept(s);this.opcode("invokeHelper",i.length,s.original,W7["default"].helpers.simpleId(s))}},"helperSexpr"),PathExpression:a(function e(t){this.addDepth(t.depth);this.opcode("getContext",t.depth);var r=t.parts[0],n=W7["default"].helpers.scopedId(t),i=!t.depth&&!n&&this.blockParamIndex(r);if(i){this.opcode("lookupBlockParam",i,t.parts)}else if(!r){this.opcode("pushContext")}else if(t.data){this.options.data=true;this.opcode("lookupData",t.depth,t.parts,t.strict)}else{this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,n)}},"PathExpression"),StringLiteral:a(function e(t){this.opcode("pushString",t.value)},"StringLiteral"),NumberLiteral:a(function e(t){this.opcode("pushLiteral",t.value)},"NumberLiteral"),BooleanLiteral:a(function e(t){this.opcode("pushLiteral",t.value)},"BooleanLiteral"),UndefinedLiteral:a(function e(){this.opcode("pushLiteral","undefined")},"UndefinedLiteral"),NullLiteral:a(function e(){this.opcode("pushLiteral","null")},"NullLiteral"),Hash:a(function e(t){var r=t.pairs,n=0,i=r.length;this.opcode("pushHash");for(;n<i;n++){this.pushParam(r[n].value)}while(n--){this.opcode("assignToHash",r[n].key)}this.opcode("popHash")},"Hash"),opcode:a(function e(t){this.opcodes.push({opcode:t,args:$9n.call(arguments,1),loc:this.sourceNode[0].loc})},"opcode"),addDepth:a(function e(t){if(!t){return}this.useDepths=true},"addDepth"),classifySexpr:a(function e(t){var r=W7["default"].helpers.simpleId(t.path);var n=r&&!!this.blockParamIndex(t.path.parts[0]);var i=!n&&W7["default"].helpers.helperExpression(t);var s=!n&&(i||r);if(s&&!i){var o=t.path.parts[0],u=this.options;if(u.knownHelpers[o]){i=true}else if(u.knownHelpersOnly){s=false}}if(i){return"helper"}else if(s){return"ambiguous"}else{return"simple"}},"classifySexpr"),pushParams:a(function e(t){for(var r=0,n=t.length;r<n;r++){this.pushParam(t[r])}},"pushParams"),pushParam:a(function e(t){var r=t.value!=null?t.value:t.original||"";if(this.stringParams){if(r.replace){r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")}if(t.depth){this.addDepth(t.depth)}this.opcode("getContext",t.depth||0);this.opcode("pushStringParam",r,t.type);if(t.type==="SubExpression"){this.accept(t)}}else{if(this.trackIds){var n=void 0;if(t.parts&&!W7["default"].helpers.scopedId(t)&&!t.depth){n=this.blockParamIndex(t.parts[0])}if(n){var i=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else{r=t.original||r;if(r.replace){r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")}this.opcode("pushId",t.type,r)}}this.accept(t)}},"pushParam"),setupFullMustacheParams:a(function e(t,r,n,i){var s=t.params;this.pushParams(s);this.opcode("pushProgram",r);this.opcode("pushProgram",n);if(t.hash){this.accept(t.hash)}else{this.opcode("emptyHash",i)}return s},"setupFullMustacheParams"),blockParamIndex:a(function e(t){for(var r=0,n=this.options.blockParams.length;r<n;r++){var i=this.options.blockParams[r],s=i&&X7.indexOf(i,t);if(i&&s>=0){return[r,s]}}},"blockParamIndex")};function j9n(e,t,r){if(e==null||typeof e!=="string"&&e.type!=="Program"){throw new Y7["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e)}t=t||{};if(!("data"in t)){t.data=true}if(t.compat){t.useDepths=true}var n=r.parse(e,t),i=new r.Compiler().compile(n,t);return new r.JavaScriptCompiler().compile(i,t)}a(j9n,"precompile");function G9n(e,t,r){if(t===void 0)t={};if(e==null||typeof e!=="string"&&e.type!=="Program"){throw new Y7["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e)}t=X7.extend({},t);if(!("data"in t)){t.data=true}if(t.compat){t.useDepths=true}var n=void 0;function i(){var o=r.parse(e,t),u=new r.Compiler().compile(o,t),l=new r.JavaScriptCompiler().compile(u,t,void 0,true);return r.template(l)}a(i,"compileInput");function s(o,u){if(!n){n=i()}return n.call(this,o,u)}a(s,"ret");s._setup=function(o){if(!n){n=i()}return n._setup(o)};s._child=function(o,u,l,c){if(!n){n=i()}return n._child(o,u,l,c)};return s}a(G9n,"compile");function L3t(e,t){if(e===t){return true}if(X7.isArray(e)&&X7.isArray(t)&&e.length===t.length){for(var r=0;r<e.length;r++){if(!L3t(e[r],t[r])){return false}}return true}}a(L3t,"argEquals");function k3t(e){if(!e.path.parts){var t=e.path;e.path={type:"PathExpression",data:false,depth:0,parts:[t.original+""],original:t.original+"",loc:t.loc}}}a(k3t,"transformLiteralToPath")});var M3t=y(RIe=>{var B3t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");RIe.encode=function(e){if(0<=e&&e<B3t.length){return B3t[e]}throw new TypeError("Must be between 0 and 63: "+e)};RIe.decode=function(e){var t=65;var r=90;var n=97;var i=122;var s=48;var o=57;var u=43;var l=47;var c=26;var d=52;if(t<=e&&e<=r){return e-t}if(n<=e&&e<=i){return e-n+c}if(s<=e&&e<=o){return e-s+d}if(e==u){return 62}if(e==l){return 63}return-1}});var NIe=y(PIe=>{var q3t=M3t();var OIe=5;var U3t=1<<OIe;var $3t=U3t-1;var j3t=U3t;function H9n(e){return e<0?(-e<<1)+1:(e<<1)+0}a(H9n,"toVLQSigned");function V9n(e){var t=(e&1)===1;var r=e>>1;return t?-r:r}a(V9n,"fromVLQSigned");PIe.encode=a(function e(t){var r="";var n;var i=H9n(t);do{n=i&$3t;i>>>=OIe;if(i>0){n|=j3t}r+=q3t.encode(n)}while(i>0);return r},"base64VLQ_encode");PIe.decode=a(function e(t,r,n){var i=t.length;var s=0;var o=0;var u,l;do{if(r>=i){throw new Error("Expected more digits in base 64 VLQ value.")}l=q3t.decode(t.charCodeAt(r++));if(l===-1){throw new Error("Invalid base64 digit: "+t.charAt(r-1))}u=!!(l&j3t);l&=$3t;s=s+(l<<o);o+=OIe}while(u);n.value=V9n(s);n.rest=r},"base64VLQ_decode")});var dN=y(Fl=>{function z9n(e,t,r){if(t in e){return e[t]}else if(arguments.length===3){return r}else{throw new Error('"'+t+'" is a required argument.')}}a(z9n,"getArg");Fl.getArg=z9n;var G3t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;var K9n=/^data:.+\,.+$/;function Q7(e){var t=e.match(G3t);if(!t){return null}return{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}}a(Q7,"urlParse");Fl.urlParse=Q7;function lN(e){var t="";if(e.scheme){t+=e.scheme+":"}t+="//";if(e.auth){t+=e.auth+"@"}if(e.host){t+=e.host}if(e.port){t+=":"+e.port}if(e.path){t+=e.path}return t}a(lN,"urlGenerate");Fl.urlGenerate=lN;function IIe(e){var t=e;var r=Q7(e);if(r){if(!r.path){return e}t=r.path}var n=Fl.isAbsolute(t);var i=t.split(/\/+/);for(var s,o=0,u=i.length-1;u>=0;u--){s=i[u];if(s==="."){i.splice(u,1)}else if(s===".."){o++}else if(o>0){if(s===""){i.splice(u+1,o);o=0}else{i.splice(u,2);o--}}}t=i.join("/");if(t===""){t=n?"/":"."}if(r){r.path=t;return lN(r)}return t}a(IIe,"normalize");Fl.normalize=IIe;function H3t(e,t){if(e===""){e="."}if(t===""){t="."}var r=Q7(t);var n=Q7(e);if(n){e=n.path||"/"}if(r&&!r.scheme){if(n){r.scheme=n.scheme}return lN(r)}if(r||t.match(K9n)){return t}if(n&&!n.host&&!n.path){n.host=t;return lN(n)}var i=t.charAt(0)==="/"?t:IIe(e.replace(/\/+$/,"")+"/"+t);if(n){n.path=i;return lN(n)}return i}a(H3t,"join");Fl.join=H3t;Fl.isAbsolute=function(e){return e.charAt(0)==="/"||G3t.test(e)};function W9n(e,t){if(e===""){e="."}e=e.replace(/\/$/,"");var r=0;while(t.indexOf(e+"/")!==0){var n=e.lastIndexOf("/");if(n<0){return t}e=e.slice(0,n);if(e.match(/^([^\/]+:\/)?\/*$/)){return t}++r}return Array(r+1).join("../")+t.substr(e.length+1)}a(W9n,"relative");Fl.relative=W9n;var V3t=function(){var e=Object.create(null);return!("__proto__"in e)}();function z3t(e){return e}a(z3t,"identity");function Y9n(e){if(K3t(e)){return"$"+e}return e}a(Y9n,"toSetString");Fl.toSetString=V3t?z3t:Y9n;function X9n(e){if(K3t(e)){return e.slice(1)}return e}a(X9n,"fromSetString");Fl.fromSetString=V3t?z3t:X9n;function K3t(e){if(!e){return false}var t=e.length;if(t<9){return false}if(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 false}for(var r=t-10;r>=0;r--){if(e.charCodeAt(r)!==36){return false}}return true}a(K3t,"isProtoString");function J9n(e,t,r){var n=cN(e.source,t.source);if(n!==0){return n}n=e.originalLine-t.originalLine;if(n!==0){return n}n=e.originalColumn-t.originalColumn;if(n!==0||r){return n}n=e.generatedColumn-t.generatedColumn;if(n!==0){return n}n=e.generatedLine-t.generatedLine;if(n!==0){return n}return cN(e.name,t.name)}a(J9n,"compareByOriginalPositions");Fl.compareByOriginalPositions=J9n;function Q9n(e,t,r){var n=e.generatedLine-t.generatedLine;if(n!==0){return n}n=e.generatedColumn-t.generatedColumn;if(n!==0||r){return n}n=cN(e.source,t.source);if(n!==0){return n}n=e.originalLine-t.originalLine;if(n!==0){return n}n=e.originalColumn-t.originalColumn;if(n!==0){return n}return cN(e.name,t.name)}a(Q9n,"compareByGeneratedPositionsDeflated");Fl.compareByGeneratedPositionsDeflated=Q9n;function cN(e,t){if(e===t){return 0}if(e===null){return 1}if(t===null){return-1}if(e>t){return 1}return-1}a(cN,"strcmp");function Z9n(e,t){var r=e.generatedLine-t.generatedLine;if(r!==0){return r}r=e.generatedColumn-t.generatedColumn;if(r!==0){return r}r=cN(e.source,t.source);if(r!==0){return r}r=e.originalLine-t.originalLine;if(r!==0){return r}r=e.originalColumn-t.originalColumn;if(r!==0){return r}return cN(e.name,t.name)}a(Z9n,"compareByGeneratedPositionsInflated");Fl.compareByGeneratedPositionsInflated=Z9n;function eLn(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}a(eLn,"parseSourceMapInput");Fl.parseSourceMapInput=eLn;function tLn(e,t,r){t=t||"";if(e){if(e[e.length-1]!=="/"&&t[0]!=="/"){e+="/"}t=e+t}if(r){var n=Q7(r);if(!n){throw new Error("sourceMapURL could not be parsed")}if(n.path){var i=n.path.lastIndexOf("/");if(i>=0){n.path=n.path.substring(0,i+1)}}t=H3t(lN(n),t)}return IIe(t)}a(tLn,"computeSourceURL");Fl.computeSourceURL=tLn});var LIe=y(W3t=>{var kIe=dN();var DIe=Object.prototype.hasOwnProperty;var PC=typeof Map!=="undefined";function By(){this._array=[];this._set=PC?new Map:Object.create(null)}a(By,"ArraySet");By.fromArray=a(function e(t,r){var n=new By;for(var i=0,s=t.length;i<s;i++){n.add(t[i],r)}return n},"ArraySet_fromArray");By.prototype.size=a(function e(){return PC?this._set.size:Object.getOwnPropertyNames(this._set).length},"ArraySet_size");By.prototype.add=a(function e(t,r){var n=PC?t:kIe.toSetString(t);var i=PC?this.has(t):DIe.call(this._set,n);var s=this._array.length;if(!i||r){this._array.push(t)}if(!i){if(PC){this._set.set(t,s)}else{this._set[n]=s}}},"ArraySet_add");By.prototype.has=a(function e(t){if(PC){return this._set.has(t)}else{var r=kIe.toSetString(t);return DIe.call(this._set,r)}},"ArraySet_has");By.prototype.indexOf=a(function e(t){if(PC){var r=this._set.get(t);if(r>=0){return r}}else{var n=kIe.toSetString(t);if(DIe.call(this._set,n)){return this._set[n]}}throw new Error('"'+t+'" is not in the set.')},"ArraySet_indexOf");By.prototype.at=a(function e(t){if(t>=0&&t<this._array.length){return this._array[t]}throw new Error("No element indexed by "+t)},"ArraySet_at");By.prototype.toArray=a(function e(){return this._array.slice()},"ArraySet_toArray");W3t.ArraySet=By});var J3t=y(X3t=>{var Y3t=dN();function rLn(e,t){var r=e.generatedLine;var n=t.generatedLine;var i=e.generatedColumn;var s=t.generatedColumn;return n>r||n==r&&s>=i||Y3t.compareByGeneratedPositionsInflated(e,t)<=0}a(rLn,"generatedPositionAfter");function kZ(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}a(kZ,"MappingList");kZ.prototype.unsortedForEach=a(function e(t,r){this._array.forEach(t,r)},"MappingList_forEach");kZ.prototype.add=a(function e(t){if(rLn(this._last,t)){this._last=t;this._array.push(t)}else{this._sorted=false;this._array.push(t)}},"MappingList_add");kZ.prototype.toArray=a(function e(){if(!this._sorted){this._array.sort(Y3t.compareByGeneratedPositionsInflated);this._sorted=true}return this._array},"MappingList_toArray");X3t.MappingList=kZ});var FIe=y(Q3t=>{var Z7=NIe();var Bo=dN();var DZ=LIe().ArraySet;var nLn=J3t().MappingList;function Vf(e){if(!e){e={}}this._file=Bo.getArg(e,"file",null);this._sourceRoot=Bo.getArg(e,"sourceRoot",null);this._skipValidation=Bo.getArg(e,"skipValidation",false);this._sources=new DZ;this._names=new DZ;this._mappings=new nLn;this._sourcesContents=null}a(Vf,"SourceMapGenerator");Vf.prototype._version=3;Vf.fromSourceMap=a(function e(t){var r=t.sourceRoot;var n=new Vf({file:t.file,sourceRoot:r});t.eachMapping(function(i){var s={generated:{line:i.generatedLine,column:i.generatedColumn}};if(i.source!=null){s.source=i.source;if(r!=null){s.source=Bo.relative(r,s.source)}s.original={line:i.originalLine,column:i.originalColumn};if(i.name!=null){s.name=i.name}}n.addMapping(s)});t.sources.forEach(function(i){var s=i;if(r!==null){s=Bo.relative(r,i)}if(!n._sources.has(s)){n._sources.add(s)}var o=t.sourceContentFor(i);if(o!=null){n.setSourceContent(i,o)}});return n},"SourceMapGenerator_fromSourceMap");Vf.prototype.addMapping=a(function e(t){var r=Bo.getArg(t,"generated");var n=Bo.getArg(t,"original",null);var i=Bo.getArg(t,"source",null);var s=Bo.getArg(t,"name",null);if(!this._skipValidation){this._validateMapping(r,n,i,s)}if(i!=null){i=String(i);if(!this._sources.has(i)){this._sources.add(i)}}if(s!=null){s=String(s);if(!this._names.has(s)){this._names.add(s)}}this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:s})},"SourceMapGenerator_addMapping");Vf.prototype.setSourceContent=a(function e(t,r){var n=t;if(this._sourceRoot!=null){n=Bo.relative(this._sourceRoot,n)}if(r!=null){if(!this._sourcesContents){this._sourcesContents=Object.create(null)}this._sourcesContents[Bo.toSetString(n)]=r}else if(this._sourcesContents){delete this._sourcesContents[Bo.toSetString(n)];if(Object.keys(this._sourcesContents).length===0){this._sourcesContents=null}}},"SourceMapGenerator_setSourceContent");Vf.prototype.applySourceMap=a(function e(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 s=this._sourceRoot;if(s!=null){i=Bo.relative(s,i)}var o=new DZ;var u=new DZ;this._mappings.unsortedForEach(function(l){if(l.source===i&&l.originalLine!=null){var c=t.originalPositionFor({line:l.originalLine,column:l.originalColumn});if(c.source!=null){l.source=c.source;if(n!=null){l.source=Bo.join(n,l.source)}if(s!=null){l.source=Bo.relative(s,l.source)}l.originalLine=c.line;l.originalColumn=c.column;if(c.name!=null){l.name=c.name}}}var d=l.source;if(d!=null&&!o.has(d)){o.add(d)}var p=l.name;if(p!=null&&!u.has(p)){u.add(p)}},this);this._sources=o;this._names=u;t.sources.forEach(function(l){var c=t.sourceContentFor(l);if(c!=null){if(n!=null){l=Bo.join(n,l)}if(s!=null){l=Bo.relative(s,l)}this.setSourceContent(l,c)}},this)},"SourceMapGenerator_applySourceMap");Vf.prototype._validateMapping=a(function e(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){return}else 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}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:i}))}},"SourceMapGenerator_validateMapping");Vf.prototype._serializeMappings=a(function e(){var t=0;var r=1;var n=0;var i=0;var s=0;var o=0;var u="";var l;var c;var d;var p;var f=this._mappings.toArray();for(var m=0,h=f.length;m<h;m++){c=f[m];l="";if(c.generatedLine!==r){t=0;while(c.generatedLine!==r){l+=";";r++}}else{if(m>0){if(!Bo.compareByGeneratedPositionsInflated(c,f[m-1])){continue}l+=","}}l+=Z7.encode(c.generatedColumn-t);t=c.generatedColumn;if(c.source!=null){p=this._sources.indexOf(c.source);l+=Z7.encode(p-o);o=p;l+=Z7.encode(c.originalLine-1-i);i=c.originalLine-1;l+=Z7.encode(c.originalColumn-n);n=c.originalColumn;if(c.name!=null){d=this._names.indexOf(c.name);l+=Z7.encode(d-s);s=d}}u+=l}return u},"SourceMapGenerator_serializeMappings");Vf.prototype._generateSourcesContent=a(function e(t,r){return t.map(function(n){if(!this._sourcesContents){return null}if(r!=null){n=Bo.relative(r,n)}var i=Bo.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)},"SourceMapGenerator_generateSourcesContent");Vf.prototype.toJSON=a(function e(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){t.file=this._file}if(this._sourceRoot!=null){t.sourceRoot=this._sourceRoot}if(this._sourcesContents){t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)}return t},"SourceMapGenerator_toJSON");Vf.prototype.toString=a(function e(){return JSON.stringify(this.toJSON())},"SourceMapGenerator_toString");Q3t.SourceMapGenerator=Vf});var Z3t=y(NC=>{NC.GREATEST_LOWER_BOUND=1;NC.LEAST_UPPER_BOUND=2;function BIe(e,t,r,n,i,s){var o=Math.floor((t-e)/2)+e;var u=i(r,n[o],true);if(u===0){return o}else if(u>0){if(t-o>1){return BIe(o,t,r,n,i,s)}if(s==NC.LEAST_UPPER_BOUND){return t<n.length?t:-1}else{return o}}else{if(o-e>1){return BIe(e,o,r,n,i,s)}if(s==NC.LEAST_UPPER_BOUND){return o}else{return e<0?-1:e}}}a(BIe,"recursiveSearch");NC.search=a(function e(t,r,n,i){if(r.length===0){return-1}var s=BIe(-1,r.length,t,r,n,i||NC.GREATEST_LOWER_BOUND);if(s<0){return-1}while(s-1>=0){if(n(r[s],r[s-1],true)!==0){break}--s}return s},"search")});var tkt=y(ekt=>{function MIe(e,t,r){var n=e[t];e[t]=e[r];e[r]=n}a(MIe,"swap");function iLn(e,t){return Math.round(e+Math.random()*(t-e))}a(iLn,"randomIntInRange");function qIe(e,t,r,n){if(r<n){var i=iLn(r,n);var s=r-1;MIe(e,i,n);var o=e[n];for(var u=r;u<n;u++){if(t(e[u],o)<=0){s+=1;MIe(e,s,u)}}MIe(e,s+1,u);var l=s+1;qIe(e,t,r,l-1);qIe(e,t,l+1,n)}}a(qIe,"doQuickSort");ekt.quickSort=function(e,t){qIe(e,t,0,e.length-1)}});var nkt=y(LZ=>{var dr=dN();var UIe=Z3t();var pN=LIe().ArraySet;var sLn=NIe();var eB=tkt().quickSort;function Aa(e,t){var r=e;if(typeof e==="string"){r=dr.parseSourceMapInput(e)}return r.sections!=null?new Ah(r,t):new dl(r,t)}a(Aa,"SourceMapConsumer");Aa.fromSourceMap=function(e,t){return dl.fromSourceMap(e,t)};Aa.prototype._version=3;Aa.prototype.__generatedMappings=null;Object.defineProperty(Aa.prototype,"_generatedMappings",{configurable:true,enumerable:true,get:function(){if(!this.__generatedMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});Aa.prototype.__originalMappings=null;Object.defineProperty(Aa.prototype,"_originalMappings",{configurable:true,enumerable:true,get:function(){if(!this.__originalMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});Aa.prototype._charIsMappingSeparator=a(function e(t,r){var n=t.charAt(r);return n===";"||n===","},"SourceMapConsumer_charIsMappingSeparator");Aa.prototype._parseMappings=a(function e(t,r){throw new Error("Subclasses must implement _parseMappings")},"SourceMapConsumer_parseMappings");Aa.GENERATED_ORDER=1;Aa.ORIGINAL_ORDER=2;Aa.GREATEST_LOWER_BOUND=1;Aa.LEAST_UPPER_BOUND=2;Aa.prototype.eachMapping=a(function e(t,r,n){var i=r||null;var s=n||Aa.GENERATED_ORDER;var o;switch(s){case Aa.GENERATED_ORDER:o=this._generatedMappings;break;case Aa.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;o.map(function(l){var c=l.source===null?null:this._sources.at(l.source);c=dr.computeSourceURL(u,c,this._sourceMapURL);return{source:c,generatedLine:l.generatedLine,generatedColumn:l.generatedColumn,originalLine:l.originalLine,originalColumn:l.originalColumn,name:l.name===null?null:this._names.at(l.name)}},this).forEach(t,i)},"SourceMapConsumer_eachMapping");Aa.prototype.allGeneratedPositionsFor=a(function e(t){var r=dr.getArg(t,"line");var n={source:dr.getArg(t,"source"),originalLine:r,originalColumn:dr.getArg(t,"column",0)};n.source=this._findSourceIndex(n.source);if(n.source<0){return[]}var i=[];var s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",dr.compareByOriginalPositions,UIe.LEAST_UPPER_BOUND);if(s>=0){var o=this._originalMappings[s];if(t.column===void 0){var u=o.originalLine;while(o&&o.originalLine===u){i.push({line:dr.getArg(o,"generatedLine",null),column:dr.getArg(o,"generatedColumn",null),lastColumn:dr.getArg(o,"lastGeneratedColumn",null)});o=this._originalMappings[++s]}}else{var l=o.originalColumn;while(o&&o.originalLine===r&&o.originalColumn==l){i.push({line:dr.getArg(o,"generatedLine",null),column:dr.getArg(o,"generatedColumn",null),lastColumn:dr.getArg(o,"lastGeneratedColumn",null)});o=this._originalMappings[++s]}}}return i},"SourceMapConsumer_allGeneratedPositionsFor");LZ.SourceMapConsumer=Aa;function dl(e,t){var r=e;if(typeof e==="string"){r=dr.parseSourceMapInput(e)}var n=dr.getArg(r,"version");var i=dr.getArg(r,"sources");var s=dr.getArg(r,"names",[]);var o=dr.getArg(r,"sourceRoot",null);var u=dr.getArg(r,"sourcesContent",null);var l=dr.getArg(r,"mappings");var c=dr.getArg(r,"file",null);if(n!=this._version){throw new Error("Unsupported version: "+n)}if(o){o=dr.normalize(o)}i=i.map(String).map(dr.normalize).map(function(d){return o&&dr.isAbsolute(o)&&dr.isAbsolute(d)?dr.relative(o,d):d});this._names=pN.fromArray(s.map(String),true);this._sources=pN.fromArray(i,true);this._absoluteSources=this._sources.toArray().map(function(d){return dr.computeSourceURL(o,d,t)});this.sourceRoot=o;this.sourcesContent=u;this._mappings=l;this._sourceMapURL=t;this.file=c}a(dl,"BasicSourceMapConsumer");dl.prototype=Object.create(Aa.prototype);dl.prototype.consumer=Aa;dl.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null){t=dr.relative(this.sourceRoot,t)}if(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};dl.fromSourceMap=a(function e(t,r){var n=Object.create(dl.prototype);var i=n._names=pN.fromArray(t._names.toArray(),true);var s=n._sources=pN.fromArray(t._sources.toArray(),true);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 dr.computeSourceURL(n.sourceRoot,m,r)});var o=t._mappings.toArray().slice();var u=n.__generatedMappings=[];var l=n.__originalMappings=[];for(var c=0,d=o.length;c<d;c++){var p=o[c];var f=new rkt;f.generatedLine=p.generatedLine;f.generatedColumn=p.generatedColumn;if(p.source){f.source=s.indexOf(p.source);f.originalLine=p.originalLine;f.originalColumn=p.originalColumn;if(p.name){f.name=i.indexOf(p.name)}l.push(f)}u.push(f)}eB(n.__originalMappings,dr.compareByOriginalPositions);return n},"SourceMapConsumer_fromSourceMap");dl.prototype._version=3;Object.defineProperty(dl.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function rkt(){this.generatedLine=0;this.generatedColumn=0;this.source=null;this.originalLine=null;this.originalColumn=null;this.name=null}a(rkt,"Mapping");dl.prototype._parseMappings=a(function e(t,r){var n=1;var i=0;var s=0;var o=0;var u=0;var l=0;var c=t.length;var d=0;var p={};var f={};var m=[];var h=[];var g,_,v,S,E;while(d<c){if(t.charAt(d)===";"){n++;d++;i=0}else if(t.charAt(d)===","){d++}else{g=new rkt;g.generatedLine=n;for(S=d;S<c;S++){if(this._charIsMappingSeparator(t,S)){break}}_=t.slice(d,S);v=p[_];if(v){d+=_.length}else{v=[];while(d<S){sLn.decode(t,d,f);E=f.value;d=f.rest;v.push(E)}if(v.length===2){throw new Error("Found a source, but no line and column")}if(v.length===3){throw new Error("Found a source and line, but no column")}p[_]=v}g.generatedColumn=i+v[0];i=g.generatedColumn;if(v.length>1){g.source=u+v[1];u+=v[1];g.originalLine=s+v[2];s=g.originalLine;g.originalLine+=1;g.originalColumn=o+v[3];o=g.originalColumn;if(v.length>4){g.name=l+v[4];l+=v[4]}}h.push(g);if(typeof g.originalLine==="number"){m.push(g)}}}eB(h,dr.compareByGeneratedPositionsDeflated);this.__generatedMappings=h;eB(m,dr.compareByOriginalPositions);this.__originalMappings=m},"SourceMapConsumer_parseMappings");dl.prototype._findMapping=a(function e(t,r,n,i,s,o){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 UIe.search(t,r,s,o)},"SourceMapConsumer_findMapping");dl.prototype.computeColumnSpans=a(function e(){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=Infinity}},"SourceMapConsumer_computeColumnSpans");dl.prototype.originalPositionFor=a(function e(t){var r={generatedLine:dr.getArg(t,"line"),generatedColumn:dr.getArg(t,"column")};var n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",dr.compareByGeneratedPositionsDeflated,dr.getArg(t,"bias",Aa.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var s=dr.getArg(i,"source",null);if(s!==null){s=this._sources.at(s);s=dr.computeSourceURL(this.sourceRoot,s,this._sourceMapURL)}var o=dr.getArg(i,"name",null);if(o!==null){o=this._names.at(o)}return{source:s,line:dr.getArg(i,"originalLine",null),column:dr.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}},"SourceMapConsumer_originalPositionFor");dl.prototype.hasContentsOfAllSources=a(function e(){if(!this.sourcesContent){return false}return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null})},"BasicSourceMapConsumer_hasContentsOfAllSources");dl.prototype.sourceContentFor=a(function e(t,r){if(!this.sourcesContent){return null}var n=this._findSourceIndex(t);if(n>=0){return this.sourcesContent[n]}var i=t;if(this.sourceRoot!=null){i=dr.relative(this.sourceRoot,i)}var s;if(this.sourceRoot!=null&&(s=dr.urlParse(this.sourceRoot))){var o=i.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(o)){return this.sourcesContent[this._sources.indexOf(o)]}if((!s.path||s.path=="/")&&this._sources.has("/"+i)){return this.sourcesContent[this._sources.indexOf("/"+i)]}}if(r){return null}else{throw new Error('"'+i+'" is not in the SourceMap.')}},"SourceMapConsumer_sourceContentFor");dl.prototype.generatedPositionFor=a(function e(t){var r=dr.getArg(t,"source");r=this._findSourceIndex(r);if(r<0){return{line:null,column:null,lastColumn:null}}var n={source:r,originalLine:dr.getArg(t,"line"),originalColumn:dr.getArg(t,"column")};var i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",dr.compareByOriginalPositions,dr.getArg(t,"bias",Aa.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source){return{line:dr.getArg(s,"generatedLine",null),column:dr.getArg(s,"generatedColumn",null),lastColumn:dr.getArg(s,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}},"SourceMapConsumer_generatedPositionFor");LZ.BasicSourceMapConsumer=dl;function Ah(e,t){var r=e;if(typeof e==="string"){r=dr.parseSourceMapInput(e)}var n=dr.getArg(r,"version");var i=dr.getArg(r,"sections");if(n!=this._version){throw new Error("Unsupported version: "+n)}this._sources=new pN;this._names=new pN;var s={line:-1,column:0};this._sections=i.map(function(o){if(o.url){throw new Error("Support for url field in sections not implemented.")}var u=dr.getArg(o,"offset");var l=dr.getArg(u,"line");var c=dr.getArg(u,"column");if(l<s.line||l===s.line&&c<s.column){throw new Error("Section offsets must be ordered and non-overlapping.")}s=u;return{generatedOffset:{generatedLine:l+1,generatedColumn:c+1},consumer:new Aa(dr.getArg(o,"map"),t)}})}a(Ah,"IndexedSourceMapConsumer");Ah.prototype=Object.create(Aa.prototype);Ah.prototype.constructor=Aa;Ah.prototype._version=3;Object.defineProperty(Ah.prototype,"sources",{get:function(){var e=[];for(var 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}});Ah.prototype.originalPositionFor=a(function e(t){var r={generatedLine:dr.getArg(t,"line"),generatedColumn:dr.getArg(t,"column")};var n=UIe.search(r,this._sections,function(s,o){var u=s.generatedLine-o.generatedOffset.generatedLine;if(u){return u}return s.generatedColumn-o.generatedOffset.generatedColumn});var i=this._sections[n];if(!i){return{source:null,line:null,column:null,name:null}}return 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})},"IndexedSourceMapConsumer_originalPositionFor");Ah.prototype.hasContentsOfAllSources=a(function e(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})},"IndexedSourceMapConsumer_hasContentsOfAllSources");Ah.prototype.sourceContentFor=a(function e(t,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n];var s=i.consumer.sourceContentFor(t,true);if(s){return s}}if(r){return null}else{throw new Error('"'+t+'" is not in the SourceMap.')}},"IndexedSourceMapConsumer_sourceContentFor");Ah.prototype.generatedPositionFor=a(function e(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(dr.getArg(t,"source"))===-1){continue}var i=n.consumer.generatedPositionFor(t);if(i){var s={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return s}}return{line:null,column:null}},"IndexedSourceMapConsumer_generatedPositionFor");Ah.prototype._parseMappings=a(function e(t,r){this.__generatedMappings=[];this.__originalMappings=[];for(var n=0;n<this._sections.length;n++){var i=this._sections[n];var s=i.consumer._generatedMappings;for(var o=0;o<s.length;o++){var u=s[o];var l=i.consumer._sources.at(u.source);l=dr.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL);this._sources.add(l);l=this._sources.indexOf(l);var c=null;if(u.name){c=i.consumer._names.at(u.name);this._names.add(c);c=this._names.indexOf(c)}var d={source:l,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:c};this.__generatedMappings.push(d);if(typeof d.originalLine==="number"){this.__originalMappings.push(d)}}}eB(this.__generatedMappings,dr.compareByGeneratedPositionsDeflated);eB(this.__originalMappings,dr.compareByOriginalPositions)},"IndexedSourceMapConsumer_parseMappings");LZ.IndexedSourceMapConsumer=Ah});var skt=y(ikt=>{var aLn=FIe().SourceMapGenerator;var FZ=dN();var oLn=/(\r?\n)/;var uLn=10;var fN="$$$isSourceNode$$$";function gp(e,t,r,n,i){this.children=[];this.sourceContents={};this.line=e==null?null:e;this.column=t==null?null:t;this.source=r==null?null:r;this.name=i==null?null:i;this[fN]=true;if(n!=null)this.add(n)}a(gp,"SourceNode");gp.fromStringWithSourceMap=a(function e(t,r,n){var i=new gp;var s=t.split(oLn);var o=0;var u=a(function(){var f=h();var m=h()||"";return f+m;function h(){return o<s.length?s[o++]:void 0}a(h,"getNextLine")},"shiftNextLine");var l=1,c=0;var d=null;r.eachMapping(function(f){if(d!==null){if(l<f.generatedLine){p(d,u());l++;c=0}else{var m=s[o]||"";var h=m.substr(0,f.generatedColumn-c);s[o]=m.substr(f.generatedColumn-c);c=f.generatedColumn;p(d,h);d=f;return}}while(l<f.generatedLine){i.add(u());l++}if(c<f.generatedColumn){var m=s[o]||"";i.add(m.substr(0,f.generatedColumn));s[o]=m.substr(f.generatedColumn);c=f.generatedColumn}d=f},this);if(o<s.length){if(d){p(d,u())}i.add(s.splice(o).join(""))}r.sources.forEach(function(f){var m=r.sourceContentFor(f);if(m!=null){if(n!=null){f=FZ.join(n,f)}i.setSourceContent(f,m)}});return i;function p(f,m){if(f===null||f.source===void 0){i.add(m)}else{var h=n?FZ.join(n,f.source):f.source;i.add(new gp(f.originalLine,f.originalColumn,h,m,f.name))}}a(p,"addMappingWithCode")},"SourceNode_fromStringWithSourceMap");gp.prototype.add=a(function e(t){if(Array.isArray(t)){t.forEach(function(r){this.add(r)},this)}else if(t[fN]||typeof t==="string"){if(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");gp.prototype.prepend=a(function e(t){if(Array.isArray(t)){for(var r=t.length-1;r>=0;r--){this.prepend(t[r])}}else if(t[fN]||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");gp.prototype.walk=a(function e(t){var r;for(var n=0,i=this.children.length;n<i;n++){r=this.children[n];if(r[fN]){r.walk(t)}else{if(r!==""){t(r,{source:this.source,line:this.line,column:this.column,name:this.name})}}}},"SourceNode_walk");gp.prototype.join=a(function e(t){var r;var n;var i=this.children.length;if(i>0){r=[];for(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");gp.prototype.replaceRight=a(function e(t,r){var n=this.children[this.children.length-1];if(n[fN]){n.replaceRight(t,r)}else if(typeof n==="string"){this.children[this.children.length-1]=n.replace(t,r)}else{this.children.push("".replace(t,r))}return this},"SourceNode_replaceRight");gp.prototype.setSourceContent=a(function e(t,r){this.sourceContents[FZ.toSetString(t)]=r},"SourceNode_setSourceContent");gp.prototype.walkSourceContents=a(function e(t){for(var r=0,n=this.children.length;r<n;r++){if(this.children[r][fN]){this.children[r].walkSourceContents(t)}}var i=Object.keys(this.sourceContents);for(var r=0,n=i.length;r<n;r++){t(FZ.fromSetString(i[r]),this.sourceContents[i[r]])}},"SourceNode_walkSourceContents");gp.prototype.toString=a(function e(){var t="";this.walk(function(r){t+=r});return t},"SourceNode_toString");gp.prototype.toStringWithSourceMap=a(function e(t){var r={code:"",line:1,column:0};var n=new aLn(t);var i=false;var s=null;var o=null;var u=null;var l=null;this.walk(function(c,d){r.code+=c;if(d.source!==null&&d.line!==null&&d.column!==null){if(s!==d.source||o!==d.line||u!==d.column||l!==d.name){n.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:r.line,column:r.column},name:d.name})}s=d.source;o=d.line;u=d.column;l=d.name;i=true}else if(i){n.addMapping({generated:{line:r.line,column:r.column}});s=null;i=false}for(var p=0,f=c.length;p<f;p++){if(c.charCodeAt(p)===uLn){r.line++;r.column=0;if(p+1===f){s=null;i=false}else if(i){n.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:r.line,column:r.column},name:d.name})}}else{r.column++}}});this.walkSourceContents(function(c,d){n.setSourceContent(c,d)});return{code:r.code,map:n}},"SourceNode_toStringWithSourceMap");ikt.SourceNode=gp});var MZ=y(BZ=>{BZ.SourceMapGenerator=FIe().SourceMapGenerator;BZ.SourceMapConsumer=nkt().SourceMapConsumer;BZ.SourceNode=skt().SourceNode});var lkt=y((qZ,ukt)=>{"use strict";qZ.__esModule=true;var jIe=Nc();var IC=void 0;try{if(typeof define!=="function"||!define.amd){akt=MZ();IC=akt.SourceNode}}catch(e){}var akt;if(!IC){IC=a(function(e,t,r,n){this.src="";if(n){this.add(n)}},"SourceNode");IC.prototype={add:a(function e(t){if(jIe.isArray(t)){t=t.join("")}this.src+=t},"add"),prepend:a(function e(t){if(jIe.isArray(t)){t=t.join("")}this.src=t+this.src},"prepend"),toStringWithSourceMap:a(function e(){return{code:this.toString()}},"toStringWithSourceMap"),toString:a(function e(){return this.src},"toString")}}function $Ie(e,t,r){if(jIe.isArray(e)){var n=[];for(var i=0,s=e.length;i<s;i++){n.push(t.wrap(e[i],r))}return n}else if(typeof e==="boolean"||typeof e==="number"){return e+""}return e}a($Ie,"castChunk");function okt(e){this.srcFile=e;this.source=[]}a(okt,"CodeGen");okt.prototype={isEmpty:a(function e(){return!this.source.length},"isEmpty"),prepend:a(function e(t,r){this.source.unshift(this.wrap(t,r))},"prepend"),push:a(function e(t,r){this.source.push(this.wrap(t,r))},"push"),merge:a(function e(){var t=this.empty();this.each(function(r){t.add([" ",r,"\n"])});return t},"merge"),each:a(function e(t){for(var r=0,n=this.source.length;r<n;r++){t(this.source[r])}},"each"),empty:a(function e(){var t=this.currentLocation||{start:{}};return new IC(t.start.line,t.start.column,this.srcFile)},"empty"),wrap:a(function e(t){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];if(t instanceof IC){return t}t=$Ie(t,this,r);return new IC(r.start.line,r.start.column,this.srcFile,t)},"wrap"),functionCall:a(function e(t,r,n){n=this.generateList(n);return this.wrap([t,r?"."+r+"(":"(",n,")"])},"functionCall"),quotedString:a(function e(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:a(function e(t){var r=this;var n=[];Object.keys(t).forEach(function(s){var o=$Ie(t[s],r);if(o!=="undefined"){n.push([r.quotedString(s),":",o])}});var i=this.generateList(n);i.prepend("{");i.add("}");return i},"objectLiteral"),generateList:a(function e(t){var r=this.empty();for(var n=0,i=t.length;n<i;n++){if(n){r.add(",")}r.add($Ie(t[n],this))}return r},"generateList"),generateArray:a(function e(t){var r=this.generateList(t);r.prepend("[");r.add("]");return r},"generateArray")};qZ["default"]=okt;ukt.exports=qZ["default"]});var mkt=y((UZ,fkt)=>{"use strict";UZ.__esModule=true;function pkt(e){return e&&e.__esModule?e:{"default":e}}a(pkt,"_interopRequireDefault");var ckt=EZ();var lLn=Gf();var GIe=pkt(lLn);var cLn=Nc();var dLn=lkt();var dkt=pkt(dLn);function mN(e){this.value=e}a(mN,"Literal");function hN(){}a(hN,"JavaScriptCompiler");hN.prototype={nameLookup:a(function e(t,r){return this.internalNameLookup(t,r)},"nameLookup"),depthedLookup:a(function e(t){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(t),")"]},"depthedLookup"),compilerInfo:a(function e(){var t=ckt.COMPILER_REVISION,r=ckt.REVISION_CHANGES[t];return[t,r]},"compilerInfo"),appendToBuffer:a(function e(t,r,n){if(!cLn.isArray(t)){t=[t]}t=this.source.wrap(t,r);if(this.environment.isSimple){return["return ",t,";"]}else if(n){return["buffer += ",t,";"]}else{t.appendToBuffer=true;return t}},"appendToBuffer"),initializeBuffer:a(function e(){return this.quotedString("")},"initializeBuffer"),internalNameLookup:a(function e(t,r){this.lookupPropertyFunctionIsUsed=true;return["lookupProperty(",t,",",JSON.stringify(r),")"]},"internalNameLookup"),lookupPropertyFunctionIsUsed:false,compile:a(function e(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 s=t.opcodes,o=void 0,u=void 0,l=void 0,c=void 0;for(l=0,c=s.length;l<c;l++){o=s[l];this.source.currentLocation=o.loc;u=u||o.loc;this[o.opcode].apply(this,o.args)}this.source.currentLocation=u;this.pushSource("");if(this.stackSlot||this.inlineStack.length||this.compileStack.length){throw new GIe["default"]("Compile completed with content left on stack")}if(!this.decorators.isEmpty()){this.useDecorators=true;this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),";\n"]);this.decorators.push("return fn;");if(i){this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()])}else{this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n");this.decorators.push("}\n");this.decorators=this.decorators.merge()}}else{this.decorators=void 0}var d=this.createFunctionContext(i);if(!this.isChild){var p={compiler:this.compilerInfo(),main:d};if(this.decorators){p.main_d=this.decorators;p.useDecorators=true}var f=this.context;var m=f.programs;var h=f.decorators;for(l=0,c=m.length;l<c;l++){if(m[l]){p[l]=m[l];if(h[l]){p[l+"_d"]=h[l];p.useDecorators=true}}}if(this.environment.usePartial){p.usePartial=true}if(this.options.data){p.useData=true}if(this.useDepths){p.useDepths=true}if(this.useBlockParams){p.useBlockParams=true}if(this.options.compat){p.compat=true}if(!i){p.compiler=JSON.stringify(p.compiler);this.source.currentLocation={start:{line:1,column:0}};p=this.objectLiteral(p);if(r.srcName){p=p.toStringWithSourceMap({file:r.destName});p.map=p.map&&p.map.toString()}else{p=p.toString()}}else{p.compilerOptions=this.options}return p}else{return d}},"compile"),preamble:a(function e(){this.lastContext=0;this.source=new dkt["default"](this.options.srcName);this.decorators=new dkt["default"](this.options.srcName)},"preamble"),createFunctionContext:a(function e(t){var r=this;var n="";var i=this.stackVars.concat(this.registers.list);if(i.length>0){n+=", "+i.join(", ")}var s=0;Object.keys(this.aliases).forEach(function(l){var c=r.aliases[l];if(c.children&&c.referenceCount>1){n+=", alias"+ ++s+"="+l;c.children[0]="alias"+s}});if(this.lookupPropertyFunctionIsUsed){n+=", "+this.lookupPropertyFunctionVarDeclaration()}var o=["container","depth0","helpers","partials","data"];if(this.useBlockParams||this.useDepths){o.push("blockParams")}if(this.useDepths){o.push("depths")}var u=this.mergeSource(n);if(t){o.push(u);return Function.apply(this,o)}else{return this.source.wrap(["function(",o.join(","),") {\n ",u,"}"])}},"createFunctionContext"),mergeSource:a(function e(t){var r=this.environment.isSimple,n=!this.forceBuffer,i=void 0,s=void 0,o=void 0,u=void 0;this.source.each(function(l){if(l.appendToBuffer){if(o){l.prepend(" + ")}else{o=l}u=l}else{if(o){if(!s){i=true}else{o.prepend("buffer += ")}u.add(";");o=u=void 0}s=true;if(!r){n=false}}});if(n){if(o){o.prepend("return ");u.add(";")}else if(!s){this.source.push('return "";')}}else{t+=", buffer = "+(i?"":this.initializeBuffer());if(o){o.prepend("return buffer + ");u.add(";")}else{this.source.push("return buffer;")}}if(t){this.source.prepend("var "+t.substring(2)+(i?"":";\n"))}return this.source.merge()},"mergeSource"),lookupPropertyFunctionVarDeclaration:a(function e(){return"\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim()},"lookupPropertyFunctionVarDeclaration"),blockValue:a(function e(t){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(t,0,n);var i=this.popStack();n.splice(1,0,i);this.push(this.source.functionCall(r,"call",n))},"blockValue"),ambiguousBlockValue:a(function e(){var t=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,true);this.flushInline();var n=this.topStack();r.splice(1,0,n);this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(t,"call",r),"}"])},"ambiguousBlockValue"),appendContent:a(function e(t){if(this.pendingContent){t=this.pendingContent+t}else{this.pendingLocation=this.source.currentLocation}this.pendingContent=t},"appendContent"),append:a(function e(){if(this.isInline()){this.replaceStack(function(r){return[" != null ? ",r,' : ""']});this.pushSource(this.appendToBuffer(this.popStack()))}else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,true)," }"]);if(this.environment.isSimple){this.pushSource(["else { ",this.appendToBuffer("''",void 0,true)," }"])}}},"append"),appendEscaped:a(function e(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},"appendEscaped"),getContext:a(function e(t){this.lastContext=t},"getContext"),pushContext:a(function e(){this.pushStackLiteral(this.contextName(this.lastContext))},"pushContext"),lookupOnContext:a(function e(t,r,n,i){var s=0;if(!i&&this.options.compat&&!this.lastContext){this.push(this.depthedLookup(t[s++]))}else{this.pushContext()}this.resolvePath("context",t,s,r,n)},"lookupOnContext"),lookupBlockParam:a(function e(t,r){this.useBlockParams=true;this.push(["blockParams[",t[0],"][",t[1],"]"]);this.resolvePath("context",r,1)},"lookupBlockParam"),lookupData:a(function e(t,r,n){if(!t){this.pushStackLiteral("data")}else{this.pushStackLiteral("container.data(data, "+t+")")}this.resolvePath("data",r,0,true,n)},"lookupData"),resolvePath:a(function e(t,r,n,i,s){var o=this;if(this.options.strict||this.options.assumeObjects){this.push(pLn(this.options.strict&&s,this,r,t));return}var u=r.length;for(;n<u;n++){this.replaceStack(function(l){var c=o.nameLookup(l,r[n],t);if(!i){return[" != null ? ",c," : ",l]}else{return[" && ",c]}})}},"resolvePath"),resolvePossibleLambda:a(function e(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},"resolvePossibleLambda"),pushStringParam:a(function e(t,r){this.pushContext();this.pushString(r);if(r!=="SubExpression"){if(typeof t==="string"){this.pushString(t)}else{this.pushStackLiteral(t)}}},"pushStringParam"),emptyHash:a(function e(t){if(this.trackIds){this.push("{}")}if(this.stringParams){this.push("{}");this.push("{}")}this.pushStackLiteral(t?"undefined":"{}")},"emptyHash"),pushHash:a(function e(){if(this.hash){this.hashes.push(this.hash)}this.hash={values:{},types:[],contexts:[],ids:[]}},"pushHash"),popHash:a(function e(){var t=this.hash;this.hash=this.hashes.pop();if(this.trackIds){this.push(this.objectLiteral(t.ids))}if(this.stringParams){this.push(this.objectLiteral(t.contexts));this.push(this.objectLiteral(t.types))}this.push(this.objectLiteral(t.values))},"popHash"),pushString:a(function e(t){this.pushStackLiteral(this.quotedString(t))},"pushString"),pushLiteral:a(function e(t){this.pushStackLiteral(t)},"pushLiteral"),pushProgram:a(function e(t){if(t!=null){this.pushStackLiteral(this.programExpression(t))}else{this.pushStackLiteral(null)}},"pushProgram"),registerDecorator:a(function e(t,r){var n=this.nameLookup("decorators",r,"decorator"),i=this.setupHelperArgs(r,t);this.decorators.push(["fn = ",this.decorators.functionCall(n,"",["fn","props","container",i])," || fn;"])},"registerDecorator"),invokeHelper:a(function e(t,r,n){var i=this.popStack(),s=this.setupHelper(t,r);var o=[];if(n){o.push(s.name)}o.push(i);if(!this.options.strict){o.push(this.aliasable("container.hooks.helperMissing"))}var u=["(",this.itemsSeparatedBy(o,"||"),")"];var l=this.source.functionCall(u,"call",s.callParams);this.push(l)},"invokeHelper"),itemsSeparatedBy:a(function e(t,r){var n=[];n.push(t[0]);for(var i=1;i<t.length;i++){n.push(r,t[i])}return n},"itemsSeparatedBy"),invokeKnownHelper:a(function e(t,r){var n=this.setupHelper(t,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},"invokeKnownHelper"),invokeAmbiguous:a(function e(t,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,t,r);var s=this.lastHelper=this.nameLookup("helpers",t,"helper");var o=["(","(helper = ",s," || ",n,")"];if(!this.options.strict){o[0]="(helper = ";o.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))}this.push(["(",o,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},"invokeAmbiguous"),invokePartial:a(function e(t,r,n){var i=[],s=this.setupParams(r,1,i);if(t){r=this.popStack();delete s.name}if(n){s.indent=JSON.stringify(n)}s.helpers="helpers";s.partials="partials";s.decorators="container.decorators";if(!t){i.unshift(this.nameLookup("partials",r,"partial"))}else{i.unshift(r)}if(this.options.compat){s.depths="depths"}s=this.objectLiteral(s);i.push(s);this.push(this.source.functionCall("container.invokePartial","",i))},"invokePartial"),assignToHash:a(function e(t){var r=this.popStack(),n=void 0,i=void 0,s=void 0;if(this.trackIds){s=this.popStack()}if(this.stringParams){i=this.popStack();n=this.popStack()}var o=this.hash;if(n){o.contexts[t]=n}if(i){o.types[t]=i}if(s){o.ids[t]=s}o.values[t]=r},"assignToHash"),pushId:a(function e(t,r,n){if(t==="BlockParam"){this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+JSON.stringify("."+n):""))}else if(t==="PathExpression"){this.pushString(r)}else if(t==="SubExpression"){this.pushStackLiteral("true")}else{this.pushStackLiteral("null")}},"pushId"),compiler:hN,compileChildren:a(function e(t,r){var n=t.children,i=void 0,s=void 0;for(var o=0,u=n.length;o<u;o++){i=n[o];s=new this.compiler;var l=this.matchExistingProgram(i);if(l==null){this.context.programs.push("");var c=this.context.programs.length;i.index=c;i.name="program"+c;this.context.programs[c]=s.compile(i,r,this.context,!this.precompile);this.context.decorators[c]=s.decorators;this.context.environments[c]=i;this.useDepths=this.useDepths||s.useDepths;this.useBlockParams=this.useBlockParams||s.useBlockParams;i.useDepths=this.useDepths;i.useBlockParams=this.useBlockParams}else{i.index=l.index;i.name="program"+l.index;this.useDepths=this.useDepths||l.useDepths;this.useBlockParams=this.useBlockParams||l.useBlockParams}}},"compileChildren"),matchExistingProgram:a(function e(t){for(var r=0,n=this.context.environments.length;r<n;r++){var i=this.context.environments[r];if(i&&i.equals(t)){return i}}},"matchExistingProgram"),programExpression:a(function e(t){var r=this.environment.children[t],n=[r.index,"data",r.blockParams];if(this.useBlockParams||this.useDepths){n.push("blockParams")}if(this.useDepths){n.push("depths")}return"container.program("+n.join(", ")+")"},"programExpression"),useRegister:a(function e(t){if(!this.registers[t]){this.registers[t]=true;this.registers.list.push(t)}},"useRegister"),push:a(function e(t){if(!(t instanceof mN)){t=this.source.wrap(t)}this.inlineStack.push(t);return t},"push"),pushStackLiteral:a(function e(t){this.push(new mN(t))},"pushStackLiteral"),pushSource:a(function e(t){if(this.pendingContent){this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation));this.pendingContent=void 0}if(t){this.source.push(t)}},"pushSource"),replaceStack:a(function e(t){var r=["("],n=void 0,i=void 0,s=void 0;if(!this.isInline()){throw new GIe["default"]("replaceStack on non-inline")}var o=this.popStack(true);if(o instanceof mN){n=[o.value];r=["(",n];s=true}else{i=true;var u=this.incrStack();r=["((",this.push(u)," = ",o,")"];n=this.topStack()}var l=t.call(this,n);if(!s){this.popStack()}if(i){this.stackSlot--}this.push(r.concat(l,")"))},"replaceStack"),incrStack:a(function e(){this.stackSlot++;if(this.stackSlot>this.stackVars.length){this.stackVars.push("stack"+this.stackSlot)}return this.topStackName()},"incrStack"),topStackName:a(function e(){return"stack"+this.stackSlot},"topStackName"),flushInline:a(function e(){var t=this.inlineStack;this.inlineStack=[];for(var r=0,n=t.length;r<n;r++){var i=t[r];if(i instanceof mN){this.compileStack.push(i)}else{var s=this.incrStack();this.pushSource([s," = ",i,";"]);this.compileStack.push(s)}}},"flushInline"),isInline:a(function e(){return this.inlineStack.length},"isInline"),popStack:a(function e(t){var r=this.isInline(),n=(r?this.inlineStack:this.compileStack).pop();if(!t&&n instanceof mN){return n.value}else{if(!r){if(!this.stackSlot){throw new GIe["default"]("Invalid stack pop")}this.stackSlot--}return n}},"popStack"),topStack:a(function e(){var t=this.isInline()?this.inlineStack:this.compileStack,r=t[t.length-1];if(r instanceof mN){return r.value}else{return r}},"topStack"),contextName:a(function e(t){if(this.useDepths&&t){return"depths["+t+"]"}else{return"depth"+t}},"contextName"),quotedString:a(function e(t){return this.source.quotedString(t)},"quotedString"),objectLiteral:a(function e(t){return this.source.objectLiteral(t)},"objectLiteral"),aliasable:a(function e(t){var r=this.aliases[t];if(r){r.referenceCount++;return r}r=this.aliases[t]=this.source.wrap(t);r.aliasable=true;r.referenceCount=1;return r},"aliasable"),setupHelper:a(function e(t,r,n){var i=[],s=this.setupHelperArgs(r,t,i,n);var o=this.nameLookup("helpers",r,"helper"),u=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:i,paramsInit:s,name:o,callParams:[u].concat(i)}},"setupHelper"),setupParams:a(function e(t,r,n){var i={},s=[],o=[],u=[],l=!n,c=void 0;if(l){n=[]}i.name=this.quotedString(t);i.hash=this.popStack();if(this.trackIds){i.hashIds=this.popStack()}if(this.stringParams){i.hashTypes=this.popStack();i.hashContexts=this.popStack()}var d=this.popStack(),p=this.popStack();if(p||d){i.fn=p||"container.noop";i.inverse=d||"container.noop"}var f=r;while(f--){c=this.popStack();n[f]=c;if(this.trackIds){u[f]=this.popStack()}if(this.stringParams){o[f]=this.popStack();s[f]=this.popStack()}}if(l){i.args=this.source.generateArray(n)}if(this.trackIds){i.ids=this.source.generateArray(u)}if(this.stringParams){i.types=this.source.generateArray(o);i.contexts=this.source.generateArray(s)}if(this.options.data){i.data="data"}if(this.useBlockParams){i.blockParams="blockParams"}return i},"setupParams"),setupHelperArgs:a(function e(t,r,n,i){var s=this.setupParams(t,r,n);s.loc=JSON.stringify(this.source.currentLocation);s=this.objectLiteral(s);if(i){this.useRegister("options");n.push("options");return["options=",s]}else if(n){n.push(s);return""}else{return s}},"setupHelperArgs")};(function(){var e="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" ");var t=hN.RESERVED_WORDS={};for(var r=0,n=e.length;r<n;r++){t[e[r]]=true}})();hN.isValidJavaScriptVariableName=function(e){return!hN.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)};function pLn(e,t,r,n){var i=t.popStack(),s=0,o=r.length;if(e){o--}for(;s<o;s++){i=t.nameLookup(i,r[s],n)}if(e){return[t.aliasable("container.strict"),"(",i,", ",t.quotedString(r[s]),", ",JSON.stringify(t.source.currentLocation)," )"]}else{return i}}a(pLn,"strictLookup");UZ["default"]=hN;fkt.exports=UZ["default"]});var ykt=y(($Z,gkt)=>{"use strict";$Z.__esModule=true;function tB(e){return e&&e.__esModule?e:{"default":e}}a(tB,"_interopRequireDefault");var fLn=v3t();var mLn=tB(fLn);var hLn=EIe();var gLn=tB(hLn);var HIe=I3t();var VIe=F3t();var yLn=mkt();var _Ln=tB(yLn);var vLn=PZ();var ELn=tB(vLn);var bLn=gIe();var SLn=tB(bLn);var ALn=mLn["default"].create;function hkt(){var e=ALn();e.compile=function(t,r){return VIe.compile(t,r,e)};e.precompile=function(t,r){return VIe.precompile(t,r,e)};e.AST=gLn["default"];e.Compiler=VIe.Compiler;e.JavaScriptCompiler=_Ln["default"];e.Parser=HIe.parser;e.parse=HIe.parse;e.parseWithoutProcessing=HIe.parseWithoutProcessing;return e}a(hkt,"create");var gN=hkt();gN.create=hkt;SLn["default"](gN);gN.Visitor=ELn["default"];gN["default"]=gN;$Z["default"]=gN;gkt.exports=$Z["default"]});var _kt=y(jZ=>{"use strict";jZ.__esModule=true;jZ.print=xLn;jZ.PrintVisitor=oo;function CLn(e){return e&&e.__esModule?e:{"default":e}}a(CLn,"_interopRequireDefault");var wLn=PZ();var TLn=CLn(wLn);function xLn(e){return new oo().accept(e)}a(xLn,"print");function oo(){this.padding=0}a(oo,"PrintVisitor");oo.prototype=new TLn["default"];oo.prototype.pad=function(e){var t="";for(var r=0,n=this.padding;r<n;r++){t+=" "}t+=e+"\n";return t};oo.prototype.Program=function(e){var t="",r=e.body,n=void 0,i=void 0;if(e.blockParams){var s="BLOCK PARAMS: [";for(n=0,i=e.blockParams.length;n<i;n++){s+=" "+e.blockParams[n]}s+=" ]";t+=this.pad(s)}for(n=0,i=r.length;n<i;n++){t+=this.accept(r[n])}this.padding--;return t};oo.prototype.MustacheStatement=function(e){return this.pad("{{ "+this.SubExpression(e)+" }}")};oo.prototype.Decorator=function(e){return this.pad("{{ DIRECTIVE "+this.SubExpression(e)+" }}")};oo.prototype.BlockStatement=oo.prototype.DecoratorBlock=function(e){var t="";t+=this.pad((e.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:");this.padding++;t+=this.pad(this.SubExpression(e));if(e.program){t+=this.pad("PROGRAM:");this.padding++;t+=this.accept(e.program);this.padding--}if(e.inverse){if(e.program){this.padding++}t+=this.pad("{{^}}");this.padding++;t+=this.accept(e.inverse);this.padding--;if(e.program){this.padding--}}this.padding--;return t};oo.prototype.PartialStatement=function(e){var t="PARTIAL:"+e.name.original;if(e.params[0]){t+=" "+this.accept(e.params[0])}if(e.hash){t+=" "+this.accept(e.hash)}return this.pad("{{> "+t+" }}")};oo.prototype.PartialBlockStatement=function(e){var t="PARTIAL BLOCK:"+e.name.original;if(e.params[0]){t+=" "+this.accept(e.params[0])}if(e.hash){t+=" "+this.accept(e.hash)}t+=" "+this.pad("PROGRAM:");this.padding++;t+=this.accept(e.program);this.padding--;return this.pad("{{> "+t+" }}")};oo.prototype.ContentStatement=function(e){return this.pad("CONTENT[ '"+e.value+"' ]")};oo.prototype.CommentStatement=function(e){return this.pad("{{! '"+e.value+"' }}")};oo.prototype.SubExpression=function(e){var t=e.params,r=[],n=void 0;for(var i=0,s=t.length;i<s;i++){r.push(this.accept(t[i]))}t="["+r.join(", ")+"]";n=e.hash?" "+this.accept(e.hash):"";return this.accept(e.path)+" "+t+n};oo.prototype.PathExpression=function(e){var t=e.parts.join("/");return(e.data?"@":"")+"PATH:"+t};oo.prototype.StringLiteral=function(e){return'"'+e.value+'"'};oo.prototype.NumberLiteral=function(e){return"NUMBER{"+e.value+"}"};oo.prototype.BooleanLiteral=function(e){return"BOOLEAN{"+e.value+"}"};oo.prototype.UndefinedLiteral=function(){return"UNDEFINED"};oo.prototype.NullLiteral=function(){return"NULL"};oo.prototype.Hash=function(e){var t=e.pairs,r=[];for(var n=0,i=t.length;n<i;n++){r.push(this.accept(t[n]))}return"HASH{"+r.join(", ")+"}"};oo.prototype.HashPair=function(e){return e.key+"="+this.accept(e.value)}});var Skt=y((tBs,bkt)=>{var GZ=ykt()["default"];var Ekt=_kt();GZ.PrintVisitor=Ekt.PrintVisitor;GZ.print=Ekt.print;bkt.exports=GZ;function vkt(e,t){var r=require("fs");var n=r.readFileSync(t,"utf8");e.exports=GZ.compile(n)}a(vkt,"extension");if(typeof require!=="undefined"&&require.extensions){require.extensions[".handlebars"]=vkt;require.extensions[".hbs"]=vkt}});var zIe=y(HZ=>{"use strict";Object.defineProperty(HZ,"__esModule",{value:true});HZ.assert=void 0;var RLn=require("assert");function OLn(e,t){if(e===false)throw new RLn.AssertionError({message:t})}a(OLn,"assert");HZ.assert=OLn});var mb=y(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:true});Ui.assertAstFunctionBody=Ui.assertAstFunctionCall=Ui.assertAstTemplateString=Ui.assertAstLiteral=Ui.assertAstArray=Ui.assertAstProperty=Ui.assertAstObject=Ui.isAstIdentifier=Ui.isAstFunctionBody=Ui.isAstFunctionCall=Ui.isAstTemplateString=Ui.isAstLiteral=Ui.isAstArray=Ui.isAstProperty=Ui.isAstObject=Ui.SyntaxType=void 0;var fg;(function(e){e["Object"]="Object";e["Property"]="Property";e["Array"]="Array";e["Literal"]="Literal";e["TemplateString"]="TemplateString";e["Identifier"]="Identifier";e["FunctionCall"]="FunctionCall";e["FunctionBody"]="FunctionBody"})(fg||(Ui.SyntaxType=fg={}));function Akt(e){return e.type===fg.Object}a(Akt,"isAstObject");Ui.isAstObject=Akt;function Ckt(e){return e.type===fg.Property}a(Ckt,"isAstProperty");Ui.isAstProperty=Ckt;function wkt(e){return e.type===fg.Array}a(wkt,"isAstArray");Ui.isAstArray=wkt;function Tkt(e){return e.type===fg.Literal}a(Tkt,"isAstLiteral");Ui.isAstLiteral=Tkt;function xkt(e){return e.type===fg.TemplateString}a(xkt,"isAstTemplateString");Ui.isAstTemplateString=xkt;function Rkt(e){return e.type===fg.FunctionCall}a(Rkt,"isAstFunctionCall");Ui.isAstFunctionCall=Rkt;function Okt(e){return e.type===fg.FunctionBody}a(Okt,"isAstFunctionBody");Ui.isAstFunctionBody=Okt;function PLn(e){return e.type===fg.Identifier}a(PLn,"isAstIdentifier");Ui.isAstIdentifier=PLn;function NLn(e){if(e===void 0){throw new Error("Node is undefined")}if(!Akt(e)){throw new Error("Node is not object")}}a(NLn,"assertAstObject");Ui.assertAstObject=NLn;function ILn(e){if(e===void 0){throw new Error("Node is undefined")}if(!Ckt(e)){throw new Error("Node is not property")}}a(ILn,"assertAstProperty");Ui.assertAstProperty=ILn;function kLn(e){if(e===void 0){throw new Error("Node is undefined")}if(!wkt(e)){throw new Error("Node is not array")}}a(kLn,"assertAstArray");Ui.assertAstArray=kLn;function DLn(e){if(e===void 0){throw new Error("Node is undefined")}if(!Tkt(e)){throw new Error("Node is not literal")}}a(DLn,"assertAstLiteral");Ui.assertAstLiteral=DLn;function LLn(e){if(e===void 0){throw new Error("Node is undefined")}if(!xkt(e)){throw new Error("Node is not literal")}}a(LLn,"assertAstTemplateString");Ui.assertAstTemplateString=LLn;function FLn(e){if(e===void 0){throw new Error("Node is undefined")}if(!Rkt(e)){throw new Error("Node is not function")}}a(FLn,"assertAstFunctionCall");Ui.assertAstFunctionCall=FLn;function BLn(e){if(e===void 0){throw new Error("Node is undefined")}if(!Okt(e)){throw new Error("Node is not function")}}a(BLn,"assertAstFunctionBody");Ui.assertAstFunctionBody=BLn});var KIe=y(VZ=>{"use strict";Object.defineProperty(VZ,"__esModule",{value:true});VZ.parse=void 0;var MLn=require("jsonc-parser");var qLn={DEFAULT:{allowTrailingComma:false}};function ULn(e,t=[],r=qLn.DEFAULT){let n={type:"array",offset:-1,length:-1,line:-1,column:-1,children:[],parent:void 0};function i(l){if(n.type==="property"){n.length=l-n.offset;n=n.parent}}a(i,"ensurePropertyComplete");function s(l){n.children?.push(l);return l}a(s,"onValue");const o={onObjectBegin:(l,c,d)=>{n=s({type:"object",offset:l,length:-1,line:c+1,column:d+1,parent:n,children:[]})},onObjectProperty:(l,c,d,p,f)=>{n=s({type:"property",offset:c,length:-1,line:p+1,column:f+1,parent:n,children:[]});n.children?.push({type:"string",value:l,offset:c,length:d,line:p,column:f,parent:n})},onObjectEnd:(l,c)=>{i(l+c);n.length=l+c-n.offset;n=n.parent;i(l+c)},onArrayBegin:(l,c,d,p)=>{n=s({type:"array",offset:l,length:-1,line:d+1,column:p+1,parent:n,children:[]})},onArrayEnd:(l,c)=>{n.length=l+c-n.offset;n=n.parent;i(l+c)},onLiteralValue:(l,c,d,p,f)=>{s({type:$Ln(l),offset:c,length:d,line:p+1,column:f+1,parent:n,value:l});i(c+d)},onSeparator:(l,c)=>{if(n.type==="property"){if(l===":"){n.colonOffset=c}else if(l===","){i(c)}}},onError:(l,c,d,p,f)=>{t.push({error:l,offset:c,length:d,line:p+1,column:f+1})}};(0,MLn.visit)(e,o,r);const u=n.children[0];if(u){delete u.parent}return u}a(ULn,"parse");VZ.parse=ULn;function $Ln(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(!e){return"null"}else if(Array.isArray(e)){return"array"}return"object"}default:return"null"}}a($Ln,"getNodeType")});var Pkt=y(zZ=>{"use strict";Object.defineProperty(zZ,"__esModule",{value:true});zZ.AstAdapter=void 0;var jLn=zIe();var rB=mb();var GLn=KIe();var WIe=class{static{a(this,"AstAdapter")}parse(t){const r=[];const n=(0,GLn.parse)(t,r);if(n){return this.parseNode(n,void 0)}else{throw new Error("Failed to parse JSON")}}convert(t){return this.parseNode(t,void 0)}parseNode(t,r){switch(t.type){case"object":return this.createObject(t,r);case"array":return this.createArray(t,r);case"property":return this.createProperty(t,r);case"string":return this.createLiteral(t,r);case"number":return this.createLiteral(t,r);case"boolean":return this.createLiteral(t,r);case"null":return this.createLiteral(t,r)}}createLiteral(t,r){return{type:rB.SyntaxType.Literal,location:{line:t.line,column:t.column},parent:r,value:t.type==="null"?null:t.value}}createObject(t,r){const n={type:rB.SyntaxType.Object,children:[],parent:r,location:{line:t.line,column:t.column}};t.children?.forEach(i=>{n.children.push(this.parseNode(i,n))});return n}createProperty(t,r){(0,jLn.assert)(t.children?.length===2,"Invalid property node");const n={type:rB.SyntaxType.Property,location:{line:t.line,column:t.column},parent:r,name:null,value:null};n.name={value:t.children[0].value,location:{line:t.line,column:t.column},type:rB.SyntaxType.Identifier,parent:n};n.value=this.parseNode(t.children[1],n);return n}createArray(t,r){const n={type:rB.SyntaxType.Array,location:{line:t.line,column:t.column},parent:r,children:[]};t.children?.forEach(i=>n.children.push(this.parseNode(i,n)));return n}};zZ.AstAdapter=WIe});var KZ=y(nB=>{"use strict";Object.defineProperty(nB,"__esModule",{value:true});nB.factory=void 0;var yN=mb();nB.factory={createLiteral:(e,t)=>({type:yN.SyntaxType.Literal,parent:t,value:e}),createTemplateString:(e,t)=>({type:yN.SyntaxType.TemplateString,parent:t,value:e}),createIdentifier:(e,t)=>({type:yN.SyntaxType.Identifier,value:e,parent:t}),createProperty:(e,t,r)=>{const n={type:yN.SyntaxType.Property,parent:r,name:null,value:t};n.name={value:e,type:yN.SyntaxType.Identifier,parent:n};n.value.parent=n;return n},createArrayOfLiterals:(e,t)=>{const r={type:yN.SyntaxType.Array,parent:t,children:[]};for(const n of e){r.children.push(nB.factory.createLiteral(n,r))}return r}}});var Nkt=y(WZ=>{"use strict";Object.defineProperty(WZ,"__esModule",{value:true});WZ.SourceGenerator=void 0;var kC=mb();var YIe=class{static{a(this,"SourceGenerator")}generate(t){const r=[];this.generateSource(r,t);return r.join("")}generateSource(t,r){switch(r.type){case kC.SyntaxType.Array:return this.generateArray(t,r);case kC.SyntaxType.Object:return this.generateObject(t,r);case kC.SyntaxType.Property:return this.generateProperty(t,r);case kC.SyntaxType.Literal:return this.generateLiteral(t,r);case kC.SyntaxType.FunctionCall:return this.generateFunctionCall(t,r);case kC.SyntaxType.FunctionBody:return this.generateFunctionBody(t,r);case kC.SyntaxType.TemplateString:return this.generateTemplateString(t,r)}}generateArray(t,r){t.push("[");r.children.map(n=>{this.generateSource(t,n);t.push(",")});t.push("]")}generateObject(t,r){t.push("{");r.children.forEach(n=>{this.generateSource(t,n);t.push(",")});t.push("}")}generateProperty(t,r){const n=r.name.value;const i=n.search(/(\/|\\|-|\+|@|#|%|\^|&|\*|:|\.)/g)<0?n:`'${n}'`;t.push(i);t.push(":");this.generateSource(t,r.value)}generateFunctionCall(t,r){t.push(r.name.value);t.push("(");r.children.forEach((n,i,s)=>{this.generateSource(t,n);if(i<s.length){t.push(",")}});t.push(")")}generateFunctionBody(t,r){t.push(r.value)}generateTemplateString(t,r){t.push("`");t.push(r.value.replaceAll("`","\\`"));t.push("`")}generateLiteral(t,r){if(r.value===null){return t.push(`null`)}switch(typeof r.value){case"number":case"boolean":return t.push(`${r.value}`);case"string":{const n=r.value;const i=JSON.stringify(n);return t.push(`${i}`)}}}};WZ.SourceGenerator=YIe});var Ikt=y(_N=>{"use strict";var HLn=_N&&_N.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(_N,"__esModule",{value:true});_N.getJSFileExports=void 0;var VLn=require("@swc/core");var zLn=HLn(require("fs/promises"));var KLn=a(async e=>{const t=new Set;try{const r=await zLn.default.readFile(e,"utf-8");const n=await(0,VLn.parse)(r,{syntax:"typescript"});n.body.forEach(i=>{if(i.type==="ExportDefaultDeclaration"||i.type==="ExportDefaultExpression"){t.add("default")}else if(i.type==="ExportDeclaration"&&i.declaration.type==="FunctionDeclaration"){t.add(i.declaration.identifier.value)}else if(i.type==="ExportDeclaration"&&i.declaration.type==="VariableDeclaration"&&i.declaration.declarations[0].id.type==="Identifier"){t.add(i.declaration.declarations[0].id.value)}})}catch(r){return null}return t},"getJSFileExports");_N.getJSFileExports=KLn});var kkt=y((gBs,WLn)=>{WLn.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/fragments.schema.json",$defs:{corsPolicyConfiguration:{type:"object",required:["name","allowedOrigins"],additionalProperties:false,properties:{name:{type:"string",pattern:"^[0-9a-z-]+$"},allowCredentials:{type:"boolean"},maxAge:{type:"number"},allowedOrigins:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},allowedMethods:{oneOf:[{type:"array",items:{$ref:"fragments.schema.json#/$defs/httpMethod"}},{type:"string"}]},allowedHeaders:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},exposeHeaders:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]}}},handlerDefinition:{type:"object",properties:{module:{type:"string",pattern:"^\\$import\\([^ )]*?\\)$"},export:{type:"string"},options:{type:"object",additionalProperties:true}},additionalProperties:false,required:["module","export"]},httpMethod:{type:"string",enum:["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"]}}}});var Dkt=y((yBs,YLn)=>{YLn.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/policies.schema.json",title:"Policies Config File",type:"object",additionalProperties:false,properties:{policies:{type:"array",items:{$ref:"policy-configuration.schema.json"}},corsPolicies:{type:"array",items:{$ref:"fragments.schema.json#/$defs/corsPolicyConfiguration"}}}}});var Lkt=y((_Bs,XLn)=>{XLn.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/policy-configuration.schema.json",title:"Policy Configuration Fragment",type:"object",required:["name","policyType","handler"],additionalProperties:false,properties:{name:{type:"string",pattern:"^[0-9a-z-]+$"},policyType:{type:"string"},handler:{$ref:"fragments.schema.json#/$defs/handlerDefinition"},options:{type:"object",additionalProperties:true}}}});var Fkt=y((vBs,JLn)=>{JLn.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/route-configuration-open-api.schema.json",title:"Open API Route Configuration Fragment",description:"These are the properties that can appear under the x-zuplo-route extension in a PathObject in Open API. It's a subset of what can appear in Zuplo's routes.json.",type:"object",required:["handler"],additionalProperties:false,properties:{label:{type:"string",description:"An internal user-friendly identifier of the route."},key:{type:"string",deprecated:true},handler:{$ref:"fragments.schema.json#/$defs/handlerDefinition"},corsPolicy:{type:"string",pattern:"^[0-9a-z-]+$"},custom:{},policies:{type:"object",additionalProperties:false,properties:{inbound:{type:"array",items:{type:"string",pattern:"^[0-9a-z-]+$"}},outbound:{type:"array",items:{type:"string",pattern:"^[0-9a-z-]+$"}}}},tags:{type:"array",items:{type:"string"}}}}});var Bkt=y((EBs,QLn)=>{QLn.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/route-configuration.schema.json",title:"Route Configuration Fragment",description:"",type:"object",required:["path","methods","handler","version"],additionalProperties:false,$defs:{corsPolicy:{type:"string",pattern:"^[0-9a-z-]+$"}},properties:{operationId:{type:"string"},path:{type:"string",pattern:"^/[^\\s]*$"},methods:{type:"array",items:{$ref:"fragments.schema.json#/$defs/httpMethod"}},label:{type:"string",description:"An internal user-friendly identifier of the route."},enforceOpenApi:{type:"boolean",description:"If true, schema validation found in the OpenAPI spec will be enforced on requests/responses."},key:{type:"string",deprecated:true},handler:{$ref:"fragments.schema.json#/$defs/handlerDefinition"},corsPolicy:{$ref:"#/$defs/corsPolicy"},custom:{},version:{type:"string",pattern:"^[0-9a-z-]+$"},policies:{type:"object",additionalProperties:false,properties:{inbound:{type:"array",items:{type:"string",pattern:"^[0-9a-z-]+$"}},outbound:{type:"array",items:{type:"string",pattern:"^[0-9a-z-]+$"}}}},summary:{type:"string"},description:{type:"string"},excludeFromOpenApi:{type:"boolean"},tags:{type:"array",items:{type:"string"}}}}});var Mkt=y((bBs,ZLn)=>{ZLn.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"http://schemas.zuplo.com/routes.schema.json",title:"Route Config File",type:"object",additionalProperties:false,required:["routes","versions"],$defs:{info:{type:"object",required:["title","version"],properties:{title:{type:"string"},summary:{type:"string"},description:{type:"string"},termsOfService:{type:"string",format:"uri"},version:{type:"string"}}},versionData:{type:"object",required:["name","pathPrefix"],additionalProperties:false,properties:{name:{type:"string",pattern:"^[0-9a-z-]+$"},pathPrefix:{type:"string",pattern:"(^$|^/[^\\s]*$)"},info:{$ref:"#/$defs/info"},openApiFile:{description:"The project relative path to the OpenAPI spec.",type:"string"},excludeFromOpenApi:{type:"boolean",description:"If false, OpenAPI documentation will not be generated for this version. If openApiFile is set this setting is ignored."},enforceOpenApi:{type:"boolean",description:"If true, schema validation found in the OpenAPI spec will be enforced on requests/responses."}}}},properties:{$schema:{type:"string"},versions:{type:"array",minItems:1,items:{$ref:"#/$defs/versionData"}},routes:{type:"array",minItems:0,items:{$ref:"route-configuration.schema.json"}},policies:{type:"array",items:{$ref:"policy-configuration.schema.json"}},corsPolicies:{type:"array",items:{$ref:"fragments.schema.json#/$defs/corsPolicyConfiguration"}},requestErrorHandler:{$ref:"fragments.schema.json#/$defs/handlerDefinition"}}}});var YZ=y(mg=>{"use strict";var vN=mg&&mg.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(mg,"__esModule",{value:true});mg.policiesConfigurationValidatorFn=mg.openAPIRouteConfigurationValidatorFn=mg.routeConfigurationValidatorFn=void 0;var eFn=hn();var tFn=vN(kkt());var qkt=vN(Dkt());var rFn=vN(Lkt());var Ukt=vN(Fkt());var $kt=vN(Bkt());var nFn=vN(Mkt());var My=eFn.JsonValidator.instance;My.addSchema(nFn.default,"routes.schema.json");My.addSchema($kt.default,"route-configuration.schema.json");My.addSchema(rFn.default,"policy-configuration.schema.json");My.addSchema(qkt.default,"policies.schema.json");My.addSchema(Ukt.default,"open-api-route-configuration.schema.json");My.addSchema(tFn.default,"fragments.schema.json");mg.routeConfigurationValidatorFn=My.compile($kt.default);mg.openAPIRouteConfigurationValidatorFn=My.compile(Ukt.default);mg.policiesConfigurationValidatorFn=My.compile(qkt.default)});var jkt=y(XZ=>{"use strict";Object.defineProperty(XZ,"__esModule",{value:true});XZ.PoliciesConfigurationValidator=void 0;var iFn=YZ();var XIe=class{static{a(this,"PoliciesConfigurationValidator")}results;validate(t){this.results=(0,iFn.policiesConfigurationValidatorFn)(t);return this.results}};XZ.PoliciesConfigurationValidator=XIe});var Gkt=y(EN=>{"use strict";Object.defineProperty(EN,"__esModule",{value:true});EN.OpenAPIGlobalValidator=EN.OpenAPILocalizedValidator=void 0;var sFn=YZ();var JIe=class{static{a(this,"OpenAPILocalizedValidator")}results;validate(t){this.results=(0,sFn.openAPIRouteConfigurationValidatorFn)(t);return this.results}};EN.OpenAPILocalizedValidator=JIe;var QIe=class{static{a(this,"OpenAPIGlobalValidator")}validate(t){return[]}};EN.OpenAPIGlobalValidator=QIe});var t3e=y(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:true});Td.testPosition=Td.CodeGenError=Td.JSON_ENV_REGEX=Td.JSON_IMPORT_REGEX=Td.ROUTE_ENV_REGEX=Td.ROUTE_IMPORT_REGEX=void 0;var ZIe=mb();Td.ROUTE_IMPORT_REGEX=/\$import\((.*)\)/;Td.ROUTE_ENV_REGEX=/\$env\((.*?)\)/g;Td.JSON_IMPORT_REGEX=/require\("(.*)"\)/;Td.JSON_ENV_REGEX=/\${environment.(.*)}/;var e3e=class extends Error{static{a(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:""}}};Td.CodeGenError=e3e;var aFn=a(e=>{const t=[];let r=e;while(r.parent){t.push(r);r=r.parent}return t.reverse()},"invertTree");var oFn=a((e,t)=>{if(!e){return false}const r=aFn(e);const n=t.split("/");const i=n.every((s,o)=>{const u=r[o];if(!u){return false}if(s==="*"){return true}else if((0,ZIe.isAstProperty)(u)&&u.name.value===s){return true}else if(s==="{}"){return u.type===ZIe.SyntaxType.Object}else if(s==="[]"){return u.type===ZIe.SyntaxType.Array}return false});return i},"testPosition");Td.testPosition=oFn});var Hkt=y(SN=>{"use strict";Object.defineProperty(SN,"__esModule",{value:true});SN.getEnvStatementTransformer=SN.AstTransformer=void 0;var bN=mb();var uFn=KZ();var iB=t3e();var r3e=class{static{a(this,"AstTransformer")}errors=[];transform(t){this.visitor(t);return t}visitor(t){this.visit(t);if((0,bN.isAstObject)(t)){t.children.forEach(r=>{this.visitor(r)})}else if((0,bN.isAstArray)(t)){t.children.forEach(r=>{this.visitor(r)})}else if((0,bN.isAstProperty)(t)){this.visitor(t.value)}}};SN.AstTransformer=r3e;var lFn=a((e,t,r)=>n=>{if(!(0,bN.isAstProperty)(n)||!(0,bN.isAstLiteral)(n.value)||typeof n.value.value!=="string"){return}if(!e.some(s=>(0,iB.testPosition)(n,s))){if(iB.ROUTE_ENV_REGEX.test(n.value.value)){t.push(new iB.CodeGenError(`An $env() statement is not expected at this location.`,r,n.location,n.value.value))}return}const i=new RegExp(iB.ROUTE_ENV_REGEX).exec(n.value.value);if(i?.length===2&&i[0]===n.value.value){const s={type:bN.SyntaxType.FunctionBody,parent:null,value:`environment["${i[1]}"]`};n.value=s}else{const s=n.value.value.replaceAll(new RegExp(iB.ROUTE_ENV_REGEX),(o,u)=>{return`\${environment["${u}"] ? environment["${u}"] : ""}`});if(s!==n.value.value){n.value=uFn.factory.createTemplateString(s,n)}}},"getEnvStatementTransformer");SN.getEnvStatementTransformer=lFn});var Wkt=y(AN=>{"use strict";var cFn=AN&&AN.__importDefault||function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(AN,"__esModule",{value:true});AN.OpenAPIRoutesFragmentAstTransformer=void 0;var dFn=cFn(require("path"));var zf=mb();var n3e=KZ();var Vkt=Hkt();var Ch=t3e();var sB="config/routes.json";var pFn=["handler/{}/options/*","policies/[]/{}/handler/{}/options/*","corsPolicies/[]/{}/*"];var fFn=["handler/{}/module","handler/{}/options/{}/policies/{}/inbound/[]/{}/module","handler/{}/options/{}/policies/{}/outbound/[]/{}/module","policies/[]/{}/handler/{}/module","policies/[]/{}/handler/{}/options/{}/identifier/{}/module","policies/[]/{}/handler/{}/options/{}/validator"];var zkt=["handler/{}/options/*","policies/[]/{}/handler/{}/options/*"];var mFn="handler/{}/options/{}/rewritePattern";var hFn="handler/{}/options/{}/baseUrl";var i3e=class extends Vkt.AstTransformer{static{a(this,"OpenAPIRoutesFragmentAstTransformer")}visit(t){this.rewriteHandlerFunction(t);this.rewriteForwardFunction(t);this.replaceImportStatements(t);this.replaceEnvStatements(t)}rewriteHandlerFunction(t){if(!(0,zf.isAstProperty)(t)||!(0,zf.isAstLiteral)(t.value)||typeof t.value.value!=="string"){return}if((0,Ch.testPosition)(t,mFn)){if(!t.parent||!(0,zf.isAstObject)(t.parent)){this.errors.push(new Ch.CodeGenError(`Invalid node, expected object`,sB,t.parent?t.parent.location:t.location,void 0));return}const r=t.value.value;const n={type:zf.SyntaxType.FunctionBody,parent:null,value:Kkt(r)};const i=n3e.factory.createProperty("__rewriteFunction",n,t);t.parent.children.push(i)}}rewriteForwardFunction(t){if(!(0,zf.isAstProperty)(t)||!(0,zf.isAstLiteral)(t.value)||typeof t.value.value!=="string"){return}if((0,Ch.testPosition)(t,hFn)){if(!t.parent||!(0,zf.isAstObject)(t.parent)){this.errors.push(new Ch.CodeGenError(`Invalid node, expected object`,sB,t.parent?t.parent.location:t.location,void 0));return}const r=t.value.value;const n={type:zf.SyntaxType.FunctionBody,parent:null,value:Kkt(r)};const i=n3e.factory.createProperty("__rewriteFunction",n,t);t.parent.children.push(i)}}replaceImportStatements(t){if(!(0,zf.isAstProperty)(t)||!(0,zf.isAstLiteral)(t.value)){return}const r=t.value.value;if(typeof r!=="string"){return}if(!fFn.some(o=>(0,Ch.testPosition)(t,o))&&!zkt.some(o=>(0,Ch.testPosition)(t,o))){if(Ch.ROUTE_IMPORT_REGEX.test(r)){if(t.name.value==="$ref"){return}this.errors.push(new Ch.CodeGenError(`An $import() statement is not expected at this location.`,sB,t.location,r))}return}const n=Ch.ROUTE_IMPORT_REGEX.exec(r);if(zkt.some(o=>(0,Ch.testPosition)(t,o))&&!n){return}if(!n){this.errors.push(new Ch.CodeGenError(`Invalid $import() statement`,sB,t.location,r));return}let i=n[1];if(i.startsWith(".")){i=dFn.default.join("..",i)}const s={name:null,type:zf.SyntaxType.FunctionCall,parent:t.parent,children:[]};s.name={value:"require",type:zf.SyntaxType.Identifier,parent:s};s.children.push(n3e.factory.createLiteral(i,s));t.value=s}replaceEnvStatements=(0,Vkt.getEnvStatementTransformer)(pFn,this.errors,sB)};AN.OpenAPIRoutesFragmentAstTransformer=i3e;function Kkt(e){return`(request, context) => {
460
460
  const { params, url, query, method, headers } = request;
461
461
  const { host, hostname, origin, pathname, port, search } = new URL(url);
462
462
  const e = encodeURIComponent;