vercel 60.0.0 → 60.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{add-7OUJAZIH.js → add-D6D2J6ID.js} +1 -1
- package/dist/chunks/{add-D4E2N3HU.js → add-JKIDAH7K.js} +1 -1
- package/dist/chunks/{add-UG57LDJR.js → add-QBCRXMR3.js} +1 -1
- package/dist/chunks/{build-VSV5LVJK.js → build-PP4JOW2C.js} +1 -1
- package/dist/chunks/chunk-2TBUMUHF.js +7 -0
- package/dist/chunks/{chunk-MWU4ZPZ4.js → chunk-2ZIWDSUX.js} +1 -1
- package/dist/chunks/{chunk-REONGB6P.js → chunk-3CQQXHDI.js} +1 -1
- package/dist/chunks/{chunk-LTFVLQEF.js → chunk-3KQRJYBJ.js} +1 -1
- package/dist/chunks/chunk-4OKKSZVX.js +7 -0
- package/dist/chunks/{chunk-IAS5LONF.js → chunk-4S6WFNRF.js} +1 -1
- package/dist/chunks/{chunk-V6IKQCOT.js → chunk-5U25FWD5.js} +1 -1
- package/dist/chunks/{chunk-3YOA3ODU.js → chunk-6A6LV2S2.js} +1 -1
- package/dist/chunks/{chunk-EWSS6LUE.js → chunk-77WAICTF.js} +1 -1
- package/dist/chunks/{chunk-TH2WHOUV.js → chunk-7HT5KIFA.js} +1 -1
- package/dist/chunks/{chunk-5JFBDZTI.js → chunk-7JAKGIQ6.js} +1 -1
- package/dist/chunks/{chunk-5LH3CZMJ.js → chunk-C6QYMZ3S.js} +1 -1
- package/dist/chunks/{chunk-I7PARON4.js → chunk-CD4FLZED.js} +1 -1
- package/dist/chunks/chunk-DKV4IVH5.js +7 -0
- package/dist/chunks/{chunk-4VFDQB4H.js → chunk-DPH3CQXE.js} +2 -2
- package/dist/chunks/{chunk-WTAM6QXM.js → chunk-G77TCKNI.js} +1 -1
- package/dist/chunks/{chunk-PNY65NDD.js → chunk-GK5C5TE5.js} +1 -1
- package/dist/chunks/{chunk-KDKSYHTU.js → chunk-GZBSABCA.js} +1 -1
- package/dist/chunks/chunk-H4IUDU5W.js +9 -0
- package/dist/chunks/{chunk-XU4ETL7O.js → chunk-HMB4MZOB.js} +1 -1
- package/dist/chunks/{chunk-JSVZKMZO.js → chunk-IXN5A5WZ.js} +1 -1
- package/dist/chunks/{chunk-4JFQYK65.js → chunk-KOOED3TJ.js} +2 -2
- package/dist/chunks/{chunk-FFQ2SDHN.js → chunk-KTB75ID3.js} +1 -1
- package/dist/chunks/{chunk-5B3BHCFE.js → chunk-LNOX5GIA.js} +1 -1
- package/dist/chunks/{chunk-TZN45RBM.js → chunk-LUVIR6F2.js} +1 -1
- package/dist/chunks/{chunk-ECJKSW62.js → chunk-M6UYGRPW.js} +1 -1
- package/dist/chunks/{chunk-TUVMXISG.js → chunk-MSLHCYBD.js} +2 -2
- package/dist/chunks/{chunk-MRSU4C5C.js → chunk-Q5VLP2LY.js} +1 -1
- package/dist/chunks/{chunk-TQLNWAJY.js → chunk-RB3NPNPD.js} +1 -1
- package/dist/chunks/{chunk-4XAIK5CI.js → chunk-RLCFE3MK.js} +2 -2
- package/dist/chunks/{chunk-JC4FG6EW.js → chunk-SGU7YIY3.js} +1 -1
- package/dist/chunks/{chunk-Y4GI6BXT.js → chunk-STO2JRII.js} +1 -1
- package/dist/chunks/{chunk-25MLFUQD.js → chunk-TTMLSKF7.js} +1 -1
- package/dist/chunks/{chunk-5WW7LFI6.js → chunk-URI72S7J.js} +1 -1
- package/dist/chunks/{chunk-2HZGNTI4.js → chunk-WH6M54KF.js} +1 -1
- package/dist/chunks/{chunk-TKBORMUF.js → chunk-WKZ6JSGZ.js} +1 -1
- package/dist/chunks/{chunk-T4LZS75P.js → chunk-WUH5HYCX.js} +1 -1
- package/dist/chunks/{chunk-PGHEHRSM.js → chunk-YMLWTVT5.js} +1 -1
- package/dist/chunks/{chunk-QXC2G7JY.js → chunk-ZWYU5SBC.js} +1 -1
- package/dist/chunks/{clear-NUMBAODD.js → clear-TQFWNYKK.js} +1 -1
- package/dist/chunks/{compile-vercel-config-75XN6ZKP.js → compile-vercel-config-YY3CODZP.js} +1 -1
- package/dist/chunks/{config-Q6V74NTU.js → config-4FCRR7C5.js} +1 -1
- package/dist/chunks/{config-26RISHPB.js → config-VZQLRHHA.js} +1 -1
- package/dist/chunks/{constants-NCE2LWSS.js → constants-G4UYVLOF.js} +1 -1
- package/dist/chunks/{delete-LGIPH2II.js → delete-L45TA4WK.js} +1 -1
- package/dist/chunks/{delete-PWVNXN4N.js → delete-MPLEIGYN.js} +1 -1
- package/dist/chunks/{detect-services-EX5ZTO5D.js → detect-services-7QL6RPKV.js} +1 -1
- package/dist/chunks/{disable-62HLGVJG.js → disable-WY6N4R7I.js} +1 -1
- package/dist/chunks/{discard-LYY4AMIA.js → discard-3VYFSUTH.js} +1 -1
- package/dist/chunks/{edit-E6AMU6OJ.js → edit-FCPWK252.js} +1 -1
- package/dist/chunks/{edit-FEZFLAIJ.js → edit-VOZ4IKZI.js} +1 -1
- package/dist/chunks/{enable-QDIH43E3.js → enable-IJ7UEQ3G.js} +1 -1
- package/dist/chunks/{export-FO5JCAB4.js → export-L4D4GCJI.js} +1 -1
- package/dist/chunks/{generate-cert-for-deploy-FG57HLGC.js → generate-cert-for-deploy-GSWBCLZX.js} +1 -1
- package/dist/chunks/{image-LZ32HAQV.js → image-ORGBK7MR.js} +1 -1
- package/dist/chunks/{import-builders-SELE5VYE.js → import-builders-N4XIYEW5.js} +1 -1
- package/dist/chunks/{inspect-XWT4QQRM.js → inspect-2EMBEQHZ.js} +1 -1
- package/dist/chunks/{inspect-BUNQSUCN.js → inspect-377IAEIY.js} +1 -1
- package/dist/chunks/{inspect-D2S5CEPW.js → inspect-F4OENUQT.js} +1 -1
- package/dist/chunks/{inspect-22LMAKCS.js → inspect-GTALMRKE.js} +1 -1
- package/dist/chunks/{inspect-LGQ44GYB.js → inspect-V6IX3MOJ.js} +1 -1
- package/dist/chunks/{list-XL4GMICP.js → list-57XWFXDW.js} +1 -1
- package/dist/chunks/{list-WRQRFVUL.js → list-5ZBTU324.js} +1 -1
- package/dist/chunks/{list-TXJQFAGW.js → list-GKXJQRX6.js} +1 -1
- package/dist/chunks/{login-QIPGRGDE.js → login-MQXAAFBP.js} +1 -1
- package/dist/chunks/{login-VJZGWSOW.js → login-X3KPMMEP.js} +1 -1
- package/dist/chunks/{logs-P4NGHB4I.js → logs-ZYELN5F2.js} +1 -1
- package/dist/chunks/{ls-COWL5TXJ.js → ls-AAU7AKS7.js} +1 -1
- package/dist/chunks/{ls-TXXVAVMF.js → ls-ADATML6R.js} +1 -1
- package/dist/chunks/ls-GD6LB7IE.js +8 -0
- package/dist/chunks/{ls-HTSBFV7C.js → ls-LMHRMNKE.js} +1 -1
- package/dist/chunks/{ls-LOXX7YQ2.js → ls-NX3EMRFH.js} +1 -1
- package/dist/chunks/{ls-YTZOJEBT.js → ls-POKSXYZU.js} +1 -1
- package/dist/chunks/{ls-JGBNPJEW.js → ls-VYEJT272.js} +1 -1
- package/dist/chunks/{mutate-BZHBI2PK.js → mutate-QMU5QHF3.js} +1 -1
- package/dist/chunks/{notifications-CTNZYZZ2.js → notifications-OYUKYMU7.js} +1 -1
- package/dist/chunks/{open-D53RMFUT.js → open-SNN3JPON.js} +1 -1
- package/dist/chunks/{openapi-G3HACVTQ.js → openapi-7JUPKBWV.js} +1 -1
- package/dist/chunks/{permissions-XHGXTFEU.js → permissions-5LSKNTW7.js} +1 -1
- package/dist/chunks/{prompt-missing-credentials-KCPCA6L7.js → prompt-missing-credentials-PPUSNDNC.js} +1 -1
- package/dist/chunks/{publish-WTIW7W3Z.js → publish-FIHJARRJ.js} +1 -1
- package/dist/chunks/{pull-N5VAKGFJ.js → pull-2M2BJYAS.js} +1 -1
- package/dist/chunks/{purchase-domain-if-available-ZBXG4E7J.js → purchase-domain-if-available-VKWKDDUD.js} +1 -1
- package/dist/chunks/{push-ZQWVBEAJ.js → push-VN6BPT3B.js} +1 -1
- package/dist/chunks/{query-NNJNXQZG.js → query-P35ZTMXV.js} +1 -1
- package/dist/chunks/{reorder-64FNHY6J.js → reorder-L4L2V3MZ.js} +1 -1
- package/dist/chunks/{reply-MIJ6C3KT.js → reply-XIJ54B7U.js} +1 -1
- package/dist/chunks/{resolve-5HPYDKB4.js → resolve-W2O6M4GH.js} +1 -1
- package/dist/chunks/{restore-KQ5T3MWQ.js → restore-OZPJHXTE.js} +1 -1
- package/dist/chunks/{rm-ZLKEDKBI.js → rm-2YDLXDCB.js} +1 -1
- package/dist/chunks/{rm-WTUTQK3R.js → rm-4EUHQZ7U.js} +1 -1
- package/dist/chunks/{rm-C5GXOG3I.js → rm-HM7V26WX.js} +1 -1
- package/dist/chunks/{rm-HZRLQ2FR.js → rm-IM7VAVCG.js} +1 -1
- package/dist/chunks/rm-OYSWVVSJ.js +8 -0
- package/dist/chunks/{rule-inspect-G4RGKBOI.js → rule-inspect-75RUPIVB.js} +1 -1
- package/dist/chunks/{rules-5ECWTZPP.js → rules-PKOTTFKG.js} +1 -1
- package/dist/chunks/{schema-EQCAQVSE.js → schema-EPUGS3PX.js} +1 -1
- package/dist/chunks/{schema-NERSRSCG.js → schema-NJC47D5M.js} +1 -1
- package/dist/chunks/set-GESKJPQA.js +7 -0
- package/dist/chunks/{setup-and-link-G4G4JJ6W.js → setup-and-link-PM46H7GU.js} +1 -1
- package/dist/chunks/{tags-JSRGITRJ.js → tags-MBJR7IQW.js} +1 -1
- package/dist/chunks/{update-4B5AEB2C.js → update-TNUYPCS3.js} +1 -1
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/deploy/index.js +4 -4
- package/dist/commands/dev/index.js +14 -14
- package/dist/commands/env/index.js +1 -1
- package/dist/commands/link/index.js +1 -1
- package/dist/commands/list/index.js +2 -2
- package/dist/commands-bulk.js +166 -146
- package/dist/index.js +2 -2
- package/dist/version.mjs +1 -1
- package/package.json +53 -53
- package/dist/chunks/chunk-AH3A52IK.js +0 -7
- package/dist/chunks/chunk-M5AV545M.js +0 -7
- package/dist/chunks/chunk-MCZNQE4G.js +0 -9
- package/dist/chunks/chunk-MNR5YQDP.js +0 -7
- package/dist/chunks/ls-OCTMGB6C.js +0 -8
- package/dist/chunks/rm-S3TN7REH.js +0 -8
- package/dist/chunks/set-7HZRIJ6K.js +0 -7
|
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{import_write_build_result,require_detect_builders_with_services,require_get_files,require_service_schedules,require_write_build_result,writeBuildResult}from"../../chunks/chunk-REONGB6P.js";import{importBuilders,import_import_builders}from"../../chunks/chunk-IAS5LONF.js";import"../../chunks/chunk-CJPM2DXZ.js";import{js_yaml_default,pullCommandLogic}from"../../chunks/chunk-TH2WHOUV.js";import{require_fast_deep_equal}from"../../chunks/chunk-4MZK6JT6.js";import{require_semver}from"../../chunks/chunk-KKS7XWEX.js";import{readJSONFile}from"../../chunks/chunk-5B3BHCFE.js";import{readProjectSettings,require_dist as require_dist4}from"../../chunks/chunk-TUVMXISG.js";import"../../chunks/chunk-V6MR45PD.js";import"../../chunks/chunk-MKY5IBKK.js";import"../../chunks/chunk-HWWHR7H3.js";import{stamp_default}from"../../chunks/chunk-XPXOV5UO.js";import"../../chunks/chunk-2I64AYHG.js";import"../../chunks/chunk-JZRMH5UA.js";import"../../chunks/chunk-QTKJC2O5.js";import{require_dist as require_dist3,validateConfig}from"../../chunks/chunk-VHTNAYWA.js";import{require_dist,require_dist2,require_minimatch}from"../../chunks/chunk-JMNAVONO.js";import{compileVercelConfig,findSourceVercelConfigFile,require_main}from"../../chunks/chunk-LTFVLQEF.js";import"../../chunks/chunk-L3JDEHCQ.js";import{pullEnvRecords}from"../../chunks/chunk-ECJKSW62.js";import"../../chunks/chunk-QXC2G7JY.js";import"../../chunks/chunk-H4FTGLWV.js";import"../../chunks/chunk-ULLWCOYC.js";import"../../chunks/chunk-N6CNMMSZ.js";import"../../chunks/chunk-I46LFJJG.js";import"../../chunks/chunk-OI263FBO.js";import{ensureLink}from"../../chunks/chunk-Y4GI6BXT.js";import{printProjectNotFoundError}from"../../chunks/chunk-PNY65NDD.js";import{AGENT_REASON,AGENT_STATUS}from"../../chunks/chunk-T4LZS75P.js";import{require_frameworks}from"../../chunks/chunk-KK4AJES5.js";import{buildCommand}from"../../chunks/chunk-Y7PHTVZ6.js";import"../../chunks/chunk-5UOVEMYX.js";import"../../chunks/chunk-SOJCELXH.js";import"../../chunks/chunk-SXUEGVWB.js";import"../../chunks/chunk-6BZCSVH6.js";import{help}from"../../chunks/chunk-V6IKQCOT.js";import"../../chunks/chunk-6TAQ6OWD.js";import{parseTarget}from"../../chunks/chunk-R3B67TKQ.js";import"../../chunks/chunk-C5KVTG2O.js";import"../../chunks/chunk-6NPXWN5F.js";import"../../chunks/chunk-WPS6JZF6.js";import{detectExplicitScope}from"../../chunks/chunk-AH3A52IK.js";import"../../chunks/chunk-JSKGZLE4.js";import{TelemetryClient}from"../../chunks/chunk-A5VLP25I.js";import"../../chunks/chunk-RCTYVKM5.js";import"../../chunks/chunk-7T6TL3GQ.js";import"../../chunks/chunk-GHM7V3GG.js";import{ua_default}from"../../chunks/chunk-5XJNPXQK.js";import{printError,toEnumerableError}from"../../chunks/chunk-N5AIKGEO.js";import{parseArguments}from"../../chunks/chunk-WWB66KP5.js";import"../../chunks/chunk-MY4MONOH.js";import{DEFAULT_VERCEL_CONFIG_FILENAME,VERCEL_DIR,getLinkedProject,getProjectLink,require_lib,resolveProjectCwd}from"../../chunks/chunk-4XAIK5CI.js";import"../../chunks/chunk-F2ZWW2IO.js";import"../../chunks/chunk-B4ATVYZW.js";import"../../chunks/chunk-PPCFQQSU.js";import"../../chunks/chunk-BRK4OB4B.js";import"../../chunks/chunk-OSCCYU74.js";import{buildCommandWithGlobalFlags,outputAgentError}from"../../chunks/chunk-KCARCOP5.js";import{quoteArg}from"../../chunks/chunk-BKV35LVB.js";import{getFlagsSpecification}from"../../chunks/chunk-JAJW3P42.js";import"../../chunks/chunk-YMM3VY3J.js";import"../../chunks/chunk-SM5JI6QM.js";import"../../chunks/chunk-VOZEB6PD.js";import{CantParseJSONFile}from"../../chunks/chunk-RINZXCDJ.js";import{cmd,getCommandName,packageName,require_lib as require_lib2}from"../../chunks/chunk-FI772UVH.js";import{emoji,output_manager_default,prependEmoji,require_build_utils}from"../../chunks/chunk-EWWFNMPZ.js";import"../../chunks/chunk-QGIQK47P.js";import{pkg_default}from"../../chunks/chunk-AVSPFBLM.js";import"../../chunks/chunk-XCJDGQO7.js";import"../../chunks/chunk-YPTLSODC.js";import"../../chunks/chunk-7HL2RPUO.js";import{require_source}from"../../chunks/chunk-U7KCDTCH.js";import"../../chunks/chunk-N3ZZ7FHQ.js";import"../../chunks/chunk-GU6VIFR5.js";import{__commonJS,__require,__toESM}from"../../chunks/chunk-6L236MNA.js";var require_build_runner=__commonJS({"../../internals/cli-builder-integration/dist/build-runner.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),build_runner_exports={};__export(build_runner_exports,{BuildRunner:()=>BuildRunner3,InprocessBuildRunner:()=>InprocessBuildRunner2});module.exports=__toCommonJS(build_runner_exports);var BuildRunner3=class{constructor(ctx){this.ctx=ctx}},InprocessBuildRunner2=class extends BuildRunner3{constructor(ctx,builder){super(ctx),this.builder=builder}async build(){return await this.builder.build(this.ctx.buildOptions)}async diagnostics(){return await this.ctx.builderSpan.child("vc.builder.diagnostics").trace(async()=>await this.builder.diagnostics?.(this.ctx.buildOptions))}teardown(){}}}});var require_sort_builders=__commonJS({"../../internals/builder-orchestration/dist/sort-builders.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),sort_builders_exports={};__export(sort_builders_exports,{sortBuilders:()=>sortBuilders});module.exports=__toCommonJS(sort_builders_exports);var import_frameworks=require_frameworks();function sortBuilders(builds){let frameworkRuntimeSet=new Set(import_frameworks.frameworkList.map(f=>f.useRuntime?.use||"@vercel/static-build"));frameworkRuntimeSet.delete("@vercel/go"),frameworkRuntimeSet.delete("@vercel/python"),frameworkRuntimeSet.delete("@vercel/ruby"),frameworkRuntimeSet.delete("@vercel/rust");let toNumber=build=>build.use==="@vercel/go"||build.use==="@vercel/python"||build.use==="@vercel/ruby"||build.use==="@vercel/rust"?1:frameworkRuntimeSet.has(build.use)?0:2;return builds.sort((build1,build2)=>toNumber(build1)-toNumber(build2))}}});var require_execute_builder=__commonJS({"../../internals/cli-builder-integration/dist/execute-builder.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),execute_builder_exports={};__export(execute_builder_exports,{executeBuilder:()=>executeBuilder2,sortBuildsForExecution:()=>sortBuildsForExecution2});module.exports=__toCommonJS(execute_builder_exports);var import_sort_builders=require_sort_builders(),import_build_runner2=require_build_runner();async function executeBuilder2({builder,buildOptions,span,isFrontendBuilder,hasDetectedServices,framework,runner}){let buildRunner=runner??new import_build_runner2.InprocessBuildRunner({requirePath:"",buildOptions,cwd:buildOptions.workPath,expectsPreDeploy:!1,builderSpan:span},builder),rawBuildResult=await span.trace(()=>buildRunner.build()),buildResult=builder.version===-1&&"resultVersion"in rawBuildResult?rawBuildResult.result:rawBuildResult;return!hasDetectedServices&&buildOptions.config.zeroConfig&&isFrontendBuilder&&"output"in buildResult&&!buildResult.routes&&framework&&(buildResult.routes=await getFrameworkRoutes(framework,buildOptions.workPath)),{buildResult,rawBuildResult}}var sortBuildsForExecution2=import_sort_builders.sortBuilders;async function getFrameworkRoutes(framework,dirPrefix){return typeof framework.defaultRoutes=="function"?framework.defaultRoutes(dirPrefix):Array.isArray(framework.defaultRoutes)?framework.defaultRoutes:[]}}});var require_build_concurrency=__commonJS({"../../internals/cli-builder-integration/dist/build-concurrency.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),build_concurrency_exports={};__export(build_concurrency_exports,{getInstallScopeKey:()=>getInstallScopeKey,groupIntoScopeChains:()=>groupIntoScopeChains,resolveBuildConcurrency:()=>resolveBuildConcurrency,resolveInstallScopeRoot:()=>resolveInstallScopeRoot,runBuildsWithConcurrency:()=>runBuildsWithConcurrency,runWithConcurrency:()=>runWithConcurrency});module.exports=__toCommonJS(build_concurrency_exports);var import_node_os=__toESM2(__require("node:os")),import_node_fs3=__require("node:fs"),import_node_path3=__require("node:path"),MAX_AUTO_CONCURRENCY=8;function resolveBuildConcurrency(raw=process.env.VERCEL_EXPERIMENTAL_BUILD_CONCURRENCY){let value=raw?.trim();if(!value)return 1;let parallelism=Math.max(typeof import_node_os.default.availableParallelism=="function"?import_node_os.default.availableParallelism():import_node_os.default.cpus().length,1);if(value.toLowerCase()==="auto")return Math.min(Math.max(parallelism-1,2),MAX_AUTO_CONCURRENCY,parallelism);if(value.endsWith("%")){let pct=Number(value.slice(0,-1));return Number.isFinite(pct)&&pct>0?Math.max(1,Math.floor(parallelism*pct/100)):1}let n=Number(value);return Number.isFinite(n)&&n>=1?Math.floor(n):1}async function runWithConcurrency(items,limit,fn,onSecondaryError){let queue=[...items],max=Math.max(limit,1),active=0,failed=!1,firstError;if(await new Promise(finish=>{let enqueue=item=>{queue.push(item),pump()},pump=()=>{for(;active<max&&queue.length>0&&!failed;){let item=queue.shift();active++,fn(item,enqueue).then(()=>{active--,pump()},err=>{active--,failed?onSecondaryError?.(err,item):(failed=!0,firstError=err),pump()})}active===0&&finish()};pump()}),failed)throw firstError}function getInstallScopeKey({toolchain,installDirectory,installCommand}){return JSON.stringify([toolchain,(0,import_node_path3.normalize)(installDirectory),typeof installCommand=="string"?["cmd",installCommand.trim()]:"default"])}var NODE_LOCKFILES=["pnpm-lock.yaml","yarn.lock","package-lock.json","npm-shrinkwrap.json","bun.lock","bun.lockb"];async function fileExists(path){try{return await import_node_fs3.promises.stat(path),!0}catch{return!1}}var SERVICE_DIR_TOOLCHAINS=new Set(["go","ruby","rust","container"]);async function resolveInstallScopeRoot({toolchain,serviceDir,ceilingDir}){if(toolchain!=="node"&&toolchain!=="python")return SERVICE_DIR_TOOLCHAINS.has(toolchain)?(0,import_node_path3.normalize)(serviceDir):(0,import_node_path3.normalize)(ceilingDir);let ceiling=(0,import_node_path3.normalize)(ceilingDir),dir=(0,import_node_path3.normalize)(serviceDir);if(dir!==ceiling&&!dir.startsWith(ceiling+import_node_path3.sep))return dir;let nearestLockfileDir,nearestPackageJsonDir,done=!1;for(;!done;){if(toolchain==="node"){if(nearestLockfileDir===void 0){for(let lockfile of NODE_LOCKFILES)if(await fileExists((0,import_node_path3.join)(dir,lockfile))){nearestLockfileDir=dir;break}}if(await fileExists((0,import_node_path3.join)(dir,"pnpm-workspace.yaml")))return dir;try{let pkg=JSON.parse(await import_node_fs3.promises.readFile((0,import_node_path3.join)(dir,"package.json"),"utf8"));if(pkg&&typeof pkg=="object"){if("workspaces"in pkg)return dir;nearestPackageJsonDir??=dir}}catch{}}else try{if((await import_node_fs3.promises.readFile((0,import_node_path3.join)(dir,"pyproject.toml"),"utf8")).includes("[tool.uv.workspace]"))return dir}catch{}let parent=(0,import_node_path3.dirname)(dir);done=dir===ceiling||parent===dir,dir=parent}return nearestLockfileDir??nearestPackageJsonDir??(0,import_node_path3.normalize)(serviceDir)}async function runBuildsWithConcurrency({builds,concurrency,isEligible,resolveScope,forceSingleChain,runBuild,log,reportSecondaryError}){if(concurrency<=1){for(let build of builds)await runBuild(build,!1);return}let parallelBuilds=[],sequentialBuilds=[];for(let build of builds)(isEligible(build)?parallelBuilds:sequentialBuilds).push(build);if(parallelBuilds.length>0){let chains,siblingsOf;if(forceSingleChain)chains=[parallelBuilds],siblingsOf=new Map;else{let scopeByBuild=new Map;for(let build of parallelBuilds)scopeByBuild.set(build,await resolveScope(build));({chains,siblingsOf}=groupIntoScopeChains(parallelBuilds,build=>scopeByBuild.get(build)))}log(`Running ${parallelBuilds.length} builds across ${chains.length} install scope${chains.length===1?"":"s"} (concurrency ${concurrency})`);let abortedRun=!1,activeBuildOfChain=new Map;await runWithConcurrency(chains,concurrency,async(chain,enqueue)=>{for(let build of chain){if(abortedRun)return;activeBuildOfChain.set(chain,build);try{await runBuild(build,!0)}catch(err){throw abortedRun=!0,err}let siblings=siblingsOf.get(build);if(siblings)for(let sibling of siblings)enqueue([sibling])}},(err,chain)=>{let build=activeBuildOfChain.get(chain);build!==void 0&&reportSecondaryError(err,build)})}for(let build of sequentialBuilds)await runBuild(build,!1)}function groupIntoScopeChains(items,scopeOf){let chainByOuter=new Map,leaderByInnerByOuter=new Map,siblingsOf=new Map;for(let item of items){let scope=scopeOf(item),chain=chainByOuter.get(scope.outerKey);chain||(chain=[],chainByOuter.set(scope.outerKey,chain));let leaderByInner=leaderByInnerByOuter.get(scope.outerKey);leaderByInner||(leaderByInner=new Map,leaderByInnerByOuter.set(scope.outerKey,leaderByInner));let leader=leaderByInner.get(scope.innerKey);if(leader===void 0)leaderByInner.set(scope.innerKey,item),chain.push(item);else if(scope.siblingsSkipInstall){let siblings=siblingsOf.get(leader);siblings||(siblings=[],siblingsOf.set(leader,siblings)),siblings.push(item)}else chain.push(item)}return{chains:Array.from(chainByOuter.values()),siblingsOf}}}});var require_backend_rewrite_warning=__commonJS({"../../internals/cli-builder-integration/dist/backend-rewrite-warning.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),backend_rewrite_warning_exports={};__export(backend_rewrite_warning_exports,{BACKEND_REWRITE_BEHAVIOR_WARNING:()=>BACKEND_REWRITE_BEHAVIOR_WARNING,hasBackendRewriteBehaviorChange:()=>hasBackendRewriteBehaviorChange});module.exports=__toCommonJS(backend_rewrite_warning_exports);var import_build_utils3=__require("@vercel/build-utils"),BACKEND_REWRITE_BEHAVIOR_WARNING="Internal rewrites in backend framework projects now route requests using the rewritten destination path. This behavior was previously unsupported and may change which application route handles a request. Review your rewrite configuration to ensure this behavior is expected.";function hasInternalPathRewrite(rewrites){return rewrites?.some(rewrite=>typeof rewrite.destination=="string"&&rewrite.destination.startsWith("/"))??!1}function isAffectedFramework(framework){return framework==="go"||framework==="container"||(0,import_build_utils3.isPythonFramework)(framework)||(0,import_build_utils3.isNodeBackendFramework)(framework)}function hasBackendRewriteBehaviorChange({projectRewrites,builders}){return hasInternalPathRewrite(projectRewrites)&&(builders??[]).some(builder=>isAffectedFramework(builder.config?.framework))}}});var require_service_route_ownership=__commonJS({"../../internals/cli-builder-integration/dist/service-route-ownership.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),service_route_ownership_exports={};__export(service_route_ownership_exports,{scopeRoutesToServiceOwnership:()=>scopeRoutesToServiceOwnership});module.exports=__toCommonJS(service_route_ownership_exports);var import_routing_utils=require_dist();function isWebServiceWithPrefix(service){return service.type==="web"&&typeof service.routePrefix=="string"}function getWebRoutePrefixes(services){let unique=new Set;for(let service of services)isWebServiceWithPrefix(service)&&unique.add((0,import_routing_utils.normalizeRoutePrefix)(service.routePrefix));return Array.from(unique)}function scopeRoutesToServiceOwnership({routes,owner,allServices}){if(!isWebServiceWithPrefix(owner))return routes;let allWebPrefixes=getWebRoutePrefixes(allServices),ownershipGuard=(0,import_routing_utils.getOwnershipGuard)(owner.routePrefix,allWebPrefixes);return ownershipGuard?routes.map(route=>"handle"in route||typeof route.src!="string"?route:{...route,src:(0,import_routing_utils.scopeRouteSourceToOwnership)(route.src,ownershipGuard)}):routes}}});var require_validate_cron_secret=__commonJS({"../../internals/cli-builder-integration/dist/validate-cron-secret.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),validate_cron_secret_exports={};__export(validate_cron_secret_exports,{validateCronSecret:()=>validateCronSecret});module.exports=__toCommonJS(validate_cron_secret_exports);var import_build_utils3=__require("@vercel/build-utils");function validateCronSecret(cronSecret){if(!cronSecret)return null;if(cronSecret!==cronSecret.trim())return new import_build_utils3.NowBuildError({code:"INVALID_CRON_SECRET",message:"The `CRON_SECRET` environment variable contains leading or trailing whitespace, which is not allowed in HTTP header values.",link:"https://vercel.link/securing-cron-jobs",action:"Learn More"});let invalidChars=[];for(let i=0;i<cronSecret.length;i++){let code=cronSecret.charCodeAt(i);code===9||code>=32&&code<=126||invalidChars.push({char:cronSecret[i],index:i,code})}if(invalidChars.length>0){let descriptions=invalidChars.slice(0,3).map(({code,index})=>code<32?`control character (0x${code.toString(16).padStart(2,"0")}) at position ${index}`:code===127?`DEL character at position ${index}`:`non-ASCII character (0x${code.toString(16).padStart(2,"0")}) at position ${index}`),moreCount=invalidChars.length-3,moreText=moreCount>0?`, and ${moreCount} more`:"";return new import_build_utils3.NowBuildError({code:"INVALID_CRON_SECRET",message:`The \`CRON_SECRET\` environment variable contains characters that are not valid in HTTP headers: ${descriptions.join(", ")}${moreText}. Only visible ASCII characters (letters, digits, symbols), spaces, and tabs are allowed.`,link:"https://vercel.link/securing-cron-jobs",action:"Learn More"})}return null}}});var require_uri_all=__commonJS({"../../node_modules/.pnpm/uri-js@4.4.1/node_modules/uri-js/dist/es5/uri.all.js"(exports,module){(function(global,factory){typeof exports=="object"&&typeof module<"u"?factory(exports):typeof define=="function"&&define.amd?define(["exports"],factory):factory(global.URI=global.URI||{})})(exports,function(exports2){"use strict";function merge(){for(var _len=arguments.length,sets=Array(_len),_key=0;_key<_len;_key++)sets[_key]=arguments[_key];if(sets.length>1){sets[0]=sets[0].slice(0,-1);for(var xl=sets.length-1,x=1;x<xl;++x)sets[x]=sets[x].slice(1,-1);return sets[xl]=sets[xl].slice(1),sets.join("")}else return sets[0]}function subexp(str){return"(?:"+str+")"}function typeOf(o){return o===void 0?"undefined":o===null?"null":Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase()}function toUpperCase(str){return str.toUpperCase()}function toArray(obj){return obj!=null?obj instanceof Array?obj:typeof obj.length!="number"||obj.split||obj.setInterval||obj.call?[obj]:Array.prototype.slice.call(obj):[]}function assign(target,source){var obj=target;if(source)for(var key in source)obj[key]=source[key];return obj}function buildExps(isIRI2){var ALPHA$$="[A-Za-z]",CR$="[\\x0D]",DIGIT$$="[0-9]",DQUOTE$$="[\\x22]",HEXDIG$$2=merge(DIGIT$$,"[A-Fa-f]"),LF$$="[\\x0A]",SP$$="[\\x20]",PCT_ENCODED$2=subexp(subexp("%[EFef]"+HEXDIG$$2+"%"+HEXDIG$$2+HEXDIG$$2+"%"+HEXDIG$$2+HEXDIG$$2)+"|"+subexp("%[89A-Fa-f]"+HEXDIG$$2+"%"+HEXDIG$$2+HEXDIG$$2)+"|"+subexp("%"+HEXDIG$$2+HEXDIG$$2)),GEN_DELIMS$$="[\\:\\/\\?\\#\\[\\]\\@]",SUB_DELIMS$$="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",RESERVED$$=merge(GEN_DELIMS$$,SUB_DELIMS$$),UCSCHAR$$=isIRI2?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",IPRIVATE$$=isIRI2?"[\\uE000-\\uF8FF]":"[]",UNRESERVED$$2=merge(ALPHA$$,DIGIT$$,"[\\-\\.\\_\\~]",UCSCHAR$$),SCHEME$=subexp(ALPHA$$+merge(ALPHA$$,DIGIT$$,"[\\+\\-\\.]")+"*"),USERINFO$=subexp(subexp(PCT_ENCODED$2+"|"+merge(UNRESERVED$$2,SUB_DELIMS$$,"[\\:]"))+"*"),DEC_OCTET$=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+DIGIT$$)+"|"+subexp("1"+DIGIT$$+DIGIT$$)+"|"+subexp("[1-9]"+DIGIT$$)+"|"+DIGIT$$),DEC_OCTET_RELAXED$=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+DIGIT$$)+"|"+subexp("1"+DIGIT$$+DIGIT$$)+"|"+subexp("0?[1-9]"+DIGIT$$)+"|0?0?"+DIGIT$$),IPV4ADDRESS$=subexp(DEC_OCTET_RELAXED$+"\\."+DEC_OCTET_RELAXED$+"\\."+DEC_OCTET_RELAXED$+"\\."+DEC_OCTET_RELAXED$),H16$=subexp(HEXDIG$$2+"{1,4}"),LS32$=subexp(subexp(H16$+"\\:"+H16$)+"|"+IPV4ADDRESS$),IPV6ADDRESS1$=subexp(subexp(H16$+"\\:")+"{6}"+LS32$),IPV6ADDRESS2$=subexp("\\:\\:"+subexp(H16$+"\\:")+"{5}"+LS32$),IPV6ADDRESS3$=subexp(subexp(H16$)+"?\\:\\:"+subexp(H16$+"\\:")+"{4}"+LS32$),IPV6ADDRESS4$=subexp(subexp(subexp(H16$+"\\:")+"{0,1}"+H16$)+"?\\:\\:"+subexp(H16$+"\\:")+"{3}"+LS32$),IPV6ADDRESS5$=subexp(subexp(subexp(H16$+"\\:")+"{0,2}"+H16$)+"?\\:\\:"+subexp(H16$+"\\:")+"{2}"+LS32$),IPV6ADDRESS6$=subexp(subexp(subexp(H16$+"\\:")+"{0,3}"+H16$)+"?\\:\\:"+H16$+"\\:"+LS32$),IPV6ADDRESS7$=subexp(subexp(subexp(H16$+"\\:")+"{0,4}"+H16$)+"?\\:\\:"+LS32$),IPV6ADDRESS8$=subexp(subexp(subexp(H16$+"\\:")+"{0,5}"+H16$)+"?\\:\\:"+H16$),IPV6ADDRESS9$=subexp(subexp(subexp(H16$+"\\:")+"{0,6}"+H16$)+"?\\:\\:"),IPV6ADDRESS$=subexp([IPV6ADDRESS1$,IPV6ADDRESS2$,IPV6ADDRESS3$,IPV6ADDRESS4$,IPV6ADDRESS5$,IPV6ADDRESS6$,IPV6ADDRESS7$,IPV6ADDRESS8$,IPV6ADDRESS9$].join("|")),ZONEID$=subexp(subexp(UNRESERVED$$2+"|"+PCT_ENCODED$2)+"+"),IPV6ADDRZ$=subexp(IPV6ADDRESS$+"\\%25"+ZONEID$),IPV6ADDRZ_RELAXED$=subexp(IPV6ADDRESS$+subexp("\\%25|\\%(?!"+HEXDIG$$2+"{2})")+ZONEID$),IPVFUTURE$=subexp("[vV]"+HEXDIG$$2+"+\\."+merge(UNRESERVED$$2,SUB_DELIMS$$,"[\\:]")+"+"),IP_LITERAL$=subexp("\\["+subexp(IPV6ADDRZ_RELAXED$+"|"+IPV6ADDRESS$+"|"+IPVFUTURE$)+"\\]"),REG_NAME$=subexp(subexp(PCT_ENCODED$2+"|"+merge(UNRESERVED$$2,SUB_DELIMS$$))+"*"),HOST$=subexp(IP_LITERAL$+"|"+IPV4ADDRESS$+"(?!"+REG_NAME$+")|"+REG_NAME$),PORT$=subexp(DIGIT$$+"*"),AUTHORITY$=subexp(subexp(USERINFO$+"@")+"?"+HOST$+subexp("\\:"+PORT$)+"?"),PCHAR$=subexp(PCT_ENCODED$2+"|"+merge(UNRESERVED$$2,SUB_DELIMS$$,"[\\:\\@]")),SEGMENT$=subexp(PCHAR$+"*"),SEGMENT_NZ$=subexp(PCHAR$+"+"),SEGMENT_NZ_NC$=subexp(subexp(PCT_ENCODED$2+"|"+merge(UNRESERVED$$2,SUB_DELIMS$$,"[\\@]"))+"+"),PATH_ABEMPTY$=subexp(subexp("\\/"+SEGMENT$)+"*"),PATH_ABSOLUTE$=subexp("\\/"+subexp(SEGMENT_NZ$+PATH_ABEMPTY$)+"?"),PATH_NOSCHEME$=subexp(SEGMENT_NZ_NC$+PATH_ABEMPTY$),PATH_ROOTLESS$=subexp(SEGMENT_NZ$+PATH_ABEMPTY$),PATH_EMPTY$="(?!"+PCHAR$+")",PATH$=subexp(PATH_ABEMPTY$+"|"+PATH_ABSOLUTE$+"|"+PATH_NOSCHEME$+"|"+PATH_ROOTLESS$+"|"+PATH_EMPTY$),QUERY$=subexp(subexp(PCHAR$+"|"+merge("[\\/\\?]",IPRIVATE$$))+"*"),FRAGMENT$=subexp(subexp(PCHAR$+"|[\\/\\?]")+"*"),HIER_PART$=subexp(subexp("\\/\\/"+AUTHORITY$+PATH_ABEMPTY$)+"|"+PATH_ABSOLUTE$+"|"+PATH_ROOTLESS$+"|"+PATH_EMPTY$),URI$=subexp(SCHEME$+"\\:"+HIER_PART$+subexp("\\?"+QUERY$)+"?"+subexp("\\#"+FRAGMENT$)+"?"),RELATIVE_PART$=subexp(subexp("\\/\\/"+AUTHORITY$+PATH_ABEMPTY$)+"|"+PATH_ABSOLUTE$+"|"+PATH_NOSCHEME$+"|"+PATH_EMPTY$),RELATIVE$=subexp(RELATIVE_PART$+subexp("\\?"+QUERY$)+"?"+subexp("\\#"+FRAGMENT$)+"?"),URI_REFERENCE$=subexp(URI$+"|"+RELATIVE$),ABSOLUTE_URI$=subexp(SCHEME$+"\\:"+HIER_PART$+subexp("\\?"+QUERY$)+"?"),GENERIC_REF$="^("+SCHEME$+")\\:"+subexp(subexp("\\/\\/("+subexp("("+USERINFO$+")@")+"?("+HOST$+")"+subexp("\\:("+PORT$+")")+"?)")+"?("+PATH_ABEMPTY$+"|"+PATH_ABSOLUTE$+"|"+PATH_ROOTLESS$+"|"+PATH_EMPTY$+")")+subexp("\\?("+QUERY$+")")+"?"+subexp("\\#("+FRAGMENT$+")")+"?$",RELATIVE_REF$="^(){0}"+subexp(subexp("\\/\\/("+subexp("("+USERINFO$+")@")+"?("+HOST$+")"+subexp("\\:("+PORT$+")")+"?)")+"?("+PATH_ABEMPTY$+"|"+PATH_ABSOLUTE$+"|"+PATH_NOSCHEME$+"|"+PATH_EMPTY$+")")+subexp("\\?("+QUERY$+")")+"?"+subexp("\\#("+FRAGMENT$+")")+"?$",ABSOLUTE_REF$="^("+SCHEME$+")\\:"+subexp(subexp("\\/\\/("+subexp("("+USERINFO$+")@")+"?("+HOST$+")"+subexp("\\:("+PORT$+")")+"?)")+"?("+PATH_ABEMPTY$+"|"+PATH_ABSOLUTE$+"|"+PATH_ROOTLESS$+"|"+PATH_EMPTY$+")")+subexp("\\?("+QUERY$+")")+"?$",SAMEDOC_REF$="^"+subexp("\\#("+FRAGMENT$+")")+"?$",AUTHORITY_REF$="^"+subexp("("+USERINFO$+")@")+"?("+HOST$+")"+subexp("\\:("+PORT$+")")+"?$";return{NOT_SCHEME:new RegExp(merge("[^]",ALPHA$$,DIGIT$$,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(merge("[^\\%\\:]",UNRESERVED$$2,SUB_DELIMS$$),"g"),NOT_HOST:new RegExp(merge("[^\\%\\[\\]\\:]",UNRESERVED$$2,SUB_DELIMS$$),"g"),NOT_PATH:new RegExp(merge("[^\\%\\/\\:\\@]",UNRESERVED$$2,SUB_DELIMS$$),"g"),NOT_PATH_NOSCHEME:new RegExp(merge("[^\\%\\/\\@]",UNRESERVED$$2,SUB_DELIMS$$),"g"),NOT_QUERY:new RegExp(merge("[^\\%]",UNRESERVED$$2,SUB_DELIMS$$,"[\\:\\@\\/\\?]",IPRIVATE$$),"g"),NOT_FRAGMENT:new RegExp(merge("[^\\%]",UNRESERVED$$2,SUB_DELIMS$$,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(merge("[^]",UNRESERVED$$2,SUB_DELIMS$$),"g"),UNRESERVED:new RegExp(UNRESERVED$$2,"g"),OTHER_CHARS:new RegExp(merge("[^\\%]",UNRESERVED$$2,RESERVED$$),"g"),PCT_ENCODED:new RegExp(PCT_ENCODED$2,"g"),IPV4ADDRESS:new RegExp("^("+IPV4ADDRESS$+")$"),IPV6ADDRESS:new RegExp("^\\[?("+IPV6ADDRESS$+")"+subexp(subexp("\\%25|\\%(?!"+HEXDIG$$2+"{2})")+"("+ZONEID$+")")+"?\\]?$")}}var URI_PROTOCOL=buildExps(!1),IRI_PROTOCOL=buildExps(!0),slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!(i&&_arr.length===i));_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),toConsumableArray=function(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}else return Array.from(arr)},maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexPunycode=/^xn--/,regexNonASCII=/[^\0-\x7E]/,regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,errors={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode;function error$1(type){throw new RangeError(errors[type])}function map(array,fn){for(var result=[],length=array.length;length--;)result[length]=fn(array[length]);return result}function mapDomain(string,fn){var parts=string.split("@"),result="";parts.length>1&&(result=parts[0]+"@",string=parts[1]),string=string.replace(regexSeparators,".");var labels=string.split("."),encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){for(var output=[],counter=0,length=string.length;counter<length;){var value=string.charCodeAt(counter++);if(value>=55296&&value<=56319&&counter<length){var extra=string.charCodeAt(counter++);(extra&64512)==56320?output.push(((value&1023)<<10)+(extra&1023)+65536):(output.push(value),counter--)}else output.push(value)}return output}var ucs2encode=function(array){return String.fromCodePoint.apply(String,toConsumableArray(array))},basicToDigit=function(codePoint){return codePoint-48<10?codePoint-22:codePoint-65<26?codePoint-65:codePoint-97<26?codePoint-97:base},digitToBasic=function(digit,flag){return digit+22+75*(digit<26)-((flag!=0)<<5)},adapt=function(delta,numPoints,firstTime){var k=0;for(delta=firstTime?floor(delta/damp):delta>>1,delta+=floor(delta/numPoints);delta>baseMinusTMin*tMax>>1;k+=base)delta=floor(delta/baseMinusTMin);return floor(k+(baseMinusTMin+1)*delta/(delta+skew))},decode=function(input){var output=[],inputLength=input.length,i=0,n=initialN,bias=initialBias,basic=input.lastIndexOf(delimiter);basic<0&&(basic=0);for(var j=0;j<basic;++j)input.charCodeAt(j)>=128&&error$1("not-basic"),output.push(input.charCodeAt(j));for(var index=basic>0?basic+1:0;index<inputLength;){for(var oldi=i,w=1,k=base;;k+=base){index>=inputLength&&error$1("invalid-input");var digit=basicToDigit(input.charCodeAt(index++));(digit>=base||digit>floor((maxInt-i)/w))&&error$1("overflow"),i+=digit*w;var t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(digit<t)break;var baseMinusT=base-t;w>floor(maxInt/baseMinusT)&&error$1("overflow"),w*=baseMinusT}var out=output.length+1;bias=adapt(i-oldi,out,oldi==0),floor(i/out)>maxInt-n&&error$1("overflow"),n+=floor(i/out),i%=out,output.splice(i++,0,n)}return String.fromCodePoint.apply(String,output)},encode=function(input){var output=[];input=ucs2decode(input);var inputLength=input.length,n=initialN,delta=0,bias=initialBias,_iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _iterator=input[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var _currentValue2=_step.value;_currentValue2<128&&output.push(stringFromCharCode(_currentValue2))}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{!_iteratorNormalCompletion&&_iterator.return&&_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}var basicLength=output.length,handledCPCount=basicLength;for(basicLength&&output.push(delimiter);handledCPCount<inputLength;){var m=maxInt,_iteratorNormalCompletion2=!0,_didIteratorError2=!1,_iteratorError2=void 0;try{for(var _iterator2=input[Symbol.iterator](),_step2;!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=!0){var currentValue=_step2.value;currentValue>=n&¤tValue<m&&(m=currentValue)}}catch(err){_didIteratorError2=!0,_iteratorError2=err}finally{try{!_iteratorNormalCompletion2&&_iterator2.return&&_iterator2.return()}finally{if(_didIteratorError2)throw _iteratorError2}}var handledCPCountPlusOne=handledCPCount+1;m-n>floor((maxInt-delta)/handledCPCountPlusOne)&&error$1("overflow"),delta+=(m-n)*handledCPCountPlusOne,n=m;var _iteratorNormalCompletion3=!0,_didIteratorError3=!1,_iteratorError3=void 0;try{for(var _iterator3=input[Symbol.iterator](),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=!0){var _currentValue=_step3.value;if(_currentValue<n&&++delta>maxInt&&error$1("overflow"),_currentValue==n){for(var q=delta,k=base;;k+=base){var t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(q<t)break;var qMinusT=q-t,baseMinusT=base-t;output.push(stringFromCharCode(digitToBasic(t+qMinusT%baseMinusT,0))),q=floor(qMinusT/baseMinusT)}output.push(stringFromCharCode(digitToBasic(q,0))),bias=adapt(delta,handledCPCountPlusOne,handledCPCount==basicLength),delta=0,++handledCPCount}}}catch(err){_didIteratorError3=!0,_iteratorError3=err}finally{try{!_iteratorNormalCompletion3&&_iterator3.return&&_iterator3.return()}finally{if(_didIteratorError3)throw _iteratorError3}}++delta,++n}return output.join("")},toUnicode=function(input){return mapDomain(input,function(string){return regexPunycode.test(string)?decode(string.slice(4).toLowerCase()):string})},toASCII=function(input){return mapDomain(input,function(string){return regexNonASCII.test(string)?"xn--"+encode(string):string})},punycode={version:"2.1.0",ucs2:{decode:ucs2decode,encode:ucs2encode},decode,encode,toASCII,toUnicode},SCHEMES={};function pctEncChar(chr){var c=chr.charCodeAt(0),e=void 0;return c<16?e="%0"+c.toString(16).toUpperCase():c<128?e="%"+c.toString(16).toUpperCase():c<2048?e="%"+(c>>6|192).toString(16).toUpperCase()+"%"+(c&63|128).toString(16).toUpperCase():e="%"+(c>>12|224).toString(16).toUpperCase()+"%"+(c>>6&63|128).toString(16).toUpperCase()+"%"+(c&63|128).toString(16).toUpperCase(),e}function pctDecChars(str){for(var newStr="",i=0,il=str.length;i<il;){var c=parseInt(str.substr(i+1,2),16);if(c<128)newStr+=String.fromCharCode(c),i+=3;else if(c>=194&&c<224){if(il-i>=6){var c2=parseInt(str.substr(i+4,2),16);newStr+=String.fromCharCode((c&31)<<6|c2&63)}else newStr+=str.substr(i,6);i+=6}else if(c>=224){if(il-i>=9){var _c=parseInt(str.substr(i+4,2),16),c3=parseInt(str.substr(i+7,2),16);newStr+=String.fromCharCode((c&15)<<12|(_c&63)<<6|c3&63)}else newStr+=str.substr(i,9);i+=9}else newStr+=str.substr(i,3),i+=3}return newStr}function _normalizeComponentEncoding(components,protocol){function decodeUnreserved2(str){var decStr=pctDecChars(str);return decStr.match(protocol.UNRESERVED)?decStr:str}return components.scheme&&(components.scheme=String(components.scheme).replace(protocol.PCT_ENCODED,decodeUnreserved2).toLowerCase().replace(protocol.NOT_SCHEME,"")),components.userinfo!==void 0&&(components.userinfo=String(components.userinfo).replace(protocol.PCT_ENCODED,decodeUnreserved2).replace(protocol.NOT_USERINFO,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase)),components.host!==void 0&&(components.host=String(components.host).replace(protocol.PCT_ENCODED,decodeUnreserved2).toLowerCase().replace(protocol.NOT_HOST,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase)),components.path!==void 0&&(components.path=String(components.path).replace(protocol.PCT_ENCODED,decodeUnreserved2).replace(components.scheme?protocol.NOT_PATH:protocol.NOT_PATH_NOSCHEME,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase)),components.query!==void 0&&(components.query=String(components.query).replace(protocol.PCT_ENCODED,decodeUnreserved2).replace(protocol.NOT_QUERY,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase)),components.fragment!==void 0&&(components.fragment=String(components.fragment).replace(protocol.PCT_ENCODED,decodeUnreserved2).replace(protocol.NOT_FRAGMENT,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase)),components}function _stripLeadingZeros(str){return str.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(host,protocol){var matches=host.match(protocol.IPV4ADDRESS)||[],_matches=slicedToArray(matches,2),address=_matches[1];return address?address.split(".").map(_stripLeadingZeros).join("."):host}function _normalizeIPv6(host,protocol){var matches=host.match(protocol.IPV6ADDRESS)||[],_matches2=slicedToArray(matches,3),address=_matches2[1],zone=_matches2[2];if(address){for(var _address$toLowerCase$=address.toLowerCase().split("::").reverse(),_address$toLowerCase$2=slicedToArray(_address$toLowerCase$,2),last=_address$toLowerCase$2[0],first=_address$toLowerCase$2[1],firstFields=first?first.split(":").map(_stripLeadingZeros):[],lastFields=last.split(":").map(_stripLeadingZeros),isLastFieldIPv4Address=protocol.IPV4ADDRESS.test(lastFields[lastFields.length-1]),fieldCount=isLastFieldIPv4Address?7:8,lastFieldsStart=lastFields.length-fieldCount,fields=Array(fieldCount),x=0;x<fieldCount;++x)fields[x]=firstFields[x]||lastFields[lastFieldsStart+x]||"";isLastFieldIPv4Address&&(fields[fieldCount-1]=_normalizeIPv4(fields[fieldCount-1],protocol));var allZeroFields=fields.reduce(function(acc,field,index){if(!field||field==="0"){var lastLongest=acc[acc.length-1];lastLongest&&lastLongest.index+lastLongest.length===index?lastLongest.length++:acc.push({index,length:1})}return acc},[]),longestZeroFields=allZeroFields.sort(function(a,b){return b.length-a.length})[0],newHost=void 0;if(longestZeroFields&&longestZeroFields.length>1){var newFirst=fields.slice(0,longestZeroFields.index),newLast=fields.slice(longestZeroFields.index+longestZeroFields.length);newHost=newFirst.join(":")+"::"+newLast.join(":")}else newHost=fields.join(":");return zone&&(newHost+="%"+zone),newHost}else return host}var URI_PARSE=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,NO_MATCH_IS_UNDEFINED="".match(/(){0}/)[1]===void 0;function parse2(uriString){var options=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},components={},protocol=options.iri!==!1?IRI_PROTOCOL:URI_PROTOCOL;options.reference==="suffix"&&(uriString=(options.scheme?options.scheme+":":"")+"//"+uriString);var matches=uriString.match(URI_PARSE);if(matches){NO_MATCH_IS_UNDEFINED?(components.scheme=matches[1],components.userinfo=matches[3],components.host=matches[4],components.port=parseInt(matches[5],10),components.path=matches[6]||"",components.query=matches[7],components.fragment=matches[8],isNaN(components.port)&&(components.port=matches[5])):(components.scheme=matches[1]||void 0,components.userinfo=uriString.indexOf("@")!==-1?matches[3]:void 0,components.host=uriString.indexOf("//")!==-1?matches[4]:void 0,components.port=parseInt(matches[5],10),components.path=matches[6]||"",components.query=uriString.indexOf("?")!==-1?matches[7]:void 0,components.fragment=uriString.indexOf("#")!==-1?matches[8]:void 0,isNaN(components.port)&&(components.port=uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?matches[4]:void 0)),components.host&&(components.host=_normalizeIPv6(_normalizeIPv4(components.host,protocol),protocol)),components.scheme===void 0&&components.userinfo===void 0&&components.host===void 0&&components.port===void 0&&!components.path&&components.query===void 0?components.reference="same-document":components.scheme===void 0?components.reference="relative":components.fragment===void 0?components.reference="absolute":components.reference="uri",options.reference&&options.reference!=="suffix"&&options.reference!==components.reference&&(components.error=components.error||"URI is not a "+options.reference+" reference.");var schemeHandler=SCHEMES[(options.scheme||components.scheme||"").toLowerCase()];if(!options.unicodeSupport&&(!schemeHandler||!schemeHandler.unicodeSupport)){if(components.host&&(options.domainHost||schemeHandler&&schemeHandler.domainHost))try{components.host=punycode.toASCII(components.host.replace(protocol.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){components.error=components.error||"Host's domain name can not be converted to ASCII via punycode: "+e}_normalizeComponentEncoding(components,URI_PROTOCOL)}else _normalizeComponentEncoding(components,protocol);schemeHandler&&schemeHandler.parse&&schemeHandler.parse(components,options)}else components.error=components.error||"URI can not be parsed.";return components}function _recomposeAuthority(components,options){var protocol=options.iri!==!1?IRI_PROTOCOL:URI_PROTOCOL,uriTokens=[];return components.userinfo!==void 0&&(uriTokens.push(components.userinfo),uriTokens.push("@")),components.host!==void 0&&uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host),protocol),protocol).replace(protocol.IPV6ADDRESS,function(_,$1,$2){return"["+$1+($2?"%25"+$2:"")+"]"})),(typeof components.port=="number"||typeof components.port=="string")&&(uriTokens.push(":"),uriTokens.push(String(components.port))),uriTokens.length?uriTokens.join(""):void 0}var RDS1=/^\.\.?\//,RDS2=/^\/\.(\/|$)/,RDS3=/^\/\.\.(\/|$)/,RDS5=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(input){for(var output=[];input.length;)if(input.match(RDS1))input=input.replace(RDS1,"");else if(input.match(RDS2))input=input.replace(RDS2,"/");else if(input.match(RDS3))input=input.replace(RDS3,"/"),output.pop();else if(input==="."||input==="..")input="";else{var im=input.match(RDS5);if(im){var s=im[0];input=input.slice(s.length),output.push(s)}else throw new Error("Unexpected dot segment condition")}return output.join("")}function serialize(components){var options=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},protocol=options.iri?IRI_PROTOCOL:URI_PROTOCOL,uriTokens=[],schemeHandler=SCHEMES[(options.scheme||components.scheme||"").toLowerCase()];if(schemeHandler&&schemeHandler.serialize&&schemeHandler.serialize(components,options),components.host&&!protocol.IPV6ADDRESS.test(components.host)){if(options.domainHost||schemeHandler&&schemeHandler.domainHost)try{components.host=options.iri?punycode.toUnicode(components.host):punycode.toASCII(components.host.replace(protocol.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){components.error=components.error||"Host's domain name can not be converted to "+(options.iri?"Unicode":"ASCII")+" via punycode: "+e}}_normalizeComponentEncoding(components,protocol),options.reference!=="suffix"&&components.scheme&&(uriTokens.push(components.scheme),uriTokens.push(":"));var authority=_recomposeAuthority(components,options);if(authority!==void 0&&(options.reference!=="suffix"&&uriTokens.push("//"),uriTokens.push(authority),components.path&&components.path.charAt(0)!=="/"&&uriTokens.push("/")),components.path!==void 0){var s=components.path;!options.absolutePath&&(!schemeHandler||!schemeHandler.absolutePath)&&(s=removeDotSegments(s)),authority===void 0&&(s=s.replace(/^\/\//,"/%2F")),uriTokens.push(s)}return components.query!==void 0&&(uriTokens.push("?"),uriTokens.push(components.query)),components.fragment!==void 0&&(uriTokens.push("#"),uriTokens.push(components.fragment)),uriTokens.join("")}function resolveComponents(base2,relative3){var options=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},skipNormalization=arguments[3],target={};return skipNormalization||(base2=parse2(serialize(base2,options),options),relative3=parse2(serialize(relative3,options),options)),options=options||{},!options.tolerant&&relative3.scheme?(target.scheme=relative3.scheme,target.userinfo=relative3.userinfo,target.host=relative3.host,target.port=relative3.port,target.path=removeDotSegments(relative3.path||""),target.query=relative3.query):(relative3.userinfo!==void 0||relative3.host!==void 0||relative3.port!==void 0?(target.userinfo=relative3.userinfo,target.host=relative3.host,target.port=relative3.port,target.path=removeDotSegments(relative3.path||""),target.query=relative3.query):(relative3.path?(relative3.path.charAt(0)==="/"?target.path=removeDotSegments(relative3.path):((base2.userinfo!==void 0||base2.host!==void 0||base2.port!==void 0)&&!base2.path?target.path="/"+relative3.path:base2.path?target.path=base2.path.slice(0,base2.path.lastIndexOf("/")+1)+relative3.path:target.path=relative3.path,target.path=removeDotSegments(target.path)),target.query=relative3.query):(target.path=base2.path,relative3.query!==void 0?target.query=relative3.query:target.query=base2.query),target.userinfo=base2.userinfo,target.host=base2.host,target.port=base2.port),target.scheme=base2.scheme),target.fragment=relative3.fragment,target}function resolve2(baseURI,relativeURI,options){var schemelessOptions=assign({scheme:"null"},options);return serialize(resolveComponents(parse2(baseURI,schemelessOptions),parse2(relativeURI,schemelessOptions),schemelessOptions,!0),schemelessOptions)}function normalize(uri,options){return typeof uri=="string"?uri=serialize(parse2(uri,options),options):typeOf(uri)==="object"&&(uri=parse2(serialize(uri,options),options)),uri}function equal(uriA,uriB,options){return typeof uriA=="string"?uriA=serialize(parse2(uriA,options),options):typeOf(uriA)==="object"&&(uriA=serialize(uriA,options)),typeof uriB=="string"?uriB=serialize(parse2(uriB,options),options):typeOf(uriB)==="object"&&(uriB=serialize(uriB,options)),uriA===uriB}function escapeComponent(str,options){return str&&str.toString().replace(!options||!options.iri?URI_PROTOCOL.ESCAPE:IRI_PROTOCOL.ESCAPE,pctEncChar)}function unescapeComponent(str,options){return str&&str.toString().replace(!options||!options.iri?URI_PROTOCOL.PCT_ENCODED:IRI_PROTOCOL.PCT_ENCODED,pctDecChars)}var handler={scheme:"http",domainHost:!0,parse:function(components,options){return components.host||(components.error=components.error||"HTTP URIs must have a host."),components},serialize:function(components,options){var secure=String(components.scheme).toLowerCase()==="https";return(components.port===(secure?443:80)||components.port==="")&&(components.port=void 0),components.path||(components.path="/"),components}},handler$1={scheme:"https",domainHost:handler.domainHost,parse:handler.parse,serialize:handler.serialize};function isSecure(wsComponents){return typeof wsComponents.secure=="boolean"?wsComponents.secure:String(wsComponents.scheme).toLowerCase()==="wss"}var handler$2={scheme:"ws",domainHost:!0,parse:function(components,options){var wsComponents=components;return wsComponents.secure=isSecure(wsComponents),wsComponents.resourceName=(wsComponents.path||"/")+(wsComponents.query?"?"+wsComponents.query:""),wsComponents.path=void 0,wsComponents.query=void 0,wsComponents},serialize:function(wsComponents,options){if((wsComponents.port===(isSecure(wsComponents)?443:80)||wsComponents.port==="")&&(wsComponents.port=void 0),typeof wsComponents.secure=="boolean"&&(wsComponents.scheme=wsComponents.secure?"wss":"ws",wsComponents.secure=void 0),wsComponents.resourceName){var _wsComponents$resourc=wsComponents.resourceName.split("?"),_wsComponents$resourc2=slicedToArray(_wsComponents$resourc,2),path=_wsComponents$resourc2[0],query=_wsComponents$resourc2[1];wsComponents.path=path&&path!=="/"?path:void 0,wsComponents.query=query,wsComponents.resourceName=void 0}return wsComponents.fragment=void 0,wsComponents}},handler$3={scheme:"wss",domainHost:handler$2.domainHost,parse:handler$2.parse,serialize:handler$2.serialize},O={},isIRI=!0,UNRESERVED$$="[A-Za-z0-9\\-\\.\\_\\~"+(isIRI?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",HEXDIG$$="[0-9A-Fa-f]",PCT_ENCODED$=subexp(subexp("%[EFef]"+HEXDIG$$+"%"+HEXDIG$$+HEXDIG$$+"%"+HEXDIG$$+HEXDIG$$)+"|"+subexp("%[89A-Fa-f]"+HEXDIG$$+"%"+HEXDIG$$+HEXDIG$$)+"|"+subexp("%"+HEXDIG$$+HEXDIG$$)),ATEXT$$="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",QTEXT$$="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",VCHAR$$=merge(QTEXT$$,'[\\"\\\\]'),SOME_DELIMS$$="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",UNRESERVED=new RegExp(UNRESERVED$$,"g"),PCT_ENCODED=new RegExp(PCT_ENCODED$,"g"),NOT_LOCAL_PART=new RegExp(merge("[^]",ATEXT$$,"[\\.]",'[\\"]',VCHAR$$),"g"),NOT_HFNAME=new RegExp(merge("[^]",UNRESERVED$$,SOME_DELIMS$$),"g"),NOT_HFVALUE=NOT_HFNAME;function decodeUnreserved(str){var decStr=pctDecChars(str);return decStr.match(UNRESERVED)?decStr:str}var handler$4={scheme:"mailto",parse:function(components,options){var mailtoComponents=components,to=mailtoComponents.to=mailtoComponents.path?mailtoComponents.path.split(","):[];if(mailtoComponents.path=void 0,mailtoComponents.query){for(var unknownHeaders=!1,headers={},hfields=mailtoComponents.query.split("&"),x=0,xl=hfields.length;x<xl;++x){var hfield=hfields[x].split("=");switch(hfield[0]){case"to":for(var toAddrs=hfield[1].split(","),_x=0,_xl=toAddrs.length;_x<_xl;++_x)to.push(toAddrs[_x]);break;case"subject":mailtoComponents.subject=unescapeComponent(hfield[1],options);break;case"body":mailtoComponents.body=unescapeComponent(hfield[1],options);break;default:unknownHeaders=!0,headers[unescapeComponent(hfield[0],options)]=unescapeComponent(hfield[1],options);break}}unknownHeaders&&(mailtoComponents.headers=headers)}mailtoComponents.query=void 0;for(var _x2=0,_xl2=to.length;_x2<_xl2;++_x2){var addr=to[_x2].split("@");if(addr[0]=unescapeComponent(addr[0]),options.unicodeSupport)addr[1]=unescapeComponent(addr[1],options).toLowerCase();else try{addr[1]=punycode.toASCII(unescapeComponent(addr[1],options).toLowerCase())}catch(e){mailtoComponents.error=mailtoComponents.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}to[_x2]=addr.join("@")}return mailtoComponents},serialize:function(mailtoComponents,options){var components=mailtoComponents,to=toArray(mailtoComponents.to);if(to){for(var x=0,xl=to.length;x<xl;++x){var toAddr=String(to[x]),atIdx=toAddr.lastIndexOf("@"),localPart=toAddr.slice(0,atIdx).replace(PCT_ENCODED,decodeUnreserved).replace(PCT_ENCODED,toUpperCase).replace(NOT_LOCAL_PART,pctEncChar),domain=toAddr.slice(atIdx+1);try{domain=options.iri?punycode.toUnicode(domain):punycode.toASCII(unescapeComponent(domain,options).toLowerCase())}catch(e){components.error=components.error||"Email address's domain name can not be converted to "+(options.iri?"Unicode":"ASCII")+" via punycode: "+e}to[x]=localPart+"@"+domain}components.path=to.join(",")}var headers=mailtoComponents.headers=mailtoComponents.headers||{};mailtoComponents.subject&&(headers.subject=mailtoComponents.subject),mailtoComponents.body&&(headers.body=mailtoComponents.body);var fields=[];for(var name in headers)headers[name]!==O[name]&&fields.push(name.replace(PCT_ENCODED,decodeUnreserved).replace(PCT_ENCODED,toUpperCase).replace(NOT_HFNAME,pctEncChar)+"="+headers[name].replace(PCT_ENCODED,decodeUnreserved).replace(PCT_ENCODED,toUpperCase).replace(NOT_HFVALUE,pctEncChar));return fields.length&&(components.query=fields.join("&")),components}},URN_PARSE=/^([^\:]+)\:(.*)/,handler$5={scheme:"urn",parse:function(components,options){var matches=components.path&&components.path.match(URN_PARSE),urnComponents=components;if(matches){var scheme=options.scheme||urnComponents.scheme||"urn",nid=matches[1].toLowerCase(),nss=matches[2],urnScheme=scheme+":"+(options.nid||nid),schemeHandler=SCHEMES[urnScheme];urnComponents.nid=nid,urnComponents.nss=nss,urnComponents.path=void 0,schemeHandler&&(urnComponents=schemeHandler.parse(urnComponents,options))}else urnComponents.error=urnComponents.error||"URN can not be parsed.";return urnComponents},serialize:function(urnComponents,options){var scheme=options.scheme||urnComponents.scheme||"urn",nid=urnComponents.nid,urnScheme=scheme+":"+(options.nid||nid),schemeHandler=SCHEMES[urnScheme];schemeHandler&&(urnComponents=schemeHandler.serialize(urnComponents,options));var uriComponents=urnComponents,nss=urnComponents.nss;return uriComponents.path=(nid||options.nid)+":"+nss,uriComponents}},UUID=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,handler$6={scheme:"urn:uuid",parse:function(urnComponents,options){var uuidComponents=urnComponents;return uuidComponents.uuid=uuidComponents.nss,uuidComponents.nss=void 0,!options.tolerant&&(!uuidComponents.uuid||!uuidComponents.uuid.match(UUID))&&(uuidComponents.error=uuidComponents.error||"UUID is not valid."),uuidComponents},serialize:function(uuidComponents,options){var urnComponents=uuidComponents;return urnComponents.nss=(uuidComponents.uuid||"").toLowerCase(),urnComponents}};SCHEMES[handler.scheme]=handler,SCHEMES[handler$1.scheme]=handler$1,SCHEMES[handler$2.scheme]=handler$2,SCHEMES[handler$3.scheme]=handler$3,SCHEMES[handler$4.scheme]=handler$4,SCHEMES[handler$5.scheme]=handler$5,SCHEMES[handler$6.scheme]=handler$6,exports2.SCHEMES=SCHEMES,exports2.pctEncChar=pctEncChar,exports2.pctDecChars=pctDecChars,exports2.parse=parse2,exports2.removeDotSegments=removeDotSegments,exports2.serialize=serialize,exports2.resolveComponents=resolveComponents,exports2.resolve=resolve2,exports2.normalize=normalize,exports2.equal=equal,exports2.escapeComponent=escapeComponent,exports2.unescapeComponent=unescapeComponent,Object.defineProperty(exports2,"__esModule",{value:!0})})}});var require_ucs2length=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/ucs2length.js"(exports,module){"use strict";module.exports=function(str){for(var length=0,len=str.length,pos=0,value;pos<len;)length++,value=str.charCodeAt(pos++),value>=55296&&value<=56319&&pos<len&&(value=str.charCodeAt(pos),(value&64512)==56320&&pos++);return length}}});var require_util=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/util.js"(exports,module){"use strict";module.exports={copy,checkDataType,checkDataTypes,coerceToTypes,toHash,getProperty,escapeQuotes,equal:require_fast_deep_equal(),ucs2length:require_ucs2length(),varOccurences,varReplace,schemaHasRules,schemaHasRulesExcept,schemaUnknownRules,toQuotedString,getPathExpr,getPath,getData,unescapeFragment,unescapeJsonPointer,escapeFragment,escapeJsonPointer};function copy(o,to){to=to||{};for(var key in o)to[key]=o[key];return to}function checkDataType(dataType,data,strictNumbers,negate){var EQUAL=negate?" !== ":" === ",AND=negate?" || ":" && ",OK=negate?"!":"",NOT=negate?"":"!";switch(dataType){case"null":return data+EQUAL+"null";case"array":return OK+"Array.isArray("+data+")";case"object":return"("+OK+data+AND+"typeof "+data+EQUAL+'"object"'+AND+NOT+"Array.isArray("+data+"))";case"integer":return"(typeof "+data+EQUAL+'"number"'+AND+NOT+"("+data+" % 1)"+AND+data+EQUAL+data+(strictNumbers?AND+OK+"isFinite("+data+")":"")+")";case"number":return"(typeof "+data+EQUAL+'"'+dataType+'"'+(strictNumbers?AND+OK+"isFinite("+data+")":"")+")";default:return"typeof "+data+EQUAL+'"'+dataType+'"'}}function checkDataTypes(dataTypes,data,strictNumbers){switch(dataTypes.length){case 1:return checkDataType(dataTypes[0],data,strictNumbers,!0);default:var code="",types=toHash(dataTypes);types.array&&types.object&&(code=types.null?"(":"(!"+data+" || ",code+="typeof "+data+' !== "object")',delete types.null,delete types.array,delete types.object),types.number&&delete types.integer;for(var t in types)code+=(code?" && ":"")+checkDataType(t,data,strictNumbers,!0);return code}}var COERCE_TO_TYPES=toHash(["string","number","integer","boolean","null"]);function coerceToTypes(optionCoerceTypes,dataTypes){if(Array.isArray(dataTypes)){for(var types=[],i=0;i<dataTypes.length;i++){var t=dataTypes[i];(COERCE_TO_TYPES[t]||optionCoerceTypes==="array"&&t==="array")&&(types[types.length]=t)}if(types.length)return types}else{if(COERCE_TO_TYPES[dataTypes])return[dataTypes];if(optionCoerceTypes==="array"&&dataTypes==="array")return["array"]}}function toHash(arr){for(var hash={},i=0;i<arr.length;i++)hash[arr[i]]=!0;return hash}var IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i,SINGLE_QUOTE=/'|\\/g;function getProperty(key){return typeof key=="number"?"["+key+"]":IDENTIFIER.test(key)?"."+key:"['"+escapeQuotes(key)+"']"}function escapeQuotes(str){return str.replace(SINGLE_QUOTE,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function varOccurences(str,dataVar){dataVar+="[^0-9]";var matches=str.match(new RegExp(dataVar,"g"));return matches?matches.length:0}function varReplace(str,dataVar,expr){return dataVar+="([^0-9])",expr=expr.replace(/\$/g,"$$$$"),str.replace(new RegExp(dataVar,"g"),expr+"$1")}function schemaHasRules(schema,rules){if(typeof schema=="boolean")return!schema;for(var key in schema)if(rules[key])return!0}function schemaHasRulesExcept(schema,rules,exceptKeyword){if(typeof schema=="boolean")return!schema&&exceptKeyword!="not";for(var key in schema)if(key!=exceptKeyword&&rules[key])return!0}function schemaUnknownRules(schema,rules){if(typeof schema!="boolean"){for(var key in schema)if(!rules[key])return key}}function toQuotedString(str){return"'"+escapeQuotes(str)+"'"}function getPathExpr(currentPath,expr,jsonPointers,isNumber){var path=jsonPointers?"'/' + "+expr+(isNumber?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):isNumber?"'[' + "+expr+" + ']'":"'[\\'' + "+expr+" + '\\']'";return joinPaths(currentPath,path)}function getPath(currentPath,prop,jsonPointers){var path=toQuotedString(jsonPointers?"/"+escapeJsonPointer(prop):getProperty(prop));return joinPaths(currentPath,path)}var JSON_POINTER=/^\/(?:[^~]|~0|~1)*$/,RELATIVE_JSON_POINTER=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData($data,lvl,paths){var up,jsonPointer,data,matches;if($data==="")return"rootData";if($data[0]=="/"){if(!JSON_POINTER.test($data))throw new Error("Invalid JSON-pointer: "+$data);jsonPointer=$data,data="rootData"}else{if(matches=$data.match(RELATIVE_JSON_POINTER),!matches)throw new Error("Invalid JSON-pointer: "+$data);if(up=+matches[1],jsonPointer=matches[2],jsonPointer=="#"){if(up>=lvl)throw new Error("Cannot access property/index "+up+" levels up, current level is "+lvl);return paths[lvl-up]}if(up>lvl)throw new Error("Cannot access data "+up+" levels up, current level is "+lvl);if(data="data"+(lvl-up||""),!jsonPointer)return data}for(var expr=data,segments=jsonPointer.split("/"),i=0;i<segments.length;i++){var segment=segments[i];segment&&(data+=getProperty(unescapeJsonPointer(segment)),expr+=" && "+data)}return expr}function joinPaths(a,b){return a=='""'?b:(a+" + "+b).replace(/([^\\])' \+ '/g,"$1")}function unescapeFragment(str){return unescapeJsonPointer(decodeURIComponent(str))}function escapeFragment(str){return encodeURIComponent(escapeJsonPointer(str))}function escapeJsonPointer(str){return str.replace(/~/g,"~0").replace(/\//g,"~1")}function unescapeJsonPointer(str){return str.replace(/~1/g,"/").replace(/~0/g,"~")}}});var require_schema_obj=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/schema_obj.js"(exports,module){"use strict";var util=require_util();module.exports=SchemaObject;function SchemaObject(obj){util.copy(obj,this)}}});var require_json_schema_traverse=__commonJS({"../../node_modules/.pnpm/json-schema-traverse@0.4.1/node_modules/json-schema-traverse/index.js"(exports,module){"use strict";var traverse=module.exports=function(schema,opts,cb){typeof opts=="function"&&(cb=opts,opts={}),cb=opts.cb||cb;var pre=typeof cb=="function"?cb:cb.pre||function(){},post=cb.post||function(){};_traverse(opts,pre,post,schema,"",schema)};traverse.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0};traverse.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};traverse.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};traverse.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function _traverse(opts,pre,post,schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex){if(schema&&typeof schema=="object"&&!Array.isArray(schema)){pre(schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex);for(var key in schema){var sch=schema[key];if(Array.isArray(sch)){if(key in traverse.arrayKeywords)for(var i=0;i<sch.length;i++)_traverse(opts,pre,post,sch[i],jsonPtr+"/"+key+"/"+i,rootSchema,jsonPtr,key,schema,i)}else if(key in traverse.propsKeywords){if(sch&&typeof sch=="object")for(var prop in sch)_traverse(opts,pre,post,sch[prop],jsonPtr+"/"+key+"/"+escapeJsonPtr(prop),rootSchema,jsonPtr,key,schema,prop)}else(key in traverse.keywords||opts.allKeys&&!(key in traverse.skipKeywords))&&_traverse(opts,pre,post,sch,jsonPtr+"/"+key,rootSchema,jsonPtr,key,schema)}post(schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex)}}function escapeJsonPtr(str){return str.replace(/~/g,"~0").replace(/\//g,"~1")}}});var require_resolve=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/resolve.js"(exports,module){"use strict";var URI=require_uri_all(),equal=require_fast_deep_equal(),util=require_util(),SchemaObject=require_schema_obj(),traverse=require_json_schema_traverse();module.exports=resolve2;resolve2.normalizeId=normalizeId;resolve2.fullPath=getFullPath;resolve2.url=resolveUrl;resolve2.ids=resolveIds;resolve2.inlineRef=inlineRef;resolve2.schema=resolveSchema;function resolve2(compile,root,ref){var refVal=this._refs[ref];if(typeof refVal=="string")if(this._refs[refVal])refVal=this._refs[refVal];else return resolve2.call(this,compile,root,refVal);if(refVal=refVal||this._schemas[ref],refVal instanceof SchemaObject)return inlineRef(refVal.schema,this._opts.inlineRefs)?refVal.schema:refVal.validate||this._compile(refVal);var res=resolveSchema.call(this,root,ref),schema,v,baseId;return res&&(schema=res.schema,root=res.root,baseId=res.baseId),schema instanceof SchemaObject?v=schema.validate||compile.call(this,schema.schema,root,void 0,baseId):schema!==void 0&&(v=inlineRef(schema,this._opts.inlineRefs)?schema:compile.call(this,schema,root,void 0,baseId)),v}function resolveSchema(root,ref){var p=URI.parse(ref),refPath=_getFullPath(p),baseId=getFullPath(this._getId(root.schema));if(Object.keys(root.schema).length===0||refPath!==baseId){var id=normalizeId(refPath),refVal=this._refs[id];if(typeof refVal=="string")return resolveRecursive.call(this,root,refVal,p);if(refVal instanceof SchemaObject)refVal.validate||this._compile(refVal),root=refVal;else if(refVal=this._schemas[id],refVal instanceof SchemaObject){if(refVal.validate||this._compile(refVal),id==normalizeId(ref))return{schema:refVal,root,baseId};root=refVal}else return;if(!root.schema)return;baseId=getFullPath(this._getId(root.schema))}return getJsonPointer.call(this,p,baseId,root.schema,root)}function resolveRecursive(root,ref,parsedRef){var res=resolveSchema.call(this,root,ref);if(res){var schema=res.schema,baseId=res.baseId;root=res.root;var id=this._getId(schema);return id&&(baseId=resolveUrl(baseId,id)),getJsonPointer.call(this,parsedRef,baseId,schema,root)}}var PREVENT_SCOPE_CHANGE=util.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(parsedRef,baseId,schema,root){if(parsedRef.fragment=parsedRef.fragment||"",parsedRef.fragment.slice(0,1)=="/"){for(var parts=parsedRef.fragment.split("/"),i=1;i<parts.length;i++){var part=parts[i];if(part){if(part=util.unescapeFragment(part),schema=schema[part],schema===void 0)break;var id;if(!PREVENT_SCOPE_CHANGE[part]&&(id=this._getId(schema),id&&(baseId=resolveUrl(baseId,id)),schema.$ref)){var $ref=resolveUrl(baseId,schema.$ref),res=resolveSchema.call(this,root,$ref);res&&(schema=res.schema,root=res.root,baseId=res.baseId)}}}if(schema!==void 0&&schema!==root.schema)return{schema,root,baseId}}}var SIMPLE_INLINED=util.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function inlineRef(schema,limit){if(limit===!1)return!1;if(limit===void 0||limit===!0)return checkNoRef(schema);if(limit)return countKeys(schema)<=limit}function checkNoRef(schema){var item;if(Array.isArray(schema)){for(var i=0;i<schema.length;i++)if(item=schema[i],typeof item=="object"&&!checkNoRef(item))return!1}else for(var key in schema)if(key=="$ref"||(item=schema[key],typeof item=="object"&&!checkNoRef(item)))return!1;return!0}function countKeys(schema){var count=0,item;if(Array.isArray(schema)){for(var i=0;i<schema.length;i++)if(item=schema[i],typeof item=="object"&&(count+=countKeys(item)),count==1/0)return 1/0}else for(var key in schema){if(key=="$ref")return 1/0;if(SIMPLE_INLINED[key])count++;else if(item=schema[key],typeof item=="object"&&(count+=countKeys(item)+1),count==1/0)return 1/0}return count}function getFullPath(id,normalize){normalize!==!1&&(id=normalizeId(id));var p=URI.parse(id);return _getFullPath(p)}function _getFullPath(p){return URI.serialize(p).split("#")[0]+"#"}var TRAILING_SLASH_HASH=/#\/?$/;function normalizeId(id){return id?id.replace(TRAILING_SLASH_HASH,""):""}function resolveUrl(baseId,id){return id=normalizeId(id),URI.resolve(baseId,id)}function resolveIds(schema){var schemaId=normalizeId(this._getId(schema)),baseIds={"":schemaId},fullPaths={"":getFullPath(schemaId,!1)},localRefs={},self=this;return traverse(schema,{allKeys:!0},function(sch,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex){if(jsonPtr!==""){var id=self._getId(sch),baseId=baseIds[parentJsonPtr],fullPath=fullPaths[parentJsonPtr]+"/"+parentKeyword;if(keyIndex!==void 0&&(fullPath+="/"+(typeof keyIndex=="number"?keyIndex:util.escapeFragment(keyIndex))),typeof id=="string"){id=baseId=normalizeId(baseId?URI.resolve(baseId,id):id);var refVal=self._refs[id];if(typeof refVal=="string"&&(refVal=self._refs[refVal]),refVal&&refVal.schema){if(!equal(sch,refVal.schema))throw new Error('id "'+id+'" resolves to more than one schema')}else if(id!=normalizeId(fullPath))if(id[0]=="#"){if(localRefs[id]&&!equal(sch,localRefs[id]))throw new Error('id "'+id+'" resolves to more than one schema');localRefs[id]=sch}else self._refs[id]=fullPath}baseIds[jsonPtr]=baseId,fullPaths[jsonPtr]=fullPath}}),localRefs}}});var require_error_classes=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/error_classes.js"(exports,module){"use strict";var resolve2=require_resolve();module.exports={Validation:errorSubclass(ValidationError),MissingRef:errorSubclass(MissingRefError)};function ValidationError(errors){this.message="validation failed",this.errors=errors,this.ajv=this.validation=!0}MissingRefError.message=function(baseId,ref){return"can't resolve reference "+ref+" from id "+baseId};function MissingRefError(baseId,ref,message){this.message=message||MissingRefError.message(baseId,ref),this.missingRef=resolve2.url(baseId,ref),this.missingSchema=resolve2.normalizeId(resolve2.fullPath(this.missingRef))}function errorSubclass(Subclass){return Subclass.prototype=Object.create(Error.prototype),Subclass.prototype.constructor=Subclass,Subclass}}});var require_fast_json_stable_stringify=__commonJS({"../../node_modules/.pnpm/fast-json-stable-stringify@2.1.0/node_modules/fast-json-stable-stringify/index.js"(exports,module){"use strict";module.exports=function(data,opts){opts||(opts={}),typeof opts=="function"&&(opts={cmp:opts});var cycles=typeof opts.cycles=="boolean"?opts.cycles:!1,cmp=opts.cmp&&function(f){return function(node){return function(a,b){var aobj={key:a,value:node[a]},bobj={key:b,value:node[b]};return f(aobj,bobj)}}}(opts.cmp),seen=[];return function stringify(node){if(node&&node.toJSON&&typeof node.toJSON=="function"&&(node=node.toJSON()),node!==void 0){if(typeof node=="number")return isFinite(node)?""+node:"null";if(typeof node!="object")return JSON.stringify(node);var i,out;if(Array.isArray(node)){for(out="[",i=0;i<node.length;i++)i&&(out+=","),out+=stringify(node[i])||"null";return out+"]"}if(node===null)return"null";if(seen.indexOf(node)!==-1){if(cycles)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var seenIndex=seen.push(node)-1,keys=Object.keys(node).sort(cmp&&cmp(node));for(out="",i=0;i<keys.length;i++){var key=keys[i],value=stringify(node[key]);value&&(out&&(out+=","),out+=JSON.stringify(key)+":"+value)}return seen.splice(seenIndex,1),"{"+out+"}"}}(data)}}});var require_validate=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/validate.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out="",$async=it.schema.$async===!0,$refKeywords=it.util.schemaHasRulesExcept(it.schema,it.RULES.all,"$ref"),$id=it.self._getId(it.schema);if(it.opts.strictKeywords){var $unknownKwd=it.util.schemaUnknownRules(it.schema,it.RULES.keywords);if($unknownKwd){var $keywordsMsg="unknown keyword: "+$unknownKwd;if(it.opts.strictKeywords==="log")it.logger.warn($keywordsMsg);else throw new Error($keywordsMsg)}}if(it.isTop&&(out+=" var validate = ",$async&&(it.async=!0,out+="async "),out+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",$id&&(it.opts.sourceCode||it.opts.processCode)&&(out+=" "+("/*# sourceURL="+$id+" */")+" ")),typeof it.schema=="boolean"||!($refKeywords||it.schema.$ref)){var $keyword="false schema",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$errorKeyword,$data="data"+($dataLvl||""),$valid="valid"+$lvl;if(it.schema===!1){it.isTop?$breakOnError=!0:out+=" var "+$valid+" = false; ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"false schema")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ",it.opts.messages!==!1&&(out+=" , message: 'boolean schema is false' "),it.opts.verbose&&(out+=" , schema: false , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else it.isTop?$async?out+=" return data; ":out+=" validate.errors = null; return true; ":out+=" var "+$valid+" = true; ";return it.isTop&&(out+=" }; return validate; "),out}if(it.isTop){var $top=it.isTop,$lvl=it.level=0,$dataLvl=it.dataLevel=0,$data="data";if(it.rootId=it.resolve.fullPath(it.self._getId(it.root.schema)),it.baseId=it.baseId||it.rootId,delete it.isTop,it.dataPathArr=[void 0],it.schema.default!==void 0&&it.opts.useDefaults&&it.opts.strictDefaults){var $defaultMsg="default is ignored in the schema root";if(it.opts.strictDefaults==="log")it.logger.warn($defaultMsg);else throw new Error($defaultMsg)}out+=" var vErrors = null; ",out+=" var errors = 0; ",out+=" if (rootData === undefined) rootData = data; "}else{var $lvl=it.level,$dataLvl=it.dataLevel,$data="data"+($dataLvl||"");if($id&&(it.baseId=it.resolve.url(it.baseId,$id)),$async&&!it.async)throw new Error("async schema in sync schema");out+=" var errs_"+$lvl+" = errors;"}var $valid="valid"+$lvl,$breakOnError=!it.opts.allErrors,$closingBraces1="",$closingBraces2="",$errorKeyword,$typeSchema=it.schema.type,$typeIsArray=Array.isArray($typeSchema);if($typeSchema&&it.opts.nullable&&it.schema.nullable===!0&&($typeIsArray?$typeSchema.indexOf("null")==-1&&($typeSchema=$typeSchema.concat("null")):$typeSchema!="null"&&($typeSchema=[$typeSchema,"null"],$typeIsArray=!0)),$typeIsArray&&$typeSchema.length==1&&($typeSchema=$typeSchema[0],$typeIsArray=!1),it.schema.$ref&&$refKeywords){if(it.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+it.errSchemaPath+'" (see option extendRefs)');it.opts.extendRefs!==!0&&($refKeywords=!1,it.logger.warn('$ref: keywords ignored in schema at path "'+it.errSchemaPath+'"'))}if(it.schema.$comment&&it.opts.$comment&&(out+=" "+it.RULES.all.$comment.code(it,"$comment")),$typeSchema){if(it.opts.coerceTypes)var $coerceToTypes=it.util.coerceToTypes(it.opts.coerceTypes,$typeSchema);var $rulesGroup=it.RULES.types[$typeSchema];if($coerceToTypes||$typeIsArray||$rulesGroup===!0||$rulesGroup&&!$shouldUseGroup($rulesGroup)){var $schemaPath=it.schemaPath+".type",$errSchemaPath=it.errSchemaPath+"/type",$schemaPath=it.schemaPath+".type",$errSchemaPath=it.errSchemaPath+"/type",$method=$typeIsArray?"checkDataTypes":"checkDataType";if(out+=" if ("+it.util[$method]($typeSchema,$data,it.opts.strictNumbers,!0)+") { ",$coerceToTypes){var $dataType="dataType"+$lvl,$coerced="coerced"+$lvl;out+=" var "+$dataType+" = typeof "+$data+"; ",it.opts.coerceTypes=="array"&&(out+=" if ("+$dataType+" == 'object' && Array.isArray("+$data+")) "+$dataType+" = 'array'; "),out+=" var "+$coerced+" = undefined; ";var $bracesCoercion="",arr1=$coerceToTypes;if(arr1)for(var $type,$i=-1,l1=arr1.length-1;$i<l1;)$type=arr1[$i+=1],$i&&(out+=" if ("+$coerced+" === undefined) { ",$bracesCoercion+="}"),it.opts.coerceTypes=="array"&&$type!="array"&&(out+=" if ("+$dataType+" == 'array' && "+$data+".length == 1) { "+$coerced+" = "+$data+" = "+$data+"[0]; "+$dataType+" = typeof "+$data+"; } "),$type=="string"?out+=" if ("+$dataType+" == 'number' || "+$dataType+" == 'boolean') "+$coerced+" = '' + "+$data+"; else if ("+$data+" === null) "+$coerced+" = ''; ":$type=="number"||$type=="integer"?(out+=" if ("+$dataType+" == 'boolean' || "+$data+" === null || ("+$dataType+" == 'string' && "+$data+" && "+$data+" == +"+$data+" ",$type=="integer"&&(out+=" && !("+$data+" % 1)"),out+=")) "+$coerced+" = +"+$data+"; "):$type=="boolean"?out+=" if ("+$data+" === 'false' || "+$data+" === 0 || "+$data+" === null) "+$coerced+" = false; else if ("+$data+" === 'true' || "+$data+" === 1) "+$coerced+" = true; ":$type=="null"?out+=" if ("+$data+" === '' || "+$data+" === 0 || "+$data+" === false) "+$coerced+" = null; ":it.opts.coerceTypes=="array"&&$type=="array"&&(out+=" if ("+$dataType+" == 'string' || "+$dataType+" == 'number' || "+$dataType+" == 'boolean' || "+$data+" == null) "+$coerced+" = ["+$data+"]; ");out+=" "+$bracesCoercion+" if ("+$coerced+" === undefined) { ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"type")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { type: '",$typeIsArray?out+=""+$typeSchema.join(","):out+=""+$typeSchema,out+="' } ",it.opts.messages!==!1&&(out+=" , message: 'should be ",$typeIsArray?out+=""+$typeSchema.join(","):out+=""+$typeSchema,out+="' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } else { ";var $parentData=$dataLvl?"data"+($dataLvl-1||""):"parentData",$parentDataProperty=$dataLvl?it.dataPathArr[$dataLvl]:"parentDataProperty";out+=" "+$data+" = "+$coerced+"; ",$dataLvl||(out+="if ("+$parentData+" !== undefined)"),out+=" "+$parentData+"["+$parentDataProperty+"] = "+$coerced+"; } "}else{var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"type")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { type: '",$typeIsArray?out+=""+$typeSchema.join(","):out+=""+$typeSchema,out+="' } ",it.opts.messages!==!1&&(out+=" , message: 'should be ",$typeIsArray?out+=""+$typeSchema.join(","):out+=""+$typeSchema,out+="' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } "}}if(it.schema.$ref&&!$refKeywords)out+=" "+it.RULES.all.$ref.code(it,"$ref")+" ",$breakOnError&&(out+=" } if (errors === ",$top?out+="0":out+="errs_"+$lvl,out+=") { ",$closingBraces2+="}");else{var arr2=it.RULES;if(arr2){for(var $rulesGroup,i2=-1,l2=arr2.length-1;i2<l2;)if($rulesGroup=arr2[i2+=1],$shouldUseGroup($rulesGroup)){if($rulesGroup.type&&(out+=" if ("+it.util.checkDataType($rulesGroup.type,$data,it.opts.strictNumbers)+") { "),it.opts.useDefaults){if($rulesGroup.type=="object"&&it.schema.properties){var $schema=it.schema.properties,$schemaKeys=Object.keys($schema),arr3=$schemaKeys;if(arr3)for(var $propertyKey,i3=-1,l3=arr3.length-1;i3<l3;){$propertyKey=arr3[i3+=1];var $sch=$schema[$propertyKey];if($sch.default!==void 0){var $passData=$data+it.util.getProperty($propertyKey);if(it.compositeRule){if(it.opts.strictDefaults){var $defaultMsg="default is ignored for: "+$passData;if(it.opts.strictDefaults==="log")it.logger.warn($defaultMsg);else throw new Error($defaultMsg)}}else out+=" if ("+$passData+" === undefined ",it.opts.useDefaults=="empty"&&(out+=" || "+$passData+" === null || "+$passData+" === '' "),out+=" ) "+$passData+" = ",it.opts.useDefaults=="shared"?out+=" "+it.useDefault($sch.default)+" ":out+=" "+JSON.stringify($sch.default)+" ",out+="; "}}}else if($rulesGroup.type=="array"&&Array.isArray(it.schema.items)){var arr4=it.schema.items;if(arr4){for(var $sch,$i=-1,l4=arr4.length-1;$i<l4;)if($sch=arr4[$i+=1],$sch.default!==void 0){var $passData=$data+"["+$i+"]";if(it.compositeRule){if(it.opts.strictDefaults){var $defaultMsg="default is ignored for: "+$passData;if(it.opts.strictDefaults==="log")it.logger.warn($defaultMsg);else throw new Error($defaultMsg)}}else out+=" if ("+$passData+" === undefined ",it.opts.useDefaults=="empty"&&(out+=" || "+$passData+" === null || "+$passData+" === '' "),out+=" ) "+$passData+" = ",it.opts.useDefaults=="shared"?out+=" "+it.useDefault($sch.default)+" ":out+=" "+JSON.stringify($sch.default)+" ",out+="; "}}}}var arr5=$rulesGroup.rules;if(arr5){for(var $rule,i5=-1,l5=arr5.length-1;i5<l5;)if($rule=arr5[i5+=1],$shouldUseRule($rule)){var $code=$rule.code(it,$rule.keyword,$rulesGroup.type);$code&&(out+=" "+$code+" ",$breakOnError&&($closingBraces1+="}"))}}if($breakOnError&&(out+=" "+$closingBraces1+" ",$closingBraces1=""),$rulesGroup.type&&(out+=" } ",$typeSchema&&$typeSchema===$rulesGroup.type&&!$coerceToTypes)){out+=" else { ";var $schemaPath=it.schemaPath+".type",$errSchemaPath=it.errSchemaPath+"/type",$$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"type")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { type: '",$typeIsArray?out+=""+$typeSchema.join(","):out+=""+$typeSchema,out+="' } ",it.opts.messages!==!1&&(out+=" , message: 'should be ",$typeIsArray?out+=""+$typeSchema.join(","):out+=""+$typeSchema,out+="' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } "}$breakOnError&&(out+=" if (errors === ",$top?out+="0":out+="errs_"+$lvl,out+=") { ",$closingBraces2+="}")}}}$breakOnError&&(out+=" "+$closingBraces2+" "),$top?($async?(out+=" if (errors === 0) return data; ",out+=" else throw new ValidationError(vErrors); "):(out+=" validate.errors = vErrors; ",out+=" return errors === 0; "),out+=" }; return validate;"):out+=" var "+$valid+" = errors === errs_"+$lvl+";";function $shouldUseGroup($rulesGroup2){for(var rules=$rulesGroup2.rules,i=0;i<rules.length;i++)if($shouldUseRule(rules[i]))return!0}function $shouldUseRule($rule2){return it.schema[$rule2.keyword]!==void 0||$rule2.implements&&$ruleImplementsSomeKeyword($rule2)}function $ruleImplementsSomeKeyword($rule2){for(var impl=$rule2.implements,i=0;i<impl.length;i++)if(it.schema[impl[i]]!==void 0)return!0}return out}}});var require_compile=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/index.js"(exports,module){"use strict";var resolve2=require_resolve(),util=require_util(),errorClasses=require_error_classes(),stableStringify=require_fast_json_stable_stringify(),validateGenerator=require_validate(),ucs2length=util.ucs2length,equal=require_fast_deep_equal(),ValidationError=errorClasses.Validation;module.exports=compile;function compile(schema,root,localRefs,baseId){var self=this,opts=this._opts,refVal=[void 0],refs={},patterns=[],patternsHash={},defaults=[],defaultsHash={},customRules=[];root=root||{schema,refVal,refs};var c=checkCompiling.call(this,schema,root,baseId),compilation=this._compilations[c.index];if(c.compiling)return compilation.callValidate=callValidate;var formats=this._formats,RULES=this.RULES;try{var v=localCompile(schema,root,localRefs,baseId);compilation.validate=v;var cv=compilation.callValidate;return cv&&(cv.schema=v.schema,cv.errors=null,cv.refs=v.refs,cv.refVal=v.refVal,cv.root=v.root,cv.$async=v.$async,opts.sourceCode&&(cv.source=v.source)),v}finally{endCompiling.call(this,schema,root,baseId)}function callValidate(){var validate=compilation.validate,result=validate.apply(this,arguments);return callValidate.errors=validate.errors,result}function localCompile(_schema,_root,localRefs2,baseId2){var isRoot=!_root||_root&&_root.schema==_schema;if(_root.schema!=root.schema)return compile.call(self,_schema,_root,localRefs2,baseId2);var $async=_schema.$async===!0,sourceCode=validateGenerator({isTop:!0,schema:_schema,isRoot,baseId:baseId2,root:_root,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:errorClasses.MissingRef,RULES,validate:validateGenerator,util,resolve:resolve2,resolveRef,usePattern,useDefault,useCustomRule,opts,formats,logger:self.logger,self});sourceCode=vars(refVal,refValCode)+vars(patterns,patternCode)+vars(defaults,defaultCode)+vars(customRules,customRuleCode)+sourceCode,opts.processCode&&(sourceCode=opts.processCode(sourceCode,_schema));var validate;try{var makeValidate=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",sourceCode);validate=makeValidate(self,RULES,formats,root,refVal,defaults,customRules,equal,ucs2length,ValidationError),refVal[0]=validate}catch(e){throw self.logger.error("Error compiling schema, function code:",sourceCode),e}return validate.schema=_schema,validate.errors=null,validate.refs=refs,validate.refVal=refVal,validate.root=isRoot?validate:_root,$async&&(validate.$async=!0),opts.sourceCode===!0&&(validate.source={code:sourceCode,patterns,defaults}),validate}function resolveRef(baseId2,ref,isRoot){ref=resolve2.url(baseId2,ref);var refIndex=refs[ref],_refVal,refCode;if(refIndex!==void 0)return _refVal=refVal[refIndex],refCode="refVal["+refIndex+"]",resolvedRef(_refVal,refCode);if(!isRoot&&root.refs){var rootRefId=root.refs[ref];if(rootRefId!==void 0)return _refVal=root.refVal[rootRefId],refCode=addLocalRef(ref,_refVal),resolvedRef(_refVal,refCode)}refCode=addLocalRef(ref);var v2=resolve2.call(self,localCompile,root,ref);if(v2===void 0){var localSchema=localRefs&&localRefs[ref];localSchema&&(v2=resolve2.inlineRef(localSchema,opts.inlineRefs)?localSchema:compile.call(self,localSchema,root,localRefs,baseId2))}if(v2===void 0)removeLocalRef(ref);else return replaceLocalRef(ref,v2),resolvedRef(v2,refCode)}function addLocalRef(ref,v2){var refId=refVal.length;return refVal[refId]=v2,refs[ref]=refId,"refVal"+refId}function removeLocalRef(ref){delete refs[ref]}function replaceLocalRef(ref,v2){var refId=refs[ref];refVal[refId]=v2}function resolvedRef(refVal2,code){return typeof refVal2=="object"||typeof refVal2=="boolean"?{code,schema:refVal2,inline:!0}:{code,$async:refVal2&&!!refVal2.$async}}function usePattern(regexStr){var index=patternsHash[regexStr];return index===void 0&&(index=patternsHash[regexStr]=patterns.length,patterns[index]=regexStr),"pattern"+index}function useDefault(value){switch(typeof value){case"boolean":case"number":return""+value;case"string":return util.toQuotedString(value);case"object":if(value===null)return"null";var valueStr=stableStringify(value),index=defaultsHash[valueStr];return index===void 0&&(index=defaultsHash[valueStr]=defaults.length,defaults[index]=value),"default"+index}}function useCustomRule(rule,schema2,parentSchema,it){if(self._opts.validateSchema!==!1){var deps=rule.definition.dependencies;if(deps&&!deps.every(function(keyword){return Object.prototype.hasOwnProperty.call(parentSchema,keyword)}))throw new Error("parent schema must have all required keywords: "+deps.join(","));var validateSchema=rule.definition.validateSchema;if(validateSchema){var valid=validateSchema(schema2);if(!valid){var message="keyword schema is invalid: "+self.errorsText(validateSchema.errors);if(self._opts.validateSchema=="log")self.logger.error(message);else throw new Error(message)}}}var compile2=rule.definition.compile,inline=rule.definition.inline,macro=rule.definition.macro,validate;if(compile2)validate=compile2.call(self,schema2,parentSchema,it);else if(macro)validate=macro.call(self,schema2,parentSchema,it),opts.validateSchema!==!1&&self.validateSchema(validate,!0);else if(inline)validate=inline.call(self,it,rule.keyword,schema2,parentSchema);else if(validate=rule.definition.validate,!validate)return;if(validate===void 0)throw new Error('custom keyword "'+rule.keyword+'"failed to compile');var index=customRules.length;return customRules[index]=validate,{code:"customRule"+index,validate}}}function checkCompiling(schema,root,baseId){var index=compIndex.call(this,schema,root,baseId);return index>=0?{index,compiling:!0}:(index=this._compilations.length,this._compilations[index]={schema,root,baseId},{index,compiling:!1})}function endCompiling(schema,root,baseId){var i=compIndex.call(this,schema,root,baseId);i>=0&&this._compilations.splice(i,1)}function compIndex(schema,root,baseId){for(var i=0;i<this._compilations.length;i++){var c=this._compilations[i];if(c.schema==schema&&c.root==root&&c.baseId==baseId)return i}return-1}function patternCode(i,patterns){return"var pattern"+i+" = new RegExp("+util.toQuotedString(patterns[i])+");"}function defaultCode(i){return"var default"+i+" = defaults["+i+"];"}function refValCode(i,refVal){return refVal[i]===void 0?"":"var refVal"+i+" = refVal["+i+"];"}function customRuleCode(i){return"var customRule"+i+" = customRules["+i+"];"}function vars(arr,statement){if(!arr.length)return"";for(var code="",i=0;i<arr.length;i++)code+=statement(i,arr);return code}}});var require_cache=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/cache.js"(exports,module){"use strict";var Cache=module.exports=function(){this._cache={}};Cache.prototype.put=function(key,value){this._cache[key]=value};Cache.prototype.get=function(key){return this._cache[key]};Cache.prototype.del=function(key){delete this._cache[key]};Cache.prototype.clear=function(){this._cache={}}}});var require_formats=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/formats.js"(exports,module){"use strict";var util=require_util(),DATE=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,DAYS=[0,31,28,31,30,31,30,31,31,30,31,30,31],TIME=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,HOSTNAME=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,URI=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,URIREF=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,URITEMPLATE=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,URL=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,UUID=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,JSON_POINTER=/^(?:\/(?:[^~/]|~0|~1)*)*$/,JSON_POINTER_URI_FRAGMENT=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,RELATIVE_JSON_POINTER=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;module.exports=formats;function formats(mode){return mode=mode=="full"?"full":"fast",util.copy(formats[mode])}formats.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":URITEMPLATE,url:URL,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:HOSTNAME,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex,uuid:UUID,"json-pointer":JSON_POINTER,"json-pointer-uri-fragment":JSON_POINTER_URI_FRAGMENT,"relative-json-pointer":RELATIVE_JSON_POINTER};formats.full={date,time,"date-time":date_time,uri,"uri-reference":URIREF,"uri-template":URITEMPLATE,url:URL,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:HOSTNAME,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex,uuid:UUID,"json-pointer":JSON_POINTER,"json-pointer-uri-fragment":JSON_POINTER_URI_FRAGMENT,"relative-json-pointer":RELATIVE_JSON_POINTER};function isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function date(str){var matches=str.match(DATE);if(!matches)return!1;var year=+matches[1],month=+matches[2],day=+matches[3];return month>=1&&month<=12&&day>=1&&day<=(month==2&&isLeapYear(year)?29:DAYS[month])}function time(str,full){var matches=str.match(TIME);if(!matches)return!1;var hour=matches[1],minute=matches[2],second=matches[3],timeZone=matches[5];return(hour<=23&&minute<=59&&second<=59||hour==23&&minute==59&&second==60)&&(!full||timeZone)}var DATE_TIME_SEPARATOR=/t|\s/i;function date_time(str){var dateTime=str.split(DATE_TIME_SEPARATOR);return dateTime.length==2&&date(dateTime[0])&&time(dateTime[1],!0)}var NOT_URI_FRAGMENT=/\/|:/;function uri(str){return NOT_URI_FRAGMENT.test(str)&&URI.test(str)}var Z_ANCHOR=/[^\\]\\Z/;function regex(str){if(Z_ANCHOR.test(str))return!1;try{return new RegExp(str),!0}catch{return!1}}}});var require_ref=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/ref.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$async,$refCode;if($schema=="#"||$schema=="#/")it.isRoot?($async=it.async,$refCode="validate"):($async=it.root.schema.$async===!0,$refCode="root.refVal[0]");else{var $refVal=it.resolveRef(it.baseId,$schema,it.isRoot);if($refVal===void 0){var $message=it.MissingRefError.message(it.baseId,$schema);if(it.opts.missingRefs=="fail"){it.logger.error($message);var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { ref: '"+it.util.escapeQuotes($schema)+"' } ",it.opts.messages!==!1&&(out+=" , message: 'can\\'t resolve reference "+it.util.escapeQuotes($schema)+"' "),it.opts.verbose&&(out+=" , schema: "+it.util.toQuotedString($schema)+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",$breakOnError&&(out+=" if (false) { ")}else if(it.opts.missingRefs=="ignore")it.logger.warn($message),$breakOnError&&(out+=" if (true) { ");else throw new it.MissingRefError(it.baseId,$schema,$message)}else if($refVal.inline){var $it=it.util.copy(it);$it.level++;var $nextValid="valid"+$it.level;$it.schema=$refVal.schema,$it.schemaPath="",$it.errSchemaPath=$schema;var $code=it.validate($it).replace(/validate\.schema/g,$refVal.code);out+=" "+$code+" ",$breakOnError&&(out+=" if ("+$nextValid+") { ")}else $async=$refVal.$async===!0||it.async&&$refVal.$async!==!1,$refCode=$refVal.code}if($refCode){var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.opts.passContext?out+=" "+$refCode+".call(this, ":out+=" "+$refCode+"( ",out+=" "+$data+", (dataPath || '')",it.errorPath!='""'&&(out+=" + "+it.errorPath);var $parentData=$dataLvl?"data"+($dataLvl-1||""):"parentData",$parentDataProperty=$dataLvl?it.dataPathArr[$dataLvl]:"parentDataProperty";out+=" , "+$parentData+" , "+$parentDataProperty+", rootData) ";var __callValidate=out;if(out=$$outStack.pop(),$async){if(!it.async)throw new Error("async schema referenced by sync schema");$breakOnError&&(out+=" var "+$valid+"; "),out+=" try { await "+__callValidate+"; ",$breakOnError&&(out+=" "+$valid+" = true; "),out+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",$breakOnError&&(out+=" "+$valid+" = false; "),out+=" } ",$breakOnError&&(out+=" if ("+$valid+") { ")}else out+=" if (!"+__callValidate+") { if (vErrors === null) vErrors = "+$refCode+".errors; else vErrors = vErrors.concat("+$refCode+".errors); errors = vErrors.length; } ",$breakOnError&&(out+=" else { ")}return out}}});var require_allOf=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/allOf.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$it=it.util.copy(it),$closingBraces="";$it.level++;var $nextValid="valid"+$it.level,$currentBaseId=$it.baseId,$allSchemasEmpty=!0,arr1=$schema;if(arr1)for(var $sch,$i=-1,l1=arr1.length-1;$i<l1;)$sch=arr1[$i+=1],(it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0:it.util.schemaHasRules($sch,it.RULES.all))&&($allSchemasEmpty=!1,$it.schema=$sch,$it.schemaPath=$schemaPath+"["+$i+"]",$it.errSchemaPath=$errSchemaPath+"/"+$i,out+=" "+it.validate($it)+" ",$it.baseId=$currentBaseId,$breakOnError&&(out+=" if ("+$nextValid+") { ",$closingBraces+="}"));return $breakOnError&&($allSchemasEmpty?out+=" if (true) { ":out+=" "+$closingBraces.slice(0,-1)+" "),out}}});var require_anyOf=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/anyOf.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$errs="errs__"+$lvl,$it=it.util.copy(it),$closingBraces="";$it.level++;var $nextValid="valid"+$it.level,$noEmptySchema=$schema.every(function($sch2){return it.opts.strictKeywords?typeof $sch2=="object"&&Object.keys($sch2).length>0:it.util.schemaHasRules($sch2,it.RULES.all)});if($noEmptySchema){var $currentBaseId=$it.baseId;out+=" var "+$errs+" = errors; var "+$valid+" = false; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=!0;var arr1=$schema;if(arr1)for(var $sch,$i=-1,l1=arr1.length-1;$i<l1;)$sch=arr1[$i+=1],$it.schema=$sch,$it.schemaPath=$schemaPath+"["+$i+"]",$it.errSchemaPath=$errSchemaPath+"/"+$i,out+=" "+it.validate($it)+" ",$it.baseId=$currentBaseId,out+=" "+$valid+" = "+$valid+" || "+$nextValid+"; if (!"+$valid+") { ",$closingBraces+="}";it.compositeRule=$it.compositeRule=$wasComposite,out+=" "+$closingBraces+" if (!"+$valid+") { var err = ",it.createErrors!==!1?(out+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ",it.opts.messages!==!1&&(out+=" , message: 'should match some schema in anyOf' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!it.compositeRule&&$breakOnError&&(it.async?out+=" throw new ValidationError(vErrors); ":out+=" validate.errors = vErrors; return false; "),out+=" } else { errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } ",it.opts.allErrors&&(out+=" } ")}else $breakOnError&&(out+=" if (true) { ");return out}}});var require_comment=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/comment.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$schema=it.schema[$keyword],$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$comment=it.util.toQuotedString($schema);return it.opts.$comment===!0?out+=" console.log("+$comment+");":typeof it.opts.$comment=="function"&&(out+=" self._opts.$comment("+$comment+", "+it.util.toQuotedString($errSchemaPath)+", validate.root.schema);"),out}}});var require_const=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/const.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;$isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema,$isData||(out+=" var schema"+$lvl+" = validate.schema"+$schemaPath+";"),out+="var "+$valid+" = equal("+$data+", schema"+$lvl+"); if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'const' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { allowedValue: schema"+$lvl+" } ",it.opts.messages!==!1&&(out+=" , message: 'should be equal to constant' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" }",$breakOnError&&(out+=" else { "),out}}});var require_contains=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/contains.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$errs="errs__"+$lvl,$it=it.util.copy(it),$closingBraces="";$it.level++;var $nextValid="valid"+$it.level,$idx="i"+$lvl,$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$currentBaseId=it.baseId,$nonEmptySchema=it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0:it.util.schemaHasRules($schema,it.RULES.all);if(out+="var "+$errs+" = errors;var "+$valid+";",$nonEmptySchema){var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=!0,$it.schema=$schema,$it.schemaPath=$schemaPath,$it.errSchemaPath=$errSchemaPath,out+=" var "+$nextValid+" = false; for (var "+$idx+" = 0; "+$idx+" < "+$data+".length; "+$idx+"++) { ",$it.errorPath=it.util.getPathExpr(it.errorPath,$idx,it.opts.jsonPointers,!0);var $passData=$data+"["+$idx+"]";$it.dataPathArr[$dataNxt]=$idx;var $code=it.validate($it);$it.baseId=$currentBaseId,it.util.varOccurences($code,$nextData)<2?out+=" "+it.util.varReplace($code,$nextData,$passData)+" ":out+=" var "+$nextData+" = "+$passData+"; "+$code+" ",out+=" if ("+$nextValid+") break; } ",it.compositeRule=$it.compositeRule=$wasComposite,out+=" "+$closingBraces+" if (!"+$nextValid+") {"}else out+=" if ("+$data+".length == 0) {";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ",it.opts.messages!==!1&&(out+=" , message: 'should contain a valid item' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } else { ",$nonEmptySchema&&(out+=" errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } "),it.opts.allErrors&&(out+=" } "),out}}});var require_dependencies=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/dependencies.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$errs="errs__"+$lvl,$it=it.util.copy(it),$closingBraces="";$it.level++;var $nextValid="valid"+$it.level,$schemaDeps={},$propertyDeps={},$ownProperties=it.opts.ownProperties;for($property in $schema)if($property!="__proto__"){var $sch=$schema[$property],$deps=Array.isArray($sch)?$propertyDeps:$schemaDeps;$deps[$property]=$sch}out+="var "+$errs+" = errors;";var $currentErrorPath=it.errorPath;out+="var missing"+$lvl+";";for(var $property in $propertyDeps)if($deps=$propertyDeps[$property],$deps.length){if(out+=" if ( "+$data+it.util.getProperty($property)+" !== undefined ",$ownProperties&&(out+=" && Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($property)+"') "),$breakOnError){out+=" && ( ";var arr1=$deps;if(arr1)for(var $propertyKey,$i=-1,l1=arr1.length-1;$i<l1;){$propertyKey=arr1[$i+=1],$i&&(out+=" || ");var $prop=it.util.getProperty($propertyKey),$useData=$data+$prop;out+=" ( ( "+$useData+" === undefined ",$ownProperties&&(out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "),out+=") && (missing"+$lvl+" = "+it.util.toQuotedString(it.opts.jsonPointers?$propertyKey:$prop)+") ) "}out+=")) { ";var $propertyPath="missing"+$lvl,$missingProperty="' + "+$propertyPath+" + '";it.opts._errorDataPathProperty&&(it.errorPath=it.opts.jsonPointers?it.util.getPathExpr($currentErrorPath,$propertyPath,!0):$currentErrorPath+" + "+$propertyPath);var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { property: '"+it.util.escapeQuotes($property)+"', missingProperty: '"+$missingProperty+"', depsCount: "+$deps.length+", deps: '"+it.util.escapeQuotes($deps.length==1?$deps[0]:$deps.join(", "))+"' } ",it.opts.messages!==!1&&(out+=" , message: 'should have ",$deps.length==1?out+="property "+it.util.escapeQuotes($deps[0]):out+="properties "+it.util.escapeQuotes($deps.join(", ")),out+=" when property "+it.util.escapeQuotes($property)+" is present' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{out+=" ) { ";var arr2=$deps;if(arr2)for(var $propertyKey,i2=-1,l2=arr2.length-1;i2<l2;){$propertyKey=arr2[i2+=1];var $prop=it.util.getProperty($propertyKey),$missingProperty=it.util.escapeQuotes($propertyKey),$useData=$data+$prop;it.opts._errorDataPathProperty&&(it.errorPath=it.util.getPath($currentErrorPath,$propertyKey,it.opts.jsonPointers)),out+=" if ( "+$useData+" === undefined ",$ownProperties&&(out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "),out+=") { var err = ",it.createErrors!==!1?(out+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { property: '"+it.util.escapeQuotes($property)+"', missingProperty: '"+$missingProperty+"', depsCount: "+$deps.length+", deps: '"+it.util.escapeQuotes($deps.length==1?$deps[0]:$deps.join(", "))+"' } ",it.opts.messages!==!1&&(out+=" , message: 'should have ",$deps.length==1?out+="property "+it.util.escapeQuotes($deps[0]):out+="properties "+it.util.escapeQuotes($deps.join(", ")),out+=" when property "+it.util.escapeQuotes($property)+" is present' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}out+=" } ",$breakOnError&&($closingBraces+="}",out+=" else { ")}it.errorPath=$currentErrorPath;var $currentBaseId=$it.baseId;for(var $property in $schemaDeps){var $sch=$schemaDeps[$property];(it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0:it.util.schemaHasRules($sch,it.RULES.all))&&(out+=" "+$nextValid+" = true; if ( "+$data+it.util.getProperty($property)+" !== undefined ",$ownProperties&&(out+=" && Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($property)+"') "),out+=") { ",$it.schema=$sch,$it.schemaPath=$schemaPath+it.util.getProperty($property),$it.errSchemaPath=$errSchemaPath+"/"+it.util.escapeFragment($property),out+=" "+it.validate($it)+" ",$it.baseId=$currentBaseId,out+=" } ",$breakOnError&&(out+=" if ("+$nextValid+") { ",$closingBraces+="}"))}return $breakOnError&&(out+=" "+$closingBraces+" if ("+$errs+" == errors) {"),out}}});var require_enum=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/enum.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;$isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema;var $i="i"+$lvl,$vSchema="schema"+$lvl;$isData||(out+=" var "+$vSchema+" = validate.schema"+$schemaPath+";"),out+="var "+$valid+";",$isData&&(out+=" if (schema"+$lvl+" === undefined) "+$valid+" = true; else if (!Array.isArray(schema"+$lvl+")) "+$valid+" = false; else {"),out+=""+$valid+" = false;for (var "+$i+"=0; "+$i+"<"+$vSchema+".length; "+$i+"++) if (equal("+$data+", "+$vSchema+"["+$i+"])) { "+$valid+" = true; break; }",$isData&&(out+=" } "),out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { allowedValues: schema"+$lvl+" } ",it.opts.messages!==!1&&(out+=" , message: 'should be equal to one of the allowed values' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" }",$breakOnError&&(out+=" else { "),out}}});var require_format=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/format.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||"");if(it.opts.format===!1)return $breakOnError&&(out+=" if (true) { "),out;var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;$isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema;var $unknownFormats=it.opts.unknownFormats,$allowUnknown=Array.isArray($unknownFormats);if($isData){var $format="format"+$lvl,$isObject="isObject"+$lvl,$formatType="formatType"+$lvl;out+=" var "+$format+" = formats["+$schemaValue+"]; var "+$isObject+" = typeof "+$format+" == 'object' && !("+$format+" instanceof RegExp) && "+$format+".validate; var "+$formatType+" = "+$isObject+" && "+$format+".type || 'string'; if ("+$isObject+") { ",it.async&&(out+=" var async"+$lvl+" = "+$format+".async; "),out+=" "+$format+" = "+$format+".validate; } if ( ",$isData&&(out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'string') || "),out+=" (",$unknownFormats!="ignore"&&(out+=" ("+$schemaValue+" && !"+$format+" ",$allowUnknown&&(out+=" && self._opts.unknownFormats.indexOf("+$schemaValue+") == -1 "),out+=") || "),out+=" ("+$format+" && "+$formatType+" == '"+$ruleType+"' && !(typeof "+$format+" == 'function' ? ",it.async?out+=" (async"+$lvl+" ? await "+$format+"("+$data+") : "+$format+"("+$data+")) ":out+=" "+$format+"("+$data+") ",out+=" : "+$format+".test("+$data+"))))) {"}else{var $format=it.formats[$schema];if(!$format){if($unknownFormats=="ignore")return it.logger.warn('unknown format "'+$schema+'" ignored in schema at path "'+it.errSchemaPath+'"'),$breakOnError&&(out+=" if (true) { "),out;if($allowUnknown&&$unknownFormats.indexOf($schema)>=0)return $breakOnError&&(out+=" if (true) { "),out;throw new Error('unknown format "'+$schema+'" is used in schema at path "'+it.errSchemaPath+'"')}var $isObject=typeof $format=="object"&&!($format instanceof RegExp)&&$format.validate,$formatType=$isObject&&$format.type||"string";if($isObject){var $async=$format.async===!0;$format=$format.validate}if($formatType!=$ruleType)return $breakOnError&&(out+=" if (true) { "),out;if($async){if(!it.async)throw new Error("async format in sync schema");var $formatRef="formats"+it.util.getProperty($schema)+".validate";out+=" if (!(await "+$formatRef+"("+$data+"))) { "}else{out+=" if (! ";var $formatRef="formats"+it.util.getProperty($schema);$isObject&&($formatRef+=".validate"),typeof $format=="function"?out+=" "+$formatRef+"("+$data+") ":out+=" "+$formatRef+".test("+$data+") ",out+=") { "}}var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'format' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { format: ",$isData?out+=""+$schemaValue:out+=""+it.util.toQuotedString($schema),out+=" } ",it.opts.messages!==!1&&(out+=` , message: 'should match format "`,$isData?out+="' + "+$schemaValue+" + '":out+=""+it.util.escapeQuotes($schema),out+=`"' `),it.opts.verbose&&(out+=" , schema: ",$isData?out+="validate.schema"+$schemaPath:out+=""+it.util.toQuotedString($schema),out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } ",$breakOnError&&(out+=" else { "),out}}});var require_if=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/if.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$errs="errs__"+$lvl,$it=it.util.copy(it);$it.level++;var $nextValid="valid"+$it.level,$thenSch=it.schema.then,$elseSch=it.schema.else,$thenPresent=$thenSch!==void 0&&(it.opts.strictKeywords?typeof $thenSch=="object"&&Object.keys($thenSch).length>0:it.util.schemaHasRules($thenSch,it.RULES.all)),$elsePresent=$elseSch!==void 0&&(it.opts.strictKeywords?typeof $elseSch=="object"&&Object.keys($elseSch).length>0:it.util.schemaHasRules($elseSch,it.RULES.all)),$currentBaseId=$it.baseId;if($thenPresent||$elsePresent){var $ifClause;$it.createErrors=!1,$it.schema=$schema,$it.schemaPath=$schemaPath,$it.errSchemaPath=$errSchemaPath,out+=" var "+$errs+" = errors; var "+$valid+" = true; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=!0,out+=" "+it.validate($it)+" ",$it.baseId=$currentBaseId,$it.createErrors=!0,out+=" errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } ",it.compositeRule=$it.compositeRule=$wasComposite,$thenPresent?(out+=" if ("+$nextValid+") { ",$it.schema=it.schema.then,$it.schemaPath=it.schemaPath+".then",$it.errSchemaPath=it.errSchemaPath+"/then",out+=" "+it.validate($it)+" ",$it.baseId=$currentBaseId,out+=" "+$valid+" = "+$nextValid+"; ",$thenPresent&&$elsePresent?($ifClause="ifClause"+$lvl,out+=" var "+$ifClause+" = 'then'; "):$ifClause="'then'",out+=" } ",$elsePresent&&(out+=" else { ")):out+=" if (!"+$nextValid+") { ",$elsePresent&&($it.schema=it.schema.else,$it.schemaPath=it.schemaPath+".else",$it.errSchemaPath=it.errSchemaPath+"/else",out+=" "+it.validate($it)+" ",$it.baseId=$currentBaseId,out+=" "+$valid+" = "+$nextValid+"; ",$thenPresent&&$elsePresent?($ifClause="ifClause"+$lvl,out+=" var "+$ifClause+" = 'else'; "):$ifClause="'else'",out+=" } "),out+=" if (!"+$valid+") { var err = ",it.createErrors!==!1?(out+=" { keyword: 'if' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { failingKeyword: "+$ifClause+" } ",it.opts.messages!==!1&&(out+=` , message: 'should match "' + `+$ifClause+` + '" schema' `),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!it.compositeRule&&$breakOnError&&(it.async?out+=" throw new ValidationError(vErrors); ":out+=" validate.errors = vErrors; return false; "),out+=" } ",$breakOnError&&(out+=" else { ")}else $breakOnError&&(out+=" if (true) { ");return out}}});var require_items=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/items.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$errs="errs__"+$lvl,$it=it.util.copy(it),$closingBraces="";$it.level++;var $nextValid="valid"+$it.level,$idx="i"+$lvl,$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$currentBaseId=it.baseId;if(out+="var "+$errs+" = errors;var "+$valid+";",Array.isArray($schema)){var $additionalItems=it.schema.additionalItems;if($additionalItems===!1){out+=" "+$valid+" = "+$data+".length <= "+$schema.length+"; ";var $currErrSchemaPath=$errSchemaPath;$errSchemaPath=it.errSchemaPath+"/additionalItems",out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schema.length+" } ",it.opts.messages!==!1&&(out+=" , message: 'should NOT have more than "+$schema.length+" items' "),it.opts.verbose&&(out+=" , schema: false , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } ",$errSchemaPath=$currErrSchemaPath,$breakOnError&&($closingBraces+="}",out+=" else { ")}var arr1=$schema;if(arr1){for(var $sch,$i=-1,l1=arr1.length-1;$i<l1;)if($sch=arr1[$i+=1],it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0:it.util.schemaHasRules($sch,it.RULES.all)){out+=" "+$nextValid+" = true; if ("+$data+".length > "+$i+") { ";var $passData=$data+"["+$i+"]";$it.schema=$sch,$it.schemaPath=$schemaPath+"["+$i+"]",$it.errSchemaPath=$errSchemaPath+"/"+$i,$it.errorPath=it.util.getPathExpr(it.errorPath,$i,it.opts.jsonPointers,!0),$it.dataPathArr[$dataNxt]=$i;var $code=it.validate($it);$it.baseId=$currentBaseId,it.util.varOccurences($code,$nextData)<2?out+=" "+it.util.varReplace($code,$nextData,$passData)+" ":out+=" var "+$nextData+" = "+$passData+"; "+$code+" ",out+=" } ",$breakOnError&&(out+=" if ("+$nextValid+") { ",$closingBraces+="}")}}if(typeof $additionalItems=="object"&&(it.opts.strictKeywords?typeof $additionalItems=="object"&&Object.keys($additionalItems).length>0:it.util.schemaHasRules($additionalItems,it.RULES.all))){$it.schema=$additionalItems,$it.schemaPath=it.schemaPath+".additionalItems",$it.errSchemaPath=it.errSchemaPath+"/additionalItems",out+=" "+$nextValid+" = true; if ("+$data+".length > "+$schema.length+") { for (var "+$idx+" = "+$schema.length+"; "+$idx+" < "+$data+".length; "+$idx+"++) { ",$it.errorPath=it.util.getPathExpr(it.errorPath,$idx,it.opts.jsonPointers,!0);var $passData=$data+"["+$idx+"]";$it.dataPathArr[$dataNxt]=$idx;var $code=it.validate($it);$it.baseId=$currentBaseId,it.util.varOccurences($code,$nextData)<2?out+=" "+it.util.varReplace($code,$nextData,$passData)+" ":out+=" var "+$nextData+" = "+$passData+"; "+$code+" ",$breakOnError&&(out+=" if (!"+$nextValid+") break; "),out+=" } } ",$breakOnError&&(out+=" if ("+$nextValid+") { ",$closingBraces+="}")}}else if(it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0:it.util.schemaHasRules($schema,it.RULES.all)){$it.schema=$schema,$it.schemaPath=$schemaPath,$it.errSchemaPath=$errSchemaPath,out+=" for (var "+$idx+" = 0; "+$idx+" < "+$data+".length; "+$idx+"++) { ",$it.errorPath=it.util.getPathExpr(it.errorPath,$idx,it.opts.jsonPointers,!0);var $passData=$data+"["+$idx+"]";$it.dataPathArr[$dataNxt]=$idx;var $code=it.validate($it);$it.baseId=$currentBaseId,it.util.varOccurences($code,$nextData)<2?out+=" "+it.util.varReplace($code,$nextData,$passData)+" ":out+=" var "+$nextData+" = "+$passData+"; "+$code+" ",$breakOnError&&(out+=" if (!"+$nextValid+") break; "),out+=" }"}return $breakOnError&&(out+=" "+$closingBraces+" if ("+$errs+" == errors) {"),out}}});var require_limit=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/_limit.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$errorKeyword,$data="data"+($dataLvl||""),$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;$isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema;var $isMax=$keyword=="maximum",$exclusiveKeyword=$isMax?"exclusiveMaximum":"exclusiveMinimum",$schemaExcl=it.schema[$exclusiveKeyword],$isDataExcl=it.opts.$data&&$schemaExcl&&$schemaExcl.$data,$op=$isMax?"<":">",$notOp=$isMax?">":"<",$errorKeyword=void 0;if(!($isData||typeof $schema=="number"||$schema===void 0))throw new Error($keyword+" must be number");if(!($isDataExcl||$schemaExcl===void 0||typeof $schemaExcl=="number"||typeof $schemaExcl=="boolean"))throw new Error($exclusiveKeyword+" must be number or boolean");if($isDataExcl){var $schemaValueExcl=it.util.getData($schemaExcl.$data,$dataLvl,it.dataPathArr),$exclusive="exclusive"+$lvl,$exclType="exclType"+$lvl,$exclIsNumber="exclIsNumber"+$lvl,$opExpr="op"+$lvl,$opStr="' + "+$opExpr+" + '";out+=" var schemaExcl"+$lvl+" = "+$schemaValueExcl+"; ",$schemaValueExcl="schemaExcl"+$lvl,out+=" var "+$exclusive+"; var "+$exclType+" = typeof "+$schemaValueExcl+"; if ("+$exclType+" != 'boolean' && "+$exclType+" != 'undefined' && "+$exclType+" != 'number') { ";var $errorKeyword=$exclusiveKeyword,$$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ",it.opts.messages!==!1&&(out+=" , message: '"+$exclusiveKeyword+" should be boolean' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } else if ( ",$isData&&(out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "),out+=" "+$exclType+" == 'number' ? ( ("+$exclusive+" = "+$schemaValue+" === undefined || "+$schemaValueExcl+" "+$op+"= "+$schemaValue+") ? "+$data+" "+$notOp+"= "+$schemaValueExcl+" : "+$data+" "+$notOp+" "+$schemaValue+" ) : ( ("+$exclusive+" = "+$schemaValueExcl+" === true) ? "+$data+" "+$notOp+"= "+$schemaValue+" : "+$data+" "+$notOp+" "+$schemaValue+" ) || "+$data+" !== "+$data+") { var op"+$lvl+" = "+$exclusive+" ? '"+$op+"' : '"+$op+"='; ",$schema===void 0&&($errorKeyword=$exclusiveKeyword,$errSchemaPath=it.errSchemaPath+"/"+$exclusiveKeyword,$schemaValue=$schemaValueExcl,$isData=$isDataExcl)}else{var $exclIsNumber=typeof $schemaExcl=="number",$opStr=$op;if($exclIsNumber&&$isData){var $opExpr="'"+$opStr+"'";out+=" if ( ",$isData&&(out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "),out+=" ( "+$schemaValue+" === undefined || "+$schemaExcl+" "+$op+"= "+$schemaValue+" ? "+$data+" "+$notOp+"= "+$schemaExcl+" : "+$data+" "+$notOp+" "+$schemaValue+" ) || "+$data+" !== "+$data+") { "}else{$exclIsNumber&&$schema===void 0?($exclusive=!0,$errorKeyword=$exclusiveKeyword,$errSchemaPath=it.errSchemaPath+"/"+$exclusiveKeyword,$schemaValue=$schemaExcl,$notOp+="="):($exclIsNumber&&($schemaValue=Math[$isMax?"min":"max"]($schemaExcl,$schema)),$schemaExcl===($exclIsNumber?$schemaValue:!0)?($exclusive=!0,$errorKeyword=$exclusiveKeyword,$errSchemaPath=it.errSchemaPath+"/"+$exclusiveKeyword,$notOp+="="):($exclusive=!1,$opStr+="="));var $opExpr="'"+$opStr+"'";out+=" if ( ",$isData&&(out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "),out+=" "+$data+" "+$notOp+" "+$schemaValue+" || "+$data+" !== "+$data+") { "}}$errorKeyword=$errorKeyword||$keyword;var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"_limit")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { comparison: "+$opExpr+", limit: "+$schemaValue+", exclusive: "+$exclusive+" } ",it.opts.messages!==!1&&(out+=" , message: 'should be "+$opStr+" ",$isData?out+="' + "+$schemaValue:out+=""+$schemaValue+"'"),it.opts.verbose&&(out+=" , schema: ",$isData?out+="validate.schema"+$schemaPath:out+=""+$schema,out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } ",$breakOnError&&(out+=" else { "),out}}});var require_limitItems=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/_limitItems.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$errorKeyword,$data="data"+($dataLvl||""),$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema,!($isData||typeof $schema=="number"))throw new Error($keyword+" must be number");var $op=$keyword=="maxItems"?">":"<";out+="if ( ",$isData&&(out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "),out+=" "+$data+".length "+$op+" "+$schemaValue+") { ";var $errorKeyword=$keyword,$$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"_limitItems")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schemaValue+" } ",it.opts.messages!==!1&&(out+=" , message: 'should NOT have ",$keyword=="maxItems"?out+="more":out+="fewer",out+=" than ",$isData?out+="' + "+$schemaValue+" + '":out+=""+$schema,out+=" items' "),it.opts.verbose&&(out+=" , schema: ",$isData?out+="validate.schema"+$schemaPath:out+=""+$schema,out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+="} ",$breakOnError&&(out+=" else { "),out}}});var require_limitLength=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/_limitLength.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$errorKeyword,$data="data"+($dataLvl||""),$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema,!($isData||typeof $schema=="number"))throw new Error($keyword+" must be number");var $op=$keyword=="maxLength"?">":"<";out+="if ( ",$isData&&(out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "),it.opts.unicode===!1?out+=" "+$data+".length ":out+=" ucs2length("+$data+") ",out+=" "+$op+" "+$schemaValue+") { ";var $errorKeyword=$keyword,$$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"_limitLength")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schemaValue+" } ",it.opts.messages!==!1&&(out+=" , message: 'should NOT be ",$keyword=="maxLength"?out+="longer":out+="shorter",out+=" than ",$isData?out+="' + "+$schemaValue+" + '":out+=""+$schema,out+=" characters' "),it.opts.verbose&&(out+=" , schema: ",$isData?out+="validate.schema"+$schemaPath:out+=""+$schema,out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+="} ",$breakOnError&&(out+=" else { "),out}}});var require_limitProperties=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/_limitProperties.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$errorKeyword,$data="data"+($dataLvl||""),$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema,!($isData||typeof $schema=="number"))throw new Error($keyword+" must be number");var $op=$keyword=="maxProperties"?">":"<";out+="if ( ",$isData&&(out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "),out+=" Object.keys("+$data+").length "+$op+" "+$schemaValue+") { ";var $errorKeyword=$keyword,$$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"_limitProperties")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schemaValue+" } ",it.opts.messages!==!1&&(out+=" , message: 'should NOT have ",$keyword=="maxProperties"?out+="more":out+="fewer",out+=" than ",$isData?out+="' + "+$schemaValue+" + '":out+=""+$schema,out+=" properties' "),it.opts.verbose&&(out+=" , schema: ",$isData?out+="validate.schema"+$schemaPath:out+=""+$schema,out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+="} ",$breakOnError&&(out+=" else { "),out}}});var require_multipleOf=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/multipleOf.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema,!($isData||typeof $schema=="number"))throw new Error($keyword+" must be number");out+="var division"+$lvl+";if (",$isData&&(out+=" "+$schemaValue+" !== undefined && ( typeof "+$schemaValue+" != 'number' || "),out+=" (division"+$lvl+" = "+$data+" / "+$schemaValue+", ",it.opts.multipleOfPrecision?out+=" Math.abs(Math.round(division"+$lvl+") - division"+$lvl+") > 1e-"+it.opts.multipleOfPrecision+" ":out+=" division"+$lvl+" !== parseInt(division"+$lvl+") ",out+=" ) ",$isData&&(out+=" ) "),out+=" ) { ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { multipleOf: "+$schemaValue+" } ",it.opts.messages!==!1&&(out+=" , message: 'should be multiple of ",$isData?out+="' + "+$schemaValue:out+=""+$schemaValue+"'"),it.opts.verbose&&(out+=" , schema: ",$isData?out+="validate.schema"+$schemaPath:out+=""+$schema,out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+="} ",$breakOnError&&(out+=" else { "),out}}});var require_not=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/not.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$errs="errs__"+$lvl,$it=it.util.copy(it);$it.level++;var $nextValid="valid"+$it.level;if(it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0:it.util.schemaHasRules($schema,it.RULES.all)){$it.schema=$schema,$it.schemaPath=$schemaPath,$it.errSchemaPath=$errSchemaPath,out+=" var "+$errs+" = errors; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=!0,$it.createErrors=!1;var $allErrorsOption;$it.opts.allErrors&&($allErrorsOption=$it.opts.allErrors,$it.opts.allErrors=!1),out+=" "+it.validate($it)+" ",$it.createErrors=!0,$allErrorsOption&&($it.opts.allErrors=$allErrorsOption),it.compositeRule=$it.compositeRule=$wasComposite,out+=" if ("+$nextValid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'not' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ",it.opts.messages!==!1&&(out+=" , message: 'should NOT be valid' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } else { errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } ",it.opts.allErrors&&(out+=" } ")}else out+=" var err = ",it.createErrors!==!1?(out+=" { keyword: 'not' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ",it.opts.messages!==!1&&(out+=" , message: 'should NOT be valid' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",$breakOnError&&(out+=" if (false) { ");return out}}});var require_oneOf=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/oneOf.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$errs="errs__"+$lvl,$it=it.util.copy(it),$closingBraces="";$it.level++;var $nextValid="valid"+$it.level,$currentBaseId=$it.baseId,$prevValid="prevValid"+$lvl,$passingSchemas="passingSchemas"+$lvl;out+="var "+$errs+" = errors , "+$prevValid+" = false , "+$valid+" = false , "+$passingSchemas+" = null; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=!0;var arr1=$schema;if(arr1)for(var $sch,$i=-1,l1=arr1.length-1;$i<l1;)$sch=arr1[$i+=1],(it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0:it.util.schemaHasRules($sch,it.RULES.all))?($it.schema=$sch,$it.schemaPath=$schemaPath+"["+$i+"]",$it.errSchemaPath=$errSchemaPath+"/"+$i,out+=" "+it.validate($it)+" ",$it.baseId=$currentBaseId):out+=" var "+$nextValid+" = true; ",$i&&(out+=" if ("+$nextValid+" && "+$prevValid+") { "+$valid+" = false; "+$passingSchemas+" = ["+$passingSchemas+", "+$i+"]; } else { ",$closingBraces+="}"),out+=" if ("+$nextValid+") { "+$valid+" = "+$prevValid+" = true; "+$passingSchemas+" = "+$i+"; }";return it.compositeRule=$it.compositeRule=$wasComposite,out+=""+$closingBraces+"if (!"+$valid+") { var err = ",it.createErrors!==!1?(out+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { passingSchemas: "+$passingSchemas+" } ",it.opts.messages!==!1&&(out+=" , message: 'should match exactly one schema in oneOf' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!it.compositeRule&&$breakOnError&&(it.async?out+=" throw new ValidationError(vErrors); ":out+=" validate.errors = vErrors; return false; "),out+="} else { errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; }",it.opts.allErrors&&(out+=" } "),out}}});var require_pattern=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/pattern.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;$isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema;var $regexp=$isData?"(new RegExp("+$schemaValue+"))":it.usePattern($schema);out+="if ( ",$isData&&(out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'string') || "),out+=" !"+$regexp+".test("+$data+") ) { ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { pattern: ",$isData?out+=""+$schemaValue:out+=""+it.util.toQuotedString($schema),out+=" } ",it.opts.messages!==!1&&(out+=` , message: 'should match pattern "`,$isData?out+="' + "+$schemaValue+" + '":out+=""+it.util.escapeQuotes($schema),out+=`"' `),it.opts.verbose&&(out+=" , schema: ",$isData?out+="validate.schema"+$schemaPath:out+=""+it.util.toQuotedString($schema),out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+="} ",$breakOnError&&(out+=" else { "),out}}});var require_properties=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/properties.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$errs="errs__"+$lvl,$it=it.util.copy(it),$closingBraces="";$it.level++;var $nextValid="valid"+$it.level,$key="key"+$lvl,$idx="idx"+$lvl,$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$dataProperties="dataProperties"+$lvl,$schemaKeys=Object.keys($schema||{}).filter(notProto),$pProperties=it.schema.patternProperties||{},$pPropertyKeys=Object.keys($pProperties).filter(notProto),$aProperties=it.schema.additionalProperties,$someProperties=$schemaKeys.length||$pPropertyKeys.length,$noAdditional=$aProperties===!1,$additionalIsSchema=typeof $aProperties=="object"&&Object.keys($aProperties).length,$removeAdditional=it.opts.removeAdditional,$checkAdditional=$noAdditional||$additionalIsSchema||$removeAdditional,$ownProperties=it.opts.ownProperties,$currentBaseId=it.baseId,$required=it.schema.required;if($required&&!(it.opts.$data&&$required.$data)&&$required.length<it.opts.loopRequired)var $requiredHash=it.util.toHash($required);function notProto(p){return p!=="__proto__"}if(out+="var "+$errs+" = errors;var "+$nextValid+" = true;",$ownProperties&&(out+=" var "+$dataProperties+" = undefined;"),$checkAdditional){if($ownProperties?out+=" "+$dataProperties+" = "+$dataProperties+" || Object.keys("+$data+"); for (var "+$idx+"=0; "+$idx+"<"+$dataProperties+".length; "+$idx+"++) { var "+$key+" = "+$dataProperties+"["+$idx+"]; ":out+=" for (var "+$key+" in "+$data+") { ",$someProperties){if(out+=" var isAdditional"+$lvl+" = !(false ",$schemaKeys.length)if($schemaKeys.length>8)out+=" || validate.schema"+$schemaPath+".hasOwnProperty("+$key+") ";else{var arr1=$schemaKeys;if(arr1)for(var $propertyKey,i1=-1,l1=arr1.length-1;i1<l1;)$propertyKey=arr1[i1+=1],out+=" || "+$key+" == "+it.util.toQuotedString($propertyKey)+" "}if($pPropertyKeys.length){var arr2=$pPropertyKeys;if(arr2)for(var $pProperty,$i=-1,l2=arr2.length-1;$i<l2;)$pProperty=arr2[$i+=1],out+=" || "+it.usePattern($pProperty)+".test("+$key+") "}out+=" ); if (isAdditional"+$lvl+") { "}if($removeAdditional=="all")out+=" delete "+$data+"["+$key+"]; ";else{var $currentErrorPath=it.errorPath,$additionalProperty="' + "+$key+" + '";if(it.opts._errorDataPathProperty&&(it.errorPath=it.util.getPathExpr(it.errorPath,$key,it.opts.jsonPointers)),$noAdditional)if($removeAdditional)out+=" delete "+$data+"["+$key+"]; ";else{out+=" "+$nextValid+" = false; ";var $currErrSchemaPath=$errSchemaPath;$errSchemaPath=it.errSchemaPath+"/additionalProperties";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { additionalProperty: '"+$additionalProperty+"' } ",it.opts.messages!==!1&&(out+=" , message: '",it.opts._errorDataPathProperty?out+="is an invalid additional property":out+="should NOT have additional properties",out+="' "),it.opts.verbose&&(out+=" , schema: false , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",$errSchemaPath=$currErrSchemaPath,$breakOnError&&(out+=" break; ")}else if($additionalIsSchema)if($removeAdditional=="failing"){out+=" var "+$errs+" = errors; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=!0,$it.schema=$aProperties,$it.schemaPath=it.schemaPath+".additionalProperties",$it.errSchemaPath=it.errSchemaPath+"/additionalProperties",$it.errorPath=it.opts._errorDataPathProperty?it.errorPath:it.util.getPathExpr(it.errorPath,$key,it.opts.jsonPointers);var $passData=$data+"["+$key+"]";$it.dataPathArr[$dataNxt]=$key;var $code=it.validate($it);$it.baseId=$currentBaseId,it.util.varOccurences($code,$nextData)<2?out+=" "+it.util.varReplace($code,$nextData,$passData)+" ":out+=" var "+$nextData+" = "+$passData+"; "+$code+" ",out+=" if (!"+$nextValid+") { errors = "+$errs+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+$data+"["+$key+"]; } ",it.compositeRule=$it.compositeRule=$wasComposite}else{$it.schema=$aProperties,$it.schemaPath=it.schemaPath+".additionalProperties",$it.errSchemaPath=it.errSchemaPath+"/additionalProperties",$it.errorPath=it.opts._errorDataPathProperty?it.errorPath:it.util.getPathExpr(it.errorPath,$key,it.opts.jsonPointers);var $passData=$data+"["+$key+"]";$it.dataPathArr[$dataNxt]=$key;var $code=it.validate($it);$it.baseId=$currentBaseId,it.util.varOccurences($code,$nextData)<2?out+=" "+it.util.varReplace($code,$nextData,$passData)+" ":out+=" var "+$nextData+" = "+$passData+"; "+$code+" ",$breakOnError&&(out+=" if (!"+$nextValid+") break; ")}it.errorPath=$currentErrorPath}$someProperties&&(out+=" } "),out+=" } ",$breakOnError&&(out+=" if ("+$nextValid+") { ",$closingBraces+="}")}var $useDefaults=it.opts.useDefaults&&!it.compositeRule;if($schemaKeys.length){var arr3=$schemaKeys;if(arr3)for(var $propertyKey,i3=-1,l3=arr3.length-1;i3<l3;){$propertyKey=arr3[i3+=1];var $sch=$schema[$propertyKey];if(it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0:it.util.schemaHasRules($sch,it.RULES.all)){var $prop=it.util.getProperty($propertyKey),$passData=$data+$prop,$hasDefault=$useDefaults&&$sch.default!==void 0;$it.schema=$sch,$it.schemaPath=$schemaPath+$prop,$it.errSchemaPath=$errSchemaPath+"/"+it.util.escapeFragment($propertyKey),$it.errorPath=it.util.getPath(it.errorPath,$propertyKey,it.opts.jsonPointers),$it.dataPathArr[$dataNxt]=it.util.toQuotedString($propertyKey);var $code=it.validate($it);if($it.baseId=$currentBaseId,it.util.varOccurences($code,$nextData)<2){$code=it.util.varReplace($code,$nextData,$passData);var $useData=$passData}else{var $useData=$nextData;out+=" var "+$nextData+" = "+$passData+"; "}if($hasDefault)out+=" "+$code+" ";else{if($requiredHash&&$requiredHash[$propertyKey]){out+=" if ( "+$useData+" === undefined ",$ownProperties&&(out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "),out+=") { "+$nextValid+" = false; ";var $currentErrorPath=it.errorPath,$currErrSchemaPath=$errSchemaPath,$missingProperty=it.util.escapeQuotes($propertyKey);it.opts._errorDataPathProperty&&(it.errorPath=it.util.getPath($currentErrorPath,$propertyKey,it.opts.jsonPointers)),$errSchemaPath=it.errSchemaPath+"/required";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'required' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ",it.opts.messages!==!1&&(out+=" , message: '",it.opts._errorDataPathProperty?out+="is a required property":out+="should have required property \\'"+$missingProperty+"\\'",out+="' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",$errSchemaPath=$currErrSchemaPath,it.errorPath=$currentErrorPath,out+=" } else { "}else $breakOnError?(out+=" if ( "+$useData+" === undefined ",$ownProperties&&(out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "),out+=") { "+$nextValid+" = true; } else { "):(out+=" if ("+$useData+" !== undefined ",$ownProperties&&(out+=" && Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "),out+=" ) { ");out+=" "+$code+" } "}}$breakOnError&&(out+=" if ("+$nextValid+") { ",$closingBraces+="}")}}if($pPropertyKeys.length){var arr4=$pPropertyKeys;if(arr4)for(var $pProperty,i4=-1,l4=arr4.length-1;i4<l4;){$pProperty=arr4[i4+=1];var $sch=$pProperties[$pProperty];if(it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0:it.util.schemaHasRules($sch,it.RULES.all)){$it.schema=$sch,$it.schemaPath=it.schemaPath+".patternProperties"+it.util.getProperty($pProperty),$it.errSchemaPath=it.errSchemaPath+"/patternProperties/"+it.util.escapeFragment($pProperty),$ownProperties?out+=" "+$dataProperties+" = "+$dataProperties+" || Object.keys("+$data+"); for (var "+$idx+"=0; "+$idx+"<"+$dataProperties+".length; "+$idx+"++) { var "+$key+" = "+$dataProperties+"["+$idx+"]; ":out+=" for (var "+$key+" in "+$data+") { ",out+=" if ("+it.usePattern($pProperty)+".test("+$key+")) { ",$it.errorPath=it.util.getPathExpr(it.errorPath,$key,it.opts.jsonPointers);var $passData=$data+"["+$key+"]";$it.dataPathArr[$dataNxt]=$key;var $code=it.validate($it);$it.baseId=$currentBaseId,it.util.varOccurences($code,$nextData)<2?out+=" "+it.util.varReplace($code,$nextData,$passData)+" ":out+=" var "+$nextData+" = "+$passData+"; "+$code+" ",$breakOnError&&(out+=" if (!"+$nextValid+") break; "),out+=" } ",$breakOnError&&(out+=" else "+$nextValid+" = true; "),out+=" } ",$breakOnError&&(out+=" if ("+$nextValid+") { ",$closingBraces+="}")}}}return $breakOnError&&(out+=" "+$closingBraces+" if ("+$errs+" == errors) {"),out}}});var require_propertyNames=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/propertyNames.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$errs="errs__"+$lvl,$it=it.util.copy(it),$closingBraces="";$it.level++;var $nextValid="valid"+$it.level;if(out+="var "+$errs+" = errors;",it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0:it.util.schemaHasRules($schema,it.RULES.all)){$it.schema=$schema,$it.schemaPath=$schemaPath,$it.errSchemaPath=$errSchemaPath;var $key="key"+$lvl,$idx="idx"+$lvl,$i="i"+$lvl,$invalidName="' + "+$key+" + '",$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$dataProperties="dataProperties"+$lvl,$ownProperties=it.opts.ownProperties,$currentBaseId=it.baseId;$ownProperties&&(out+=" var "+$dataProperties+" = undefined; "),$ownProperties?out+=" "+$dataProperties+" = "+$dataProperties+" || Object.keys("+$data+"); for (var "+$idx+"=0; "+$idx+"<"+$dataProperties+".length; "+$idx+"++) { var "+$key+" = "+$dataProperties+"["+$idx+"]; ":out+=" for (var "+$key+" in "+$data+") { ",out+=" var startErrs"+$lvl+" = errors; ";var $passData=$key,$wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=!0;var $code=it.validate($it);$it.baseId=$currentBaseId,it.util.varOccurences($code,$nextData)<2?out+=" "+it.util.varReplace($code,$nextData,$passData)+" ":out+=" var "+$nextData+" = "+$passData+"; "+$code+" ",it.compositeRule=$it.compositeRule=$wasComposite,out+=" if (!"+$nextValid+") { for (var "+$i+"=startErrs"+$lvl+"; "+$i+"<errors; "+$i+"++) { vErrors["+$i+"].propertyName = "+$key+"; } var err = ",it.createErrors!==!1?(out+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { propertyName: '"+$invalidName+"' } ",it.opts.messages!==!1&&(out+=" , message: 'property name \\'"+$invalidName+"\\' is invalid' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!it.compositeRule&&$breakOnError&&(it.async?out+=" throw new ValidationError(vErrors); ":out+=" validate.errors = vErrors; return false; "),$breakOnError&&(out+=" break; "),out+=" } }"}return $breakOnError&&(out+=" "+$closingBraces+" if ("+$errs+" == errors) {"),out}}});var require_required=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/required.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;$isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema;var $vSchema="schema"+$lvl;if(!$isData)if($schema.length<it.opts.loopRequired&&it.schema.properties&&Object.keys(it.schema.properties).length){var $required=[],arr1=$schema;if(arr1)for(var $property,i1=-1,l1=arr1.length-1;i1<l1;){$property=arr1[i1+=1];var $propertySch=it.schema.properties[$property];$propertySch&&(it.opts.strictKeywords?typeof $propertySch=="object"&&Object.keys($propertySch).length>0:it.util.schemaHasRules($propertySch,it.RULES.all))||($required[$required.length]=$property)}}else var $required=$schema;if($isData||$required.length){var $currentErrorPath=it.errorPath,$loopRequired=$isData||$required.length>=it.opts.loopRequired,$ownProperties=it.opts.ownProperties;if($breakOnError)if(out+=" var missing"+$lvl+"; ",$loopRequired){$isData||(out+=" var "+$vSchema+" = validate.schema"+$schemaPath+"; ");var $i="i"+$lvl,$propertyPath="schema"+$lvl+"["+$i+"]",$missingProperty="' + "+$propertyPath+" + '";it.opts._errorDataPathProperty&&(it.errorPath=it.util.getPathExpr($currentErrorPath,$propertyPath,it.opts.jsonPointers)),out+=" var "+$valid+" = true; ",$isData&&(out+=" if (schema"+$lvl+" === undefined) "+$valid+" = true; else if (!Array.isArray(schema"+$lvl+")) "+$valid+" = false; else {"),out+=" for (var "+$i+" = 0; "+$i+" < "+$vSchema+".length; "+$i+"++) { "+$valid+" = "+$data+"["+$vSchema+"["+$i+"]] !== undefined ",$ownProperties&&(out+=" && Object.prototype.hasOwnProperty.call("+$data+", "+$vSchema+"["+$i+"]) "),out+="; if (!"+$valid+") break; } ",$isData&&(out+=" } "),out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'required' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ",it.opts.messages!==!1&&(out+=" , message: '",it.opts._errorDataPathProperty?out+="is a required property":out+="should have required property \\'"+$missingProperty+"\\'",out+="' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } else { "}else{out+=" if ( ";var arr2=$required;if(arr2)for(var $propertyKey,$i=-1,l2=arr2.length-1;$i<l2;){$propertyKey=arr2[$i+=1],$i&&(out+=" || ");var $prop=it.util.getProperty($propertyKey),$useData=$data+$prop;out+=" ( ( "+$useData+" === undefined ",$ownProperties&&(out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "),out+=") && (missing"+$lvl+" = "+it.util.toQuotedString(it.opts.jsonPointers?$propertyKey:$prop)+") ) "}out+=") { ";var $propertyPath="missing"+$lvl,$missingProperty="' + "+$propertyPath+" + '";it.opts._errorDataPathProperty&&(it.errorPath=it.opts.jsonPointers?it.util.getPathExpr($currentErrorPath,$propertyPath,!0):$currentErrorPath+" + "+$propertyPath);var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'required' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ",it.opts.messages!==!1&&(out+=" , message: '",it.opts._errorDataPathProperty?out+="is a required property":out+="should have required property \\'"+$missingProperty+"\\'",out+="' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } else { "}else if($loopRequired){$isData||(out+=" var "+$vSchema+" = validate.schema"+$schemaPath+"; ");var $i="i"+$lvl,$propertyPath="schema"+$lvl+"["+$i+"]",$missingProperty="' + "+$propertyPath+" + '";it.opts._errorDataPathProperty&&(it.errorPath=it.util.getPathExpr($currentErrorPath,$propertyPath,it.opts.jsonPointers)),$isData&&(out+=" if ("+$vSchema+" && !Array.isArray("+$vSchema+")) { var err = ",it.createErrors!==!1?(out+=" { keyword: 'required' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ",it.opts.messages!==!1&&(out+=" , message: '",it.opts._errorDataPathProperty?out+="is a required property":out+="should have required property \\'"+$missingProperty+"\\'",out+="' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+$vSchema+" !== undefined) { "),out+=" for (var "+$i+" = 0; "+$i+" < "+$vSchema+".length; "+$i+"++) { if ("+$data+"["+$vSchema+"["+$i+"]] === undefined ",$ownProperties&&(out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", "+$vSchema+"["+$i+"]) "),out+=") { var err = ",it.createErrors!==!1?(out+=" { keyword: 'required' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ",it.opts.messages!==!1&&(out+=" , message: '",it.opts._errorDataPathProperty?out+="is a required property":out+="should have required property \\'"+$missingProperty+"\\'",out+="' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",$isData&&(out+=" } ")}else{var arr3=$required;if(arr3)for(var $propertyKey,i3=-1,l3=arr3.length-1;i3<l3;){$propertyKey=arr3[i3+=1];var $prop=it.util.getProperty($propertyKey),$missingProperty=it.util.escapeQuotes($propertyKey),$useData=$data+$prop;it.opts._errorDataPathProperty&&(it.errorPath=it.util.getPath($currentErrorPath,$propertyKey,it.opts.jsonPointers)),out+=" if ( "+$useData+" === undefined ",$ownProperties&&(out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "),out+=") { var err = ",it.createErrors!==!1?(out+=" { keyword: 'required' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ",it.opts.messages!==!1&&(out+=" , message: '",it.opts._errorDataPathProperty?out+="is a required property":out+="should have required property \\'"+$missingProperty+"\\'",out+="' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}it.errorPath=$currentErrorPath}else $breakOnError&&(out+=" if (true) {");return out}}});var require_uniqueItems=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/uniqueItems.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema,($schema||$isData)&&it.opts.uniqueItems!==!1){$isData&&(out+=" var "+$valid+"; if ("+$schemaValue+" === false || "+$schemaValue+" === undefined) "+$valid+" = true; else if (typeof "+$schemaValue+" != 'boolean') "+$valid+" = false; else { "),out+=" var i = "+$data+".length , "+$valid+" = true , j; if (i > 1) { ";var $itemType=it.schema.items&&it.schema.items.type,$typeIsArray=Array.isArray($itemType);if(!$itemType||$itemType=="object"||$itemType=="array"||$typeIsArray&&($itemType.indexOf("object")>=0||$itemType.indexOf("array")>=0))out+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+$data+"[i], "+$data+"[j])) { "+$valid+" = false; break outer; } } } ";else{out+=" var itemIndices = {}, item; for (;i--;) { var item = "+$data+"[i]; ";var $method="checkDataType"+($typeIsArray?"s":"");out+=" if ("+it.util[$method]($itemType,"item",it.opts.strictNumbers,!0)+") continue; ",$typeIsArray&&(out+=` if (typeof item == 'string') item = '"' + item; `),out+=" if (typeof itemIndices[item] == 'number') { "+$valid+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}out+=" } ",$isData&&(out+=" } "),out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { i: i, j: j } ",it.opts.messages!==!1&&(out+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),it.opts.verbose&&(out+=" , schema: ",$isData?out+="validate.schema"+$schemaPath:out+=""+$schema,out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } ",$breakOnError&&(out+=" else { ")}else $breakOnError&&(out+=" if (true) { ");return out}}});var require_dotjs=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/index.js"(exports,module){"use strict";module.exports={$ref:require_ref(),allOf:require_allOf(),anyOf:require_anyOf(),$comment:require_comment(),const:require_const(),contains:require_contains(),dependencies:require_dependencies(),enum:require_enum(),format:require_format(),if:require_if(),items:require_items(),maximum:require_limit(),minimum:require_limit(),maxItems:require_limitItems(),minItems:require_limitItems(),maxLength:require_limitLength(),minLength:require_limitLength(),maxProperties:require_limitProperties(),minProperties:require_limitProperties(),multipleOf:require_multipleOf(),not:require_not(),oneOf:require_oneOf(),pattern:require_pattern(),properties:require_properties(),propertyNames:require_propertyNames(),required:require_required(),uniqueItems:require_uniqueItems(),validate:require_validate()}}});var require_rules=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/rules.js"(exports,module){"use strict";var ruleModules=require_dotjs(),toHash=require_util().toHash;module.exports=function(){var RULES=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],ALL=["type","$comment"],KEYWORDS=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],TYPES=["number","integer","string","array","object","boolean","null"];return RULES.all=toHash(ALL),RULES.types=toHash(TYPES),RULES.forEach(function(group){group.rules=group.rules.map(function(keyword){var implKeywords;if(typeof keyword=="object"){var key=Object.keys(keyword)[0];implKeywords=keyword[key],keyword=key,implKeywords.forEach(function(k){ALL.push(k),RULES.all[k]=!0})}ALL.push(keyword);var rule=RULES.all[keyword]={keyword,code:ruleModules[keyword],implements:implKeywords};return rule}),RULES.all.$comment={keyword:"$comment",code:ruleModules.$comment},group.type&&(RULES.types[group.type]=group)}),RULES.keywords=toHash(ALL.concat(KEYWORDS)),RULES.custom={},RULES}}});var require_data=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/data.js"(exports,module){"use strict";var KEYWORDS=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];module.exports=function(metaSchema,keywordsJsonPointers){for(var i=0;i<keywordsJsonPointers.length;i++){metaSchema=JSON.parse(JSON.stringify(metaSchema));var segments=keywordsJsonPointers[i].split("/"),keywords=metaSchema,j;for(j=1;j<segments.length;j++)keywords=keywords[segments[j]];for(j=0;j<KEYWORDS.length;j++){var key=KEYWORDS[j],schema=keywords[key];schema&&(keywords[key]={anyOf:[schema,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return metaSchema}}});var require_async=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/async.js"(exports,module){"use strict";var MissingRefError=require_error_classes().MissingRef;module.exports=compileAsync;function compileAsync(schema,meta,callback){var self=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");typeof meta=="function"&&(callback=meta,meta=void 0);var p=loadMetaSchemaOf(schema).then(function(){var schemaObj=self._addSchema(schema,void 0,meta);return schemaObj.validate||_compileAsync(schemaObj)});return callback&&p.then(function(v){callback(null,v)},callback),p;function loadMetaSchemaOf(sch){var $schema=sch.$schema;return $schema&&!self.getSchema($schema)?compileAsync.call(self,{$ref:$schema},!0):Promise.resolve()}function _compileAsync(schemaObj){try{return self._compile(schemaObj)}catch(e){if(e instanceof MissingRefError)return loadMissingSchema(e);throw e}function loadMissingSchema(e){var ref=e.missingSchema;if(added(ref))throw new Error("Schema "+ref+" is loaded but "+e.missingRef+" cannot be resolved");var schemaPromise=self._loadingSchemas[ref];return schemaPromise||(schemaPromise=self._loadingSchemas[ref]=self._opts.loadSchema(ref),schemaPromise.then(removePromise,removePromise)),schemaPromise.then(function(sch){if(!added(ref))return loadMetaSchemaOf(sch).then(function(){added(ref)||self.addSchema(sch,ref,void 0,meta)})}).then(function(){return _compileAsync(schemaObj)});function removePromise(){delete self._loadingSchemas[ref]}function added(ref2){return self._refs[ref2]||self._schemas[ref2]}}}}}});var require_custom=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/custom.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$errorKeyword,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$errs="errs__"+$lvl,$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;$isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema;var $rule=this,$definition="definition"+$lvl,$rDef=$rule.definition,$closingBraces="",$compile,$inline,$macro,$ruleValidate,$validateCode;if($isData&&$rDef.$data){$validateCode="keywordValidate"+$lvl;var $validateSchema=$rDef.validateSchema;out+=" var "+$definition+" = RULES.custom['"+$keyword+"'].definition; var "+$validateCode+" = "+$definition+".validate;"}else{if($ruleValidate=it.useCustomRule($rule,$schema,it.schema,it),!$ruleValidate)return;$schemaValue="validate.schema"+$schemaPath,$validateCode=$ruleValidate.code,$compile=$rDef.compile,$inline=$rDef.inline,$macro=$rDef.macro}var $ruleErrs=$validateCode+".errors",$i="i"+$lvl,$ruleErr="ruleErr"+$lvl,$asyncKeyword=$rDef.async;if($asyncKeyword&&!it.async)throw new Error("async keyword in sync schema");if($inline||$macro||(out+=""+$ruleErrs+" = null;"),out+="var "+$errs+" = errors;var "+$valid+";",$isData&&$rDef.$data&&($closingBraces+="}",out+=" if ("+$schemaValue+" === undefined) { "+$valid+" = true; } else { ",$validateSchema&&($closingBraces+="}",out+=" "+$valid+" = "+$definition+".validateSchema("+$schemaValue+"); if ("+$valid+") { ")),$inline)$rDef.statements?out+=" "+$ruleValidate.validate+" ":out+=" "+$valid+" = "+$ruleValidate.validate+"; ";else if($macro){var $it=it.util.copy(it),$closingBraces="";$it.level++;var $nextValid="valid"+$it.level;$it.schema=$ruleValidate.validate,$it.schemaPath="";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=!0;var $code=it.validate($it).replace(/validate\.schema/g,$validateCode);it.compositeRule=$it.compositeRule=$wasComposite,out+=" "+$code}else{var $$outStack=$$outStack||[];$$outStack.push(out),out="",out+=" "+$validateCode+".call( ",it.opts.passContext?out+="this":out+="self",$compile||$rDef.schema===!1?out+=" , "+$data+" ":out+=" , "+$schemaValue+" , "+$data+" , validate.schema"+it.schemaPath+" ",out+=" , (dataPath || '')",it.errorPath!='""'&&(out+=" + "+it.errorPath);var $parentData=$dataLvl?"data"+($dataLvl-1||""):"parentData",$parentDataProperty=$dataLvl?it.dataPathArr[$dataLvl]:"parentDataProperty";out+=" , "+$parentData+" , "+$parentDataProperty+" , rootData ) ";var def_callRuleValidate=out;out=$$outStack.pop(),$rDef.errors===!1?(out+=" "+$valid+" = ",$asyncKeyword&&(out+="await "),out+=""+def_callRuleValidate+"; "):$asyncKeyword?($ruleErrs="customErrors"+$lvl,out+=" var "+$ruleErrs+" = null; try { "+$valid+" = await "+def_callRuleValidate+"; } catch (e) { "+$valid+" = false; if (e instanceof ValidationError) "+$ruleErrs+" = e.errors; else throw e; } "):out+=" "+$ruleErrs+" = null; "+$valid+" = "+def_callRuleValidate+"; "}if($rDef.modifying&&(out+=" if ("+$parentData+") "+$data+" = "+$parentData+"["+$parentDataProperty+"];"),out+=""+$closingBraces,$rDef.valid)$breakOnError&&(out+=" if (true) { ");else{out+=" if ( ",$rDef.valid===void 0?(out+=" !",$macro?out+=""+$nextValid:out+=""+$valid):out+=" "+!$rDef.valid+" ",out+=") { ",$errorKeyword=$rule.keyword;var $$outStack=$$outStack||[];$$outStack.push(out),out="";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"custom")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { keyword: '"+$rule.keyword+"' } ",it.opts.messages!==!1&&(out+=` , message: 'should pass "`+$rule.keyword+`" keyword validation' `),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var def_customError=out;out=$$outStack.pop(),$inline?$rDef.errors?$rDef.errors!="full"&&(out+=" for (var "+$i+"="+$errs+"; "+$i+"<errors; "+$i+"++) { var "+$ruleErr+" = vErrors["+$i+"]; if ("+$ruleErr+".dataPath === undefined) "+$ruleErr+".dataPath = (dataPath || '') + "+it.errorPath+"; if ("+$ruleErr+".schemaPath === undefined) { "+$ruleErr+'.schemaPath = "'+$errSchemaPath+'"; } ',it.opts.verbose&&(out+=" "+$ruleErr+".schema = "+$schemaValue+"; "+$ruleErr+".data = "+$data+"; "),out+=" } "):$rDef.errors===!1?out+=" "+def_customError+" ":(out+=" if ("+$errs+" == errors) { "+def_customError+" } else { for (var "+$i+"="+$errs+"; "+$i+"<errors; "+$i+"++) { var "+$ruleErr+" = vErrors["+$i+"]; if ("+$ruleErr+".dataPath === undefined) "+$ruleErr+".dataPath = (dataPath || '') + "+it.errorPath+"; if ("+$ruleErr+".schemaPath === undefined) { "+$ruleErr+'.schemaPath = "'+$errSchemaPath+'"; } ',it.opts.verbose&&(out+=" "+$ruleErr+".schema = "+$schemaValue+"; "+$ruleErr+".data = "+$data+"; "),out+=" } } "):$macro?(out+=" var err = ",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"custom")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { keyword: '"+$rule.keyword+"' } ",it.opts.messages!==!1&&(out+=` , message: 'should pass "`+$rule.keyword+`" keyword validation' `),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!it.compositeRule&&$breakOnError&&(it.async?out+=" throw new ValidationError(vErrors); ":out+=" validate.errors = vErrors; return false; ")):$rDef.errors===!1?out+=" "+def_customError+" ":(out+=" if (Array.isArray("+$ruleErrs+")) { if (vErrors === null) vErrors = "+$ruleErrs+"; else vErrors = vErrors.concat("+$ruleErrs+"); errors = vErrors.length; for (var "+$i+"="+$errs+"; "+$i+"<errors; "+$i+"++) { var "+$ruleErr+" = vErrors["+$i+"]; if ("+$ruleErr+".dataPath === undefined) "+$ruleErr+".dataPath = (dataPath || '') + "+it.errorPath+"; "+$ruleErr+'.schemaPath = "'+$errSchemaPath+'"; ',it.opts.verbose&&(out+=" "+$ruleErr+".schema = "+$schemaValue+"; "+$ruleErr+".data = "+$data+"; "),out+=" } } else { "+def_customError+" } "),out+=" } ",$breakOnError&&(out+=" else { ")}return out}}});var require_json_schema_draft_07=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/refs/json-schema-draft-07.json"(exports,module){module.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}});var require_definition_schema=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/definition_schema.js"(exports,module){"use strict";var metaSchema=require_json_schema_draft_07();module.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:metaSchema.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:metaSchema.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}}});var require_keyword=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/keyword.js"(exports,module){"use strict";var IDENTIFIER=/^[a-z_$][a-z0-9_$-]*$/i,customRuleCode=require_custom(),definitionSchema=require_definition_schema();module.exports={add:addKeyword,get:getKeyword,remove:removeKeyword,validate:validateKeyword};function addKeyword(keyword,definition){var RULES=this.RULES;if(RULES.keywords[keyword])throw new Error("Keyword "+keyword+" is already defined");if(!IDENTIFIER.test(keyword))throw new Error("Keyword "+keyword+" is not a valid identifier");if(definition){this.validateKeyword(definition,!0);var dataType=definition.type;if(Array.isArray(dataType))for(var i=0;i<dataType.length;i++)_addRule(keyword,dataType[i],definition);else _addRule(keyword,dataType,definition);var metaSchema=definition.metaSchema;metaSchema&&(definition.$data&&this._opts.$data&&(metaSchema={anyOf:[metaSchema,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),definition.validateSchema=this.compile(metaSchema,!0))}RULES.keywords[keyword]=RULES.all[keyword]=!0;function _addRule(keyword2,dataType2,definition2){for(var ruleGroup,i2=0;i2<RULES.length;i2++){var rg=RULES[i2];if(rg.type==dataType2){ruleGroup=rg;break}}ruleGroup||(ruleGroup={type:dataType2,rules:[]},RULES.push(ruleGroup));var rule={keyword:keyword2,definition:definition2,custom:!0,code:customRuleCode,implements:definition2.implements};ruleGroup.rules.push(rule),RULES.custom[keyword2]=rule}return this}function getKeyword(keyword){var rule=this.RULES.custom[keyword];return rule?rule.definition:this.RULES.keywords[keyword]||!1}function removeKeyword(keyword){var RULES=this.RULES;delete RULES.keywords[keyword],delete RULES.all[keyword],delete RULES.custom[keyword];for(var i=0;i<RULES.length;i++)for(var rules=RULES[i].rules,j=0;j<rules.length;j++)if(rules[j].keyword==keyword){rules.splice(j,1);break}return this}function validateKeyword(definition,throwError){validateKeyword.errors=null;var v=this._validateKeyword=this._validateKeyword||this.compile(definitionSchema,!0);if(v(definition))return!0;if(validateKeyword.errors=v.errors,throwError)throw new Error("custom keyword definition is invalid: "+this.errorsText(v.errors));return!1}}});var require_data2=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/refs/data.json"(exports,module){module.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}});var require_ajv=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/ajv.js"(exports,module){"use strict";var compileSchema=require_compile(),resolve2=require_resolve(),Cache=require_cache(),SchemaObject=require_schema_obj(),stableStringify=require_fast_json_stable_stringify(),formats=require_formats(),rules=require_rules(),$dataMetaSchema=require_data(),util=require_util();module.exports=Ajv;Ajv.prototype.validate=validate;Ajv.prototype.compile=compile;Ajv.prototype.addSchema=addSchema;Ajv.prototype.addMetaSchema=addMetaSchema;Ajv.prototype.validateSchema=validateSchema;Ajv.prototype.getSchema=getSchema;Ajv.prototype.removeSchema=removeSchema;Ajv.prototype.addFormat=addFormat;Ajv.prototype.errorsText=errorsText;Ajv.prototype._addSchema=_addSchema;Ajv.prototype._compile=_compile;Ajv.prototype.compileAsync=require_async();var customKeyword=require_keyword();Ajv.prototype.addKeyword=customKeyword.add;Ajv.prototype.getKeyword=customKeyword.get;Ajv.prototype.removeKeyword=customKeyword.remove;Ajv.prototype.validateKeyword=customKeyword.validate;var errorClasses=require_error_classes();Ajv.ValidationError=errorClasses.Validation;Ajv.MissingRefError=errorClasses.MissingRef;Ajv.$dataMetaSchema=$dataMetaSchema;var META_SCHEMA_ID="http://json-schema.org/draft-07/schema",META_IGNORE_OPTIONS=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],META_SUPPORT_DATA=["/properties"];function Ajv(opts){if(!(this instanceof Ajv))return new Ajv(opts);opts=this._opts=util.copy(opts)||{},setLogger(this),this._schemas={},this._refs={},this._fragments={},this._formats=formats(opts.format),this._cache=opts.cache||new Cache,this._loadingSchemas={},this._compilations=[],this.RULES=rules(),this._getId=chooseGetId(opts),opts.loopRequired=opts.loopRequired||1/0,opts.errorDataPath=="property"&&(opts._errorDataPathProperty=!0),opts.serialize===void 0&&(opts.serialize=stableStringify),this._metaOpts=getMetaSchemaOptions(this),opts.formats&&addInitialFormats(this),opts.keywords&&addInitialKeywords(this),addDefaultMetaSchema(this),typeof opts.meta=="object"&&this.addMetaSchema(opts.meta),opts.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),addInitialSchemas(this)}function validate(schemaKeyRef,data){var v;if(typeof schemaKeyRef=="string"){if(v=this.getSchema(schemaKeyRef),!v)throw new Error('no schema with key or ref "'+schemaKeyRef+'"')}else{var schemaObj=this._addSchema(schemaKeyRef);v=schemaObj.validate||this._compile(schemaObj)}var valid=v(data);return v.$async!==!0&&(this.errors=v.errors),valid}function compile(schema,_meta){var schemaObj=this._addSchema(schema,void 0,_meta);return schemaObj.validate||this._compile(schemaObj)}function addSchema(schema,key,_skipValidation,_meta){if(Array.isArray(schema)){for(var i=0;i<schema.length;i++)this.addSchema(schema[i],void 0,_skipValidation,_meta);return this}var id=this._getId(schema);if(id!==void 0&&typeof id!="string")throw new Error("schema id must be string");return key=resolve2.normalizeId(key||id),checkUnique(this,key),this._schemas[key]=this._addSchema(schema,_skipValidation,_meta,!0),this}function addMetaSchema(schema,key,skipValidation){return this.addSchema(schema,key,skipValidation,!0),this}function validateSchema(schema,throwOrLogError){var $schema=schema.$schema;if($schema!==void 0&&typeof $schema!="string")throw new Error("$schema must be a string");if($schema=$schema||this._opts.defaultMeta||defaultMeta(this),!$schema)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var valid=this.validate($schema,schema);if(!valid&&throwOrLogError){var message="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error(message);else throw new Error(message)}return valid}function defaultMeta(self){var meta=self._opts.meta;return self._opts.defaultMeta=typeof meta=="object"?self._getId(meta)||meta:self.getSchema(META_SCHEMA_ID)?META_SCHEMA_ID:void 0,self._opts.defaultMeta}function getSchema(keyRef){var schemaObj=_getSchemaObj(this,keyRef);switch(typeof schemaObj){case"object":return schemaObj.validate||this._compile(schemaObj);case"string":return this.getSchema(schemaObj);case"undefined":return _getSchemaFragment(this,keyRef)}}function _getSchemaFragment(self,ref){var res=resolve2.schema.call(self,{schema:{}},ref);if(res){var schema=res.schema,root=res.root,baseId=res.baseId,v=compileSchema.call(self,schema,root,void 0,baseId);return self._fragments[ref]=new SchemaObject({ref,fragment:!0,schema,root,baseId,validate:v}),v}}function _getSchemaObj(self,keyRef){return keyRef=resolve2.normalizeId(keyRef),self._schemas[keyRef]||self._refs[keyRef]||self._fragments[keyRef]}function removeSchema(schemaKeyRef){if(schemaKeyRef instanceof RegExp)return _removeAllSchemas(this,this._schemas,schemaKeyRef),_removeAllSchemas(this,this._refs,schemaKeyRef),this;switch(typeof schemaKeyRef){case"undefined":return _removeAllSchemas(this,this._schemas),_removeAllSchemas(this,this._refs),this._cache.clear(),this;case"string":var schemaObj=_getSchemaObj(this,schemaKeyRef);return schemaObj&&this._cache.del(schemaObj.cacheKey),delete this._schemas[schemaKeyRef],delete this._refs[schemaKeyRef],this;case"object":var serialize=this._opts.serialize,cacheKey=serialize?serialize(schemaKeyRef):schemaKeyRef;this._cache.del(cacheKey);var id=this._getId(schemaKeyRef);id&&(id=resolve2.normalizeId(id),delete this._schemas[id],delete this._refs[id])}return this}function _removeAllSchemas(self,schemas,regex){for(var keyRef in schemas){var schemaObj=schemas[keyRef];!schemaObj.meta&&(!regex||regex.test(keyRef))&&(self._cache.del(schemaObj.cacheKey),delete schemas[keyRef])}}function _addSchema(schema,skipValidation,meta,shouldAddSchema){if(typeof schema!="object"&&typeof schema!="boolean")throw new Error("schema should be object or boolean");var serialize=this._opts.serialize,cacheKey=serialize?serialize(schema):schema,cached=this._cache.get(cacheKey);if(cached)return cached;shouldAddSchema=shouldAddSchema||this._opts.addUsedSchema!==!1;var id=resolve2.normalizeId(this._getId(schema));id&&shouldAddSchema&&checkUnique(this,id);var willValidate=this._opts.validateSchema!==!1&&!skipValidation,recursiveMeta;willValidate&&!(recursiveMeta=id&&id==resolve2.normalizeId(schema.$schema))&&this.validateSchema(schema,!0);var localRefs=resolve2.ids.call(this,schema),schemaObj=new SchemaObject({id,schema,localRefs,cacheKey,meta});return id[0]!="#"&&shouldAddSchema&&(this._refs[id]=schemaObj),this._cache.put(cacheKey,schemaObj),willValidate&&recursiveMeta&&this.validateSchema(schema,!0),schemaObj}function _compile(schemaObj,root){if(schemaObj.compiling)return schemaObj.validate=callValidate,callValidate.schema=schemaObj.schema,callValidate.errors=null,callValidate.root=root||callValidate,schemaObj.schema.$async===!0&&(callValidate.$async=!0),callValidate;schemaObj.compiling=!0;var currentOpts;schemaObj.meta&&(currentOpts=this._opts,this._opts=this._metaOpts);var v;try{v=compileSchema.call(this,schemaObj.schema,root,schemaObj.localRefs)}catch(e){throw delete schemaObj.validate,e}finally{schemaObj.compiling=!1,schemaObj.meta&&(this._opts=currentOpts)}return schemaObj.validate=v,schemaObj.refs=v.refs,schemaObj.refVal=v.refVal,schemaObj.root=v.root,v;function callValidate(){var _validate=schemaObj.validate,result=_validate.apply(this,arguments);return callValidate.errors=_validate.errors,result}}function chooseGetId(opts){switch(opts.schemaId){case"auto":return _get$IdOrId;case"id":return _getId;default:return _get$Id}}function _getId(schema){return schema.$id&&this.logger.warn("schema $id ignored",schema.$id),schema.id}function _get$Id(schema){return schema.id&&this.logger.warn("schema id ignored",schema.id),schema.$id}function _get$IdOrId(schema){if(schema.$id&&schema.id&&schema.$id!=schema.id)throw new Error("schema $id is different from id");return schema.$id||schema.id}function errorsText(errors,options){if(errors=errors||this.errors,!errors)return"No errors";options=options||{};for(var separator=options.separator===void 0?", ":options.separator,dataVar=options.dataVar===void 0?"data":options.dataVar,text="",i=0;i<errors.length;i++){var e=errors[i];e&&(text+=dataVar+e.dataPath+" "+e.message+separator)}return text.slice(0,-separator.length)}function addFormat(name,format){return typeof format=="string"&&(format=new RegExp(format)),this._formats[name]=format,this}function addDefaultMetaSchema(self){var $dataSchema;if(self._opts.$data&&($dataSchema=require_data2(),self.addMetaSchema($dataSchema,$dataSchema.$id,!0)),self._opts.meta!==!1){var metaSchema=require_json_schema_draft_07();self._opts.$data&&(metaSchema=$dataMetaSchema(metaSchema,META_SUPPORT_DATA)),self.addMetaSchema(metaSchema,META_SCHEMA_ID,!0),self._refs["http://json-schema.org/schema"]=META_SCHEMA_ID}}function addInitialSchemas(self){var optsSchemas=self._opts.schemas;if(optsSchemas)if(Array.isArray(optsSchemas))self.addSchema(optsSchemas);else for(var key in optsSchemas)self.addSchema(optsSchemas[key],key)}function addInitialFormats(self){for(var name in self._opts.formats){var format=self._opts.formats[name];self.addFormat(name,format)}}function addInitialKeywords(self){for(var name in self._opts.keywords){var keyword=self._opts.keywords[name];self.addKeyword(name,keyword)}}function checkUnique(self,id){if(self._schemas[id]||self._refs[id])throw new Error('schema with key or id "'+id+'" already exists')}function getMetaSchemaOptions(self){for(var metaOpts=util.copy(self._opts),i=0;i<META_IGNORE_OPTIONS.length;i++)delete metaOpts[META_IGNORE_OPTIONS[i]];return metaOpts}function setLogger(self){var logger=self._opts.logger;if(logger===!1)self.logger={log:noop,warn:noop,error:noop};else{if(logger===void 0&&(logger=console),!(typeof logger=="object"&&logger.log&&logger.warn&&logger.error))throw new Error("logger must implement log, warn and error methods");self.logger=logger}}function noop(){}}});var require_validate_package_manifest=__commonJS({"../../internals/cli-builder-integration/dist/validate-package-manifest.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),validate_package_manifest_exports={};__export(validate_package_manifest_exports,{validatePackageManifest:()=>validatePackageManifest});module.exports=__toCommonJS(validate_package_manifest_exports);var import_ajv=__toESM2(require_ajv()),import_build_utils3=__require("@vercel/build-utils"),ajv=new import_ajv.default,validate=ajv.compile(import_build_utils3.packageManifestSchema);function validatePackageManifest(data){return validate(data)?null:(validate.errors??[]).map(e=>`${e.dataPath||"(root)"} ${e.message}`).join("; ")}}});var require_manifest=__commonJS({"../../internals/cli-builder-integration/dist/manifest.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),manifest_exports={};__export(manifest_exports,{writeManifests:()=>writeManifests});module.exports=__toCommonJS(manifest_exports);var import_path2=__require("path"),import_build_utils3=__require("@vercel/build-utils");async function writeManifests(packageManifests,diagnostics,ops,outputDir){if(packageManifests.length===0)return;let projectManifest={},deployManifestBuilds={},deployManifestServices={};for(let{workspace,buildConfig,manifest,service,builderUse}of packageManifests){let key=`${builderUse}:${workspace}`,framework=service?.framework??buildConfig.framework??manifest.framework;projectManifest[key]={...manifest,workspace,builder:builderUse,framework,serviceName:service?.name,serviceType:service&&(0,import_build_utils3.isExperimentalService)(service)?service.type:void 0,routePrefix:service&&(0,import_build_utils3.isExperimentalService)(service)?service.routePrefix:void 0};let{version:_version,...manifestWithoutVersion}=manifest;if(deployManifestBuilds[key]={...manifestWithoutVersion,framework,root:workspace,builder:builderUse},service){let existing=deployManifestServices[service.name];existing?existing.builds.push(key):deployManifestServices[service.name]={builds:[key],bindings:(0,import_build_utils3.isExperimentalServiceV2)(service)?service.bindings:void 0}}}if(Object.keys(projectManifest).length===0)return;let projectManifestBlob=new import_build_utils3.FileBlob({data:JSON.stringify(projectManifest)});diagnostics["project-manifest.json"]=projectManifestBlob,ops.push((0,import_build_utils3.downloadFile)(projectManifestBlob,(0,import_path2.join)(outputDir,"diagnostics","project-manifest.json")).then(()=>{},err=>err));let deployManifestBlob=new import_build_utils3.FileBlob({data:JSON.stringify({manifestVersion:"2.0",builds:deployManifestBuilds,services:deployManifestServices})});diagnostics["deploy-manifest.json"]=deployManifestBlob,ops.push((0,import_build_utils3.downloadFile)(deployManifestBlob,(0,import_path2.join)(outputDir,"diagnostics","deploy-manifest.json")).then(()=>{},err=>err))}}});var require_build_embedding=__commonJS({"../../internals/cli-builder-integration/dist/build-embedding.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),build_embedding_exports={};__export(build_embedding_exports,{shouldEmbedFlagsDefinitions:()=>shouldEmbedFlagsDefinitions});module.exports=__toCommonJS(build_embedding_exports);var import_build_utils3=__require("@vercel/build-utils");function isFlagsEmbedOption(input){return input==="force-on"||input==="force-off"}var SDK_KEY_REGEX=/^vf_(?:server|client)_/;function envHasSdkKey(){for(let value of Object.values(process.env))if(typeof value=="string"&&SDK_KEY_REGEX.test(value))return!0}async function shouldEmbedFlagsDefinitions(cwd,packageJson){if(process.env.VERCEL_FLAGS_DISABLE_DEFINITION_EMBEDDING==="1")return!1;if(isFlagsEmbedOption(process.env.VERCEL_FLAGS_EMBED_DEFINITIONS))return process.env.VERCEL_FLAGS_EMBED_DEFINITIONS==="force-on";if(envHasSdkKey())return!0;let hasVercelFlags=await(0,import_build_utils3.isPackageInstalled)("@flags-sdk/vercel",cwd),hasFlagsCore=await(0,import_build_utils3.isPackageInstalled)("@vercel/flags-core",cwd);if(hasVercelFlags||hasFlagsCore)return!0;let dependencies={...packageJson?.dependencies,...packageJson?.devDependencies,...packageJson?.optionalDependencies};return!!(dependencies["@flags-sdk/vercel"]||dependencies["@vercel/flags-core"])}}});var require_validate_build_output=__commonJS({"../../internals/cli-builder-integration/dist/validate-build-output.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),validate_build_output_exports={};__export(validate_build_output_exports,{reportBuildOutputProblems:()=>reportBuildOutputProblems,validateBuildOutput:()=>validateBuildOutput});module.exports=__toCommonJS(validate_build_output_exports);var import_fs_extra2=__toESM2(require_lib()),import_path2=__require("path"),import_build_utils3=__require("@vercel/build-utils");function logDebug(message,output){output?.debug(message),(0,import_build_utils3.debug)(message)}async function validateOutputConfig(configPath,label,problems){if(!await import_fs_extra2.default.pathExists(configPath)){problems.push({severity:"error",message:`${label} is missing config.json.`});return}let config;try{config=await import_fs_extra2.default.readJSON(configPath)}catch(err){problems.push({severity:"error",message:`${label} config.json is not valid JSON: ${err instanceof Error?err.message:String(err)}.`});return}config&&config.version!==3&&problems.push({severity:"warning",message:`${label} config.json has unexpected version "${config.version}" (expected 3).`})}async function validateBuildOutput(outputDir,output){let problems=[];logDebug(`Validating build output at "${outputDir}"`,output);try{await validateOutputConfig((0,import_path2.join)(outputDir,"config.json"),"Build output",problems);let servicesDir=(0,import_path2.join)(outputDir,"services"),serviceNames=[];try{serviceNames=(await import_fs_extra2.default.readdir(servicesDir,{withFileTypes:!0})).filter(e=>e.isDirectory()).map(e=>e.name)}catch(err){if(err?.code!=="ENOENT")throw err}let[hasFunctions,hasStatic]=await Promise.all([import_fs_extra2.default.pathExists((0,import_path2.join)(outputDir,"functions")),import_fs_extra2.default.pathExists((0,import_path2.join)(outputDir,"static"))]),hasServices=serviceNames.length>0;!hasFunctions&&!hasStatic&&!hasServices&&problems.push({severity:"warning",message:'Build output contains no "functions", "static", or "services" directory; the build may not have produced any deployable output.'});for(let name of serviceNames){let serviceDir=(0,import_path2.join)(servicesDir,name),label=`Build output service "${name}"`;await validateOutputConfig((0,import_path2.join)(serviceDir,"config.json"),label,problems);let[svcHasFunctions,svcHasStatic]=await Promise.all([import_fs_extra2.default.pathExists((0,import_path2.join)(serviceDir,"functions")),import_fs_extra2.default.pathExists((0,import_path2.join)(serviceDir,"static"))]);!svcHasFunctions&&!svcHasStatic&&problems.push({severity:"warning",message:`${label} contains no "functions" or "static" directory; the service may not have produced any deployable output.`})}return logDebug(`Build output validation found ${problems.length} problem(s)`+(problems.length?`: ${problems.map(p=>`${p.severity}: ${p.message}`).join("; ")}`:""),output),problems}catch(err){return[{severity:"error",message:`Unexpected error while validating build output: ${err instanceof Error?err.message:String(err)}.`}]}}function reportBuildOutputProblems(problems,output){for(let problem of problems)problem.severity==="error"?output.error(problem.message):output.warn(problem.message)}}});var require_framework_detection=__commonJS({"../../internals/cli-builder-integration/dist/framework-detection.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),framework_detection_exports={};__export(framework_detection_exports,{detectAllFrameworks:()=>detectAllFrameworks,detectFirstDeploymentFramework:()=>detectFirstDeploymentFramework,isFirstDeployment:()=>isFirstDeployment,isFrameworkDetectionEnabled:()=>isFrameworkDetectionEnabled,warnIfFrameworkMismatch:()=>warnIfFrameworkMismatch});module.exports=__toCommonJS(framework_detection_exports);var import_fs_detectors=require_dist2(),import_frameworks=require_frameworks(),import_build_utils3=__require("@vercel/build-utils");function logDebug(message,output){output?.debug(message),(0,import_build_utils3.debug)(message)}function isFrameworkDetectionEnabled(output){let raw=process.env.VERCEL_FRAMEWORK_DETECTION,enabled=raw==="1";return logDebug(`Framework detection: VERCEL_FRAMEWORK_DETECTION=${raw===void 0?"<unset>":JSON.stringify(raw)} -> ${enabled?"enabled":"disabled"}`,output),enabled}function isFirstDeployment(output){let raw=process.env.VERCEL_FIRST_DEPLOYMENT,result=raw==="1";return logDebug(`isFirstDeployment: VERCEL_FIRST_DEPLOYMENT=${raw===void 0?"<unset>":JSON.stringify(raw)} -> ${result}`,output),result}async function detectFirstDeploymentFramework(options){let{workPath,projectSettings,frameworkExplicitlyConfigured,output}=options;if(logDebug(`First deployment: evaluating framework detection (workPath="${workPath}", configuredFramework=${projectSettings.framework?`"${projectSettings.framework}"`:"<none>"})`,output),!isFirstDeployment(output))return logDebug("First deployment: skipping framework detection because this is not a first deployment",output),{status:"skipped"};if(frameworkExplicitlyConfigured||projectSettings.framework)return logDebug(`First deployment: skipping framework detection because a framework is already configured ("${projectSettings.framework}")`,output),{status:"skipped"};logDebug(`First deployment: no framework configured; detecting from source at "${workPath}"`,output);let detected=await(0,import_fs_detectors.detectFrameworkRecord)({fs:new import_fs_detectors.LocalFileSystemDetector(workPath),frameworkList:import_frameworks.frameworkList});if(!detected||!detected.slug)return logDebug("First deployment: no framework detected from source code",output),{status:"not-detected"};let{slug}=detected;return projectSettings.framework=slug,logDebug(`First deployment: detected framework "${slug}"${detected.detectedVersion?` (version ${detected.detectedVersion})`:""}; applied to project settings for this build`,output),{status:"detected",slug,...detected.detectedVersion&&{version:detected.detectedVersion}}}async function detectAllFrameworks(workPath,customFrameworkList,output){logDebug(`Framework cross-check: detecting frameworks at "${workPath}"`,output);let slugs=(await(0,import_fs_detectors.detectFrameworks)({fs:new import_fs_detectors.LocalFileSystemDetector(workPath),frameworkList:customFrameworkList??import_frameworks.frameworkList})).map(f=>f.slug).filter(slug=>!!slug);return logDebug(`Framework cross-check: detected [${slugs.join(", ")||"<none>"}]`,output),slugs}function isHighConfidenceDetection(slug){return import_frameworks.frameworkList.find(f=>f.slug===slug)?.detectionConfidence!=="weak"}function warnIfFrameworkMismatch(options,output){let{configuredFramework,detectedFrameworks,usedBuilders=[],usedFrameworks=[]}=options;if(detectedFrameworks.length===0)return logDebug("Framework cross-check: nothing detected from source; skipping validation",output),"none-detected";let confidentFrameworks=detectedFrameworks.filter(isHighConfidenceDetection);if(configuredFramework)return detectedFrameworks.includes(configuredFramework)?(logDebug(`Framework cross-check: configured framework "${configuredFramework}" matches detected frameworks; no mismatch`,output),"match"):confidentFrameworks.length===0?(logDebug(`Framework cross-check: configured framework "${configuredFramework}" not among detected [${detectedFrameworks.join(", ")}], but all detections are low-confidence; skipping warning`,output),"low-confidence"):(logDebug(`Framework cross-check: configured framework "${configuredFramework}" not among detected [${confidentFrameworks.join(", ")}]; warning`,output),output?.warn(`Your project is configured to use the "${configuredFramework}" framework, but the source code looks like it's for: ${confidentFrameworks.join(", ")}. This may be a misconfiguration.`,null,"https://vercel.com/docs/project-configuration","Learn More"),"configured-mismatch");if(detectedFrameworks.some(slug=>{if(usedFrameworks.includes(slug))return!0;let expectedBuilder=import_frameworks.frameworkList.find(f=>f.slug===slug)?.useRuntime?.use;return expectedBuilder?usedBuilders.some(use=>use===expectedBuilder||use.startsWith(`${expectedBuilder}@`)):!1}))return logDebug(`Framework cross-check: no framework configured, but the build used one of the detected frameworks [${detectedFrameworks.join(", ")}]; no mismatch`,output),"match";let warnableFrameworks=confidentFrameworks.filter(slug=>!!import_frameworks.frameworkList.find(f=>f.slug===slug)?.useRuntime?.use);return warnableFrameworks.length===0?(logDebug(`Framework cross-check: no framework configured and detections [${detectedFrameworks.join(", ")}] are low-confidence or have no dedicated runtime builder; skipping warning`,output),"low-confidence"):(logDebug(`Framework cross-check: no framework configured and the build did not use any of the detected frameworks [${warnableFrameworks.join(", ")}] (used builders: [${usedBuilders.join(", ")||"<none>"}]); warning`,output),output?.warn(`The source code looks like it's for: ${warnableFrameworks.join(", ")}, but no framework is configured for this project and the build did not use ${warnableFrameworks.length===1?"its builder":"their builders"}. Set the framework in your Project Settings if this is unexpected.`,null,"https://vercel.com/docs/project-configuration","Learn More"),"unused-mismatch")}}});var require_constants=__commonJS({"../../internals/runtimes/dist/constants.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),constants_exports={};__export(constants_exports,{BUILDER_RUNTIMES:()=>BUILDER_RUNTIMES,CONTAINER_ENTRYPOINT_CANDIDATES:()=>CONTAINER_ENTRYPOINT_CANDIDATES,ENTRYPOINT_EXTENSIONS:()=>ENTRYPOINT_EXTENSIONS,ROUTE_OWNING_BUILDERS:()=>ROUTE_OWNING_BUILDERS,RUNTIME_BUILDERS:()=>RUNTIME_BUILDERS,RUNTIME_MANIFESTS:()=>RUNTIME_MANIFESTS,STATIC_BUILDERS:()=>STATIC_BUILDERS});module.exports=__toCommonJS(constants_exports);var RUNTIME_BUILDERS={node:"@vercel/backends",python:"@vercel/python",go:"@vercel/go",rust:"@vercel/rust",ruby:"@vercel/ruby",container:"@vercel/container"},RUNTIME_MANIFESTS={node:["package.json"],python:["pyproject.toml","requirements.txt","Pipfile","pylock.yml","uv.lock","setup.py"],go:["go.mod"],ruby:["Gemfile"],rust:["Cargo.toml"]},ENTRYPOINT_EXTENSIONS={".ts":"node",".mts":"node",".js":"node",".mjs":"node",".cjs":"node",".py":"python",".go":"go",".rs":"rust",".rb":"ruby",".ru":"ruby"},BUILDER_RUNTIMES=Object.fromEntries(Object.entries(RUNTIME_BUILDERS).map(([runtime,builder])=>[builder,runtime])),STATIC_BUILDERS=new Set(["@vercel/static-build","@vercel/static"]),ROUTE_OWNING_BUILDERS=new Set(["@vercel/next","@vercel/backends"]),CONTAINER_ENTRYPOINT_CANDIDATES=["Dockerfile.vercel","Containerfile.vercel","Dockerfile","Containerfile"]}});var require_framework=__commonJS({"../../internals/runtimes/dist/framework.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),framework_exports={};__export(framework_exports,{DETECTION_FRAMEWORKS:()=>DETECTION_FRAMEWORKS,filterFrameworksByRuntime:()=>filterFrameworksByRuntime,frameworksBySlug:()=>frameworksBySlug,inferBuilderRuntimeFromFramework:()=>inferBuilderRuntimeFromFramework,inferRuntimeFromFramework:()=>inferRuntimeFromFramework,inferServerRuntimeFromFramework:()=>inferServerRuntimeFromFramework,isBFFFramework:()=>isBFFFramework,isFrontendFramework:()=>isFrontendFramework});module.exports=__toCommonJS(framework_exports);var import_build_utils3=__require("@vercel/build-utils"),import_frameworks=require_frameworks(),import_constants=require_constants(),frameworksBySlug=new Map(import_frameworks.frameworkList.flatMap(f=>typeof f.slug=="string"?[[f.slug,f]]:[])),DETECTION_FRAMEWORKS=import_frameworks.frameworkList.filter(framework=>!framework.experimental||framework.runtimeFramework);function inferRuntimeFromFramework(framework){if(framework){if(framework in import_constants.RUNTIME_BUILDERS)return framework;if((0,import_build_utils3.isPythonFramework)(framework))return"python";if((0,import_build_utils3.isBackendFramework)(framework))return"node"}}var STATIC_BUILDER_RUNTIMES={hugo:"go",jekyll:"ruby",middleman:"ruby",zola:"rust"};function inferServerRuntimeFromFramework(framework){if(!framework||framework==="services")return;let builder=frameworksBySlug.get(framework)?.useRuntime?.use;if(builder)return import_constants.BUILDER_RUNTIMES[builder]??"node"}function inferBuilderRuntimeFromFramework(framework){if(!framework||framework==="container"||framework==="services")return;let f=frameworksBySlug.get(framework),declaredBuilder=f?.useRuntime?.use;if(declaredBuilder)return import_constants.BUILDER_RUNTIMES[declaredBuilder];let detectorItems=[...f?.detectors?.every??[],...f?.detectors?.some??[]];return STATIC_BUILDER_RUNTIMES[framework]??(detectorItems.some(d=>d.matchPackage!==void 0)?"node":void 0)}function isFrontendFramework(framework){return!!framework&&!inferRuntimeFromFramework(framework)}var BFF_FRAMEWORKS=new Set(["nextjs","nuxtjs","sveltekit","remix","solidstart"]);function isBFFFramework(framework){return!!framework&&BFF_FRAMEWORKS.has(framework)}function filterFrameworksByRuntime(frameworks,runtime){return runtime?frameworks.filter(f=>inferRuntimeFromFramework(f.slug)===runtime):[...frameworks]}}});var require_runtime=__commonJS({"../../internals/runtimes/dist/runtime.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),runtime_exports={};__export(runtime_exports,{getBuilderForRuntime:()=>getBuilderForRuntime,inferRuntime:()=>inferRuntime});module.exports=__toCommonJS(runtime_exports);var import_constants=require_constants(),import_framework=require_framework();function getBuilderForRuntime(runtime){let builder=import_constants.RUNTIME_BUILDERS[runtime];if(!builder)throw new Error(`Unknown runtime: ${runtime}`);return builder}function inferRuntime(config){if(config.runtime&&config.runtime in import_constants.RUNTIME_BUILDERS)return config.runtime;let frameworkRuntime=(0,import_framework.inferRuntimeFromFramework)(config.framework);if(frameworkRuntime)return frameworkRuntime;if(config.builder){for(let[runtime,builderName]of Object.entries(import_constants.RUNTIME_BUILDERS))if(config.builder===builderName)return runtime}if(config.entrypoint){if(config.entrypoint==="pyproject.toml"||config.entrypoint.endsWith("/pyproject.toml"))return"python";for(let[ext,runtime]of Object.entries(import_constants.ENTRYPOINT_EXTENSIONS))if(config.entrypoint.endsWith(ext))return runtime}}}});var require_monorepo=__commonJS({"../../internals/cli-builder-integration/dist/monorepo.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),monorepo_exports={};__export(monorepo_exports,{applyServicesMonorepoDefaults:()=>applyServicesMonorepoDefaults,setMonorepoDefaultSettings:()=>setMonorepoDefaultSettings});module.exports=__toCommonJS(monorepo_exports);var import_path2=__require("path"),import_fs_detectors=require_dist2(),import_runtime=require_runtime(),import_title=__toESM2(require_lib2()),import_fs_extra2=__toESM2(require_lib()),import_build_utils3=__require("@vercel/build-utils");async function setMonorepoDefaultSettings(cwd,workPath,projectSettings,output){let localFileSystem=new import_fs_detectors.LocalFileSystemDetector(cwd),projectName=(0,import_path2.basename)(workPath),relativeToRoot=(0,import_path2.relative)(workPath,cwd),setCommand=(command,value)=>{projectSettings[command]?(0,import_build_utils3.debug)(`Skipping auto-assignment of ${command} as it is already set via project settings or configuration overrides.`):projectSettings[command]=value};try{let result=await(0,import_fs_detectors.getMonorepoDefaultSettings)(projectName,(0,import_path2.relative)(cwd,workPath),relativeToRoot,localFileSystem);if(result===null)return;projectSettings.monorepoManager=result.monorepoManager;let{monorepoManager,...commands}=result;output.log(`Detected ${(0,import_title.default)(monorepoManager)}. Adjusting default settings...`),commands.buildCommand&&setCommand("buildCommand",commands.buildCommand),commands.installCommand&&setCommand("installCommand",commands.installCommand),commands.commandForIgnoringBuildStep&&setCommand("commandForIgnoringBuildStep",commands.commandForIgnoringBuildStep)}catch(error){if(error instanceof import_fs_detectors.MissingBuildPipeline||error instanceof import_fs_detectors.MissingBuildTarget){output.warn(`${error.message} Skipping automatic setting assignment.`);return}throw error}}async function hasVercelBuildScript(serviceRoot){try{return(await import_fs_extra2.default.readJSON((0,import_path2.join)(serviceRoot,"package.json")))?.scripts?.["vercel-build"]!==void 0}catch{return!1}}async function applyServicesMonorepoDefaults(cwd,workPath,services,projectSettings,output){let localFileSystem=new import_fs_detectors.LocalFileSystemDetector(cwd),result,announced=!1;for(let[name,config]of Object.entries(services)){if(config.buildCommand){(0,import_build_utils3.debug)(`Skipping auto-assignment of buildCommand for service "${name}" as it is already set in the services configuration.`);continue}let runtime=(0,import_runtime.inferRuntime)({runtime:config.runtime,framework:config.framework,entrypoint:config.entrypoint});if(runtime!==void 0&&runtime!=="node"){(0,import_build_utils3.debug)(`Skipping monorepo defaults for service "${name}": runtime "${runtime}" does not build via the monorepo task graph.`);continue}let serviceRoot=(0,import_path2.resolve)(workPath,config.root??"."),projectPath=(0,import_path2.relative)(cwd,serviceRoot);if((0,import_path2.isAbsolute)(projectPath)||projectPath===".."||projectPath.startsWith(`..${import_path2.sep}`)){(0,import_build_utils3.debug)(`Skipping monorepo defaults for service "${name}": root "${config.root}" is outside "${cwd}".`);continue}if(await hasVercelBuildScript(serviceRoot)){(0,import_build_utils3.debug)(`Skipping monorepo defaults for service "${name}": a \`vercel-build\` script is defined in its root package.json.`);continue}let posixProjectPath=(0,import_build_utils3.normalizePath)(projectPath),posixRelativeToRoot=(0,import_build_utils3.normalizePath)((0,import_path2.relative)(serviceRoot,cwd)),settings;try{settings=await(0,import_fs_detectors.getMonorepoDefaultSettings)((0,import_path2.basename)(serviceRoot),posixProjectPath||"/",posixRelativeToRoot,localFileSystem)}catch(error){if(error instanceof import_fs_detectors.MissingBuildPipeline){output.warn(`${error.message} Skipping automatic setting assignment.`);break}if(error instanceof import_fs_detectors.MissingBuildTarget){output.warn(`Service "${name}": ${error.message} Skipping automatic setting assignment.`);continue}throw error}if(settings===null)break;projectSettings.monorepoManager=settings.monorepoManager,settings.buildCommand&&(announced||(output.log(`Detected ${(0,import_title.default)(settings.monorepoManager)}. Adjusting default settings...`),announced=!0),(0,import_build_utils3.debug)(`Assigning buildCommand "${settings.buildCommand}" to service "${name}".`),result??={...services},result[name]={...config,buildCommand:settings.buildCommand})}return result??services}}});var require_corepack=__commonJS({"../../internals/cli-builder-integration/dist/corepack.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),corepack_exports={};__export(corepack_exports,{cleanupCorepack:()=>cleanupCorepack,initCorepack:()=>initCorepack});module.exports=__toCommonJS(corepack_exports);var import_path2=__require("path"),import_build_utils3=__require("@vercel/build-utils"),import_fs_extra2=__toESM2(require_lib());async function initCorepack({repoRootPath,output,readJSONFile:readJSONFile2,isCantParseJSONFile,warmPackageManager=!1}){if(process.env.ENABLE_EXPERIMENTAL_COREPACK!=="1")return null;let pkg=await readJSONFile2((0,import_path2.join)(repoRootPath,"package.json"));if(isCantParseJSONFile(pkg))output.warn("Warning: Could not enable corepack because package.json is invalid JSON",pkg.meta?.parseErrorLocation??pkg.message);else if(!pkg?.packageManager)output.warn('Warning: Could not enable corepack because package.json is missing "packageManager" property');else{output.log(`Detected ENABLE_EXPERIMENTAL_COREPACK=1 and "${pkg.packageManager}" in package.json`);let corepackRootDir=(0,import_path2.join)(repoRootPath,".vercel","cache","corepack"),corepackHomeDir=(0,import_path2.join)(corepackRootDir,"home"),corepackShimDir=(0,import_path2.join)(corepackRootDir,"shim");await import_fs_extra2.default.mkdirp(corepackHomeDir),await import_fs_extra2.default.mkdirp(corepackShimDir),process.env.COREPACK_HOME=corepackHomeDir,process.env.PATH=`${corepackShimDir}${import_path2.delimiter}${process.env.PATH}`;let pkgManagerName=pkg.packageManager.split("@")[0];if(await(0,import_build_utils3.spawnAsync)("corepack",["enable",pkgManagerName,"--install-directory",corepackShimDir],{prettyCommand:`corepack enable ${pkgManagerName}`}),warmPackageManager)try{await(0,import_build_utils3.spawnAsync)(pkgManagerName,["--version"],{prettyCommand:`${pkgManagerName} --version`,stdio:"pipe"})}catch(err){output.debug(`Failed to pre-download "${pkg.packageManager}" via corepack: ${err instanceof Error?err.message:String(err)}`)}return corepackShimDir}return null}function cleanupCorepack(corepackShimDir){process.env.COREPACK_HOME&&delete process.env.COREPACK_HOME,process.env.PATH&&(process.env.PATH=process.env.PATH.replace(`${corepackShimDir}${import_path2.delimiter}`,""))}}});var require_entrypoint=__commonJS({"../../internals/runtimes/dist/entrypoint.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),entrypoint_exports={};__export(entrypoint_exports,{SCHEDULE_ENTRYPOINT_FORMS_HINT:()=>SCHEDULE_ENTRYPOINT_FORMS_HINT,isDockerfileEntrypoint:()=>isDockerfileEntrypoint,parsePyModuleAttrEntrypoint:()=>parsePyModuleAttrEntrypoint,parseScheduleEntrypoint:()=>parseScheduleEntrypoint,stripTrailingSlash:()=>stripTrailingSlash});module.exports=__toCommonJS(entrypoint_exports);var import_path2=__require("path"),import_constants=require_constants(),PYTHON_MODULE_ATTR_RE=/^([A-Za-z_][\w]*(?:\.[A-Za-z_][\w]*)*):([A-Za-z_][\w]*)$/,NODE_FILE_ENTRYPOINT_RE=/^(?!\/)(?!.*(?:^|\/)\.\.?(?:\/|$))(?:[\w@+.-]+\/)*[\w@+.-]+\.[cm]?[jt]s$/,NODE_DECLARATION_ENTRYPOINT_RE=/\.d\.[cm]?ts$/;function parsePyModuleAttrEntrypoint(entrypoint){let match=PYTHON_MODULE_ATTR_RE.exec(entrypoint);if(!match)return null;let[,modulePart,attrName]=match;return!modulePart||!attrName?null:{attrName,filePath:modulePart.replace(/\./g,"/")+".py",moduleName:modulePart}}var SCHEDULE_ENTRYPOINT_FORMS_HINT='Use a source file path like "jobs/nightly.ts" or a Python "module.path:function" reference.';function parseScheduleEntrypoint(entrypoint){let python=parsePyModuleAttrEntrypoint(entrypoint);return python?{runtime:"python",...python}:NODE_FILE_ENTRYPOINT_RE.test(entrypoint)&&!NODE_DECLARATION_ENTRYPOINT_RE.test(entrypoint)?{runtime:"node",filePath:entrypoint}:null}var CONTAINER_ENTRYPOINT_BASENAMES=new Set(import_constants.CONTAINER_ENTRYPOINT_CANDIDATES.map(name=>name.toLowerCase()));function isDockerfileEntrypoint(entrypoint){return CONTAINER_ENTRYPOINT_BASENAMES.has(import_path2.posix.basename(entrypoint).toLowerCase())}function stripTrailingSlash(p){let stripped=p.replace(/\/+$/,"");return stripped===""?".":stripped}}});var require_schedule_entrypoint=__commonJS({"../../internals/runtimes/dist/schedule-entrypoint.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),schedule_entrypoint_exports={};__export(schedule_entrypoint_exports,{resolveScheduleEntrypoint:()=>resolveScheduleEntrypoint,validateScheduleEntrypointRuntimes:()=>validateScheduleEntrypointRuntimes});module.exports=__toCommonJS(schedule_entrypoint_exports);var import_entrypoint=require_entrypoint(),import_framework=require_framework();function resolveScheduleEntrypoint(entrypoint,files,framework){let parsed=(0,import_entrypoint.parseScheduleEntrypoint)(entrypoint);if(!parsed)return{ok:!1,code:"INVALID_SCHEDULE_ENTRYPOINT",message:`has invalid entrypoint "${entrypoint}". ${import_entrypoint.SCHEDULE_ENTRYPOINT_FORMS_HINT}`};let frameworkRuntime=(0,import_framework.inferServerRuntimeFromFramework)(framework);if(frameworkRuntime&&parsed.runtime!==frameworkRuntime)return{ok:!1,code:"SCHEDULE_ENTRYPOINT_RUNTIME_MISMATCH",message:`entrypoint "${entrypoint}" uses the ${parsed.runtime} runtime, but framework "${framework}" uses the ${frameworkRuntime} runtime. Schedule entrypoints must use the same runtime as the framework.`};switch(parsed.runtime){case"python":return{ok:!1,code:"UNSUPPORTED_SCHEDULE_ENTRYPOINT_RUNTIME",message:`entrypoint "${entrypoint}" uses an unsupported runtime. Python schedule entrypoints are not supported yet.`};case"node":return{ok:!1,code:"UNSUPPORTED_SCHEDULE_ENTRYPOINT_RUNTIME",message:`entrypoint "${entrypoint}" uses an unsupported runtime. JavaScript and TypeScript schedule entrypoints are not supported yet.`}}}function validateScheduleEntrypointRuntimes(schedules){let first;for(let{name,entrypoint}of schedules){let parsed=(0,import_entrypoint.parseScheduleEntrypoint)(entrypoint);if(parsed){if(first&&first.runtime!==parsed.runtime)return{ok:!1,code:"MIXED_SCHEDULE_ENTRYPOINT_RUNTIMES",message:`Schedule "${first.name}" entrypoint "${first.entrypoint}" uses the ${first.runtime} runtime, but schedule "${name}" entrypoint "${entrypoint}" uses the ${parsed.runtime} runtime. Schedule entrypoints must all use the same runtime.`};first??={name,entrypoint,runtime:parsed.runtime}}}return{ok:!0}}}});var require_do_build=__commonJS({"../../internals/cli-builder-integration/dist/do-build.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),do_build_exports={};__export(do_build_exports,{doBuild:()=>doBuild3});module.exports=__toCommonJS(do_build_exports);var import_fs_extra2=__toESM2(require_lib()),import_minimatch2=__toESM2(require_minimatch()),import_path2=__require("path"),import_semver=__toESM2(require_semver()),import_build_utils3=__require("@vercel/build-utils"),import_client=require_dist4(),import_frameworks=require_frameworks(),import_fs_detectors=require_dist2(),import_service_topology=require_dist3(),import_detect_builders_with_services=require_detect_builders_with_services(),import_routing_utils=require_dist(),import_write_build_result3=require_write_build_result(),import_build_runner2=require_build_runner(),import_execute_builder=require_execute_builder(),import_build_concurrency=require_build_concurrency(),import_backend_rewrite_warning=require_backend_rewrite_warning(),import_service_route_ownership=require_service_route_ownership(),import_service_schedules=require_service_schedules(),import_validate_cron_secret=require_validate_cron_secret(),import_validate_package_manifest=require_validate_package_manifest(),import_manifest=require_manifest(),import_build_embedding=require_build_embedding(),import_get_files=require_get_files(),import_validate_build_output=require_validate_build_output(),import_framework_detection=require_framework_detection(),import_monorepo=require_monorepo(),import_corepack=require_corepack(),import_schedule_entrypoint=require_schedule_entrypoint();function pickOverrides(config){let overrides={};for(let property of["buildCommand","devCommand","framework","ignoreCommand","installCommand","outputDirectory"])config[property]!==void 0&&(overrides[property==="ignoreCommand"?"commandForIgnoringBuildStep":property]=config[property]);return overrides}function hasScheduleEntrypointTarget(schedule){return"entrypoint"in schedule.target}var SERVICE_BUILD_IMMUTABLE_ENV_VARS=["VERCEL_IMMUTABLE_STATIC_FILES_ENABLED"];function hasNonEmptyObject(value){return value!=null&&typeof value=="object"&&!Array.isArray(value)&&Object.keys(value).length>0}function getGeneratedServiceAlreadyBuiltWarning(service){let framework=service.framework??"unknown",entrypoint=service.entrypoint??service.builder.src??"unknown";return`Detected already-built service "${service.name}" from lazily generated \`.vercel/output/config.json\` (framework: ${framework}, entrypoint: ${entrypoint}). It will not be treated as a service because its build output already exists at the top level. Configure it in \`vercel.json\` as a \`services\` entry to remove this warning.`}async function doBuild3(request,dependencies){let{project,buildsJson,cwd,outputDir,span,standalone=!1,localConfigPath,cliVersion,userAgent}=request,{output,createBuildRunner:createBuildRunner2,canBuildInSubprocess:canBuildInSubprocess2,importBuilders:importBuilders2,formatResolvedBuilders:formatResolvedBuilders2,writeBuildResult:writeBuildResult2,toEnumerableError:toEnumerableError2,readJSONFile:readJSONFile2,isCantParseJSONFile,validateConfig:validateConfig2,compileVercelConfig:compileVercelConfig2,findSourceVercelConfigFile:findSourceVercelConfigFile2,defaultVercelConfigFilename,startBuildTiming}=dependencies,VALID_DEPLOYMENT_ID_PATTERN=/^[a-zA-Z0-9_-]+$/,workPath=(0,import_path2.join)(cwd,project.settings.rootDirectory||"."),repoRootPath=cwd,sourceConfigFile=await findSourceVercelConfigFile2(workPath),corepackShimDir;if(sourceConfigFile){corepackShimDir=await(0,import_corepack.initCorepack)({repoRootPath,output,readJSONFile:readJSONFile2,isCantParseJSONFile,warmPackageManager:(0,import_build_concurrency.resolveBuildConcurrency)()>1});let installDepsSpan=span.child("vc.installDeps"),installRan=!1;try{let installCommand=project.settings.installCommand;typeof installCommand=="string"?installCommand.trim()?(output.log("Running install command before config compilation..."),installRan=await(0,import_build_utils3.runCustomInstallCommand)({destPath:workPath,installCommand,spawnOpts:{env:process.env},projectCreatedAt:project.settings.createdAt})):output.debug("Skipping empty install command"):(output.log("Installing dependencies before config compilation..."),installRan=await(0,import_build_utils3.runNpmInstall)(workPath,[],{env:process.env},void 0,project.settings.createdAt))}finally{installDepsSpan.stop()}if(installRan){let{packageJsonPath}=await(0,import_build_utils3.scanParentDirs)(workPath,!1);packageJsonPath&&(process.env.VERCEL_INSTALL_COMPLETED_PATH=packageJsonPath),process.env.VERCEL_INSTALL_COMPLETED="1"}}let compileResult=await span.child("vc.compileVercelConfig").trace(()=>compileVercelConfig2(workPath)),vercelConfigPath=localConfigPath||compileResult.configPath||(0,import_path2.join)(workPath,"vercel.json"),[pkg,vercelConfig,hasInstrumentation]=await span.child("vc.readConfigInputs").trace(()=>Promise.all([readJSONFile2((0,import_path2.join)(workPath,"package.json")),readJSONFile2(vercelConfigPath),(0,import_fs_detectors.detectInstrumentation)(new import_fs_detectors.LocalFileSystemDetector(workPath))]));if(isCantParseJSONFile(pkg))throw pkg;if(isCantParseJSONFile(vercelConfig))throw vercelConfig;hasInstrumentation&&(output.debug("OpenTelemetry instrumentation detected. Automatic fetch instrumentation will be disabled."),process.env.VERCEL_TRACING_DISABLE_AUTOMATIC_FETCH_INSTRUMENTATION="1"),vercelConfig&&(vercelConfig[import_client.fileNameSymbol]=compileResult.wasCompiled?compileResult.sourceFile||defaultVercelConfigFilename:"vercel.json");let localConfig=vercelConfig||{},validateError=validateConfig2(localConfig);if(validateError)throw validateError;if(localConfig.crons&&localConfig.crons.length>0){let cronSecretError=(0,import_validate_cron_secret.validateCronSecret)(process.env.CRON_SECRET);if(cronSecretError)throw cronSecretError}let projectSettings={...project.settings,...pickOverrides(localConfig)};buildsJson.detectedFramework=await span.child("vc.detectFirstDeploymentFramework",{firstDeployment:String(process.env.VERCEL_FIRST_DEPLOYMENT==="1"),configuredFramework:projectSettings.framework??void 0}).trace(async s=>{let result=await(0,import_framework_detection.detectFirstDeploymentFramework)({workPath,projectSettings,frameworkExplicitlyConfigured:Object.prototype.hasOwnProperty.call(localConfig,"framework"),output});return s.setAttributes({detectionStatus:result.status,detectedFramework:result.slug,detectedFrameworkVersion:result.version}),result}),process.env.VERCEL_BUILD_MONOREPO_SUPPORT==="1"&&pkg?.scripts?.["vercel-build"]===void 0&&projectSettings.rootDirectory!==null&&projectSettings.rootDirectory!=="."&&await span.child("vc.setMonorepoDefaultSettings").trace(()=>(0,import_monorepo.setMonorepoDefaultSettings)(cwd,workPath,projectSettings,output)),await span.child("vc.prepareFlagsDefinitions").trace(async s=>{let shouldEmbed=await(0,import_build_embedding.shouldEmbedFlagsDefinitions)(cwd,pkg);if(s.setAttributes({shouldEmbed:String(shouldEmbed)}),!shouldEmbed)return;let{prepareFlagsDefinitions}=await import("@vercel/prepare-flags-definitions");await prepareFlagsDefinitions({cwd,env:process.env,userAgentSuffix:userAgent,output})});let files=await span.child("vc.getFiles").trace(async s=>{let result=(await(0,import_get_files.staticFiles)(workPath,{},output)).map(f=>(0,import_build_utils3.normalizePath)((0,import_path2.relative)(workPath,f)));return s.setAttributes({fileCount:String(result.length)}),result}),entrypointSchedules=(localConfig.schedules??[]).filter(hasScheduleEntrypointTarget).map(schedule=>({name:schedule.name,entrypoint:schedule.target.entrypoint})),runtimeCheck=(0,import_schedule_entrypoint.validateScheduleEntrypointRuntimes)(entrypointSchedules);if(!runtimeCheck.ok)throw new import_build_utils3.NowBuildError({code:runtimeCheck.code,message:runtimeCheck.message});let scheduleEntrypointUses=new Map;for(let schedule of localConfig.schedules??[]){if(!hasScheduleEntrypointTarget(schedule))continue;let entrypoint=schedule.target.entrypoint,existing=scheduleEntrypointUses.get(entrypoint);if(existing){existing.scheduleNames.push(schedule.name);continue}let resolution=(0,import_schedule_entrypoint.resolveScheduleEntrypoint)(entrypoint,files,projectSettings.framework);if(!resolution.ok)throw new import_build_utils3.NowBuildError({code:resolution.code,message:`Schedule "${schedule.name}" ${resolution.message}`});scheduleEntrypointUses.set(entrypoint,{resolved:resolution.resolved,scheduleNames:[schedule.name]})}let scheduleFunctions=[],entrypointByOutputPath=new Map;for(let{resolved,scheduleNames}of scheduleEntrypointUses.values()){let{outputPath}=resolved.packing,conflicting=entrypointByOutputPath.get(outputPath);if(conflicting!==void 0)throw new import_build_utils3.NowBuildError({code:"SCHEDULE_ENTRYPOINT_OUTPUT_COLLISION",message:`Schedule entrypoints "${conflicting}" and "${resolved.entrypoint}" resolve to the same function output "${outputPath}".`});entrypointByOutputPath.set(outputPath,resolved.entrypoint),scheduleFunctions.push({use:resolved.use,config:{outputPath,entrypoints:[{entrypoint:resolved.entrypoint,sourceFile:resolved.sourceFiles[0],scheduleNames}]}})}let reservedFunctionFiles=Array.from(scheduleEntrypointUses.values()).flatMap(({resolved})=>resolved.sourceFiles),detectedFrameworksPromise=span.child("vc.detectAllFrameworks",{enabled:String((0,import_framework_detection.isFrameworkDetectionEnabled)(output))}).trace(async s=>{if(!(0,import_framework_detection.isFrameworkDetectionEnabled)(output))return[];try{let slugs=await(0,import_framework_detection.detectAllFrameworks)(workPath,void 0,output);return s.setAttributes({detectedFrameworks:slugs.join(",")||void 0,detectedFrameworkCount:String(slugs.length)}),slugs}catch(err){return output.debug(`Framework cross-check detection failed: ${err}`),s.setAttributes({error:err instanceof Error?err.message:String(err)}),[]}}),routesResult=(0,import_routing_utils.getTransformedRoutes)(localConfig);if(routesResult.error)throw routesResult.error;if(localConfig.builds&&localConfig.functions)throw new import_build_utils3.NowBuildError({code:"bad_request",message:"The `functions` property cannot be used in conjunction with the `builds` property. Please remove one of them.",link:"https://vercel.link/functions-and-builds"});let builds=localConfig.builds||[],zeroConfigRoutes=[],zeroConfigFallbackRoutes=[],detectedServices,detectedResolvedServices,servicesToRecord,hasExperimentalServicesV1ConfiguredInVercelConfig=hasNonEmptyObject(localConfig.experimentalServices),hasExperimentalServicesV2ConfiguredInVercelConfig=hasNonEmptyObject(localConfig.services??localConfig.experimentalServicesV2);hasExperimentalServicesV1ConfiguredInVercelConfig&&output.warn("The `experimentalServices` property is deprecated. Migrate to `services`.");let configuredExperimentalServicesV2=hasExperimentalServicesV2ConfiguredInVercelConfig&&(localConfig.services??localConfig.experimentalServicesV2)?localConfig.services??localConfig.experimentalServicesV2:void 0,nestExperimentalServicesV2Output=hasExperimentalServicesV2ConfiguredInVercelConfig,detectedExperimentalServicesV1Config,detectedExperimentalServicesV2Config=configuredExperimentalServicesV2,isZeroConfig=!1;if(builds.length>0)output.warn("Due to `builds` existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: https://vercel.link/unused-build-settings"),builds=builds.flatMap(b=>expandBuild(files,b));else{isZeroConfig=!0;let servicesForDetection=configuredExperimentalServicesV2;process.env.VERCEL_BUILD_MONOREPO_SUPPORT==="1"&&configuredExperimentalServicesV2&&(servicesForDetection=await span.child("vc.applyServicesMonorepoDefaults").trace(()=>(0,import_monorepo.applyServicesMonorepoDefaults)(cwd,workPath,configuredExperimentalServicesV2,projectSettings,output)));let detectedBuilders=await span.child("vc.detectBuilders").trace(()=>(0,import_detect_builders_with_services.detectBuildersWithServices)(files,pkg,{...localConfig,reservedFunctionFiles,services:void 0,experimentalServicesV2:servicesForDetection,projectSettings,ignoreBuildScript:!0,featHandleMiss:!0,workPath}));if(detectedBuilders.errors&&detectedBuilders.errors.length>0)throw detectedBuilders.errors[0];for(let w of detectedBuilders.warnings)output.warn(w.message,null,w.link,w.action||"Learn More");detectedBuilders.builders?builds=detectedBuilders.builders:builds=[{src:"**",use:"@vercel/static"}],detectedResolvedServices=detectedBuilders.services,servicesToRecord=detectedResolvedServices,detectedServices=detectedBuilders.services?.filter(import_build_utils3.isExperimentalService);let autoDetectedV2Config=detectedBuilders.experimentalServicesV2;if(!hasExperimentalServicesV2ConfiguredInVercelConfig&&autoDetectedV2Config&&(nestExperimentalServicesV2Output=!0,detectedExperimentalServicesV2Config=autoDetectedV2Config),detectedBuilders.useImplicitEnvInjection&&detectedServices&&detectedServices.length>0){let serviceUrlEnvVars=(0,import_build_utils3.getExperimentalServiceUrlEnvVars)({services:detectedServices,frameworkList:import_frameworks.frameworkList,currentEnv:process.env,deploymentUrl:process.env.VERCEL_URL});for(let[key,value]of Object.entries(serviceUrlEnvVars))process.env[key]=value,output.debug(`Injected service URL env var: ${key}=${value}`)}let serviceRewrites=detectedBuilders.serviceRewrites,serviceRewriteRoutes=serviceRewrites&&serviceRewrites.length>0?(0,import_routing_utils.convertRewrites)(serviceRewrites):null;zeroConfigRoutes.push(...detectedBuilders.redirectRoutes||[]);let detectedHostRewriteRoutes=detectedBuilders.hostRewriteRoutes;zeroConfigRoutes=(0,import_routing_utils.appendRoutesToPhase)({routes:zeroConfigRoutes,newRoutes:detectedHostRewriteRoutes??null,phase:null});let detectedServiceRewriteRoutes=nestExperimentalServicesV2Output?[]:detectedBuilders.rewriteRoutes;zeroConfigRoutes.push(...(0,import_routing_utils.appendRoutesToPhase)({routes:[],newRoutes:[...detectedServiceRewriteRoutes||[],...serviceRewriteRoutes||[]],phase:"filesystem"})),zeroConfigRoutes=(0,import_routing_utils.appendRoutesToPhase)({routes:zeroConfigRoutes,newRoutes:detectedBuilders.errorRoutes,phase:"error"}),nestExperimentalServicesV2Output||(zeroConfigRoutes.push(...detectedBuilders.defaultRoutes||[]),zeroConfigFallbackRoutes=detectedBuilders.fallbackRoutes||[])}(0,import_backend_rewrite_warning.hasBackendRewriteBehaviorChange)({projectRewrites:localConfig.rewrites,builders:builds})&&output.warn(import_backend_rewrite_warning.BACKEND_REWRITE_BEHAVIOR_WARNING);let scheduleEntrypointOutputPaths=new Map;for(let{config:config2}of scheduleFunctions)for(let{entrypoint}of config2.entrypoints)scheduleEntrypointOutputPaths.set(entrypoint,config2.outputPath);let scheduleEntrypointBuilds=new Set,scheduleEntrypointsBySourceFile=new Map;for(let{resolved}of scheduleEntrypointUses.values())for(let sourceFile of resolved.sourceFiles)scheduleEntrypointsBySourceFile.set(sourceFile,resolved.entrypoint);for(let build of builds){if(typeof build.src!="string")continue;let sourcePath=(0,import_build_utils3.normalizePath)(build.src).replace(/^\.\//,""),entrypoint=scheduleEntrypointsBySourceFile.get(sourcePath);if(entrypoint!==void 0)throw new import_build_utils3.NowBuildError({code:"SCHEDULE_ENTRYPOINT_SOURCE_CONFLICT",message:`Schedule entrypoint "${entrypoint}" uses source file "${sourcePath}", which is also matched by builder "${build.use}". Move the schedule callable to a separate file or remove the conflicting build.`})}for(let{use,config:config2}of scheduleFunctions){let scheduleBuild={src:config2.entrypoints[0].sourceFile,use,config:{zeroConfig:!0,...localConfig.functions?{functions:localConfig.functions}:void 0,scheduleFunction:config2}};builds.push(scheduleBuild),scheduleEntrypointBuilds.add(scheduleBuild)}let builderSpecs=new Set(builds.map(b=>b.use)),buildersWithPkgs=await span.child("vc.importBuilders").trace(async s=>{let builders=await importBuilders2(builderSpecs,cwd,s);return s.setAttributes({resolved:formatResolvedBuilders2(builders)}),builders}),filesMap=await span.child("vc.populateFilesMap").trace(async s=>{let map={};for(let path of files){let fsPath=(0,import_path2.join)(workPath,path),{mode}=await import_fs_extra2.default.stat(fsPath);map[path]=new import_build_utils3.FileFsRef({mode,fsPath})}return s.setAttributes({fileCount:String(files.length)}),map}),buildStamp=startBuildTiming();await import_fs_extra2.default.mkdirp(outputDir);let ops=[],buildsJsonBuilds=new Map,ensureBuildersImported=async buildsToImport=>{let missingBuilderSpecs=new Set(buildsToImport.map(build=>build.use).filter(builderSpec=>!buildersWithPkgs.has(builderSpec)));if(missingBuilderSpecs.size===0)return;let importedBuilders=await span.child("vc.importBuilders").trace(async s=>{let builders=await importBuilders2(missingBuilderSpecs,cwd,s);return s.setAttributes({resolved:formatResolvedBuilders2(builders)}),builders});buildersWithPkgs=new Map([...buildersWithPkgs.entries(),...importedBuilders.entries()])},addBuildsToBuildJson=async buildsToAdd=>{await ensureBuildersImported(buildsToAdd);for(let build of buildsToAdd){if(buildsJsonBuilds.has(build))continue;let builderWithPkg=buildersWithPkgs.get(build.use);if(!builderWithPkg)throw new Error(`Failed to load Builder "${build.use}"`);let{builder,pkg:builderPkg}=builderWithPkg;buildsJsonBuilds.set(build,{require:builderPkg.name,requirePath:builderWithPkg.path,apiVersion:builder.version,...build})}buildsJson.builds=Array.from(buildsJsonBuilds.values()),await writeBuildJson(buildsJson,outputDir)},meta={skipDownload:!0,cliVersion,runNpmInstallSet:new Set},executedBuilds=[],buildResults=new Map,overrides=[];corepackShimDir||(corepackShimDir=await(0,import_corepack.initCorepack)({repoRootPath,output,readJSONFile:readJSONFile2,isCantParseJSONFile,warmPackageManager:(0,import_build_concurrency.resolveBuildConcurrency)()>1}));let diagnostics={},packageManifests=[],apiDirFrameworkDetector=createApiDirFrameworkDetector((workPath2,frameworks)=>(0,import_framework_detection.detectAllFrameworks)(workPath2,frameworks,output)),getHasDetectedServices=()=>detectedResolvedServices!==void 0&&detectedResolvedServices.length>0,synthesizedServiceCrons=[],serviceByBuilder=new Map,serviceFileOverrides=new Map;if(getHasDetectedServices())for(let service of detectedResolvedServices)serviceByBuilder.set(service.builder,service);let preDeployEntries=[],liveRunners=new Set,buildOrdinals=new Map,generatedRootRoutes,runBuilders=async buildsToRun=>{await addBuildsToBuildJson(buildsToRun);let buildOne=async(build,concurrent)=>{if(typeof build.src!="string")return;let builderWithPkg=buildersWithPkgs.get(build.use);if(!builderWithPkg)throw new Error(`Failed to load Builder "${build.use}"`);try{let{builder,pkg:builderPkg}=builderWithPkg,service=getHasDetectedServices()?serviceByBuilder.get(build):void 0,legacyExperimentalService=service&&(0,import_build_utils3.isExperimentalService)(service)?service:void 0,serviceWorkspace=service?(0,import_build_utils3.isExperimentalService)(service)?service.workspace:service.root:void 0,stripServiceRoutePrefix=!!legacyExperimentalService?.routePrefix&&legacyExperimentalService.routePrefix!=="/",buildWorkPath=workPath,buildEntrypoint=build.src,buildFiles=filesMap;if(service&&serviceWorkspace&&serviceWorkspace!=="."){let wsPrefix=serviceWorkspace+"/";buildWorkPath=(0,import_path2.join)(workPath,serviceWorkspace),buildEntrypoint=build.src.startsWith(wsPrefix)?build.src.slice(wsPrefix.length):build.src,buildFiles={};for(let[filePath,file]of Object.entries(filesMap))filePath.startsWith(wsPrefix)&&(buildFiles[filePath.slice(wsPrefix.length)]=file);output.debug(`Service "${service.name}": workspace-rooted build at "${buildWorkPath}", entrypoint "${buildEntrypoint}" (original: "${build.src}")`)}let restoreEnv=new Map,perBuildEnv=concurrent?{...process.env}:process.env,setBuildEnv=(key,value)=>{concurrent||restoreEnv.set(key,process.env[key]),value===void 0?delete perBuildEnv[key]:perBuildEnv[key]=value},settingsForEnv=service?{buildCommand:service.buildCommand??void 0,installCommand:service.installCommand??void 0,outputDirectory:projectSettings.outputDirectory??void 0,nodeVersion:projectSettings.nodeVersion??void 0}:projectSettings;for(let key of["buildCommand","installCommand","outputDirectory","nodeVersion"]){let value=settingsForEnv[key],envKey="VERCEL_PROJECT_SETTINGS_"+key.replace(/[A-Z]/g,letter=>`_${letter}`).toUpperCase();setBuildEnv(envKey,typeof value=="string"?value:void 0),typeof value=="string"&&output.debug(`Setting env ${envKey} to "${value}"`)}let isFrontendBuilder=build.config&&"framework"in build.config,builderFramework=build.config?.framework??projectSettings.framework,isApiDir=isZeroConfig&&!service&&!isFrontendBuilder,apiDirFramework=isApiDir?await apiDirFrameworkDetector.detect(build.use??"",buildWorkPath):void 0,buildConfig;isZeroConfig?service?buildConfig={...build.config,...(0,import_build_utils3.isExperimentalServiceV2)(service)&&service.functions?{functions:service.functions,serviceName:service.name}:void 0,projectSettings:{...projectSettings,framework:service.framework??null,buildCommand:service.buildCommand??null,installCommand:service.installCommand??null},installCommand:service.installCommand??void 0,buildCommand:service.buildCommand??void 0,preDeployCommand:legacyExperimentalService?.preDeployCommand??void 0,framework:builderFramework,nodeVersion:projectSettings.nodeVersion,bunVersion:localConfig.bunVersion??void 0}:buildConfig={outputDirectory:projectSettings.outputDirectory??void 0,...build.config,projectSettings,installCommand:projectSettings.installCommand??void 0,devCommand:projectSettings.devCommand??void 0,buildCommand:projectSettings.buildCommand??void 0,framework:isFrontendBuilder?projectSettings.framework:void 0,nodeVersion:projectSettings.nodeVersion,bunVersion:localConfig.bunVersion??void 0}:buildConfig={...build.config||{},bunVersion:localConfig.bunVersion??void 0};let builderSpan=span.child("vc.builder",{"builder.name":builderPkg.name,"builder.version":builderPkg.version,"builder.dynamicallyInstalled":String(builderWithPkg.dynamicallyInstalled)}),serviceRoutePrefix=build.config?.routePrefix,serviceConfigWorkspace=build.config?.workspace,preDeployCmd=legacyExperimentalService?.preDeployCommand?.trim(),preDeployEntry=preDeployCmd&&service?{ordinal:buildOrdinals.get(build)??Number.MAX_SAFE_INTEGER,service:service.name}:void 0;preDeployEntry&&preDeployEntries.push(preDeployEntry);let buildOptions={files:buildFiles,entrypoint:buildEntrypoint,workPath:buildWorkPath,repoRootPath,config:buildConfig,meta,span:builderSpan,...preDeployCmd?{registerPreDeploy:callback=>{preDeployEntry.callback=callback}}:void 0,...service?{service:{name:service.name,...legacyExperimentalService?{type:legacyExperimentalService.type,trigger:legacyExperimentalService.trigger}:void 0,routePrefix:typeof serviceRoutePrefix=="string"?serviceRoutePrefix:void 0,workspace:typeof serviceConfigWorkspace=="string"?serviceConfigWorkspace:serviceWorkspace,...legacyExperimentalService?{schedule:legacyExperimentalService.schedule}:void 0}}:void 0};if(output.debug(`Building entrypoint "${build.src}" with "${builderPkg.name}"`),detectedServices&&legacyExperimentalService?.env){let perServiceEnv=(0,import_build_utils3.getServiceUrlEnvVars)({requestedEnv:legacyExperimentalService.env,consumerService:legacyExperimentalService,services:detectedServices,frameworkList:import_frameworks.frameworkList,currentEnv:process.env,deploymentUrl:process.env.VERCEL_URL});for(let[key,value]of Object.entries(perServiceEnv))key in process.env||(setBuildEnv(key,value),output.debug(`Injected service URL env var: ${key}=${value}`))}if(service)for(let key of SERVICE_BUILD_IMMUTABLE_ENV_VARS)setBuildEnv(key,void 0);let buildResult,rawBuildResult,runnerContext={requirePath:builderWithPkg.path,buildOptions,cwd:buildWorkPath,expectsPreDeploy:!!preDeployCmd,builderSpan,serviceName:service?.name,env:perBuildEnv},runner=createBuildRunner2?.({ctx:runnerContext,builder,hasDetectedServices:getHasDetectedServices(),builderPath:builderWithPkg.path,hasBuildCallback:!!buildOptions.buildCallback})??new import_build_runner2.InprocessBuildRunner(runnerContext,builder);if(concurrent&&runner instanceof import_build_runner2.InprocessBuildRunner)throw new Error(`Internal error: build for "${buildOptions.entrypoint}" was scheduled concurrently but cannot run in a subprocess`);liveRunners.add(runner);try{({buildResult,rawBuildResult}=await(0,import_execute_builder.executeBuilder)({builder,buildOptions,span:builderSpan,isFrontendBuilder,hasDetectedServices:getHasDetectedServices(),framework:import_frameworks.frameworkList.find(framework2=>framework2.slug===buildConfig.framework),runner}))}finally{for(let[key,prior]of restoreEnv)prior===void 0?delete process.env[key]:process.env[key]=prior;try{let builderDiagnostics=await runner.diagnostics();if(builderDiagnostics){let prefix=service&&serviceWorkspace&&serviceWorkspace!=="."?serviceWorkspace+"/"+builderPkg.name+"/":"";for(let[key,value]of Object.entries(builderDiagnostics)){let fullKey=prefix+key;if(key.endsWith("package-manifest.json"))try{let data;value.type==="FileBlob"?data=value.data.toString():data=await streamToString(value.toStream());let packageManifest=JSON.parse(data),validationError=(0,import_validate_package_manifest.validatePackageManifest)(packageManifest);if(validationError)output.warn(`Invalid package-manifest.json from ${fullKey}: ${validationError}`);else{let workspace=service&&serviceWorkspace&&serviceWorkspace!=="."?serviceWorkspace:".",buildType=packageManifest.buildType??(buildConfig.middleware===!0?"middleware":isApiDir?"api-dir":"app"),entry={ordinal:buildOrdinals.get(build)??Number.MAX_SAFE_INTEGER,workspace,key:fullKey,buildConfig,manifest:{...packageManifest,framework:packageManifest.framework??apiDirFramework,buildType},service,builderUse:builderPkg.name},existingIndex=packageManifests.findIndex(m=>m.builderUse===builderPkg.name&&m.workspace===workspace),existing=existingIndex===-1?void 0:packageManifests[existingIndex];existing?entry.ordinal<existing.ordinal&&(packageManifests[existingIndex]=entry):packageManifests.push(entry)}}catch(e){output.debug(`Failed to parse ${fullKey}: ${e instanceof Error?e.message:String(e)}`)}else diagnostics[fullKey]=value}}}catch(error){output.error("Collecting diagnostics failed"),output.debug(error)}}if(buildResult&&"output"in buildResult&&"runtime"in buildResult.output&&"type"in buildResult.output&&buildResult.output.type==="Lambda"){let lambdaRuntime=buildResult.output.runtime;if((0,import_build_utils3.getDiscontinuedNodeVersions)().some(o=>o.runtime===lambdaRuntime))throw new import_build_utils3.NowBuildError({code:"NODEJS_DISCONTINUED_VERSION",message:`The Runtime "${build.use}" is using "${lambdaRuntime}", which is discontinued. Please upgrade your Runtime to a more recent version or consult the author for more details.`,link:"https://vercel.link/function-runtimes"})}if("output"in buildResult&&buildResult.output&&((0,import_build_utils3.isBackendBuilder)(build)||build.use==="@vercel/python")){let routesJsonPath=(0,import_path2.join)(buildWorkPath,".vercel","routes.json");if((0,import_fs_extra2.existsSync)(routesJsonPath))try{let routesJson=await readJSONFile2(routesJsonPath);if(routesJson&&typeof routesJson=="object"&&"routes"in routesJson&&Array.isArray(routesJson.routes)){let indexLambda="index"in buildResult.output?buildResult.output.index:void 0,convertedRoutes=[],convertedOutputs=indexLambda?{index:indexLambda}:{};for(let route of routesJson.routes){if(typeof route.source!="string")continue;let{src}=(0,import_routing_utils.sourceToRegex)(route.source),newRoute={src,dest:route.source};route.methods&&(newRoute.methods=route.methods),route.source!=="/"&&(indexLambda&&(convertedOutputs[route.source]=indexLambda),convertedRoutes.push(newRoute))}buildResult.routes=[{handle:"filesystem"},...convertedRoutes,{src:"/(.*)",dest:"/"}],indexLambda&&(buildResult.output=convertedOutputs)}}catch(error){output.error(`Failed to read routes.json: ${error}`)}}if(getHasDetectedServices()&&service&&legacyExperimentalService&&"routes"in buildResult&&Array.isArray(buildResult.routes)&&detectedServices&&(buildResult.routes=(0,import_service_route_ownership.scopeRoutesToServiceOwnership)({routes:buildResult.routes,owner:legacyExperimentalService,allServices:detectedServices})),legacyExperimentalService&&(0,import_build_utils3.isQueueBackedService)(legacyExperimentalService)&&"output"in buildResult&&attachQueueServiceTrigger(buildResult.output,legacyExperimentalService),legacyExperimentalService&&(0,import_build_utils3.isScheduleTriggeredService)(legacyExperimentalService)&&!("crons"in buildResult&&buildResult.crons?.length)){let staticSchedules=(0,import_service_schedules.getStaticServiceSchedules)(legacyExperimentalService.schedule);if(typeof legacyExperimentalService.runtime=="string"&&staticSchedules.length>0){let cronEntrypoint=legacyExperimentalService.entrypoint||legacyExperimentalService.builder.src||"index";for(let schedule of staticSchedules)synthesizedServiceCrons.push({ordinal:buildOrdinals.get(build)??Number.MAX_SAFE_INTEGER,cron:{path:(0,import_build_utils3.getInternalServiceCronPath)(legacyExperimentalService.name,cronEntrypoint,legacyExperimentalService.handlerFunction||"cron"),schedule}})}else throw new import_build_utils3.NowBuildError({code:"CRON_SERVICE_NO_CRONS",message:`Scheduled service "${legacyExperimentalService.name}" did not produce any cron entries. The builder "${builderPkg.name}" may not support scheduled services.`})}let mergedBuildResult=buildResult;if("buildOutputPath"in buildResult){let buildOutputConfigPath=(0,import_path2.join)(buildResult.buildOutputPath,"config.json"),buildOutputConfig=await readJSONFile2(buildOutputConfigPath);if(isCantParseJSONFile(buildOutputConfig))throw buildOutputConfig;if(buildOutputConfig){if(buildResult.framework&&!buildOutputConfig.framework&&(buildOutputConfig.framework=buildResult.framework),!hasExperimentalServicesV1ConfiguredInVercelConfig&&!hasExperimentalServicesV2ConfiguredInVercelConfig){let outputConfigPath=(0,import_path2.join)(outputDir,"config.json"),outputConfig=await readJSONFile2(outputConfigPath);if(isCantParseJSONFile(outputConfig))throw outputConfig;let shouldMergeGeneratedOutputRoutes=!1;hasNonEmptyObject(outputConfig?.experimentalServices)&&!hasNonEmptyObject(buildOutputConfig.experimentalServices)&&(buildOutputConfig.experimentalServices=outputConfig.experimentalServices,shouldMergeGeneratedOutputRoutes=!0),hasNonEmptyObject(outputConfig?.experimentalServicesV2)&&!hasNonEmptyObject(buildOutputConfig.experimentalServicesV2)&&(buildOutputConfig.experimentalServicesV2=outputConfig.experimentalServicesV2,shouldMergeGeneratedOutputRoutes=!0),hasGeneratedServicesConfig(outputConfig)&&!hasGeneratedServicesConfig(buildOutputConfig)&&(buildOutputConfig.services=outputConfig.services,shouldMergeGeneratedOutputRoutes=!0),shouldMergeGeneratedOutputRoutes&&Array.isArray(outputConfig?.routes)&&(buildOutputConfig.routes=prependMissingBuildOutputRoutes(outputConfig.routes,buildOutputConfig.routes),generatedRootRoutes??=outputConfig.routes),(hasNonEmptyObject(buildOutputConfig.experimentalServices)||hasNonEmptyObject(buildOutputConfig.experimentalServicesV2)||hasGeneratedServicesConfig(buildOutputConfig))&&await import_fs_extra2.default.writeJSON(buildOutputConfigPath,buildOutputConfig,{spaces:2})}getHasDetectedServices()&&service&&legacyExperimentalService&&Array.isArray(buildOutputConfig.routes)&&detectedServices&&(buildOutputConfig.routes=(0,import_service_route_ownership.scopeRoutesToServiceOwnership)({routes:buildOutputConfig.routes,owner:legacyExperimentalService,allServices:detectedServices})),mergedBuildResult=buildOutputConfig}}buildResults.set(build,mergedBuildResult),executedBuilds.push(build);let buildOutputLength=0;"output"in buildResult&&(buildOutputLength=Array.isArray(buildResult.output)?buildResult.output.length:1);let writeBuildResultPromise=builderSpan.child("vc.builder.writeBuildResult",{buildOutputLength:String(buildOutputLength)}).trace(()=>writeBuildResult2({repoRootPath,outputDir,buildResult:rawBuildResult,build,builder,builderPkg,vercelConfig:localConfig,standalone,workPath:buildWorkPath,service,nestServiceOutput:nestExperimentalServicesV2Output,stripServiceRoutePrefix}));if(service&&nestExperimentalServicesV2Output){let override=await writeBuildResultPromise;override&&serviceFileOverrides.set(build,override)}else ops.push(writeBuildResultPromise.then(override=>{override&&overrides.push({ordinal:buildOrdinals.get(build)??Number.MAX_SAFE_INTEGER,override})},err=>err))}catch(err){let buildJsonBuild=buildsJsonBuilds.get(build);throw buildJsonBuild&&(buildJsonBuild.error=toEnumerableError2(err)),err}finally{ops.push((0,import_build_utils3.download)(diagnostics,(0,import_path2.join)(outputDir,"diagnostics")).then(()=>{},err=>err))}},sortedBuilds=(0,import_execute_builder.sortBuildsForExecution)(buildsToRun);for(let build of sortedBuilds)buildOrdinals.has(build)||buildOrdinals.set(build,buildOrdinals.size);let concurrency=createBuildRunner2&&canBuildInSubprocess2?(0,import_build_concurrency.resolveBuildConcurrency)():1;await(0,import_build_concurrency.runBuildsWithConcurrency)({builds:sortedBuilds,concurrency,isEligible:build=>{let bp=typeof build.src=="string"?buildersWithPkgs.get(build.use):void 0;return!!bp&&!!canBuildInSubprocess2&&canBuildInSubprocess2({hasDetectedServices:getHasDetectedServices(),builderPath:bp.path})},forceSingleChain:!hasExperimentalServicesV1ConfiguredInVercelConfig&&!hasExperimentalServicesV2ConfiguredInVercelConfig,resolveScope:async build=>{let service=getHasDetectedServices()&&typeof build.src=="string"?serviceByBuilder.get(build):void 0;if(!service){let key="no-service-context";return{outerKey:key,innerKey:`${key}:${build.use}:${String(build.src)}`,siblingsSkipInstall:!1}}let serviceWorkspace=(0,import_build_utils3.isExperimentalService)(service)?service.workspace:service.root,serviceDir=serviceWorkspace&&serviceWorkspace!=="."?(0,import_path2.join)(workPath,serviceWorkspace):workPath,toolchain=service.runtime??["python","go","ruby","rust","container"].find(t=>build.use.startsWith(`@vercel/${t}`))??"node",customInstall=!!service.installCommand?.trim(),installRoot=await(0,import_build_concurrency.resolveInstallScopeRoot)({toolchain,serviceDir,ceilingDir:repoRootPath});return{outerKey:`${toolchain}:${installRoot}`,innerKey:(0,import_build_concurrency.getInstallScopeKey)({toolchain,installDirectory:serviceDir,installCommand:service.installCommand}),siblingsSkipInstall:toolchain==="node"&&!customInstall}},runBuild:(build,concurrent)=>buildOne(build,concurrent),log:message=>output.log(message),reportSecondaryError:(err,build)=>{output.error(`Build failed for "${build.src}": ${err instanceof Error?err.message:String(err)}`)}})},flushOps=async()=>{let errors=await Promise.all(ops.splice(0));for(let error of errors)if(error)throw error},normalizeBuilderSrc=src=>typeof src=="string"?(0,import_build_utils3.normalizePath)(src).replace(/^\.\//,""):void 0,getBuilderIdentity=build=>{let normalizedSrc=normalizeBuilderSrc(build.src);return normalizedSrc?`${build.use}:${normalizedSrc}`:void 0},getAlreadyExecutedBuild=candidate=>{let candidateIdentity=getBuilderIdentity(candidate);if(candidateIdentity)return executedBuilds.find(build=>getBuilderIdentity(build)===candidateIdentity)},appendExperimentalServicesV1Routes=services=>{let serviceRoutes=(0,import_service_topology.generateServicesRoutes)(services);zeroConfigRoutes=(0,import_routing_utils.appendRoutesToPhase)({routes:zeroConfigRoutes,newRoutes:serviceRoutes.hostRewrites.length?serviceRoutes.hostRewrites:null,phase:null});let serviceRewriteRoutes=nestExperimentalServicesV2Output?[]:[...serviceRoutes.rewrites,...serviceRoutes.workers,...serviceRoutes.crons];zeroConfigRoutes.push(...(0,import_routing_utils.appendRoutesToPhase)({routes:[],newRoutes:serviceRewriteRoutes,phase:"filesystem"})),nestExperimentalServicesV2Output||(zeroConfigRoutes.push(...serviceRoutes.defaults),zeroConfigFallbackRoutes.push(...serviceRoutes.fallbacks))},sortBuildResultsByOrdinal=()=>{let orderedResults=Array.from(buildResults.entries()).sort(([a],[b])=>(buildOrdinals.get(a)??Number.MAX_SAFE_INTEGER)-(buildOrdinals.get(b)??Number.MAX_SAFE_INTEGER));buildResults.clear();for(let[build,result]of orderedResults)buildResults.set(build,result)};try{if(await runBuilders(builds),await flushOps(),sortBuildResultsByOrdinal(),!hasExperimentalServicesV1ConfiguredInVercelConfig&&!hasExperimentalServicesV2ConfiguredInVercelConfig){let generatedConfigPath=(0,import_path2.join)(outputDir,"config.json"),generatedConfig=await readJSONFile2(generatedConfigPath);if(isCantParseJSONFile(generatedConfig))throw generatedConfig;let defaultGeneratedOutputDir=(0,import_path2.join)(workPath,import_write_build_result3.OUTPUT_DIR),generatedConfigs=[generatedConfig];if((0,import_path2.resolve)(outputDir)!==(0,import_path2.resolve)(defaultGeneratedOutputDir)){let defaultGeneratedConfig=await readJSONFile2((0,import_path2.join)(defaultGeneratedOutputDir,"config.json"));if(isCantParseJSONFile(defaultGeneratedConfig))throw defaultGeneratedConfig;generatedConfigs.push(defaultGeneratedConfig)}let generatedServicesConfig=getGeneratedServicesConfig([...generatedConfigs,...buildResults.values()]),generatedExperimentalServicesV1Config=getGeneratedExperimentalServicesV1Config([...generatedConfigs,...buildResults.values()]);if(generatedServicesConfig||generatedExperimentalServicesV1Config){generatedServicesConfig&&(nestExperimentalServicesV2Output=!0),detectedExperimentalServicesV1Config=generatedExperimentalServicesV1Config,detectedExperimentalServicesV2Config=generatedServicesConfig;let generatedRootRoutesConfig=generatedServicesConfig?generatedConfigs.find(config2=>(hasGeneratedServicesConfig(config2)||hasNonEmptyObject(config2?.experimentalServicesV2))&&Array.isArray(config2?.routes)):void 0;generatedRootRoutesConfig?.routes&&(generatedRootRoutes??=generatedRootRoutesConfig.routes);let generatedBuilders=await span.child("vc.detectGeneratedServices").trace(()=>(0,import_detect_builders_with_services.detectBuildersWithServices)(files,pkg,{...localConfig,reservedFunctionFiles,...generatedServicesConfig?{services:generatedServicesConfig,experimentalServicesV2:void 0}:{experimentalServicesV2:void 0,experimentalServices:generatedExperimentalServicesV1Config},projectSettings,ignoreBuildScript:!0,featHandleMiss:!0,workPath}));if(generatedBuilders.errors&&generatedBuilders.errors.length>0)throw generatedBuilders.errors[0];for(let w of generatedBuilders.warnings)output.warn(w.message,null,w.link,w.action||"Learn More");if(detectedResolvedServices=generatedBuilders.services,!detectedResolvedServices||detectedResolvedServices.length===0?(detectedResolvedServices=void 0,detectedServices=void 0):(detectedServices=detectedResolvedServices.filter(import_build_utils3.isExperimentalService),detectedServices.length>0&&appendExperimentalServicesV1Routes(detectedServices)),detectedServices&&detectedServices.length>0&&generatedBuilders.useImplicitEnvInjection){let serviceUrlEnvVars=(0,import_build_utils3.getExperimentalServiceUrlEnvVars)({services:detectedServices,frameworkList:import_frameworks.frameworkList,currentEnv:process.env,deploymentUrl:process.env.VERCEL_URL});for(let[key,value]of Object.entries(serviceUrlEnvVars))process.env[key]=value,output.debug(`Injected service URL env var: ${key}=${value}`)}let buildsToRun=[],seenBuildsToRun=new Set,recordedServices=[];for(let service of detectedResolvedServices||[]){let alreadyExecutedBuild=getAlreadyExecutedBuild(service.builder);if(alreadyExecutedBuild){if(generatedServicesConfig){output.warn(getGeneratedServiceAlreadyBuiltWarning(service));continue}serviceByBuilder.set(alreadyExecutedBuild,service),recordedServices.push(service);continue}let serviceBuilderIdentity=getBuilderIdentity(service.builder);serviceBuilderIdentity&&!seenBuildsToRun.has(serviceBuilderIdentity)&&(serviceByBuilder.set(service.builder,service),seenBuildsToRun.add(serviceBuilderIdentity),buildsToRun.push(service.builder)),recordedServices.push(service)}servicesToRecord=recordedServices.length>0?recordedServices:void 0,buildsToRun.length>0&&await runBuilders(buildsToRun)}}preDeployEntries.sort((a,b)=>a.ordinal-b.ordinal);for(let entry of preDeployEntries)entry.callback?await entry.callback():output.warn(`Service "${entry.service}" has a preDeployCommand but its builder does not support it. The command was not executed.`)}finally{let settled=await Promise.all(ops.splice(0));for(let err of settled)err&&ops.push(Promise.resolve(err));for(let runner of liveRunners)try{runner.teardown()}catch(err){output.debug(`Runner teardown failed: ${err instanceof Error?err.message:String(err)}`)}}sortBuildResultsByOrdinal();function getBuildOutputPaths(build,result){if(!("output"in result)||!result.output)return[];let{output:output2}=result;return Array.isArray(output2)?[]:(0,import_write_build_result3.isLambda)(output2)||(0,import_write_build_result3.isEdgeFunction)(output2)?serviceByBuilder.has(build)||typeof build.src!="string"?[]:[(0,import_write_build_result3.getV3OutputPath)(build)]:Object.keys(output2)}let claimedScheduleOutputPaths=new Set(scheduleEntrypointOutputPaths.values());for(let[build,result]of buildResults){if(scheduleEntrypointBuilds.has(build))continue;let conflictingOutputPath=getBuildOutputPaths(build,result).find(outputPath=>claimedScheduleOutputPaths.has(outputPath));if(conflictingOutputPath)throw new import_build_utils3.NowBuildError({code:"SCHEDULE_FUNCTION_OUTPUT_COLLISION",message:`Schedule function output "${conflictingOutputPath}" conflicts with another build output. Move the conflicting function out of the reserved "_vercel/schedules" namespace.`})}packageManifests.sort((a,b)=>a.ordinal-b.ordinal),await(0,import_manifest.writeManifests)(packageManifests,diagnostics,ops,outputDir),corepackShimDir&&(0,import_corepack.cleanupCorepack)(corepackShimDir);let collectSpan=span.child("vc.finalizeBuildOutput");await flushOps();let needBuildsJsonOverride=!1,speedInsightsVersion=await(0,import_build_utils3.getInstalledPackageVersion)("@vercel/speed-insights");speedInsightsVersion&&(buildsJson.features={...buildsJson.features??{},speedInsightsVersion},needBuildsJsonOverride=!0);let webAnalyticsVersion=await(0,import_build_utils3.getInstalledPackageVersion)("@vercel/analytics");webAnalyticsVersion&&(buildsJson.features={...buildsJson.features??{},webAnalyticsVersion},needBuildsJsonOverride=!0),needBuildsJsonOverride&&await writeBuildJson(buildsJson,outputDir);let configPath=(0,import_path2.join)(outputDir,"config.json"),existingConfig=await readJSONFile2(configPath);if(isCantParseJSONFile(existingConfig))throw existingConfig;if(existingConfig){if("deploymentId"in existingConfig&&typeof existingConfig.deploymentId=="string"){let deploymentId=existingConfig.deploymentId;if(deploymentId.length>32)throw new import_build_utils3.NowBuildError({code:"INVALID_DEPLOYMENT_ID",message:`The deploymentId "${deploymentId}" must be 32 characters or less. Please choose a shorter deploymentId in your config.`,link:"https://vercel.com/docs/skew-protection#custom-skew-protection-deployment-id"});if(!VALID_DEPLOYMENT_ID_PATTERN.test(deploymentId))throw new import_build_utils3.NowBuildError({code:"INVALID_DEPLOYMENT_ID",message:`The deploymentId "${deploymentId}" contains invalid characters. Only alphanumeric characters (a-z, A-Z, 0-9), hyphens (-), and underscores (_) are allowed.`,link:"https://vercel.com/docs/skew-protection#custom-skew-protection-deployment-id"})}existingConfig.overrides&&!nestExperimentalServicesV2Output&&overrides.push({ordinal:Number.MAX_SAFE_INTEGER,override:existingConfig.overrides})}let topLevelBuildResults=nestExperimentalServicesV2Output?new Map(Array.from(buildResults.entries()).filter(([build])=>!serviceByBuilder.has(build))):buildResults,builderRoutes=Array.from(topLevelBuildResults.entries()).filter(b=>"routes"in b[1]&&Array.isArray(b[1].routes)).map(b=>{let build=b[0],buildResult=b[1],entrypoint=build.src;if(getHasDetectedServices()&&typeof build.src=="string"){let service=serviceByBuilder.get(build);service&&(0,import_build_utils3.isExperimentalService)(service)&&service.type==="web"&&typeof service.routePrefix=="string"&&(entrypoint=getServicesMergeEntrypoint(service,build.src))}return{use:build.use,entrypoint,routes:buildResult.routes,projectMiddleware:build.config?.middleware===!0}});zeroConfigRoutes.length&&builderRoutes.unshift({use:"@vercel/zero-config-routes",entrypoint:"/",routes:zeroConfigRoutes});let mergedRoutes=(0,import_routing_utils.mergeRoutes)({userRoutes:routesResult.routes,builds:builderRoutes});zeroConfigFallbackRoutes.length&&(mergedRoutes=(0,import_routing_utils.appendRoutesToPhase)({routes:mergedRoutes,newRoutes:zeroConfigFallbackRoutes,phase:"filesystem"}));let mergedImages=mergeImages(localConfig.images,topLevelBuildResults.values()),orderedServiceCrons=synthesizedServiceCrons.slice().sort((a,b)=>a.ordinal-b.ordinal).map(entry=>entry.cron),mergedCrons=mergeCrons([...localConfig.crons||[],...orderedServiceCrons],buildResults.values()),mergedWildcard=mergeWildcard(topLevelBuildResults.values()),mergedDeploymentId=await mergeDeploymentId(existingConfig?.deploymentId,topLevelBuildResults.values(),workPath,readJSONFile2,isCantParseJSONFile);if(mergedDeploymentId){if(mergedDeploymentId.length>32)throw new import_build_utils3.NowBuildError({code:"INVALID_DEPLOYMENT_ID",message:`The deploymentId "${mergedDeploymentId}" must be 32 characters or less. Please choose a shorter deploymentId in your config.`,link:"https://vercel.com/docs/skew-protection#custom-skew-protection-deployment-id"});if(!VALID_DEPLOYMENT_ID_PATTERN.test(mergedDeploymentId))throw new import_build_utils3.NowBuildError({code:"INVALID_DEPLOYMENT_ID",message:`The deploymentId "${mergedDeploymentId}" contains invalid characters. Only alphanumeric characters (a-z, A-Z, 0-9), hyphens (-), and underscores (_) are allowed.`,link:"https://vercel.com/docs/skew-protection#custom-skew-protection-deployment-id"})}let topLevelBuildResultOverrides=Array.from(topLevelBuildResults.values()).map(result=>"overrides"in result?result.overrides:void 0).filter(value=>!!value),orderedOverrides=overrides.slice().sort((a,b)=>a.ordinal-b.ordinal).map(entry=>entry.override),mergedOverrides=overrides.length>0||topLevelBuildResultOverrides.length>0?Object.assign({},...orderedOverrides,...topLevelBuildResultOverrides):void 0,framework=topLevelBuildResults.size>0?await getFramework(workPath,topLevelBuildResults):void 0,rootRoutesToAppend=Array.from(topLevelBuildResults.values()).some(result=>(hasGeneratedServicesConfig(result)||"experimentalServicesV2"in result&&hasNonEmptyObject(result.experimentalServicesV2))&&"routes"in result&&Array.isArray(result.routes))?void 0:generatedRootRoutes??existingConfig?.routes,explicitRootRoutes=appendBuildOutputRouteTables(routesResult.routes,rootRoutesToAppend),mergedRoutesWithGeneratedServicesV2Routes=nestExperimentalServicesV2Output?appendBuildOutputRouteTables(mergedRoutes,rootRoutesToAppend):mergedRoutes,resolvedSchedules=localConfig.schedules?.map(schedule=>{if(!hasScheduleEntrypointTarget(schedule))return schedule;let functionPath=scheduleEntrypointOutputPaths.get(schedule.target.entrypoint);if(!functionPath)throw new Error(`Missing build output for schedule entrypoint "${schedule.target.entrypoint}"`);return{...schedule,target:{function:functionPath}}}),config={version:3,routes:mergedRoutesWithGeneratedServicesV2Routes??explicitRootRoutes,images:mergedImages,wildcard:mergedWildcard,overrides:mergedOverrides,framework,crons:mergedCrons,...resolvedSchedules&&resolvedSchedules.length>0&&{schedules:resolvedSchedules},...detectedExperimentalServicesV1Config&&Object.keys(detectedExperimentalServicesV1Config).length>0&&{experimentalServices:detectedExperimentalServicesV1Config},...detectedExperimentalServicesV2Config&&Object.keys(detectedExperimentalServicesV2Config).length>0&&{experimentalServicesV2:detectedExperimentalServicesV2Config},...!detectedExperimentalServicesV1Config&&servicesToRecord&&servicesToRecord.length>0&&{services:servicesToRecord},...mergedDeploymentId&&{deploymentId:mergedDeploymentId}};return await import_fs_extra2.default.writeJSON((0,import_path2.join)(outputDir,"config.json"),config,{spaces:2}),nestExperimentalServicesV2Output&&await writeServiceConfigs(outputDir,buildResults,serviceByBuilder,serviceFileOverrides,detectedExperimentalServicesV2Config,readJSONFile2,isCantParseJSONFile),await writeFlagsJSON(buildResults.values(),outputDir,output),await span.child("vc.frameworkCrossCheck").trace(async s=>{let detectedFrameworks=await detectedFrameworksPromise,executedBuilders=Array.from(buildResults.keys()),usedBuilders=executedBuilders.map(b=>b.use).filter(use=>!!use),mismatchResult=(0,import_framework_detection.warnIfFrameworkMismatch)({configuredFramework:projectSettings.framework,detectedFrameworks,usedBuilders,usedFrameworks:executedBuilders.map(b=>b.config?.framework)},output);s.setAttributes({result:mismatchResult,configuredFramework:projectSettings.framework??void 0,detectedFrameworks:detectedFrameworks.join(",")||void 0,usedBuilders:usedBuilders.join(",")||void 0})}),await span.child("vc.validateBuildOutput").trace(async s=>{let outputProblems=await(0,import_validate_build_output.validateBuildOutput)(outputDir,output);s.setAttributes({problemCount:String(outputProblems.length),problems:outputProblems.map(p=>`${p.severity}: ${p.message}`).join("; ")||void 0}),(0,import_validate_build_output.reportBuildOutputProblems)(outputProblems,output)}),collectSpan.stop(),{buildDuration:buildStamp()}}async function getFramework(cwd,buildResults){let detectedFramework=await(0,import_fs_detectors.detectFrameworkRecord)({fs:new import_fs_detectors.LocalFileSystemDetector(cwd),frameworkList:import_frameworks.frameworkList});if(!detectedFramework){for(let buildResult of buildResults.values())if("framework"in buildResult&&buildResult.framework)return{slug:buildResult.framework.slug,version:buildResult.framework.version};return}if(detectedFramework.useRuntime){for(let[build,buildResult]of buildResults.entries())if("framework"in buildResult&&build.use===detectedFramework.useRuntime.use)return buildResult.framework?{slug:buildResult.framework.slug,version:buildResult.framework.version}:void 0}if(detectedFramework.slug){if(detectedFramework.detectedVersion&&import_semver.default.valid(detectedFramework.detectedVersion))return{slug:detectedFramework.slug,version:detectedFramework.detectedVersion};let frameworkVersion=(0,import_fs_detectors.detectFrameworkVersion)(detectedFramework);if(frameworkVersion)return{slug:detectedFramework.slug,version:frameworkVersion}}}function expandBuild(files,build){if(!build.use)throw new import_build_utils3.NowBuildError({code:"invalid_build_specification",message:"Field `use` is missing in build specification",link:"https://vercel.com/docs/concepts/projects/project-configuration#builds",action:"View Documentation"});let src=(0,import_path2.normalize)(build.src||"**").split(import_path2.sep).join("/");if(src==="."||src==="./")throw new import_build_utils3.NowBuildError({code:"invalid_build_specification",message:"A build `src` path resolves to an empty string",link:"https://vercel.com/docs/concepts/projects/project-configuration#builds",action:"View Documentation"});return src[0]==="/"&&(src=src.substring(1)),files.filter(name=>name===src||(0,import_minimatch2.default)(name,src,{dot:!0})).map(m=>({...build,src:m}))}function mergeImages(images,buildResults){for(let result of buildResults)"images"in result&&result.images&&(images=Object.assign({},images,result.images));return images}function mergeCrons(crons=[],buildResults){for(let result of buildResults)"crons"in result&&result.crons&&(crons=crons.concat(result.crons));return crons}function mergeWildcard(buildResults){let wildcard;for(let result of buildResults)"wildcard"in result&&result.wildcard&&(wildcard||(wildcard=[]),wildcard.push(...result.wildcard));return wildcard}function appendBuildOutputRouteTables(...routeTables){let routes=[];for(let routeTable of routeTables){if(!Array.isArray(routeTable)||routeTable.length===0)continue;let phase=null,phaseRoutes=[],flushPhase=()=>{phaseRoutes.length!==0&&(routes=(0,import_routing_utils.appendRoutesToPhase)({routes,newRoutes:phaseRoutes,phase}),phaseRoutes=[])};for(let route of routeTable)(0,import_routing_utils.isHandler)(route)?(flushPhase(),phase=route.handle):phaseRoutes.push(route);flushPhase()}return routes.length>0?routes:void 0}function prependMissingBuildOutputRoutes(routesToPrepend,existingRoutes){if(!Array.isArray(routesToPrepend)||routesToPrepend.length===0)return existingRoutes;let existingRouteKeys=new Set((existingRoutes??[]).map(route=>JSON.stringify(route))),missingRoutes=routesToPrepend.filter(route=>!existingRouteKeys.has(JSON.stringify(route)));return appendBuildOutputRouteTables(missingRoutes,existingRoutes)}async function writeServiceConfigs(outputDir,buildResults,serviceByBuilder,serviceFileOverrides,experimentalServicesV2,readJSONFile2,isCantParseJSONFile){let serviceResults=new Map,serviceOverrides=new Map;for(let[build,buildResult]of buildResults){let service=serviceByBuilder.get(build);if(!service)continue;let results=serviceResults.get(service.name)||[];results.push(buildResult),serviceResults.set(service.name,results);let fileOverrides=serviceFileOverrides.get(build);if(fileOverrides){let overrides=serviceOverrides.get(service.name)||[];overrides.push(fileOverrides),serviceOverrides.set(service.name,overrides)}}await Promise.all(Array.from(serviceResults.entries()).map(async([serviceName,results])=>{let configPath=(0,import_path2.join)(outputDir,"services",serviceName,"config.json"),existingConfig=await readJSONFile2(configPath);if(isCantParseJSONFile(existingConfig))throw existingConfig;let routes=results.flatMap(result=>"routes"in result&&Array.isArray(result.routes)?result.routes:[]),existingRoutes=routes.length>0?void 0:existingConfig?.routes,existingCrons=results.some(result=>"crons"in result&&result.crons?.length)?void 0:existingConfig?.crons,configuredRoutes=experimentalServicesV2?.[serviceName]?getExperimentalServicesV2Routes(experimentalServicesV2[serviceName]):[],overrides=[...results.map(result=>"overrides"in result?result.overrides:void 0).filter(value=>!!value),...serviceOverrides.get(serviceName)||[]],framework=results.find(result=>"framework"in result&&!!result.framework)?.framework,mergedRoutes=appendBuildOutputRouteTables(configuredRoutes,routes,existingRoutes),config={...existingConfig,version:3,routes:mergedRoutes,images:mergeImages(existingConfig?.images,results),wildcard:mergeWildcard(results)||existingConfig?.wildcard,overrides:overrides.length>0?Object.assign({},existingConfig?.overrides,...overrides):existingConfig?.overrides,framework:framework||existingConfig?.framework,crons:mergeCrons(existingCrons,results),services:void 0,experimentalServices:void 0,experimentalServicesV2:void 0};await import_fs_extra2.default.writeJSON(configPath,config,{spaces:2})}))}function getExperimentalServicesV2Routes(serviceConfig){let routesResult=(0,import_routing_utils.getTransformedRoutes)({routes:serviceConfig.routes,cleanUrls:serviceConfig.cleanUrls,trailingSlash:serviceConfig.trailingSlash,headers:serviceConfig.headers,redirects:serviceConfig.redirects,rewrites:serviceConfig.rewrites});if(routesResult.error)throw routesResult.error;return routesResult.routes??[]}function getGeneratedExperimentalServicesV1Config(buildResults){for(let result of buildResults)if(result&&"experimentalServices"in result&&hasNonEmptyObject(result.experimentalServices))return result.experimentalServices}function hasGeneratedServicesConfig(result){return result!=null&&"services"in result&&hasNonEmptyObject(result.services)}function getGeneratedServicesConfig(buildResults){for(let result of buildResults){if(hasGeneratedServicesConfig(result))return result.services;if(result&&"experimentalServicesV2"in result&&hasNonEmptyObject(result.experimentalServicesV2))return result.experimentalServicesV2}}async function mergeDeploymentId(existingDeploymentId,buildResults,workPath,readJSONFile2,isCantParseJSONFile){if(existingDeploymentId)return existingDeploymentId;for(let result of buildResults)if("deploymentId"in result&&result.deploymentId)return result.deploymentId;try{let routesManifestPath=(0,import_path2.join)(workPath,".next","routes-manifest.json");if(await import_fs_extra2.default.pathExists(routesManifestPath)){let routesManifest=await readJSONFile2(routesManifestPath);if(routesManifest&&!isCantParseJSONFile(routesManifest)&&routesManifest.deploymentId)return routesManifest.deploymentId}}catch{}}async function writeFlagsJSON(buildResults,outputDir,output){let flagsFilePath=(0,import_path2.join)(outputDir,"flags.json"),hasFlags=!0,flags=await import_fs_extra2.default.readJSON(flagsFilePath).catch(error=>{if(error.code==="ENOENT")return hasFlags=!1,{definitions:{}};throw error});for(let result of buildResults)if(!(!("flags"in result)||!result.flags||!result.flags.definitions))for(let[key,definition]of Object.entries(result.flags.definitions)){if(result.flags.definitions[key]){output.warn(`The flag "${key}" was found multiple times. Only its first occurrence will be considered.`);continue}hasFlags=!0,flags.definitions[key]=definition}hasFlags&&await import_fs_extra2.default.writeJSON(flagsFilePath,flags,{spaces:2})}function createApiDirFrameworkDetector(detectAllFrameworks2){let cache=new Map;return{detect(builderUse,workPath){let cacheKey=`${builderUse}:${workPath}`,cached=cache.get(cacheKey);return cached||(cached=detectApiDirFramework(builderUse,workPath,detectAllFrameworks2),cache.set(cacheKey,cached)),cached}}}async function detectApiDirFramework(builderUse,workPath,detectAllFrameworks2){let runtimeFrameworks=import_fs_detectors.builderToFrameworks.get(builderUse)??[];if(runtimeFrameworks.length===0)return;let detectedSlugs=await detectAllFrameworks2(workPath,runtimeFrameworks).catch(()=>[]);return detectedSlugs.length===1?detectedSlugs[0]:void 0}async function writeBuildJson(buildsJson,outputDir){await import_fs_extra2.default.writeJSON((0,import_path2.join)(outputDir,"builds.json"),buildsJson,{spaces:2})}function normalizeServiceRoutePrefix(routePrefix){let prefix=routePrefix.startsWith("/")?routePrefix:`/${routePrefix}`;return prefix!=="/"&&prefix.endsWith("/")&&(prefix=prefix.slice(0,-1)),prefix}function getServicesMergeEntrypoint(service,buildSrc){let routePrefix=typeof service.routePrefix=="string"?service.routePrefix:"/",normalized=normalizeServiceRoutePrefix(routePrefix);return`svc:${String(1e4-normalized.length).padStart(5,"0")}:${normalized}:${service.name}:${buildSrc}`}function attachQueueServiceTrigger(buildOutput,service){let topics=(0,import_build_utils3.getServiceQueueTopicConfigs)(service),consumer=(0,import_build_utils3.sanitizeConsumerName)((0,import_build_utils3.getInternalServiceFunctionPath)(service.name));if(service.builder.use!=="@vercel/python"&&topics.length>1)throw new Error(`Worker service "${service.name}" has ${topics.length} topics, but multiple topics are only supported for Python workers.`);for(let topicConfig of topics){let trigger={type:"queue/v2beta",topic:topicConfig.topic,consumer};if(topicConfig.retryAfterSeconds!==void 0&&(trigger.retryAfterSeconds=topicConfig.retryAfterSeconds),topicConfig.initialDelaySeconds!==void 0&&(trigger.initialDelaySeconds=topicConfig.initialDelaySeconds),(0,import_write_build_result3.isLambda)(buildOutput))appendTrigger(buildOutput,trigger);else for(let output of Object.values(buildOutput))(0,import_write_build_result3.isLambda)(output)&&appendTrigger(output,trigger)}}function triggerMatches(trigger,existingTrigger){return trigger.type==="schedule/v1beta"?trigger.type===existingTrigger.type:trigger.type===existingTrigger.type&&trigger.topic===existingTrigger.topic&&trigger.consumer===existingTrigger.consumer}function appendTrigger(lambda,trigger){let existingTriggers=Array.isArray(lambda.experimentalTriggers)?lambda.experimentalTriggers:[];existingTriggers.some(existing=>triggerMatches(trigger,existing))||(lambda.experimentalTriggers=[...existingTriggers,trigger])}async function streamToString(stream){let chunks=[];for await(let chunk of stream){let buffer=Buffer.isBuffer(chunk)?chunk:Buffer.from(chunk);chunks.push(Uint8Array.from(buffer))}return Buffer.concat(chunks).toString("utf-8")}}});var require_dist5=__commonJS({"../../internals/cli-builder-integration/dist/index.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),src_exports={};__export(src_exports,{BuildRunner:()=>import_build_runner2.BuildRunner,InprocessBuildRunner:()=>import_build_runner2.InprocessBuildRunner,doBuild:()=>import_do_build.doBuild,executeBuilder:()=>import_execute_builder.executeBuilder,sortBuildsForExecution:()=>import_execute_builder.sortBuildsForExecution});module.exports=__toCommonJS(src_exports);var import_build_runner2=require_build_runner(),import_execute_builder=require_execute_builder(),import_do_build=require_do_build()}});var import_chalk=__toESM(require_source(),1),import_dotenv=__toESM(require_main(),1),import_fs_extra=__toESM(require_lib(),1),import_build_utils2=__toESM(require_build_utils(),1);import{dirname as dirname2,join as join3,relative as relative2,resolve}from"path";import{readdirSync,statSync}from"fs";var import_cli_builder_integration=__toESM(require_dist5(),1);var import_build_utils=__toESM(require_build_utils(),1),import_build_runner=__toESM(require_build_runner(),1);import{fork}from"node:child_process";import{readFileSync,unlinkSync}from"node:fs";import{join}from"node:path";function toError(error){return error instanceof Error?error:Object.assign(new Error,error)}function mergeWorkerMeta(target,workerMeta){for(let[key,value]of Object.entries(workerMeta)){let existing=target[key];if(existing instanceof Set&&value instanceof Set)for(let entry of value)existing.add(entry);else existing===!0&&typeof value!="object"||(target[key]=value)}}function canBuildInSubprocess({hasDetectedServices,builderPath}){return hasDetectedServices&&!!builderPath}function rehydrateFile(obj){if(obj.type==="FileBlob"){let blob=Object.assign(Object.create(import_build_utils.FileBlob.prototype),obj);if(obj.dataPath){blob.data=readFileSync(obj.dataPath);try{unlinkSync(obj.dataPath)}catch{}delete blob.dataPath}return blob}return obj.type==="FileRef"?Object.assign(Object.create(import_build_utils.FileRef.prototype),obj):Object.assign(Object.create(import_build_utils.FileFsRef.prototype),obj)}function rehydrateFiles(files){if(files)for(let name of Object.keys(files))files[name]=rehydrateFile(files[name])}function rehydrateDiagnostics(diagnostics){let result={};for(let[name,file]of Object.entries(diagnostics))result[name]=rehydrateFile(file);return result}function rehydrateOutput(output,seen){if(!output||typeof output!="object"||seen.has(output))return;seen.add(output);let obj=output;if(obj.type==="Lambda")rehydrateFiles(obj.files),Object.setPrototypeOf(obj,import_build_utils.Lambda.prototype);else if(obj.type==="EdgeFunction")rehydrateFiles(obj.files);else if(obj.type==="Prerender")obj.lambda&&rehydrateOutput(obj.lambda,seen),obj.fallback&&rehydrateOutput(obj.fallback,seen);else if(obj.type==="FileFsRef"||obj.type==="FileBlob"||obj.type==="FileRef"){let rehydrated=rehydrateFile(obj);Object.assign(obj,rehydrated),Object.setPrototypeOf(obj,Object.getPrototypeOf(rehydrated))}}function rehydrateResult(result,outputVersion){let output=(result&&"resultVersion"in result?result.result:result).output;if(!output)return;let seen=new Set;if(outputVersion===3)rehydrateOutput(output,seen);else for(let value of Object.values(output))rehydrateOutput(value,seen)}function createServiceLinePrefixer(serviceName,dest){let tag=`[vc:service:${serviceName}] `,pending="";return{onData(chunk){pending+=chunk;let newlineIndex=pending.lastIndexOf(`
|
|
7
|
+
import{import_write_build_result,require_detect_builders_with_services,require_get_files,require_service_schedules,require_write_build_result,writeBuildResult}from"../../chunks/chunk-3CQQXHDI.js";import{importBuilders,import_import_builders}from"../../chunks/chunk-4S6WFNRF.js";import"../../chunks/chunk-CJPM2DXZ.js";import{js_yaml_default,pullCommandLogic}from"../../chunks/chunk-7HT5KIFA.js";import{require_fast_deep_equal}from"../../chunks/chunk-4MZK6JT6.js";import{require_semver}from"../../chunks/chunk-KKS7XWEX.js";import{readJSONFile}from"../../chunks/chunk-LNOX5GIA.js";import{readProjectSettings,require_dist as require_dist4}from"../../chunks/chunk-MSLHCYBD.js";import"../../chunks/chunk-V6MR45PD.js";import"../../chunks/chunk-MKY5IBKK.js";import"../../chunks/chunk-HWWHR7H3.js";import{stamp_default}from"../../chunks/chunk-XPXOV5UO.js";import"../../chunks/chunk-2I64AYHG.js";import"../../chunks/chunk-JZRMH5UA.js";import"../../chunks/chunk-QTKJC2O5.js";import{require_dist as require_dist3,validateConfig}from"../../chunks/chunk-VHTNAYWA.js";import{require_dist,require_dist2,require_minimatch}from"../../chunks/chunk-JMNAVONO.js";import{compileVercelConfig,findSourceVercelConfigFile,require_main}from"../../chunks/chunk-3KQRJYBJ.js";import"../../chunks/chunk-L3JDEHCQ.js";import{pullEnvRecords}from"../../chunks/chunk-M6UYGRPW.js";import"../../chunks/chunk-ZWYU5SBC.js";import"../../chunks/chunk-H4FTGLWV.js";import"../../chunks/chunk-ULLWCOYC.js";import"../../chunks/chunk-N6CNMMSZ.js";import"../../chunks/chunk-I46LFJJG.js";import"../../chunks/chunk-OI263FBO.js";import{ensureLink}from"../../chunks/chunk-STO2JRII.js";import{printProjectNotFoundError}from"../../chunks/chunk-GK5C5TE5.js";import{AGENT_REASON,AGENT_STATUS}from"../../chunks/chunk-WUH5HYCX.js";import{require_frameworks}from"../../chunks/chunk-KK4AJES5.js";import{buildCommand}from"../../chunks/chunk-Y7PHTVZ6.js";import"../../chunks/chunk-5UOVEMYX.js";import"../../chunks/chunk-SOJCELXH.js";import"../../chunks/chunk-SXUEGVWB.js";import"../../chunks/chunk-6BZCSVH6.js";import{help}from"../../chunks/chunk-5U25FWD5.js";import"../../chunks/chunk-6TAQ6OWD.js";import{parseTarget}from"../../chunks/chunk-R3B67TKQ.js";import"../../chunks/chunk-C5KVTG2O.js";import"../../chunks/chunk-6NPXWN5F.js";import"../../chunks/chunk-WPS6JZF6.js";import{detectExplicitScope}from"../../chunks/chunk-4OKKSZVX.js";import"../../chunks/chunk-JSKGZLE4.js";import{TelemetryClient}from"../../chunks/chunk-A5VLP25I.js";import"../../chunks/chunk-RCTYVKM5.js";import"../../chunks/chunk-7T6TL3GQ.js";import"../../chunks/chunk-GHM7V3GG.js";import{ua_default}from"../../chunks/chunk-5XJNPXQK.js";import{printError,toEnumerableError}from"../../chunks/chunk-N5AIKGEO.js";import{parseArguments}from"../../chunks/chunk-WWB66KP5.js";import"../../chunks/chunk-MY4MONOH.js";import{DEFAULT_VERCEL_CONFIG_FILENAME,VERCEL_DIR,getLinkedProject,getProjectLink,require_lib,resolveProjectCwd}from"../../chunks/chunk-RLCFE3MK.js";import"../../chunks/chunk-F2ZWW2IO.js";import"../../chunks/chunk-B4ATVYZW.js";import"../../chunks/chunk-PPCFQQSU.js";import"../../chunks/chunk-BRK4OB4B.js";import"../../chunks/chunk-OSCCYU74.js";import{buildCommandWithGlobalFlags,outputAgentError}from"../../chunks/chunk-KCARCOP5.js";import{quoteArg}from"../../chunks/chunk-BKV35LVB.js";import{getFlagsSpecification}from"../../chunks/chunk-JAJW3P42.js";import"../../chunks/chunk-YMM3VY3J.js";import"../../chunks/chunk-SM5JI6QM.js";import"../../chunks/chunk-VOZEB6PD.js";import{CantParseJSONFile}from"../../chunks/chunk-RINZXCDJ.js";import{cmd,getCommandName,packageName,require_lib as require_lib2}from"../../chunks/chunk-FI772UVH.js";import{emoji,output_manager_default,prependEmoji,require_build_utils}from"../../chunks/chunk-EWWFNMPZ.js";import"../../chunks/chunk-QGIQK47P.js";import{pkg_default}from"../../chunks/chunk-AVSPFBLM.js";import"../../chunks/chunk-XCJDGQO7.js";import"../../chunks/chunk-YPTLSODC.js";import"../../chunks/chunk-7HL2RPUO.js";import{require_source}from"../../chunks/chunk-U7KCDTCH.js";import"../../chunks/chunk-N3ZZ7FHQ.js";import"../../chunks/chunk-GU6VIFR5.js";import{__commonJS,__require,__toESM}from"../../chunks/chunk-6L236MNA.js";var require_build_runner=__commonJS({"../../internals/cli-builder-integration/dist/build-runner.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),build_runner_exports={};__export(build_runner_exports,{BuildRunner:()=>BuildRunner3,InprocessBuildRunner:()=>InprocessBuildRunner2});module.exports=__toCommonJS(build_runner_exports);var BuildRunner3=class{constructor(ctx){this.ctx=ctx}},InprocessBuildRunner2=class extends BuildRunner3{constructor(ctx,builder){super(ctx),this.builder=builder}async build(){return await this.builder.build(this.ctx.buildOptions)}async diagnostics(){return await this.ctx.builderSpan.child("vc.builder.diagnostics").trace(async()=>await this.builder.diagnostics?.(this.ctx.buildOptions))}teardown(){}}}});var require_sort_builders=__commonJS({"../../internals/builder-orchestration/dist/sort-builders.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),sort_builders_exports={};__export(sort_builders_exports,{sortBuilders:()=>sortBuilders});module.exports=__toCommonJS(sort_builders_exports);var import_frameworks=require_frameworks();function sortBuilders(builds){let frameworkRuntimeSet=new Set(import_frameworks.frameworkList.map(f=>f.useRuntime?.use||"@vercel/static-build"));frameworkRuntimeSet.delete("@vercel/go"),frameworkRuntimeSet.delete("@vercel/python"),frameworkRuntimeSet.delete("@vercel/ruby"),frameworkRuntimeSet.delete("@vercel/rust");let toNumber=build=>build.use==="@vercel/go"||build.use==="@vercel/python"||build.use==="@vercel/ruby"||build.use==="@vercel/rust"?1:frameworkRuntimeSet.has(build.use)?0:2;return builds.sort((build1,build2)=>toNumber(build1)-toNumber(build2))}}});var require_execute_builder=__commonJS({"../../internals/cli-builder-integration/dist/execute-builder.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),execute_builder_exports={};__export(execute_builder_exports,{executeBuilder:()=>executeBuilder2,sortBuildsForExecution:()=>sortBuildsForExecution2});module.exports=__toCommonJS(execute_builder_exports);var import_sort_builders=require_sort_builders(),import_build_runner2=require_build_runner();async function executeBuilder2({builder,buildOptions,span,isFrontendBuilder,hasDetectedServices,framework,runner}){let buildRunner=runner??new import_build_runner2.InprocessBuildRunner({requirePath:"",buildOptions,cwd:buildOptions.workPath,expectsPreDeploy:!1,builderSpan:span},builder),rawBuildResult=await span.trace(()=>buildRunner.build()),buildResult=builder.version===-1&&"resultVersion"in rawBuildResult?rawBuildResult.result:rawBuildResult;return!hasDetectedServices&&buildOptions.config.zeroConfig&&isFrontendBuilder&&"output"in buildResult&&!buildResult.routes&&framework&&(buildResult.routes=await getFrameworkRoutes(framework,buildOptions.workPath)),{buildResult,rawBuildResult}}var sortBuildsForExecution2=import_sort_builders.sortBuilders;async function getFrameworkRoutes(framework,dirPrefix){return typeof framework.defaultRoutes=="function"?framework.defaultRoutes(dirPrefix):Array.isArray(framework.defaultRoutes)?framework.defaultRoutes:[]}}});var require_build_concurrency=__commonJS({"../../internals/cli-builder-integration/dist/build-concurrency.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),build_concurrency_exports={};__export(build_concurrency_exports,{getInstallScopeKey:()=>getInstallScopeKey,groupIntoScopeChains:()=>groupIntoScopeChains,resolveBuildConcurrency:()=>resolveBuildConcurrency,resolveInstallScopeRoot:()=>resolveInstallScopeRoot,runBuildsWithConcurrency:()=>runBuildsWithConcurrency,runWithConcurrency:()=>runWithConcurrency});module.exports=__toCommonJS(build_concurrency_exports);var import_node_os=__toESM2(__require("node:os")),import_node_fs3=__require("node:fs"),import_node_path3=__require("node:path"),MAX_AUTO_CONCURRENCY=8;function resolveBuildConcurrency(raw=process.env.VERCEL_EXPERIMENTAL_BUILD_CONCURRENCY){let value=raw?.trim();if(!value)return 1;let parallelism=Math.max(typeof import_node_os.default.availableParallelism=="function"?import_node_os.default.availableParallelism():import_node_os.default.cpus().length,1);if(value.toLowerCase()==="auto")return Math.min(Math.max(parallelism-1,2),MAX_AUTO_CONCURRENCY,parallelism);if(value.endsWith("%")){let pct=Number(value.slice(0,-1));return Number.isFinite(pct)&&pct>0?Math.max(1,Math.floor(parallelism*pct/100)):1}let n=Number(value);return Number.isFinite(n)&&n>=1?Math.floor(n):1}async function runWithConcurrency(items,limit,fn,onSecondaryError){let queue=[...items],max=Math.max(limit,1),active=0,failed=!1,firstError;if(await new Promise(finish=>{let enqueue=item=>{queue.push(item),pump()},pump=()=>{for(;active<max&&queue.length>0&&!failed;){let item=queue.shift();active++,fn(item,enqueue).then(()=>{active--,pump()},err=>{active--,failed?onSecondaryError?.(err,item):(failed=!0,firstError=err),pump()})}active===0&&finish()};pump()}),failed)throw firstError}function getInstallScopeKey({toolchain,installDirectory,installCommand}){return JSON.stringify([toolchain,(0,import_node_path3.normalize)(installDirectory),typeof installCommand=="string"?["cmd",installCommand.trim()]:"default"])}var NODE_LOCKFILES=["pnpm-lock.yaml","yarn.lock","package-lock.json","npm-shrinkwrap.json","bun.lock","bun.lockb"];async function fileExists(path){try{return await import_node_fs3.promises.stat(path),!0}catch{return!1}}var SERVICE_DIR_TOOLCHAINS=new Set(["go","ruby","rust","container"]);async function resolveInstallScopeRoot({toolchain,serviceDir,ceilingDir}){if(toolchain!=="node"&&toolchain!=="python")return SERVICE_DIR_TOOLCHAINS.has(toolchain)?(0,import_node_path3.normalize)(serviceDir):(0,import_node_path3.normalize)(ceilingDir);let ceiling=(0,import_node_path3.normalize)(ceilingDir),dir=(0,import_node_path3.normalize)(serviceDir);if(dir!==ceiling&&!dir.startsWith(ceiling+import_node_path3.sep))return dir;let nearestLockfileDir,nearestPackageJsonDir,done=!1;for(;!done;){if(toolchain==="node"){if(nearestLockfileDir===void 0){for(let lockfile of NODE_LOCKFILES)if(await fileExists((0,import_node_path3.join)(dir,lockfile))){nearestLockfileDir=dir;break}}if(await fileExists((0,import_node_path3.join)(dir,"pnpm-workspace.yaml")))return dir;try{let pkg=JSON.parse(await import_node_fs3.promises.readFile((0,import_node_path3.join)(dir,"package.json"),"utf8"));if(pkg&&typeof pkg=="object"){if("workspaces"in pkg)return dir;nearestPackageJsonDir??=dir}}catch{}}else try{if((await import_node_fs3.promises.readFile((0,import_node_path3.join)(dir,"pyproject.toml"),"utf8")).includes("[tool.uv.workspace]"))return dir}catch{}let parent=(0,import_node_path3.dirname)(dir);done=dir===ceiling||parent===dir,dir=parent}return nearestLockfileDir??nearestPackageJsonDir??(0,import_node_path3.normalize)(serviceDir)}async function runBuildsWithConcurrency({builds,concurrency,isEligible,resolveScope,forceSingleChain,runBuild,log,reportSecondaryError}){if(concurrency<=1){for(let build of builds)await runBuild(build,!1);return}let parallelBuilds=[],sequentialBuilds=[];for(let build of builds)(isEligible(build)?parallelBuilds:sequentialBuilds).push(build);if(parallelBuilds.length>0){let chains,siblingsOf;if(forceSingleChain)chains=[parallelBuilds],siblingsOf=new Map;else{let scopeByBuild=new Map;for(let build of parallelBuilds)scopeByBuild.set(build,await resolveScope(build));({chains,siblingsOf}=groupIntoScopeChains(parallelBuilds,build=>scopeByBuild.get(build)))}log(`Running ${parallelBuilds.length} builds across ${chains.length} install scope${chains.length===1?"":"s"} (concurrency ${concurrency})`);let abortedRun=!1,activeBuildOfChain=new Map;await runWithConcurrency(chains,concurrency,async(chain,enqueue)=>{for(let build of chain){if(abortedRun)return;activeBuildOfChain.set(chain,build);try{await runBuild(build,!0)}catch(err){throw abortedRun=!0,err}let siblings=siblingsOf.get(build);if(siblings)for(let sibling of siblings)enqueue([sibling])}},(err,chain)=>{let build=activeBuildOfChain.get(chain);build!==void 0&&reportSecondaryError(err,build)})}for(let build of sequentialBuilds)await runBuild(build,!1)}function groupIntoScopeChains(items,scopeOf){let chainByOuter=new Map,leaderByInnerByOuter=new Map,siblingsOf=new Map;for(let item of items){let scope=scopeOf(item),chain=chainByOuter.get(scope.outerKey);chain||(chain=[],chainByOuter.set(scope.outerKey,chain));let leaderByInner=leaderByInnerByOuter.get(scope.outerKey);leaderByInner||(leaderByInner=new Map,leaderByInnerByOuter.set(scope.outerKey,leaderByInner));let leader=leaderByInner.get(scope.innerKey);if(leader===void 0)leaderByInner.set(scope.innerKey,item),chain.push(item);else if(scope.siblingsSkipInstall){let siblings=siblingsOf.get(leader);siblings||(siblings=[],siblingsOf.set(leader,siblings)),siblings.push(item)}else chain.push(item)}return{chains:Array.from(chainByOuter.values()),siblingsOf}}}});var require_backend_rewrite_warning=__commonJS({"../../internals/cli-builder-integration/dist/backend-rewrite-warning.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),backend_rewrite_warning_exports={};__export(backend_rewrite_warning_exports,{BACKEND_REWRITE_BEHAVIOR_WARNING:()=>BACKEND_REWRITE_BEHAVIOR_WARNING,hasBackendRewriteBehaviorChange:()=>hasBackendRewriteBehaviorChange});module.exports=__toCommonJS(backend_rewrite_warning_exports);var import_build_utils3=__require("@vercel/build-utils"),BACKEND_REWRITE_BEHAVIOR_WARNING="Internal rewrites in backend framework projects now route requests using the rewritten destination path. This behavior was previously unsupported and may change which application route handles a request. Review your rewrite configuration to ensure this behavior is expected.";function hasInternalPathRewrite(rewrites){return rewrites?.some(rewrite=>typeof rewrite.destination=="string"&&rewrite.destination.startsWith("/"))??!1}function isAffectedFramework(framework){return framework==="go"||framework==="container"||(0,import_build_utils3.isPythonFramework)(framework)||(0,import_build_utils3.isNodeBackendFramework)(framework)}function hasBackendRewriteBehaviorChange({projectRewrites,builders}){return hasInternalPathRewrite(projectRewrites)&&(builders??[]).some(builder=>isAffectedFramework(builder.config?.framework))}}});var require_service_route_ownership=__commonJS({"../../internals/cli-builder-integration/dist/service-route-ownership.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),service_route_ownership_exports={};__export(service_route_ownership_exports,{scopeRoutesToServiceOwnership:()=>scopeRoutesToServiceOwnership});module.exports=__toCommonJS(service_route_ownership_exports);var import_routing_utils=require_dist();function isWebServiceWithPrefix(service){return service.type==="web"&&typeof service.routePrefix=="string"}function getWebRoutePrefixes(services){let unique=new Set;for(let service of services)isWebServiceWithPrefix(service)&&unique.add((0,import_routing_utils.normalizeRoutePrefix)(service.routePrefix));return Array.from(unique)}function scopeRoutesToServiceOwnership({routes,owner,allServices}){if(!isWebServiceWithPrefix(owner))return routes;let allWebPrefixes=getWebRoutePrefixes(allServices),ownershipGuard=(0,import_routing_utils.getOwnershipGuard)(owner.routePrefix,allWebPrefixes);return ownershipGuard?routes.map(route=>"handle"in route||typeof route.src!="string"?route:{...route,src:(0,import_routing_utils.scopeRouteSourceToOwnership)(route.src,ownershipGuard)}):routes}}});var require_validate_cron_secret=__commonJS({"../../internals/cli-builder-integration/dist/validate-cron-secret.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),validate_cron_secret_exports={};__export(validate_cron_secret_exports,{validateCronSecret:()=>validateCronSecret});module.exports=__toCommonJS(validate_cron_secret_exports);var import_build_utils3=__require("@vercel/build-utils");function validateCronSecret(cronSecret){if(!cronSecret)return null;if(cronSecret!==cronSecret.trim())return new import_build_utils3.NowBuildError({code:"INVALID_CRON_SECRET",message:"The `CRON_SECRET` environment variable contains leading or trailing whitespace, which is not allowed in HTTP header values.",link:"https://vercel.link/securing-cron-jobs",action:"Learn More"});let invalidChars=[];for(let i=0;i<cronSecret.length;i++){let code=cronSecret.charCodeAt(i);code===9||code>=32&&code<=126||invalidChars.push({char:cronSecret[i],index:i,code})}if(invalidChars.length>0){let descriptions=invalidChars.slice(0,3).map(({code,index})=>code<32?`control character (0x${code.toString(16).padStart(2,"0")}) at position ${index}`:code===127?`DEL character at position ${index}`:`non-ASCII character (0x${code.toString(16).padStart(2,"0")}) at position ${index}`),moreCount=invalidChars.length-3,moreText=moreCount>0?`, and ${moreCount} more`:"";return new import_build_utils3.NowBuildError({code:"INVALID_CRON_SECRET",message:`The \`CRON_SECRET\` environment variable contains characters that are not valid in HTTP headers: ${descriptions.join(", ")}${moreText}. Only visible ASCII characters (letters, digits, symbols), spaces, and tabs are allowed.`,link:"https://vercel.link/securing-cron-jobs",action:"Learn More"})}return null}}});var require_uri_all=__commonJS({"../../node_modules/.pnpm/uri-js@4.4.1/node_modules/uri-js/dist/es5/uri.all.js"(exports,module){(function(global,factory){typeof exports=="object"&&typeof module<"u"?factory(exports):typeof define=="function"&&define.amd?define(["exports"],factory):factory(global.URI=global.URI||{})})(exports,function(exports2){"use strict";function merge(){for(var _len=arguments.length,sets=Array(_len),_key=0;_key<_len;_key++)sets[_key]=arguments[_key];if(sets.length>1){sets[0]=sets[0].slice(0,-1);for(var xl=sets.length-1,x=1;x<xl;++x)sets[x]=sets[x].slice(1,-1);return sets[xl]=sets[xl].slice(1),sets.join("")}else return sets[0]}function subexp(str){return"(?:"+str+")"}function typeOf(o){return o===void 0?"undefined":o===null?"null":Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase()}function toUpperCase(str){return str.toUpperCase()}function toArray(obj){return obj!=null?obj instanceof Array?obj:typeof obj.length!="number"||obj.split||obj.setInterval||obj.call?[obj]:Array.prototype.slice.call(obj):[]}function assign(target,source){var obj=target;if(source)for(var key in source)obj[key]=source[key];return obj}function buildExps(isIRI2){var ALPHA$$="[A-Za-z]",CR$="[\\x0D]",DIGIT$$="[0-9]",DQUOTE$$="[\\x22]",HEXDIG$$2=merge(DIGIT$$,"[A-Fa-f]"),LF$$="[\\x0A]",SP$$="[\\x20]",PCT_ENCODED$2=subexp(subexp("%[EFef]"+HEXDIG$$2+"%"+HEXDIG$$2+HEXDIG$$2+"%"+HEXDIG$$2+HEXDIG$$2)+"|"+subexp("%[89A-Fa-f]"+HEXDIG$$2+"%"+HEXDIG$$2+HEXDIG$$2)+"|"+subexp("%"+HEXDIG$$2+HEXDIG$$2)),GEN_DELIMS$$="[\\:\\/\\?\\#\\[\\]\\@]",SUB_DELIMS$$="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",RESERVED$$=merge(GEN_DELIMS$$,SUB_DELIMS$$),UCSCHAR$$=isIRI2?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",IPRIVATE$$=isIRI2?"[\\uE000-\\uF8FF]":"[]",UNRESERVED$$2=merge(ALPHA$$,DIGIT$$,"[\\-\\.\\_\\~]",UCSCHAR$$),SCHEME$=subexp(ALPHA$$+merge(ALPHA$$,DIGIT$$,"[\\+\\-\\.]")+"*"),USERINFO$=subexp(subexp(PCT_ENCODED$2+"|"+merge(UNRESERVED$$2,SUB_DELIMS$$,"[\\:]"))+"*"),DEC_OCTET$=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+DIGIT$$)+"|"+subexp("1"+DIGIT$$+DIGIT$$)+"|"+subexp("[1-9]"+DIGIT$$)+"|"+DIGIT$$),DEC_OCTET_RELAXED$=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+DIGIT$$)+"|"+subexp("1"+DIGIT$$+DIGIT$$)+"|"+subexp("0?[1-9]"+DIGIT$$)+"|0?0?"+DIGIT$$),IPV4ADDRESS$=subexp(DEC_OCTET_RELAXED$+"\\."+DEC_OCTET_RELAXED$+"\\."+DEC_OCTET_RELAXED$+"\\."+DEC_OCTET_RELAXED$),H16$=subexp(HEXDIG$$2+"{1,4}"),LS32$=subexp(subexp(H16$+"\\:"+H16$)+"|"+IPV4ADDRESS$),IPV6ADDRESS1$=subexp(subexp(H16$+"\\:")+"{6}"+LS32$),IPV6ADDRESS2$=subexp("\\:\\:"+subexp(H16$+"\\:")+"{5}"+LS32$),IPV6ADDRESS3$=subexp(subexp(H16$)+"?\\:\\:"+subexp(H16$+"\\:")+"{4}"+LS32$),IPV6ADDRESS4$=subexp(subexp(subexp(H16$+"\\:")+"{0,1}"+H16$)+"?\\:\\:"+subexp(H16$+"\\:")+"{3}"+LS32$),IPV6ADDRESS5$=subexp(subexp(subexp(H16$+"\\:")+"{0,2}"+H16$)+"?\\:\\:"+subexp(H16$+"\\:")+"{2}"+LS32$),IPV6ADDRESS6$=subexp(subexp(subexp(H16$+"\\:")+"{0,3}"+H16$)+"?\\:\\:"+H16$+"\\:"+LS32$),IPV6ADDRESS7$=subexp(subexp(subexp(H16$+"\\:")+"{0,4}"+H16$)+"?\\:\\:"+LS32$),IPV6ADDRESS8$=subexp(subexp(subexp(H16$+"\\:")+"{0,5}"+H16$)+"?\\:\\:"+H16$),IPV6ADDRESS9$=subexp(subexp(subexp(H16$+"\\:")+"{0,6}"+H16$)+"?\\:\\:"),IPV6ADDRESS$=subexp([IPV6ADDRESS1$,IPV6ADDRESS2$,IPV6ADDRESS3$,IPV6ADDRESS4$,IPV6ADDRESS5$,IPV6ADDRESS6$,IPV6ADDRESS7$,IPV6ADDRESS8$,IPV6ADDRESS9$].join("|")),ZONEID$=subexp(subexp(UNRESERVED$$2+"|"+PCT_ENCODED$2)+"+"),IPV6ADDRZ$=subexp(IPV6ADDRESS$+"\\%25"+ZONEID$),IPV6ADDRZ_RELAXED$=subexp(IPV6ADDRESS$+subexp("\\%25|\\%(?!"+HEXDIG$$2+"{2})")+ZONEID$),IPVFUTURE$=subexp("[vV]"+HEXDIG$$2+"+\\."+merge(UNRESERVED$$2,SUB_DELIMS$$,"[\\:]")+"+"),IP_LITERAL$=subexp("\\["+subexp(IPV6ADDRZ_RELAXED$+"|"+IPV6ADDRESS$+"|"+IPVFUTURE$)+"\\]"),REG_NAME$=subexp(subexp(PCT_ENCODED$2+"|"+merge(UNRESERVED$$2,SUB_DELIMS$$))+"*"),HOST$=subexp(IP_LITERAL$+"|"+IPV4ADDRESS$+"(?!"+REG_NAME$+")|"+REG_NAME$),PORT$=subexp(DIGIT$$+"*"),AUTHORITY$=subexp(subexp(USERINFO$+"@")+"?"+HOST$+subexp("\\:"+PORT$)+"?"),PCHAR$=subexp(PCT_ENCODED$2+"|"+merge(UNRESERVED$$2,SUB_DELIMS$$,"[\\:\\@]")),SEGMENT$=subexp(PCHAR$+"*"),SEGMENT_NZ$=subexp(PCHAR$+"+"),SEGMENT_NZ_NC$=subexp(subexp(PCT_ENCODED$2+"|"+merge(UNRESERVED$$2,SUB_DELIMS$$,"[\\@]"))+"+"),PATH_ABEMPTY$=subexp(subexp("\\/"+SEGMENT$)+"*"),PATH_ABSOLUTE$=subexp("\\/"+subexp(SEGMENT_NZ$+PATH_ABEMPTY$)+"?"),PATH_NOSCHEME$=subexp(SEGMENT_NZ_NC$+PATH_ABEMPTY$),PATH_ROOTLESS$=subexp(SEGMENT_NZ$+PATH_ABEMPTY$),PATH_EMPTY$="(?!"+PCHAR$+")",PATH$=subexp(PATH_ABEMPTY$+"|"+PATH_ABSOLUTE$+"|"+PATH_NOSCHEME$+"|"+PATH_ROOTLESS$+"|"+PATH_EMPTY$),QUERY$=subexp(subexp(PCHAR$+"|"+merge("[\\/\\?]",IPRIVATE$$))+"*"),FRAGMENT$=subexp(subexp(PCHAR$+"|[\\/\\?]")+"*"),HIER_PART$=subexp(subexp("\\/\\/"+AUTHORITY$+PATH_ABEMPTY$)+"|"+PATH_ABSOLUTE$+"|"+PATH_ROOTLESS$+"|"+PATH_EMPTY$),URI$=subexp(SCHEME$+"\\:"+HIER_PART$+subexp("\\?"+QUERY$)+"?"+subexp("\\#"+FRAGMENT$)+"?"),RELATIVE_PART$=subexp(subexp("\\/\\/"+AUTHORITY$+PATH_ABEMPTY$)+"|"+PATH_ABSOLUTE$+"|"+PATH_NOSCHEME$+"|"+PATH_EMPTY$),RELATIVE$=subexp(RELATIVE_PART$+subexp("\\?"+QUERY$)+"?"+subexp("\\#"+FRAGMENT$)+"?"),URI_REFERENCE$=subexp(URI$+"|"+RELATIVE$),ABSOLUTE_URI$=subexp(SCHEME$+"\\:"+HIER_PART$+subexp("\\?"+QUERY$)+"?"),GENERIC_REF$="^("+SCHEME$+")\\:"+subexp(subexp("\\/\\/("+subexp("("+USERINFO$+")@")+"?("+HOST$+")"+subexp("\\:("+PORT$+")")+"?)")+"?("+PATH_ABEMPTY$+"|"+PATH_ABSOLUTE$+"|"+PATH_ROOTLESS$+"|"+PATH_EMPTY$+")")+subexp("\\?("+QUERY$+")")+"?"+subexp("\\#("+FRAGMENT$+")")+"?$",RELATIVE_REF$="^(){0}"+subexp(subexp("\\/\\/("+subexp("("+USERINFO$+")@")+"?("+HOST$+")"+subexp("\\:("+PORT$+")")+"?)")+"?("+PATH_ABEMPTY$+"|"+PATH_ABSOLUTE$+"|"+PATH_NOSCHEME$+"|"+PATH_EMPTY$+")")+subexp("\\?("+QUERY$+")")+"?"+subexp("\\#("+FRAGMENT$+")")+"?$",ABSOLUTE_REF$="^("+SCHEME$+")\\:"+subexp(subexp("\\/\\/("+subexp("("+USERINFO$+")@")+"?("+HOST$+")"+subexp("\\:("+PORT$+")")+"?)")+"?("+PATH_ABEMPTY$+"|"+PATH_ABSOLUTE$+"|"+PATH_ROOTLESS$+"|"+PATH_EMPTY$+")")+subexp("\\?("+QUERY$+")")+"?$",SAMEDOC_REF$="^"+subexp("\\#("+FRAGMENT$+")")+"?$",AUTHORITY_REF$="^"+subexp("("+USERINFO$+")@")+"?("+HOST$+")"+subexp("\\:("+PORT$+")")+"?$";return{NOT_SCHEME:new RegExp(merge("[^]",ALPHA$$,DIGIT$$,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(merge("[^\\%\\:]",UNRESERVED$$2,SUB_DELIMS$$),"g"),NOT_HOST:new RegExp(merge("[^\\%\\[\\]\\:]",UNRESERVED$$2,SUB_DELIMS$$),"g"),NOT_PATH:new RegExp(merge("[^\\%\\/\\:\\@]",UNRESERVED$$2,SUB_DELIMS$$),"g"),NOT_PATH_NOSCHEME:new RegExp(merge("[^\\%\\/\\@]",UNRESERVED$$2,SUB_DELIMS$$),"g"),NOT_QUERY:new RegExp(merge("[^\\%]",UNRESERVED$$2,SUB_DELIMS$$,"[\\:\\@\\/\\?]",IPRIVATE$$),"g"),NOT_FRAGMENT:new RegExp(merge("[^\\%]",UNRESERVED$$2,SUB_DELIMS$$,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(merge("[^]",UNRESERVED$$2,SUB_DELIMS$$),"g"),UNRESERVED:new RegExp(UNRESERVED$$2,"g"),OTHER_CHARS:new RegExp(merge("[^\\%]",UNRESERVED$$2,RESERVED$$),"g"),PCT_ENCODED:new RegExp(PCT_ENCODED$2,"g"),IPV4ADDRESS:new RegExp("^("+IPV4ADDRESS$+")$"),IPV6ADDRESS:new RegExp("^\\[?("+IPV6ADDRESS$+")"+subexp(subexp("\\%25|\\%(?!"+HEXDIG$$2+"{2})")+"("+ZONEID$+")")+"?\\]?$")}}var URI_PROTOCOL=buildExps(!1),IRI_PROTOCOL=buildExps(!0),slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!(i&&_arr.length===i));_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),toConsumableArray=function(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}else return Array.from(arr)},maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexPunycode=/^xn--/,regexNonASCII=/[^\0-\x7E]/,regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,errors={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode;function error$1(type){throw new RangeError(errors[type])}function map(array,fn){for(var result=[],length=array.length;length--;)result[length]=fn(array[length]);return result}function mapDomain(string,fn){var parts=string.split("@"),result="";parts.length>1&&(result=parts[0]+"@",string=parts[1]),string=string.replace(regexSeparators,".");var labels=string.split("."),encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){for(var output=[],counter=0,length=string.length;counter<length;){var value=string.charCodeAt(counter++);if(value>=55296&&value<=56319&&counter<length){var extra=string.charCodeAt(counter++);(extra&64512)==56320?output.push(((value&1023)<<10)+(extra&1023)+65536):(output.push(value),counter--)}else output.push(value)}return output}var ucs2encode=function(array){return String.fromCodePoint.apply(String,toConsumableArray(array))},basicToDigit=function(codePoint){return codePoint-48<10?codePoint-22:codePoint-65<26?codePoint-65:codePoint-97<26?codePoint-97:base},digitToBasic=function(digit,flag){return digit+22+75*(digit<26)-((flag!=0)<<5)},adapt=function(delta,numPoints,firstTime){var k=0;for(delta=firstTime?floor(delta/damp):delta>>1,delta+=floor(delta/numPoints);delta>baseMinusTMin*tMax>>1;k+=base)delta=floor(delta/baseMinusTMin);return floor(k+(baseMinusTMin+1)*delta/(delta+skew))},decode=function(input){var output=[],inputLength=input.length,i=0,n=initialN,bias=initialBias,basic=input.lastIndexOf(delimiter);basic<0&&(basic=0);for(var j=0;j<basic;++j)input.charCodeAt(j)>=128&&error$1("not-basic"),output.push(input.charCodeAt(j));for(var index=basic>0?basic+1:0;index<inputLength;){for(var oldi=i,w=1,k=base;;k+=base){index>=inputLength&&error$1("invalid-input");var digit=basicToDigit(input.charCodeAt(index++));(digit>=base||digit>floor((maxInt-i)/w))&&error$1("overflow"),i+=digit*w;var t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(digit<t)break;var baseMinusT=base-t;w>floor(maxInt/baseMinusT)&&error$1("overflow"),w*=baseMinusT}var out=output.length+1;bias=adapt(i-oldi,out,oldi==0),floor(i/out)>maxInt-n&&error$1("overflow"),n+=floor(i/out),i%=out,output.splice(i++,0,n)}return String.fromCodePoint.apply(String,output)},encode=function(input){var output=[];input=ucs2decode(input);var inputLength=input.length,n=initialN,delta=0,bias=initialBias,_iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _iterator=input[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var _currentValue2=_step.value;_currentValue2<128&&output.push(stringFromCharCode(_currentValue2))}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{!_iteratorNormalCompletion&&_iterator.return&&_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}var basicLength=output.length,handledCPCount=basicLength;for(basicLength&&output.push(delimiter);handledCPCount<inputLength;){var m=maxInt,_iteratorNormalCompletion2=!0,_didIteratorError2=!1,_iteratorError2=void 0;try{for(var _iterator2=input[Symbol.iterator](),_step2;!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=!0){var currentValue=_step2.value;currentValue>=n&¤tValue<m&&(m=currentValue)}}catch(err){_didIteratorError2=!0,_iteratorError2=err}finally{try{!_iteratorNormalCompletion2&&_iterator2.return&&_iterator2.return()}finally{if(_didIteratorError2)throw _iteratorError2}}var handledCPCountPlusOne=handledCPCount+1;m-n>floor((maxInt-delta)/handledCPCountPlusOne)&&error$1("overflow"),delta+=(m-n)*handledCPCountPlusOne,n=m;var _iteratorNormalCompletion3=!0,_didIteratorError3=!1,_iteratorError3=void 0;try{for(var _iterator3=input[Symbol.iterator](),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=!0){var _currentValue=_step3.value;if(_currentValue<n&&++delta>maxInt&&error$1("overflow"),_currentValue==n){for(var q=delta,k=base;;k+=base){var t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(q<t)break;var qMinusT=q-t,baseMinusT=base-t;output.push(stringFromCharCode(digitToBasic(t+qMinusT%baseMinusT,0))),q=floor(qMinusT/baseMinusT)}output.push(stringFromCharCode(digitToBasic(q,0))),bias=adapt(delta,handledCPCountPlusOne,handledCPCount==basicLength),delta=0,++handledCPCount}}}catch(err){_didIteratorError3=!0,_iteratorError3=err}finally{try{!_iteratorNormalCompletion3&&_iterator3.return&&_iterator3.return()}finally{if(_didIteratorError3)throw _iteratorError3}}++delta,++n}return output.join("")},toUnicode=function(input){return mapDomain(input,function(string){return regexPunycode.test(string)?decode(string.slice(4).toLowerCase()):string})},toASCII=function(input){return mapDomain(input,function(string){return regexNonASCII.test(string)?"xn--"+encode(string):string})},punycode={version:"2.1.0",ucs2:{decode:ucs2decode,encode:ucs2encode},decode,encode,toASCII,toUnicode},SCHEMES={};function pctEncChar(chr){var c=chr.charCodeAt(0),e=void 0;return c<16?e="%0"+c.toString(16).toUpperCase():c<128?e="%"+c.toString(16).toUpperCase():c<2048?e="%"+(c>>6|192).toString(16).toUpperCase()+"%"+(c&63|128).toString(16).toUpperCase():e="%"+(c>>12|224).toString(16).toUpperCase()+"%"+(c>>6&63|128).toString(16).toUpperCase()+"%"+(c&63|128).toString(16).toUpperCase(),e}function pctDecChars(str){for(var newStr="",i=0,il=str.length;i<il;){var c=parseInt(str.substr(i+1,2),16);if(c<128)newStr+=String.fromCharCode(c),i+=3;else if(c>=194&&c<224){if(il-i>=6){var c2=parseInt(str.substr(i+4,2),16);newStr+=String.fromCharCode((c&31)<<6|c2&63)}else newStr+=str.substr(i,6);i+=6}else if(c>=224){if(il-i>=9){var _c=parseInt(str.substr(i+4,2),16),c3=parseInt(str.substr(i+7,2),16);newStr+=String.fromCharCode((c&15)<<12|(_c&63)<<6|c3&63)}else newStr+=str.substr(i,9);i+=9}else newStr+=str.substr(i,3),i+=3}return newStr}function _normalizeComponentEncoding(components,protocol){function decodeUnreserved2(str){var decStr=pctDecChars(str);return decStr.match(protocol.UNRESERVED)?decStr:str}return components.scheme&&(components.scheme=String(components.scheme).replace(protocol.PCT_ENCODED,decodeUnreserved2).toLowerCase().replace(protocol.NOT_SCHEME,"")),components.userinfo!==void 0&&(components.userinfo=String(components.userinfo).replace(protocol.PCT_ENCODED,decodeUnreserved2).replace(protocol.NOT_USERINFO,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase)),components.host!==void 0&&(components.host=String(components.host).replace(protocol.PCT_ENCODED,decodeUnreserved2).toLowerCase().replace(protocol.NOT_HOST,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase)),components.path!==void 0&&(components.path=String(components.path).replace(protocol.PCT_ENCODED,decodeUnreserved2).replace(components.scheme?protocol.NOT_PATH:protocol.NOT_PATH_NOSCHEME,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase)),components.query!==void 0&&(components.query=String(components.query).replace(protocol.PCT_ENCODED,decodeUnreserved2).replace(protocol.NOT_QUERY,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase)),components.fragment!==void 0&&(components.fragment=String(components.fragment).replace(protocol.PCT_ENCODED,decodeUnreserved2).replace(protocol.NOT_FRAGMENT,pctEncChar).replace(protocol.PCT_ENCODED,toUpperCase)),components}function _stripLeadingZeros(str){return str.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(host,protocol){var matches=host.match(protocol.IPV4ADDRESS)||[],_matches=slicedToArray(matches,2),address=_matches[1];return address?address.split(".").map(_stripLeadingZeros).join("."):host}function _normalizeIPv6(host,protocol){var matches=host.match(protocol.IPV6ADDRESS)||[],_matches2=slicedToArray(matches,3),address=_matches2[1],zone=_matches2[2];if(address){for(var _address$toLowerCase$=address.toLowerCase().split("::").reverse(),_address$toLowerCase$2=slicedToArray(_address$toLowerCase$,2),last=_address$toLowerCase$2[0],first=_address$toLowerCase$2[1],firstFields=first?first.split(":").map(_stripLeadingZeros):[],lastFields=last.split(":").map(_stripLeadingZeros),isLastFieldIPv4Address=protocol.IPV4ADDRESS.test(lastFields[lastFields.length-1]),fieldCount=isLastFieldIPv4Address?7:8,lastFieldsStart=lastFields.length-fieldCount,fields=Array(fieldCount),x=0;x<fieldCount;++x)fields[x]=firstFields[x]||lastFields[lastFieldsStart+x]||"";isLastFieldIPv4Address&&(fields[fieldCount-1]=_normalizeIPv4(fields[fieldCount-1],protocol));var allZeroFields=fields.reduce(function(acc,field,index){if(!field||field==="0"){var lastLongest=acc[acc.length-1];lastLongest&&lastLongest.index+lastLongest.length===index?lastLongest.length++:acc.push({index,length:1})}return acc},[]),longestZeroFields=allZeroFields.sort(function(a,b){return b.length-a.length})[0],newHost=void 0;if(longestZeroFields&&longestZeroFields.length>1){var newFirst=fields.slice(0,longestZeroFields.index),newLast=fields.slice(longestZeroFields.index+longestZeroFields.length);newHost=newFirst.join(":")+"::"+newLast.join(":")}else newHost=fields.join(":");return zone&&(newHost+="%"+zone),newHost}else return host}var URI_PARSE=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,NO_MATCH_IS_UNDEFINED="".match(/(){0}/)[1]===void 0;function parse2(uriString){var options=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},components={},protocol=options.iri!==!1?IRI_PROTOCOL:URI_PROTOCOL;options.reference==="suffix"&&(uriString=(options.scheme?options.scheme+":":"")+"//"+uriString);var matches=uriString.match(URI_PARSE);if(matches){NO_MATCH_IS_UNDEFINED?(components.scheme=matches[1],components.userinfo=matches[3],components.host=matches[4],components.port=parseInt(matches[5],10),components.path=matches[6]||"",components.query=matches[7],components.fragment=matches[8],isNaN(components.port)&&(components.port=matches[5])):(components.scheme=matches[1]||void 0,components.userinfo=uriString.indexOf("@")!==-1?matches[3]:void 0,components.host=uriString.indexOf("//")!==-1?matches[4]:void 0,components.port=parseInt(matches[5],10),components.path=matches[6]||"",components.query=uriString.indexOf("?")!==-1?matches[7]:void 0,components.fragment=uriString.indexOf("#")!==-1?matches[8]:void 0,isNaN(components.port)&&(components.port=uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?matches[4]:void 0)),components.host&&(components.host=_normalizeIPv6(_normalizeIPv4(components.host,protocol),protocol)),components.scheme===void 0&&components.userinfo===void 0&&components.host===void 0&&components.port===void 0&&!components.path&&components.query===void 0?components.reference="same-document":components.scheme===void 0?components.reference="relative":components.fragment===void 0?components.reference="absolute":components.reference="uri",options.reference&&options.reference!=="suffix"&&options.reference!==components.reference&&(components.error=components.error||"URI is not a "+options.reference+" reference.");var schemeHandler=SCHEMES[(options.scheme||components.scheme||"").toLowerCase()];if(!options.unicodeSupport&&(!schemeHandler||!schemeHandler.unicodeSupport)){if(components.host&&(options.domainHost||schemeHandler&&schemeHandler.domainHost))try{components.host=punycode.toASCII(components.host.replace(protocol.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){components.error=components.error||"Host's domain name can not be converted to ASCII via punycode: "+e}_normalizeComponentEncoding(components,URI_PROTOCOL)}else _normalizeComponentEncoding(components,protocol);schemeHandler&&schemeHandler.parse&&schemeHandler.parse(components,options)}else components.error=components.error||"URI can not be parsed.";return components}function _recomposeAuthority(components,options){var protocol=options.iri!==!1?IRI_PROTOCOL:URI_PROTOCOL,uriTokens=[];return components.userinfo!==void 0&&(uriTokens.push(components.userinfo),uriTokens.push("@")),components.host!==void 0&&uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host),protocol),protocol).replace(protocol.IPV6ADDRESS,function(_,$1,$2){return"["+$1+($2?"%25"+$2:"")+"]"})),(typeof components.port=="number"||typeof components.port=="string")&&(uriTokens.push(":"),uriTokens.push(String(components.port))),uriTokens.length?uriTokens.join(""):void 0}var RDS1=/^\.\.?\//,RDS2=/^\/\.(\/|$)/,RDS3=/^\/\.\.(\/|$)/,RDS5=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(input){for(var output=[];input.length;)if(input.match(RDS1))input=input.replace(RDS1,"");else if(input.match(RDS2))input=input.replace(RDS2,"/");else if(input.match(RDS3))input=input.replace(RDS3,"/"),output.pop();else if(input==="."||input==="..")input="";else{var im=input.match(RDS5);if(im){var s=im[0];input=input.slice(s.length),output.push(s)}else throw new Error("Unexpected dot segment condition")}return output.join("")}function serialize(components){var options=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},protocol=options.iri?IRI_PROTOCOL:URI_PROTOCOL,uriTokens=[],schemeHandler=SCHEMES[(options.scheme||components.scheme||"").toLowerCase()];if(schemeHandler&&schemeHandler.serialize&&schemeHandler.serialize(components,options),components.host&&!protocol.IPV6ADDRESS.test(components.host)){if(options.domainHost||schemeHandler&&schemeHandler.domainHost)try{components.host=options.iri?punycode.toUnicode(components.host):punycode.toASCII(components.host.replace(protocol.PCT_ENCODED,pctDecChars).toLowerCase())}catch(e){components.error=components.error||"Host's domain name can not be converted to "+(options.iri?"Unicode":"ASCII")+" via punycode: "+e}}_normalizeComponentEncoding(components,protocol),options.reference!=="suffix"&&components.scheme&&(uriTokens.push(components.scheme),uriTokens.push(":"));var authority=_recomposeAuthority(components,options);if(authority!==void 0&&(options.reference!=="suffix"&&uriTokens.push("//"),uriTokens.push(authority),components.path&&components.path.charAt(0)!=="/"&&uriTokens.push("/")),components.path!==void 0){var s=components.path;!options.absolutePath&&(!schemeHandler||!schemeHandler.absolutePath)&&(s=removeDotSegments(s)),authority===void 0&&(s=s.replace(/^\/\//,"/%2F")),uriTokens.push(s)}return components.query!==void 0&&(uriTokens.push("?"),uriTokens.push(components.query)),components.fragment!==void 0&&(uriTokens.push("#"),uriTokens.push(components.fragment)),uriTokens.join("")}function resolveComponents(base2,relative3){var options=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},skipNormalization=arguments[3],target={};return skipNormalization||(base2=parse2(serialize(base2,options),options),relative3=parse2(serialize(relative3,options),options)),options=options||{},!options.tolerant&&relative3.scheme?(target.scheme=relative3.scheme,target.userinfo=relative3.userinfo,target.host=relative3.host,target.port=relative3.port,target.path=removeDotSegments(relative3.path||""),target.query=relative3.query):(relative3.userinfo!==void 0||relative3.host!==void 0||relative3.port!==void 0?(target.userinfo=relative3.userinfo,target.host=relative3.host,target.port=relative3.port,target.path=removeDotSegments(relative3.path||""),target.query=relative3.query):(relative3.path?(relative3.path.charAt(0)==="/"?target.path=removeDotSegments(relative3.path):((base2.userinfo!==void 0||base2.host!==void 0||base2.port!==void 0)&&!base2.path?target.path="/"+relative3.path:base2.path?target.path=base2.path.slice(0,base2.path.lastIndexOf("/")+1)+relative3.path:target.path=relative3.path,target.path=removeDotSegments(target.path)),target.query=relative3.query):(target.path=base2.path,relative3.query!==void 0?target.query=relative3.query:target.query=base2.query),target.userinfo=base2.userinfo,target.host=base2.host,target.port=base2.port),target.scheme=base2.scheme),target.fragment=relative3.fragment,target}function resolve2(baseURI,relativeURI,options){var schemelessOptions=assign({scheme:"null"},options);return serialize(resolveComponents(parse2(baseURI,schemelessOptions),parse2(relativeURI,schemelessOptions),schemelessOptions,!0),schemelessOptions)}function normalize(uri,options){return typeof uri=="string"?uri=serialize(parse2(uri,options),options):typeOf(uri)==="object"&&(uri=parse2(serialize(uri,options),options)),uri}function equal(uriA,uriB,options){return typeof uriA=="string"?uriA=serialize(parse2(uriA,options),options):typeOf(uriA)==="object"&&(uriA=serialize(uriA,options)),typeof uriB=="string"?uriB=serialize(parse2(uriB,options),options):typeOf(uriB)==="object"&&(uriB=serialize(uriB,options)),uriA===uriB}function escapeComponent(str,options){return str&&str.toString().replace(!options||!options.iri?URI_PROTOCOL.ESCAPE:IRI_PROTOCOL.ESCAPE,pctEncChar)}function unescapeComponent(str,options){return str&&str.toString().replace(!options||!options.iri?URI_PROTOCOL.PCT_ENCODED:IRI_PROTOCOL.PCT_ENCODED,pctDecChars)}var handler={scheme:"http",domainHost:!0,parse:function(components,options){return components.host||(components.error=components.error||"HTTP URIs must have a host."),components},serialize:function(components,options){var secure=String(components.scheme).toLowerCase()==="https";return(components.port===(secure?443:80)||components.port==="")&&(components.port=void 0),components.path||(components.path="/"),components}},handler$1={scheme:"https",domainHost:handler.domainHost,parse:handler.parse,serialize:handler.serialize};function isSecure(wsComponents){return typeof wsComponents.secure=="boolean"?wsComponents.secure:String(wsComponents.scheme).toLowerCase()==="wss"}var handler$2={scheme:"ws",domainHost:!0,parse:function(components,options){var wsComponents=components;return wsComponents.secure=isSecure(wsComponents),wsComponents.resourceName=(wsComponents.path||"/")+(wsComponents.query?"?"+wsComponents.query:""),wsComponents.path=void 0,wsComponents.query=void 0,wsComponents},serialize:function(wsComponents,options){if((wsComponents.port===(isSecure(wsComponents)?443:80)||wsComponents.port==="")&&(wsComponents.port=void 0),typeof wsComponents.secure=="boolean"&&(wsComponents.scheme=wsComponents.secure?"wss":"ws",wsComponents.secure=void 0),wsComponents.resourceName){var _wsComponents$resourc=wsComponents.resourceName.split("?"),_wsComponents$resourc2=slicedToArray(_wsComponents$resourc,2),path=_wsComponents$resourc2[0],query=_wsComponents$resourc2[1];wsComponents.path=path&&path!=="/"?path:void 0,wsComponents.query=query,wsComponents.resourceName=void 0}return wsComponents.fragment=void 0,wsComponents}},handler$3={scheme:"wss",domainHost:handler$2.domainHost,parse:handler$2.parse,serialize:handler$2.serialize},O={},isIRI=!0,UNRESERVED$$="[A-Za-z0-9\\-\\.\\_\\~"+(isIRI?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",HEXDIG$$="[0-9A-Fa-f]",PCT_ENCODED$=subexp(subexp("%[EFef]"+HEXDIG$$+"%"+HEXDIG$$+HEXDIG$$+"%"+HEXDIG$$+HEXDIG$$)+"|"+subexp("%[89A-Fa-f]"+HEXDIG$$+"%"+HEXDIG$$+HEXDIG$$)+"|"+subexp("%"+HEXDIG$$+HEXDIG$$)),ATEXT$$="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",QTEXT$$="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",VCHAR$$=merge(QTEXT$$,'[\\"\\\\]'),SOME_DELIMS$$="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",UNRESERVED=new RegExp(UNRESERVED$$,"g"),PCT_ENCODED=new RegExp(PCT_ENCODED$,"g"),NOT_LOCAL_PART=new RegExp(merge("[^]",ATEXT$$,"[\\.]",'[\\"]',VCHAR$$),"g"),NOT_HFNAME=new RegExp(merge("[^]",UNRESERVED$$,SOME_DELIMS$$),"g"),NOT_HFVALUE=NOT_HFNAME;function decodeUnreserved(str){var decStr=pctDecChars(str);return decStr.match(UNRESERVED)?decStr:str}var handler$4={scheme:"mailto",parse:function(components,options){var mailtoComponents=components,to=mailtoComponents.to=mailtoComponents.path?mailtoComponents.path.split(","):[];if(mailtoComponents.path=void 0,mailtoComponents.query){for(var unknownHeaders=!1,headers={},hfields=mailtoComponents.query.split("&"),x=0,xl=hfields.length;x<xl;++x){var hfield=hfields[x].split("=");switch(hfield[0]){case"to":for(var toAddrs=hfield[1].split(","),_x=0,_xl=toAddrs.length;_x<_xl;++_x)to.push(toAddrs[_x]);break;case"subject":mailtoComponents.subject=unescapeComponent(hfield[1],options);break;case"body":mailtoComponents.body=unescapeComponent(hfield[1],options);break;default:unknownHeaders=!0,headers[unescapeComponent(hfield[0],options)]=unescapeComponent(hfield[1],options);break}}unknownHeaders&&(mailtoComponents.headers=headers)}mailtoComponents.query=void 0;for(var _x2=0,_xl2=to.length;_x2<_xl2;++_x2){var addr=to[_x2].split("@");if(addr[0]=unescapeComponent(addr[0]),options.unicodeSupport)addr[1]=unescapeComponent(addr[1],options).toLowerCase();else try{addr[1]=punycode.toASCII(unescapeComponent(addr[1],options).toLowerCase())}catch(e){mailtoComponents.error=mailtoComponents.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}to[_x2]=addr.join("@")}return mailtoComponents},serialize:function(mailtoComponents,options){var components=mailtoComponents,to=toArray(mailtoComponents.to);if(to){for(var x=0,xl=to.length;x<xl;++x){var toAddr=String(to[x]),atIdx=toAddr.lastIndexOf("@"),localPart=toAddr.slice(0,atIdx).replace(PCT_ENCODED,decodeUnreserved).replace(PCT_ENCODED,toUpperCase).replace(NOT_LOCAL_PART,pctEncChar),domain=toAddr.slice(atIdx+1);try{domain=options.iri?punycode.toUnicode(domain):punycode.toASCII(unescapeComponent(domain,options).toLowerCase())}catch(e){components.error=components.error||"Email address's domain name can not be converted to "+(options.iri?"Unicode":"ASCII")+" via punycode: "+e}to[x]=localPart+"@"+domain}components.path=to.join(",")}var headers=mailtoComponents.headers=mailtoComponents.headers||{};mailtoComponents.subject&&(headers.subject=mailtoComponents.subject),mailtoComponents.body&&(headers.body=mailtoComponents.body);var fields=[];for(var name in headers)headers[name]!==O[name]&&fields.push(name.replace(PCT_ENCODED,decodeUnreserved).replace(PCT_ENCODED,toUpperCase).replace(NOT_HFNAME,pctEncChar)+"="+headers[name].replace(PCT_ENCODED,decodeUnreserved).replace(PCT_ENCODED,toUpperCase).replace(NOT_HFVALUE,pctEncChar));return fields.length&&(components.query=fields.join("&")),components}},URN_PARSE=/^([^\:]+)\:(.*)/,handler$5={scheme:"urn",parse:function(components,options){var matches=components.path&&components.path.match(URN_PARSE),urnComponents=components;if(matches){var scheme=options.scheme||urnComponents.scheme||"urn",nid=matches[1].toLowerCase(),nss=matches[2],urnScheme=scheme+":"+(options.nid||nid),schemeHandler=SCHEMES[urnScheme];urnComponents.nid=nid,urnComponents.nss=nss,urnComponents.path=void 0,schemeHandler&&(urnComponents=schemeHandler.parse(urnComponents,options))}else urnComponents.error=urnComponents.error||"URN can not be parsed.";return urnComponents},serialize:function(urnComponents,options){var scheme=options.scheme||urnComponents.scheme||"urn",nid=urnComponents.nid,urnScheme=scheme+":"+(options.nid||nid),schemeHandler=SCHEMES[urnScheme];schemeHandler&&(urnComponents=schemeHandler.serialize(urnComponents,options));var uriComponents=urnComponents,nss=urnComponents.nss;return uriComponents.path=(nid||options.nid)+":"+nss,uriComponents}},UUID=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,handler$6={scheme:"urn:uuid",parse:function(urnComponents,options){var uuidComponents=urnComponents;return uuidComponents.uuid=uuidComponents.nss,uuidComponents.nss=void 0,!options.tolerant&&(!uuidComponents.uuid||!uuidComponents.uuid.match(UUID))&&(uuidComponents.error=uuidComponents.error||"UUID is not valid."),uuidComponents},serialize:function(uuidComponents,options){var urnComponents=uuidComponents;return urnComponents.nss=(uuidComponents.uuid||"").toLowerCase(),urnComponents}};SCHEMES[handler.scheme]=handler,SCHEMES[handler$1.scheme]=handler$1,SCHEMES[handler$2.scheme]=handler$2,SCHEMES[handler$3.scheme]=handler$3,SCHEMES[handler$4.scheme]=handler$4,SCHEMES[handler$5.scheme]=handler$5,SCHEMES[handler$6.scheme]=handler$6,exports2.SCHEMES=SCHEMES,exports2.pctEncChar=pctEncChar,exports2.pctDecChars=pctDecChars,exports2.parse=parse2,exports2.removeDotSegments=removeDotSegments,exports2.serialize=serialize,exports2.resolveComponents=resolveComponents,exports2.resolve=resolve2,exports2.normalize=normalize,exports2.equal=equal,exports2.escapeComponent=escapeComponent,exports2.unescapeComponent=unescapeComponent,Object.defineProperty(exports2,"__esModule",{value:!0})})}});var require_ucs2length=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/ucs2length.js"(exports,module){"use strict";module.exports=function(str){for(var length=0,len=str.length,pos=0,value;pos<len;)length++,value=str.charCodeAt(pos++),value>=55296&&value<=56319&&pos<len&&(value=str.charCodeAt(pos),(value&64512)==56320&&pos++);return length}}});var require_util=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/util.js"(exports,module){"use strict";module.exports={copy,checkDataType,checkDataTypes,coerceToTypes,toHash,getProperty,escapeQuotes,equal:require_fast_deep_equal(),ucs2length:require_ucs2length(),varOccurences,varReplace,schemaHasRules,schemaHasRulesExcept,schemaUnknownRules,toQuotedString,getPathExpr,getPath,getData,unescapeFragment,unescapeJsonPointer,escapeFragment,escapeJsonPointer};function copy(o,to){to=to||{};for(var key in o)to[key]=o[key];return to}function checkDataType(dataType,data,strictNumbers,negate){var EQUAL=negate?" !== ":" === ",AND=negate?" || ":" && ",OK=negate?"!":"",NOT=negate?"":"!";switch(dataType){case"null":return data+EQUAL+"null";case"array":return OK+"Array.isArray("+data+")";case"object":return"("+OK+data+AND+"typeof "+data+EQUAL+'"object"'+AND+NOT+"Array.isArray("+data+"))";case"integer":return"(typeof "+data+EQUAL+'"number"'+AND+NOT+"("+data+" % 1)"+AND+data+EQUAL+data+(strictNumbers?AND+OK+"isFinite("+data+")":"")+")";case"number":return"(typeof "+data+EQUAL+'"'+dataType+'"'+(strictNumbers?AND+OK+"isFinite("+data+")":"")+")";default:return"typeof "+data+EQUAL+'"'+dataType+'"'}}function checkDataTypes(dataTypes,data,strictNumbers){switch(dataTypes.length){case 1:return checkDataType(dataTypes[0],data,strictNumbers,!0);default:var code="",types=toHash(dataTypes);types.array&&types.object&&(code=types.null?"(":"(!"+data+" || ",code+="typeof "+data+' !== "object")',delete types.null,delete types.array,delete types.object),types.number&&delete types.integer;for(var t in types)code+=(code?" && ":"")+checkDataType(t,data,strictNumbers,!0);return code}}var COERCE_TO_TYPES=toHash(["string","number","integer","boolean","null"]);function coerceToTypes(optionCoerceTypes,dataTypes){if(Array.isArray(dataTypes)){for(var types=[],i=0;i<dataTypes.length;i++){var t=dataTypes[i];(COERCE_TO_TYPES[t]||optionCoerceTypes==="array"&&t==="array")&&(types[types.length]=t)}if(types.length)return types}else{if(COERCE_TO_TYPES[dataTypes])return[dataTypes];if(optionCoerceTypes==="array"&&dataTypes==="array")return["array"]}}function toHash(arr){for(var hash={},i=0;i<arr.length;i++)hash[arr[i]]=!0;return hash}var IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i,SINGLE_QUOTE=/'|\\/g;function getProperty(key){return typeof key=="number"?"["+key+"]":IDENTIFIER.test(key)?"."+key:"['"+escapeQuotes(key)+"']"}function escapeQuotes(str){return str.replace(SINGLE_QUOTE,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function varOccurences(str,dataVar){dataVar+="[^0-9]";var matches=str.match(new RegExp(dataVar,"g"));return matches?matches.length:0}function varReplace(str,dataVar,expr){return dataVar+="([^0-9])",expr=expr.replace(/\$/g,"$$$$"),str.replace(new RegExp(dataVar,"g"),expr+"$1")}function schemaHasRules(schema,rules){if(typeof schema=="boolean")return!schema;for(var key in schema)if(rules[key])return!0}function schemaHasRulesExcept(schema,rules,exceptKeyword){if(typeof schema=="boolean")return!schema&&exceptKeyword!="not";for(var key in schema)if(key!=exceptKeyword&&rules[key])return!0}function schemaUnknownRules(schema,rules){if(typeof schema!="boolean"){for(var key in schema)if(!rules[key])return key}}function toQuotedString(str){return"'"+escapeQuotes(str)+"'"}function getPathExpr(currentPath,expr,jsonPointers,isNumber){var path=jsonPointers?"'/' + "+expr+(isNumber?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):isNumber?"'[' + "+expr+" + ']'":"'[\\'' + "+expr+" + '\\']'";return joinPaths(currentPath,path)}function getPath(currentPath,prop,jsonPointers){var path=toQuotedString(jsonPointers?"/"+escapeJsonPointer(prop):getProperty(prop));return joinPaths(currentPath,path)}var JSON_POINTER=/^\/(?:[^~]|~0|~1)*$/,RELATIVE_JSON_POINTER=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData($data,lvl,paths){var up,jsonPointer,data,matches;if($data==="")return"rootData";if($data[0]=="/"){if(!JSON_POINTER.test($data))throw new Error("Invalid JSON-pointer: "+$data);jsonPointer=$data,data="rootData"}else{if(matches=$data.match(RELATIVE_JSON_POINTER),!matches)throw new Error("Invalid JSON-pointer: "+$data);if(up=+matches[1],jsonPointer=matches[2],jsonPointer=="#"){if(up>=lvl)throw new Error("Cannot access property/index "+up+" levels up, current level is "+lvl);return paths[lvl-up]}if(up>lvl)throw new Error("Cannot access data "+up+" levels up, current level is "+lvl);if(data="data"+(lvl-up||""),!jsonPointer)return data}for(var expr=data,segments=jsonPointer.split("/"),i=0;i<segments.length;i++){var segment=segments[i];segment&&(data+=getProperty(unescapeJsonPointer(segment)),expr+=" && "+data)}return expr}function joinPaths(a,b){return a=='""'?b:(a+" + "+b).replace(/([^\\])' \+ '/g,"$1")}function unescapeFragment(str){return unescapeJsonPointer(decodeURIComponent(str))}function escapeFragment(str){return encodeURIComponent(escapeJsonPointer(str))}function escapeJsonPointer(str){return str.replace(/~/g,"~0").replace(/\//g,"~1")}function unescapeJsonPointer(str){return str.replace(/~1/g,"/").replace(/~0/g,"~")}}});var require_schema_obj=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/schema_obj.js"(exports,module){"use strict";var util=require_util();module.exports=SchemaObject;function SchemaObject(obj){util.copy(obj,this)}}});var require_json_schema_traverse=__commonJS({"../../node_modules/.pnpm/json-schema-traverse@0.4.1/node_modules/json-schema-traverse/index.js"(exports,module){"use strict";var traverse=module.exports=function(schema,opts,cb){typeof opts=="function"&&(cb=opts,opts={}),cb=opts.cb||cb;var pre=typeof cb=="function"?cb:cb.pre||function(){},post=cb.post||function(){};_traverse(opts,pre,post,schema,"",schema)};traverse.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0};traverse.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};traverse.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};traverse.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function _traverse(opts,pre,post,schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex){if(schema&&typeof schema=="object"&&!Array.isArray(schema)){pre(schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex);for(var key in schema){var sch=schema[key];if(Array.isArray(sch)){if(key in traverse.arrayKeywords)for(var i=0;i<sch.length;i++)_traverse(opts,pre,post,sch[i],jsonPtr+"/"+key+"/"+i,rootSchema,jsonPtr,key,schema,i)}else if(key in traverse.propsKeywords){if(sch&&typeof sch=="object")for(var prop in sch)_traverse(opts,pre,post,sch[prop],jsonPtr+"/"+key+"/"+escapeJsonPtr(prop),rootSchema,jsonPtr,key,schema,prop)}else(key in traverse.keywords||opts.allKeys&&!(key in traverse.skipKeywords))&&_traverse(opts,pre,post,sch,jsonPtr+"/"+key,rootSchema,jsonPtr,key,schema)}post(schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex)}}function escapeJsonPtr(str){return str.replace(/~/g,"~0").replace(/\//g,"~1")}}});var require_resolve=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/resolve.js"(exports,module){"use strict";var URI=require_uri_all(),equal=require_fast_deep_equal(),util=require_util(),SchemaObject=require_schema_obj(),traverse=require_json_schema_traverse();module.exports=resolve2;resolve2.normalizeId=normalizeId;resolve2.fullPath=getFullPath;resolve2.url=resolveUrl;resolve2.ids=resolveIds;resolve2.inlineRef=inlineRef;resolve2.schema=resolveSchema;function resolve2(compile,root,ref){var refVal=this._refs[ref];if(typeof refVal=="string")if(this._refs[refVal])refVal=this._refs[refVal];else return resolve2.call(this,compile,root,refVal);if(refVal=refVal||this._schemas[ref],refVal instanceof SchemaObject)return inlineRef(refVal.schema,this._opts.inlineRefs)?refVal.schema:refVal.validate||this._compile(refVal);var res=resolveSchema.call(this,root,ref),schema,v,baseId;return res&&(schema=res.schema,root=res.root,baseId=res.baseId),schema instanceof SchemaObject?v=schema.validate||compile.call(this,schema.schema,root,void 0,baseId):schema!==void 0&&(v=inlineRef(schema,this._opts.inlineRefs)?schema:compile.call(this,schema,root,void 0,baseId)),v}function resolveSchema(root,ref){var p=URI.parse(ref),refPath=_getFullPath(p),baseId=getFullPath(this._getId(root.schema));if(Object.keys(root.schema).length===0||refPath!==baseId){var id=normalizeId(refPath),refVal=this._refs[id];if(typeof refVal=="string")return resolveRecursive.call(this,root,refVal,p);if(refVal instanceof SchemaObject)refVal.validate||this._compile(refVal),root=refVal;else if(refVal=this._schemas[id],refVal instanceof SchemaObject){if(refVal.validate||this._compile(refVal),id==normalizeId(ref))return{schema:refVal,root,baseId};root=refVal}else return;if(!root.schema)return;baseId=getFullPath(this._getId(root.schema))}return getJsonPointer.call(this,p,baseId,root.schema,root)}function resolveRecursive(root,ref,parsedRef){var res=resolveSchema.call(this,root,ref);if(res){var schema=res.schema,baseId=res.baseId;root=res.root;var id=this._getId(schema);return id&&(baseId=resolveUrl(baseId,id)),getJsonPointer.call(this,parsedRef,baseId,schema,root)}}var PREVENT_SCOPE_CHANGE=util.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(parsedRef,baseId,schema,root){if(parsedRef.fragment=parsedRef.fragment||"",parsedRef.fragment.slice(0,1)=="/"){for(var parts=parsedRef.fragment.split("/"),i=1;i<parts.length;i++){var part=parts[i];if(part){if(part=util.unescapeFragment(part),schema=schema[part],schema===void 0)break;var id;if(!PREVENT_SCOPE_CHANGE[part]&&(id=this._getId(schema),id&&(baseId=resolveUrl(baseId,id)),schema.$ref)){var $ref=resolveUrl(baseId,schema.$ref),res=resolveSchema.call(this,root,$ref);res&&(schema=res.schema,root=res.root,baseId=res.baseId)}}}if(schema!==void 0&&schema!==root.schema)return{schema,root,baseId}}}var SIMPLE_INLINED=util.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function inlineRef(schema,limit){if(limit===!1)return!1;if(limit===void 0||limit===!0)return checkNoRef(schema);if(limit)return countKeys(schema)<=limit}function checkNoRef(schema){var item;if(Array.isArray(schema)){for(var i=0;i<schema.length;i++)if(item=schema[i],typeof item=="object"&&!checkNoRef(item))return!1}else for(var key in schema)if(key=="$ref"||(item=schema[key],typeof item=="object"&&!checkNoRef(item)))return!1;return!0}function countKeys(schema){var count=0,item;if(Array.isArray(schema)){for(var i=0;i<schema.length;i++)if(item=schema[i],typeof item=="object"&&(count+=countKeys(item)),count==1/0)return 1/0}else for(var key in schema){if(key=="$ref")return 1/0;if(SIMPLE_INLINED[key])count++;else if(item=schema[key],typeof item=="object"&&(count+=countKeys(item)+1),count==1/0)return 1/0}return count}function getFullPath(id,normalize){normalize!==!1&&(id=normalizeId(id));var p=URI.parse(id);return _getFullPath(p)}function _getFullPath(p){return URI.serialize(p).split("#")[0]+"#"}var TRAILING_SLASH_HASH=/#\/?$/;function normalizeId(id){return id?id.replace(TRAILING_SLASH_HASH,""):""}function resolveUrl(baseId,id){return id=normalizeId(id),URI.resolve(baseId,id)}function resolveIds(schema){var schemaId=normalizeId(this._getId(schema)),baseIds={"":schemaId},fullPaths={"":getFullPath(schemaId,!1)},localRefs={},self=this;return traverse(schema,{allKeys:!0},function(sch,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex){if(jsonPtr!==""){var id=self._getId(sch),baseId=baseIds[parentJsonPtr],fullPath=fullPaths[parentJsonPtr]+"/"+parentKeyword;if(keyIndex!==void 0&&(fullPath+="/"+(typeof keyIndex=="number"?keyIndex:util.escapeFragment(keyIndex))),typeof id=="string"){id=baseId=normalizeId(baseId?URI.resolve(baseId,id):id);var refVal=self._refs[id];if(typeof refVal=="string"&&(refVal=self._refs[refVal]),refVal&&refVal.schema){if(!equal(sch,refVal.schema))throw new Error('id "'+id+'" resolves to more than one schema')}else if(id!=normalizeId(fullPath))if(id[0]=="#"){if(localRefs[id]&&!equal(sch,localRefs[id]))throw new Error('id "'+id+'" resolves to more than one schema');localRefs[id]=sch}else self._refs[id]=fullPath}baseIds[jsonPtr]=baseId,fullPaths[jsonPtr]=fullPath}}),localRefs}}});var require_error_classes=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/error_classes.js"(exports,module){"use strict";var resolve2=require_resolve();module.exports={Validation:errorSubclass(ValidationError),MissingRef:errorSubclass(MissingRefError)};function ValidationError(errors){this.message="validation failed",this.errors=errors,this.ajv=this.validation=!0}MissingRefError.message=function(baseId,ref){return"can't resolve reference "+ref+" from id "+baseId};function MissingRefError(baseId,ref,message){this.message=message||MissingRefError.message(baseId,ref),this.missingRef=resolve2.url(baseId,ref),this.missingSchema=resolve2.normalizeId(resolve2.fullPath(this.missingRef))}function errorSubclass(Subclass){return Subclass.prototype=Object.create(Error.prototype),Subclass.prototype.constructor=Subclass,Subclass}}});var require_fast_json_stable_stringify=__commonJS({"../../node_modules/.pnpm/fast-json-stable-stringify@2.1.0/node_modules/fast-json-stable-stringify/index.js"(exports,module){"use strict";module.exports=function(data,opts){opts||(opts={}),typeof opts=="function"&&(opts={cmp:opts});var cycles=typeof opts.cycles=="boolean"?opts.cycles:!1,cmp=opts.cmp&&function(f){return function(node){return function(a,b){var aobj={key:a,value:node[a]},bobj={key:b,value:node[b]};return f(aobj,bobj)}}}(opts.cmp),seen=[];return function stringify(node){if(node&&node.toJSON&&typeof node.toJSON=="function"&&(node=node.toJSON()),node!==void 0){if(typeof node=="number")return isFinite(node)?""+node:"null";if(typeof node!="object")return JSON.stringify(node);var i,out;if(Array.isArray(node)){for(out="[",i=0;i<node.length;i++)i&&(out+=","),out+=stringify(node[i])||"null";return out+"]"}if(node===null)return"null";if(seen.indexOf(node)!==-1){if(cycles)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var seenIndex=seen.push(node)-1,keys=Object.keys(node).sort(cmp&&cmp(node));for(out="",i=0;i<keys.length;i++){var key=keys[i],value=stringify(node[key]);value&&(out&&(out+=","),out+=JSON.stringify(key)+":"+value)}return seen.splice(seenIndex,1),"{"+out+"}"}}(data)}}});var require_validate=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/validate.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out="",$async=it.schema.$async===!0,$refKeywords=it.util.schemaHasRulesExcept(it.schema,it.RULES.all,"$ref"),$id=it.self._getId(it.schema);if(it.opts.strictKeywords){var $unknownKwd=it.util.schemaUnknownRules(it.schema,it.RULES.keywords);if($unknownKwd){var $keywordsMsg="unknown keyword: "+$unknownKwd;if(it.opts.strictKeywords==="log")it.logger.warn($keywordsMsg);else throw new Error($keywordsMsg)}}if(it.isTop&&(out+=" var validate = ",$async&&(it.async=!0,out+="async "),out+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",$id&&(it.opts.sourceCode||it.opts.processCode)&&(out+=" "+("/*# sourceURL="+$id+" */")+" ")),typeof it.schema=="boolean"||!($refKeywords||it.schema.$ref)){var $keyword="false schema",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$errorKeyword,$data="data"+($dataLvl||""),$valid="valid"+$lvl;if(it.schema===!1){it.isTop?$breakOnError=!0:out+=" var "+$valid+" = false; ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"false schema")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ",it.opts.messages!==!1&&(out+=" , message: 'boolean schema is false' "),it.opts.verbose&&(out+=" , schema: false , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else it.isTop?$async?out+=" return data; ":out+=" validate.errors = null; return true; ":out+=" var "+$valid+" = true; ";return it.isTop&&(out+=" }; return validate; "),out}if(it.isTop){var $top=it.isTop,$lvl=it.level=0,$dataLvl=it.dataLevel=0,$data="data";if(it.rootId=it.resolve.fullPath(it.self._getId(it.root.schema)),it.baseId=it.baseId||it.rootId,delete it.isTop,it.dataPathArr=[void 0],it.schema.default!==void 0&&it.opts.useDefaults&&it.opts.strictDefaults){var $defaultMsg="default is ignored in the schema root";if(it.opts.strictDefaults==="log")it.logger.warn($defaultMsg);else throw new Error($defaultMsg)}out+=" var vErrors = null; ",out+=" var errors = 0; ",out+=" if (rootData === undefined) rootData = data; "}else{var $lvl=it.level,$dataLvl=it.dataLevel,$data="data"+($dataLvl||"");if($id&&(it.baseId=it.resolve.url(it.baseId,$id)),$async&&!it.async)throw new Error("async schema in sync schema");out+=" var errs_"+$lvl+" = errors;"}var $valid="valid"+$lvl,$breakOnError=!it.opts.allErrors,$closingBraces1="",$closingBraces2="",$errorKeyword,$typeSchema=it.schema.type,$typeIsArray=Array.isArray($typeSchema);if($typeSchema&&it.opts.nullable&&it.schema.nullable===!0&&($typeIsArray?$typeSchema.indexOf("null")==-1&&($typeSchema=$typeSchema.concat("null")):$typeSchema!="null"&&($typeSchema=[$typeSchema,"null"],$typeIsArray=!0)),$typeIsArray&&$typeSchema.length==1&&($typeSchema=$typeSchema[0],$typeIsArray=!1),it.schema.$ref&&$refKeywords){if(it.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+it.errSchemaPath+'" (see option extendRefs)');it.opts.extendRefs!==!0&&($refKeywords=!1,it.logger.warn('$ref: keywords ignored in schema at path "'+it.errSchemaPath+'"'))}if(it.schema.$comment&&it.opts.$comment&&(out+=" "+it.RULES.all.$comment.code(it,"$comment")),$typeSchema){if(it.opts.coerceTypes)var $coerceToTypes=it.util.coerceToTypes(it.opts.coerceTypes,$typeSchema);var $rulesGroup=it.RULES.types[$typeSchema];if($coerceToTypes||$typeIsArray||$rulesGroup===!0||$rulesGroup&&!$shouldUseGroup($rulesGroup)){var $schemaPath=it.schemaPath+".type",$errSchemaPath=it.errSchemaPath+"/type",$schemaPath=it.schemaPath+".type",$errSchemaPath=it.errSchemaPath+"/type",$method=$typeIsArray?"checkDataTypes":"checkDataType";if(out+=" if ("+it.util[$method]($typeSchema,$data,it.opts.strictNumbers,!0)+") { ",$coerceToTypes){var $dataType="dataType"+$lvl,$coerced="coerced"+$lvl;out+=" var "+$dataType+" = typeof "+$data+"; ",it.opts.coerceTypes=="array"&&(out+=" if ("+$dataType+" == 'object' && Array.isArray("+$data+")) "+$dataType+" = 'array'; "),out+=" var "+$coerced+" = undefined; ";var $bracesCoercion="",arr1=$coerceToTypes;if(arr1)for(var $type,$i=-1,l1=arr1.length-1;$i<l1;)$type=arr1[$i+=1],$i&&(out+=" if ("+$coerced+" === undefined) { ",$bracesCoercion+="}"),it.opts.coerceTypes=="array"&&$type!="array"&&(out+=" if ("+$dataType+" == 'array' && "+$data+".length == 1) { "+$coerced+" = "+$data+" = "+$data+"[0]; "+$dataType+" = typeof "+$data+"; } "),$type=="string"?out+=" if ("+$dataType+" == 'number' || "+$dataType+" == 'boolean') "+$coerced+" = '' + "+$data+"; else if ("+$data+" === null) "+$coerced+" = ''; ":$type=="number"||$type=="integer"?(out+=" if ("+$dataType+" == 'boolean' || "+$data+" === null || ("+$dataType+" == 'string' && "+$data+" && "+$data+" == +"+$data+" ",$type=="integer"&&(out+=" && !("+$data+" % 1)"),out+=")) "+$coerced+" = +"+$data+"; "):$type=="boolean"?out+=" if ("+$data+" === 'false' || "+$data+" === 0 || "+$data+" === null) "+$coerced+" = false; else if ("+$data+" === 'true' || "+$data+" === 1) "+$coerced+" = true; ":$type=="null"?out+=" if ("+$data+" === '' || "+$data+" === 0 || "+$data+" === false) "+$coerced+" = null; ":it.opts.coerceTypes=="array"&&$type=="array"&&(out+=" if ("+$dataType+" == 'string' || "+$dataType+" == 'number' || "+$dataType+" == 'boolean' || "+$data+" == null) "+$coerced+" = ["+$data+"]; ");out+=" "+$bracesCoercion+" if ("+$coerced+" === undefined) { ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"type")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { type: '",$typeIsArray?out+=""+$typeSchema.join(","):out+=""+$typeSchema,out+="' } ",it.opts.messages!==!1&&(out+=" , message: 'should be ",$typeIsArray?out+=""+$typeSchema.join(","):out+=""+$typeSchema,out+="' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } else { ";var $parentData=$dataLvl?"data"+($dataLvl-1||""):"parentData",$parentDataProperty=$dataLvl?it.dataPathArr[$dataLvl]:"parentDataProperty";out+=" "+$data+" = "+$coerced+"; ",$dataLvl||(out+="if ("+$parentData+" !== undefined)"),out+=" "+$parentData+"["+$parentDataProperty+"] = "+$coerced+"; } "}else{var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"type")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { type: '",$typeIsArray?out+=""+$typeSchema.join(","):out+=""+$typeSchema,out+="' } ",it.opts.messages!==!1&&(out+=" , message: 'should be ",$typeIsArray?out+=""+$typeSchema.join(","):out+=""+$typeSchema,out+="' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}out+=" } "}}if(it.schema.$ref&&!$refKeywords)out+=" "+it.RULES.all.$ref.code(it,"$ref")+" ",$breakOnError&&(out+=" } if (errors === ",$top?out+="0":out+="errs_"+$lvl,out+=") { ",$closingBraces2+="}");else{var arr2=it.RULES;if(arr2){for(var $rulesGroup,i2=-1,l2=arr2.length-1;i2<l2;)if($rulesGroup=arr2[i2+=1],$shouldUseGroup($rulesGroup)){if($rulesGroup.type&&(out+=" if ("+it.util.checkDataType($rulesGroup.type,$data,it.opts.strictNumbers)+") { "),it.opts.useDefaults){if($rulesGroup.type=="object"&&it.schema.properties){var $schema=it.schema.properties,$schemaKeys=Object.keys($schema),arr3=$schemaKeys;if(arr3)for(var $propertyKey,i3=-1,l3=arr3.length-1;i3<l3;){$propertyKey=arr3[i3+=1];var $sch=$schema[$propertyKey];if($sch.default!==void 0){var $passData=$data+it.util.getProperty($propertyKey);if(it.compositeRule){if(it.opts.strictDefaults){var $defaultMsg="default is ignored for: "+$passData;if(it.opts.strictDefaults==="log")it.logger.warn($defaultMsg);else throw new Error($defaultMsg)}}else out+=" if ("+$passData+" === undefined ",it.opts.useDefaults=="empty"&&(out+=" || "+$passData+" === null || "+$passData+" === '' "),out+=" ) "+$passData+" = ",it.opts.useDefaults=="shared"?out+=" "+it.useDefault($sch.default)+" ":out+=" "+JSON.stringify($sch.default)+" ",out+="; "}}}else if($rulesGroup.type=="array"&&Array.isArray(it.schema.items)){var arr4=it.schema.items;if(arr4){for(var $sch,$i=-1,l4=arr4.length-1;$i<l4;)if($sch=arr4[$i+=1],$sch.default!==void 0){var $passData=$data+"["+$i+"]";if(it.compositeRule){if(it.opts.strictDefaults){var $defaultMsg="default is ignored for: "+$passData;if(it.opts.strictDefaults==="log")it.logger.warn($defaultMsg);else throw new Error($defaultMsg)}}else out+=" if ("+$passData+" === undefined ",it.opts.useDefaults=="empty"&&(out+=" || "+$passData+" === null || "+$passData+" === '' "),out+=" ) "+$passData+" = ",it.opts.useDefaults=="shared"?out+=" "+it.useDefault($sch.default)+" ":out+=" "+JSON.stringify($sch.default)+" ",out+="; "}}}}var arr5=$rulesGroup.rules;if(arr5){for(var $rule,i5=-1,l5=arr5.length-1;i5<l5;)if($rule=arr5[i5+=1],$shouldUseRule($rule)){var $code=$rule.code(it,$rule.keyword,$rulesGroup.type);$code&&(out+=" "+$code+" ",$breakOnError&&($closingBraces1+="}"))}}if($breakOnError&&(out+=" "+$closingBraces1+" ",$closingBraces1=""),$rulesGroup.type&&(out+=" } ",$typeSchema&&$typeSchema===$rulesGroup.type&&!$coerceToTypes)){out+=" else { ";var $schemaPath=it.schemaPath+".type",$errSchemaPath=it.errSchemaPath+"/type",$$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"type")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { type: '",$typeIsArray?out+=""+$typeSchema.join(","):out+=""+$typeSchema,out+="' } ",it.opts.messages!==!1&&(out+=" , message: 'should be ",$typeIsArray?out+=""+$typeSchema.join(","):out+=""+$typeSchema,out+="' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } "}$breakOnError&&(out+=" if (errors === ",$top?out+="0":out+="errs_"+$lvl,out+=") { ",$closingBraces2+="}")}}}$breakOnError&&(out+=" "+$closingBraces2+" "),$top?($async?(out+=" if (errors === 0) return data; ",out+=" else throw new ValidationError(vErrors); "):(out+=" validate.errors = vErrors; ",out+=" return errors === 0; "),out+=" }; return validate;"):out+=" var "+$valid+" = errors === errs_"+$lvl+";";function $shouldUseGroup($rulesGroup2){for(var rules=$rulesGroup2.rules,i=0;i<rules.length;i++)if($shouldUseRule(rules[i]))return!0}function $shouldUseRule($rule2){return it.schema[$rule2.keyword]!==void 0||$rule2.implements&&$ruleImplementsSomeKeyword($rule2)}function $ruleImplementsSomeKeyword($rule2){for(var impl=$rule2.implements,i=0;i<impl.length;i++)if(it.schema[impl[i]]!==void 0)return!0}return out}}});var require_compile=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/index.js"(exports,module){"use strict";var resolve2=require_resolve(),util=require_util(),errorClasses=require_error_classes(),stableStringify=require_fast_json_stable_stringify(),validateGenerator=require_validate(),ucs2length=util.ucs2length,equal=require_fast_deep_equal(),ValidationError=errorClasses.Validation;module.exports=compile;function compile(schema,root,localRefs,baseId){var self=this,opts=this._opts,refVal=[void 0],refs={},patterns=[],patternsHash={},defaults=[],defaultsHash={},customRules=[];root=root||{schema,refVal,refs};var c=checkCompiling.call(this,schema,root,baseId),compilation=this._compilations[c.index];if(c.compiling)return compilation.callValidate=callValidate;var formats=this._formats,RULES=this.RULES;try{var v=localCompile(schema,root,localRefs,baseId);compilation.validate=v;var cv=compilation.callValidate;return cv&&(cv.schema=v.schema,cv.errors=null,cv.refs=v.refs,cv.refVal=v.refVal,cv.root=v.root,cv.$async=v.$async,opts.sourceCode&&(cv.source=v.source)),v}finally{endCompiling.call(this,schema,root,baseId)}function callValidate(){var validate=compilation.validate,result=validate.apply(this,arguments);return callValidate.errors=validate.errors,result}function localCompile(_schema,_root,localRefs2,baseId2){var isRoot=!_root||_root&&_root.schema==_schema;if(_root.schema!=root.schema)return compile.call(self,_schema,_root,localRefs2,baseId2);var $async=_schema.$async===!0,sourceCode=validateGenerator({isTop:!0,schema:_schema,isRoot,baseId:baseId2,root:_root,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:errorClasses.MissingRef,RULES,validate:validateGenerator,util,resolve:resolve2,resolveRef,usePattern,useDefault,useCustomRule,opts,formats,logger:self.logger,self});sourceCode=vars(refVal,refValCode)+vars(patterns,patternCode)+vars(defaults,defaultCode)+vars(customRules,customRuleCode)+sourceCode,opts.processCode&&(sourceCode=opts.processCode(sourceCode,_schema));var validate;try{var makeValidate=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",sourceCode);validate=makeValidate(self,RULES,formats,root,refVal,defaults,customRules,equal,ucs2length,ValidationError),refVal[0]=validate}catch(e){throw self.logger.error("Error compiling schema, function code:",sourceCode),e}return validate.schema=_schema,validate.errors=null,validate.refs=refs,validate.refVal=refVal,validate.root=isRoot?validate:_root,$async&&(validate.$async=!0),opts.sourceCode===!0&&(validate.source={code:sourceCode,patterns,defaults}),validate}function resolveRef(baseId2,ref,isRoot){ref=resolve2.url(baseId2,ref);var refIndex=refs[ref],_refVal,refCode;if(refIndex!==void 0)return _refVal=refVal[refIndex],refCode="refVal["+refIndex+"]",resolvedRef(_refVal,refCode);if(!isRoot&&root.refs){var rootRefId=root.refs[ref];if(rootRefId!==void 0)return _refVal=root.refVal[rootRefId],refCode=addLocalRef(ref,_refVal),resolvedRef(_refVal,refCode)}refCode=addLocalRef(ref);var v2=resolve2.call(self,localCompile,root,ref);if(v2===void 0){var localSchema=localRefs&&localRefs[ref];localSchema&&(v2=resolve2.inlineRef(localSchema,opts.inlineRefs)?localSchema:compile.call(self,localSchema,root,localRefs,baseId2))}if(v2===void 0)removeLocalRef(ref);else return replaceLocalRef(ref,v2),resolvedRef(v2,refCode)}function addLocalRef(ref,v2){var refId=refVal.length;return refVal[refId]=v2,refs[ref]=refId,"refVal"+refId}function removeLocalRef(ref){delete refs[ref]}function replaceLocalRef(ref,v2){var refId=refs[ref];refVal[refId]=v2}function resolvedRef(refVal2,code){return typeof refVal2=="object"||typeof refVal2=="boolean"?{code,schema:refVal2,inline:!0}:{code,$async:refVal2&&!!refVal2.$async}}function usePattern(regexStr){var index=patternsHash[regexStr];return index===void 0&&(index=patternsHash[regexStr]=patterns.length,patterns[index]=regexStr),"pattern"+index}function useDefault(value){switch(typeof value){case"boolean":case"number":return""+value;case"string":return util.toQuotedString(value);case"object":if(value===null)return"null";var valueStr=stableStringify(value),index=defaultsHash[valueStr];return index===void 0&&(index=defaultsHash[valueStr]=defaults.length,defaults[index]=value),"default"+index}}function useCustomRule(rule,schema2,parentSchema,it){if(self._opts.validateSchema!==!1){var deps=rule.definition.dependencies;if(deps&&!deps.every(function(keyword){return Object.prototype.hasOwnProperty.call(parentSchema,keyword)}))throw new Error("parent schema must have all required keywords: "+deps.join(","));var validateSchema=rule.definition.validateSchema;if(validateSchema){var valid=validateSchema(schema2);if(!valid){var message="keyword schema is invalid: "+self.errorsText(validateSchema.errors);if(self._opts.validateSchema=="log")self.logger.error(message);else throw new Error(message)}}}var compile2=rule.definition.compile,inline=rule.definition.inline,macro=rule.definition.macro,validate;if(compile2)validate=compile2.call(self,schema2,parentSchema,it);else if(macro)validate=macro.call(self,schema2,parentSchema,it),opts.validateSchema!==!1&&self.validateSchema(validate,!0);else if(inline)validate=inline.call(self,it,rule.keyword,schema2,parentSchema);else if(validate=rule.definition.validate,!validate)return;if(validate===void 0)throw new Error('custom keyword "'+rule.keyword+'"failed to compile');var index=customRules.length;return customRules[index]=validate,{code:"customRule"+index,validate}}}function checkCompiling(schema,root,baseId){var index=compIndex.call(this,schema,root,baseId);return index>=0?{index,compiling:!0}:(index=this._compilations.length,this._compilations[index]={schema,root,baseId},{index,compiling:!1})}function endCompiling(schema,root,baseId){var i=compIndex.call(this,schema,root,baseId);i>=0&&this._compilations.splice(i,1)}function compIndex(schema,root,baseId){for(var i=0;i<this._compilations.length;i++){var c=this._compilations[i];if(c.schema==schema&&c.root==root&&c.baseId==baseId)return i}return-1}function patternCode(i,patterns){return"var pattern"+i+" = new RegExp("+util.toQuotedString(patterns[i])+");"}function defaultCode(i){return"var default"+i+" = defaults["+i+"];"}function refValCode(i,refVal){return refVal[i]===void 0?"":"var refVal"+i+" = refVal["+i+"];"}function customRuleCode(i){return"var customRule"+i+" = customRules["+i+"];"}function vars(arr,statement){if(!arr.length)return"";for(var code="",i=0;i<arr.length;i++)code+=statement(i,arr);return code}}});var require_cache=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/cache.js"(exports,module){"use strict";var Cache=module.exports=function(){this._cache={}};Cache.prototype.put=function(key,value){this._cache[key]=value};Cache.prototype.get=function(key){return this._cache[key]};Cache.prototype.del=function(key){delete this._cache[key]};Cache.prototype.clear=function(){this._cache={}}}});var require_formats=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/formats.js"(exports,module){"use strict";var util=require_util(),DATE=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,DAYS=[0,31,28,31,30,31,30,31,31,30,31,30,31],TIME=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,HOSTNAME=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,URI=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,URIREF=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,URITEMPLATE=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,URL=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,UUID=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,JSON_POINTER=/^(?:\/(?:[^~/]|~0|~1)*)*$/,JSON_POINTER_URI_FRAGMENT=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,RELATIVE_JSON_POINTER=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;module.exports=formats;function formats(mode){return mode=mode=="full"?"full":"fast",util.copy(formats[mode])}formats.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":URITEMPLATE,url:URL,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:HOSTNAME,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex,uuid:UUID,"json-pointer":JSON_POINTER,"json-pointer-uri-fragment":JSON_POINTER_URI_FRAGMENT,"relative-json-pointer":RELATIVE_JSON_POINTER};formats.full={date,time,"date-time":date_time,uri,"uri-reference":URIREF,"uri-template":URITEMPLATE,url:URL,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:HOSTNAME,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex,uuid:UUID,"json-pointer":JSON_POINTER,"json-pointer-uri-fragment":JSON_POINTER_URI_FRAGMENT,"relative-json-pointer":RELATIVE_JSON_POINTER};function isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}function date(str){var matches=str.match(DATE);if(!matches)return!1;var year=+matches[1],month=+matches[2],day=+matches[3];return month>=1&&month<=12&&day>=1&&day<=(month==2&&isLeapYear(year)?29:DAYS[month])}function time(str,full){var matches=str.match(TIME);if(!matches)return!1;var hour=matches[1],minute=matches[2],second=matches[3],timeZone=matches[5];return(hour<=23&&minute<=59&&second<=59||hour==23&&minute==59&&second==60)&&(!full||timeZone)}var DATE_TIME_SEPARATOR=/t|\s/i;function date_time(str){var dateTime=str.split(DATE_TIME_SEPARATOR);return dateTime.length==2&&date(dateTime[0])&&time(dateTime[1],!0)}var NOT_URI_FRAGMENT=/\/|:/;function uri(str){return NOT_URI_FRAGMENT.test(str)&&URI.test(str)}var Z_ANCHOR=/[^\\]\\Z/;function regex(str){if(Z_ANCHOR.test(str))return!1;try{return new RegExp(str),!0}catch{return!1}}}});var require_ref=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/ref.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$async,$refCode;if($schema=="#"||$schema=="#/")it.isRoot?($async=it.async,$refCode="validate"):($async=it.root.schema.$async===!0,$refCode="root.refVal[0]");else{var $refVal=it.resolveRef(it.baseId,$schema,it.isRoot);if($refVal===void 0){var $message=it.MissingRefError.message(it.baseId,$schema);if(it.opts.missingRefs=="fail"){it.logger.error($message);var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { ref: '"+it.util.escapeQuotes($schema)+"' } ",it.opts.messages!==!1&&(out+=" , message: 'can\\'t resolve reference "+it.util.escapeQuotes($schema)+"' "),it.opts.verbose&&(out+=" , schema: "+it.util.toQuotedString($schema)+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",$breakOnError&&(out+=" if (false) { ")}else if(it.opts.missingRefs=="ignore")it.logger.warn($message),$breakOnError&&(out+=" if (true) { ");else throw new it.MissingRefError(it.baseId,$schema,$message)}else if($refVal.inline){var $it=it.util.copy(it);$it.level++;var $nextValid="valid"+$it.level;$it.schema=$refVal.schema,$it.schemaPath="",$it.errSchemaPath=$schema;var $code=it.validate($it).replace(/validate\.schema/g,$refVal.code);out+=" "+$code+" ",$breakOnError&&(out+=" if ("+$nextValid+") { ")}else $async=$refVal.$async===!0||it.async&&$refVal.$async!==!1,$refCode=$refVal.code}if($refCode){var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.opts.passContext?out+=" "+$refCode+".call(this, ":out+=" "+$refCode+"( ",out+=" "+$data+", (dataPath || '')",it.errorPath!='""'&&(out+=" + "+it.errorPath);var $parentData=$dataLvl?"data"+($dataLvl-1||""):"parentData",$parentDataProperty=$dataLvl?it.dataPathArr[$dataLvl]:"parentDataProperty";out+=" , "+$parentData+" , "+$parentDataProperty+", rootData) ";var __callValidate=out;if(out=$$outStack.pop(),$async){if(!it.async)throw new Error("async schema referenced by sync schema");$breakOnError&&(out+=" var "+$valid+"; "),out+=" try { await "+__callValidate+"; ",$breakOnError&&(out+=" "+$valid+" = true; "),out+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",$breakOnError&&(out+=" "+$valid+" = false; "),out+=" } ",$breakOnError&&(out+=" if ("+$valid+") { ")}else out+=" if (!"+__callValidate+") { if (vErrors === null) vErrors = "+$refCode+".errors; else vErrors = vErrors.concat("+$refCode+".errors); errors = vErrors.length; } ",$breakOnError&&(out+=" else { ")}return out}}});var require_allOf=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/allOf.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$it=it.util.copy(it),$closingBraces="";$it.level++;var $nextValid="valid"+$it.level,$currentBaseId=$it.baseId,$allSchemasEmpty=!0,arr1=$schema;if(arr1)for(var $sch,$i=-1,l1=arr1.length-1;$i<l1;)$sch=arr1[$i+=1],(it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0:it.util.schemaHasRules($sch,it.RULES.all))&&($allSchemasEmpty=!1,$it.schema=$sch,$it.schemaPath=$schemaPath+"["+$i+"]",$it.errSchemaPath=$errSchemaPath+"/"+$i,out+=" "+it.validate($it)+" ",$it.baseId=$currentBaseId,$breakOnError&&(out+=" if ("+$nextValid+") { ",$closingBraces+="}"));return $breakOnError&&($allSchemasEmpty?out+=" if (true) { ":out+=" "+$closingBraces.slice(0,-1)+" "),out}}});var require_anyOf=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/anyOf.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$errs="errs__"+$lvl,$it=it.util.copy(it),$closingBraces="";$it.level++;var $nextValid="valid"+$it.level,$noEmptySchema=$schema.every(function($sch2){return it.opts.strictKeywords?typeof $sch2=="object"&&Object.keys($sch2).length>0:it.util.schemaHasRules($sch2,it.RULES.all)});if($noEmptySchema){var $currentBaseId=$it.baseId;out+=" var "+$errs+" = errors; var "+$valid+" = false; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=!0;var arr1=$schema;if(arr1)for(var $sch,$i=-1,l1=arr1.length-1;$i<l1;)$sch=arr1[$i+=1],$it.schema=$sch,$it.schemaPath=$schemaPath+"["+$i+"]",$it.errSchemaPath=$errSchemaPath+"/"+$i,out+=" "+it.validate($it)+" ",$it.baseId=$currentBaseId,out+=" "+$valid+" = "+$valid+" || "+$nextValid+"; if (!"+$valid+") { ",$closingBraces+="}";it.compositeRule=$it.compositeRule=$wasComposite,out+=" "+$closingBraces+" if (!"+$valid+") { var err = ",it.createErrors!==!1?(out+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ",it.opts.messages!==!1&&(out+=" , message: 'should match some schema in anyOf' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!it.compositeRule&&$breakOnError&&(it.async?out+=" throw new ValidationError(vErrors); ":out+=" validate.errors = vErrors; return false; "),out+=" } else { errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } ",it.opts.allErrors&&(out+=" } ")}else $breakOnError&&(out+=" if (true) { ");return out}}});var require_comment=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/comment.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$schema=it.schema[$keyword],$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$comment=it.util.toQuotedString($schema);return it.opts.$comment===!0?out+=" console.log("+$comment+");":typeof it.opts.$comment=="function"&&(out+=" self._opts.$comment("+$comment+", "+it.util.toQuotedString($errSchemaPath)+", validate.root.schema);"),out}}});var require_const=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/const.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;$isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema,$isData||(out+=" var schema"+$lvl+" = validate.schema"+$schemaPath+";"),out+="var "+$valid+" = equal("+$data+", schema"+$lvl+"); if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'const' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { allowedValue: schema"+$lvl+" } ",it.opts.messages!==!1&&(out+=" , message: 'should be equal to constant' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" }",$breakOnError&&(out+=" else { "),out}}});var require_contains=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/contains.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$errs="errs__"+$lvl,$it=it.util.copy(it),$closingBraces="";$it.level++;var $nextValid="valid"+$it.level,$idx="i"+$lvl,$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$currentBaseId=it.baseId,$nonEmptySchema=it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0:it.util.schemaHasRules($schema,it.RULES.all);if(out+="var "+$errs+" = errors;var "+$valid+";",$nonEmptySchema){var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=!0,$it.schema=$schema,$it.schemaPath=$schemaPath,$it.errSchemaPath=$errSchemaPath,out+=" var "+$nextValid+" = false; for (var "+$idx+" = 0; "+$idx+" < "+$data+".length; "+$idx+"++) { ",$it.errorPath=it.util.getPathExpr(it.errorPath,$idx,it.opts.jsonPointers,!0);var $passData=$data+"["+$idx+"]";$it.dataPathArr[$dataNxt]=$idx;var $code=it.validate($it);$it.baseId=$currentBaseId,it.util.varOccurences($code,$nextData)<2?out+=" "+it.util.varReplace($code,$nextData,$passData)+" ":out+=" var "+$nextData+" = "+$passData+"; "+$code+" ",out+=" if ("+$nextValid+") break; } ",it.compositeRule=$it.compositeRule=$wasComposite,out+=" "+$closingBraces+" if (!"+$nextValid+") {"}else out+=" if ("+$data+".length == 0) {";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ",it.opts.messages!==!1&&(out+=" , message: 'should contain a valid item' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } else { ",$nonEmptySchema&&(out+=" errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } "),it.opts.allErrors&&(out+=" } "),out}}});var require_dependencies=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/dependencies.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$errs="errs__"+$lvl,$it=it.util.copy(it),$closingBraces="";$it.level++;var $nextValid="valid"+$it.level,$schemaDeps={},$propertyDeps={},$ownProperties=it.opts.ownProperties;for($property in $schema)if($property!="__proto__"){var $sch=$schema[$property],$deps=Array.isArray($sch)?$propertyDeps:$schemaDeps;$deps[$property]=$sch}out+="var "+$errs+" = errors;";var $currentErrorPath=it.errorPath;out+="var missing"+$lvl+";";for(var $property in $propertyDeps)if($deps=$propertyDeps[$property],$deps.length){if(out+=" if ( "+$data+it.util.getProperty($property)+" !== undefined ",$ownProperties&&(out+=" && Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($property)+"') "),$breakOnError){out+=" && ( ";var arr1=$deps;if(arr1)for(var $propertyKey,$i=-1,l1=arr1.length-1;$i<l1;){$propertyKey=arr1[$i+=1],$i&&(out+=" || ");var $prop=it.util.getProperty($propertyKey),$useData=$data+$prop;out+=" ( ( "+$useData+" === undefined ",$ownProperties&&(out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "),out+=") && (missing"+$lvl+" = "+it.util.toQuotedString(it.opts.jsonPointers?$propertyKey:$prop)+") ) "}out+=")) { ";var $propertyPath="missing"+$lvl,$missingProperty="' + "+$propertyPath+" + '";it.opts._errorDataPathProperty&&(it.errorPath=it.opts.jsonPointers?it.util.getPathExpr($currentErrorPath,$propertyPath,!0):$currentErrorPath+" + "+$propertyPath);var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { property: '"+it.util.escapeQuotes($property)+"', missingProperty: '"+$missingProperty+"', depsCount: "+$deps.length+", deps: '"+it.util.escapeQuotes($deps.length==1?$deps[0]:$deps.join(", "))+"' } ",it.opts.messages!==!1&&(out+=" , message: 'should have ",$deps.length==1?out+="property "+it.util.escapeQuotes($deps[0]):out+="properties "+it.util.escapeQuotes($deps.join(", ")),out+=" when property "+it.util.escapeQuotes($property)+" is present' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{out+=" ) { ";var arr2=$deps;if(arr2)for(var $propertyKey,i2=-1,l2=arr2.length-1;i2<l2;){$propertyKey=arr2[i2+=1];var $prop=it.util.getProperty($propertyKey),$missingProperty=it.util.escapeQuotes($propertyKey),$useData=$data+$prop;it.opts._errorDataPathProperty&&(it.errorPath=it.util.getPath($currentErrorPath,$propertyKey,it.opts.jsonPointers)),out+=" if ( "+$useData+" === undefined ",$ownProperties&&(out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "),out+=") { var err = ",it.createErrors!==!1?(out+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { property: '"+it.util.escapeQuotes($property)+"', missingProperty: '"+$missingProperty+"', depsCount: "+$deps.length+", deps: '"+it.util.escapeQuotes($deps.length==1?$deps[0]:$deps.join(", "))+"' } ",it.opts.messages!==!1&&(out+=" , message: 'should have ",$deps.length==1?out+="property "+it.util.escapeQuotes($deps[0]):out+="properties "+it.util.escapeQuotes($deps.join(", ")),out+=" when property "+it.util.escapeQuotes($property)+" is present' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}out+=" } ",$breakOnError&&($closingBraces+="}",out+=" else { ")}it.errorPath=$currentErrorPath;var $currentBaseId=$it.baseId;for(var $property in $schemaDeps){var $sch=$schemaDeps[$property];(it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0:it.util.schemaHasRules($sch,it.RULES.all))&&(out+=" "+$nextValid+" = true; if ( "+$data+it.util.getProperty($property)+" !== undefined ",$ownProperties&&(out+=" && Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($property)+"') "),out+=") { ",$it.schema=$sch,$it.schemaPath=$schemaPath+it.util.getProperty($property),$it.errSchemaPath=$errSchemaPath+"/"+it.util.escapeFragment($property),out+=" "+it.validate($it)+" ",$it.baseId=$currentBaseId,out+=" } ",$breakOnError&&(out+=" if ("+$nextValid+") { ",$closingBraces+="}"))}return $breakOnError&&(out+=" "+$closingBraces+" if ("+$errs+" == errors) {"),out}}});var require_enum=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/enum.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;$isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema;var $i="i"+$lvl,$vSchema="schema"+$lvl;$isData||(out+=" var "+$vSchema+" = validate.schema"+$schemaPath+";"),out+="var "+$valid+";",$isData&&(out+=" if (schema"+$lvl+" === undefined) "+$valid+" = true; else if (!Array.isArray(schema"+$lvl+")) "+$valid+" = false; else {"),out+=""+$valid+" = false;for (var "+$i+"=0; "+$i+"<"+$vSchema+".length; "+$i+"++) if (equal("+$data+", "+$vSchema+"["+$i+"])) { "+$valid+" = true; break; }",$isData&&(out+=" } "),out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { allowedValues: schema"+$lvl+" } ",it.opts.messages!==!1&&(out+=" , message: 'should be equal to one of the allowed values' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" }",$breakOnError&&(out+=" else { "),out}}});var require_format=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/format.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||"");if(it.opts.format===!1)return $breakOnError&&(out+=" if (true) { "),out;var $isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;$isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema;var $unknownFormats=it.opts.unknownFormats,$allowUnknown=Array.isArray($unknownFormats);if($isData){var $format="format"+$lvl,$isObject="isObject"+$lvl,$formatType="formatType"+$lvl;out+=" var "+$format+" = formats["+$schemaValue+"]; var "+$isObject+" = typeof "+$format+" == 'object' && !("+$format+" instanceof RegExp) && "+$format+".validate; var "+$formatType+" = "+$isObject+" && "+$format+".type || 'string'; if ("+$isObject+") { ",it.async&&(out+=" var async"+$lvl+" = "+$format+".async; "),out+=" "+$format+" = "+$format+".validate; } if ( ",$isData&&(out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'string') || "),out+=" (",$unknownFormats!="ignore"&&(out+=" ("+$schemaValue+" && !"+$format+" ",$allowUnknown&&(out+=" && self._opts.unknownFormats.indexOf("+$schemaValue+") == -1 "),out+=") || "),out+=" ("+$format+" && "+$formatType+" == '"+$ruleType+"' && !(typeof "+$format+" == 'function' ? ",it.async?out+=" (async"+$lvl+" ? await "+$format+"("+$data+") : "+$format+"("+$data+")) ":out+=" "+$format+"("+$data+") ",out+=" : "+$format+".test("+$data+"))))) {"}else{var $format=it.formats[$schema];if(!$format){if($unknownFormats=="ignore")return it.logger.warn('unknown format "'+$schema+'" ignored in schema at path "'+it.errSchemaPath+'"'),$breakOnError&&(out+=" if (true) { "),out;if($allowUnknown&&$unknownFormats.indexOf($schema)>=0)return $breakOnError&&(out+=" if (true) { "),out;throw new Error('unknown format "'+$schema+'" is used in schema at path "'+it.errSchemaPath+'"')}var $isObject=typeof $format=="object"&&!($format instanceof RegExp)&&$format.validate,$formatType=$isObject&&$format.type||"string";if($isObject){var $async=$format.async===!0;$format=$format.validate}if($formatType!=$ruleType)return $breakOnError&&(out+=" if (true) { "),out;if($async){if(!it.async)throw new Error("async format in sync schema");var $formatRef="formats"+it.util.getProperty($schema)+".validate";out+=" if (!(await "+$formatRef+"("+$data+"))) { "}else{out+=" if (! ";var $formatRef="formats"+it.util.getProperty($schema);$isObject&&($formatRef+=".validate"),typeof $format=="function"?out+=" "+$formatRef+"("+$data+") ":out+=" "+$formatRef+".test("+$data+") ",out+=") { "}}var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'format' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { format: ",$isData?out+=""+$schemaValue:out+=""+it.util.toQuotedString($schema),out+=" } ",it.opts.messages!==!1&&(out+=` , message: 'should match format "`,$isData?out+="' + "+$schemaValue+" + '":out+=""+it.util.escapeQuotes($schema),out+=`"' `),it.opts.verbose&&(out+=" , schema: ",$isData?out+="validate.schema"+$schemaPath:out+=""+it.util.toQuotedString($schema),out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } ",$breakOnError&&(out+=" else { "),out}}});var require_if=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/if.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$errs="errs__"+$lvl,$it=it.util.copy(it);$it.level++;var $nextValid="valid"+$it.level,$thenSch=it.schema.then,$elseSch=it.schema.else,$thenPresent=$thenSch!==void 0&&(it.opts.strictKeywords?typeof $thenSch=="object"&&Object.keys($thenSch).length>0:it.util.schemaHasRules($thenSch,it.RULES.all)),$elsePresent=$elseSch!==void 0&&(it.opts.strictKeywords?typeof $elseSch=="object"&&Object.keys($elseSch).length>0:it.util.schemaHasRules($elseSch,it.RULES.all)),$currentBaseId=$it.baseId;if($thenPresent||$elsePresent){var $ifClause;$it.createErrors=!1,$it.schema=$schema,$it.schemaPath=$schemaPath,$it.errSchemaPath=$errSchemaPath,out+=" var "+$errs+" = errors; var "+$valid+" = true; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=!0,out+=" "+it.validate($it)+" ",$it.baseId=$currentBaseId,$it.createErrors=!0,out+=" errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } ",it.compositeRule=$it.compositeRule=$wasComposite,$thenPresent?(out+=" if ("+$nextValid+") { ",$it.schema=it.schema.then,$it.schemaPath=it.schemaPath+".then",$it.errSchemaPath=it.errSchemaPath+"/then",out+=" "+it.validate($it)+" ",$it.baseId=$currentBaseId,out+=" "+$valid+" = "+$nextValid+"; ",$thenPresent&&$elsePresent?($ifClause="ifClause"+$lvl,out+=" var "+$ifClause+" = 'then'; "):$ifClause="'then'",out+=" } ",$elsePresent&&(out+=" else { ")):out+=" if (!"+$nextValid+") { ",$elsePresent&&($it.schema=it.schema.else,$it.schemaPath=it.schemaPath+".else",$it.errSchemaPath=it.errSchemaPath+"/else",out+=" "+it.validate($it)+" ",$it.baseId=$currentBaseId,out+=" "+$valid+" = "+$nextValid+"; ",$thenPresent&&$elsePresent?($ifClause="ifClause"+$lvl,out+=" var "+$ifClause+" = 'else'; "):$ifClause="'else'",out+=" } "),out+=" if (!"+$valid+") { var err = ",it.createErrors!==!1?(out+=" { keyword: 'if' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { failingKeyword: "+$ifClause+" } ",it.opts.messages!==!1&&(out+=` , message: 'should match "' + `+$ifClause+` + '" schema' `),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!it.compositeRule&&$breakOnError&&(it.async?out+=" throw new ValidationError(vErrors); ":out+=" validate.errors = vErrors; return false; "),out+=" } ",$breakOnError&&(out+=" else { ")}else $breakOnError&&(out+=" if (true) { ");return out}}});var require_items=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/items.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$errs="errs__"+$lvl,$it=it.util.copy(it),$closingBraces="";$it.level++;var $nextValid="valid"+$it.level,$idx="i"+$lvl,$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$currentBaseId=it.baseId;if(out+="var "+$errs+" = errors;var "+$valid+";",Array.isArray($schema)){var $additionalItems=it.schema.additionalItems;if($additionalItems===!1){out+=" "+$valid+" = "+$data+".length <= "+$schema.length+"; ";var $currErrSchemaPath=$errSchemaPath;$errSchemaPath=it.errSchemaPath+"/additionalItems",out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schema.length+" } ",it.opts.messages!==!1&&(out+=" , message: 'should NOT have more than "+$schema.length+" items' "),it.opts.verbose&&(out+=" , schema: false , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } ",$errSchemaPath=$currErrSchemaPath,$breakOnError&&($closingBraces+="}",out+=" else { ")}var arr1=$schema;if(arr1){for(var $sch,$i=-1,l1=arr1.length-1;$i<l1;)if($sch=arr1[$i+=1],it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0:it.util.schemaHasRules($sch,it.RULES.all)){out+=" "+$nextValid+" = true; if ("+$data+".length > "+$i+") { ";var $passData=$data+"["+$i+"]";$it.schema=$sch,$it.schemaPath=$schemaPath+"["+$i+"]",$it.errSchemaPath=$errSchemaPath+"/"+$i,$it.errorPath=it.util.getPathExpr(it.errorPath,$i,it.opts.jsonPointers,!0),$it.dataPathArr[$dataNxt]=$i;var $code=it.validate($it);$it.baseId=$currentBaseId,it.util.varOccurences($code,$nextData)<2?out+=" "+it.util.varReplace($code,$nextData,$passData)+" ":out+=" var "+$nextData+" = "+$passData+"; "+$code+" ",out+=" } ",$breakOnError&&(out+=" if ("+$nextValid+") { ",$closingBraces+="}")}}if(typeof $additionalItems=="object"&&(it.opts.strictKeywords?typeof $additionalItems=="object"&&Object.keys($additionalItems).length>0:it.util.schemaHasRules($additionalItems,it.RULES.all))){$it.schema=$additionalItems,$it.schemaPath=it.schemaPath+".additionalItems",$it.errSchemaPath=it.errSchemaPath+"/additionalItems",out+=" "+$nextValid+" = true; if ("+$data+".length > "+$schema.length+") { for (var "+$idx+" = "+$schema.length+"; "+$idx+" < "+$data+".length; "+$idx+"++) { ",$it.errorPath=it.util.getPathExpr(it.errorPath,$idx,it.opts.jsonPointers,!0);var $passData=$data+"["+$idx+"]";$it.dataPathArr[$dataNxt]=$idx;var $code=it.validate($it);$it.baseId=$currentBaseId,it.util.varOccurences($code,$nextData)<2?out+=" "+it.util.varReplace($code,$nextData,$passData)+" ":out+=" var "+$nextData+" = "+$passData+"; "+$code+" ",$breakOnError&&(out+=" if (!"+$nextValid+") break; "),out+=" } } ",$breakOnError&&(out+=" if ("+$nextValid+") { ",$closingBraces+="}")}}else if(it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0:it.util.schemaHasRules($schema,it.RULES.all)){$it.schema=$schema,$it.schemaPath=$schemaPath,$it.errSchemaPath=$errSchemaPath,out+=" for (var "+$idx+" = 0; "+$idx+" < "+$data+".length; "+$idx+"++) { ",$it.errorPath=it.util.getPathExpr(it.errorPath,$idx,it.opts.jsonPointers,!0);var $passData=$data+"["+$idx+"]";$it.dataPathArr[$dataNxt]=$idx;var $code=it.validate($it);$it.baseId=$currentBaseId,it.util.varOccurences($code,$nextData)<2?out+=" "+it.util.varReplace($code,$nextData,$passData)+" ":out+=" var "+$nextData+" = "+$passData+"; "+$code+" ",$breakOnError&&(out+=" if (!"+$nextValid+") break; "),out+=" }"}return $breakOnError&&(out+=" "+$closingBraces+" if ("+$errs+" == errors) {"),out}}});var require_limit=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/_limit.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$errorKeyword,$data="data"+($dataLvl||""),$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;$isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema;var $isMax=$keyword=="maximum",$exclusiveKeyword=$isMax?"exclusiveMaximum":"exclusiveMinimum",$schemaExcl=it.schema[$exclusiveKeyword],$isDataExcl=it.opts.$data&&$schemaExcl&&$schemaExcl.$data,$op=$isMax?"<":">",$notOp=$isMax?">":"<",$errorKeyword=void 0;if(!($isData||typeof $schema=="number"||$schema===void 0))throw new Error($keyword+" must be number");if(!($isDataExcl||$schemaExcl===void 0||typeof $schemaExcl=="number"||typeof $schemaExcl=="boolean"))throw new Error($exclusiveKeyword+" must be number or boolean");if($isDataExcl){var $schemaValueExcl=it.util.getData($schemaExcl.$data,$dataLvl,it.dataPathArr),$exclusive="exclusive"+$lvl,$exclType="exclType"+$lvl,$exclIsNumber="exclIsNumber"+$lvl,$opExpr="op"+$lvl,$opStr="' + "+$opExpr+" + '";out+=" var schemaExcl"+$lvl+" = "+$schemaValueExcl+"; ",$schemaValueExcl="schemaExcl"+$lvl,out+=" var "+$exclusive+"; var "+$exclType+" = typeof "+$schemaValueExcl+"; if ("+$exclType+" != 'boolean' && "+$exclType+" != 'undefined' && "+$exclType+" != 'number') { ";var $errorKeyword=$exclusiveKeyword,$$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ",it.opts.messages!==!1&&(out+=" , message: '"+$exclusiveKeyword+" should be boolean' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } else if ( ",$isData&&(out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "),out+=" "+$exclType+" == 'number' ? ( ("+$exclusive+" = "+$schemaValue+" === undefined || "+$schemaValueExcl+" "+$op+"= "+$schemaValue+") ? "+$data+" "+$notOp+"= "+$schemaValueExcl+" : "+$data+" "+$notOp+" "+$schemaValue+" ) : ( ("+$exclusive+" = "+$schemaValueExcl+" === true) ? "+$data+" "+$notOp+"= "+$schemaValue+" : "+$data+" "+$notOp+" "+$schemaValue+" ) || "+$data+" !== "+$data+") { var op"+$lvl+" = "+$exclusive+" ? '"+$op+"' : '"+$op+"='; ",$schema===void 0&&($errorKeyword=$exclusiveKeyword,$errSchemaPath=it.errSchemaPath+"/"+$exclusiveKeyword,$schemaValue=$schemaValueExcl,$isData=$isDataExcl)}else{var $exclIsNumber=typeof $schemaExcl=="number",$opStr=$op;if($exclIsNumber&&$isData){var $opExpr="'"+$opStr+"'";out+=" if ( ",$isData&&(out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "),out+=" ( "+$schemaValue+" === undefined || "+$schemaExcl+" "+$op+"= "+$schemaValue+" ? "+$data+" "+$notOp+"= "+$schemaExcl+" : "+$data+" "+$notOp+" "+$schemaValue+" ) || "+$data+" !== "+$data+") { "}else{$exclIsNumber&&$schema===void 0?($exclusive=!0,$errorKeyword=$exclusiveKeyword,$errSchemaPath=it.errSchemaPath+"/"+$exclusiveKeyword,$schemaValue=$schemaExcl,$notOp+="="):($exclIsNumber&&($schemaValue=Math[$isMax?"min":"max"]($schemaExcl,$schema)),$schemaExcl===($exclIsNumber?$schemaValue:!0)?($exclusive=!0,$errorKeyword=$exclusiveKeyword,$errSchemaPath=it.errSchemaPath+"/"+$exclusiveKeyword,$notOp+="="):($exclusive=!1,$opStr+="="));var $opExpr="'"+$opStr+"'";out+=" if ( ",$isData&&(out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "),out+=" "+$data+" "+$notOp+" "+$schemaValue+" || "+$data+" !== "+$data+") { "}}$errorKeyword=$errorKeyword||$keyword;var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"_limit")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { comparison: "+$opExpr+", limit: "+$schemaValue+", exclusive: "+$exclusive+" } ",it.opts.messages!==!1&&(out+=" , message: 'should be "+$opStr+" ",$isData?out+="' + "+$schemaValue:out+=""+$schemaValue+"'"),it.opts.verbose&&(out+=" , schema: ",$isData?out+="validate.schema"+$schemaPath:out+=""+$schema,out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } ",$breakOnError&&(out+=" else { "),out}}});var require_limitItems=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/_limitItems.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$errorKeyword,$data="data"+($dataLvl||""),$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema,!($isData||typeof $schema=="number"))throw new Error($keyword+" must be number");var $op=$keyword=="maxItems"?">":"<";out+="if ( ",$isData&&(out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "),out+=" "+$data+".length "+$op+" "+$schemaValue+") { ";var $errorKeyword=$keyword,$$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"_limitItems")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schemaValue+" } ",it.opts.messages!==!1&&(out+=" , message: 'should NOT have ",$keyword=="maxItems"?out+="more":out+="fewer",out+=" than ",$isData?out+="' + "+$schemaValue+" + '":out+=""+$schema,out+=" items' "),it.opts.verbose&&(out+=" , schema: ",$isData?out+="validate.schema"+$schemaPath:out+=""+$schema,out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+="} ",$breakOnError&&(out+=" else { "),out}}});var require_limitLength=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/_limitLength.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$errorKeyword,$data="data"+($dataLvl||""),$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema,!($isData||typeof $schema=="number"))throw new Error($keyword+" must be number");var $op=$keyword=="maxLength"?">":"<";out+="if ( ",$isData&&(out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "),it.opts.unicode===!1?out+=" "+$data+".length ":out+=" ucs2length("+$data+") ",out+=" "+$op+" "+$schemaValue+") { ";var $errorKeyword=$keyword,$$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"_limitLength")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schemaValue+" } ",it.opts.messages!==!1&&(out+=" , message: 'should NOT be ",$keyword=="maxLength"?out+="longer":out+="shorter",out+=" than ",$isData?out+="' + "+$schemaValue+" + '":out+=""+$schema,out+=" characters' "),it.opts.verbose&&(out+=" , schema: ",$isData?out+="validate.schema"+$schemaPath:out+=""+$schema,out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+="} ",$breakOnError&&(out+=" else { "),out}}});var require_limitProperties=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/_limitProperties.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$errorKeyword,$data="data"+($dataLvl||""),$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema,!($isData||typeof $schema=="number"))throw new Error($keyword+" must be number");var $op=$keyword=="maxProperties"?">":"<";out+="if ( ",$isData&&(out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'number') || "),out+=" Object.keys("+$data+").length "+$op+" "+$schemaValue+") { ";var $errorKeyword=$keyword,$$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"_limitProperties")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { limit: "+$schemaValue+" } ",it.opts.messages!==!1&&(out+=" , message: 'should NOT have ",$keyword=="maxProperties"?out+="more":out+="fewer",out+=" than ",$isData?out+="' + "+$schemaValue+" + '":out+=""+$schema,out+=" properties' "),it.opts.verbose&&(out+=" , schema: ",$isData?out+="validate.schema"+$schemaPath:out+=""+$schema,out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+="} ",$breakOnError&&(out+=" else { "),out}}});var require_multipleOf=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/multipleOf.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema,!($isData||typeof $schema=="number"))throw new Error($keyword+" must be number");out+="var division"+$lvl+";if (",$isData&&(out+=" "+$schemaValue+" !== undefined && ( typeof "+$schemaValue+" != 'number' || "),out+=" (division"+$lvl+" = "+$data+" / "+$schemaValue+", ",it.opts.multipleOfPrecision?out+=" Math.abs(Math.round(division"+$lvl+") - division"+$lvl+") > 1e-"+it.opts.multipleOfPrecision+" ":out+=" division"+$lvl+" !== parseInt(division"+$lvl+") ",out+=" ) ",$isData&&(out+=" ) "),out+=" ) { ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { multipleOf: "+$schemaValue+" } ",it.opts.messages!==!1&&(out+=" , message: 'should be multiple of ",$isData?out+="' + "+$schemaValue:out+=""+$schemaValue+"'"),it.opts.verbose&&(out+=" , schema: ",$isData?out+="validate.schema"+$schemaPath:out+=""+$schema,out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+="} ",$breakOnError&&(out+=" else { "),out}}});var require_not=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/not.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$errs="errs__"+$lvl,$it=it.util.copy(it);$it.level++;var $nextValid="valid"+$it.level;if(it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0:it.util.schemaHasRules($schema,it.RULES.all)){$it.schema=$schema,$it.schemaPath=$schemaPath,$it.errSchemaPath=$errSchemaPath,out+=" var "+$errs+" = errors; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=!0,$it.createErrors=!1;var $allErrorsOption;$it.opts.allErrors&&($allErrorsOption=$it.opts.allErrors,$it.opts.allErrors=!1),out+=" "+it.validate($it)+" ",$it.createErrors=!0,$allErrorsOption&&($it.opts.allErrors=$allErrorsOption),it.compositeRule=$it.compositeRule=$wasComposite,out+=" if ("+$nextValid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'not' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ",it.opts.messages!==!1&&(out+=" , message: 'should NOT be valid' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } else { errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; } ",it.opts.allErrors&&(out+=" } ")}else out+=" var err = ",it.createErrors!==!1?(out+=" { keyword: 'not' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: {} ",it.opts.messages!==!1&&(out+=" , message: 'should NOT be valid' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",$breakOnError&&(out+=" if (false) { ");return out}}});var require_oneOf=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/oneOf.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$errs="errs__"+$lvl,$it=it.util.copy(it),$closingBraces="";$it.level++;var $nextValid="valid"+$it.level,$currentBaseId=$it.baseId,$prevValid="prevValid"+$lvl,$passingSchemas="passingSchemas"+$lvl;out+="var "+$errs+" = errors , "+$prevValid+" = false , "+$valid+" = false , "+$passingSchemas+" = null; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=!0;var arr1=$schema;if(arr1)for(var $sch,$i=-1,l1=arr1.length-1;$i<l1;)$sch=arr1[$i+=1],(it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0:it.util.schemaHasRules($sch,it.RULES.all))?($it.schema=$sch,$it.schemaPath=$schemaPath+"["+$i+"]",$it.errSchemaPath=$errSchemaPath+"/"+$i,out+=" "+it.validate($it)+" ",$it.baseId=$currentBaseId):out+=" var "+$nextValid+" = true; ",$i&&(out+=" if ("+$nextValid+" && "+$prevValid+") { "+$valid+" = false; "+$passingSchemas+" = ["+$passingSchemas+", "+$i+"]; } else { ",$closingBraces+="}"),out+=" if ("+$nextValid+") { "+$valid+" = "+$prevValid+" = true; "+$passingSchemas+" = "+$i+"; }";return it.compositeRule=$it.compositeRule=$wasComposite,out+=""+$closingBraces+"if (!"+$valid+") { var err = ",it.createErrors!==!1?(out+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { passingSchemas: "+$passingSchemas+" } ",it.opts.messages!==!1&&(out+=" , message: 'should match exactly one schema in oneOf' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!it.compositeRule&&$breakOnError&&(it.async?out+=" throw new ValidationError(vErrors); ":out+=" validate.errors = vErrors; return false; "),out+="} else { errors = "+$errs+"; if (vErrors !== null) { if ("+$errs+") vErrors.length = "+$errs+"; else vErrors = null; }",it.opts.allErrors&&(out+=" } "),out}}});var require_pattern=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/pattern.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;$isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema;var $regexp=$isData?"(new RegExp("+$schemaValue+"))":it.usePattern($schema);out+="if ( ",$isData&&(out+=" ("+$schemaValue+" !== undefined && typeof "+$schemaValue+" != 'string') || "),out+=" !"+$regexp+".test("+$data+") ) { ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { pattern: ",$isData?out+=""+$schemaValue:out+=""+it.util.toQuotedString($schema),out+=" } ",it.opts.messages!==!1&&(out+=` , message: 'should match pattern "`,$isData?out+="' + "+$schemaValue+" + '":out+=""+it.util.escapeQuotes($schema),out+=`"' `),it.opts.verbose&&(out+=" , schema: ",$isData?out+="validate.schema"+$schemaPath:out+=""+it.util.toQuotedString($schema),out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;return out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+="} ",$breakOnError&&(out+=" else { "),out}}});var require_properties=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/properties.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$errs="errs__"+$lvl,$it=it.util.copy(it),$closingBraces="";$it.level++;var $nextValid="valid"+$it.level,$key="key"+$lvl,$idx="idx"+$lvl,$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$dataProperties="dataProperties"+$lvl,$schemaKeys=Object.keys($schema||{}).filter(notProto),$pProperties=it.schema.patternProperties||{},$pPropertyKeys=Object.keys($pProperties).filter(notProto),$aProperties=it.schema.additionalProperties,$someProperties=$schemaKeys.length||$pPropertyKeys.length,$noAdditional=$aProperties===!1,$additionalIsSchema=typeof $aProperties=="object"&&Object.keys($aProperties).length,$removeAdditional=it.opts.removeAdditional,$checkAdditional=$noAdditional||$additionalIsSchema||$removeAdditional,$ownProperties=it.opts.ownProperties,$currentBaseId=it.baseId,$required=it.schema.required;if($required&&!(it.opts.$data&&$required.$data)&&$required.length<it.opts.loopRequired)var $requiredHash=it.util.toHash($required);function notProto(p){return p!=="__proto__"}if(out+="var "+$errs+" = errors;var "+$nextValid+" = true;",$ownProperties&&(out+=" var "+$dataProperties+" = undefined;"),$checkAdditional){if($ownProperties?out+=" "+$dataProperties+" = "+$dataProperties+" || Object.keys("+$data+"); for (var "+$idx+"=0; "+$idx+"<"+$dataProperties+".length; "+$idx+"++) { var "+$key+" = "+$dataProperties+"["+$idx+"]; ":out+=" for (var "+$key+" in "+$data+") { ",$someProperties){if(out+=" var isAdditional"+$lvl+" = !(false ",$schemaKeys.length)if($schemaKeys.length>8)out+=" || validate.schema"+$schemaPath+".hasOwnProperty("+$key+") ";else{var arr1=$schemaKeys;if(arr1)for(var $propertyKey,i1=-1,l1=arr1.length-1;i1<l1;)$propertyKey=arr1[i1+=1],out+=" || "+$key+" == "+it.util.toQuotedString($propertyKey)+" "}if($pPropertyKeys.length){var arr2=$pPropertyKeys;if(arr2)for(var $pProperty,$i=-1,l2=arr2.length-1;$i<l2;)$pProperty=arr2[$i+=1],out+=" || "+it.usePattern($pProperty)+".test("+$key+") "}out+=" ); if (isAdditional"+$lvl+") { "}if($removeAdditional=="all")out+=" delete "+$data+"["+$key+"]; ";else{var $currentErrorPath=it.errorPath,$additionalProperty="' + "+$key+" + '";if(it.opts._errorDataPathProperty&&(it.errorPath=it.util.getPathExpr(it.errorPath,$key,it.opts.jsonPointers)),$noAdditional)if($removeAdditional)out+=" delete "+$data+"["+$key+"]; ";else{out+=" "+$nextValid+" = false; ";var $currErrSchemaPath=$errSchemaPath;$errSchemaPath=it.errSchemaPath+"/additionalProperties";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { additionalProperty: '"+$additionalProperty+"' } ",it.opts.messages!==!1&&(out+=" , message: '",it.opts._errorDataPathProperty?out+="is an invalid additional property":out+="should NOT have additional properties",out+="' "),it.opts.verbose&&(out+=" , schema: false , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",$errSchemaPath=$currErrSchemaPath,$breakOnError&&(out+=" break; ")}else if($additionalIsSchema)if($removeAdditional=="failing"){out+=" var "+$errs+" = errors; ";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=!0,$it.schema=$aProperties,$it.schemaPath=it.schemaPath+".additionalProperties",$it.errSchemaPath=it.errSchemaPath+"/additionalProperties",$it.errorPath=it.opts._errorDataPathProperty?it.errorPath:it.util.getPathExpr(it.errorPath,$key,it.opts.jsonPointers);var $passData=$data+"["+$key+"]";$it.dataPathArr[$dataNxt]=$key;var $code=it.validate($it);$it.baseId=$currentBaseId,it.util.varOccurences($code,$nextData)<2?out+=" "+it.util.varReplace($code,$nextData,$passData)+" ":out+=" var "+$nextData+" = "+$passData+"; "+$code+" ",out+=" if (!"+$nextValid+") { errors = "+$errs+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+$data+"["+$key+"]; } ",it.compositeRule=$it.compositeRule=$wasComposite}else{$it.schema=$aProperties,$it.schemaPath=it.schemaPath+".additionalProperties",$it.errSchemaPath=it.errSchemaPath+"/additionalProperties",$it.errorPath=it.opts._errorDataPathProperty?it.errorPath:it.util.getPathExpr(it.errorPath,$key,it.opts.jsonPointers);var $passData=$data+"["+$key+"]";$it.dataPathArr[$dataNxt]=$key;var $code=it.validate($it);$it.baseId=$currentBaseId,it.util.varOccurences($code,$nextData)<2?out+=" "+it.util.varReplace($code,$nextData,$passData)+" ":out+=" var "+$nextData+" = "+$passData+"; "+$code+" ",$breakOnError&&(out+=" if (!"+$nextValid+") break; ")}it.errorPath=$currentErrorPath}$someProperties&&(out+=" } "),out+=" } ",$breakOnError&&(out+=" if ("+$nextValid+") { ",$closingBraces+="}")}var $useDefaults=it.opts.useDefaults&&!it.compositeRule;if($schemaKeys.length){var arr3=$schemaKeys;if(arr3)for(var $propertyKey,i3=-1,l3=arr3.length-1;i3<l3;){$propertyKey=arr3[i3+=1];var $sch=$schema[$propertyKey];if(it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0:it.util.schemaHasRules($sch,it.RULES.all)){var $prop=it.util.getProperty($propertyKey),$passData=$data+$prop,$hasDefault=$useDefaults&&$sch.default!==void 0;$it.schema=$sch,$it.schemaPath=$schemaPath+$prop,$it.errSchemaPath=$errSchemaPath+"/"+it.util.escapeFragment($propertyKey),$it.errorPath=it.util.getPath(it.errorPath,$propertyKey,it.opts.jsonPointers),$it.dataPathArr[$dataNxt]=it.util.toQuotedString($propertyKey);var $code=it.validate($it);if($it.baseId=$currentBaseId,it.util.varOccurences($code,$nextData)<2){$code=it.util.varReplace($code,$nextData,$passData);var $useData=$passData}else{var $useData=$nextData;out+=" var "+$nextData+" = "+$passData+"; "}if($hasDefault)out+=" "+$code+" ";else{if($requiredHash&&$requiredHash[$propertyKey]){out+=" if ( "+$useData+" === undefined ",$ownProperties&&(out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "),out+=") { "+$nextValid+" = false; ";var $currentErrorPath=it.errorPath,$currErrSchemaPath=$errSchemaPath,$missingProperty=it.util.escapeQuotes($propertyKey);it.opts._errorDataPathProperty&&(it.errorPath=it.util.getPath($currentErrorPath,$propertyKey,it.opts.jsonPointers)),$errSchemaPath=it.errSchemaPath+"/required";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'required' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ",it.opts.messages!==!1&&(out+=" , message: '",it.opts._errorDataPathProperty?out+="is a required property":out+="should have required property \\'"+$missingProperty+"\\'",out+="' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",$errSchemaPath=$currErrSchemaPath,it.errorPath=$currentErrorPath,out+=" } else { "}else $breakOnError?(out+=" if ( "+$useData+" === undefined ",$ownProperties&&(out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "),out+=") { "+$nextValid+" = true; } else { "):(out+=" if ("+$useData+" !== undefined ",$ownProperties&&(out+=" && Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "),out+=" ) { ");out+=" "+$code+" } "}}$breakOnError&&(out+=" if ("+$nextValid+") { ",$closingBraces+="}")}}if($pPropertyKeys.length){var arr4=$pPropertyKeys;if(arr4)for(var $pProperty,i4=-1,l4=arr4.length-1;i4<l4;){$pProperty=arr4[i4+=1];var $sch=$pProperties[$pProperty];if(it.opts.strictKeywords?typeof $sch=="object"&&Object.keys($sch).length>0:it.util.schemaHasRules($sch,it.RULES.all)){$it.schema=$sch,$it.schemaPath=it.schemaPath+".patternProperties"+it.util.getProperty($pProperty),$it.errSchemaPath=it.errSchemaPath+"/patternProperties/"+it.util.escapeFragment($pProperty),$ownProperties?out+=" "+$dataProperties+" = "+$dataProperties+" || Object.keys("+$data+"); for (var "+$idx+"=0; "+$idx+"<"+$dataProperties+".length; "+$idx+"++) { var "+$key+" = "+$dataProperties+"["+$idx+"]; ":out+=" for (var "+$key+" in "+$data+") { ",out+=" if ("+it.usePattern($pProperty)+".test("+$key+")) { ",$it.errorPath=it.util.getPathExpr(it.errorPath,$key,it.opts.jsonPointers);var $passData=$data+"["+$key+"]";$it.dataPathArr[$dataNxt]=$key;var $code=it.validate($it);$it.baseId=$currentBaseId,it.util.varOccurences($code,$nextData)<2?out+=" "+it.util.varReplace($code,$nextData,$passData)+" ":out+=" var "+$nextData+" = "+$passData+"; "+$code+" ",$breakOnError&&(out+=" if (!"+$nextValid+") break; "),out+=" } ",$breakOnError&&(out+=" else "+$nextValid+" = true; "),out+=" } ",$breakOnError&&(out+=" if ("+$nextValid+") { ",$closingBraces+="}")}}}return $breakOnError&&(out+=" "+$closingBraces+" if ("+$errs+" == errors) {"),out}}});var require_propertyNames=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/propertyNames.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$errs="errs__"+$lvl,$it=it.util.copy(it),$closingBraces="";$it.level++;var $nextValid="valid"+$it.level;if(out+="var "+$errs+" = errors;",it.opts.strictKeywords?typeof $schema=="object"&&Object.keys($schema).length>0:it.util.schemaHasRules($schema,it.RULES.all)){$it.schema=$schema,$it.schemaPath=$schemaPath,$it.errSchemaPath=$errSchemaPath;var $key="key"+$lvl,$idx="idx"+$lvl,$i="i"+$lvl,$invalidName="' + "+$key+" + '",$dataNxt=$it.dataLevel=it.dataLevel+1,$nextData="data"+$dataNxt,$dataProperties="dataProperties"+$lvl,$ownProperties=it.opts.ownProperties,$currentBaseId=it.baseId;$ownProperties&&(out+=" var "+$dataProperties+" = undefined; "),$ownProperties?out+=" "+$dataProperties+" = "+$dataProperties+" || Object.keys("+$data+"); for (var "+$idx+"=0; "+$idx+"<"+$dataProperties+".length; "+$idx+"++) { var "+$key+" = "+$dataProperties+"["+$idx+"]; ":out+=" for (var "+$key+" in "+$data+") { ",out+=" var startErrs"+$lvl+" = errors; ";var $passData=$key,$wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=!0;var $code=it.validate($it);$it.baseId=$currentBaseId,it.util.varOccurences($code,$nextData)<2?out+=" "+it.util.varReplace($code,$nextData,$passData)+" ":out+=" var "+$nextData+" = "+$passData+"; "+$code+" ",it.compositeRule=$it.compositeRule=$wasComposite,out+=" if (!"+$nextValid+") { for (var "+$i+"=startErrs"+$lvl+"; "+$i+"<errors; "+$i+"++) { vErrors["+$i+"].propertyName = "+$key+"; } var err = ",it.createErrors!==!1?(out+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { propertyName: '"+$invalidName+"' } ",it.opts.messages!==!1&&(out+=" , message: 'property name \\'"+$invalidName+"\\' is invalid' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!it.compositeRule&&$breakOnError&&(it.async?out+=" throw new ValidationError(vErrors); ":out+=" validate.errors = vErrors; return false; "),$breakOnError&&(out+=" break; "),out+=" } }"}return $breakOnError&&(out+=" "+$closingBraces+" if ("+$errs+" == errors) {"),out}}});var require_required=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/required.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;$isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema;var $vSchema="schema"+$lvl;if(!$isData)if($schema.length<it.opts.loopRequired&&it.schema.properties&&Object.keys(it.schema.properties).length){var $required=[],arr1=$schema;if(arr1)for(var $property,i1=-1,l1=arr1.length-1;i1<l1;){$property=arr1[i1+=1];var $propertySch=it.schema.properties[$property];$propertySch&&(it.opts.strictKeywords?typeof $propertySch=="object"&&Object.keys($propertySch).length>0:it.util.schemaHasRules($propertySch,it.RULES.all))||($required[$required.length]=$property)}}else var $required=$schema;if($isData||$required.length){var $currentErrorPath=it.errorPath,$loopRequired=$isData||$required.length>=it.opts.loopRequired,$ownProperties=it.opts.ownProperties;if($breakOnError)if(out+=" var missing"+$lvl+"; ",$loopRequired){$isData||(out+=" var "+$vSchema+" = validate.schema"+$schemaPath+"; ");var $i="i"+$lvl,$propertyPath="schema"+$lvl+"["+$i+"]",$missingProperty="' + "+$propertyPath+" + '";it.opts._errorDataPathProperty&&(it.errorPath=it.util.getPathExpr($currentErrorPath,$propertyPath,it.opts.jsonPointers)),out+=" var "+$valid+" = true; ",$isData&&(out+=" if (schema"+$lvl+" === undefined) "+$valid+" = true; else if (!Array.isArray(schema"+$lvl+")) "+$valid+" = false; else {"),out+=" for (var "+$i+" = 0; "+$i+" < "+$vSchema+".length; "+$i+"++) { "+$valid+" = "+$data+"["+$vSchema+"["+$i+"]] !== undefined ",$ownProperties&&(out+=" && Object.prototype.hasOwnProperty.call("+$data+", "+$vSchema+"["+$i+"]) "),out+="; if (!"+$valid+") break; } ",$isData&&(out+=" } "),out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'required' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ",it.opts.messages!==!1&&(out+=" , message: '",it.opts._errorDataPathProperty?out+="is a required property":out+="should have required property \\'"+$missingProperty+"\\'",out+="' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } else { "}else{out+=" if ( ";var arr2=$required;if(arr2)for(var $propertyKey,$i=-1,l2=arr2.length-1;$i<l2;){$propertyKey=arr2[$i+=1],$i&&(out+=" || ");var $prop=it.util.getProperty($propertyKey),$useData=$data+$prop;out+=" ( ( "+$useData+" === undefined ",$ownProperties&&(out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "),out+=") && (missing"+$lvl+" = "+it.util.toQuotedString(it.opts.jsonPointers?$propertyKey:$prop)+") ) "}out+=") { ";var $propertyPath="missing"+$lvl,$missingProperty="' + "+$propertyPath+" + '";it.opts._errorDataPathProperty&&(it.errorPath=it.opts.jsonPointers?it.util.getPathExpr($currentErrorPath,$propertyPath,!0):$currentErrorPath+" + "+$propertyPath);var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'required' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ",it.opts.messages!==!1&&(out+=" , message: '",it.opts._errorDataPathProperty?out+="is a required property":out+="should have required property \\'"+$missingProperty+"\\'",out+="' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } else { "}else if($loopRequired){$isData||(out+=" var "+$vSchema+" = validate.schema"+$schemaPath+"; ");var $i="i"+$lvl,$propertyPath="schema"+$lvl+"["+$i+"]",$missingProperty="' + "+$propertyPath+" + '";it.opts._errorDataPathProperty&&(it.errorPath=it.util.getPathExpr($currentErrorPath,$propertyPath,it.opts.jsonPointers)),$isData&&(out+=" if ("+$vSchema+" && !Array.isArray("+$vSchema+")) { var err = ",it.createErrors!==!1?(out+=" { keyword: 'required' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ",it.opts.messages!==!1&&(out+=" , message: '",it.opts._errorDataPathProperty?out+="is a required property":out+="should have required property \\'"+$missingProperty+"\\'",out+="' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+$vSchema+" !== undefined) { "),out+=" for (var "+$i+" = 0; "+$i+" < "+$vSchema+".length; "+$i+"++) { if ("+$data+"["+$vSchema+"["+$i+"]] === undefined ",$ownProperties&&(out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", "+$vSchema+"["+$i+"]) "),out+=") { var err = ",it.createErrors!==!1?(out+=" { keyword: 'required' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ",it.opts.messages!==!1&&(out+=" , message: '",it.opts._errorDataPathProperty?out+="is a required property":out+="should have required property \\'"+$missingProperty+"\\'",out+="' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",$isData&&(out+=" } ")}else{var arr3=$required;if(arr3)for(var $propertyKey,i3=-1,l3=arr3.length-1;i3<l3;){$propertyKey=arr3[i3+=1];var $prop=it.util.getProperty($propertyKey),$missingProperty=it.util.escapeQuotes($propertyKey),$useData=$data+$prop;it.opts._errorDataPathProperty&&(it.errorPath=it.util.getPath($currentErrorPath,$propertyKey,it.opts.jsonPointers)),out+=" if ( "+$useData+" === undefined ",$ownProperties&&(out+=" || ! Object.prototype.hasOwnProperty.call("+$data+", '"+it.util.escapeQuotes($propertyKey)+"') "),out+=") { var err = ",it.createErrors!==!1?(out+=" { keyword: 'required' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { missingProperty: '"+$missingProperty+"' } ",it.opts.messages!==!1&&(out+=" , message: '",it.opts._errorDataPathProperty?out+="is a required property":out+="should have required property \\'"+$missingProperty+"\\'",out+="' "),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}it.errorPath=$currentErrorPath}else $breakOnError&&(out+=" if (true) {");return out}}});var require_uniqueItems=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/uniqueItems.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;if($isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema,($schema||$isData)&&it.opts.uniqueItems!==!1){$isData&&(out+=" var "+$valid+"; if ("+$schemaValue+" === false || "+$schemaValue+" === undefined) "+$valid+" = true; else if (typeof "+$schemaValue+" != 'boolean') "+$valid+" = false; else { "),out+=" var i = "+$data+".length , "+$valid+" = true , j; if (i > 1) { ";var $itemType=it.schema.items&&it.schema.items.type,$typeIsArray=Array.isArray($itemType);if(!$itemType||$itemType=="object"||$itemType=="array"||$typeIsArray&&($itemType.indexOf("object")>=0||$itemType.indexOf("array")>=0))out+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+$data+"[i], "+$data+"[j])) { "+$valid+" = false; break outer; } } } ";else{out+=" var itemIndices = {}, item; for (;i--;) { var item = "+$data+"[i]; ";var $method="checkDataType"+($typeIsArray?"s":"");out+=" if ("+it.util[$method]($itemType,"item",it.opts.strictNumbers,!0)+") continue; ",$typeIsArray&&(out+=` if (typeof item == 'string') item = '"' + item; `),out+=" if (typeof itemIndices[item] == 'number') { "+$valid+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}out+=" } ",$isData&&(out+=" } "),out+=" if (!"+$valid+") { ";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { i: i, j: j } ",it.opts.messages!==!1&&(out+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),it.opts.verbose&&(out+=" , schema: ",$isData?out+="validate.schema"+$schemaPath:out+=""+$schema,out+=" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",out+=" } ",$breakOnError&&(out+=" else { ")}else $breakOnError&&(out+=" if (true) { ");return out}}});var require_dotjs=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/index.js"(exports,module){"use strict";module.exports={$ref:require_ref(),allOf:require_allOf(),anyOf:require_anyOf(),$comment:require_comment(),const:require_const(),contains:require_contains(),dependencies:require_dependencies(),enum:require_enum(),format:require_format(),if:require_if(),items:require_items(),maximum:require_limit(),minimum:require_limit(),maxItems:require_limitItems(),minItems:require_limitItems(),maxLength:require_limitLength(),minLength:require_limitLength(),maxProperties:require_limitProperties(),minProperties:require_limitProperties(),multipleOf:require_multipleOf(),not:require_not(),oneOf:require_oneOf(),pattern:require_pattern(),properties:require_properties(),propertyNames:require_propertyNames(),required:require_required(),uniqueItems:require_uniqueItems(),validate:require_validate()}}});var require_rules=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/rules.js"(exports,module){"use strict";var ruleModules=require_dotjs(),toHash=require_util().toHash;module.exports=function(){var RULES=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],ALL=["type","$comment"],KEYWORDS=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],TYPES=["number","integer","string","array","object","boolean","null"];return RULES.all=toHash(ALL),RULES.types=toHash(TYPES),RULES.forEach(function(group){group.rules=group.rules.map(function(keyword){var implKeywords;if(typeof keyword=="object"){var key=Object.keys(keyword)[0];implKeywords=keyword[key],keyword=key,implKeywords.forEach(function(k){ALL.push(k),RULES.all[k]=!0})}ALL.push(keyword);var rule=RULES.all[keyword]={keyword,code:ruleModules[keyword],implements:implKeywords};return rule}),RULES.all.$comment={keyword:"$comment",code:ruleModules.$comment},group.type&&(RULES.types[group.type]=group)}),RULES.keywords=toHash(ALL.concat(KEYWORDS)),RULES.custom={},RULES}}});var require_data=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/data.js"(exports,module){"use strict";var KEYWORDS=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];module.exports=function(metaSchema,keywordsJsonPointers){for(var i=0;i<keywordsJsonPointers.length;i++){metaSchema=JSON.parse(JSON.stringify(metaSchema));var segments=keywordsJsonPointers[i].split("/"),keywords=metaSchema,j;for(j=1;j<segments.length;j++)keywords=keywords[segments[j]];for(j=0;j<KEYWORDS.length;j++){var key=KEYWORDS[j],schema=keywords[key];schema&&(keywords[key]={anyOf:[schema,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return metaSchema}}});var require_async=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/async.js"(exports,module){"use strict";var MissingRefError=require_error_classes().MissingRef;module.exports=compileAsync;function compileAsync(schema,meta,callback){var self=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");typeof meta=="function"&&(callback=meta,meta=void 0);var p=loadMetaSchemaOf(schema).then(function(){var schemaObj=self._addSchema(schema,void 0,meta);return schemaObj.validate||_compileAsync(schemaObj)});return callback&&p.then(function(v){callback(null,v)},callback),p;function loadMetaSchemaOf(sch){var $schema=sch.$schema;return $schema&&!self.getSchema($schema)?compileAsync.call(self,{$ref:$schema},!0):Promise.resolve()}function _compileAsync(schemaObj){try{return self._compile(schemaObj)}catch(e){if(e instanceof MissingRefError)return loadMissingSchema(e);throw e}function loadMissingSchema(e){var ref=e.missingSchema;if(added(ref))throw new Error("Schema "+ref+" is loaded but "+e.missingRef+" cannot be resolved");var schemaPromise=self._loadingSchemas[ref];return schemaPromise||(schemaPromise=self._loadingSchemas[ref]=self._opts.loadSchema(ref),schemaPromise.then(removePromise,removePromise)),schemaPromise.then(function(sch){if(!added(ref))return loadMetaSchemaOf(sch).then(function(){added(ref)||self.addSchema(sch,ref,void 0,meta)})}).then(function(){return _compileAsync(schemaObj)});function removePromise(){delete self._loadingSchemas[ref]}function added(ref2){return self._refs[ref2]||self._schemas[ref2]}}}}}});var require_custom=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/dotjs/custom.js"(exports,module){"use strict";module.exports=function(it,$keyword,$ruleType){var out=" ",$lvl=it.level,$dataLvl=it.dataLevel,$schema=it.schema[$keyword],$schemaPath=it.schemaPath+it.util.getProperty($keyword),$errSchemaPath=it.errSchemaPath+"/"+$keyword,$breakOnError=!it.opts.allErrors,$errorKeyword,$data="data"+($dataLvl||""),$valid="valid"+$lvl,$errs="errs__"+$lvl,$isData=it.opts.$data&&$schema&&$schema.$data,$schemaValue;$isData?(out+=" var schema"+$lvl+" = "+it.util.getData($schema.$data,$dataLvl,it.dataPathArr)+"; ",$schemaValue="schema"+$lvl):$schemaValue=$schema;var $rule=this,$definition="definition"+$lvl,$rDef=$rule.definition,$closingBraces="",$compile,$inline,$macro,$ruleValidate,$validateCode;if($isData&&$rDef.$data){$validateCode="keywordValidate"+$lvl;var $validateSchema=$rDef.validateSchema;out+=" var "+$definition+" = RULES.custom['"+$keyword+"'].definition; var "+$validateCode+" = "+$definition+".validate;"}else{if($ruleValidate=it.useCustomRule($rule,$schema,it.schema,it),!$ruleValidate)return;$schemaValue="validate.schema"+$schemaPath,$validateCode=$ruleValidate.code,$compile=$rDef.compile,$inline=$rDef.inline,$macro=$rDef.macro}var $ruleErrs=$validateCode+".errors",$i="i"+$lvl,$ruleErr="ruleErr"+$lvl,$asyncKeyword=$rDef.async;if($asyncKeyword&&!it.async)throw new Error("async keyword in sync schema");if($inline||$macro||(out+=""+$ruleErrs+" = null;"),out+="var "+$errs+" = errors;var "+$valid+";",$isData&&$rDef.$data&&($closingBraces+="}",out+=" if ("+$schemaValue+" === undefined) { "+$valid+" = true; } else { ",$validateSchema&&($closingBraces+="}",out+=" "+$valid+" = "+$definition+".validateSchema("+$schemaValue+"); if ("+$valid+") { ")),$inline)$rDef.statements?out+=" "+$ruleValidate.validate+" ":out+=" "+$valid+" = "+$ruleValidate.validate+"; ";else if($macro){var $it=it.util.copy(it),$closingBraces="";$it.level++;var $nextValid="valid"+$it.level;$it.schema=$ruleValidate.validate,$it.schemaPath="";var $wasComposite=it.compositeRule;it.compositeRule=$it.compositeRule=!0;var $code=it.validate($it).replace(/validate\.schema/g,$validateCode);it.compositeRule=$it.compositeRule=$wasComposite,out+=" "+$code}else{var $$outStack=$$outStack||[];$$outStack.push(out),out="",out+=" "+$validateCode+".call( ",it.opts.passContext?out+="this":out+="self",$compile||$rDef.schema===!1?out+=" , "+$data+" ":out+=" , "+$schemaValue+" , "+$data+" , validate.schema"+it.schemaPath+" ",out+=" , (dataPath || '')",it.errorPath!='""'&&(out+=" + "+it.errorPath);var $parentData=$dataLvl?"data"+($dataLvl-1||""):"parentData",$parentDataProperty=$dataLvl?it.dataPathArr[$dataLvl]:"parentDataProperty";out+=" , "+$parentData+" , "+$parentDataProperty+" , rootData ) ";var def_callRuleValidate=out;out=$$outStack.pop(),$rDef.errors===!1?(out+=" "+$valid+" = ",$asyncKeyword&&(out+="await "),out+=""+def_callRuleValidate+"; "):$asyncKeyword?($ruleErrs="customErrors"+$lvl,out+=" var "+$ruleErrs+" = null; try { "+$valid+" = await "+def_callRuleValidate+"; } catch (e) { "+$valid+" = false; if (e instanceof ValidationError) "+$ruleErrs+" = e.errors; else throw e; } "):out+=" "+$ruleErrs+" = null; "+$valid+" = "+def_callRuleValidate+"; "}if($rDef.modifying&&(out+=" if ("+$parentData+") "+$data+" = "+$parentData+"["+$parentDataProperty+"];"),out+=""+$closingBraces,$rDef.valid)$breakOnError&&(out+=" if (true) { ");else{out+=" if ( ",$rDef.valid===void 0?(out+=" !",$macro?out+=""+$nextValid:out+=""+$valid):out+=" "+!$rDef.valid+" ",out+=") { ",$errorKeyword=$rule.keyword;var $$outStack=$$outStack||[];$$outStack.push(out),out="";var $$outStack=$$outStack||[];$$outStack.push(out),out="",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"custom")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { keyword: '"+$rule.keyword+"' } ",it.opts.messages!==!1&&(out+=` , message: 'should pass "`+$rule.keyword+`" keyword validation' `),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ";var __err=out;out=$$outStack.pop(),!it.compositeRule&&$breakOnError?it.async?out+=" throw new ValidationError(["+__err+"]); ":out+=" validate.errors = ["+__err+"]; return false; ":out+=" var err = "+__err+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var def_customError=out;out=$$outStack.pop(),$inline?$rDef.errors?$rDef.errors!="full"&&(out+=" for (var "+$i+"="+$errs+"; "+$i+"<errors; "+$i+"++) { var "+$ruleErr+" = vErrors["+$i+"]; if ("+$ruleErr+".dataPath === undefined) "+$ruleErr+".dataPath = (dataPath || '') + "+it.errorPath+"; if ("+$ruleErr+".schemaPath === undefined) { "+$ruleErr+'.schemaPath = "'+$errSchemaPath+'"; } ',it.opts.verbose&&(out+=" "+$ruleErr+".schema = "+$schemaValue+"; "+$ruleErr+".data = "+$data+"; "),out+=" } "):$rDef.errors===!1?out+=" "+def_customError+" ":(out+=" if ("+$errs+" == errors) { "+def_customError+" } else { for (var "+$i+"="+$errs+"; "+$i+"<errors; "+$i+"++) { var "+$ruleErr+" = vErrors["+$i+"]; if ("+$ruleErr+".dataPath === undefined) "+$ruleErr+".dataPath = (dataPath || '') + "+it.errorPath+"; if ("+$ruleErr+".schemaPath === undefined) { "+$ruleErr+'.schemaPath = "'+$errSchemaPath+'"; } ',it.opts.verbose&&(out+=" "+$ruleErr+".schema = "+$schemaValue+"; "+$ruleErr+".data = "+$data+"; "),out+=" } } "):$macro?(out+=" var err = ",it.createErrors!==!1?(out+=" { keyword: '"+($errorKeyword||"custom")+"' , dataPath: (dataPath || '') + "+it.errorPath+" , schemaPath: "+it.util.toQuotedString($errSchemaPath)+" , params: { keyword: '"+$rule.keyword+"' } ",it.opts.messages!==!1&&(out+=` , message: 'should pass "`+$rule.keyword+`" keyword validation' `),it.opts.verbose&&(out+=" , schema: validate.schema"+$schemaPath+" , parentSchema: validate.schema"+it.schemaPath+" , data: "+$data+" "),out+=" } "):out+=" {} ",out+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!it.compositeRule&&$breakOnError&&(it.async?out+=" throw new ValidationError(vErrors); ":out+=" validate.errors = vErrors; return false; ")):$rDef.errors===!1?out+=" "+def_customError+" ":(out+=" if (Array.isArray("+$ruleErrs+")) { if (vErrors === null) vErrors = "+$ruleErrs+"; else vErrors = vErrors.concat("+$ruleErrs+"); errors = vErrors.length; for (var "+$i+"="+$errs+"; "+$i+"<errors; "+$i+"++) { var "+$ruleErr+" = vErrors["+$i+"]; if ("+$ruleErr+".dataPath === undefined) "+$ruleErr+".dataPath = (dataPath || '') + "+it.errorPath+"; "+$ruleErr+'.schemaPath = "'+$errSchemaPath+'"; ',it.opts.verbose&&(out+=" "+$ruleErr+".schema = "+$schemaValue+"; "+$ruleErr+".data = "+$data+"; "),out+=" } } else { "+def_customError+" } "),out+=" } ",$breakOnError&&(out+=" else { ")}return out}}});var require_json_schema_draft_07=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/refs/json-schema-draft-07.json"(exports,module){module.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}});var require_definition_schema=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/definition_schema.js"(exports,module){"use strict";var metaSchema=require_json_schema_draft_07();module.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:metaSchema.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:metaSchema.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}}});var require_keyword=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/keyword.js"(exports,module){"use strict";var IDENTIFIER=/^[a-z_$][a-z0-9_$-]*$/i,customRuleCode=require_custom(),definitionSchema=require_definition_schema();module.exports={add:addKeyword,get:getKeyword,remove:removeKeyword,validate:validateKeyword};function addKeyword(keyword,definition){var RULES=this.RULES;if(RULES.keywords[keyword])throw new Error("Keyword "+keyword+" is already defined");if(!IDENTIFIER.test(keyword))throw new Error("Keyword "+keyword+" is not a valid identifier");if(definition){this.validateKeyword(definition,!0);var dataType=definition.type;if(Array.isArray(dataType))for(var i=0;i<dataType.length;i++)_addRule(keyword,dataType[i],definition);else _addRule(keyword,dataType,definition);var metaSchema=definition.metaSchema;metaSchema&&(definition.$data&&this._opts.$data&&(metaSchema={anyOf:[metaSchema,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),definition.validateSchema=this.compile(metaSchema,!0))}RULES.keywords[keyword]=RULES.all[keyword]=!0;function _addRule(keyword2,dataType2,definition2){for(var ruleGroup,i2=0;i2<RULES.length;i2++){var rg=RULES[i2];if(rg.type==dataType2){ruleGroup=rg;break}}ruleGroup||(ruleGroup={type:dataType2,rules:[]},RULES.push(ruleGroup));var rule={keyword:keyword2,definition:definition2,custom:!0,code:customRuleCode,implements:definition2.implements};ruleGroup.rules.push(rule),RULES.custom[keyword2]=rule}return this}function getKeyword(keyword){var rule=this.RULES.custom[keyword];return rule?rule.definition:this.RULES.keywords[keyword]||!1}function removeKeyword(keyword){var RULES=this.RULES;delete RULES.keywords[keyword],delete RULES.all[keyword],delete RULES.custom[keyword];for(var i=0;i<RULES.length;i++)for(var rules=RULES[i].rules,j=0;j<rules.length;j++)if(rules[j].keyword==keyword){rules.splice(j,1);break}return this}function validateKeyword(definition,throwError){validateKeyword.errors=null;var v=this._validateKeyword=this._validateKeyword||this.compile(definitionSchema,!0);if(v(definition))return!0;if(validateKeyword.errors=v.errors,throwError)throw new Error("custom keyword definition is invalid: "+this.errorsText(v.errors));return!1}}});var require_data2=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/refs/data.json"(exports,module){module.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}});var require_ajv=__commonJS({"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/ajv.js"(exports,module){"use strict";var compileSchema=require_compile(),resolve2=require_resolve(),Cache=require_cache(),SchemaObject=require_schema_obj(),stableStringify=require_fast_json_stable_stringify(),formats=require_formats(),rules=require_rules(),$dataMetaSchema=require_data(),util=require_util();module.exports=Ajv;Ajv.prototype.validate=validate;Ajv.prototype.compile=compile;Ajv.prototype.addSchema=addSchema;Ajv.prototype.addMetaSchema=addMetaSchema;Ajv.prototype.validateSchema=validateSchema;Ajv.prototype.getSchema=getSchema;Ajv.prototype.removeSchema=removeSchema;Ajv.prototype.addFormat=addFormat;Ajv.prototype.errorsText=errorsText;Ajv.prototype._addSchema=_addSchema;Ajv.prototype._compile=_compile;Ajv.prototype.compileAsync=require_async();var customKeyword=require_keyword();Ajv.prototype.addKeyword=customKeyword.add;Ajv.prototype.getKeyword=customKeyword.get;Ajv.prototype.removeKeyword=customKeyword.remove;Ajv.prototype.validateKeyword=customKeyword.validate;var errorClasses=require_error_classes();Ajv.ValidationError=errorClasses.Validation;Ajv.MissingRefError=errorClasses.MissingRef;Ajv.$dataMetaSchema=$dataMetaSchema;var META_SCHEMA_ID="http://json-schema.org/draft-07/schema",META_IGNORE_OPTIONS=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],META_SUPPORT_DATA=["/properties"];function Ajv(opts){if(!(this instanceof Ajv))return new Ajv(opts);opts=this._opts=util.copy(opts)||{},setLogger(this),this._schemas={},this._refs={},this._fragments={},this._formats=formats(opts.format),this._cache=opts.cache||new Cache,this._loadingSchemas={},this._compilations=[],this.RULES=rules(),this._getId=chooseGetId(opts),opts.loopRequired=opts.loopRequired||1/0,opts.errorDataPath=="property"&&(opts._errorDataPathProperty=!0),opts.serialize===void 0&&(opts.serialize=stableStringify),this._metaOpts=getMetaSchemaOptions(this),opts.formats&&addInitialFormats(this),opts.keywords&&addInitialKeywords(this),addDefaultMetaSchema(this),typeof opts.meta=="object"&&this.addMetaSchema(opts.meta),opts.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),addInitialSchemas(this)}function validate(schemaKeyRef,data){var v;if(typeof schemaKeyRef=="string"){if(v=this.getSchema(schemaKeyRef),!v)throw new Error('no schema with key or ref "'+schemaKeyRef+'"')}else{var schemaObj=this._addSchema(schemaKeyRef);v=schemaObj.validate||this._compile(schemaObj)}var valid=v(data);return v.$async!==!0&&(this.errors=v.errors),valid}function compile(schema,_meta){var schemaObj=this._addSchema(schema,void 0,_meta);return schemaObj.validate||this._compile(schemaObj)}function addSchema(schema,key,_skipValidation,_meta){if(Array.isArray(schema)){for(var i=0;i<schema.length;i++)this.addSchema(schema[i],void 0,_skipValidation,_meta);return this}var id=this._getId(schema);if(id!==void 0&&typeof id!="string")throw new Error("schema id must be string");return key=resolve2.normalizeId(key||id),checkUnique(this,key),this._schemas[key]=this._addSchema(schema,_skipValidation,_meta,!0),this}function addMetaSchema(schema,key,skipValidation){return this.addSchema(schema,key,skipValidation,!0),this}function validateSchema(schema,throwOrLogError){var $schema=schema.$schema;if($schema!==void 0&&typeof $schema!="string")throw new Error("$schema must be a string");if($schema=$schema||this._opts.defaultMeta||defaultMeta(this),!$schema)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var valid=this.validate($schema,schema);if(!valid&&throwOrLogError){var message="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error(message);else throw new Error(message)}return valid}function defaultMeta(self){var meta=self._opts.meta;return self._opts.defaultMeta=typeof meta=="object"?self._getId(meta)||meta:self.getSchema(META_SCHEMA_ID)?META_SCHEMA_ID:void 0,self._opts.defaultMeta}function getSchema(keyRef){var schemaObj=_getSchemaObj(this,keyRef);switch(typeof schemaObj){case"object":return schemaObj.validate||this._compile(schemaObj);case"string":return this.getSchema(schemaObj);case"undefined":return _getSchemaFragment(this,keyRef)}}function _getSchemaFragment(self,ref){var res=resolve2.schema.call(self,{schema:{}},ref);if(res){var schema=res.schema,root=res.root,baseId=res.baseId,v=compileSchema.call(self,schema,root,void 0,baseId);return self._fragments[ref]=new SchemaObject({ref,fragment:!0,schema,root,baseId,validate:v}),v}}function _getSchemaObj(self,keyRef){return keyRef=resolve2.normalizeId(keyRef),self._schemas[keyRef]||self._refs[keyRef]||self._fragments[keyRef]}function removeSchema(schemaKeyRef){if(schemaKeyRef instanceof RegExp)return _removeAllSchemas(this,this._schemas,schemaKeyRef),_removeAllSchemas(this,this._refs,schemaKeyRef),this;switch(typeof schemaKeyRef){case"undefined":return _removeAllSchemas(this,this._schemas),_removeAllSchemas(this,this._refs),this._cache.clear(),this;case"string":var schemaObj=_getSchemaObj(this,schemaKeyRef);return schemaObj&&this._cache.del(schemaObj.cacheKey),delete this._schemas[schemaKeyRef],delete this._refs[schemaKeyRef],this;case"object":var serialize=this._opts.serialize,cacheKey=serialize?serialize(schemaKeyRef):schemaKeyRef;this._cache.del(cacheKey);var id=this._getId(schemaKeyRef);id&&(id=resolve2.normalizeId(id),delete this._schemas[id],delete this._refs[id])}return this}function _removeAllSchemas(self,schemas,regex){for(var keyRef in schemas){var schemaObj=schemas[keyRef];!schemaObj.meta&&(!regex||regex.test(keyRef))&&(self._cache.del(schemaObj.cacheKey),delete schemas[keyRef])}}function _addSchema(schema,skipValidation,meta,shouldAddSchema){if(typeof schema!="object"&&typeof schema!="boolean")throw new Error("schema should be object or boolean");var serialize=this._opts.serialize,cacheKey=serialize?serialize(schema):schema,cached=this._cache.get(cacheKey);if(cached)return cached;shouldAddSchema=shouldAddSchema||this._opts.addUsedSchema!==!1;var id=resolve2.normalizeId(this._getId(schema));id&&shouldAddSchema&&checkUnique(this,id);var willValidate=this._opts.validateSchema!==!1&&!skipValidation,recursiveMeta;willValidate&&!(recursiveMeta=id&&id==resolve2.normalizeId(schema.$schema))&&this.validateSchema(schema,!0);var localRefs=resolve2.ids.call(this,schema),schemaObj=new SchemaObject({id,schema,localRefs,cacheKey,meta});return id[0]!="#"&&shouldAddSchema&&(this._refs[id]=schemaObj),this._cache.put(cacheKey,schemaObj),willValidate&&recursiveMeta&&this.validateSchema(schema,!0),schemaObj}function _compile(schemaObj,root){if(schemaObj.compiling)return schemaObj.validate=callValidate,callValidate.schema=schemaObj.schema,callValidate.errors=null,callValidate.root=root||callValidate,schemaObj.schema.$async===!0&&(callValidate.$async=!0),callValidate;schemaObj.compiling=!0;var currentOpts;schemaObj.meta&&(currentOpts=this._opts,this._opts=this._metaOpts);var v;try{v=compileSchema.call(this,schemaObj.schema,root,schemaObj.localRefs)}catch(e){throw delete schemaObj.validate,e}finally{schemaObj.compiling=!1,schemaObj.meta&&(this._opts=currentOpts)}return schemaObj.validate=v,schemaObj.refs=v.refs,schemaObj.refVal=v.refVal,schemaObj.root=v.root,v;function callValidate(){var _validate=schemaObj.validate,result=_validate.apply(this,arguments);return callValidate.errors=_validate.errors,result}}function chooseGetId(opts){switch(opts.schemaId){case"auto":return _get$IdOrId;case"id":return _getId;default:return _get$Id}}function _getId(schema){return schema.$id&&this.logger.warn("schema $id ignored",schema.$id),schema.id}function _get$Id(schema){return schema.id&&this.logger.warn("schema id ignored",schema.id),schema.$id}function _get$IdOrId(schema){if(schema.$id&&schema.id&&schema.$id!=schema.id)throw new Error("schema $id is different from id");return schema.$id||schema.id}function errorsText(errors,options){if(errors=errors||this.errors,!errors)return"No errors";options=options||{};for(var separator=options.separator===void 0?", ":options.separator,dataVar=options.dataVar===void 0?"data":options.dataVar,text="",i=0;i<errors.length;i++){var e=errors[i];e&&(text+=dataVar+e.dataPath+" "+e.message+separator)}return text.slice(0,-separator.length)}function addFormat(name,format){return typeof format=="string"&&(format=new RegExp(format)),this._formats[name]=format,this}function addDefaultMetaSchema(self){var $dataSchema;if(self._opts.$data&&($dataSchema=require_data2(),self.addMetaSchema($dataSchema,$dataSchema.$id,!0)),self._opts.meta!==!1){var metaSchema=require_json_schema_draft_07();self._opts.$data&&(metaSchema=$dataMetaSchema(metaSchema,META_SUPPORT_DATA)),self.addMetaSchema(metaSchema,META_SCHEMA_ID,!0),self._refs["http://json-schema.org/schema"]=META_SCHEMA_ID}}function addInitialSchemas(self){var optsSchemas=self._opts.schemas;if(optsSchemas)if(Array.isArray(optsSchemas))self.addSchema(optsSchemas);else for(var key in optsSchemas)self.addSchema(optsSchemas[key],key)}function addInitialFormats(self){for(var name in self._opts.formats){var format=self._opts.formats[name];self.addFormat(name,format)}}function addInitialKeywords(self){for(var name in self._opts.keywords){var keyword=self._opts.keywords[name];self.addKeyword(name,keyword)}}function checkUnique(self,id){if(self._schemas[id]||self._refs[id])throw new Error('schema with key or id "'+id+'" already exists')}function getMetaSchemaOptions(self){for(var metaOpts=util.copy(self._opts),i=0;i<META_IGNORE_OPTIONS.length;i++)delete metaOpts[META_IGNORE_OPTIONS[i]];return metaOpts}function setLogger(self){var logger=self._opts.logger;if(logger===!1)self.logger={log:noop,warn:noop,error:noop};else{if(logger===void 0&&(logger=console),!(typeof logger=="object"&&logger.log&&logger.warn&&logger.error))throw new Error("logger must implement log, warn and error methods");self.logger=logger}}function noop(){}}});var require_validate_package_manifest=__commonJS({"../../internals/cli-builder-integration/dist/validate-package-manifest.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),validate_package_manifest_exports={};__export(validate_package_manifest_exports,{validatePackageManifest:()=>validatePackageManifest});module.exports=__toCommonJS(validate_package_manifest_exports);var import_ajv=__toESM2(require_ajv()),import_build_utils3=__require("@vercel/build-utils"),ajv=new import_ajv.default,validate=ajv.compile(import_build_utils3.packageManifestSchema);function validatePackageManifest(data){return validate(data)?null:(validate.errors??[]).map(e=>`${e.dataPath||"(root)"} ${e.message}`).join("; ")}}});var require_manifest=__commonJS({"../../internals/cli-builder-integration/dist/manifest.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),manifest_exports={};__export(manifest_exports,{writeManifests:()=>writeManifests});module.exports=__toCommonJS(manifest_exports);var import_path2=__require("path"),import_build_utils3=__require("@vercel/build-utils");async function writeManifests(packageManifests,diagnostics,ops,outputDir){if(packageManifests.length===0)return;let projectManifest={},deployManifestBuilds={},deployManifestServices={};for(let{workspace,buildConfig,manifest,service,builderUse}of packageManifests){let key=`${builderUse}:${workspace}`,framework=service?.framework??buildConfig.framework??manifest.framework;projectManifest[key]={...manifest,workspace,builder:builderUse,framework,serviceName:service?.name,serviceType:service&&(0,import_build_utils3.isExperimentalService)(service)?service.type:void 0,routePrefix:service&&(0,import_build_utils3.isExperimentalService)(service)?service.routePrefix:void 0};let{version:_version,...manifestWithoutVersion}=manifest;if(deployManifestBuilds[key]={...manifestWithoutVersion,framework,root:workspace,builder:builderUse},service){let existing=deployManifestServices[service.name];existing?existing.builds.push(key):deployManifestServices[service.name]={builds:[key],bindings:(0,import_build_utils3.isExperimentalServiceV2)(service)?service.bindings:void 0}}}if(Object.keys(projectManifest).length===0)return;let projectManifestBlob=new import_build_utils3.FileBlob({data:JSON.stringify(projectManifest)});diagnostics["project-manifest.json"]=projectManifestBlob,ops.push((0,import_build_utils3.downloadFile)(projectManifestBlob,(0,import_path2.join)(outputDir,"diagnostics","project-manifest.json")).then(()=>{},err=>err));let deployManifestBlob=new import_build_utils3.FileBlob({data:JSON.stringify({manifestVersion:"2.0",builds:deployManifestBuilds,services:deployManifestServices})});diagnostics["deploy-manifest.json"]=deployManifestBlob,ops.push((0,import_build_utils3.downloadFile)(deployManifestBlob,(0,import_path2.join)(outputDir,"diagnostics","deploy-manifest.json")).then(()=>{},err=>err))}}});var require_build_embedding=__commonJS({"../../internals/cli-builder-integration/dist/build-embedding.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),build_embedding_exports={};__export(build_embedding_exports,{shouldEmbedFlagsDefinitions:()=>shouldEmbedFlagsDefinitions});module.exports=__toCommonJS(build_embedding_exports);var import_build_utils3=__require("@vercel/build-utils");function isFlagsEmbedOption(input){return input==="force-on"||input==="force-off"}var SDK_KEY_REGEX=/^vf_(?:server|client)_/;function envHasSdkKey(){for(let value of Object.values(process.env))if(typeof value=="string"&&SDK_KEY_REGEX.test(value))return!0}async function shouldEmbedFlagsDefinitions(cwd,packageJson){if(process.env.VERCEL_FLAGS_DISABLE_DEFINITION_EMBEDDING==="1")return!1;if(isFlagsEmbedOption(process.env.VERCEL_FLAGS_EMBED_DEFINITIONS))return process.env.VERCEL_FLAGS_EMBED_DEFINITIONS==="force-on";if(envHasSdkKey())return!0;let hasVercelFlags=await(0,import_build_utils3.isPackageInstalled)("@flags-sdk/vercel",cwd),hasFlagsCore=await(0,import_build_utils3.isPackageInstalled)("@vercel/flags-core",cwd);if(hasVercelFlags||hasFlagsCore)return!0;let dependencies={...packageJson?.dependencies,...packageJson?.devDependencies,...packageJson?.optionalDependencies};return!!(dependencies["@flags-sdk/vercel"]||dependencies["@vercel/flags-core"])}}});var require_validate_build_output=__commonJS({"../../internals/cli-builder-integration/dist/validate-build-output.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),validate_build_output_exports={};__export(validate_build_output_exports,{reportBuildOutputProblems:()=>reportBuildOutputProblems,validateBuildOutput:()=>validateBuildOutput});module.exports=__toCommonJS(validate_build_output_exports);var import_fs_extra2=__toESM2(require_lib()),import_path2=__require("path"),import_build_utils3=__require("@vercel/build-utils");function logDebug(message,output){output?.debug(message),(0,import_build_utils3.debug)(message)}async function validateOutputConfig(configPath,label,problems){if(!await import_fs_extra2.default.pathExists(configPath)){problems.push({severity:"error",message:`${label} is missing config.json.`});return}let config;try{config=await import_fs_extra2.default.readJSON(configPath)}catch(err){problems.push({severity:"error",message:`${label} config.json is not valid JSON: ${err instanceof Error?err.message:String(err)}.`});return}config&&config.version!==3&&problems.push({severity:"warning",message:`${label} config.json has unexpected version "${config.version}" (expected 3).`})}async function validateBuildOutput(outputDir,output){let problems=[];logDebug(`Validating build output at "${outputDir}"`,output);try{await validateOutputConfig((0,import_path2.join)(outputDir,"config.json"),"Build output",problems);let servicesDir=(0,import_path2.join)(outputDir,"services"),serviceNames=[];try{serviceNames=(await import_fs_extra2.default.readdir(servicesDir,{withFileTypes:!0})).filter(e=>e.isDirectory()).map(e=>e.name)}catch(err){if(err?.code!=="ENOENT")throw err}let[hasFunctions,hasStatic]=await Promise.all([import_fs_extra2.default.pathExists((0,import_path2.join)(outputDir,"functions")),import_fs_extra2.default.pathExists((0,import_path2.join)(outputDir,"static"))]),hasServices=serviceNames.length>0;!hasFunctions&&!hasStatic&&!hasServices&&problems.push({severity:"warning",message:'Build output contains no "functions", "static", or "services" directory; the build may not have produced any deployable output.'});for(let name of serviceNames){let serviceDir=(0,import_path2.join)(servicesDir,name),label=`Build output service "${name}"`;await validateOutputConfig((0,import_path2.join)(serviceDir,"config.json"),label,problems);let[svcHasFunctions,svcHasStatic]=await Promise.all([import_fs_extra2.default.pathExists((0,import_path2.join)(serviceDir,"functions")),import_fs_extra2.default.pathExists((0,import_path2.join)(serviceDir,"static"))]);!svcHasFunctions&&!svcHasStatic&&problems.push({severity:"warning",message:`${label} contains no "functions" or "static" directory; the service may not have produced any deployable output.`})}return logDebug(`Build output validation found ${problems.length} problem(s)`+(problems.length?`: ${problems.map(p=>`${p.severity}: ${p.message}`).join("; ")}`:""),output),problems}catch(err){return[{severity:"error",message:`Unexpected error while validating build output: ${err instanceof Error?err.message:String(err)}.`}]}}function reportBuildOutputProblems(problems,output){for(let problem of problems)problem.severity==="error"?output.error(problem.message):output.warn(problem.message)}}});var require_framework_detection=__commonJS({"../../internals/cli-builder-integration/dist/framework-detection.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),framework_detection_exports={};__export(framework_detection_exports,{detectAllFrameworks:()=>detectAllFrameworks,detectFirstDeploymentFramework:()=>detectFirstDeploymentFramework,isFirstDeployment:()=>isFirstDeployment,isFrameworkDetectionEnabled:()=>isFrameworkDetectionEnabled,warnIfFrameworkMismatch:()=>warnIfFrameworkMismatch});module.exports=__toCommonJS(framework_detection_exports);var import_fs_detectors=require_dist2(),import_frameworks=require_frameworks(),import_build_utils3=__require("@vercel/build-utils");function logDebug(message,output){output?.debug(message),(0,import_build_utils3.debug)(message)}function isFrameworkDetectionEnabled(output){let raw=process.env.VERCEL_FRAMEWORK_DETECTION,enabled=raw==="1";return logDebug(`Framework detection: VERCEL_FRAMEWORK_DETECTION=${raw===void 0?"<unset>":JSON.stringify(raw)} -> ${enabled?"enabled":"disabled"}`,output),enabled}function isFirstDeployment(output){let raw=process.env.VERCEL_FIRST_DEPLOYMENT,result=raw==="1";return logDebug(`isFirstDeployment: VERCEL_FIRST_DEPLOYMENT=${raw===void 0?"<unset>":JSON.stringify(raw)} -> ${result}`,output),result}async function detectFirstDeploymentFramework(options){let{workPath,projectSettings,frameworkExplicitlyConfigured,output}=options;if(logDebug(`First deployment: evaluating framework detection (workPath="${workPath}", configuredFramework=${projectSettings.framework?`"${projectSettings.framework}"`:"<none>"})`,output),!isFirstDeployment(output))return logDebug("First deployment: skipping framework detection because this is not a first deployment",output),{status:"skipped"};if(frameworkExplicitlyConfigured||projectSettings.framework)return logDebug(`First deployment: skipping framework detection because a framework is already configured ("${projectSettings.framework}")`,output),{status:"skipped"};logDebug(`First deployment: no framework configured; detecting from source at "${workPath}"`,output);let detected=await(0,import_fs_detectors.detectFrameworkRecord)({fs:new import_fs_detectors.LocalFileSystemDetector(workPath),frameworkList:import_frameworks.frameworkList});if(!detected||!detected.slug)return logDebug("First deployment: no framework detected from source code",output),{status:"not-detected"};let{slug}=detected;return projectSettings.framework=slug,logDebug(`First deployment: detected framework "${slug}"${detected.detectedVersion?` (version ${detected.detectedVersion})`:""}; applied to project settings for this build`,output),{status:"detected",slug,...detected.detectedVersion&&{version:detected.detectedVersion}}}async function detectAllFrameworks(workPath,customFrameworkList,output){logDebug(`Framework cross-check: detecting frameworks at "${workPath}"`,output);let slugs=(await(0,import_fs_detectors.detectFrameworks)({fs:new import_fs_detectors.LocalFileSystemDetector(workPath),frameworkList:customFrameworkList??import_frameworks.frameworkList})).map(f=>f.slug).filter(slug=>!!slug);return logDebug(`Framework cross-check: detected [${slugs.join(", ")||"<none>"}]`,output),slugs}function isHighConfidenceDetection(slug){return import_frameworks.frameworkList.find(f=>f.slug===slug)?.detectionConfidence!=="weak"}function warnIfFrameworkMismatch(options,output){let{configuredFramework,detectedFrameworks,usedBuilders=[],usedFrameworks=[]}=options;if(detectedFrameworks.length===0)return logDebug("Framework cross-check: nothing detected from source; skipping validation",output),"none-detected";let confidentFrameworks=detectedFrameworks.filter(isHighConfidenceDetection);if(configuredFramework)return detectedFrameworks.includes(configuredFramework)?(logDebug(`Framework cross-check: configured framework "${configuredFramework}" matches detected frameworks; no mismatch`,output),"match"):confidentFrameworks.length===0?(logDebug(`Framework cross-check: configured framework "${configuredFramework}" not among detected [${detectedFrameworks.join(", ")}], but all detections are low-confidence; skipping warning`,output),"low-confidence"):(logDebug(`Framework cross-check: configured framework "${configuredFramework}" not among detected [${confidentFrameworks.join(", ")}]; warning`,output),output?.warn(`Your project is configured to use the "${configuredFramework}" framework, but the source code looks like it's for: ${confidentFrameworks.join(", ")}. This may be a misconfiguration.`,null,"https://vercel.com/docs/project-configuration","Learn More"),"configured-mismatch");if(detectedFrameworks.some(slug=>{if(usedFrameworks.includes(slug))return!0;let expectedBuilder=import_frameworks.frameworkList.find(f=>f.slug===slug)?.useRuntime?.use;return expectedBuilder?usedBuilders.some(use=>use===expectedBuilder||use.startsWith(`${expectedBuilder}@`)):!1}))return logDebug(`Framework cross-check: no framework configured, but the build used one of the detected frameworks [${detectedFrameworks.join(", ")}]; no mismatch`,output),"match";let warnableFrameworks=confidentFrameworks.filter(slug=>!!import_frameworks.frameworkList.find(f=>f.slug===slug)?.useRuntime?.use);return warnableFrameworks.length===0?(logDebug(`Framework cross-check: no framework configured and detections [${detectedFrameworks.join(", ")}] are low-confidence or have no dedicated runtime builder; skipping warning`,output),"low-confidence"):(logDebug(`Framework cross-check: no framework configured and the build did not use any of the detected frameworks [${warnableFrameworks.join(", ")}] (used builders: [${usedBuilders.join(", ")||"<none>"}]); warning`,output),output?.warn(`The source code looks like it's for: ${warnableFrameworks.join(", ")}, but no framework is configured for this project and the build did not use ${warnableFrameworks.length===1?"its builder":"their builders"}. Set the framework in your Project Settings if this is unexpected.`,null,"https://vercel.com/docs/project-configuration","Learn More"),"unused-mismatch")}}});var require_constants=__commonJS({"../../internals/runtimes/dist/constants.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),constants_exports={};__export(constants_exports,{BUILDER_RUNTIMES:()=>BUILDER_RUNTIMES,CONTAINER_ENTRYPOINT_CANDIDATES:()=>CONTAINER_ENTRYPOINT_CANDIDATES,ENTRYPOINT_EXTENSIONS:()=>ENTRYPOINT_EXTENSIONS,ROUTE_OWNING_BUILDERS:()=>ROUTE_OWNING_BUILDERS,RUNTIME_BUILDERS:()=>RUNTIME_BUILDERS,RUNTIME_MANIFESTS:()=>RUNTIME_MANIFESTS,STATIC_BUILDERS:()=>STATIC_BUILDERS});module.exports=__toCommonJS(constants_exports);var RUNTIME_BUILDERS={node:"@vercel/backends",python:"@vercel/python",go:"@vercel/go",rust:"@vercel/rust",ruby:"@vercel/ruby",container:"@vercel/container"},RUNTIME_MANIFESTS={node:["package.json"],python:["pyproject.toml","requirements.txt","Pipfile","pylock.yml","uv.lock","setup.py"],go:["go.mod"],ruby:["Gemfile"],rust:["Cargo.toml"]},ENTRYPOINT_EXTENSIONS={".ts":"node",".mts":"node",".js":"node",".mjs":"node",".cjs":"node",".py":"python",".go":"go",".rs":"rust",".rb":"ruby",".ru":"ruby"},BUILDER_RUNTIMES=Object.fromEntries(Object.entries(RUNTIME_BUILDERS).map(([runtime,builder])=>[builder,runtime])),STATIC_BUILDERS=new Set(["@vercel/static-build","@vercel/static"]),ROUTE_OWNING_BUILDERS=new Set(["@vercel/next","@vercel/backends"]),CONTAINER_ENTRYPOINT_CANDIDATES=["Dockerfile.vercel","Containerfile.vercel","Dockerfile","Containerfile"]}});var require_framework=__commonJS({"../../internals/runtimes/dist/framework.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),framework_exports={};__export(framework_exports,{DETECTION_FRAMEWORKS:()=>DETECTION_FRAMEWORKS,filterFrameworksByRuntime:()=>filterFrameworksByRuntime,frameworksBySlug:()=>frameworksBySlug,inferBuilderRuntimeFromFramework:()=>inferBuilderRuntimeFromFramework,inferRuntimeFromFramework:()=>inferRuntimeFromFramework,inferServerRuntimeFromFramework:()=>inferServerRuntimeFromFramework,isBFFFramework:()=>isBFFFramework,isFrontendFramework:()=>isFrontendFramework});module.exports=__toCommonJS(framework_exports);var import_build_utils3=__require("@vercel/build-utils"),import_frameworks=require_frameworks(),import_constants=require_constants(),frameworksBySlug=new Map(import_frameworks.frameworkList.flatMap(f=>typeof f.slug=="string"?[[f.slug,f]]:[])),DETECTION_FRAMEWORKS=import_frameworks.frameworkList.filter(framework=>!framework.experimental||framework.runtimeFramework);function inferRuntimeFromFramework(framework){if(framework){if(framework in import_constants.RUNTIME_BUILDERS)return framework;if((0,import_build_utils3.isPythonFramework)(framework))return"python";if((0,import_build_utils3.isBackendFramework)(framework))return"node"}}var STATIC_BUILDER_RUNTIMES={hugo:"go",jekyll:"ruby",middleman:"ruby",zola:"rust"};function inferServerRuntimeFromFramework(framework){if(!framework||framework==="services")return;let builder=frameworksBySlug.get(framework)?.useRuntime?.use;if(builder)return import_constants.BUILDER_RUNTIMES[builder]??"node"}function inferBuilderRuntimeFromFramework(framework){if(!framework||framework==="container"||framework==="services")return;let f=frameworksBySlug.get(framework),declaredBuilder=f?.useRuntime?.use;if(declaredBuilder)return import_constants.BUILDER_RUNTIMES[declaredBuilder];let detectorItems=[...f?.detectors?.every??[],...f?.detectors?.some??[]];return STATIC_BUILDER_RUNTIMES[framework]??(detectorItems.some(d=>d.matchPackage!==void 0)?"node":void 0)}function isFrontendFramework(framework){return!!framework&&!inferRuntimeFromFramework(framework)}var BFF_FRAMEWORKS=new Set(["nextjs","nuxtjs","sveltekit","remix","solidstart"]);function isBFFFramework(framework){return!!framework&&BFF_FRAMEWORKS.has(framework)}function filterFrameworksByRuntime(frameworks,runtime){return runtime?frameworks.filter(f=>inferRuntimeFromFramework(f.slug)===runtime):[...frameworks]}}});var require_runtime=__commonJS({"../../internals/runtimes/dist/runtime.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),runtime_exports={};__export(runtime_exports,{getBuilderForRuntime:()=>getBuilderForRuntime,inferRuntime:()=>inferRuntime});module.exports=__toCommonJS(runtime_exports);var import_constants=require_constants(),import_framework=require_framework();function getBuilderForRuntime(runtime){let builder=import_constants.RUNTIME_BUILDERS[runtime];if(!builder)throw new Error(`Unknown runtime: ${runtime}`);return builder}function inferRuntime(config){if(config.runtime&&config.runtime in import_constants.RUNTIME_BUILDERS)return config.runtime;let frameworkRuntime=(0,import_framework.inferRuntimeFromFramework)(config.framework);if(frameworkRuntime)return frameworkRuntime;if(config.builder){for(let[runtime,builderName]of Object.entries(import_constants.RUNTIME_BUILDERS))if(config.builder===builderName)return runtime}if(config.entrypoint){if(config.entrypoint==="pyproject.toml"||config.entrypoint.endsWith("/pyproject.toml"))return"python";for(let[ext,runtime]of Object.entries(import_constants.ENTRYPOINT_EXTENSIONS))if(config.entrypoint.endsWith(ext))return runtime}}}});var require_monorepo=__commonJS({"../../internals/cli-builder-integration/dist/monorepo.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),monorepo_exports={};__export(monorepo_exports,{applyServicesMonorepoDefaults:()=>applyServicesMonorepoDefaults,setMonorepoDefaultSettings:()=>setMonorepoDefaultSettings});module.exports=__toCommonJS(monorepo_exports);var import_path2=__require("path"),import_fs_detectors=require_dist2(),import_runtime=require_runtime(),import_title=__toESM2(require_lib2()),import_fs_extra2=__toESM2(require_lib()),import_build_utils3=__require("@vercel/build-utils");async function setMonorepoDefaultSettings(cwd,workPath,projectSettings,output){let localFileSystem=new import_fs_detectors.LocalFileSystemDetector(cwd),projectName=(0,import_path2.basename)(workPath),relativeToRoot=(0,import_path2.relative)(workPath,cwd),setCommand=(command,value)=>{projectSettings[command]?(0,import_build_utils3.debug)(`Skipping auto-assignment of ${command} as it is already set via project settings or configuration overrides.`):projectSettings[command]=value};try{let result=await(0,import_fs_detectors.getMonorepoDefaultSettings)(projectName,(0,import_path2.relative)(cwd,workPath),relativeToRoot,localFileSystem);if(result===null)return;projectSettings.monorepoManager=result.monorepoManager;let{monorepoManager,...commands}=result;output.log(`Detected ${(0,import_title.default)(monorepoManager)}. Adjusting default settings...`),commands.buildCommand&&setCommand("buildCommand",commands.buildCommand),commands.installCommand&&setCommand("installCommand",commands.installCommand),commands.commandForIgnoringBuildStep&&setCommand("commandForIgnoringBuildStep",commands.commandForIgnoringBuildStep)}catch(error){if(error instanceof import_fs_detectors.MissingBuildPipeline||error instanceof import_fs_detectors.MissingBuildTarget){output.warn(`${error.message} Skipping automatic setting assignment.`);return}throw error}}async function hasVercelBuildScript(serviceRoot){try{return(await import_fs_extra2.default.readJSON((0,import_path2.join)(serviceRoot,"package.json")))?.scripts?.["vercel-build"]!==void 0}catch{return!1}}async function applyServicesMonorepoDefaults(cwd,workPath,services,projectSettings,output){let localFileSystem=new import_fs_detectors.LocalFileSystemDetector(cwd),result,announced=!1;for(let[name,config]of Object.entries(services)){if(config.buildCommand){(0,import_build_utils3.debug)(`Skipping auto-assignment of buildCommand for service "${name}" as it is already set in the services configuration.`);continue}let runtime=(0,import_runtime.inferRuntime)({runtime:config.runtime,framework:config.framework,entrypoint:config.entrypoint});if(runtime!==void 0&&runtime!=="node"){(0,import_build_utils3.debug)(`Skipping monorepo defaults for service "${name}": runtime "${runtime}" does not build via the monorepo task graph.`);continue}let serviceRoot=(0,import_path2.resolve)(workPath,config.root??"."),projectPath=(0,import_path2.relative)(cwd,serviceRoot);if((0,import_path2.isAbsolute)(projectPath)||projectPath===".."||projectPath.startsWith(`..${import_path2.sep}`)){(0,import_build_utils3.debug)(`Skipping monorepo defaults for service "${name}": root "${config.root}" is outside "${cwd}".`);continue}if(await hasVercelBuildScript(serviceRoot)){(0,import_build_utils3.debug)(`Skipping monorepo defaults for service "${name}": a \`vercel-build\` script is defined in its root package.json.`);continue}let posixProjectPath=(0,import_build_utils3.normalizePath)(projectPath),posixRelativeToRoot=(0,import_build_utils3.normalizePath)((0,import_path2.relative)(serviceRoot,cwd)),settings;try{settings=await(0,import_fs_detectors.getMonorepoDefaultSettings)((0,import_path2.basename)(serviceRoot),posixProjectPath||"/",posixRelativeToRoot,localFileSystem)}catch(error){if(error instanceof import_fs_detectors.MissingBuildPipeline){output.warn(`${error.message} Skipping automatic setting assignment.`);break}if(error instanceof import_fs_detectors.MissingBuildTarget){output.warn(`Service "${name}": ${error.message} Skipping automatic setting assignment.`);continue}throw error}if(settings===null)break;projectSettings.monorepoManager=settings.monorepoManager,settings.buildCommand&&(announced||(output.log(`Detected ${(0,import_title.default)(settings.monorepoManager)}. Adjusting default settings...`),announced=!0),(0,import_build_utils3.debug)(`Assigning buildCommand "${settings.buildCommand}" to service "${name}".`),result??={...services},result[name]={...config,buildCommand:settings.buildCommand})}return result??services}}});var require_corepack=__commonJS({"../../internals/cli-builder-integration/dist/corepack.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),corepack_exports={};__export(corepack_exports,{cleanupCorepack:()=>cleanupCorepack,initCorepack:()=>initCorepack});module.exports=__toCommonJS(corepack_exports);var import_path2=__require("path"),import_build_utils3=__require("@vercel/build-utils"),import_fs_extra2=__toESM2(require_lib());async function initCorepack({repoRootPath,output,readJSONFile:readJSONFile2,isCantParseJSONFile,warmPackageManager=!1}){if(process.env.ENABLE_EXPERIMENTAL_COREPACK!=="1")return null;let pkg=await readJSONFile2((0,import_path2.join)(repoRootPath,"package.json"));if(isCantParseJSONFile(pkg))output.warn("Warning: Could not enable corepack because package.json is invalid JSON",pkg.meta?.parseErrorLocation??pkg.message);else if(!pkg?.packageManager)output.warn('Warning: Could not enable corepack because package.json is missing "packageManager" property');else{output.log(`Detected ENABLE_EXPERIMENTAL_COREPACK=1 and "${pkg.packageManager}" in package.json`);let corepackRootDir=(0,import_path2.join)(repoRootPath,".vercel","cache","corepack"),corepackHomeDir=(0,import_path2.join)(corepackRootDir,"home"),corepackShimDir=(0,import_path2.join)(corepackRootDir,"shim");await import_fs_extra2.default.mkdirp(corepackHomeDir),await import_fs_extra2.default.mkdirp(corepackShimDir),process.env.COREPACK_HOME=corepackHomeDir,process.env.PATH=`${corepackShimDir}${import_path2.delimiter}${process.env.PATH}`;let pkgManagerName=pkg.packageManager.split("@")[0];if(await(0,import_build_utils3.spawnAsync)("corepack",["enable",pkgManagerName,"--install-directory",corepackShimDir],{prettyCommand:`corepack enable ${pkgManagerName}`}),warmPackageManager)try{await(0,import_build_utils3.spawnAsync)(pkgManagerName,["--version"],{prettyCommand:`${pkgManagerName} --version`,stdio:"pipe"})}catch(err){output.debug(`Failed to pre-download "${pkg.packageManager}" via corepack: ${err instanceof Error?err.message:String(err)}`)}return corepackShimDir}return null}function cleanupCorepack(corepackShimDir){process.env.COREPACK_HOME&&delete process.env.COREPACK_HOME,process.env.PATH&&(process.env.PATH=process.env.PATH.replace(`${corepackShimDir}${import_path2.delimiter}`,""))}}});var require_entrypoint=__commonJS({"../../internals/runtimes/dist/entrypoint.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),entrypoint_exports={};__export(entrypoint_exports,{SCHEDULE_ENTRYPOINT_FORMS_HINT:()=>SCHEDULE_ENTRYPOINT_FORMS_HINT,isDockerfileEntrypoint:()=>isDockerfileEntrypoint,parsePyModuleAttrEntrypoint:()=>parsePyModuleAttrEntrypoint,parseScheduleEntrypoint:()=>parseScheduleEntrypoint,stripTrailingSlash:()=>stripTrailingSlash});module.exports=__toCommonJS(entrypoint_exports);var import_path2=__require("path"),import_constants=require_constants(),PYTHON_MODULE_ATTR_RE=/^([A-Za-z_][\w]*(?:\.[A-Za-z_][\w]*)*):([A-Za-z_][\w]*)$/,NODE_FILE_ENTRYPOINT_RE=/^(?!\/)(?!.*(?:^|\/)\.\.?(?:\/|$))(?:[\w@+.-]+\/)*[\w@+.-]+\.[cm]?[jt]s$/,NODE_DECLARATION_ENTRYPOINT_RE=/\.d\.[cm]?ts$/;function parsePyModuleAttrEntrypoint(entrypoint){let match=PYTHON_MODULE_ATTR_RE.exec(entrypoint);if(!match)return null;let[,modulePart,attrName]=match;return!modulePart||!attrName?null:{attrName,filePath:modulePart.replace(/\./g,"/")+".py",moduleName:modulePart}}var SCHEDULE_ENTRYPOINT_FORMS_HINT='Use a source file path like "jobs/nightly.ts" or a Python "module.path:function" reference.';function parseScheduleEntrypoint(entrypoint){let python=parsePyModuleAttrEntrypoint(entrypoint);return python?{runtime:"python",...python}:NODE_FILE_ENTRYPOINT_RE.test(entrypoint)&&!NODE_DECLARATION_ENTRYPOINT_RE.test(entrypoint)?{runtime:"node",filePath:entrypoint}:null}var CONTAINER_ENTRYPOINT_BASENAMES=new Set(import_constants.CONTAINER_ENTRYPOINT_CANDIDATES.map(name=>name.toLowerCase()));function isDockerfileEntrypoint(entrypoint){return CONTAINER_ENTRYPOINT_BASENAMES.has(import_path2.posix.basename(entrypoint).toLowerCase())}function stripTrailingSlash(p){let stripped=p.replace(/\/+$/,"");return stripped===""?".":stripped}}});var require_schedule_entrypoint=__commonJS({"../../internals/runtimes/dist/schedule-entrypoint.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),schedule_entrypoint_exports={};__export(schedule_entrypoint_exports,{resolveScheduleEntrypoint:()=>resolveScheduleEntrypoint,validateScheduleEntrypointRuntimes:()=>validateScheduleEntrypointRuntimes});module.exports=__toCommonJS(schedule_entrypoint_exports);var import_entrypoint=require_entrypoint(),import_framework=require_framework();function resolveScheduleEntrypoint(entrypoint,files,framework){let parsed=(0,import_entrypoint.parseScheduleEntrypoint)(entrypoint);if(!parsed)return{ok:!1,code:"INVALID_SCHEDULE_ENTRYPOINT",message:`has invalid entrypoint "${entrypoint}". ${import_entrypoint.SCHEDULE_ENTRYPOINT_FORMS_HINT}`};let frameworkRuntime=(0,import_framework.inferServerRuntimeFromFramework)(framework);if(frameworkRuntime&&parsed.runtime!==frameworkRuntime)return{ok:!1,code:"SCHEDULE_ENTRYPOINT_RUNTIME_MISMATCH",message:`entrypoint "${entrypoint}" uses the ${parsed.runtime} runtime, but framework "${framework}" uses the ${frameworkRuntime} runtime. Schedule entrypoints must use the same runtime as the framework.`};switch(parsed.runtime){case"python":return{ok:!1,code:"UNSUPPORTED_SCHEDULE_ENTRYPOINT_RUNTIME",message:`entrypoint "${entrypoint}" uses an unsupported runtime. Python schedule entrypoints are not supported yet.`};case"node":return{ok:!1,code:"UNSUPPORTED_SCHEDULE_ENTRYPOINT_RUNTIME",message:`entrypoint "${entrypoint}" uses an unsupported runtime. JavaScript and TypeScript schedule entrypoints are not supported yet.`}}}function validateScheduleEntrypointRuntimes(schedules){let first;for(let{name,entrypoint}of schedules){let parsed=(0,import_entrypoint.parseScheduleEntrypoint)(entrypoint);if(parsed){if(first&&first.runtime!==parsed.runtime)return{ok:!1,code:"MIXED_SCHEDULE_ENTRYPOINT_RUNTIMES",message:`Schedule "${first.name}" entrypoint "${first.entrypoint}" uses the ${first.runtime} runtime, but schedule "${name}" entrypoint "${entrypoint}" uses the ${parsed.runtime} runtime. Schedule entrypoints must all use the same runtime.`};first??={name,entrypoint,runtime:parsed.runtime}}}return{ok:!0}}}});var require_do_build=__commonJS({"../../internals/cli-builder-integration/dist/do-build.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),do_build_exports={};__export(do_build_exports,{doBuild:()=>doBuild3});module.exports=__toCommonJS(do_build_exports);var import_fs_extra2=__toESM2(require_lib()),import_minimatch2=__toESM2(require_minimatch()),import_path2=__require("path"),import_semver=__toESM2(require_semver()),import_build_utils3=__require("@vercel/build-utils"),import_client=require_dist4(),import_frameworks=require_frameworks(),import_fs_detectors=require_dist2(),import_service_topology=require_dist3(),import_detect_builders_with_services=require_detect_builders_with_services(),import_routing_utils=require_dist(),import_write_build_result3=require_write_build_result(),import_build_runner2=require_build_runner(),import_execute_builder=require_execute_builder(),import_build_concurrency=require_build_concurrency(),import_backend_rewrite_warning=require_backend_rewrite_warning(),import_service_route_ownership=require_service_route_ownership(),import_service_schedules=require_service_schedules(),import_validate_cron_secret=require_validate_cron_secret(),import_validate_package_manifest=require_validate_package_manifest(),import_manifest=require_manifest(),import_build_embedding=require_build_embedding(),import_get_files=require_get_files(),import_validate_build_output=require_validate_build_output(),import_framework_detection=require_framework_detection(),import_monorepo=require_monorepo(),import_corepack=require_corepack(),import_schedule_entrypoint=require_schedule_entrypoint();function pickOverrides(config){let overrides={};for(let property of["buildCommand","devCommand","framework","ignoreCommand","installCommand","outputDirectory"])config[property]!==void 0&&(overrides[property==="ignoreCommand"?"commandForIgnoringBuildStep":property]=config[property]);return overrides}function hasScheduleEntrypointTarget(schedule){return"entrypoint"in schedule.target}var SERVICE_BUILD_IMMUTABLE_ENV_VARS=["VERCEL_IMMUTABLE_STATIC_FILES_ENABLED"];function hasNonEmptyObject(value){return value!=null&&typeof value=="object"&&!Array.isArray(value)&&Object.keys(value).length>0}function getGeneratedServiceAlreadyBuiltWarning(service){let framework=service.framework??"unknown",entrypoint=service.entrypoint??service.builder.src??"unknown";return`Detected already-built service "${service.name}" from lazily generated \`.vercel/output/config.json\` (framework: ${framework}, entrypoint: ${entrypoint}). It will not be treated as a service because its build output already exists at the top level. Configure it in \`vercel.json\` as a \`services\` entry to remove this warning.`}async function doBuild3(request,dependencies){let{project,buildsJson,cwd,outputDir,span,standalone=!1,localConfigPath,cliVersion,userAgent}=request,{output,createBuildRunner:createBuildRunner2,canBuildInSubprocess:canBuildInSubprocess2,importBuilders:importBuilders2,formatResolvedBuilders:formatResolvedBuilders2,writeBuildResult:writeBuildResult2,toEnumerableError:toEnumerableError2,readJSONFile:readJSONFile2,isCantParseJSONFile,validateConfig:validateConfig2,compileVercelConfig:compileVercelConfig2,findSourceVercelConfigFile:findSourceVercelConfigFile2,defaultVercelConfigFilename,startBuildTiming}=dependencies,VALID_DEPLOYMENT_ID_PATTERN=/^[a-zA-Z0-9_-]+$/,workPath=(0,import_path2.join)(cwd,project.settings.rootDirectory||"."),repoRootPath=cwd,sourceConfigFile=await findSourceVercelConfigFile2(workPath),corepackShimDir;if(sourceConfigFile){corepackShimDir=await(0,import_corepack.initCorepack)({repoRootPath,output,readJSONFile:readJSONFile2,isCantParseJSONFile,warmPackageManager:(0,import_build_concurrency.resolveBuildConcurrency)()>1});let installDepsSpan=span.child("vc.installDeps"),installRan=!1;try{let installCommand=project.settings.installCommand;typeof installCommand=="string"?installCommand.trim()?(output.log("Running install command before config compilation..."),installRan=await(0,import_build_utils3.runCustomInstallCommand)({destPath:workPath,installCommand,spawnOpts:{env:process.env},projectCreatedAt:project.settings.createdAt})):output.debug("Skipping empty install command"):(output.log("Installing dependencies before config compilation..."),installRan=await(0,import_build_utils3.runNpmInstall)(workPath,[],{env:process.env},void 0,project.settings.createdAt))}finally{installDepsSpan.stop()}if(installRan){let{packageJsonPath}=await(0,import_build_utils3.scanParentDirs)(workPath,!1);packageJsonPath&&(process.env.VERCEL_INSTALL_COMPLETED_PATH=packageJsonPath),process.env.VERCEL_INSTALL_COMPLETED="1"}}let compileResult=await span.child("vc.compileVercelConfig").trace(()=>compileVercelConfig2(workPath)),vercelConfigPath=localConfigPath||compileResult.configPath||(0,import_path2.join)(workPath,"vercel.json"),[pkg,vercelConfig,hasInstrumentation]=await span.child("vc.readConfigInputs").trace(()=>Promise.all([readJSONFile2((0,import_path2.join)(workPath,"package.json")),readJSONFile2(vercelConfigPath),(0,import_fs_detectors.detectInstrumentation)(new import_fs_detectors.LocalFileSystemDetector(workPath))]));if(isCantParseJSONFile(pkg))throw pkg;if(isCantParseJSONFile(vercelConfig))throw vercelConfig;hasInstrumentation&&(output.debug("OpenTelemetry instrumentation detected. Automatic fetch instrumentation will be disabled."),process.env.VERCEL_TRACING_DISABLE_AUTOMATIC_FETCH_INSTRUMENTATION="1"),vercelConfig&&(vercelConfig[import_client.fileNameSymbol]=compileResult.wasCompiled?compileResult.sourceFile||defaultVercelConfigFilename:"vercel.json");let localConfig=vercelConfig||{},validateError=validateConfig2(localConfig);if(validateError)throw validateError;if(localConfig.crons&&localConfig.crons.length>0){let cronSecretError=(0,import_validate_cron_secret.validateCronSecret)(process.env.CRON_SECRET);if(cronSecretError)throw cronSecretError}let projectSettings={...project.settings,...pickOverrides(localConfig)};buildsJson.detectedFramework=await span.child("vc.detectFirstDeploymentFramework",{firstDeployment:String(process.env.VERCEL_FIRST_DEPLOYMENT==="1"),configuredFramework:projectSettings.framework??void 0}).trace(async s=>{let result=await(0,import_framework_detection.detectFirstDeploymentFramework)({workPath,projectSettings,frameworkExplicitlyConfigured:Object.prototype.hasOwnProperty.call(localConfig,"framework"),output});return s.setAttributes({detectionStatus:result.status,detectedFramework:result.slug,detectedFrameworkVersion:result.version}),result}),process.env.VERCEL_BUILD_MONOREPO_SUPPORT==="1"&&pkg?.scripts?.["vercel-build"]===void 0&&projectSettings.rootDirectory!==null&&projectSettings.rootDirectory!=="."&&await span.child("vc.setMonorepoDefaultSettings").trace(()=>(0,import_monorepo.setMonorepoDefaultSettings)(cwd,workPath,projectSettings,output)),await span.child("vc.prepareFlagsDefinitions").trace(async s=>{let shouldEmbed=await(0,import_build_embedding.shouldEmbedFlagsDefinitions)(cwd,pkg);if(s.setAttributes({shouldEmbed:String(shouldEmbed)}),!shouldEmbed)return;let{prepareFlagsDefinitions}=await import("@vercel/prepare-flags-definitions");await prepareFlagsDefinitions({cwd,env:process.env,userAgentSuffix:userAgent,output})});let files=await span.child("vc.getFiles").trace(async s=>{let result=(await(0,import_get_files.staticFiles)(workPath,{},output)).map(f=>(0,import_build_utils3.normalizePath)((0,import_path2.relative)(workPath,f)));return s.setAttributes({fileCount:String(result.length)}),result}),entrypointSchedules=(localConfig.schedules??[]).filter(hasScheduleEntrypointTarget).map(schedule=>({name:schedule.name,entrypoint:schedule.target.entrypoint})),runtimeCheck=(0,import_schedule_entrypoint.validateScheduleEntrypointRuntimes)(entrypointSchedules);if(!runtimeCheck.ok)throw new import_build_utils3.NowBuildError({code:runtimeCheck.code,message:runtimeCheck.message});let scheduleEntrypointUses=new Map;for(let schedule of localConfig.schedules??[]){if(!hasScheduleEntrypointTarget(schedule))continue;let entrypoint=schedule.target.entrypoint,existing=scheduleEntrypointUses.get(entrypoint);if(existing){existing.scheduleNames.push(schedule.name);continue}let resolution=(0,import_schedule_entrypoint.resolveScheduleEntrypoint)(entrypoint,files,projectSettings.framework);if(!resolution.ok)throw new import_build_utils3.NowBuildError({code:resolution.code,message:`Schedule "${schedule.name}" ${resolution.message}`});scheduleEntrypointUses.set(entrypoint,{resolved:resolution.resolved,scheduleNames:[schedule.name]})}let scheduleFunctions=[],entrypointByOutputPath=new Map;for(let{resolved,scheduleNames}of scheduleEntrypointUses.values()){let{outputPath}=resolved.packing,conflicting=entrypointByOutputPath.get(outputPath);if(conflicting!==void 0)throw new import_build_utils3.NowBuildError({code:"SCHEDULE_ENTRYPOINT_OUTPUT_COLLISION",message:`Schedule entrypoints "${conflicting}" and "${resolved.entrypoint}" resolve to the same function output "${outputPath}".`});entrypointByOutputPath.set(outputPath,resolved.entrypoint),scheduleFunctions.push({use:resolved.use,config:{outputPath,entrypoints:[{entrypoint:resolved.entrypoint,sourceFile:resolved.sourceFiles[0],scheduleNames}]}})}let reservedFunctionFiles=Array.from(scheduleEntrypointUses.values()).flatMap(({resolved})=>resolved.sourceFiles),detectedFrameworksPromise=span.child("vc.detectAllFrameworks",{enabled:String((0,import_framework_detection.isFrameworkDetectionEnabled)(output))}).trace(async s=>{if(!(0,import_framework_detection.isFrameworkDetectionEnabled)(output))return[];try{let slugs=await(0,import_framework_detection.detectAllFrameworks)(workPath,void 0,output);return s.setAttributes({detectedFrameworks:slugs.join(",")||void 0,detectedFrameworkCount:String(slugs.length)}),slugs}catch(err){return output.debug(`Framework cross-check detection failed: ${err}`),s.setAttributes({error:err instanceof Error?err.message:String(err)}),[]}}),routesResult=(0,import_routing_utils.getTransformedRoutes)(localConfig);if(routesResult.error)throw routesResult.error;if(localConfig.builds&&localConfig.functions)throw new import_build_utils3.NowBuildError({code:"bad_request",message:"The `functions` property cannot be used in conjunction with the `builds` property. Please remove one of them.",link:"https://vercel.link/functions-and-builds"});let builds=localConfig.builds||[],zeroConfigRoutes=[],zeroConfigFallbackRoutes=[],detectedServices,detectedResolvedServices,servicesToRecord,hasExperimentalServicesV1ConfiguredInVercelConfig=hasNonEmptyObject(localConfig.experimentalServices),hasExperimentalServicesV2ConfiguredInVercelConfig=hasNonEmptyObject(localConfig.services??localConfig.experimentalServicesV2);hasExperimentalServicesV1ConfiguredInVercelConfig&&output.warn("The `experimentalServices` property is deprecated. Migrate to `services`.");let configuredExperimentalServicesV2=hasExperimentalServicesV2ConfiguredInVercelConfig&&(localConfig.services??localConfig.experimentalServicesV2)?localConfig.services??localConfig.experimentalServicesV2:void 0,nestExperimentalServicesV2Output=hasExperimentalServicesV2ConfiguredInVercelConfig,detectedExperimentalServicesV1Config,detectedExperimentalServicesV2Config=configuredExperimentalServicesV2,isZeroConfig=!1;if(builds.length>0)output.warn("Due to `builds` existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: https://vercel.link/unused-build-settings"),builds=builds.flatMap(b=>expandBuild(files,b));else{isZeroConfig=!0;let servicesForDetection=configuredExperimentalServicesV2;process.env.VERCEL_BUILD_MONOREPO_SUPPORT==="1"&&configuredExperimentalServicesV2&&(servicesForDetection=await span.child("vc.applyServicesMonorepoDefaults").trace(()=>(0,import_monorepo.applyServicesMonorepoDefaults)(cwd,workPath,configuredExperimentalServicesV2,projectSettings,output)));let detectedBuilders=await span.child("vc.detectBuilders").trace(()=>(0,import_detect_builders_with_services.detectBuildersWithServices)(files,pkg,{...localConfig,reservedFunctionFiles,services:void 0,experimentalServicesV2:servicesForDetection,projectSettings,ignoreBuildScript:!0,featHandleMiss:!0,workPath}));if(detectedBuilders.errors&&detectedBuilders.errors.length>0)throw detectedBuilders.errors[0];for(let w of detectedBuilders.warnings)output.warn(w.message,null,w.link,w.action||"Learn More");detectedBuilders.builders?builds=detectedBuilders.builders:builds=[{src:"**",use:"@vercel/static"}],detectedResolvedServices=detectedBuilders.services,servicesToRecord=detectedResolvedServices,detectedServices=detectedBuilders.services?.filter(import_build_utils3.isExperimentalService);let autoDetectedV2Config=detectedBuilders.experimentalServicesV2;if(!hasExperimentalServicesV2ConfiguredInVercelConfig&&autoDetectedV2Config&&(nestExperimentalServicesV2Output=!0,detectedExperimentalServicesV2Config=autoDetectedV2Config),detectedBuilders.useImplicitEnvInjection&&detectedServices&&detectedServices.length>0){let serviceUrlEnvVars=(0,import_build_utils3.getExperimentalServiceUrlEnvVars)({services:detectedServices,frameworkList:import_frameworks.frameworkList,currentEnv:process.env,deploymentUrl:process.env.VERCEL_URL});for(let[key,value]of Object.entries(serviceUrlEnvVars))process.env[key]=value,output.debug(`Injected service URL env var: ${key}=${value}`)}let serviceRewrites=detectedBuilders.serviceRewrites,serviceRewriteRoutes=serviceRewrites&&serviceRewrites.length>0?(0,import_routing_utils.convertRewrites)(serviceRewrites):null;zeroConfigRoutes.push(...detectedBuilders.redirectRoutes||[]);let detectedHostRewriteRoutes=detectedBuilders.hostRewriteRoutes;zeroConfigRoutes=(0,import_routing_utils.appendRoutesToPhase)({routes:zeroConfigRoutes,newRoutes:detectedHostRewriteRoutes??null,phase:null});let detectedServiceRewriteRoutes=nestExperimentalServicesV2Output?[]:detectedBuilders.rewriteRoutes;zeroConfigRoutes.push(...(0,import_routing_utils.appendRoutesToPhase)({routes:[],newRoutes:[...detectedServiceRewriteRoutes||[],...serviceRewriteRoutes||[]],phase:"filesystem"})),zeroConfigRoutes=(0,import_routing_utils.appendRoutesToPhase)({routes:zeroConfigRoutes,newRoutes:detectedBuilders.errorRoutes,phase:"error"}),nestExperimentalServicesV2Output||(zeroConfigRoutes.push(...detectedBuilders.defaultRoutes||[]),zeroConfigFallbackRoutes=detectedBuilders.fallbackRoutes||[])}(0,import_backend_rewrite_warning.hasBackendRewriteBehaviorChange)({projectRewrites:localConfig.rewrites,builders:builds})&&output.warn(import_backend_rewrite_warning.BACKEND_REWRITE_BEHAVIOR_WARNING);let scheduleEntrypointOutputPaths=new Map;for(let{config:config2}of scheduleFunctions)for(let{entrypoint}of config2.entrypoints)scheduleEntrypointOutputPaths.set(entrypoint,config2.outputPath);let scheduleEntrypointBuilds=new Set,scheduleEntrypointsBySourceFile=new Map;for(let{resolved}of scheduleEntrypointUses.values())for(let sourceFile of resolved.sourceFiles)scheduleEntrypointsBySourceFile.set(sourceFile,resolved.entrypoint);for(let build of builds){if(typeof build.src!="string")continue;let sourcePath=(0,import_build_utils3.normalizePath)(build.src).replace(/^\.\//,""),entrypoint=scheduleEntrypointsBySourceFile.get(sourcePath);if(entrypoint!==void 0)throw new import_build_utils3.NowBuildError({code:"SCHEDULE_ENTRYPOINT_SOURCE_CONFLICT",message:`Schedule entrypoint "${entrypoint}" uses source file "${sourcePath}", which is also matched by builder "${build.use}". Move the schedule callable to a separate file or remove the conflicting build.`})}for(let{use,config:config2}of scheduleFunctions){let scheduleBuild={src:config2.entrypoints[0].sourceFile,use,config:{zeroConfig:!0,...localConfig.functions?{functions:localConfig.functions}:void 0,scheduleFunction:config2}};builds.push(scheduleBuild),scheduleEntrypointBuilds.add(scheduleBuild)}let builderSpecs=new Set(builds.map(b=>b.use)),buildersWithPkgs=await span.child("vc.importBuilders").trace(async s=>{let builders=await importBuilders2(builderSpecs,cwd,s);return s.setAttributes({resolved:formatResolvedBuilders2(builders)}),builders}),filesMap=await span.child("vc.populateFilesMap").trace(async s=>{let map={};for(let path of files){let fsPath=(0,import_path2.join)(workPath,path),{mode}=await import_fs_extra2.default.stat(fsPath);map[path]=new import_build_utils3.FileFsRef({mode,fsPath})}return s.setAttributes({fileCount:String(files.length)}),map}),buildStamp=startBuildTiming();await import_fs_extra2.default.mkdirp(outputDir);let ops=[],buildsJsonBuilds=new Map,ensureBuildersImported=async buildsToImport=>{let missingBuilderSpecs=new Set(buildsToImport.map(build=>build.use).filter(builderSpec=>!buildersWithPkgs.has(builderSpec)));if(missingBuilderSpecs.size===0)return;let importedBuilders=await span.child("vc.importBuilders").trace(async s=>{let builders=await importBuilders2(missingBuilderSpecs,cwd,s);return s.setAttributes({resolved:formatResolvedBuilders2(builders)}),builders});buildersWithPkgs=new Map([...buildersWithPkgs.entries(),...importedBuilders.entries()])},addBuildsToBuildJson=async buildsToAdd=>{await ensureBuildersImported(buildsToAdd);for(let build of buildsToAdd){if(buildsJsonBuilds.has(build))continue;let builderWithPkg=buildersWithPkgs.get(build.use);if(!builderWithPkg)throw new Error(`Failed to load Builder "${build.use}"`);let{builder,pkg:builderPkg}=builderWithPkg;buildsJsonBuilds.set(build,{require:builderPkg.name,requirePath:builderWithPkg.path,apiVersion:builder.version,...build})}buildsJson.builds=Array.from(buildsJsonBuilds.values()),await writeBuildJson(buildsJson,outputDir)},meta={skipDownload:!0,cliVersion,runNpmInstallSet:new Set},executedBuilds=[],buildResults=new Map,overrides=[];corepackShimDir||(corepackShimDir=await(0,import_corepack.initCorepack)({repoRootPath,output,readJSONFile:readJSONFile2,isCantParseJSONFile,warmPackageManager:(0,import_build_concurrency.resolveBuildConcurrency)()>1}));let diagnostics={},packageManifests=[],apiDirFrameworkDetector=createApiDirFrameworkDetector((workPath2,frameworks)=>(0,import_framework_detection.detectAllFrameworks)(workPath2,frameworks,output)),getHasDetectedServices=()=>detectedResolvedServices!==void 0&&detectedResolvedServices.length>0,synthesizedServiceCrons=[],serviceByBuilder=new Map,serviceFileOverrides=new Map;if(getHasDetectedServices())for(let service of detectedResolvedServices)serviceByBuilder.set(service.builder,service);let preDeployEntries=[],liveRunners=new Set,buildOrdinals=new Map,generatedRootRoutes,runBuilders=async buildsToRun=>{await addBuildsToBuildJson(buildsToRun);let buildOne=async(build,concurrent)=>{if(typeof build.src!="string")return;let builderWithPkg=buildersWithPkgs.get(build.use);if(!builderWithPkg)throw new Error(`Failed to load Builder "${build.use}"`);try{let{builder,pkg:builderPkg}=builderWithPkg,service=getHasDetectedServices()?serviceByBuilder.get(build):void 0,legacyExperimentalService=service&&(0,import_build_utils3.isExperimentalService)(service)?service:void 0,serviceWorkspace=service?(0,import_build_utils3.isExperimentalService)(service)?service.workspace:service.root:void 0,stripServiceRoutePrefix=!!legacyExperimentalService?.routePrefix&&legacyExperimentalService.routePrefix!=="/",buildWorkPath=workPath,buildEntrypoint=build.src,buildFiles=filesMap;if(service&&serviceWorkspace&&serviceWorkspace!=="."){let wsPrefix=serviceWorkspace+"/";buildWorkPath=(0,import_path2.join)(workPath,serviceWorkspace),buildEntrypoint=build.src.startsWith(wsPrefix)?build.src.slice(wsPrefix.length):build.src,buildFiles={};for(let[filePath,file]of Object.entries(filesMap))filePath.startsWith(wsPrefix)&&(buildFiles[filePath.slice(wsPrefix.length)]=file);output.debug(`Service "${service.name}": workspace-rooted build at "${buildWorkPath}", entrypoint "${buildEntrypoint}" (original: "${build.src}")`)}let restoreEnv=new Map,perBuildEnv=concurrent?{...process.env}:process.env,setBuildEnv=(key,value)=>{concurrent||restoreEnv.set(key,process.env[key]),value===void 0?delete perBuildEnv[key]:perBuildEnv[key]=value},settingsForEnv=service?{buildCommand:service.buildCommand??void 0,installCommand:service.installCommand??void 0,outputDirectory:projectSettings.outputDirectory??void 0,nodeVersion:projectSettings.nodeVersion??void 0}:projectSettings;for(let key of["buildCommand","installCommand","outputDirectory","nodeVersion"]){let value=settingsForEnv[key],envKey="VERCEL_PROJECT_SETTINGS_"+key.replace(/[A-Z]/g,letter=>`_${letter}`).toUpperCase();setBuildEnv(envKey,typeof value=="string"?value:void 0),typeof value=="string"&&output.debug(`Setting env ${envKey} to "${value}"`)}let isFrontendBuilder=build.config&&"framework"in build.config,builderFramework=build.config?.framework??projectSettings.framework,isApiDir=isZeroConfig&&!service&&!isFrontendBuilder,apiDirFramework=isApiDir?await apiDirFrameworkDetector.detect(build.use??"",buildWorkPath):void 0,buildConfig;isZeroConfig?service?buildConfig={...build.config,...(0,import_build_utils3.isExperimentalServiceV2)(service)&&service.functions?{functions:service.functions,serviceName:service.name}:void 0,projectSettings:{...projectSettings,framework:service.framework??null,buildCommand:service.buildCommand??null,installCommand:service.installCommand??null},installCommand:service.installCommand??void 0,buildCommand:service.buildCommand??void 0,preDeployCommand:legacyExperimentalService?.preDeployCommand??void 0,framework:builderFramework,nodeVersion:projectSettings.nodeVersion,bunVersion:localConfig.bunVersion??void 0}:buildConfig={outputDirectory:projectSettings.outputDirectory??void 0,...build.config,projectSettings,installCommand:projectSettings.installCommand??void 0,devCommand:projectSettings.devCommand??void 0,buildCommand:projectSettings.buildCommand??void 0,framework:isFrontendBuilder?projectSettings.framework:void 0,nodeVersion:projectSettings.nodeVersion,bunVersion:localConfig.bunVersion??void 0}:buildConfig={...build.config||{},bunVersion:localConfig.bunVersion??void 0};let builderSpan=span.child("vc.builder",{"builder.name":builderPkg.name,"builder.version":builderPkg.version,"builder.dynamicallyInstalled":String(builderWithPkg.dynamicallyInstalled)}),serviceRoutePrefix=build.config?.routePrefix,serviceConfigWorkspace=build.config?.workspace,preDeployCmd=legacyExperimentalService?.preDeployCommand?.trim(),preDeployEntry=preDeployCmd&&service?{ordinal:buildOrdinals.get(build)??Number.MAX_SAFE_INTEGER,service:service.name}:void 0;preDeployEntry&&preDeployEntries.push(preDeployEntry);let buildOptions={files:buildFiles,entrypoint:buildEntrypoint,workPath:buildWorkPath,repoRootPath,config:buildConfig,meta,span:builderSpan,...preDeployCmd?{registerPreDeploy:callback=>{preDeployEntry.callback=callback}}:void 0,...service?{service:{name:service.name,...legacyExperimentalService?{type:legacyExperimentalService.type,trigger:legacyExperimentalService.trigger}:void 0,routePrefix:typeof serviceRoutePrefix=="string"?serviceRoutePrefix:void 0,workspace:typeof serviceConfigWorkspace=="string"?serviceConfigWorkspace:serviceWorkspace,...legacyExperimentalService?{schedule:legacyExperimentalService.schedule}:void 0}}:void 0};if(output.debug(`Building entrypoint "${build.src}" with "${builderPkg.name}"`),detectedServices&&legacyExperimentalService?.env){let perServiceEnv=(0,import_build_utils3.getServiceUrlEnvVars)({requestedEnv:legacyExperimentalService.env,consumerService:legacyExperimentalService,services:detectedServices,frameworkList:import_frameworks.frameworkList,currentEnv:process.env,deploymentUrl:process.env.VERCEL_URL});for(let[key,value]of Object.entries(perServiceEnv))key in process.env||(setBuildEnv(key,value),output.debug(`Injected service URL env var: ${key}=${value}`))}if(service)for(let key of SERVICE_BUILD_IMMUTABLE_ENV_VARS)setBuildEnv(key,void 0);let buildResult,rawBuildResult,runnerContext={requirePath:builderWithPkg.path,buildOptions,cwd:buildWorkPath,expectsPreDeploy:!!preDeployCmd,builderSpan,serviceName:service?.name,env:perBuildEnv},runner=createBuildRunner2?.({ctx:runnerContext,builder,hasDetectedServices:getHasDetectedServices(),builderPath:builderWithPkg.path,hasBuildCallback:!!buildOptions.buildCallback})??new import_build_runner2.InprocessBuildRunner(runnerContext,builder);if(concurrent&&runner instanceof import_build_runner2.InprocessBuildRunner)throw new Error(`Internal error: build for "${buildOptions.entrypoint}" was scheduled concurrently but cannot run in a subprocess`);liveRunners.add(runner);try{({buildResult,rawBuildResult}=await(0,import_execute_builder.executeBuilder)({builder,buildOptions,span:builderSpan,isFrontendBuilder,hasDetectedServices:getHasDetectedServices(),framework:import_frameworks.frameworkList.find(framework2=>framework2.slug===buildConfig.framework),runner}))}finally{for(let[key,prior]of restoreEnv)prior===void 0?delete process.env[key]:process.env[key]=prior;try{let builderDiagnostics=await runner.diagnostics();if(builderDiagnostics){let prefix=service&&serviceWorkspace&&serviceWorkspace!=="."?serviceWorkspace+"/"+builderPkg.name+"/":"";for(let[key,value]of Object.entries(builderDiagnostics)){let fullKey=prefix+key;if(key.endsWith("package-manifest.json"))try{let data;value.type==="FileBlob"?data=value.data.toString():data=await streamToString(value.toStream());let packageManifest=JSON.parse(data),validationError=(0,import_validate_package_manifest.validatePackageManifest)(packageManifest);if(validationError)output.warn(`Invalid package-manifest.json from ${fullKey}: ${validationError}`);else{let workspace=service&&serviceWorkspace&&serviceWorkspace!=="."?serviceWorkspace:".",buildType=packageManifest.buildType??(buildConfig.middleware===!0?"middleware":isApiDir?"api-dir":"app"),entry={ordinal:buildOrdinals.get(build)??Number.MAX_SAFE_INTEGER,workspace,key:fullKey,buildConfig,manifest:{...packageManifest,framework:packageManifest.framework??apiDirFramework,buildType},service,builderUse:builderPkg.name},existingIndex=packageManifests.findIndex(m=>m.builderUse===builderPkg.name&&m.workspace===workspace),existing=existingIndex===-1?void 0:packageManifests[existingIndex];existing?entry.ordinal<existing.ordinal&&(packageManifests[existingIndex]=entry):packageManifests.push(entry)}}catch(e){output.debug(`Failed to parse ${fullKey}: ${e instanceof Error?e.message:String(e)}`)}else diagnostics[fullKey]=value}}}catch(error){output.error("Collecting diagnostics failed"),output.debug(error)}}if(buildResult&&"output"in buildResult&&"runtime"in buildResult.output&&"type"in buildResult.output&&buildResult.output.type==="Lambda"){let lambdaRuntime=buildResult.output.runtime;if((0,import_build_utils3.getDiscontinuedNodeVersions)().some(o=>o.runtime===lambdaRuntime))throw new import_build_utils3.NowBuildError({code:"NODEJS_DISCONTINUED_VERSION",message:`The Runtime "${build.use}" is using "${lambdaRuntime}", which is discontinued. Please upgrade your Runtime to a more recent version or consult the author for more details.`,link:"https://vercel.link/function-runtimes"})}if("output"in buildResult&&buildResult.output&&((0,import_build_utils3.isBackendBuilder)(build)||build.use==="@vercel/python")){let routesJsonPath=(0,import_path2.join)(buildWorkPath,".vercel","routes.json");if((0,import_fs_extra2.existsSync)(routesJsonPath))try{let routesJson=await readJSONFile2(routesJsonPath);if(routesJson&&typeof routesJson=="object"&&"routes"in routesJson&&Array.isArray(routesJson.routes)){let indexLambda="index"in buildResult.output?buildResult.output.index:void 0,convertedRoutes=[],convertedOutputs=indexLambda?{index:indexLambda}:{};for(let route of routesJson.routes){if(typeof route.source!="string")continue;let{src}=(0,import_routing_utils.sourceToRegex)(route.source),newRoute={src,dest:route.source};route.methods&&(newRoute.methods=route.methods),route.source!=="/"&&(indexLambda&&(convertedOutputs[route.source]=indexLambda),convertedRoutes.push(newRoute))}buildResult.routes=[{handle:"filesystem"},...convertedRoutes,{src:"/(.*)",dest:"/"}],indexLambda&&(buildResult.output=convertedOutputs)}}catch(error){output.error(`Failed to read routes.json: ${error}`)}}if(getHasDetectedServices()&&service&&legacyExperimentalService&&"routes"in buildResult&&Array.isArray(buildResult.routes)&&detectedServices&&(buildResult.routes=(0,import_service_route_ownership.scopeRoutesToServiceOwnership)({routes:buildResult.routes,owner:legacyExperimentalService,allServices:detectedServices})),legacyExperimentalService&&(0,import_build_utils3.isQueueBackedService)(legacyExperimentalService)&&"output"in buildResult&&attachQueueServiceTrigger(buildResult.output,legacyExperimentalService),legacyExperimentalService&&(0,import_build_utils3.isScheduleTriggeredService)(legacyExperimentalService)&&!("crons"in buildResult&&buildResult.crons?.length)){let staticSchedules=(0,import_service_schedules.getStaticServiceSchedules)(legacyExperimentalService.schedule);if(typeof legacyExperimentalService.runtime=="string"&&staticSchedules.length>0){let cronEntrypoint=legacyExperimentalService.entrypoint||legacyExperimentalService.builder.src||"index";for(let schedule of staticSchedules)synthesizedServiceCrons.push({ordinal:buildOrdinals.get(build)??Number.MAX_SAFE_INTEGER,cron:{path:(0,import_build_utils3.getInternalServiceCronPath)(legacyExperimentalService.name,cronEntrypoint,legacyExperimentalService.handlerFunction||"cron"),schedule}})}else throw new import_build_utils3.NowBuildError({code:"CRON_SERVICE_NO_CRONS",message:`Scheduled service "${legacyExperimentalService.name}" did not produce any cron entries. The builder "${builderPkg.name}" may not support scheduled services.`})}let mergedBuildResult=buildResult;if("buildOutputPath"in buildResult){let buildOutputConfigPath=(0,import_path2.join)(buildResult.buildOutputPath,"config.json"),buildOutputConfig=await readJSONFile2(buildOutputConfigPath);if(isCantParseJSONFile(buildOutputConfig))throw buildOutputConfig;if(buildOutputConfig){if(buildResult.framework&&!buildOutputConfig.framework&&(buildOutputConfig.framework=buildResult.framework),!hasExperimentalServicesV1ConfiguredInVercelConfig&&!hasExperimentalServicesV2ConfiguredInVercelConfig){let outputConfigPath=(0,import_path2.join)(outputDir,"config.json"),outputConfig=await readJSONFile2(outputConfigPath);if(isCantParseJSONFile(outputConfig))throw outputConfig;let shouldMergeGeneratedOutputRoutes=!1;hasNonEmptyObject(outputConfig?.experimentalServices)&&!hasNonEmptyObject(buildOutputConfig.experimentalServices)&&(buildOutputConfig.experimentalServices=outputConfig.experimentalServices,shouldMergeGeneratedOutputRoutes=!0),hasNonEmptyObject(outputConfig?.experimentalServicesV2)&&!hasNonEmptyObject(buildOutputConfig.experimentalServicesV2)&&(buildOutputConfig.experimentalServicesV2=outputConfig.experimentalServicesV2,shouldMergeGeneratedOutputRoutes=!0),hasGeneratedServicesConfig(outputConfig)&&!hasGeneratedServicesConfig(buildOutputConfig)&&(buildOutputConfig.services=outputConfig.services,shouldMergeGeneratedOutputRoutes=!0),shouldMergeGeneratedOutputRoutes&&Array.isArray(outputConfig?.routes)&&(buildOutputConfig.routes=prependMissingBuildOutputRoutes(outputConfig.routes,buildOutputConfig.routes),generatedRootRoutes??=outputConfig.routes),(hasNonEmptyObject(buildOutputConfig.experimentalServices)||hasNonEmptyObject(buildOutputConfig.experimentalServicesV2)||hasGeneratedServicesConfig(buildOutputConfig))&&await import_fs_extra2.default.writeJSON(buildOutputConfigPath,buildOutputConfig,{spaces:2})}getHasDetectedServices()&&service&&legacyExperimentalService&&Array.isArray(buildOutputConfig.routes)&&detectedServices&&(buildOutputConfig.routes=(0,import_service_route_ownership.scopeRoutesToServiceOwnership)({routes:buildOutputConfig.routes,owner:legacyExperimentalService,allServices:detectedServices})),mergedBuildResult=buildOutputConfig}}buildResults.set(build,mergedBuildResult),executedBuilds.push(build);let buildOutputLength=0;"output"in buildResult&&(buildOutputLength=Array.isArray(buildResult.output)?buildResult.output.length:1);let writeBuildResultPromise=builderSpan.child("vc.builder.writeBuildResult",{buildOutputLength:String(buildOutputLength)}).trace(()=>writeBuildResult2({repoRootPath,outputDir,buildResult:rawBuildResult,build,builder,builderPkg,vercelConfig:localConfig,standalone,workPath:buildWorkPath,service,nestServiceOutput:nestExperimentalServicesV2Output,stripServiceRoutePrefix}));if(service&&nestExperimentalServicesV2Output){let override=await writeBuildResultPromise;override&&serviceFileOverrides.set(build,override)}else ops.push(writeBuildResultPromise.then(override=>{override&&overrides.push({ordinal:buildOrdinals.get(build)??Number.MAX_SAFE_INTEGER,override})},err=>err))}catch(err){let buildJsonBuild=buildsJsonBuilds.get(build);throw buildJsonBuild&&(buildJsonBuild.error=toEnumerableError2(err)),err}finally{ops.push((0,import_build_utils3.download)(diagnostics,(0,import_path2.join)(outputDir,"diagnostics")).then(()=>{},err=>err))}},sortedBuilds=(0,import_execute_builder.sortBuildsForExecution)(buildsToRun);for(let build of sortedBuilds)buildOrdinals.has(build)||buildOrdinals.set(build,buildOrdinals.size);let concurrency=createBuildRunner2&&canBuildInSubprocess2?(0,import_build_concurrency.resolveBuildConcurrency)():1;await(0,import_build_concurrency.runBuildsWithConcurrency)({builds:sortedBuilds,concurrency,isEligible:build=>{let bp=typeof build.src=="string"?buildersWithPkgs.get(build.use):void 0;return!!bp&&!!canBuildInSubprocess2&&canBuildInSubprocess2({hasDetectedServices:getHasDetectedServices(),builderPath:bp.path})},forceSingleChain:!hasExperimentalServicesV1ConfiguredInVercelConfig&&!hasExperimentalServicesV2ConfiguredInVercelConfig,resolveScope:async build=>{let service=getHasDetectedServices()&&typeof build.src=="string"?serviceByBuilder.get(build):void 0;if(!service){let key="no-service-context";return{outerKey:key,innerKey:`${key}:${build.use}:${String(build.src)}`,siblingsSkipInstall:!1}}let serviceWorkspace=(0,import_build_utils3.isExperimentalService)(service)?service.workspace:service.root,serviceDir=serviceWorkspace&&serviceWorkspace!=="."?(0,import_path2.join)(workPath,serviceWorkspace):workPath,toolchain=service.runtime??["python","go","ruby","rust","container"].find(t=>build.use.startsWith(`@vercel/${t}`))??"node",customInstall=!!service.installCommand?.trim(),installRoot=await(0,import_build_concurrency.resolveInstallScopeRoot)({toolchain,serviceDir,ceilingDir:repoRootPath});return{outerKey:`${toolchain}:${installRoot}`,innerKey:(0,import_build_concurrency.getInstallScopeKey)({toolchain,installDirectory:serviceDir,installCommand:service.installCommand}),siblingsSkipInstall:toolchain==="node"&&!customInstall}},runBuild:(build,concurrent)=>buildOne(build,concurrent),log:message=>output.log(message),reportSecondaryError:(err,build)=>{output.error(`Build failed for "${build.src}": ${err instanceof Error?err.message:String(err)}`)}})},flushOps=async()=>{let errors=await Promise.all(ops.splice(0));for(let error of errors)if(error)throw error},normalizeBuilderSrc=src=>typeof src=="string"?(0,import_build_utils3.normalizePath)(src).replace(/^\.\//,""):void 0,getBuilderIdentity=build=>{let normalizedSrc=normalizeBuilderSrc(build.src);return normalizedSrc?`${build.use}:${normalizedSrc}`:void 0},getAlreadyExecutedBuild=candidate=>{let candidateIdentity=getBuilderIdentity(candidate);if(candidateIdentity)return executedBuilds.find(build=>getBuilderIdentity(build)===candidateIdentity)},appendExperimentalServicesV1Routes=services=>{let serviceRoutes=(0,import_service_topology.generateServicesRoutes)(services);zeroConfigRoutes=(0,import_routing_utils.appendRoutesToPhase)({routes:zeroConfigRoutes,newRoutes:serviceRoutes.hostRewrites.length?serviceRoutes.hostRewrites:null,phase:null});let serviceRewriteRoutes=nestExperimentalServicesV2Output?[]:[...serviceRoutes.rewrites,...serviceRoutes.workers,...serviceRoutes.crons];zeroConfigRoutes.push(...(0,import_routing_utils.appendRoutesToPhase)({routes:[],newRoutes:serviceRewriteRoutes,phase:"filesystem"})),nestExperimentalServicesV2Output||(zeroConfigRoutes.push(...serviceRoutes.defaults),zeroConfigFallbackRoutes.push(...serviceRoutes.fallbacks))},sortBuildResultsByOrdinal=()=>{let orderedResults=Array.from(buildResults.entries()).sort(([a],[b])=>(buildOrdinals.get(a)??Number.MAX_SAFE_INTEGER)-(buildOrdinals.get(b)??Number.MAX_SAFE_INTEGER));buildResults.clear();for(let[build,result]of orderedResults)buildResults.set(build,result)};try{if(await runBuilders(builds),await flushOps(),sortBuildResultsByOrdinal(),!hasExperimentalServicesV1ConfiguredInVercelConfig&&!hasExperimentalServicesV2ConfiguredInVercelConfig){let generatedConfigPath=(0,import_path2.join)(outputDir,"config.json"),generatedConfig=await readJSONFile2(generatedConfigPath);if(isCantParseJSONFile(generatedConfig))throw generatedConfig;let defaultGeneratedOutputDir=(0,import_path2.join)(workPath,import_write_build_result3.OUTPUT_DIR),generatedConfigs=[generatedConfig];if((0,import_path2.resolve)(outputDir)!==(0,import_path2.resolve)(defaultGeneratedOutputDir)){let defaultGeneratedConfig=await readJSONFile2((0,import_path2.join)(defaultGeneratedOutputDir,"config.json"));if(isCantParseJSONFile(defaultGeneratedConfig))throw defaultGeneratedConfig;generatedConfigs.push(defaultGeneratedConfig)}let generatedServicesConfig=getGeneratedServicesConfig([...generatedConfigs,...buildResults.values()]),generatedExperimentalServicesV1Config=getGeneratedExperimentalServicesV1Config([...generatedConfigs,...buildResults.values()]);if(generatedServicesConfig||generatedExperimentalServicesV1Config){generatedServicesConfig&&(nestExperimentalServicesV2Output=!0),detectedExperimentalServicesV1Config=generatedExperimentalServicesV1Config,detectedExperimentalServicesV2Config=generatedServicesConfig;let generatedRootRoutesConfig=generatedServicesConfig?generatedConfigs.find(config2=>(hasGeneratedServicesConfig(config2)||hasNonEmptyObject(config2?.experimentalServicesV2))&&Array.isArray(config2?.routes)):void 0;generatedRootRoutesConfig?.routes&&(generatedRootRoutes??=generatedRootRoutesConfig.routes);let generatedBuilders=await span.child("vc.detectGeneratedServices").trace(()=>(0,import_detect_builders_with_services.detectBuildersWithServices)(files,pkg,{...localConfig,reservedFunctionFiles,...generatedServicesConfig?{services:generatedServicesConfig,experimentalServicesV2:void 0}:{experimentalServicesV2:void 0,experimentalServices:generatedExperimentalServicesV1Config},projectSettings,ignoreBuildScript:!0,featHandleMiss:!0,workPath}));if(generatedBuilders.errors&&generatedBuilders.errors.length>0)throw generatedBuilders.errors[0];for(let w of generatedBuilders.warnings)output.warn(w.message,null,w.link,w.action||"Learn More");if(detectedResolvedServices=generatedBuilders.services,!detectedResolvedServices||detectedResolvedServices.length===0?(detectedResolvedServices=void 0,detectedServices=void 0):(detectedServices=detectedResolvedServices.filter(import_build_utils3.isExperimentalService),detectedServices.length>0&&appendExperimentalServicesV1Routes(detectedServices)),detectedServices&&detectedServices.length>0&&generatedBuilders.useImplicitEnvInjection){let serviceUrlEnvVars=(0,import_build_utils3.getExperimentalServiceUrlEnvVars)({services:detectedServices,frameworkList:import_frameworks.frameworkList,currentEnv:process.env,deploymentUrl:process.env.VERCEL_URL});for(let[key,value]of Object.entries(serviceUrlEnvVars))process.env[key]=value,output.debug(`Injected service URL env var: ${key}=${value}`)}let buildsToRun=[],seenBuildsToRun=new Set,recordedServices=[];for(let service of detectedResolvedServices||[]){let alreadyExecutedBuild=getAlreadyExecutedBuild(service.builder);if(alreadyExecutedBuild){if(generatedServicesConfig){output.warn(getGeneratedServiceAlreadyBuiltWarning(service));continue}serviceByBuilder.set(alreadyExecutedBuild,service),recordedServices.push(service);continue}let serviceBuilderIdentity=getBuilderIdentity(service.builder);serviceBuilderIdentity&&!seenBuildsToRun.has(serviceBuilderIdentity)&&(serviceByBuilder.set(service.builder,service),seenBuildsToRun.add(serviceBuilderIdentity),buildsToRun.push(service.builder)),recordedServices.push(service)}servicesToRecord=recordedServices.length>0?recordedServices:void 0,buildsToRun.length>0&&await runBuilders(buildsToRun)}}preDeployEntries.sort((a,b)=>a.ordinal-b.ordinal);for(let entry of preDeployEntries)entry.callback?await entry.callback():output.warn(`Service "${entry.service}" has a preDeployCommand but its builder does not support it. The command was not executed.`)}finally{let settled=await Promise.all(ops.splice(0));for(let err of settled)err&&ops.push(Promise.resolve(err));for(let runner of liveRunners)try{runner.teardown()}catch(err){output.debug(`Runner teardown failed: ${err instanceof Error?err.message:String(err)}`)}}sortBuildResultsByOrdinal();function getBuildOutputPaths(build,result){if(!("output"in result)||!result.output)return[];let{output:output2}=result;return Array.isArray(output2)?[]:(0,import_write_build_result3.isLambda)(output2)||(0,import_write_build_result3.isEdgeFunction)(output2)?serviceByBuilder.has(build)||typeof build.src!="string"?[]:[(0,import_write_build_result3.getV3OutputPath)(build)]:Object.keys(output2)}let claimedScheduleOutputPaths=new Set(scheduleEntrypointOutputPaths.values());for(let[build,result]of buildResults){if(scheduleEntrypointBuilds.has(build))continue;let conflictingOutputPath=getBuildOutputPaths(build,result).find(outputPath=>claimedScheduleOutputPaths.has(outputPath));if(conflictingOutputPath)throw new import_build_utils3.NowBuildError({code:"SCHEDULE_FUNCTION_OUTPUT_COLLISION",message:`Schedule function output "${conflictingOutputPath}" conflicts with another build output. Move the conflicting function out of the reserved "_vercel/schedules" namespace.`})}packageManifests.sort((a,b)=>a.ordinal-b.ordinal),await(0,import_manifest.writeManifests)(packageManifests,diagnostics,ops,outputDir),corepackShimDir&&(0,import_corepack.cleanupCorepack)(corepackShimDir);let collectSpan=span.child("vc.finalizeBuildOutput");await flushOps();let needBuildsJsonOverride=!1,speedInsightsVersion=await(0,import_build_utils3.getInstalledPackageVersion)("@vercel/speed-insights");speedInsightsVersion&&(buildsJson.features={...buildsJson.features??{},speedInsightsVersion},needBuildsJsonOverride=!0);let webAnalyticsVersion=await(0,import_build_utils3.getInstalledPackageVersion)("@vercel/analytics");webAnalyticsVersion&&(buildsJson.features={...buildsJson.features??{},webAnalyticsVersion},needBuildsJsonOverride=!0),needBuildsJsonOverride&&await writeBuildJson(buildsJson,outputDir);let configPath=(0,import_path2.join)(outputDir,"config.json"),existingConfig=await readJSONFile2(configPath);if(isCantParseJSONFile(existingConfig))throw existingConfig;if(existingConfig){if("deploymentId"in existingConfig&&typeof existingConfig.deploymentId=="string"){let deploymentId=existingConfig.deploymentId;if(deploymentId.length>32)throw new import_build_utils3.NowBuildError({code:"INVALID_DEPLOYMENT_ID",message:`The deploymentId "${deploymentId}" must be 32 characters or less. Please choose a shorter deploymentId in your config.`,link:"https://vercel.com/docs/skew-protection#custom-skew-protection-deployment-id"});if(!VALID_DEPLOYMENT_ID_PATTERN.test(deploymentId))throw new import_build_utils3.NowBuildError({code:"INVALID_DEPLOYMENT_ID",message:`The deploymentId "${deploymentId}" contains invalid characters. Only alphanumeric characters (a-z, A-Z, 0-9), hyphens (-), and underscores (_) are allowed.`,link:"https://vercel.com/docs/skew-protection#custom-skew-protection-deployment-id"})}existingConfig.overrides&&!nestExperimentalServicesV2Output&&overrides.push({ordinal:Number.MAX_SAFE_INTEGER,override:existingConfig.overrides})}let topLevelBuildResults=nestExperimentalServicesV2Output?new Map(Array.from(buildResults.entries()).filter(([build])=>!serviceByBuilder.has(build))):buildResults,builderRoutes=Array.from(topLevelBuildResults.entries()).filter(b=>"routes"in b[1]&&Array.isArray(b[1].routes)).map(b=>{let build=b[0],buildResult=b[1],entrypoint=build.src;if(getHasDetectedServices()&&typeof build.src=="string"){let service=serviceByBuilder.get(build);service&&(0,import_build_utils3.isExperimentalService)(service)&&service.type==="web"&&typeof service.routePrefix=="string"&&(entrypoint=getServicesMergeEntrypoint(service,build.src))}return{use:build.use,entrypoint,routes:buildResult.routes,projectMiddleware:build.config?.middleware===!0}});zeroConfigRoutes.length&&builderRoutes.unshift({use:"@vercel/zero-config-routes",entrypoint:"/",routes:zeroConfigRoutes});let mergedRoutes=(0,import_routing_utils.mergeRoutes)({userRoutes:routesResult.routes,builds:builderRoutes});zeroConfigFallbackRoutes.length&&(mergedRoutes=(0,import_routing_utils.appendRoutesToPhase)({routes:mergedRoutes,newRoutes:zeroConfigFallbackRoutes,phase:"filesystem"}));let mergedImages=mergeImages(localConfig.images,topLevelBuildResults.values()),orderedServiceCrons=synthesizedServiceCrons.slice().sort((a,b)=>a.ordinal-b.ordinal).map(entry=>entry.cron),mergedCrons=mergeCrons([...localConfig.crons||[],...orderedServiceCrons],buildResults.values()),mergedWildcard=mergeWildcard(topLevelBuildResults.values()),mergedDeploymentId=await mergeDeploymentId(existingConfig?.deploymentId,topLevelBuildResults.values(),workPath,readJSONFile2,isCantParseJSONFile);if(mergedDeploymentId){if(mergedDeploymentId.length>32)throw new import_build_utils3.NowBuildError({code:"INVALID_DEPLOYMENT_ID",message:`The deploymentId "${mergedDeploymentId}" must be 32 characters or less. Please choose a shorter deploymentId in your config.`,link:"https://vercel.com/docs/skew-protection#custom-skew-protection-deployment-id"});if(!VALID_DEPLOYMENT_ID_PATTERN.test(mergedDeploymentId))throw new import_build_utils3.NowBuildError({code:"INVALID_DEPLOYMENT_ID",message:`The deploymentId "${mergedDeploymentId}" contains invalid characters. Only alphanumeric characters (a-z, A-Z, 0-9), hyphens (-), and underscores (_) are allowed.`,link:"https://vercel.com/docs/skew-protection#custom-skew-protection-deployment-id"})}let topLevelBuildResultOverrides=Array.from(topLevelBuildResults.values()).map(result=>"overrides"in result?result.overrides:void 0).filter(value=>!!value),orderedOverrides=overrides.slice().sort((a,b)=>a.ordinal-b.ordinal).map(entry=>entry.override),mergedOverrides=overrides.length>0||topLevelBuildResultOverrides.length>0?Object.assign({},...orderedOverrides,...topLevelBuildResultOverrides):void 0,framework=topLevelBuildResults.size>0?await getFramework(workPath,topLevelBuildResults):void 0,rootRoutesToAppend=Array.from(topLevelBuildResults.values()).some(result=>(hasGeneratedServicesConfig(result)||"experimentalServicesV2"in result&&hasNonEmptyObject(result.experimentalServicesV2))&&"routes"in result&&Array.isArray(result.routes))?void 0:generatedRootRoutes??existingConfig?.routes,explicitRootRoutes=appendBuildOutputRouteTables(routesResult.routes,rootRoutesToAppend),mergedRoutesWithGeneratedServicesV2Routes=nestExperimentalServicesV2Output?appendBuildOutputRouteTables(mergedRoutes,rootRoutesToAppend):mergedRoutes,resolvedSchedules=localConfig.schedules?.map(schedule=>{if(!hasScheduleEntrypointTarget(schedule))return schedule;let functionPath=scheduleEntrypointOutputPaths.get(schedule.target.entrypoint);if(!functionPath)throw new Error(`Missing build output for schedule entrypoint "${schedule.target.entrypoint}"`);return{...schedule,target:{function:functionPath}}}),config={version:3,routes:mergedRoutesWithGeneratedServicesV2Routes??explicitRootRoutes,afterCacheBypass:mergeAfterCacheBypass(topLevelBuildResults.values())??existingConfig?.afterCacheBypass,images:mergedImages,wildcard:mergedWildcard,overrides:mergedOverrides,framework,crons:mergedCrons,...resolvedSchedules&&resolvedSchedules.length>0&&{schedules:resolvedSchedules},...detectedExperimentalServicesV1Config&&Object.keys(detectedExperimentalServicesV1Config).length>0&&{experimentalServices:detectedExperimentalServicesV1Config},...detectedExperimentalServicesV2Config&&Object.keys(detectedExperimentalServicesV2Config).length>0&&{experimentalServicesV2:detectedExperimentalServicesV2Config},...!detectedExperimentalServicesV1Config&&servicesToRecord&&servicesToRecord.length>0&&{services:servicesToRecord},...mergedDeploymentId&&{deploymentId:mergedDeploymentId}};return await import_fs_extra2.default.writeJSON((0,import_path2.join)(outputDir,"config.json"),config,{spaces:2}),nestExperimentalServicesV2Output&&await writeServiceConfigs(outputDir,buildResults,serviceByBuilder,serviceFileOverrides,detectedExperimentalServicesV2Config,readJSONFile2,isCantParseJSONFile),await writeFlagsJSON(buildResults.values(),outputDir,output),await span.child("vc.frameworkCrossCheck").trace(async s=>{let detectedFrameworks=await detectedFrameworksPromise,executedBuilders=Array.from(buildResults.keys()),usedBuilders=executedBuilders.map(b=>b.use).filter(use=>!!use),mismatchResult=(0,import_framework_detection.warnIfFrameworkMismatch)({configuredFramework:projectSettings.framework,detectedFrameworks,usedBuilders,usedFrameworks:executedBuilders.map(b=>b.config?.framework)},output);s.setAttributes({result:mismatchResult,configuredFramework:projectSettings.framework??void 0,detectedFrameworks:detectedFrameworks.join(",")||void 0,usedBuilders:usedBuilders.join(",")||void 0})}),await span.child("vc.validateBuildOutput").trace(async s=>{let outputProblems=await(0,import_validate_build_output.validateBuildOutput)(outputDir,output);s.setAttributes({problemCount:String(outputProblems.length),problems:outputProblems.map(p=>`${p.severity}: ${p.message}`).join("; ")||void 0}),(0,import_validate_build_output.reportBuildOutputProblems)(outputProblems,output)}),collectSpan.stop(),{buildDuration:buildStamp()}}async function getFramework(cwd,buildResults){let detectedFramework=await(0,import_fs_detectors.detectFrameworkRecord)({fs:new import_fs_detectors.LocalFileSystemDetector(cwd),frameworkList:import_frameworks.frameworkList});if(!detectedFramework){for(let buildResult of buildResults.values())if("framework"in buildResult&&buildResult.framework)return{slug:buildResult.framework.slug,version:buildResult.framework.version};return}if(detectedFramework.useRuntime){for(let[build,buildResult]of buildResults.entries())if("framework"in buildResult&&build.use===detectedFramework.useRuntime.use)return buildResult.framework?{slug:buildResult.framework.slug,version:buildResult.framework.version}:void 0}if(detectedFramework.slug){if(detectedFramework.detectedVersion&&import_semver.default.valid(detectedFramework.detectedVersion))return{slug:detectedFramework.slug,version:detectedFramework.detectedVersion};let frameworkVersion=(0,import_fs_detectors.detectFrameworkVersion)(detectedFramework);if(frameworkVersion)return{slug:detectedFramework.slug,version:frameworkVersion}}}function expandBuild(files,build){if(!build.use)throw new import_build_utils3.NowBuildError({code:"invalid_build_specification",message:"Field `use` is missing in build specification",link:"https://vercel.com/docs/concepts/projects/project-configuration#builds",action:"View Documentation"});let src=(0,import_path2.normalize)(build.src||"**").split(import_path2.sep).join("/");if(src==="."||src==="./")throw new import_build_utils3.NowBuildError({code:"invalid_build_specification",message:"A build `src` path resolves to an empty string",link:"https://vercel.com/docs/concepts/projects/project-configuration#builds",action:"View Documentation"});return src[0]==="/"&&(src=src.substring(1)),files.filter(name=>name===src||(0,import_minimatch2.default)(name,src,{dot:!0})).map(m=>({...build,src:m}))}function mergeImages(images,buildResults){for(let result of buildResults)"images"in result&&result.images&&(images=Object.assign({},images,result.images));return images}function mergeCrons(crons=[],buildResults){for(let result of buildResults)"crons"in result&&result.crons&&(crons=crons.concat(result.crons));return crons}function mergeWildcard(buildResults){let wildcard;for(let result of buildResults)"wildcard"in result&&result.wildcard&&(wildcard||(wildcard=[]),wildcard.push(...result.wildcard));return wildcard}function mergeAfterCacheBypass(buildResults){let rules;for(let result of buildResults)"afterCacheBypass"in result&&result.afterCacheBypass&&(rules=(rules??[]).concat(result.afterCacheBypass));return rules}function appendBuildOutputRouteTables(...routeTables){let routes=[];for(let routeTable of routeTables){if(!Array.isArray(routeTable)||routeTable.length===0)continue;let phase=null,phaseRoutes=[],flushPhase=()=>{phaseRoutes.length!==0&&(routes=(0,import_routing_utils.appendRoutesToPhase)({routes,newRoutes:phaseRoutes,phase}),phaseRoutes=[])};for(let route of routeTable)(0,import_routing_utils.isHandler)(route)?(flushPhase(),phase=route.handle):phaseRoutes.push(route);flushPhase()}return routes.length>0?routes:void 0}function prependMissingBuildOutputRoutes(routesToPrepend,existingRoutes){if(!Array.isArray(routesToPrepend)||routesToPrepend.length===0)return existingRoutes;let existingRouteKeys=new Set((existingRoutes??[]).map(route=>JSON.stringify(route))),missingRoutes=routesToPrepend.filter(route=>!existingRouteKeys.has(JSON.stringify(route)));return appendBuildOutputRouteTables(missingRoutes,existingRoutes)}async function writeServiceConfigs(outputDir,buildResults,serviceByBuilder,serviceFileOverrides,experimentalServicesV2,readJSONFile2,isCantParseJSONFile){let serviceResults=new Map,serviceOverrides=new Map;for(let[build,buildResult]of buildResults){let service=serviceByBuilder.get(build);if(!service)continue;let results=serviceResults.get(service.name)||[];results.push(buildResult),serviceResults.set(service.name,results);let fileOverrides=serviceFileOverrides.get(build);if(fileOverrides){let overrides=serviceOverrides.get(service.name)||[];overrides.push(fileOverrides),serviceOverrides.set(service.name,overrides)}}await Promise.all(Array.from(serviceResults.entries()).map(async([serviceName,results])=>{let configPath=(0,import_path2.join)(outputDir,"services",serviceName,"config.json"),existingConfig=await readJSONFile2(configPath);if(isCantParseJSONFile(existingConfig))throw existingConfig;let routes=results.flatMap(result=>"routes"in result&&Array.isArray(result.routes)?result.routes:[]),existingRoutes=routes.length>0?void 0:existingConfig?.routes,existingCrons=results.some(result=>"crons"in result&&result.crons?.length)?void 0:existingConfig?.crons,configuredRoutes=experimentalServicesV2?.[serviceName]?getExperimentalServicesV2Routes(experimentalServicesV2[serviceName]):[],overrides=[...results.map(result=>"overrides"in result?result.overrides:void 0).filter(value=>!!value),...serviceOverrides.get(serviceName)||[]],framework=results.find(result=>"framework"in result&&!!result.framework)?.framework,mergedRoutes=appendBuildOutputRouteTables(configuredRoutes,routes,existingRoutes),config={...existingConfig,version:3,routes:mergedRoutes,afterCacheBypass:mergeAfterCacheBypass(results)??existingConfig?.afterCacheBypass,images:mergeImages(existingConfig?.images,results),wildcard:mergeWildcard(results)||existingConfig?.wildcard,overrides:overrides.length>0?Object.assign({},existingConfig?.overrides,...overrides):existingConfig?.overrides,framework:framework||existingConfig?.framework,crons:mergeCrons(existingCrons,results),services:void 0,experimentalServices:void 0,experimentalServicesV2:void 0};await import_fs_extra2.default.writeJSON(configPath,config,{spaces:2})}))}function getExperimentalServicesV2Routes(serviceConfig){let routesResult=(0,import_routing_utils.getTransformedRoutes)({routes:serviceConfig.routes,cleanUrls:serviceConfig.cleanUrls,trailingSlash:serviceConfig.trailingSlash,headers:serviceConfig.headers,redirects:serviceConfig.redirects,rewrites:serviceConfig.rewrites});if(routesResult.error)throw routesResult.error;return routesResult.routes??[]}function getGeneratedExperimentalServicesV1Config(buildResults){for(let result of buildResults)if(result&&"experimentalServices"in result&&hasNonEmptyObject(result.experimentalServices))return result.experimentalServices}function hasGeneratedServicesConfig(result){return result!=null&&"services"in result&&hasNonEmptyObject(result.services)}function getGeneratedServicesConfig(buildResults){for(let result of buildResults){if(hasGeneratedServicesConfig(result))return result.services;if(result&&"experimentalServicesV2"in result&&hasNonEmptyObject(result.experimentalServicesV2))return result.experimentalServicesV2}}async function mergeDeploymentId(existingDeploymentId,buildResults,workPath,readJSONFile2,isCantParseJSONFile){if(existingDeploymentId)return existingDeploymentId;for(let result of buildResults)if("deploymentId"in result&&result.deploymentId)return result.deploymentId;try{let routesManifestPath=(0,import_path2.join)(workPath,".next","routes-manifest.json");if(await import_fs_extra2.default.pathExists(routesManifestPath)){let routesManifest=await readJSONFile2(routesManifestPath);if(routesManifest&&!isCantParseJSONFile(routesManifest)&&routesManifest.deploymentId)return routesManifest.deploymentId}}catch{}}async function writeFlagsJSON(buildResults,outputDir,output){let flagsFilePath=(0,import_path2.join)(outputDir,"flags.json"),hasFlags=!0,flags=await import_fs_extra2.default.readJSON(flagsFilePath).catch(error=>{if(error.code==="ENOENT")return hasFlags=!1,{definitions:{}};throw error});for(let result of buildResults)if(!(!("flags"in result)||!result.flags||!result.flags.definitions))for(let[key,definition]of Object.entries(result.flags.definitions)){if(result.flags.definitions[key]){output.warn(`The flag "${key}" was found multiple times. Only its first occurrence will be considered.`);continue}hasFlags=!0,flags.definitions[key]=definition}hasFlags&&await import_fs_extra2.default.writeJSON(flagsFilePath,flags,{spaces:2})}function createApiDirFrameworkDetector(detectAllFrameworks2){let cache=new Map;return{detect(builderUse,workPath){let cacheKey=`${builderUse}:${workPath}`,cached=cache.get(cacheKey);return cached||(cached=detectApiDirFramework(builderUse,workPath,detectAllFrameworks2),cache.set(cacheKey,cached)),cached}}}async function detectApiDirFramework(builderUse,workPath,detectAllFrameworks2){let runtimeFrameworks=import_fs_detectors.builderToFrameworks.get(builderUse)??[];if(runtimeFrameworks.length===0)return;let detectedSlugs=await detectAllFrameworks2(workPath,runtimeFrameworks).catch(()=>[]);return detectedSlugs.length===1?detectedSlugs[0]:void 0}async function writeBuildJson(buildsJson,outputDir){await import_fs_extra2.default.writeJSON((0,import_path2.join)(outputDir,"builds.json"),buildsJson,{spaces:2})}function normalizeServiceRoutePrefix(routePrefix){let prefix=routePrefix.startsWith("/")?routePrefix:`/${routePrefix}`;return prefix!=="/"&&prefix.endsWith("/")&&(prefix=prefix.slice(0,-1)),prefix}function getServicesMergeEntrypoint(service,buildSrc){let routePrefix=typeof service.routePrefix=="string"?service.routePrefix:"/",normalized=normalizeServiceRoutePrefix(routePrefix);return`svc:${String(1e4-normalized.length).padStart(5,"0")}:${normalized}:${service.name}:${buildSrc}`}function attachQueueServiceTrigger(buildOutput,service){let topics=(0,import_build_utils3.getServiceQueueTopicConfigs)(service),consumer=(0,import_build_utils3.sanitizeConsumerName)((0,import_build_utils3.getInternalServiceFunctionPath)(service.name));if(service.builder.use!=="@vercel/python"&&topics.length>1)throw new Error(`Worker service "${service.name}" has ${topics.length} topics, but multiple topics are only supported for Python workers.`);for(let topicConfig of topics){let trigger={type:"queue/v2beta",topic:topicConfig.topic,consumer};if(topicConfig.retryAfterSeconds!==void 0&&(trigger.retryAfterSeconds=topicConfig.retryAfterSeconds),topicConfig.initialDelaySeconds!==void 0&&(trigger.initialDelaySeconds=topicConfig.initialDelaySeconds),(0,import_write_build_result3.isLambda)(buildOutput))appendTrigger(buildOutput,trigger);else for(let output of Object.values(buildOutput))(0,import_write_build_result3.isLambda)(output)&&appendTrigger(output,trigger)}}function triggerMatches(trigger,existingTrigger){return trigger.type==="schedule/v1beta"?trigger.type===existingTrigger.type:trigger.type===existingTrigger.type&&trigger.topic===existingTrigger.topic&&trigger.consumer===existingTrigger.consumer}function appendTrigger(lambda,trigger){let existingTriggers=Array.isArray(lambda.experimentalTriggers)?lambda.experimentalTriggers:[];existingTriggers.some(existing=>triggerMatches(trigger,existing))||(lambda.experimentalTriggers=[...existingTriggers,trigger])}async function streamToString(stream){let chunks=[];for await(let chunk of stream){let buffer=Buffer.isBuffer(chunk)?chunk:Buffer.from(chunk);chunks.push(Uint8Array.from(buffer))}return Buffer.concat(chunks).toString("utf-8")}}});var require_dist5=__commonJS({"../../internals/cli-builder-integration/dist/index.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),src_exports={};__export(src_exports,{BuildRunner:()=>import_build_runner2.BuildRunner,InprocessBuildRunner:()=>import_build_runner2.InprocessBuildRunner,doBuild:()=>import_do_build.doBuild,executeBuilder:()=>import_execute_builder.executeBuilder,sortBuildsForExecution:()=>import_execute_builder.sortBuildsForExecution});module.exports=__toCommonJS(src_exports);var import_build_runner2=require_build_runner(),import_execute_builder=require_execute_builder(),import_do_build=require_do_build()}});var import_chalk=__toESM(require_source(),1),import_dotenv=__toESM(require_main(),1),import_fs_extra=__toESM(require_lib(),1),import_build_utils2=__toESM(require_build_utils(),1);import{dirname as dirname2,join as join3,relative as relative2,resolve}from"path";import{readdirSync,statSync}from"fs";var import_cli_builder_integration=__toESM(require_dist5(),1);var import_build_utils=__toESM(require_build_utils(),1),import_build_runner=__toESM(require_build_runner(),1);import{fork}from"node:child_process";import{readFileSync,unlinkSync}from"node:fs";import{join}from"node:path";function toError(error){return error instanceof Error?error:Object.assign(new Error,error)}function mergeWorkerMeta(target,workerMeta){for(let[key,value]of Object.entries(workerMeta)){let existing=target[key];if(existing instanceof Set&&value instanceof Set)for(let entry of value)existing.add(entry);else existing===!0&&typeof value!="object"||(target[key]=value)}}function canBuildInSubprocess({hasDetectedServices,builderPath}){return hasDetectedServices&&!!builderPath}function rehydrateFile(obj){if(obj.type==="FileBlob"){let blob=Object.assign(Object.create(import_build_utils.FileBlob.prototype),obj);if(obj.dataPath){blob.data=readFileSync(obj.dataPath);try{unlinkSync(obj.dataPath)}catch{}delete blob.dataPath}return blob}return obj.type==="FileRef"?Object.assign(Object.create(import_build_utils.FileRef.prototype),obj):Object.assign(Object.create(import_build_utils.FileFsRef.prototype),obj)}function rehydrateFiles(files){if(files)for(let name of Object.keys(files))files[name]=rehydrateFile(files[name])}function rehydrateDiagnostics(diagnostics){let result={};for(let[name,file]of Object.entries(diagnostics))result[name]=rehydrateFile(file);return result}function rehydrateOutput(output,seen){if(!output||typeof output!="object"||seen.has(output))return;seen.add(output);let obj=output;if(obj.type==="Lambda")rehydrateFiles(obj.files),Object.setPrototypeOf(obj,import_build_utils.Lambda.prototype);else if(obj.type==="EdgeFunction")rehydrateFiles(obj.files);else if(obj.type==="Prerender")obj.lambda&&rehydrateOutput(obj.lambda,seen),obj.fallback&&rehydrateOutput(obj.fallback,seen);else if(obj.type==="FileFsRef"||obj.type==="FileBlob"||obj.type==="FileRef"){let rehydrated=rehydrateFile(obj);Object.assign(obj,rehydrated),Object.setPrototypeOf(obj,Object.getPrototypeOf(rehydrated))}}function rehydrateResult(result,outputVersion){let output=(result&&"resultVersion"in result?result.result:result).output;if(!output)return;let seen=new Set;if(outputVersion===3)rehydrateOutput(output,seen);else for(let value of Object.values(output))rehydrateOutput(value,seen)}function createServiceLinePrefixer(serviceName,dest){let tag=`[vc:service:${serviceName}] `,pending="";return{onData(chunk){pending+=chunk;let newlineIndex=pending.lastIndexOf(`
|
|
8
8
|
`);if(newlineIndex===-1)return;let complete=pending.slice(0,newlineIndex+1);pending=pending.slice(newlineIndex+1);let tagged=complete.split(`
|
|
9
9
|
`).slice(0,-1).map(line=>`${tag}${line}`).join(`
|
|
10
10
|
`);dest.write(`${tagged}
|