@highstate/designer 0.19.1 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +3 -3
- package/.output/public/_nuxt/57B6Rca8.js +1 -0
- package/.output/public/_nuxt/5X7smno1.js +1 -0
- package/.output/public/_nuxt/{Cp2bjttb.js → 83L43bj1.js} +1 -1
- package/.output/public/_nuxt/8MSfy8uY.js +1 -0
- package/.output/public/_nuxt/9I37tBe7.js +1 -0
- package/.output/public/_nuxt/Aopv2gwH.js +1 -0
- package/.output/public/_nuxt/B13uiJCv.js +1 -0
- package/.output/public/_nuxt/B7c-h3xW.js +1 -0
- package/.output/public/_nuxt/B8nw2aST.js +2 -0
- package/.output/public/_nuxt/{1DNp92w6.js → B93PlW-d.js} +1 -1
- package/.output/public/_nuxt/BA0jw7CM.js +1 -0
- package/.output/public/_nuxt/BBf5iR-q.js +1 -0
- package/.output/public/_nuxt/BCVaR2pQ.js +1 -0
- package/.output/public/_nuxt/BDAHnC4j.js +1 -0
- package/.output/public/_nuxt/BDa1f6PF.js +2 -0
- package/.output/public/_nuxt/{YB_1Ta41.js → BDs6uo3D.js} +1 -1
- package/.output/public/_nuxt/BEEt8Am7.js +1 -0
- package/.output/public/_nuxt/BE_Meo09.js +269 -0
- package/.output/public/_nuxt/BGHnOYBU.js +1 -0
- package/.output/public/_nuxt/BH7IYjvW.js +1 -0
- package/.output/public/_nuxt/BJDFO7_C.js +1 -0
- package/.output/public/_nuxt/BJK6uMxG.js +1 -0
- package/.output/public/_nuxt/BLF3u89x.js +1 -0
- package/.output/public/_nuxt/{Xi2tawMN.js → BLmx8bSh.js} +1 -1
- package/.output/public/_nuxt/{DlfHMoPT.js → BPQ3VLAy.js} +1 -1
- package/.output/public/_nuxt/BPcwi1q2.js +1 -0
- package/.output/public/_nuxt/{BBGuKPBd.js → BR5kRUq4.js} +1 -1
- package/.output/public/_nuxt/BTifaqeh.js +1 -0
- package/.output/public/_nuxt/BUNf2Yb8.js +1 -0
- package/.output/public/_nuxt/BUw7H-hv.js +1 -0
- package/.output/public/_nuxt/{DRprw4p4.js → BVQ-GDCI.js} +1 -1
- package/.output/public/_nuxt/{BbQj0Z2C.js → BYV0-3_D.js} +1 -1
- package/.output/public/_nuxt/BZvkOJ9d.js +1 -0
- package/.output/public/_nuxt/Ba13S78F.js +1 -0
- package/.output/public/_nuxt/BcVCzyr7.js +1 -0
- package/.output/public/_nuxt/BhRPY-oY.js +1 -0
- package/.output/public/_nuxt/{uMbE6_td.js → Bhrxn6JZ.js} +1 -1
- package/.output/public/_nuxt/BkNNRtnm.js +1 -0
- package/.output/public/_nuxt/BlfjmxyP.js +1 -0
- package/.output/public/_nuxt/Bmn6On1c.js +1 -0
- package/.output/public/_nuxt/Bo8jzlL1.js +18 -0
- package/.output/public/_nuxt/BpkvlDNi.js +1 -0
- package/.output/public/_nuxt/{BIAuTxu3.js → Br6cN0cg.js} +1 -1
- package/.output/public/_nuxt/{CUEJCptM.js → BrzmwbiE.js} +1 -1
- package/.output/public/_nuxt/{D32k8WzR.js → BtvRca6l.js} +1 -1
- package/.output/public/_nuxt/BuJgCY_C.js +1 -0
- package/.output/public/_nuxt/Bv_4Rxtq.js +1 -0
- package/.output/public/_nuxt/BvzEVeQv.js +1 -0
- package/.output/public/_nuxt/BxAss8Tj.js +1 -0
- package/.output/public/_nuxt/BxaP9l2T.js +1 -0
- package/.output/public/_nuxt/BxgE0vQu.js +1 -0
- package/.output/public/_nuxt/ByBNG4eo.js +1 -0
- package/.output/public/_nuxt/{COI20M4I.js → BzTr9Aqm.js} +1 -1
- package/.output/public/_nuxt/{CXu1NL6O.js → C-HG3fhB.js} +1 -1
- package/.output/public/_nuxt/C-sUppwS.js +1 -0
- package/.output/public/_nuxt/C1FLL1Qz.js +1 -0
- package/.output/public/_nuxt/C3Wv6jpd.js +1 -0
- package/.output/public/_nuxt/C47S-Tmv.js +1 -0
- package/.output/public/_nuxt/C4EeE6gA.js +1 -0
- package/.output/public/_nuxt/{C-Jbm3Hp.js → C4gqWexZ.js} +1 -1
- package/.output/public/_nuxt/{DTMYz4Jt.js → C5YyOfLZ.js} +1 -1
- package/.output/public/_nuxt/C7zT0LnQ.js +1 -0
- package/.output/public/_nuxt/C8lm7lgC.js +1 -0
- package/.output/public/_nuxt/C9dUb6Cb.js +1 -0
- package/.output/public/_nuxt/{DS1LvVMU.js → C9oPPf7i.js} +1 -1
- package/.output/public/_nuxt/{D1uDOp7C.js → CFHQjOhq.js} +1 -1
- package/.output/public/_nuxt/{Dtc2v4kS.js → CGscLIrv.js} +1 -1
- package/.output/public/_nuxt/{DKzvysjW.js → CH1njM8p.js} +1 -1
- package/.output/public/_nuxt/CJWmG4YP.js +12 -0
- package/.output/public/_nuxt/CLZrNe3w.js +1 -0
- package/.output/public/_nuxt/CMTm3GFP.js +1 -0
- package/.output/public/_nuxt/CMjwMIkn.js +1 -0
- package/.output/public/_nuxt/COcwbKMJ.js +1 -0
- package/.output/public/_nuxt/CPZSvMBB.js +1 -0
- package/.output/public/_nuxt/CPpO8vcZ.js +1 -0
- package/.output/public/_nuxt/CQ8jqdy-.js +1 -0
- package/.output/public/_nuxt/CV5MeYf9.js +1 -0
- package/.output/public/_nuxt/{CcyOm34o.js → CVdnzihN.js} +1 -1
- package/.output/public/_nuxt/CW8IKDeL.js +1 -0
- package/.output/public/_nuxt/{pkIJ47B4.js → CXZktZb0.js} +1 -1
- package/.output/public/_nuxt/CYsAdtH9.js +1 -0
- package/.output/public/_nuxt/{BUyGWigt.js → CZhp0h8q.js} +1 -1
- package/.output/public/_nuxt/CaJ-zn_Z.js +2 -0
- package/.output/public/_nuxt/CcOKGYBt.js +1 -0
- package/.output/public/_nuxt/{oTG82Wo1.js → CenWIFCC.js} +1 -1
- package/.output/public/_nuxt/ChaZkl1J.js +1 -0
- package/.output/public/_nuxt/CjoLj4QM.js +1 -0
- package/.output/public/_nuxt/{BtsDLbAf.js → Cl0AqbOI.js} +1 -1
- package/.output/public/_nuxt/Cm-2nZ05.js +1 -0
- package/.output/public/_nuxt/{DUSGQflk.js → Cm3UrAx6.js} +1 -1
- package/.output/public/_nuxt/{BGHREFWD.js → CmIQRyeF.js} +1 -1
- package/.output/public/_nuxt/{f7oK2omx.js → Cn7AkR1O.js} +1 -1
- package/.output/public/_nuxt/{JhPuU2gP.js → CnnebwVN.js} +1 -1
- package/.output/public/_nuxt/CnsnAmq5.js +1 -0
- package/.output/public/_nuxt/CoDkCxhg.js +1 -0
- package/.output/public/_nuxt/{B-hkwWGT.js → CpOuai2O.js} +1 -1
- package/.output/public/_nuxt/CudFwYib.js +1 -0
- package/.output/public/_nuxt/{BDzgwa52.js → CufHLc7y.js} +1 -1
- package/.output/public/_nuxt/CwoSXNpI.js +1 -0
- package/.output/public/_nuxt/CxEW7TG8.js +1 -0
- package/.output/public/_nuxt/CxLEBnE3.js +1 -0
- package/.output/public/_nuxt/{DNrj_gVY.js → CxbxFI8M.js} +1 -1
- package/.output/public/_nuxt/CzSiA7V6.js +1 -0
- package/.output/public/_nuxt/D-wGZMZP.js +1 -0
- package/.output/public/_nuxt/D27ZAKIj.js +1 -0
- package/.output/public/_nuxt/D2aToa54.js +1 -0
- package/.output/public/_nuxt/D2obegTF.js +1 -0
- package/.output/public/_nuxt/{NleAzG8P.js → D4_iv3hh.js} +1 -1
- package/.output/public/_nuxt/D53aC0YG.js +1 -0
- package/.output/public/_nuxt/D5z-4QVk.js +1 -0
- package/.output/public/_nuxt/D6fh7rEe.js +2 -0
- package/.output/public/_nuxt/D87Tk5Gz.js +1 -0
- package/.output/public/_nuxt/D8_7TLub.js +1 -0
- package/.output/public/_nuxt/D91rOou-.js +13 -0
- package/.output/public/_nuxt/DCBCRx0O.js +1 -0
- package/.output/public/_nuxt/DCR009rv.js +1 -0
- package/.output/public/_nuxt/DCinzvm1.js +1 -0
- package/.output/public/_nuxt/DEthMvLe.js +1 -0
- package/.output/public/_nuxt/DFWUc33u.js +1 -0
- package/.output/public/_nuxt/{5bLW0GMw.js → DGP4VlC8.js} +1 -1
- package/.output/public/_nuxt/{CnK8MTSM.js → DHQR4-dF.js} +1 -1
- package/.output/public/_nuxt/DJN0y8jO.js +1 -0
- package/.output/public/_nuxt/DJjDtW9f.js +1 -0
- package/.output/public/_nuxt/DKhcu7kD.js +1 -0
- package/.output/public/_nuxt/DMwsHuHA.js +1 -0
- package/.output/public/_nuxt/{GAB5JH5K.js → DNqd6Nek.js} +1 -1
- package/.output/public/_nuxt/DOMRsNpU.js +1 -0
- package/.output/public/_nuxt/DOPqH6_T.js +1 -0
- package/.output/public/_nuxt/DQHHT9y-.js +1 -0
- package/.output/public/_nuxt/{B5ZR69Tn.js → DQwYQDb2.js} +1 -1
- package/.output/public/_nuxt/DQyhUUbL.js +1 -0
- package/.output/public/_nuxt/DRfxs3PN.js +1 -0
- package/.output/public/_nuxt/{DPcUKYIF.js → DRw_LuNl.js} +1 -1
- package/.output/public/_nuxt/DV7GczEv.js +1 -0
- package/.output/public/_nuxt/DWQRqdcR.js +1 -0
- package/.output/public/_nuxt/DWa2aw6r.js +1 -0
- package/.output/public/_nuxt/DYoxhk2S.js +1 -0
- package/.output/public/_nuxt/DZf3V79B.js +1 -0
- package/.output/public/_nuxt/{BPzJO5Oe.js → DZu-aV2c.js} +1 -1
- package/.output/public/_nuxt/Dbwml2gB.js +1 -0
- package/.output/public/_nuxt/DfvKjH24.js +1 -0
- package/.output/public/_nuxt/{Cdx7mHEO.js → DhmSosst.js} +1 -1
- package/.output/public/_nuxt/DiTMzCP2.js +1 -0
- package/.output/public/_nuxt/{CA7CTBwS.js → Dph4kLrZ.js} +1 -1
- package/.output/public/_nuxt/DqQDbK_p.js +1 -0
- package/.output/public/_nuxt/DsS90Fp6.js +1 -0
- package/.output/public/_nuxt/Dspwwk_N.js +1 -0
- package/.output/public/_nuxt/DsumFeuD.js +1 -0
- package/.output/public/_nuxt/DxERyYWQ.js +1 -0
- package/.output/public/_nuxt/{D7ScPSBf.js → DxNHbxmM.js} +1 -1
- package/.output/public/_nuxt/{CLvts2aQ.js → DxSwrfjg.js} +1 -1
- package/.output/public/_nuxt/{DcmvOc98.js → DyMmfYiE.js} +1 -1
- package/.output/public/_nuxt/DzWdbJvx.js +1 -0
- package/.output/public/_nuxt/{COEtLSDF.js → Dzze3sRP.js} +1 -1
- package/.output/public/_nuxt/G13IRnB2.js +1 -0
- package/.output/public/_nuxt/GDxZ_Nvm.js +14 -0
- package/.output/public/_nuxt/GgtqCdye.js +1 -0
- package/.output/public/_nuxt/{DkhsQLT2.js → GsRaNv29.js} +1 -1
- package/.output/public/_nuxt/IF9eRakj.js +1 -0
- package/.output/public/_nuxt/RCBWmVHz.js +1 -0
- package/.output/public/_nuxt/{Cb0HU5_O.js → RNghxpo_.js} +1 -1
- package/.output/public/_nuxt/{SecretValueField.DcyO8gGc.css → SecretValueField.Dy80RlGP.css} +1 -1
- package/.output/public/_nuxt/{B8ROHVmM.js → TsXTqZ29.js} +1 -1
- package/.output/public/_nuxt/VCDPK7BO.js +1 -0
- package/.output/public/_nuxt/{CU27uY9n.js → W9tJ9s81.js} +1 -1
- package/.output/public/_nuxt/{CmALWFRB.js → XEA9GSJd.js} +16 -468
- package/.output/public/_nuxt/{DeWFVDHI.js → YqXBG_HV.js} +1 -1
- package/.output/public/_nuxt/ZbicA1ry.js +1 -0
- package/.output/public/_nuxt/_snapshotId_.ChuSNeNY.css +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/a1fec520-0c95-4ae0-af5e-964780fad341.json +1 -0
- package/.output/public/_nuxt/d-NZQb9b.js +1 -0
- package/.output/public/_nuxt/edge-router-BdPMCV6u.js +1 -0
- package/.output/public/_nuxt/{entry.dxugZJXl.css → entry.Bc0aTA0K.css} +1 -1
- package/.output/public/_nuxt/error-404.X7H_YhdC.css +1 -0
- package/.output/public/_nuxt/error-500.BOQe1fsk.css +1 -0
- package/.output/public/_nuxt/f3TOpYbw.js +1 -0
- package/.output/public/_nuxt/{DrZfEa88.js → fKv21gyL.js} +1 -1
- package/.output/public/_nuxt/graph-layout-B7wl80r3.js +1 -0
- package/.output/public/_nuxt/graph-resolver-DKNtntr2.js +180 -0
- package/.output/public/_nuxt/{CGqH5EJj.js → hJgmCMqR.js} +1 -1
- package/.output/public/_nuxt/{BoKiGodi.js → k_qm7-4y.js} +1 -1
- package/.output/public/_nuxt/{IvJ92aGK.js → m17aaUwq.js} +1 -1
- package/.output/public/_nuxt/mUFnM-_q.js +1 -0
- package/.output/public/_nuxt/mWjccvbQ.js +1 -0
- package/.output/public/_nuxt/{BXY8tDGw.js → mjskCLCv.js} +1 -1
- package/.output/public/_nuxt/n0RAZLbO.js +1 -0
- package/.output/public/_nuxt/n2N0HUVH.js +1 -0
- package/.output/public/_nuxt/o_m1mZtJ.js +6 -0
- package/.output/public/_nuxt/pxXmJ8QX.js +1 -0
- package/.output/public/_nuxt/{BHrmToEH.js → qdsjHGoJ.js} +1 -1
- package/.output/public/_nuxt/{BbcW6ACK.js → rGO070M0.js} +1 -1
- package/.output/public/_nuxt/rcFevLEP.js +2 -0
- package/.output/public/_nuxt/rgN_MdZl.js +1 -0
- package/.output/public/_nuxt/tsyQDnRt.js +5 -0
- package/.output/public/_nuxt/u5AG7uiY.js +1 -0
- package/.output/public/_nuxt/uYugtg8r.js +1 -0
- package/.output/public/_nuxt/vuetify.BzdWZaIq.css +1 -0
- package/.output/public/_nuxt/{BMMyXqK5.js → wDzz0qaB.js} +1 -1
- package/.output/public/_nuxt/xA6NntuA.js +1 -0
- package/.output/public/_nuxt/xdsXwj_J.js +1 -0
- package/.output/public/_nuxt/xp27HhqZ.js +1 -0
- package/.output/public/_nuxt/xrNU8mHG.js +3 -0
- package/.output/public/_nuxt/yaml.worker-C1Cl1y5J.js +399 -0
- package/.output/public/_nuxt/ziXKbM2N.js +1 -0
- package/.output/public/libavoid.wasm +0 -0
- package/.output/server/index.mjs +2213 -6830
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/@babel/parser/lib/index.js +427 -440
- package/.output/server/node_modules/@babel/parser/package.json +6 -6
- package/.output/server/node_modules/@trpc/server/dist/adapters/fetch/index.mjs +4 -4
- package/.output/server/node_modules/@trpc/server/dist/adapters/ws.mjs +10 -10
- package/.output/server/node_modules/@trpc/server/dist/{utils-CLZnJdb_.mjs → codes-DagpWZLc.mjs} +66 -66
- package/.output/server/node_modules/@trpc/server/dist/{getErrorShape-BH60iMC2.mjs → getErrorShape-vC8mUXJD.mjs} +3 -3
- package/.output/server/node_modules/@trpc/server/dist/index.mjs +4 -4
- package/.output/server/node_modules/@trpc/server/dist/{initTRPC-CB9uBez5.mjs → initTRPC-RoZMIBeA.mjs} +4 -4
- package/.output/server/node_modules/@trpc/server/dist/{node-http-8dtdvMrE.mjs → node-http-DtA2iLK9.mjs} +7 -5
- package/.output/server/node_modules/@trpc/server/dist/{parseTRPCMessage-BlZeZ60t.mjs → parseTRPCMessage-CTow-umk.mjs} +2 -2
- package/.output/server/node_modules/@trpc/server/dist/{resolveResponse-DngSgha6.mjs → resolveResponse-BVDlNZwN.mjs} +45 -48
- package/.output/server/node_modules/@trpc/server/dist/{tracked-Blz8XOf1.mjs → tracked-Bjtgv3wJ.mjs} +11 -9
- package/.output/server/node_modules/@trpc/server/dist/{unstable-core-do-not-import-D89CaGtL.mjs → unstable-core-do-not-import-9NNw8uQM.mjs} +5 -3
- package/.output/server/node_modules/@trpc/server/dist/{ws-BR20IWki.mjs → ws-CJgZE7Hg.mjs} +60 -20
- package/.output/server/node_modules/@trpc/server/package.json +6 -6
- package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +128 -106
- package/.output/server/node_modules/@vue/compiler-core/package.json +5 -5
- package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +54 -54
- package/.output/server/node_modules/@vue/compiler-dom/package.json +3 -3
- package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +35 -33
- package/.output/server/node_modules/@vue/compiler-ssr/package.json +3 -3
- package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +105 -42
- package/.output/server/node_modules/@vue/reactivity/package.json +2 -2
- package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +2129 -2063
- package/.output/server/node_modules/@vue/runtime-core/package.json +3 -3
- package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +78 -31
- package/.output/server/node_modules/@vue/runtime-dom/package.json +5 -5
- package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +6 -6
- package/.output/server/node_modules/@vue/server-renderer/package.json +4 -4
- package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +1 -1
- package/.output/server/node_modules/@vue/shared/package.json +1 -1
- package/.output/server/node_modules/copy-anything/dist/index.js +47 -31
- package/.output/server/node_modules/copy-anything/package.json +19 -72
- package/.output/server/node_modules/devalue/index.js +1 -0
- package/.output/server/node_modules/devalue/package.json +2 -2
- package/.output/server/node_modules/devalue/src/constants.js +1 -0
- package/.output/server/node_modules/devalue/src/parse.js +55 -4
- package/.output/server/node_modules/devalue/src/stringify.js +101 -12
- package/.output/server/node_modules/devalue/src/uneval.js +100 -13
- package/.output/server/node_modules/devalue/src/utils.js +35 -1
- package/.output/server/node_modules/entities/{lib/decode_codepoint.js → dist/commonjs/decode-codepoint.js} +16 -15
- package/.output/server/node_modules/entities/{lib → dist/commonjs}/decode.js +200 -168
- package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
- package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
- package/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
- package/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
- package/.output/server/node_modules/entities/dist/commonjs/package.json +3 -0
- package/.output/server/node_modules/entities/package.json +99 -69
- package/.output/server/node_modules/hookable/dist/index.mjs +244 -268
- package/.output/server/node_modules/hookable/package.json +29 -26
- package/.output/server/node_modules/is-what/dist/getType.js +4 -0
- package/.output/server/node_modules/is-what/dist/index.js +43 -171
- package/.output/server/node_modules/is-what/dist/isAnyObject.js +8 -0
- package/.output/server/node_modules/is-what/dist/isArray.js +5 -0
- package/.output/server/node_modules/is-what/dist/isBigInt.js +5 -0
- package/.output/server/node_modules/is-what/dist/isBlob.js +5 -0
- package/.output/server/node_modules/is-what/dist/isBoolean.js +5 -0
- package/.output/server/node_modules/is-what/dist/isDate.js +5 -0
- package/.output/server/node_modules/is-what/dist/isEmptyArray.js +5 -0
- package/.output/server/node_modules/is-what/dist/isEmptyObject.js +8 -0
- package/.output/server/node_modules/is-what/dist/isEmptyString.js +4 -0
- package/.output/server/node_modules/is-what/dist/isError.js +5 -0
- package/.output/server/node_modules/is-what/dist/isFile.js +5 -0
- package/.output/server/node_modules/is-what/dist/isFullArray.js +5 -0
- package/.output/server/node_modules/is-what/dist/isFullObject.js +8 -0
- package/.output/server/node_modules/is-what/dist/isFullString.js +5 -0
- package/.output/server/node_modules/is-what/dist/isFunction.js +4 -0
- package/.output/server/node_modules/is-what/dist/isHexDecimal.js +12 -0
- package/.output/server/node_modules/is-what/dist/isInstanceOf.js +19 -0
- package/.output/server/node_modules/is-what/dist/isInteger.js +5 -0
- package/.output/server/node_modules/is-what/dist/isIterable.js +16 -0
- package/.output/server/node_modules/is-what/dist/isMap.js +5 -0
- package/.output/server/node_modules/is-what/dist/isNaNValue.js +5 -0
- package/.output/server/node_modules/is-what/dist/isNegativeInteger.js +5 -0
- package/.output/server/node_modules/is-what/dist/isNegativeNumber.js +5 -0
- package/.output/server/node_modules/is-what/dist/isNull.js +5 -0
- package/.output/server/node_modules/is-what/dist/isNullOrUndefined.js +5 -0
- package/.output/server/node_modules/is-what/dist/isNumber.js +9 -0
- package/.output/server/node_modules/is-what/dist/isObject.js +8 -0
- package/.output/server/node_modules/is-what/dist/isObjectLike.js +11 -0
- package/.output/server/node_modules/is-what/dist/isOneOf.js +15 -0
- package/.output/server/node_modules/is-what/dist/isPlainObject.js +11 -0
- package/.output/server/node_modules/is-what/dist/isPositiveInteger.js +5 -0
- package/.output/server/node_modules/is-what/dist/isPositiveNumber.js +5 -0
- package/.output/server/node_modules/is-what/dist/isPrimitive.js +21 -0
- package/.output/server/node_modules/is-what/dist/isPromise.js +5 -0
- package/.output/server/node_modules/is-what/dist/isRegExp.js +5 -0
- package/.output/server/node_modules/is-what/dist/isSet.js +5 -0
- package/.output/server/node_modules/is-what/dist/isString.js +5 -0
- package/.output/server/node_modules/is-what/dist/isSymbol.js +5 -0
- package/.output/server/node_modules/is-what/dist/isType.js +20 -0
- package/.output/server/node_modules/is-what/dist/isUndefined.js +5 -0
- package/.output/server/node_modules/is-what/dist/isWeakMap.js +5 -0
- package/.output/server/node_modules/is-what/dist/isWeakSet.js +5 -0
- package/.output/server/node_modules/is-what/package.json +23 -88
- package/.output/server/node_modules/superjson/dist/index.js +9 -6
- package/.output/server/node_modules/superjson/dist/pathstringifier.js +13 -2
- package/.output/server/node_modules/superjson/dist/plainer.js +23 -11
- package/.output/server/node_modules/superjson/dist/transformer.js +4 -1
- package/.output/server/node_modules/superjson/package.json +5 -21
- package/.output/server/node_modules/ufo/dist/index.mjs +16 -9
- package/.output/server/node_modules/ufo/package.json +15 -14
- package/.output/server/node_modules/unhead/dist/plugins.mjs +2 -2
- package/.output/server/node_modules/unhead/dist/server.mjs +4 -6
- package/.output/server/node_modules/unhead/dist/shared/{unhead.DH45uomy.mjs → unhead.BFfcxOoW.mjs} +3 -3
- package/.output/server/node_modules/unhead/dist/shared/{unhead.DZbvapt-.mjs → unhead.CbpEuj3y.mjs} +3 -2
- package/.output/server/node_modules/unhead/dist/shared/{unhead.Djo8ep_Y.mjs → unhead.ckV6dpEQ.mjs} +1 -1
- package/.output/server/node_modules/unhead/dist/shared/{unhead.BpRRHAhY.mjs → unhead.eK9_7LaY.mjs} +16 -12
- package/.output/server/node_modules/unhead/dist/utils.mjs +2 -2
- package/.output/server/node_modules/unhead/package.json +2 -2
- package/.output/server/node_modules/vue/dist/vue.cjs.js +1 -1
- package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +1 -1
- package/.output/server/node_modules/vue/package.json +6 -6
- package/.output/server/node_modules/ws/lib/constants.js +1 -0
- package/.output/server/node_modules/ws/lib/websocket-server.js +5 -1
- package/.output/server/node_modules/ws/lib/websocket.js +13 -8
- package/.output/server/node_modules/ws/package.json +1 -1
- package/.output/server/node_modules/zod/package.json +1 -1
- package/.output/server/node_modules/zod/v4/classic/checks.js +1 -1
- package/.output/server/node_modules/zod/v4/classic/external.js +3 -1
- package/.output/server/node_modules/zod/v4/classic/from-json-schema.js +584 -0
- package/.output/server/node_modules/zod/v4/classic/schemas.js +121 -4
- package/.output/server/node_modules/zod/v4/core/api.js +157 -0
- package/.output/server/node_modules/zod/v4/core/checks.js +8 -2
- package/.output/server/node_modules/zod/v4/core/core.js +20 -11
- package/.output/server/node_modules/zod/v4/core/index.js +2 -0
- package/.output/server/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/.output/server/node_modules/zod/v4/core/json-schema-processors.js +605 -0
- package/.output/server/node_modules/zod/v4/core/regexes.js +8 -2
- package/.output/server/node_modules/zod/v4/core/registries.js +3 -4
- package/.output/server/node_modules/zod/v4/core/schemas.js +204 -66
- package/.output/server/node_modules/zod/v4/core/to-json-schema.js +391 -869
- package/.output/server/node_modules/zod/v4/core/util.js +58 -8
- package/.output/server/node_modules/zod/v4/core/versions.js +2 -2
- package/.output/server/node_modules/zod/v4/locales/ar.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/az.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/be.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/bg.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/ca.js +14 -25
- package/.output/server/node_modules/zod/v4/locales/cs.js +18 -42
- package/.output/server/node_modules/zod/v4/locales/da.js +23 -39
- package/.output/server/node_modules/zod/v4/locales/de.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/en.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/eo.js +17 -24
- package/.output/server/node_modules/zod/v4/locales/es.js +42 -59
- package/.output/server/node_modules/zod/v4/locales/fa.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/fi.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/fr-CA.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/fr.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/he.js +175 -78
- package/.output/server/node_modules/zod/v4/locales/hu.js +16 -25
- package/.output/server/node_modules/zod/v4/locales/hy.js +147 -0
- package/.output/server/node_modules/zod/v4/locales/id.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/index.js +2 -0
- package/.output/server/node_modules/zod/v4/locales/is.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/it.js +16 -25
- package/.output/server/node_modules/zod/v4/locales/ja.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/ka.js +19 -32
- package/.output/server/node_modules/zod/v4/locales/km.js +17 -24
- package/.output/server/node_modules/zod/v4/locales/ko.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/lt.js +27 -54
- package/.output/server/node_modules/zod/v4/locales/mk.js +16 -25
- package/.output/server/node_modules/zod/v4/locales/ms.js +15 -24
- package/.output/server/node_modules/zod/v4/locales/nl.js +25 -32
- package/.output/server/node_modules/zod/v4/locales/no.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/ota.js +17 -25
- package/.output/server/node_modules/zod/v4/locales/pl.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/ps.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/pt.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/ru.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/sl.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/sv.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/ta.js +17 -24
- package/.output/server/node_modules/zod/v4/locales/th.js +17 -24
- package/.output/server/node_modules/zod/v4/locales/tr.js +14 -24
- package/.output/server/node_modules/zod/v4/locales/uk.js +16 -25
- package/.output/server/node_modules/zod/v4/locales/ur.js +17 -24
- package/.output/server/node_modules/zod/v4/locales/uz.js +109 -0
- package/.output/server/node_modules/zod/v4/locales/vi.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/yo.js +16 -24
- package/.output/server/node_modules/zod/v4/locales/zh-CN.js +17 -24
- package/.output/server/node_modules/zod/v4/locales/zh-TW.js +14 -24
- package/.output/server/package.json +22 -22
- package/package.json +6 -6
- package/.output/public/_nuxt/-oaD50UK.js +0 -1
- package/.output/public/_nuxt/0ekw3e2V.js +0 -1
- package/.output/public/_nuxt/1f5tAgHw.js +0 -1
- package/.output/public/_nuxt/5ggY4uig.js +0 -1
- package/.output/public/_nuxt/6nHXG8SA.js +0 -1
- package/.output/public/_nuxt/9hmcqHPO.js +0 -1
- package/.output/public/_nuxt/BBxmzUt6.js +0 -1
- package/.output/public/_nuxt/BE2KfCdU.js +0 -1
- package/.output/public/_nuxt/BFNM2w_f.js +0 -1
- package/.output/public/_nuxt/BGLu70Yq.js +0 -1
- package/.output/public/_nuxt/BIuj43Wh.js +0 -1
- package/.output/public/_nuxt/BLsOQd1H.js +0 -280
- package/.output/public/_nuxt/BNGfscqk.js +0 -1
- package/.output/public/_nuxt/BQvybpQq.js +0 -1
- package/.output/public/_nuxt/BU7Cl-8B.js +0 -1
- package/.output/public/_nuxt/BUXOnL59.js +0 -1
- package/.output/public/_nuxt/Bbwybh3N.js +0 -2
- package/.output/public/_nuxt/BczD6j-v.js +0 -1
- package/.output/public/_nuxt/BepWV7mh.js +0 -1
- package/.output/public/_nuxt/Bh0qehhp.js +0 -1
- package/.output/public/_nuxt/Bl2oy6fF.js +0 -1
- package/.output/public/_nuxt/BmDdxTjo.js +0 -1
- package/.output/public/_nuxt/BqeRdtD4.js +0 -2
- package/.output/public/_nuxt/BvAqAH-y.js +0 -1
- package/.output/public/_nuxt/BxZD33h1.js +0 -1
- package/.output/public/_nuxt/C4zpeTvm.js +0 -1
- package/.output/public/_nuxt/C7Pw0Ztw.js +0 -1
- package/.output/public/_nuxt/C8-UwF3o.js +0 -1
- package/.output/public/_nuxt/CCd08HS_.js +0 -1
- package/.output/public/_nuxt/CEYFgC8B.js +0 -1
- package/.output/public/_nuxt/CHadp7IV.js +0 -1
- package/.output/public/_nuxt/CHh-QcGE.js +0 -1
- package/.output/public/_nuxt/CIUZ1G5V.js +0 -1
- package/.output/public/_nuxt/CJ6lOLXp.js +0 -1
- package/.output/public/_nuxt/CN9dMhDM.js +0 -1
- package/.output/public/_nuxt/CQ4fj8p0.js +0 -1
- package/.output/public/_nuxt/CTWiQX6C.js +0 -1
- package/.output/public/_nuxt/CXxzV4dz.js +0 -1
- package/.output/public/_nuxt/CZlF05X6.js +0 -1
- package/.output/public/_nuxt/CatV_12G.js +0 -1
- package/.output/public/_nuxt/CeMkeBDb.js +0 -1
- package/.output/public/_nuxt/CelvVQyk.js +0 -1
- package/.output/public/_nuxt/CfV455SO.js +0 -1
- package/.output/public/_nuxt/CfeIJUat.js +0 -1
- package/.output/public/_nuxt/CfqrF6sE.js +0 -1
- package/.output/public/_nuxt/Cfs9EX91.js +0 -1
- package/.output/public/_nuxt/ChH_ziBE.js +0 -1
- package/.output/public/_nuxt/ChM1GEGa.js +0 -1
- package/.output/public/_nuxt/Cu8OsqJL.js +0 -1
- package/.output/public/_nuxt/CusJppg0.js +0 -1
- package/.output/public/_nuxt/Cv9koXgw.js +0 -1
- package/.output/public/_nuxt/CvELRi2k.js +0 -5
- package/.output/public/_nuxt/Cw6nGM9K.js +0 -1
- package/.output/public/_nuxt/CwUT5n6w.js +0 -1
- package/.output/public/_nuxt/D-AHKB2i.js +0 -6
- package/.output/public/_nuxt/D-kcn2fr.js +0 -1
- package/.output/public/_nuxt/D08WgyRC.js +0 -1
- package/.output/public/_nuxt/D1Jbgd7O.js +0 -13
- package/.output/public/_nuxt/D1ibY74j.js +0 -1
- package/.output/public/_nuxt/D22FLkUw.js +0 -1
- package/.output/public/_nuxt/D2CYqzqI.js +0 -1
- package/.output/public/_nuxt/D34EmFco.js +0 -1
- package/.output/public/_nuxt/D4OhWExI.js +0 -1
- package/.output/public/_nuxt/DDHikT5j.js +0 -1
- package/.output/public/_nuxt/DDTT3lYc.js +0 -1
- package/.output/public/_nuxt/DHLkt8Yr.js +0 -1
- package/.output/public/_nuxt/DHuTDtaT.js +0 -12
- package/.output/public/_nuxt/DKYwYmdq.js +0 -1
- package/.output/public/_nuxt/DMDPKkZ0.js +0 -1
- package/.output/public/_nuxt/DNEoBllO.js +0 -1
- package/.output/public/_nuxt/DRzH1pOL.js +0 -1
- package/.output/public/_nuxt/DSUF3NDE.js +0 -1
- package/.output/public/_nuxt/DTAwr92a.js +0 -1
- package/.output/public/_nuxt/DWmtspXK.js +0 -1
- package/.output/public/_nuxt/DXh9HyqW.js +0 -1
- package/.output/public/_nuxt/DXtl0MQI.js +0 -1
- package/.output/public/_nuxt/D_zCY0Xl.js +0 -1
- package/.output/public/_nuxt/DaZJpzOl.js +0 -1
- package/.output/public/_nuxt/Df68jz8_.js +0 -1
- package/.output/public/_nuxt/DhQfdAdO.js +0 -1
- package/.output/public/_nuxt/DiinP2Uv.js +0 -1
- package/.output/public/_nuxt/DljmTZ5-.js +0 -1
- package/.output/public/_nuxt/Dm4QKadl.js +0 -26
- package/.output/public/_nuxt/DmCK90gL.js +0 -1
- package/.output/public/_nuxt/Dn2_MT6a.js +0 -1
- package/.output/public/_nuxt/Don94nLk.js +0 -1
- package/.output/public/_nuxt/Dr8Zlu6v.js +0 -1
- package/.output/public/_nuxt/Drp5UXmf.js +0 -1
- package/.output/public/_nuxt/DtFoCuZo.js +0 -1
- package/.output/public/_nuxt/DxuitVdg.js +0 -2
- package/.output/public/_nuxt/DyJlTyXw.js +0 -1
- package/.output/public/_nuxt/Jep7L2Wt.js +0 -1
- package/.output/public/_nuxt/LUl67wzp.js +0 -1
- package/.output/public/_nuxt/M2rHlmBj.js +0 -1
- package/.output/public/_nuxt/N3RVRbLb.js +0 -1
- package/.output/public/_nuxt/NBseiqgx.js +0 -1
- package/.output/public/_nuxt/PoHY5YXO.js +0 -1
- package/.output/public/_nuxt/SdwduGaY.js +0 -1
- package/.output/public/_nuxt/SytC7lKg.js +0 -1
- package/.output/public/_nuxt/U3pqMjXV.js +0 -1
- package/.output/public/_nuxt/UInuXPgp.js +0 -1
- package/.output/public/_nuxt/YXI84j39.js +0 -2
- package/.output/public/_nuxt/ZZ6g6dXy.js +0 -2
- package/.output/public/_nuxt/builds/meta/033f259e-8ba9-4c82-8824-56febea80b7d.json +0 -1
- package/.output/public/_nuxt/dglhsJpM.js +0 -1
- package/.output/public/_nuxt/dwrHE3tM.js +0 -14
- package/.output/public/_nuxt/edge-router-yEORMNQw.js +0 -4
- package/.output/public/_nuxt/error-404.CttAF9VE.css +0 -1
- package/.output/public/_nuxt/error-500.DXXd6-x4.css +0 -1
- package/.output/public/_nuxt/ga9TZ2z5.js +0 -1
- package/.output/public/_nuxt/graph-layout-CFj469YF.js +0 -1
- package/.output/public/_nuxt/graph-resolver-eG1ZUsYn.js +0 -166
- package/.output/public/_nuxt/ov4D99rA.js +0 -1
- package/.output/public/_nuxt/qYU5Tabh.js +0 -1
- package/.output/public/_nuxt/qliWkHmV.js +0 -1
- package/.output/public/_nuxt/vuetify.BrkCt9t5.css +0 -5
- package/.output/public/_nuxt/yaml.worker-CQ6dFw39.js +0 -405
- package/.output/server/node_modules/entities/lib/generated/decode-data-html.js +0 -9
- package/.output/server/node_modules/entities/lib/generated/decode-data-xml.js +0 -9
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
function U(t,e,n){function r(a,u){var f;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(f=a._zod).traits??(f.traits=new Set),a._zod.traits.add(t),e(a,u);for(const h in o.prototype)h in a||Object.defineProperty(a,h,{value:o.prototype[h].bind(a)});a._zod.constr=o,a._zod.def=u}const s=n?.Parent??Object;class i extends s{}Object.defineProperty(i,"name",{value:t});function o(a){var u;const f=n?.Parent?new i:this;r(f,a),(u=f._zod).deferred??(u.deferred=[]);for(const h of f._zod.deferred)h();return f}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(o,"name",{value:t}),o}class Jt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ga extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const ya={};function bt(t){return ya}function Qc(t){const e=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,s])=>e.indexOf(+r)===-1).map(([r,s])=>s)}function Ns(t,e){return typeof e=="bigint"?e.toString():e}function Lr(t){return{get value(){{const e=t();return Object.defineProperty(this,"value",{value:e}),e}}}}function Us(t){return t==null}function Ms(t){const e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function Xc(t,e){const n=(t.toString().split(".")[1]||"").length,r=e.toString();let s=(r.split(".")[1]||"").length;if(s===0&&/\d?e-\d?/.test(r)){const u=r.match(/\d?e-(\d?)/);u?.[1]&&(s=Number.parseInt(u[1]))}const i=n>s?n:s,o=Number.parseInt(t.toFixed(i).replace(".","")),a=Number.parseInt(e.toFixed(i).replace(".",""));return o%a/10**i}const pi=Symbol("evaluating");function be(t,e,n){let r;Object.defineProperty(t,e,{get(){if(r!==pi)return r===void 0&&(r=pi,r=n()),r},set(s){Object.defineProperty(t,e,{value:s})},configurable:!0})}function Rt(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function jt(...t){const e={};for(const n of t){const r=Object.getOwnPropertyDescriptors(n);Object.assign(e,r)}return Object.defineProperties({},e)}function mi(t){return JSON.stringify(t)}const wa="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function _n(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const eu=Lr(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Xt(t){if(_n(t)===!1)return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(_n(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function va(t){return Xt(t)?{...t}:Array.isArray(t)?[...t]:t}const tu=new Set(["string","number","symbol"]),nu=new Set(["string","number","bigint","boolean","symbol","undefined"]);function xt(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $t(t,e,n){const r=new t._zod.constr(e??t._zod.def);return(!e||n?.parent)&&(r._zod.parent=t),r}function te(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function ru(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}const su={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function iu(t,e){const n=t._zod.def,r=jt(t._zod.def,{get shape(){const s={};for(const i in e){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);e[i]&&(s[i]=n.shape[i])}return Rt(this,"shape",s),s},checks:[]});return $t(t,r)}function ou(t,e){const n=t._zod.def,r=jt(t._zod.def,{get shape(){const s={...t._zod.def.shape};for(const i in e){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);e[i]&&delete s[i]}return Rt(this,"shape",s),s},checks:[]});return $t(t,r)}function au(t,e){if(!Xt(e))throw new Error("Invalid input to extend: expected a plain object");const n=t._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const s=jt(t._zod.def,{get shape(){const i={...t._zod.def.shape,...e};return Rt(this,"shape",i),i},checks:[]});return $t(t,s)}function cu(t,e){if(!Xt(e))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...t._zod.def,get shape(){const r={...t._zod.def.shape,...e};return Rt(this,"shape",r),r},checks:t._zod.def.checks};return $t(t,n)}function uu(t,e){const n=jt(t._zod.def,{get shape(){const r={...t._zod.def.shape,...e._zod.def.shape};return Rt(this,"shape",r),r},get catchall(){return e._zod.def.catchall},checks:[]});return $t(t,n)}function lu(t,e,n){const r=jt(e._zod.def,{get shape(){const s=e._zod.def.shape,i={...s};if(n)for(const o in n){if(!(o in s))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(i[o]=t?new t({type:"optional",innerType:s[o]}):s[o])}else for(const o in s)i[o]=t?new t({type:"optional",innerType:s[o]}):s[o];return Rt(this,"shape",i),i},checks:[]});return $t(e,r)}function fu(t,e,n){const r=jt(e._zod.def,{get shape(){const s=e._zod.def.shape,i={...s};if(n)for(const o in n){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(i[o]=new t({type:"nonoptional",innerType:s[o]}))}else for(const o in s)i[o]=new t({type:"nonoptional",innerType:s[o]});return Rt(this,"shape",i),i},checks:[]});return $t(e,r)}function Zt(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}function Vt(t,e){return e.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(t),n})}function xn(t){return typeof t=="string"?t:t?.message}function _t(t,e,n){const r={...t,path:t.path??[]};if(!t.message){const s=xn(t.inst?._zod.def?.error?.(t))??xn(e?.error?.(t))??xn(n.customError?.(t))??xn(n.localeError?.(t))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,e?.reportInput||delete r.input,r}function Ls(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function $n(...t){const[e,n,r]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:r}:{...e}}const ba=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,Ns,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},_a=U("$ZodError",ba),$a=U("$ZodError",ba,{Parent:Error});function du(t,e=n=>n.message){const n={},r=[];for(const s of t.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(e(s))):r.push(e(s));return{formErrors:r,fieldErrors:n}}function hu(t,e=n=>n.message){const n={_errors:[]},r=s=>{for(const i of s.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(o=>r({issues:o}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(e(i));else{let o=n,a=0;for(;a<i.path.length;){const u=i.path[a];a===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(e(i))):o[u]=o[u]||{_errors:[]},o=o[u],a++}}};return r(t),n}const qs=t=>(e,n,r,s)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},o=e._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new Jt;if(o.issues.length){const a=new(s?.Err??t)(o.issues.map(u=>_t(u,i,bt())));throw wa(a,s?.callee),a}return o.value},Zs=t=>async(e,n,r,s)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let o=e._zod.run({value:n,issues:[]},i);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new(s?.Err??t)(o.issues.map(u=>_t(u,i,bt())));throw wa(a,s?.callee),a}return o.value},qr=t=>(e,n,r)=>{const s=r?{...r,async:!1}:{async:!1},i=e._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Jt;return i.issues.length?{success:!1,error:new(t??_a)(i.issues.map(o=>_t(o,s,bt())))}:{success:!0,data:i.value}},pu=qr($a),Zr=t=>async(e,n,r)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let i=e._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new t(i.issues.map(o=>_t(o,s,bt())))}:{success:!0,data:i.value}},mu=Zr($a),gu=t=>(e,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return qs(t)(e,n,s)},yu=t=>(e,n,r)=>qs(t)(e,n,r),wu=t=>async(e,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Zs(t)(e,n,s)},vu=t=>async(e,n,r)=>Zs(t)(e,n,r),bu=t=>(e,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return qr(t)(e,n,s)},_u=t=>(e,n,r)=>qr(t)(e,n,r),$u=t=>async(e,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Zr(t)(e,n,s)},Eu=t=>async(e,n,r)=>Zr(t)(e,n,r),ku=/^[cC][^\s-]{8,}$/,Su=/^[0-9a-z]+$/,Iu=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Au=/^[0-9a-vA-V]{20}$/,Nu=/^[A-Za-z0-9]{27}$/,Ou=/^[a-zA-Z0-9_-]{21}$/,Tu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Pu=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,gi=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Cu=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,xu="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Bu(){return new RegExp(xu,"u")}const Du=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ru=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,ju=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Fu=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zu=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ea=/^[A-Za-z0-9_-]*$/,Uu=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Mu=/^\+(?:[0-9]){6,14}[0-9]$/,ka="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Lu=new RegExp(`^${ka}$`);function Sa(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function qu(t){return new RegExp(`^${Sa(t)}$`)}function Zu(t){const e=Sa({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${e}(?:${n.join("|")})`;return new RegExp(`^${ka}T(?:${r})$`)}const Vu=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},Ku=/^-?\d+$/,Hu=/^-?\d+(?:\.\d+)?/,Gu=/^(?:true|false)$/i,Ju=/^[^A-Z]*$/,Wu=/^[^a-z]*$/,We=U("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),Ia={number:"number",bigint:"bigint",object:"date"},Aa=U("$ZodCheckLessThan",(t,e)=>{We.init(t,e);const n=Ia[typeof e.value];t._zod.onattach.push(r=>{const s=r._zod.bag,i=(e.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<i&&(e.inclusive?s.maximum=e.value:s.exclusiveMaximum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value<=e.value:r.value<e.value)||r.issues.push({origin:n,code:"too_big",maximum:e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Na=U("$ZodCheckGreaterThan",(t,e)=>{We.init(t,e);const n=Ia[typeof e.value];t._zod.onattach.push(r=>{const s=r._zod.bag,i=(e.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>i&&(e.inclusive?s.minimum=e.value:s.exclusiveMinimum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value>=e.value:r.value>e.value)||r.issues.push({origin:n,code:"too_small",minimum:e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Yu=U("$ZodCheckMultipleOf",(t,e)=>{We.init(t,e),t._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):Xc(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),Qu=U("$ZodCheckNumberFormat",(t,e)=>{We.init(t,e),e.format=e.format||"float64";const n=e.format?.includes("int"),r=n?"int":"number",[s,i]=su[e.format];t._zod.onattach.push(o=>{const a=o._zod.bag;a.format=e.format,a.minimum=s,a.maximum=i,n&&(a.pattern=Ku)}),t._zod.check=o=>{const a=o.value;if(n){if(!Number.isInteger(a)){o.issues.push({expected:r,format:e.format,code:"invalid_type",continue:!1,input:a,inst:t});return}if(!Number.isSafeInteger(a)){a>0?o.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,continue:!e.abort}):o.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,continue:!e.abort});return}}a<s&&o.issues.push({origin:"number",input:a,code:"too_small",minimum:s,inclusive:!0,inst:t,continue:!e.abort}),a>i&&o.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:t})}}),Xu=U("$ZodCheckMaxLength",(t,e)=>{var n;We.init(t,e),(n=t._zod.def).when??(n.when=r=>{const s=r.value;return!Us(s)&&s.length!==void 0}),t._zod.onattach.push(r=>{const s=r._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<s&&(r._zod.bag.maximum=e.maximum)}),t._zod.check=r=>{const s=r.value;if(s.length<=e.maximum)return;const o=Ls(s);r.issues.push({origin:o,code:"too_big",maximum:e.maximum,inclusive:!0,input:s,inst:t,continue:!e.abort})}}),el=U("$ZodCheckMinLength",(t,e)=>{var n;We.init(t,e),(n=t._zod.def).when??(n.when=r=>{const s=r.value;return!Us(s)&&s.length!==void 0}),t._zod.onattach.push(r=>{const s=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>s&&(r._zod.bag.minimum=e.minimum)}),t._zod.check=r=>{const s=r.value;if(s.length>=e.minimum)return;const o=Ls(s);r.issues.push({origin:o,code:"too_small",minimum:e.minimum,inclusive:!0,input:s,inst:t,continue:!e.abort})}}),tl=U("$ZodCheckLengthEquals",(t,e)=>{var n;We.init(t,e),(n=t._zod.def).when??(n.when=r=>{const s=r.value;return!Us(s)&&s.length!==void 0}),t._zod.onattach.push(r=>{const s=r._zod.bag;s.minimum=e.length,s.maximum=e.length,s.length=e.length}),t._zod.check=r=>{const s=r.value,i=s.length;if(i===e.length)return;const o=Ls(s),a=i>e.length;r.issues.push({origin:o,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),Vr=U("$ZodCheckStringFormat",(t,e)=>{var n,r;We.init(t,e),t._zod.onattach.push(s=>{const i=s._zod.bag;i.format=e.format,e.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=s=>{e.pattern.lastIndex=0,!e.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:e.format,input:s.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(r=t._zod).check??(r.check=()=>{})}),nl=U("$ZodCheckRegex",(t,e)=>{Vr.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),rl=U("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Ju),Vr.init(t,e)}),sl=U("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Wu),Vr.init(t,e)}),il=U("$ZodCheckIncludes",(t,e)=>{We.init(t,e);const n=xt(e.includes),r=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=r,t._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=s=>{s.value.includes(e.includes,e.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:s.value,inst:t,continue:!e.abort})}}),ol=U("$ZodCheckStartsWith",(t,e)=>{We.init(t,e);const n=new RegExp(`^${xt(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),t._zod.check=r=>{r.value.startsWith(e.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:r.value,inst:t,continue:!e.abort})}}),al=U("$ZodCheckEndsWith",(t,e)=>{We.init(t,e);const n=new RegExp(`.*${xt(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),t._zod.check=r=>{r.value.endsWith(e.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:r.value,inst:t,continue:!e.abort})}}),cl=U("$ZodCheckOverwrite",(t,e)=>{We.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});class ul{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const r=e.split(`
|
|
2
|
-
`).filter(o=>o),s=Math.min(...r.map(o=>o.length-o.trimStart().length)),i=r.map(o=>o.slice(s)).map(o=>" ".repeat(this.indent*2)+o);for(const o of i)this.content.push(o)}compile(){const e=Function,n=this?.args,s=[...(this?.content??[""]).map(i=>` ${i}`)];return new e(...n,s.join(`
|
|
3
|
-
`))}}const ll={major:4,minor:1,patch:12},Ee=U("$ZodType",(t,e)=>{var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=ll;const r=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&r.unshift(t);for(const s of r)for(const i of s._zod.onattach)i(t);if(r.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const s=(o,a,u)=>{let f=Zt(o),h;for(const y of a){if(y._zod.def.when){if(!y._zod.def.when(o))continue}else if(f)continue;const d=o.issues.length,m=y._zod.check(o);if(m instanceof Promise&&u?.async===!1)throw new Jt;if(h||m instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await m,o.issues.length!==d&&(f||(f=Zt(o,d)))});else{if(o.issues.length===d)continue;f||(f=Zt(o,d))}}return h?h.then(()=>o):o},i=(o,a,u)=>{if(Zt(o))return o.aborted=!0,o;const f=s(a,r,u);if(f instanceof Promise){if(u.async===!1)throw new Jt;return f.then(h=>t._zod.parse(h,u))}return t._zod.parse(f,u)};t._zod.run=(o,a)=>{if(a.skipChecks)return t._zod.parse(o,a);if(a.direction==="backward"){const f=t._zod.parse({value:o.value,issues:[]},{...a,skipChecks:!0});return f instanceof Promise?f.then(h=>i(h,o,a)):i(f,o,a)}const u=t._zod.parse(o,a);if(u instanceof Promise){if(a.async===!1)throw new Jt;return u.then(f=>s(f,r,a))}return s(u,r,a)}}t["~standard"]={validate:s=>{try{const i=pu(t,s);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return mu(t,s).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}}),Vs=U("$ZodString",(t,e)=>{Ee.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Vu(t._zod.bag),t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),Ae=U("$ZodStringFormat",(t,e)=>{Vr.init(t,e),Vs.init(t,e)}),fl=U("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Pu),Ae.init(t,e)}),dl=U("$ZodUUID",(t,e)=>{if(e.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(r===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=gi(r))}else e.pattern??(e.pattern=gi());Ae.init(t,e)}),hl=U("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Cu),Ae.init(t,e)}),pl=U("$ZodURL",(t,e)=>{Ae.init(t,e),t._zod.check=n=>{try{const r=n.value.trim(),s=new URL(r);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Uu.source,input:n.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:n.value,inst:t,continue:!e.abort})),e.normalize?n.value=s.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!e.abort})}}}),ml=U("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Bu()),Ae.init(t,e)}),gl=U("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Ou),Ae.init(t,e)}),yl=U("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=ku),Ae.init(t,e)}),wl=U("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Su),Ae.init(t,e)}),vl=U("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Iu),Ae.init(t,e)}),bl=U("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Au),Ae.init(t,e)}),_l=U("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Nu),Ae.init(t,e)}),$l=U("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=Zu(e)),Ae.init(t,e)}),El=U("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=Lu),Ae.init(t,e)}),kl=U("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=qu(e)),Ae.init(t,e)}),Sl=U("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Tu),Ae.init(t,e)}),Il=U("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Du),Ae.init(t,e),t._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv4"})}),Al=U("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Ru),Ae.init(t,e),t._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv6"}),t._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!e.abort})}}}),Nl=U("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=ju),Ae.init(t,e)}),Ol=U("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=Fu),Ae.init(t,e),t._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[s,i]=r;if(!i)throw new Error;const o=Number(i);if(`${o}`!==i)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!e.abort})}}});function Oa(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const Tl=U("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=zu),Ae.init(t,e),t._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),t._zod.check=n=>{Oa(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!e.abort})}});function Pl(t){if(!Ea.test(t))return!1;const e=t.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return Oa(n)}const Cl=U("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Ea),Ae.init(t,e),t._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),t._zod.check=n=>{Pl(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!e.abort})}}),xl=U("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Mu),Ae.init(t,e)});function Bl(t,e=null){try{const n=t.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const s=JSON.parse(atob(r));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||e&&(!("alg"in s)||s.alg!==e))}catch{return!1}}const Dl=U("$ZodJWT",(t,e)=>{Ae.init(t,e),t._zod.check=n=>{Bl(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!e.abort})}}),Ta=U("$ZodNumber",(t,e)=>{Ee.init(t,e),t._zod.pattern=t._zod.bag.pattern??Hu,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const i=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:t,...i?{received:i}:{}}),n}}),Rl=U("$ZodNumber",(t,e)=>{Qu.init(t,e),Ta.init(t,e)}),jl=U("$ZodBoolean",(t,e)=>{Ee.init(t,e),t._zod.pattern=Gu,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:t}),n}}),Fl=U("$ZodUnknown",(t,e)=>{Ee.init(t,e),t._zod.parse=n=>n}),zl=U("$ZodNever",(t,e)=>{Ee.init(t,e),t._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)}),Ul=U("$ZodDate",(t,e)=>{Ee.init(t,e),t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=new Date(n.value)}catch{}const s=n.value,i=s instanceof Date;return i&&!Number.isNaN(s.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:s,...i?{received:"Invalid Date"}:{},inst:t}),n}});function yi(t,e,n){t.issues.length&&e.issues.push(...Vt(n,t.issues)),e.value[n]=t.value}const Ml=U("$ZodArray",(t,e)=>{Ee.init(t,e),t._zod.parse=(n,r)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:t}),n;n.value=Array(s.length);const i=[];for(let o=0;o<s.length;o++){const a=s[o],u=e.element._zod.run({value:a,issues:[]},r);u instanceof Promise?i.push(u.then(f=>yi(f,n,o))):yi(u,n,o)}return i.length?Promise.all(i).then(()=>n):n}});function Dr(t,e,n,r){t.issues.length&&e.issues.push(...Vt(n,t.issues)),t.value===void 0?n in r&&(e.value[n]=void 0):e.value[n]=t.value}function Pa(t){const e=Object.keys(t.shape);for(const r of e)if(!t.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=ru(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}}function Ca(t,e,n,r,s,i){const o=[],a=s.keySet,u=s.catchall._zod,f=u.def.type;for(const h of Object.keys(e)){if(a.has(h))continue;if(f==="never"){o.push(h);continue}const y=u.run({value:e[h],issues:[]},r);y instanceof Promise?t.push(y.then(d=>Dr(d,n,h,e))):Dr(y,n,h,e)}return o.length&&n.issues.push({code:"unrecognized_keys",keys:o,input:e,inst:i}),t.length?Promise.all(t).then(()=>n):n}const Ll=U("$ZodObject",(t,e)=>{if(Ee.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){const a=e.shape;Object.defineProperty(e,"shape",{get:()=>{const u={...a};return Object.defineProperty(e,"shape",{value:u}),u}})}const r=Lr(()=>Pa(e));be(t._zod,"propValues",()=>{const a=e.shape,u={};for(const f in a){const h=a[f]._zod;if(h.values){u[f]??(u[f]=new Set);for(const y of h.values)u[f].add(y)}}return u});const s=_n,i=e.catchall;let o;t._zod.parse=(a,u)=>{o??(o=r.value);const f=a.value;if(!s(f))return a.issues.push({expected:"object",code:"invalid_type",input:f,inst:t}),a;a.value={};const h=[],y=o.shape;for(const d of o.keys){const b=y[d]._zod.run({value:f[d],issues:[]},u);b instanceof Promise?h.push(b.then(w=>Dr(w,a,d,f))):Dr(b,a,d,f)}return i?Ca(h,f,a,u,r.value,t):h.length?Promise.all(h).then(()=>a):a}}),ql=U("$ZodObjectJIT",(t,e)=>{Ll.init(t,e);const n=t._zod.parse,r=Lr(()=>Pa(e)),s=d=>{const m=new ul(["shape","payload","ctx"]),b=r.value,w=_=>{const I=mi(_);return`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};m.write("const input = payload.value;");const g=Object.create(null);let $=0;for(const _ of b.keys)g[_]=`key_${$++}`;m.write("const newResult = {};");for(const _ of b.keys){const I=g[_],v=mi(_);m.write(`const ${I} = ${w(_)};`),m.write(`
|
|
4
|
-
if (${I}.issues.length) {
|
|
5
|
-
payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
|
|
6
|
-
...iss,
|
|
7
|
-
path: iss.path ? [${v}, ...iss.path] : [${v}]
|
|
8
|
-
})));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (${I}.value === undefined) {
|
|
13
|
-
if (${v} in input) {
|
|
14
|
-
newResult[${v}] = undefined;
|
|
15
|
-
}
|
|
16
|
-
} else {
|
|
17
|
-
newResult[${v}] = ${I}.value;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
`)}m.write("payload.value = newResult;"),m.write("return payload;");const p=m.compile();return(_,I)=>p(d,_,I)};let i;const o=_n,a=!ya.jitless,f=a&&eu.value,h=e.catchall;let y;t._zod.parse=(d,m)=>{y??(y=r.value);const b=d.value;return o(b)?a&&f&&m?.async===!1&&m.jitless!==!0?(i||(i=s(e.shape)),d=i(d,m),h?Ca([],b,d,m,y,t):d):n(d,m):(d.issues.push({expected:"object",code:"invalid_type",input:b,inst:t}),d)}});function wi(t,e,n,r){for(const i of t)if(i.issues.length===0)return e.value=i.value,e;const s=t.filter(i=>!Zt(i));return s.length===1?(e.value=s[0].value,s[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(i=>i.issues.map(o=>_t(o,r,bt())))}),e)}const xa=U("$ZodUnion",(t,e)=>{Ee.init(t,e),be(t._zod,"optin",()=>e.options.some(s=>s._zod.optin==="optional")?"optional":void 0),be(t._zod,"optout",()=>e.options.some(s=>s._zod.optout==="optional")?"optional":void 0),be(t._zod,"values",()=>{if(e.options.every(s=>s._zod.values))return new Set(e.options.flatMap(s=>Array.from(s._zod.values)))}),be(t._zod,"pattern",()=>{if(e.options.every(s=>s._zod.pattern)){const s=e.options.map(i=>i._zod.pattern);return new RegExp(`^(${s.map(i=>Ms(i.source)).join("|")})$`)}});const n=e.options.length===1,r=e.options[0]._zod.run;t._zod.parse=(s,i)=>{if(n)return r(s,i);let o=!1;const a=[];for(const u of e.options){const f=u._zod.run({value:s.value,issues:[]},i);if(f instanceof Promise)a.push(f),o=!0;else{if(f.issues.length===0)return f;a.push(f)}}return o?Promise.all(a).then(u=>wi(u,s,t,i)):wi(a,s,t,i)}}),Zl=U("$ZodDiscriminatedUnion",(t,e)=>{xa.init(t,e);const n=t._zod.parse;be(t._zod,"propValues",()=>{const s={};for(const i of e.options){const o=i._zod.propValues;if(!o||Object.keys(o).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(i)}"`);for(const[a,u]of Object.entries(o)){s[a]||(s[a]=new Set);for(const f of u)s[a].add(f)}}return s});const r=Lr(()=>{const s=e.options,i=new Map;for(const o of s){const a=o._zod.propValues?.[e.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(const u of a){if(i.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);i.set(u,o)}}return i});t._zod.parse=(s,i)=>{const o=s.value;if(!_n(o))return s.issues.push({code:"invalid_type",expected:"object",input:o,inst:t}),s;const a=r.value.get(o?.[e.discriminator]);return a?a._zod.run(s,i):e.unionFallback?n(s,i):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:o,path:[e.discriminator],inst:t}),s)}}),Vl=U("$ZodIntersection",(t,e)=>{Ee.init(t,e),t._zod.parse=(n,r)=>{const s=n.value,i=e.left._zod.run({value:s,issues:[]},r),o=e.right._zod.run({value:s,issues:[]},r);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([u,f])=>vi(n,u,f)):vi(n,i,o)}});function Os(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(Xt(t)&&Xt(e)){const n=Object.keys(e),r=Object.keys(t).filter(i=>n.indexOf(i)!==-1),s={...t,...e};for(const i of r){const o=Os(t[i],e[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};s[i]=o.data}return{valid:!0,data:s}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<t.length;r++){const s=t[r],i=e[r],o=Os(s,i);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function vi(t,e,n){if(e.issues.length&&t.issues.push(...e.issues),n.issues.length&&t.issues.push(...n.issues),Zt(t))return t;const r=Os(e.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return t.value=r.data,t}const Kl=U("$ZodRecord",(t,e)=>{Ee.init(t,e),t._zod.parse=(n,r)=>{const s=n.value;if(!Xt(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:t}),n;const i=[];if(e.keyType._zod.values){const o=e.keyType._zod.values;n.value={};for(const u of o)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){const f=e.valueType._zod.run({value:s[u],issues:[]},r);f instanceof Promise?i.push(f.then(h=>{h.issues.length&&n.issues.push(...Vt(u,h.issues)),n.value[u]=h.value})):(f.issues.length&&n.issues.push(...Vt(u,f.issues)),n.value[u]=f.value)}let a;for(const u in s)o.has(u)||(a=a??[],a.push(u));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:t,keys:a})}else{n.value={};for(const o of Reflect.ownKeys(s)){if(o==="__proto__")continue;const a=e.keyType._zod.run({value:o,issues:[]},r);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(f=>_t(f,r,bt())),input:o,path:[o],inst:t}),n.value[a.value]=a.value;continue}const u=e.valueType._zod.run({value:s[o],issues:[]},r);u instanceof Promise?i.push(u.then(f=>{f.issues.length&&n.issues.push(...Vt(o,f.issues)),n.value[a.value]=f.value})):(u.issues.length&&n.issues.push(...Vt(o,u.issues)),n.value[a.value]=u.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Hl=U("$ZodEnum",(t,e)=>{Ee.init(t,e);const n=Qc(e.entries),r=new Set(n);t._zod.values=r,t._zod.pattern=new RegExp(`^(${n.filter(s=>tu.has(typeof s)).map(s=>typeof s=="string"?xt(s):s.toString()).join("|")})$`),t._zod.parse=(s,i)=>{const o=s.value;return r.has(o)||s.issues.push({code:"invalid_value",values:n,input:o,inst:t}),s}}),Gl=U("$ZodLiteral",(t,e)=>{if(Ee.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(n=>typeof n=="string"?xt(n):n?xt(n.toString()):String(n)).join("|")})$`),t._zod.parse=(n,r)=>{const s=n.value;return t._zod.values.has(s)||n.issues.push({code:"invalid_value",values:e.values,input:s,inst:t}),n}}),Jl=U("$ZodTransform",(t,e)=>{Ee.init(t,e),t._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ga(t.constructor.name);const s=e.transform(n.value,n);if(r.async)return(s instanceof Promise?s:Promise.resolve(s)).then(o=>(n.value=o,n));if(s instanceof Promise)throw new Jt;return n.value=s,n}});function bi(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}const Wl=U("$ZodOptional",(t,e)=>{Ee.init(t,e),t._zod.optin="optional",t._zod.optout="optional",be(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),be(t._zod,"pattern",()=>{const n=e.innerType._zod.pattern;return n?new RegExp(`^(${Ms(n.source)})?$`):void 0}),t._zod.parse=(n,r)=>{if(e.innerType._zod.optin==="optional"){const s=e.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>bi(i,n.value)):bi(s,n.value)}return n.value===void 0?n:e.innerType._zod.run(n,r)}}),Yl=U("$ZodNullable",(t,e)=>{Ee.init(t,e),be(t._zod,"optin",()=>e.innerType._zod.optin),be(t._zod,"optout",()=>e.innerType._zod.optout),be(t._zod,"pattern",()=>{const n=e.innerType._zod.pattern;return n?new RegExp(`^(${Ms(n.source)}|null)$`):void 0}),be(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(n,r)=>n.value===null?n:e.innerType._zod.run(n,r)}),Ql=U("$ZodDefault",(t,e)=>{Ee.init(t,e),t._zod.optin="optional",be(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>{if(r.direction==="backward")return e.innerType._zod.run(n,r);if(n.value===void 0)return n.value=e.defaultValue,n;const s=e.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>_i(i,e)):_i(s,e)}});function _i(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}const Xl=U("$ZodPrefault",(t,e)=>{Ee.init(t,e),t._zod.optin="optional",be(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=e.defaultValue),e.innerType._zod.run(n,r))}),ef=U("$ZodNonOptional",(t,e)=>{Ee.init(t,e),be(t._zod,"values",()=>{const n=e.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),t._zod.parse=(n,r)=>{const s=e.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>$i(i,t)):$i(s,t)}});function $i(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}const tf=U("$ZodCatch",(t,e)=>{Ee.init(t,e),be(t._zod,"optin",()=>e.innerType._zod.optin),be(t._zod,"optout",()=>e.innerType._zod.optout),be(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>{if(r.direction==="backward")return e.innerType._zod.run(n,r);const s=e.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>(n.value=i.value,i.issues.length&&(n.value=e.catchValue({...n,error:{issues:i.issues.map(o=>_t(o,r,bt()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=e.catchValue({...n,error:{issues:s.issues.map(i=>_t(i,r,bt()))},input:n.value}),n.issues=[]),n)}}),nf=U("$ZodPipe",(t,e)=>{Ee.init(t,e),be(t._zod,"values",()=>e.in._zod.values),be(t._zod,"optin",()=>e.in._zod.optin),be(t._zod,"optout",()=>e.out._zod.optout),be(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=e.out._zod.run(n,r);return i instanceof Promise?i.then(o=>Bn(o,e.in,r)):Bn(i,e.in,r)}const s=e.in._zod.run(n,r);return s instanceof Promise?s.then(i=>Bn(i,e.out,r)):Bn(s,e.out,r)}});function Bn(t,e,n){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},n)}const rf=U("$ZodReadonly",(t,e)=>{Ee.init(t,e),be(t._zod,"propValues",()=>e.innerType._zod.propValues),be(t._zod,"values",()=>e.innerType._zod.values),be(t._zod,"optin",()=>e.innerType._zod.optin),be(t._zod,"optout",()=>e.innerType._zod.optout),t._zod.parse=(n,r)=>{if(r.direction==="backward")return e.innerType._zod.run(n,r);const s=e.innerType._zod.run(n,r);return s instanceof Promise?s.then(Ei):Ei(s)}});function Ei(t){return t.value=Object.freeze(t.value),t}const sf=U("$ZodTemplateLiteral",(t,e)=>{Ee.init(t,e);const n=[];for(const r of e.parts)if(typeof r=="object"&&r!==null){if(!r._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...r._zod.traits].shift()}`);const s=r._zod.pattern instanceof RegExp?r._zod.pattern.source:r._zod.pattern;if(!s)throw new Error(`Invalid template literal part: ${r._zod.traits}`);const i=s.startsWith("^")?1:0,o=s.endsWith("$")?s.length-1:s.length;n.push(s.slice(i,o))}else if(r===null||nu.has(typeof r))n.push(xt(`${r}`));else throw new Error(`Invalid template literal part: ${r}`);t._zod.pattern=new RegExp(`^${n.join("")}$`),t._zod.parse=(r,s)=>typeof r.value!="string"?(r.issues.push({input:r.value,inst:t,expected:"template_literal",code:"invalid_type"}),r):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(r.value)||r.issues.push({input:r.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),r)}),of=U("$ZodCustom",(t,e)=>{We.init(t,e),Ee.init(t,e),t._zod.parse=(n,r)=>n,t._zod.check=n=>{const r=n.value,s=e.fn(r);if(s instanceof Promise)return s.then(i=>ki(i,n,r,t));ki(s,n,r,t)}});function ki(t,e,n,r){if(!t){const s={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(s.params=r._zod.def.params),e.issues.push($n(s))}}class af{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...n){const r=n[0];if(this._map.set(e,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const n=this._map.get(e);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(e),this}get(e){const n=e._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const s={...r,...this._map.get(e)};return Object.keys(s).length?s:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function cf(){return new af}const Dn=cf();function uf(t,e){return new t({type:"string",...te(e)})}function lf(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...te(e)})}function Si(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...te(e)})}function ff(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...te(e)})}function df(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...te(e)})}function hf(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...te(e)})}function pf(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...te(e)})}function Ba(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...te(e)})}function mf(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...te(e)})}function gf(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...te(e)})}function yf(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...te(e)})}function Da(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...te(e)})}function wf(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...te(e)})}function vf(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...te(e)})}function bf(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...te(e)})}function _f(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...te(e)})}function $f(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...te(e)})}function Ef(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...te(e)})}function kf(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...te(e)})}function Sf(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...te(e)})}function If(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...te(e)})}function Af(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...te(e)})}function Nf(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...te(e)})}function Of(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...te(e)})}function Tf(t,e){return new t({type:"string",format:"date",check:"string_format",...te(e)})}function Pf(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...te(e)})}function Cf(t,e){return new t({type:"string",format:"duration",check:"string_format",...te(e)})}function xf(t,e){return new t({type:"number",checks:[],...te(e)})}function Bf(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...te(e)})}function Df(t,e){return new t({type:"boolean",...te(e)})}function Rf(t,e){return new t({type:"boolean",coerce:!0,...te(e)})}function jf(t){return new t({type:"unknown"})}function Ff(t,e){return new t({type:"never",...te(e)})}function zf(t,e){return new t({type:"date",...te(e)})}function Ii(t,e){return new Aa({check:"less_than",...te(e),value:t,inclusive:!1})}function Nr(t,e){return new Aa({check:"less_than",...te(e),value:t,inclusive:!0})}function Ai(t,e){return new Na({check:"greater_than",...te(e),value:t,inclusive:!1})}function Or(t,e){return new Na({check:"greater_than",...te(e),value:t,inclusive:!0})}function Ni(t,e){return new Yu({check:"multiple_of",...te(e),value:t})}function Ra(t,e){return new Xu({check:"max_length",...te(e),maximum:t})}function Rr(t,e){return new el({check:"min_length",...te(e),minimum:t})}function ja(t,e){return new tl({check:"length_equals",...te(e),length:t})}function Uf(t,e){return new nl({check:"string_format",format:"regex",...te(e),pattern:t})}function Mf(t){return new rl({check:"string_format",format:"lowercase",...te(t)})}function Lf(t){return new sl({check:"string_format",format:"uppercase",...te(t)})}function qf(t,e){return new il({check:"string_format",format:"includes",...te(e),includes:t})}function Zf(t,e){return new ol({check:"string_format",format:"starts_with",...te(e),prefix:t})}function Vf(t,e){return new al({check:"string_format",format:"ends_with",...te(e),suffix:t})}function An(t){return new cl({check:"overwrite",tx:t})}function Kf(t){return An(e=>e.normalize(t))}function Hf(){return An(t=>t.trim())}function Gf(){return An(t=>t.toLowerCase())}function Jf(){return An(t=>t.toUpperCase())}function Wf(t,e,n){return new t({type:"array",element:e,...te(n)})}function Yf(t,e,n){const r=te(n);return r.abort??(r.abort=!0),new t({type:"custom",check:"custom",fn:e,...r})}function Qf(t,e,n){return new t({type:"custom",check:"custom",fn:e,...te(n)})}function Xf(t){const e=ed(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push($n(r,n.value,e._zod.def));else{const s=r;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),s.continue??(s.continue=!e._zod.def.abort),n.issues.push($n(s))}},t(n.value,n)));return e}function ed(t,e){const n=new We({check:"custom",...te(e)});return n._zod.check=t,n}const td=U("ZodISODateTime",(t,e)=>{$l.init(t,e),Ne.init(t,e)});function nd(t){return Of(td,t)}const rd=U("ZodISODate",(t,e)=>{El.init(t,e),Ne.init(t,e)});function sd(t){return Tf(rd,t)}const id=U("ZodISOTime",(t,e)=>{kl.init(t,e),Ne.init(t,e)});function od(t){return Pf(id,t)}const ad=U("ZodISODuration",(t,e)=>{Sl.init(t,e),Ne.init(t,e)});function cd(t){return Cf(ad,t)}const ud=(t,e)=>{_a.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:n=>hu(t,n)},flatten:{value:n=>du(t,n)},addIssue:{value:n=>{t.issues.push(n),t.message=JSON.stringify(t.issues,Ns,2)}},addIssues:{value:n=>{t.issues.push(...n),t.message=JSON.stringify(t.issues,Ns,2)}},isEmpty:{get(){return t.issues.length===0}}})},nt=U("ZodError",ud,{Parent:Error}),ld=qs(nt),fd=Zs(nt),dd=qr(nt),hd=Zr(nt),pd=gu(nt),md=yu(nt),gd=wu(nt),yd=vu(nt),wd=bu(nt),vd=_u(nt),bd=$u(nt),_d=Eu(nt),ke=U("ZodType",(t,e)=>(Ee.init(t,e),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...n)=>t.clone(jt(e,{checks:[...e.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]})),t.clone=(n,r)=>$t(t,n,r),t.brand=()=>t,t.register=((n,r)=>(n.add(t,r),t)),t.parse=(n,r)=>ld(t,n,r,{callee:t.parse}),t.safeParse=(n,r)=>dd(t,n,r),t.parseAsync=async(n,r)=>fd(t,n,r,{callee:t.parseAsync}),t.safeParseAsync=async(n,r)=>hd(t,n,r),t.spa=t.safeParseAsync,t.encode=(n,r)=>pd(t,n,r),t.decode=(n,r)=>md(t,n,r),t.encodeAsync=async(n,r)=>gd(t,n,r),t.decodeAsync=async(n,r)=>yd(t,n,r),t.safeEncode=(n,r)=>wd(t,n,r),t.safeDecode=(n,r)=>vd(t,n,r),t.safeEncodeAsync=async(n,r)=>bd(t,n,r),t.safeDecodeAsync=async(n,r)=>_d(t,n,r),t.refine=(n,r)=>t.check(fh(n,r)),t.superRefine=n=>t.check(dh(n)),t.overwrite=n=>t.check(An(n)),t.optional=()=>Pi(t),t.nullable=()=>Ci(t),t.nullish=()=>Pi(Ci(t)),t.nonoptional=n=>sh(t,n),t.array=()=>Ke(t),t.or=n=>nn([t,n]),t.and=n=>Gd(t,n),t.transform=n=>xi(t,Qd(n)),t.default=n=>th(t,n),t.prefault=n=>rh(t,n),t.catch=n=>oh(t,n),t.pipe=n=>xi(t,n),t.readonly=()=>uh(t),t.describe=n=>{const r=t.clone();return Dn.add(r,{description:n}),r},Object.defineProperty(t,"description",{get(){return Dn.get(t)?.description},configurable:!0}),t.meta=(...n)=>{if(n.length===0)return Dn.get(t);const r=t.clone();return Dn.add(r,n[0]),r},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),Fa=U("_ZodString",(t,e)=>{Vs.init(t,e),ke.init(t,e);const n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null,t.regex=(...r)=>t.check(Uf(...r)),t.includes=(...r)=>t.check(qf(...r)),t.startsWith=(...r)=>t.check(Zf(...r)),t.endsWith=(...r)=>t.check(Vf(...r)),t.min=(...r)=>t.check(Rr(...r)),t.max=(...r)=>t.check(Ra(...r)),t.length=(...r)=>t.check(ja(...r)),t.nonempty=(...r)=>t.check(Rr(1,...r)),t.lowercase=r=>t.check(Mf(r)),t.uppercase=r=>t.check(Lf(r)),t.trim=()=>t.check(Hf()),t.normalize=(...r)=>t.check(Kf(...r)),t.toLowerCase=()=>t.check(Gf()),t.toUpperCase=()=>t.check(Jf())}),$d=U("ZodString",(t,e)=>{Vs.init(t,e),Fa.init(t,e),t.email=n=>t.check(lf(Ed,n)),t.url=n=>t.check(Ba(za,n)),t.jwt=n=>t.check(Nf(Fd,n)),t.emoji=n=>t.check(mf(Sd,n)),t.guid=n=>t.check(Si(Oi,n)),t.uuid=n=>t.check(ff(Rn,n)),t.uuidv4=n=>t.check(df(Rn,n)),t.uuidv6=n=>t.check(hf(Rn,n)),t.uuidv7=n=>t.check(pf(Rn,n)),t.nanoid=n=>t.check(gf(Id,n)),t.guid=n=>t.check(Si(Oi,n)),t.cuid=n=>t.check(yf(Ad,n)),t.cuid2=n=>t.check(Da(Ua,n)),t.ulid=n=>t.check(wf(Nd,n)),t.base64=n=>t.check(Sf(Dd,n)),t.base64url=n=>t.check(If(Rd,n)),t.xid=n=>t.check(vf(Od,n)),t.ksuid=n=>t.check(bf(Td,n)),t.ipv4=n=>t.check(_f(Pd,n)),t.ipv6=n=>t.check($f(Cd,n)),t.cidrv4=n=>t.check(Ef(xd,n)),t.cidrv6=n=>t.check(kf(Bd,n)),t.e164=n=>t.check(Af(jd,n)),t.datetime=n=>t.check(nd(n)),t.date=n=>t.check(sd(n)),t.time=n=>t.check(od(n)),t.duration=n=>t.check(cd(n))});function Z(t){return uf($d,t)}const Ne=U("ZodStringFormat",(t,e)=>{Ae.init(t,e),Fa.init(t,e)}),Ed=U("ZodEmail",(t,e)=>{hl.init(t,e),Ne.init(t,e)}),Oi=U("ZodGUID",(t,e)=>{fl.init(t,e),Ne.init(t,e)}),Rn=U("ZodUUID",(t,e)=>{dl.init(t,e),Ne.init(t,e)}),za=U("ZodURL",(t,e)=>{pl.init(t,e),Ne.init(t,e)});function kd(t){return Ba(za,t)}const Sd=U("ZodEmoji",(t,e)=>{ml.init(t,e),Ne.init(t,e)}),Id=U("ZodNanoID",(t,e)=>{gl.init(t,e),Ne.init(t,e)}),Ad=U("ZodCUID",(t,e)=>{yl.init(t,e),Ne.init(t,e)}),Ua=U("ZodCUID2",(t,e)=>{wl.init(t,e),Ne.init(t,e)});function ge(t){return Da(Ua,t)}const Nd=U("ZodULID",(t,e)=>{vl.init(t,e),Ne.init(t,e)}),Od=U("ZodXID",(t,e)=>{bl.init(t,e),Ne.init(t,e)}),Td=U("ZodKSUID",(t,e)=>{_l.init(t,e),Ne.init(t,e)}),Pd=U("ZodIPv4",(t,e)=>{Il.init(t,e),Ne.init(t,e)}),Cd=U("ZodIPv6",(t,e)=>{Al.init(t,e),Ne.init(t,e)}),xd=U("ZodCIDRv4",(t,e)=>{Nl.init(t,e),Ne.init(t,e)}),Bd=U("ZodCIDRv6",(t,e)=>{Ol.init(t,e),Ne.init(t,e)}),Dd=U("ZodBase64",(t,e)=>{Tl.init(t,e),Ne.init(t,e)}),Rd=U("ZodBase64URL",(t,e)=>{Cl.init(t,e),Ne.init(t,e)}),jd=U("ZodE164",(t,e)=>{xl.init(t,e),Ne.init(t,e)}),Fd=U("ZodJWT",(t,e)=>{Dl.init(t,e),Ne.init(t,e)}),Ma=U("ZodNumber",(t,e)=>{Ta.init(t,e),ke.init(t,e),t.gt=(r,s)=>t.check(Ai(r,s)),t.gte=(r,s)=>t.check(Or(r,s)),t.min=(r,s)=>t.check(Or(r,s)),t.lt=(r,s)=>t.check(Ii(r,s)),t.lte=(r,s)=>t.check(Nr(r,s)),t.max=(r,s)=>t.check(Nr(r,s)),t.int=r=>t.check(Ti(r)),t.safe=r=>t.check(Ti(r)),t.positive=r=>t.check(Ai(0,r)),t.nonnegative=r=>t.check(Or(0,r)),t.negative=r=>t.check(Ii(0,r)),t.nonpositive=r=>t.check(Nr(0,r)),t.multipleOf=(r,s)=>t.check(Ni(r,s)),t.step=(r,s)=>t.check(Ni(r,s)),t.finite=()=>t;const n=t._zod.bag;t.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),t.isFinite=!0,t.format=n.format??null});function qe(t){return xf(Ma,t)}const zd=U("ZodNumberFormat",(t,e)=>{Rl.init(t,e),Ma.init(t,e)});function Ti(t){return Bf(zd,t)}const La=U("ZodBoolean",(t,e)=>{jl.init(t,e),ke.init(t,e)});function Ce(t){return Df(La,t)}const Ud=U("ZodUnknown",(t,e)=>{Fl.init(t,e),ke.init(t,e)});function Bt(){return jf(Ud)}const Md=U("ZodNever",(t,e)=>{zl.init(t,e),ke.init(t,e)});function Ld(t){return Ff(Md,t)}const qd=U("ZodDate",(t,e)=>{Ul.init(t,e),ke.init(t,e),t.min=(r,s)=>t.check(Or(r,s)),t.max=(r,s)=>t.check(Nr(r,s));const n=t._zod.bag;t.minDate=n.minimum?new Date(n.minimum):null,t.maxDate=n.maximum?new Date(n.maximum):null});function _e(t){return zf(qd,t)}const Zd=U("ZodArray",(t,e)=>{Ml.init(t,e),ke.init(t,e),t.element=e.element,t.min=(n,r)=>t.check(Rr(n,r)),t.nonempty=n=>t.check(Rr(1,n)),t.max=(n,r)=>t.check(Ra(n,r)),t.length=(n,r)=>t.check(ja(n,r)),t.unwrap=()=>t.element});function Ke(t,e){return Wf(Zd,t,e)}const Vd=U("ZodObject",(t,e)=>{ql.init(t,e),ke.init(t,e),be(t,"shape",()=>e.shape),t.keyof=()=>gt(Object.keys(t._zod.def.shape)),t.catchall=n=>t.clone({...t._zod.def,catchall:n}),t.passthrough=()=>t.clone({...t._zod.def,catchall:Bt()}),t.loose=()=>t.clone({...t._zod.def,catchall:Bt()}),t.strict=()=>t.clone({...t._zod.def,catchall:Ld()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=n=>au(t,n),t.safeExtend=n=>cu(t,n),t.merge=n=>uu(t,n),t.pick=n=>iu(t,n),t.omit=n=>ou(t,n),t.partial=(...n)=>lu(Za,t,n[0]),t.required=(...n)=>fu(Va,t,n[0])});function G(t,e){const n={type:"object",shape:t??{},...te(e)};return new Vd(n)}const qa=U("ZodUnion",(t,e)=>{xa.init(t,e),ke.init(t,e),t.options=e.options});function nn(t,e){return new qa({type:"union",options:t,...te(e)})}const Kd=U("ZodDiscriminatedUnion",(t,e)=>{qa.init(t,e),Zl.init(t,e)});function Et(t,e,n){return new Kd({type:"union",options:e,discriminator:t,...te(n)})}const Hd=U("ZodIntersection",(t,e)=>{Vl.init(t,e),ke.init(t,e)});function Gd(t,e){return new Hd({type:"intersection",left:t,right:e})}const Jd=U("ZodRecord",(t,e)=>{Kl.init(t,e),ke.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function Ue(t,e,n){return new Jd({type:"record",keyType:t,valueType:e,...te(n)})}const Ts=U("ZodEnum",(t,e)=>{Hl.init(t,e),ke.init(t,e),t.enum=e.entries,t.options=Object.values(e.entries);const n=new Set(Object.keys(e.entries));t.extract=(r,s)=>{const i={};for(const o of r)if(n.has(o))i[o]=e.entries[o];else throw new Error(`Key ${o} not found in enum`);return new Ts({...e,checks:[],...te(s),entries:i})},t.exclude=(r,s)=>{const i={...e.entries};for(const o of r)if(n.has(o))delete i[o];else throw new Error(`Key ${o} not found in enum`);return new Ts({...e,checks:[],...te(s),entries:i})}});function gt(t,e){const n=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new Ts({type:"enum",entries:n,...te(e)})}const Wd=U("ZodLiteral",(t,e)=>{Gl.init(t,e),ke.init(t,e),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function pe(t,e){return new Wd({type:"literal",values:Array.isArray(t)?t:[t],...te(e)})}const Yd=U("ZodTransform",(t,e)=>{Jl.init(t,e),ke.init(t,e),t._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ga(t.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push($n(i,n.value,e));else{const o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),n.issues.push($n(o))}};const s=e.transform(n.value,n);return s instanceof Promise?s.then(i=>(n.value=i,n)):(n.value=s,n)}});function Qd(t){return new Yd({type:"transform",transform:t})}const Za=U("ZodOptional",(t,e)=>{Wl.init(t,e),ke.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Pi(t){return new Za({type:"optional",innerType:t})}const Xd=U("ZodNullable",(t,e)=>{Yl.init(t,e),ke.init(t,e),t.unwrap=()=>t._zod.def.innerType});function Ci(t){return new Xd({type:"nullable",innerType:t})}const eh=U("ZodDefault",(t,e)=>{Ql.init(t,e),ke.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function th(t,e){return new eh({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():va(e)}})}const nh=U("ZodPrefault",(t,e)=>{Xl.init(t,e),ke.init(t,e),t.unwrap=()=>t._zod.def.innerType});function rh(t,e){return new nh({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():va(e)}})}const Va=U("ZodNonOptional",(t,e)=>{ef.init(t,e),ke.init(t,e),t.unwrap=()=>t._zod.def.innerType});function sh(t,e){return new Va({type:"nonoptional",innerType:t,...te(e)})}const ih=U("ZodCatch",(t,e)=>{tf.init(t,e),ke.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function oh(t,e){return new ih({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}const ah=U("ZodPipe",(t,e)=>{nf.init(t,e),ke.init(t,e),t.in=e.in,t.out=e.out});function xi(t,e){return new ah({type:"pipe",in:t,out:e})}const ch=U("ZodReadonly",(t,e)=>{rf.init(t,e),ke.init(t,e),t.unwrap=()=>t._zod.def.innerType});function uh(t){return new ch({type:"readonly",innerType:t})}const lh=U("ZodTemplateLiteral",(t,e)=>{sf.init(t,e),ke.init(t,e)});function Tr(t,e){return new lh({type:"template_literal",parts:t,...te(e)})}const Ks=U("ZodCustom",(t,e)=>{of.init(t,e),ke.init(t,e)});function En(t,e){return Yf(Ks,(()=>!0),e)}function fh(t,e={}){return Qf(Ks,t,e)}function dh(t){return Xf(t)}function hh(t,e={error:`Input not instance of ${t.name}`}){const n=new Ks({type:"custom",check:"custom",fn:r=>r instanceof t,abort:!0,...te(e)});return n._zod.bag.Class=t,n}function ph(t){return Rf(La,t)}function mh(t,e,n){let r=s=>t(s,...e);return n===void 0?r:Object.assign(r,{lazy:n,lazyArgs:e})}function Ka(t,e,n){let r=t.length-e.length;if(r===0)return t(...e);if(r===1)return mh(t,e,n);throw Error("Wrong number of arguments")}const Ha={done:!1,hasNext:!1};function Bi(t,...e){let n=t,r=e.map(i=>"lazy"in i?gh(i):void 0),s=0;for(;s<e.length;){if(r[s]===void 0||!yh(n)){let u=e[s];n=u(n),s+=1;continue}let i=[];for(let u=s;u<e.length;u++){let f=r[u];if(f===void 0||(i.push(f),f.isSingle))break}let o=[];for(let u of n)if(Ga(u,o,i))break;let{isSingle:a}=i.at(-1);n=a?o[0]:o,s+=i.length}return n}function Ga(t,e,n){if(n.length===0)return e.push(t),!1;let r=t,s=Ha,i=!1;for(let[o,a]of n.entries()){let{index:u,items:f}=a;if(f.push(r),s=a(r,u,f),a.index+=1,s.hasNext){if(s.hasMany??!1){for(let h of s.next)if(Ga(h,e,n.slice(o+1)))return!0;return i}r=s.next}if(!s.hasNext)break;s.done&&(i=!0)}return s.hasNext&&e.push(r),i}function gh(t){let{lazy:e,lazyArgs:n}=t,r=e(...n);return Object.assign(r,{isSingle:e.single??!1,index:0,items:[]})}function yh(t){return typeof t=="string"||typeof t=="object"&&!!t&&Symbol.iterator in t}function wh(t,e){let n=e.length-t.length;if(n===1){let[r,...s]=e;return Bi(r,{lazy:t,lazyArgs:s})}if(n===0){let r={lazy:t,lazyArgs:e};return Object.assign(s=>Bi(s,r),r)}throw Error("Wrong number of arguments")}function vh(...t){return Ka(Object.fromEntries,t)}function bh(...t){return Ka(_h,t)}function _h(t,e){let n={};for(let[r,s]of Object.entries(t))n[r]=e(s,r,t);return n}function $h(...t){return wh(Eh,t)}function Eh(){let t=new Set;return e=>t.has(e)?Ha:(t.add(e),{done:!1,hasNext:!0,next:e})}const Hs=Symbol.for("yaml.alias"),Ps=Symbol.for("yaml.document"),vt=Symbol.for("yaml.map"),Ja=Symbol.for("yaml.pair"),ut=Symbol.for("yaml.scalar"),rn=Symbol.for("yaml.seq"),tt=Symbol.for("yaml.node.type"),Ft=t=>!!t&&typeof t=="object"&&t[tt]===Hs,Kr=t=>!!t&&typeof t=="object"&&t[tt]===Ps,Nn=t=>!!t&&typeof t=="object"&&t[tt]===vt,De=t=>!!t&&typeof t=="object"&&t[tt]===Ja,$e=t=>!!t&&typeof t=="object"&&t[tt]===ut,On=t=>!!t&&typeof t=="object"&&t[tt]===rn;function xe(t){if(t&&typeof t=="object")switch(t[tt]){case vt:case rn:return!0}return!1}function Be(t){if(t&&typeof t=="object")switch(t[tt]){case Hs:case vt:case ut:case rn:return!0}return!1}const Wa=t=>($e(t)||xe(t))&&!!t.anchor,Tt=Symbol("break visit"),kh=Symbol("skip children"),vn=Symbol("remove node");function sn(t,e){const n=Sh(e);Kr(t)?Kt(null,t.contents,n,Object.freeze([t]))===vn&&(t.contents=null):Kt(null,t,n,Object.freeze([]))}sn.BREAK=Tt;sn.SKIP=kh;sn.REMOVE=vn;function Kt(t,e,n,r){const s=Ih(t,e,n,r);if(Be(s)||De(s))return Ah(t,r,s),Kt(t,s,n,r);if(typeof s!="symbol"){if(xe(e)){r=Object.freeze(r.concat(e));for(let i=0;i<e.items.length;++i){const o=Kt(i,e.items[i],n,r);if(typeof o=="number")i=o-1;else{if(o===Tt)return Tt;o===vn&&(e.items.splice(i,1),i-=1)}}}else if(De(e)){r=Object.freeze(r.concat(e));const i=Kt("key",e.key,n,r);if(i===Tt)return Tt;i===vn&&(e.key=null);const o=Kt("value",e.value,n,r);if(o===Tt)return Tt;o===vn&&(e.value=null)}}return s}function Sh(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function Ih(t,e,n,r){if(typeof n=="function")return n(t,e,r);if(Nn(e))return n.Map?.(t,e,r);if(On(e))return n.Seq?.(t,e,r);if(De(e))return n.Pair?.(t,e,r);if($e(e))return n.Scalar?.(t,e,r);if(Ft(e))return n.Alias?.(t,e,r)}function Ah(t,e,n){const r=e[e.length-1];if(xe(r))r.items[t]=n;else if(De(r))t==="key"?r.key=n:r.value=n;else if(Kr(r))r.contents=n;else{const s=Ft(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}const Nh={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Oh=t=>t.replace(/[!,[\]{}]/g,e=>Nh[e]);class Ve{constructor(e,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Ve.defaultYaml,e),this.tags=Object.assign({},Ve.defaultTags,n)}clone(){const e=new Ve(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new Ve(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Ve.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Ve.defaultTags);break}return e}add(e,n){this.atNextDocument&&(this.yaml={explicit:Ve.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Ve.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),s=r.shift();switch(s){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[i,o]=r;return this.tags[i]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[i]=r;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;{const o=/^\d+\.\d+$/.test(i);return n(6,`Unsupported YAML version ${i}`,o),!1}}default:return n(0,`Unknown directive ${s}`,!0),!1}}tagName(e,n){if(e==="!")return"!";if(e[0]!=="!")return n(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(n(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&n("Verbatim tags must end with a >"),o)}const[,r,s]=e.match(/^(.*!)([^!]*)$/s);s||n(`The ${e} tag has no suffix`);const i=this.tags[r];if(i)try{return i+decodeURIComponent(s)}catch(o){return n(String(o)),null}return r==="!"?e:(n(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[n,r]of Object.entries(this.tags))if(e.startsWith(r))return n+Oh(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let s;if(e&&r.length>0&&Be(e.contents)){const i={};sn(e.contents,(o,a)=>{Be(a)&&a.tag&&(i[a.tag]=!0)}),s=Object.keys(i)}else s=[];for(const[i,o]of r)i==="!!"&&o==="tag:yaml.org,2002:"||(!e||s.some(a=>a.startsWith(o)))&&n.push(`%TAG ${i} ${o}`);return n.join(`
|
|
21
|
-
`)}}Ve.defaultYaml={explicit:!1,version:"1.2"};Ve.defaultTags={"!!":"tag:yaml.org,2002:"};function Ya(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function Qa(t){const e=new Set;return sn(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function Xa(t,e){for(let n=1;;++n){const r=`${t}${n}`;if(!e.has(r))return r}}function Th(t,e){const n=[],r=new Map;let s=null;return{onAnchor:i=>{n.push(i),s??(s=Qa(t));const o=Xa(e,s);return s.add(o),o},setAnchors:()=>{for(const i of n){const o=r.get(i);if(typeof o=="object"&&o.anchor&&($e(o.node)||xe(o.node)))o.node.anchor=o.anchor;else{const a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=i,a}}},sourceObjects:r}}function Ht(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let s=0,i=r.length;s<i;++s){const o=r[s],a=Ht(t,r,String(s),o);a===void 0?delete r[s]:a!==o&&(r[s]=a)}else if(r instanceof Map)for(const s of Array.from(r.keys())){const i=r.get(s),o=Ht(t,r,s,i);o===void 0?r.delete(s):o!==i&&r.set(s,o)}else if(r instanceof Set)for(const s of Array.from(r)){const i=Ht(t,r,s,s);i===void 0?r.delete(s):i!==s&&(r.delete(s),r.add(i))}else for(const[s,i]of Object.entries(r)){const o=Ht(t,r,s,i);o===void 0?delete r[s]:o!==i&&(r[s]=o)}return t.call(e,n,r)}function et(t,e,n){if(Array.isArray(t))return t.map((r,s)=>et(r,String(s),n));if(t&&typeof t.toJSON=="function"){if(!n||!Wa(t))return t.toJSON(e,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=i=>{r.res=i,delete n.onCreate};const s=t.toJSON(e,n);return n.onCreate&&n.onCreate(s),s}return typeof t=="bigint"&&!n?.keep?Number(t):t}class Gs{constructor(e){Object.defineProperty(this,tt,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:r,onAnchor:s,reviver:i}={}){if(!Kr(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=et(this,"",o);if(typeof s=="function")for(const{count:u,res:f}of o.anchors.values())s(f,u);return typeof i=="function"?Ht(i,{"":a},"",a):a}}class Js extends Gs{constructor(e){super(Hs),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,n){let r;n?.aliasResolveCache?r=n.aliasResolveCache:(r=[],sn(e,{Node:(i,o)=>{(Ft(o)||Wa(o))&&r.push(o)}}),n&&(n.aliasResolveCache=r));let s;for(const i of r){if(i===this)break;i.anchor===this.source&&(s=i)}return s}toJSON(e,n){if(!n)return{source:this.source};const{anchors:r,doc:s,maxAliasCount:i}=n,o=this.resolve(s,n);if(!o){const u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(u)}let a=r.get(o);if(a||(et(o,null,n),a=r.get(o)),!a||a.res===void 0){const u="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(u)}if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=Pr(s,o,r)),a.count*a.aliasCount>i)){const u="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(u)}return a.res}toString(e,n,r){const s=`*${this.source}`;if(e){if(Ya(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(e.implicitKey)return`${s} `}return s}}function Pr(t,e,n){if(Ft(e)){const r=e.resolve(t),s=n&&r&&n.get(r);return s?s.count*s.aliasCount:0}else if(xe(e)){let r=0;for(const s of e.items){const i=Pr(t,s,n);i>r&&(r=i)}return r}else if(De(e)){const r=Pr(t,e.key,n),s=Pr(t,e.value,n);return Math.max(r,s)}return 1}const ec=t=>!t||typeof t!="function"&&typeof t!="object";class ce extends Gs{constructor(e){super(ut),this.value=e}toJSON(e,n){return n?.keep?this.value:et(this.value,e,n)}toString(){return String(this.value)}}ce.BLOCK_FOLDED="BLOCK_FOLDED";ce.BLOCK_LITERAL="BLOCK_LITERAL";ce.PLAIN="PLAIN";ce.QUOTE_DOUBLE="QUOTE_DOUBLE";ce.QUOTE_SINGLE="QUOTE_SINGLE";const Ph="tag:yaml.org,2002:";function Ch(t,e,n){if(e){const r=n.filter(i=>i.tag===e),s=r.find(i=>!i.format)??r[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return n.find(r=>r.identify?.(t)&&!r.format)}function kn(t,e,n){if(Kr(t)&&(t=t.contents),Be(t))return t;if(De(t)){const y=n.schema[vt].createNode?.(n.schema,null,n);return y.items.push(t),y}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:r,onAnchor:s,onTagObj:i,schema:o,sourceObjects:a}=n;let u;if(r&&t&&typeof t=="object"){if(u=a.get(t),u)return u.anchor??(u.anchor=s(t)),new Js(u.anchor);u={anchor:null,node:null},a.set(t,u)}e?.startsWith("!!")&&(e=Ph+e.slice(2));let f=Ch(t,e,o.tags);if(!f){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const y=new ce(t);return u&&(u.node=y),y}f=t instanceof Map?o[vt]:Symbol.iterator in Object(t)?o[rn]:o[vt]}i&&(i(f),delete n.onTagObj);const h=f?.createNode?f.createNode(n.schema,t,n):typeof f?.nodeClass?.from=="function"?f.nodeClass.from(n.schema,t,n):new ce(t);return e?h.tag=e:f.default||(h.tag=f.tag),u&&(u.node=h),h}function jr(t,e,n){let r=n;for(let s=e.length-1;s>=0;--s){const i=e[s];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){const o=[];o[i]=r,r=o}else r=new Map([[i,r]])}return kn(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const yn=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class tc extends Gs{constructor(e,n){super(e),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(e){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(n.schema=e),n.items=n.items.map(r=>Be(r)||De(r)?r.clone(e):r),this.range&&(n.range=this.range.slice()),n}addIn(e,n){if(yn(e))this.add(n);else{const[r,...s]=e,i=this.get(r,!0);if(xe(i))i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,jr(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn(e){const[n,...r]=e;if(r.length===0)return this.delete(n);const s=this.get(n,!0);if(xe(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(e,n){const[r,...s]=e,i=this.get(r,!0);return s.length===0?!n&&$e(i)?i.value:i:xe(i)?i.getIn(s,n):void 0}hasAllNullValues(e){return this.items.every(n=>{if(!De(n))return!1;const r=n.value;return r==null||e&&$e(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[n,...r]=e;if(r.length===0)return this.has(n);const s=this.get(n,!0);return xe(s)?s.hasIn(r):!1}setIn(e,n){const[r,...s]=e;if(s.length===0)this.set(r,n);else{const i=this.get(r,!0);if(xe(i))i.setIn(s,n);else if(i===void 0&&this.schema)this.set(r,jr(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}}const xh=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function ht(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}const Pt=(t,e,n)=>t.endsWith(`
|
|
22
|
-
`)?ht(n,e):n.includes(`
|
|
23
|
-
`)?`
|
|
24
|
-
`+ht(n,e):(t.endsWith(" ")?"":" ")+n,nc="flow",Cs="block",Cr="quoted";function Hr(t,e,n="flow",{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}={}){if(!s||s<0)return t;s<i&&(i=0);const u=Math.max(1+i,1+s-e.length);if(t.length<=u)return t;const f=[],h={};let y=s-e.length;typeof r=="number"&&(r>s-Math.max(2,i)?f.push(0):y=s-r);let d,m,b=!1,w=-1,g=-1,$=-1;n===Cs&&(w=Di(t,w,e.length),w!==-1&&(y=w+u));for(let _;_=t[w+=1];){if(n===Cr&&_==="\\"){switch(g=w,t[w+1]){case"x":w+=3;break;case"u":w+=5;break;case"U":w+=9;break;default:w+=1}$=w}if(_===`
|
|
25
|
-
`)n===Cs&&(w=Di(t,w,e.length)),y=w+e.length+u,d=void 0;else{if(_===" "&&m&&m!==" "&&m!==`
|
|
26
|
-
`&&m!==" "){const I=t[w+1];I&&I!==" "&&I!==`
|
|
27
|
-
`&&I!==" "&&(d=w)}if(w>=y)if(d)f.push(d),y=d+u,d=void 0;else if(n===Cr){for(;m===" "||m===" ";)m=_,_=t[w+=1],b=!0;const I=w>$+1?w-2:g-1;if(h[I])return t;f.push(I),h[I]=!0,y=I+u,d=void 0}else b=!0}m=_}if(b&&a&&a(),f.length===0)return t;o&&o();let p=t.slice(0,f[0]);for(let _=0;_<f.length;++_){const I=f[_],v=f[_+1]||t.length;I===0?p=`
|
|
28
|
-
${e}${t.slice(0,v)}`:(n===Cr&&h[I]&&(p+=`${t[I]}\\`),p+=`
|
|
29
|
-
${e}${t.slice(I+1,v)}`)}return p}function Di(t,e,n){let r=e,s=e+1,i=t[s];for(;i===" "||i===" ";)if(e<s+n)i=t[++e];else{do i=t[++e];while(i&&i!==`
|
|
30
|
-
`);r=e,s=e+1,i=t[s]}return r}const Gr=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Jr=t=>/^(%|---|\.\.\.)/m.test(t);function Bh(t,e,n){if(!e||e<0)return!1;const r=e-n,s=t.length;if(s<=r)return!1;for(let i=0,o=0;i<s;++i)if(t[i]===`
|
|
31
|
-
`){if(i-o>r)return!0;if(o=i+1,s-o<=r)return!1}return!0}function bn(t,e){const n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=e,s=e.options.doubleQuotedMinMultiLineLength,i=e.indent||(Jr(t)?" ":"");let o="",a=0;for(let u=0,f=n[u];f;f=n[++u])if(f===" "&&n[u+1]==="\\"&&n[u+2]==="n"&&(o+=n.slice(a,u)+"\\ ",u+=1,a=u,f="\\"),f==="\\")switch(n[u+1]){case"u":{o+=n.slice(a,u);const h=n.substr(u+2,4);switch(h){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:h.substr(0,2)==="00"?o+="\\x"+h.substr(2):o+=n.substr(u,6)}u+=5,a=u+1}break;case"n":if(r||n[u+2]==='"'||n.length<s)u+=1;else{for(o+=n.slice(a,u)+`
|
|
32
|
-
|
|
33
|
-
`;n[u+2]==="\\"&&n[u+3]==="n"&&n[u+4]!=='"';)o+=`
|
|
34
|
-
`,u+=2;o+=i,n[u+2]===" "&&(o+="\\"),u+=1,a=u+1}break;default:u+=1}return o=a?o+n.slice(a):n,r?o:Hr(o,i,Cr,Gr(e,!1))}function xs(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
|
|
35
|
-
`)||/[ \t]\n|\n[ \t]/.test(t))return bn(t,e);const n=e.indent||(Jr(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
36
|
-
${n}`)+"'";return e.implicitKey?r:Hr(r,n,nc,Gr(e,!1))}function Gt(t,e){const{singleQuote:n}=e.options;let r;if(n===!1)r=bn;else{const s=t.includes('"'),i=t.includes("'");s&&!i?r=xs:i&&!s?r=bn:r=n?xs:bn}return r(t,e)}let Bs;try{Bs=new RegExp(`(^|(?<!
|
|
37
|
-
))
|
|
38
|
-
+(?!
|
|
39
|
-
|$)`,"g")}catch{Bs=/\n+(?!\n|$)/g}function xr({comment:t,type:e,value:n},r,s,i){const{blockQuote:o,commentString:a,lineWidth:u}=r.options;if(!o||/\n[\t ]+$/.test(n))return Gt(n,r);const f=r.indent||(r.forceBlockIndent||Jr(n)?" ":""),h=o==="literal"?!0:o==="folded"||e===ce.BLOCK_FOLDED?!1:e===ce.BLOCK_LITERAL?!0:!Bh(n,u,f.length);if(!n)return h?`|
|
|
40
|
-
`:`>
|
|
41
|
-
`;let y,d;for(d=n.length;d>0;--d){const v=n[d-1];if(v!==`
|
|
42
|
-
`&&v!==" "&&v!==" ")break}let m=n.substring(d);const b=m.indexOf(`
|
|
43
|
-
`);b===-1?y="-":n===m||b!==m.length-1?(y="+",i&&i()):y="",m&&(n=n.slice(0,-m.length),m[m.length-1]===`
|
|
44
|
-
`&&(m=m.slice(0,-1)),m=m.replace(Bs,`$&${f}`));let w=!1,g,$=-1;for(g=0;g<n.length;++g){const v=n[g];if(v===" ")w=!0;else if(v===`
|
|
45
|
-
`)$=g;else break}let p=n.substring(0,$<g?$+1:g);p&&(n=n.substring(p.length),p=p.replace(/\n+/g,`$&${f}`));let I=(w?f?"2":"1":"")+y;if(t&&(I+=" "+a(t.replace(/ ?[\r\n]+/g," ")),s&&s()),!h){const v=n.replace(/\n+/g,`
|
|
46
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${f}`);let S=!1;const N=Gr(r,!0);o!=="folded"&&e!==ce.BLOCK_FOLDED&&(N.onOverflow=()=>{S=!0});const T=Hr(`${p}${v}${m}`,f,Cs,N);if(!S)return`>${I}
|
|
47
|
-
${f}${T}`}return n=n.replace(/\n+/g,`$&${f}`),`|${I}
|
|
48
|
-
${f}${p}${n}${m}`}function Dh(t,e,n,r){const{type:s,value:i}=t,{actualString:o,implicitKey:a,indent:u,indentStep:f,inFlow:h}=e;if(a&&i.includes(`
|
|
49
|
-
`)||h&&/[[\]{},]/.test(i))return Gt(i,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return a||h||!i.includes(`
|
|
50
|
-
`)?Gt(i,e):xr(t,e,n,r);if(!a&&!h&&s!==ce.PLAIN&&i.includes(`
|
|
51
|
-
`))return xr(t,e,n,r);if(Jr(i)){if(u==="")return e.forceBlockIndent=!0,xr(t,e,n,r);if(a&&u===f)return Gt(i,e)}const y=i.replace(/\n+/g,`$&
|
|
52
|
-
${u}`);if(o){const d=w=>w.default&&w.tag!=="tag:yaml.org,2002:str"&&w.test?.test(y),{compat:m,tags:b}=e.doc.schema;if(b.some(d)||m?.some(d))return Gt(i,e)}return a?y:Hr(y,u,nc,Gr(e,!1))}function Ws(t,e,n,r){const{implicitKey:s,inFlow:i}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:a}=t;a!==ce.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=ce.QUOTE_DOUBLE);const u=h=>{switch(h){case ce.BLOCK_FOLDED:case ce.BLOCK_LITERAL:return s||i?Gt(o.value,e):xr(o,e,n,r);case ce.QUOTE_DOUBLE:return bn(o.value,e);case ce.QUOTE_SINGLE:return xs(o.value,e);case ce.PLAIN:return Dh(o,e,n,r);default:return null}};let f=u(a);if(f===null){const{defaultKeyType:h,defaultStringType:y}=e.options,d=s&&h||y;if(f=u(d),f===null)throw new Error(`Unsupported default string type ${d}`)}return f}function rc(t,e){const n=Object.assign({blockQuote:!0,commentString:xh,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function Rh(t,e){if(e.tag){const s=t.filter(i=>i.tag===e.tag);if(s.length>0)return s.find(i=>i.format===e.format)??s[0]}let n,r;if($e(e)){r=e.value;let s=t.filter(i=>i.identify?.(r));if(s.length>1){const i=s.filter(o=>o.test);i.length>0&&(s=i)}n=s.find(i=>i.format===e.format)??s.find(i=>!i.format)}else r=e,n=t.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!n){const s=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${s} value`)}return n}function jh(t,e,{anchors:n,doc:r}){if(!r.directives)return"";const s=[],i=($e(t)||xe(t))&&t.anchor;i&&Ya(i)&&(n.add(i),s.push(`&${i}`));const o=t.tag??(e.default?null:e.tag);return o&&s.push(r.directives.tagString(o)),s.join(" ")}function en(t,e,n,r){if(De(t))return t.toString(e,n,r);if(Ft(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let s;const i=Be(t)?t:e.doc.createNode(t,{onTagObj:u=>s=u});s??(s=Rh(e.doc.schema.tags,i));const o=jh(i,s,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);const a=typeof s.stringify=="function"?s.stringify(i,e,n,r):$e(i)?Ws(i,e,n,r):i.toString(e,n,r);return o?$e(i)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
|
|
53
|
-
${e.indent}${a}`:a}function Fh({key:t,value:e},n,r,s){const{allNullValues:i,doc:o,indent:a,indentStep:u,options:{commentString:f,indentSeq:h,simpleKeys:y}}=n;let d=Be(t)&&t.comment||null;if(y){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(xe(t)||!Be(t)&&typeof t=="object"){const N="With simple keys, collection cannot be used as a key value";throw new Error(N)}}let m=!y&&(!t||d&&e==null&&!n.inFlow||xe(t)||($e(t)?t.type===ce.BLOCK_FOLDED||t.type===ce.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!m&&(y||!i),indent:a+u});let b=!1,w=!1,g=en(t,n,()=>b=!0,()=>w=!0);if(!m&&!n.inFlow&&g.length>1024){if(y)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(n.inFlow){if(i||e==null)return b&&r&&r(),g===""?"?":m?`? ${g}`:g}else if(i&&!y||e==null&&m)return g=`? ${g}`,d&&!b?g+=Pt(g,n.indent,f(d)):w&&s&&s(),g;b&&(d=null),m?(d&&(g+=Pt(g,n.indent,f(d))),g=`? ${g}
|
|
54
|
-
${a}:`):(g=`${g}:`,d&&(g+=Pt(g,n.indent,f(d))));let $,p,_;Be(e)?($=!!e.spaceBefore,p=e.commentBefore,_=e.comment):($=!1,p=null,_=null,e&&typeof e=="object"&&(e=o.createNode(e))),n.implicitKey=!1,!m&&!d&&$e(e)&&(n.indentAtStart=g.length+1),w=!1,!h&&u.length>=2&&!n.inFlow&&!m&&On(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let I=!1;const v=en(e,n,()=>I=!0,()=>w=!0);let S=" ";if(d||$||p){if(S=$?`
|
|
55
|
-
`:"",p){const N=f(p);S+=`
|
|
56
|
-
${ht(N,n.indent)}`}v===""&&!n.inFlow?S===`
|
|
57
|
-
`&&(S=`
|
|
58
|
-
|
|
59
|
-
`):S+=`
|
|
60
|
-
${n.indent}`}else if(!m&&xe(e)){const N=v[0],T=v.indexOf(`
|
|
61
|
-
`),M=T!==-1,H=n.inFlow??e.flow??e.items.length===0;if(M||!H){let J=!1;if(M&&(N==="&"||N==="!")){let Y=v.indexOf(" ");N==="&"&&Y!==-1&&Y<T&&v[Y+1]==="!"&&(Y=v.indexOf(" ",Y+1)),(Y===-1||T<Y)&&(J=!0)}J||(S=`
|
|
62
|
-
${n.indent}`)}}else(v===""||v[0]===`
|
|
63
|
-
`)&&(S="");return g+=S+v,n.inFlow?I&&r&&r():_&&!I?g+=Pt(g,n.indent,f(_)):w&&s&&s(),g}function sc(t,e){(t==="debug"||t==="warn")&&console.warn(e)}const jn="<<",pt={identify:t=>t===jn||typeof t=="symbol"&&t.description===jn,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ce(Symbol(jn)),{addToJSMap:ic}),stringify:()=>jn},zh=(t,e)=>(pt.identify(e)||$e(e)&&(!e.type||e.type===ce.PLAIN)&&pt.identify(e.value))&&t?.doc.schema.tags.some(n=>n.tag===pt.tag&&n.default);function ic(t,e,n){if(n=t&&Ft(n)?n.resolve(t.doc):n,On(n))for(const r of n.items)os(t,e,r);else if(Array.isArray(n))for(const r of n)os(t,e,r);else os(t,e,n)}function os(t,e,n){const r=t&&Ft(n)?n.resolve(t.doc):n;if(!Nn(r))throw new Error("Merge sources must be maps or map aliases");const s=r.toJSON(null,t,Map);for(const[i,o]of s)e instanceof Map?e.has(i)||e.set(i,o):e instanceof Set?e.add(i):Object.prototype.hasOwnProperty.call(e,i)||Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function oc(t,e,{key:n,value:r}){if(Be(n)&&n.addToJSMap)n.addToJSMap(t,e,r);else if(zh(t,n))ic(t,e,r);else{const s=et(n,"",t);if(e instanceof Map)e.set(s,et(r,s,t));else if(e instanceof Set)e.add(s);else{const i=Uh(n,s,t),o=et(r,i,t);i in e?Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[i]=o}}return e}function Uh(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(Be(t)&&n?.doc){const r=rc(n.doc,{});r.anchors=new Set;for(const i of n.anchors.keys())r.anchors.add(i.anchor);r.inFlow=!0,r.inStringifyKey=!0;const s=t.toString(r);if(!n.mapKeyWarned){let i=JSON.stringify(s);i.length>40&&(i=i.substring(0,36)+'..."'),sc(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(e)}function Ys(t,e,n){const r=kn(t,void 0,n),s=kn(e,void 0,n);return new He(r,s)}class He{constructor(e,n=null){Object.defineProperty(this,tt,{value:Ja}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return Be(n)&&(n=n.clone(e)),Be(r)&&(r=r.clone(e)),new He(n,r)}toJSON(e,n){const r=n?.mapAsMap?new Map:{};return oc(n,r,this)}toString(e,n,r){return e?.doc?Fh(this,e,n,r):JSON.stringify(this)}}function ac(t,e,n){return(e.inFlow??t.flow?Lh:Mh)(t,e,n)}function Mh({comment:t,items:e},n,{blockItemPrefix:r,flowChars:s,itemIndent:i,onChompKeep:o,onComment:a}){const{indent:u,options:{commentString:f}}=n,h=Object.assign({},n,{indent:i,type:null});let y=!1;const d=[];for(let b=0;b<e.length;++b){const w=e[b];let g=null;if(Be(w))!y&&w.spaceBefore&&d.push(""),Fr(n,d,w.commentBefore,y),w.comment&&(g=w.comment);else if(De(w)){const p=Be(w.key)?w.key:null;p&&(!y&&p.spaceBefore&&d.push(""),Fr(n,d,p.commentBefore,y))}y=!1;let $=en(w,h,()=>g=null,()=>y=!0);g&&($+=Pt($,i,f(g))),y&&g&&(y=!1),d.push(r+$)}let m;if(d.length===0)m=s.start+s.end;else{m=d[0];for(let b=1;b<d.length;++b){const w=d[b];m+=w?`
|
|
64
|
-
${u}${w}`:`
|
|
65
|
-
`}}return t?(m+=`
|
|
66
|
-
`+ht(f(t),u),a&&a()):y&&o&&o(),m}function Lh({items:t},e,{flowChars:n,itemIndent:r}){const{indent:s,indentStep:i,flowCollectionPadding:o,options:{commentString:a}}=e;r+=i;const u=Object.assign({},e,{indent:r,inFlow:!0,type:null});let f=!1,h=0;const y=[];for(let b=0;b<t.length;++b){const w=t[b];let g=null;if(Be(w))w.spaceBefore&&y.push(""),Fr(e,y,w.commentBefore,!1),w.comment&&(g=w.comment);else if(De(w)){const p=Be(w.key)?w.key:null;p&&(p.spaceBefore&&y.push(""),Fr(e,y,p.commentBefore,!1),p.comment&&(f=!0));const _=Be(w.value)?w.value:null;_?(_.comment&&(g=_.comment),_.commentBefore&&(f=!0)):w.value==null&&p?.comment&&(g=p.comment)}g&&(f=!0);let $=en(w,u,()=>g=null);b<t.length-1&&($+=","),g&&($+=Pt($,r,a(g))),!f&&(y.length>h||$.includes(`
|
|
67
|
-
`))&&(f=!0),y.push($),h=y.length}const{start:d,end:m}=n;if(y.length===0)return d+m;if(!f){const b=y.reduce((w,g)=>w+g.length+2,2);f=e.options.lineWidth>0&&b>e.options.lineWidth}if(f){let b=d;for(const w of y)b+=w?`
|
|
68
|
-
${i}${s}${w}`:`
|
|
69
|
-
`;return`${b}
|
|
70
|
-
${s}${m}`}else return`${d}${o}${y.join(" ")}${o}${m}`}function Fr({indent:t,options:{commentString:e}},n,r,s){if(r&&s&&(r=r.replace(/^\n+/,"")),r){const i=ht(e(r),t);n.push(i.trimStart())}}function Ct(t,e){const n=$e(e)?e.value:e;for(const r of t)if(De(r)&&(r.key===e||r.key===n||$e(r.key)&&r.key.value===n))return r}class Xe extends tc{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(vt,e),this.items=[]}static from(e,n,r){const{keepUndefined:s,replacer:i}=r,o=new this(e),a=(u,f)=>{if(typeof i=="function")f=i.call(n,u,f);else if(Array.isArray(i)&&!i.includes(u))return;(f!==void 0||s)&&o.items.push(Ys(u,f,r))};if(n instanceof Map)for(const[u,f]of n)a(u,f);else if(n&&typeof n=="object")for(const u of Object.keys(n))a(u,n[u]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,n){let r;De(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new He(e,e?.value):r=new He(e.key,e.value);const s=Ct(this.items,r.key),i=this.schema?.sortMapEntries;if(s){if(!n)throw new Error(`Key ${r.key} already set`);$e(s.value)&&ec(r.value)?s.value.value=r.value:s.value=r.value}else if(i){const o=this.items.findIndex(a=>i(r,a)<0);o===-1?this.items.push(r):this.items.splice(o,0,r)}else this.items.push(r)}delete(e){const n=Ct(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){const s=Ct(this.items,e)?.value;return(!n&&$e(s)?s.value:s)??void 0}has(e){return!!Ct(this.items,e)}set(e,n){this.add(new He(e,n),!0)}toJSON(e,n,r){const s=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(s);for(const i of this.items)oc(n,s,i);return s}toString(e,n,r){if(!e)return JSON.stringify(this);for(const s of this.items)if(!De(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),ac(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}}const on={collection:"map",default:!0,nodeClass:Xe,tag:"tag:yaml.org,2002:map",resolve(t,e){return Nn(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>Xe.from(t,e,n)};class Dt extends tc{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(rn,e),this.items=[]}add(e){this.items.push(e)}delete(e){const n=Fn(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){const r=Fn(e);if(typeof r!="number")return;const s=this.items[r];return!n&&$e(s)?s.value:s}has(e){const n=Fn(e);return typeof n=="number"&&n<this.items.length}set(e,n){const r=Fn(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const s=this.items[r];$e(s)&&ec(n)?s.value=n:this.items[r]=n}toJSON(e,n){const r=[];n?.onCreate&&n.onCreate(r);let s=0;for(const i of this.items)r.push(et(i,String(s++),n));return r}toString(e,n,r){return e?ac(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(e,n,r){const{replacer:s}=r,i=new this(e);if(n&&Symbol.iterator in Object(n)){let o=0;for(let a of n){if(typeof s=="function"){const u=n instanceof Set?a:String(o++);a=s.call(n,u,a)}i.items.push(kn(a,void 0,r))}}return i}}function Fn(t){let e=$e(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const an={collection:"seq",default:!0,nodeClass:Dt,tag:"tag:yaml.org,2002:seq",resolve(t,e){return On(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>Dt.from(t,e,n)},Wr={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),Ws(t,e,n,r)}},Yr={identify:t=>t==null,createNode:()=>new ce(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ce(null),stringify:({source:t},e)=>typeof t=="string"&&Yr.test.test(t)?t:e.options.nullStr},Qs={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new ce(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&Qs.test.test(t)){const r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};function at({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);const s=typeof r=="number"?r:Number(r);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let i=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(i)){let o=i.indexOf(".");o<0&&(o=i.length,i+=".");let a=e-(i.length-o-1);for(;a-- >0;)i+="0"}return i}const cc={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:at},uc={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():at(t)}},lc={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const e=new ce(parseFloat(t)),n=t.indexOf(".");return n!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-n-1),e},stringify:at},Qr=t=>typeof t=="bigint"||Number.isInteger(t),Xs=(t,e,n,{intAsBigInt:r})=>r?BigInt(t):parseInt(t.substring(e),n);function fc(t,e,n){const{value:r}=t;return Qr(r)&&r>=0?n+r.toString(e):at(t)}const dc={identify:t=>Qr(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,n)=>Xs(t,2,8,n),stringify:t=>fc(t,8,"0o")},hc={identify:Qr,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,n)=>Xs(t,0,10,n),stringify:at},pc={identify:t=>Qr(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,n)=>Xs(t,2,16,n),stringify:t=>fc(t,16,"0x")},qh=[on,an,Wr,Yr,Qs,dc,hc,pc,cc,uc,lc];function Ri(t){return typeof t=="bigint"||Number.isInteger(t)}const zn=({value:t})=>JSON.stringify(t),Zh=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:zn},{identify:t=>t==null,createNode:()=>new ce(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:zn},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:zn},{identify:Ri,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>Ri(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:zn}],Vh={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Kh=[on,an].concat(Zh,Vh),ei={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof atob=="function"){const n=atob(t.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let s=0;s<n.length;++s)r[s]=n.charCodeAt(s);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:n},r,s,i){if(!n)return"";const o=n;let a;if(typeof btoa=="function"){let u="";for(let f=0;f<o.length;++f)u+=String.fromCharCode(o[f]);a=btoa(u)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=ce.BLOCK_LITERAL),e!==ce.QUOTE_DOUBLE){const u=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),f=Math.ceil(a.length/u),h=new Array(f);for(let y=0,d=0;y<f;++y,d+=u)h[y]=a.substr(d,u);a=h.join(e===ce.BLOCK_LITERAL?`
|
|
71
|
-
`:" ")}return Ws({comment:t,type:e,value:a},r,s,i)}};function mc(t,e){if(On(t))for(let n=0;n<t.items.length;++n){let r=t.items[n];if(!De(r)){if(Nn(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");const s=r.items[0]||new He(new ce(null));if(r.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${r.commentBefore}
|
|
72
|
-
${s.key.commentBefore}`:r.commentBefore),r.comment){const i=s.value??s.key;i.comment=i.comment?`${r.comment}
|
|
73
|
-
${i.comment}`:r.comment}r=s}t.items[n]=De(r)?r:new He(r)}}else e("Expected a sequence for this tag");return t}function gc(t,e,n){const{replacer:r}=n,s=new Dt(t);s.tag="tag:yaml.org,2002:pairs";let i=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof r=="function"&&(o=r.call(e,String(i++),o));let a,u;if(Array.isArray(o))if(o.length===2)a=o[0],u=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const f=Object.keys(o);if(f.length===1)a=f[0],u=o[a];else throw new TypeError(`Expected tuple with one key, not ${f.length} keys`)}else a=o;s.items.push(Ys(a,u,n))}return s}const ti={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:mc,createNode:gc};class Wt extends Dt{constructor(){super(),this.add=Xe.prototype.add.bind(this),this.delete=Xe.prototype.delete.bind(this),this.get=Xe.prototype.get.bind(this),this.has=Xe.prototype.has.bind(this),this.set=Xe.prototype.set.bind(this),this.tag=Wt.tag}toJSON(e,n){if(!n)return super.toJSON(e);const r=new Map;n?.onCreate&&n.onCreate(r);for(const s of this.items){let i,o;if(De(s)?(i=et(s.key,"",n),o=et(s.value,i,n)):i=et(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}static from(e,n,r){const s=gc(e,n,r),i=new this;return i.items=s.items,i}}Wt.tag="tag:yaml.org,2002:omap";const ni={collection:"seq",identify:t=>t instanceof Map,nodeClass:Wt,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const n=mc(t,e),r=[];for(const{key:s}of n.items)$e(s)&&(r.includes(s.value)?e(`Ordered maps must not include duplicate keys: ${s.value}`):r.push(s.value));return Object.assign(new Wt,n)},createNode:(t,e,n)=>Wt.from(t,e,n)};function yc({value:t,source:e},n){return e&&(t?wc:vc).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const wc={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ce(!0),stringify:yc},vc={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ce(!1),stringify:yc},Hh={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:at},Gh={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():at(t)}},Jh={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new ce(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:at},Tn=t=>typeof t=="bigint"||Number.isInteger(t);function Xr(t,e,n,{intAsBigInt:r}){const s=t[0];if((s==="-"||s==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const o=BigInt(t);return s==="-"?BigInt(-1)*o:o}const i=parseInt(t,n);return s==="-"?-1*i:i}function ri(t,e,n){const{value:r}=t;if(Tn(r)){const s=r.toString(e);return r<0?"-"+n+s.substr(1):n+s}return at(t)}const Wh={identify:Tn,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>Xr(t,2,2,n),stringify:t=>ri(t,2,"0b")},Yh={identify:Tn,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>Xr(t,1,8,n),stringify:t=>ri(t,8,"0")},Qh={identify:Tn,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>Xr(t,0,10,n),stringify:at},Xh={identify:Tn,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>Xr(t,2,16,n),stringify:t=>ri(t,16,"0x")};class Yt extends Xe{constructor(e){super(e),this.tag=Yt.tag}add(e){let n;De(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new He(e.key,null):n=new He(e,null),Ct(this.items,n.key)||this.items.push(n)}get(e,n){const r=Ct(this.items,e);return!n&&De(r)?$e(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=Ct(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new He(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:s}=r,i=new this(e);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof s=="function"&&(o=s.call(n,o,o)),i.items.push(Ys(o,null,r));return i}}Yt.tag="tag:yaml.org,2002:set";const si={collection:"map",identify:t=>t instanceof Set,nodeClass:Yt,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,n)=>Yt.from(t,e,n),resolve(t,e){if(Nn(t)){if(t.hasAllNullValues(!0))return Object.assign(new Yt,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};function ii(t,e){const n=t[0],r=n==="-"||n==="+"?t.substring(1):t,s=o=>e?BigInt(o):Number(o),i=r.replace(/_/g,"").split(":").reduce((o,a)=>o*s(60)+s(a),s(0));return n==="-"?s(-1)*i:i}function bc(t){let{value:e}=t,n=o=>o;if(typeof e=="bigint")n=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return at(t);let r="";e<0&&(r="-",e*=n(-1));const s=n(60),i=[e%s];return e<60?i.unshift(0):(e=(e-i[0])/s,i.unshift(e%s),e>=60&&(e=(e-i[0])/s,i.unshift(e))),r+i.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const _c={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:n})=>ii(t,n),stringify:bc},$c={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>ii(t,!1),stringify:bc},es={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const e=t.match(es.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,s,i,o,a]=e.map(Number),u=e[7]?Number((e[7]+"00").substr(1,3)):0;let f=Date.UTC(n,r-1,s,i||0,o||0,a||0,u);const h=e[8];if(h&&h!=="Z"){let y=ii(h,!1);Math.abs(y)<30&&(y*=60),f-=6e4*y}return new Date(f)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},ji=[on,an,Wr,Yr,wc,vc,Wh,Yh,Qh,Xh,Hh,Gh,Jh,ei,pt,ni,ti,si,_c,$c,es],Fi=new Map([["core",qh],["failsafe",[on,an,Wr]],["json",Kh],["yaml11",ji],["yaml-1.1",ji]]),zi={binary:ei,bool:Qs,float:lc,floatExp:uc,floatNaN:cc,floatTime:$c,int:hc,intHex:pc,intOct:dc,intTime:_c,map:on,merge:pt,null:Yr,omap:ni,pairs:ti,seq:an,set:si,timestamp:es},ep={"tag:yaml.org,2002:binary":ei,"tag:yaml.org,2002:merge":pt,"tag:yaml.org,2002:omap":ni,"tag:yaml.org,2002:pairs":ti,"tag:yaml.org,2002:set":si,"tag:yaml.org,2002:timestamp":es};function as(t,e,n){const r=Fi.get(e);if(r&&!t)return n&&!r.includes(pt)?r.concat(pt):r.slice();let s=r;if(!s)if(Array.isArray(t))s=[];else{const i=Array.from(Fi.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${i} or define customTags array`)}if(Array.isArray(t))for(const i of t)s=s.concat(i);else typeof t=="function"&&(s=t(s.slice()));return n&&(s=s.concat(pt)),s.reduce((i,o)=>{const a=typeof o=="string"?zi[o]:o;if(!a){const u=JSON.stringify(o),f=Object.keys(zi).map(h=>JSON.stringify(h)).join(", ");throw new Error(`Unknown custom tag ${u}; use one of ${f}`)}return i.includes(a)||i.push(a),i},[])}const tp=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0;class oi{constructor({compat:e,customTags:n,merge:r,resolveKnownTags:s,schema:i,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?as(e,"compat"):e?as(null,e):null,this.name=typeof i=="string"&&i||"core",this.knownTags=s?ep:{},this.tags=as(n,this.name,r),this.toStringOptions=a??null,Object.defineProperty(this,vt,{value:on}),Object.defineProperty(this,ut,{value:Wr}),Object.defineProperty(this,rn,{value:an}),this.sortMapEntries=typeof o=="function"?o:o===!0?tp:null}clone(){const e=Object.create(oi.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function np(t,e){const n=[];let r=e.directives===!0;if(e.directives!==!1&&t.directives){const u=t.directives.toString(t);u?(n.push(u),r=!0):t.directives.docStart&&(r=!0)}r&&n.push("---");const s=rc(t,e),{commentString:i}=s.options;if(t.commentBefore){n.length!==1&&n.unshift("");const u=i(t.commentBefore);n.unshift(ht(u,""))}let o=!1,a=null;if(t.contents){if(Be(t.contents)){if(t.contents.spaceBefore&&r&&n.push(""),t.contents.commentBefore){const h=i(t.contents.commentBefore);n.push(ht(h,""))}s.forceBlockIndent=!!t.comment,a=t.contents.comment}const u=a?void 0:()=>o=!0;let f=en(t.contents,s,()=>a=null,u);a&&(f+=Pt(f,"",i(a))),(f[0]==="|"||f[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${f}`:n.push(f)}else n.push(en(t.contents,s));if(t.directives?.docEnd)if(t.comment){const u=i(t.comment);u.includes(`
|
|
74
|
-
`)?(n.push("..."),n.push(ht(u,""))):n.push(`... ${u}`)}else n.push("...");else{let u=t.comment;u&&o&&(u=u.replace(/^\n+/,"")),u&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(ht(i(u),"")))}return n.join(`
|
|
75
|
-
`)+`
|
|
76
|
-
`}class ts{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,tt,{value:Ps});let s=null;typeof n=="function"||Array.isArray(n)?s=n:r===void 0&&n&&(r=n,n=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:o}=i;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Ve({version:o}),this.setSchema(o,r),this.contents=e===void 0?null:this.createNode(e,s,r)}clone(){const e=Object.create(ts.prototype,{[tt]:{value:Ps}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Be(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){zt(this.contents)&&this.contents.add(e)}addIn(e,n){zt(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){const r=Qa(this);e.anchor=!n||r.has(n)?Xa(n||"a",r):n}return new Js(e.anchor)}createNode(e,n,r){let s;if(typeof n=="function")e=n.call({"":e},"",e),s=n;else if(Array.isArray(n)){const g=p=>typeof p=="number"||p instanceof String||p instanceof Number,$=n.filter(g).map(String);$.length>0&&(n=n.concat($)),s=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:i,anchorPrefix:o,flow:a,keepUndefined:u,onTagObj:f,tag:h}=r??{},{onAnchor:y,setAnchors:d,sourceObjects:m}=Th(this,o||"a"),b={aliasDuplicateObjects:i??!0,keepUndefined:u??!1,onAnchor:y,onTagObj:f,replacer:s,schema:this.schema,sourceObjects:m},w=kn(e,h,b);return a&&xe(w)&&(w.flow=!0),d(),w}createPair(e,n,r={}){const s=this.createNode(e,null,r),i=this.createNode(n,null,r);return new He(s,i)}delete(e){return zt(this.contents)?this.contents.delete(e):!1}deleteIn(e){return yn(e)?this.contents==null?!1:(this.contents=null,!0):zt(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return xe(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return yn(e)?!n&&$e(this.contents)?this.contents.value:this.contents:xe(this.contents)?this.contents.getIn(e,n):void 0}has(e){return xe(this.contents)?this.contents.has(e):!1}hasIn(e){return yn(e)?this.contents!==void 0:xe(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=jr(this.schema,[e],n):zt(this.contents)&&this.contents.set(e,n)}setIn(e,n){yn(e)?this.contents=n:this.contents==null?this.contents=jr(this.schema,Array.from(e),n):zt(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Ve({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Ve({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const s=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new oi(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:s,onAnchor:i,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},u=et(this.contents,n??"",a);if(typeof i=="function")for(const{count:f,res:h}of a.anchors.values())i(h,f);return typeof o=="function"?Ht(o,{"":u},"",u):u}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return np(this,e)}}function zt(t){if(xe(t))return!0;throw new Error("Expected a YAML collection as document contents")}class Ec extends Error{constructor(e,n,r,s){super(),this.name=e,this.code=r,this.message=s,this.pos=n}}class wn extends Ec{constructor(e,n,r){super("YAMLParseError",e,n,r)}}class rp extends Ec{constructor(e,n,r){super("YAMLWarning",e,n,r)}}const Ui=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(a=>e.linePos(a));const{line:r,col:s}=n.linePos[0];n.message+=` at line ${r}, column ${s}`;let i=s-1,o=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){const a=Math.min(i-39,o.length-79);o="…"+o.substring(a),i-=a-1}if(o.length>80&&(o=o.substring(0,79)+"…"),r>1&&/^ *$/.test(o.substring(0,i))){let a=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);a.length>80&&(a=a.substring(0,79)+`…
|
|
77
|
-
`),o=a+o}if(/[^ ]/.test(o)){let a=1;const u=n.linePos[1];u&&u.line===r&&u.col>s&&(a=Math.max(1,Math.min(u.col-s,80-i)));const f=" ".repeat(i)+"^".repeat(a);n.message+=`:
|
|
78
|
-
|
|
79
|
-
${o}
|
|
80
|
-
${f}
|
|
81
|
-
`}};function tn(t,{flow:e,indicator:n,next:r,offset:s,onError:i,parentIndent:o,startOnNewline:a}){let u=!1,f=a,h=a,y="",d="",m=!1,b=!1,w=null,g=null,$=null,p=null,_=null,I=null,v=null;for(const T of t)switch(b&&(T.type!=="space"&&T.type!=="newline"&&T.type!=="comma"&&i(T.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),b=!1),w&&(f&&T.type!=="comment"&&T.type!=="newline"&&i(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),w=null),T.type){case"space":!e&&(n!=="doc-start"||r?.type!=="flow-collection")&&T.source.includes(" ")&&(w=T),h=!0;break;case"comment":{h||i(T,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const M=T.source.substring(1)||" ";y?y+=d+M:y=M,d="",f=!1;break}case"newline":f?y?y+=T.source:(!I||n!=="seq-item-ind")&&(u=!0):d+=T.source,f=!0,m=!0,(g||$)&&(p=T),h=!0;break;case"anchor":g&&i(T,"MULTIPLE_ANCHORS","A node can have at most one anchor"),T.source.endsWith(":")&&i(T.offset+T.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=T,v??(v=T.offset),f=!1,h=!1,b=!0;break;case"tag":{$&&i(T,"MULTIPLE_TAGS","A node can have at most one tag"),$=T,v??(v=T.offset),f=!1,h=!1,b=!0;break}case n:(g||$)&&i(T,"BAD_PROP_ORDER",`Anchors and tags must be after the ${T.source} indicator`),I&&i(T,"UNEXPECTED_TOKEN",`Unexpected ${T.source} in ${e??"collection"}`),I=T,f=n==="seq-item-ind"||n==="explicit-key-ind",h=!1;break;case"comma":if(e){_&&i(T,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),_=T,f=!1,h=!1;break}default:i(T,"UNEXPECTED_TOKEN",`Unexpected ${T.type} token`),f=!1,h=!1}const S=t[t.length-1],N=S?S.offset+S.source.length:s;return b&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&i(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w&&(f&&w.indent<=o||r?.type==="block-map"||r?.type==="block-seq")&&i(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:_,found:I,spaceBefore:u,comment:y,hasNewline:m,anchor:g,tag:$,newlineAfterProp:p,end:N,start:v??N}}function Sn(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
|
|
82
|
-
`))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const n of e.start)if(n.type==="newline")return!0;if(e.sep){for(const n of e.sep)if(n.type==="newline")return!0}if(Sn(e.key)||Sn(e.value))return!0}return!1;default:return!0}}function Ds(t,e,n){if(e?.type==="flow-collection"){const r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&Sn(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function kc(t,e,n){const{uniqueKeys:r}=t.options;if(r===!1)return!1;const s=typeof r=="function"?r:(i,o)=>i===o||$e(i)&&$e(o)&&i.value===o.value;return e.some(i=>s(i.key,n))}const Mi="All mapping items must start at the same column";function sp({composeNode:t,composeEmptyNode:e},n,r,s,i){const o=i?.nodeClass??Xe,a=new o(n.schema);n.atRoot&&(n.atRoot=!1);let u=r.offset,f=null;for(const h of r.items){const{start:y,key:d,sep:m,value:b}=h,w=tn(y,{indicator:"explicit-key-ind",next:d??m?.[0],offset:u,onError:s,parentIndent:r.indent,startOnNewline:!0}),g=!w.found;if(g){if(d&&(d.type==="block-seq"?s(u,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==r.indent&&s(u,"BAD_INDENT",Mi)),!w.anchor&&!w.tag&&!m){f=w.end,w.comment&&(a.comment?a.comment+=`
|
|
83
|
-
`+w.comment:a.comment=w.comment);continue}(w.newlineAfterProp||Sn(d))&&s(d??y[y.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else w.found?.indent!==r.indent&&s(u,"BAD_INDENT",Mi);n.atKey=!0;const $=w.end,p=d?t(n,d,w,s):e(n,$,y,null,w,s);n.schema.compat&&Ds(r.indent,d,s),n.atKey=!1,kc(n,a.items,p)&&s($,"DUPLICATE_KEY","Map keys must be unique");const _=tn(m??[],{indicator:"map-value-ind",next:b,offset:p.range[2],onError:s,parentIndent:r.indent,startOnNewline:!d||d.type==="block-scalar"});if(u=_.end,_.found){g&&(b?.type==="block-map"&&!_.hasNewline&&s(u,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&w.start<_.found.offset-1024&&s(p.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const I=b?t(n,b,_,s):e(n,u,m,null,_,s);n.schema.compat&&Ds(r.indent,b,s),u=I.range[2];const v=new He(p,I);n.options.keepSourceTokens&&(v.srcToken=h),a.items.push(v)}else{g&&s(p.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),_.comment&&(p.comment?p.comment+=`
|
|
84
|
-
`+_.comment:p.comment=_.comment);const I=new He(p);n.options.keepSourceTokens&&(I.srcToken=h),a.items.push(I)}}return f&&f<u&&s(f,"IMPOSSIBLE","Map comment with trailing content"),a.range=[r.offset,u,f??u],a}function ip({composeNode:t,composeEmptyNode:e},n,r,s,i){const o=i?.nodeClass??Dt,a=new o(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let u=r.offset,f=null;for(const{start:h,value:y}of r.items){const d=tn(h,{indicator:"seq-item-ind",next:y,offset:u,onError:s,parentIndent:r.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||y)y&&y.type==="block-seq"?s(d.end,"BAD_INDENT","All sequence items must start at the same column"):s(u,"MISSING_CHAR","Sequence item without - indicator");else{f=d.end,d.comment&&(a.comment=d.comment);continue}const m=y?t(n,y,d,s):e(n,d.end,h,null,d,s);n.schema.compat&&Ds(r.indent,y,s),u=m.range[2],a.items.push(m)}return a.range=[r.offset,u,f??u],a}function Pn(t,e,n,r){let s="";if(t){let i=!1,o="";for(const a of t){const{source:u,type:f}=a;switch(f){case"space":i=!0;break;case"comment":{n&&!i&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const h=u.substring(1)||" ";s?s+=o+h:s=h,o="";break}case"newline":s&&(o+=u),i=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${f} at node end`)}e+=u.length}}return{comment:s,offset:e}}const cs="Block collections are not allowed within flow collections",us=t=>t&&(t.type==="block-map"||t.type==="block-seq");function op({composeNode:t,composeEmptyNode:e},n,r,s,i){const o=r.start.source==="{",a=o?"flow map":"flow sequence",u=i?.nodeClass??(o?Xe:Dt),f=new u(n.schema);f.flow=!0;const h=n.atRoot;h&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let y=r.offset+r.start.source.length;for(let g=0;g<r.items.length;++g){const $=r.items[g],{start:p,key:_,sep:I,value:v}=$,S=tn(p,{flow:a,indicator:"explicit-key-ind",next:_??I?.[0],offset:y,onError:s,parentIndent:r.indent,startOnNewline:!1});if(!S.found){if(!S.anchor&&!S.tag&&!I&&!v){g===0&&S.comma?s(S.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):g<r.items.length-1&&s(S.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),S.comment&&(f.comment?f.comment+=`
|
|
85
|
-
`+S.comment:f.comment=S.comment),y=S.end;continue}!o&&n.options.strict&&Sn(_)&&s(_,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(g===0)S.comma&&s(S.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(S.comma||s(S.start,"MISSING_CHAR",`Missing , between ${a} items`),S.comment){let N="";e:for(const T of p)switch(T.type){case"comma":case"space":break;case"comment":N=T.source.substring(1);break e;default:break e}if(N){let T=f.items[f.items.length-1];De(T)&&(T=T.value??T.key),T.comment?T.comment+=`
|
|
86
|
-
`+N:T.comment=N,S.comment=S.comment.substring(N.length+1)}}if(!o&&!I&&!S.found){const N=v?t(n,v,S,s):e(n,S.end,I,null,S,s);f.items.push(N),y=N.range[2],us(v)&&s(N.range,"BLOCK_IN_FLOW",cs)}else{n.atKey=!0;const N=S.end,T=_?t(n,_,S,s):e(n,N,p,null,S,s);us(_)&&s(T.range,"BLOCK_IN_FLOW",cs),n.atKey=!1;const M=tn(I??[],{flow:a,indicator:"map-value-ind",next:v,offset:T.range[2],onError:s,parentIndent:r.indent,startOnNewline:!1});if(M.found){if(!o&&!S.found&&n.options.strict){if(I)for(const Y of I){if(Y===M.found)break;if(Y.type==="newline"){s(Y,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}S.start<M.found.offset-1024&&s(M.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else v&&("source"in v&&v.source&&v.source[0]===":"?s(v,"MISSING_CHAR",`Missing space after : in ${a}`):s(M.start,"MISSING_CHAR",`Missing , or : between ${a} items`));const H=v?t(n,v,M,s):M.found?e(n,M.end,I,null,M,s):null;H?us(v)&&s(H.range,"BLOCK_IN_FLOW",cs):M.comment&&(T.comment?T.comment+=`
|
|
87
|
-
`+M.comment:T.comment=M.comment);const J=new He(T,H);if(n.options.keepSourceTokens&&(J.srcToken=$),o){const Y=f;kc(n,Y.items,T)&&s(N,"DUPLICATE_KEY","Map keys must be unique"),Y.items.push(J)}else{const Y=new Xe(n.schema);Y.flow=!0,Y.items.push(J);const se=(H??T).range;Y.range=[T.range[0],se[1],se[2]],f.items.push(Y)}y=H?H.range[2]:M.end}}const d=o?"}":"]",[m,...b]=r.end;let w=y;if(m&&m.source===d)w=m.offset+m.source.length;else{const g=a[0].toUpperCase()+a.substring(1),$=h?`${g} must end with a ${d}`:`${g} in block collection must be sufficiently indented and end with a ${d}`;s(y,h?"MISSING_CHAR":"BAD_INDENT",$),m&&m.source.length!==1&&b.unshift(m)}if(b.length>0){const g=Pn(b,w,n.options.strict,s);g.comment&&(f.comment?f.comment+=`
|
|
88
|
-
`+g.comment:f.comment=g.comment),f.range=[r.offset,w,g.offset]}else f.range=[r.offset,w,w];return f}function ls(t,e,n,r,s,i){const o=n.type==="block-map"?sp(t,e,n,r,i):n.type==="block-seq"?ip(t,e,n,r,i):op(t,e,n,r,i),a=o.constructor;return s==="!"||s===a.tagName?(o.tag=a.tagName,o):(s&&(o.tag=s),o)}function ap(t,e,n,r,s){const i=r.tag,o=i?e.directives.tagName(i.source,d=>s(i,"TAG_RESOLVE_FAILED",d)):null;if(n.type==="block-seq"){const{anchor:d,newlineAfterProp:m}=r,b=d&&i?d.offset>i.offset?d:i:d??i;b&&(!m||m.offset<b.offset)&&s(b,"MISSING_CHAR","Missing newline after block sequence props")}const a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!i||!o||o==="!"||o===Xe.tagName&&a==="map"||o===Dt.tagName&&a==="seq")return ls(t,e,n,s,o);let u=e.schema.tags.find(d=>d.tag===o&&d.collection===a);if(!u){const d=e.schema.knownTags[o];if(d&&d.collection===a)e.schema.tags.push(Object.assign({},d,{default:!1})),u=d;else return d?s(i,"BAD_COLLECTION_TYPE",`${d.tag} used for ${a} collection, but expects ${d.collection??"scalar"}`,!0):s(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),ls(t,e,n,s,o)}const f=ls(t,e,n,s,o,u),h=u.resolve?.(f,d=>s(i,"TAG_RESOLVE_FAILED",d),e.options)??f,y=Be(h)?h:new ce(h);return y.range=f.range,y.tag=o,u?.format&&(y.format=u.format),y}function cp(t,e,n){const r=e.offset,s=up(e,t.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[r,r,r]};const i=s.mode===">"?ce.BLOCK_FOLDED:ce.BLOCK_LITERAL,o=e.source?lp(e.source):[];let a=o.length;for(let w=o.length-1;w>=0;--w){const g=o[w][1];if(g===""||g==="\r")a=w;else break}if(a===0){const w=s.chomp==="+"&&o.length>0?`
|
|
89
|
-
`.repeat(Math.max(1,o.length-1)):"";let g=r+s.length;return e.source&&(g+=e.source.length),{value:w,type:i,comment:s.comment,range:[r,g,g]}}let u=e.indent+s.indent,f=e.offset+s.length,h=0;for(let w=0;w<a;++w){const[g,$]=o[w];if($===""||$==="\r")s.indent===0&&g.length>u&&(u=g.length);else{g.length<u&&n(f+g.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(u=g.length),h=w,u===0&&!t.atRoot&&n(f,"BAD_INDENT","Block scalar values in collections must be indented");break}f+=g.length+$.length+1}for(let w=o.length-1;w>=a;--w)o[w][0].length>u&&(a=w+1);let y="",d="",m=!1;for(let w=0;w<h;++w)y+=o[w][0].slice(u)+`
|
|
90
|
-
`;for(let w=h;w<a;++w){let[g,$]=o[w];f+=g.length+$.length+1;const p=$[$.length-1]==="\r";if(p&&($=$.slice(0,-1)),$&&g.length<u){const I=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(f-$.length-(p?2:1),"BAD_INDENT",I),g=""}i===ce.BLOCK_LITERAL?(y+=d+g.slice(u)+$,d=`
|
|
91
|
-
`):g.length>u||$[0]===" "?(d===" "?d=`
|
|
92
|
-
`:!m&&d===`
|
|
93
|
-
`&&(d=`
|
|
94
|
-
|
|
95
|
-
`),y+=d+g.slice(u)+$,d=`
|
|
96
|
-
`,m=!0):$===""?d===`
|
|
97
|
-
`?y+=`
|
|
98
|
-
`:d=`
|
|
99
|
-
`:(y+=d+$,d=" ",m=!1)}switch(s.chomp){case"-":break;case"+":for(let w=a;w<o.length;++w)y+=`
|
|
100
|
-
`+o[w][0].slice(u);y[y.length-1]!==`
|
|
101
|
-
`&&(y+=`
|
|
102
|
-
`);break;default:y+=`
|
|
103
|
-
`}const b=r+s.length+e.source.length;return{value:y,type:i,comment:s.comment,range:[r,b,b]}}function up({offset:t,props:e},n,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=e[0],i=s[0];let o=0,a="",u=-1;for(let d=1;d<s.length;++d){const m=s[d];if(!a&&(m==="-"||m==="+"))a=m;else{const b=Number(m);!o&&b?o=b:u===-1&&(u=t+d)}}u!==-1&&r(u,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let f=!1,h="",y=s.length;for(let d=1;d<e.length;++d){const m=e[d];switch(m.type){case"space":f=!0;case"newline":y+=m.source.length;break;case"comment":n&&!f&&r(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),y+=m.source.length,h=m.source.substring(1);break;case"error":r(m,"UNEXPECTED_TOKEN",m.message),y+=m.source.length;break;default:{const b=`Unexpected token in block scalar header: ${m.type}`;r(m,"UNEXPECTED_TOKEN",b);const w=m.source;w&&typeof w=="string"&&(y+=w.length)}}}return{mode:i,indent:o,chomp:a,comment:h,length:y}}function lp(t){const e=t.split(/\n( *)/),n=e[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let o=1;o<e.length;o+=2)i.push([e[o],e[o+1]]);return i}function fp(t,e,n){const{offset:r,type:s,source:i,end:o}=t;let a,u;const f=(d,m,b)=>n(r+d,m,b);switch(s){case"scalar":a=ce.PLAIN,u=dp(i,f);break;case"single-quoted-scalar":a=ce.QUOTE_SINGLE,u=hp(i,f);break;case"double-quoted-scalar":a=ce.QUOTE_DOUBLE,u=pp(i,f);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[r,r+i.length,r+i.length]}}const h=r+i.length,y=Pn(o,h,e,n);return{value:u,type:a,comment:y.comment,range:[r,h,y.offset]}}function dp(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),Sc(t)}function hp(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),Sc(t.slice(1,-1)).replace(/''/g,"'")}function Sc(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
104
|
-
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
105
|
-
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(t);if(!r)return t;let s=r[1],i=" ",o=e.lastIndex;for(n.lastIndex=o;r=n.exec(t);)r[1]===""?i===`
|
|
106
|
-
`?s+=i:i=`
|
|
107
|
-
`:(s+=i+r[1],i=" "),o=n.lastIndex;const a=/[ \t]*(.*)/sy;return a.lastIndex=o,r=a.exec(t),s+i+(r?.[1]??"")}function pp(t,e){let n="";for(let r=1;r<t.length-1;++r){const s=t[r];if(!(s==="\r"&&t[r+1]===`
|
|
108
|
-
`))if(s===`
|
|
109
|
-
`){const{fold:i,offset:o}=mp(t,r);n+=i,r=o}else if(s==="\\"){let i=t[++r];const o=gp[i];if(o)n+=o;else if(i===`
|
|
110
|
-
`)for(i=t[r+1];i===" "||i===" ";)i=t[++r+1];else if(i==="\r"&&t[r+1]===`
|
|
111
|
-
`)for(i=t[++r+1];i===" "||i===" ";)i=t[++r+1];else if(i==="x"||i==="u"||i==="U"){const a={x:2,u:4,U:8}[i];n+=yp(t,r+1,a,e),r+=a}else{const a=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),n+=a}}else if(s===" "||s===" "){const i=r;let o=t[r+1];for(;o===" "||o===" ";)o=t[++r+1];o!==`
|
|
112
|
-
`&&!(o==="\r"&&t[r+2]===`
|
|
113
|
-
`)&&(n+=r>i?t.slice(i,r+1):s)}else n+=s}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function mp(t,e){let n="",r=t[e+1];for(;(r===" "||r===" "||r===`
|
|
114
|
-
`||r==="\r")&&!(r==="\r"&&t[e+2]!==`
|
|
115
|
-
`);)r===`
|
|
116
|
-
`&&(n+=`
|
|
117
|
-
`),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}const gp={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
118
|
-
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function yp(t,e,n,r){const s=t.substr(e,n),o=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(o)){const a=t.substr(e-2,n+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}function Ic(t,e,n,r){const{value:s,type:i,comment:o,range:a}=e.type==="block-scalar"?cp(t,e,r):fp(e,t.options.strict,r),u=n?t.directives.tagName(n.source,y=>r(n,"TAG_RESOLVE_FAILED",y)):null;let f;t.options.stringKeys&&t.atKey?f=t.schema[ut]:u?f=wp(t.schema,s,u,n,r):e.type==="scalar"?f=vp(t,s,e,r):f=t.schema[ut];let h;try{const y=f.resolve(s,d=>r(n??e,"TAG_RESOLVE_FAILED",d),t.options);h=$e(y)?y:new ce(y)}catch(y){const d=y instanceof Error?y.message:String(y);r(n??e,"TAG_RESOLVE_FAILED",d),h=new ce(s)}return h.range=a,h.source=s,i&&(h.type=i),u&&(h.tag=u),f.format&&(h.format=f.format),o&&(h.comment=o),h}function wp(t,e,n,r,s){if(n==="!")return t[ut];const i=[];for(const a of t.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)i.push(a);else return a;for(const a of i)if(a.test?.test(e))return a;const o=t.knownTags[n];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(s(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[ut])}function vp({atKey:t,directives:e,schema:n},r,s,i){const o=n.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(r))||n[ut];if(n.compat){const a=n.compat.find(u=>u.default&&u.test?.test(r))??n[ut];if(o.tag!==a.tag){const u=e.tagString(o.tag),f=e.tagString(a.tag),h=`Value may be parsed as either ${u} or ${f}`;i(s,"TAG_RESOLVE_FAILED",h,!0)}}return o}function bp(t,e,n){if(e){n??(n=e.length);for(let r=n-1;r>=0;--r){let s=e[r];switch(s.type){case"space":case"comment":case"newline":t-=s.source.length;continue}for(s=e[++r];s?.type==="space";)t+=s.source.length,s=e[++r];break}}return t}const _p={composeNode:Ac,composeEmptyNode:ai};function Ac(t,e,n,r){const s=t.atKey,{spaceBefore:i,comment:o,anchor:a,tag:u}=n;let f,h=!0;switch(e.type){case"alias":f=$p(t,e,r),(a||u)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":f=Ic(t,e,u,r),a&&(f.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":f=ap(_p,t,e,n,r),a&&(f.anchor=a.source.substring(1));break;default:{const y=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",y),f=ai(t,e.offset,void 0,null,n,r),h=!1}}return a&&f.anchor===""&&r(a,"BAD_ALIAS","Anchor cannot be an empty string"),s&&t.options.stringKeys&&(!$e(f)||typeof f.value!="string"||f.tag&&f.tag!=="tag:yaml.org,2002:str")&&r(u??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(f.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?f.comment=o:f.commentBefore=o),t.options.keepSourceTokens&&h&&(f.srcToken=e),f}function ai(t,e,n,r,{spaceBefore:s,comment:i,anchor:o,tag:a,end:u},f){const h={type:"scalar",offset:bp(e,n,r),indent:-1,source:""},y=Ic(t,h,a,f);return o&&(y.anchor=o.source.substring(1),y.anchor===""&&f(o,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(y.spaceBefore=!0),i&&(y.comment=i,y.range[2]=u),y}function $p({options:t},{offset:e,source:n,end:r},s){const i=new Js(n.substring(1));i.source===""&&s(e,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&s(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=e+n.length,a=Pn(r,o,t.strict,s);return i.range=[e,o,a.offset],a.comment&&(i.comment=a.comment),i}function Ep(t,e,{offset:n,start:r,value:s,end:i},o){const a=Object.assign({_directives:e},t),u=new ts(void 0,a),f={atKey:!1,atRoot:!0,directives:u.directives,options:u.options,schema:u.schema},h=tn(r,{indicator:"doc-start",next:s??i?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});h.found&&(u.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!h.hasNewline&&o(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),u.contents=s?Ac(f,s,h,o):ai(f,h.end,r,null,h,o);const y=u.contents.range[2],d=Pn(i,y,!1,o);return d.comment&&(u.comment=d.comment),u.range=[n,y,d.offset],u}function ln(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function Li(t){let e="",n=!1,r=!1;for(let s=0;s<t.length;++s){const i=t[s];switch(i[0]){case"#":e+=(e===""?"":r?`
|
|
119
|
-
|
|
120
|
-
`:`
|
|
121
|
-
`)+(i.substring(1)||" "),n=!0,r=!1;break;case"%":t[s+1]?.[0]!=="#"&&(s+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:e,afterEmptyLine:r}}class kp{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,s,i)=>{const o=ln(n);i?this.warnings.push(new rp(o,r,s)):this.errors.push(new wn(o,r,s))},this.directives=new Ve({version:e.version||"1.2"}),this.options=e}decorate(e,n){const{comment:r,afterEmptyLine:s}=Li(this.prelude);if(r){const i=e.contents;if(n)e.comment=e.comment?`${e.comment}
|
|
122
|
-
${r}`:r;else if(s||e.directives.docStart||!i)e.commentBefore=r;else if(xe(i)&&!i.flow&&i.items.length>0){let o=i.items[0];De(o)&&(o=o.key);const a=o.commentBefore;o.commentBefore=a?`${r}
|
|
123
|
-
${a}`:r}else{const o=i.commentBefore;i.commentBefore=o?`${r}
|
|
124
|
-
${o}`:r}}n?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Li(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(const s of e)yield*this.next(s);yield*this.end(n,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,r,s)=>{const i=ln(e);i[0]+=n,this.onError(i,"BAD_DIRECTIVE",r,s)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const n=Ep(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new wn(ln(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new wn(ln(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=Pn(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
|
|
125
|
-
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new wn(ln(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const r=Object.assign({_directives:this.directives},this.options),s=new ts(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,n,n],this.decorate(s,!1),yield s}}}const Nc="\uFEFF",Oc="",Tc="",Rs="";function Sp(t){switch(t){case Nc:return"byte-order-mark";case Oc:return"doc-mode";case Tc:return"flow-error-end";case Rs:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
126
|
-
`:case`\r
|
|
127
|
-
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function st(t){switch(t){case void 0:case" ":case`
|
|
128
|
-
`:case"\r":case" ":return!0;default:return!1}}const qi=new Set("0123456789ABCDEFabcdef"),Ip=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Un=new Set(",[]{}"),Ap=new Set(` ,[]{}
|
|
129
|
-
\r `),fs=t=>!t||Ap.has(t);class Np{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
|
|
130
|
-
`?!0:n==="\r"?this.buffer[e+1]===`
|
|
131
|
-
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+e];if(n==="\r"){const s=this.buffer[r+e+1];if(s===`
|
|
132
|
-
`||!s&&!this.atEnd)return e+r+1}return n===`
|
|
133
|
-
`||r>=this.indentNext||!n&&!this.atEnd?e+r:-1}if(n==="-"||n==="."){const r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&st(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
134
|
-
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Nc&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length,r=e.indexOf("#");for(;r!==-1;){const i=e[r-1];if(i===" "||i===" "){n=r-1;break}else r=e.indexOf("#",r+1)}for(;;){const i=e[n-1];if(i===" "||i===" ")n-=1;else break}const s=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-s),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield Oc,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const n=this.peek(3);if((n==="---"||n==="...")&&st(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!st(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&st(n)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(fs),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,r=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);const s=this.getLine();if(s===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&s[0]!=="#"||r===0&&(s.startsWith("---")||s.startsWith("..."))&&st(s[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(s[0]==="]"||s[0]==="}")))return this.flowLevel=0,yield Tc,yield*this.parseLineStart();let i=0;for(;s[i]===",";)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),s[i]){case void 0:return"flow";case"#":return yield*this.pushCount(s.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(fs),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const o=this.charAt(1);if(this.flowKey||st(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let i=0;for(;this.buffer[n-1-i]==="\\";)i+=1;if(i%2===0)break;n=this.buffer.indexOf('"',n+1)}const r=this.buffer.substring(0,n);let s=r.indexOf(`
|
|
135
|
-
`,this.pos);if(s!==-1){for(;s!==-1;){const i=this.continueScalar(s+1);if(i===-1)break;s=r.indexOf(`
|
|
136
|
-
`,i)}s!==-1&&(n=s-(r[s-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const n=this.buffer[++e];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>st(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,r;e:for(let i=this.pos;r=this.buffer[i];++i)switch(r){case" ":n+=1;break;case`
|
|
137
|
-
`:e=i,n=0;break;case"\r":{const o=this.buffer[i+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
|
|
138
|
-
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(`
|
|
139
|
-
`,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let s=e+1;for(r=this.buffer[s];r===" ";)r=this.buffer[++s];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
|
140
|
-
`;)r=this.buffer[++s];e=s-1}else if(!this.blockScalarKeep)do{let i=e-1,o=this.buffer[i];o==="\r"&&(o=this.buffer[--i]);const a=i;for(;o===" ";)o=this.buffer[--i];if(o===`
|
|
141
|
-
`&&i>=this.pos&&i+1+n>a)e=i;else break}while(!0);return yield Rs,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,s;for(;s=this.buffer[++r];)if(s===":"){const i=this.buffer[r+1];if(st(i)||e&&Un.has(i))break;n=r}else if(st(s)){let i=this.buffer[r+1];if(s==="\r"&&(i===`
|
|
142
|
-
`?(r+=1,s=`
|
|
143
|
-
`,i=this.buffer[r+1]):n=r),i==="#"||e&&Un.has(i))break;if(s===`
|
|
144
|
-
`){const o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(e&&Un.has(s))break;n=r}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield Rs,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(fs))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(st(n)||e&&Un.has(n))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!st(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(Ip.has(n))n=this.buffer[++e];else if(n==="%"&&qi.has(this.buffer[e+1])&&qi.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
|
|
145
|
-
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
146
|
-
`?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");const s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class Op{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n<r;){const i=n+r>>1;this.lineStarts[i]<e?n=i+1:r=i}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};const s=this.lineStarts[n-1];return{line:n,col:e-s+1}}}}function wt(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function Zi(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Pc(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Mn(t){switch(t.type){case"document":return t.start;case"block-map":{const e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function Ut(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function Vi(t){if(t.start.type==="flow-seq-start")for(const e of t.items)e.sep&&!e.value&&!wt(e.start,"explicit-key-ind")&&!wt(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Pc(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class Tp{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Np,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(e,n))yield*this.next(r);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const n=Sp(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&Vi(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const s=r.items[r.items.length-1];if(s.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(s.sep)s.value=n;else{Object.assign(s,{key:n,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{const s=r.items[r.items.length-1];s.value?r.items.push({start:[],value:n}):s.value=n;break}case"flow-collection":{const s=r.items[r.items.length-1];!s||s.value?r.items.push({start:[],key:n,sep:[]}):s.sep?s.value=n:Object.assign(s,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const s=n.items[n.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&Zi(s.start)===-1&&(n.indent===0||s.start.every(i=>i.type!=="comment"||i.indent<n.indent))&&(r.type==="document"?r.end=s.start:r.items.push({start:s.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Zi(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const n=this.startBlockValue(e);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const n=Mn(this.peek(2)),r=Ut(n);let s;e.end?(s=e.end,s.push(this.sourceToken),delete e.end):s=[this.sourceToken];const i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
|
|
147
|
-
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
148
|
-
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const s=e.items[e.items.length-2]?.value?.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const r=!this.onKeyLine&&this.indent===e.indent,s=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let i=[];if(s&&n.sep&&!n.value){const o=[];for(let a=0;a<n.sep.length;++a){const u=n.sep[a];switch(u.type){case"newline":o.push(a);break;case"space":break;case"comment":u.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(i=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":s||n.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):s||n.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(wt(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(Pc(n.key)&&!wt(n.sep,"newline")){const o=Ut(n.start),a=n.key,u=n.sep;u.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:u}]})}else i.length>0?n.sep=n.sep.concat(i,this.sourceToken):n.sep.push(this.sourceToken);else if(wt(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const o=Ut(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||s?e.items.push({start:i,key:null,sep:[this.sourceToken]}):wt(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);s||n.value?(e.items.push({start:i,key:o,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(o):(Object.assign(n,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{const o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!n.explicitKey&&n.sep&&!wt(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&e.items.push({start:i});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const s=e.items[e.items.length-2]?.value?.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||wt(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){const r=this.startBlockValue(e);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r&&r.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);!n||n.value?e.items.push({start:[],key:s,sep:[]}):n.sep?this.stack.push(s):Object.assign(n,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const s=Mn(r),i=Ut(s);Vi(e);const o=e.end.splice(1,e.end.length);o.push(this.sourceToken);const a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let n=this.source.indexOf(`
|
|
149
|
-
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
150
|
-
`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=Mn(e),r=Ut(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=Mn(e),r=Ut(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Pp(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new Op||null,prettyErrors:e}}function Cp(t,e={}){const{lineCounter:n,prettyErrors:r}=Pp(e),s=new Tp(n?.addNewLine),i=new kp(e);let o=null;for(const a of i.compose(s.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new wn(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(o.errors.forEach(Ui(t,n)),o.warnings.forEach(Ui(t,n))),o}function xp(t,e,n){let r;const s=Cp(t,n);if(!s)return null;if(s.warnings.forEach(i=>sc(s.options.logLevel,i)),s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:r},n))}var Ge=G({title:Z().optional(),globalTitle:Z().optional(),description:Z().optional(),color:Z().optional(),icon:Z().optional(),iconColor:Z().optional(),avatarUrl:Z().optional(),secondaryIcon:Z().optional(),secondaryIconColor:Z().optional()}),rt=Ge.pick({title:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),Cc=Ge.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),cn=Ge.pick({title:!0,description:!0,avatarUrl:!0,icon:!0,iconColor:!0}).required({title:!0}),Bp=G({createdAt:_e(),updatedAt:_e()}),ot=Z().regex(/^[a-z][a-z0-9-.]+$/,"Name must start with a letter and can only contain lowercase letters, numbers, dashes (-) and dots (.)").min(2).max(64),Cn=nn([Tr([ot,pe("."),pe("v"),qe().int().min(1)]),Tr([ot,pe("."),ot,pe("."),pe("v"),qe().int().min(1)]),Tr([ot,pe("."),ot,pe("."),ot,pe("."),pe("v"),qe().int().min(1)])]),ds=Z().regex(/^[a-z][a-zA-Z0-9]+$/,"Field name must start with a letter and be in camelCase format").min(2).max(64),js=G({type:Cn,required:Ce(),multiple:Ce(),field:Z()});G({type:Cn,extensions:Z().array().optional(),directExtensions:Z().array().optional(),inclusions:js.array().optional(),directInclusions:js.array().optional(),schema:En(),meta:Ge.required({title:!0}).pick({title:!0,description:!0,color:!0,icon:!0,iconColor:!0}),definitionHash:qe()});var Dp=Symbol("runtimeSchema"),xc=gt(["composite","unit"]),Bc=G({schema:En(),[Dp]:hh(ke).optional(),required:Ce(),meta:Ge.required({title:!0}).pick({title:!0,globalTitle:!0,description:!0,color:!0,icon:!0,iconColor:!0})}),Ki=G({type:Cn,required:Ce(),multiple:Ce(),meta:Ge.required({title:!0}).pick({title:!0,description:!0})}),Rp=G({type:ot,kind:xc,args:Ue(ds,Bc),inputs:Ue(ds,Ki),outputs:Ue(ds,Ki),meta:Ge.required({title:!0}).pick({title:!0,description:!0,color:!0,icon:!0,iconColor:!0,secondaryIcon:!0,secondaryIconColor:!0}).extend({category:Z().optional(),defaultNamePrefix:Z()}),definitionHash:qe()}),Dc=G({x:qe(),y:qe()}),mt=Tr([Cn,":",ot]),Qt=G({instanceId:mt,output:Z()}),Fs=G({hubId:Z()}),jp=G({args:Ue(Z(),Bt()).optional(),inputs:Ue(Z(),Ke(Qt)).optional(),hubInputs:Ue(Z(),Ke(Fs)).optional(),injectionInputs:Ke(Fs).optional(),position:Dc.optional()}),hs=G({id:mt,kind:xc,type:Cn,name:ot,...jp.shape,resolvedInputs:Ue(Z(),Ke(Qt)).optional(),parentId:mt.optional(),outputs:Ue(Z(),Ke(Qt)).optional(),resolvedOutputs:Ue(Z(),Ke(Qt)).optional()}),Fp=G({position:Dc.optional(),inputs:Ke(Qt).optional(),injectionInputs:Ke(Fs).optional()}),zp=G({id:ge(),...Fp.shape}),Up=G({"c857cac5-caa6-4421-b82c-e561fbce6367":pe(!0),value:Z()});G({"348d020e-0d9e-4ae7-9415-b91af99f5339":pe(!0),id:qe(),value:Bt()});G({"6d7f9da0-9cb6-496d-b72e-cf85ee4d9cf8":pe(!0),id:qe()});var Mp=G({name:Z(),contentType:Z().optional(),size:qe().optional(),mode:qe().optional()}),Lp=nn([Z(),qe(),Ce(),Z().array()]);G({name:Z(),meta:Ge.pick({title:!0,icon:!0,iconColor:!0}).required({title:!0}),complementaryTo:Z().optional(),value:Lp.optional()});var qp=Bc.extend({readonly:Ce(),computed:Ce()}),Zp=G({package:Z(),path:Z().optional()});G({...Rp.shape,source:Zp,secrets:Ue(Z(),qp)});function ci(t){return"source"in t}var Vp=nn([G({type:pe("before-destroy")})]);G({name:Z(),meta:Ge.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),spec:Vp});var Kp=G({name:Z()}),Hp=G({...Qt.shape,inclusion:js.optional()});G({instanceId:Z(),args:Ue(Z(),Bt()),inputs:Ue(Z(),Hp.array()),invokedTriggers:Kp.array(),secretNames:Z().array(),stateIdMap:Ue(mt,Z()),importBasePath:Z()});var Hi=new WeakMap;function Gp(t){const e=Up.safeParse(t);if(!e.success)return t;const n=Hi.get(t);if(n!==void 0)return n;const r=xp(e.data.value);return Hi.set(t,r),r}var Jp=Symbol("unitArtifactId"),Wp=G({"d55c63ac-3174-4756-808f-f778e99af0d1":pe(!0),[Jp]:Z().optional(),hash:Z(),meta:rt.optional()}),Yp=nn([G({type:pe("embedded"),isBinary:Ce().optional(),value:Z()}),G({type:pe("artifact"),...Wp.shape})]),Rc=G({meta:Mp,content:Yp}),jc=G({image:Z(),command:Z().array(),cwd:Z().optional(),env:Ue(Z(),Z()).optional(),files:Ue(Z(),Rc).optional()});G({name:Z(),meta:Ge.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),spec:jc});var Fc=nn([G({type:pe("markdown"),content:Z()}),G({type:pe("qr"),content:Z(),showContent:ph(),language:Z().optional()}),G({type:pe("file"),file:Rc})]);G({name:Z(),meta:Ge.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),content:Fc.array()});G({name:Z(),image:Z(),params:Ue(Z(),Bt())});G({projectId:ge(),workerVersionId:ge(),apiUrl:kd(),apiKey:Z()});Et("type",[G({type:pe("host")})]);const Qp={id:"q8xbilhwpsn65zjlv5kz44qh"},Xp={id:"n0rfvpl9o77iqf29ff4kk5gf"},em={id:"pmn9y901jeiz2ydh93045l39"},tm={id:"qppfcerovu3h22o0x8rlpc3g"};Et("type",[G({type:pe("codebase")}),G({type:pe("database")})]);G({name:ot,spaceId:ge().default(Qp.id),modelStorageId:ge().default(tm.id),libraryId:ge().default(Xp.id),pulumiBackendId:ge().default(em.id),meta:rt});G({id:Z(),name:ot,meta:rt,spaceId:ge(),modelStorageId:ge(),libraryId:ge(),pulumiBackendId:ge(),...Bp.shape});const nm=G({encryptedIdentities:Ke(Z()),hasPasskey:Ce()});Et("type",[G({type:pe("locked"),unlockSuite:nm.optional()}),G({type:pe("unlocked")})]);Et("type",[G({type:pe("host")})]);const rm=Ge.pick({title:!0,description:!0}).required({title:!0});G({meta:rm,recipient:Z()});const sm=G({key:Z(),order:gt(["asc","desc"])}),kt=G({search:Z().optional(),sortBy:Ke(sm).optional(),skip:qe().int().nonnegative().default(0).optional(),count:qe().int().positive().max(100).default(20).optional()}),im=Ge.pick({title:!0,description:!0}).required({title:!0});G({id:ge(),meta:rt,serviceAccountId:ge(),serviceAccountMeta:cn.nullable(),createdAt:_e()});kt.extend({serviceAccountId:Z().optional()});G({id:ge(),hash:Z(),size:qe(),meta:rt,createdAt:_e(),updatedAt:_e()});kt.extend({stateId:Z().optional(),serviceAccountId:Z().optional(),terminalId:Z().optional(),pageId:Z().optional()});G({name:Z(),meta:rt,value:Z(),message:Z().optional(),order:qe().min(0).max(100).optional()});const om=G({stateId:ge(),meta:rt,acquiredAt:_e()});Et("type",[G({type:pe("locked"),locks:om.array()}),G({type:pe("unlocked"),stateIds:Ke(Z())})]);G({updatedInstances:hs.array().optional(),updatedHubs:zp.array().optional(),updatedVirtualInstances:hs.array().optional(),updatedGhostInstances:hs.array().optional(),deletedInstanceIds:mt.array().optional(),deletedHubIds:Z().array().optional(),deletedVirtualInstanceIds:mt.array().optional(),deletedGhostInstanceIds:mt.array().optional()});const am=gt(["destroy","preview","update","refresh"]),cm=G({id:mt,parentId:Z().optional(),message:Z()}),um=G({type:am,instances:Ke(cm)}),lm=G({forceUpdateDependencies:Ce().default(!1),ignoreDependencies:Ce().default(!1),forceUpdateChildren:Ce().default(!1),destroyDependentInstances:Ce().default(!0),invokeDestroyTriggers:Ce().default(!0),deleteUnreachableResources:Ce().default(!1),forceDeleteState:Ce().default(!1),allowPartialCompositeInstanceUpdate:Ce().default(!1),allowPartialCompositeInstanceDestruction:Ce().default(!1),refresh:Ce().default(!1),debug:Ce().default(!1)}).partial(),zc=gt(["update","preview","destroy","recreate","refresh"]),fm=gt(["pending","running","failing","completed","failed","cancelled","cancelling"]),Uc=Ge.pick({title:!0,description:!0}).required({title:!0}),dm=G({projectId:Z(),type:zc,instanceIds:Ke(mt).min(1),options:lm.partial().optional()});dm.extend({meta:Uc,plan:um.array().optional()});Et("type",[G({type:pe("updated"),operation:En()}),G({type:pe("deleted"),operationId:Z()})]);G({id:ge(),type:zc,status:fm,meta:Uc,startedAt:_e(),updatedAt:_e(),finishedAt:_e().nullable()});const hm=G({id:ge(),meta:rt,name:Z().nullable(),stateId:ge().nullable(),serviceAccountId:ge().nullable(),serviceAccountMeta:cn.nullable(),createdAt:_e(),updatedAt:_e()});kt.extend({serviceAccountId:Z().optional(),stateId:Z().optional(),artifactId:Z().optional()});G({...hm.shape,content:Ke(Fc)});G({id:ge(),meta:Cc,name:Z().nullable(),systemName:Z().nullable(),stateId:ge().nullable(),serviceAccountId:ge().nullable(),serviceAccountMeta:cn.nullable(),createdAt:_e(),updatedAt:_e()});kt.extend({serviceAccountId:Z().optional(),stateId:Z().optional()});G({id:ge(),meta:cn,createdAt:_e(),updatedAt:_e()});kt.extend({artifactId:Z().optional()});G({stateId:Z(),output:Z()});Et("type",[G({type:pe("updated"),state:En()}),G({type:pe("patched"),stateId:Z(),patch:En()}),G({type:pe("deleted"),stateId:Z()})]);Et("type",[G({type:pe("registered"),instanceId:Z(),params:Ue(Z(),Bt())}),G({type:pe("deregistered"),instanceId:Z()})]);const pm=gt(["active","unavailable"]);G({id:ge(),terminalId:ge(),meta:Cc,startedAt:_e(),finishedAt:_e().nullable()});const mm=G({id:ge(),name:Z().nullable(),meta:rt,status:pm,stateId:Z().nullable(),serviceAccountId:Z().nullable(),serviceAccountMeta:cn.nullable(),createdAt:_e(),updatedAt:_e()});kt.extend({serviceAccountId:Z().optional(),stateId:Z().optional(),artifactId:Z().optional()});G({...mm.shape,spec:jc});G({id:ge(),meta:rt,name:Z(),stateId:ge(),createdAt:_e(),updatedAt:_e()});kt.extend({stateId:Z().optional()});const Mc=gt(["password","passkey"]),Lc=Ge.pick({title:!0,description:!0}).required({title:!0});G({meta:Lc,type:Mc,encryptedIdentity:Z(),recipient:Z()});G({id:ge(),type:Mc,meta:Lc,recipient:Z(),createdAt:_e(),updatedAt:_e()});const gm=gt(["unknown","starting","running","stopping","stopped","error"]);G({id:ge(),digest:Z(),meta:rt,status:gm,enabled:Ce(),apiKeyId:Z(),apiKeyMeta:im,createdAt:_e(),updatedAt:_e()});G({id:ge(),identity:Z(),meta:rt,serviceAccountId:Z(),serviceAccountMeta:cn,createdAt:_e()});kt.extend({serviceAccountId:Z().optional()});class ui{constructor(e,n,r,s){this.nodes=e,this.logger=n,this.outputHandler=r,this.dependentSetHandler=s}workset=new Set;dependencyMap=new Map;dependentMap=new Map;outputMap=new Map;addToWorkset(e){this.workset.add(e)}addAllNodesToWorkset(){for(const e of this.nodes.keys())this.workset.add(e)}get outputs(){return this.outputMap}get dependents(){return this.dependentMap}requireOutput(e){const n=this.outputMap.get(e);if(!n)throw new Error(`Output for node ${e} is not available`);return n}getDependents(e){const n=this.dependentMap.get(e);return n?Array.from(n):[]}invalidate(e){const n=[e];for(;n.length>0;){const r=n.pop();if(!this.nodes.has(r))continue;this.outputMap.delete(r),this.workset.add(r);const s=this.dependentMap.get(r);if(s)for(const i of s)this.outputMap.has(i)&&n.push(i)}}invalidateSingle(e){this.nodes.has(e)&&(this.outputMap.delete(e),this.workset.add(e))}async process(e){for(;this.workset.size>0;){const n=this.workset.values().next().value,r=[{nodeId:n,resolved:!1,dependencies:[]}];for(;r.length>0;){const s=r[r.length-1],{nodeId:i,resolved:o}=s,a=this.nodes.get(i);if(!a){this.logger.warn({nodeId:i},"node not found in the graph, skipping"),r.pop();continue}if(this.outputMap.has(i)){r.pop();continue}if(!o){s.dependencies=$h(this.getNodeDependencies(a));let y=!1;for(const d of s.dependencies){if(!this.nodes.has(d)){this.logger.warn({depId:d,nodeId:i},"dependency not found in the graph, skipping");continue}this.outputMap.has(d)||(r.push({nodeId:d,resolved:!1,dependencies:[]}),y=!0)}if(y){s.resolved=!0;continue}}const u=await this.processNode(a,this.logger);if(e?.aborted){this.logger.warn({nodeId:i},"processing aborted, skipping output");return}const f=new Set,h=this.dependencyMap.get(i)??[];for(const y of h){const d=this.dependentMap.get(y);d&&(d.delete(i),f.add(y),d.size===0&&this.dependentMap.delete(y))}for(const y of s.dependencies){let d=this.dependentMap.get(y);d||(d=new Set,this.dependentMap.set(y,d)),d.add(i),f.add(y)}if(this.dependentSetHandler)for(const y of f){const d=this.dependentMap.get(y);this.dependentSetHandler(y,d)}this.outputMap.set(i,u),this.outputHandler?.(i,u),this.dependencyMap.set(i,s.dependencies),r.pop()}this.workset.delete(n)}}}class ym extends ui{getNodeDependencies(e){const n=[];if(e.kind==="hub"){for(const r of e.hub.inputs??[])n.push(`instance:${r.instanceId}`);for(const r of e.hub.injectionInputs??[])n.push(`hub:${r.hubId}`);return n}for(const r of Object.values(e.instance.inputs??{}))for(const s of r)n.push(`instance:${s.instanceId}`);for(const r of Object.values(e.instance.hubInputs??{}))for(const s of r)n.push(`hub:${s.hubId}`);for(const r of e.instance.injectionInputs??[])n.push(`hub:${r.hubId}`);return n}processNode(e){const n=h=>{const y=this.outputs.get(`hub:${h.hubId}`);if(!y)return{resolvedInputs:[]};if(y.kind!=="hub")throw new Error("Expected hub node");return y},r=h=>{const y=this.outputs.get(`instance:${h.instanceId}`);if(!y)return{component:null,resolvedInputs:[],resolvedOutputs:[]};if(y.kind!=="instance")throw new Error("Expected instance node");return{component:y.component,resolvedInputs:y.resolvedInputs[h.output]??[],resolvedOutputs:y.resolvedOutputs?.[h.output]}};if(e.kind==="hub"){const h=new Map,y=d=>{h.set(`${d.input.instanceId}:${d.input.output}`,d)};for(const d of e.hub.inputs??[]){const{component:m}=r(d),b=m?.outputs[d.output];if(!b){this.logger.warn({msg:"output not found in the component",input:d,component:m});continue}y({input:d,type:b.type})}for(const d of e.hub.injectionInputs??[]){const{resolvedInputs:m}=n(d);for(const b of m)y(b)}return{kind:"hub",hub:e.hub,resolvedInputs:Array.from(h.values())}}if(e.instance.resolvedInputs)return{kind:"instance",instance:e.instance,component:e.component,resolvedInputs:bh(e.instance.resolvedInputs,(h,y)=>{const d=e.component.inputs[y];return d?h.map(m=>({input:m,type:d.type})):(this.logger.warn({msg:"input not found in the component",inputName:y,component:e.component}),[])}),resolvedOutputs:e.instance.resolvedOutputs??{},resolvedInjectionInputs:[],matchedInjectionInputs:[]};const s=new Map,i=(h,y)=>{let d=s.get(h);d||(d=new Map,s.set(h,d)),d.set(`${y.input.instanceId}:${y.input.output}`,y)},o=(h,y)=>{const d=e.component.inputs[h];if(!d){this.logger.warn({msg:"input not found in the component",input:y,component:e.component});return}const{component:m,resolvedOutputs:b}=r(y);if(!m){this.logger.warn({instanceId:e.instance.id,input:y},"no output found for the input");return}if(ci(m)){i(h,{input:y,type:d.type});return}if(b)for(const w of b)i(h,{input:w,type:d.type});else i(h,{input:y,type:d.type})};for(const[h,y]of Object.entries(e.instance.inputs??{}))for(const d of y)o(h,d);const a=new Map,u=new Map;for(const h of e.instance.injectionInputs??[]){const{resolvedInputs:y}=n(h);for(const d of y)a.set(`${d.input.instanceId}:${d.input.output}`,d)}for(const[h,y]of Object.entries(e.component.inputs??{})){const d=new Map(a),m=e.instance.hubInputs?.[h]??[];for(const b of m){const{resolvedInputs:w}=n(b);for(const g of w)d.set(`${g.input.instanceId}:${g.input.output}`,g)}for(const b of d.values())if(b.type===y.type){o(h,b.input);const w=`${b.input.instanceId}:${b.input.output}`;a.has(w)&&u.set(w,b)}}const f=vh(Array.from(s.entries()).map(([h,y])=>[h,Array.from(y.values())]));return{kind:"instance",instance:e.instance,component:e.component,resolvedInputs:f,resolvedOutputs:e.instance.resolvedOutputs,resolvedInjectionInputs:Array.from(a.values()),matchedInjectionInputs:Array.from(u.values())}}}function wm(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}const vm=t=>new TextEncoder().encode(t);typeof Buffer<"u"&&Buffer.from;function bm(t){if(!Uint32Array.from){for(var e=new Uint32Array(t.length),n=0;n<t.length;)e[n]=t[n],n+=1;return e}return Uint32Array.from(t)}function ps(t){return new _m().update(t).digest()}var _m=(function(){function t(){this.checksum=4294967295}return t.prototype.update=function(e){var n,r;try{for(var s=wm(e),i=s.next();!i.done;i=s.next()){var o=i.value;this.checksum=this.checksum>>>8^Em[(this.checksum^o)&255]}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return this},t.prototype.digest=function(){return(this.checksum^4294967295)>>>0},t})(),$m=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],Em=bm($m);function km(t){const e=t.length;let n=0,r=0;for(;r<e;){let s=t.charCodeAt(r++);if((s&4294967168)===0){n++;continue}else if((s&4294965248)===0)n+=2;else{if(s>=55296&&s<=56319&&r<e){const i=t.charCodeAt(r);(i&64512)===56320&&(++r,s=((s&1023)<<10)+(i&1023)+65536)}(s&4294901760)===0?n+=3:n+=4}}return n}function Sm(t,e,n){const r=t.length;let s=n,i=0;for(;i<r;){let o=t.charCodeAt(i++);if((o&4294967168)===0){e[s++]=o;continue}else if((o&4294965248)===0)e[s++]=o>>6&31|192;else{if(o>=55296&&o<=56319&&i<r){const a=t.charCodeAt(i);(a&64512)===56320&&(++i,o=((o&1023)<<10)+(a&1023)+65536)}(o&4294901760)===0?(e[s++]=o>>12&15|224,e[s++]=o>>6&63|128):(e[s++]=o>>18&7|240,e[s++]=o>>12&63|128,e[s++]=o>>6&63|128)}e[s++]=o&63|128}}const Im=new TextEncoder,Am=50;function Nm(t,e,n){Im.encodeInto(t,e.subarray(n))}function Om(t,e,n){t.length>Am?Nm(t,e,n):Sm(t,e,n)}new TextDecoder;class Ln{constructor(e,n){this.type=e,this.data=n}}class zr extends Error{constructor(e){super(e);const n=Object.create(zr.prototype);Object.setPrototypeOf(this,n),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:zr.name})}}function Tm(t,e,n){const r=n/4294967296,s=n;t.setUint32(e,r),t.setUint32(e+4,s)}function qc(t,e,n){const r=Math.floor(n/4294967296),s=n;t.setUint32(e,r),t.setUint32(e+4,s)}function Pm(t,e){const n=t.getInt32(e),r=t.getUint32(e+4);return n*4294967296+r}const Cm=-1,xm=4294967296-1,Bm=17179869184-1;function Dm({sec:t,nsec:e}){if(t>=0&&e>=0&&t<=Bm)if(e===0&&t<=xm){const n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t),n}else{const n=t/4294967296,r=t&4294967295,s=new Uint8Array(8),i=new DataView(s.buffer);return i.setUint32(0,e<<2|n&3),i.setUint32(4,r),s}else{const n=new Uint8Array(12),r=new DataView(n.buffer);return r.setUint32(0,e),qc(r,4,t),n}}function Rm(t){const e=t.getTime(),n=Math.floor(e/1e3),r=(e-n*1e3)*1e6,s=Math.floor(r/1e9);return{sec:n+s,nsec:r-s*1e9}}function jm(t){if(t instanceof Date){const e=Rm(t);return Dm(e)}else return null}function Fm(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength);switch(t.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:{const n=e.getUint32(0),r=e.getUint32(4),s=(n&3)*4294967296+r,i=n>>>2;return{sec:s,nsec:i}}case 12:{const n=Pm(e,4),r=e.getUint32(0);return{sec:n,nsec:r}}default:throw new zr(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${t.length}`)}}function zm(t){const e=Fm(t);return new Date(e.sec*1e3+e.nsec/1e6)}const Um={type:Cm,encode:jm,decode:zm};class zs{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(Um)}register({type:e,encode:n,decode:r}){if(e>=0)this.encoders[e]=n,this.decoders[e]=r;else{const s=-1-e;this.builtInEncoders[s]=n,this.builtInDecoders[s]=r}}tryToEncode(e,n){for(let r=0;r<this.builtInEncoders.length;r++){const s=this.builtInEncoders[r];if(s!=null){const i=s(e,n);if(i!=null){const o=-1-r;return new Ln(o,i)}}}for(let r=0;r<this.encoders.length;r++){const s=this.encoders[r];if(s!=null){const i=s(e,n);if(i!=null){const o=r;return new Ln(o,i)}}}return e instanceof Ln?e:null}decode(e,n,r){const s=n<0?this.builtInDecoders[-1-n]:this.decoders[n];return s?s(e,n,r):new Ln(n,e)}}zs.defaultCodec=new zs;function Mm(t){return t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer}function Lm(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Mm(t)?new Uint8Array(t):Uint8Array.from(t)}const qm=100,Zm=2048;class li{constructor(e){this.entered=!1,this.extensionCodec=e?.extensionCodec??zs.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.maxDepth=e?.maxDepth??qm,this.initialBufferSize=e?.initialBufferSize??Zm,this.sortKeys=e?.sortKeys??!1,this.forceFloat32=e?.forceFloat32??!1,this.ignoreUndefined=e?.ignoreUndefined??!1,this.forceIntegerToFloat=e?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new li({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(e){if(this.entered)return this.clone().encodeSharedRef(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(e){if(this.entered)return this.clone().encode(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(e,n){if(n>this.maxDepth)throw new Error(`Too deep objects in depth ${n}`);e==null?this.encodeNil():typeof e=="boolean"?this.encodeBoolean(e):typeof e=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(e):this.encodeNumber(e):typeof e=="string"?this.encodeString(e):this.useBigInt64&&typeof e=="bigint"?this.encodeBigInt64(e):this.encodeObject(e,n)}ensureBufferSizeToWrite(e){const n=this.pos+e;this.view.byteLength<n&&this.resizeBuffer(n*2)}resizeBuffer(e){const n=new ArrayBuffer(e),r=new Uint8Array(n),s=new DataView(n);r.set(this.bytes),this.view=s,this.bytes=r}encodeNil(){this.writeU8(192)}encodeBoolean(e){e===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(e){!this.forceIntegerToFloat&&Number.isSafeInteger(e)?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(211),this.writeI64(e)):this.encodeNumberAsFloat(e)}encodeNumberAsFloat(e){this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))}encodeBigInt64(e){e>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(e)):(this.writeU8(211),this.writeBigInt64(e))}writeStringHeader(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<4294967296)this.writeU8(219),this.writeU32(e);else throw new Error(`Too long string: ${e} bytes in UTF-8`)}encodeString(e){const r=km(e);this.ensureBufferSizeToWrite(5+r),this.writeStringHeader(r),Om(e,this.bytes,this.pos),this.pos+=r}encodeObject(e,n){const r=this.extensionCodec.tryToEncode(e,this.context);if(r!=null)this.encodeExtension(r);else if(Array.isArray(e))this.encodeArray(e,n);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if(typeof e=="object")this.encodeMap(e,n);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(e)}`)}encodeBinary(e){const n=e.byteLength;if(n<256)this.writeU8(196),this.writeU8(n);else if(n<65536)this.writeU8(197),this.writeU16(n);else if(n<4294967296)this.writeU8(198),this.writeU32(n);else throw new Error(`Too large binary: ${n}`);const r=Lm(e);this.writeU8a(r)}encodeArray(e,n){const r=e.length;if(r<16)this.writeU8(144+r);else if(r<65536)this.writeU8(220),this.writeU16(r);else if(r<4294967296)this.writeU8(221),this.writeU32(r);else throw new Error(`Too large array: ${r}`);for(const s of e)this.doEncode(s,n+1)}countWithoutUndefined(e,n){let r=0;for(const s of n)e[s]!==void 0&&r++;return r}encodeMap(e,n){const r=Object.keys(e);this.sortKeys&&r.sort();const s=this.ignoreUndefined?this.countWithoutUndefined(e,r):r.length;if(s<16)this.writeU8(128+s);else if(s<65536)this.writeU8(222),this.writeU16(s);else if(s<4294967296)this.writeU8(223),this.writeU32(s);else throw new Error(`Too large map object: ${s}`);for(const i of r){const o=e[i];this.ignoreUndefined&&o===void 0||(this.encodeString(i),this.doEncode(o,n+1))}}encodeExtension(e){if(typeof e.data=="function"){const r=e.data(this.pos+6),s=r.length;if(s>=4294967296)throw new Error(`Too large extension object: ${s}`);this.writeU8(201),this.writeU32(s),this.writeI8(e.type),this.writeU8a(r);return}const n=e.data.length;if(n===1)this.writeU8(212);else if(n===2)this.writeU8(213);else if(n===4)this.writeU8(214);else if(n===8)this.writeU8(215);else if(n===16)this.writeU8(216);else if(n<256)this.writeU8(199),this.writeU8(n);else if(n<65536)this.writeU8(200),this.writeU16(n);else if(n<4294967296)this.writeU8(201),this.writeU32(n);else throw new Error(`Too large extension object: ${n}`);this.writeI8(e.type),this.writeU8a(e.data)}writeU8(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++}writeU8a(e){const n=e.length;this.ensureBufferSizeToWrite(n),this.bytes.set(e,this.pos),this.pos+=n}writeI8(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++}writeU16(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2}writeI16(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2}writeU32(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4}writeI32(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4}writeF32(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4}writeF64(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8}writeU64(e){this.ensureBufferSizeToWrite(8),Tm(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),qc(this.view,this.pos,e),this.pos+=8}writeBigUint64(e){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,e),this.pos+=8}writeBigInt64(e){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,e),this.pos+=8}}function Vm(t,e){return new li(e).encodeSharedRef(t)}var ms={},fn={},Gi;function Km(){if(Gi)return fn;Gi=1,fn.byteLength=a,fn.toByteArray=f,fn.fromByteArray=d;for(var t=[],e=[],n=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,i=r.length;s<i;++s)t[s]=r[s],e[r.charCodeAt(s)]=s;e[45]=62,e[95]=63;function o(m){var b=m.length;if(b%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var w=m.indexOf("=");w===-1&&(w=b);var g=w===b?0:4-w%4;return[w,g]}function a(m){var b=o(m),w=b[0],g=b[1];return(w+g)*3/4-g}function u(m,b,w){return(b+w)*3/4-w}function f(m){var b,w=o(m),g=w[0],$=w[1],p=new n(u(m,g,$)),_=0,I=$>0?g-4:g,v;for(v=0;v<I;v+=4)b=e[m.charCodeAt(v)]<<18|e[m.charCodeAt(v+1)]<<12|e[m.charCodeAt(v+2)]<<6|e[m.charCodeAt(v+3)],p[_++]=b>>16&255,p[_++]=b>>8&255,p[_++]=b&255;return $===2&&(b=e[m.charCodeAt(v)]<<2|e[m.charCodeAt(v+1)]>>4,p[_++]=b&255),$===1&&(b=e[m.charCodeAt(v)]<<10|e[m.charCodeAt(v+1)]<<4|e[m.charCodeAt(v+2)]>>2,p[_++]=b>>8&255,p[_++]=b&255),p}function h(m){return t[m>>18&63]+t[m>>12&63]+t[m>>6&63]+t[m&63]}function y(m,b,w){for(var g,$=[],p=b;p<w;p+=3)g=(m[p]<<16&16711680)+(m[p+1]<<8&65280)+(m[p+2]&255),$.push(h(g));return $.join("")}function d(m){for(var b,w=m.length,g=w%3,$=[],p=16383,_=0,I=w-g;_<I;_+=p)$.push(y(m,_,_+p>I?I:_+p));return g===1?(b=m[w-1],$.push(t[b>>2]+t[b<<4&63]+"==")):g===2&&(b=(m[w-2]<<8)+m[w-1],$.push(t[b>>10]+t[b>>4&63]+t[b<<2&63]+"=")),$.join("")}return fn}var qn={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var Ji;function Hm(){return Ji||(Ji=1,qn.read=function(t,e,n,r,s){var i,o,a=s*8-r-1,u=(1<<a)-1,f=u>>1,h=-7,y=n?s-1:0,d=n?-1:1,m=t[e+y];for(y+=d,i=m&(1<<-h)-1,m>>=-h,h+=a;h>0;i=i*256+t[e+y],y+=d,h-=8);for(o=i&(1<<-h)-1,i>>=-h,h+=r;h>0;o=o*256+t[e+y],y+=d,h-=8);if(i===0)i=1-f;else{if(i===u)return o?NaN:(m?-1:1)*(1/0);o=o+Math.pow(2,r),i=i-f}return(m?-1:1)*o*Math.pow(2,i-r)},qn.write=function(t,e,n,r,s,i){var o,a,u,f=i*8-s-1,h=(1<<f)-1,y=h>>1,d=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:i-1,b=r?1:-1,w=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),o+y>=1?e+=d/u:e+=d*Math.pow(2,1-y),e*u>=2&&(o++,u/=2),o+y>=h?(a=0,o=h):o+y>=1?(a=(e*u-1)*Math.pow(2,s),o=o+y):(a=e*Math.pow(2,y-1)*Math.pow(2,s),o=0));s>=8;t[n+m]=a&255,m+=b,a/=256,s-=8);for(o=o<<s|a,f+=s;f>0;t[n+m]=o&255,m+=b,o/=256,f-=8);t[n+m-b]|=w*128}),qn}/*!
|
|
151
|
-
* The buffer module from node.js, for the browser.
|
|
152
|
-
*
|
|
153
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
154
|
-
* @license MIT
|
|
155
|
-
*/var Wi;function Gm(){return Wi||(Wi=1,(function(t){const e=Km(),n=Hm(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=p,t.INSPECT_MAX_BYTES=50;const s=2147483647;t.kMaxLength=s,a.TYPED_ARRAY_SUPPORT=i(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const E=new Uint8Array(1),c={foo:function(){return 42}};return Object.setPrototypeOf(c,Uint8Array.prototype),Object.setPrototypeOf(E,c),E.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(E){if(E>s)throw new RangeError('The value "'+E+'" is invalid for option "size"');const c=new Uint8Array(E);return Object.setPrototypeOf(c,a.prototype),c}function a(E,c,l){if(typeof E=="number"){if(typeof c=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return y(E)}return u(E,c,l)}a.poolSize=8192;function u(E,c,l){if(typeof E=="string")return d(E,c);if(ArrayBuffer.isView(E))return b(E);if(E==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E);if(Fe(E,ArrayBuffer)||E&&Fe(E.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Fe(E,SharedArrayBuffer)||E&&Fe(E.buffer,SharedArrayBuffer)))return w(E,c,l);if(typeof E=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const A=E.valueOf&&E.valueOf();if(A!=null&&A!==E)return a.from(A,c,l);const C=g(E);if(C)return C;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof E[Symbol.toPrimitive]=="function")return a.from(E[Symbol.toPrimitive]("string"),c,l);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E)}a.from=function(E,c,l){return u(E,c,l)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function f(E){if(typeof E!="number")throw new TypeError('"size" argument must be of type number');if(E<0)throw new RangeError('The value "'+E+'" is invalid for option "size"')}function h(E,c,l){return f(E),E<=0?o(E):c!==void 0?typeof l=="string"?o(E).fill(c,l):o(E).fill(c):o(E)}a.alloc=function(E,c,l){return h(E,c,l)};function y(E){return f(E),o(E<0?0:$(E)|0)}a.allocUnsafe=function(E){return y(E)},a.allocUnsafeSlow=function(E){return y(E)};function d(E,c){if((typeof c!="string"||c==="")&&(c="utf8"),!a.isEncoding(c))throw new TypeError("Unknown encoding: "+c);const l=_(E,c)|0;let A=o(l);const C=A.write(E,c);return C!==l&&(A=A.slice(0,C)),A}function m(E){const c=E.length<0?0:$(E.length)|0,l=o(c);for(let A=0;A<c;A+=1)l[A]=E[A]&255;return l}function b(E){if(Fe(E,Uint8Array)){const c=new Uint8Array(E);return w(c.buffer,c.byteOffset,c.byteLength)}return m(E)}function w(E,c,l){if(c<0||E.byteLength<c)throw new RangeError('"offset" is outside of buffer bounds');if(E.byteLength<c+(l||0))throw new RangeError('"length" is outside of buffer bounds');let A;return c===void 0&&l===void 0?A=new Uint8Array(E):l===void 0?A=new Uint8Array(E,c):A=new Uint8Array(E,c,l),Object.setPrototypeOf(A,a.prototype),A}function g(E){if(a.isBuffer(E)){const c=$(E.length)|0,l=o(c);return l.length===0||E.copy(l,0,0,c),l}if(E.length!==void 0)return typeof E.length!="number"||Le(E.length)?o(0):m(E);if(E.type==="Buffer"&&Array.isArray(E.data))return m(E.data)}function $(E){if(E>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return E|0}function p(E){return+E!=E&&(E=0),a.alloc(+E)}a.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==a.prototype},a.compare=function(c,l){if(Fe(c,Uint8Array)&&(c=a.from(c,c.offset,c.byteLength)),Fe(l,Uint8Array)&&(l=a.from(l,l.offset,l.byteLength)),!a.isBuffer(c)||!a.isBuffer(l))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===l)return 0;let A=c.length,C=l.length;for(let R=0,q=Math.min(A,C);R<q;++R)if(c[R]!==l[R]){A=c[R],C=l[R];break}return A<C?-1:C<A?1:0},a.isEncoding=function(c){switch(String(c).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(c,l){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return a.alloc(0);let A;if(l===void 0)for(l=0,A=0;A<c.length;++A)l+=c[A].length;const C=a.allocUnsafe(l);let R=0;for(A=0;A<c.length;++A){let q=c[A];if(Fe(q,Uint8Array))R+q.length>C.length?(a.isBuffer(q)||(q=a.from(q)),q.copy(C,R)):Uint8Array.prototype.set.call(C,q,R);else if(a.isBuffer(q))q.copy(C,R);else throw new TypeError('"list" argument must be an Array of Buffers');R+=q.length}return C};function _(E,c){if(a.isBuffer(E))return E.length;if(ArrayBuffer.isView(E)||Fe(E,ArrayBuffer))return E.byteLength;if(typeof E!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof E);const l=E.length,A=arguments.length>2&&arguments[2]===!0;if(!A&&l===0)return 0;let C=!1;for(;;)switch(c){case"ascii":case"latin1":case"binary":return l;case"utf8":case"utf-8":return we(E).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l*2;case"hex":return l>>>1;case"base64":return je(E).length;default:if(C)return A?-1:we(E).length;c=(""+c).toLowerCase(),C=!0}}a.byteLength=_;function I(E,c,l){let A=!1;if((c===void 0||c<0)&&(c=0),c>this.length||((l===void 0||l>this.length)&&(l=this.length),l<=0)||(l>>>=0,c>>>=0,l<=c))return"";for(E||(E="utf8");;)switch(E){case"hex":return oe(this,c,l);case"utf8":case"utf-8":return le(this,c,l);case"ascii":return re(this,c,l);case"latin1":case"binary":return ne(this,c,l);case"base64":return se(this,c,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,c,l);default:if(A)throw new TypeError("Unknown encoding: "+E);E=(E+"").toLowerCase(),A=!0}}a.prototype._isBuffer=!0;function v(E,c,l){const A=E[c];E[c]=E[l],E[l]=A}a.prototype.swap16=function(){const c=this.length;if(c%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let l=0;l<c;l+=2)v(this,l,l+1);return this},a.prototype.swap32=function(){const c=this.length;if(c%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let l=0;l<c;l+=4)v(this,l,l+3),v(this,l+1,l+2);return this},a.prototype.swap64=function(){const c=this.length;if(c%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let l=0;l<c;l+=8)v(this,l,l+7),v(this,l+1,l+6),v(this,l+2,l+5),v(this,l+3,l+4);return this},a.prototype.toString=function(){const c=this.length;return c===0?"":arguments.length===0?le(this,0,c):I.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(c){if(!a.isBuffer(c))throw new TypeError("Argument must be a Buffer");return this===c?!0:a.compare(this,c)===0},a.prototype.inspect=function(){let c="";const l=t.INSPECT_MAX_BYTES;return c=this.toString("hex",0,l).replace(/(.{2})/g,"$1 ").trim(),this.length>l&&(c+=" ... "),"<Buffer "+c+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(c,l,A,C,R){if(Fe(c,Uint8Array)&&(c=a.from(c,c.offset,c.byteLength)),!a.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof c);if(l===void 0&&(l=0),A===void 0&&(A=c?c.length:0),C===void 0&&(C=0),R===void 0&&(R=this.length),l<0||A>c.length||C<0||R>this.length)throw new RangeError("out of range index");if(C>=R&&l>=A)return 0;if(C>=R)return-1;if(l>=A)return 1;if(l>>>=0,A>>>=0,C>>>=0,R>>>=0,this===c)return 0;let q=R-C,de=A-l;const Te=Math.min(q,de),Se=this.slice(C,R),Pe=c.slice(l,A);for(let ve=0;ve<Te;++ve)if(Se[ve]!==Pe[ve]){q=Se[ve],de=Pe[ve];break}return q<de?-1:de<q?1:0};function S(E,c,l,A,C){if(E.length===0)return-1;if(typeof l=="string"?(A=l,l=0):l>2147483647?l=2147483647:l<-2147483648&&(l=-2147483648),l=+l,Le(l)&&(l=C?0:E.length-1),l<0&&(l=E.length+l),l>=E.length){if(C)return-1;l=E.length-1}else if(l<0)if(C)l=0;else return-1;if(typeof c=="string"&&(c=a.from(c,A)),a.isBuffer(c))return c.length===0?-1:N(E,c,l,A,C);if(typeof c=="number")return c=c&255,typeof Uint8Array.prototype.indexOf=="function"?C?Uint8Array.prototype.indexOf.call(E,c,l):Uint8Array.prototype.lastIndexOf.call(E,c,l):N(E,[c],l,A,C);throw new TypeError("val must be string, number or Buffer")}function N(E,c,l,A,C){let R=1,q=E.length,de=c.length;if(A!==void 0&&(A=String(A).toLowerCase(),A==="ucs2"||A==="ucs-2"||A==="utf16le"||A==="utf-16le")){if(E.length<2||c.length<2)return-1;R=2,q/=2,de/=2,l/=2}function Te(Pe,ve){return R===1?Pe[ve]:Pe.readUInt16BE(ve*R)}let Se;if(C){let Pe=-1;for(Se=l;Se<q;Se++)if(Te(E,Se)===Te(c,Pe===-1?0:Se-Pe)){if(Pe===-1&&(Pe=Se),Se-Pe+1===de)return Pe*R}else Pe!==-1&&(Se-=Se-Pe),Pe=-1}else for(l+de>q&&(l=q-de),Se=l;Se>=0;Se--){let Pe=!0;for(let ve=0;ve<de;ve++)if(Te(E,Se+ve)!==Te(c,ve)){Pe=!1;break}if(Pe)return Se}return-1}a.prototype.includes=function(c,l,A){return this.indexOf(c,l,A)!==-1},a.prototype.indexOf=function(c,l,A){return S(this,c,l,A,!0)},a.prototype.lastIndexOf=function(c,l,A){return S(this,c,l,A,!1)};function T(E,c,l,A){l=Number(l)||0;const C=E.length-l;A?(A=Number(A),A>C&&(A=C)):A=C;const R=c.length;A>R/2&&(A=R/2);let q;for(q=0;q<A;++q){const de=parseInt(c.substr(q*2,2),16);if(Le(de))return q;E[l+q]=de}return q}function M(E,c,l,A){return Oe(we(c,E.length-l),E,l,A)}function H(E,c,l,A){return Oe(Re(c),E,l,A)}function J(E,c,l,A){return Oe(je(c),E,l,A)}function Y(E,c,l,A){return Oe(Me(c,E.length-l),E,l,A)}a.prototype.write=function(c,l,A,C){if(l===void 0)C="utf8",A=this.length,l=0;else if(A===void 0&&typeof l=="string")C=l,A=this.length,l=0;else if(isFinite(l))l=l>>>0,isFinite(A)?(A=A>>>0,C===void 0&&(C="utf8")):(C=A,A=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const R=this.length-l;if((A===void 0||A>R)&&(A=R),c.length>0&&(A<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");C||(C="utf8");let q=!1;for(;;)switch(C){case"hex":return T(this,c,l,A);case"utf8":case"utf-8":return M(this,c,l,A);case"ascii":case"latin1":case"binary":return H(this,c,l,A);case"base64":return J(this,c,l,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,c,l,A);default:if(q)throw new TypeError("Unknown encoding: "+C);C=(""+C).toLowerCase(),q=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function se(E,c,l){return c===0&&l===E.length?e.fromByteArray(E):e.fromByteArray(E.slice(c,l))}function le(E,c,l){l=Math.min(E.length,l);const A=[];let C=c;for(;C<l;){const R=E[C];let q=null,de=R>239?4:R>223?3:R>191?2:1;if(C+de<=l){let Te,Se,Pe,ve;switch(de){case 1:R<128&&(q=R);break;case 2:Te=E[C+1],(Te&192)===128&&(ve=(R&31)<<6|Te&63,ve>127&&(q=ve));break;case 3:Te=E[C+1],Se=E[C+2],(Te&192)===128&&(Se&192)===128&&(ve=(R&15)<<12|(Te&63)<<6|Se&63,ve>2047&&(ve<55296||ve>57343)&&(q=ve));break;case 4:Te=E[C+1],Se=E[C+2],Pe=E[C+3],(Te&192)===128&&(Se&192)===128&&(Pe&192)===128&&(ve=(R&15)<<18|(Te&63)<<12|(Se&63)<<6|Pe&63,ve>65535&&ve<1114112&&(q=ve))}}q===null?(q=65533,de=1):q>65535&&(q-=65536,A.push(q>>>10&1023|55296),q=56320|q&1023),A.push(q),C+=de}return W(A)}const z=4096;function W(E){const c=E.length;if(c<=z)return String.fromCharCode.apply(String,E);let l="",A=0;for(;A<c;)l+=String.fromCharCode.apply(String,E.slice(A,A+=z));return l}function re(E,c,l){let A="";l=Math.min(E.length,l);for(let C=c;C<l;++C)A+=String.fromCharCode(E[C]&127);return A}function ne(E,c,l){let A="";l=Math.min(E.length,l);for(let C=c;C<l;++C)A+=String.fromCharCode(E[C]);return A}function oe(E,c,l){const A=E.length;(!c||c<0)&&(c=0),(!l||l<0||l>A)&&(l=A);let C="";for(let R=c;R<l;++R)C+=un[E[R]];return C}function V(E,c,l){const A=E.slice(c,l);let C="";for(let R=0;R<A.length-1;R+=2)C+=String.fromCharCode(A[R]+A[R+1]*256);return C}a.prototype.slice=function(c,l){const A=this.length;c=~~c,l=l===void 0?A:~~l,c<0?(c+=A,c<0&&(c=0)):c>A&&(c=A),l<0?(l+=A,l<0&&(l=0)):l>A&&(l=A),l<c&&(l=c);const C=this.subarray(c,l);return Object.setPrototypeOf(C,a.prototype),C};function P(E,c,l){if(E%1!==0||E<0)throw new RangeError("offset is not uint");if(E+c>l)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(c,l,A){c=c>>>0,l=l>>>0,A||P(c,l,this.length);let C=this[c],R=1,q=0;for(;++q<l&&(R*=256);)C+=this[c+q]*R;return C},a.prototype.readUintBE=a.prototype.readUIntBE=function(c,l,A){c=c>>>0,l=l>>>0,A||P(c,l,this.length);let C=this[c+--l],R=1;for(;l>0&&(R*=256);)C+=this[c+--l]*R;return C},a.prototype.readUint8=a.prototype.readUInt8=function(c,l){return c=c>>>0,l||P(c,1,this.length),this[c]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(c,l){return c=c>>>0,l||P(c,2,this.length),this[c]|this[c+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(c,l){return c=c>>>0,l||P(c,2,this.length),this[c]<<8|this[c+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(c,l){return c=c>>>0,l||P(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+this[c+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(c,l){return c=c>>>0,l||P(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},a.prototype.readBigUInt64LE=Qe(function(c){c=c>>>0,L(c,"offset");const l=this[c],A=this[c+7];(l===void 0||A===void 0)&&K(c,this.length-8);const C=l+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24,R=this[++c]+this[++c]*2**8+this[++c]*2**16+A*2**24;return BigInt(C)+(BigInt(R)<<BigInt(32))}),a.prototype.readBigUInt64BE=Qe(function(c){c=c>>>0,L(c,"offset");const l=this[c],A=this[c+7];(l===void 0||A===void 0)&&K(c,this.length-8);const C=l*2**24+this[++c]*2**16+this[++c]*2**8+this[++c],R=this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+A;return(BigInt(C)<<BigInt(32))+BigInt(R)}),a.prototype.readIntLE=function(c,l,A){c=c>>>0,l=l>>>0,A||P(c,l,this.length);let C=this[c],R=1,q=0;for(;++q<l&&(R*=256);)C+=this[c+q]*R;return R*=128,C>=R&&(C-=Math.pow(2,8*l)),C},a.prototype.readIntBE=function(c,l,A){c=c>>>0,l=l>>>0,A||P(c,l,this.length);let C=l,R=1,q=this[c+--C];for(;C>0&&(R*=256);)q+=this[c+--C]*R;return R*=128,q>=R&&(q-=Math.pow(2,8*l)),q},a.prototype.readInt8=function(c,l){return c=c>>>0,l||P(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},a.prototype.readInt16LE=function(c,l){c=c>>>0,l||P(c,2,this.length);const A=this[c]|this[c+1]<<8;return A&32768?A|4294901760:A},a.prototype.readInt16BE=function(c,l){c=c>>>0,l||P(c,2,this.length);const A=this[c+1]|this[c]<<8;return A&32768?A|4294901760:A},a.prototype.readInt32LE=function(c,l){return c=c>>>0,l||P(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},a.prototype.readInt32BE=function(c,l){return c=c>>>0,l||P(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},a.prototype.readBigInt64LE=Qe(function(c){c=c>>>0,L(c,"offset");const l=this[c],A=this[c+7];(l===void 0||A===void 0)&&K(c,this.length-8);const C=this[c+4]+this[c+5]*2**8+this[c+6]*2**16+(A<<24);return(BigInt(C)<<BigInt(32))+BigInt(l+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24)}),a.prototype.readBigInt64BE=Qe(function(c){c=c>>>0,L(c,"offset");const l=this[c],A=this[c+7];(l===void 0||A===void 0)&&K(c,this.length-8);const C=(l<<24)+this[++c]*2**16+this[++c]*2**8+this[++c];return(BigInt(C)<<BigInt(32))+BigInt(this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+A)}),a.prototype.readFloatLE=function(c,l){return c=c>>>0,l||P(c,4,this.length),n.read(this,c,!0,23,4)},a.prototype.readFloatBE=function(c,l){return c=c>>>0,l||P(c,4,this.length),n.read(this,c,!1,23,4)},a.prototype.readDoubleLE=function(c,l){return c=c>>>0,l||P(c,8,this.length),n.read(this,c,!0,52,8)},a.prototype.readDoubleBE=function(c,l){return c=c>>>0,l||P(c,8,this.length),n.read(this,c,!1,52,8)};function j(E,c,l,A,C,R){if(!a.isBuffer(E))throw new TypeError('"buffer" argument must be a Buffer instance');if(c>C||c<R)throw new RangeError('"value" argument is out of bounds');if(l+A>E.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(c,l,A,C){if(c=+c,l=l>>>0,A=A>>>0,!C){const de=Math.pow(2,8*A)-1;j(this,c,l,A,de,0)}let R=1,q=0;for(this[l]=c&255;++q<A&&(R*=256);)this[l+q]=c/R&255;return l+A},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(c,l,A,C){if(c=+c,l=l>>>0,A=A>>>0,!C){const de=Math.pow(2,8*A)-1;j(this,c,l,A,de,0)}let R=A-1,q=1;for(this[l+R]=c&255;--R>=0&&(q*=256);)this[l+R]=c/q&255;return l+A},a.prototype.writeUint8=a.prototype.writeUInt8=function(c,l,A){return c=+c,l=l>>>0,A||j(this,c,l,1,255,0),this[l]=c&255,l+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(c,l,A){return c=+c,l=l>>>0,A||j(this,c,l,2,65535,0),this[l]=c&255,this[l+1]=c>>>8,l+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(c,l,A){return c=+c,l=l>>>0,A||j(this,c,l,2,65535,0),this[l]=c>>>8,this[l+1]=c&255,l+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(c,l,A){return c=+c,l=l>>>0,A||j(this,c,l,4,4294967295,0),this[l+3]=c>>>24,this[l+2]=c>>>16,this[l+1]=c>>>8,this[l]=c&255,l+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(c,l,A){return c=+c,l=l>>>0,A||j(this,c,l,4,4294967295,0),this[l]=c>>>24,this[l+1]=c>>>16,this[l+2]=c>>>8,this[l+3]=c&255,l+4};function B(E,c,l,A,C){D(c,A,C,E,l,7);let R=Number(c&BigInt(4294967295));E[l++]=R,R=R>>8,E[l++]=R,R=R>>8,E[l++]=R,R=R>>8,E[l++]=R;let q=Number(c>>BigInt(32)&BigInt(4294967295));return E[l++]=q,q=q>>8,E[l++]=q,q=q>>8,E[l++]=q,q=q>>8,E[l++]=q,l}function k(E,c,l,A,C){D(c,A,C,E,l,7);let R=Number(c&BigInt(4294967295));E[l+7]=R,R=R>>8,E[l+6]=R,R=R>>8,E[l+5]=R,R=R>>8,E[l+4]=R;let q=Number(c>>BigInt(32)&BigInt(4294967295));return E[l+3]=q,q=q>>8,E[l+2]=q,q=q>>8,E[l+1]=q,q=q>>8,E[l]=q,l+8}a.prototype.writeBigUInt64LE=Qe(function(c,l=0){return B(this,c,l,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Qe(function(c,l=0){return k(this,c,l,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(c,l,A,C){if(c=+c,l=l>>>0,!C){const Te=Math.pow(2,8*A-1);j(this,c,l,A,Te-1,-Te)}let R=0,q=1,de=0;for(this[l]=c&255;++R<A&&(q*=256);)c<0&&de===0&&this[l+R-1]!==0&&(de=1),this[l+R]=(c/q>>0)-de&255;return l+A},a.prototype.writeIntBE=function(c,l,A,C){if(c=+c,l=l>>>0,!C){const Te=Math.pow(2,8*A-1);j(this,c,l,A,Te-1,-Te)}let R=A-1,q=1,de=0;for(this[l+R]=c&255;--R>=0&&(q*=256);)c<0&&de===0&&this[l+R+1]!==0&&(de=1),this[l+R]=(c/q>>0)-de&255;return l+A},a.prototype.writeInt8=function(c,l,A){return c=+c,l=l>>>0,A||j(this,c,l,1,127,-128),c<0&&(c=255+c+1),this[l]=c&255,l+1},a.prototype.writeInt16LE=function(c,l,A){return c=+c,l=l>>>0,A||j(this,c,l,2,32767,-32768),this[l]=c&255,this[l+1]=c>>>8,l+2},a.prototype.writeInt16BE=function(c,l,A){return c=+c,l=l>>>0,A||j(this,c,l,2,32767,-32768),this[l]=c>>>8,this[l+1]=c&255,l+2},a.prototype.writeInt32LE=function(c,l,A){return c=+c,l=l>>>0,A||j(this,c,l,4,2147483647,-2147483648),this[l]=c&255,this[l+1]=c>>>8,this[l+2]=c>>>16,this[l+3]=c>>>24,l+4},a.prototype.writeInt32BE=function(c,l,A){return c=+c,l=l>>>0,A||j(this,c,l,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[l]=c>>>24,this[l+1]=c>>>16,this[l+2]=c>>>8,this[l+3]=c&255,l+4},a.prototype.writeBigInt64LE=Qe(function(c,l=0){return B(this,c,l,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Qe(function(c,l=0){return k(this,c,l,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function O(E,c,l,A,C,R){if(l+A>E.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("Index out of range")}function F(E,c,l,A,C){return c=+c,l=l>>>0,C||O(E,c,l,4),n.write(E,c,l,A,23,4),l+4}a.prototype.writeFloatLE=function(c,l,A){return F(this,c,l,!0,A)},a.prototype.writeFloatBE=function(c,l,A){return F(this,c,l,!1,A)};function X(E,c,l,A,C){return c=+c,l=l>>>0,C||O(E,c,l,8),n.write(E,c,l,A,52,8),l+8}a.prototype.writeDoubleLE=function(c,l,A){return X(this,c,l,!0,A)},a.prototype.writeDoubleBE=function(c,l,A){return X(this,c,l,!1,A)},a.prototype.copy=function(c,l,A,C){if(!a.isBuffer(c))throw new TypeError("argument should be a Buffer");if(A||(A=0),!C&&C!==0&&(C=this.length),l>=c.length&&(l=c.length),l||(l=0),C>0&&C<A&&(C=A),C===A||c.length===0||this.length===0)return 0;if(l<0)throw new RangeError("targetStart out of bounds");if(A<0||A>=this.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("sourceEnd out of bounds");C>this.length&&(C=this.length),c.length-l<C-A&&(C=c.length-l+A);const R=C-A;return this===c&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(l,A,C):Uint8Array.prototype.set.call(c,this.subarray(A,C),l),R},a.prototype.fill=function(c,l,A,C){if(typeof c=="string"){if(typeof l=="string"?(C=l,l=0,A=this.length):typeof A=="string"&&(C=A,A=this.length),C!==void 0&&typeof C!="string")throw new TypeError("encoding must be a string");if(typeof C=="string"&&!a.isEncoding(C))throw new TypeError("Unknown encoding: "+C);if(c.length===1){const q=c.charCodeAt(0);(C==="utf8"&&q<128||C==="latin1")&&(c=q)}}else typeof c=="number"?c=c&255:typeof c=="boolean"&&(c=Number(c));if(l<0||this.length<l||this.length<A)throw new RangeError("Out of range index");if(A<=l)return this;l=l>>>0,A=A===void 0?this.length:A>>>0,c||(c=0);let R;if(typeof c=="number")for(R=l;R<A;++R)this[R]=c;else{const q=a.isBuffer(c)?c:a.from(c,C),de=q.length;if(de===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(R=0;R<A-l;++R)this[R+l]=q[R%de]}return this};const Q={};function fe(E,c,l){Q[E]=class extends l{constructor(){super(),Object.defineProperty(this,"message",{value:c.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${E}]`,this.stack,delete this.name}get code(){return E}set code(C){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:C,writable:!0})}toString(){return`${this.name} [${E}]: ${this.message}`}}}fe("ERR_BUFFER_OUT_OF_BOUNDS",function(E){return E?`${E} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),fe("ERR_INVALID_ARG_TYPE",function(E,c){return`The "${E}" argument must be of type number. Received type ${typeof c}`},TypeError),fe("ERR_OUT_OF_RANGE",function(E,c,l){let A=`The value of "${E}" is out of range.`,C=l;return Number.isInteger(l)&&Math.abs(l)>2**32?C=ie(String(l)):typeof l=="bigint"&&(C=String(l),(l>BigInt(2)**BigInt(32)||l<-(BigInt(2)**BigInt(32)))&&(C=ie(C)),C+="n"),A+=` It must be ${c}. Received ${C}`,A},RangeError);function ie(E){let c="",l=E.length;const A=E[0]==="-"?1:0;for(;l>=A+4;l-=3)c=`_${E.slice(l-3,l)}${c}`;return`${E.slice(0,l)}${c}`}function x(E,c,l){L(c,"offset"),(E[c]===void 0||E[c+l]===void 0)&&K(c,E.length-(l+1))}function D(E,c,l,A,C,R){if(E>l||E<c){const q=typeof c=="bigint"?"n":"";let de;throw c===0||c===BigInt(0)?de=`>= 0${q} and < 2${q} ** ${(R+1)*8}${q}`:de=`>= -(2${q} ** ${(R+1)*8-1}${q}) and < 2 ** ${(R+1)*8-1}${q}`,new Q.ERR_OUT_OF_RANGE("value",de,E)}x(A,C,R)}function L(E,c){if(typeof E!="number")throw new Q.ERR_INVALID_ARG_TYPE(c,"number",E)}function K(E,c,l){throw Math.floor(E)!==E?(L(E,l),new Q.ERR_OUT_OF_RANGE("offset","an integer",E)):c<0?new Q.ERR_BUFFER_OUT_OF_BOUNDS:new Q.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${c}`,E)}const ee=/[^+/0-9A-Za-z-_]/g;function ae(E){if(E=E.split("=")[0],E=E.trim().replace(ee,""),E.length<2)return"";for(;E.length%4!==0;)E=E+"=";return E}function we(E,c){c=c||1/0;let l;const A=E.length;let C=null;const R=[];for(let q=0;q<A;++q){if(l=E.charCodeAt(q),l>55295&&l<57344){if(!C){if(l>56319){(c-=3)>-1&&R.push(239,191,189);continue}else if(q+1===A){(c-=3)>-1&&R.push(239,191,189);continue}C=l;continue}if(l<56320){(c-=3)>-1&&R.push(239,191,189),C=l;continue}l=(C-55296<<10|l-56320)+65536}else C&&(c-=3)>-1&&R.push(239,191,189);if(C=null,l<128){if((c-=1)<0)break;R.push(l)}else if(l<2048){if((c-=2)<0)break;R.push(l>>6|192,l&63|128)}else if(l<65536){if((c-=3)<0)break;R.push(l>>12|224,l>>6&63|128,l&63|128)}else if(l<1114112){if((c-=4)<0)break;R.push(l>>18|240,l>>12&63|128,l>>6&63|128,l&63|128)}else throw new Error("Invalid code point")}return R}function Re(E){const c=[];for(let l=0;l<E.length;++l)c.push(E.charCodeAt(l)&255);return c}function Me(E,c){let l,A,C;const R=[];for(let q=0;q<E.length&&!((c-=2)<0);++q)l=E.charCodeAt(q),A=l>>8,C=l%256,R.push(C),R.push(A);return R}function je(E){return e.toByteArray(ae(E))}function Oe(E,c,l,A){let C;for(C=0;C<A&&!(C+l>=c.length||C>=E.length);++C)c[C+l]=E[C];return C}function Fe(E,c){return E instanceof c||E!=null&&E.constructor!=null&&E.constructor.name!=null&&E.constructor.name===c.name}function Le(E){return E!==E}const un=(function(){const E="0123456789abcdef",c=new Array(256);for(let l=0;l<16;++l){const A=l*16;for(let C=0;C<16;++C)c[A+C]=E[l]+E[C]}return c})();function Qe(E){return typeof BigInt>"u"?It:E}function It(){throw new Error("BigInt not supported")}})(ms)),ms}var dn=Gm();function Mt(t){const e=new ArrayBuffer(4);return new DataView(e).setInt32(0,t,!0),new Uint8Array(e)}class Jm extends ui{getNodeDependencies({resolvedInputs:e}){const n=[];for(const r of Object.values(e??{}))for(const s of r)n.push(s.input.instanceId);return n}processNode({instance:e,component:n,resolvedInputs:r,sourceHash:s,state:i}){const o=[];o.push(dn.Buffer.from(e.id)),o.push(Mt(n.definitionHash)),i?.inputHashNonce&&o.push(Mt(i.inputHashNonce)),e.args&&o.push(Vm(e.args)),s?o.push(Mt(s)):ci(n)&&this.logger.warn({instanceId:e.id},"missing source hash for unit model, this may lead to incorrect input hash");const a=[...o],u=Object.entries(r).sort(([d],[m])=>d.localeCompare(m)),f=new Set;for(const[d,m]of u){if(Object.keys(m).length===0)continue;a.push(dn.Buffer.from(d));const b=m.map(w=>w.input.instanceId).sort();for(const w of b){const g=this.outputs.get(w);if(!g){this.logger.warn({instanceId:w,dependentInstanceId:e.id},"missing dependency when calculating input hash, this may lead to incorrect input hash");continue}a.push(Mt(g.inputHash)),a.push(Mt(g.outputHash)),f.add(w)}}const h=[],y=Array.from(f).sort();for(const d of y){const m=this.outputs.get(d);if(!m){this.logger.warn({instanceId:d,dependentInstanceId:e.id},"missing dependency when calculating dependency output hash, this may lead to incorrect input hash");continue}h.push(Mt(m.outputHash))}return{selfHash:ps(dn.Buffer.concat(o)),inputHash:ps(dn.Buffer.concat(a)),dependencyOutputHash:ps(dn.Buffer.concat(h)),outputHash:i?.outputHash??0}}}var Zn={exports:{}},gs={},lt={},At={},ys={},ws={},vs={},Yi;function Ur(){return Yi||(Yi=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends e{constructor(p){if(super(),!t.IDENTIFIER.test(p))throw new Error("CodeGen: name must be a valid identifier");this.str=p}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class r extends e{constructor(p){super(),this._items=typeof p=="string"?[p]:p}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const p=this._items[0];return p===""||p==='""'}get str(){var p;return(p=this._str)!==null&&p!==void 0?p:this._str=this._items.reduce((_,I)=>`${_}${I}`,"")}get names(){var p;return(p=this._names)!==null&&p!==void 0?p:this._names=this._items.reduce((_,I)=>(I instanceof n&&(_[I.str]=(_[I.str]||0)+1),_),{})}}t._Code=r,t.nil=new r("");function s($,...p){const _=[$[0]];let I=0;for(;I<p.length;)a(_,p[I]),_.push($[++I]);return new r(_)}t._=s;const i=new r("+");function o($,...p){const _=[m($[0])];let I=0;for(;I<p.length;)_.push(i),a(_,p[I]),_.push(i,m($[++I]));return u(_),new r(_)}t.str=o;function a($,p){p instanceof r?$.push(...p._items):p instanceof n?$.push(p):$.push(y(p))}t.addCodeArg=a;function u($){let p=1;for(;p<$.length-1;){if($[p]===i){const _=f($[p-1],$[p+1]);if(_!==void 0){$.splice(p-1,3,_);continue}$[p++]="+"}p++}}function f($,p){if(p==='""')return $;if($==='""')return p;if(typeof $=="string")return p instanceof n||$[$.length-1]!=='"'?void 0:typeof p!="string"?`${$.slice(0,-1)}${p}"`:p[0]==='"'?$.slice(0,-1)+p.slice(1):void 0;if(typeof p=="string"&&p[0]==='"'&&!($ instanceof n))return`"${$}${p.slice(1)}`}function h($,p){return p.emptyStr()?$:$.emptyStr()?p:o`${$}${p}`}t.strConcat=h;function y($){return typeof $=="number"||typeof $=="boolean"||$===null?$:m(Array.isArray($)?$.join(","):$)}function d($){return new r(m($))}t.stringify=d;function m($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=m;function b($){return typeof $=="string"&&t.IDENTIFIER.test($)?new r(`.${$}`):s`[${$}]`}t.getProperty=b;function w($){if(typeof $=="string"&&t.IDENTIFIER.test($))return new r(`${$}`);throw new Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}t.getEsmExportName=w;function g($){return new r($.toString())}t.regexpCode=g})(vs)),vs}var bs={},Qi;function Xi(){return Qi||(Qi=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=Ur();class n extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var r;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(r||(t.UsedValueState=r={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class s{constructor({prefixes:f,parent:h}={}){this._names={},this._prefixes=f,this._parent=h}toName(f){return f instanceof e.Name?f:this.name(f)}name(f){return new e.Name(this._newName(f))}_newName(f){const h=this._names[f]||this._nameGroup(f);return`${f}${h.index++}`}_nameGroup(f){var h,y;if(!((y=(h=this._parent)===null||h===void 0?void 0:h._prefixes)===null||y===void 0)&&y.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}t.Scope=s;class i extends e.Name{constructor(f,h){super(h),this.prefix=f}setValue(f,{property:h,itemIndex:y}){this.value=f,this.scopePath=(0,e._)`.${new e.Name(h)}[${y}]`}}t.ValueScopeName=i;const o=(0,e._)`\n`;class a extends s{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?o:e.nil}}get(){return this._scope}name(f){return new i(f,this._newName(f))}value(f,h){var y;if(h.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const d=this.toName(f),{prefix:m}=d,b=(y=h.key)!==null&&y!==void 0?y:h.ref;let w=this._values[m];if(w){const p=w.get(b);if(p)return p}else w=this._values[m]=new Map;w.set(b,d);const g=this._scope[m]||(this._scope[m]=[]),$=g.length;return g[$]=h.ref,d.setValue(h,{property:m,itemIndex:$}),d}getValue(f,h){const y=this._values[f];if(y)return y.get(h)}scopeRefs(f,h=this._values){return this._reduceValues(h,y=>{if(y.scopePath===void 0)throw new Error(`CodeGen: name "${y}" has no value`);return(0,e._)`${f}${y.scopePath}`})}scopeCode(f=this._values,h,y){return this._reduceValues(f,d=>{if(d.value===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return d.value.code},h,y)}_reduceValues(f,h,y={},d){let m=e.nil;for(const b in f){const w=f[b];if(!w)continue;const g=y[b]=y[b]||new Map;w.forEach($=>{if(g.has($))return;g.set($,r.Started);let p=h($);if(p){const _=this.opts.es5?t.varKinds.var:t.varKinds.const;m=(0,e._)`${m}${_} ${$} = ${p};${this.opts._n}`}else if(p=d?.($))m=(0,e._)`${m}${p}${this.opts._n}`;else throw new n($);g.set($,r.Completed)})}return m}}t.ValueScope=a})(bs)),bs}var eo;function he(){return eo||(eo=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=Ur(),n=Xi();var r=Ur();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}});var s=Xi();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class i{optimizeNodes(){return this}optimizeNames(k,O){return this}}class o extends i{constructor(k,O,F){super(),this.varKind=k,this.name=O,this.rhs=F}render({es5:k,_n:O}){const F=k?n.varKinds.var:this.varKind,X=this.rhs===void 0?"":` = ${this.rhs}`;return`${F} ${this.name}${X};`+O}optimizeNames(k,O){if(k[this.name.str])return this.rhs&&(this.rhs=le(this.rhs,k,O)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class a extends i{constructor(k,O,F){super(),this.lhs=k,this.rhs=O,this.sideEffects=F}render({_n:k}){return`${this.lhs} = ${this.rhs};`+k}optimizeNames(k,O){if(!(this.lhs instanceof e.Name&&!k[this.lhs.str]&&!this.sideEffects))return this.rhs=le(this.rhs,k,O),this}get names(){const k=this.lhs instanceof e.Name?{}:{...this.lhs.names};return se(k,this.rhs)}}class u extends a{constructor(k,O,F,X){super(k,F,X),this.op=O}render({_n:k}){return`${this.lhs} ${this.op}= ${this.rhs};`+k}}class f extends i{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`${this.label}:`+k}}class h extends i{constructor(k){super(),this.label=k,this.names={}}render({_n:k}){return`break${this.label?` ${this.label}`:""};`+k}}class y extends i{constructor(k){super(),this.error=k}render({_n:k}){return`throw ${this.error};`+k}get names(){return this.error.names}}class d extends i{constructor(k){super(),this.code=k}render({_n:k}){return`${this.code};`+k}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(k,O){return this.code=le(this.code,k,O),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class m extends i{constructor(k=[]){super(),this.nodes=k}render(k){return this.nodes.reduce((O,F)=>O+F.render(k),"")}optimizeNodes(){const{nodes:k}=this;let O=k.length;for(;O--;){const F=k[O].optimizeNodes();Array.isArray(F)?k.splice(O,1,...F):F?k[O]=F:k.splice(O,1)}return k.length>0?this:void 0}optimizeNames(k,O){const{nodes:F}=this;let X=F.length;for(;X--;){const Q=F[X];Q.optimizeNames(k,O)||(z(k,Q.names),F.splice(X,1))}return F.length>0?this:void 0}get names(){return this.nodes.reduce((k,O)=>Y(k,O.names),{})}}class b extends m{render(k){return"{"+k._n+super.render(k)+"}"+k._n}}class w extends m{}class g extends b{}g.kind="else";class $ extends b{constructor(k,O){super(O),this.condition=k}render(k){let O=`if(${this.condition})`+super.render(k);return this.else&&(O+="else "+this.else.render(k)),O}optimizeNodes(){super.optimizeNodes();const k=this.condition;if(k===!0)return this.nodes;let O=this.else;if(O){const F=O.optimizeNodes();O=this.else=Array.isArray(F)?new g(F):F}if(O)return k===!1?O instanceof $?O:O.nodes:this.nodes.length?this:new $(W(k),O instanceof $?[O]:O.nodes);if(!(k===!1||!this.nodes.length))return this}optimizeNames(k,O){var F;if(this.else=(F=this.else)===null||F===void 0?void 0:F.optimizeNames(k,O),!!(super.optimizeNames(k,O)||this.else))return this.condition=le(this.condition,k,O),this}get names(){const k=super.names;return se(k,this.condition),this.else&&Y(k,this.else.names),k}}$.kind="if";class p extends b{}p.kind="for";class _ extends p{constructor(k){super(),this.iteration=k}render(k){return`for(${this.iteration})`+super.render(k)}optimizeNames(k,O){if(super.optimizeNames(k,O))return this.iteration=le(this.iteration,k,O),this}get names(){return Y(super.names,this.iteration.names)}}class I extends p{constructor(k,O,F,X){super(),this.varKind=k,this.name=O,this.from=F,this.to=X}render(k){const O=k.es5?n.varKinds.var:this.varKind,{name:F,from:X,to:Q}=this;return`for(${O} ${F}=${X}; ${F}<${Q}; ${F}++)`+super.render(k)}get names(){const k=se(super.names,this.from);return se(k,this.to)}}class v extends p{constructor(k,O,F,X){super(),this.loop=k,this.varKind=O,this.name=F,this.iterable=X}render(k){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(k)}optimizeNames(k,O){if(super.optimizeNames(k,O))return this.iterable=le(this.iterable,k,O),this}get names(){return Y(super.names,this.iterable.names)}}class S extends b{constructor(k,O,F){super(),this.name=k,this.args=O,this.async=F}render(k){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(k)}}S.kind="func";class N extends m{render(k){return"return "+super.render(k)}}N.kind="return";class T extends b{render(k){let O="try"+super.render(k);return this.catch&&(O+=this.catch.render(k)),this.finally&&(O+=this.finally.render(k)),O}optimizeNodes(){var k,O;return super.optimizeNodes(),(k=this.catch)===null||k===void 0||k.optimizeNodes(),(O=this.finally)===null||O===void 0||O.optimizeNodes(),this}optimizeNames(k,O){var F,X;return super.optimizeNames(k,O),(F=this.catch)===null||F===void 0||F.optimizeNames(k,O),(X=this.finally)===null||X===void 0||X.optimizeNames(k,O),this}get names(){const k=super.names;return this.catch&&Y(k,this.catch.names),this.finally&&Y(k,this.finally.names),k}}class M extends b{constructor(k){super(),this.error=k}render(k){return`catch(${this.error})`+super.render(k)}}M.kind="catch";class H extends b{render(k){return"finally"+super.render(k)}}H.kind="finally";class J{constructor(k,O={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...O,_n:O.lines?`
|
|
156
|
-
`:""},this._extScope=k,this._scope=new n.Scope({parent:k}),this._nodes=[new w]}toString(){return this._root.render(this.opts)}name(k){return this._scope.name(k)}scopeName(k){return this._extScope.name(k)}scopeValue(k,O){const F=this._extScope.value(k,O);return(this._values[F.prefix]||(this._values[F.prefix]=new Set)).add(F),F}getScopeValue(k,O){return this._extScope.getValue(k,O)}scopeRefs(k){return this._extScope.scopeRefs(k,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(k,O,F,X){const Q=this._scope.toName(O);return F!==void 0&&X&&(this._constants[Q.str]=F),this._leafNode(new o(k,Q,F)),Q}const(k,O,F){return this._def(n.varKinds.const,k,O,F)}let(k,O,F){return this._def(n.varKinds.let,k,O,F)}var(k,O,F){return this._def(n.varKinds.var,k,O,F)}assign(k,O,F){return this._leafNode(new a(k,O,F))}add(k,O){return this._leafNode(new u(k,t.operators.ADD,O))}code(k){return typeof k=="function"?k():k!==e.nil&&this._leafNode(new d(k)),this}object(...k){const O=["{"];for(const[F,X]of k)O.length>1&&O.push(","),O.push(F),(F!==X||this.opts.es5)&&(O.push(":"),(0,e.addCodeArg)(O,X));return O.push("}"),new e._Code(O)}if(k,O,F){if(this._blockNode(new $(k)),O&&F)this.code(O).else().code(F).endIf();else if(O)this.code(O).endIf();else if(F)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(k){return this._elseNode(new $(k))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode($,g)}_for(k,O){return this._blockNode(k),O&&this.code(O).endFor(),this}for(k,O){return this._for(new _(k),O)}forRange(k,O,F,X,Q=this.opts.es5?n.varKinds.var:n.varKinds.let){const fe=this._scope.toName(k);return this._for(new I(Q,fe,O,F),()=>X(fe))}forOf(k,O,F,X=n.varKinds.const){const Q=this._scope.toName(k);if(this.opts.es5){const fe=O instanceof e.Name?O:this.var("_arr",O);return this.forRange("_i",0,(0,e._)`${fe}.length`,ie=>{this.var(Q,(0,e._)`${fe}[${ie}]`),F(Q)})}return this._for(new v("of",X,Q,O),()=>F(Q))}forIn(k,O,F,X=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(k,(0,e._)`Object.keys(${O})`,F);const Q=this._scope.toName(k);return this._for(new v("in",X,Q,O),()=>F(Q))}endFor(){return this._endBlockNode(p)}label(k){return this._leafNode(new f(k))}break(k){return this._leafNode(new h(k))}return(k){const O=new N;if(this._blockNode(O),this.code(k),O.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(N)}try(k,O,F){if(!O&&!F)throw new Error('CodeGen: "try" without "catch" and "finally"');const X=new T;if(this._blockNode(X),this.code(k),O){const Q=this.name("e");this._currNode=X.catch=new M(Q),O(Q)}return F&&(this._currNode=X.finally=new H,this.code(F)),this._endBlockNode(M,H)}throw(k){return this._leafNode(new y(k))}block(k,O){return this._blockStarts.push(this._nodes.length),k&&this.code(k).endBlock(O),this}endBlock(k){const O=this._blockStarts.pop();if(O===void 0)throw new Error("CodeGen: not in self-balancing block");const F=this._nodes.length-O;if(F<0||k!==void 0&&F!==k)throw new Error(`CodeGen: wrong number of nodes: ${F} vs ${k} expected`);return this._nodes.length=O,this}func(k,O=e.nil,F,X){return this._blockNode(new S(k,O,F)),X&&this.code(X).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(k=1){for(;k-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(k){return this._currNode.nodes.push(k),this}_blockNode(k){this._currNode.nodes.push(k),this._nodes.push(k)}_endBlockNode(k,O){const F=this._currNode;if(F instanceof k||O&&F instanceof O)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${O?`${k.kind}/${O.kind}`:k.kind}"`)}_elseNode(k){const O=this._currNode;if(!(O instanceof $))throw new Error('CodeGen: "else" without "if"');return this._currNode=O.else=k,this}get _root(){return this._nodes[0]}get _currNode(){const k=this._nodes;return k[k.length-1]}set _currNode(k){const O=this._nodes;O[O.length-1]=k}}t.CodeGen=J;function Y(B,k){for(const O in k)B[O]=(B[O]||0)+(k[O]||0);return B}function se(B,k){return k instanceof e._CodeOrName?Y(B,k.names):B}function le(B,k,O){if(B instanceof e.Name)return F(B);if(!X(B))return B;return new e._Code(B._items.reduce((Q,fe)=>(fe instanceof e.Name&&(fe=F(fe)),fe instanceof e._Code?Q.push(...fe._items):Q.push(fe),Q),[]));function F(Q){const fe=O[Q.str];return fe===void 0||k[Q.str]!==1?Q:(delete k[Q.str],fe)}function X(Q){return Q instanceof e._Code&&Q._items.some(fe=>fe instanceof e.Name&&k[fe.str]===1&&O[fe.str]!==void 0)}}function z(B,k){for(const O in k)B[O]=(B[O]||0)-(k[O]||0)}function W(B){return typeof B=="boolean"||typeof B=="number"||B===null?!B:(0,e._)`!${j(B)}`}t.not=W;const re=P(t.operators.AND);function ne(...B){return B.reduce(re)}t.and=ne;const oe=P(t.operators.OR);function V(...B){return B.reduce(oe)}t.or=V;function P(B){return(k,O)=>k===e.nil?O:O===e.nil?k:(0,e._)`${j(k)} ${B} ${j(O)}`}function j(B){return B instanceof e.Name?B:(0,e._)`(${B})`}})(ws)),ws}var ue={},to;function me(){if(to)return ue;to=1,Object.defineProperty(ue,"__esModule",{value:!0}),ue.checkStrictMode=ue.getErrorPath=ue.Type=ue.useFunc=ue.setEvaluated=ue.evaluatedPropsToName=ue.mergeEvaluated=ue.eachItem=ue.unescapeJsonPointer=ue.escapeJsonPointer=ue.escapeFragment=ue.unescapeFragment=ue.schemaRefOrVal=ue.schemaHasRulesButRef=ue.schemaHasRules=ue.checkUnknownRules=ue.alwaysValidSchema=ue.toHash=void 0;const t=he(),e=Ur();function n(v){const S={};for(const N of v)S[N]=!0;return S}ue.toHash=n;function r(v,S){return typeof S=="boolean"?S:Object.keys(S).length===0?!0:(s(v,S),!i(S,v.self.RULES.all))}ue.alwaysValidSchema=r;function s(v,S=v.schema){const{opts:N,self:T}=v;if(!N.strictSchema||typeof S=="boolean")return;const M=T.RULES.keywords;for(const H in S)M[H]||I(v,`unknown keyword: "${H}"`)}ue.checkUnknownRules=s;function i(v,S){if(typeof v=="boolean")return!v;for(const N in v)if(S[N])return!0;return!1}ue.schemaHasRules=i;function o(v,S){if(typeof v=="boolean")return!v;for(const N in v)if(N!=="$ref"&&S.all[N])return!0;return!1}ue.schemaHasRulesButRef=o;function a({topSchemaRef:v,schemaPath:S},N,T,M){if(!M){if(typeof N=="number"||typeof N=="boolean")return N;if(typeof N=="string")return(0,t._)`${N}`}return(0,t._)`${v}${S}${(0,t.getProperty)(T)}`}ue.schemaRefOrVal=a;function u(v){return y(decodeURIComponent(v))}ue.unescapeFragment=u;function f(v){return encodeURIComponent(h(v))}ue.escapeFragment=f;function h(v){return typeof v=="number"?`${v}`:v.replace(/~/g,"~0").replace(/\//g,"~1")}ue.escapeJsonPointer=h;function y(v){return v.replace(/~1/g,"/").replace(/~0/g,"~")}ue.unescapeJsonPointer=y;function d(v,S){if(Array.isArray(v))for(const N of v)S(N);else S(v)}ue.eachItem=d;function m({mergeNames:v,mergeToName:S,mergeValues:N,resultToName:T}){return(M,H,J,Y)=>{const se=J===void 0?H:J instanceof t.Name?(H instanceof t.Name?v(M,H,J):S(M,H,J),J):H instanceof t.Name?(S(M,J,H),H):N(H,J);return Y===t.Name&&!(se instanceof t.Name)?T(M,se):se}}ue.mergeEvaluated={props:m({mergeNames:(v,S,N)=>v.if((0,t._)`${N} !== true && ${S} !== undefined`,()=>{v.if((0,t._)`${S} === true`,()=>v.assign(N,!0),()=>v.assign(N,(0,t._)`${N} || {}`).code((0,t._)`Object.assign(${N}, ${S})`))}),mergeToName:(v,S,N)=>v.if((0,t._)`${N} !== true`,()=>{S===!0?v.assign(N,!0):(v.assign(N,(0,t._)`${N} || {}`),w(v,N,S))}),mergeValues:(v,S)=>v===!0?!0:{...v,...S},resultToName:b}),items:m({mergeNames:(v,S,N)=>v.if((0,t._)`${N} !== true && ${S} !== undefined`,()=>v.assign(N,(0,t._)`${S} === true ? true : ${N} > ${S} ? ${N} : ${S}`)),mergeToName:(v,S,N)=>v.if((0,t._)`${N} !== true`,()=>v.assign(N,S===!0?!0:(0,t._)`${N} > ${S} ? ${N} : ${S}`)),mergeValues:(v,S)=>v===!0?!0:Math.max(v,S),resultToName:(v,S)=>v.var("items",S)})};function b(v,S){if(S===!0)return v.var("props",!0);const N=v.var("props",(0,t._)`{}`);return S!==void 0&&w(v,N,S),N}ue.evaluatedPropsToName=b;function w(v,S,N){Object.keys(N).forEach(T=>v.assign((0,t._)`${S}${(0,t.getProperty)(T)}`,!0))}ue.setEvaluated=w;const g={};function $(v,S){return v.scopeValue("func",{ref:S,code:g[S.code]||(g[S.code]=new e._Code(S.code))})}ue.useFunc=$;var p;(function(v){v[v.Num=0]="Num",v[v.Str=1]="Str"})(p||(ue.Type=p={}));function _(v,S,N){if(v instanceof t.Name){const T=S===p.Num;return N?T?(0,t._)`"[" + ${v} + "]"`:(0,t._)`"['" + ${v} + "']"`:T?(0,t._)`"/" + ${v}`:(0,t._)`"/" + ${v}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return N?(0,t.getProperty)(v).toString():"/"+h(v)}ue.getErrorPath=_;function I(v,S,N=v.opts.strictSchema){if(N){if(S=`strict mode: ${S}`,N===!0)throw new Error(S);v.self.logger.warn(S)}}return ue.checkStrictMode=I,ue}var Vn={},no;function St(){if(no)return Vn;no=1,Object.defineProperty(Vn,"__esModule",{value:!0});const t=he(),e={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return Vn.default=e,Vn}var ro;function ns(){return ro||(ro=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=he(),n=me(),r=St();t.keywordError={message:({keyword:g})=>(0,e.str)`must pass "${g}" keyword validation`},t.keyword$DataError={message:({keyword:g,schemaType:$})=>$?(0,e.str)`"${g}" keyword must be ${$} ($data)`:(0,e.str)`"${g}" keyword is invalid ($data)`};function s(g,$=t.keywordError,p,_){const{it:I}=g,{gen:v,compositeRule:S,allErrors:N}=I,T=y(g,$,p);_??(S||N)?u(v,T):f(I,(0,e._)`[${T}]`)}t.reportError=s;function i(g,$=t.keywordError,p){const{it:_}=g,{gen:I,compositeRule:v,allErrors:S}=_,N=y(g,$,p);u(I,N),v||S||f(_,r.default.vErrors)}t.reportExtraError=i;function o(g,$){g.assign(r.default.errors,$),g.if((0,e._)`${r.default.vErrors} !== null`,()=>g.if($,()=>g.assign((0,e._)`${r.default.vErrors}.length`,$),()=>g.assign(r.default.vErrors,null)))}t.resetErrorsCount=o;function a({gen:g,keyword:$,schemaValue:p,data:_,errsCount:I,it:v}){if(I===void 0)throw new Error("ajv implementation error");const S=g.name("err");g.forRange("i",I,r.default.errors,N=>{g.const(S,(0,e._)`${r.default.vErrors}[${N}]`),g.if((0,e._)`${S}.instancePath === undefined`,()=>g.assign((0,e._)`${S}.instancePath`,(0,e.strConcat)(r.default.instancePath,v.errorPath))),g.assign((0,e._)`${S}.schemaPath`,(0,e.str)`${v.errSchemaPath}/${$}`),v.opts.verbose&&(g.assign((0,e._)`${S}.schema`,p),g.assign((0,e._)`${S}.data`,_))})}t.extendErrors=a;function u(g,$){const p=g.const("err",$);g.if((0,e._)`${r.default.vErrors} === null`,()=>g.assign(r.default.vErrors,(0,e._)`[${p}]`),(0,e._)`${r.default.vErrors}.push(${p})`),g.code((0,e._)`${r.default.errors}++`)}function f(g,$){const{gen:p,validateName:_,schemaEnv:I}=g;I.$async?p.throw((0,e._)`new ${g.ValidationError}(${$})`):(p.assign((0,e._)`${_}.errors`,$),p.return(!1))}const h={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function y(g,$,p){const{createErrors:_}=g.it;return _===!1?(0,e._)`{}`:d(g,$,p)}function d(g,$,p={}){const{gen:_,it:I}=g,v=[m(I,p),b(g,p)];return w(g,$,v),_.object(...v)}function m({errorPath:g},{instancePath:$}){const p=$?(0,e.str)`${g}${(0,n.getErrorPath)($,n.Type.Str)}`:g;return[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,p)]}function b({keyword:g,it:{errSchemaPath:$}},{schemaPath:p,parentSchema:_}){let I=_?$:(0,e.str)`${$}/${g}`;return p&&(I=(0,e.str)`${I}${(0,n.getErrorPath)(p,n.Type.Str)}`),[h.schemaPath,I]}function w(g,{params:$,message:p},_){const{keyword:I,data:v,schemaValue:S,it:N}=g,{opts:T,propertyName:M,topSchemaRef:H,schemaPath:J}=N;_.push([h.keyword,I],[h.params,typeof $=="function"?$(g):$||(0,e._)`{}`]),T.messages&&_.push([h.message,typeof p=="function"?p(g):p]),T.verbose&&_.push([h.schema,S],[h.parentSchema,(0,e._)`${H}${J}`],[r.default.data,v]),M&&_.push([h.propertyName,M])}})(ys)),ys}var so;function Wm(){if(so)return At;so=1,Object.defineProperty(At,"__esModule",{value:!0}),At.boolOrEmptySchema=At.topBoolOrEmptySchema=void 0;const t=ns(),e=he(),n=St(),r={message:"boolean schema is false"};function s(a){const{gen:u,schema:f,validateName:h}=a;f===!1?o(a,!1):typeof f=="object"&&f.$async===!0?u.return(n.default.data):(u.assign((0,e._)`${h}.errors`,null),u.return(!0))}At.topBoolOrEmptySchema=s;function i(a,u){const{gen:f,schema:h}=a;h===!1?(f.var(u,!1),o(a)):f.var(u,!0)}At.boolOrEmptySchema=i;function o(a,u){const{gen:f,data:h}=a,y={gen:f,keyword:"false schema",data:h,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,t.reportError)(y,r,void 0,u)}return At}var ze={},Nt={},io;function Zc(){if(io)return Nt;io=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.getRules=Nt.isJSONType=void 0;const t=["string","number","integer","boolean","null","object","array"],e=new Set(t);function n(s){return typeof s=="string"&&e.has(s)}Nt.isJSONType=n;function r(){const s={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...s,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},s.number,s.string,s.array,s.object],post:{rules:[]},all:{},keywords:{}}}return Nt.getRules=r,Nt}var ft={},oo;function Vc(){if(oo)return ft;oo=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.shouldUseRule=ft.shouldUseGroup=ft.schemaHasRulesForType=void 0;function t({schema:r,self:s},i){const o=s.RULES.types[i];return o&&o!==!0&&e(r,o)}ft.schemaHasRulesForType=t;function e(r,s){return s.rules.some(i=>n(r,i))}ft.shouldUseGroup=e;function n(r,s){var i;return r[s.keyword]!==void 0||((i=s.definition.implements)===null||i===void 0?void 0:i.some(o=>r[o]!==void 0))}return ft.shouldUseRule=n,ft}var ao;function Mr(){if(ao)return ze;ao=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.reportTypeError=ze.checkDataTypes=ze.checkDataType=ze.coerceAndCheckDataType=ze.getJSONTypes=ze.getSchemaTypes=ze.DataType=void 0;const t=Zc(),e=Vc(),n=ns(),r=he(),s=me();var i;(function(p){p[p.Correct=0]="Correct",p[p.Wrong=1]="Wrong"})(i||(ze.DataType=i={}));function o(p){const _=a(p.type);if(_.includes("null")){if(p.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!_.length&&p.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');p.nullable===!0&&_.push("null")}return _}ze.getSchemaTypes=o;function a(p){const _=Array.isArray(p)?p:p?[p]:[];if(_.every(t.isJSONType))return _;throw new Error("type must be JSONType or JSONType[]: "+_.join(","))}ze.getJSONTypes=a;function u(p,_){const{gen:I,data:v,opts:S}=p,N=h(_,S.coerceTypes),T=_.length>0&&!(N.length===0&&_.length===1&&(0,e.schemaHasRulesForType)(p,_[0]));if(T){const M=b(_,v,S.strictNumbers,i.Wrong);I.if(M,()=>{N.length?y(p,_,N):g(p)})}return T}ze.coerceAndCheckDataType=u;const f=new Set(["string","number","integer","boolean","null"]);function h(p,_){return _?p.filter(I=>f.has(I)||_==="array"&&I==="array"):[]}function y(p,_,I){const{gen:v,data:S,opts:N}=p,T=v.let("dataType",(0,r._)`typeof ${S}`),M=v.let("coerced",(0,r._)`undefined`);N.coerceTypes==="array"&&v.if((0,r._)`${T} == 'object' && Array.isArray(${S}) && ${S}.length == 1`,()=>v.assign(S,(0,r._)`${S}[0]`).assign(T,(0,r._)`typeof ${S}`).if(b(_,S,N.strictNumbers),()=>v.assign(M,S))),v.if((0,r._)`${M} !== undefined`);for(const J of I)(f.has(J)||J==="array"&&N.coerceTypes==="array")&&H(J);v.else(),g(p),v.endIf(),v.if((0,r._)`${M} !== undefined`,()=>{v.assign(S,M),d(p,M)});function H(J){switch(J){case"string":v.elseIf((0,r._)`${T} == "number" || ${T} == "boolean"`).assign(M,(0,r._)`"" + ${S}`).elseIf((0,r._)`${S} === null`).assign(M,(0,r._)`""`);return;case"number":v.elseIf((0,r._)`${T} == "boolean" || ${S} === null
|
|
157
|
-
|| (${T} == "string" && ${S} && ${S} == +${S})`).assign(M,(0,r._)`+${S}`);return;case"integer":v.elseIf((0,r._)`${T} === "boolean" || ${S} === null
|
|
158
|
-
|| (${T} === "string" && ${S} && ${S} == +${S} && !(${S} % 1))`).assign(M,(0,r._)`+${S}`);return;case"boolean":v.elseIf((0,r._)`${S} === "false" || ${S} === 0 || ${S} === null`).assign(M,!1).elseIf((0,r._)`${S} === "true" || ${S} === 1`).assign(M,!0);return;case"null":v.elseIf((0,r._)`${S} === "" || ${S} === 0 || ${S} === false`),v.assign(M,null);return;case"array":v.elseIf((0,r._)`${T} === "string" || ${T} === "number"
|
|
159
|
-
|| ${T} === "boolean" || ${S} === null`).assign(M,(0,r._)`[${S}]`)}}}function d({gen:p,parentData:_,parentDataProperty:I},v){p.if((0,r._)`${_} !== undefined`,()=>p.assign((0,r._)`${_}[${I}]`,v))}function m(p,_,I,v=i.Correct){const S=v===i.Correct?r.operators.EQ:r.operators.NEQ;let N;switch(p){case"null":return(0,r._)`${_} ${S} null`;case"array":N=(0,r._)`Array.isArray(${_})`;break;case"object":N=(0,r._)`${_} && typeof ${_} == "object" && !Array.isArray(${_})`;break;case"integer":N=T((0,r._)`!(${_} % 1) && !isNaN(${_})`);break;case"number":N=T();break;default:return(0,r._)`typeof ${_} ${S} ${p}`}return v===i.Correct?N:(0,r.not)(N);function T(M=r.nil){return(0,r.and)((0,r._)`typeof ${_} == "number"`,M,I?(0,r._)`isFinite(${_})`:r.nil)}}ze.checkDataType=m;function b(p,_,I,v){if(p.length===1)return m(p[0],_,I,v);let S;const N=(0,s.toHash)(p);if(N.array&&N.object){const T=(0,r._)`typeof ${_} != "object"`;S=N.null?T:(0,r._)`!${_} || ${T}`,delete N.null,delete N.array,delete N.object}else S=r.nil;N.number&&delete N.integer;for(const T in N)S=(0,r.and)(S,m(T,_,I,v));return S}ze.checkDataTypes=b;const w={message:({schema:p})=>`must be ${p}`,params:({schema:p,schemaValue:_})=>typeof p=="string"?(0,r._)`{type: ${p}}`:(0,r._)`{type: ${_}}`};function g(p){const _=$(p);(0,n.reportError)(_,w)}ze.reportTypeError=g;function $(p){const{gen:_,data:I,schema:v}=p,S=(0,s.schemaRefOrVal)(p,v,"type");return{gen:_,keyword:"type",data:I,schema:v.type,schemaCode:S,schemaValue:S,parentSchema:v,params:{},it:p}}return ze}var hn={},co;function Ym(){if(co)return hn;co=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.assignDefaults=void 0;const t=he(),e=me();function n(s,i){const{properties:o,items:a}=s.schema;if(i==="object"&&o)for(const u in o)r(s,u,o[u].default);else i==="array"&&Array.isArray(a)&&a.forEach((u,f)=>r(s,f,u.default))}hn.assignDefaults=n;function r(s,i,o){const{gen:a,compositeRule:u,data:f,opts:h}=s;if(o===void 0)return;const y=(0,t._)`${f}${(0,t.getProperty)(i)}`;if(u){(0,e.checkStrictMode)(s,`default is ignored for: ${y}`);return}let d=(0,t._)`${y} === undefined`;h.useDefaults==="empty"&&(d=(0,t._)`${d} || ${y} === null || ${y} === ""`),a.if(d,(0,t._)`${y} = ${(0,t.stringify)(o)}`)}return hn}var it={},ye={},uo;function ct(){if(uo)return ye;uo=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.validateUnion=ye.validateArray=ye.usePattern=ye.callValidateCode=ye.schemaProperties=ye.allSchemaProperties=ye.noPropertyInData=ye.propertyInData=ye.isOwnProperty=ye.hasPropFunc=ye.reportMissingProp=ye.checkMissingProp=ye.checkReportMissingProp=void 0;const t=he(),e=me(),n=St(),r=me();function s(p,_){const{gen:I,data:v,it:S}=p;I.if(h(I,v,_,S.opts.ownProperties),()=>{p.setParams({missingProperty:(0,t._)`${_}`},!0),p.error()})}ye.checkReportMissingProp=s;function i({gen:p,data:_,it:{opts:I}},v,S){return(0,t.or)(...v.map(N=>(0,t.and)(h(p,_,N,I.ownProperties),(0,t._)`${S} = ${N}`)))}ye.checkMissingProp=i;function o(p,_){p.setParams({missingProperty:_},!0),p.error()}ye.reportMissingProp=o;function a(p){return p.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}ye.hasPropFunc=a;function u(p,_,I){return(0,t._)`${a(p)}.call(${_}, ${I})`}ye.isOwnProperty=u;function f(p,_,I,v){const S=(0,t._)`${_}${(0,t.getProperty)(I)} !== undefined`;return v?(0,t._)`${S} && ${u(p,_,I)}`:S}ye.propertyInData=f;function h(p,_,I,v){const S=(0,t._)`${_}${(0,t.getProperty)(I)} === undefined`;return v?(0,t.or)(S,(0,t.not)(u(p,_,I))):S}ye.noPropertyInData=h;function y(p){return p?Object.keys(p).filter(_=>_!=="__proto__"):[]}ye.allSchemaProperties=y;function d(p,_){return y(_).filter(I=>!(0,e.alwaysValidSchema)(p,_[I]))}ye.schemaProperties=d;function m({schemaCode:p,data:_,it:{gen:I,topSchemaRef:v,schemaPath:S,errorPath:N},it:T},M,H,J){const Y=J?(0,t._)`${p}, ${_}, ${v}${S}`:_,se=[[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,N)],[n.default.parentData,T.parentData],[n.default.parentDataProperty,T.parentDataProperty],[n.default.rootData,n.default.rootData]];T.opts.dynamicRef&&se.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const le=(0,t._)`${Y}, ${I.object(...se)}`;return H!==t.nil?(0,t._)`${M}.call(${H}, ${le})`:(0,t._)`${M}(${le})`}ye.callValidateCode=m;const b=(0,t._)`new RegExp`;function w({gen:p,it:{opts:_}},I){const v=_.unicodeRegExp?"u":"",{regExp:S}=_.code,N=S(I,v);return p.scopeValue("pattern",{key:N.toString(),ref:N,code:(0,t._)`${S.code==="new RegExp"?b:(0,r.useFunc)(p,S)}(${I}, ${v})`})}ye.usePattern=w;function g(p){const{gen:_,data:I,keyword:v,it:S}=p,N=_.name("valid");if(S.allErrors){const M=_.let("valid",!0);return T(()=>_.assign(M,!1)),M}return _.var(N,!0),T(()=>_.break()),N;function T(M){const H=_.const("len",(0,t._)`${I}.length`);_.forRange("i",0,H,J=>{p.subschema({keyword:v,dataProp:J,dataPropType:e.Type.Num},N),_.if((0,t.not)(N),M)})}}ye.validateArray=g;function $(p){const{gen:_,schema:I,keyword:v,it:S}=p;if(!Array.isArray(I))throw new Error("ajv implementation error");if(I.some(H=>(0,e.alwaysValidSchema)(S,H))&&!S.opts.unevaluated)return;const T=_.let("valid",!1),M=_.name("_valid");_.block(()=>I.forEach((H,J)=>{const Y=p.subschema({keyword:v,schemaProp:J,compositeRule:!0},M);_.assign(T,(0,t._)`${T} || ${M}`),p.mergeValidEvaluated(Y,M)||_.if((0,t.not)(T))})),p.result(T,()=>p.reset(),()=>p.error(!0))}return ye.validateUnion=$,ye}var lo;function Qm(){if(lo)return it;lo=1,Object.defineProperty(it,"__esModule",{value:!0}),it.validateKeywordUsage=it.validSchemaType=it.funcKeywordCode=it.macroKeywordCode=void 0;const t=he(),e=St(),n=ct(),r=ns();function s(d,m){const{gen:b,keyword:w,schema:g,parentSchema:$,it:p}=d,_=m.macro.call(p.self,g,$,p),I=f(b,w,_);p.opts.validateSchema!==!1&&p.self.validateSchema(_,!0);const v=b.name("valid");d.subschema({schema:_,schemaPath:t.nil,errSchemaPath:`${p.errSchemaPath}/${w}`,topSchemaRef:I,compositeRule:!0},v),d.pass(v,()=>d.error(!0))}it.macroKeywordCode=s;function i(d,m){var b;const{gen:w,keyword:g,schema:$,parentSchema:p,$data:_,it:I}=d;u(I,m);const v=!_&&m.compile?m.compile.call(I.self,$,p,I):m.validate,S=f(w,g,v),N=w.let("valid");d.block$data(N,T),d.ok((b=m.valid)!==null&&b!==void 0?b:N);function T(){if(m.errors===!1)J(),m.modifying&&o(d),Y(()=>d.error());else{const se=m.async?M():H();m.modifying&&o(d),Y(()=>a(d,se))}}function M(){const se=w.let("ruleErrs",null);return w.try(()=>J((0,t._)`await `),le=>w.assign(N,!1).if((0,t._)`${le} instanceof ${I.ValidationError}`,()=>w.assign(se,(0,t._)`${le}.errors`),()=>w.throw(le))),se}function H(){const se=(0,t._)`${S}.errors`;return w.assign(se,null),J(t.nil),se}function J(se=m.async?(0,t._)`await `:t.nil){const le=I.opts.passContext?e.default.this:e.default.self,z=!("compile"in m&&!_||m.schema===!1);w.assign(N,(0,t._)`${se}${(0,n.callValidateCode)(d,S,le,z)}`,m.modifying)}function Y(se){var le;w.if((0,t.not)((le=m.valid)!==null&&le!==void 0?le:N),se)}}it.funcKeywordCode=i;function o(d){const{gen:m,data:b,it:w}=d;m.if(w.parentData,()=>m.assign(b,(0,t._)`${w.parentData}[${w.parentDataProperty}]`))}function a(d,m){const{gen:b}=d;b.if((0,t._)`Array.isArray(${m})`,()=>{b.assign(e.default.vErrors,(0,t._)`${e.default.vErrors} === null ? ${m} : ${e.default.vErrors}.concat(${m})`).assign(e.default.errors,(0,t._)`${e.default.vErrors}.length`),(0,r.extendErrors)(d)},()=>d.error())}function u({schemaEnv:d},m){if(m.async&&!d.$async)throw new Error("async keyword in sync schema")}function f(d,m,b){if(b===void 0)throw new Error(`keyword "${m}" failed to compile`);return d.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,t.stringify)(b)})}function h(d,m,b=!1){return!m.length||m.some(w=>w==="array"?Array.isArray(d):w==="object"?d&&typeof d=="object"&&!Array.isArray(d):typeof d==w||b&&typeof d>"u")}it.validSchemaType=h;function y({schema:d,opts:m,self:b,errSchemaPath:w},g,$){if(Array.isArray(g.keyword)?!g.keyword.includes($):g.keyword!==$)throw new Error("ajv implementation error");const p=g.dependencies;if(p?.some(_=>!Object.prototype.hasOwnProperty.call(d,_)))throw new Error(`parent schema must have dependencies of ${$}: ${p.join(",")}`);if(g.validateSchema&&!g.validateSchema(d[$])){const I=`keyword "${$}" value is invalid at path "${w}": `+b.errorsText(g.validateSchema.errors);if(m.validateSchema==="log")b.logger.error(I);else throw new Error(I)}}return it.validateKeywordUsage=y,it}var dt={},fo;function Xm(){if(fo)return dt;fo=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.extendSubschemaMode=dt.extendSubschemaData=dt.getSubschema=void 0;const t=he(),e=me();function n(i,{keyword:o,schemaProp:a,schema:u,schemaPath:f,errSchemaPath:h,topSchemaRef:y}){if(o!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(o!==void 0){const d=i.schema[o];return a===void 0?{schema:d,schemaPath:(0,t._)`${i.schemaPath}${(0,t.getProperty)(o)}`,errSchemaPath:`${i.errSchemaPath}/${o}`}:{schema:d[a],schemaPath:(0,t._)`${i.schemaPath}${(0,t.getProperty)(o)}${(0,t.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${o}/${(0,e.escapeFragment)(a)}`}}if(u!==void 0){if(f===void 0||h===void 0||y===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:f,topSchemaRef:y,errSchemaPath:h}}throw new Error('either "keyword" or "schema" must be passed')}dt.getSubschema=n;function r(i,o,{dataProp:a,dataPropType:u,data:f,dataTypes:h,propertyName:y}){if(f!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:d}=o;if(a!==void 0){const{errorPath:b,dataPathArr:w,opts:g}=o,$=d.let("data",(0,t._)`${o.data}${(0,t.getProperty)(a)}`,!0);m($),i.errorPath=(0,t.str)`${b}${(0,e.getErrorPath)(a,u,g.jsPropertySyntax)}`,i.parentDataProperty=(0,t._)`${a}`,i.dataPathArr=[...w,i.parentDataProperty]}if(f!==void 0){const b=f instanceof t.Name?f:d.let("data",f,!0);m(b),y!==void 0&&(i.propertyName=y)}h&&(i.dataTypes=h);function m(b){i.data=b,i.dataLevel=o.dataLevel+1,i.dataTypes=[],o.definedProperties=new Set,i.parentData=o.data,i.dataNames=[...o.dataNames,b]}}dt.extendSubschemaData=r;function s(i,{jtdDiscriminator:o,jtdMetadata:a,compositeRule:u,createErrors:f,allErrors:h}){u!==void 0&&(i.compositeRule=u),f!==void 0&&(i.createErrors=f),h!==void 0&&(i.allErrors=h),i.jtdDiscriminator=o,i.jtdMetadata=a}return dt.extendSubschemaMode=s,dt}var Ze={},_s,ho;function Kc(){return ho||(ho=1,_s=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,s,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(s=r;s--!==0;)if(!t(e[s],n[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[s]))return!1;for(s=r;s--!==0;){var o=i[s];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n}),_s}var $s={exports:{}},po;function e0(){if(po)return $s.exports;po=1;var t=$s.exports=function(r,s,i){typeof s=="function"&&(i=s,s={}),i=s.cb||i;var o=typeof i=="function"?i:i.pre||function(){},a=i.post||function(){};e(s,o,a,r,"",r)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.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 e(r,s,i,o,a,u,f,h,y,d){if(o&&typeof o=="object"&&!Array.isArray(o)){s(o,a,u,f,h,y,d);for(var m in o){var b=o[m];if(Array.isArray(b)){if(m in t.arrayKeywords)for(var w=0;w<b.length;w++)e(r,s,i,b[w],a+"/"+m+"/"+w,u,a,m,o,w)}else if(m in t.propsKeywords){if(b&&typeof b=="object")for(var g in b)e(r,s,i,b[g],a+"/"+m+"/"+n(g),u,a,m,o,g)}else(m in t.keywords||r.allKeys&&!(m in t.skipKeywords))&&e(r,s,i,b,a+"/"+m,u,a,m,o)}i(o,a,u,f,h,y,d)}}function n(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}return $s.exports}var mo;function rs(){if(mo)return Ze;mo=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.getSchemaRefs=Ze.resolveUrl=Ze.normalizeId=Ze._getFullPath=Ze.getFullPath=Ze.inlineRef=void 0;const t=me(),e=Kc(),n=e0(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function s(w,g=!0){return typeof w=="boolean"?!0:g===!0?!o(w):g?a(w)<=g:!1}Ze.inlineRef=s;const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function o(w){for(const g in w){if(i.has(g))return!0;const $=w[g];if(Array.isArray($)&&$.some(o)||typeof $=="object"&&o($))return!0}return!1}function a(w){let g=0;for(const $ in w){if($==="$ref")return 1/0;if(g++,!r.has($)&&(typeof w[$]=="object"&&(0,t.eachItem)(w[$],p=>g+=a(p)),g===1/0))return 1/0}return g}function u(w,g="",$){$!==!1&&(g=y(g));const p=w.parse(g);return f(w,p)}Ze.getFullPath=u;function f(w,g){return w.serialize(g).split("#")[0]+"#"}Ze._getFullPath=f;const h=/#\/?$/;function y(w){return w?w.replace(h,""):""}Ze.normalizeId=y;function d(w,g,$){return $=y($),w.resolve(g,$)}Ze.resolveUrl=d;const m=/^[a-z_][-a-z0-9._]*$/i;function b(w,g){if(typeof w=="boolean")return{};const{schemaId:$,uriResolver:p}=this.opts,_=y(w[$]||g),I={"":_},v=u(p,_,!1),S={},N=new Set;return n(w,{allKeys:!0},(H,J,Y,se)=>{if(se===void 0)return;const le=v+J;let z=I[se];typeof H[$]=="string"&&(z=W.call(this,H[$])),re.call(this,H.$anchor),re.call(this,H.$dynamicAnchor),I[J]=z;function W(ne){const oe=this.opts.uriResolver.resolve;if(ne=y(z?oe(z,ne):ne),N.has(ne))throw M(ne);N.add(ne);let V=this.refs[ne];return typeof V=="string"&&(V=this.refs[V]),typeof V=="object"?T(H,V.schema,ne):ne!==y(le)&&(ne[0]==="#"?(T(H,S[ne],ne),S[ne]=H):this.refs[ne]=le),ne}function re(ne){if(typeof ne=="string"){if(!m.test(ne))throw new Error(`invalid anchor "${ne}"`);W.call(this,`#${ne}`)}}}),S;function T(H,J,Y){if(J!==void 0&&!e(H,J))throw M(Y)}function M(H){return new Error(`reference "${H}" resolves to more than one schema`)}}return Ze.getSchemaRefs=b,Ze}var go;function ss(){if(go)return lt;go=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.getData=lt.KeywordCxt=lt.validateFunctionCode=void 0;const t=Wm(),e=Mr(),n=Vc(),r=Mr(),s=Ym(),i=Qm(),o=Xm(),a=he(),u=St(),f=rs(),h=me(),y=ns();function d(x){if(v(x)&&(N(x),I(x))){g(x);return}m(x,()=>(0,t.topBoolOrEmptySchema)(x))}lt.validateFunctionCode=d;function m({gen:x,validateName:D,schema:L,schemaEnv:K,opts:ee},ae){ee.code.es5?x.func(D,(0,a._)`${u.default.data}, ${u.default.valCxt}`,K.$async,()=>{x.code((0,a._)`"use strict"; ${p(L,ee)}`),w(x,ee),x.code(ae)}):x.func(D,(0,a._)`${u.default.data}, ${b(ee)}`,K.$async,()=>x.code(p(L,ee)).code(ae))}function b(x){return(0,a._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${x.dynamicRef?(0,a._)`, ${u.default.dynamicAnchors}={}`:a.nil}}={}`}function w(x,D){x.if(u.default.valCxt,()=>{x.var(u.default.instancePath,(0,a._)`${u.default.valCxt}.${u.default.instancePath}`),x.var(u.default.parentData,(0,a._)`${u.default.valCxt}.${u.default.parentData}`),x.var(u.default.parentDataProperty,(0,a._)`${u.default.valCxt}.${u.default.parentDataProperty}`),x.var(u.default.rootData,(0,a._)`${u.default.valCxt}.${u.default.rootData}`),D.dynamicRef&&x.var(u.default.dynamicAnchors,(0,a._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{x.var(u.default.instancePath,(0,a._)`""`),x.var(u.default.parentData,(0,a._)`undefined`),x.var(u.default.parentDataProperty,(0,a._)`undefined`),x.var(u.default.rootData,u.default.data),D.dynamicRef&&x.var(u.default.dynamicAnchors,(0,a._)`{}`)})}function g(x){const{schema:D,opts:L,gen:K}=x;m(x,()=>{L.$comment&&D.$comment&&se(x),H(x),K.let(u.default.vErrors,null),K.let(u.default.errors,0),L.unevaluated&&$(x),T(x),le(x)})}function $(x){const{gen:D,validateName:L}=x;x.evaluated=D.const("evaluated",(0,a._)`${L}.evaluated`),D.if((0,a._)`${x.evaluated}.dynamicProps`,()=>D.assign((0,a._)`${x.evaluated}.props`,(0,a._)`undefined`)),D.if((0,a._)`${x.evaluated}.dynamicItems`,()=>D.assign((0,a._)`${x.evaluated}.items`,(0,a._)`undefined`))}function p(x,D){const L=typeof x=="object"&&x[D.schemaId];return L&&(D.code.source||D.code.process)?(0,a._)`/*# sourceURL=${L} */`:a.nil}function _(x,D){if(v(x)&&(N(x),I(x))){S(x,D);return}(0,t.boolOrEmptySchema)(x,D)}function I({schema:x,self:D}){if(typeof x=="boolean")return!x;for(const L in x)if(D.RULES.all[L])return!0;return!1}function v(x){return typeof x.schema!="boolean"}function S(x,D){const{schema:L,gen:K,opts:ee}=x;ee.$comment&&L.$comment&&se(x),J(x),Y(x);const ae=K.const("_errs",u.default.errors);T(x,ae),K.var(D,(0,a._)`${ae} === ${u.default.errors}`)}function N(x){(0,h.checkUnknownRules)(x),M(x)}function T(x,D){if(x.opts.jtd)return W(x,[],!1,D);const L=(0,e.getSchemaTypes)(x.schema),K=(0,e.coerceAndCheckDataType)(x,L);W(x,L,!K,D)}function M(x){const{schema:D,errSchemaPath:L,opts:K,self:ee}=x;D.$ref&&K.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(D,ee.RULES)&&ee.logger.warn(`$ref: keywords ignored in schema at path "${L}"`)}function H(x){const{schema:D,opts:L}=x;D.default!==void 0&&L.useDefaults&&L.strictSchema&&(0,h.checkStrictMode)(x,"default is ignored in the schema root")}function J(x){const D=x.schema[x.opts.schemaId];D&&(x.baseId=(0,f.resolveUrl)(x.opts.uriResolver,x.baseId,D))}function Y(x){if(x.schema.$async&&!x.schemaEnv.$async)throw new Error("async schema in sync schema")}function se({gen:x,schemaEnv:D,schema:L,errSchemaPath:K,opts:ee}){const ae=L.$comment;if(ee.$comment===!0)x.code((0,a._)`${u.default.self}.logger.log(${ae})`);else if(typeof ee.$comment=="function"){const we=(0,a.str)`${K}/$comment`,Re=x.scopeValue("root",{ref:D.root});x.code((0,a._)`${u.default.self}.opts.$comment(${ae}, ${we}, ${Re}.schema)`)}}function le(x){const{gen:D,schemaEnv:L,validateName:K,ValidationError:ee,opts:ae}=x;L.$async?D.if((0,a._)`${u.default.errors} === 0`,()=>D.return(u.default.data),()=>D.throw((0,a._)`new ${ee}(${u.default.vErrors})`)):(D.assign((0,a._)`${K}.errors`,u.default.vErrors),ae.unevaluated&&z(x),D.return((0,a._)`${u.default.errors} === 0`))}function z({gen:x,evaluated:D,props:L,items:K}){L instanceof a.Name&&x.assign((0,a._)`${D}.props`,L),K instanceof a.Name&&x.assign((0,a._)`${D}.items`,K)}function W(x,D,L,K){const{gen:ee,schema:ae,data:we,allErrors:Re,opts:Me,self:je}=x,{RULES:Oe}=je;if(ae.$ref&&(Me.ignoreKeywordsWithRef||!(0,h.schemaHasRulesButRef)(ae,Oe))){ee.block(()=>X(x,"$ref",Oe.all.$ref.definition));return}Me.jtd||ne(x,D),ee.block(()=>{for(const Le of Oe.rules)Fe(Le);Fe(Oe.post)});function Fe(Le){(0,n.shouldUseGroup)(ae,Le)&&(Le.type?(ee.if((0,r.checkDataType)(Le.type,we,Me.strictNumbers)),re(x,Le),D.length===1&&D[0]===Le.type&&L&&(ee.else(),(0,r.reportTypeError)(x)),ee.endIf()):re(x,Le),Re||ee.if((0,a._)`${u.default.errors} === ${K||0}`))}}function re(x,D){const{gen:L,schema:K,opts:{useDefaults:ee}}=x;ee&&(0,s.assignDefaults)(x,D.type),L.block(()=>{for(const ae of D.rules)(0,n.shouldUseRule)(K,ae)&&X(x,ae.keyword,ae.definition,D.type)})}function ne(x,D){x.schemaEnv.meta||!x.opts.strictTypes||(oe(x,D),x.opts.allowUnionTypes||V(x,D),P(x,x.dataTypes))}function oe(x,D){if(D.length){if(!x.dataTypes.length){x.dataTypes=D;return}D.forEach(L=>{B(x.dataTypes,L)||O(x,`type "${L}" not allowed by context "${x.dataTypes.join(",")}"`)}),k(x,D)}}function V(x,D){D.length>1&&!(D.length===2&&D.includes("null"))&&O(x,"use allowUnionTypes to allow union type keyword")}function P(x,D){const L=x.self.RULES.all;for(const K in L){const ee=L[K];if(typeof ee=="object"&&(0,n.shouldUseRule)(x.schema,ee)){const{type:ae}=ee.definition;ae.length&&!ae.some(we=>j(D,we))&&O(x,`missing type "${ae.join(",")}" for keyword "${K}"`)}}}function j(x,D){return x.includes(D)||D==="number"&&x.includes("integer")}function B(x,D){return x.includes(D)||D==="integer"&&x.includes("number")}function k(x,D){const L=[];for(const K of x.dataTypes)B(D,K)?L.push(K):D.includes("integer")&&K==="number"&&L.push("integer");x.dataTypes=L}function O(x,D){const L=x.schemaEnv.baseId+x.errSchemaPath;D+=` at "${L}" (strictTypes)`,(0,h.checkStrictMode)(x,D,x.opts.strictTypes)}class F{constructor(D,L,K){if((0,i.validateKeywordUsage)(D,L,K),this.gen=D.gen,this.allErrors=D.allErrors,this.keyword=K,this.data=D.data,this.schema=D.schema[K],this.$data=L.$data&&D.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,h.schemaRefOrVal)(D,this.schema,K,this.$data),this.schemaType=L.schemaType,this.parentSchema=D.schema,this.params={},this.it=D,this.def=L,this.$data)this.schemaCode=D.gen.const("vSchema",ie(this.$data,D));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,L.schemaType,L.allowUndefined))throw new Error(`${K} value must be ${JSON.stringify(L.schemaType)}`);("code"in L?L.trackErrors:L.errors!==!1)&&(this.errsCount=D.gen.const("_errs",u.default.errors))}result(D,L,K){this.failResult((0,a.not)(D),L,K)}failResult(D,L,K){this.gen.if(D),K?K():this.error(),L?(this.gen.else(),L(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(D,L){this.failResult((0,a.not)(D),void 0,L)}fail(D){if(D===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(D),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(D){if(!this.$data)return this.fail(D);const{schemaCode:L}=this;this.fail((0,a._)`${L} !== undefined && (${(0,a.or)(this.invalid$data(),D)})`)}error(D,L,K){if(L){this.setParams(L),this._error(D,K),this.setParams({});return}this._error(D,K)}_error(D,L){(D?y.reportExtraError:y.reportError)(this,this.def.error,L)}$dataError(){(0,y.reportError)(this,this.def.$dataError||y.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,y.resetErrorsCount)(this.gen,this.errsCount)}ok(D){this.allErrors||this.gen.if(D)}setParams(D,L){L?Object.assign(this.params,D):this.params=D}block$data(D,L,K=a.nil){this.gen.block(()=>{this.check$data(D,K),L()})}check$data(D=a.nil,L=a.nil){if(!this.$data)return;const{gen:K,schemaCode:ee,schemaType:ae,def:we}=this;K.if((0,a.or)((0,a._)`${ee} === undefined`,L)),D!==a.nil&&K.assign(D,!0),(ae.length||we.validateSchema)&&(K.elseIf(this.invalid$data()),this.$dataError(),D!==a.nil&&K.assign(D,!1)),K.else()}invalid$data(){const{gen:D,schemaCode:L,schemaType:K,def:ee,it:ae}=this;return(0,a.or)(we(),Re());function we(){if(K.length){if(!(L instanceof a.Name))throw new Error("ajv implementation error");const Me=Array.isArray(K)?K:[K];return(0,a._)`${(0,r.checkDataTypes)(Me,L,ae.opts.strictNumbers,r.DataType.Wrong)}`}return a.nil}function Re(){if(ee.validateSchema){const Me=D.scopeValue("validate$data",{ref:ee.validateSchema});return(0,a._)`!${Me}(${L})`}return a.nil}}subschema(D,L){const K=(0,o.getSubschema)(this.it,D);(0,o.extendSubschemaData)(K,this.it,D),(0,o.extendSubschemaMode)(K,D);const ee={...this.it,...K,items:void 0,props:void 0};return _(ee,L),ee}mergeEvaluated(D,L){const{it:K,gen:ee}=this;K.opts.unevaluated&&(K.props!==!0&&D.props!==void 0&&(K.props=h.mergeEvaluated.props(ee,D.props,K.props,L)),K.items!==!0&&D.items!==void 0&&(K.items=h.mergeEvaluated.items(ee,D.items,K.items,L)))}mergeValidEvaluated(D,L){const{it:K,gen:ee}=this;if(K.opts.unevaluated&&(K.props!==!0||K.items!==!0))return ee.if(L,()=>this.mergeEvaluated(D,a.Name)),!0}}lt.KeywordCxt=F;function X(x,D,L,K){const ee=new F(x,L,D);"code"in L?L.code(ee,K):ee.$data&&L.validate?(0,i.funcKeywordCode)(ee,L):"macro"in L?(0,i.macroKeywordCode)(ee,L):(L.compile||L.validate)&&(0,i.funcKeywordCode)(ee,L)}const Q=/^\/(?:[^~]|~0|~1)*$/,fe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ie(x,{dataLevel:D,dataNames:L,dataPathArr:K}){let ee,ae;if(x==="")return u.default.rootData;if(x[0]==="/"){if(!Q.test(x))throw new Error(`Invalid JSON-pointer: ${x}`);ee=x,ae=u.default.rootData}else{const je=fe.exec(x);if(!je)throw new Error(`Invalid JSON-pointer: ${x}`);const Oe=+je[1];if(ee=je[2],ee==="#"){if(Oe>=D)throw new Error(Me("property/index",Oe));return K[D-Oe]}if(Oe>D)throw new Error(Me("data",Oe));if(ae=L[D-Oe],!ee)return ae}let we=ae;const Re=ee.split("/");for(const je of Re)je&&(ae=(0,a._)`${ae}${(0,a.getProperty)((0,h.unescapeJsonPointer)(je))}`,we=(0,a._)`${we} && ${ae}`);return we;function Me(je,Oe){return`Cannot access ${je} ${Oe} levels up, current level is ${D}`}}return lt.getData=ie,lt}var Kn={},yo;function fi(){if(yo)return Kn;yo=1,Object.defineProperty(Kn,"__esModule",{value:!0});class t extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}return Kn.default=t,Kn}var Hn={},wo;function is(){if(wo)return Hn;wo=1,Object.defineProperty(Hn,"__esModule",{value:!0});const t=rs();class e extends Error{constructor(r,s,i,o){super(o||`can't resolve reference ${i} from id ${s}`),this.missingRef=(0,t.resolveUrl)(r,s,i),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(r,this.missingRef))}}return Hn.default=e,Hn}var Ye={},vo;function di(){if(vo)return Ye;vo=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.resolveSchema=Ye.getCompilingSchema=Ye.resolveRef=Ye.compileSchema=Ye.SchemaEnv=void 0;const t=he(),e=fi(),n=St(),r=rs(),s=me(),i=ss();class o{constructor($){var p;this.refs={},this.dynamicAnchors={};let _;typeof $.schema=="object"&&(_=$.schema),this.schema=$.schema,this.schemaId=$.schemaId,this.root=$.root||this,this.baseId=(p=$.baseId)!==null&&p!==void 0?p:(0,r.normalizeId)(_?.[$.schemaId||"$id"]),this.schemaPath=$.schemaPath,this.localRefs=$.localRefs,this.meta=$.meta,this.$async=_?.$async,this.refs={}}}Ye.SchemaEnv=o;function a(g){const $=h.call(this,g);if($)return $;const p=(0,r.getFullPath)(this.opts.uriResolver,g.root.baseId),{es5:_,lines:I}=this.opts.code,{ownProperties:v}=this.opts,S=new t.CodeGen(this.scope,{es5:_,lines:I,ownProperties:v});let N;g.$async&&(N=S.scopeValue("Error",{ref:e.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));const T=S.scopeName("validate");g.validateName=T;const M={gen:S,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:S.scopeValue("schema",this.opts.code.source===!0?{ref:g.schema,code:(0,t.stringify)(g.schema)}:{ref:g.schema}),validateName:T,ValidationError:N,schema:g.schema,schemaEnv:g,rootId:p,baseId:g.baseId||p,schemaPath:t.nil,errSchemaPath:g.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};let H;try{this._compilations.add(g),(0,i.validateFunctionCode)(M),S.optimize(this.opts.code.optimize);const J=S.toString();H=`${S.scopeRefs(n.default.scope)}return ${J}`,this.opts.code.process&&(H=this.opts.code.process(H,g));const se=new Function(`${n.default.self}`,`${n.default.scope}`,H)(this,this.scope.get());if(this.scope.value(T,{ref:se}),se.errors=null,se.schema=g.schema,se.schemaEnv=g,g.$async&&(se.$async=!0),this.opts.code.source===!0&&(se.source={validateName:T,validateCode:J,scopeValues:S._values}),this.opts.unevaluated){const{props:le,items:z}=M;se.evaluated={props:le instanceof t.Name?void 0:le,items:z instanceof t.Name?void 0:z,dynamicProps:le instanceof t.Name,dynamicItems:z instanceof t.Name},se.source&&(se.source.evaluated=(0,t.stringify)(se.evaluated))}return g.validate=se,g}catch(J){throw delete g.validate,delete g.validateName,H&&this.logger.error("Error compiling schema, function code:",H),J}finally{this._compilations.delete(g)}}Ye.compileSchema=a;function u(g,$,p){var _;p=(0,r.resolveUrl)(this.opts.uriResolver,$,p);const I=g.refs[p];if(I)return I;let v=d.call(this,g,p);if(v===void 0){const S=(_=g.localRefs)===null||_===void 0?void 0:_[p],{schemaId:N}=this.opts;S&&(v=new o({schema:S,schemaId:N,root:g,baseId:$}))}if(v!==void 0)return g.refs[p]=f.call(this,v)}Ye.resolveRef=u;function f(g){return(0,r.inlineRef)(g.schema,this.opts.inlineRefs)?g.schema:g.validate?g:a.call(this,g)}function h(g){for(const $ of this._compilations)if(y($,g))return $}Ye.getCompilingSchema=h;function y(g,$){return g.schema===$.schema&&g.root===$.root&&g.baseId===$.baseId}function d(g,$){let p;for(;typeof(p=this.refs[$])=="string";)$=p;return p||this.schemas[$]||m.call(this,g,$)}function m(g,$){const p=this.opts.uriResolver.parse($),_=(0,r._getFullPath)(this.opts.uriResolver,p);let I=(0,r.getFullPath)(this.opts.uriResolver,g.baseId,void 0);if(Object.keys(g.schema).length>0&&_===I)return w.call(this,p,g);const v=(0,r.normalizeId)(_),S=this.refs[v]||this.schemas[v];if(typeof S=="string"){const N=m.call(this,g,S);return typeof N?.schema!="object"?void 0:w.call(this,p,N)}if(typeof S?.schema=="object"){if(S.validate||a.call(this,S),v===(0,r.normalizeId)($)){const{schema:N}=S,{schemaId:T}=this.opts,M=N[T];return M&&(I=(0,r.resolveUrl)(this.opts.uriResolver,I,M)),new o({schema:N,schemaId:T,root:g,baseId:I})}return w.call(this,p,S)}}Ye.resolveSchema=m;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function w(g,{baseId:$,schema:p,root:_}){var I;if(((I=g.fragment)===null||I===void 0?void 0:I[0])!=="/")return;for(const N of g.fragment.slice(1).split("/")){if(typeof p=="boolean")return;const T=p[(0,s.unescapeFragment)(N)];if(T===void 0)return;p=T;const M=typeof p=="object"&&p[this.opts.schemaId];!b.has(N)&&M&&($=(0,r.resolveUrl)(this.opts.uriResolver,$,M))}let v;if(typeof p!="boolean"&&p.$ref&&!(0,s.schemaHasRulesButRef)(p,this.RULES)){const N=(0,r.resolveUrl)(this.opts.uriResolver,$,p.$ref);v=m.call(this,_,N)}const{schemaId:S}=this.opts;if(v=v||new o({schema:p,schemaId:S,root:_,baseId:$}),v.schema!==v.root.schema)return v}return Ye}const t0="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",n0="Meta-schema for $data reference (JSON AnySchema extension proposal)",r0="object",s0=["$data"],i0={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},o0=!1;var a0={$id:t0,description:n0,type:r0,required:s0,properties:i0,additionalProperties:o0},Gn={},pn={exports:{}},Es,bo;function Hc(){if(bo)return Es;bo=1;const t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),e=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function n(d){let m="",b=0,w=0;for(w=0;w<d.length;w++)if(b=d[w].charCodeAt(0),b!==48){if(!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";m+=d[w];break}for(w+=1;w<d.length;w++){if(b=d[w].charCodeAt(0),!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";m+=d[w]}return m}const r=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function s(d){return d.length=0,!0}function i(d,m,b){if(d.length){const w=n(d);if(w!=="")m.push(w);else return b.error=!0,!1;d.length=0}return!0}function o(d){let m=0;const b={error:!1,address:"",zone:""},w=[],g=[];let $=!1,p=!1,_=i;for(let I=0;I<d.length;I++){const v=d[I];if(!(v==="["||v==="]"))if(v===":"){if($===!0&&(p=!0),!_(g,w,b))break;if(++m>7){b.error=!0;break}I>0&&d[I-1]===":"&&($=!0),w.push(":");continue}else if(v==="%"){if(!_(g,w,b))break;_=s}else{g.push(v);continue}}return g.length&&(_===s?b.zone=g.join(""):p?w.push(g.join("")):w.push(n(g))),b.address=w.join(""),b}function a(d){if(u(d,":")<2)return{host:d,isIPV6:!1};const m=o(d);if(m.error)return{host:d,isIPV6:!1};{let b=m.address,w=m.address;return m.zone&&(b+="%"+m.zone,w+="%25"+m.zone),{host:b,isIPV6:!0,escapedHost:w}}}function u(d,m){let b=0;for(let w=0;w<d.length;w++)d[w]===m&&b++;return b}function f(d){let m=d;const b=[];let w=-1,g=0;for(;g=m.length;){if(g===1){if(m===".")break;if(m==="/"){b.push("/");break}else{b.push(m);break}}else if(g===2){if(m[0]==="."){if(m[1]===".")break;if(m[1]==="/"){m=m.slice(2);continue}}else if(m[0]==="/"&&(m[1]==="."||m[1]==="/")){b.push("/");break}}else if(g===3&&m==="/.."){b.length!==0&&b.pop(),b.push("/");break}if(m[0]==="."){if(m[1]==="."){if(m[2]==="/"){m=m.slice(3);continue}}else if(m[1]==="/"){m=m.slice(2);continue}}else if(m[0]==="/"&&m[1]==="."){if(m[2]==="/"){m=m.slice(2);continue}else if(m[2]==="."&&m[3]==="/"){m=m.slice(3),b.length!==0&&b.pop();continue}}if((w=m.indexOf("/",1))===-1){b.push(m);break}else b.push(m.slice(0,w)),m=m.slice(w)}return b.join("")}function h(d,m){const b=m!==!0?escape:unescape;return d.scheme!==void 0&&(d.scheme=b(d.scheme)),d.userinfo!==void 0&&(d.userinfo=b(d.userinfo)),d.host!==void 0&&(d.host=b(d.host)),d.path!==void 0&&(d.path=b(d.path)),d.query!==void 0&&(d.query=b(d.query)),d.fragment!==void 0&&(d.fragment=b(d.fragment)),d}function y(d){const m=[];if(d.userinfo!==void 0&&(m.push(d.userinfo),m.push("@")),d.host!==void 0){let b=unescape(d.host);if(!e(b)){const w=a(b);w.isIPV6===!0?b=`[${w.escapedHost}]`:b=d.host}m.push(b)}return(typeof d.port=="number"||typeof d.port=="string")&&(m.push(":"),m.push(String(d.port))),m.length?m.join(""):void 0}return Es={nonSimpleDomain:r,recomposeAuthority:y,normalizeComponentEncoding:h,removeDotSegments:f,isIPv4:e,isUUID:t,normalizeIPv6:a,stringArrayToHexStripped:n},Es}var ks,_o;function c0(){if(_o)return ks;_o=1;const{isUUID:t}=Hc(),e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(v){return n.indexOf(v)!==-1}function s(v){return v.secure===!0?!0:v.secure===!1?!1:v.scheme?v.scheme.length===3&&(v.scheme[0]==="w"||v.scheme[0]==="W")&&(v.scheme[1]==="s"||v.scheme[1]==="S")&&(v.scheme[2]==="s"||v.scheme[2]==="S"):!1}function i(v){return v.host||(v.error=v.error||"HTTP URIs must have a host."),v}function o(v){const S=String(v.scheme).toLowerCase()==="https";return(v.port===(S?443:80)||v.port==="")&&(v.port=void 0),v.path||(v.path="/"),v}function a(v){return v.secure=s(v),v.resourceName=(v.path||"/")+(v.query?"?"+v.query:""),v.path=void 0,v.query=void 0,v}function u(v){if((v.port===(s(v)?443:80)||v.port==="")&&(v.port=void 0),typeof v.secure=="boolean"&&(v.scheme=v.secure?"wss":"ws",v.secure=void 0),v.resourceName){const[S,N]=v.resourceName.split("?");v.path=S&&S!=="/"?S:void 0,v.query=N,v.resourceName=void 0}return v.fragment=void 0,v}function f(v,S){if(!v.path)return v.error="URN can not be parsed",v;const N=v.path.match(e);if(N){const T=S.scheme||v.scheme||"urn";v.nid=N[1].toLowerCase(),v.nss=N[2];const M=`${T}:${S.nid||v.nid}`,H=I(M);v.path=void 0,H&&(v=H.parse(v,S))}else v.error=v.error||"URN can not be parsed.";return v}function h(v,S){if(v.nid===void 0)throw new Error("URN without nid cannot be serialized");const N=S.scheme||v.scheme||"urn",T=v.nid.toLowerCase(),M=`${N}:${S.nid||T}`,H=I(M);H&&(v=H.serialize(v,S));const J=v,Y=v.nss;return J.path=`${T||S.nid}:${Y}`,S.skipEscape=!0,J}function y(v,S){const N=v;return N.uuid=N.nss,N.nss=void 0,!S.tolerant&&(!N.uuid||!t(N.uuid))&&(N.error=N.error||"UUID is not valid."),N}function d(v){const S=v;return S.nss=(v.uuid||"").toLowerCase(),S}const m={scheme:"http",domainHost:!0,parse:i,serialize:o},b={scheme:"https",domainHost:m.domainHost,parse:i,serialize:o},w={scheme:"ws",domainHost:!0,parse:a,serialize:u},g={scheme:"wss",domainHost:w.domainHost,parse:w.parse,serialize:w.serialize},_={http:m,https:b,ws:w,wss:g,urn:{scheme:"urn",parse:f,serialize:h,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:y,serialize:d,skipNormalize:!0}};Object.setPrototypeOf(_,null);function I(v){return v&&(_[v]||_[v.toLowerCase()])||void 0}return ks={wsIsSecure:s,SCHEMES:_,isValidSchemeName:r,getSchemeHandler:I},ks}var $o;function u0(){if($o)return pn.exports;$o=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:n,normalizeComponentEncoding:r,isIPv4:s,nonSimpleDomain:i}=Hc(),{SCHEMES:o,getSchemeHandler:a}=c0();function u(g,$){return typeof g=="string"?g=d(b(g,$),$):typeof g=="object"&&(g=b(d(g,$),$)),g}function f(g,$,p){const _=p?Object.assign({scheme:"null"},p):{scheme:"null"},I=h(b(g,_),b($,_),_,!0);return _.skipEscape=!0,d(I,_)}function h(g,$,p,_){const I={};return _||(g=b(d(g,p),p),$=b(d($,p),p)),p=p||{},!p.tolerant&&$.scheme?(I.scheme=$.scheme,I.userinfo=$.userinfo,I.host=$.host,I.port=$.port,I.path=e($.path||""),I.query=$.query):($.userinfo!==void 0||$.host!==void 0||$.port!==void 0?(I.userinfo=$.userinfo,I.host=$.host,I.port=$.port,I.path=e($.path||""),I.query=$.query):($.path?($.path[0]==="/"?I.path=e($.path):((g.userinfo!==void 0||g.host!==void 0||g.port!==void 0)&&!g.path?I.path="/"+$.path:g.path?I.path=g.path.slice(0,g.path.lastIndexOf("/")+1)+$.path:I.path=$.path,I.path=e(I.path)),I.query=$.query):(I.path=g.path,$.query!==void 0?I.query=$.query:I.query=g.query),I.userinfo=g.userinfo,I.host=g.host,I.port=g.port),I.scheme=g.scheme),I.fragment=$.fragment,I}function y(g,$,p){return typeof g=="string"?(g=unescape(g),g=d(r(b(g,p),!0),{...p,skipEscape:!0})):typeof g=="object"&&(g=d(r(g,!0),{...p,skipEscape:!0})),typeof $=="string"?($=unescape($),$=d(r(b($,p),!0),{...p,skipEscape:!0})):typeof $=="object"&&($=d(r($,!0),{...p,skipEscape:!0})),g.toLowerCase()===$.toLowerCase()}function d(g,$){const p={host:g.host,scheme:g.scheme,userinfo:g.userinfo,port:g.port,path:g.path,query:g.query,nid:g.nid,nss:g.nss,uuid:g.uuid,fragment:g.fragment,reference:g.reference,resourceName:g.resourceName,secure:g.secure,error:""},_=Object.assign({},$),I=[],v=a(_.scheme||p.scheme);v&&v.serialize&&v.serialize(p,_),p.path!==void 0&&(_.skipEscape?p.path=unescape(p.path):(p.path=escape(p.path),p.scheme!==void 0&&(p.path=p.path.split("%3A").join(":")))),_.reference!=="suffix"&&p.scheme&&I.push(p.scheme,":");const S=n(p);if(S!==void 0&&(_.reference!=="suffix"&&I.push("//"),I.push(S),p.path&&p.path[0]!=="/"&&I.push("/")),p.path!==void 0){let N=p.path;!_.absolutePath&&(!v||!v.absolutePath)&&(N=e(N)),S===void 0&&N[0]==="/"&&N[1]==="/"&&(N="/%2F"+N.slice(2)),I.push(N)}return p.query!==void 0&&I.push("?",p.query),p.fragment!==void 0&&I.push("#",p.fragment),I.join("")}const m=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(g,$){const p=Object.assign({},$),_={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let I=!1;p.reference==="suffix"&&(p.scheme?g=p.scheme+":"+g:g="//"+g);const v=g.match(m);if(v){if(_.scheme=v[1],_.userinfo=v[3],_.host=v[4],_.port=parseInt(v[5],10),_.path=v[6]||"",_.query=v[7],_.fragment=v[8],isNaN(_.port)&&(_.port=v[5]),_.host)if(s(_.host)===!1){const T=t(_.host);_.host=T.host.toLowerCase(),I=T.isIPV6}else I=!0;_.scheme===void 0&&_.userinfo===void 0&&_.host===void 0&&_.port===void 0&&_.query===void 0&&!_.path?_.reference="same-document":_.scheme===void 0?_.reference="relative":_.fragment===void 0?_.reference="absolute":_.reference="uri",p.reference&&p.reference!=="suffix"&&p.reference!==_.reference&&(_.error=_.error||"URI is not a "+p.reference+" reference.");const S=a(p.scheme||_.scheme);if(!p.unicodeSupport&&(!S||!S.unicodeSupport)&&_.host&&(p.domainHost||S&&S.domainHost)&&I===!1&&i(_.host))try{_.host=URL.domainToASCII(_.host.toLowerCase())}catch(N){_.error=_.error||"Host's domain name can not be converted to ASCII: "+N}(!S||S&&!S.skipNormalize)&&(g.indexOf("%")!==-1&&(_.scheme!==void 0&&(_.scheme=unescape(_.scheme)),_.host!==void 0&&(_.host=unescape(_.host))),_.path&&(_.path=escape(unescape(_.path))),_.fragment&&(_.fragment=encodeURI(decodeURIComponent(_.fragment)))),S&&S.parse&&S.parse(_,p)}else _.error=_.error||"URI can not be parsed.";return _}const w={SCHEMES:o,normalize:u,resolve:f,resolveComponent:h,equal:y,serialize:d,parse:b};return pn.exports=w,pn.exports.default=w,pn.exports.fastUri=w,pn.exports}var Eo;function l0(){if(Eo)return Gn;Eo=1,Object.defineProperty(Gn,"__esModule",{value:!0});const t=u0();return t.code='require("ajv/dist/runtime/uri").default',Gn.default=t,Gn}var ko;function f0(){return ko||(ko=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=ss();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var n=he();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=fi(),s=is(),i=Zc(),o=di(),a=he(),u=rs(),f=Mr(),h=me(),y=a0,d=l0(),m=(V,P)=>new RegExp(V,P);m.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],w=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},p=200;function _(V){var P,j,B,k,O,F,X,Q,fe,ie,x,D,L,K,ee,ae,we,Re,Me,je,Oe,Fe,Le,un,Qe;const It=V.strict,E=(P=V.code)===null||P===void 0?void 0:P.optimize,c=E===!0||E===void 0?1:E||0,l=(B=(j=V.code)===null||j===void 0?void 0:j.regExp)!==null&&B!==void 0?B:m,A=(k=V.uriResolver)!==null&&k!==void 0?k:d.default;return{strictSchema:(F=(O=V.strictSchema)!==null&&O!==void 0?O:It)!==null&&F!==void 0?F:!0,strictNumbers:(Q=(X=V.strictNumbers)!==null&&X!==void 0?X:It)!==null&&Q!==void 0?Q:!0,strictTypes:(ie=(fe=V.strictTypes)!==null&&fe!==void 0?fe:It)!==null&&ie!==void 0?ie:"log",strictTuples:(D=(x=V.strictTuples)!==null&&x!==void 0?x:It)!==null&&D!==void 0?D:"log",strictRequired:(K=(L=V.strictRequired)!==null&&L!==void 0?L:It)!==null&&K!==void 0?K:!1,code:V.code?{...V.code,optimize:c,regExp:l}:{optimize:c,regExp:l},loopRequired:(ee=V.loopRequired)!==null&&ee!==void 0?ee:p,loopEnum:(ae=V.loopEnum)!==null&&ae!==void 0?ae:p,meta:(we=V.meta)!==null&&we!==void 0?we:!0,messages:(Re=V.messages)!==null&&Re!==void 0?Re:!0,inlineRefs:(Me=V.inlineRefs)!==null&&Me!==void 0?Me:!0,schemaId:(je=V.schemaId)!==null&&je!==void 0?je:"$id",addUsedSchema:(Oe=V.addUsedSchema)!==null&&Oe!==void 0?Oe:!0,validateSchema:(Fe=V.validateSchema)!==null&&Fe!==void 0?Fe:!0,validateFormats:(Le=V.validateFormats)!==null&&Le!==void 0?Le:!0,unicodeRegExp:(un=V.unicodeRegExp)!==null&&un!==void 0?un:!0,int32range:(Qe=V.int32range)!==null&&Qe!==void 0?Qe:!0,uriResolver:A}}class I{constructor(P={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,P=this.opts={...P,..._(P)};const{es5:j,lines:B}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:w,es5:j,lines:B}),this.logger=Y(P.logger);const k=P.validateFormats;P.validateFormats=!1,this.RULES=(0,i.getRules)(),v.call(this,g,P,"NOT SUPPORTED"),v.call(this,$,P,"DEPRECATED","warn"),this._metaOpts=H.call(this),P.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),P.keywords&&M.call(this,P.keywords),typeof P.meta=="object"&&this.addMetaSchema(P.meta),N.call(this),P.validateFormats=k}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:P,meta:j,schemaId:B}=this.opts;let k=y;B==="id"&&(k={...y},k.id=k.$id,delete k.$id),j&&P&&this.addMetaSchema(k,k[B],!1)}defaultMeta(){const{meta:P,schemaId:j}=this.opts;return this.opts.defaultMeta=typeof P=="object"?P[j]||P:void 0}validate(P,j){let B;if(typeof P=="string"){if(B=this.getSchema(P),!B)throw new Error(`no schema with key or ref "${P}"`)}else B=this.compile(P);const k=B(j);return"$async"in B||(this.errors=B.errors),k}compile(P,j){const B=this._addSchema(P,j);return B.validate||this._compileSchemaEnv(B)}compileAsync(P,j){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:B}=this.opts;return k.call(this,P,j);async function k(ie,x){await O.call(this,ie.$schema);const D=this._addSchema(ie,x);return D.validate||F.call(this,D)}async function O(ie){ie&&!this.getSchema(ie)&&await k.call(this,{$ref:ie},!0)}async function F(ie){try{return this._compileSchemaEnv(ie)}catch(x){if(!(x instanceof s.default))throw x;return X.call(this,x),await Q.call(this,x.missingSchema),F.call(this,ie)}}function X({missingSchema:ie,missingRef:x}){if(this.refs[ie])throw new Error(`AnySchema ${ie} is loaded but ${x} cannot be resolved`)}async function Q(ie){const x=await fe.call(this,ie);this.refs[ie]||await O.call(this,x.$schema),this.refs[ie]||this.addSchema(x,ie,j)}async function fe(ie){const x=this._loading[ie];if(x)return x;try{return await(this._loading[ie]=B(ie))}finally{delete this._loading[ie]}}}addSchema(P,j,B,k=this.opts.validateSchema){if(Array.isArray(P)){for(const F of P)this.addSchema(F,void 0,B,k);return this}let O;if(typeof P=="object"){const{schemaId:F}=this.opts;if(O=P[F],O!==void 0&&typeof O!="string")throw new Error(`schema ${F} must be string`)}return j=(0,u.normalizeId)(j||O),this._checkUnique(j),this.schemas[j]=this._addSchema(P,B,j,k,!0),this}addMetaSchema(P,j,B=this.opts.validateSchema){return this.addSchema(P,j,!0,B),this}validateSchema(P,j){if(typeof P=="boolean")return!0;let B;if(B=P.$schema,B!==void 0&&typeof B!="string")throw new Error("$schema must be a string");if(B=B||this.opts.defaultMeta||this.defaultMeta(),!B)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const k=this.validate(B,P);if(!k&&j){const O="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(O);else throw new Error(O)}return k}getSchema(P){let j;for(;typeof(j=S.call(this,P))=="string";)P=j;if(j===void 0){const{schemaId:B}=this.opts,k=new o.SchemaEnv({schema:{},schemaId:B});if(j=o.resolveSchema.call(this,k,P),!j)return;this.refs[P]=j}return j.validate||this._compileSchemaEnv(j)}removeSchema(P){if(P instanceof RegExp)return this._removeAllSchemas(this.schemas,P),this._removeAllSchemas(this.refs,P),this;switch(typeof P){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const j=S.call(this,P);return typeof j=="object"&&this._cache.delete(j.schema),delete this.schemas[P],delete this.refs[P],this}case"object":{const j=P;this._cache.delete(j);let B=P[this.opts.schemaId];return B&&(B=(0,u.normalizeId)(B),delete this.schemas[B],delete this.refs[B]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(P){for(const j of P)this.addKeyword(j);return this}addKeyword(P,j){let B;if(typeof P=="string")B=P,typeof j=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),j.keyword=B);else if(typeof P=="object"&&j===void 0){if(j=P,B=j.keyword,Array.isArray(B)&&!B.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(le.call(this,B,j),!j)return(0,h.eachItem)(B,O=>z.call(this,O)),this;re.call(this,j);const k={...j,type:(0,f.getJSONTypes)(j.type),schemaType:(0,f.getJSONTypes)(j.schemaType)};return(0,h.eachItem)(B,k.type.length===0?O=>z.call(this,O,k):O=>k.type.forEach(F=>z.call(this,O,k,F))),this}getKeyword(P){const j=this.RULES.all[P];return typeof j=="object"?j.definition:!!j}removeKeyword(P){const{RULES:j}=this;delete j.keywords[P],delete j.all[P];for(const B of j.rules){const k=B.rules.findIndex(O=>O.keyword===P);k>=0&&B.rules.splice(k,1)}return this}addFormat(P,j){return typeof j=="string"&&(j=new RegExp(j)),this.formats[P]=j,this}errorsText(P=this.errors,{separator:j=", ",dataVar:B="data"}={}){return!P||P.length===0?"No errors":P.map(k=>`${B}${k.instancePath} ${k.message}`).reduce((k,O)=>k+j+O)}$dataMetaSchema(P,j){const B=this.RULES.all;P=JSON.parse(JSON.stringify(P));for(const k of j){const O=k.split("/").slice(1);let F=P;for(const X of O)F=F[X];for(const X in B){const Q=B[X];if(typeof Q!="object")continue;const{$data:fe}=Q.definition,ie=F[X];fe&&ie&&(F[X]=oe(ie))}}return P}_removeAllSchemas(P,j){for(const B in P){const k=P[B];(!j||j.test(B))&&(typeof k=="string"?delete P[B]:k&&!k.meta&&(this._cache.delete(k.schema),delete P[B]))}}_addSchema(P,j,B,k=this.opts.validateSchema,O=this.opts.addUsedSchema){let F;const{schemaId:X}=this.opts;if(typeof P=="object")F=P[X];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof P!="boolean")throw new Error("schema must be object or boolean")}let Q=this._cache.get(P);if(Q!==void 0)return Q;B=(0,u.normalizeId)(F||B);const fe=u.getSchemaRefs.call(this,P,B);return Q=new o.SchemaEnv({schema:P,schemaId:X,meta:j,baseId:B,localRefs:fe}),this._cache.set(Q.schema,Q),O&&!B.startsWith("#")&&(B&&this._checkUnique(B),this.refs[B]=Q),k&&this.validateSchema(P,!0),Q}_checkUnique(P){if(this.schemas[P]||this.refs[P])throw new Error(`schema with key or id "${P}" already exists`)}_compileSchemaEnv(P){if(P.meta?this._compileMetaSchema(P):o.compileSchema.call(this,P),!P.validate)throw new Error("ajv implementation error");return P.validate}_compileMetaSchema(P){const j=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,P)}finally{this.opts=j}}}I.ValidationError=r.default,I.MissingRefError=s.default,t.default=I;function v(V,P,j,B="error"){for(const k in V){const O=k;O in P&&this.logger[B](`${j}: option ${k}. ${V[O]}`)}}function S(V){return V=(0,u.normalizeId)(V),this.schemas[V]||this.refs[V]}function N(){const V=this.opts.schemas;if(V)if(Array.isArray(V))this.addSchema(V);else for(const P in V)this.addSchema(V[P],P)}function T(){for(const V in this.opts.formats){const P=this.opts.formats[V];P&&this.addFormat(V,P)}}function M(V){if(Array.isArray(V)){this.addVocabulary(V);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const P in V){const j=V[P];j.keyword||(j.keyword=P),this.addKeyword(j)}}function H(){const V={...this.opts};for(const P of b)delete V[P];return V}const J={log(){},warn(){},error(){}};function Y(V){if(V===!1)return J;if(V===void 0)return console;if(V.log&&V.warn&&V.error)return V;throw new Error("logger must implement log, warn and error methods")}const se=/^[a-z_$][a-z0-9_$:-]*$/i;function le(V,P){const{RULES:j}=this;if((0,h.eachItem)(V,B=>{if(j.keywords[B])throw new Error(`Keyword ${B} is already defined`);if(!se.test(B))throw new Error(`Keyword ${B} has invalid name`)}),!!P&&P.$data&&!("code"in P||"validate"in P))throw new Error('$data keyword must have "code" or "validate" function')}function z(V,P,j){var B;const k=P?.post;if(j&&k)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:O}=this;let F=k?O.post:O.rules.find(({type:Q})=>Q===j);if(F||(F={type:j,rules:[]},O.rules.push(F)),O.keywords[V]=!0,!P)return;const X={keyword:V,definition:{...P,type:(0,f.getJSONTypes)(P.type),schemaType:(0,f.getJSONTypes)(P.schemaType)}};P.before?W.call(this,F,X,P.before):F.rules.push(X),O.all[V]=X,(B=P.implements)===null||B===void 0||B.forEach(Q=>this.addKeyword(Q))}function W(V,P,j){const B=V.rules.findIndex(k=>k.keyword===j);B>=0?V.rules.splice(B,0,P):(V.rules.push(P),this.logger.warn(`rule ${j} is not defined`))}function re(V){let{metaSchema:P}=V;P!==void 0&&(V.$data&&this.opts.$data&&(P=oe(P)),V.validateSchema=this.compile(P,!0))}const ne={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function oe(V){return{anyOf:[V,ne]}}})(gs)),gs}var Jn={},Wn={},Yn={},So;function d0(){if(So)return Yn;So=1,Object.defineProperty(Yn,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Yn.default=t,Yn}var yt={},Io;function h0(){if(Io)return yt;Io=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.callRef=yt.getValidate=void 0;const t=is(),e=ct(),n=he(),r=St(),s=di(),i=me(),o={keyword:"$ref",schemaType:"string",code(f){const{gen:h,schema:y,it:d}=f,{baseId:m,schemaEnv:b,validateName:w,opts:g,self:$}=d,{root:p}=b;if((y==="#"||y==="#/")&&m===p.baseId)return I();const _=s.resolveRef.call($,p,m,y);if(_===void 0)throw new t.default(d.opts.uriResolver,m,y);if(_ instanceof s.SchemaEnv)return v(_);return S(_);function I(){if(b===p)return u(f,w,b,b.$async);const N=h.scopeValue("root",{ref:p});return u(f,(0,n._)`${N}.validate`,p,p.$async)}function v(N){const T=a(f,N);u(f,T,N,N.$async)}function S(N){const T=h.scopeValue("schema",g.code.source===!0?{ref:N,code:(0,n.stringify)(N)}:{ref:N}),M=h.name("valid"),H=f.subschema({schema:N,dataTypes:[],schemaPath:n.nil,topSchemaRef:T,errSchemaPath:y},M);f.mergeEvaluated(H),f.ok(M)}}};function a(f,h){const{gen:y}=f;return h.validate?y.scopeValue("validate",{ref:h.validate}):(0,n._)`${y.scopeValue("wrapper",{ref:h})}.validate`}yt.getValidate=a;function u(f,h,y,d){const{gen:m,it:b}=f,{allErrors:w,schemaEnv:g,opts:$}=b,p=$.passContext?r.default.this:n.nil;d?_():I();function _(){if(!g.$async)throw new Error("async schema referenced by sync schema");const N=m.let("valid");m.try(()=>{m.code((0,n._)`await ${(0,e.callValidateCode)(f,h,p)}`),S(h),w||m.assign(N,!0)},T=>{m.if((0,n._)`!(${T} instanceof ${b.ValidationError})`,()=>m.throw(T)),v(T),w||m.assign(N,!1)}),f.ok(N)}function I(){f.result((0,e.callValidateCode)(f,h,p),()=>S(h),()=>v(h))}function v(N){const T=(0,n._)`${N}.errors`;m.assign(r.default.vErrors,(0,n._)`${r.default.vErrors} === null ? ${T} : ${r.default.vErrors}.concat(${T})`),m.assign(r.default.errors,(0,n._)`${r.default.vErrors}.length`)}function S(N){var T;if(!b.opts.unevaluated)return;const M=(T=y?.validate)===null||T===void 0?void 0:T.evaluated;if(b.props!==!0)if(M&&!M.dynamicProps)M.props!==void 0&&(b.props=i.mergeEvaluated.props(m,M.props,b.props));else{const H=m.var("props",(0,n._)`${N}.evaluated.props`);b.props=i.mergeEvaluated.props(m,H,b.props,n.Name)}if(b.items!==!0)if(M&&!M.dynamicItems)M.items!==void 0&&(b.items=i.mergeEvaluated.items(m,M.items,b.items));else{const H=m.var("items",(0,n._)`${N}.evaluated.items`);b.items=i.mergeEvaluated.items(m,H,b.items,n.Name)}}}return yt.callRef=u,yt.default=o,yt}var Ao;function p0(){if(Ao)return Wn;Ao=1,Object.defineProperty(Wn,"__esModule",{value:!0});const t=d0(),e=h0(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,e.default];return Wn.default=n,Wn}var Qn={},Xn={},No;function m0(){if(No)return Xn;No=1,Object.defineProperty(Xn,"__esModule",{value:!0});const t=he(),e=t.operators,n={maximum:{okStr:"<=",ok:e.LTE,fail:e.GT},minimum:{okStr:">=",ok:e.GTE,fail:e.LT},exclusiveMaximum:{okStr:"<",ok:e.LT,fail:e.GTE},exclusiveMinimum:{okStr:">",ok:e.GT,fail:e.LTE}},r={message:({keyword:i,schemaCode:o})=>(0,t.str)`must be ${n[i].okStr} ${o}`,params:({keyword:i,schemaCode:o})=>(0,t._)`{comparison: ${n[i].okStr}, limit: ${o}}`},s={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:r,code(i){const{keyword:o,data:a,schemaCode:u}=i;i.fail$data((0,t._)`${a} ${n[o].fail} ${u} || isNaN(${a})`)}};return Xn.default=s,Xn}var er={},Oo;function g0(){if(Oo)return er;Oo=1,Object.defineProperty(er,"__esModule",{value:!0});const t=he(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:r})=>(0,t.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,t._)`{multipleOf: ${r}}`},code(r){const{gen:s,data:i,schemaCode:o,it:a}=r,u=a.opts.multipleOfPrecision,f=s.let("res"),h=u?(0,t._)`Math.abs(Math.round(${f}) - ${f}) > 1e-${u}`:(0,t._)`${f} !== parseInt(${f})`;r.fail$data((0,t._)`(${o} === 0 || (${f} = ${i}/${o}, ${h}))`)}};return er.default=n,er}var tr={},nr={},To;function y0(){if(To)return nr;To=1,Object.defineProperty(nr,"__esModule",{value:!0});function t(e){const n=e.length;let r=0,s=0,i;for(;s<n;)r++,i=e.charCodeAt(s++),i>=55296&&i<=56319&&s<n&&(i=e.charCodeAt(s),(i&64512)===56320&&s++);return r}return nr.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',nr}var Po;function w0(){if(Po)return tr;Po=1,Object.defineProperty(tr,"__esModule",{value:!0});const t=he(),e=me(),n=y0(),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:o}){const a=i==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${a} than ${o} characters`},params:({schemaCode:i})=>(0,t._)`{limit: ${i}}`},code(i){const{keyword:o,data:a,schemaCode:u,it:f}=i,h=o==="maxLength"?t.operators.GT:t.operators.LT,y=f.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,e.useFunc)(i.gen,n.default)}(${a})`;i.fail$data((0,t._)`${y} ${h} ${u}`)}};return tr.default=s,tr}var rr={},Co;function v0(){if(Co)return rr;Co=1,Object.defineProperty(rr,"__esModule",{value:!0});const t=ct(),e=he(),r={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>(0,e.str)`must match pattern "${s}"`,params:({schemaCode:s})=>(0,e._)`{pattern: ${s}}`},code(s){const{data:i,$data:o,schema:a,schemaCode:u,it:f}=s,h=f.opts.unicodeRegExp?"u":"",y=o?(0,e._)`(new RegExp(${u}, ${h}))`:(0,t.usePattern)(s,a);s.fail$data((0,e._)`!${y}.test(${i})`)}};return rr.default=r,rr}var sr={},xo;function b0(){if(xo)return sr;xo=1,Object.defineProperty(sr,"__esModule",{value:!0});const t=he(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:s}){const i=r==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${i} than ${s} properties`},params:({schemaCode:r})=>(0,t._)`{limit: ${r}}`},code(r){const{keyword:s,data:i,schemaCode:o}=r,a=s==="maxProperties"?t.operators.GT:t.operators.LT;r.fail$data((0,t._)`Object.keys(${i}).length ${a} ${o}`)}};return sr.default=n,sr}var ir={},Bo;function _0(){if(Bo)return ir;Bo=1,Object.defineProperty(ir,"__esModule",{value:!0});const t=ct(),e=he(),n=me(),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:i}})=>(0,e.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,e._)`{missingProperty: ${i}}`},code(i){const{gen:o,schema:a,schemaCode:u,data:f,$data:h,it:y}=i,{opts:d}=y;if(!h&&a.length===0)return;const m=a.length>=d.loopRequired;if(y.allErrors?b():w(),d.strictRequired){const p=i.parentSchema.properties,{definedProperties:_}=i.it;for(const I of a)if(p?.[I]===void 0&&!_.has(I)){const v=y.schemaEnv.baseId+y.errSchemaPath,S=`required property "${I}" is not defined at "${v}" (strictRequired)`;(0,n.checkStrictMode)(y,S,y.opts.strictRequired)}}function b(){if(m||h)i.block$data(e.nil,g);else for(const p of a)(0,t.checkReportMissingProp)(i,p)}function w(){const p=o.let("missing");if(m||h){const _=o.let("valid",!0);i.block$data(_,()=>$(p,_)),i.ok(_)}else o.if((0,t.checkMissingProp)(i,a,p)),(0,t.reportMissingProp)(i,p),o.else()}function g(){o.forOf("prop",u,p=>{i.setParams({missingProperty:p}),o.if((0,t.noPropertyInData)(o,f,p,d.ownProperties),()=>i.error())})}function $(p,_){i.setParams({missingProperty:p}),o.forOf(p,u,()=>{o.assign(_,(0,t.propertyInData)(o,f,p,d.ownProperties)),o.if((0,e.not)(_),()=>{i.error(),o.break()})},e.nil)}}};return ir.default=s,ir}var or={},Do;function $0(){if(Do)return or;Do=1,Object.defineProperty(or,"__esModule",{value:!0});const t=he(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:s}){const i=r==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${i} than ${s} items`},params:({schemaCode:r})=>(0,t._)`{limit: ${r}}`},code(r){const{keyword:s,data:i,schemaCode:o}=r,a=s==="maxItems"?t.operators.GT:t.operators.LT;r.fail$data((0,t._)`${i}.length ${a} ${o}`)}};return or.default=n,or}var ar={},cr={},Ro;function hi(){if(Ro)return cr;Ro=1,Object.defineProperty(cr,"__esModule",{value:!0});const t=Kc();return t.code='require("ajv/dist/runtime/equal").default',cr.default=t,cr}var jo;function E0(){if(jo)return ar;jo=1,Object.defineProperty(ar,"__esModule",{value:!0});const t=Mr(),e=he(),n=me(),r=hi(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:o,j:a}})=>(0,e.str)`must NOT have duplicate items (items ## ${a} and ${o} are identical)`,params:({params:{i:o,j:a}})=>(0,e._)`{i: ${o}, j: ${a}}`},code(o){const{gen:a,data:u,$data:f,schema:h,parentSchema:y,schemaCode:d,it:m}=o;if(!f&&!h)return;const b=a.let("valid"),w=y.items?(0,t.getSchemaTypes)(y.items):[];o.block$data(b,g,(0,e._)`${d} === false`),o.ok(b);function g(){const I=a.let("i",(0,e._)`${u}.length`),v=a.let("j");o.setParams({i:I,j:v}),a.assign(b,!0),a.if((0,e._)`${I} > 1`,()=>($()?p:_)(I,v))}function $(){return w.length>0&&!w.some(I=>I==="object"||I==="array")}function p(I,v){const S=a.name("item"),N=(0,t.checkDataTypes)(w,S,m.opts.strictNumbers,t.DataType.Wrong),T=a.const("indices",(0,e._)`{}`);a.for((0,e._)`;${I}--;`,()=>{a.let(S,(0,e._)`${u}[${I}]`),a.if(N,(0,e._)`continue`),w.length>1&&a.if((0,e._)`typeof ${S} == "string"`,(0,e._)`${S} += "_"`),a.if((0,e._)`typeof ${T}[${S}] == "number"`,()=>{a.assign(v,(0,e._)`${T}[${S}]`),o.error(),a.assign(b,!1).break()}).code((0,e._)`${T}[${S}] = ${I}`)})}function _(I,v){const S=(0,n.useFunc)(a,r.default),N=a.name("outer");a.label(N).for((0,e._)`;${I}--;`,()=>a.for((0,e._)`${v} = ${I}; ${v}--;`,()=>a.if((0,e._)`${S}(${u}[${I}], ${u}[${v}])`,()=>{o.error(),a.assign(b,!1).break(N)})))}}};return ar.default=i,ar}var ur={},Fo;function k0(){if(Fo)return ur;Fo=1,Object.defineProperty(ur,"__esModule",{value:!0});const t=he(),e=me(),n=hi(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,t._)`{allowedValue: ${i}}`},code(i){const{gen:o,data:a,$data:u,schemaCode:f,schema:h}=i;u||h&&typeof h=="object"?i.fail$data((0,t._)`!${(0,e.useFunc)(o,n.default)}(${a}, ${f})`):i.fail((0,t._)`${h} !== ${a}`)}};return ur.default=s,ur}var lr={},zo;function S0(){if(zo)return lr;zo=1,Object.defineProperty(lr,"__esModule",{value:!0});const t=he(),e=me(),n=hi(),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,t._)`{allowedValues: ${i}}`},code(i){const{gen:o,data:a,$data:u,schema:f,schemaCode:h,it:y}=i;if(!u&&f.length===0)throw new Error("enum must have non-empty array");const d=f.length>=y.opts.loopEnum;let m;const b=()=>m??(m=(0,e.useFunc)(o,n.default));let w;if(d||u)w=o.let("valid"),i.block$data(w,g);else{if(!Array.isArray(f))throw new Error("ajv implementation error");const p=o.const("vSchema",h);w=(0,t.or)(...f.map((_,I)=>$(p,I)))}i.pass(w);function g(){o.assign(w,!1),o.forOf("v",h,p=>o.if((0,t._)`${b()}(${a}, ${p})`,()=>o.assign(w,!0).break()))}function $(p,_){const I=f[_];return typeof I=="object"&&I!==null?(0,t._)`${b()}(${a}, ${p}[${_}])`:(0,t._)`${a} === ${I}`}}};return lr.default=s,lr}var Uo;function I0(){if(Uo)return Qn;Uo=1,Object.defineProperty(Qn,"__esModule",{value:!0});const t=m0(),e=g0(),n=w0(),r=v0(),s=b0(),i=_0(),o=$0(),a=E0(),u=k0(),f=S0(),h=[t.default,e.default,n.default,r.default,s.default,i.default,o.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,f.default];return Qn.default=h,Qn}var fr={},Lt={},Mo;function Gc(){if(Mo)return Lt;Mo=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.validateAdditionalItems=void 0;const t=he(),e=me(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0,t.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,t._)`{limit: ${i}}`},code(i){const{parentSchema:o,it:a}=i,{items:u}=o;if(!Array.isArray(u)){(0,e.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}s(i,u)}};function s(i,o){const{gen:a,schema:u,data:f,keyword:h,it:y}=i;y.items=!0;const d=a.const("len",(0,t._)`${f}.length`);if(u===!1)i.setParams({len:o.length}),i.pass((0,t._)`${d} <= ${o.length}`);else if(typeof u=="object"&&!(0,e.alwaysValidSchema)(y,u)){const b=a.var("valid",(0,t._)`${d} <= ${o.length}`);a.if((0,t.not)(b),()=>m(b)),i.ok(b)}function m(b){a.forRange("i",o.length,d,w=>{i.subschema({keyword:h,dataProp:w,dataPropType:e.Type.Num},b),y.allErrors||a.if((0,t.not)(b),()=>a.break())})}}return Lt.validateAdditionalItems=s,Lt.default=r,Lt}var dr={},qt={},Lo;function Jc(){if(Lo)return qt;Lo=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.validateTuple=void 0;const t=he(),e=me(),n=ct(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:o,it:a}=i;if(Array.isArray(o))return s(i,"additionalItems",o);a.items=!0,!(0,e.alwaysValidSchema)(a,o)&&i.ok((0,n.validateArray)(i))}};function s(i,o,a=i.schema){const{gen:u,parentSchema:f,data:h,keyword:y,it:d}=i;w(f),d.opts.unevaluated&&a.length&&d.items!==!0&&(d.items=e.mergeEvaluated.items(u,a.length,d.items));const m=u.name("valid"),b=u.const("len",(0,t._)`${h}.length`);a.forEach((g,$)=>{(0,e.alwaysValidSchema)(d,g)||(u.if((0,t._)`${b} > ${$}`,()=>i.subschema({keyword:y,schemaProp:$,dataProp:$},m)),i.ok(m))});function w(g){const{opts:$,errSchemaPath:p}=d,_=a.length,I=_===g.minItems&&(_===g.maxItems||g[o]===!1);if($.strictTuples&&!I){const v=`"${y}" is ${_}-tuple, but minItems or maxItems/${o} are not specified or different at path "${p}"`;(0,e.checkStrictMode)(d,v,$.strictTuples)}}}return qt.validateTuple=s,qt.default=r,qt}var qo;function A0(){if(qo)return dr;qo=1,Object.defineProperty(dr,"__esModule",{value:!0});const t=Jc(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,t.validateTuple)(n,"items")};return dr.default=e,dr}var hr={},Zo;function N0(){if(Zo)return hr;Zo=1,Object.defineProperty(hr,"__esModule",{value:!0});const t=he(),e=me(),n=ct(),r=Gc(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,t.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,t._)`{limit: ${o}}`},code(o){const{schema:a,parentSchema:u,it:f}=o,{prefixItems:h}=u;f.items=!0,!(0,e.alwaysValidSchema)(f,a)&&(h?(0,r.validateAdditionalItems)(o,h):o.ok((0,n.validateArray)(o)))}};return hr.default=i,hr}var pr={},Vo;function O0(){if(Vo)return pr;Vo=1,Object.defineProperty(pr,"__esModule",{value:!0});const t=he(),e=me(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:s,max:i}})=>i===void 0?(0,t.str)`must contain at least ${s} valid item(s)`:(0,t.str)`must contain at least ${s} and no more than ${i} valid item(s)`,params:({params:{min:s,max:i}})=>i===void 0?(0,t._)`{minContains: ${s}}`:(0,t._)`{minContains: ${s}, maxContains: ${i}}`},code(s){const{gen:i,schema:o,parentSchema:a,data:u,it:f}=s;let h,y;const{minContains:d,maxContains:m}=a;f.opts.next?(h=d===void 0?1:d,y=m):h=1;const b=i.const("len",(0,t._)`${u}.length`);if(s.setParams({min:h,max:y}),y===void 0&&h===0){(0,e.checkStrictMode)(f,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(y!==void 0&&h>y){(0,e.checkStrictMode)(f,'"minContains" > "maxContains" is always invalid'),s.fail();return}if((0,e.alwaysValidSchema)(f,o)){let _=(0,t._)`${b} >= ${h}`;y!==void 0&&(_=(0,t._)`${_} && ${b} <= ${y}`),s.pass(_);return}f.items=!0;const w=i.name("valid");y===void 0&&h===1?$(w,()=>i.if(w,()=>i.break())):h===0?(i.let(w,!0),y!==void 0&&i.if((0,t._)`${u}.length > 0`,g)):(i.let(w,!1),g()),s.result(w,()=>s.reset());function g(){const _=i.name("_valid"),I=i.let("count",0);$(_,()=>i.if(_,()=>p(I)))}function $(_,I){i.forRange("i",0,b,v=>{s.subschema({keyword:"contains",dataProp:v,dataPropType:e.Type.Num,compositeRule:!0},_),I()})}function p(_){i.code((0,t._)`${_}++`),y===void 0?i.if((0,t._)`${_} >= ${h}`,()=>i.assign(w,!0).break()):(i.if((0,t._)`${_} > ${y}`,()=>i.assign(w,!1).break()),h===1?i.assign(w,!0):i.if((0,t._)`${_} >= ${h}`,()=>i.assign(w,!0)))}}};return pr.default=r,pr}var Ss={},Ko;function T0(){return Ko||(Ko=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=he(),n=me(),r=ct();t.error={message:({params:{property:u,depsCount:f,deps:h}})=>{const y=f===1?"property":"properties";return(0,e.str)`must have ${y} ${h} when property ${u} is present`},params:({params:{property:u,depsCount:f,deps:h,missingProperty:y}})=>(0,e._)`{property: ${u},
|
|
160
|
-
missingProperty: ${y},
|
|
161
|
-
depsCount: ${f},
|
|
162
|
-
deps: ${h}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(u){const[f,h]=i(u);o(u,f),a(u,h)}};function i({schema:u}){const f={},h={};for(const y in u){if(y==="__proto__")continue;const d=Array.isArray(u[y])?f:h;d[y]=u[y]}return[f,h]}function o(u,f=u.schema){const{gen:h,data:y,it:d}=u;if(Object.keys(f).length===0)return;const m=h.let("missing");for(const b in f){const w=f[b];if(w.length===0)continue;const g=(0,r.propertyInData)(h,y,b,d.opts.ownProperties);u.setParams({property:b,depsCount:w.length,deps:w.join(", ")}),d.allErrors?h.if(g,()=>{for(const $ of w)(0,r.checkReportMissingProp)(u,$)}):(h.if((0,e._)`${g} && (${(0,r.checkMissingProp)(u,w,m)})`),(0,r.reportMissingProp)(u,m),h.else())}}t.validatePropertyDeps=o;function a(u,f=u.schema){const{gen:h,data:y,keyword:d,it:m}=u,b=h.name("valid");for(const w in f)(0,n.alwaysValidSchema)(m,f[w])||(h.if((0,r.propertyInData)(h,y,w,m.opts.ownProperties),()=>{const g=u.subschema({keyword:d,schemaProp:w},b);u.mergeValidEvaluated(g,b)},()=>h.var(b,!0)),u.ok(b))}t.validateSchemaDeps=a,t.default=s})(Ss)),Ss}var mr={},Ho;function P0(){if(Ho)return mr;Ho=1,Object.defineProperty(mr,"__esModule",{value:!0});const t=he(),e=me(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:s})=>(0,t._)`{propertyName: ${s.propertyName}}`},code(s){const{gen:i,schema:o,data:a,it:u}=s;if((0,e.alwaysValidSchema)(u,o))return;const f=i.name("valid");i.forIn("key",a,h=>{s.setParams({propertyName:h}),s.subschema({keyword:"propertyNames",data:h,dataTypes:["string"],propertyName:h,compositeRule:!0},f),i.if((0,t.not)(f),()=>{s.error(!0),u.allErrors||i.break()})}),s.ok(f)}};return mr.default=r,mr}var gr={},Go;function Wc(){if(Go)return gr;Go=1,Object.defineProperty(gr,"__esModule",{value:!0});const t=ct(),e=he(),n=St(),r=me(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:o})=>(0,e._)`{additionalProperty: ${o.additionalProperty}}`},code(o){const{gen:a,schema:u,parentSchema:f,data:h,errsCount:y,it:d}=o;if(!y)throw new Error("ajv implementation error");const{allErrors:m,opts:b}=d;if(d.props=!0,b.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(d,u))return;const w=(0,t.allSchemaProperties)(f.properties),g=(0,t.allSchemaProperties)(f.patternProperties);$(),o.ok((0,e._)`${y} === ${n.default.errors}`);function $(){a.forIn("key",h,S=>{!w.length&&!g.length?I(S):a.if(p(S),()=>I(S))})}function p(S){let N;if(w.length>8){const T=(0,r.schemaRefOrVal)(d,f.properties,"properties");N=(0,t.isOwnProperty)(a,T,S)}else w.length?N=(0,e.or)(...w.map(T=>(0,e._)`${S} === ${T}`)):N=e.nil;return g.length&&(N=(0,e.or)(N,...g.map(T=>(0,e._)`${(0,t.usePattern)(o,T)}.test(${S})`))),(0,e.not)(N)}function _(S){a.code((0,e._)`delete ${h}[${S}]`)}function I(S){if(b.removeAdditional==="all"||b.removeAdditional&&u===!1){_(S);return}if(u===!1){o.setParams({additionalProperty:S}),o.error(),m||a.break();return}if(typeof u=="object"&&!(0,r.alwaysValidSchema)(d,u)){const N=a.name("valid");b.removeAdditional==="failing"?(v(S,N,!1),a.if((0,e.not)(N),()=>{o.reset(),_(S)})):(v(S,N),m||a.if((0,e.not)(N),()=>a.break()))}}function v(S,N,T){const M={keyword:"additionalProperties",dataProp:S,dataPropType:r.Type.Str};T===!1&&Object.assign(M,{compositeRule:!0,createErrors:!1,allErrors:!1}),o.subschema(M,N)}}};return gr.default=i,gr}var yr={},Jo;function C0(){if(Jo)return yr;Jo=1,Object.defineProperty(yr,"__esModule",{value:!0});const t=ss(),e=ct(),n=me(),r=Wc(),s={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:o,schema:a,parentSchema:u,data:f,it:h}=i;h.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&r.default.code(new t.KeywordCxt(h,r.default,"additionalProperties"));const y=(0,e.allSchemaProperties)(a);for(const g of y)h.definedProperties.add(g);h.opts.unevaluated&&y.length&&h.props!==!0&&(h.props=n.mergeEvaluated.props(o,(0,n.toHash)(y),h.props));const d=y.filter(g=>!(0,n.alwaysValidSchema)(h,a[g]));if(d.length===0)return;const m=o.name("valid");for(const g of d)b(g)?w(g):(o.if((0,e.propertyInData)(o,f,g,h.opts.ownProperties)),w(g),h.allErrors||o.else().var(m,!0),o.endIf()),i.it.definedProperties.add(g),i.ok(m);function b(g){return h.opts.useDefaults&&!h.compositeRule&&a[g].default!==void 0}function w(g){i.subschema({keyword:"properties",schemaProp:g,dataProp:g},m)}}};return yr.default=s,yr}var wr={},Wo;function x0(){if(Wo)return wr;Wo=1,Object.defineProperty(wr,"__esModule",{value:!0});const t=ct(),e=he(),n=me(),r=me(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:o,schema:a,data:u,parentSchema:f,it:h}=i,{opts:y}=h,d=(0,t.allSchemaProperties)(a),m=d.filter(I=>(0,n.alwaysValidSchema)(h,a[I]));if(d.length===0||m.length===d.length&&(!h.opts.unevaluated||h.props===!0))return;const b=y.strictSchema&&!y.allowMatchingProperties&&f.properties,w=o.name("valid");h.props!==!0&&!(h.props instanceof e.Name)&&(h.props=(0,r.evaluatedPropsToName)(o,h.props));const{props:g}=h;$();function $(){for(const I of d)b&&p(I),h.allErrors?_(I):(o.var(w,!0),_(I),o.if(w))}function p(I){for(const v in b)new RegExp(I).test(v)&&(0,n.checkStrictMode)(h,`property ${v} matches pattern ${I} (use allowMatchingProperties)`)}function _(I){o.forIn("key",u,v=>{o.if((0,e._)`${(0,t.usePattern)(i,I)}.test(${v})`,()=>{const S=m.includes(I);S||i.subschema({keyword:"patternProperties",schemaProp:I,dataProp:v,dataPropType:r.Type.Str},w),h.opts.unevaluated&&g!==!0?o.assign((0,e._)`${g}[${v}]`,!0):!S&&!h.allErrors&&o.if((0,e.not)(w),()=>o.break())})})}}};return wr.default=s,wr}var vr={},Yo;function B0(){if(Yo)return vr;Yo=1,Object.defineProperty(vr,"__esModule",{value:!0});const t=me(),e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:r,schema:s,it:i}=n;if((0,t.alwaysValidSchema)(i,s)){n.fail();return}const o=r.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),n.failResult(o,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return vr.default=e,vr}var br={},Qo;function D0(){if(Qo)return br;Qo=1,Object.defineProperty(br,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ct().validateUnion,error:{message:"must match a schema in anyOf"}};return br.default=e,br}var _r={},Xo;function R0(){if(Xo)return _r;Xo=1,Object.defineProperty(_r,"__esModule",{value:!0});const t=he(),e=me(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:s})=>(0,t._)`{passingSchemas: ${s.passing}}`},code(s){const{gen:i,schema:o,parentSchema:a,it:u}=s;if(!Array.isArray(o))throw new Error("ajv implementation error");if(u.opts.discriminator&&a.discriminator)return;const f=o,h=i.let("valid",!1),y=i.let("passing",null),d=i.name("_valid");s.setParams({passing:y}),i.block(m),s.result(h,()=>s.reset(),()=>s.error(!0));function m(){f.forEach((b,w)=>{let g;(0,e.alwaysValidSchema)(u,b)?i.var(d,!0):g=s.subschema({keyword:"oneOf",schemaProp:w,compositeRule:!0},d),w>0&&i.if((0,t._)`${d} && ${h}`).assign(h,!1).assign(y,(0,t._)`[${y}, ${w}]`).else(),i.if(d,()=>{i.assign(h,!0),i.assign(y,w),g&&s.mergeEvaluated(g,t.Name)})})}}};return _r.default=r,_r}var $r={},ea;function j0(){if(ea)return $r;ea=1,Object.defineProperty($r,"__esModule",{value:!0});const t=me(),e={keyword:"allOf",schemaType:"array",code(n){const{gen:r,schema:s,it:i}=n;if(!Array.isArray(s))throw new Error("ajv implementation error");const o=r.name("valid");s.forEach((a,u)=>{if((0,t.alwaysValidSchema)(i,a))return;const f=n.subschema({keyword:"allOf",schemaProp:u},o);n.ok(o),n.mergeEvaluated(f)})}};return $r.default=e,$r}var Er={},ta;function F0(){if(ta)return Er;ta=1,Object.defineProperty(Er,"__esModule",{value:!0});const t=he(),e=me(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,t.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,t._)`{failingKeyword: ${i.ifClause}}`},code(i){const{gen:o,parentSchema:a,it:u}=i;a.then===void 0&&a.else===void 0&&(0,e.checkStrictMode)(u,'"if" without "then" and "else" is ignored');const f=s(u,"then"),h=s(u,"else");if(!f&&!h)return;const y=o.let("valid",!0),d=o.name("_valid");if(m(),i.reset(),f&&h){const w=o.let("ifClause");i.setParams({ifClause:w}),o.if(d,b("then",w),b("else",w))}else f?o.if(d,b("then")):o.if((0,t.not)(d),b("else"));i.pass(y,()=>i.error(!0));function m(){const w=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);i.mergeEvaluated(w)}function b(w,g){return()=>{const $=i.subschema({keyword:w},d);o.assign(y,d),i.mergeValidEvaluated($,y),g?o.assign(g,(0,t._)`${w}`):i.setParams({ifClause:w})}}}};function s(i,o){const a=i.schema[o];return a!==void 0&&!(0,e.alwaysValidSchema)(i,a)}return Er.default=r,Er}var kr={},na;function z0(){if(na)return kr;na=1,Object.defineProperty(kr,"__esModule",{value:!0});const t=me(),e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:r,it:s}){r.if===void 0&&(0,t.checkStrictMode)(s,`"${n}" without "if" is ignored`)}};return kr.default=e,kr}var ra;function U0(){if(ra)return fr;ra=1,Object.defineProperty(fr,"__esModule",{value:!0});const t=Gc(),e=A0(),n=Jc(),r=N0(),s=O0(),i=T0(),o=P0(),a=Wc(),u=C0(),f=x0(),h=B0(),y=D0(),d=R0(),m=j0(),b=F0(),w=z0();function g($=!1){const p=[h.default,y.default,d.default,m.default,b.default,w.default,o.default,a.default,i.default,u.default,f.default];return $?p.push(e.default,r.default):p.push(t.default,n.default),p.push(s.default),p}return fr.default=g,fr}var Sr={},Ir={},sa;function M0(){if(sa)return Ir;sa=1,Object.defineProperty(Ir,"__esModule",{value:!0});const t=he(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,t.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,t._)`{format: ${r}}`},code(r,s){const{gen:i,data:o,$data:a,schema:u,schemaCode:f,it:h}=r,{opts:y,errSchemaPath:d,schemaEnv:m,self:b}=h;if(!y.validateFormats)return;a?w():g();function w(){const $=i.scopeValue("formats",{ref:b.formats,code:y.code.formats}),p=i.const("fDef",(0,t._)`${$}[${f}]`),_=i.let("fType"),I=i.let("format");i.if((0,t._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>i.assign(_,(0,t._)`${p}.type || "string"`).assign(I,(0,t._)`${p}.validate`),()=>i.assign(_,(0,t._)`"string"`).assign(I,p)),r.fail$data((0,t.or)(v(),S()));function v(){return y.strictSchema===!1?t.nil:(0,t._)`${f} && !${I}`}function S(){const N=m.$async?(0,t._)`(${p}.async ? await ${I}(${o}) : ${I}(${o}))`:(0,t._)`${I}(${o})`,T=(0,t._)`(typeof ${I} == "function" ? ${N} : ${I}.test(${o}))`;return(0,t._)`${I} && ${I} !== true && ${_} === ${s} && !${T}`}}function g(){const $=b.formats[u];if(!$){v();return}if($===!0)return;const[p,_,I]=S($);p===s&&r.pass(N());function v(){if(y.strictSchema===!1){b.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${u}" ignored in schema at path "${d}"`}}function S(T){const M=T instanceof RegExp?(0,t.regexpCode)(T):y.code.formats?(0,t._)`${y.code.formats}${(0,t.getProperty)(u)}`:void 0,H=i.scopeValue("formats",{key:u,ref:T,code:M});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,t._)`${H}.validate`]:["string",T,H]}function N(){if(typeof $=="object"&&!($ instanceof RegExp)&&$.async){if(!m.$async)throw new Error("async format in sync schema");return(0,t._)`await ${I}(${o})`}return typeof _=="function"?(0,t._)`${I}(${o})`:(0,t._)`${I}.test(${o})`}}}};return Ir.default=n,Ir}var ia;function L0(){if(ia)return Sr;ia=1,Object.defineProperty(Sr,"__esModule",{value:!0});const e=[M0().default];return Sr.default=e,Sr}var Ot={},oa;function q0(){return oa||(oa=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.contentVocabulary=Ot.metadataVocabulary=void 0,Ot.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Ot.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Ot}var aa;function Z0(){if(aa)return Jn;aa=1,Object.defineProperty(Jn,"__esModule",{value:!0});const t=p0(),e=I0(),n=U0(),r=L0(),s=q0(),i=[t.default,e.default,(0,n.default)(),r.default,s.metadataVocabulary,s.contentVocabulary];return Jn.default=i,Jn}var Ar={},mn={},ca;function V0(){if(ca)return mn;ca=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.DiscrError=void 0;var t;return(function(e){e.Tag="tag",e.Mapping="mapping"})(t||(mn.DiscrError=t={})),mn}var ua;function K0(){if(ua)return Ar;ua=1,Object.defineProperty(Ar,"__esModule",{value:!0});const t=he(),e=V0(),n=di(),r=is(),s=me(),o={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:u}})=>a===e.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:a,tag:u,tagName:f}})=>(0,t._)`{error: ${a}, tag: ${f}, tagValue: ${u}}`},code(a){const{gen:u,data:f,schema:h,parentSchema:y,it:d}=a,{oneOf:m}=y;if(!d.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=h.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(h.mapping)throw new Error("discriminator: mapping is not supported");if(!m)throw new Error("discriminator: requires oneOf keyword");const w=u.let("valid",!1),g=u.const("tag",(0,t._)`${f}${(0,t.getProperty)(b)}`);u.if((0,t._)`typeof ${g} == "string"`,()=>$(),()=>a.error(!1,{discrError:e.DiscrError.Tag,tag:g,tagName:b})),a.ok(w);function $(){const I=_();u.if(!1);for(const v in I)u.elseIf((0,t._)`${g} === ${v}`),u.assign(w,p(I[v]));u.else(),a.error(!1,{discrError:e.DiscrError.Mapping,tag:g,tagName:b}),u.endIf()}function p(I){const v=u.name("valid"),S=a.subschema({keyword:"oneOf",schemaProp:I},v);return a.mergeEvaluated(S,t.Name),v}function _(){var I;const v={},S=T(y);let N=!0;for(let J=0;J<m.length;J++){let Y=m[J];if(Y?.$ref&&!(0,s.schemaHasRulesButRef)(Y,d.self.RULES)){const le=Y.$ref;if(Y=n.resolveRef.call(d.self,d.schemaEnv.root,d.baseId,le),Y instanceof n.SchemaEnv&&(Y=Y.schema),Y===void 0)throw new r.default(d.opts.uriResolver,d.baseId,le)}const se=(I=Y?.properties)===null||I===void 0?void 0:I[b];if(typeof se!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);N=N&&(S||T(Y)),M(se,J)}if(!N)throw new Error(`discriminator: "${b}" must be required`);return v;function T({required:J}){return Array.isArray(J)&&J.includes(b)}function M(J,Y){if(J.const)H(J.const,Y);else if(J.enum)for(const se of J.enum)H(se,Y);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function H(J,Y){if(typeof J!="string"||J in v)throw new Error(`discriminator: "${b}" values must be unique strings`);v[J]=Y}}}};return Ar.default=o,Ar}const H0="http://json-schema.org/draft-07/schema#",G0="http://json-schema.org/draft-07/schema#",J0="Core schema meta-schema",W0={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:[]}},Y0=["object","boolean"],Q0={$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:"#"}};var X0={$schema:H0,$id:G0,title:J0,definitions:W0,type:Y0,properties:Q0,default:!0},la;function eg(){return la||(la=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const n=f0(),r=Z0(),s=K0(),i=X0,o=["/properties"],a="http://json-schema.org/draft-07/schema";class u extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(i,o):i;this.addMetaSchema(b,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.Ajv=u,t.exports=e=u,t.exports.Ajv=u,Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var f=ss();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var h=he();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}});var y=fi();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return y.default}});var d=is();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return d.default}})})(Zn,Zn.exports)),Zn.exports}var tg=eg();const Is=10,fa=(t=0)=>e=>`\x1B[${e+t}m`,da=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,ha=(t=0)=>(e,n,r)=>`\x1B[${38+t};2;${e};${n};${r}m`,Ie={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(Ie.modifier);const ng=Object.keys(Ie.color),rg=Object.keys(Ie.bgColor);[...ng,...rg];function sg(){const t=new Map;for(const[e,n]of Object.entries(Ie)){for(const[r,s]of Object.entries(n))Ie[r]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},n[r]=Ie[r],t.set(s[0],s[1]);Object.defineProperty(Ie,e,{value:n,enumerable:!1})}return Object.defineProperty(Ie,"codes",{value:t,enumerable:!1}),Ie.color.close="\x1B[39m",Ie.bgColor.close="\x1B[49m",Ie.color.ansi=fa(),Ie.color.ansi256=da(),Ie.color.ansi16m=ha(),Ie.bgColor.ansi=fa(Is),Ie.bgColor.ansi256=da(Is),Ie.bgColor.ansi16m=ha(Is),Object.defineProperties(Ie,{rgbToAnsi256:{value(e,n,r){return e===n&&n===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(e){const n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!n)return[0,0,0];let[r]=n;r.length===3&&(r=[...r].map(i=>i+i).join(""));const s=Number.parseInt(r,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:e=>Ie.rgbToAnsi256(...Ie.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let n,r,s;if(e>=232)n=((e-232)*10+8)/255,r=n,s=n;else{e-=16;const a=e%36;n=Math.floor(e/36)/5,r=Math.floor(a/6)/5,s=a%6/5}const i=Math.max(n,r,s)*2;if(i===0)return 30;let o=30+(Math.round(s)<<2|Math.round(r)<<1|Math.round(n));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,n,r)=>Ie.ansi256ToAnsi(Ie.rgbToAnsi256(e,n,r)),enumerable:!1},hexToAnsi:{value:e=>Ie.ansi256ToAnsi(Ie.hexToAnsi256(e)),enumerable:!1}}),Ie}const Je=sg();class ig extends ui{getNodeDependencies({resolvedInputs:e}){const n=[];for(const r of Object.values(e))for(const s of r)n.push(s.input.instanceId);return n}processNode({instance:e,component:n,state:r,resolvedInputs:s}){const i=new tg.Ajv({strict:!1});this.logger.debug({instanceId:e.id},"validating instance");const o=[];for(const[f,h]of Object.entries(n.args))try{const y=Gp(e.args?.[f]);if(!h.required&&y===void 0)continue;i.validate(h.schema,y)||(this.logger.debug({instanceId:e.id,argumentName:f},"invalid argument"),o.push(`Invalid argument "${Je.blueBright.open}${f}${Je.reset.close}": `+i.errorsText()))}catch(y){this.logger.debug({instanceId:e.id,argumentName:f,error:y},"failed to validate argument"),o.push(`Failed to validate argument "${Je.blueBright.open}${f}${Je.reset.close}": `+(y instanceof Error?y.message:String(y)))}if(ci(n))for(const[f,h]of Object.entries(n.secrets))h.required&&!r?.secretNames?.includes(f)&&o.push(`Missing required secret "${Je.blueBright.open}${f}${Je.reset.close}"`);for(const[f,h]of Object.entries(s))for(const y of h)this.outputs.get(y.input.instanceId)?.status!=="ok"&&o.push(`Invalid input "${Je.blueBright.open}${f}${Je.reset.close}":
|
|
163
|
-
"${Je.blueBright.open}${y.input.instanceId}${Je.reset.close}" has validation errors`);for(const[f,h]of Object.entries(n.inputs))h.required&&(!s[f]||!s[f].length)&&o.push(`Missing required input "${Je.blueBright.open}${f}${Je.reset.close}" of type "${Je.greenBright.open}${h.type}${Je.reset.close}"`);if(o.length===0)return{status:"ok"};const a=(o.length+1).toString().length+2;return{status:"error",errorText:o.map((f,h)=>{const y=f.split(`
|
|
164
|
-
`),d=`${h+1}. `;return y.map((m,b)=>`${b===0?d:" ".repeat(a)}${m}`).join(`\r
|
|
165
|
-
`)}).join(`\r
|
|
166
|
-
`)}}}const og={InputResolver:ym,InputHashResolver:Jm,ValidationResolver:ig};var gn={exports:{}},As,pa;function ag(){if(pa)return As;pa=1;function t(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}As=e;function e(n,r,s){var i=s&&s.stringify||t,o=1;if(typeof n=="object"&&n!==null){var a=r.length+o;if(a===1)return n;var u=new Array(a);u[0]=i(n);for(var f=1;f<a;f++)u[f]=i(r[f]);return u.join(" ")}if(typeof n!="string")return n;var h=r.length;if(h===0)return n;for(var y="",d=1-o,m=-1,b=n&&n.length||0,w=0;w<b;){if(n.charCodeAt(w)===37&&w+1<b){switch(m=m>-1?m:0,n.charCodeAt(w+1)){case 100:case 102:if(d>=h||r[d]==null)break;m<w&&(y+=n.slice(m,w)),y+=Number(r[d]),m=w+2,w++;break;case 105:if(d>=h||r[d]==null)break;m<w&&(y+=n.slice(m,w)),y+=Math.floor(Number(r[d])),m=w+2,w++;break;case 79:case 111:case 106:if(d>=h||r[d]===void 0)break;m<w&&(y+=n.slice(m,w));var g=typeof r[d];if(g==="string"){y+="'"+r[d]+"'",m=w+2,w++;break}if(g==="function"){y+=r[d].name||"<anonymous>",m=w+2,w++;break}y+=i(r[d]),m=w+2,w++;break;case 115:if(d>=h)break;m<w&&(y+=n.slice(m,w)),y+=String(r[d]),m=w+2,w++;break;case 37:m<w&&(y+=n.slice(m,w)),y+="%",m=w+2,w++,d--;break}++d}++w}return m===-1?n:(m<b&&(y+=n.slice(m)),y)}return As}var ma;function cg(){if(ma)return gn.exports;ma=1;const t=ag();gn.exports=h;const e=le().console||{},n={mapHttpRequest:N,mapHttpResponse:N,wrapRequestSerializer:T,wrapResponseSerializer:T,wrapErrorSerializer:T,req:N,res:N,err:v,errWithCause:v};function r(z,W){return z==="silent"?1/0:W.levels.values[z]}const s=Symbol("pino.logFuncs"),i=Symbol("pino.hierarchy"),o={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function a(z,W){const re={logger:W,parent:z[i]};W[i]=re}function u(z,W,re){const ne={};W.forEach(oe=>{ne[oe]=re[oe]?re[oe]:e[oe]||e[o[oe]||"log"]||M}),z[s]=ne}function f(z,W){return Array.isArray(z)?z.filter(function(ne){return ne!=="!stdSerializers.err"}):z===!0?Object.keys(W):!1}function h(z){z=z||{},z.browser=z.browser||{};const W=z.browser.transmit;if(W&&typeof W.send!="function")throw Error("pino: transmit option must have a send function");const re=z.browser.write||e;z.browser.write&&(z.browser.asObject=!0);const ne=z.serializers||{},oe=f(z.browser.serialize,ne);let V=z.browser.serialize;Array.isArray(z.browser.serialize)&&z.browser.serialize.indexOf("!stdSerializers.err")>-1&&(V=!1);const P=Object.keys(z.customLevels||{}),j=["error","fatal","warn","info","debug","trace"].concat(P);typeof re=="function"&&j.forEach(function(ie){re[ie]=re}),(z.enabled===!1||z.browser.disabled)&&(z.level="silent");const B=z.level||"info",k=Object.create(re);k.log||(k.log=M),u(k,j,re),a({},k),Object.defineProperty(k,"levelVal",{get:F}),Object.defineProperty(k,"level",{get:X,set:Q});const O={transmit:W,serialize:oe,asObject:z.browser.asObject,asObjectBindingsOnly:z.browser.asObjectBindingsOnly,formatters:z.browser.formatters,levels:j,timestamp:S(z),messageKey:z.messageKey||"msg",onChild:z.onChild||M};k.levels=y(z),k.level=B,k.isLevelEnabled=function(ie){return this.levels.values[ie]?this.levels.values[ie]>=this.levels.values[this.level]:!1},k.setMaxListeners=k.getMaxListeners=k.emit=k.addListener=k.on=k.prependListener=k.once=k.prependOnceListener=k.removeListener=k.removeAllListeners=k.listeners=k.listenerCount=k.eventNames=k.write=k.flush=M,k.serializers=ne,k._serialize=oe,k._stdErrSerialize=V,k.child=function(...ie){return fe.call(this,O,...ie)},W&&(k._logEvent=I());function F(){return r(this.level,this)}function X(){return this._level}function Q(ie){if(ie!=="silent"&&!this.levels.values[ie])throw Error("unknown level "+ie);this._level=ie,b(this,O,k,"error"),b(this,O,k,"fatal"),b(this,O,k,"warn"),b(this,O,k,"info"),b(this,O,k,"debug"),b(this,O,k,"trace"),P.forEach(x=>{b(this,O,k,x)})}function fe(ie,x,D){if(!x)throw new Error("missing bindings for child Pino");D=D||{},oe&&x.serializers&&(D.serializers=x.serializers);const L=D.serializers;if(oe&&L){var K=Object.assign({},ne,L),ee=z.browser.serialize===!0?Object.keys(K):oe;delete x.serializers,p([x],ee,K,this._stdErrSerialize)}function ae(Re){this._childLevel=(Re._childLevel|0)+1,this.bindings=x,K&&(this.serializers=K,this._serialize=ee),W&&(this._logEvent=I([].concat(Re._logEvent.bindings,x)))}ae.prototype=this;const we=new ae(this);return a(this,we),we.child=function(...Re){return fe.call(this,ie,...Re)},we.level=D.level||this.level,ie.onChild(we),we}return k}function y(z){const W=z.customLevels||{},re=Object.assign({},h.levels.values,W),ne=Object.assign({},h.levels.labels,d(W));return{values:re,labels:ne}}function d(z){const W={};return Object.keys(z).forEach(function(re){W[z[re]]=re}),W}h.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},h.stdSerializers=n,h.stdTimeFunctions=Object.assign({},{nullTime:H,epochTime:J,unixTime:Y,isoTime:se});function m(z){const W=[];z.bindings&&W.push(z.bindings);let re=z[i];for(;re.parent;)re=re.parent,re.logger.bindings&&W.push(re.logger.bindings);return W.reverse()}function b(z,W,re,ne){if(Object.defineProperty(z,ne,{value:r(z.level,re)>r(ne,re)?M:re[s][ne],writable:!0,enumerable:!0,configurable:!0}),z[ne]===M){if(!W.transmit)return;const V=W.transmit.level||z.level,P=r(V,re);if(r(ne,re)<P)return}z[ne]=g(z,W,re,ne);const oe=m(z);oe.length!==0&&(z[ne]=w(oe,z[ne]))}function w(z,W){return function(){return W.apply(this,[...z,...arguments])}}function g(z,W,re,ne){return(function(oe){return function(){const P=W.timestamp(),j=new Array(arguments.length),B=Object.getPrototypeOf&&Object.getPrototypeOf(this)===e?e:this;for(var k=0;k<j.length;k++)j[k]=arguments[k];var O=!1;if(W.serialize&&(p(j,this._serialize,this.serializers,this._stdErrSerialize),O=!0),W.asObject||W.formatters?oe.call(B,...$(this,ne,j,P,W)):oe.apply(B,j),W.transmit){const F=W.transmit.level||z._level,X=r(F,re),Q=r(ne,re);if(Q<X)return;_(this,{ts:P,methodLevel:ne,methodValue:Q,transmitValue:re.levels.values[W.transmit.level||z._level],send:W.transmit.send,val:r(z._level,re)},j,O)}}})(z[s][ne])}function $(z,W,re,ne,oe){const{level:V,log:P=F=>F}=oe.formatters||{},j=re.slice();let B=j[0];const k={};let O=(z._childLevel|0)+1;if(O<1&&(O=1),ne&&(k.time=ne),V){const F=V(W,z.levels.values[W]);Object.assign(k,F)}else k.level=z.levels.values[W];if(oe.asObjectBindingsOnly){if(B!==null&&typeof B=="object")for(;O--&&typeof j[0]=="object";)Object.assign(k,j.shift());return[P(k),...j]}else{if(B!==null&&typeof B=="object"){for(;O--&&typeof j[0]=="object";)Object.assign(k,j.shift());B=j.length?t(j.shift(),j):void 0}else typeof B=="string"&&(B=t(j.shift(),j));return B!==void 0&&(k[oe.messageKey]=B),[P(k)]}}function p(z,W,re,ne){for(const oe in z)if(ne&&z[oe]instanceof Error)z[oe]=h.stdSerializers.err(z[oe]);else if(typeof z[oe]=="object"&&!Array.isArray(z[oe])&&W)for(const V in z[oe])W.indexOf(V)>-1&&V in re&&(z[oe][V]=re[V](z[oe][V]))}function _(z,W,re,ne=!1){const oe=W.send,V=W.ts,P=W.methodLevel,j=W.methodValue,B=W.val,k=z._logEvent.bindings;ne||p(re,z._serialize||Object.keys(z.serializers),z.serializers,z._stdErrSerialize===void 0?!0:z._stdErrSerialize),z._logEvent.ts=V,z._logEvent.messages=re.filter(function(O){return k.indexOf(O)===-1}),z._logEvent.level.label=P,z._logEvent.level.value=j,oe(P,z._logEvent,B),z._logEvent=I(k)}function I(z){return{ts:0,messages:[],bindings:z||[],level:{label:"",value:0}}}function v(z){const W={type:z.constructor.name,msg:z.message,stack:z.stack};for(const re in z)W[re]===void 0&&(W[re]=z[re]);return W}function S(z){return typeof z.timestamp=="function"?z.timestamp:z.timestamp===!1?H:J}function N(){return{}}function T(z){return z}function M(){}function H(){return!1}function J(){return Date.now()}function Y(){return Math.round(Date.now()/1e3)}function se(){return new Date(Date.now()).toISOString()}function le(){function z(W){return typeof W<"u"&&W}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return z(self)||z(window)||z(this)||{}}}return gn.exports.default=h,gn.exports.pino=h,gn.exports}var ug=cg();const Br=(t,e)=>{t.postMessage(e)},In=new Map,lg=async(t,e,n,r,s=!1)=>{if(In.has(n)){console.warn(`state with id "${n}" already exists`);return}const i=ug.pino({level:"info"}).child({resolverId:n,resolverType:r}),o=(f,h)=>{Br(t,{type:"outputs",resolverId:n,items:[{nodeId:f,output:h}]})};let a;s&&(a=(f,h)=>{Br(t,{type:"dependent-set",resolverId:n,nodeId:f,dependents:h&&Array.from(h)})});const u=new og[r](e,i,o,a);In.set(n,{nodes:e,resolver:u,logger:i,abortController:new AbortController}),u.addAllNodesToWorkset(),await u.process(),Br(t,{type:"resolver-ready",resolverId:n})},Yc=(t,e,n)=>{t.abortController.abort(),t.abortController=new AbortController,t.nodes.set(e,n),t.resolver.invalidate(e),t.resolver.process(t.abortController.signal)},fg=(t,e,n)=>{const r=In.get(t);if(!r)throw new Error(`Unknown state: ${t}`);r.nodes.set(e,n),Yc(r,e,n)},dg=(t,e)=>{const n=In.get(t);if(!n)throw new Error(`Unknown state: ${t}`);n.nodes.delete(e),Yc(n,e,void 0)},hg=t=>{In.delete(t)};self.onconnect=t=>{const e=t.ports[0];e.onmessage=n=>{const r=n.data;switch(r.type){case"create-resolver":{const s=new Map(Object.entries(r.nodes));lg(e,s,r.resolverId,r.resolverType,r.syncDependentMap);break}case"update-input":{fg(r.resolverId,r.nodeId,r.node);break}case"delete-input":{dg(r.resolverId,r.nodeId);break}case"dispose-resolver":{hg(r.resolverId);break}}},Br(e,{type:"ready"})};
|