@shopify/cli 4.5.1 → 4.6.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/dist/analytics-6S5JVSRO.js +1 -0
- package/dist/analytics-E252SR3P.js +1 -0
- package/dist/assets/hydrogen/starter/package.json +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/{chokidar-VDIVGBZH.js → chokidar-5RWEYTNQ.js} +1 -1
- package/dist/{chunk-XU6CCL4P.js → chunk-2I62GKIH.js} +80 -80
- package/dist/{chunk-PGN5EZTI.js → chunk-2JFZ6GZC.js} +2 -2
- package/dist/{chunk-UQWFDL3F.js → chunk-2KD4LHRT.js} +1 -1
- package/dist/chunk-2MCH43SL.js +11 -0
- package/dist/{chunk-BEXQB4RT.js → chunk-2SNT7U7B.js} +1 -1
- package/dist/{chunk-U2LQBJJL.js → chunk-2VIUGNYO.js} +1 -1
- package/dist/chunk-2Y6CYLKF.js +1 -0
- package/dist/{chunk-KHXDP3SF.js → chunk-3EHRA4LA.js} +1 -1
- package/dist/{chunk-GQG6WELZ.js → chunk-3EPQ6UOK.js} +6 -6
- package/dist/{chunk-ZHPXJRHR.js → chunk-3NO6PWNL.js} +1 -1
- package/dist/chunk-3TFUSDHY.js +370 -0
- package/dist/{chunk-SFMXFH33.js → chunk-46NA23I7.js} +1 -1
- package/dist/{chunk-C5U4NLNU.js → chunk-47URTBZF.js} +1 -1
- package/dist/chunk-4FEBSLSU.js +1 -0
- package/dist/{chunk-DCUAVLTM.js → chunk-4HB4VZJQ.js} +1 -1
- package/dist/{chunk-DU5LZYQX.js → chunk-4JARSKED.js} +1 -1
- package/dist/{chunk-IHUCBI6L.js → chunk-4KZRP2JP.js} +141 -141
- package/dist/{chunk-2GDACKZF.js → chunk-4P7PWLUN.js} +1 -1
- package/dist/{chunk-MYQQOOGA.js → chunk-4YCMEC5R.js} +1 -1
- package/dist/{chunk-Q2X7IXPQ.js → chunk-53ZA2HD3.js} +1 -1
- package/dist/{chunk-DE3WCNP6.js → chunk-57YF2UNT.js} +1 -1
- package/dist/{chunk-MOCD7GFI.js → chunk-5EFQILLF.js} +1 -1
- package/dist/chunk-5JPV3HPJ.js +1 -0
- package/dist/{chunk-OCYPWE2O.js → chunk-5LJ5H4TD.js} +1 -1
- package/dist/{chunk-JVMYTC3J.js → chunk-5Y2VD4I3.js} +1 -1
- package/dist/{chunk-YBFCDINU.js → chunk-6BX62FFE.js} +1 -1
- package/dist/{chunk-6ZMNEURG.js → chunk-6FJBCRVK.js} +1 -1
- package/dist/{chunk-2WDKXDFM.js → chunk-6Q5VRSRN.js} +1 -1
- package/dist/{chunk-GDHD3TGC.js → chunk-6QDOCBD4.js} +1 -1
- package/dist/{chunk-BVFIJSD7.js → chunk-6SXB44CE.js} +1 -1
- package/dist/chunk-6UTUJKKC.js +16 -0
- package/dist/{chunk-E24W34C4.js → chunk-6YCGMS7X.js} +15 -15
- package/dist/chunk-72GN655L.js +1 -0
- package/dist/chunk-7CPECP5P.js +1 -0
- package/dist/{chunk-XH5FCMS5.js → chunk-7HAFBCL3.js} +1 -1
- package/dist/chunk-7XPFLQEM.js +1 -0
- package/dist/{chunk-DDVT2K7E.js → chunk-A3JE5LX3.js} +1 -1
- package/dist/{chunk-ASOT7VNB.js → chunk-AJ6VOBXU.js} +1 -1
- package/dist/{chunk-XWQ72WTQ.js → chunk-B2WK53GH.js} +1 -1
- package/dist/chunk-B34VYVGV.js +1 -0
- package/dist/chunk-B6SY4BIK.js +2 -0
- package/dist/{chunk-H7DDRARV.js → chunk-BBEHNPKK.js} +1 -1
- package/dist/{chunk-GKQ6CSJZ.js → chunk-BCTMBKAU.js} +1 -1
- package/dist/chunk-BGUHH7AW.js +10 -0
- package/dist/chunk-BOAGJ6P5.js +1 -0
- package/dist/chunk-C256W7D2.js +26 -0
- package/dist/chunk-CTNBSUVU.js +83 -0
- package/dist/{chunk-MQXSMZQZ.js → chunk-CXWLHQKA.js} +1 -1
- package/dist/chunk-DHU767C3.js +1 -0
- package/dist/{chunk-NGPJXONG.js → chunk-DKHMLETG.js} +1 -1
- package/dist/{chunk-QPJQ67GU.js → chunk-DODCPRXT.js} +144 -144
- package/dist/{chunk-QDYDB7DY.js → chunk-E3RDAVJT.js} +3 -3
- package/dist/chunk-E3RQCWSC.js +6 -0
- package/dist/{chunk-EDSKA6UB.js → chunk-EBZ6MDEM.js} +1 -1
- package/dist/chunk-ELJ7SKMH.js +1 -0
- package/dist/{chunk-FOPGI6GO.js → chunk-EQTULRM7.js} +1 -1
- package/dist/{chunk-SRAHMYWJ.js → chunk-ERCJPRN3.js} +1 -1
- package/dist/{chunk-M2AS5BWX.js → chunk-ESZS7L6O.js} +1 -1
- package/dist/{chunk-IBBFRL3Y.js → chunk-ET2O5DAS.js} +1 -1
- package/dist/chunk-EZ7EBYDT.js +684 -0
- package/dist/{chunk-AVMNXIXF.js → chunk-EZNJDFFK.js} +1 -1
- package/dist/chunk-F34LB7M4.js +20 -0
- package/dist/{chunk-QVYZZNAS.js → chunk-FE24P4UQ.js} +1 -1
- package/dist/chunk-FFSDGRAN.js +1 -0
- package/dist/{chunk-ALQKJAHP.js → chunk-FMTPUYSH.js} +1 -1
- package/dist/{chunk-IQYZAALJ.js → chunk-FPWLEGKZ.js} +1 -1
- package/dist/{chunk-APYASWBA.js → chunk-FT4HLDK7.js} +1 -1
- package/dist/{chunk-E7OLCSAL.js → chunk-G3YYMKWG.js} +1 -1
- package/dist/chunk-G7QW5OSQ.js +6 -0
- package/dist/{chunk-JO4ZHVOD.js → chunk-GCDEDRY7.js} +1 -1
- package/dist/{chunk-GAYQKMOM.js → chunk-GEE5MXHT.js} +1 -1
- package/dist/{chunk-IIHPONSQ.js → chunk-H4MYBJ6C.js} +1 -1
- package/dist/chunk-HDXBZLHH.js +8 -0
- package/dist/chunk-HSKB5OTM.js +1 -0
- package/dist/{chunk-5T3OVTF5.js → chunk-HT6MOPLW.js} +1 -1
- package/dist/chunk-HZXY7RWJ.js +19 -0
- package/dist/{chunk-WIXW233Y.js → chunk-IDAWPBJM.js} +1 -1
- package/dist/{chunk-UHJ65YFN.js → chunk-IDLDQ2JB.js} +1 -1
- package/dist/{chunk-KOB6T6NK.js → chunk-IKYZ5L3F.js} +1 -1
- package/dist/{chunk-O2PI2PYG.js → chunk-ILQXBASM.js} +1 -1
- package/dist/{chunk-O7MONSF7.js → chunk-IYU72M55.js} +1 -1
- package/dist/{chunk-JCNRQYRP.js → chunk-J3IHP46B.js} +2 -2
- package/dist/{chunk-UB5BVO76.js → chunk-J4KJQHNS.js} +1 -1
- package/dist/{chunk-3GMW7IEC.js → chunk-JHRZCUBE.js} +1 -1
- package/dist/chunk-JIBLEZ57.js +18 -0
- package/dist/{chunk-TXJEP4FB.js → chunk-JIKIYMCT.js} +1 -1
- package/dist/{chunk-MKCXLBQ4.js → chunk-JJTGHARS.js} +1 -1
- package/dist/chunk-JJZNUFPD.js +44 -0
- package/dist/{chunk-U7ZRDNZU.js → chunk-JQP3ZCAG.js} +1 -1
- package/dist/{chunk-5UXPTCSD.js → chunk-JS3X6BDT.js} +1 -1
- package/dist/{chunk-YZY4M6IH.js → chunk-K7IZMKBR.js} +1 -1
- package/dist/{chunk-5JCREGSD.js → chunk-KGZH4RFA.js} +1 -1
- package/dist/{chunk-JNEGEJH6.js → chunk-KO4FB4QU.js} +1 -1
- package/dist/chunk-KPRKIZ5M.js +3 -0
- package/dist/chunk-KUN74JD4.js +4 -0
- package/dist/chunk-KURWC4A5.js +16 -0
- package/dist/{chunk-XDEAZP2I.js → chunk-L3D2CASO.js} +1 -1
- package/dist/{chunk-P6S5YLOP.js → chunk-L7DZTIHJ.js} +1 -1
- package/dist/{chunk-QPY6WJTT.js → chunk-LBDAYBIF.js} +1 -1
- package/dist/{chunk-ZG7BVVT2.js → chunk-LD6ZCTZ3.js} +1 -1
- package/dist/{chunk-TDCY3BRI.js → chunk-LH3RIIOB.js} +1 -1
- package/dist/{chunk-BZAZMLII.js → chunk-LWRDNTAD.js} +1 -1
- package/dist/{chunk-MMKBIMMC.js → chunk-LWWBU7ET.js} +1 -1
- package/dist/chunk-M4BEPPA3.js +1 -0
- package/dist/chunk-M4YPMHIM.js +1 -0
- package/dist/{chunk-VSZS3FAJ.js → chunk-M5KKLAM6.js} +1 -1
- package/dist/{chunk-Q2UHGP2Z.js → chunk-MBLHXPGK.js} +1 -1
- package/dist/{chunk-3YCTWCHH.js → chunk-MDHJJVXA.js} +1 -1
- package/dist/{chunk-5U6MXSNY.js → chunk-MDXSLAIC.js} +1 -1
- package/dist/{chunk-NV5IDANV.js → chunk-NA2ERJIJ.js} +1 -1
- package/dist/chunk-NOKCVDYD.js +317 -0
- package/dist/chunk-O6XSWAP2.js +4 -0
- package/dist/{chunk-OVLTFTZW.js → chunk-OB62WVZ5.js} +1 -1
- package/dist/{chunk-UYNCJGMC.js → chunk-OT52JOML.js} +1 -1
- package/dist/chunk-OTT73YUA.js +5 -0
- package/dist/{chunk-ZVQBSXE4.js → chunk-OUUOML3D.js} +1 -1
- package/dist/{chunk-7ZLKT2TB.js → chunk-P7XC5HS2.js} +1 -1
- package/dist/{chunk-KC2TN7AR.js → chunk-PALG4SNB.js} +1 -1
- package/dist/{chunk-T5DF2GGD.js → chunk-PB37BTPE.js} +1 -1
- package/dist/{chunk-WO5YOBQ7.js → chunk-PWYRKTJ4.js} +1 -1
- package/dist/{chunk-H7PNMMDO.js → chunk-PXSX63RF.js} +1 -1
- package/dist/{chunk-QMSYJIAU.js → chunk-QDPDB5EP.js} +1 -1
- package/dist/{chunk-7XQDZF73.js → chunk-QG7TELFC.js} +1 -1
- package/dist/{chunk-OASPW2P2.js → chunk-QU5NL2QT.js} +1 -1
- package/dist/{chunk-DQE7XRCK.js → chunk-QV53BSQP.js} +1 -1
- package/dist/{chunk-CNOL26GA.js → chunk-QXXA2EQY.js} +1 -1
- package/dist/{chunk-T3AJL2M5.js → chunk-QZ5FMWZS.js} +1 -1
- package/dist/chunk-R26GJEH3.js +1 -0
- package/dist/{chunk-TDSR2X7X.js → chunk-RTW4RZWH.js} +2 -2
- package/dist/{chunk-FPCPFECH.js → chunk-SEV3S3WH.js} +1 -1
- package/dist/{chunk-YYHCPLBX.js → chunk-TAFOSPBW.js} +1 -1
- package/dist/{chunk-MCATVWHC.js → chunk-TAV2ENJY.js} +1 -1
- package/dist/{chunk-ZNWFTUFV.js → chunk-TQNALMQH.js} +1 -1
- package/dist/chunk-TR4OWSEX.js +77 -0
- package/dist/{chunk-RFDT525K.js → chunk-TUJNCWHZ.js} +1 -1
- package/dist/{chunk-2MNOWKMI.js → chunk-U564K7SX.js} +1 -1
- package/dist/chunk-UKQ7NE5V.js +1 -0
- package/dist/{chunk-ICFFBMFB.js → chunk-UM3OHLCX.js} +1 -1
- package/dist/{chunk-4TC4M4RC.js → chunk-V65P572N.js} +3 -3
- package/dist/chunk-VFIVXK53.js +2 -0
- package/dist/chunk-VVFPW4ZQ.js +2 -0
- package/dist/{chunk-TVU4YD2H.js → chunk-VYITPC34.js} +1 -1
- package/dist/{chunk-3QVXHF6I.js → chunk-VZKR2YFM.js} +1 -1
- package/dist/{chunk-WMDYHUPS.js → chunk-W2GMKXM7.js} +1 -1
- package/dist/{chunk-72K36DID.js → chunk-W4X3635B.js} +1 -1
- package/dist/chunk-W6ST525S.js +99 -0
- package/dist/{chunk-RIRSTGFU.js → chunk-WEEYQX3M.js} +1 -1
- package/dist/{chunk-KOUKBXOZ.js → chunk-WO7LKJCJ.js} +1 -1
- package/dist/{chunk-6XLVKD6Q.js → chunk-WPRAJ25Z.js} +1 -1
- package/dist/{chunk-LUG2BZJP.js → chunk-WR2ZQGUR.js} +1 -1
- package/dist/{chunk-5K4DONQJ.js → chunk-WWX265PC.js} +1 -1
- package/dist/chunk-XERJY4IG.js +103 -0
- package/dist/{chunk-GXUZ3V7S.js → chunk-XGCJWCC4.js} +1 -1
- package/dist/{chunk-PGKP7W5T.js → chunk-XGMPC7KK.js} +1 -1
- package/dist/chunk-XGRVAPLR.js +7 -0
- package/dist/{chunk-TC3JOEMA.js → chunk-Y2PC2BBJ.js} +60 -60
- package/dist/{chunk-ODH2U44N.js → chunk-Y4QC2YVE.js} +1 -1
- package/dist/chunk-YNJZ2VXV.js +5 -0
- package/dist/chunk-Z5DDPQ26.js +3 -0
- package/dist/{chunk-EXQXGSGY.js → chunk-ZK7VJZ6V.js} +1 -1
- package/dist/{chunk-COTYR5RC.js → chunk-ZLT4DPHN.js} +1 -1
- package/dist/{chunk-CGULQAB5.js → chunk-ZOBQKNGK.js} +1 -1
- package/dist/chunk-ZTE46E4Z.js +153 -0
- package/dist/cli/commands/app/app-logs/sources.js +1 -1
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.js +1 -1
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/command-registry.js +1 -1
- package/dist/conf-store-N5P2ZEAD.js +1 -0
- package/dist/configs/all.yml +3 -0
- package/dist/configs/recommended.yml +3 -0
- package/dist/custom-oclif-loader-4ZAXX5MR.js +1 -0
- package/dist/data/filters.json +1 -1
- package/dist/data/objects.json +30 -3
- package/dist/data/shopify_system_translations.json +48 -4
- package/dist/deprecations-4TY4DNME.js +1 -0
- package/dist/dist-6ZJS4I57.js +1 -0
- package/dist/dist-7W2KJOYN.js +1 -0
- package/dist/environments-TR5WW2MD.js +1 -0
- package/dist/error-VJQM4MFE.js +1 -0
- package/dist/error-handler-IYGE3Z72.js +1 -0
- package/dist/{fs-7LCRIUF3.js → fs-EOQL26C3.js} +1 -1
- package/dist/hooks/app-init.js +1 -1
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/plugin-plugins.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/{http-proxy-node16-X2WAMUT5.js → http-proxy-node16-A6AKKRQH.js} +1 -1
- package/dist/index.js +15 -15
- package/dist/is-global-RQCPBQA3.js +1 -0
- package/dist/{latest-version-32HXMWJ7.js → latest-version-LDWU5F7A.js} +7 -7
- package/dist/lib-2BR2WN7L.js +1 -0
- package/dist/lib-JKLF33A7.js +1 -0
- package/dist/{lib-NOROGV6N.js → lib-P3APEIHY.js} +1 -1
- package/dist/local-TW3HCZ2S.js +1 -0
- package/dist/local-storage-T6FKS53K.js +1 -0
- package/dist/{metadata-D5GLZOLV.js → metadata-TYZDEER5.js} +1 -1
- package/dist/{morph-QZGREMO2.js → morph-ABSWZEVT.js} +4 -4
- package/dist/node-package-manager-6SWUZILX.js +1 -0
- package/dist/notifications-system-SMHMV2UW.js +1 -0
- package/dist/out-53ABAVL7.js +1 -0
- package/dist/{output-FYS764MJ.js → output-JG5I2TEL.js} +1 -1
- package/dist/system-D4Z32GDS.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-6M3XZ6MR.js +1 -0
- package/dist/upgrade-EKAG4IV7.js +1 -0
- package/dist/version-6UBWZCNS.js +1 -0
- package/dist/version-XRU7TEAI.js +1 -0
- package/dist/{workerd-N25GY5MX.js → workerd-LXBSJULF.js} +1 -1
- package/oclif.manifest.json +612 -2
- package/package.json +11 -11
- package/dist/analytics-CIKTYXZ6.js +0 -1
- package/dist/analytics-DM7CBV2M.js +0 -1
- package/dist/assets/dev-console/extensions/dev-console/assets/apple-touch-icon-BXMqQaSW.png +0 -0
- package/dist/assets/dev-console/extensions/dev-console/assets/favicon-16x16-B6uL8SrV.png +0 -0
- package/dist/assets/dev-console/extensions/dev-console/assets/favicon-32x32-CGwlpz_y.png +0 -0
- package/dist/assets/dev-console/extensions/dev-console/assets/favicon-ByUl89Ab.ico +0 -0
- package/dist/assets/dev-console/extensions/dev-console/assets/index-Bm_GpKQW.js +0 -51
- package/dist/assets/dev-console/extensions/dev-console/assets/index-DISeE29z.css +0 -1
- package/dist/assets/dev-console/extensions/dev-console/assets/site-B9Ae890R.webmanifest +0 -19
- package/dist/assets/dev-console/index.html +0 -21
- package/dist/chunk-2FIDORHT.js +0 -5
- package/dist/chunk-2HZMOK4U.js +0 -836
- package/dist/chunk-2O22LZKV.js +0 -44
- package/dist/chunk-3SJHCEQR.js +0 -7
- package/dist/chunk-4E354M4H.js +0 -1
- package/dist/chunk-5C7HDTHJ.js +0 -1
- package/dist/chunk-5NY4HKJF.js +0 -103
- package/dist/chunk-5PLLJPEW.js +0 -3
- package/dist/chunk-6Y3QXASG.js +0 -22
- package/dist/chunk-6ZRHK4ON.js +0 -1
- package/dist/chunk-7USHLXEN.js +0 -2
- package/dist/chunk-AH2ZJ73H.js +0 -16
- package/dist/chunk-AI756VJI.js +0 -1
- package/dist/chunk-DA4LHFJQ.js +0 -26
- package/dist/chunk-DKKBJ4H5.js +0 -2
- package/dist/chunk-EAXEV45I.js +0 -2
- package/dist/chunk-ELIH6GCC.js +0 -1
- package/dist/chunk-EYDNSYYE.js +0 -370
- package/dist/chunk-FO6FNY6P.js +0 -5
- package/dist/chunk-G7QLHXVA.js +0 -19
- package/dist/chunk-H3QZN45D.js +0 -4
- package/dist/chunk-HHSUBF73.js +0 -1
- package/dist/chunk-HXYWEKMS.js +0 -2
- package/dist/chunk-IDKUJQIG.js +0 -11
- package/dist/chunk-IOU6EKTT.js +0 -1
- package/dist/chunk-IRH6IGFT.js +0 -567
- package/dist/chunk-IRTCLR3F.js +0 -10
- package/dist/chunk-J3KRY2SD.js +0 -1
- package/dist/chunk-JOYM7AEQ.js +0 -1
- package/dist/chunk-LKZ7ARYS.js +0 -18
- package/dist/chunk-N5HGT3TE.js +0 -4
- package/dist/chunk-NJOO5XJV.js +0 -1
- package/dist/chunk-NNOSZ447.js +0 -1
- package/dist/chunk-OHASEW7T.js +0 -1
- package/dist/chunk-PGODIZ64.js +0 -1
- package/dist/chunk-PTIJDS6I.js +0 -3
- package/dist/chunk-Q6LCSRIW.js +0 -1
- package/dist/chunk-SKM44SK5.js +0 -4
- package/dist/chunk-T6CC5WUU.js +0 -159
- package/dist/chunk-UZ7U322K.js +0 -283
- package/dist/chunk-VHAZBDFE.js +0 -21
- package/dist/chunk-VRRDIXFQ.js +0 -6
- package/dist/chunk-YB3SGPFF.js +0 -1
- package/dist/chunk-YJCJDCVP.js +0 -1
- package/dist/chunk-ZDQNCYRH.js +0 -5
- package/dist/conf-store-OC4XCP45.js +0 -1
- package/dist/custom-oclif-loader-3AICQCNU.js +0 -1
- package/dist/deprecations-M5JGGK47.js +0 -1
- package/dist/dist-3SP7TISC.js +0 -1
- package/dist/dist-Z4H2OM7V.js +0 -1
- package/dist/environments-ZLSO534C.js +0 -1
- package/dist/error-ZBG2MA5U.js +0 -1
- package/dist/error-handler-MCUV4RZV.js +0 -1
- package/dist/is-global-RURDJZDU.js +0 -1
- package/dist/lib-QJDPPAWN.js +0 -1
- package/dist/lib-UCG2DNMS.js +0 -1
- package/dist/local-5AKD7T5X.js +0 -1
- package/dist/local-storage-TJU77VRQ.js +0 -1
- package/dist/node-package-manager-FA3Y6DPG.js +0 -1
- package/dist/notifications-system-76GJJAJP.js +0 -1
- package/dist/out-CDCY25QC.js +0 -1
- package/dist/system-KDM2BB7R.js +0 -1
- package/dist/ui-QIHGXICT.js +0 -1
- package/dist/upgrade-DY4L43H4.js +0 -1
- package/dist/version-LULWCT5R.js +0 -1
- package/dist/version-WIERCO5R.js +0 -1
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import{a as g0,b as _0}from"./chunk-CXWLHQKA.js";import{b as m0,o as SB}from"./chunk-VDN6MEYI.js";import{a as AB}from"./chunk-VJEKDBGZ.js";import{a as h0}from"./chunk-XGMPC7KK.js";import{$ as N0,A as $c,B as gr,C as Te,D as di,E as Di,F as no,G as hi,H as gs,I as C0,J as Lc,K as w0,L as b0,M as Uc,N as Vo,O as A0,P as S0,Q as x0,R as P0,S as O0,T as T0,U as B0,V as I0,X as R0,Y as Od,Z as M0,aa as kc,c as D0,e as Ad,f as jr,g as Wo,k as Mc,l as Nc,m as Sd,n as xd,p as jc,q as y0,r as pi,s as F0,t as Pd,u as E0,v as Ge,w as Ho,x as zo,y as v0,z as pn}from"./chunk-6UTUJKKC.js";import{aa as bB}from"./chunk-DODCPRXT.js";import{a as d0}from"./chunk-PXSX63RF.js";import{b as ms,c as Ct}from"./chunk-AJ6VOBXU.js";import{a as Gy,b as Yy}from"./chunk-UM3OHLCX.js";import{a as p0}from"./chunk-TQNALMQH.js";import{a as mr}from"./chunk-KGZH4RFA.js";import{H as Uy,I as ky,K as Ed,N as qy,T as EB,U as Wy,V as vB,W as CB,X as Hy,Y as wB,Z as fn,_ as Pc,a as ps,aa as zy,ba as vt,c as Sc,d as xc,da as ds,ea as Vy,h as Ry,ia as Ky,m as My,o as Ny,q as E,s as jy,y as $y}from"./chunk-EZ7EBYDT.js";import{m as Oc,n as Xy,s as Zy,t as Qy,w as Tc,x as e0}from"./chunk-G7QW5OSQ.js";import{o as Ly}from"./chunk-WR2ZQGUR.js";import{a as FB,b as Fd}from"./chunk-V65P572N.js";import{A as Mr,B as Cd,D as n0,F as hs,G as i0,I as o0,O as fi,R as Ic,u as ro,v as Ds,w as Bc,x as t0,z as r0}from"./chunk-6YCGMS7X.js";import{a as hd}from"./chunk-M4BEPPA3.js";import{f as vd}from"./chunk-VZKR2YFM.js";import{a as Bn,b as to}from"./chunk-Y4QC2YVE.js";import{d as yB,i as li,m as k,o as In,p as Nr}from"./chunk-ZTE46E4Z.js";import{$a as ln,Ba as Sy,Ea as ci,Fa as xy,Fb as Ae,Ga as Cc,Gb as Rc,Hb as Se,Ka as Py,L as Qi,La as Oy,Mb as a0,N as Bt,Oa as wc,Ob as c0,Pa as Ty,Pb as ce,Q as mB,Qb as Rn,R as gB,Sb as l0,T as Cy,Ta as Q,Tb as f0,Ua as Ut,V as ls,Wa as Ve,X as Lt,Xa as By,Y as _d,_ as yd,aa as Fc,b as cB,bb as bc,c as lB,da as wy,db as Ac,ea as qo,f as fB,ha as by,i as pB,k as dB,ka as Ec,m as Fy,ma as $e,n as Ey,na as eo,oa as fs,pa as Ir,q as DB,qa as vc,u as vy,ua as Et,v as hB,va as Ay,w as gd,wa as Rr,yb as Jy}from"./chunk-3TFUSDHY.js";import{b as sB,c as aB,e as _y,f as yy,j as _B,u as Iy}from"./chunk-A4SBXDZB.js";import{f as u0,k as wd,l as bd,m as s0}from"./chunk-J3IHP46B.js";import{a as cs}from"./chunk-UKQ7NE5V.js";import{d as I,e as Zi,f as ot,g as Oe,h as Dy,i as he,j as Re,k as _c,l as hy,n as yc,o as my,s as gy,t as md}from"./chunk-773TIA5M.js";import{a as ze,c as M,e as ai,f as uB,g as d}from"./chunk-VKWPEFWQ.js";var oF=M((Wc,iF)=>{d();(function(e,t){typeof Wc=="object"&&typeof iF<"u"?t(Wc,(gB(),uB(mB)),yB()):typeof define=="function"&&define.amd?define(["exports","tslib","graphql"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["graphql-tag"]={},e.tslib,e.graphql))})(Wc,(function(e,t,r){"use strict";var n=new Map,o=new Map,s=!0,a=!1;function l(q){return q.replace(/[\s,]+/g," ").trim()}function p(q){return l(q.source.body.substring(q.start,q.end))}function m(q){var Y=new Set,Z=[];return q.definitions.forEach(function(fe){if(fe.kind==="FragmentDefinition"){var ye=fe.name.value,We=p(fe.loc),mt=o.get(ye);mt&&!mt.has(We)?s&&console.warn("Warning: fragment with name "+ye+` already exists.
|
|
2
|
+
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
3
|
+
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):mt||o.set(ye,mt=new Set),mt.add(We),Y.has(We)||(Y.add(We),Z.push(fe))}else Z.push(fe)}),t.__assign(t.__assign({},q),{definitions:Z})}function g(q){var Y=new Set(q.definitions);Y.forEach(function(fe){fe.loc&&delete fe.loc,Object.keys(fe).forEach(function(ye){var We=fe[ye];We&&typeof We=="object"&&Y.add(We)})});var Z=q.loc;return Z&&(delete Z.startToken,delete Z.endToken),q}function F(q){var Y=l(q);if(!n.has(Y)){var Z=r.parse(q,{experimentalFragmentVariables:a,allowLegacyFragmentVariables:a,experimentalFragmentArguments:a});if(!Z||Z.kind!=="Document")throw new Error("Not a valid GraphQL document.");n.set(Y,g(m(Z)))}return n.get(Y)}function w(q){for(var Y=[],Z=1;Z<arguments.length;Z++)Y[Z-1]=arguments[Z];typeof q=="string"&&(q=[q]);var fe=q[0];return Y.forEach(function(ye,We){ye&&ye.kind==="Document"?fe+=ye.loc.source.body:fe+=ye,fe+=q[We+1]}),F(fe)}function v(){n.clear(),o.clear()}function x(){s=!1}function O(){a=!0}function P(){a=!1}var B={gql:w,resetCaches:v,disableFragmentWarnings:x,enableExperimentalFragmentVariables:O,disableExperimentalFragmentVariables:P};(function(q){q.gql=B.gql,q.resetCaches=B.resetCaches,q.disableFragmentWarnings=B.disableFragmentWarnings,q.enableExperimentalFragmentVariables=B.enableExperimentalFragmentVariables,q.disableExperimentalFragmentVariables=B.disableExperimentalFragmentVariables})(w||(w={})),w.default=w;var U=w;e.default=U,e.disableExperimentalFragmentVariables=P,e.disableFragmentWarnings=x,e.enableExperimentalFragmentVariables=O,e.gql=w,e.resetCaches=v,Object.defineProperty(e,"__esModule",{value:!0})}))});var sF=M((LH,uF)=>{d();uF.exports=oF().gql});var hF=M(DF=>{d();var VB=Object.create,Hc=Object.defineProperty,KB=Object.getPrototypeOf,GB=Object.prototype.hasOwnProperty,YB=Object.getOwnPropertyNames,JB=Object.getOwnPropertyDescriptor,cF=e=>Hc(e,"__esModule",{value:!0}),XB=(e,t)=>{cF(e);for(var r in t)Hc(e,r,{get:t[r],enumerable:!0})},ZB=(e,t,r)=>{if(cF(e),t&&typeof t=="object"||typeof t=="function")for(let n of YB(t))!GB.call(e,n)&&n!=="default"&&Hc(e,n,{get:()=>t[n],enumerable:!(r=JB(t,n))||r.enumerable});return e},zc=e=>e&&e.__esModule?e:ZB(Hc(e!=null?VB(KB(e)):{},"default",{value:e,enumerable:!0}),e);XB(DF,{default:()=>sI,generateContentsFromGraphqlString:()=>dF,generateGraphQLString:()=>fF});var QB=zc(ze("fs")),eI=zc(sF()),tI=zc(ze("readline")),aF=zc(ze("path")),lF=(e,t)=>{let r=t?t(e):e;return JSON.stringify(r,(n,o)=>o===void 0?"__undefined":o).replace(/"__undefined"/g,"undefined")},rI=(e,t)=>{let r=new Set,n=[],o=s=>{r.has(s)||(r.add(s),s.imports.forEach(a=>{let l=t[a.absolutePath];o(l)}),n.unshift(s))};return e.forEach(o),n},nI=e=>new Promise(t=>{let r=tI.default.createInterface({input:QB.default.createReadStream(e)}),n="",o=[],s=!1,a=(l,p)=>{let m=p.replace(l,""),g=m.replace(/"|'/g,""),F=aF.default.join(aF.default.dirname(e),g);o.push({absolutePath:F,relativePath:m})};r.on("line",l=>{l.startsWith("#import ")?a("#import ",l):l.startsWith("# import ")?a("# import ",l):s?n+=l+`
|
|
4
|
+
`:l[0]!=="#"&&l!==""&&(s=!0,n+=l+`
|
|
5
|
+
`)}),r.on("close",()=>{t({body:n.trim(),filePath:e,imports:o})})}),fF=e=>{let t={},r=[],n=new Set,o=s=>t[s]?Promise.resolve(null):new Promise(a=>{nI(s).then(l=>{t[l.filePath]=l,l.imports.forEach(m=>{n.has(m.absolutePath)||(n.add(m.absolutePath),r.push(o(m.absolutePath)))});let p=r.shift();return p?p.then(a):a(null)})});return o(e).then(()=>rI(Object.values(t),t).reduce((l,p)=>p.body+`
|
|
6
|
+
|
|
7
|
+
`+l,""))},iI=(e,t,r)=>{let n={kind:"Document",definitions:[e,...t]};return lF(n,r)},oI=e=>((r,n)=>(r.forEach(o=>{o.kind==="FragmentDefinition"&&(n[o.name.value]=o)}),n))(e.definitions,{}),pF=(e,t)=>{let r=[],n=o=>{if(o.kind==="FragmentSpread"){let s=t[o.name.value],a=pF(s,t);r.push(...a,o.name.value)}};return e.kind==="OperationDefinition"?e.selectionSet.selections.forEach(o=>{var s;o.kind==="Field"&&((s=o.selectionSet)==null||s.selections.forEach(n))}):e.selectionSet.selections.forEach(n),r},dF=(e,t)=>{let r=eI.default(e),n=lF(r,t),o=oI(r),s=r.definitions.reduce((a,l)=>{if(l.kind==="OperationDefinition"&&l.name&&l.name.value){let p=l.name.value,g=pF(l,o).map(w=>{let v=o[w];if(!v)throw new Error(`Expected to find fragment definition for ${w}`);return v}),F=iI(l,g,t);a.push(`export const ${p} = ${F};`)}return a},[`const documentNode = ${n};`]);return s.push("export default documentNode;"),s.join(`
|
|
8
|
+
`)},uI=(e={})=>({name:"graphql-loader",setup(t){t.onLoad({filter:e.filterRegex||/\.graphql$|\.gql$/},r=>fF(r.path).then(n=>({contents:dF(n,e.mapDocumentNode)})))}}),sI=uI});var FF=M((sz,yF)=>{d();function _r(e,t){typeof t=="boolean"&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}yF.exports=_r;_r.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};_r.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};_r.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var r=this._timeouts.shift();if(r===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),r=this._timeouts.shift();else return!1;var n=this,o=setTimeout(function(){n._attempts++,n._operationTimeoutCb&&(n._timeout=setTimeout(function(){n._operationTimeoutCb(n._attempts)},n._operationTimeout),n._options.unref&&n._timeout.unref()),n._fn(n._attempts)},r);return this._options.unref&&o.unref(),!0};_r.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};_r.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};_r.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};_r.prototype.start=_r.prototype.try;_r.prototype.errors=function(){return this._errors};_r.prototype.attempts=function(){return this._attempts};_r.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,r=0,n=0;n<this._errors.length;n++){var o=this._errors[n],s=o.message,a=(e[s]||0)+1;e[s]=a,a>=r&&(t=o,r=a)}return t}});var EF=M(oo=>{d();var hI=FF();oo.operation=function(e){var t=oo.timeouts(e);return new hI(t,{forever:e&&e.forever,unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};oo.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var r in e)t[r]=e[r];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var n=[],o=0;o<t.retries;o++)n.push(this.createTimeout(o,t));return e&&e.forever&&!n.length&&n.push(this.createTimeout(o,t)),n.sort(function(s,a){return s-a}),n};oo.createTimeout=function(e,t){var r=t.randomize?Math.random()+1:1,n=Math.round(r*t.minTimeout*Math.pow(t.factor,e));return n=Math.min(n,t.maxTimeout),n};oo.wrap=function(e,t,r){if(t instanceof Array&&(r=t,t=null),!r){r=[];for(var n in e)typeof e[n]=="function"&&r.push(n)}for(var o=0;o<r.length;o++){var s=r[o],a=e[s];e[s]=function(p){var m=oo.operation(t),g=Array.prototype.slice.call(arguments,1),F=g.pop();g.push(function(w){m.retry(w)||(w&&(arguments[0]=m.mainError()),F.apply(this,arguments))}),m.attempt(function(){p.apply(e,g)})}.bind(e,a),e[s].options=t}}});var CF=M((fz,vF)=>{d();vF.exports=EF()});var bF=M((dz,Ud)=>{"use strict";d();var wF=Symbol();function mI(e,t,r){let n=t[wF];if(n)return t.stat(e,(s,a)=>{if(s)return r(s);r(null,a.mtime,n)});let o=new Date(Math.ceil(Date.now()/1e3)*1e3+5);t.utimes(e,o,o,s=>{if(s)return r(s);t.stat(e,(a,l)=>{if(a)return r(a);let p=l.mtime.getTime()%1e3===0?"s":"ms";Object.defineProperty(t,wF,{value:p}),r(null,l.mtime,p)})})}function gI(e){let t=Date.now();return e==="s"&&(t=Math.ceil(t/1e3)*1e3),new Date(t)}Ud.exports.probe=mI;Ud.exports.getMtime=gI});var OF=M((hz,ws)=>{"use strict";d();var _I=ze("path"),Wd=by(),yI=CF(),FI=_B(),AF=bF(),Mn={};function Cs(e,t){return t.lockfilePath||`${e}.lock`}function Hd(e,t,r){if(!t.realpath)return r(null,_I.resolve(e));t.fs.realpath(e,r)}function qd(e,t,r){let n=Cs(e,t);t.fs.mkdir(n,o=>{if(!o)return AF.probe(n,t.fs,(s,a,l)=>{if(s)return t.fs.rmdir(n,()=>{}),r(s);r(null,a,l)});if(o.code!=="EEXIST")return r(o);if(t.stale<=0)return r(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:e}));t.fs.stat(n,(s,a)=>{if(s)return s.code==="ENOENT"?qd(e,{...t,stale:0},r):r(s);if(!SF(a,t))return r(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:e}));xF(e,t,l=>{if(l)return r(l);qd(e,{...t,stale:0},r)})})})}function SF(e,t){return e.mtime.getTime()<Date.now()-t.stale}function xF(e,t,r){t.fs.rmdir(Cs(e,t),n=>{if(n&&n.code!=="ENOENT")return r(n);r()})}function Kc(e,t){let r=Mn[e];r.updateTimeout||(r.updateDelay=r.updateDelay||t.update,r.updateTimeout=setTimeout(()=>{r.updateTimeout=null,t.fs.stat(r.lockfilePath,(n,o)=>{let s=r.lastUpdate+t.stale<Date.now();if(n)return n.code==="ENOENT"||s?kd(e,r,Object.assign(n,{code:"ECOMPROMISED"})):(r.updateDelay=1e3,Kc(e,t));if(!(r.mtime.getTime()===o.mtime.getTime()))return kd(e,r,Object.assign(new Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let l=AF.getMtime(r.mtimePrecision);t.fs.utimes(r.lockfilePath,l,l,p=>{let m=r.lastUpdate+t.stale<Date.now();if(!r.released){if(p)return p.code==="ENOENT"||m?kd(e,r,Object.assign(p,{code:"ECOMPROMISED"})):(r.updateDelay=1e3,Kc(e,t));r.mtime=l,r.lastUpdate=Date.now(),r.updateDelay=null,Kc(e,t)}})})},r.updateDelay),r.updateTimeout.unref&&r.updateTimeout.unref())}function kd(e,t,r){t.released=!0,t.updateTimeout&&clearTimeout(t.updateTimeout),Mn[e]===t&&delete Mn[e],t.options.onCompromised(r)}function EI(e,t,r){t={stale:1e4,update:null,realpath:!0,retries:0,fs:Wd,onCompromised:n=>{throw n},...t},t.retries=t.retries||0,t.retries=typeof t.retries=="number"?{retries:t.retries}:t.retries,t.stale=Math.max(t.stale||0,2e3),t.update=t.update==null?t.stale/2:t.update||0,t.update=Math.max(Math.min(t.update,t.stale/2),1e3),Hd(e,t,(n,o)=>{if(n)return r(n);let s=yI.operation(t.retries);s.attempt(()=>{qd(o,t,(a,l,p)=>{if(s.retry(a))return;if(a)return r(s.mainError());let m=Mn[o]={lockfilePath:Cs(o,t),mtime:l,mtimePrecision:p,options:t,lastUpdate:Date.now()};Kc(o,t),r(null,g=>{if(m.released)return g&&g(Object.assign(new Error("Lock is already released"),{code:"ERELEASED"}));PF(o,{...t,realpath:!1},g)})})})})}function PF(e,t,r){t={fs:Wd,realpath:!0,...t},Hd(e,t,(n,o)=>{if(n)return r(n);let s=Mn[o];if(!s)return r(Object.assign(new Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));s.updateTimeout&&clearTimeout(s.updateTimeout),s.released=!0,delete Mn[o],xF(o,t,r)})}function vI(e,t,r){t={stale:1e4,realpath:!0,fs:Wd,...t},t.stale=Math.max(t.stale||0,2e3),Hd(e,t,(n,o)=>{if(n)return r(n);t.fs.stat(Cs(o,t),(s,a)=>s?s.code==="ENOENT"?r(null,!1):r(s):r(null,!SF(a,t)))})}function CI(){return Mn}FI(()=>{for(let e in Mn){let t=Mn[e].options;try{t.fs.rmdirSync(Cs(e,t))}catch{}}});ws.exports.lock=EI;ws.exports.unlock=PF;ws.exports.check=vI;ws.exports.getLocks=CI});var BF=M((gz,TF)=>{"use strict";d();var wI=by();function bI(e){let t=["mkdir","realpath","stat","rmdir","utimes"],r={...e};return t.forEach(n=>{r[n]=(...o)=>{let s=o.pop(),a;try{a=e[`${n}Sync`](...o)}catch(l){return s(l)}s(null,a)}}),r}function AI(e){return(...t)=>new Promise((r,n)=>{t.push((o,s)=>{o?n(o):r(s)}),e(...t)})}function SI(e){return(...t)=>{let r,n;if(t.push((o,s)=>{r=o,n=s}),e(...t),r)throw r;return n}}function xI(e){if(e={...e},e.fs=bI(e.fs||wI),typeof e.retries=="number"&&e.retries>0||e.retries&&typeof e.retries.retries=="number"&&e.retries.retries>0)throw Object.assign(new Error("Cannot use retries with the sync api"),{code:"ESYNC"});return e}TF.exports={toPromise:AI,toSync:SI,toSyncOptions:xI}});var RF=M((yz,mi)=>{"use strict";d();var Ko=OF(),{toPromise:Gc,toSync:Yc,toSyncOptions:zd}=BF();async function IF(e,t){let r=await Gc(Ko.lock)(e,t);return Gc(r)}function PI(e,t){let r=Yc(Ko.lock)(e,zd(t));return Yc(r)}function OI(e,t){return Gc(Ko.unlock)(e,t)}function TI(e,t){return Yc(Ko.unlock)(e,zd(t))}function BI(e,t){return Gc(Ko.check)(e,t)}function II(e,t){return Yc(Ko.check)(e,zd(t))}mi.exports=IF;mi.exports.lock=IF;mi.exports.unlock=OI;mi.exports.lockSync=PI;mi.exports.unlockSync=TI;mi.exports.check=BI;mi.exports.checkSync=II});var Nn=M((ru,Bs)=>{d();(function(){var e,t="4.17.23",r=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",s="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",l=500,p="__lodash_placeholder__",m=1,g=2,F=4,w=1,v=2,x=1,O=2,P=4,B=8,U=16,q=32,Y=64,Z=128,fe=256,ye=512,We=30,mt="...",tn=800,dt=16,Sr=1,or=2,ha=3,yn=1/0,rn=9007199254740991,Fn=17976931348623157e292,wo=NaN,ur=4294967295,Bf=ur-1,Kn=ur>>>1,ma=[["ary",Z],["bind",x],["bindKey",O],["curry",B],["curryRight",U],["flip",ye],["partial",q],["partialRight",Y],["rearg",fe]],Gn="[object Arguments]",Yn="[object Array]",bo="[object AsyncFunction]",En="[object Boolean]",Bi="[object Date]",If="[object DOMException]",Ii="[object Error]",Ao="[object Function]",ga="[object GeneratorFunction]",zt="[object Map]",Jn="[object Number]",Ri="[object Null]",xr="[object Object]",_a="[object Promise]",Rf="[object Proxy]",Mi="[object RegExp]",Vt="[object Set]",Ni="[object String]",St="[object Symbol]",ya="[object Undefined]",ji="[object WeakMap]",Mf="[object WeakSet]",nn="[object ArrayBuffer]",Kt="[object DataView]",Tu="[object Float32Array]",Bu="[object Float64Array]",Iu="[object Int8Array]",Ru="[object Int16Array]",$i="[object Int32Array]",Mu="[object Uint8Array]",Nu="[object Uint8ClampedArray]",So="[object Uint16Array]",ju="[object Uint32Array]",Nf=/\b__p \+= '';/g,jf=/\b(__p \+=) '' \+/g,Fa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ea=/&(?:amp|lt|gt|quot|#39);/g,va=/[&<>"']/g,$f=RegExp(Ea.source),$u=RegExp(va.source),Lf=/<%-([\s\S]+?)%>/g,Ca=/<%([\s\S]+?)%>/g,Lu=/<%=([\s\S]+?)%>/g,Uf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kf=/^\w*$/,qf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Uu=/[\\^$.*+?()[\]{}|]/g,Wf=RegExp(Uu.source),ku=/^\s+/,Hf=/\s/,zf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Vf=/\{\n\/\* \[wrapped with (.+)\] \*/,Kf=/,? & /,Gf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Yf=/[()=,{}\[\]\/\s]/,Jf=/\\(\\)?/g,Xf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,wa=/\w*$/,Zf=/^[-+]0x[0-9a-f]+$/i,Qf=/^0b[01]+$/i,ep=/^\[object .+?Constructor\]$/,tp=/^0o[0-7]+$/i,rp=/^(?:0|[1-9]\d*)$/,ba=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Li=/($^)/,Aa=/['\n\r\u2028\u2029\\]/g,Ui="\\ud800-\\udfff",Sa="\\u0300-\\u036f",np="\\ufe20-\\ufe2f",ip="\\u20d0-\\u20ff",qu=Sa+np+ip,Wu="\\u2700-\\u27bf",xa="a-z\\xdf-\\xf6\\xf8-\\xff",op="\\xac\\xb1\\xd7\\xf7",up="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pa="\\u2000-\\u206f",gt=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Gt="A-Z\\xc0-\\xd6\\xd8-\\xde",xo="\\ufe0e\\ufe0f",ki=op+up+Pa+gt,Hu="['\u2019]",sp="["+Ui+"]",Oa="["+ki+"]",Po="["+qu+"]",D="\\d+",R="["+Wu+"]",W="["+xa+"]",z="[^"+Ui+ki+D+Wu+xa+Gt+"]",ie="\\ud83c[\\udffb-\\udfff]",K="(?:"+Po+"|"+ie+")",J="[^"+Ui+"]",ge="(?:\\ud83c[\\udde6-\\uddff]){2}",ke="[\\ud800-\\udbff][\\udc00-\\udfff]",Ce="["+Gt+"]",rt="\\u200d",Be="(?:"+W+"|"+z+")",on="(?:"+Ce+"|"+z+")",st="(?:"+Hu+"(?:d|ll|m|re|s|t|ve))?",Me="(?:"+Hu+"(?:D|LL|M|RE|S|T|VE))?",xt=K+"?",zu="["+xo+"]?",Ta="(?:"+rt+"(?:"+[J,ge,ke].join("|")+")"+zu+xt+")*",Fe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Dt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ne=zu+xt+Ta,at="(?:"+[R,ge,ke].join("|")+")"+ne,_t="(?:"+[J+Po+"?",Po,ge,ke,sp].join("|")+")",vn=RegExp(Hu,"g"),Xn=RegExp(Po,"g"),sr=RegExp(ie+"(?="+ie+")|"+_t+ne,"g"),qi=RegExp([Ce+"?"+W+"+"+st+"(?="+[Oa,Ce,"$"].join("|")+")",on+"+"+Me+"(?="+[Oa,Ce+Be,"$"].join("|")+")",Ce+"?"+Be+"+"+st,Ce+"+"+Me,Dt,Fe,D,at].join("|"),"g"),un=RegExp("["+rt+Ui+qu+xo+"]"),Vu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ku=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ba=-1,xe={};xe[Tu]=xe[Bu]=xe[Iu]=xe[Ru]=xe[$i]=xe[Mu]=xe[Nu]=xe[So]=xe[ju]=!0,xe[Gn]=xe[Yn]=xe[nn]=xe[En]=xe[Kt]=xe[Bi]=xe[Ii]=xe[Ao]=xe[zt]=xe[Jn]=xe[xr]=xe[Mi]=xe[Vt]=xe[Ni]=xe[ji]=!1;var Pe={};Pe[Gn]=Pe[Yn]=Pe[nn]=Pe[Kt]=Pe[En]=Pe[Bi]=Pe[Tu]=Pe[Bu]=Pe[Iu]=Pe[Ru]=Pe[$i]=Pe[zt]=Pe[Jn]=Pe[xr]=Pe[Mi]=Pe[Vt]=Pe[Ni]=Pe[St]=Pe[Mu]=Pe[Nu]=Pe[So]=Pe[ju]=!0,Pe[Ii]=Pe[Ao]=Pe[ji]=!1;var ap={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},ug={"&":"&","<":"<",">":">",'"':""","'":"'"},cp={"&":"&","<":"<",">":">",""":'"',"'":"'"},bS={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},AS=parseFloat,SS=parseInt,sg=typeof global=="object"&&global&&global.Object===Object&&global,xS=typeof self=="object"&&self&&self.Object===Object&&self,ct=sg||xS||Function("return this")(),lp=typeof ru=="object"&&ru&&!ru.nodeType&&ru,Wi=lp&&typeof Bs=="object"&&Bs&&!Bs.nodeType&&Bs,ag=Wi&&Wi.exports===lp,fp=ag&&sg.process,ar=(function(){try{var A=Wi&&Wi.require&&Wi.require("util").types;return A||fp&&fp.binding&&fp.binding("util")}catch{}})(),cg=ar&&ar.isArrayBuffer,lg=ar&&ar.isDate,fg=ar&&ar.isMap,pg=ar&&ar.isRegExp,dg=ar&&ar.isSet,Dg=ar&&ar.isTypedArray;function Yt(A,N,T){switch(T.length){case 0:return A.call(N);case 1:return A.call(N,T[0]);case 2:return A.call(N,T[0],T[1]);case 3:return A.call(N,T[0],T[1],T[2])}return A.apply(N,T)}function PS(A,N,T,V){for(var se=-1,ve=A==null?0:A.length;++se<ve;){var nt=A[se];N(V,nt,T(nt),A)}return V}function cr(A,N){for(var T=-1,V=A==null?0:A.length;++T<V&&N(A[T],T,A)!==!1;);return A}function OS(A,N){for(var T=A==null?0:A.length;T--&&N(A[T],T,A)!==!1;);return A}function hg(A,N){for(var T=-1,V=A==null?0:A.length;++T<V;)if(!N(A[T],T,A))return!1;return!0}function Zn(A,N){for(var T=-1,V=A==null?0:A.length,se=0,ve=[];++T<V;){var nt=A[T];N(nt,T,A)&&(ve[se++]=nt)}return ve}function Ia(A,N){var T=A==null?0:A.length;return!!T&&Oo(A,N,0)>-1}function pp(A,N,T){for(var V=-1,se=A==null?0:A.length;++V<se;)if(T(N,A[V]))return!0;return!1}function qe(A,N){for(var T=-1,V=A==null?0:A.length,se=Array(V);++T<V;)se[T]=N(A[T],T,A);return se}function Qn(A,N){for(var T=-1,V=N.length,se=A.length;++T<V;)A[se+T]=N[T];return A}function dp(A,N,T,V){var se=-1,ve=A==null?0:A.length;for(V&&ve&&(T=A[++se]);++se<ve;)T=N(T,A[se],se,A);return T}function TS(A,N,T,V){var se=A==null?0:A.length;for(V&&se&&(T=A[--se]);se--;)T=N(T,A[se],se,A);return T}function Dp(A,N){for(var T=-1,V=A==null?0:A.length;++T<V;)if(N(A[T],T,A))return!0;return!1}var BS=hp("length");function IS(A){return A.split("")}function RS(A){return A.match(Gf)||[]}function mg(A,N,T){var V;return T(A,function(se,ve,nt){if(N(se,ve,nt))return V=ve,!1}),V}function Ra(A,N,T,V){for(var se=A.length,ve=T+(V?1:-1);V?ve--:++ve<se;)if(N(A[ve],ve,A))return ve;return-1}function Oo(A,N,T){return N===N?VS(A,N,T):Ra(A,gg,T)}function MS(A,N,T,V){for(var se=T-1,ve=A.length;++se<ve;)if(V(A[se],N))return se;return-1}function gg(A){return A!==A}function _g(A,N){var T=A==null?0:A.length;return T?gp(A,N)/T:wo}function hp(A){return function(N){return N==null?e:N[A]}}function mp(A){return function(N){return A==null?e:A[N]}}function yg(A,N,T,V,se){return se(A,function(ve,nt,Ie){T=V?(V=!1,ve):N(T,ve,nt,Ie)}),T}function NS(A,N){var T=A.length;for(A.sort(N);T--;)A[T]=A[T].value;return A}function gp(A,N){for(var T,V=-1,se=A.length;++V<se;){var ve=N(A[V]);ve!==e&&(T=T===e?ve:T+ve)}return T}function _p(A,N){for(var T=-1,V=Array(A);++T<A;)V[T]=N(T);return V}function jS(A,N){return qe(N,function(T){return[T,A[T]]})}function Fg(A){return A&&A.slice(0,wg(A)+1).replace(ku,"")}function Jt(A){return function(N){return A(N)}}function yp(A,N){return qe(N,function(T){return A[T]})}function Gu(A,N){return A.has(N)}function Eg(A,N){for(var T=-1,V=A.length;++T<V&&Oo(N,A[T],0)>-1;);return T}function vg(A,N){for(var T=A.length;T--&&Oo(N,A[T],0)>-1;);return T}function $S(A,N){for(var T=A.length,V=0;T--;)A[T]===N&&++V;return V}var LS=mp(ap),US=mp(ug);function kS(A){return"\\"+bS[A]}function qS(A,N){return A==null?e:A[N]}function To(A){return un.test(A)}function WS(A){return Vu.test(A)}function HS(A){for(var N,T=[];!(N=A.next()).done;)T.push(N.value);return T}function Fp(A){var N=-1,T=Array(A.size);return A.forEach(function(V,se){T[++N]=[se,V]}),T}function Cg(A,N){return function(T){return A(N(T))}}function ei(A,N){for(var T=-1,V=A.length,se=0,ve=[];++T<V;){var nt=A[T];(nt===N||nt===p)&&(A[T]=p,ve[se++]=T)}return ve}function Ma(A){var N=-1,T=Array(A.size);return A.forEach(function(V){T[++N]=V}),T}function zS(A){var N=-1,T=Array(A.size);return A.forEach(function(V){T[++N]=[V,V]}),T}function VS(A,N,T){for(var V=T-1,se=A.length;++V<se;)if(A[V]===N)return V;return-1}function KS(A,N,T){for(var V=T+1;V--;)if(A[V]===N)return V;return V}function Bo(A){return To(A)?YS(A):BS(A)}function Pr(A){return To(A)?JS(A):IS(A)}function wg(A){for(var N=A.length;N--&&Hf.test(A.charAt(N)););return N}var GS=mp(cp);function YS(A){for(var N=sr.lastIndex=0;sr.test(A);)++N;return N}function JS(A){return A.match(sr)||[]}function XS(A){return A.match(qi)||[]}var ZS=(function A(N){N=N==null?ct:ti.defaults(ct.Object(),N,ti.pick(ct,Ku));var T=N.Array,V=N.Date,se=N.Error,ve=N.Function,nt=N.Math,Ie=N.Object,Ep=N.RegExp,QS=N.String,lr=N.TypeError,Na=T.prototype,ex=ve.prototype,Io=Ie.prototype,ja=N["__core-js_shared__"],$a=ex.toString,we=Io.hasOwnProperty,tx=0,bg=(function(){var i=/[^.]+$/.exec(ja&&ja.keys&&ja.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),La=Io.toString,rx=$a.call(Ie),nx=ct._,ix=Ep("^"+$a.call(we).replace(Uu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ua=ag?N.Buffer:e,ri=N.Symbol,ka=N.Uint8Array,Ag=Ua?Ua.allocUnsafe:e,qa=Cg(Ie.getPrototypeOf,Ie),Sg=Ie.create,xg=Io.propertyIsEnumerable,Wa=Na.splice,Pg=ri?ri.isConcatSpreadable:e,Yu=ri?ri.iterator:e,Hi=ri?ri.toStringTag:e,Ha=(function(){try{var i=Yi(Ie,"defineProperty");return i({},"",{}),i}catch{}})(),ox=N.clearTimeout!==ct.clearTimeout&&N.clearTimeout,ux=V&&V.now!==ct.Date.now&&V.now,sx=N.setTimeout!==ct.setTimeout&&N.setTimeout,za=nt.ceil,Va=nt.floor,vp=Ie.getOwnPropertySymbols,ax=Ua?Ua.isBuffer:e,Og=N.isFinite,cx=Na.join,lx=Cg(Ie.keys,Ie),it=nt.max,yt=nt.min,fx=V.now,px=N.parseInt,Tg=nt.random,dx=Na.reverse,Cp=Yi(N,"DataView"),Ju=Yi(N,"Map"),wp=Yi(N,"Promise"),Ro=Yi(N,"Set"),Xu=Yi(N,"WeakMap"),Zu=Yi(Ie,"create"),Ka=Xu&&new Xu,Mo={},Dx=Ji(Cp),hx=Ji(Ju),mx=Ji(wp),gx=Ji(Ro),_x=Ji(Xu),Ga=ri?ri.prototype:e,Qu=Ga?Ga.valueOf:e,Bg=Ga?Ga.toString:e;function _(i){if(Ke(i)&&!ae(i)&&!(i instanceof me)){if(i instanceof fr)return i;if(we.call(i,"__wrapped__"))return I_(i)}return new fr(i)}var No=(function(){function i(){}return function(u){if(!He(u))return{};if(Sg)return Sg(u);i.prototype=u;var c=new i;return i.prototype=e,c}})();function Ya(){}function fr(i,u){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=e}_.templateSettings={escape:Lf,evaluate:Ca,interpolate:Lu,variable:"",imports:{_}},_.prototype=Ya.prototype,_.prototype.constructor=_,fr.prototype=No(Ya.prototype),fr.prototype.constructor=fr;function me(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ur,this.__views__=[]}function yx(){var i=new me(this.__wrapped__);return i.__actions__=Mt(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Mt(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Mt(this.__views__),i}function Fx(){if(this.__filtered__){var i=new me(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function Ex(){var i=this.__wrapped__.value(),u=this.__dir__,c=ae(i),f=u<0,h=c?i.length:0,y=IP(0,h,this.__views__),C=y.start,b=y.end,S=b-C,j=f?b:C-1,$=this.__iteratees__,L=$.length,H=0,G=yt(S,this.__takeCount__);if(!c||!f&&h==S&&G==S)return r_(i,this.__actions__);var te=[];e:for(;S--&&H<G;){j+=u;for(var pe=-1,re=i[j];++pe<L;){var De=$[pe],_e=De.iteratee,Qt=De.type,Tt=_e(re);if(Qt==or)re=Tt;else if(!Tt){if(Qt==Sr)continue e;break e}}te[H++]=re}return te}me.prototype=No(Ya.prototype),me.prototype.constructor=me;function zi(i){var u=-1,c=i==null?0:i.length;for(this.clear();++u<c;){var f=i[u];this.set(f[0],f[1])}}function vx(){this.__data__=Zu?Zu(null):{},this.size=0}function Cx(i){var u=this.has(i)&&delete this.__data__[i];return this.size-=u?1:0,u}function wx(i){var u=this.__data__;if(Zu){var c=u[i];return c===a?e:c}return we.call(u,i)?u[i]:e}function bx(i){var u=this.__data__;return Zu?u[i]!==e:we.call(u,i)}function Ax(i,u){var c=this.__data__;return this.size+=this.has(i)?0:1,c[i]=Zu&&u===e?a:u,this}zi.prototype.clear=vx,zi.prototype.delete=Cx,zi.prototype.get=wx,zi.prototype.has=bx,zi.prototype.set=Ax;function Cn(i){var u=-1,c=i==null?0:i.length;for(this.clear();++u<c;){var f=i[u];this.set(f[0],f[1])}}function Sx(){this.__data__=[],this.size=0}function xx(i){var u=this.__data__,c=Ja(u,i);if(c<0)return!1;var f=u.length-1;return c==f?u.pop():Wa.call(u,c,1),--this.size,!0}function Px(i){var u=this.__data__,c=Ja(u,i);return c<0?e:u[c][1]}function Ox(i){return Ja(this.__data__,i)>-1}function Tx(i,u){var c=this.__data__,f=Ja(c,i);return f<0?(++this.size,c.push([i,u])):c[f][1]=u,this}Cn.prototype.clear=Sx,Cn.prototype.delete=xx,Cn.prototype.get=Px,Cn.prototype.has=Ox,Cn.prototype.set=Tx;function wn(i){var u=-1,c=i==null?0:i.length;for(this.clear();++u<c;){var f=i[u];this.set(f[0],f[1])}}function Bx(){this.size=0,this.__data__={hash:new zi,map:new(Ju||Cn),string:new zi}}function Ix(i){var u=ac(this,i).delete(i);return this.size-=u?1:0,u}function Rx(i){return ac(this,i).get(i)}function Mx(i){return ac(this,i).has(i)}function Nx(i,u){var c=ac(this,i),f=c.size;return c.set(i,u),this.size+=c.size==f?0:1,this}wn.prototype.clear=Bx,wn.prototype.delete=Ix,wn.prototype.get=Rx,wn.prototype.has=Mx,wn.prototype.set=Nx;function Vi(i){var u=-1,c=i==null?0:i.length;for(this.__data__=new wn;++u<c;)this.add(i[u])}function jx(i){return this.__data__.set(i,a),this}function $x(i){return this.__data__.has(i)}Vi.prototype.add=Vi.prototype.push=jx,Vi.prototype.has=$x;function Or(i){var u=this.__data__=new Cn(i);this.size=u.size}function Lx(){this.__data__=new Cn,this.size=0}function Ux(i){var u=this.__data__,c=u.delete(i);return this.size=u.size,c}function kx(i){return this.__data__.get(i)}function qx(i){return this.__data__.has(i)}function Wx(i,u){var c=this.__data__;if(c instanceof Cn){var f=c.__data__;if(!Ju||f.length<r-1)return f.push([i,u]),this.size=++c.size,this;c=this.__data__=new wn(f)}return c.set(i,u),this.size=c.size,this}Or.prototype.clear=Lx,Or.prototype.delete=Ux,Or.prototype.get=kx,Or.prototype.has=qx,Or.prototype.set=Wx;function Ig(i,u){var c=ae(i),f=!c&&Xi(i),h=!c&&!f&&si(i),y=!c&&!f&&!h&&Uo(i),C=c||f||h||y,b=C?_p(i.length,QS):[],S=b.length;for(var j in i)(u||we.call(i,j))&&!(C&&(j=="length"||h&&(j=="offset"||j=="parent")||y&&(j=="buffer"||j=="byteLength"||j=="byteOffset")||xn(j,S)))&&b.push(j);return b}function Rg(i){var u=i.length;return u?i[Mp(0,u-1)]:e}function Hx(i,u){return cc(Mt(i),Ki(u,0,i.length))}function zx(i){return cc(Mt(i))}function bp(i,u,c){(c!==e&&!Tr(i[u],c)||c===e&&!(u in i))&&bn(i,u,c)}function es(i,u,c){var f=i[u];(!(we.call(i,u)&&Tr(f,c))||c===e&&!(u in i))&&bn(i,u,c)}function Ja(i,u){for(var c=i.length;c--;)if(Tr(i[c][0],u))return c;return-1}function Vx(i,u,c,f){return ni(i,function(h,y,C){u(f,h,c(h),C)}),f}function Mg(i,u){return i&&an(u,lt(u),i)}function Kx(i,u){return i&&an(u,jt(u),i)}function bn(i,u,c){u=="__proto__"&&Ha?Ha(i,u,{configurable:!0,enumerable:!0,value:c,writable:!0}):i[u]=c}function Ap(i,u){for(var c=-1,f=u.length,h=T(f),y=i==null;++c<f;)h[c]=y?e:ud(i,u[c]);return h}function Ki(i,u,c){return i===i&&(c!==e&&(i=i<=c?i:c),u!==e&&(i=i>=u?i:u)),i}function pr(i,u,c,f,h,y){var C,b=u&m,S=u&g,j=u&F;if(c&&(C=h?c(i,f,h,y):c(i)),C!==e)return C;if(!He(i))return i;var $=ae(i);if($){if(C=MP(i),!b)return Mt(i,C)}else{var L=Ft(i),H=L==Ao||L==ga;if(si(i))return o_(i,b);if(L==xr||L==Gn||H&&!h){if(C=S||H?{}:w_(i),!b)return S?wP(i,Kx(C,i)):CP(i,Mg(C,i))}else{if(!Pe[L])return h?i:{};C=NP(i,L,b)}}y||(y=new Or);var G=y.get(i);if(G)return G;y.set(i,C),Q_(i)?i.forEach(function(re){C.add(pr(re,u,c,re,i,y))}):X_(i)&&i.forEach(function(re,De){C.set(De,pr(re,u,c,De,i,y))});var te=j?S?Vp:zp:S?jt:lt,pe=$?e:te(i);return cr(pe||i,function(re,De){pe&&(De=re,re=i[De]),es(C,De,pr(re,u,c,De,i,y))}),C}function Gx(i){var u=lt(i);return function(c){return Ng(c,i,u)}}function Ng(i,u,c){var f=c.length;if(i==null)return!f;for(i=Ie(i);f--;){var h=c[f],y=u[h],C=i[h];if(C===e&&!(h in i)||!y(C))return!1}return!0}function jg(i,u,c){if(typeof i!="function")throw new lr(o);return ss(function(){i.apply(e,c)},u)}function ts(i,u,c,f){var h=-1,y=Ia,C=!0,b=i.length,S=[],j=u.length;if(!b)return S;c&&(u=qe(u,Jt(c))),f?(y=pp,C=!1):u.length>=r&&(y=Gu,C=!1,u=new Vi(u));e:for(;++h<b;){var $=i[h],L=c==null?$:c($);if($=f||$!==0?$:0,C&&L===L){for(var H=j;H--;)if(u[H]===L)continue e;S.push($)}else y(u,L,f)||S.push($)}return S}var ni=l_(sn),$g=l_(xp,!0);function Yx(i,u){var c=!0;return ni(i,function(f,h,y){return c=!!u(f,h,y),c}),c}function Xa(i,u,c){for(var f=-1,h=i.length;++f<h;){var y=i[f],C=u(y);if(C!=null&&(b===e?C===C&&!Zt(C):c(C,b)))var b=C,S=y}return S}function Jx(i,u,c,f){var h=i.length;for(c=le(c),c<0&&(c=-c>h?0:h+c),f=f===e||f>h?h:le(f),f<0&&(f+=h),f=c>f?0:ty(f);c<f;)i[c++]=u;return i}function Lg(i,u){var c=[];return ni(i,function(f,h,y){u(f,h,y)&&c.push(f)}),c}function ht(i,u,c,f,h){var y=-1,C=i.length;for(c||(c=$P),h||(h=[]);++y<C;){var b=i[y];u>0&&c(b)?u>1?ht(b,u-1,c,f,h):Qn(h,b):f||(h[h.length]=b)}return h}var Sp=f_(),Ug=f_(!0);function sn(i,u){return i&&Sp(i,u,lt)}function xp(i,u){return i&&Ug(i,u,lt)}function Za(i,u){return Zn(u,function(c){return Pn(i[c])})}function Gi(i,u){u=oi(u,i);for(var c=0,f=u.length;i!=null&&c<f;)i=i[cn(u[c++])];return c&&c==f?i:e}function kg(i,u,c){var f=u(i);return ae(i)?f:Qn(f,c(i))}function Pt(i){return i==null?i===e?ya:Ri:Hi&&Hi in Ie(i)?BP(i):zP(i)}function Pp(i,u){return i>u}function Xx(i,u){return i!=null&&we.call(i,u)}function Zx(i,u){return i!=null&&u in Ie(i)}function Qx(i,u,c){return i>=yt(u,c)&&i<it(u,c)}function Op(i,u,c){for(var f=c?pp:Ia,h=i[0].length,y=i.length,C=y,b=T(y),S=1/0,j=[];C--;){var $=i[C];C&&u&&($=qe($,Jt(u))),S=yt($.length,S),b[C]=!c&&(u||h>=120&&$.length>=120)?new Vi(C&&$):e}$=i[0];var L=-1,H=b[0];e:for(;++L<h&&j.length<S;){var G=$[L],te=u?u(G):G;if(G=c||G!==0?G:0,!(H?Gu(H,te):f(j,te,c))){for(C=y;--C;){var pe=b[C];if(!(pe?Gu(pe,te):f(i[C],te,c)))continue e}H&&H.push(te),j.push(G)}}return j}function eP(i,u,c,f){return sn(i,function(h,y,C){u(f,c(h),y,C)}),f}function rs(i,u,c){u=oi(u,i),i=x_(i,u);var f=i==null?i:i[cn(Dr(u))];return f==null?e:Yt(f,i,c)}function qg(i){return Ke(i)&&Pt(i)==Gn}function tP(i){return Ke(i)&&Pt(i)==nn}function rP(i){return Ke(i)&&Pt(i)==Bi}function ns(i,u,c,f,h){return i===u?!0:i==null||u==null||!Ke(i)&&!Ke(u)?i!==i&&u!==u:nP(i,u,c,f,ns,h)}function nP(i,u,c,f,h,y){var C=ae(i),b=ae(u),S=C?Yn:Ft(i),j=b?Yn:Ft(u);S=S==Gn?xr:S,j=j==Gn?xr:j;var $=S==xr,L=j==xr,H=S==j;if(H&&si(i)){if(!si(u))return!1;C=!0,$=!1}if(H&&!$)return y||(y=new Or),C||Uo(i)?E_(i,u,c,f,h,y):OP(i,u,S,c,f,h,y);if(!(c&w)){var G=$&&we.call(i,"__wrapped__"),te=L&&we.call(u,"__wrapped__");if(G||te){var pe=G?i.value():i,re=te?u.value():u;return y||(y=new Or),h(pe,re,c,f,y)}}return H?(y||(y=new Or),TP(i,u,c,f,h,y)):!1}function iP(i){return Ke(i)&&Ft(i)==zt}function Tp(i,u,c,f){var h=c.length,y=h,C=!f;if(i==null)return!y;for(i=Ie(i);h--;){var b=c[h];if(C&&b[2]?b[1]!==i[b[0]]:!(b[0]in i))return!1}for(;++h<y;){b=c[h];var S=b[0],j=i[S],$=b[1];if(C&&b[2]){if(j===e&&!(S in i))return!1}else{var L=new Or;if(f)var H=f(j,$,S,i,u,L);if(!(H===e?ns($,j,w|v,f,L):H))return!1}}return!0}function Wg(i){if(!He(i)||UP(i))return!1;var u=Pn(i)?ix:ep;return u.test(Ji(i))}function oP(i){return Ke(i)&&Pt(i)==Mi}function uP(i){return Ke(i)&&Ft(i)==Vt}function sP(i){return Ke(i)&&hc(i.length)&&!!xe[Pt(i)]}function Hg(i){return typeof i=="function"?i:i==null?$t:typeof i=="object"?ae(i)?Kg(i[0],i[1]):Vg(i):py(i)}function Bp(i){if(!us(i))return lx(i);var u=[];for(var c in Ie(i))we.call(i,c)&&c!="constructor"&&u.push(c);return u}function aP(i){if(!He(i))return HP(i);var u=us(i),c=[];for(var f in i)f=="constructor"&&(u||!we.call(i,f))||c.push(f);return c}function Ip(i,u){return i<u}function zg(i,u){var c=-1,f=Nt(i)?T(i.length):[];return ni(i,function(h,y,C){f[++c]=u(h,y,C)}),f}function Vg(i){var u=Gp(i);return u.length==1&&u[0][2]?A_(u[0][0],u[0][1]):function(c){return c===i||Tp(c,i,u)}}function Kg(i,u){return Jp(i)&&b_(u)?A_(cn(i),u):function(c){var f=ud(c,i);return f===e&&f===u?sd(c,i):ns(u,f,w|v)}}function Qa(i,u,c,f,h){i!==u&&Sp(u,function(y,C){if(h||(h=new Or),He(y))cP(i,u,C,c,Qa,f,h);else{var b=f?f(Zp(i,C),y,C+"",i,u,h):e;b===e&&(b=y),bp(i,C,b)}},jt)}function cP(i,u,c,f,h,y,C){var b=Zp(i,c),S=Zp(u,c),j=C.get(S);if(j){bp(i,c,j);return}var $=y?y(b,S,c+"",i,u,C):e,L=$===e;if(L){var H=ae(S),G=!H&&si(S),te=!H&&!G&&Uo(S);$=S,H||G||te?ae(b)?$=b:Xe(b)?$=Mt(b):G?(L=!1,$=o_(S,!0)):te?(L=!1,$=u_(S,!0)):$=[]:as(S)||Xi(S)?($=b,Xi(b)?$=ry(b):(!He(b)||Pn(b))&&($=w_(S))):L=!1}L&&(C.set(S,$),h($,S,f,y,C),C.delete(S)),bp(i,c,$)}function Gg(i,u){var c=i.length;if(c)return u+=u<0?c:0,xn(u,c)?i[u]:e}function Yg(i,u,c){u.length?u=qe(u,function(y){return ae(y)?function(C){return Gi(C,y.length===1?y[0]:y)}:y}):u=[$t];var f=-1;u=qe(u,Jt(ee()));var h=zg(i,function(y,C,b){var S=qe(u,function(j){return j(y)});return{criteria:S,index:++f,value:y}});return NS(h,function(y,C){return vP(y,C,c)})}function lP(i,u){return Jg(i,u,function(c,f){return sd(i,f)})}function Jg(i,u,c){for(var f=-1,h=u.length,y={};++f<h;){var C=u[f],b=Gi(i,C);c(b,C)&&is(y,oi(C,i),b)}return y}function fP(i){return function(u){return Gi(u,i)}}function Rp(i,u,c,f){var h=f?MS:Oo,y=-1,C=u.length,b=i;for(i===u&&(u=Mt(u)),c&&(b=qe(i,Jt(c)));++y<C;)for(var S=0,j=u[y],$=c?c(j):j;(S=h(b,$,S,f))>-1;)b!==i&&Wa.call(b,S,1),Wa.call(i,S,1);return i}function Xg(i,u){for(var c=i?u.length:0,f=c-1;c--;){var h=u[c];if(c==f||h!==y){var y=h;xn(h)?Wa.call(i,h,1):$p(i,h)}}return i}function Mp(i,u){return i+Va(Tg()*(u-i+1))}function pP(i,u,c,f){for(var h=-1,y=it(za((u-i)/(c||1)),0),C=T(y);y--;)C[f?y:++h]=i,i+=c;return C}function Np(i,u){var c="";if(!i||u<1||u>rn)return c;do u%2&&(c+=i),u=Va(u/2),u&&(i+=i);while(u);return c}function de(i,u){return Qp(S_(i,u,$t),i+"")}function dP(i){return Rg(ko(i))}function DP(i,u){var c=ko(i);return cc(c,Ki(u,0,c.length))}function is(i,u,c,f){if(!He(i))return i;u=oi(u,i);for(var h=-1,y=u.length,C=y-1,b=i;b!=null&&++h<y;){var S=cn(u[h]),j=c;if(S==="__proto__"||S==="constructor"||S==="prototype")return i;if(h!=C){var $=b[S];j=f?f($,S,b):e,j===e&&(j=He($)?$:xn(u[h+1])?[]:{})}es(b,S,j),b=b[S]}return i}var Zg=Ka?function(i,u){return Ka.set(i,u),i}:$t,hP=Ha?function(i,u){return Ha(i,"toString",{configurable:!0,enumerable:!1,value:cd(u),writable:!0})}:$t;function mP(i){return cc(ko(i))}function dr(i,u,c){var f=-1,h=i.length;u<0&&(u=-u>h?0:h+u),c=c>h?h:c,c<0&&(c+=h),h=u>c?0:c-u>>>0,u>>>=0;for(var y=T(h);++f<h;)y[f]=i[f+u];return y}function gP(i,u){var c;return ni(i,function(f,h,y){return c=u(f,h,y),!c}),!!c}function ec(i,u,c){var f=0,h=i==null?f:i.length;if(typeof u=="number"&&u===u&&h<=Kn){for(;f<h;){var y=f+h>>>1,C=i[y];C!==null&&!Zt(C)&&(c?C<=u:C<u)?f=y+1:h=y}return h}return jp(i,u,$t,c)}function jp(i,u,c,f){var h=0,y=i==null?0:i.length;if(y===0)return 0;u=c(u);for(var C=u!==u,b=u===null,S=Zt(u),j=u===e;h<y;){var $=Va((h+y)/2),L=c(i[$]),H=L!==e,G=L===null,te=L===L,pe=Zt(L);if(C)var re=f||te;else j?re=te&&(f||H):b?re=te&&H&&(f||!G):S?re=te&&H&&!G&&(f||!pe):G||pe?re=!1:re=f?L<=u:L<u;re?h=$+1:y=$}return yt(y,Bf)}function Qg(i,u){for(var c=-1,f=i.length,h=0,y=[];++c<f;){var C=i[c],b=u?u(C):C;if(!c||!Tr(b,S)){var S=b;y[h++]=C===0?0:C}}return y}function e_(i){return typeof i=="number"?i:Zt(i)?wo:+i}function Xt(i){if(typeof i=="string")return i;if(ae(i))return qe(i,Xt)+"";if(Zt(i))return Bg?Bg.call(i):"";var u=i+"";return u=="0"&&1/i==-yn?"-0":u}function ii(i,u,c){var f=-1,h=Ia,y=i.length,C=!0,b=[],S=b;if(c)C=!1,h=pp;else if(y>=r){var j=u?null:xP(i);if(j)return Ma(j);C=!1,h=Gu,S=new Vi}else S=u?[]:b;e:for(;++f<y;){var $=i[f],L=u?u($):$;if($=c||$!==0?$:0,C&&L===L){for(var H=S.length;H--;)if(S[H]===L)continue e;u&&S.push(L),b.push($)}else h(S,L,c)||(S!==b&&S.push(L),b.push($))}return b}function $p(i,u){u=oi(u,i);var c=-1,f=u.length;if(!f)return!0;for(var h=i==null||typeof i!="object"&&typeof i!="function";++c<f;){var y=u[c];if(typeof y=="string"){if(y==="__proto__"&&!we.call(i,"__proto__"))return!1;if(y==="constructor"&&c+1<f&&typeof u[c+1]=="string"&&u[c+1]==="prototype"){if(h&&c===0)continue;return!1}}}var C=x_(i,u);return C==null||delete C[cn(Dr(u))]}function t_(i,u,c,f){return is(i,u,c(Gi(i,u)),f)}function tc(i,u,c,f){for(var h=i.length,y=f?h:-1;(f?y--:++y<h)&&u(i[y],y,i););return c?dr(i,f?0:y,f?y+1:h):dr(i,f?y+1:0,f?h:y)}function r_(i,u){var c=i;return c instanceof me&&(c=c.value()),dp(u,function(f,h){return h.func.apply(h.thisArg,Qn([f],h.args))},c)}function Lp(i,u,c){var f=i.length;if(f<2)return f?ii(i[0]):[];for(var h=-1,y=T(f);++h<f;)for(var C=i[h],b=-1;++b<f;)b!=h&&(y[h]=ts(y[h]||C,i[b],u,c));return ii(ht(y,1),u,c)}function n_(i,u,c){for(var f=-1,h=i.length,y=u.length,C={};++f<h;){var b=f<y?u[f]:e;c(C,i[f],b)}return C}function Up(i){return Xe(i)?i:[]}function kp(i){return typeof i=="function"?i:$t}function oi(i,u){return ae(i)?i:Jp(i,u)?[i]:B_(be(i))}var _P=de;function ui(i,u,c){var f=i.length;return c=c===e?f:c,!u&&c>=f?i:dr(i,u,c)}var i_=ox||function(i){return ct.clearTimeout(i)};function o_(i,u){if(u)return i.slice();var c=i.length,f=Ag?Ag(c):new i.constructor(c);return i.copy(f),f}function qp(i){var u=new i.constructor(i.byteLength);return new ka(u).set(new ka(i)),u}function yP(i,u){var c=u?qp(i.buffer):i.buffer;return new i.constructor(c,i.byteOffset,i.byteLength)}function FP(i){var u=new i.constructor(i.source,wa.exec(i));return u.lastIndex=i.lastIndex,u}function EP(i){return Qu?Ie(Qu.call(i)):{}}function u_(i,u){var c=u?qp(i.buffer):i.buffer;return new i.constructor(c,i.byteOffset,i.length)}function s_(i,u){if(i!==u){var c=i!==e,f=i===null,h=i===i,y=Zt(i),C=u!==e,b=u===null,S=u===u,j=Zt(u);if(!b&&!j&&!y&&i>u||y&&C&&S&&!b&&!j||f&&C&&S||!c&&S||!h)return 1;if(!f&&!y&&!j&&i<u||j&&c&&h&&!f&&!y||b&&c&&h||!C&&h||!S)return-1}return 0}function vP(i,u,c){for(var f=-1,h=i.criteria,y=u.criteria,C=h.length,b=c.length;++f<C;){var S=s_(h[f],y[f]);if(S){if(f>=b)return S;var j=c[f];return S*(j=="desc"?-1:1)}}return i.index-u.index}function a_(i,u,c,f){for(var h=-1,y=i.length,C=c.length,b=-1,S=u.length,j=it(y-C,0),$=T(S+j),L=!f;++b<S;)$[b]=u[b];for(;++h<C;)(L||h<y)&&($[c[h]]=i[h]);for(;j--;)$[b++]=i[h++];return $}function c_(i,u,c,f){for(var h=-1,y=i.length,C=-1,b=c.length,S=-1,j=u.length,$=it(y-b,0),L=T($+j),H=!f;++h<$;)L[h]=i[h];for(var G=h;++S<j;)L[G+S]=u[S];for(;++C<b;)(H||h<y)&&(L[G+c[C]]=i[h++]);return L}function Mt(i,u){var c=-1,f=i.length;for(u||(u=T(f));++c<f;)u[c]=i[c];return u}function an(i,u,c,f){var h=!c;c||(c={});for(var y=-1,C=u.length;++y<C;){var b=u[y],S=f?f(c[b],i[b],b,c,i):e;S===e&&(S=i[b]),h?bn(c,b,S):es(c,b,S)}return c}function CP(i,u){return an(i,Yp(i),u)}function wP(i,u){return an(i,v_(i),u)}function rc(i,u){return function(c,f){var h=ae(c)?PS:Vx,y=u?u():{};return h(c,i,ee(f,2),y)}}function jo(i){return de(function(u,c){var f=-1,h=c.length,y=h>1?c[h-1]:e,C=h>2?c[2]:e;for(y=i.length>3&&typeof y=="function"?(h--,y):e,C&&Ot(c[0],c[1],C)&&(y=h<3?e:y,h=1),u=Ie(u);++f<h;){var b=c[f];b&&i(u,b,f,y)}return u})}function l_(i,u){return function(c,f){if(c==null)return c;if(!Nt(c))return i(c,f);for(var h=c.length,y=u?h:-1,C=Ie(c);(u?y--:++y<h)&&f(C[y],y,C)!==!1;);return c}}function f_(i){return function(u,c,f){for(var h=-1,y=Ie(u),C=f(u),b=C.length;b--;){var S=C[i?b:++h];if(c(y[S],S,y)===!1)break}return u}}function bP(i,u,c){var f=u&x,h=os(i);function y(){var C=this&&this!==ct&&this instanceof y?h:i;return C.apply(f?c:this,arguments)}return y}function p_(i){return function(u){u=be(u);var c=To(u)?Pr(u):e,f=c?c[0]:u.charAt(0),h=c?ui(c,1).join(""):u.slice(1);return f[i]()+h}}function $o(i){return function(u){return dp(ly(cy(u).replace(vn,"")),i,"")}}function os(i){return function(){var u=arguments;switch(u.length){case 0:return new i;case 1:return new i(u[0]);case 2:return new i(u[0],u[1]);case 3:return new i(u[0],u[1],u[2]);case 4:return new i(u[0],u[1],u[2],u[3]);case 5:return new i(u[0],u[1],u[2],u[3],u[4]);case 6:return new i(u[0],u[1],u[2],u[3],u[4],u[5]);case 7:return new i(u[0],u[1],u[2],u[3],u[4],u[5],u[6])}var c=No(i.prototype),f=i.apply(c,u);return He(f)?f:c}}function AP(i,u,c){var f=os(i);function h(){for(var y=arguments.length,C=T(y),b=y,S=Lo(h);b--;)C[b]=arguments[b];var j=y<3&&C[0]!==S&&C[y-1]!==S?[]:ei(C,S);if(y-=j.length,y<c)return g_(i,u,nc,h.placeholder,e,C,j,e,e,c-y);var $=this&&this!==ct&&this instanceof h?f:i;return Yt($,this,C)}return h}function d_(i){return function(u,c,f){var h=Ie(u);if(!Nt(u)){var y=ee(c,3);u=lt(u),c=function(b){return y(h[b],b,h)}}var C=i(u,c,f);return C>-1?h[y?u[C]:C]:e}}function D_(i){return Sn(function(u){var c=u.length,f=c,h=fr.prototype.thru;for(i&&u.reverse();f--;){var y=u[f];if(typeof y!="function")throw new lr(o);if(h&&!C&&sc(y)=="wrapper")var C=new fr([],!0)}for(f=C?f:c;++f<c;){y=u[f];var b=sc(y),S=b=="wrapper"?Kp(y):e;S&&Xp(S[0])&&S[1]==(Z|B|q|fe)&&!S[4].length&&S[9]==1?C=C[sc(S[0])].apply(C,S[3]):C=y.length==1&&Xp(y)?C[b]():C.thru(y)}return function(){var j=arguments,$=j[0];if(C&&j.length==1&&ae($))return C.plant($).value();for(var L=0,H=c?u[L].apply(this,j):$;++L<c;)H=u[L].call(this,H);return H}})}function nc(i,u,c,f,h,y,C,b,S,j){var $=u&Z,L=u&x,H=u&O,G=u&(B|U),te=u&ye,pe=H?e:os(i);function re(){for(var De=arguments.length,_e=T(De),Qt=De;Qt--;)_e[Qt]=arguments[Qt];if(G)var Tt=Lo(re),er=$S(_e,Tt);if(f&&(_e=a_(_e,f,h,G)),y&&(_e=c_(_e,y,C,G)),De-=er,G&&De<j){var Ze=ei(_e,Tt);return g_(i,u,nc,re.placeholder,c,_e,Ze,b,S,j-De)}var Br=L?c:this,Tn=H?Br[i]:i;return De=_e.length,b?_e=VP(_e,b):te&&De>1&&_e.reverse(),$&&S<De&&(_e.length=S),this&&this!==ct&&this instanceof re&&(Tn=pe||os(Tn)),Tn.apply(Br,_e)}return re}function h_(i,u){return function(c,f){return eP(c,i,u(f),{})}}function ic(i,u){return function(c,f){var h;if(c===e&&f===e)return u;if(c!==e&&(h=c),f!==e){if(h===e)return f;typeof c=="string"||typeof f=="string"?(c=Xt(c),f=Xt(f)):(c=e_(c),f=e_(f)),h=i(c,f)}return h}}function Wp(i){return Sn(function(u){return u=qe(u,Jt(ee())),de(function(c){var f=this;return i(u,function(h){return Yt(h,f,c)})})})}function oc(i,u){u=u===e?" ":Xt(u);var c=u.length;if(c<2)return c?Np(u,i):u;var f=Np(u,za(i/Bo(u)));return To(u)?ui(Pr(f),0,i).join(""):f.slice(0,i)}function SP(i,u,c,f){var h=u&x,y=os(i);function C(){for(var b=-1,S=arguments.length,j=-1,$=f.length,L=T($+S),H=this&&this!==ct&&this instanceof C?y:i;++j<$;)L[j]=f[j];for(;S--;)L[j++]=arguments[++b];return Yt(H,h?c:this,L)}return C}function m_(i){return function(u,c,f){return f&&typeof f!="number"&&Ot(u,c,f)&&(c=f=e),u=On(u),c===e?(c=u,u=0):c=On(c),f=f===e?u<c?1:-1:On(f),pP(u,c,f,i)}}function uc(i){return function(u,c){return typeof u=="string"&&typeof c=="string"||(u=hr(u),c=hr(c)),i(u,c)}}function g_(i,u,c,f,h,y,C,b,S,j){var $=u&B,L=$?C:e,H=$?e:C,G=$?y:e,te=$?e:y;u|=$?q:Y,u&=~($?Y:q),u&P||(u&=~(x|O));var pe=[i,u,h,G,L,te,H,b,S,j],re=c.apply(e,pe);return Xp(i)&&P_(re,pe),re.placeholder=f,O_(re,i,u)}function Hp(i){var u=nt[i];return function(c,f){if(c=hr(c),f=f==null?0:yt(le(f),292),f&&Og(c)){var h=(be(c)+"e").split("e"),y=u(h[0]+"e"+(+h[1]+f));return h=(be(y)+"e").split("e"),+(h[0]+"e"+(+h[1]-f))}return u(c)}}var xP=Ro&&1/Ma(new Ro([,-0]))[1]==yn?function(i){return new Ro(i)}:pd;function __(i){return function(u){var c=Ft(u);return c==zt?Fp(u):c==Vt?zS(u):jS(u,i(u))}}function An(i,u,c,f,h,y,C,b){var S=u&O;if(!S&&typeof i!="function")throw new lr(o);var j=f?f.length:0;if(j||(u&=~(q|Y),f=h=e),C=C===e?C:it(le(C),0),b=b===e?b:le(b),j-=h?h.length:0,u&Y){var $=f,L=h;f=h=e}var H=S?e:Kp(i),G=[i,u,c,f,h,$,L,y,C,b];if(H&&WP(G,H),i=G[0],u=G[1],c=G[2],f=G[3],h=G[4],b=G[9]=G[9]===e?S?0:i.length:it(G[9]-j,0),!b&&u&(B|U)&&(u&=~(B|U)),!u||u==x)var te=bP(i,u,c);else u==B||u==U?te=AP(i,u,b):(u==q||u==(x|q))&&!h.length?te=SP(i,u,c,f):te=nc.apply(e,G);var pe=H?Zg:P_;return O_(pe(te,G),i,u)}function y_(i,u,c,f){return i===e||Tr(i,Io[c])&&!we.call(f,c)?u:i}function F_(i,u,c,f,h,y){return He(i)&&He(u)&&(y.set(u,i),Qa(i,u,e,F_,y),y.delete(u)),i}function PP(i){return as(i)?e:i}function E_(i,u,c,f,h,y){var C=c&w,b=i.length,S=u.length;if(b!=S&&!(C&&S>b))return!1;var j=y.get(i),$=y.get(u);if(j&&$)return j==u&&$==i;var L=-1,H=!0,G=c&v?new Vi:e;for(y.set(i,u),y.set(u,i);++L<b;){var te=i[L],pe=u[L];if(f)var re=C?f(pe,te,L,u,i,y):f(te,pe,L,i,u,y);if(re!==e){if(re)continue;H=!1;break}if(G){if(!Dp(u,function(De,_e){if(!Gu(G,_e)&&(te===De||h(te,De,c,f,y)))return G.push(_e)})){H=!1;break}}else if(!(te===pe||h(te,pe,c,f,y))){H=!1;break}}return y.delete(i),y.delete(u),H}function OP(i,u,c,f,h,y,C){switch(c){case Kt:if(i.byteLength!=u.byteLength||i.byteOffset!=u.byteOffset)return!1;i=i.buffer,u=u.buffer;case nn:return!(i.byteLength!=u.byteLength||!y(new ka(i),new ka(u)));case En:case Bi:case Jn:return Tr(+i,+u);case Ii:return i.name==u.name&&i.message==u.message;case Mi:case Ni:return i==u+"";case zt:var b=Fp;case Vt:var S=f&w;if(b||(b=Ma),i.size!=u.size&&!S)return!1;var j=C.get(i);if(j)return j==u;f|=v,C.set(i,u);var $=E_(b(i),b(u),f,h,y,C);return C.delete(i),$;case St:if(Qu)return Qu.call(i)==Qu.call(u)}return!1}function TP(i,u,c,f,h,y){var C=c&w,b=zp(i),S=b.length,j=zp(u),$=j.length;if(S!=$&&!C)return!1;for(var L=S;L--;){var H=b[L];if(!(C?H in u:we.call(u,H)))return!1}var G=y.get(i),te=y.get(u);if(G&&te)return G==u&&te==i;var pe=!0;y.set(i,u),y.set(u,i);for(var re=C;++L<S;){H=b[L];var De=i[H],_e=u[H];if(f)var Qt=C?f(_e,De,H,u,i,y):f(De,_e,H,i,u,y);if(!(Qt===e?De===_e||h(De,_e,c,f,y):Qt)){pe=!1;break}re||(re=H=="constructor")}if(pe&&!re){var Tt=i.constructor,er=u.constructor;Tt!=er&&"constructor"in i&&"constructor"in u&&!(typeof Tt=="function"&&Tt instanceof Tt&&typeof er=="function"&&er instanceof er)&&(pe=!1)}return y.delete(i),y.delete(u),pe}function Sn(i){return Qp(S_(i,e,N_),i+"")}function zp(i){return kg(i,lt,Yp)}function Vp(i){return kg(i,jt,v_)}var Kp=Ka?function(i){return Ka.get(i)}:pd;function sc(i){for(var u=i.name+"",c=Mo[u],f=we.call(Mo,u)?c.length:0;f--;){var h=c[f],y=h.func;if(y==null||y==i)return h.name}return u}function Lo(i){var u=we.call(_,"placeholder")?_:i;return u.placeholder}function ee(){var i=_.iteratee||ld;return i=i===ld?Hg:i,arguments.length?i(arguments[0],arguments[1]):i}function ac(i,u){var c=i.__data__;return LP(u)?c[typeof u=="string"?"string":"hash"]:c.map}function Gp(i){for(var u=lt(i),c=u.length;c--;){var f=u[c],h=i[f];u[c]=[f,h,b_(h)]}return u}function Yi(i,u){var c=qS(i,u);return Wg(c)?c:e}function BP(i){var u=we.call(i,Hi),c=i[Hi];try{i[Hi]=e;var f=!0}catch{}var h=La.call(i);return f&&(u?i[Hi]=c:delete i[Hi]),h}var Yp=vp?function(i){return i==null?[]:(i=Ie(i),Zn(vp(i),function(u){return xg.call(i,u)}))}:dd,v_=vp?function(i){for(var u=[];i;)Qn(u,Yp(i)),i=qa(i);return u}:dd,Ft=Pt;(Cp&&Ft(new Cp(new ArrayBuffer(1)))!=Kt||Ju&&Ft(new Ju)!=zt||wp&&Ft(wp.resolve())!=_a||Ro&&Ft(new Ro)!=Vt||Xu&&Ft(new Xu)!=ji)&&(Ft=function(i){var u=Pt(i),c=u==xr?i.constructor:e,f=c?Ji(c):"";if(f)switch(f){case Dx:return Kt;case hx:return zt;case mx:return _a;case gx:return Vt;case _x:return ji}return u});function IP(i,u,c){for(var f=-1,h=c.length;++f<h;){var y=c[f],C=y.size;switch(y.type){case"drop":i+=C;break;case"dropRight":u-=C;break;case"take":u=yt(u,i+C);break;case"takeRight":i=it(i,u-C);break}}return{start:i,end:u}}function RP(i){var u=i.match(Vf);return u?u[1].split(Kf):[]}function C_(i,u,c){u=oi(u,i);for(var f=-1,h=u.length,y=!1;++f<h;){var C=cn(u[f]);if(!(y=i!=null&&c(i,C)))break;i=i[C]}return y||++f!=h?y:(h=i==null?0:i.length,!!h&&hc(h)&&xn(C,h)&&(ae(i)||Xi(i)))}function MP(i){var u=i.length,c=new i.constructor(u);return u&&typeof i[0]=="string"&&we.call(i,"index")&&(c.index=i.index,c.input=i.input),c}function w_(i){return typeof i.constructor=="function"&&!us(i)?No(qa(i)):{}}function NP(i,u,c){var f=i.constructor;switch(u){case nn:return qp(i);case En:case Bi:return new f(+i);case Kt:return yP(i,c);case Tu:case Bu:case Iu:case Ru:case $i:case Mu:case Nu:case So:case ju:return u_(i,c);case zt:return new f;case Jn:case Ni:return new f(i);case Mi:return FP(i);case Vt:return new f;case St:return EP(i)}}function jP(i,u){var c=u.length;if(!c)return i;var f=c-1;return u[f]=(c>1?"& ":"")+u[f],u=u.join(c>2?", ":" "),i.replace(zf,`{
|
|
9
|
+
/* [wrapped with `+u+`] */
|
|
10
|
+
`)}function $P(i){return ae(i)||Xi(i)||!!(Pg&&i&&i[Pg])}function xn(i,u){var c=typeof i;return u=u??rn,!!u&&(c=="number"||c!="symbol"&&rp.test(i))&&i>-1&&i%1==0&&i<u}function Ot(i,u,c){if(!He(c))return!1;var f=typeof u;return(f=="number"?Nt(c)&&xn(u,c.length):f=="string"&&u in c)?Tr(c[u],i):!1}function Jp(i,u){if(ae(i))return!1;var c=typeof i;return c=="number"||c=="symbol"||c=="boolean"||i==null||Zt(i)?!0:kf.test(i)||!Uf.test(i)||u!=null&&i in Ie(u)}function LP(i){var u=typeof i;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?i!=="__proto__":i===null}function Xp(i){var u=sc(i),c=_[u];if(typeof c!="function"||!(u in me.prototype))return!1;if(i===c)return!0;var f=Kp(c);return!!f&&i===f[0]}function UP(i){return!!bg&&bg in i}var kP=ja?Pn:Dd;function us(i){var u=i&&i.constructor,c=typeof u=="function"&&u.prototype||Io;return i===c}function b_(i){return i===i&&!He(i)}function A_(i,u){return function(c){return c==null?!1:c[i]===u&&(u!==e||i in Ie(c))}}function qP(i){var u=dc(i,function(f){return c.size===l&&c.clear(),f}),c=u.cache;return u}function WP(i,u){var c=i[1],f=u[1],h=c|f,y=h<(x|O|Z),C=f==Z&&c==B||f==Z&&c==fe&&i[7].length<=u[8]||f==(Z|fe)&&u[7].length<=u[8]&&c==B;if(!(y||C))return i;f&x&&(i[2]=u[2],h|=c&x?0:P);var b=u[3];if(b){var S=i[3];i[3]=S?a_(S,b,u[4]):b,i[4]=S?ei(i[3],p):u[4]}return b=u[5],b&&(S=i[5],i[5]=S?c_(S,b,u[6]):b,i[6]=S?ei(i[5],p):u[6]),b=u[7],b&&(i[7]=b),f&Z&&(i[8]=i[8]==null?u[8]:yt(i[8],u[8])),i[9]==null&&(i[9]=u[9]),i[0]=u[0],i[1]=h,i}function HP(i){var u=[];if(i!=null)for(var c in Ie(i))u.push(c);return u}function zP(i){return La.call(i)}function S_(i,u,c){return u=it(u===e?i.length-1:u,0),function(){for(var f=arguments,h=-1,y=it(f.length-u,0),C=T(y);++h<y;)C[h]=f[u+h];h=-1;for(var b=T(u+1);++h<u;)b[h]=f[h];return b[u]=c(C),Yt(i,this,b)}}function x_(i,u){return u.length<2?i:Gi(i,dr(u,0,-1))}function VP(i,u){for(var c=i.length,f=yt(u.length,c),h=Mt(i);f--;){var y=u[f];i[f]=xn(y,c)?h[y]:e}return i}function Zp(i,u){if(!(u==="constructor"&&typeof i[u]=="function")&&u!="__proto__")return i[u]}var P_=T_(Zg),ss=sx||function(i,u){return ct.setTimeout(i,u)},Qp=T_(hP);function O_(i,u,c){var f=u+"";return Qp(i,jP(f,KP(RP(f),c)))}function T_(i){var u=0,c=0;return function(){var f=fx(),h=dt-(f-c);if(c=f,h>0){if(++u>=tn)return arguments[0]}else u=0;return i.apply(e,arguments)}}function cc(i,u){var c=-1,f=i.length,h=f-1;for(u=u===e?f:u;++c<u;){var y=Mp(c,h),C=i[y];i[y]=i[c],i[c]=C}return i.length=u,i}var B_=qP(function(i){var u=[];return i.charCodeAt(0)===46&&u.push(""),i.replace(qf,function(c,f,h,y){u.push(h?y.replace(Jf,"$1"):f||c)}),u});function cn(i){if(typeof i=="string"||Zt(i))return i;var u=i+"";return u=="0"&&1/i==-yn?"-0":u}function Ji(i){if(i!=null){try{return $a.call(i)}catch{}try{return i+""}catch{}}return""}function KP(i,u){return cr(ma,function(c){var f="_."+c[0];u&c[1]&&!Ia(i,f)&&i.push(f)}),i.sort()}function I_(i){if(i instanceof me)return i.clone();var u=new fr(i.__wrapped__,i.__chain__);return u.__actions__=Mt(i.__actions__),u.__index__=i.__index__,u.__values__=i.__values__,u}function GP(i,u,c){(c?Ot(i,u,c):u===e)?u=1:u=it(le(u),0);var f=i==null?0:i.length;if(!f||u<1)return[];for(var h=0,y=0,C=T(za(f/u));h<f;)C[y++]=dr(i,h,h+=u);return C}function YP(i){for(var u=-1,c=i==null?0:i.length,f=0,h=[];++u<c;){var y=i[u];y&&(h[f++]=y)}return h}function JP(){var i=arguments.length;if(!i)return[];for(var u=T(i-1),c=arguments[0],f=i;f--;)u[f-1]=arguments[f];return Qn(ae(c)?Mt(c):[c],ht(u,1))}var XP=de(function(i,u){return Xe(i)?ts(i,ht(u,1,Xe,!0)):[]}),ZP=de(function(i,u){var c=Dr(u);return Xe(c)&&(c=e),Xe(i)?ts(i,ht(u,1,Xe,!0),ee(c,2)):[]}),QP=de(function(i,u){var c=Dr(u);return Xe(c)&&(c=e),Xe(i)?ts(i,ht(u,1,Xe,!0),e,c):[]});function eO(i,u,c){var f=i==null?0:i.length;return f?(u=c||u===e?1:le(u),dr(i,u<0?0:u,f)):[]}function tO(i,u,c){var f=i==null?0:i.length;return f?(u=c||u===e?1:le(u),u=f-u,dr(i,0,u<0?0:u)):[]}function rO(i,u){return i&&i.length?tc(i,ee(u,3),!0,!0):[]}function nO(i,u){return i&&i.length?tc(i,ee(u,3),!0):[]}function iO(i,u,c,f){var h=i==null?0:i.length;return h?(c&&typeof c!="number"&&Ot(i,u,c)&&(c=0,f=h),Jx(i,u,c,f)):[]}function R_(i,u,c){var f=i==null?0:i.length;if(!f)return-1;var h=c==null?0:le(c);return h<0&&(h=it(f+h,0)),Ra(i,ee(u,3),h)}function M_(i,u,c){var f=i==null?0:i.length;if(!f)return-1;var h=f-1;return c!==e&&(h=le(c),h=c<0?it(f+h,0):yt(h,f-1)),Ra(i,ee(u,3),h,!0)}function N_(i){var u=i==null?0:i.length;return u?ht(i,1):[]}function oO(i){var u=i==null?0:i.length;return u?ht(i,yn):[]}function uO(i,u){var c=i==null?0:i.length;return c?(u=u===e?1:le(u),ht(i,u)):[]}function sO(i){for(var u=-1,c=i==null?0:i.length,f={};++u<c;){var h=i[u];f[h[0]]=h[1]}return f}function j_(i){return i&&i.length?i[0]:e}function aO(i,u,c){var f=i==null?0:i.length;if(!f)return-1;var h=c==null?0:le(c);return h<0&&(h=it(f+h,0)),Oo(i,u,h)}function cO(i){var u=i==null?0:i.length;return u?dr(i,0,-1):[]}var lO=de(function(i){var u=qe(i,Up);return u.length&&u[0]===i[0]?Op(u):[]}),fO=de(function(i){var u=Dr(i),c=qe(i,Up);return u===Dr(c)?u=e:c.pop(),c.length&&c[0]===i[0]?Op(c,ee(u,2)):[]}),pO=de(function(i){var u=Dr(i),c=qe(i,Up);return u=typeof u=="function"?u:e,u&&c.pop(),c.length&&c[0]===i[0]?Op(c,e,u):[]});function dO(i,u){return i==null?"":cx.call(i,u)}function Dr(i){var u=i==null?0:i.length;return u?i[u-1]:e}function DO(i,u,c){var f=i==null?0:i.length;if(!f)return-1;var h=f;return c!==e&&(h=le(c),h=h<0?it(f+h,0):yt(h,f-1)),u===u?KS(i,u,h):Ra(i,gg,h,!0)}function hO(i,u){return i&&i.length?Gg(i,le(u)):e}var mO=de($_);function $_(i,u){return i&&i.length&&u&&u.length?Rp(i,u):i}function gO(i,u,c){return i&&i.length&&u&&u.length?Rp(i,u,ee(c,2)):i}function _O(i,u,c){return i&&i.length&&u&&u.length?Rp(i,u,e,c):i}var yO=Sn(function(i,u){var c=i==null?0:i.length,f=Ap(i,u);return Xg(i,qe(u,function(h){return xn(h,c)?+h:h}).sort(s_)),f});function FO(i,u){var c=[];if(!(i&&i.length))return c;var f=-1,h=[],y=i.length;for(u=ee(u,3);++f<y;){var C=i[f];u(C,f,i)&&(c.push(C),h.push(f))}return Xg(i,h),c}function ed(i){return i==null?i:dx.call(i)}function EO(i,u,c){var f=i==null?0:i.length;return f?(c&&typeof c!="number"&&Ot(i,u,c)?(u=0,c=f):(u=u==null?0:le(u),c=c===e?f:le(c)),dr(i,u,c)):[]}function vO(i,u){return ec(i,u)}function CO(i,u,c){return jp(i,u,ee(c,2))}function wO(i,u){var c=i==null?0:i.length;if(c){var f=ec(i,u);if(f<c&&Tr(i[f],u))return f}return-1}function bO(i,u){return ec(i,u,!0)}function AO(i,u,c){return jp(i,u,ee(c,2),!0)}function SO(i,u){var c=i==null?0:i.length;if(c){var f=ec(i,u,!0)-1;if(Tr(i[f],u))return f}return-1}function xO(i){return i&&i.length?Qg(i):[]}function PO(i,u){return i&&i.length?Qg(i,ee(u,2)):[]}function OO(i){var u=i==null?0:i.length;return u?dr(i,1,u):[]}function TO(i,u,c){return i&&i.length?(u=c||u===e?1:le(u),dr(i,0,u<0?0:u)):[]}function BO(i,u,c){var f=i==null?0:i.length;return f?(u=c||u===e?1:le(u),u=f-u,dr(i,u<0?0:u,f)):[]}function IO(i,u){return i&&i.length?tc(i,ee(u,3),!1,!0):[]}function RO(i,u){return i&&i.length?tc(i,ee(u,3)):[]}var MO=de(function(i){return ii(ht(i,1,Xe,!0))}),NO=de(function(i){var u=Dr(i);return Xe(u)&&(u=e),ii(ht(i,1,Xe,!0),ee(u,2))}),jO=de(function(i){var u=Dr(i);return u=typeof u=="function"?u:e,ii(ht(i,1,Xe,!0),e,u)});function $O(i){return i&&i.length?ii(i):[]}function LO(i,u){return i&&i.length?ii(i,ee(u,2)):[]}function UO(i,u){return u=typeof u=="function"?u:e,i&&i.length?ii(i,e,u):[]}function td(i){if(!(i&&i.length))return[];var u=0;return i=Zn(i,function(c){if(Xe(c))return u=it(c.length,u),!0}),_p(u,function(c){return qe(i,hp(c))})}function L_(i,u){if(!(i&&i.length))return[];var c=td(i);return u==null?c:qe(c,function(f){return Yt(u,e,f)})}var kO=de(function(i,u){return Xe(i)?ts(i,u):[]}),qO=de(function(i){return Lp(Zn(i,Xe))}),WO=de(function(i){var u=Dr(i);return Xe(u)&&(u=e),Lp(Zn(i,Xe),ee(u,2))}),HO=de(function(i){var u=Dr(i);return u=typeof u=="function"?u:e,Lp(Zn(i,Xe),e,u)}),zO=de(td);function VO(i,u){return n_(i||[],u||[],es)}function KO(i,u){return n_(i||[],u||[],is)}var GO=de(function(i){var u=i.length,c=u>1?i[u-1]:e;return c=typeof c=="function"?(i.pop(),c):e,L_(i,c)});function U_(i){var u=_(i);return u.__chain__=!0,u}function YO(i,u){return u(i),i}function lc(i,u){return u(i)}var JO=Sn(function(i){var u=i.length,c=u?i[0]:0,f=this.__wrapped__,h=function(y){return Ap(y,i)};return u>1||this.__actions__.length||!(f instanceof me)||!xn(c)?this.thru(h):(f=f.slice(c,+c+(u?1:0)),f.__actions__.push({func:lc,args:[h],thisArg:e}),new fr(f,this.__chain__).thru(function(y){return u&&!y.length&&y.push(e),y}))});function XO(){return U_(this)}function ZO(){return new fr(this.value(),this.__chain__)}function QO(){this.__values__===e&&(this.__values__=ey(this.value()));var i=this.__index__>=this.__values__.length,u=i?e:this.__values__[this.__index__++];return{done:i,value:u}}function eT(){return this}function tT(i){for(var u,c=this;c instanceof Ya;){var f=I_(c);f.__index__=0,f.__values__=e,u?h.__wrapped__=f:u=f;var h=f;c=c.__wrapped__}return h.__wrapped__=i,u}function rT(){var i=this.__wrapped__;if(i instanceof me){var u=i;return this.__actions__.length&&(u=new me(this)),u=u.reverse(),u.__actions__.push({func:lc,args:[ed],thisArg:e}),new fr(u,this.__chain__)}return this.thru(ed)}function nT(){return r_(this.__wrapped__,this.__actions__)}var iT=rc(function(i,u,c){we.call(i,c)?++i[c]:bn(i,c,1)});function oT(i,u,c){var f=ae(i)?hg:Yx;return c&&Ot(i,u,c)&&(u=e),f(i,ee(u,3))}function uT(i,u){var c=ae(i)?Zn:Lg;return c(i,ee(u,3))}var sT=d_(R_),aT=d_(M_);function cT(i,u){return ht(fc(i,u),1)}function lT(i,u){return ht(fc(i,u),yn)}function fT(i,u,c){return c=c===e?1:le(c),ht(fc(i,u),c)}function k_(i,u){var c=ae(i)?cr:ni;return c(i,ee(u,3))}function q_(i,u){var c=ae(i)?OS:$g;return c(i,ee(u,3))}var pT=rc(function(i,u,c){we.call(i,c)?i[c].push(u):bn(i,c,[u])});function dT(i,u,c,f){i=Nt(i)?i:ko(i),c=c&&!f?le(c):0;var h=i.length;return c<0&&(c=it(h+c,0)),mc(i)?c<=h&&i.indexOf(u,c)>-1:!!h&&Oo(i,u,c)>-1}var DT=de(function(i,u,c){var f=-1,h=typeof u=="function",y=Nt(i)?T(i.length):[];return ni(i,function(C){y[++f]=h?Yt(u,C,c):rs(C,u,c)}),y}),hT=rc(function(i,u,c){bn(i,c,u)});function fc(i,u){var c=ae(i)?qe:zg;return c(i,ee(u,3))}function mT(i,u,c,f){return i==null?[]:(ae(u)||(u=u==null?[]:[u]),c=f?e:c,ae(c)||(c=c==null?[]:[c]),Yg(i,u,c))}var gT=rc(function(i,u,c){i[c?0:1].push(u)},function(){return[[],[]]});function _T(i,u,c){var f=ae(i)?dp:yg,h=arguments.length<3;return f(i,ee(u,4),c,h,ni)}function yT(i,u,c){var f=ae(i)?TS:yg,h=arguments.length<3;return f(i,ee(u,4),c,h,$g)}function FT(i,u){var c=ae(i)?Zn:Lg;return c(i,Dc(ee(u,3)))}function ET(i){var u=ae(i)?Rg:dP;return u(i)}function vT(i,u,c){(c?Ot(i,u,c):u===e)?u=1:u=le(u);var f=ae(i)?Hx:DP;return f(i,u)}function CT(i){var u=ae(i)?zx:mP;return u(i)}function wT(i){if(i==null)return 0;if(Nt(i))return mc(i)?Bo(i):i.length;var u=Ft(i);return u==zt||u==Vt?i.size:Bp(i).length}function bT(i,u,c){var f=ae(i)?Dp:gP;return c&&Ot(i,u,c)&&(u=e),f(i,ee(u,3))}var AT=de(function(i,u){if(i==null)return[];var c=u.length;return c>1&&Ot(i,u[0],u[1])?u=[]:c>2&&Ot(u[0],u[1],u[2])&&(u=[u[0]]),Yg(i,ht(u,1),[])}),pc=ux||function(){return ct.Date.now()};function ST(i,u){if(typeof u!="function")throw new lr(o);return i=le(i),function(){if(--i<1)return u.apply(this,arguments)}}function W_(i,u,c){return u=c?e:u,u=i&&u==null?i.length:u,An(i,Z,e,e,e,e,u)}function H_(i,u){var c;if(typeof u!="function")throw new lr(o);return i=le(i),function(){return--i>0&&(c=u.apply(this,arguments)),i<=1&&(u=e),c}}var rd=de(function(i,u,c){var f=x;if(c.length){var h=ei(c,Lo(rd));f|=q}return An(i,f,u,c,h)}),z_=de(function(i,u,c){var f=x|O;if(c.length){var h=ei(c,Lo(z_));f|=q}return An(u,f,i,c,h)});function V_(i,u,c){u=c?e:u;var f=An(i,B,e,e,e,e,e,u);return f.placeholder=V_.placeholder,f}function K_(i,u,c){u=c?e:u;var f=An(i,U,e,e,e,e,e,u);return f.placeholder=K_.placeholder,f}function G_(i,u,c){var f,h,y,C,b,S,j=0,$=!1,L=!1,H=!0;if(typeof i!="function")throw new lr(o);u=hr(u)||0,He(c)&&($=!!c.leading,L="maxWait"in c,y=L?it(hr(c.maxWait)||0,u):y,H="trailing"in c?!!c.trailing:H);function G(Ze){var Br=f,Tn=h;return f=h=e,j=Ze,C=i.apply(Tn,Br),C}function te(Ze){return j=Ze,b=ss(De,u),$?G(Ze):C}function pe(Ze){var Br=Ze-S,Tn=Ze-j,dy=u-Br;return L?yt(dy,y-Tn):dy}function re(Ze){var Br=Ze-S,Tn=Ze-j;return S===e||Br>=u||Br<0||L&&Tn>=y}function De(){var Ze=pc();if(re(Ze))return _e(Ze);b=ss(De,pe(Ze))}function _e(Ze){return b=e,H&&f?G(Ze):(f=h=e,C)}function Qt(){b!==e&&i_(b),j=0,f=S=h=b=e}function Tt(){return b===e?C:_e(pc())}function er(){var Ze=pc(),Br=re(Ze);if(f=arguments,h=this,S=Ze,Br){if(b===e)return te(S);if(L)return i_(b),b=ss(De,u),G(S)}return b===e&&(b=ss(De,u)),C}return er.cancel=Qt,er.flush=Tt,er}var xT=de(function(i,u){return jg(i,1,u)}),PT=de(function(i,u,c){return jg(i,hr(u)||0,c)});function OT(i){return An(i,ye)}function dc(i,u){if(typeof i!="function"||u!=null&&typeof u!="function")throw new lr(o);var c=function(){var f=arguments,h=u?u.apply(this,f):f[0],y=c.cache;if(y.has(h))return y.get(h);var C=i.apply(this,f);return c.cache=y.set(h,C)||y,C};return c.cache=new(dc.Cache||wn),c}dc.Cache=wn;function Dc(i){if(typeof i!="function")throw new lr(o);return function(){var u=arguments;switch(u.length){case 0:return!i.call(this);case 1:return!i.call(this,u[0]);case 2:return!i.call(this,u[0],u[1]);case 3:return!i.call(this,u[0],u[1],u[2])}return!i.apply(this,u)}}function TT(i){return H_(2,i)}var BT=_P(function(i,u){u=u.length==1&&ae(u[0])?qe(u[0],Jt(ee())):qe(ht(u,1),Jt(ee()));var c=u.length;return de(function(f){for(var h=-1,y=yt(f.length,c);++h<y;)f[h]=u[h].call(this,f[h]);return Yt(i,this,f)})}),nd=de(function(i,u){var c=ei(u,Lo(nd));return An(i,q,e,u,c)}),Y_=de(function(i,u){var c=ei(u,Lo(Y_));return An(i,Y,e,u,c)}),IT=Sn(function(i,u){return An(i,fe,e,e,e,u)});function RT(i,u){if(typeof i!="function")throw new lr(o);return u=u===e?u:le(u),de(i,u)}function MT(i,u){if(typeof i!="function")throw new lr(o);return u=u==null?0:it(le(u),0),de(function(c){var f=c[u],h=ui(c,0,u);return f&&Qn(h,f),Yt(i,this,h)})}function NT(i,u,c){var f=!0,h=!0;if(typeof i!="function")throw new lr(o);return He(c)&&(f="leading"in c?!!c.leading:f,h="trailing"in c?!!c.trailing:h),G_(i,u,{leading:f,maxWait:u,trailing:h})}function jT(i){return W_(i,1)}function $T(i,u){return nd(kp(u),i)}function LT(){if(!arguments.length)return[];var i=arguments[0];return ae(i)?i:[i]}function UT(i){return pr(i,F)}function kT(i,u){return u=typeof u=="function"?u:e,pr(i,F,u)}function qT(i){return pr(i,m|F)}function WT(i,u){return u=typeof u=="function"?u:e,pr(i,m|F,u)}function HT(i,u){return u==null||Ng(i,u,lt(u))}function Tr(i,u){return i===u||i!==i&&u!==u}var zT=uc(Pp),VT=uc(function(i,u){return i>=u}),Xi=qg((function(){return arguments})())?qg:function(i){return Ke(i)&&we.call(i,"callee")&&!xg.call(i,"callee")},ae=T.isArray,KT=cg?Jt(cg):tP;function Nt(i){return i!=null&&hc(i.length)&&!Pn(i)}function Xe(i){return Ke(i)&&Nt(i)}function GT(i){return i===!0||i===!1||Ke(i)&&Pt(i)==En}var si=ax||Dd,YT=lg?Jt(lg):rP;function JT(i){return Ke(i)&&i.nodeType===1&&!as(i)}function XT(i){if(i==null)return!0;if(Nt(i)&&(ae(i)||typeof i=="string"||typeof i.splice=="function"||si(i)||Uo(i)||Xi(i)))return!i.length;var u=Ft(i);if(u==zt||u==Vt)return!i.size;if(us(i))return!Bp(i).length;for(var c in i)if(we.call(i,c))return!1;return!0}function ZT(i,u){return ns(i,u)}function QT(i,u,c){c=typeof c=="function"?c:e;var f=c?c(i,u):e;return f===e?ns(i,u,e,c):!!f}function id(i){if(!Ke(i))return!1;var u=Pt(i);return u==Ii||u==If||typeof i.message=="string"&&typeof i.name=="string"&&!as(i)}function e3(i){return typeof i=="number"&&Og(i)}function Pn(i){if(!He(i))return!1;var u=Pt(i);return u==Ao||u==ga||u==bo||u==Rf}function J_(i){return typeof i=="number"&&i==le(i)}function hc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=rn}function He(i){var u=typeof i;return i!=null&&(u=="object"||u=="function")}function Ke(i){return i!=null&&typeof i=="object"}var X_=fg?Jt(fg):iP;function t3(i,u){return i===u||Tp(i,u,Gp(u))}function r3(i,u,c){return c=typeof c=="function"?c:e,Tp(i,u,Gp(u),c)}function n3(i){return Z_(i)&&i!=+i}function i3(i){if(kP(i))throw new se(n);return Wg(i)}function o3(i){return i===null}function u3(i){return i==null}function Z_(i){return typeof i=="number"||Ke(i)&&Pt(i)==Jn}function as(i){if(!Ke(i)||Pt(i)!=xr)return!1;var u=qa(i);if(u===null)return!0;var c=we.call(u,"constructor")&&u.constructor;return typeof c=="function"&&c instanceof c&&$a.call(c)==rx}var od=pg?Jt(pg):oP;function s3(i){return J_(i)&&i>=-rn&&i<=rn}var Q_=dg?Jt(dg):uP;function mc(i){return typeof i=="string"||!ae(i)&&Ke(i)&&Pt(i)==Ni}function Zt(i){return typeof i=="symbol"||Ke(i)&&Pt(i)==St}var Uo=Dg?Jt(Dg):sP;function a3(i){return i===e}function c3(i){return Ke(i)&&Ft(i)==ji}function l3(i){return Ke(i)&&Pt(i)==Mf}var f3=uc(Ip),p3=uc(function(i,u){return i<=u});function ey(i){if(!i)return[];if(Nt(i))return mc(i)?Pr(i):Mt(i);if(Yu&&i[Yu])return HS(i[Yu]());var u=Ft(i),c=u==zt?Fp:u==Vt?Ma:ko;return c(i)}function On(i){if(!i)return i===0?i:0;if(i=hr(i),i===yn||i===-yn){var u=i<0?-1:1;return u*Fn}return i===i?i:0}function le(i){var u=On(i),c=u%1;return u===u?c?u-c:u:0}function ty(i){return i?Ki(le(i),0,ur):0}function hr(i){if(typeof i=="number")return i;if(Zt(i))return wo;if(He(i)){var u=typeof i.valueOf=="function"?i.valueOf():i;i=He(u)?u+"":u}if(typeof i!="string")return i===0?i:+i;i=Fg(i);var c=Qf.test(i);return c||tp.test(i)?SS(i.slice(2),c?2:8):Zf.test(i)?wo:+i}function ry(i){return an(i,jt(i))}function d3(i){return i?Ki(le(i),-rn,rn):i===0?i:0}function be(i){return i==null?"":Xt(i)}var D3=jo(function(i,u){if(us(u)||Nt(u)){an(u,lt(u),i);return}for(var c in u)we.call(u,c)&&es(i,c,u[c])}),ny=jo(function(i,u){an(u,jt(u),i)}),gc=jo(function(i,u,c,f){an(u,jt(u),i,f)}),h3=jo(function(i,u,c,f){an(u,lt(u),i,f)}),m3=Sn(Ap);function g3(i,u){var c=No(i);return u==null?c:Mg(c,u)}var _3=de(function(i,u){i=Ie(i);var c=-1,f=u.length,h=f>2?u[2]:e;for(h&&Ot(u[0],u[1],h)&&(f=1);++c<f;)for(var y=u[c],C=jt(y),b=-1,S=C.length;++b<S;){var j=C[b],$=i[j];($===e||Tr($,Io[j])&&!we.call(i,j))&&(i[j]=y[j])}return i}),y3=de(function(i){return i.push(e,F_),Yt(iy,e,i)});function F3(i,u){return mg(i,ee(u,3),sn)}function E3(i,u){return mg(i,ee(u,3),xp)}function v3(i,u){return i==null?i:Sp(i,ee(u,3),jt)}function C3(i,u){return i==null?i:Ug(i,ee(u,3),jt)}function w3(i,u){return i&&sn(i,ee(u,3))}function b3(i,u){return i&&xp(i,ee(u,3))}function A3(i){return i==null?[]:Za(i,lt(i))}function S3(i){return i==null?[]:Za(i,jt(i))}function ud(i,u,c){var f=i==null?e:Gi(i,u);return f===e?c:f}function x3(i,u){return i!=null&&C_(i,u,Xx)}function sd(i,u){return i!=null&&C_(i,u,Zx)}var P3=h_(function(i,u,c){u!=null&&typeof u.toString!="function"&&(u=La.call(u)),i[u]=c},cd($t)),O3=h_(function(i,u,c){u!=null&&typeof u.toString!="function"&&(u=La.call(u)),we.call(i,u)?i[u].push(c):i[u]=[c]},ee),T3=de(rs);function lt(i){return Nt(i)?Ig(i):Bp(i)}function jt(i){return Nt(i)?Ig(i,!0):aP(i)}function B3(i,u){var c={};return u=ee(u,3),sn(i,function(f,h,y){bn(c,u(f,h,y),f)}),c}function I3(i,u){var c={};return u=ee(u,3),sn(i,function(f,h,y){bn(c,h,u(f,h,y))}),c}var R3=jo(function(i,u,c){Qa(i,u,c)}),iy=jo(function(i,u,c,f){Qa(i,u,c,f)}),M3=Sn(function(i,u){var c={};if(i==null)return c;var f=!1;u=qe(u,function(y){return y=oi(y,i),f||(f=y.length>1),y}),an(i,Vp(i),c),f&&(c=pr(c,m|g|F,PP));for(var h=u.length;h--;)$p(c,u[h]);return c});function N3(i,u){return oy(i,Dc(ee(u)))}var j3=Sn(function(i,u){return i==null?{}:lP(i,u)});function oy(i,u){if(i==null)return{};var c=qe(Vp(i),function(f){return[f]});return u=ee(u),Jg(i,c,function(f,h){return u(f,h[0])})}function $3(i,u,c){u=oi(u,i);var f=-1,h=u.length;for(h||(h=1,i=e);++f<h;){var y=i==null?e:i[cn(u[f])];y===e&&(f=h,y=c),i=Pn(y)?y.call(i):y}return i}function L3(i,u,c){return i==null?i:is(i,u,c)}function U3(i,u,c,f){return f=typeof f=="function"?f:e,i==null?i:is(i,u,c,f)}var uy=__(lt),sy=__(jt);function k3(i,u,c){var f=ae(i),h=f||si(i)||Uo(i);if(u=ee(u,4),c==null){var y=i&&i.constructor;h?c=f?new y:[]:He(i)?c=Pn(y)?No(qa(i)):{}:c={}}return(h?cr:sn)(i,function(C,b,S){return u(c,C,b,S)}),c}function q3(i,u){return i==null?!0:$p(i,u)}function W3(i,u,c){return i==null?i:t_(i,u,kp(c))}function H3(i,u,c,f){return f=typeof f=="function"?f:e,i==null?i:t_(i,u,kp(c),f)}function ko(i){return i==null?[]:yp(i,lt(i))}function z3(i){return i==null?[]:yp(i,jt(i))}function V3(i,u,c){return c===e&&(c=u,u=e),c!==e&&(c=hr(c),c=c===c?c:0),u!==e&&(u=hr(u),u=u===u?u:0),Ki(hr(i),u,c)}function K3(i,u,c){return u=On(u),c===e?(c=u,u=0):c=On(c),i=hr(i),Qx(i,u,c)}function G3(i,u,c){if(c&&typeof c!="boolean"&&Ot(i,u,c)&&(u=c=e),c===e&&(typeof u=="boolean"?(c=u,u=e):typeof i=="boolean"&&(c=i,i=e)),i===e&&u===e?(i=0,u=1):(i=On(i),u===e?(u=i,i=0):u=On(u)),i>u){var f=i;i=u,u=f}if(c||i%1||u%1){var h=Tg();return yt(i+h*(u-i+AS("1e-"+((h+"").length-1))),u)}return Mp(i,u)}var Y3=$o(function(i,u,c){return u=u.toLowerCase(),i+(c?ay(u):u)});function ay(i){return ad(be(i).toLowerCase())}function cy(i){return i=be(i),i&&i.replace(ba,LS).replace(Xn,"")}function J3(i,u,c){i=be(i),u=Xt(u);var f=i.length;c=c===e?f:Ki(le(c),0,f);var h=c;return c-=u.length,c>=0&&i.slice(c,h)==u}function X3(i){return i=be(i),i&&$u.test(i)?i.replace(va,US):i}function Z3(i){return i=be(i),i&&Wf.test(i)?i.replace(Uu,"\\$&"):i}var Q3=$o(function(i,u,c){return i+(c?"-":"")+u.toLowerCase()}),e8=$o(function(i,u,c){return i+(c?" ":"")+u.toLowerCase()}),t8=p_("toLowerCase");function r8(i,u,c){i=be(i),u=le(u);var f=u?Bo(i):0;if(!u||f>=u)return i;var h=(u-f)/2;return oc(Va(h),c)+i+oc(za(h),c)}function n8(i,u,c){i=be(i),u=le(u);var f=u?Bo(i):0;return u&&f<u?i+oc(u-f,c):i}function i8(i,u,c){i=be(i),u=le(u);var f=u?Bo(i):0;return u&&f<u?oc(u-f,c)+i:i}function o8(i,u,c){return c||u==null?u=0:u&&(u=+u),px(be(i).replace(ku,""),u||0)}function u8(i,u,c){return(c?Ot(i,u,c):u===e)?u=1:u=le(u),Np(be(i),u)}function s8(){var i=arguments,u=be(i[0]);return i.length<3?u:u.replace(i[1],i[2])}var a8=$o(function(i,u,c){return i+(c?"_":"")+u.toLowerCase()});function c8(i,u,c){return c&&typeof c!="number"&&Ot(i,u,c)&&(u=c=e),c=c===e?ur:c>>>0,c?(i=be(i),i&&(typeof u=="string"||u!=null&&!od(u))&&(u=Xt(u),!u&&To(i))?ui(Pr(i),0,c):i.split(u,c)):[]}var l8=$o(function(i,u,c){return i+(c?" ":"")+ad(u)});function f8(i,u,c){return i=be(i),c=c==null?0:Ki(le(c),0,i.length),u=Xt(u),i.slice(c,c+u.length)==u}function p8(i,u,c){var f=_.templateSettings;c&&Ot(i,u,c)&&(u=e),i=be(i),u=gc({},u,f,y_);var h=gc({},u.imports,f.imports,y_),y=lt(h),C=yp(h,y),b,S,j=0,$=u.interpolate||Li,L="__p += '",H=Ep((u.escape||Li).source+"|"+$.source+"|"+($===Lu?Xf:Li).source+"|"+(u.evaluate||Li).source+"|$","g"),G="//# sourceURL="+(we.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ba+"]")+`
|
|
11
|
+
`;i.replace(H,function(re,De,_e,Qt,Tt,er){return _e||(_e=Qt),L+=i.slice(j,er).replace(Aa,kS),De&&(b=!0,L+=`' +
|
|
12
|
+
__e(`+De+`) +
|
|
13
|
+
'`),Tt&&(S=!0,L+=`';
|
|
14
|
+
`+Tt+`;
|
|
15
|
+
__p += '`),_e&&(L+=`' +
|
|
16
|
+
((__t = (`+_e+`)) == null ? '' : __t) +
|
|
17
|
+
'`),j=er+re.length,re}),L+=`';
|
|
18
|
+
`;var te=we.call(u,"variable")&&u.variable;if(!te)L=`with (obj) {
|
|
19
|
+
`+L+`
|
|
20
|
+
}
|
|
21
|
+
`;else if(Yf.test(te))throw new se(s);L=(S?L.replace(Nf,""):L).replace(jf,"$1").replace(Fa,"$1;"),L="function("+(te||"obj")+`) {
|
|
22
|
+
`+(te?"":`obj || (obj = {});
|
|
23
|
+
`)+"var __t, __p = ''"+(b?", __e = _.escape":"")+(S?`, __j = Array.prototype.join;
|
|
24
|
+
function print() { __p += __j.call(arguments, '') }
|
|
25
|
+
`:`;
|
|
26
|
+
`)+L+`return __p
|
|
27
|
+
}`;var pe=fy(function(){return ve(y,G+"return "+L).apply(e,C)});if(pe.source=L,id(pe))throw pe;return pe}function d8(i){return be(i).toLowerCase()}function D8(i){return be(i).toUpperCase()}function h8(i,u,c){if(i=be(i),i&&(c||u===e))return Fg(i);if(!i||!(u=Xt(u)))return i;var f=Pr(i),h=Pr(u),y=Eg(f,h),C=vg(f,h)+1;return ui(f,y,C).join("")}function m8(i,u,c){if(i=be(i),i&&(c||u===e))return i.slice(0,wg(i)+1);if(!i||!(u=Xt(u)))return i;var f=Pr(i),h=vg(f,Pr(u))+1;return ui(f,0,h).join("")}function g8(i,u,c){if(i=be(i),i&&(c||u===e))return i.replace(ku,"");if(!i||!(u=Xt(u)))return i;var f=Pr(i),h=Eg(f,Pr(u));return ui(f,h).join("")}function _8(i,u){var c=We,f=mt;if(He(u)){var h="separator"in u?u.separator:h;c="length"in u?le(u.length):c,f="omission"in u?Xt(u.omission):f}i=be(i);var y=i.length;if(To(i)){var C=Pr(i);y=C.length}if(c>=y)return i;var b=c-Bo(f);if(b<1)return f;var S=C?ui(C,0,b).join(""):i.slice(0,b);if(h===e)return S+f;if(C&&(b+=S.length-b),od(h)){if(i.slice(b).search(h)){var j,$=S;for(h.global||(h=Ep(h.source,be(wa.exec(h))+"g")),h.lastIndex=0;j=h.exec($);)var L=j.index;S=S.slice(0,L===e?b:L)}}else if(i.indexOf(Xt(h),b)!=b){var H=S.lastIndexOf(h);H>-1&&(S=S.slice(0,H))}return S+f}function y8(i){return i=be(i),i&&$f.test(i)?i.replace(Ea,GS):i}var F8=$o(function(i,u,c){return i+(c?" ":"")+u.toUpperCase()}),ad=p_("toUpperCase");function ly(i,u,c){return i=be(i),u=c?e:u,u===e?WS(i)?XS(i):RS(i):i.match(u)||[]}var fy=de(function(i,u){try{return Yt(i,e,u)}catch(c){return id(c)?c:new se(c)}}),E8=Sn(function(i,u){return cr(u,function(c){c=cn(c),bn(i,c,rd(i[c],i))}),i});function v8(i){var u=i==null?0:i.length,c=ee();return i=u?qe(i,function(f){if(typeof f[1]!="function")throw new lr(o);return[c(f[0]),f[1]]}):[],de(function(f){for(var h=-1;++h<u;){var y=i[h];if(Yt(y[0],this,f))return Yt(y[1],this,f)}})}function C8(i){return Gx(pr(i,m))}function cd(i){return function(){return i}}function w8(i,u){return i==null||i!==i?u:i}var b8=D_(),A8=D_(!0);function $t(i){return i}function ld(i){return Hg(typeof i=="function"?i:pr(i,m))}function S8(i){return Vg(pr(i,m))}function x8(i,u){return Kg(i,pr(u,m))}var P8=de(function(i,u){return function(c){return rs(c,i,u)}}),O8=de(function(i,u){return function(c){return rs(i,c,u)}});function fd(i,u,c){var f=lt(u),h=Za(u,f);c==null&&!(He(u)&&(h.length||!f.length))&&(c=u,u=i,i=this,h=Za(u,lt(u)));var y=!(He(c)&&"chain"in c)||!!c.chain,C=Pn(i);return cr(h,function(b){var S=u[b];i[b]=S,C&&(i.prototype[b]=function(){var j=this.__chain__;if(y||j){var $=i(this.__wrapped__),L=$.__actions__=Mt(this.__actions__);return L.push({func:S,args:arguments,thisArg:i}),$.__chain__=j,$}return S.apply(i,Qn([this.value()],arguments))})}),i}function T8(){return ct._===this&&(ct._=nx),this}function pd(){}function B8(i){return i=le(i),de(function(u){return Gg(u,i)})}var I8=Wp(qe),R8=Wp(hg),M8=Wp(Dp);function py(i){return Jp(i)?hp(cn(i)):fP(i)}function N8(i){return function(u){return i==null?e:Gi(i,u)}}var j8=m_(),$8=m_(!0);function dd(){return[]}function Dd(){return!1}function L8(){return{}}function U8(){return""}function k8(){return!0}function q8(i,u){if(i=le(i),i<1||i>rn)return[];var c=ur,f=yt(i,ur);u=ee(u),i-=ur;for(var h=_p(f,u);++c<i;)u(c);return h}function W8(i){return ae(i)?qe(i,cn):Zt(i)?[i]:Mt(B_(be(i)))}function H8(i){var u=++tx;return be(i)+u}var z8=ic(function(i,u){return i+u},0),V8=Hp("ceil"),K8=ic(function(i,u){return i/u},1),G8=Hp("floor");function Y8(i){return i&&i.length?Xa(i,$t,Pp):e}function J8(i,u){return i&&i.length?Xa(i,ee(u,2),Pp):e}function X8(i){return _g(i,$t)}function Z8(i,u){return _g(i,ee(u,2))}function Q8(i){return i&&i.length?Xa(i,$t,Ip):e}function eB(i,u){return i&&i.length?Xa(i,ee(u,2),Ip):e}var tB=ic(function(i,u){return i*u},1),rB=Hp("round"),nB=ic(function(i,u){return i-u},0);function iB(i){return i&&i.length?gp(i,$t):0}function oB(i,u){return i&&i.length?gp(i,ee(u,2)):0}return _.after=ST,_.ary=W_,_.assign=D3,_.assignIn=ny,_.assignInWith=gc,_.assignWith=h3,_.at=m3,_.before=H_,_.bind=rd,_.bindAll=E8,_.bindKey=z_,_.castArray=LT,_.chain=U_,_.chunk=GP,_.compact=YP,_.concat=JP,_.cond=v8,_.conforms=C8,_.constant=cd,_.countBy=iT,_.create=g3,_.curry=V_,_.curryRight=K_,_.debounce=G_,_.defaults=_3,_.defaultsDeep=y3,_.defer=xT,_.delay=PT,_.difference=XP,_.differenceBy=ZP,_.differenceWith=QP,_.drop=eO,_.dropRight=tO,_.dropRightWhile=rO,_.dropWhile=nO,_.fill=iO,_.filter=uT,_.flatMap=cT,_.flatMapDeep=lT,_.flatMapDepth=fT,_.flatten=N_,_.flattenDeep=oO,_.flattenDepth=uO,_.flip=OT,_.flow=b8,_.flowRight=A8,_.fromPairs=sO,_.functions=A3,_.functionsIn=S3,_.groupBy=pT,_.initial=cO,_.intersection=lO,_.intersectionBy=fO,_.intersectionWith=pO,_.invert=P3,_.invertBy=O3,_.invokeMap=DT,_.iteratee=ld,_.keyBy=hT,_.keys=lt,_.keysIn=jt,_.map=fc,_.mapKeys=B3,_.mapValues=I3,_.matches=S8,_.matchesProperty=x8,_.memoize=dc,_.merge=R3,_.mergeWith=iy,_.method=P8,_.methodOf=O8,_.mixin=fd,_.negate=Dc,_.nthArg=B8,_.omit=M3,_.omitBy=N3,_.once=TT,_.orderBy=mT,_.over=I8,_.overArgs=BT,_.overEvery=R8,_.overSome=M8,_.partial=nd,_.partialRight=Y_,_.partition=gT,_.pick=j3,_.pickBy=oy,_.property=py,_.propertyOf=N8,_.pull=mO,_.pullAll=$_,_.pullAllBy=gO,_.pullAllWith=_O,_.pullAt=yO,_.range=j8,_.rangeRight=$8,_.rearg=IT,_.reject=FT,_.remove=FO,_.rest=RT,_.reverse=ed,_.sampleSize=vT,_.set=L3,_.setWith=U3,_.shuffle=CT,_.slice=EO,_.sortBy=AT,_.sortedUniq=xO,_.sortedUniqBy=PO,_.split=c8,_.spread=MT,_.tail=OO,_.take=TO,_.takeRight=BO,_.takeRightWhile=IO,_.takeWhile=RO,_.tap=YO,_.throttle=NT,_.thru=lc,_.toArray=ey,_.toPairs=uy,_.toPairsIn=sy,_.toPath=W8,_.toPlainObject=ry,_.transform=k3,_.unary=jT,_.union=MO,_.unionBy=NO,_.unionWith=jO,_.uniq=$O,_.uniqBy=LO,_.uniqWith=UO,_.unset=q3,_.unzip=td,_.unzipWith=L_,_.update=W3,_.updateWith=H3,_.values=ko,_.valuesIn=z3,_.without=kO,_.words=ly,_.wrap=$T,_.xor=qO,_.xorBy=WO,_.xorWith=HO,_.zip=zO,_.zipObject=VO,_.zipObjectDeep=KO,_.zipWith=GO,_.entries=uy,_.entriesIn=sy,_.extend=ny,_.extendWith=gc,fd(_,_),_.add=z8,_.attempt=fy,_.camelCase=Y3,_.capitalize=ay,_.ceil=V8,_.clamp=V3,_.clone=UT,_.cloneDeep=qT,_.cloneDeepWith=WT,_.cloneWith=kT,_.conformsTo=HT,_.deburr=cy,_.defaultTo=w8,_.divide=K8,_.endsWith=J3,_.eq=Tr,_.escape=X3,_.escapeRegExp=Z3,_.every=oT,_.find=sT,_.findIndex=R_,_.findKey=F3,_.findLast=aT,_.findLastIndex=M_,_.findLastKey=E3,_.floor=G8,_.forEach=k_,_.forEachRight=q_,_.forIn=v3,_.forInRight=C3,_.forOwn=w3,_.forOwnRight=b3,_.get=ud,_.gt=zT,_.gte=VT,_.has=x3,_.hasIn=sd,_.head=j_,_.identity=$t,_.includes=dT,_.indexOf=aO,_.inRange=K3,_.invoke=T3,_.isArguments=Xi,_.isArray=ae,_.isArrayBuffer=KT,_.isArrayLike=Nt,_.isArrayLikeObject=Xe,_.isBoolean=GT,_.isBuffer=si,_.isDate=YT,_.isElement=JT,_.isEmpty=XT,_.isEqual=ZT,_.isEqualWith=QT,_.isError=id,_.isFinite=e3,_.isFunction=Pn,_.isInteger=J_,_.isLength=hc,_.isMap=X_,_.isMatch=t3,_.isMatchWith=r3,_.isNaN=n3,_.isNative=i3,_.isNil=u3,_.isNull=o3,_.isNumber=Z_,_.isObject=He,_.isObjectLike=Ke,_.isPlainObject=as,_.isRegExp=od,_.isSafeInteger=s3,_.isSet=Q_,_.isString=mc,_.isSymbol=Zt,_.isTypedArray=Uo,_.isUndefined=a3,_.isWeakMap=c3,_.isWeakSet=l3,_.join=dO,_.kebabCase=Q3,_.last=Dr,_.lastIndexOf=DO,_.lowerCase=e8,_.lowerFirst=t8,_.lt=f3,_.lte=p3,_.max=Y8,_.maxBy=J8,_.mean=X8,_.meanBy=Z8,_.min=Q8,_.minBy=eB,_.stubArray=dd,_.stubFalse=Dd,_.stubObject=L8,_.stubString=U8,_.stubTrue=k8,_.multiply=tB,_.nth=hO,_.noConflict=T8,_.noop=pd,_.now=pc,_.pad=r8,_.padEnd=n8,_.padStart=i8,_.parseInt=o8,_.random=G3,_.reduce=_T,_.reduceRight=yT,_.repeat=u8,_.replace=s8,_.result=$3,_.round=rB,_.runInContext=A,_.sample=ET,_.size=wT,_.snakeCase=a8,_.some=bT,_.sortedIndex=vO,_.sortedIndexBy=CO,_.sortedIndexOf=wO,_.sortedLastIndex=bO,_.sortedLastIndexBy=AO,_.sortedLastIndexOf=SO,_.startCase=l8,_.startsWith=f8,_.subtract=nB,_.sum=iB,_.sumBy=oB,_.template=p8,_.times=q8,_.toFinite=On,_.toInteger=le,_.toLength=ty,_.toLower=d8,_.toNumber=hr,_.toSafeInteger=d3,_.toString=be,_.toUpper=D8,_.trim=h8,_.trimEnd=m8,_.trimStart=g8,_.truncate=_8,_.unescape=y8,_.uniqueId=H8,_.upperCase=F8,_.upperFirst=ad,_.each=k_,_.eachRight=q_,_.first=j_,fd(_,(function(){var i={};return sn(_,function(u,c){we.call(_.prototype,c)||(i[c]=u)}),i})(),{chain:!1}),_.VERSION=t,cr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){_[i].placeholder=_}),cr(["drop","take"],function(i,u){me.prototype[i]=function(c){c=c===e?1:it(le(c),0);var f=this.__filtered__&&!u?new me(this):this.clone();return f.__filtered__?f.__takeCount__=yt(c,f.__takeCount__):f.__views__.push({size:yt(c,ur),type:i+(f.__dir__<0?"Right":"")}),f},me.prototype[i+"Right"]=function(c){return this.reverse()[i](c).reverse()}}),cr(["filter","map","takeWhile"],function(i,u){var c=u+1,f=c==Sr||c==ha;me.prototype[i]=function(h){var y=this.clone();return y.__iteratees__.push({iteratee:ee(h,3),type:c}),y.__filtered__=y.__filtered__||f,y}}),cr(["head","last"],function(i,u){var c="take"+(u?"Right":"");me.prototype[i]=function(){return this[c](1).value()[0]}}),cr(["initial","tail"],function(i,u){var c="drop"+(u?"":"Right");me.prototype[i]=function(){return this.__filtered__?new me(this):this[c](1)}}),me.prototype.compact=function(){return this.filter($t)},me.prototype.find=function(i){return this.filter(i).head()},me.prototype.findLast=function(i){return this.reverse().find(i)},me.prototype.invokeMap=de(function(i,u){return typeof i=="function"?new me(this):this.map(function(c){return rs(c,i,u)})}),me.prototype.reject=function(i){return this.filter(Dc(ee(i)))},me.prototype.slice=function(i,u){i=le(i);var c=this;return c.__filtered__&&(i>0||u<0)?new me(c):(i<0?c=c.takeRight(-i):i&&(c=c.drop(i)),u!==e&&(u=le(u),c=u<0?c.dropRight(-u):c.take(u-i)),c)},me.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},me.prototype.toArray=function(){return this.take(ur)},sn(me.prototype,function(i,u){var c=/^(?:filter|find|map|reject)|While$/.test(u),f=/^(?:head|last)$/.test(u),h=_[f?"take"+(u=="last"?"Right":""):u],y=f||/^find/.test(u);h&&(_.prototype[u]=function(){var C=this.__wrapped__,b=f?[1]:arguments,S=C instanceof me,j=b[0],$=S||ae(C),L=function(De){var _e=h.apply(_,Qn([De],b));return f&&H?_e[0]:_e};$&&c&&typeof j=="function"&&j.length!=1&&(S=$=!1);var H=this.__chain__,G=!!this.__actions__.length,te=y&&!H,pe=S&&!G;if(!y&&$){C=pe?C:new me(this);var re=i.apply(C,b);return re.__actions__.push({func:lc,args:[L],thisArg:e}),new fr(re,H)}return te&&pe?i.apply(this,b):(re=this.thru(L),te?f?re.value()[0]:re.value():re)})}),cr(["pop","push","shift","sort","splice","unshift"],function(i){var u=Na[i],c=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",f=/^(?:pop|shift)$/.test(i);_.prototype[i]=function(){var h=arguments;if(f&&!this.__chain__){var y=this.value();return u.apply(ae(y)?y:[],h)}return this[c](function(C){return u.apply(ae(C)?C:[],h)})}}),sn(me.prototype,function(i,u){var c=_[u];if(c){var f=c.name+"";we.call(Mo,f)||(Mo[f]=[]),Mo[f].push({name:u,func:c})}}),Mo[nc(e,O).name]=[{name:"wrapper",func:e}],me.prototype.clone=yx,me.prototype.reverse=Fx,me.prototype.value=Ex,_.prototype.at=JO,_.prototype.chain=XO,_.prototype.commit=ZO,_.prototype.next=QO,_.prototype.plant=tT,_.prototype.reverse=rT,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=nT,_.prototype.first=_.prototype.head,Yu&&(_.prototype[Yu]=eT),_}),ti=ZS();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ct._=ti,define(function(){return ti})):Wi?((Wi.exports=ti)._=ti,lp._=ti):ct._=ti}).call(ru)});var cC=M((aC,$D)=>{d();(function(e){function t(){var n=e();return n.default||n}if(typeof aC=="object"&&typeof $D=="object")$D.exports=t();else if(typeof define=="function"&&define.amd)define(t);else{var r=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};r.doc=t()}})(function(){"use strict";var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,o=(D,R)=>{for(var W in R)e(D,W,{get:R[W],enumerable:!0})},s=(D,R,W,z)=>{if(R&&typeof R=="object"||typeof R=="function")for(let ie of r(R))!n.call(D,ie)&&ie!==W&&e(D,ie,{get:()=>R[ie],enumerable:!(z=t(R,ie))||z.enumerable});return D},a=D=>s(e({},"__esModule",{value:!0}),D),l={};o(l,{builders:()=>sp,printer:()=>Oa,utils:()=>Po});var p=1,m=(D,R)=>(W,z,...ie)=>W|p&&z==null?void 0:(R.call(z)??z[D]).apply(z,ie);function g(D){return this[D<0?this.length+D:D]}var F=m("at",function(){if(Array.isArray(this)||typeof this=="string")return g}),w=F,v=()=>{},x=v,O="string",P="array",B="cursor",U="indent",q="align",Y="trim",Z="group",fe="fill",ye="if-break",We="indent-if-break",mt="line-suffix",tn="line-suffix-boundary",dt="line",Sr="label",or="break-parent",ha=new Set([B,U,q,Y,Z,fe,ye,We,mt,tn,dt,Sr,or]);function yn(D){let R=D.length;for(;R>0&&(D[R-1]==="\r"||D[R-1]===`
|
|
28
|
+
`);)R--;return R<D.length?D.slice(0,R):D}function rn(D){if(typeof D=="string")return O;if(Array.isArray(D))return P;if(!D)return;let{type:R}=D;if(ha.has(R))return R}var Fn=rn,wo=D=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(D);function ur(D){let R=D===null?"null":typeof D;if(R!=="string"&&R!=="object")return`Unexpected doc '${R}',
|
|
29
|
+
Expected it to be 'string' or 'object'.`;if(Fn(D))throw new Error("doc is valid.");let W=Object.prototype.toString.call(D);if(W!=="[object Object]")return`Unexpected doc '${W}'.`;let z=wo([...ha].map(ie=>`'${ie}'`));return`Unexpected doc.type '${D.type}'.
|
|
30
|
+
Expected it to be ${z}.`}var Bf=class extends Error{name="InvalidDocError";constructor(D){super(ur(D)),this.doc=D}},Kn=Bf,ma={};function Gn(D,R,W,z){let ie=[D];for(;ie.length>0;){let K=ie.pop();if(K===ma){W(ie.pop());continue}W&&ie.push(K,ma);let J=Fn(K);if(!J)throw new Kn(K);if(R?.(K)!==!1)switch(J){case P:case fe:{let ge=J===P?K:K.parts;for(let ke=ge.length,Ce=ke-1;Ce>=0;--Ce)ie.push(ge[Ce]);break}case ye:ie.push(K.flatContents,K.breakContents);break;case Z:if(z&&K.expandedStates)for(let ge=K.expandedStates.length,ke=ge-1;ke>=0;--ke)ie.push(K.expandedStates[ke]);else ie.push(K.contents);break;case q:case U:case We:case Sr:case mt:ie.push(K.contents);break;case O:case B:case Y:case tn:case dt:case or:break;default:throw new Kn(K)}}}var Yn=Gn;function bo(D,R){if(typeof D=="string")return R(D);let W=new Map;return z(D);function z(K){if(W.has(K))return W.get(K);let J=ie(K);return W.set(K,J),J}function ie(K){switch(Fn(K)){case P:return R(K.map(z));case fe:return R({...K,parts:K.parts.map(z)});case ye:return R({...K,breakContents:z(K.breakContents),flatContents:z(K.flatContents)});case Z:{let{expandedStates:J,contents:ge}=K;return J?(J=J.map(z),ge=J[0]):ge=z(ge),R({...K,contents:ge,expandedStates:J})}case q:case U:case We:case Sr:case mt:return R({...K,contents:z(K.contents)});case O:case B:case Y:case tn:case dt:case or:return R(K);default:throw new Kn(K)}}}function En(D,R,W){let z=W,ie=!1;function K(J){if(ie)return!1;let ge=R(J);ge!==void 0&&(ie=!0,z=ge)}return Yn(D,K),z}function Bi(D){if(D.type===Z&&D.break||D.type===dt&&D.hard||D.type===or)return!0}function If(D){return En(D,Bi,!1)}function Ii(D){if(D.length>0){let R=w(0,D,-1);!R.expandedStates&&!R.break&&(R.break="propagated")}return null}function Ao(D){let R=new Set,W=[];function z(K){if(K.type===or&&Ii(W),K.type===Z){if(W.push(K),R.has(K))return!1;R.add(K)}}function ie(K){K.type===Z&&W.pop().break&&Ii(W)}Yn(D,z,ie,!0)}function ga(D){return D.type===dt&&!D.hard?D.soft?"":" ":D.type===ye?D.flatContents:D}function zt(D){return bo(D,ga)}function Jn(D){for(D=[...D];D.length>=2&&w(0,D,-2).type===dt&&w(0,D,-1).type===or;)D.length-=2;if(D.length>0){let R=Ri(w(0,D,-1));D[D.length-1]=R}return D}function Ri(D){switch(Fn(D)){case U:case We:case Z:case mt:case Sr:{let R=Ri(D.contents);return{...D,contents:R}}case ye:return{...D,breakContents:Ri(D.breakContents),flatContents:Ri(D.flatContents)};case fe:return{...D,parts:Jn(D.parts)};case P:return Jn(D);case O:return yn(D);case q:case B:case Y:case tn:case dt:case or:break;default:throw new Kn(D)}return D}function xr(D){return Ri(Rf(D))}function _a(D){switch(Fn(D)){case fe:if(D.parts.every(R=>R===""))return"";break;case Z:if(!D.contents&&!D.id&&!D.break&&!D.expandedStates)return"";if(D.contents.type===Z&&D.contents.id===D.id&&D.contents.break===D.break&&D.contents.expandedStates===D.expandedStates)return D.contents;break;case q:case U:case We:case mt:if(!D.contents)return"";break;case ye:if(!D.flatContents&&!D.breakContents)return"";break;case P:{let R=[];for(let W of D){if(!W)continue;let[z,...ie]=Array.isArray(W)?W:[W];typeof z=="string"&&typeof w(0,R,-1)=="string"?R[R.length-1]+=z:R.push(z),R.push(...ie)}return R.length===0?"":R.length===1?R[0]:R}case O:case B:case Y:case tn:case dt:case Sr:case or:break;default:throw new Kn(D)}return D}function Rf(D){return bo(D,R=>_a(R))}function Mi(D,R=Lu){return bo(D,W=>typeof W=="string"?Fa(R,W.split(`
|
|
31
|
+
`)):W)}function Vt(D){if(D.type===dt)return!0}function Ni(D){return En(D,Vt,!1)}var St=x,ya=x,ji=x,Mf=x;function nn(D){return St(D),{type:U,contents:D}}function Kt(D,R){return Mf(D),St(R),{type:q,contents:R,n:D}}function Tu(D){return Kt(Number.NEGATIVE_INFINITY,D)}function Bu(D){return Kt({type:"root"},D)}function Iu(D){return Kt(-1,D)}function Ru(D,R,W){St(D);let z=D;if(R>0){for(let ie=0;ie<Math.floor(R/W);++ie)z=nn(z);z=Kt(R%W,z),z=Kt(Number.NEGATIVE_INFINITY,z)}return z}var $i={type:or},Mu={type:B};function Nu(D){return ji(D),{type:fe,parts:D}}function So(D,R={}){return St(D),ya(R.expandedStates,!0),{type:Z,id:R.id,contents:D,break:!!R.shouldBreak,expandedStates:R.expandedStates}}function ju(D,R){return So(D[0],{...R,expandedStates:D})}function Nf(D,R="",W={}){return St(D),R!==""&&St(R),{type:ye,breakContents:D,flatContents:R,groupId:W.groupId}}function jf(D,R){return St(D),{type:We,contents:D,groupId:R.groupId,negate:R.negate}}function Fa(D,R){St(D),ya(R);let W=[];for(let z=0;z<R.length;z++)z!==0&&W.push(D),W.push(R[z]);return W}function Ea(D,R){return St(R),D?{type:Sr,label:D,contents:R}:R}var va={type:dt},$f={type:dt,soft:!0},$u={type:dt,hard:!0},Lf=[$u,$i],Ca={type:dt,hard:!0,literal:!0},Lu=[Ca,$i];function Uf(D){return St(D),{type:mt,contents:D}}var kf={type:tn},qf={type:Y},Uu=String.prototype.replaceAll??function(D,R){return D.global?this.replace(D,R):this.split(D).join(R)},Wf=m("replaceAll",function(){if(typeof this=="string")return Uu}),ku=Wf,Hf="cr",zf="crlf",Vf="\r",Kf=`\r
|
|
32
|
+
`,Gf=`
|
|
33
|
+
`,Yf=Gf;function Jf(D){return D===Hf?Vf:D===zf?Kf:Yf}var Xf=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function wa(D){return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510}function Zf(D){return D>=4352&&D<=4447||D===8986||D===8987||D===9001||D===9002||D>=9193&&D<=9196||D===9200||D===9203||D===9725||D===9726||D===9748||D===9749||D>=9776&&D<=9783||D>=9800&&D<=9811||D===9855||D>=9866&&D<=9871||D===9875||D===9889||D===9898||D===9899||D===9917||D===9918||D===9924||D===9925||D===9934||D===9940||D===9962||D===9970||D===9971||D===9973||D===9978||D===9981||D===9989||D===9994||D===9995||D===10024||D===10060||D===10062||D>=10067&&D<=10069||D===10071||D>=10133&&D<=10135||D===10160||D===10175||D===11035||D===11036||D===11088||D===11093||D>=11904&&D<=11929||D>=11931&&D<=12019||D>=12032&&D<=12245||D>=12272&&D<=12287||D>=12289&&D<=12350||D>=12353&&D<=12438||D>=12441&&D<=12543||D>=12549&&D<=12591||D>=12593&&D<=12686||D>=12688&&D<=12773||D>=12783&&D<=12830||D>=12832&&D<=12871||D>=12880&&D<=42124||D>=42128&&D<=42182||D>=43360&&D<=43388||D>=44032&&D<=55203||D>=63744&&D<=64255||D>=65040&&D<=65049||D>=65072&&D<=65106||D>=65108&&D<=65126||D>=65128&&D<=65131||D>=94176&&D<=94180||D>=94192&&D<=94198||D>=94208&&D<=101589||D>=101631&&D<=101662||D>=101760&&D<=101874||D>=110576&&D<=110579||D>=110581&&D<=110587||D===110589||D===110590||D>=110592&&D<=110882||D===110898||D>=110928&&D<=110930||D===110933||D>=110948&&D<=110951||D>=110960&&D<=111355||D>=119552&&D<=119638||D>=119648&&D<=119670||D===126980||D===127183||D===127374||D>=127377&&D<=127386||D>=127488&&D<=127490||D>=127504&&D<=127547||D>=127552&&D<=127560||D===127568||D===127569||D>=127584&&D<=127589||D>=127744&&D<=127776||D>=127789&&D<=127797||D>=127799&&D<=127868||D>=127870&&D<=127891||D>=127904&&D<=127946||D>=127951&&D<=127955||D>=127968&&D<=127984||D===127988||D>=127992&&D<=128062||D===128064||D>=128066&&D<=128252||D>=128255&&D<=128317||D>=128331&&D<=128334||D>=128336&&D<=128359||D===128378||D===128405||D===128406||D===128420||D>=128507&&D<=128591||D>=128640&&D<=128709||D===128716||D>=128720&&D<=128722||D>=128725&&D<=128728||D>=128732&&D<=128735||D===128747||D===128748||D>=128756&&D<=128764||D>=128992&&D<=129003||D===129008||D>=129292&&D<=129338||D>=129340&&D<=129349||D>=129351&&D<=129535||D>=129648&&D<=129660||D>=129664&&D<=129674||D>=129678&&D<=129734||D===129736||D>=129741&&D<=129756||D>=129759&&D<=129770||D>=129775&&D<=129784||D>=131072&&D<=196605||D>=196608&&D<=262141}var Qf="\xA9\xAE\u203C\u2049\u2122\u2139\u2194\u2195\u2196\u2197\u2198\u2199\u21A9\u21AA\u2328\u23CF\u23F1\u23F2\u23F8\u23F9\u23FA\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600\u2601\u2602\u2603\u2604\u260E\u2611\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694\u2695\u2696\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F1\u26F7\u26F8\u26F9\u2702\u2708\u2709\u270C\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05\u2B06\u2B07",ep=/[^\x20-\x7F]/u,tp=new Set(Qf);function rp(D){if(!D)return 0;if(!ep.test(D))return D.length;D=D.replace(Xf(),W=>tp.has(W)?" ":" ");let R=0;for(let W of D){let z=W.codePointAt(0);z<=31||z>=127&&z<=159||z>=768&&z<=879||z>=65024&&z<=65039||(R+=wa(z)||Zf(z)?2:1)}return R}var ba=rp,Li=0,Aa=1,Ui=2,Sa=3,np={type:Li},ip={type:Aa},qu={value:"",length:0,queue:[],get root(){return qu}};function Wu(D,R,W){let z=R.type===Aa?D.queue.slice(0,-1):[...D.queue,R],ie="",K=0,J=0,ge=0;for(let Me of z)switch(Me.type){case Li:rt(),W.useTabs?ke(1):Ce(W.tabWidth);break;case Sa:{let{string:xt}=Me;rt(),ie+=xt,K+=xt.length;break}case Ui:{let{width:xt}=Me;J+=1,ge+=xt;break}default:throw new Error(`Unexpected indent comment '${Me.type}'.`)}return on(),{...D,value:ie,length:K,queue:z};function ke(Me){ie+=" ".repeat(Me),K+=W.tabWidth*Me}function Ce(Me){ie+=" ".repeat(Me),K+=Me}function rt(){W.useTabs?Be():on()}function Be(){J>0&&ke(J),st()}function on(){ge>0&&Ce(ge),st()}function st(){J=0,ge=0}}function xa(D,R,W){if(!R)return D;if(R.type==="root")return{...D,root:D};if(R===Number.NEGATIVE_INFINITY)return D.root;let z;return typeof R=="number"?R<0?z=ip:z={type:Ui,width:R}:z={type:Sa,string:R},Wu(D,z,W)}function op(D,R){return Wu(D,np,R)}function up(D){let R=0;for(let W=D.length-1;W>=0;W--){let z=D[W];if(z===" "||z===" ")R++;else break}return R}function Pa(D){let R=up(D);return{text:R===0?D:D.slice(0,D.length-R),count:R}}var gt=Symbol("MODE_BREAK"),Gt=Symbol("MODE_FLAT"),xo=Symbol("DOC_FILL_PRINTED_LENGTH");function ki(D,R,W,z,ie,K){if(W===Number.POSITIVE_INFINITY)return!0;let J=R.length,ge=!1,ke=[D],Ce="";for(;W>=0;){if(ke.length===0){if(J===0)return!0;ke.push(R[--J]);continue}let{mode:rt,doc:Be}=ke.pop(),on=Fn(Be);switch(on){case O:Be&&(ge&&(Ce+=" ",W-=1,ge=!1),Ce+=Be,W-=ba(Be));break;case P:case fe:{let st=on===P?Be:Be.parts,Me=Be[xo]??0;for(let xt=st.length-1;xt>=Me;xt--)ke.push({mode:rt,doc:st[xt]});break}case U:case q:case We:case Sr:ke.push({mode:rt,doc:Be.contents});break;case Y:{let{text:st,count:Me}=Pa(Ce);Ce=st,W+=Me;break}case Z:{if(K&&Be.break)return!1;let st=Be.break?gt:rt,Me=Be.expandedStates&&st===gt?w(0,Be.expandedStates,-1):Be.contents;ke.push({mode:st,doc:Me});break}case ye:{let Me=(Be.groupId?ie[Be.groupId]||Gt:rt)===gt?Be.breakContents:Be.flatContents;Me&&ke.push({mode:rt,doc:Me});break}case dt:if(rt===gt||Be.hard)return!0;Be.soft||(ge=!0);break;case mt:z=!0;break;case tn:if(z)return!1;break}}return!1}function Hu(D,R){let W=Object.create(null),z=R.printWidth,ie=Jf(R.endOfLine),K=0,J=[{indent:qu,mode:gt,doc:D}],ge="",ke=!1,Ce=[],rt=[],Be=[],on=[],st=0;for(Ao(D);J.length>0;){let{indent:Fe,mode:Dt,doc:ne}=J.pop();switch(Fn(ne)){case O:{let at=ie!==`
|
|
34
|
+
`?ku(0,ne,`
|
|
35
|
+
`,ie):ne;at&&(ge+=at,J.length>0&&(K+=ba(at)));break}case P:for(let at=ne.length-1;at>=0;at--)J.push({indent:Fe,mode:Dt,doc:ne[at]});break;case B:if(rt.length>=2)throw new Error("There are too many 'cursor' in doc.");rt.push(st+ge.length);break;case U:J.push({indent:op(Fe,R),mode:Dt,doc:ne.contents});break;case q:J.push({indent:xa(Fe,ne.n,R),mode:Dt,doc:ne.contents});break;case Y:Ta();break;case Z:switch(Dt){case Gt:if(!ke){J.push({indent:Fe,mode:ne.break?gt:Gt,doc:ne.contents});break}case gt:{ke=!1;let at={indent:Fe,mode:Gt,doc:ne.contents},_t=z-K,vn=Ce.length>0;if(!ne.break&&ki(at,J,_t,vn,W))J.push(at);else if(ne.expandedStates){let Xn=w(0,ne.expandedStates,-1);if(ne.break){J.push({indent:Fe,mode:gt,doc:Xn});break}else for(let sr=1;sr<ne.expandedStates.length+1;sr++)if(sr>=ne.expandedStates.length){J.push({indent:Fe,mode:gt,doc:Xn});break}else{let qi=ne.expandedStates[sr],un={indent:Fe,mode:Gt,doc:qi};if(ki(un,J,_t,vn,W)){J.push(un);break}}}else J.push({indent:Fe,mode:gt,doc:ne.contents});break}}ne.id&&(W[ne.id]=w(0,J,-1).mode);break;case fe:{let at=z-K,_t=ne[xo]??0,{parts:vn}=ne,Xn=vn.length-_t;if(Xn===0)break;let sr=vn[_t+0],qi=vn[_t+1],un={indent:Fe,mode:Gt,doc:sr},Vu={indent:Fe,mode:gt,doc:sr},Ku=ki(un,[],at,Ce.length>0,W,!0);if(Xn===1){Ku?J.push(un):J.push(Vu);break}let Ba={indent:Fe,mode:Gt,doc:qi},xe={indent:Fe,mode:gt,doc:qi};if(Xn===2){Ku?J.push(Ba,un):J.push(xe,Vu);break}let Pe=vn[_t+2],ap={indent:Fe,mode:Dt,doc:{...ne,[xo]:_t+2}},cp=ki({indent:Fe,mode:Gt,doc:[sr,qi,Pe]},[],at,Ce.length>0,W,!0);J.push(ap),cp?J.push(Ba,un):Ku?J.push(xe,un):J.push(xe,Vu);break}case ye:case We:{let at=ne.groupId?W[ne.groupId]:Dt;if(at===gt){let _t=ne.type===ye?ne.breakContents:ne.negate?ne.contents:nn(ne.contents);_t&&J.push({indent:Fe,mode:Dt,doc:_t})}if(at===Gt){let _t=ne.type===ye?ne.flatContents:ne.negate?nn(ne.contents):ne.contents;_t&&J.push({indent:Fe,mode:Dt,doc:_t})}break}case mt:Ce.push({indent:Fe,mode:Dt,doc:ne.contents});break;case tn:Ce.length>0&&J.push({indent:Fe,mode:Dt,doc:$u});break;case dt:switch(Dt){case Gt:if(ne.hard)ke=!0;else{ne.soft||(ge+=" ",K+=1);break}case gt:if(Ce.length>0){J.push({indent:Fe,mode:Dt,doc:ne},...Ce.reverse()),Ce.length=0;break}ne.literal?(ge+=ie,K=0,Fe.root&&(Fe.root.value&&(ge+=Fe.root.value),K=Fe.root.length)):(Ta(),ge+=ie+Fe.value,K=Fe.length);break}break;case Sr:J.push({indent:Fe,mode:Dt,doc:ne.contents});break;case or:break;default:throw new Kn(ne)}J.length===0&&Ce.length>0&&(J.push(...Ce.reverse()),Ce.length=0)}let Me=Be.join("")+ge,xt=[...on,...rt];if(xt.length!==2)return{formatted:Me};let zu=xt[0];return{formatted:Me,cursorNodeStart:zu,cursorNodeText:Me.slice(zu,w(0,xt,-1))};function Ta(){let{text:Fe,count:Dt}=Pa(ge);Fe&&(Be.push(Fe),st+=Fe.length),ge="",K-=Dt,rt.length>0&&(on.push(...rt.map(ne=>Math.min(ne,st))),rt.length=0)}}var sp={join:Fa,line:va,softline:$f,hardline:Lf,literalline:Lu,group:So,conditionalGroup:ju,fill:Nu,lineSuffix:Uf,lineSuffixBoundary:kf,cursor:Mu,breakParent:$i,ifBreak:Nf,trim:qf,indent:nn,indentIfBreak:jf,align:Kt,addAlignmentToDoc:Ru,markAsRoot:Bu,dedentToRoot:Tu,dedent:Iu,hardlineWithoutBreakParent:$u,literallineWithoutBreakParent:Ca,label:Ea,concat:D=>D},Oa={printDocToString:Hu},Po={willBreak:If,traverseDoc:Yn,findInDoc:En,mapDoc:bo,removeLines:zt,stripTrailingHardline:xr,replaceEndOfLine:Mi,canBreak:Ni};return a(l)})});var qC=M((Gte,kC)=>{"use strict";d();var WD=Object.defineProperty,CM=Object.getOwnPropertyDescriptor,hC=Object.getOwnPropertyNames,wM=Object.prototype.hasOwnProperty,Ne=(e,t)=>function(){return e&&(t=(0,e[hC(e)[0]])(e=0)),t},mC=(e,t)=>{for(var r in t)WD(e,r,{get:t[r],enumerable:!0})},bM=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of hC(t))!wM.call(e,o)&&o!==r&&WD(e,o,{get:()=>t[o],enumerable:!(n=CM(t,o))||n.enumerable});return e},lC=e=>bM(WD({},"__esModule",{value:!0}),e),fC,gC,AM=Ne({"scripts/build/shims/shared.js"(){fC=1,gC=(e,t)=>(r,n,...o)=>r|fC&&n==null?void 0:(t.call(n)??n[e]).apply(n,o)}}),pC,dC,_C,SM=Ne({"scripts/build/shims/method-replace-all.js"(){AM(),pC=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},dC=gC("replaceAll",function(){if(typeof this=="string")return pC}),_C=dC}});function Is(e){return(t,r,n)=>{let o=!!n?.backwards;if(r===!1)return!1;let{length:s}=t,a=r;for(;a>=0&&a<s;){let l=t.charAt(a);if(e instanceof RegExp){if(!e.test(l))return a}else if(!e.includes(l))return a;o?a--:a++}return a===-1||a===s?a:!1}}var yC,Fi,HD,zD,ao=Ne({"src/utilities/skip.js"(){yC=Is(/\s/u),Fi=Is(" "),HD=Is(",; "),zD=Is(/[^\n\r]/u)}});function xM(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;r<e.length;++r)if(e.charAt(r)==="*"&&e.charAt(r+1)==="/")return r+2}return t}var yl,VD=Ne({"src/utilities/skip-inline-comment.js"(){yl=xM}});function PM(e,t,r){let n=!!r?.backwards;if(t===!1)return!1;let o=e.charAt(t);if(n){if(e.charAt(t-1)==="\r"&&o===`
|
|
36
|
+
`)return t-2;if(kD(o))return t-1}else{if(o==="\r"&&e.charAt(t+1)===`
|
|
37
|
+
`)return t+2;if(kD(o))return t+1}return t}var kD,so,Rs=Ne({"src/utilities/skip-newline.js"(){kD=e=>e===`
|
|
38
|
+
`||e==="\r"||e==="\u2028"||e==="\u2029",so=PM}});function OM(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?zD(e,t):t}var Fl,KD=Ne({"src/utilities/skip-trailing-comment.js"(){ao(),Fl=OM}});function TM(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Fi(e,n),n=yl(e,n),n=Fl(e,n),n=so(e,n);return n}var El,FC=Ne({"src/utilities/get-next-non-space-non-comment-character-index.js"(){ao(),VD(),Rs(),KD(),El=TM}});function BM(e,t,r={}){let n=Fi(e,r.backwards?t-1:t,r),o=so(e,n,r);return n!==o}var GD,EC=Ne({"src/utilities/has-newline.js"(){ao(),Rs(),GD=BM}});function IM(e,t){let r=null,n=t;for(;n!==r;)r=n,n=HD(e,n),n=yl(e,n),n=Fi(e,n);return n=Fl(e,n),n=so(e,n),n!==!1&&GD(e,n)}var vl,RM=Ne({"src/utilities/is-next-line-empty.js"(){EC(),ao(),VD(),Rs(),KD(),vl=IM}});function MM(e,t){let r=t-1;r=Fi(e,r,{backwards:!0}),r=so(e,r,{backwards:!0}),r=Fi(e,r,{backwards:!0});let n=so(e,r,{backwards:!0});return r!==n}var YD,NM=Ne({"src/utilities/is-previous-line-empty.js"(){ao(),Rs(),YD=MM}});function jM(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function JD(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=jM(e)}function $M(e,t){t.leading=!0,t.trailing=!1,JD(e,t)}function LM(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),JD(e,t)}function UM(e,t){t.leading=!1,t.trailing=!0,JD(e,t)}var kM=Ne({"src/main/comments/utilities.js"(){}});function qM(e,t,r=0){let n=0;for(let o=r;o<e.length;++o)e[o]===" "?n=n+t-n%t:n++;return n}var XD,vC=Ne({"src/utilities/get-alignment-size.js"(){XD=qM}});function WM(e,t){let r=e.lastIndexOf(`
|
|
39
|
+
`);return r===-1?0:XD(e.slice(r+1).match(/^[\t ]*/u)[0],t)}var CC,HM=Ne({"src/utilities/get-indent-size.js"(){vC(),CC=WM}});function zM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var VM=Ne({"node_modules/escape-string-regexp/index.js"(){}});function KM(e,t){let r=e.matchAll(new RegExp(`(?:${zM(t)})+`,"gu"));return r.reduce||(r=[...r]),r.reduce((n,[o])=>Math.max(n,o.length),0)/t.length}var wC,GM=Ne({"src/utilities/get-max-continuous-count.js"(){VM(),wC=KM}});function YM(e,t){let r=El(e,t);return r===!1?"":e.charAt(r)}var bC,JM=Ne({"src/utilities/get-next-non-space-non-comment-character.js"(){FC(),bC=YM}});function XM(e,t){let{preferred:r,alternate:n}=t===!0||t===qD?AC:SC,{length:o}=e,s=0,a=0;for(let l=0;l<o;l++){let p=e.charCodeAt(l);p===r.codePoint?s++:p===n.codePoint&&a++}return(s>a?n:r).character}var qD,DC,LD,UD,AC,SC,xC,ZM=Ne({"src/utilities/get-preferred-quote.js"(){qD="'",DC='"',LD=Object.freeze({character:qD,codePoint:39}),UD=Object.freeze({character:DC,codePoint:34}),AC=Object.freeze({preferred:LD,alternate:UD}),SC=Object.freeze({preferred:UD,alternate:LD}),xC=XM}}),PC,QM=Ne({"node_modules/emoji-regex/index.mjs"(){PC=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g}});function eN(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function tN(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var rN=Ne({"node_modules/get-east-asian-width/lookup.js"(){}}),nN=Ne({"node_modules/get-east-asian-width/index.js"(){rN()}}),OC,iN=Ne({"src/utilities/narrow-emojis.evaluate.js"(){OC="\xA9\xAE\u203C\u2049\u2122\u2139\u2194\u2195\u2196\u2197\u2198\u2199\u21A9\u21AA\u2328\u23CF\u23F1\u23F2\u23F8\u23F9\u23FA\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600\u2601\u2602\u2603\u2604\u260E\u2611\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694\u2695\u2696\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F1\u26F7\u26F8\u26F9\u2702\u2708\u2709\u270C\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05\u2B06\u2B07"}});function oN(e){if(!e)return 0;if(!TC.test(e))return e.length;e=e.replace(PC(),r=>BC.has(r)?" ":" ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||n>=65024&&n<=65039||(t+=eN(n)||tN(n)?2:1)}return t}var TC,BC,IC,uN=Ne({"src/utilities/get-string-width.js"(){QM(),nN(),iN(),TC=/[^\x20-\x7F]/u,BC=new Set(OC),IC=oN}});function sN(e,t,r){for(let n=t;n<r;++n)if(e.charAt(n)===`
|
|
40
|
+
`)return!0;return!1}var RC,aN=Ne({"src/utilities/has-newline-in-range.js"(){RC=sN}});function cN(e,t,r={}){return Fi(e,r.backwards?t-1:t,r)!==t}var MC,lN=Ne({"src/utilities/has-spaces.js"(){ao(),MC=cN}}),NC={};mC(NC,{addDanglingComment:()=>LM,addLeadingComment:()=>$M,addTrailingComment:()=>UM,getAlignmentSize:()=>XD,getIndentSize:()=>CC,getMaxContinuousCount:()=>wC,getNextNonSpaceNonCommentCharacter:()=>bC,getNextNonSpaceNonCommentCharacterIndex:()=>pN,getPreferredQuote:()=>xC,getStringWidth:()=>IC,hasNewline:()=>GD,hasNewlineInRange:()=>RC,hasSpaces:()=>MC,isNextLineEmpty:()=>gN,isNextLineEmptyAfterIndex:()=>vl,isPreviousLineEmpty:()=>DN,makeString:()=>mN,skip:()=>Is,skipEverythingButNewLine:()=>zD,skipInlineComment:()=>yl,skipNewline:()=>so,skipSpaces:()=>Fi,skipToLineEnd:()=>HD,skipTrailingComment:()=>Fl,skipWhitespace:()=>yC});function fN(e,t,r){return El(e,r(t))}function pN(e,t){return arguments.length===2||typeof t=="number"?El(e,t):fN(...arguments)}function dN(e,t,r){return YD(e,r(t))}function DN(e,t){return arguments.length===2||typeof t=="number"?YD(e,t):dN(...arguments)}function hN(e,t,r){return vl(e,r(t))}function mN(e,t,r){let n=t==='"'?"'":'"',s=_C(0,e,/\\(.)|(["'])/gsu,(a,l,p)=>l===n?l:p===t?"\\"+p:p||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(l)?l:"\\"+l));return t+s+t}function gN(e,t){return arguments.length===2||typeof t=="number"?vl(e,t):hN(...arguments)}var _N=Ne({"src/utilities/public.js"(){SM(),FC(),RM(),NM(),kM(),vC(),HM(),GM(),JM(),ZM(),uN(),EC(),aN(),lN(),ao(),VD(),Rs(),KD()}}),jC={};mC(jC,{default:()=>$C});var $C,yN=Ne({"src/main/version.evaluate.js"(){$C="3.8.4"}}),LC=import("./prettier-6ZMB2MMO.js"),FN=["formatWithCursor","format","check","resolveConfig","resolveConfigFile","clearConfigCache","getFileInfo","getSupportInfo"],nu=Object.create(null);for(let e of FN)nu[e]=async(...t)=>(await LC)[e](...t);var EN=["parse","formatAST","formatDoc","printToDoc","printDocToString"],UC=Object.create(null);for(let e of EN)UC[e]=async(...t)=>(await LC).__debug[e](...t);nu.__debug=UC;nu.util=(_N(),lC(NC)),nu.doc=cC(),nu.version=(yN(),lC(jC)).default;kC.exports=nu});var WC=M(iu=>{"use strict";d();var vN=iu&&iu.__awaiter||function(e,t,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function l(g){try{m(n.next(g))}catch(F){a(F)}}function p(g){try{m(n.throw(g))}catch(F){a(F)}}function m(g){g.done?s(g.value):o(g.value).then(l,p)}m((n=n.apply(e,t||[])).next())})};Object.defineProperty(iu,"__esModule",{value:!0});iu.format=void 0;var CN=qC();function wN(e,t){return vN(this,void 0,void 0,function*(){return t.format?(0,CN.format)(e,Object.assign({parser:"typescript"},t.style)):e})}iu.format=wN});var Cl=M(kt=>{"use strict";d();Object.defineProperty(kt,"__esModule",{value:!0});kt.T_UNKNOWN_ADDITIONAL_PROPERTIES=kt.T_UNKNOWN=kt.T_ANY_ADDITIONAL_PROPERTIES=kt.T_ANY=kt.hasStandaloneName=kt.hasComment=void 0;function bN(e){return"comment"in e&&e.comment!=null&&e.comment!==""||"deprecated"in e&&e.deprecated===!0}kt.hasComment=bN;function AN(e){return"standaloneName"in e&&e.standaloneName!=null&&e.standaloneName!==""}kt.hasStandaloneName=AN;kt.T_ANY={type:"ANY"};kt.T_ANY_ADDITIONAL_PROPERTIES={keyName:"[k: string]",type:"ANY"};kt.T_UNKNOWN={type:"UNKNOWN"};kt.T_UNKNOWN_ADDITIONAL_PROPERTIES={keyName:"[k: string]",type:"UNKNOWN"}});var co=M(pt=>{"use strict";d();Object.defineProperty(pt,"__esModule",{value:!0});pt.isCompound=pt.isPrimitive=pt.isBoolean=pt.getRootSchema=pt.Intersection=pt.Types=pt.Parent=void 0;var HC=Nn();pt.Parent=Symbol("Parent");pt.Types=Symbol("Types");pt.Intersection=Symbol("Intersection");pt.getRootSchema=(0,HC.memoize)(e=>{let t=e[pt.Parent];return t?(0,pt.getRootSchema)(t):e});function SN(e){return e===!0||e===!1}pt.isBoolean=SN;function xN(e){return!(0,HC.isPlainObject)(e)}pt.isPrimitive=xN;function PN(e){return Array.isArray(e.type)||"anyOf"in e||"oneOf"in e}pt.isCompound=PN});var ou=M((rre,lo)=>{"use strict";d();function zC(e){return typeof e>"u"||e===null}function ON(e){return typeof e=="object"&&e!==null}function TN(e){return Array.isArray(e)?e:zC(e)?[]:[e]}function BN(e,t){var r,n,o,s;if(t)for(s=Object.keys(t),r=0,n=s.length;r<n;r+=1)o=s[r],e[o]=t[o];return e}function IN(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}function RN(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}lo.exports.isNothing=zC;lo.exports.isObject=ON;lo.exports.toArray=TN;lo.exports.repeat=IN;lo.exports.isNegativeZero=RN;lo.exports.extend=BN});var uu=M((ire,KC)=>{"use strict";d();function VC(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
41
|
+
|
|
42
|
+
`+e.mark.snippet),n+" "+r):n}function Ms(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=VC(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Ms.prototype=Object.create(Error.prototype);Ms.prototype.constructor=Ms;Ms.prototype.toString=function(t){return this.name+": "+VC(this,t)};KC.exports=Ms});var YC=M((ure,GC)=>{"use strict";d();var Ns=ou();function ZD(e,t,r,n,o){var s="",a="",l=Math.floor(o/2)-1;return n-t>l&&(s=" ... ",t=n-l+s.length),r-n>l&&(a=" ...",r=n+l-a.length),{str:s+e.slice(t,r).replace(/\t/g,"\u2192")+a,pos:n-t+s.length}}function QD(e,t){return Ns.repeat(" ",t-e.length)+e}function MN(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],o=[],s,a=-1;s=r.exec(e.buffer);)o.push(s.index),n.push(s.index+s[0].length),e.position<=s.index&&a<0&&(a=n.length-2);a<0&&(a=n.length-1);var l="",p,m,g=Math.min(e.line+t.linesAfter,o.length).toString().length,F=t.maxLength-(t.indent+g+3);for(p=1;p<=t.linesBefore&&!(a-p<0);p++)m=ZD(e.buffer,n[a-p],o[a-p],e.position-(n[a]-n[a-p]),F),l=Ns.repeat(" ",t.indent)+QD((e.line-p+1).toString(),g)+" | "+m.str+`
|
|
43
|
+
`+l;for(m=ZD(e.buffer,n[a],o[a],e.position,F),l+=Ns.repeat(" ",t.indent)+QD((e.line+1).toString(),g)+" | "+m.str+`
|
|
44
|
+
`,l+=Ns.repeat("-",t.indent+g+3+m.pos)+`^
|
|
45
|
+
`,p=1;p<=t.linesAfter&&!(a+p>=o.length);p++)m=ZD(e.buffer,n[a+p],o[a+p],e.position-(n[a]-n[a+p]),F),l+=Ns.repeat(" ",t.indent)+QD((e.line+p+1).toString(),g)+" | "+m.str+`
|
|
46
|
+
`;return l.replace(/\n$/,"")}GC.exports=MN});var bt=M((are,XC)=>{"use strict";d();var JC=uu(),NN=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],jN=["scalar","sequence","mapping"];function $N(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}function LN(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(NN.indexOf(r)===-1)throw new JC('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=$N(t.styleAliases||null),jN.indexOf(this.kind)===-1)throw new JC('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}XC.exports=LN});var rh=M((lre,QC)=>{"use strict";d();var js=uu(),eh=bt();function ZC(e,t){var r=[];return e[t].forEach(function(n){var o=r.length;r.forEach(function(s,a){s.tag===n.tag&&s.kind===n.kind&&s.multi===n.multi&&(o=a)}),r[o]=n}),r}function UN(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function n(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(n);return e}function th(e){return this.extend(e)}th.prototype.extend=function(t){var r=[],n=[];if(t instanceof eh)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new js("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof eh))throw new js("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new js("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new js("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(s){if(!(s instanceof eh))throw new js("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(th.prototype);return o.implicit=(this.implicit||[]).concat(r),o.explicit=(this.explicit||[]).concat(n),o.compiledImplicit=ZC(o,"implicit"),o.compiledExplicit=ZC(o,"explicit"),o.compiledTypeMap=UN(o.compiledImplicit,o.compiledExplicit),o};QC.exports=th});var nh=M((pre,ew)=>{"use strict";d();var kN=bt();ew.exports=new kN("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var ih=M((Dre,tw)=>{"use strict";d();var qN=bt();tw.exports=new qN("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var oh=M((mre,rw)=>{"use strict";d();var WN=bt();rw.exports=new WN("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var uh=M((_re,nw)=>{"use strict";d();var HN=rh();nw.exports=new HN({explicit:[nh(),ih(),oh()]})});var sh=M((Fre,iw)=>{"use strict";d();var zN=bt();function VN(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function KN(){return null}function GN(e){return e===null}iw.exports=new zN("tag:yaml.org,2002:null",{kind:"scalar",resolve:VN,construct:KN,predicate:GN,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})});var ah=M((vre,ow)=>{"use strict";d();var YN=bt();function JN(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function XN(e){return e==="true"||e==="True"||e==="TRUE"}function ZN(e){return Object.prototype.toString.call(e)==="[object Boolean]"}ow.exports=new YN("tag:yaml.org,2002:bool",{kind:"scalar",resolve:JN,construct:XN,predicate:ZN,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var ch=M((wre,uw)=>{"use strict";d();var QN=ou(),ej=bt();function tj(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function rj(e){return 48<=e&&e<=55}function nj(e){return 48<=e&&e<=57}function ij(e){if(e===null)return!1;var t=e.length,r=0,n=!1,o;if(!t)return!1;if(o=e[r],(o==="-"||o==="+")&&(o=e[++r]),o==="0"){if(r+1===t)return!0;if(o=e[++r],o==="b"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;n=!0}return n&&o!=="_"}if(o==="x"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!tj(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}if(o==="o"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!rj(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}}if(o==="_")return!1;for(;r<t;r++)if(o=e[r],o!=="_"){if(!nj(e.charCodeAt(r)))return!1;n=!0}return!(!n||o==="_")}function oj(e){var t=e,r=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function uj(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!QN.isNegativeZero(e)}uw.exports=new ej("tag:yaml.org,2002:int",{kind:"scalar",resolve:ij,construct:oj,predicate:uj,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var lh=M((Are,aw)=>{"use strict";d();var sw=ou(),sj=bt(),aj=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function cj(e){return!(e===null||!aj.test(e)||e[e.length-1]==="_")}function lj(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}var fj=/^[-+]?[0-9]+e/;function pj(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(sw.isNegativeZero(e))return"-0.0";return r=e.toString(10),fj.test(r)?r.replace("e",".e"):r}function dj(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||sw.isNegativeZero(e))}aw.exports=new sj("tag:yaml.org,2002:float",{kind:"scalar",resolve:cj,construct:lj,predicate:dj,represent:pj,defaultStyle:"lowercase"})});var fh=M((xre,cw)=>{"use strict";d();cw.exports=uh().extend({implicit:[sh(),ah(),ch(),lh()]})});var ph=M((Ore,lw)=>{"use strict";d();lw.exports=fh()});var dh=M((Bre,dw)=>{"use strict";d();var Dj=bt(),fw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),pw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function hj(e){return e===null?!1:fw.exec(e)!==null||pw.exec(e)!==null}function mj(e){var t,r,n,o,s,a,l,p=0,m=null,g,F,w;if(t=fw.exec(e),t===null&&(t=pw.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(r,n,o));if(s=+t[4],a=+t[5],l=+t[6],t[7]){for(p=t[7].slice(0,3);p.length<3;)p+="0";p=+p}return t[9]&&(g=+t[10],F=+(t[11]||0),m=(g*60+F)*6e4,t[9]==="-"&&(m=-m)),w=new Date(Date.UTC(r,n,o,s,a,l,p)),m&&w.setTime(w.getTime()-m),w}function gj(e){return e.toISOString()}dw.exports=new Dj("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:hj,construct:mj,instanceOf:Date,represent:gj})});var Dh=M((Rre,Dw)=>{"use strict";d();var _j=bt();function yj(e){return e==="<<"||e===null}Dw.exports=new _j("tag:yaml.org,2002:merge",{kind:"scalar",resolve:yj})});var mh=M((Nre,hw)=>{"use strict";d();var Fj=bt(),hh=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
47
|
+
\r`;function Ej(e){if(e===null)return!1;var t,r,n=0,o=e.length,s=hh;for(r=0;r<o;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}function vj(e){var t,r,n=e.replace(/[\r\n=]/g,""),o=n.length,s=hh,a=0,l=[];for(t=0;t<o;t++)t%4===0&&t&&(l.push(a>>16&255),l.push(a>>8&255),l.push(a&255)),a=a<<6|s.indexOf(n.charAt(t));return r=o%4*6,r===0?(l.push(a>>16&255),l.push(a>>8&255),l.push(a&255)):r===18?(l.push(a>>10&255),l.push(a>>2&255)):r===12&&l.push(a>>4&255),new Uint8Array(l)}function Cj(e){var t="",r=0,n,o,s=e.length,a=hh;for(n=0;n<s;n++)n%3===0&&n&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[n];return o=s%3,o===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):o===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):o===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}function wj(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}hw.exports=new Fj("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ej,construct:vj,predicate:wj,represent:Cj})});var gh=M(($re,mw)=>{"use strict";d();var bj=bt(),Aj=Object.prototype.hasOwnProperty,Sj=Object.prototype.toString;function xj(e){if(e===null)return!0;var t=[],r,n,o,s,a,l=e;for(r=0,n=l.length;r<n;r+=1){if(o=l[r],a=!1,Sj.call(o)!=="[object Object]")return!1;for(s in o)if(Aj.call(o,s))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function Pj(e){return e!==null?e:[]}mw.exports=new bj("tag:yaml.org,2002:omap",{kind:"sequence",resolve:xj,construct:Pj})});var _h=M((Ure,gw)=>{"use strict";d();var Oj=bt(),Tj=Object.prototype.toString;function Bj(e){if(e===null)return!0;var t,r,n,o,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(n=a[t],Tj.call(n)!=="[object Object]"||(o=Object.keys(n),o.length!==1))return!1;s[t]=[o[0],n[o[0]]]}return!0}function Ij(e){if(e===null)return[];var t,r,n,o,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1)n=a[t],o=Object.keys(n),s[t]=[o[0],n[o[0]]];return s}gw.exports=new Oj("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Bj,construct:Ij})});var yh=M((qre,_w)=>{"use strict";d();var Rj=bt(),Mj=Object.prototype.hasOwnProperty;function Nj(e){if(e===null)return!0;var t,r=e;for(t in r)if(Mj.call(r,t)&&r[t]!==null)return!1;return!0}function jj(e){return e!==null?e:{}}_w.exports=new Rj("tag:yaml.org,2002:set",{kind:"mapping",resolve:Nj,construct:jj})});var wl=M((Hre,yw)=>{"use strict";d();yw.exports=ph().extend({implicit:[dh(),Dh()],explicit:[mh(),gh(),_h(),yh()]})});var Nw=M((Vre,Ch)=>{"use strict";d();var po=ou(),Aw=uu(),$j=YC(),Lj=wl(),vi=Object.prototype.hasOwnProperty,bl=1,Sw=2,xw=3,Al=4,Fh=1,Uj=2,Fw=3,kj=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,qj=/[\x85\u2028\u2029]/,Wj=/[,\[\]\{\}]/,Pw=/^(?:!|!!|![a-z\-]+!)$/i,Ow=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ew(e){return Object.prototype.toString.call(e)}function hn(e){return e===10||e===13}function Do(e){return e===9||e===32}function qt(e){return e===9||e===32||e===10||e===13}function su(e){return e===44||e===91||e===93||e===123||e===125}function Hj(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function zj(e){return e===120?2:e===117?4:e===85?8:0}function Vj(e){return 48<=e&&e<=57?e-48:-1}function vw(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
48
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function Kj(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Tw(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}var Bw=new Array(256),Iw=new Array(256);for(fo=0;fo<256;fo++)Bw[fo]=vw(fo)?1:0,Iw[fo]=vw(fo);var fo;function Gj(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Lj,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Rw(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=$j(r),new Aw(t,r)}function X(e,t){throw Rw(e,t)}function Sl(e,t){e.onWarning&&e.onWarning.call(null,Rw(e,t))}var Cw={YAML:function(t,r,n){var o,s,a;t.version!==null&&X(t,"duplication of %YAML directive"),n.length!==1&&X(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),o===null&&X(t,"ill-formed argument of the YAML directive"),s=parseInt(o[1],10),a=parseInt(o[2],10),s!==1&&X(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&Sl(t,"unsupported YAML version of the document")},TAG:function(t,r,n){var o,s;n.length!==2&&X(t,"TAG directive accepts exactly two arguments"),o=n[0],s=n[1],Pw.test(o)||X(t,"ill-formed tag handle (first argument) of the TAG directive"),vi.call(t.tagMap,o)&&X(t,'there is a previously declared suffix for "'+o+'" tag handle'),Ow.test(s)||X(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{X(t,"tag prefix is malformed: "+s)}t.tagMap[o]=s}};function Ei(e,t,r,n){var o,s,a,l;if(t<r){if(l=e.input.slice(t,r),n)for(o=0,s=l.length;o<s;o+=1)a=l.charCodeAt(o),a===9||32<=a&&a<=1114111||X(e,"expected valid JSON character");else kj.test(l)&&X(e,"the stream contains non-printable characters");e.result+=l}}function ww(e,t,r,n){var o,s,a,l;for(po.isObject(r)||X(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),a=0,l=o.length;a<l;a+=1)s=o[a],vi.call(t,s)||(Tw(t,s,r[s]),n[s]=!0)}function au(e,t,r,n,o,s,a,l,p){var m,g;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),m=0,g=o.length;m<g;m+=1)Array.isArray(o[m])&&X(e,"nested arrays are not supported inside keys"),typeof o=="object"&&Ew(o[m])==="[object Object]"&&(o[m]="[object Object]");if(typeof o=="object"&&Ew(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(m=0,g=s.length;m<g;m+=1)ww(e,t,s[m],r);else ww(e,t,s,r);else!e.json&&!vi.call(r,o)&&vi.call(t,o)&&(e.line=a||e.line,e.lineStart=l||e.lineStart,e.position=p||e.position,X(e,"duplicated mapping key")),Tw(t,o,s),delete r[o];return t}function Eh(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):X(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function et(e,t,r){for(var n=0,o=e.input.charCodeAt(e.position);o!==0;){for(;Do(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(hn(o))for(Eh(e),o=e.input.charCodeAt(e.position),n++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return r!==-1&&n!==0&&e.lineIndent<r&&Sl(e,"deficient indentation"),n}function xl(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||qt(r)))}function vh(e,t){t===1?e.result+=" ":t>1&&(e.result+=po.repeat(`
|
|
49
|
+
`,t-1))}function Yj(e,t,r){var n,o,s,a,l,p,m,g,F=e.kind,w=e.result,v;if(v=e.input.charCodeAt(e.position),qt(v)||su(v)||v===35||v===38||v===42||v===33||v===124||v===62||v===39||v===34||v===37||v===64||v===96||(v===63||v===45)&&(o=e.input.charCodeAt(e.position+1),qt(o)||r&&su(o)))return!1;for(e.kind="scalar",e.result="",s=a=e.position,l=!1;v!==0;){if(v===58){if(o=e.input.charCodeAt(e.position+1),qt(o)||r&&su(o))break}else if(v===35){if(n=e.input.charCodeAt(e.position-1),qt(n))break}else{if(e.position===e.lineStart&&xl(e)||r&&su(v))break;if(hn(v))if(p=e.line,m=e.lineStart,g=e.lineIndent,et(e,!1,-1),e.lineIndent>=t){l=!0,v=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=p,e.lineStart=m,e.lineIndent=g;break}}l&&(Ei(e,s,a,!1),vh(e,e.line-p),s=a=e.position,l=!1),Do(v)||(a=e.position+1),v=e.input.charCodeAt(++e.position)}return Ei(e,s,a,!1),e.result?!0:(e.kind=F,e.result=w,!1)}function Jj(e,t){var r,n,o;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Ei(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,o=e.position;else return!0;else hn(r)?(Ei(e,n,o,!0),vh(e,et(e,!1,t)),n=o=e.position):e.position===e.lineStart&&xl(e)?X(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);X(e,"unexpected end of the stream within a single quoted scalar")}function Xj(e,t){var r,n,o,s,a,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return Ei(e,r,e.position,!0),e.position++,!0;if(l===92){if(Ei(e,r,e.position,!0),l=e.input.charCodeAt(++e.position),hn(l))et(e,!1,t);else if(l<256&&Bw[l])e.result+=Iw[l],e.position++;else if((a=zj(l))>0){for(o=a,s=0;o>0;o--)l=e.input.charCodeAt(++e.position),(a=Hj(l))>=0?s=(s<<4)+a:X(e,"expected hexadecimal character");e.result+=Kj(s),e.position++}else X(e,"unknown escape sequence");r=n=e.position}else hn(l)?(Ei(e,r,n,!0),vh(e,et(e,!1,t)),r=n=e.position):e.position===e.lineStart&&xl(e)?X(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}X(e,"unexpected end of the stream within a double quoted scalar")}function Zj(e,t){var r=!0,n,o,s,a=e.tag,l,p=e.anchor,m,g,F,w,v,x=Object.create(null),O,P,B,U;if(U=e.input.charCodeAt(e.position),U===91)g=93,v=!1,l=[];else if(U===123)g=125,v=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),U=e.input.charCodeAt(++e.position);U!==0;){if(et(e,!0,t),U=e.input.charCodeAt(e.position),U===g)return e.position++,e.tag=a,e.anchor=p,e.kind=v?"mapping":"sequence",e.result=l,!0;r?U===44&&X(e,"expected the node content, but found ','"):X(e,"missed comma between flow collection entries"),P=O=B=null,F=w=!1,U===63&&(m=e.input.charCodeAt(e.position+1),qt(m)&&(F=w=!0,e.position++,et(e,!0,t))),n=e.line,o=e.lineStart,s=e.position,cu(e,t,bl,!1,!0),P=e.tag,O=e.result,et(e,!0,t),U=e.input.charCodeAt(e.position),(w||e.line===n)&&U===58&&(F=!0,U=e.input.charCodeAt(++e.position),et(e,!0,t),cu(e,t,bl,!1,!0),B=e.result),v?au(e,l,x,P,O,B,n,o,s):F?l.push(au(e,null,x,P,O,B,n,o,s)):l.push(O),et(e,!0,t),U=e.input.charCodeAt(e.position),U===44?(r=!0,U=e.input.charCodeAt(++e.position)):r=!1}X(e,"unexpected end of the stream within a flow collection")}function Qj(e,t){var r,n,o=Fh,s=!1,a=!1,l=t,p=0,m=!1,g,F;if(F=e.input.charCodeAt(e.position),F===124)n=!1;else if(F===62)n=!0;else return!1;for(e.kind="scalar",e.result="";F!==0;)if(F=e.input.charCodeAt(++e.position),F===43||F===45)Fh===o?o=F===43?Fw:Uj:X(e,"repeat of a chomping mode identifier");else if((g=Vj(F))>=0)g===0?X(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?X(e,"repeat of an indentation width identifier"):(l=t+g-1,a=!0);else break;if(Do(F)){do F=e.input.charCodeAt(++e.position);while(Do(F));if(F===35)do F=e.input.charCodeAt(++e.position);while(!hn(F)&&F!==0)}for(;F!==0;){for(Eh(e),e.lineIndent=0,F=e.input.charCodeAt(e.position);(!a||e.lineIndent<l)&&F===32;)e.lineIndent++,F=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>l&&(l=e.lineIndent),hn(F)){p++;continue}if(e.lineIndent<l){o===Fw?e.result+=po.repeat(`
|
|
50
|
+
`,s?1+p:p):o===Fh&&s&&(e.result+=`
|
|
51
|
+
`);break}for(n?Do(F)?(m=!0,e.result+=po.repeat(`
|
|
52
|
+
`,s?1+p:p)):m?(m=!1,e.result+=po.repeat(`
|
|
53
|
+
`,p+1)):p===0?s&&(e.result+=" "):e.result+=po.repeat(`
|
|
54
|
+
`,p):e.result+=po.repeat(`
|
|
55
|
+
`,s?1+p:p),s=!0,a=!0,p=0,r=e.position;!hn(F)&&F!==0;)F=e.input.charCodeAt(++e.position);Ei(e,r,e.position,!1)}return!0}function bw(e,t){var r,n=e.tag,o=e.anchor,s=[],a,l=!1,p;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),p=e.input.charCodeAt(e.position);p!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,X(e,"tab characters must not be used in indentation")),!(p!==45||(a=e.input.charCodeAt(e.position+1),!qt(a))));){if(l=!0,e.position++,et(e,!0,-1)&&e.lineIndent<=t){s.push(null),p=e.input.charCodeAt(e.position);continue}if(r=e.line,cu(e,t,xw,!1,!0),s.push(e.result),et(e,!0,-1),p=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&p!==0)X(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return l?(e.tag=n,e.anchor=o,e.kind="sequence",e.result=s,!0):!1}function e$(e,t,r){var n,o,s,a,l,p,m=e.tag,g=e.anchor,F={},w=Object.create(null),v=null,x=null,O=null,P=!1,B=!1,U;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=F),U=e.input.charCodeAt(e.position);U!==0;){if(!P&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,X(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),s=e.line,(U===63||U===58)&&qt(n))U===63?(P&&(au(e,F,w,v,x,null,a,l,p),v=x=O=null),B=!0,P=!0,o=!0):P?(P=!1,o=!0):X(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,U=n;else{if(a=e.line,l=e.lineStart,p=e.position,!cu(e,r,Sw,!1,!0))break;if(e.line===s){for(U=e.input.charCodeAt(e.position);Do(U);)U=e.input.charCodeAt(++e.position);if(U===58)U=e.input.charCodeAt(++e.position),qt(U)||X(e,"a whitespace character is expected after the key-value separator within a block mapping"),P&&(au(e,F,w,v,x,null,a,l,p),v=x=O=null),B=!0,P=!1,o=!1,v=e.tag,x=e.result;else if(B)X(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=m,e.anchor=g,!0}else if(B)X(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=m,e.anchor=g,!0}if((e.line===s||e.lineIndent>t)&&(P&&(a=e.line,l=e.lineStart,p=e.position),cu(e,t,Al,!0,o)&&(P?x=e.result:O=e.result),P||(au(e,F,w,v,x,O,a,l,p),v=x=O=null),et(e,!0,-1),U=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&U!==0)X(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return P&&au(e,F,w,v,x,null,a,l,p),B&&(e.tag=m,e.anchor=g,e.kind="mapping",e.result=F),B}function t$(e){var t,r=!1,n=!1,o,s,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&X(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(n=!0,o="!!",a=e.input.charCodeAt(++e.position)):o="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(s=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):X(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!qt(a);)a===33&&(n?X(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),Pw.test(o)||X(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),Wj.test(s)&&X(e,"tag suffix cannot contain flow indicator characters")}s&&!Ow.test(s)&&X(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{X(e,"tag name is malformed: "+s)}return r?e.tag=s:vi.call(e.tagMap,o)?e.tag=e.tagMap[o]+s:o==="!"?e.tag="!"+s:o==="!!"?e.tag="tag:yaml.org,2002:"+s:X(e,'undeclared tag handle "'+o+'"'),!0}function r$(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&X(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!qt(r)&&!su(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&X(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function n$(e){var t,r,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!qt(n)&&!su(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&X(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),vi.call(e.anchorMap,r)||X(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],et(e,!0,-1),!0}function cu(e,t,r,n,o){var s,a,l,p=1,m=!1,g=!1,F,w,v,x,O,P;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=a=l=Al===r||xw===r,n&&et(e,!0,-1)&&(m=!0,e.lineIndent>t?p=1:e.lineIndent===t?p=0:e.lineIndent<t&&(p=-1)),p===1)for(;t$(e)||r$(e);)et(e,!0,-1)?(m=!0,l=s,e.lineIndent>t?p=1:e.lineIndent===t?p=0:e.lineIndent<t&&(p=-1)):l=!1;if(l&&(l=m||o),(p===1||Al===r)&&(bl===r||Sw===r?O=t:O=t+1,P=e.position-e.lineStart,p===1?l&&(bw(e,P)||e$(e,P,O))||Zj(e,O)?g=!0:(a&&Qj(e,O)||Jj(e,O)||Xj(e,O)?g=!0:n$(e)?(g=!0,(e.tag!==null||e.anchor!==null)&&X(e,"alias node should not have any properties")):Yj(e,O,bl===r)&&(g=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):p===0&&(g=l&&bw(e,P))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&X(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),F=0,w=e.implicitTypes.length;F<w;F+=1)if(x=e.implicitTypes[F],x.resolve(e.result)){e.result=x.construct(e.result),e.tag=x.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(vi.call(e.typeMap[e.kind||"fallback"],e.tag))x=e.typeMap[e.kind||"fallback"][e.tag];else for(x=null,v=e.typeMap.multi[e.kind||"fallback"],F=0,w=v.length;F<w;F+=1)if(e.tag.slice(0,v[F].tag.length)===v[F].tag){x=v[F];break}x||X(e,"unknown tag !<"+e.tag+">"),e.result!==null&&x.kind!==e.kind&&X(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+x.kind+'", not "'+e.kind+'"'),x.resolve(e.result,e.tag)?(e.result=x.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):X(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||g}function i$(e){var t=e.position,r,n,o,s=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(et(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(s=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!qt(a);)a=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),o=[],n.length<1&&X(e,"directive name must not be less than one character in length");a!==0;){for(;Do(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!hn(a));break}if(hn(a))break;for(r=e.position;a!==0&&!qt(a);)a=e.input.charCodeAt(++e.position);o.push(e.input.slice(r,e.position))}a!==0&&Eh(e),vi.call(Cw,n)?Cw[n](e,n,o):Sl(e,'unknown document directive "'+n+'"')}if(et(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,et(e,!0,-1)):s&&X(e,"directives end mark is expected"),cu(e,e.lineIndent-1,Al,!1,!0),et(e,!0,-1),e.checkLineBreaks&&qj.test(e.input.slice(t,e.position))&&Sl(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&xl(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,et(e,!0,-1));return}if(e.position<e.length-1)X(e,"end of the stream or a document separator is expected");else return}function Mw(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
56
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Gj(e,t),n=e.indexOf("\0");for(n!==-1&&(r.position=n,X(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)i$(r);return r.documents}function o$(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var n=Mw(e,r);if(typeof t!="function")return n;for(var o=0,s=n.length;o<s;o+=1)t(n[o])}function u$(e,t){var r=Mw(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Aw("expected a single document in the stream, but found more")}}Ch.exports.loadAll=o$;Ch.exports.load=u$});var nb=M((Gre,rb)=>{"use strict";d();var Tl=ou(),qs=uu(),s$=wl(),zw=Object.prototype.toString,Vw=Object.prototype.hasOwnProperty,xh=65279,a$=9,Ls=10,c$=13,l$=32,f$=33,p$=34,wh=35,d$=37,D$=38,h$=39,m$=42,Kw=44,g$=45,Pl=58,_$=61,y$=62,F$=63,E$=64,Gw=91,Yw=93,v$=96,Jw=123,C$=124,Xw=125,At={};At[0]="\\0";At[7]="\\a";At[8]="\\b";At[9]="\\t";At[10]="\\n";At[11]="\\v";At[12]="\\f";At[13]="\\r";At[27]="\\e";At[34]='\\"';At[92]="\\\\";At[133]="\\N";At[160]="\\_";At[8232]="\\L";At[8233]="\\P";var w$=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],b$=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function A$(e,t){var r,n,o,s,a,l,p;if(t===null)return{};for(r={},n=Object.keys(t),o=0,s=n.length;o<s;o+=1)a=n[o],l=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),p=e.compiledTypeMap.fallback[a],p&&Vw.call(p.styleAliases,l)&&(l=p.styleAliases[l]),r[a]=l;return r}function S$(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else if(e<=4294967295)r="U",n=8;else throw new qs("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Tl.repeat("0",n-t.length)+t}var x$=1,Us=2;function P$(e){this.schema=e.schema||s$,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Tl.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=A$(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Us:x$,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function jw(e,t){for(var r=Tl.repeat(" ",t),n=0,o=-1,s="",a,l=e.length;n<l;)o=e.indexOf(`
|
|
57
|
+
`,n),o===-1?(a=e.slice(n),n=l):(a=e.slice(n,o+1),n=o+1),a.length&&a!==`
|
|
58
|
+
`&&(s+=r),s+=a;return s}function bh(e,t){return`
|
|
59
|
+
`+Tl.repeat(" ",e.indent*t)}function O$(e,t){var r,n,o;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(o=e.implicitTypes[r],o.resolve(t))return!0;return!1}function Ol(e){return e===l$||e===a$}function ks(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==xh||65536<=e&&e<=1114111}function $w(e){return ks(e)&&e!==xh&&e!==c$&&e!==Ls}function Lw(e,t,r){var n=$w(e),o=n&&!Ol(e);return(r?n:n&&e!==Kw&&e!==Gw&&e!==Yw&&e!==Jw&&e!==Xw)&&e!==wh&&!(t===Pl&&!o)||$w(t)&&!Ol(t)&&e===wh||t===Pl&&o}function T$(e){return ks(e)&&e!==xh&&!Ol(e)&&e!==g$&&e!==F$&&e!==Pl&&e!==Kw&&e!==Gw&&e!==Yw&&e!==Jw&&e!==Xw&&e!==wh&&e!==D$&&e!==m$&&e!==f$&&e!==C$&&e!==_$&&e!==y$&&e!==h$&&e!==p$&&e!==d$&&e!==E$&&e!==v$}function B$(e){return!Ol(e)&&e!==Pl}function $s(e,t){var r=e.charCodeAt(t),n;return r>=55296&&r<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function Zw(e){var t=/^\n* /;return t.test(e)}var Qw=1,Ah=2,eb=3,tb=4,lu=5;function I$(e,t,r,n,o,s,a,l){var p,m=0,g=null,F=!1,w=!1,v=n!==-1,x=-1,O=T$($s(e,0))&&B$($s(e,e.length-1));if(t||a)for(p=0;p<e.length;m>=65536?p+=2:p++){if(m=$s(e,p),!ks(m))return lu;O=O&&Lw(m,g,l),g=m}else{for(p=0;p<e.length;m>=65536?p+=2:p++){if(m=$s(e,p),m===Ls)F=!0,v&&(w=w||p-x-1>n&&e[x+1]!==" ",x=p);else if(!ks(m))return lu;O=O&&Lw(m,g,l),g=m}w=w||v&&p-x-1>n&&e[x+1]!==" "}return!F&&!w?O&&!a&&!o(e)?Qw:s===Us?lu:Ah:r>9&&Zw(e)?lu:a?s===Us?lu:Ah:w?tb:eb}function R$(e,t,r,n,o){e.dump=(function(){if(t.length===0)return e.quotingType===Us?'""':"''";if(!e.noCompatMode&&(w$.indexOf(t)!==-1||b$.test(t)))return e.quotingType===Us?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),l=n||e.flowLevel>-1&&r>=e.flowLevel;function p(m){return O$(e,m)}switch(I$(t,l,e.indent,a,p,e.quotingType,e.forceQuotes&&!n,o)){case Qw:return t;case Ah:return"'"+t.replace(/'/g,"''")+"'";case eb:return"|"+Uw(t,e.indent)+kw(jw(t,s));case tb:return">"+Uw(t,e.indent)+kw(jw(M$(t,a),s));case lu:return'"'+N$(t,a)+'"';default:throw new qs("impossible error: invalid scalar style")}})()}function Uw(e,t){var r=Zw(e)?String(t):"",n=e[e.length-1]===`
|
|
60
|
+
`,o=n&&(e[e.length-2]===`
|
|
61
|
+
`||e===`
|
|
62
|
+
`),s=o?"+":n?"":"-";return r+s+`
|
|
63
|
+
`}function kw(e){return e[e.length-1]===`
|
|
64
|
+
`?e.slice(0,-1):e}function M$(e,t){for(var r=/(\n+)([^\n]*)/g,n=(function(){var m=e.indexOf(`
|
|
65
|
+
`);return m=m!==-1?m:e.length,r.lastIndex=m,qw(e.slice(0,m),t)})(),o=e[0]===`
|
|
66
|
+
`||e[0]===" ",s,a;a=r.exec(e);){var l=a[1],p=a[2];s=p[0]===" ",n+=l+(!o&&!s&&p!==""?`
|
|
67
|
+
`:"")+qw(p,t),o=s}return n}function qw(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,n,o=0,s,a=0,l=0,p="";n=r.exec(e);)l=n.index,l-o>t&&(s=a>o?a:l,p+=`
|
|
68
|
+
`+e.slice(o,s),o=s+1),a=l;return p+=`
|
|
69
|
+
`,e.length-o>t&&a>o?p+=e.slice(o,a)+`
|
|
70
|
+
`+e.slice(a+1):p+=e.slice(o),p.slice(1)}function N$(e){for(var t="",r=0,n,o=0;o<e.length;r>=65536?o+=2:o++)r=$s(e,o),n=At[r],!n&&ks(r)?(t+=e[o],r>=65536&&(t+=e[o+1])):t+=n||S$(r);return t}function j$(e,t,r){var n="",o=e.tag,s,a,l;for(s=0,a=r.length;s<a;s+=1)l=r[s],e.replacer&&(l=e.replacer.call(r,String(s),l)),(jn(e,t,l,!1,!1)||typeof l>"u"&&jn(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=o,e.dump="["+n+"]"}function Ww(e,t,r,n){var o="",s=e.tag,a,l,p;for(a=0,l=r.length;a<l;a+=1)p=r[a],e.replacer&&(p=e.replacer.call(r,String(a),p)),(jn(e,t+1,p,!0,!0,!1,!0)||typeof p>"u"&&jn(e,t+1,null,!0,!0,!1,!0))&&((!n||o!=="")&&(o+=bh(e,t)),e.dump&&Ls===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=s,e.dump=o||"[]"}function $$(e,t,r){var n="",o=e.tag,s=Object.keys(r),a,l,p,m,g;for(a=0,l=s.length;a<l;a+=1)g="",n!==""&&(g+=", "),e.condenseFlow&&(g+='"'),p=s[a],m=r[p],e.replacer&&(m=e.replacer.call(r,p,m)),jn(e,t,p,!1,!1)&&(e.dump.length>1024&&(g+="? "),g+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),jn(e,t,m,!1,!1)&&(g+=e.dump,n+=g));e.tag=o,e.dump="{"+n+"}"}function L$(e,t,r,n){var o="",s=e.tag,a=Object.keys(r),l,p,m,g,F,w;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new qs("sortKeys must be a boolean or a function");for(l=0,p=a.length;l<p;l+=1)w="",(!n||o!=="")&&(w+=bh(e,t)),m=a[l],g=r[m],e.replacer&&(g=e.replacer.call(r,m,g)),jn(e,t+1,m,!0,!0,!0)&&(F=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,F&&(e.dump&&Ls===e.dump.charCodeAt(0)?w+="?":w+="? "),w+=e.dump,F&&(w+=bh(e,t)),jn(e,t+1,g,!0,F)&&(e.dump&&Ls===e.dump.charCodeAt(0)?w+=":":w+=": ",w+=e.dump,o+=w));e.tag=s,e.dump=o||"{}"}function Hw(e,t,r){var n,o,s,a,l,p;for(o=r?e.explicitTypes:e.implicitTypes,s=0,a=o.length;s<a;s+=1)if(l=o[s],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof t=="object"&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(r?l.multi&&l.representName?e.tag=l.representName(t):e.tag=l.tag:e.tag="?",l.represent){if(p=e.styleMap[l.tag]||l.defaultStyle,zw.call(l.represent)==="[object Function]")n=l.represent(t,p);else if(Vw.call(l.represent,p))n=l.represent[p](t,p);else throw new qs("!<"+l.tag+'> tag resolver accepts not "'+p+'" style');e.dump=n}return!0}return!1}function jn(e,t,r,n,o,s,a){e.tag=null,e.dump=r,Hw(e,r,!1)||Hw(e,r,!0);var l=zw.call(e.dump),p=n,m;n&&(n=e.flowLevel<0||e.flowLevel>t);var g=l==="[object Object]"||l==="[object Array]",F,w;if(g&&(F=e.duplicates.indexOf(r),w=F!==-1),(e.tag!==null&&e.tag!=="?"||w||e.indent!==2&&t>0)&&(o=!1),w&&e.usedDuplicates[F])e.dump="*ref_"+F;else{if(g&&w&&!e.usedDuplicates[F]&&(e.usedDuplicates[F]=!0),l==="[object Object]")n&&Object.keys(e.dump).length!==0?(L$(e,t,e.dump,o),w&&(e.dump="&ref_"+F+e.dump)):($$(e,t,e.dump),w&&(e.dump="&ref_"+F+" "+e.dump));else if(l==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?Ww(e,t-1,e.dump,o):Ww(e,t,e.dump,o),w&&(e.dump="&ref_"+F+e.dump)):(j$(e,t,e.dump),w&&(e.dump="&ref_"+F+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&R$(e,e.dump,t,s,p);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new qs("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(m=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?m="!"+m:m.slice(0,18)==="tag:yaml.org,2002:"?m="!!"+m.slice(18):m="!<"+m+">",e.dump=m+" "+e.dump)}return!0}function U$(e,t){var r=[],n=[],o,s;for(Sh(e,r,n),o=0,s=n.length;o<s;o+=1)t.duplicates.push(r[n[o]]);t.usedDuplicates=new Array(s)}function Sh(e,t,r){var n,o,s;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(t.push(e),Array.isArray(e))for(o=0,s=e.length;o<s;o+=1)Sh(e[o],t,r);else for(n=Object.keys(e),o=0,s=n.length;o<s;o+=1)Sh(e[n[o]],t,r)}function k$(e,t){t=t||{};var r=new P$(t);r.noRefs||U$(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),jn(r,0,n,!0,!0)?r.dump+`
|
|
71
|
+
`:""}rb.exports.dump=k$});var fu=M((Jre,It)=>{"use strict";d();var ib=Nw(),q$=nb();function Ph(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}It.exports.Type=bt();It.exports.Schema=rh();It.exports.FAILSAFE_SCHEMA=uh();It.exports.JSON_SCHEMA=fh();It.exports.CORE_SCHEMA=ph();It.exports.DEFAULT_SCHEMA=wl();It.exports.load=ib.load;It.exports.loadAll=ib.loadAll;It.exports.dump=q$.dump;It.exports.YAMLException=uu();It.exports.types={binary:mh(),float:lh(),map:oh(),null:sh(),pairs:_h(),set:yh(),timestamp:dh(),bool:ah(),int:ch(),merge:Dh(),omap:gh(),seq:ih(),str:nh()};It.exports.safeLoad=Ph("safeLoad","load");It.exports.safeLoadAll=Ph("safeLoadAll","loadAll");It.exports.safeDump=Ph("safeDump","dump")});var wi=M(Ee=>{"use strict";d();var W$=Ee&&Ee.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ee,"__esModule",{value:!0});Ee.parseFileAsJSONSchema=Ee.isSchemaLike=Ee.appendToDescription=Ee.maybeStripDefault=Ee.pathTransform=Ee.escapeBlockComment=Ee.log=Ee.error=Ee.generateName=Ee.toSafeString=Ee.stripExtension=Ee.justName=Ee.traverse=Ee.Try=void 0;var Ws=Nn(),$n=ze("path"),ob=co(),H$=W$(fu());function Oh(e,t){try{return e()}catch(r){return t(r)}}Ee.Try=Oh;var z$=new Set(["id","$defs","$id","$schema","title","description","default","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","items","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","definitions","properties","patternProperties","dependencies","enum","type","allOf","anyOf","oneOf","not"]);function pu(e,t,r){Object.keys(e).forEach(n=>{e[n]&&typeof e[n]=="object"&&!Array.isArray(e[n])&&ho(e[n],t,r,n)})}function du(e,t,r){e.forEach((n,o)=>ho(n,t,r,o.toString()))}function V$(e,t,r){if(typeof e!="object"||!e)return;let o=e[ob.Intersection];o&&Array.isArray(o.allOf)&&du(o.allOf,t,r)}function ho(e,t,r=new Set,n){if(!r.has(e)){if(r.add(e),t(e,n??null),e.anyOf&&du(e.anyOf,t,r),e.allOf&&du(e.allOf,t,r),e.oneOf&&du(e.oneOf,t,r),e.properties&&pu(e.properties,t,r),e.patternProperties&&pu(e.patternProperties,t,r),e.additionalProperties&&typeof e.additionalProperties=="object"&&ho(e.additionalProperties,t,r),e.items){let{items:o}=e;Array.isArray(o)?du(o,t,r):ho(o,t,r)}e.additionalItems&&typeof e.additionalItems=="object"&&ho(e.additionalItems,t,r),e.dependencies&&(Array.isArray(e.dependencies)?du(e.dependencies,t,r):pu(e.dependencies,t,r)),e.definitions&&pu(e.definitions,t,r),e.$defs&&pu(e.$defs,t,r),e.not&&ho(e.not,t,r),V$(e,t,r),Object.keys(e).filter(o=>!z$.has(o)).forEach(o=>{let s=e[o];s&&typeof s=="object"&&pu(s,t,r)})}}Ee.traverse=ho;function K$(e=""){return ub((0,$n.basename)(e))}Ee.justName=K$;function ub(e){return e.replace((0,$n.extname)(e),"")}Ee.stripExtension=ub;function sb(e){return(0,Ws.upperFirst)((0,Ws.deburr)(e).replace(/(^\s*[^a-zA-Z_$])|([^a-zA-Z_$\d])/g," ").replace(/^_[a-z]/g,t=>t.toUpperCase()).replace(/_[a-z]/g,t=>t.substr(1,t.length).toUpperCase()).replace(/([\d$]+[a-zA-Z])/g,t=>t.toUpperCase()).replace(/\s+([a-zA-Z])/g,t=>(0,Ws.trim)(t.toUpperCase())).replace(/\s/g,""))}Ee.toSafeString=sb;function G$(e,t){let r=sb(e);if(r||(r="NoName"),t.has(r)){let n=1,o=`${r}${n}`;for(;t.has(o);)o=`${r}${n}`,n++;r=o}return t.add(r),r}Ee.generateName=G$;function Y$(...e){var t;if(!process.env.VERBOSE)return console.error(e);console.error((t=ab("red"))===null||t===void 0?void 0:t("error"),...e)}Ee.error=Y$;function J$(e,t,...r){var n,o;if(!process.env.VERBOSE)return;let s=null;r.length>1&&typeof r[r.length-1]!="string"&&(s=r.splice(r.length-1,1)),console.info((n=Ci())===null||n===void 0?void 0:n.whiteBright.bgCyan("debug"),(o=ab(e))===null||o===void 0?void 0:o(t),...r),s&&console.dir(s,{depth:6,maxArrayLength:6})}Ee.log=J$;function ab(e){var t,r,n,o,s,a,l;if(process.env.VERBOSE)switch(e){case"blue":return(t=Ci())===null||t===void 0?void 0:t.whiteBright.bgBlue;case"cyan":return(r=Ci())===null||r===void 0?void 0:r.whiteBright.bgCyan;case"green":return(n=Ci())===null||n===void 0?void 0:n.whiteBright.bgGreen;case"magenta":return(o=Ci())===null||o===void 0?void 0:o.whiteBright.bgMagenta;case"red":return(s=Ci())===null||s===void 0?void 0:s.whiteBright.bgRedBright;case"white":return(a=Ci())===null||a===void 0?void 0:a.black.bgWhite;case"yellow":return(l=Ci())===null||l===void 0?void 0:l.whiteBright.bgYellow}}function X$(e){if(!(e===null||typeof e!="object"))for(let r of Object.keys(e))r==="description"&&typeof e[r]=="string"&&(e[r]=e[r].replace(/\*\//g,"* /"))}Ee.escapeBlockComment=X$;function Z$(e,t,r){let n=(0,$n.normalize)(t).split($n.sep),s=(0,$n.dirname)((0,$n.normalize)(r)).split($n.sep).filter((a,l)=>a!==n[l]);return $n.posix.join($n.posix.normalize(e),...s)}Ee.pathTransform=Z$;function Q$(e){if(!("default"in e))return e;switch(e.type){case"array":if(Array.isArray(e.default))return e;break;case"boolean":if(typeof e.default=="boolean")return e;break;case"integer":case"number":if(typeof e.default=="number")return e;break;case"string":if(typeof e.default=="string")return e;break;case"null":if(e.default===null)return e;break;case"object":if((0,Ws.isPlainObject)(e.default))return e;break}return delete e.default,e}Ee.maybeStripDefault=Q$;function e7(e,...t){return e?`${e}
|
|
72
|
+
|
|
73
|
+
${t.join(`
|
|
74
|
+
`)}`:t.join(`
|
|
75
|
+
`)}Ee.appendToDescription=e7;function t7(e){if(!(0,Ws.isPlainObject)(e))return!1;let t=e[ob.Parent];return t===null?!0:!["$defs","allOf","anyOf","definitions","dependencies","enum","not","oneOf","patternProperties","properties","required"].some(n=>t[n]===e)}Ee.isSchemaLike=t7;function r7(e,t){return e!=null&&n7(e)?Oh(()=>H$.default.load(t.toString()),()=>{throw new TypeError(`Error parsing YML in file "${e}"`)}):Oh(()=>JSON.parse(t.toString()),()=>{throw new TypeError(`Error parsing JSON in file "${e}"`)})}Ee.parseFileAsJSONSchema=r7;function n7(e){return e.endsWith(".yaml")||e.endsWith(".yml")}function Ci(){let e;try{e=ze("cli-color")}catch{}return e}});var Ih=M(rr=>{"use strict";d();Object.defineProperty(rr,"__esModule",{value:!0});rr.generateType=rr.generate=void 0;var lb=Nn(),i7=Rh(),tr=Cl(),hu=wi();function o7(e,t=i7.DEFAULT_OPTIONS){return[t.bannerComment,zs(e,t,e.standaloneName),Hs(e,t,e.standaloneName),Du(e,t)].filter(Boolean).join(`
|
|
76
|
+
|
|
77
|
+
`)+`
|
|
78
|
+
`}rr.generate=o7;function Du(e,t,r=new Set){if(r.has(e))return"";r.add(e);let n="";switch(e.type){case"ENUM":return a7(e,t)+`
|
|
79
|
+
`;case"ARRAY":return Du(e.params,t,r);case"UNION":case"INTERSECTION":return e.params.reduce((o,s)=>o+Du(s,t,r),"");case"TUPLE":return n=e.params.reduce((o,s)=>o+Du(s,t,r),""),e.spreadParam&&(n+=Du(e.spreadParam,t,r)),n;case"INTERFACE":return Bh(e).reduce((o,s)=>o+Du(s,t,r),"");default:return""}}function Hs(e,t,r,n=new Set){if(n.has(e))return"";n.add(e);let o="";switch(e.type){case"ARRAY":o=Hs(e.params,t,r,n);break;case"INTERFACE":o=[(0,tr.hasStandaloneName)(e)&&(e.standaloneName===r||t.declareExternallyReferenced)&&c7(e,t),Bh(e).map(s=>Hs(s,t,r,n)).filter(Boolean).join(`
|
|
80
|
+
`)].filter(Boolean).join(`
|
|
81
|
+
`);break;case"INTERSECTION":case"TUPLE":case"UNION":o=e.params.map(s=>Hs(s,t,r,n)).filter(Boolean).join(`
|
|
82
|
+
`),e.type==="TUPLE"&&e.spreadParam&&(o+=Hs(e.spreadParam,t,r,n));break;default:o=""}return o}function zs(e,t,r,n=new Set){if(n.has(e))return"";switch(n.add(e),e.type){case"ARRAY":return[zs(e.params,t,r,n),(0,tr.hasStandaloneName)(e)?Th(e,t):void 0].filter(Boolean).join(`
|
|
83
|
+
`);case"ENUM":return"";case"INTERFACE":return Bh(e).map(o=>(o.standaloneName===r||t.declareExternallyReferenced)&&zs(o,t,r,n)).filter(Boolean).join(`
|
|
84
|
+
`);case"INTERSECTION":case"TUPLE":case"UNION":return[(0,tr.hasStandaloneName)(e)?Th(e,t):void 0,e.params.map(o=>zs(o,t,r,n)).filter(Boolean).join(`
|
|
85
|
+
`),"spreadParam"in e&&e.spreadParam?zs(e.spreadParam,t,r,n):void 0].filter(Boolean).join(`
|
|
86
|
+
`);default:return(0,tr.hasStandaloneName)(e)?Th(e,t):""}}function u7(e,t){let r=s7(e,t);return t.strictIndexSignatures&&e.keyName==="[k: string]"?`${r} | undefined`:r}rr.generateType=(0,lb.memoize)(u7);function s7(e,t){if((0,hu.log)("magenta","generator",e),(0,tr.hasStandaloneName)(e))return(0,hu.toSafeString)(e.standaloneName);switch(e.type){case"ANY":return"any";case"ARRAY":return(()=>{let r=(0,rr.generateType)(e.params,t);return r.endsWith('"')?"("+r+")[]":r+"[]"})();case"BOOLEAN":return"boolean";case"INTERFACE":return fb(e,t);case"INTERSECTION":return cb(e,t);case"LITERAL":return JSON.stringify(e.params);case"NEVER":return"never";case"NUMBER":return"number";case"NULL":return"null";case"OBJECT":return"object";case"REFERENCE":return e.params;case"STRING":return"string";case"TUPLE":return(()=>{let r=e.minItems,n=e.maxItems||-1,o=e.spreadParam,s=[...e.params];if(r>0&&r>s.length&&e.spreadParam===void 0&&n<0&&(o=t.unknownAny?tr.T_UNKNOWN:tr.T_ANY),n>s.length&&e.spreadParam===void 0)for(let m=s.length;m<n;m+=1)s.push(t.unknownAny?tr.T_UNKNOWN:tr.T_ANY);function a(m){if(o){let g="...("+(0,rr.generateType)(o,t)+")[]";m.push(g)}return m}function l(m){return"["+m.join(", ")+"]"}let p=s.map(m=>(0,rr.generateType)(m,t));if(p.length>r){let m=p.slice(0,r),g=[];m.length>0?g.push(l(m)):g.push(l([]));for(let F=r;F<p.length;F+=1)m.push(p[F]),F===p.length-1&&a(m),g.push(l(m));return g.join("|")}return l(a(p))})();case"UNION":return cb(e,t);case"UNKNOWN":return"unknown";case"CUSTOM_TYPE":return e.params}}function cb(e,t){let r=e.params.map(o=>(0,rr.generateType)(o,t)),n=e.type==="UNION"?"|":"&";return r.length===1?r[0]:"("+r.join(" "+n+" ")+")"}function fb(e,t){return`{
|
|
87
|
+
`+e.params.filter(r=>!r.isPatternProperty&&!r.isUnreachableDefinition).map(({isRequired:r,keyName:n,ast:o})=>[r,n,o,(0,rr.generateType)(o,t)]).map(([r,n,o,s])=>((0,tr.hasComment)(o)&&!o.standaloneName?Bl(o.comment,o.deprecated)+`
|
|
88
|
+
`:"")+l7(n)+(r?"":"?")+": "+s).join(`
|
|
89
|
+
`)+`
|
|
90
|
+
}`}function Bl(e,t){let r=["/**"];return t&&r.push(" * @deprecated"),typeof e<"u"&&r.push(...e.split(`
|
|
91
|
+
`).map(n=>" * "+n)),r.push(" */"),r.join(`
|
|
92
|
+
`)}function a7(e,t){let r=n=>/[^a-zA-Z0-9_]/.test(n);return((0,tr.hasComment)(e)?Bl(e.comment,e.deprecated)+`
|
|
93
|
+
`:"")+"export "+(t.enableConstEnums?"const ":"")+`enum ${(0,hu.toSafeString)(e.standaloneName)} {
|
|
94
|
+
`+e.params.map(({ast:n,keyName:o})=>(r(o)?`"${o}"`:o)+" = "+(0,rr.generateType)(n,t)).join(`,
|
|
95
|
+
`)+`
|
|
96
|
+
}`}function c7(e,t){return((0,tr.hasComment)(e)?Bl(e.comment,e.deprecated)+`
|
|
97
|
+
`:"")+`export interface ${(0,hu.toSafeString)(e.standaloneName)} `+(e.superTypes.length>0?`extends ${e.superTypes.map(r=>(0,hu.toSafeString)(r.standaloneName)).join(", ")} `:"")+fb(e,t)}function Th(e,t){return((0,tr.hasComment)(e)?Bl(e.comment)+`
|
|
98
|
+
`:"")+`export type ${(0,hu.toSafeString)(e.standaloneName)} = ${(0,rr.generateType)((0,lb.omit)(e,"standaloneName"),t)}`}function l7(e){return e.length&&/[A-Za-z_$]/.test(e.charAt(0))&&/^[\w$]+$/.test(e)||e==="[k: string]"?e:JSON.stringify(e)}function Bh(e){return e.params.map(t=>t.ast).concat(e.superTypes)}});var pb=M(Il=>{"use strict";d();Object.defineProperty(Il,"__esModule",{value:!0});Il.typesOfSchema=void 0;var f7=Nn(),Mh=co();function p7(e){if(e.tsType)return new Set(["CUSTOM_TYPE"]);let t=new Set;for(let[r,n]of Object.entries(d7))n(e)&&t.add(r);return t.size||t.add("UNNAMED_SCHEMA"),t}Il.typesOfSchema=p7;var d7={ALL_OF(e){return"allOf"in e},ANY(e){return Object.keys(e).length===0?!0:e.type==="any"},ANY_OF(e){return"anyOf"in e},BOOLEAN(e){return"enum"in e?!1:e.type==="boolean"||!(0,Mh.isCompound)(e)&&typeof e.default=="boolean"},CUSTOM_TYPE(){return!1},NAMED_ENUM(e){return"enum"in e&&"tsEnumNames"in e},NAMED_SCHEMA(e){return"$id"in e&&("patternProperties"in e||"properties"in e)},NEVER(e){return e===!1},NULL(e){return e.type==="null"},NUMBER(e){return"enum"in e?!1:e.type==="integer"||e.type==="number"||!(0,Mh.isCompound)(e)&&typeof e.default=="number"},OBJECT(e){return e.type==="object"&&!(0,f7.isPlainObject)(e.additionalProperties)&&!e.allOf&&!e.anyOf&&!e.oneOf&&!e.patternProperties&&!e.properties&&!e.required},ONE_OF(e){return"oneOf"in e},REFERENCE(e){return"$ref"in e},STRING(e){return"enum"in e?!1:e.type==="string"||!(0,Mh.isCompound)(e)&&typeof e.default=="string"},TYPED_ARRAY(e){return e.type&&e.type!=="array"?!1:"items"in e},UNION(e){return Array.isArray(e.type)},UNNAMED_ENUM(e){return"tsEnumNames"in e||e.type&&e.type!=="boolean"&&e.type!=="integer"&&e.type!=="number"&&e.type!=="string"?!1:"enum"in e},UNNAMED_SCHEMA(){return!1},UNTYPED_ARRAY(e){return e.type==="array"&&!("items"in e)}}});var Nh=M(Ml=>{"use strict";d();Object.defineProperty(Ml,"__esModule",{value:!0});Ml.applySchemaTyping=void 0;var Rl=co(),D7=pb();function h7(e){var t;let r=(0,D7.typesOfSchema)(e);if(Object.defineProperty(e,Rl.Types,{enumerable:!1,value:r,writable:!1}),r.size===1)return;let n={[Rl.Parent]:e,[Rl.Types]:new Set(["ALL_OF"]),$id:e.$id,description:e.description,name:e.name,title:e.title,allOf:(t=e.allOf)!==null&&t!==void 0?t:[],required:[],additionalProperties:!1};r.delete("ALL_OF"),delete e.allOf,delete e.$id,delete e.description,delete e.name,delete e.title,Object.defineProperty(e,Rl.Intersection,{enumerable:!1,value:n,writable:!1})}Ml.applySchemaTyping=h7});var db=M(jl=>{"use strict";d();Object.defineProperty(jl,"__esModule",{value:!0});jl.normalize=void 0;var m7=co(),Ln=wi(),g7=Nh(),_7=ze("util"),tt=new Map;function Nl(e,t){return e.type===t||Array.isArray(e.type)&&e.type.includes(t)}function jh(e){return e.properties!==void 0||Nl(e,"object")||Nl(e,"any")}function Vs(e){return e.items!==void 0||Nl(e,"array")||Nl(e,"any")}function y7(e){return e.type==="string"&&e.enum!==void 0&&e.tsEnumNames===void 0}tt.set('Remove `type=["null"]` if `enum=[null]`',e=>{Array.isArray(e.enum)&&e.enum.some(t=>t===null)&&Array.isArray(e.type)&&e.type.includes("null")&&(e.type=e.type.filter(t=>t!=="null"))});tt.set("Destructure unary types",e=>{e.type&&Array.isArray(e.type)&&e.type.length===1&&(e.type=e.type[0])});tt.set("Add empty `required` property if none is defined",e=>{jh(e)&&!("required"in e)&&(e.required=[])});tt.set("Transform `required`=false to `required`=[]",e=>{e.required===!1&&(e.required=[])});tt.set("Default additionalProperties",(e,t,r)=>{jh(e)&&!("additionalProperties"in e)&&e.patternProperties===void 0&&(e.additionalProperties=r.additionalProperties)});tt.set("Transform id to $id",(e,t)=>{if((0,Ln.isSchemaLike)(e)){if(e.id&&e.$id&&e.id!==e.$id)throw ReferenceError(`Schema must define either id or $id, not both. Given id=${e.id}, $id=${e.$id} in ${t}`);e.id&&(e.$id=e.id,delete e.id)}});tt.set("Add an $id to anything that needs it",(e,t,r,n,o)=>{if(!(0,Ln.isSchemaLike)(e))return;if(!e.$id&&!e[m7.Parent]){e.$id=(0,Ln.toSafeString)((0,Ln.justName)(t));return}if(!Vs(e)&&!jh(e))return;let s=o.get(e);!e.$id&&!e.title&&s&&(e.$id=(0,Ln.toSafeString)((0,Ln.justName)(s))),s&&o.delete(e)});tt.set("Escape closing JSDoc comment",e=>{(0,Ln.escapeBlockComment)(e)});tt.set("Add JSDoc comments for minItems and maxItems",e=>{if(!Vs(e))return;let t=["minItems"in e?`@minItems ${e.minItems}`:"","maxItems"in e?`@maxItems ${e.maxItems}`:""].filter(Boolean);t.length&&(e.description=(0,Ln.appendToDescription)(e.description,...t))});tt.set("Optionally remove maxItems and minItems",(e,t,r)=>{Vs(e)&&("minItems"in e&&r.ignoreMinAndMaxItems&&delete e.minItems,"maxItems"in e&&(r.ignoreMinAndMaxItems||r.maxItems===-1)&&delete e.maxItems)});tt.set("Normalize schema.minItems",(e,t,r)=>{if(r.ignoreMinAndMaxItems||!Vs(e))return;let{minItems:n}=e;e.minItems=typeof n=="number"?n:0});tt.set("Remove maxItems if it is big enough to likely cause OOMs",(e,t,r)=>{if(r.ignoreMinAndMaxItems||r.maxItems===-1||!Vs(e))return;let{maxItems:n,minItems:o}=e;n!==void 0&&n-o>r.maxItems&&delete e.maxItems});tt.set("Normalize schema.items",(e,t,r)=>{if(r.ignoreMinAndMaxItems)return;let{maxItems:n,minItems:o}=e,s=typeof n=="number"&&n>=0,a=typeof o=="number"&&o>0;if(e.items&&!Array.isArray(e.items)&&(s||a)){let l=e.items,p=Array(n||o||0).fill(l);s||(e.additionalItems=l),e.items=p}return Array.isArray(e.items)&&s&&n<e.items.length&&(e.items=e.items.slice(0,n)),e});tt.set("Remove extends, if it is empty",e=>{e.hasOwnProperty("extends")&&(e.extends==null||Array.isArray(e.extends)&&e.extends.length===0)&&delete e.extends});tt.set("Make extends always an array, if it is defined",e=>{e.extends!=null&&(Array.isArray(e.extends)||(e.extends=[e.extends]))});tt.set("Transform definitions to $defs",(e,t)=>{if(e.definitions&&e.$defs&&!(0,_7.isDeepStrictEqual)(e.definitions,e.$defs))throw ReferenceError(`Schema must define either definitions or $defs, not both. Given id=${e.id} in ${t}`);e.definitions&&(e.$defs=e.definitions,delete e.definitions)});tt.set("Transform const to singleton enum",e=>{e.const!==void 0&&(e.enum=[e.const],delete e.const)});tt.set("Add tsEnumNames to enum types",(e,t,r)=>{var n;y7(e)&&r.inferStringEnumKeysFromValues&&(e.tsEnumNames=(n=e.enum)===null||n===void 0?void 0:n.map(String))});tt.set("Pre-calculate schema types and intersections",e=>{e!==null&&typeof e=="object"&&(0,g7.applySchemaTyping)(e)});function F7(e,t,r,n){return tt.forEach(o=>(0,Ln.traverse)(e,(s,a)=>o(s,r,n,a,t))),e}jl.normalize=F7});var mb=M(Ll=>{"use strict";d();Object.defineProperty(Ll,"__esModule",{value:!0});Ll.optimize=void 0;var E7=Nn(),$h=Ih(),Db=Cl(),$l=wi();function Ks(e,t,r=new Set){if(r.has(e))return e;switch(r.add(e),e.type){case"ARRAY":return Object.assign(e,{params:Ks(e.params,t,r)});case"INTERFACE":return Object.assign(e,{params:e.params.map(s=>Object.assign(s,{ast:Ks(s.ast,t,r)}))});case"INTERSECTION":case"UNION":let n=Object.assign(e,{params:e.params.map(s=>Ks(s,t,r))});if(n.params.some(s=>s.type==="ANY"))return(0,$l.log)("cyan","optimizer","[A, B, C, Any] -> Any",n),Db.T_ANY;if(n.params.some(s=>s.type==="UNKNOWN"))return(0,$l.log)("cyan","optimizer","[A, B, C, Unknown] -> Unknown",n),Db.T_UNKNOWN;n.params.every(s=>{let a=(0,$h.generateType)(hb(s),t),l=(0,$h.generateType)(hb(n.params[0]),t);return a===l})&&n.params.some(s=>s.standaloneName!==void 0)&&((0,$l.log)("cyan","optimizer","[A (named), A] -> [A (named)]",n),n.params=n.params.filter(s=>s.standaloneName!==void 0));let o=(0,E7.uniqBy)(n.params,s=>(0,$h.generateType)(s,t));return o.length!==n.params.length&&((0,$l.log)("cyan","optimizer","[A, B, B] -> [A, B]",n),n.params=o),Object.assign(n,{params:n.params.map(s=>Ks(s,t,r))});default:return e}}Ll.optimize=Ks;function hb(e){return e.type==="ENUM"?e:Object.assign(Object.assign({},e),{standaloneName:void 0})}});var _b=M(kl=>{"use strict";d();Object.defineProperty(kl,"__esModule",{value:!0});kl.parse=void 0;var mn=Nn(),v7=ze("util"),C7=Nh(),bi=Cl(),Gs=co(),Ul=wi();function nr(e,t,r,n=new Map,o=new Set){if((0,Gs.isPrimitive)(e))return(0,Gs.isBoolean)(e)?w7(e,r,t):Uh(e,r);let s=e[Gs.Intersection],a=e[Gs.Types];if(s){let l=Lh(s,"ALL_OF",t,r,n,o);return a.forEach(p=>{l.params.push(Lh(e,p,t,r,n,o))}),(0,Ul.log)("blue","parser","Types:",[...a],"Input:",e,"Output:",l),l}if(a.size===1){let l=[...a][0],p=Lh(e,l,t,r,n,o);return(0,Ul.log)("blue","parser","Type:",l,"Input:",e,"Output:",p),p}throw new ReferenceError("Expected intersection schema. Please file an issue on GitHub.")}kl.parse=nr;function Lh(e,t,r,n,o=new Map,s=new Set){let a=o.get(e);a||(a=new Map,o.set(e,a));let l=a.get(t);if(l)return l;let p={};return a.set(t,p),Object.assign(p,b7(e,t,r,n,o,s))}function w7(e,t,r){return e?{keyName:t,type:r.unknownAny?"UNKNOWN":"ANY"}:{keyName:t,type:"NEVER"}}function Uh(e,t){return{keyName:t,params:e,type:"LITERAL"}}function b7(e,t,r,n,o,s){let a=x7((0,Gs.getRootSchema)(e)),l=(0,mn.findKey)(a,p=>p===e);switch(t){case"ALL_OF":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),params:e.allOf.map(F=>nr(F,r,void 0,o,s)),type:"INTERSECTION"};case"ANY":return Object.assign(Object.assign({},r.unknownAny?bi.T_UNKNOWN:bi.T_ANY),{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r)});case"ANY_OF":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),params:e.anyOf.map(F=>nr(F,r,void 0,o,s)),type:"UNION"};case"BOOLEAN":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),type:"BOOLEAN"};case"CUSTOM_TYPE":return{comment:e.description,deprecated:e.deprecated,keyName:n,params:e.tsType,standaloneName:ut(e,l,s,r),type:"CUSTOM_TYPE"};case"NAMED_ENUM":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l??n,s,r),params:e.enum.map((F,w)=>({ast:Uh(F,void 0),keyName:e.tsEnumNames[w]})),type:"ENUM"};case"NAMED_SCHEMA":return gb(e,r,o,s,n);case"NEVER":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),type:"NEVER"};case"NULL":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),type:"NULL"};case"NUMBER":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),type:"NUMBER"};case"OBJECT":return{comment:e.description,keyName:n,standaloneName:ut(e,l,s,r),type:"OBJECT",deprecated:e.deprecated};case"ONE_OF":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),params:e.oneOf.map(F=>nr(F,r,void 0,o,s)),type:"UNION"};case"REFERENCE":throw Error((0,v7.format)("Refs should have been resolved by the resolver!",e));case"STRING":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),type:"STRING"};case"TYPED_ARRAY":if(Array.isArray(e.items)){let F=e.minItems,w=e.maxItems,v={comment:e.description,deprecated:e.deprecated,keyName:n,maxItems:w,minItems:F,standaloneName:ut(e,l,s,r),params:e.items.map(x=>nr(x,r,void 0,o,s)),type:"TUPLE"};return e.additionalItems===!0?v.spreadParam=r.unknownAny?bi.T_UNKNOWN:bi.T_ANY:e.additionalItems&&(v.spreadParam=nr(e.additionalItems,r,void 0,o,s)),v}else return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),params:nr(e.items,r,"{keyNameFromDefinition}Items",o,s),type:"ARRAY"};case"UNION":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),params:e.type.map(F=>{let w=Object.assign(Object.assign({},(0,mn.omit)(e,"$id","description","title")),{type:F});return(0,Ul.maybeStripDefault)(w),(0,C7.applySchemaTyping)(w),nr(w,r,void 0,o,s)}),type:"UNION"};case"UNNAMED_ENUM":return{comment:e.description,deprecated:e.deprecated,keyName:n,standaloneName:ut(e,l,s,r),params:e.enum.map(F=>Uh(F,void 0)),type:"UNION"};case"UNNAMED_SCHEMA":return gb(e,r,o,s,n,l);case"UNTYPED_ARRAY":let p=e.minItems,m=typeof e.maxItems=="number"?e.maxItems:-1,g=r.unknownAny?bi.T_UNKNOWN:bi.T_ANY;return p>0||m>=0?{comment:e.description,deprecated:e.deprecated,keyName:n,maxItems:e.maxItems,minItems:p,params:Array(Math.max(m,p)||0).fill(g),spreadParam:m>=0?void 0:g,standaloneName:ut(e,l,s,r),type:"TUPLE"}:{comment:e.description,deprecated:e.deprecated,keyName:n,params:g,standaloneName:ut(e,l,s,r),type:"ARRAY"}}}function ut(e,t,r,n){var o;let s=((o=n.customName)===null||o===void 0?void 0:o.call(n,e,t))||e.title||e.$id||t;if(s)return(0,Ul.generateName)(s,r)}function gb(e,t,r,n,o,s){let a=ut(e,s,n,t);return{comment:e.description,deprecated:e.deprecated,keyName:o,params:S7(e,t,r,n,a),standaloneName:a,superTypes:A7(e,t,r,n),type:"INTERFACE"}}function A7(e,t,r,n){let o=e.extends;return o?o.map(s=>nr(s,t,void 0,r,n)):[]}function S7(e,t,r,n,o){let s=(0,mn.map)(e.properties,(l,p)=>({ast:nr(l,t,p,r,n),isPatternProperty:!1,isRequired:(0,mn.includes)(e.required||[],p),isUnreachableDefinition:!1,keyName:p})),a=!1;switch(e.patternProperties&&(a=!e.additionalProperties&&Object.keys(e.patternProperties).length===1,s=s.concat((0,mn.map)(e.patternProperties,(l,p)=>{let m=nr(l,t,p,r,n),g=`This interface was referenced by \`${o}\`'s JSON-Schema definition
|
|
99
|
+
via the \`patternProperty\` "${p.replace("*/","*\\/")}".`;return m.comment=m.comment?`${m.comment}
|
|
100
|
+
|
|
101
|
+
${g}`:g,{ast:m,isPatternProperty:!a,isRequired:a||(0,mn.includes)(e.required||[],p),isUnreachableDefinition:!1,keyName:a?"[k: string]":p}}))),t.unreachableDefinitions&&(s=s.concat((0,mn.map)(e.$defs,(l,p)=>{let m=nr(l,t,p,r,n),g=`This interface was referenced by \`${o}\`'s JSON-Schema
|
|
102
|
+
via the \`definition\` "${p}".`;return m.comment=m.comment?`${m.comment}
|
|
103
|
+
|
|
104
|
+
${g}`:g,{ast:m,isPatternProperty:!1,isRequired:(0,mn.includes)(e.required||[],p),isUnreachableDefinition:!0,keyName:p}}))),e.additionalProperties){case void 0:case!0:return a?s:s.concat({ast:t.unknownAny?bi.T_UNKNOWN_ADDITIONAL_PROPERTIES:bi.T_ANY_ADDITIONAL_PROPERTIES,isPatternProperty:!1,isRequired:!0,isUnreachableDefinition:!1,keyName:"[k: string]"});case!1:return s;default:return s.concat({ast:nr(e.additionalProperties,t,"[k: string]",r,n),isPatternProperty:!1,isRequired:!0,isUnreachableDefinition:!1,keyName:"[k: string]"})}}function kh(e,t=!0,r=new Set){return r.has(e)?{}:(r.add(e),Array.isArray(e)?e.reduce((n,o)=>Object.assign(Object.assign({},n),kh(o,!1,r)),{}):(0,mn.isPlainObject)(e)?Object.assign(Object.assign({},t&&P7(e)?e.$defs:{}),Object.keys(e).reduce((n,o)=>Object.assign(Object.assign({},n),kh(e[o],!1,r)),{})):{})}var x7=(0,mn.memoize)(kh);function P7(e){return"$defs"in e}});var ql=M(mu=>{"use strict";d();Object.defineProperty(mu,"__esModule",{value:!0});mu.getDeepKeys=mu.toJSON=void 0;var O7=["function","symbol","undefined"],T7=["constructor","prototype","__proto__"],B7=Object.getPrototypeOf({});function I7(){let e={},t=this;for(let r of yb(t))if(typeof r=="string"){let n=t[r],o=typeof n;O7.includes(o)||(e[r]=n)}return e}mu.toJSON=I7;function yb(e,t=[]){let r=[];for(;e&&e!==B7;)r=r.concat(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e)),e=Object.getPrototypeOf(e);let n=new Set(r);for(let o of t.concat(T7))n.delete(o);return n}mu.getDeepKeys=yb});var qh=M(gu=>{"use strict";d();Object.defineProperty(gu,"__esModule",{value:!0});gu.addInspectMethod=gu.format=void 0;var Fb=ze("util"),R7=ql(),Eb=Fb.inspect.custom||Symbol.for("nodejs.util.inspect.custom");gu.format=Fb.format;function M7(e){e[Eb]=N7}gu.addInspectMethod=M7;function N7(){let e={},t=this;for(let r of R7.getDeepKeys(t)){let n=t[r];e[r]=n}return delete e[Eb],e}});var wb=M(gn=>{"use strict";d();Object.defineProperty(gn,"__esModule",{value:!0});gn.lazyJoinStacks=gn.joinStacks=gn.isWritableStack=gn.isLazyStack=void 0;var j7=/\r?\n/,$7=/\bono[ @]/;function L7(e){return!!(e&&e.configurable&&typeof e.get=="function")}gn.isLazyStack=L7;function U7(e){return!!(!e||e.writable||typeof e.set=="function")}gn.isWritableStack=U7;function vb(e,t){let r=Cb(e.stack),n=t?t.stack:void 0;return r&&n?r+`
|
|
105
|
+
|
|
106
|
+
`+n:r||n}gn.joinStacks=vb;function k7(e,t,r){r?Object.defineProperty(t,"stack",{get:()=>{let n=e.get.apply(t);return vb({stack:n},r)},enumerable:!1,configurable:!0}):q7(t,e)}gn.lazyJoinStacks=k7;function Cb(e){if(e){let t=e.split(j7),r;for(let n=0;n<t.length;n++){let o=t[n];if($7.test(o))r===void 0&&(r=n);else if(r!==void 0){t.splice(r,n-r);break}}if(t.length>0)return t.join(`
|
|
107
|
+
`)}return e}function q7(e,t){Object.defineProperty(e,"stack",{get:()=>Cb(t.get.apply(e)),enumerable:!1,configurable:!0})}});var Sb=M(Hl=>{"use strict";d();Object.defineProperty(Hl,"__esModule",{value:!0});Hl.extendError=void 0;var bb=qh(),Wl=wb(),Ab=ql(),W7=["name","message","stack"];function H7(e,t,r){let n=e;return z7(n,t),t&&typeof t=="object"&&V7(n,t),n.toJSON=Ab.toJSON,bb.addInspectMethod&&bb.addInspectMethod(n),r&&typeof r=="object"&&Object.assign(n,r),n}Hl.extendError=H7;function z7(e,t){let r=Object.getOwnPropertyDescriptor(e,"stack");Wl.isLazyStack(r)?Wl.lazyJoinStacks(r,e,t):Wl.isWritableStack(r)&&(e.stack=Wl.joinStacks(e,t))}function V7(e,t){let r=Ab.getDeepKeys(t,W7),n=e,o=t;for(let s of r)if(n[s]===void 0)try{n[s]=o[s]}catch{}}});var xb=M(_u=>{"use strict";d();Object.defineProperty(_u,"__esModule",{value:!0});_u.normalizeArgs=_u.normalizeOptions=void 0;var K7=qh();function G7(e){return e=e||{},{concatMessages:e.concatMessages===void 0?!0:!!e.concatMessages,format:e.format===void 0?K7.format:typeof e.format=="function"?e.format:!1}}_u.normalizeOptions=G7;function Y7(e,t){let r,n,o,s="";return typeof e[0]=="string"?o=e:typeof e[1]=="string"?(e[0]instanceof Error?r=e[0]:n=e[0],o=e.slice(1)):(r=e[0],n=e[1],o=e.slice(2)),o.length>0&&(t.format?s=t.format.apply(void 0,o):s=o.join(" ")),t.concatMessages&&r&&r.message&&(s+=(s?`
|
|
108
|
+
`:"")+r.message),{originalError:r,props:n,message:s}}_u.normalizeArgs=Y7});var Hh=M(Vl=>{"use strict";d();Object.defineProperty(Vl,"__esModule",{value:!0});Vl.Ono=void 0;var zl=Sb(),Pb=xb(),J7=ql(),X7=Wh;Vl.Ono=X7;function Wh(e,t){t=Pb.normalizeOptions(t);function r(...n){let{originalError:o,props:s,message:a}=Pb.normalizeArgs(n,t),l=new e(a);return zl.extendError(l,o,s)}return r[Symbol.species]=e,r}Wh.toJSON=function(t){return J7.toJSON.call(t)};Wh.extend=function(t,r,n){return n||r instanceof Error?zl.extendError(t,r,n):r?zl.extendError(t,void 0,r):zl.extendError(t)}});var Ob=M(Kl=>{"use strict";d();Object.defineProperty(Kl,"__esModule",{value:!0});Kl.ono=void 0;var mo=Hh(),Z7=_n;Kl.ono=Z7;_n.error=new mo.Ono(Error);_n.eval=new mo.Ono(EvalError);_n.range=new mo.Ono(RangeError);_n.reference=new mo.Ono(ReferenceError);_n.syntax=new mo.Ono(SyntaxError);_n.type=new mo.Ono(TypeError);_n.uri=new mo.Ono(URIError);var Q7=_n;function _n(...e){let t=e[0];if(typeof t=="object"&&typeof t.name=="string"){for(let r of Object.values(Q7))if(typeof r=="function"&&r.name==="ono"){let n=r[Symbol.species];if(n&&n!==Error&&(t instanceof n||t.name===n.name))return r.apply(void 0,e)}}return _n.error.apply(void 0,e)}});var Bb=M(Tb=>{"use strict";d();Object.defineProperty(Tb,"__esModule",{value:!0});var Ane=ze("util")});var Rt=M((Lr,yu)=>{"use strict";d();var e9=Lr&&Lr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),t9=Lr&&Lr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!t.hasOwnProperty(r)&&e9(t,e,r)};Object.defineProperty(Lr,"__esModule",{value:!0});Lr.ono=void 0;var Ib=Ob();Object.defineProperty(Lr,"ono",{enumerable:!0,get:function(){return Ib.ono}});var r9=Hh();Object.defineProperty(Lr,"Ono",{enumerable:!0,get:function(){return r9.Ono}});t9(Bb(),Lr);Lr.default=Ib.ono;typeof yu=="object"&&typeof yu.exports=="object"&&(yu.exports=Object.assign(yu.exports.default,yu.exports))});var zh=M(Ys=>{"use strict";d();var n9=Ys&&Ys.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ys,"__esModule",{value:!0});Ys.default=i9;var Rb=n9(ze("path"));function i9(e){return e.startsWith("\\\\?\\")?e:e.split(Rb.default?.win32?.sep).join(Rb.default?.posix?.sep??"/")}});var Mb=M(Gl=>{"use strict";d();Object.defineProperty(Gl,"__esModule",{value:!0});Gl.isWindows=void 0;var o9=/^win/.test(globalThis.process?globalThis.process.platform:""),u9=()=>o9;Gl.isWindows=u9});var Er=M(Le=>{"use strict";d();var s9=Le&&Le.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),a9=Le&&Le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),c9=Le&&Le.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&s9(r,t,n[o]);return a9(r,t),r}})(),l9=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Le,"__esModule",{value:!0});Le.parse=void 0;Le.resolve=Nb;Le.cwd=jb;Le.getProtocol=Jh;Le.getExtension=_9;Le.stripQuery=$b;Le.getHash=Lb;Le.stripHash=Gh;Le.isHttp=y9;Le.isFileSystemPath=Yh;Le.fromFileSystemPath=F9;Le.toFileSystemPath=E9;Le.safePointerToPath=v9;Le.relative=C9;var Jl=l9(zh()),Kh=c9(ze("path")),f9=/\//g,p9=/^(\w{2,}):\/\//i,d9=/~1/g,D9=/~0/g,h9=ze("path"),Yl=Mb(),m9=[[/\?/g,"%3F"],[/#/g,"%23"]],Vh=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],g9=e=>new URL(e);Le.parse=g9;function Nb(e,t){let r=new URL((0,Jl.default)(e),"resolve://"),n=new URL((0,Jl.default)(t),r),o=t.match(/(\s*)$/)?.[1]||"";if(n.protocol==="resolve:"){let{pathname:s,search:a,hash:l}=n;return s+a+l+o}return n.toString()+o}function jb(){if(typeof window<"u")return location.href;let e=process.cwd(),t=e.slice(-1);return t==="/"||t==="\\"?e:e+"/"}function Jh(e){let t=p9.exec(e||"");if(t)return t[1].toLowerCase()}function _9(e){let t=e.lastIndexOf(".");return t>=0?$b(e.substr(t).toLowerCase()):""}function $b(e){let t=e.indexOf("?");return t>=0&&(e=e.substr(0,t)),e}function Lb(e){if(!e)return"#";let t=e.indexOf("#");return t>=0?e.substring(t):"#"}function Gh(e){if(!e)return"";let t=e.indexOf("#");return t>=0&&(e=e.substring(0,t)),e}function y9(e){let t=Jh(e);return t==="http"||t==="https"?!0:t===void 0?typeof window<"u":!1}function Yh(e){if(typeof window<"u"||typeof process<"u"&&process.browser)return!1;let t=Jh(e);return t===void 0||t==="file"}function F9(e){if((0,Yl.isWindows)()){let t=jb(),r=e.toUpperCase(),o=(0,Jl.default)(t).toUpperCase(),s=r.includes(o),a=r.includes(o),l=Kh.win32?.isAbsolute(e)||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://");!(s||a||l)&&!t.startsWith("http")&&(e=(0,h9.join)(t,e)),e=(0,Jl.default)(e)}e=encodeURI(e);for(let t of m9)e=e.replace(t[0],t[1]);return e}function E9(e,t){e=decodeURI(e);for(let n=0;n<Vh.length;n+=2)e=e.replace(Vh[n],Vh[n+1]);let r=e.substr(0,7).toLowerCase()==="file://";return r&&(e=e[7]==="/"?e.substr(8):e.substr(7),(0,Yl.isWindows)()&&e[1]==="/"&&(e=e[0]+":"+e.substr(1)),t?e="file:///"+e:(r=!1,e=(0,Yl.isWindows)()?e:"/"+e)),(0,Yl.isWindows)()&&!r&&(e=e.replace(f9,"\\"),e.substr(1,2)===":\\"&&(e=e[0].toUpperCase()+e.substr(1))),e}function v9(e){return e.length<=1||e[0]!=="#"||e[1]!=="/"?[]:e.slice(2).split("/").map(t=>decodeURIComponent(t).replace(d9,"/").replace(D9,"~"))}function C9(e,t){if(!Yh(e)||!Yh(t))return Nb(e,t);let r=Kh.default.dirname(Gh(e)),n=Gh(t);return Kh.default.relative(r,n)+Lb(t)}});var vr=M(Ye=>{"use strict";d();Object.defineProperty(Ye,"__esModule",{value:!0});Ye.InvalidPointerError=Ye.TimeoutError=Ye.MissingPointerError=Ye.UnmatchedResolverError=Ye.ResolverError=Ye.UnmatchedParserError=Ye.ParserError=Ye.JSONParserErrorGroup=Ye.JSONParserError=void 0;Ye.isHandledError=w9;Ye.normalizeError=b9;var Ub=Rt(),Xl=Er(),Ur=class extends Error{constructor(t,r){super(),this.code="EUNKNOWN",this.name="JSONParserError",this.message=t,this.source=r,this.path=null,Ub.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}};Ye.JSONParserError=Ur;var Zl=class e extends Error{constructor(t){super(),this.files=t,this.name="JSONParserErrorGroup",this.message=`${this.errors.length} error${this.errors.length>1?"s":""} occurred while reading '${(0,Xl.toFileSystemPath)(t.$refs._root$Ref.path)}'`,Ub.Ono.extend(this)}static getParserErrors(t){let r=[];for(let n of Object.values(t.$refs._$refs))n.errors&&r.push(...n.errors);return r}get errors(){return e.getParserErrors(this.files)}};Ye.JSONParserErrorGroup=Zl;var Xh=class extends Ur{constructor(t,r){super(`Error parsing ${r}: ${t}`,r),this.code="EPARSER",this.name="ParserError"}};Ye.ParserError=Xh;var Zh=class extends Ur{constructor(t){super(`Could not find parser for "${t}"`,t),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}};Ye.UnmatchedParserError=Zh;var Qh=class extends Ur{constructor(t,r){super(t.message||`Error reading file "${r}"`,r),this.code="ERESOLVER",this.name="ResolverError","code"in t&&(this.ioErrorCode=String(t.code))}};Ye.ResolverError=Qh;var em=class extends Ur{constructor(t){super(`Could not find resolver for "${t}"`,t),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}};Ye.UnmatchedResolverError=em;var tm=class extends Ur{constructor(t,r){super(`Missing $ref pointer "${(0,Xl.getHash)(r)}". Token "${t}" does not exist.`,(0,Xl.stripHash)(r)),this.code="EMISSINGPOINTER",this.name="MissingPointerError"}};Ye.MissingPointerError=tm;var rm=class extends Ur{constructor(t){super(`Dereferencing timeout reached: ${t}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}};Ye.TimeoutError=rm;var nm=class extends Ur{constructor(t,r){super(`Invalid $ref pointer "${t}". Pointers must begin with "#/"`,(0,Xl.stripHash)(r)),this.code="EUNMATCHEDRESOLVER",this.name="InvalidPointerError"}};Ye.InvalidPointerError=nm;function w9(e){return e instanceof Ur||e instanceof Zl}function b9(e){return e.path===null&&(e.path=[]),e}});var Js=M(kr=>{"use strict";d();var A9=kr&&kr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),S9=kr&&kr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),x9=kr&&kr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&A9(r,t,n[o]);return S9(r,t),r}})(),P9=kr&&kr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(kr,"__esModule",{value:!0});var im=P9(Fu()),om=x9(Er()),ef=vr(),O9=/\//g,T9=/~/g,B9=/~1/g,I9=/~0/g,R9=e=>{try{return decodeURIComponent(e)}catch{return e}},tf=class e{constructor(t,r,n){this.$ref=t,this.path=r,this.originalPath=n||r,this.value=void 0,this.circular=!1,this.indirections=0}resolve(t,r,n){let o=e.parse(this.path,this.originalPath);this.value=qb(t);for(let s=0;s<o.length;s++){if(Ql(this,r,n)&&(this.path=e.join(this.path,o.slice(s))),typeof this.value=="object"&&this.value!==null&&!Wb(n)&&"$ref"in this.value)return this;let a=o[s];if(this.value[a]===void 0||this.value[a]===null&&s===o.length-1){let l=!1;for(let p=o.length-1;p>s;p--){let m=o.slice(s,p+1).join("/");if(this.value[m]!==void 0){this.value=this.value[m],s=p,l=!0;break}}if(l)continue;throw this.value=null,new ef.MissingPointerError(a,decodeURI(this.originalPath))}else this.value=this.value[a]}return(!this.value||this.value.$ref&&om.resolve(this.path,this.value.$ref)!==n)&&Ql(this,r,n),this}set(t,r,n){let o=e.parse(this.path),s;if(o.length===0)return this.value=r,r;this.value=qb(t);for(let a=0;a<o.length-1;a++)Ql(this,n),s=o[a],this.value&&this.value[s]!==void 0?this.value=this.value[s]:this.value=kb(this,s,{});return Ql(this,n),s=o[o.length-1],kb(this,s,r),t}static parse(t,r){let n=om.getHash(t).substring(1);if(!n)return[];let o=n.split("/");for(let s=0;s<o.length;s++)o[s]=R9(o[s].replace(B9,"/").replace(I9,"~"));if(o[0]!=="")throw new ef.InvalidPointerError(n,r===void 0?t:r);return o.slice(1)}static join(t,r){t.indexOf("#")===-1&&(t+="#"),r=Array.isArray(r)?r:[r];for(let n=0;n<r.length;n++){let o=r[n];t+="/"+encodeURIComponent(o.replace(T9,"~0").replace(O9,"~1"))}return t}};function Ql(e,t,r){if(im.default.isAllowed$Ref(e.value,t)){let n=om.resolve(e.path,e.value.$ref);if(n===e.path&&!Wb(r))e.circular=!0;else{let o=e.$ref.$refs._resolve(n,e.path,t);return o===null?!1:(e.indirections+=o.indirections+1,im.default.isExtended$Ref(e.value)?(e.value=im.default.dereference(e.value,o.value),!1):(e.$ref=o.$ref,e.path=o.path,e.value=o.value,!0))}}}kr.default=tf;function kb(e,t,r){if(e.value&&typeof e.value=="object")t==="-"&&Array.isArray(e.value)?e.value.push(r):e.value[t]=r;else throw new ef.JSONParserError(`Error assigning $ref pointer "${e.path}".
|
|
109
|
+
Cannot set "${t}" of a non-object.`);return r}function qb(e){if((0,ef.isHandledError)(e))throw e;return e}function Wb(e){return typeof e=="string"&&tf.parse(e).length==0}});var Fu=M(Xs=>{"use strict";d();var M9=Xs&&Xs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xs,"__esModule",{value:!0});var Hb=M9(Js()),rf=vr(),um=Er(),sm=class e{constructor(t){this.errors=[],this.$refs=t}addError(t){this.errors===void 0&&(this.errors=[]);let r=this.errors.map(({footprint:n})=>n);"errors"in t&&Array.isArray(t.errors)?this.errors.push(...t.errors.map(rf.normalizeError).filter(({footprint:n})=>!r.includes(n))):(!("footprint"in t)||!r.includes(t.footprint))&&this.errors.push((0,rf.normalizeError)(t))}exists(t,r){try{return this.resolve(t,r),!0}catch{return!1}}get(t,r){return this.resolve(t,r)?.value}resolve(t,r,n,o){let s=new Hb.default(this,t,n);try{return s.resolve(this.value,r,o)}catch(a){if(!r||!r.continueOnError||!(0,rf.isHandledError)(a))throw a;return a.path===null&&(a.path=(0,um.safePointerToPath)((0,um.getHash)(o))),a instanceof rf.InvalidPointerError&&(a.source=decodeURI((0,um.stripHash)(o))),this.addError(a),null}}set(t,r){let n=new Hb.default(this,t);this.value=n.set(this.value,r)}static is$Ref(t){return!!t&&typeof t=="object"&&t!==null&&"$ref"in t&&typeof t.$ref=="string"&&t.$ref.length>0}static isExternal$Ref(t){return e.is$Ref(t)&&t.$ref[0]!=="#"}static isAllowed$Ref(t,r){if(this.is$Ref(t)){if(t.$ref.substring(0,2)==="#/"||t.$ref==="#")return!0;if(t.$ref[0]!=="#"&&(!r||r.resolve?.external))return!0}}static isExtended$Ref(t){return e.is$Ref(t)&&Object.keys(t).length>1}static dereference(t,r){if(r&&typeof r=="object"&&e.isExtended$Ref(t)){let n={};for(let o of Object.keys(t))o!=="$ref"&&(n[o]=t[o]);for(let o of Object.keys(r))o in n||(n[o]=r[o]);return n}else return r}};Xs.default=sm});var Yb=M(qr=>{"use strict";d();var N9=qr&&qr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),j9=qr&&qr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),$9=qr&&qr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&N9(r,t,n[o]);return j9(r,t),r}})(),Gb=qr&&qr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qr,"__esModule",{value:!0});var zb=Rt(),L9=Gb(Fu()),Ai=$9(Er()),Vb=Gb(zh()),am=class{paths(...t){return Kb(this._$refs,t.flat()).map(n=>(0,Vb.default)(n.decoded))}values(...t){let r=this._$refs;return Kb(r,t.flat()).reduce((o,s)=>(o[(0,Vb.default)(s.decoded)]=r[s.encoded].value,o),{})}exists(t,r){try{return this._resolve(t,"",r),!0}catch{return!1}}get(t,r){return this._resolve(t,"",r).value}set(t,r){let n=Ai.resolve(this._root$Ref.path,t),o=Ai.stripHash(n),s=this._$refs[o];if(!s)throw(0,zb.ono)(`Error resolving $ref pointer "${t}".
|
|
110
|
+
"${o}" not found.`);s.set(n,r)}_get$Ref(t){t=Ai.resolve(this._root$Ref.path,t);let r=Ai.stripHash(t);return this._$refs[r]}_add(t){let r=Ai.stripHash(t),n=new L9.default(this);return n.path=r,this._$refs[r]=n,this._root$Ref=this._root$Ref||n,n}_resolve(t,r,n){let o=Ai.resolve(this._root$Ref.path,t),s=Ai.stripHash(o),a=this._$refs[s];if(!a)throw(0,zb.ono)(`Error resolving $ref pointer "${t}".
|
|
111
|
+
"${s}" not found.`);return a.resolve(o,n,t,r)}constructor(){this._$refs={},this.toJSON=this.values,this.circular=!1,this._$refs={},this._root$Ref=null}};qr.default=am;function Kb(e,t){let r=Object.keys(e);return t=Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t),t.length>0&&t[0]&&(r=r.filter(n=>t.includes(e[n].pathType))),r.map(n=>({encoded:n,decoded:e[n].pathType==="file"?Ai.toFileSystemPath(n,!0):n}))}});var Xb=M(Eu=>{"use strict";d();Object.defineProperty(Eu,"__esModule",{value:!0});Eu.all=U9;Eu.filter=k9;Eu.sort=q9;Eu.run=W9;function U9(e){return Object.keys(e||{}).filter(t=>typeof e[t]=="object").map(t=>(e[t].name=t,e[t]))}function k9(e,t,r){return e.filter(n=>!!Jb(n,t,r))}function q9(e){for(let t of e)t.order=t.order||Number.MAX_SAFE_INTEGER;return e.sort((t,r)=>t.order-r.order)}async function W9(e,t,r,n){let o,s,a=0;return new Promise((l,p)=>{m();function m(){if(o=e[a++],!o)return p(s);try{let v=Jb(o,t,r,g,n);if(v&&typeof v.then=="function")v.then(F,w);else if(v!==void 0)F(v);else if(a===e.length)throw new Error("No promise has been returned or callback has been called.")}catch(v){w(v)}}function g(v,x){v?w(v):F(x)}function F(v){l({plugin:o,result:v})}function w(v){s={plugin:o,error:v},m()}})}function Jb(e,t,r,n,o){let s=e[t];if(typeof s=="function")return s.apply(e,[r,n,o]);if(!n){if(s instanceof RegExp)return s.test(r.url);if(typeof s=="string")return s===r.extension;if(Array.isArray(s))return s.indexOf(r.extension)!==-1}return s}});var lm=M(Un=>{"use strict";d();var H9=Un&&Un.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),z9=Un&&Un.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Zb=Un&&Un.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&H9(r,t,n[o]);return z9(r,t),r}})();Object.defineProperty(Un,"__esModule",{value:!0});var cm=Rt(),V9=Zb(Er()),Si=Zb(Xb()),go=vr();async function K9(e,t,r){let n=e.indexOf("#"),o="";n>=0&&(o=e.substring(n),e=e.substring(0,n));let s=t._add(e),a={url:e,hash:o,extension:V9.getExtension(e)};try{let l=await G9(a,r,t);s.pathType=l.plugin.name,a.data=l.result;let p=await Y9(a,r,t);return s.value=p.result,p.result}catch(l){throw(0,go.isHandledError)(l)&&(s.value=l),l}}async function G9(e,t,r){let n=Si.all(t.resolve);n=Si.filter(n,"canRead",e),Si.sort(n);try{return await Si.run(n,"read",e,r)}catch(o){throw!o&&t.continueOnError?new go.UnmatchedResolverError(e.url):!o||!("error"in o)?cm.ono.syntax(`Unable to resolve $ref pointer "${e.url}"`):o.error instanceof go.ResolverError?o.error:new go.ResolverError(o,e.url)}}async function Y9(e,t,r){let n=Si.all(t.parse),o=Si.filter(n,"canParse",e),s=o.length>0?o:n;Si.sort(s);try{let a=await Si.run(s,"parse",e,r);if(!a.plugin.allowEmpty&&J9(a.result))throw cm.ono.syntax(`Error parsing "${e.url}" as ${a.plugin.name}.
|
|
112
|
+
Parsed value is empty`);return a}catch(a){throw!a&&t.continueOnError?new go.UnmatchedParserError(e.url):a&&a.message&&a.message.startsWith("Error parsing")?a:!a||!("error"in a)?cm.ono.syntax(`Unable to parse ${e.url}`):a.error instanceof go.ParserError?a.error:new go.ParserError(a.error.message,e.url)}}function J9(e){return e===void 0||typeof e=="object"&&Object.keys(e).length===0||typeof e=="string"&&e.trim().length===0||Buffer.isBuffer(e)&&e.length===0}Un.default=K9});var e2=M(fm=>{"use strict";d();Object.defineProperty(fm,"__esModule",{value:!0});var Qb=vr();fm.default={order:100,allowEmpty:!0,canParse:".json",allowBOM:!0,async parse(e){let t=e.data;if(Buffer.isBuffer(t)&&(t=t.toString()),typeof t=="string"){if(t.trim().length===0)return;try{return JSON.parse(t)}catch(r){if(this.allowBOM)try{let n=t.indexOf("{");return t=t.slice(n),JSON.parse(t)}catch(n){throw new Qb.ParserError(n.message,e.url)}throw new Qb.ParserError(r.message,e.url)}}else return t}}});var t2=M(Zs=>{"use strict";d();var X9=Zs&&Zs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zs,"__esModule",{value:!0});var Z9=vr(),Q9=X9(fu()),eL=fu();Zs.default={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],async parse(e){let t=e.data;if(Buffer.isBuffer(t)&&(t=t.toString()),typeof t=="string")try{return Q9.default.load(t,{schema:eL.JSON_SCHEMA})}catch(r){throw new Z9.ParserError(r?.message||"Parser Error",e.url)}else return t}}});var r2=M(pm=>{"use strict";d();Object.defineProperty(pm,"__esModule",{value:!0});var tL=vr(),rL=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;pm.default={order:300,allowEmpty:!0,encoding:"utf8",canParse(e){return(typeof e.data=="string"||Buffer.isBuffer(e.data))&&rL.test(e.url)},parse(e){if(typeof e.data=="string")return e.data;if(Buffer.isBuffer(e.data))return e.data.toString(this.encoding);throw new tL.ParserError("data is not text",e.url)}}});var n2=M(dm=>{"use strict";d();Object.defineProperty(dm,"__esModule",{value:!0});var nL=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;dm.default={order:400,allowEmpty:!0,canParse(e){return Buffer.isBuffer(e.data)&&nL.test(e.url)},parse(e){return Buffer.isBuffer(e.data)?e.data:Buffer.from(e.data)}}});var s2=M(Wr=>{"use strict";d();var iL=Wr&&Wr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),oL=Wr&&Wr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),uL=Wr&&Wr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&iL(r,t,n[o]);return oL(r,t),r}})(),sL=Wr&&Wr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wr,"__esModule",{value:!0});var aL=sL(ze("fs")),i2=Rt(),o2=uL(Er()),u2=vr();Wr.default={order:100,canRead(e){return o2.isFileSystemPath(e.url)},async read(e){let t;try{t=o2.toFileSystemPath(e.url)}catch(r){throw new u2.ResolverError(i2.ono.uri(r,`Malformed URI: ${e.url}`),e.url)}try{return await aL.default.promises.readFile(t)}catch(r){throw new u2.ResolverError((0,i2.ono)(r,`Error opening file "${t}"`),t)}}}});var l2=M(kn=>{"use strict";d();var cL=kn&&kn.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),lL=kn&&kn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),fL=kn&&kn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&cL(r,t,n[o]);return lL(r,t),r}})();Object.defineProperty(kn,"__esModule",{value:!0});var nf=Rt(),Qs=fL(Er()),a2=vr();kn.default={order:200,headers:null,timeout:6e4,redirects:5,withCredentials:!1,canRead(e){return Qs.isHttp(e.url)},read(e){let t=Qs.parse(e.url);return typeof window<"u"&&!t.protocol&&(t.protocol=Qs.parse(location.href).protocol),c2(t,this)}};async function c2(e,t,r){e=Qs.parse(e);let n=r||[];n.push(e.href);try{let o=await pL(e,t);if(o.status>=400)throw(0,nf.ono)({status:o.status},`HTTP ERROR ${o.status}`);if(o.status>=300){if(!Number.isNaN(t.redirects)&&n.length>t.redirects)throw new a2.ResolverError((0,nf.ono)({status:o.status},`Error downloading ${n[0]}.
|
|
113
|
+
Too many redirects:
|
|
114
|
+
${n.join(`
|
|
115
|
+
`)}`));if(!("location"in o.headers)||!o.headers.location)throw(0,nf.ono)({status:o.status},`HTTP ${o.status} redirect with no location header`);{let s=Qs.resolve(e.href,o.headers.location);return c2(s,t,n)}}else{if(o.body){let s=await o.arrayBuffer();return Buffer.from(s)}return Buffer.alloc(0)}}catch(o){throw new a2.ResolverError((0,nf.ono)(o,`Error downloading ${e.href}`),e.href)}}async function pL(e,t){let r,n;t.timeout&&(r=new AbortController,n=setTimeout(()=>r.abort(),t.timeout));let o=await fetch(e,{method:"GET",headers:t.headers||{},credentials:t.withCredentials?"include":"same-origin",signal:r?r.signal:null});return n&&clearTimeout(n),o}});var Dm=M(qn=>{"use strict";d();var vu=qn&&qn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qn,"__esModule",{value:!0});qn.getNewOptions=qn.getJsonSchemaRefParserDefaultOptions=void 0;var dL=vu(e2()),DL=vu(t2()),hL=vu(r2()),mL=vu(n2()),gL=vu(s2()),_L=vu(l2()),yL=()=>({parse:{json:{...dL.default},yaml:{...DL.default},text:{...hL.default},binary:{...mL.default}},resolve:{file:{...gL.default},http:{..._L.default},external:!0},continueOnError:!1,dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative"},mutateInputSchema:!0});qn.getJsonSchemaRefParserDefaultOptions=yL;var FL=e=>{let t=(0,qn.getJsonSchemaRefParserDefaultOptions)();return e&&p2(t,e),t};qn.getNewOptions=FL;function p2(e,t){if(f2(t)){let r=Object.keys(t).filter(n=>!["__proto__","constructor","prototype"].includes(n));for(let n=0;n<r.length;n++){let o=r[n],s=t[o],a=e[o];f2(s)?e[o]=p2(a||{},s):s!==void 0&&(e[o]=s)}}return e}function f2(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}});var D2=M(of=>{"use strict";d();Object.defineProperty(of,"__esModule",{value:!0});of.normalizeArgs=d2;var EL=Dm();function d2(e){let t,r,n,o,s=Array.prototype.slice.call(e);typeof s[s.length-1]=="function"&&(o=s.pop()),typeof s[0]=="string"?(t=s[0],typeof s[2]=="object"?(r=s[1],n=s[2]):(r=void 0,n=s[1])):(t="",r=s[0],n=s[1]);try{n=(0,EL.getNewOptions)(n)}catch(a){console.error(`JSON Schema Ref Parser: Error normalizing options: ${a}`)}return!n.mutateInputSchema&&typeof r=="object"&&(r=JSON.parse(JSON.stringify(r))),{path:t,schema:r,options:n,callback:o}}of.default=d2});var h2=M(Hr=>{"use strict";d();var vL=Hr&&Hr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),CL=Hr&&Hr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),wL=Hr&&Hr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&vL(r,t,n[o]);return CL(r,t),r}})(),hm=Hr&&Hr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hr,"__esModule",{value:!0});var bL=hm(Fu()),AL=hm(Js()),SL=hm(lm()),Cu=wL(Er()),xL=vr();function PL(e,t){if(!t.resolve?.external)return Promise.resolve();try{let r=mm(e.schema,e.$refs._root$Ref.path+"#",e.$refs,t);return Promise.all(r)}catch(r){return Promise.reject(r)}}function mm(e,t,r,n,o,s){o||(o=new Set);let a=[];if(e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!o.has(e)){o.add(e),bL.default.isExternal$Ref(e)&&a.push(OL(e,t,r,n));let l=Object.keys(e);for(let p of l){let m=AL.default.join(t,p),g=e[p];a=a.concat(mm(g,m,r,n,o,s))}}return a}async function OL(e,t,r,n){let o=n.dereference?.externalReferenceResolution==="root",s=Cu.resolve(o?Cu.cwd():t,e.$ref),a=Cu.stripHash(s),l=r._$refs[a];if(l)return Promise.resolve(l.value);try{let p=await(0,SL.default)(s,r,n),m=mm(p,a+"#",r,n,new Set,!0);return Promise.all(m)}catch(p){if(!n?.continueOnError||!(0,xL.isHandledError)(p))throw p;return r._$refs[a]&&(p.source=decodeURI(Cu.stripHash(t)),p.path=Cu.safePointerToPath(Cu.getHash(t))),[]}}Hr.default=PL});var _2=M(zr=>{"use strict";d();var TL=zr&&zr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),BL=zr&&zr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),IL=zr&&zr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&TL(r,t,n[o]);return BL(r,t),r}})(),g2=zr&&zr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zr,"__esModule",{value:!0});var uf=g2(Fu()),ea=g2(Js()),gm=IL(Er());function RL(e,t){let r=[];_m(e,"schema",e.$refs._root$Ref.path+"#","#",0,r,e.$refs,t),ML(r)}function _m(e,t,r,n,o,s,a,l){let p=t===null?e:e[t];if(p&&typeof p=="object"&&!ArrayBuffer.isView(p))if(uf.default.isAllowed$Ref(p))m2(e,t,r,n,o,s,a,l);else{let m=Object.keys(p).sort((g,F)=>g==="definitions"?-1:F==="definitions"?1:g.length-F.length);for(let g of m){let F=ea.default.join(r,g),w=ea.default.join(n,g),v=p[g];uf.default.isAllowed$Ref(v)?m2(p,g,r,w,o,s,a,l):_m(p,g,F,w,o,s,a,l)}}}function m2(e,t,r,n,o,s,a,l){let p=t===null?e:e[t],m=gm.resolve(r,p.$ref),g=a._resolve(m,n,l);if(g===null)return;let w=ea.default.parse(n).length,v=gm.stripHash(g.path),x=gm.getHash(g.path),O=v!==a._root$Ref.path,P=uf.default.isExtended$Ref(p);o+=g.indirections;let B=NL(s,e,t);if(B)if(w<B.depth||o<B.indirections)jL(s,B);else return;s.push({$ref:p,parent:e,key:t,pathFromRoot:n,depth:w,file:v,hash:x,value:g.value,circular:g.circular,extended:P,external:O,indirections:o}),(!B||O)&&_m(g.value,null,g.path,n,o+1,s,a,l)}function ML(e){e.sort((o,s)=>{if(o.file!==s.file)return o.file<s.file?-1:1;if(o.hash!==s.hash)return o.hash<s.hash?-1:1;if(o.circular!==s.circular)return o.circular?-1:1;if(o.extended!==s.extended)return o.extended?1:-1;if(o.indirections!==s.indirections)return o.indirections-s.indirections;if(o.depth!==s.depth)return o.depth-s.depth;{let a=o.pathFromRoot.lastIndexOf("/definitions"),l=s.pathFromRoot.lastIndexOf("/definitions");return a!==l?l-a:o.pathFromRoot.length-s.pathFromRoot.length}});let t,r,n;for(let o of e)o.external?o.file===t&&o.hash===r?o.$ref.$ref=n:o.file===t&&o.hash.indexOf(r+"/")===0?o.$ref.$ref=ea.default.join(n,ea.default.parse(o.hash.replace(r,"#"))):(t=o.file,r=o.hash,n=o.pathFromRoot,o.$ref=o.parent[o.key]=uf.default.dereference(o.$ref,o.value),o.circular&&(o.$ref.$ref=o.pathFromRoot)):o.$ref.$ref=o.hash}function NL(e,t,r){for(let n of e)if(n&&n.parent===t&&n.key===r)return n}function jL(e,t){let r=e.indexOf(t);e.splice(r,1)}zr.default=RL});var w2=M(Vr=>{"use strict";d();var $L=Vr&&Vr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),LL=Vr&&Vr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),UL=Vr&&Vr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&$L(r,t,n[o]);return LL(r,t),r}})(),v2=Vr&&Vr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vr,"__esModule",{value:!0});var sf=v2(Fu()),y2=v2(Js()),kL=Rt(),F2=UL(Er()),qL=vr();Vr.default=WL;function WL(e,t){let r=Date.now(),n=ym(e.schema,e.$refs._root$Ref.path,"#",new Set,new Set,new Map,e.$refs,t,r);e.$refs.circular=n.circular,e.schema=n.value}function ym(e,t,r,n,o,s,a,l,p){let m,g={value:e,circular:!1};if(l&&l.timeoutMs&&Date.now()-p>l.timeoutMs)throw new qL.TimeoutError(l.timeoutMs);let F=l.dereference||{},w=F.excludedPathMatcher||(()=>!1);if((F?.circular==="ignore"||!o.has(e))&&e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!w(r)){if(n.add(e),o.add(e),sf.default.isAllowed$Ref(e,l))m=E2(e,t,r,n,o,s,a,l,p),g.circular=m.circular,g.value=m.value;else for(let v of Object.keys(e)){let x=y2.default.join(t,v),O=y2.default.join(r,v);if(w(O))continue;let P=e[v],B=!1;sf.default.isAllowed$Ref(P,l)?(m=E2(P,x,O,n,o,s,a,l,p),B=m.circular,e[v]!==m.value&&(e[v]=m.value,F?.onDereference?.(P.$ref,e[v],e,v))):n.has(P)?B=C2(x,a,l):(m=ym(P,x,O,n,o,s,a,l,p),B=m.circular,e[v]!==m.value&&(e[v]=m.value)),g.circular=g.circular||B}n.delete(e)}return g}function E2(e,t,r,n,o,s,a,l,p){let g=sf.default.isExternal$Ref(e)&&l?.dereference?.externalReferenceResolution==="root",F=F2.resolve(g?F2.cwd():t,e.$ref),w=s.get(F);if(w&&!w.circular){let U=Object.keys(e);if(U.length>1){let q={};for(let Y of U)Y!=="$ref"&&!(Y in w.value)&&(q[Y]=e[Y]);return{circular:w.circular,value:Object.assign({},w.value,q)}}return w}let v=a._resolve(F,t,l);if(v===null)return{circular:!1,value:null};let x=v.circular,O=x||n.has(v.value);O&&C2(t,a,l);let P=sf.default.dereference(e,v.value);if(!O){let U=ym(P,v.path,r,n,o,s,a,l,p);O=U.circular,P=U.value}O&&!x&&l.dereference?.circular==="ignore"&&(P=e),x&&(P.$ref=r);let B={circular:O,value:P};return Object.keys(e).length===1&&s.set(F,B),B}function C2(e,t,r){if(t.circular=!0,!r.dereference.circular)throw kL.ono.reference(`Circular $ref pointer found at ${e}`);return!0}});var b2=M(Fm=>{"use strict";d();Object.defineProperty(Fm,"__esModule",{value:!0});function HL(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}Fm.default=HL()});var S2=M(ta=>{"use strict";d();var zL=ta&&ta.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ta,"__esModule",{value:!0});ta.default=VL;var A2=zL(b2());function VL(e,t){if(e){t.then(function(r){(0,A2.default)(function(){e(null,r)})},function(r){(0,A2.default)(function(){e(r)})});return}else return t}});var T2=M(oe=>{"use strict";d();var KL=oe&&oe.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),GL=oe&&oe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),YL=oe&&oe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&KL(r,t,n[o]);return GL(r,t),r}})(),yo=oe&&oe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oe,"__esModule",{value:!0});oe.getJsonSchemaRefParserDefaultOptions=oe.jsonSchemaParserNormalizeArgs=oe.dereferenceInternal=oe.JSONParserErrorGroup=oe.isHandledError=oe.UnmatchedParserError=oe.ParserError=oe.ResolverError=oe.MissingPointerError=oe.InvalidPointerError=oe.JSONParserError=oe.UnmatchedResolverError=oe.dereference=oe.bundle=oe.resolve=oe.parse=oe.$RefParser=void 0;var x2=yo(Yb()),JL=yo(lm()),ra=yo(D2());oe.jsonSchemaParserNormalizeArgs=ra.default;var XL=yo(h2()),ZL=yo(_2()),O2=yo(w2());oe.dereferenceInternal=O2.default;var _o=YL(Er()),Cr=vr();Object.defineProperty(oe,"JSONParserError",{enumerable:!0,get:function(){return Cr.JSONParserError}});Object.defineProperty(oe,"InvalidPointerError",{enumerable:!0,get:function(){return Cr.InvalidPointerError}});Object.defineProperty(oe,"MissingPointerError",{enumerable:!0,get:function(){return Cr.MissingPointerError}});Object.defineProperty(oe,"ResolverError",{enumerable:!0,get:function(){return Cr.ResolverError}});Object.defineProperty(oe,"ParserError",{enumerable:!0,get:function(){return Cr.ParserError}});Object.defineProperty(oe,"UnmatchedParserError",{enumerable:!0,get:function(){return Cr.UnmatchedParserError}});Object.defineProperty(oe,"UnmatchedResolverError",{enumerable:!0,get:function(){return Cr.UnmatchedResolverError}});Object.defineProperty(oe,"isHandledError",{enumerable:!0,get:function(){return Cr.isHandledError}});Object.defineProperty(oe,"JSONParserErrorGroup",{enumerable:!0,get:function(){return Cr.JSONParserErrorGroup}});var P2=Rt(),Kr=yo(S2()),QL=Dm();Object.defineProperty(oe,"getJsonSchemaRefParserDefaultOptions",{enumerable:!0,get:function(){return QL.getJsonSchemaRefParserDefaultOptions}});var xi=class e{constructor(){this.schema=null,this.$refs=new x2.default}async parse(){let t=(0,ra.default)(arguments),r;if(!t.path&&!t.schema){let o=(0,P2.ono)(`Expected a file path, URL, or object. Got ${t.path||t.schema}`);return(0,Kr.default)(t.callback,Promise.reject(o))}this.schema=null,this.$refs=new x2.default;let n="http";if(_o.isFileSystemPath(t.path))t.path=_o.fromFileSystemPath(t.path),n="file";else if(!t.path&&t.schema&&"$id"in t.schema&&t.schema.$id){let o=_o.parse(t.schema.$id),s=o.protocol==="https:"?443:80;t.path=`${o.protocol}//${o.hostname}:${s}`}if(t.path=_o.resolve(_o.cwd(),t.path),t.schema&&typeof t.schema=="object"){let o=this.$refs._add(t.path);o.value=t.schema,o.pathType=n,r=Promise.resolve(t.schema)}else r=(0,JL.default)(t.path,this.$refs,t.options);try{let o=await r;if(o!==null&&typeof o=="object"&&!Buffer.isBuffer(o))return this.schema=o,(0,Kr.default)(t.callback,Promise.resolve(this.schema));if(t.options.continueOnError)return this.schema=null,(0,Kr.default)(t.callback,Promise.resolve(this.schema));throw P2.ono.syntax(`"${this.$refs._root$Ref.path||o}" is not a valid JSON Schema`)}catch(o){return!t.options.continueOnError||!(0,Cr.isHandledError)(o)?(0,Kr.default)(t.callback,Promise.reject(o)):(this.$refs._$refs[_o.stripHash(t.path)]&&this.$refs._$refs[_o.stripHash(t.path)].addError(o),(0,Kr.default)(t.callback,Promise.resolve(null)))}}static parse(){let t=new e;return t.parse.apply(t,arguments)}async resolve(){let t=(0,ra.default)(arguments);try{return await this.parse(t.path,t.schema,t.options),await(0,XL.default)(this,t.options),Em(this),(0,Kr.default)(t.callback,Promise.resolve(this.$refs))}catch(r){return(0,Kr.default)(t.callback,Promise.reject(r))}}static resolve(){let t=new e;return t.resolve.apply(t,arguments)}static bundle(){let t=new e;return t.bundle.apply(t,arguments)}async bundle(){let t=(0,ra.default)(arguments);try{return await this.resolve(t.path,t.schema,t.options),(0,ZL.default)(this,t.options),Em(this),(0,Kr.default)(t.callback,Promise.resolve(this.schema))}catch(r){return(0,Kr.default)(t.callback,Promise.reject(r))}}static dereference(){let t=new e;return t.dereference.apply(t,arguments)}async dereference(){let t=(0,ra.default)(arguments);try{return await this.resolve(t.path,t.schema,t.options),(0,O2.default)(this,t.options),Em(this),(0,Kr.default)(t.callback,Promise.resolve(this.schema))}catch(r){return(0,Kr.default)(t.callback,Promise.reject(r))}}};oe.$RefParser=xi;oe.default=xi;function Em(e){if(Cr.JSONParserErrorGroup.getParserErrors(e).length>0)throw new Cr.JSONParserErrorGroup(e)}oe.parse=xi.parse;oe.resolve=xi.resolve;oe.bundle=xi.bundle;oe.dereference=xi.dereference});var B2=M(wu=>{"use strict";d();var eU=wu&&wu.__awaiter||function(e,t,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function l(g){try{m(n.next(g))}catch(F){a(F)}}function p(g){try{m(n.throw(g))}catch(F){a(F)}}function m(g){g.done?s(g.value):o(g.value).then(l,p)}m((n=n.apply(e,t||[])).next())})};Object.defineProperty(wu,"__esModule",{value:!0});wu.dereference=void 0;var tU=T2(),rU=wi();function nU(e,t){return eU(this,arguments,void 0,function*(r,{cwd:n,$refOptions:o}){(0,rU.log)("green","dereferencer","Dereferencing input schema:",n,r);let s=new tU.$RefParser,a=new WeakMap,l=yield s.dereference(n,r,Object.assign(Object.assign({},o),{dereference:Object.assign(Object.assign({},o.dereference),{onDereference(p,m){a.set(m,p)}})}));return{dereferencedPaths:a,dereferencedSchema:l}})}wu.dereference=nU});var I2=M(af=>{"use strict";d();Object.defineProperty(af,"__esModule",{value:!0});af.validate=void 0;var iU=wi(),Fo=new Map;Fo.set("Enum members and tsEnumNames must be of the same length",e=>{if(e.enum&&e.tsEnumNames&&e.enum.length!==e.tsEnumNames.length)return!1});Fo.set("tsEnumNames must be an array of strings",e=>{if(e.tsEnumNames&&e.tsEnumNames.some(t=>typeof t!="string"))return!1});Fo.set("When both maxItems and minItems are present, maxItems >= minItems",e=>{let{maxItems:t,minItems:r}=e;if(typeof t=="number"&&typeof r=="number")return t>=r});Fo.set("When maxItems exists, maxItems >= 0",e=>{let{maxItems:t}=e;if(typeof t=="number")return t>=0});Fo.set("When minItems exists, minItems >= 0",e=>{let{minItems:t}=e;if(typeof t=="number")return t>=0});Fo.set("deprecated must be a boolean",e=>{let t=typeof e.deprecated;return t==="boolean"||t==="undefined"});function oU(e,t){let r=[];return Fo.forEach((n,o)=>{(0,iU.traverse)(e,(s,a)=>(n(s)===!1&&r.push(`Error at key "${a}" in file "${t}": ${o}`),s))}),r}af.validate=oU});var M2=M(cf=>{"use strict";d();Object.defineProperty(cf,"__esModule",{value:!0});cf.link=void 0;var R2=co(),uU=Nn();function vm(e,t=null){if(!Array.isArray(e)&&!(0,uU.isPlainObject)(e)||e.hasOwnProperty(R2.Parent))return e;Object.defineProperty(e,R2.Parent,{enumerable:!1,value:t,writable:!1}),Array.isArray(e)&&e.forEach(r=>vm(r,e));for(let r in e)vm(e[r],e);return e}cf.link=vm});var N2=M(lf=>{"use strict";d();Object.defineProperty(lf,"__esModule",{value:!0});lf.validateOptions=void 0;function sU({maxItems:e}){if(e!==void 0&&e<-1)throw RangeError(`Expected options.maxItems to be >= -1, but was given ${e}.`)}lf.validateOptions=sU});var Rh=M(Wt=>{"use strict";d();var aU=Wt&&Wt.__awaiter||function(e,t,r,n){function o(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function l(g){try{m(n.next(g))}catch(F){a(F)}}function p(g){try{m(n.throw(g))}catch(F){a(F)}}function m(g){g.done?s(g.value):o(g.value).then(l,p)}m((n=n.apply(e,t||[])).next())})};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.ValidationError=Wt.compile=Wt.compileFromFile=Wt.DEFAULT_OPTIONS=void 0;var cU=ze("fs"),Cm=Nn(),lU=ze("path"),fU=WC(),pU=Ih(),dU=db(),DU=mb(),hU=_b(),mU=B2(),ir=wi(),gU=I2(),_U=ze("util"),yU=M2(),FU=N2();Wt.DEFAULT_OPTIONS={$refOptions:{},additionalProperties:!0,bannerComment:`/* eslint-disable */
|
|
116
|
+
/**
|
|
117
|
+
* This file was automatically generated by json-schema-to-typescript.
|
|
118
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
119
|
+
* and run json-schema-to-typescript to regenerate this file.
|
|
120
|
+
*/`,cwd:process.cwd(),declareExternallyReferenced:!0,enableConstEnums:!0,inferStringEnumKeysFromValues:!1,format:!0,ignoreMinAndMaxItems:!1,maxItems:20,strictIndexSignatures:!1,style:{bracketSpacing:!1,printWidth:120,semi:!0,singleQuote:!1,tabWidth:2,trailingComma:"none",useTabs:!1},unreachableDefinitions:!1,unknownAny:!0};function EU(e,t=Wt.DEFAULT_OPTIONS){let r=vU(e);return j2(r,(0,ir.stripExtension)(e),Object.assign({cwd:(0,lU.dirname)(e)},t))}Wt.compileFromFile=EU;function vU(e){let t=(0,ir.Try)(()=>(0,cU.readFileSync)(e),()=>{throw new ReferenceError(`Unable to read file "${e}"`)});return(0,ir.parseFileAsJSONSchema)(e,t.toString())}function j2(e,t){return aU(this,arguments,void 0,function*(r,n,o={}){(0,FU.validateOptions)(o);let s=(0,Cm.merge)({},Wt.DEFAULT_OPTIONS,o),a=Date.now();function l(){return`(${Date.now()-a}ms)`}(0,Cm.endsWith)(s.cwd,"/")||(s.cwd+="/");let p=(0,Cm.cloneDeep)(r),{dereferencedPaths:m,dereferencedSchema:g}=yield(0,mU.dereference)(p,s);process.env.VERBOSE&&((0,_U.isDeepStrictEqual)(p,g)?(0,ir.log)("green","dereferencer",l(),"\u2705 No change"):(0,ir.log)("green","dereferencer",l(),"\u2705 Result:",g));let F=(0,yU.link)(g);process.env.VERBOSE&&(0,ir.log)("green","linker",l(),"\u2705 No change");let w=(0,gU.validate)(F,n);if(w.length)throw w.forEach(U=>(0,ir.error)(U)),new ff;process.env.VERBOSE&&(0,ir.log)("green","validator",l(),"\u2705 No change");let v=(0,dU.normalize)(F,m,n,s);(0,ir.log)("yellow","normalizer",l(),"\u2705 Result:",v);let x=(0,hU.parse)(v,s);(0,ir.log)("blue","parser",l(),"\u2705 Result:",x);let O=(0,DU.optimize)(x,s);(0,ir.log)("cyan","optimizer",l(),"\u2705 Result:",O);let P=(0,pU.generate)(O,s);(0,ir.log)("magenta","generator",l(),"\u2705 Result:",P);let B=yield(0,fU.format)(P,s);return(0,ir.log)("white","formatter",l(),"\u2705 Result:",B),B})}Wt.compile=j2;var ff=class extends Error{};Wt.ValidationError=ff});var xm=M(oa=>{"use strict";d();var uk=oa&&oa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oa,"__esModule",{value:!0});oa.default=sk;var D1=uk(ze("path"));function sk(e){return e.startsWith("\\\\?\\")?e:e.split(D1.default?.win32?.sep).join(D1.default?.posix?.sep??"/")}});var h1=M(df=>{"use strict";d();Object.defineProperty(df,"__esModule",{value:!0});df.isWindows=void 0;var ak=/^win/.test(globalThis.process?globalThis.process.platform:""),ck=()=>ak;df.isWindows=ck});var wr=M(Ue=>{"use strict";d();var lk=Ue&&Ue.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),fk=Ue&&Ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),pk=Ue&&Ue.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&lk(r,t,n[o]);return fk(r,t),r}})(),dk=Ue&&Ue.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.parse=void 0;Ue.resolve=m1;Ue.cwd=g1;Ue.getProtocol=Im;Ue.getExtension=Ek;Ue.stripQuery=_1;Ue.getHash=y1;Ue.stripHash=Tm;Ue.isHttp=vk;Ue.isFileSystemPath=Bm;Ue.fromFileSystemPath=Ck;Ue.toFileSystemPath=wk;Ue.safePointerToPath=bk;Ue.relative=Ak;var hf=dk(xm()),Om=pk(ze("path")),Dk=/\//g,hk=/^(\w{2,}):\/\//i,mk=/~1/g,gk=/~0/g,_k=ze("path"),Df=h1(),yk=[[/\?/g,"%3F"],[/#/g,"%23"]],Pm=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],Fk=e=>new URL(e);Ue.parse=Fk;function m1(e,t){let r=new URL((0,hf.default)(e),"https://aaa.nonexistanturl.com"),n=new URL((0,hf.default)(t),r),o=t.match(/(\s*)$/)?.[1]||"";if(n.hostname==="aaa.nonexistanturl.com"){let{pathname:s,search:a,hash:l}=n;return s+a+l+o}return n.toString()+o}function g1(){if(typeof window<"u")return location.href;let e=process.cwd(),t=e.slice(-1);return t==="/"||t==="\\"?e:e+"/"}function Im(e){let t=hk.exec(e||"");if(t)return t[1].toLowerCase()}function Ek(e){let t=e.lastIndexOf(".");return t>=0?_1(e.substr(t).toLowerCase()):""}function _1(e){let t=e.indexOf("?");return t>=0&&(e=e.substr(0,t)),e}function y1(e){if(!e)return"#";let t=e.indexOf("#");return t>=0?e.substring(t):"#"}function Tm(e){if(!e)return"";let t=e.indexOf("#");return t>=0&&(e=e.substring(0,t)),e}function vk(e){let t=Im(e);return t==="http"||t==="https"?!0:t===void 0?typeof window<"u":!1}function Bm(e){if(typeof window<"u"||typeof process<"u"&&process.browser)return!1;let t=Im(e);return t===void 0||t==="file"}function Ck(e){if((0,Df.isWindows)()){let t=g1(),r=e.toUpperCase(),o=(0,hf.default)(t).toUpperCase(),s=r.includes(o),a=r.includes(o),l=Om.win32?.isAbsolute(e)||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://");!(s||a||l)&&!t.startsWith("http")&&(e=(0,_k.join)(t,e)),e=(0,hf.default)(e)}e=encodeURI(e);for(let t of yk)e=e.replace(t[0],t[1]);return e}function wk(e,t){e=decodeURI(e);for(let n=0;n<Pm.length;n+=2)e=e.replace(Pm[n],Pm[n+1]);let r=e.substr(0,7).toLowerCase()==="file://";return r&&(e=e[7]==="/"?e.substr(8):e.substr(7),(0,Df.isWindows)()&&e[1]==="/"&&(e=e[0]+":"+e.substr(1)),t?e="file:///"+e:(r=!1,e=(0,Df.isWindows)()?e:"/"+e)),(0,Df.isWindows)()&&!r&&(e=e.replace(Dk,"\\"),e.substr(1,2)===":\\"&&(e=e[0].toUpperCase()+e.substr(1))),e}function bk(e){return e.length<=1||e[0]!=="#"||e[1]!=="/"?[]:e.slice(2).split("/").map(t=>decodeURIComponent(t).replace(mk,"/").replace(gk,"~"))}function Ak(e,t){if(!Bm(e)||!Bm(t))return m1(e,t);let r=Om.default.dirname(Tm(e)),n=Tm(t);return Om.default.relative(r,n)+y1(t)}});var br=M(Je=>{"use strict";d();Object.defineProperty(Je,"__esModule",{value:!0});Je.InvalidPointerError=Je.TimeoutError=Je.MissingPointerError=Je.UnmatchedResolverError=Je.ResolverError=Je.UnmatchedParserError=Je.ParserError=Je.JSONParserErrorGroup=Je.JSONParserError=void 0;Je.isHandledError=Sk;Je.normalizeError=xk;var F1=Rt(),mf=wr(),Gr=class extends Error{constructor(t,r){super(),this.code="EUNKNOWN",this.name="JSONParserError",this.message=t,this.source=r,this.path=null,F1.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}};Je.JSONParserError=Gr;var gf=class e extends Error{constructor(t){super(),this.files=t,this.name="JSONParserErrorGroup",this.message=`${this.errors.length} error${this.errors.length>1?"s":""} occurred while reading '${(0,mf.toFileSystemPath)(t.$refs._root$Ref.path)}'`,F1.Ono.extend(this)}static getParserErrors(t){let r=[];for(let n of Object.values(t.$refs._$refs))n.errors&&r.push(...n.errors);return r}get errors(){return e.getParserErrors(this.files)}};Je.JSONParserErrorGroup=gf;var Rm=class extends Gr{constructor(t,r){super(`Error parsing ${r}: ${t}`,r),this.code="EPARSER",this.name="ParserError"}};Je.ParserError=Rm;var Mm=class extends Gr{constructor(t){super(`Could not find parser for "${t}"`,t),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}};Je.UnmatchedParserError=Mm;var Nm=class extends Gr{constructor(t,r){super(t.message||`Error reading file "${r}"`,r),this.code="ERESOLVER",this.name="ResolverError","code"in t&&(this.ioErrorCode=String(t.code))}};Je.ResolverError=Nm;var jm=class extends Gr{constructor(t){super(`Could not find resolver for "${t}"`,t),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}};Je.UnmatchedResolverError=jm;var $m=class extends Gr{constructor(t,r,n,o,s){super(`Missing $ref pointer "${(0,mf.getHash)(r)}". Token "${t}" does not exist.`,(0,mf.stripHash)(r)),this.code="EMISSINGPOINTER",this.name="MissingPointerError",this.targetToken=t,this.targetRef=n,this.targetFound=o,this.parentPath=s}};Je.MissingPointerError=$m;var Lm=class extends Gr{constructor(t){super(`Dereferencing timeout reached: ${t}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}};Je.TimeoutError=Lm;var Um=class extends Gr{constructor(t,r){super(`Invalid $ref pointer "${t}". Pointers must begin with "#/"`,(0,mf.stripHash)(r)),this.code="EUNMATCHEDRESOLVER",this.name="InvalidPointerError"}};Je.InvalidPointerError=Um;function Sk(e){return e instanceof Gr||e instanceof gf}function xk(e){return e.path===null&&(e.path=[]),e}});var ua=M(Ht=>{"use strict";d();var Pk=Ht&&Ht.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Ok=Ht&&Ht.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Tk=Ht&&Ht.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&Pk(r,t,n[o]);return Ok(r,t),r}})(),Bk=Ht&&Ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ht,"__esModule",{value:!0});Ht.nullSymbol=void 0;var km=Bk(Au()),qm=Tk(wr()),yf=br();Ht.nullSymbol=Symbol("null");var Ik=/\//g,Rk=/~/g,Mk=/~1/g,Nk=/~0/g,jk=e=>{try{return decodeURIComponent(e)}catch{return e}},Ff=class e{constructor(t,r,n){this.$ref=t,this.path=r,this.originalPath=n||r,this.value=void 0,this.circular=!1,this.indirections=0}resolve(t,r,n){let o=e.parse(this.path,this.originalPath),s=[];this.value=v1(t);for(let a=0;a<o.length;a++){if(_f(this,r,n)&&(this.path=e.join(this.path,o.slice(a))),typeof this.value=="object"&&this.value!==null&&!C1(n)&&"$ref"in this.value)return this;let l=o[a];if(this.value[l]===void 0||this.value[l]===null&&a===o.length-1){let p=!1;for(let v=o.length-1;v>a;v--){let x=o.slice(a,v+1).join("/");if(this.value[x]!==void 0){this.value=this.value[x],a=v,p=!0;break}}if(p)continue;if(l in this.value&&this.value[l]===null){this.value=Ht.nullSymbol;continue}this.value=null;let m=this.$ref.path||"",g=this.path.replace(m,""),F=e.join("",s),w=n?.replace(m,"");throw new yf.MissingPointerError(l,decodeURI(this.originalPath),g,F,w)}else this.value=this.value[l];s.push(l)}return(!this.value||this.value.$ref&&qm.resolve(this.path,this.value.$ref)!==n)&&_f(this,r,n),this}set(t,r,n){let o=e.parse(this.path),s;if(o.length===0)return this.value=r,r;this.value=v1(t);for(let a=0;a<o.length-1;a++)_f(this,n),s=o[a],this.value&&this.value[s]!==void 0?this.value=this.value[s]:this.value=E1(this,s,{});return _f(this,n),s=o[o.length-1],E1(this,s,r),t}static parse(t,r){let n=qm.getHash(t).substring(1);if(!n)return[];let o=n.split("/");for(let s=0;s<o.length;s++)o[s]=jk(o[s].replace(Mk,"/").replace(Nk,"~"));if(o[0]!=="")throw new yf.InvalidPointerError(n,r===void 0?t:r);return o.slice(1)}static join(t,r){t.indexOf("#")===-1&&(t+="#"),r=Array.isArray(r)?r:[r];for(let n=0;n<r.length;n++){let o=r[n];t+="/"+encodeURIComponent(o.replace(Rk,"~0").replace(Ik,"~1"))}return t}};function _f(e,t,r){if(km.default.isAllowed$Ref(e.value,t)){let n=qm.resolve(e.path,e.value.$ref);if(n===e.path&&!C1(r))e.circular=!0;else{let o=e.$ref.$refs._resolve(n,e.path,t);return o===null?!1:(e.indirections+=o.indirections+1,km.default.isExtended$Ref(e.value)?(e.value=km.default.dereference(e.value,o.value),!1):(e.$ref=o.$ref,e.path=o.path,e.value=o.value,!0))}}}Ht.default=Ff;function E1(e,t,r){if(e.value&&typeof e.value=="object")t==="-"&&Array.isArray(e.value)?e.value.push(r):e.value[t]=r;else throw new yf.JSONParserError(`Error assigning $ref pointer "${e.path}".
|
|
121
|
+
Cannot set "${t}" of a non-object.`);return r}function v1(e){if((0,yf.isHandledError)(e))throw e;return e}function C1(e){return typeof e=="string"&&Ff.parse(e).length==0}});var Au=M(Wn=>{"use strict";d();var $k=Wn&&Wn.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Lk=Wn&&Wn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Uk=Wn&&Wn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&$k(r,t,n[o]);return Lk(r,t),r}})();Object.defineProperty(Wn,"__esModule",{value:!0});var Ef=Uk(ua()),vf=br(),Wm=wr(),Hm=class e{constructor(t){this.errors=[],this.$refs=t}addError(t){this.errors===void 0&&(this.errors=[]);let r=this.errors.map(({footprint:n})=>n);"errors"in t&&Array.isArray(t.errors)?this.errors.push(...t.errors.map(vf.normalizeError).filter(({footprint:n})=>!r.includes(n))):(!("footprint"in t)||!r.includes(t.footprint))&&this.errors.push((0,vf.normalizeError)(t))}exists(t,r){try{return this.resolve(t,r),!0}catch{return!1}}get(t,r){return this.resolve(t,r)?.value}resolve(t,r,n,o){let s=new Ef.default(this,t,n);try{let a=s.resolve(this.value,r,o);return a.value===Ef.nullSymbol&&(a.value=null),a}catch(a){if(!r||!r.continueOnError||!(0,vf.isHandledError)(a))throw a;return a.path===null&&(a.path=(0,Wm.safePointerToPath)((0,Wm.getHash)(o))),a instanceof vf.InvalidPointerError&&(a.source=decodeURI((0,Wm.stripHash)(o))),this.addError(a),null}}set(t,r){let n=new Ef.default(this,t);this.value=n.set(this.value,r),this.value===Ef.nullSymbol&&(this.value=null)}static is$Ref(t){return!!t&&typeof t=="object"&&t!==null&&"$ref"in t&&typeof t.$ref=="string"&&t.$ref.length>0}static isExternal$Ref(t){return e.is$Ref(t)&&t.$ref[0]!=="#"}static isAllowed$Ref(t,r){if(this.is$Ref(t)){if(t.$ref.substring(0,2)==="#/"||t.$ref==="#")return!0;if(t.$ref[0]!=="#"&&(!r||r.resolve?.external))return!0}}static isExtended$Ref(t){return e.is$Ref(t)&&Object.keys(t).length>1}static dereference(t,r){if(r&&typeof r=="object"&&e.isExtended$Ref(t)){let n={};for(let o of Object.keys(t))o!=="$ref"&&(n[o]=t[o]);for(let o of Object.keys(r))o in n||(n[o]=r[o]);return n}else return r}};Wn.default=Hm});var x1=M(Yr=>{"use strict";d();var kk=Yr&&Yr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),qk=Yr&&Yr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Wk=Yr&&Yr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&kk(r,t,n[o]);return qk(r,t),r}})(),S1=Yr&&Yr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yr,"__esModule",{value:!0});var w1=Rt(),Hk=S1(Au()),Pi=Wk(wr()),b1=S1(xm()),zm=class{paths(...t){return A1(this._$refs,t.flat()).map(n=>(0,b1.default)(n.decoded))}values(...t){let r=this._$refs;return A1(r,t.flat()).reduce((o,s)=>(o[(0,b1.default)(s.decoded)]=r[s.encoded].value,o),{})}exists(t,r){try{return this._resolve(t,"",r),!0}catch{return!1}}get(t,r){return this._resolve(t,"",r).value}set(t,r){let n=Pi.resolve(this._root$Ref.path,t),o=Pi.stripHash(n),s=this._$refs[o];if(!s)throw(0,w1.ono)(`Error resolving $ref pointer "${t}".
|
|
122
|
+
"${o}" not found.`);s.set(n,r)}_get$Ref(t){t=Pi.resolve(this._root$Ref.path,t);let r=Pi.stripHash(t);return this._$refs[r]}_add(t){let r=Pi.stripHash(t),n=new Hk.default(this);return n.path=r,this._$refs[r]=n,this._root$Ref=this._root$Ref||n,n}_resolve(t,r,n){let o=Pi.resolve(this._root$Ref.path,t),s=Pi.stripHash(o),a=this._$refs[s];if(!a)throw(0,w1.ono)(`Error resolving $ref pointer "${t}".
|
|
123
|
+
"${s}" not found.`);return a.resolve(o,n,t,r)}constructor(){this._$refs={},this.toJSON=this.values,this.circular=!1,this._$refs={},this._root$Ref=null}};Yr.default=zm;function A1(e,t){let r=Object.keys(e);return t=Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t),t.length>0&&t[0]&&(r=r.filter(n=>t.includes(e[n].pathType))),r.map(n=>({encoded:n,decoded:e[n].pathType==="file"?Pi.toFileSystemPath(n,!0):n}))}});var O1=M(Su=>{"use strict";d();Object.defineProperty(Su,"__esModule",{value:!0});Su.all=zk;Su.filter=Vk;Su.sort=Kk;Su.run=Gk;function zk(e){return Object.keys(e||{}).filter(t=>typeof e[t]=="object").map(t=>(e[t].name=t,e[t]))}function Vk(e,t,r){return e.filter(n=>!!P1(n,t,r))}function Kk(e){for(let t of e)t.order=t.order||Number.MAX_SAFE_INTEGER;return e.sort((t,r)=>t.order-r.order)}async function Gk(e,t,r,n){let o,s,a=0;return new Promise((l,p)=>{m();function m(){if(o=e[a++],!o)return p(s);try{let v=P1(o,t,r,g,n);if(v&&typeof v.then=="function")v.then(F,w);else if(v!==void 0)F(v);else if(a===e.length)throw new Error("No promise has been returned or callback has been called.")}catch(v){w(v)}}function g(v,x){v?w(v):F(x)}function F(v){l({plugin:o,result:v})}function w(v){s={plugin:o,error:v},m()}})}function P1(e,t,r,n,o){let s=e[t];if(typeof s=="function")return s.apply(e,[r,n,o]);if(!n){if(s instanceof RegExp)return s.test(r.url);if(typeof s=="string")return s===r.extension;if(Array.isArray(s))return s.indexOf(r.extension)!==-1}return s}});var Km=M(Hn=>{"use strict";d();var Yk=Hn&&Hn.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Jk=Hn&&Hn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),T1=Hn&&Hn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&Yk(r,t,n[o]);return Jk(r,t),r}})();Object.defineProperty(Hn,"__esModule",{value:!0});var Vm=Rt(),Xk=T1(wr()),Oi=T1(O1()),Eo=br();async function Zk(e,t,r){let n=e.indexOf("#"),o="";n>=0&&(o=e.substring(n),e=e.substring(0,n));let s=t._add(e),a={url:e,hash:o,extension:Xk.getExtension(e)};try{let l=await Qk(a,r,t);s.pathType=l.plugin.name,a.data=l.result;let p=await e4(a,r,t);return s.value=p.result,p.result}catch(l){throw(0,Eo.isHandledError)(l)&&(s.value=l),l}}async function Qk(e,t,r){let n=Oi.all(t.resolve);n=Oi.filter(n,"canRead",e),Oi.sort(n);try{return await Oi.run(n,"read",e,r)}catch(o){throw!o&&t.continueOnError?new Eo.UnmatchedResolverError(e.url):!o||!("error"in o)?Vm.ono.syntax(`Unable to resolve $ref pointer "${e.url}"`):o.error instanceof Eo.ResolverError?o.error:new Eo.ResolverError(o,e.url)}}async function e4(e,t,r){let n=Oi.all(t.parse),o=Oi.filter(n,"canParse",e),s=o.length>0?o:n;Oi.sort(s);try{let a=await Oi.run(s,"parse",e,r);if(!a.plugin.allowEmpty&&t4(a.result))throw Vm.ono.syntax(`Error parsing "${e.url}" as ${a.plugin.name}.
|
|
124
|
+
Parsed value is empty`);return a}catch(a){throw!a&&t.continueOnError?new Eo.UnmatchedParserError(e.url):a&&a.message&&a.message.startsWith("Error parsing")?a:!a||!("error"in a)?Vm.ono.syntax(`Unable to parse ${e.url}`):a.error instanceof Eo.ParserError?a.error:new Eo.ParserError(a.error.message,e.url)}}function t4(e){return e===void 0||typeof e=="object"&&Object.keys(e).length===0||typeof e=="string"&&e.trim().length===0||Buffer.isBuffer(e)&&e.length===0}Hn.default=Zk});var I1=M(Gm=>{"use strict";d();Object.defineProperty(Gm,"__esModule",{value:!0});var B1=br();Gm.default={order:100,allowEmpty:!0,canParse:".json",allowBOM:!0,async parse(e){let t=e.data;if(Buffer.isBuffer(t)&&(t=t.toString()),typeof t=="string"){if(t.trim().length===0)return;try{return JSON.parse(t)}catch(r){if(this.allowBOM)try{let n=t.indexOf("{");return t=t.slice(n),JSON.parse(t)}catch(n){throw new B1.ParserError(n.message,e.url)}throw new B1.ParserError(r.message,e.url)}}else return t}}});var R1=M(sa=>{"use strict";d();var r4=sa&&sa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sa,"__esModule",{value:!0});var n4=br(),i4=r4(fu()),o4=fu();sa.default={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],async parse(e){let t=e.data;if(Buffer.isBuffer(t)&&(t=t.toString()),typeof t=="string")try{return i4.default.load(t,{schema:o4.JSON_SCHEMA})}catch(r){throw new n4.ParserError(r?.message||"Parser Error",e.url)}else return t}}});var M1=M(Ym=>{"use strict";d();Object.defineProperty(Ym,"__esModule",{value:!0});var u4=br(),s4=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;Ym.default={order:300,allowEmpty:!0,encoding:"utf8",canParse(e){return(typeof e.data=="string"||Buffer.isBuffer(e.data))&&s4.test(e.url)},parse(e){if(typeof e.data=="string")return e.data;if(Buffer.isBuffer(e.data))return e.data.toString(this.encoding);throw new u4.ParserError("data is not text",e.url)}}});var N1=M(Jm=>{"use strict";d();Object.defineProperty(Jm,"__esModule",{value:!0});var a4=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;Jm.default={order:400,allowEmpty:!0,canParse(e){return Buffer.isBuffer(e.data)&&a4.test(e.url)},parse(e){return Buffer.isBuffer(e.data)?e.data:Buffer.from(e.data)}}});var U1=M(Jr=>{"use strict";d();var c4=Jr&&Jr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),l4=Jr&&Jr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),f4=Jr&&Jr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&c4(r,t,n[o]);return l4(r,t),r}})(),p4=Jr&&Jr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Jr,"__esModule",{value:!0});var d4=p4(ze("fs")),j1=Rt(),$1=f4(wr()),L1=br();Jr.default={order:100,canRead(e){return $1.isFileSystemPath(e.url)},async read(e){let t;try{t=$1.toFileSystemPath(e.url)}catch(r){throw new L1.ResolverError(j1.ono.uri(r,`Malformed URI: ${e.url}`),e.url)}try{return await d4.default.promises.readFile(t)}catch(r){throw new L1.ResolverError((0,j1.ono)(r,`Error opening file "${t}"`),t)}}}});var W1=M(zn=>{"use strict";d();var D4=zn&&zn.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),h4=zn&&zn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),m4=zn&&zn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&D4(r,t,n[o]);return h4(r,t),r}})();Object.defineProperty(zn,"__esModule",{value:!0});var Cf=Rt(),aa=m4(wr()),k1=br();zn.default={order:200,headers:null,timeout:6e4,redirects:5,withCredentials:!1,canRead(e){return aa.isHttp(e.url)},read(e){let t=aa.parse(e.url);return typeof window<"u"&&!t.protocol&&(t.protocol=aa.parse(location.href).protocol),q1(t,this)}};async function q1(e,t,r){e=aa.parse(e);let n=r||[];n.push(e.href);try{let o=await g4(e,t);if(o.status>=400)throw(0,Cf.ono)({status:o.status},`HTTP ERROR ${o.status}`);if(o.status>=300){if(!Number.isNaN(t.redirects)&&n.length>t.redirects)throw new k1.ResolverError((0,Cf.ono)({status:o.status},`Error downloading ${n[0]}.
|
|
125
|
+
Too many redirects:
|
|
126
|
+
${n.join(`
|
|
127
|
+
`)}`));if(!("location"in o.headers)||!o.headers.location)throw(0,Cf.ono)({status:o.status},`HTTP ${o.status} redirect with no location header`);{let s=aa.resolve(e.href,o.headers.location);return q1(s,t,n)}}else{if(o.body){let s=await o.arrayBuffer();return Buffer.from(s)}return Buffer.alloc(0)}}catch(o){throw new k1.ResolverError((0,Cf.ono)(o,`Error downloading ${e.href}`),e.href)}}async function g4(e,t){let r,n;t.timeout&&(r=new AbortController,n=setTimeout(()=>r.abort(),t.timeout));let o=await fetch(e,{method:"GET",headers:t.headers||{},credentials:t.withCredentials?"include":"same-origin",signal:r?r.signal:null});return n&&clearTimeout(n),o}});var Xm=M(Vn=>{"use strict";d();var xu=Vn&&Vn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vn,"__esModule",{value:!0});Vn.getNewOptions=Vn.getJsonSchemaRefParserDefaultOptions=void 0;var _4=xu(I1()),y4=xu(R1()),F4=xu(M1()),E4=xu(N1()),v4=xu(U1()),C4=xu(W1()),w4=()=>({parse:{json:{..._4.default},yaml:{...y4.default},text:{...F4.default},binary:{...E4.default}},resolve:{file:{...v4.default},http:{...C4.default},external:!0},continueOnError:!1,dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative"},mutateInputSchema:!0});Vn.getJsonSchemaRefParserDefaultOptions=w4;var b4=e=>{let t=(0,Vn.getJsonSchemaRefParserDefaultOptions)();return e&&z1(t,e),t};Vn.getNewOptions=b4;function z1(e,t){if(H1(t)){let r=Object.keys(t).filter(n=>!["__proto__","constructor","prototype"].includes(n));for(let n=0;n<r.length;n++){let o=r[n],s=t[o],a=e[o];H1(s)?e[o]=z1(a||{},s):s!==void 0&&(e[o]=s)}}return e}function H1(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}});var K1=M(wf=>{"use strict";d();Object.defineProperty(wf,"__esModule",{value:!0});wf.normalizeArgs=V1;var A4=Xm();function V1(e){let t,r,n,o,s=Array.prototype.slice.call(e);typeof s[s.length-1]=="function"&&(o=s.pop()),typeof s[0]=="string"?(t=s[0],typeof s[2]=="object"?(r=s[1],n=s[2]):(r=void 0,n=s[1])):(t="",r=s[0],n=s[1]);try{n=(0,A4.getNewOptions)(n)}catch(a){console.error(`JSON Schema Ref Parser: Error normalizing options: ${a}`)}return!n.mutateInputSchema&&typeof r=="object"&&(r=JSON.parse(JSON.stringify(r))),{path:t,schema:r,options:n,callback:o}}wf.default=V1});var G1=M(Xr=>{"use strict";d();var S4=Xr&&Xr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),x4=Xr&&Xr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),P4=Xr&&Xr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&S4(r,t,n[o]);return x4(r,t),r}})(),Zm=Xr&&Xr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xr,"__esModule",{value:!0});var O4=Zm(Au()),T4=Zm(ua()),B4=Zm(Km()),Pu=P4(wr()),I4=br();function R4(e,t){if(!t.resolve?.external)return Promise.resolve();try{let r=Qm(e.schema,e.$refs._root$Ref.path+"#",e.$refs,t);return Promise.all(r)}catch(r){return Promise.reject(r)}}function Qm(e,t,r,n,o,s){o||(o=new Set);let a=[];if(e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!o.has(e)){o.add(e),O4.default.isExternal$Ref(e)&&a.push(M4(e,t,r,n));let l=Object.keys(e);for(let p of l){let m=T4.default.join(t,p),g=e[p];a=a.concat(Qm(g,m,r,n,o,s))}}return a}async function M4(e,t,r,n){let o=n.dereference?.externalReferenceResolution==="root",s=Pu.resolve(o?Pu.cwd():t,e.$ref),a=Pu.stripHash(s),l=r._$refs[a];if(l)return Promise.resolve(l.value);try{let p=await(0,B4.default)(s,r,n),m=Qm(p,a+"#",r,n,new Set,!0);return Promise.all(m)}catch(p){if(!n?.continueOnError||!(0,I4.isHandledError)(p))throw p;return r._$refs[a]&&(p.source=decodeURI(Pu.stripHash(t)),p.path=Pu.safePointerToPath(Pu.getHash(t))),[]}}Xr.default=R4});var X1=M(Zr=>{"use strict";d();var N4=Zr&&Zr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),j4=Zr&&Zr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),$4=Zr&&Zr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&N4(r,t,n[o]);return j4(r,t),r}})(),J1=Zr&&Zr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zr,"__esModule",{value:!0});var bf=J1(Au()),ca=J1(ua()),eg=$4(wr());function L4(e,t){let r=[];tg(e,"schema",e.$refs._root$Ref.path+"#","#",0,r,e.$refs,t),U4(r)}function tg(e,t,r,n,o,s,a,l){let p=t===null?e:e[t];if(p&&typeof p=="object"&&!ArrayBuffer.isView(p))if(bf.default.isAllowed$Ref(p))Y1(e,t,r,n,o,s,a,l);else{let m=Object.keys(p).sort((g,F)=>g==="definitions"?-1:F==="definitions"?1:g.length-F.length);for(let g of m){let F=ca.default.join(r,g),w=ca.default.join(n,g),v=p[g];bf.default.isAllowed$Ref(v)?Y1(p,g,r,w,o,s,a,l):tg(p,g,F,w,o,s,a,l)}}}function Y1(e,t,r,n,o,s,a,l){let p=t===null?e:e[t],m=eg.resolve(r,p.$ref),g=a._resolve(m,n,l);if(g===null)return;let w=ca.default.parse(n).length,v=eg.stripHash(g.path),x=eg.getHash(g.path),O=v!==a._root$Ref.path,P=bf.default.isExtended$Ref(p);o+=g.indirections;let B=k4(s,e,t);if(B)if(w<B.depth||o<B.indirections)q4(s,B);else return;s.push({$ref:p,parent:e,key:t,pathFromRoot:n,depth:w,file:v,hash:x,value:g.value,circular:g.circular,extended:P,external:O,indirections:o}),(!B||O)&&tg(g.value,null,g.path,n,o+1,s,a,l)}function U4(e){e.sort((o,s)=>{if(o.file!==s.file)return o.file<s.file?-1:1;if(o.hash!==s.hash)return o.hash<s.hash?-1:1;if(o.circular!==s.circular)return o.circular?-1:1;if(o.extended!==s.extended)return o.extended?1:-1;if(o.indirections!==s.indirections)return o.indirections-s.indirections;if(o.depth!==s.depth)return o.depth-s.depth;{let a=o.pathFromRoot.lastIndexOf("/definitions"),l=s.pathFromRoot.lastIndexOf("/definitions");return a!==l?l-a:o.pathFromRoot.length-s.pathFromRoot.length}});let t,r,n;for(let o of e)o.external?o.file===t&&o.hash===r?o.$ref.$ref=n:o.file===t&&o.hash.indexOf(r+"/")===0?o.$ref.$ref=ca.default.join(n,ca.default.parse(o.hash.replace(r,"#"))):(t=o.file,r=o.hash,n=o.pathFromRoot,o.$ref=o.parent[o.key]=bf.default.dereference(o.$ref,o.value),o.circular&&(o.$ref.$ref=o.pathFromRoot)):o.$ref.$ref=o.hash}function k4(e,t,r){for(let n of e)if(n&&n.parent===t&&n.key===r)return n}function q4(e,t){let r=e.indexOf(t);e.splice(r,1)}Zr.default=L4});var nA=M(Qr=>{"use strict";d();var W4=Qr&&Qr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),H4=Qr&&Qr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),z4=Qr&&Qr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&W4(r,t,n[o]);return H4(r,t),r}})(),tA=Qr&&Qr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qr,"__esModule",{value:!0});var Af=tA(Au()),Z1=tA(ua()),V4=Rt(),Q1=z4(wr()),K4=br();Qr.default=G4;function G4(e,t){let r=Date.now(),n=rg(e.schema,e.$refs._root$Ref.path,"#",new Set,new Set,new Map,e.$refs,t,r);e.$refs.circular=n.circular,e.schema=n.value}function rg(e,t,r,n,o,s,a,l,p){let m,g={value:e,circular:!1};if(l&&l.timeoutMs&&Date.now()-p>l.timeoutMs)throw new K4.TimeoutError(l.timeoutMs);let F=l.dereference||{},w=F.excludedPathMatcher||(()=>!1);if((F?.circular==="ignore"||!o.has(e))&&e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!w(r)){if(n.add(e),o.add(e),Af.default.isAllowed$Ref(e,l))m=eA(e,t,r,n,o,s,a,l,p),g.circular=m.circular,g.value=m.value;else for(let v of Object.keys(e)){let x=Z1.default.join(t,v),O=Z1.default.join(r,v);if(w(O))continue;let P=e[v],B=!1;if(Af.default.isAllowed$Ref(P,l)){if(m=eA(P,x,O,n,o,s,a,l,p),B=m.circular,e[v]!==m.value){let U=new Map;F?.preservedProperties&&typeof e[v]=="object"&&!Array.isArray(e[v])&&F?.preservedProperties.forEach(q=>{q in e[v]&&U.set(q,e[v][q])}),e[v]=m.value,F?.preservedProperties&&U.size&&typeof e[v]=="object"&&!Array.isArray(e[v])&&U.forEach((q,Y)=>{e[v][Y]=q}),F?.onDereference?.(P.$ref,e[v],e,v)}}else n.has(P)?B=rA(x,a,l):(m=rg(P,x,O,n,o,s,a,l,p),B=m.circular,e[v]!==m.value&&(e[v]=m.value));g.circular=g.circular||B}n.delete(e)}return g}function eA(e,t,r,n,o,s,a,l,p){let g=Af.default.isExternal$Ref(e)&&l?.dereference?.externalReferenceResolution==="root",F=Q1.resolve(g?Q1.cwd():t,e.$ref),w=s.get(F);if(w&&!w.circular){let U=Object.keys(e);if(U.length>1){let q={};for(let Y of U)Y!=="$ref"&&!(Y in w.value)&&(q[Y]=e[Y]);return{circular:w.circular,value:Object.assign({},w.value,q)}}return w}let v=a._resolve(F,t,l);if(v===null)return{circular:!1,value:null};let x=v.circular,O=x||n.has(v.value);O&&rA(t,a,l);let P=Af.default.dereference(e,v.value);if(!O){let U=rg(P,v.path,r,n,o,s,a,l,p);O=U.circular,P=U.value}O&&!x&&l.dereference?.circular==="ignore"&&(P=e),x&&(P.$ref=r);let B={circular:O,value:P};return Object.keys(e).length===1&&s.set(F,B),B}function rA(e,t,r){if(t.circular=!0,r?.dereference?.onCircular?.(e),!r.dereference.circular)throw V4.ono.reference(`Circular $ref pointer found at ${e}`);return!0}});var iA=M(ng=>{"use strict";d();Object.defineProperty(ng,"__esModule",{value:!0});function Y4(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}ng.default=Y4()});var uA=M(la=>{"use strict";d();var J4=la&&la.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(la,"__esModule",{value:!0});la.default=X4;var oA=J4(iA());function X4(e,t){if(e){t.then(function(r){(0,oA.default)(function(){e(null,r)})},function(r){(0,oA.default)(function(){e(r)})});return}else return t}});var lA=M(ue=>{"use strict";d();var Z4=ue&&ue.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Q4=ue&&ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),eq=ue&&ue.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&Z4(r,t,n[o]);return Q4(r,t),r}})(),Co=ue&&ue.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ue,"__esModule",{value:!0});ue.getJsonSchemaRefParserDefaultOptions=ue.jsonSchemaParserNormalizeArgs=ue.dereferenceInternal=ue.JSONParserErrorGroup=ue.isHandledError=ue.UnmatchedParserError=ue.ParserError=ue.ResolverError=ue.MissingPointerError=ue.InvalidPointerError=ue.JSONParserError=ue.UnmatchedResolverError=ue.dereference=ue.bundle=ue.resolve=ue.parse=ue.$RefParser=void 0;var sA=Co(x1()),tq=Co(Km()),fa=Co(K1());ue.jsonSchemaParserNormalizeArgs=fa.default;var rq=Co(G1()),nq=Co(X1()),cA=Co(nA());ue.dereferenceInternal=cA.default;var vo=eq(wr()),Ar=br();Object.defineProperty(ue,"JSONParserError",{enumerable:!0,get:function(){return Ar.JSONParserError}});Object.defineProperty(ue,"InvalidPointerError",{enumerable:!0,get:function(){return Ar.InvalidPointerError}});Object.defineProperty(ue,"MissingPointerError",{enumerable:!0,get:function(){return Ar.MissingPointerError}});Object.defineProperty(ue,"ResolverError",{enumerable:!0,get:function(){return Ar.ResolverError}});Object.defineProperty(ue,"ParserError",{enumerable:!0,get:function(){return Ar.ParserError}});Object.defineProperty(ue,"UnmatchedParserError",{enumerable:!0,get:function(){return Ar.UnmatchedParserError}});Object.defineProperty(ue,"UnmatchedResolverError",{enumerable:!0,get:function(){return Ar.UnmatchedResolverError}});Object.defineProperty(ue,"isHandledError",{enumerable:!0,get:function(){return Ar.isHandledError}});Object.defineProperty(ue,"JSONParserErrorGroup",{enumerable:!0,get:function(){return Ar.JSONParserErrorGroup}});var aA=Rt(),en=Co(uA()),iq=Xm();Object.defineProperty(ue,"getJsonSchemaRefParserDefaultOptions",{enumerable:!0,get:function(){return iq.getJsonSchemaRefParserDefaultOptions}});var Ti=class e{constructor(){this.schema=null,this.$refs=new sA.default}async parse(){let t=(0,fa.default)(arguments),r;if(!t.path&&!t.schema){let o=(0,aA.ono)(`Expected a file path, URL, or object. Got ${t.path||t.schema}`);return(0,en.default)(t.callback,Promise.reject(o))}this.schema=null,this.$refs=new sA.default;let n="http";if(vo.isFileSystemPath(t.path))t.path=vo.fromFileSystemPath(t.path),n="file";else if(!t.path&&t.schema&&"$id"in t.schema&&t.schema.$id){let o=vo.parse(t.schema.$id),s=o.protocol==="https:"?443:80;t.path=`${o.protocol}//${o.hostname}:${s}`}if(t.path=vo.resolve(vo.cwd(),t.path),t.schema&&typeof t.schema=="object"){let o=this.$refs._add(t.path);o.value=t.schema,o.pathType=n,r=Promise.resolve(t.schema)}else r=(0,tq.default)(t.path,this.$refs,t.options);try{let o=await r;if(o!==null&&typeof o=="object"&&!Buffer.isBuffer(o))return this.schema=o,(0,en.default)(t.callback,Promise.resolve(this.schema));if(t.options.continueOnError)return this.schema=null,(0,en.default)(t.callback,Promise.resolve(this.schema));throw aA.ono.syntax(`"${this.$refs._root$Ref.path||o}" is not a valid JSON Schema`)}catch(o){return!t.options.continueOnError||!(0,Ar.isHandledError)(o)?(0,en.default)(t.callback,Promise.reject(o)):(this.$refs._$refs[vo.stripHash(t.path)]&&this.$refs._$refs[vo.stripHash(t.path)].addError(o),(0,en.default)(t.callback,Promise.resolve(null)))}}static parse(){let t=new e;return t.parse.apply(t,arguments)}async resolve(){let t=(0,fa.default)(arguments);try{return await this.parse(t.path,t.schema,t.options),await(0,rq.default)(this,t.options),ig(this),(0,en.default)(t.callback,Promise.resolve(this.$refs))}catch(r){return(0,en.default)(t.callback,Promise.reject(r))}}static resolve(){let t=new e;return t.resolve.apply(t,arguments)}static bundle(){let t=new e;return t.bundle.apply(t,arguments)}async bundle(){let t=(0,fa.default)(arguments);try{return await this.resolve(t.path,t.schema,t.options),(0,nq.default)(this,t.options),ig(this),(0,en.default)(t.callback,Promise.resolve(this.schema))}catch(r){return(0,en.default)(t.callback,Promise.reject(r))}}static dereference(){let t=new e;return t.dereference.apply(t,arguments)}async dereference(){let t=(0,fa.default)(arguments);try{return await this.resolve(t.path,t.schema,t.options),(0,cA.default)(this,t.options),ig(this),(0,en.default)(t.callback,Promise.resolve(this.schema))}catch(r){return(0,en.default)(t.callback,Promise.reject(r))}}};ue.$RefParser=Ti;ue.default=Ti;function ig(e){if(Ar.JSONParserErrorGroup.getParserErrors(e).length>0)throw new Ar.JSONParserErrorGroup(e)}ue.parse=Ti.parse;ue.resolve=Ti.resolve;ue.bundle=Ti.bundle;ue.dereference=Ti.dereference});var pA=M((ase,fA)=>{d();function oq(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}fA.exports=oq});var pa=M((lse,dA)=>{d();var uq=Wy(),sq=EB();function aq(e,t,r,n){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var l=t[s],p=n?n(r[l],e[l],l,r,e):void 0;p===void 0&&(p=e[l]),o?sq(r,l,p):uq(r,l,p)}return r}dA.exports=aq});var hA=M((pse,DA)=>{d();var cq=pa(),lq=vy();function fq(e,t){return e&&cq(t,lq(t),e)}DA.exports=fq});var gA=M((Dse,mA)=>{d();var pq=pa(),dq=Hy();function Dq(e,t){return e&&pq(t,dq(t),e)}mA.exports=Dq});var vA=M((da,Ou)=>{d();var hq=sB(),EA=typeof da=="object"&&da&&!da.nodeType&&da,_A=EA&&typeof Ou=="object"&&Ou&&!Ou.nodeType&&Ou,mq=_A&&_A.exports===EA,yA=mq?hq.Buffer:void 0,FA=yA?yA.allocUnsafe:void 0;function gq(e,t){if(t)return e.slice();var r=e.length,n=FA?FA(r):new e.constructor(r);return e.copy(n),n}Ou.exports=gq});var wA=M((gse,CA)=>{d();function _q(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}CA.exports=_q});var AA=M((yse,bA)=>{d();var yq=pa(),Fq=pB();function Eq(e,t){return yq(e,Fq(e),t)}bA.exports=Eq});var xA=M((Ese,SA)=>{d();var vq=pa(),Cq=CB();function wq(e,t){return vq(e,Cq(e),t)}SA.exports=wq});var OA=M((Cse,PA)=>{d();var bq=Object.prototype,Aq=bq.hasOwnProperty;function Sq(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Aq.call(e,"index")&&(r.index=e.index,r.input=e.input),r}PA.exports=Sq});var Sf=M((bse,BA)=>{d();var TA=lB();function xq(e){var t=new e.constructor(e.byteLength);return new TA(t).set(new TA(e)),t}BA.exports=xq});var RA=M((Sse,IA)=>{d();var Pq=Sf();function Oq(e,t){var r=t?Pq(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}IA.exports=Oq});var NA=M((Pse,MA)=>{d();var Tq=/\w*$/;function Bq(e){var t=new e.constructor(e.source,Tq.exec(e));return t.lastIndex=e.lastIndex,t}MA.exports=Bq});var kA=M((Tse,UA)=>{d();var jA=aB(),$A=jA?jA.prototype:void 0,LA=$A?$A.valueOf:void 0;function Iq(e){return LA?Object(LA.call(e)):{}}UA.exports=Iq});var WA=M((Ise,qA)=>{d();var Rq=Sf();function Mq(e,t){var r=t?Rq(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}qA.exports=Mq});var zA=M((Mse,HA)=>{d();var Nq=Sf(),jq=RA(),$q=NA(),Lq=kA(),Uq=WA(),kq="[object Boolean]",qq="[object Date]",Wq="[object Map]",Hq="[object Number]",zq="[object RegExp]",Vq="[object Set]",Kq="[object String]",Gq="[object Symbol]",Yq="[object ArrayBuffer]",Jq="[object DataView]",Xq="[object Float32Array]",Zq="[object Float64Array]",Qq="[object Int8Array]",e5="[object Int16Array]",t5="[object Int32Array]",r5="[object Uint8Array]",n5="[object Uint8ClampedArray]",i5="[object Uint16Array]",o5="[object Uint32Array]";function u5(e,t,r){var n=e.constructor;switch(t){case Yq:return Nq(e);case kq:case qq:return new n(+e);case Jq:return jq(e,r);case Xq:case Zq:case Qq:case e5:case t5:case r5:case n5:case i5:case o5:return Uq(e,r);case Wq:return new n;case Hq:case Kq:return new n(e);case zq:return $q(e);case Vq:return new n;case Gq:return Lq(e)}}HA.exports=u5});var GA=M((jse,KA)=>{d();var s5=_y(),VA=Object.create,a5=(function(){function e(){}return function(t){if(!s5(t))return{};if(VA)return VA(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();KA.exports=a5});var JA=M((Lse,YA)=>{d();var c5=GA(),l5=vB(),f5=DB();function p5(e){return typeof e.constructor=="function"&&!f5(e)?c5(l5(e)):{}}YA.exports=p5});var ZA=M((kse,XA)=>{d();var d5=gd(),D5=yy(),h5="[object Map]";function m5(e){return D5(e)&&d5(e)==h5}XA.exports=m5});var rS=M((Wse,tS)=>{d();var g5=ZA(),_5=Fy(),QA=Ey(),eS=QA&&QA.isMap,y5=eS?_5(eS):g5;tS.exports=y5});var iS=M((zse,nS)=>{d();var F5=gd(),E5=yy(),v5="[object Set]";function C5(e){return E5(e)&&F5(e)==v5}nS.exports=C5});var aS=M((Kse,sS)=>{d();var w5=iS(),b5=Fy(),oS=Ey(),uS=oS&&oS.isSet,A5=uS?b5(uS):w5;sS.exports=A5});var dS=M((Yse,pS)=>{d();var S5=cB(),x5=pA(),P5=Wy(),O5=hA(),T5=gA(),B5=vA(),I5=wA(),R5=AA(),M5=xA(),N5=hB(),j5=wB(),$5=gd(),L5=OA(),U5=zA(),k5=JA(),q5=fB(),W5=dB(),H5=rS(),z5=_y(),V5=aS(),K5=vy(),G5=Hy(),Y5=1,J5=2,X5=4,cS="[object Arguments]",Z5="[object Array]",Q5="[object Boolean]",eW="[object Date]",tW="[object Error]",lS="[object Function]",rW="[object GeneratorFunction]",nW="[object Map]",iW="[object Number]",fS="[object Object]",oW="[object RegExp]",uW="[object Set]",sW="[object String]",aW="[object Symbol]",cW="[object WeakMap]",lW="[object ArrayBuffer]",fW="[object DataView]",pW="[object Float32Array]",dW="[object Float64Array]",DW="[object Int8Array]",hW="[object Int16Array]",mW="[object Int32Array]",gW="[object Uint8Array]",_W="[object Uint8ClampedArray]",yW="[object Uint16Array]",FW="[object Uint32Array]",je={};je[cS]=je[Z5]=je[lW]=je[fW]=je[Q5]=je[eW]=je[pW]=je[dW]=je[DW]=je[hW]=je[mW]=je[nW]=je[iW]=je[fS]=je[oW]=je[uW]=je[sW]=je[aW]=je[gW]=je[_W]=je[yW]=je[FW]=!0;je[tW]=je[lS]=je[cW]=!1;function xf(e,t,r,n,o,s){var a,l=t&Y5,p=t&J5,m=t&X5;if(r&&(a=o?r(e,n,o,s):r(e)),a!==void 0)return a;if(!z5(e))return e;var g=q5(e);if(g){if(a=L5(e),!l)return I5(e,a)}else{var F=$5(e),w=F==lS||F==rW;if(W5(e))return B5(e,l);if(F==fS||F==cS||w&&!o){if(a=p||w?{}:k5(e),!l)return p?M5(e,T5(a,e)):R5(e,O5(a,e))}else{if(!je[F])return o?e:{};a=U5(e,F,l)}}s||(s=new S5);var v=s.get(e);if(v)return v;s.set(e,a),V5(e)?e.forEach(function(P){a.add(xf(P,t,r,P,e,s))}):H5(e)&&e.forEach(function(P,B){a.set(B,xf(P,t,r,B,e,s))});var x=m?p?j5:N5:p?G5:K5,O=g?void 0:x(e);return x5(O||e,function(P,B){O&&(B=P,P=e[B]),P5(a,B,xf(P,t,r,B,e,s))}),a}pS.exports=xf});var hS=M((Xse,DS)=>{d();var EW=dS(),vW=1,CW=4;function wW(e){return EW(e,vW|CW)}DS.exports=wW});d();d();async function Td(e,t,r=1){let n;try{return n=await e(),n}catch(o){if(r>0)return await t(),Td(e,t,r-1);throw o}}import{pipeline as xB}from"stream/promises";import j0 from"node:stream/promises";import*as $0 from"node:zlib";import{fileURLToPath as Md}from"node:url";var L0="9.2.1",U0="9.0.0",k0="4",PB="123.0.0",q0="1.0.2",W0="2.0.1";function H0(e){return e==="0"||e==="1"?{functionRunner:"7.0.1",javy:"4.0.0",javyPlugin:"1"}:e==="2"?{functionRunner:L0,javy:U0,javyPlugin:k0}:null}var _s=class{constructor(t,r,n,o,s=`v${r}`){this.name=t,this.version=r,this.release=s,this.supportsWindowsOnArm=o;let a;a=`${t}-${r}`,a=process.platform==="win32"?`${a}.exe`:a,this.path=I(he(Md(import.meta.url)),"..","bin",a),this.gitHubRepo=n}downloadUrl(t,r){let n,o;switch(t.toLowerCase()){case"darwin":n="macos";break;case"linux":n="linux";break;case"win32":n="windows";break;default:throw Error(`Unsupported platform ${t}`)}switch(r.toLowerCase()){case"arm":case"arm64":o="arm";break;case"ia32":case"x64":o="x86_64";break;default:throw Error(`Unsupported architecture ${r}`)}let s=`${o}-${n}`,a=["arm-linux","arm-macos","x86_64-macos","x86_64-windows","x86_64-linux"];if(this.supportsWindowsOnArm&&a.push("arm-windows"),!a.includes(s))throw Error(`Unsupported platform/architecture combination ${t}/${r}`);return`https://github.com/${this.gitHubRepo}/releases/download/${this.release}/${this.name}-${s}-v${this.version}.gz`}async processResponse(t,r){return TB(t,r)}},Id=class{constructor(t){this.name=`shopify_functions_javy_v${t}`,this.version=t,this.path=I(he(Md(import.meta.url)),"..","bin",`shopify_functions_javy_v${t}.wasm`)}downloadUrl(t,r){return`https://cdn.shopify.com/shopifycloud/shopify-functions-javy-plugin/shopify_functions_javy_v${this.version}.wasm`}async processResponse(t,r){return xB(t,r)}},Rd=class{constructor(t,r){this.name=t,this.version=r,this.path=I(he(Md(import.meta.url)),"..","bin",t)}downloadUrl(t,r){return`https://cdn.jsdelivr.net/npm/binaryen@${this.version}/bin/wasm-opt`}async processResponse(t,r){await j0.pipeline(t,r)}},Bd;function Nd(e=U0){return new _s("javy",e,"bytecodealliance/javy",Tc(e,">=7.0.0"))}function jd(e=k0){return new Id(e)}function oH(e=L0){return new _s("function-runner",e,"Shopify/function-runner",Tc(e,">=9.1.1"))}function ys(){return Bd||(Bd=new Rd("wasm-opt.cjs",PB)),Bd}function z0(e){return new _s("shopify-function-trampoline",e,"Shopify/shopify-function-wasm-api",Tc(e,">=2.0.1"),`shopify_function_trampoline/v${e}`)}var qc=new Map;async function io(e){if(await Q(e.path)&&!qc.has(e.path))return;let r=qc.get(e.path);if(r){await r;return}let n=OB(e);qc.set(e.path,n);try{await n}finally{qc.delete(e.path)}}async function OB(e){let t=e.downloadUrl(process.platform,process.arch);ce(`Downloading ${e.name} ${e.version} from ${t} to ${e.path}`);let r=he(e.path);await Q(r)||await Rr(r),await Td(async()=>{let n=await My(t,void 0,"slow-request");if(n.status!==200)throw new Error(`Downloading ${e.name} failed with status code of ${n.status}`);let o=n.body;if(o===null)throw new Error(`Downloading ${e.name} failed with empty response body`);await Ec(async s=>{let a=I(s,"binary"),l=Oy(a);await e.processResponse(o,l),await Ty(a,509),await wc(a,e.path,{overwrite:!0})})},async()=>{},2)}async function TB(e,t){let r=$0.createGunzip();await j0.pipeline(e,r,t)}d();import{build as K0}from"esbuild";var BB="2",Fs=class extends k{constructor(t){super(t,Se`Make sure you have a compatible version of the ${Ae.yellow("@shopify/shopify_function")} library installed.`,[Se`Add ${Ae.green(`"@shopify/shopify_function": "~${BB}.0.0"`)} to the dependencies section of the package.json file in your function's directory, if not already present.`.value,"Run your package manager's install command to update dependencies."])}};async function G0(e,t){let r=$B(e),n=r.length===0?jB:new $d(r),o=await J0(e);return t.useTasks?RB(e,t,n,o):IB(e,t,n,o)}async function IB(e,t,r,n){t.signal?.aborted||(t.stdout.write(`Building function ${e.localIdentifier}...`),t.stdout.write(`Building GraphQL types...
|
|
128
|
+
`),await Es(e,t)),t.signal?.aborted||(t.stdout.write(`Bundling JS function...
|
|
129
|
+
`),await r.bundle(e,t)),t.signal?.aborted||(t.stdout.write(`Running javy...
|
|
130
|
+
`),await r.compile(e,t,n)),t.signal?.aborted||t.stdout.write(`Done!
|
|
131
|
+
`)}async function RB(e,t,r,n){await n0([{title:"Building GraphQL types",task:async()=>{await Es(e,t)}},{title:"Bundling JS function",task:async()=>{await r.bundle(e,t)}},{title:"Running javy",task:async()=>{await r.compile(e,t,n)}}])}async function Es(e,t){if(e.typegenCommand){let n=e.typegenCommand.split(" ");return vd("cmd_all_timing_network_ms")(async()=>fi(n[0],n.slice(1),{cwd:e.directory,stdout:t.stdout,stderr:t.stderr,signal:t.signal}))}if(!e.isJavaScript)throw new k("No typegen_command specified. Set build.typegen_command in your function extension TOML to generate GraphQL types for non-JavaScript functions.");let r=await Xy(e.directory,"graphql-code-generator","--config","package.json");return vd("cmd_all_timing_network_ms")(async()=>fi(r.command,r.args,{cwd:e.directory,stderr:t.stderr,signal:t.signal}))}async function Y0(e){let t=await ln("node_modules/@shopify/shopify_function/index.ts",{type:"file",cwd:e.directory}),r=await ln("node_modules/@shopify/shopify_function/run.ts",{type:"file",cwd:e.directory});if(!t||!r)throw new Fs("Could not find the Shopify Functions JavaScript library.");if(!e.entrySourceFilePath)throw new k("Could not find your function entry point. It must be in src/index.js or src/index.ts");return t}async function J0(e){let t=await ln("node_modules/@shopify/shopify_function/package.json",{type:"file",cwd:e.directory});if(!t)throw new Fs("Could not find the Shopify Functions JavaScript library.");let n=JSON.parse(await $e(t)).version.split(".")[0],o=H0(n);if(o===null)throw new Fs("The installed version of the Shopify Functions JavaScript library is not compatible with this version of Shopify CLI.");return o}async function MB(e,t,r=process.env){let n=await Y0(e),o={...X0(e.directory,e.entrySourceFilePath,t.app.dotenv?.variables??{},r),entryPoints:[n]};return K0(o)}function X0(e,t,r,n=process.env){let o=Pc(n,(p,m)=>Mc.test(m)&&p),s={...r,...o},a=Object.keys(s||{}).reduce((p,m)=>({...p,[`process.env.${m}`]:JSON.stringify(s[m])}),{});return{outfile:I(e,"dist/function.js"),alias:{"user-function":t},define:a,logLevel:"silent",bundle:!0,legalComments:"none",target:"es2022",format:"esm"}}async function Z0(e){let t=ys();await io(t);let r=he(ys().path),n="node",o=[ys().name,e,"-Oz","--enable-bulk-memory","--enable-multimemory","--enable-nontrapping-float-to-int","--strip-debug","-o",e];ce(`Wasm binary: ${ys().name}`),ce("Optimizing this wasm binary using wasm-opt."),await fi(n,o,{cwd:r})}async function Q0(e){let t,r=await NB(e);if(r.includes("shopify_function_v1")?t=q0:r.includes("shopify_function_v2")&&(t=W0),!t)return;let n=z0(t);await io(n);let o=n.path,s=["-i",e,"-o",e];ce(`Applying trampoline to the wasm binary with command: ${o} ${s.join(" ")}`),await fi(o,s)}async function NB(e){let t=new Uint8Array(eo(e));if(!WebAssembly.validate(t))return[];let n=new WebAssembly.Module(t),o=WebAssembly.Module.imports(n);return Bt(o.map(s=>s.module))}async function eF(e,t,r,n=[]){let o=Nd(r.javy),s=jd(r.javyPlugin);await Promise.all([io(o),io(s)]);let a=["build","-C","dynamic","-C",`plugin=${s.path}`,...n,"-o",e.outputPath,"dist/function.js"];return fi(o.path,a,{cwd:e.directory,stdout:"inherit",stderr:"inherit",signal:t.signal})}async function vH(e){let r=e.allExtensions.filter(l=>l.features.includes("function")&&l.isJavaScript).map(l=>J0(l)),n=await Promise.all(r),o=new Set,s=new Set;n.forEach(l=>{o.add(l.javy),s.add(l.javyPlugin)});let a=[];o.forEach(l=>{a.push(io(Nd(l)))}),s.forEach(l=>{a.push(io(jd(l)))}),await Promise.all(a)}var jB={async bundle(e,t){return MB(e,t)},async compile(e,t,r){return eF(e,t,r)}},V0="shopify-function",$d=class{constructor(t){this.exports=t}async bundle(t,r,n=process.env){await Y0(t);let o=this.entrypointContents;ce("Generating dist/function.js using generated module:"),ce(o);let s={...X0(t.directory,t.entrySourceFilePath,r.app.dotenv?.variables??{},n),stdin:{contents:o,loader:"ts",resolveDir:t.directory}};return K0(s)}async compile(t,r,n){let o=this.wit;return ce("Generating world to use with Javy:"),ce(o),Ec(async s=>{let a=I(s,"javy-world.wit");return await Et(a,o),eF(t,r,n,["-C",`wit=${a}`,"-C",`wit-world=${V0}`])})}get wit(){let t=this.exports.map(r=>`export %${yd(r)}: func();`);return`package function:impl;
|
|
132
|
+
|
|
133
|
+
world ${V0} {
|
|
134
|
+
${t.join(`
|
|
135
|
+
`)}
|
|
136
|
+
}`}get entrypointContents(){let t=`
|
|
137
|
+
import __runFunction from "@shopify/shopify_function/run"`,r=this.exports.map(n=>{let o=_d(n),s=_d(`run-${n}`);return`
|
|
138
|
+
import { ${o} as ${s} } from "user-function"
|
|
139
|
+
export function ${o}() { return __runFunction(${s}) }`});return`${t}
|
|
140
|
+
${r.join(`
|
|
141
|
+
`)}`}};function $B(e){let t=e.configuration.targeting??[],r=t.filter(s=>!s.export),n=t.filter(s=>!!s.export);if(t.length>1&&r.length>0)throw new Error(`Can't infer export name for targets:
|
|
142
|
+
${r.map(({target:s})=>`- '${s}'`).join(`
|
|
143
|
+
`)}
|
|
144
|
+
All targets must have an export when multiple targets are present.`);let o=n.filter(s=>!s.export.match(/^[a-z0-9-]+$/));if(o.length>0){let s=[],a=o.map(l=>`'${l.export}'`);throw s.push(`Invalid export names: ${a.join(", ")}.
|
|
145
|
+
|
|
146
|
+
The TOML's exports must be kebab-case (lowercase, hyphen or numbers) to comply with WebAssembly's Component Model.
|
|
147
|
+
|
|
148
|
+
JavaScript exports with camelCase names are automatically mapped to kebab-case Wasm exports.
|
|
149
|
+
`),s.push("Suggested TOML changes:"),o.forEach(l=>{let p=l.export;s.push(`- Change export for '${l.target}' to '${yd(p)}'.`)}),new Error(s.join(`
|
|
150
|
+
`))}return n.map(s=>s.export)}d();function tF(e,t){return async r=>{let n=await e.appsForOrg(t,r);return{apps:n.apps,hasMorePages:n.hasMorePages}}}d();d();import{deflate as LB}from"node:zlib";import{promisify as UB}from"node:util";var kB=UB(LB);async function qB(e){let t=await $e(e),r=Buffer.byteLength(t),o=(await kB(Buffer.from(t))).byteLength;return{path:e,rawBytes:r,compressedBytes:o}}function rF(e){return e>=1024*1024?`${(e/(1024*1024)).toFixed(2)} MB`:`${(e/1024).toFixed(1)} KB`}async function nF(e){try{let{rawBytes:t,compressedBytes:r}=await qB(e);return` (${rF(t)} original, ~${rF(r)} compressed)`}catch(t){return ce(`Failed to get bundle size for ${e}: ${t}`),""}}d();d();import{createInterface as WB}from"readline";var HB=[".git",".hg",".bzr",".svn","_darcs","CVS",".sublime-(project|workspace)",".DS_Store",".sass-cache","Thumbs.db","desktop.ini","config.yml","node_modules",".gitkeep",".shopifyignore","*.toml"];async function vs(e){let r=I(e.directory,".shopifyignore"),n=HB.map(o=>I("*",o));if(Ut(r)){let o=await zB(r);n.push(...o)}return Ve("*/*",{absolute:!0,cwd:e.directory,ignore:n})}function zB(e){return new Promise((t,r)=>{let n=[],o=WB({input:Py(e),crlfDelay:1/0});o.on("line",s=>{let a=s.trim();a.length>0&&!a.startsWith("#")&&n.push(a)}),o.on("close",()=>{t(n)}),o.on("error",s=>{r(s)})})}import{context as aI,formatMessagesSync as mF}from"esbuild";var gF=ai(hF(),1);async function Ld(e,t=process.env){let r=fI(e,t),n=await aI(r),o=await n.rebuild();lI(o,e),await cI(o,e.outputPath),await n.dispose()}async function cI(e,t){if(!e?.metafile)return;let{dir:r,name:n}=hy(t),o=I(r,`${n}.metafile.json`);try{await Et(o,JSON.stringify(e.metafile))}catch(s){Rn(`Failed to write metafile to ${o}: ${s}`)}}function lI(e,t){let r=e?.warnings??[],n=e?.errors??[];r.length>0&&mF(r,{kind:"warning"}).forEach(s=>{t.stdout.write(s)}),n.length>0&&mF(n,{kind:"error"}).forEach(s=>{t.stderr.write(s)})}function fI(e,t=process.env){let r=Pc(t,(a,l)=>Mc.test(l)&&a),n={...e.env,...r},o=Object.keys(n||{}).reduce((a,l)=>({...a,[`process.env.${l}`]:JSON.stringify(n[l])}),{"process.env.NODE_ENV":JSON.stringify(e.environment)}),s={outfile:e.outputPath,stdin:e.stdin,bundle:!0,define:o,jsx:"automatic",logLevel:e.logLevel??"error",loader:{".esnext":"ts",".js":"jsx"},legalComments:"none",minify:e.minify,plugins:pI(e.stdin.resolveDir,t),target:"es6",resolveExtensions:[".tsx",".ts",".js",".json",".esnext",".mjs",".ejs"]};if(e.sourceMaps&&(s.sourcemap=!0,s.sourceRoot=`${e.stdin.resolveDir}/src`),e.environment==="production"&&(s.metafile=!0),e.environment==="development"){let a=n[Ad.disableMinificationOnDev];s.minify=!cs(a),s.logLevel="silent"}return s}function pI(e,t=process.env){let r=[gF.default.default()],n=cs(t[Ad.skipEsbuildReactDedeuplication]);if(e&&!n){let o;try{o=ze.resolve("react",{paths:[e]})}catch{ce(`Unable to load React in ${e}, skipping React de-duplication`)}o&&(ce(`Deduplicating React dependency for ${e}, using ${o}`),r.push(dI(o)))}return r}function dI(e){return{name:"shopify:deduplicate-react",setup({onResolve:t}){t({filter:/^react$/},r=>({path:e}))}}}d();var Vc="# api_version: ";function iz(e,t){return`${Vc}${t}
|
|
151
|
+
|
|
152
|
+
${e}`}async function DI(e){if(!await Q(e)){ce(`Could not determine api_version: schema file not found at ${e}.`);return}let r=(await $e(e)).split(`
|
|
153
|
+
`,1)[0];if(r.startsWith(Vc))return r.slice(Vc.length).trim();ce(`Could not determine api_version from ${e}: missing '${Vc}' marker on the first line.`)}async function _F({directory:e,localIdentifier:t,apiVersion:r}){let n=I(e,"schema.graphql"),o=await DI(n);if(o!==void 0&&o!==r)throw new k(Se`The ${Ae.cyan("schema.graphql")} file for ${Ae.cyan(t)} was generated for api_version ${Ae.yellow(o)} but your function is now on api_version ${Ae.yellow(r)}.`,Se`Run ${Ae.genericShellCommand("shopify app function schema")} to refresh it.`)}var MF=ai(RF(),1);async function NF(e,t){t.stdout.write(`Bundling UI extension ${e.localIdentifier}...`);let r=t.app.dotenv?.variables??{};t.appURL&&(r.APP_URL=t.appURL);let n=t.buildDirectory??"",o=I(e.directory,n,e.outputRelativePath),{main:s,assets:a}=e.getBundleExtensionStdinContent(),l=performance.now();if(!t.skipBuild)try{await Ld({minify:!0,outputPath:o,stdin:{contents:s,resolveDir:e.directory,loader:"tsx"},environment:t.environment,env:r,stderr:t.stderr,stdout:t.stdout,sourceMaps:e.isSourceMapGeneratingExtension}),a&&await Promise.all(a.map(async g=>{await Ld({minify:!0,outputPath:I(he(o),g.outputFileName),stdin:{contents:g.content,resolveDir:e.directory,loader:"tsx"},environment:t.environment,env:r,stderr:t.stderr,stdout:t.stdout})}))}catch(g){let F=g.message??"Unknown error occurred",w=new k(`Failed to bundle extension ${e.localIdentifier}. Please check the extension source code for errors.`,F);throw w.errors=g.errors,w}await e.buildValidation({outputPath:o});let p=Math.round(performance.now()-l),m=await nF(o);return t.stdout.write(`${e.localIdentifier} successfully built in ${p}ms${m}`),o}async function jF(e,t){let r=I(e.directory,".build-lock"),n;try{n=await MF.default.lock(e.directory,{retries:20,lockfilePath:r})}catch(o){throw ce(`Failed to acquire function build lock: ${o.message}`),new k("Failed to build function.","This is likely due to another in-progress build.",["Ensure there are no other function builds in-progress.","Delete the `.build-lock` file in your function directory."])}try{let o=e.configuration,s=e.outputPath,a=o.build?.path??e.outputRelativePath;if(e.outputPath=I(e.directory,a),await _F({directory:e.directory,localIdentifier:e.localIdentifier,apiVersion:o.api_version}),!t.skipBuild){e.isJavaScript?await MI(e,t):await NI(e,t);let p=e.configuration.build?.wasm_opt;Ut(e.outputPath)&&p&&await Z0(e.outputPath),Ut(e.outputPath)&&await Q0(e.outputPath)}let l=I(e.directory,e.outputRelativePath);Ut(e.outputPath)&&s!==e.outputPath&&s!==l&&he(s)!==he(e.outputPath)&&await RI(e.outputPath,s)}catch(o){if(o instanceof k)throw o;let s=o.message??"Unknown error occurred",a=new k("Failed to build function.",s);throw a.errors=o.errors,a}finally{await n()}}async function RI(e,t){ce(`Converting WASM from ${e} to base64 in ${t}`);let r=await $e(e,{encoding:"base64"});await vc(t),await Et(t,r)}async function MI(e,t){return e.buildCommand?(e.typegenCommand&&await Es(e,t),$F(e.buildCommand,e,t)):G0(e,t)}async function NI(e,t){if(!e.buildCommand)throw t.stderr.write(`The function extension ${e.localIdentifier} doesn't have a build command or it's empty`),t.stderr.write(`
|
|
154
|
+
Edit the shopify.function.extension.toml configuration file and set how to build the extension.
|
|
155
|
+
|
|
156
|
+
[build]
|
|
157
|
+
command = "{COMMAND}"
|
|
158
|
+
|
|
159
|
+
Note that the command must output a dist/index.wasm file.
|
|
160
|
+
`),new In;return e.typegenCommand&&await Es(e,t),$F(e.buildCommand,e,t)}async function $F(e,t,r){let n=e.split(" ");r.stdout.write(`Building function ${t.localIdentifier}...`),await fi(n[0],n.slice(1),{stdout:r.stdout,stderr:r.stderr,cwd:t.directory,signal:r.signal})}d();var LF="shopify.app*.toml",jI=/^shopify\.app(\.[-\w]+)?\.toml$/,$I="*.extension.toml",LI="shopify.web.toml",UF="extensions/*",kF="**/node_modules/**",UI=".env*",bs=class e{static async load(t){let r=await kI(t),n=[],o=await qI(r,n);if(o.length===0)throw new k(`Could not find a Shopify app TOML file in ${r}`);let s=new Set;for(let P of o){let B=P.content.extension_directories;if(Array.isArray(B))for(let U of B)s.add(U);else s.add(UF)}let a=await WI(r,[...s],n),l=new Set;for(let P of o){let B=P.content.web_directories;if(Array.isArray(B))for(let U of B)l.add(U)}let p=await HI(r,l.size>0?[...l]:void 0,n),m=I(r,"package.json"),g=await Q(m),F=g?await Oc(r):"unknown",w=g?await Zy(m):{},v=g?await Qy(r):!1,x=await zI(r),O=await VI(r);return new e({directory:r,packageManager:F,nodeDependencies:w,usesWorkspaces:v,appConfigFiles:o,extensionConfigFiles:a,webConfigFiles:p,dotenvFiles:x,hiddenConfigRaw:O,errors:n})}constructor(t){this.directory=t.directory,this.packageManager=t.packageManager,this.nodeDependencies=t.nodeDependencies,this.usesWorkspaces=t.usesWorkspaces,this.appConfigFiles=t.appConfigFiles,this.extensionConfigFiles=t.extensionConfigFiles,this.webConfigFiles=t.webConfigFiles,this.dotenvFiles=t.dotenvFiles,this.hiddenConfigRaw=t.hiddenConfigRaw,this.errors=t.errors}appConfigByName(t){return this.appConfigFiles.find(r=>Re(r.path)===t)}appConfigByClientId(t){return this.appConfigFiles.find(r=>r.content.client_id===t)}get defaultAppConfig(){return this.appConfigByName(jr.app)}};async function kI(e){let t=await ln(async r=>{if((await Ve(I(r,LF))).length>0)return r},{cwd:e,type:"directory"});if(!t)throw new k(`Could not find a Shopify app configuration file. Looked in ${e} and parent directories.`);return t}async function qI(e,t){let r=I(e,LF),o=(await Ve(r)).filter(s=>jI.test(Re(s)));return Vd(o,t)}async function WI(e,t,r){let o=(t.length>0?t:[UF]).map(a=>I(e,a,$I));o.push(`!${I(e,kF)}`);let s=await Ve(o);return Vd(s,r)}async function HI(e,t,r){let o=(t??["**"]).map(a=>I(e,a,LI));o.push(`!${I(e,kF)}`);let s=await Ve(o);return Vd(s,r)}async function Vd(e,t){let r=[];return await Promise.all(e.map(async n=>{try{r.push(await Ct.read(n))}catch(o){let s=o instanceof ms?o:new ms(n,`Failed to read ${n}`),a=new Ct(n,{});a.errors.push(s),r.push(a),t.push(s)}})),r}async function zI(e){let t=I(e,UI),n=(await Ve(t,{dot:!0})).filter(a=>{let l=Re(a);return l===".env"||/^\.env\.[\w-]+$/.test(l)}),o=await Promise.all(n.map(async a=>{try{let l=await g0(a);return[Re(a),l]}catch{return}})),s=new Map;for(let a of o)a&&s.set(a[0],a[1]);return s}async function VI(e){let t=I(e,jr.hiddenFolder,jr.hiddenConfig);try{if(await Q(t)){let r=await $e(t);return JSON.parse(r)}}catch{}return{}}d();d();d();d();function KI(e,t){return t}async function Jc(e,t,r){let n={};try{let a=await $e(e);n=JSON.parse(a)}catch{}let o={[t]:r},s=fn(n,o,KI);await Et(e,JSON.stringify(s,null,2))}var GI=E.array(E.string()).optional().transform(YI).transform(JI);function YI(e){return e?.map(t=>t.replace(/[\/\\]+$/,""))}function JI(e){return e?.map(t=>t.replace(/([^\*])\*$/,"$1**"))}var Zc=E.object({client_id:E.string(),build:E.object({automatically_update_urls_on_dev:E.boolean().optional(),dev_store_url:E.string().optional(),include_config_on_deploy:E.boolean().optional()}).optional(),extension_directories:GI,web_directories:E.array(E.string()).optional()}).passthrough();function zF(e,t=!0){let r=e.reduce((n,o)=>o.contributeToAppConfigurationSchema(n),Zc);return t?r.passthrough():e.length>0?r.strict():r}function Kd(e){return e.access_scopes?.scopes??""}function Qc(e){let t=Kd(e);return t.length?t.split(",").map(r=>r.trim()):[]}function XI(e){return I(e,jr.hiddenFolder,jr.hiddenConfig)}var ft;(function(e){e.Frontend="frontend",e.Backend="backend",e.Background="background"})(ft||(ft={}));var qF=E.preprocess(Sd,E.string()),WF=E.object({auth_callback_path:E.union([qF,qF.array()]).optional(),webhooks_path:E.preprocess(Sd,E.string()).optional(),port:E.number().max(65536).min(0).optional(),commands:E.object({build:E.string().optional(),predev:E.string().optional(),dev:E.string()}),name:E.string().optional(),hmr_server:E.object({http_paths:E.string().array()}).optional()}),HF=E.enum([ft.Frontend,ft.Backend,ft.Background]).default(ft.Frontend),VF=E.union([WF.extend({roles:E.array(HF)}),WF.extend({type:HF})]),Xc=class{constructor({name:t,directory:r,configPath:n,configuration:o,webs:s,modules:a,dotenv:l,errors:p,specifications:m,configSchema:g,remoteFlags:F,hiddenConfig:w,devApplicationURLs:v}){this.idEnvironmentVariableName="SHOPIFY_API_KEY",this.name=t,this.directory=r,this.configPath=n,this.configuration=o,this.webs=s,this.dotenv=l,this.realExtensions=a,this.errors=p??new Ss,this.specifications=m,this.configSchema=g??Zc,this.remoteFlags=F??[],this._hiddenConfig=w,v&&this.setDevApplicationURLs(v)}get allExtensions(){return this.includeConfigOnDeploy===!1?this.nonConfigExtensions:this.realExtensions}get nonConfigExtensions(){return this.realExtensions.filter(t=>!t.isAppConfigExtension)}setDevApplicationURLs(t){this.patchAppConfiguration(t),this.realExtensions.forEach(r=>r.patchWithAppDevURLs(t))}async manifest(t){let r=await Promise.all(this.realExtensions.map(async n=>{let o=await n.deployConfig({apiKey:String(this.configuration.client_id??""),appConfiguration:this.configuration});return{type:n.externalType,handle:n.handle,uid:n.uid,uuid:t?.[n.localIdentifier],assets:n.uid,target:n.contextValue,config:o??{}}}));return{name:this.name,handle:"",modules:Qi(r)}}get hiddenConfig(){return this._hiddenConfig}getLogsDir(){return I(this.directory,".shopify","logs")}async updateHiddenConfig(t){if(!this.configuration.client_id)return;this._hiddenConfig=fn(this.hiddenConfig,t);let r=XI(this.directory);await Jc(r,String(this.configuration.client_id),this.hiddenConfig)}async preDeployValidation(){this.validateWebhookLegacyFlowCompatibility();let t=this.allExtensions.filter(n=>n.isFunctionExtension&&n.configuration.ui?.handle);if(t.length>0){let n=ZI(t,this.allExtensions);if(n)throw new k("Invalid function configuration",n.join(`
|
|
161
|
+
`))}let r=this.allExtensions.filter(n=>n.isEditorExtensionCollection);if(r.length>0){let n=QI(r,this.allExtensions);if(n)throw new k("Invalid editor extension collection configuration",n.join(`
|
|
162
|
+
|
|
163
|
+
`))}await Promise.all(this.allExtensions.map(n=>n.preDeployValidation()))}extensionsForType(t){return this.allExtensions.filter(r=>r.type===t.identifier||r.type===t.externalIdentifier)}updateExtensionUUIDS(t){this.allExtensions.forEach(r=>{r.devUUID=t[r.localIdentifier]??r.devUUID})}appIsLaunchable(){let t=this.webs.find(n=>dn(n,ft.Frontend)),r=this.webs.find(n=>dn(n,ft.Backend));return!!(t??r)}get appIsEmbedded(){return this.configuration.embedded}creationDefaultOptions(){return{isLaunchable:this.appIsLaunchable(),scopesArray:Qc(this.configuration),name:this.name,isEmbedded:this.appIsEmbedded,directory:this.directory}}removeExtension(t){this.realExtensions=this.realExtensions.filter(r=>r.uid!==t)}async generateExtensionTypes(){let t=new Map;await Promise.all(this.allExtensions.map(r=>r.contributeToSharedTypeFile(t))),t.forEach((r,n)=>{let o=Ut(n);if(r.size===0){o&&Sy(n);return}let s=o?eo(n).toString():"",a=[`import '@shopify/ui-extensions';
|
|
164
|
+
`,...Array.from(r)].join(`
|
|
165
|
+
`);s!==a&&Ay(n,a)})}get includeConfigOnDeploy(){return this.configuration.build?.include_config_on_deploy}patchAppConfiguration(t){this.devApplicationURLs=t,this.configuration.application_url=t.applicationUrl,t.appProxy&&(this.configuration.app_proxy={url:t.appProxy.proxyUrl,subpath:t.appProxy.proxySubPath,prefix:t.appProxy.proxySubPathPrefix}),this.configuration.auth?.redirect_urls&&(this.configuration.auth.redirect_urls=t.redirectUrlWhitelist)}validateWebhookLegacyFlowCompatibility(){let t=this.configuration.webhooks?.subscriptions?.some(n=>n.topics&&n.topics.length>0)??!1,r=this.configuration.access_scopes?.use_legacy_install_flow===!0;if(t&&r)throw new k("App-specific webhook subscriptions are not supported when use_legacy_install_flow is enabled.",`To use app-specific webhooks, you need to:
|
|
166
|
+
1. Remove 'use_legacy_install_flow = true' from your configuration
|
|
167
|
+
2. Run 'shopify app deploy' to sync your scopes with the Developer Dashboard
|
|
168
|
+
|
|
169
|
+
Alternatively, continue using shop-specific webhooks with the legacy install flow.
|
|
170
|
+
|
|
171
|
+
Learn more: https://shopify.dev/docs/apps/build/authentication-authorization/app-installation`)}};function ZI(e,t){let r=[];return e.forEach(n=>{let o=n.configuration.ui.handle,s=KF(t,o);s?s.type!=="ui_extension"&&r.push(`[${n.name}] - Local app must contain one extension of type 'ui_extension' and handle '${o}'`):r.push(`[${n.name}] - Local app must contain a ui_extension with handle '${o}'`)}),r.length>0?r:void 0}function QI(e,t){let r=[],n=["ui_extension"];return e.forEach(o=>{o.configuration.inCollection.forEach(s=>{let a=KF(t,s.handle);a?n.includes(a.specification.identifier)?a.specification.identifier==="ui_extension"&&a.configuration.extension_points.forEach(p=>{p.target.startsWith("admin.")&&r.push(`[${o.handle}] editor extension collection: Remove extension '${a.configuration.handle}' with target '${p.target}' from this collection. This extension target is not supported in collections.`)}):r.push(`[${o.handle}] editor extension collection: Remove extension of type '${a.specification.identifier}' from this collection. This extension type is not supported in collections.`):r.push(`[${o.handle}] editor extension collection: Add extension with handle '${s.handle}' to local app. Local app must include extension with handle '${s.handle}'.`)})}),r.length>0?r:void 0}function KF(e,t){return e.find(r=>r.handle===t)}async function rV(e){let t=e.dependency;if(t)return As(t,e.directory)}async function As(e,t){let r=e.replace("-react","").split("/"),n=I("node_modules",r[0],r[1],"package.json"),o=await ln(n,{cwd:t,type:"file",allowSymlinks:!0});if(!o)return"not_found";o=await fs(o);let s=await e0(o);return s.version?{name:e,version:s.version}:"not_found"}d();function e6(e){if(!e?.length)return null;let t=null,r=-1;for(let n of e){if(!n.issues?.length)continue;let o=0,s=0,a=0;for(let p of n.issues)p.message?.includes("Required")||p.message?.includes("required")?o++:p.message?.includes("Expected")&&p.message?.includes("received")?s++:a++;let l;o>0?l=1e3-o*10-s-a:s>0?l=100-s*5-a:l=50-a,l>r&&(r=l,t=n)}return t}function GF(e){let t=[];for(let r of e)if(r.code==="invalid_union"&&r.unionErrors){let n=e6(r.unionErrors);if(n?.issues?.length)for(let o of n.issues)t.push({path:o.path,message:o.message,code:r.code});else t.push({path:r.path,message:r.message??"Configuration doesn't match any expected format",code:r.code})}else t.push({path:r.path,message:r.message??"Unknown error",code:r.code});return t}d();var YF=/^shopify\.app(\.[-\w]+)?\.toml$/;function yr(e){return e?el(e)?e:`shopify.app.${Lt(e)}.toml`:jr.app}function xs(e){return Re(e).match(YF)?.[1]?.slice(1)}function el(e){return!!YF.test(e)}d();d();d();d();d();d();d();async function Go(e,t,r){let[n,o]=await Promise.all([fs(e),fs(t)]),s=Oe(o,n);if(s.split(/[/\\]/,1)[0]===".."||Dy(s))throw new k(`Asset path '${r}' resolves outside the app directory.`,`Asset sources must be inside the app folder. Resolved to: ${n}`)}async function XF(e){let{key:t,baseDir:r,outputDir:n,context:o,appDirectory:s,destination:a,usedBasenames:l=new Set,preserveFilePaths:p=!1}=e,{stdout:m}=o.options,g=tl(o.extension.configuration,t),F;typeof g=="string"?F=[g]:Array.isArray(g)?F=g.filter(P=>typeof P=="string"):F=[];for(let P of F)if(P.trim()==="")throw new k(`'${t}' can't be empty.`);if(F.length===0)return ce(`No value for configKey '${t}', skipping
|
|
172
|
+
`,m),{filesCopied:0,pathMap:new Map};let w=a?I(n,a):n,v=Bt(F),x=new Map,O=0;for(let P of v){let B=I(r,P);if(!await Q(B))throw new Error(Se`Couldn't find ${Ae.path(B)}\n Please check the path '${P}' in your configuration`.value);await Go(B,s,P);let q=await ci(B),Y=w;if(q){let Z=await Ve(["**/*"],{cwd:B,absolute:!1}),fe=Z.map(ye=>Oe(n,I(Y,ye)));if(p)for(let ye of Z)JF(Re(ye),P,l);await Ac(B,Y),m.write(`Included '${P}'
|
|
173
|
+
`);for(let ye of Z)l.add(Re(ye));x.set(P,fe),O+=Z.length}else{await Rr(Y);let Z=Re(B),fe;p?(JF(Z,P,l),fe=Z):fe=t6(Z,l),l.add(fe);let ye=Oe(n,I(Y,fe)),We=I(Y,fe);await Ir(B,We),m.write(`Included '${P}'
|
|
174
|
+
`),x.set(P,ye),O+=1}}return{filesCopied:O,pathMap:x}}function JF(e,t,r){if(r.has(e))throw new k(`File collision: '${e}' from '${t}' would overwrite a file copied from a different source. Rename or relocate the conflicting file.`)}function t6(e,t){if(!t.has(e))return e;let r=_c(e),n=r?e.slice(0,-r.length):e,o=1e3,s=1;for(;t.has(`${n}-${s}${r}`);)if(s++,s>o)throw new Error(`Unable to find unique basename for '${e}' after ${o} attempts`);return`${n}-${s}${r}`}function Gd(e){return e.split(".").map(t=>{let r=t.endsWith("[]");return{name:r?t.slice(0,-2):t,flatten:r}})}function tl(e,t){let r=e;for(let{name:n,flatten:o}of Gd(t)){if(r==null)return;if(Array.isArray(r)){let s=r.map(a=>a!==null&&typeof a=="object"?a[n]:void 0).filter(a=>a!==void 0);r=s.length>0?s:void 0}else if(typeof r=="object")r=r[n];else return;if(o){if(!Array.isArray(r))return;r=r.flat(1)}}return r}function Xd(e){return _c(e)?he(e):e}async function ZF(e,t,r,n){let{extension:o,options:s}=t,a=[],l=[];for(let g of e)typeof g.anchor=="string"&&typeof g.groupBy=="string"?a.push(g):l.push(g);if(a.length===0&&l.length===0&&n.length===0)return;let p={};for(let g of l){let F=i6(g.key),w=tl(o.configuration,g.key);w!=null&&(p[F]=rl(w,r))}let m=new Map;for(let g of a){let F=`${g.anchor}||${g.groupBy}`,w=m.get(F);w?w.push(g):m.set(F,[g])}for(let g of m.values()){let{anchor:F,groupBy:w}=g[0],v=tl(o.configuration,F);if(Array.isArray(v))for(let x of v){if(x===null||typeof x!="object"||Array.isArray(x))continue;let O=x,P=O[w];if(typeof P!="string")continue;let B=g.map(Y=>{let Z=r6(Y.key,F),fe=Yd(O,Z);return rl(fe,r)});B.some(Jd)&&s.stdout.write(`Warning: manifest entry '${P}' contains unresolved paths \u2014 source files may be missing
|
|
175
|
+
`);let q=p[P]??{};p[P]=n6([q,...B])}}if(n.length>0&&(p.files=n),Object.keys(p).length===0){s.stdout.write(`Warning: no manifest entries produced \u2014 skipping manifest.json
|
|
176
|
+
`);return}await Zd(t,p)}async function Zd(e,t){let r=Xd(e.extension.outputPath),n=I(r,"manifest.json");await Q(r)||await Rr(r);let o={};if(await Q(n))try{let s=await $e(n);o=JSON.parse(s)}catch{ce(`Warning: could not parse existing manifest.json, starting fresh
|
|
177
|
+
`,e.options.stdout)}for(let[s,a]of Object.entries(t)){let l=o[s];l&&typeof l=="object"&&!Array.isArray(l)&&typeof a=="object"&&!Array.isArray(a)?o[s]={...l,...a}:o[s]=a}await Et(n,JSON.stringify(o,null,2)),ce(`Updated manifest.json in ${r}
|
|
178
|
+
`,e.options.stdout)}function r6(e,t){if(t===e)return"";let r=`${t}.`;return e.startsWith(r)?e.slice(r.length):e}function Yd(e,t){if(t==="")return e;let r=Gd(t),[n,...o]=r;if(!n)return e;let s=o.map(l=>`${l.name}${l.flatten?"[]":""}`).join("."),a=e[n.name];if(n.flatten){if(!Array.isArray(a))return{[n.name]:a};let l=a.map(p=>s?Yd(p,s):p);return{[n.name]:l}}return s&&a!==null&&a!==void 0&&typeof a=="object"&&!Array.isArray(a)?{[n.name]:Yd(a,s)}:{[n.name]:a}}function n6(e){return Object.assign({},...e)}function rl(e,t){if(typeof e=="string")return(e.startsWith(".")||e.includes("/")||e.includes("\\")||t.has(e)?t.get(e):void 0)??e;if(Array.isArray(e))return e.map(r=>rl(r,t));if(e!==null&&typeof e=="object"){let r={};for(let[n,o]of Object.entries(e))r[n]=rl(o,t);return r}return e}function i6(e){let t=e.split(".").at(-1)??e;return t.endsWith("[]")?t.slice(0,-2):t}function Jd(e){return typeof e=="string"?e.startsWith("./")||e.startsWith("../"):Array.isArray(e)?e.some(Jd):e!==null&&typeof e=="object"?Object.values(e).some(Jd):!1}d();async function QF(e,t){let{sourceDir:r,outputDir:n,patterns:o,ignore:s,appDirectory:a,sourceDirConfigValue:l}=e;if(!await Q(r))return{filesCopied:0,outputPaths:[]};await Go(r,a,l);let p=await Ve(o,{absolute:!0,cwd:r,ignore:s});if(p.length===0)return{filesCopied:0,outputPaths:[]};await Rr(n);let m=p,g=await Promise.all(m.map(async v=>{let x=Oe(r,v),O=I(n,x);return Oe(n,O).startsWith("..")?(t.stdout.write(`Warning: skipping '${v}' - resolved destination is outside the output directory
|
|
179
|
+
`),{count:0,path:null}):v===O?{count:0,path:null}:(await Rr(he(O)),await Ir(v,O),{count:1,path:x})})),F=g.reduce((v,x)=>v+x.count,0),w=g.flatMap(v=>v.path===null?[]:[v.path]);return t.stdout.write(`Included ${F} file(s)
|
|
180
|
+
`),{filesCopied:F,outputPaths:w}}d();async function eE(e,t){let{source:r,destination:n,baseDir:o,outputDir:s,appDirectory:a}=e,l=I(o,r);if(!await Q(l))throw new Error(`Source does not exist: ${l}`);await Go(l,a,r);let p=await ci(l),m,g;if(n===void 0?(m=I(s,Re(l)),g=`Included ${r}
|
|
181
|
+
`):(m=I(s,n),g=`Included ${r}
|
|
182
|
+
`),p){let F=await Ve(["**/*"],{cwd:l,absolute:!1});await Ac(l,m),t.stdout.write(g);let w=Oe(s,m),v=w?F.map(x=>I(w,x)):F;return{filesCopied:F.length,outputPaths:v}}return await Rr(he(m)),await Ir(l,m),t.stdout.write(g),{filesCopied:1,outputPaths:[Oe(s,m)]}}var o6=E.object({type:E.literal("pattern"),baseDir:E.string().optional(),include:E.array(E.string()).default(["**/*"]),ignore:E.array(E.string()).optional(),destination:E.string().optional()}),u6=E.object({type:E.literal("static"),source:E.string(),destination:E.string().optional()}),s6=E.object({type:E.literal("configKey"),key:E.string(),destination:E.string().optional(),anchor:E.string().optional(),groupBy:E.string().optional(),preserveFilePaths:E.boolean().default(!1)}),a6=E.discriminatedUnion("type",[o6,u6,s6]),c6=E.object({inclusions:E.array(a6),generatesAssetsManifest:E.boolean().default(!1)}).strict().superRefine((e,t)=>{for(let[r,n]of e.inclusions.entries())if(n.type==="configKey"){let o=n.anchor!==void 0,s=n.groupBy!==void 0;o!==s&&t.addIssue({code:E.ZodIssueCode.custom,message:"`anchor` and `groupBy` must both be set or both be omitted",path:["inclusions",r]})}});async function tE(e,t){let r=c6.parse(e.config),{extension:n,options:o}=t,s=Xd(n.outputPath),a=o.app.directory,l=new Map,p=new Set,m=0;for(let v of r.inclusions){if(v.type!=="configKey")continue;let x=U=>o.stdout.write(U),O=v.destination?md(v.destination,x):void 0,P=O===""?void 0:O,B=await XF({key:v.key,baseDir:n.directory,outputDir:s,context:t,appDirectory:a,destination:P,usedBasenames:p,preserveFilePaths:v.preserveFilePaths});B.pathMap.forEach((U,q)=>l.set(q,U)),m+=B.filesCopied}let g=await Promise.all(r.inclusions.filter(v=>v.type!=="configKey").map(async v=>{let x=B=>o.stdout.write(B),O=v.destination?md(v.destination,x):void 0,P=O===""?void 0:O;if(v.type==="pattern"){let B=v.baseDir?I(n.directory,v.baseDir):n.directory,U=P?I(s,P):s,q=await QF({sourceDir:B,outputDir:U,patterns:v.include,ignore:v.ignore??[],appDirectory:a,sourceDirConfigValue:v.baseDir??"."},o),Y=P?q.outputPaths.map(Z=>I(P,Z)):q.outputPaths;return{filesCopied:q.filesCopied,outputPaths:Y}}if(v.type==="static")return eE({source:v.source,destination:P,baseDir:n.directory,outputDir:s,appDirectory:a},o)})),F=r.generatesAssetsManifest?g.flatMap(v=>v?.outputPaths??[]):[],w=[m,...g.map(v=>v?.filesCopied??0)];if(r.generatesAssetsManifest){let v=r.inclusions.filter(x=>x.type==="configKey");await ZF(v,t,l,F)}return{filesCopied:w.reduce((v,x)=>v+(x??0),0)}}d();d();var Yo=ai(bB(),1);function l6(e){return new Map(e.map(t=>[t.uri,t.source]))}function f6(e,t,r){let o=e.split(`
|
|
183
|
+
`).slice(t,r+1),s=o.length===1;return o.map((a,l)=>{let p=t+l+1,m=s?a.trim():a;return`${p} ${m}`}).join(`
|
|
184
|
+
`)}function p6(e){switch(e){case Yo.Severity.ERROR:return{error:`
|
|
185
|
+
[error]:`};case Yo.Severity.WARNING:return{warn:`
|
|
186
|
+
[warning]:`};case Yo.Severity.INFO:return{info:`
|
|
187
|
+
[info]:`}}}function d6(e,t){return e.map((n,o)=>{let{message:s,uri:a,start:l,end:p,check:m,severity:g}=n,F=t.get(a),w=F===void 0?[]:[`
|
|
188
|
+
|
|
189
|
+
${f6(F,l.line,p.line)}`],v=o===e.length-1?"":`
|
|
190
|
+
|
|
191
|
+
`;return[p6(g),{bold:m},{subdued:`
|
|
192
|
+
${s}`},...w,v]}).flat()}async function rE(e){let r=await Q(I(e,".theme-check.yml"))?void 0:"theme-check:theme-app-extension",{offenses:n,theme:o}=await(0,Yo.themeCheckRun)(e,r),s=d6(n,l6(o));return f0(s)}async function nE(e,t){let{extension:r,options:n}=t;n.stdout.write("Running theme check on your Theme app extension...");let o=await rE(r.directory);o&&n.stdout.write(o)}d();async function iE(e,t){let{extension:r,options:n}=t;n.stdout.write(`Bundling theme extension ${r.localIdentifier}...`);let o=await vs(r);return await Promise.all(o.map(async s=>{let a=Oe(r.directory,s),l=I(r.outputPath,a);s!==l&&await Ir(s,l)})),{filesCopied:o.length}}d();async function oE(e,t){let r=t.extension.configuration;t.options.buildDirectory=e.config?.bundleFolder??void 0;let n=await NF(t.extension,t.options),o=he(n),s=e.config?.bundleFolder?I(he(t.extension.outputPath),e.config.bundleFolder):he(t.extension.outputPath);if(ot(o)===ot(s)||(await Ir(o,s),!e.config?.generatesAssetsManifest)||!Array.isArray(r.extension_points))return;let a=r.extension_points.filter(p=>typeof p=="object"&&p.build_manifest),l=D6(a,e.config?.bundleFolder);Object.keys(l).length>0&&await Zd(t,l)}function D6(e,t){let r={};for(let{target:n,build_manifest:o}of e){if(!o?.assets)continue;let s={};for(let[a,l]of Object.entries(o.assets))l?.filepath&&(s[a]=t?I(t,l.filepath):l.filepath);Object.keys(s).length>0&&(r[n]=s)}return r}d();async function uE(e,t){return jF(t.extension,t.options)}d();async function sE(e,t){let{extension:r}=t;if(await Q(r.outputPath)&&await ci(r.outputPath))throw new Error(`outputPath '${r.outputPath}' is a directory \u2014 expected a file path for the tax stub`);await vc(r.outputPath),await Et(r.outputPath,"(()=>{})();")}async function aE(e,t){switch(e.type){case"include_assets":return tE(e,t);case"build_theme":return nE(e,t);case"bundle_theme":return iE(e,t);case"bundle_ui":return oE(e,t);case"build_function":return uE(e,t);case"create_tax_stub":return sE(e,t);default:throw new Error(`Unknown build step type: ${e.type}`)}}async function cE(e,t){let r=Date.now();try{let n=await aE(e,t);return{id:e.id,success:!0,duration:Date.now()-r,output:n}}catch(n){let o=n;if(e.continueOnError)return t.options.stderr.write(`Warning: Step "${e.name}" failed but continuing: ${o.message}
|
|
193
|
+
`),{id:e.id,success:!1,duration:Date.now()-r,error:o};throw o.message=`Build step "${e.name}" failed: ${o.message}`,o}}d();import{openSync as h6,readSync as m6,closeSync as g6}from"fs";var lE=128*1024,nl=new Map,il=new Map,ol=new Map;function uo(e){let t=il.get(e);if(t!==void 0)return t;let r=Ut(e);return il.set(e,r),r}function Ps(e){let t=ol.get(e);if(t!==void 0)return t;let r=xy(e);return ol.set(e,r),r}function _6(e){let t=h6(e,"r");try{let r=Buffer.alloc(lE),n=m6(t,r,0,lE,0);return r.subarray(0,n).toString()}finally{g6(t)}}function fE(){nl.clear(),il.clear(),ol.clear()}function y6(e){let t=nl.get(e);if(t)return t;let r=_6(e),n=e.substring(e.lastIndexOf(".")),o;switch(n){case".js":case".mjs":case".cjs":case".ts":case".tsx":case".jsx":o=dE(r,e);break;case".rs":o=F6(r,e);break;default:o=[]}return nl.set(e,o),o}function Qd(e,t=new Set){if(t.has(e))return[];t.add(e);let r=y6(e),n=[e,...r];for(let o of r)try{if(uo(o)&&!Ps(o)){let s=Qd(o,t);n.push(...s)}}catch(s){if(s instanceof Error&&s.message.includes("ENOENT"))continue;throw s}return Bt(n)}function pE(){return{directImports:nl.size,fileExists:il.size,isDir:ol.size}}function eD(e,t){return dE(e,t)}function dE(e,t){let r=[],n=[/import\s+(?:[\s\S]*?)\s+from\s+['"](\.\.?\/[^'"]+)['"]/gm,/import\s+['"](\.\.?\/[^'"]+)['"]/g,/export\s+(?:[\s\S]*?)\s+from\s+['"](\.\.?\/[^'"]+)['"]/gm,/import\s*\(\s*['"](\.\.?\/[^'"]+)['"]\s*\)/g,/require\s*\(\s*['"](\.\.?\/[^'"]+)['"]\s*\)/g];for(let o of n){let s;for(;(s=o.exec(e))!==null;){let a=s[1];if(a&&a.startsWith(".")){let l=E6(a,t);l&&r.push(l)}}}return Bt(r)}function F6(e,t){let r=[],n=/^\s*(?:pub\s+)?mod\s+([a-z_][a-z0-9_]*)\s*;/gm,o;for(;(o=n.exec(e))!==null;){let a=o[1];if(a){let l=v6(a,t);l&&r.push(l)}}let s=/#\[path\s*=\s*"([^"]+)"\]/g;for(;(o=s.exec(e))!==null;){let a=o[1];if(a){let l=I(he(t),a);uo(l)&&r.push(l)}}return Bt(r)}function E6(e,t){let r=uo(t)&&Ps(t)?t:he(t),n=I(r,e);if(uo(n)&&Ps(n)){let s=[I(n,"index.js"),I(n,"index.ts"),I(n,"index.tsx"),I(n,"index.jsx")];for(let a of s)if(uo(a)&&!Ps(a))return a;return null}let o=[n,`${n}.js`,`${n}.ts`,`${n}.tsx`,`${n}.jsx`];for(let s of o)if(uo(s)&&!Ps(s))return s;return null}function v6(e,t){let r=he(t),n=[I(r,`${e}.rs`),I(r,e,"mod.rs")];for(let o of n)if(uo(o))return o;return null}var C6=["**/node_modules/**","**/.git/**","**/*.test.*","**/dist/**","**/*.swp","**/generated/**","**/.gitignore"],ul=class{get graphQLType(){return(this.specification.graphQLType??this.specification.identifier).toUpperCase()}get type(){return this.specification.identifier}get humanName(){return this.specification.externalName}get name(){return this.configuration.name??this.specification.externalName}get dependency(){return this.specification.dependency}get externalType(){return this.specification.externalIdentifier}get surface(){return this.specification.surface}get isPreviewable(){return this.features.includes("ui_preview")}get isThemeExtension(){return this.features.includes("theme")}get isFunctionExtension(){return this.features.includes("function")}get isESBuildExtension(){return this.features.includes("esbuild")}get isSourceMapGeneratingExtension(){return this.features.includes("generates_source_maps")}get isAppConfigExtension(){return this.specification.experience==="configuration"}get isFlow(){return this.specification.identifier.includes("flow")}get isEditorExtensionCollection(){return this.specification.identifier==="editor_extension_collection"}get hasDeploySteps(){return this.specification.clientSteps?.some(t=>t.lifecycle==="deploy"&&t.steps.length>0)??!1}get features(){return this.specification.appModuleFeatures(this.configuration)}get outputFileName(){return Re(this.outputRelativePath)}get outputRelativePath(){return this.specification.getOutputRelativePath?.(this)??""}constructor(t){this.configuration=t.configuration,this.configurationPath=t.configurationPath,this.entrySourceFilePath=t.entryPath??"",this.directory=t.directory,this.specification=t.specification,this.handle=this.buildHandle(),this.localIdentifier=this.handle,this.idEnvironmentVariableName=`SHOPIFY_${Fc(this.localIdentifier)}_ID`,this.outputPath=I(this.directory,this.outputRelativePath),this.uid=this.buildUIDFromStrategy(),this.devUUID=`dev-${this.uid}`}get isUUIDStrategyExtension(){return this.specification.uidStrategy==="uuid"}get isSingleStrategyExtension(){return this.specification.uidStrategy==="single"}get isDynamicStrategyExtension(){return this.specification.uidStrategy==="dynamic"}get outputPrefix(){return this.handle}isSentToMetrics(){return!this.isAppConfigExtension}isReturnedAsInfo(){return!this.isAppConfigExtension}async deployConfig({apiKey:t,appConfiguration:r}){let n=await this.specification.deployConfig?.(this.configuration,this.directory,t,void 0,{appConfiguration:r}),o=this.specification.transformLocalToRemote?.(this.configuration,r),s=n??o??void 0;return s&&Object.keys(s).length>0?s:void 0}validate(){return this.specification.validate?this.specification.validate(this.configuration,this.configurationPath,this.directory):Promise.resolve(Bn(void 0))}preDeployValidation(){return this.specification.preDeployValidation?this.specification.preDeployValidation(this):Promise.resolve()}buildValidation({outputPath:t}){return this.specification.buildValidation?this.specification.buildValidation(this,t):Promise.resolve()}async keepBuiltSourcemapsLocally(t){if(!this.isSourceMapGeneratingExtension)return Promise.resolve();let n=(await Ve(`**/${this.handle}.js.map`,{cwd:t,absolute:!0,followSymbolicLinks:!1}))[0];if(n===void 0)return Promise.resolve();let o=I(this.directory,Oe(t,n));await wc(n,o,{overwrite:!0}),ce(`Source map for ${this.localIdentifier} created: ${o}`)}async publishURL(t){let r=await jy(),n=this.specification.partnersWebIdentifier;return`https://${r}/${t.orgId}/apps/${t.appId}/extensions/${n}/${t.extensionId}`}getOutputFolderId(){return this.uid}getBundleExtensionStdinContent(){return this.specification.getBundleExtensionStdinContent?this.specification.getBundleExtensionStdinContent(this.configuration):{main:`import '.${this.entrySourceFilePath.replace(this.directory,"")}';`}}shouldFetchCartUrl(){return this.features.includes("cart_url")}hasExtensionPointTarget(t){return this.specification.hasExtensionPointTarget?.(this.configuration,t)??!1}get buildCommand(){return this.configuration.build?.command}get typegenCommand(){return this.configuration.build?.typegen_command}devSessionDefaultWatchPaths(){if(this.specification.identifier==="ui_extension"){let{main:t,assets:r}=this.getBundleExtensionStdinContent(),n=eD(t,this.directory),o=r?.flatMap(s=>eD(s.content,this.directory))??[];return n.concat(...o)}return[this.entrySourceFilePath]}get devSessionWatchConfig(){return this.specification.devSessionWatchConfig?this.specification.devSessionWatchConfig(this):this.isAppConfigExtension?{paths:[]}:void 0}async watchConfigurationPaths(){if(this.isAppConfigExtension)return[this.configurationPath];{let t=[];return await Q(I(this.directory,"locales"))&&t.push(I(this.directory,"locales","**.json")),t.push(I(this.directory,"**.toml")),t}}get inputQueryPath(){return I(this.directory,"input.graphql")}get isJavaScript(){return!!(this.entrySourceFilePath.endsWith(".js")||this.entrySourceFilePath.endsWith(".ts"))}async build(t){let{clientSteps:r=[]}=this.specification,n={extension:this,options:t,stepResults:new Map},o=r.find(s=>s.lifecycle==="deploy")?.steps??[];for(let s of o){let a=await cE(s,n);n.stepResults.set(s.id,a)}}async buildForBundle(t,r){this.outputPath=this.getOutputPathForDirectory(r),await this.build(t);let n=I(r,this.getOutputFolderId());await this.keepBuiltSourcemapsLocally(n)}getOutputPathForDirectory(t){return I(t,this.getOutputFolderId(),this.outputRelativePath)}get singleTarget(){let t=vt(this.configuration,"targeting")??[];if(t.length===1)return t[0]?.target}get contextValue(){let t=this.singleTarget??"";return this.isFlow&&(t=this.configuration.handle??""),t}async bundleConfig({appModuleUuids:t,developerPlatformClient:r,apiKey:n,appConfiguration:o}){let s=await this.deployConfig({apiKey:n,appConfiguration:o});if(!s)return;let a={config:JSON.stringify(s),context:this.contextValue,handle:this.handle},l=t[this.localIdentifier];return{...a,uid:this.uid,uuid:l,specificationIdentifier:r.toExtensionGraphQLType(this.graphQLType)}}async getDevSessionUpdateMessages(){if(this.specification.getDevSessionUpdateMessages)return this.specification.getDevSessionUpdateMessages(this.configuration)}patchWithAppDevURLs(t){this.specification.patchWithAppDevURLs&&this.specification.patchWithAppDevURLs(this.configuration,t)}async contributeToSharedTypeFile(t){await this.specification.contributeToSharedTypeFile?.(this,t)}watchPatterns(){let t=this.devSessionWatchConfig;return{paths:t?.paths??["**/*"],ignore:t?.ignore??C6}}watchedFiles(){let t=[],{paths:r,ignore:n}=this.watchPatterns(),o=r.flatMap(s=>By(s,{cwd:this.directory,absolute:!0,followSymbolicLinks:!1,ignore:n}));if(t.push(...o.flat()),!this.devSessionWatchConfig){let s=this.scanImports();t.push(...s)}return Bt(t.map(s=>Zi(s)))}async rescanImports(){let t=this.cachedImportPaths;return this.cachedImportPaths=void 0,fE(),this.scanImports(),t!==this.cachedImportPaths}scanImports(){if(this.cachedImportPaths!==void 0)return this.cachedImportPaths;if(cs(process.env.SHOPIFY_CLI_DISABLE_IMPORT_SCANNING))return this.cachedImportPaths=[],this.cachedImportPaths;try{let t=performance.now(),r=this.devSessionDefaultWatchPaths(),n=r.flatMap(l=>Qd(l).map(p=>Zi(ot(p))));this.cachedImportPaths=Bt(n)??[];let o=Math.round(performance.now()-t),s=pE(),a=s?` (cache: ${s.directImports} parsed, ${s.fileExists} stats)`:"";return ce(`Import scan for "${this.handle}": ${r.length} entries, ${this.cachedImportPaths.length} files, ${o}ms${a}`),this.cachedImportPaths}catch(t){return ce(`Failed to scan imports for extension ${this.handle}: ${t}`),this.cachedImportPaths=[],this.cachedImportPaths}}buildHandle(){switch(this.specification.uidStrategy){case"single":return this.specification.identifier;case"uuid":return this.configuration.handle??Lt(this.name??"");case"dynamic":if("topic"in this.configuration&&"uri"in this.configuration){let t=this.configuration,r=`${t.topic}${t.uri}${t.filter}`;return ps(r).substring(0,jc)}else return xc(JSON.stringify(this.configuration))}}buildUIDFromStrategy(){switch(this.specification.uidStrategy){case"single":return this.specification.identifier;case"uuid":return this.configuration.uid??xc(this.handle);case"dynamic":if("topic"in this.configuration&&"uri"in this.configuration){let t=this.configuration;return`${t.topic}::${t.filter??""}::${t.uri}`.substring(0,y0)}else return xc(JSON.stringify(this.configuration))}}};d();async function DE(e,t=""){let r=w6(t),n=await hs(r);for(;await Q(I(e,sl(n)))&&await Mr({message:`Configuration file ${sl(n)} already exists. Do you want to choose a different configuration name?`,confirmationMessage:"Yes, I'll choose a different name",cancellationMessage:"No, overwrite my existing configuration file"});)n=await hs(r);return sl(n)}function sl(e,t=!1){let r=Lt(e);return r===""?"shopify.app.toml":`shopify.app.${t?Iy.cyan(r):r}.toml`}async function tD(e){return Ve(I(e,"shopify.app*.toml"))}async function hE(e){let t=(await tD(e)).map(n=>Re(n));if(t.length===0)return to("Could not find any shopify.app.toml file in the directory.");if(t.length===1)return Bn(t[0]);let r=await r0({message:"Configuration file",choices:t.map(n=>({label:n,value:n}))});return Bn(r)}function w6(e){return{message:"Configuration file name:",initialAnswer:e,validate:b6,preview:t=>`${sl(t,!0)} will be generated in your root directory`}}function b6(e){if(Lt(e).length>238)return"The file name is too long."}d();d();d();import{readdirSync as A6}from"fs";async function al(e){if(!e||!await ci(e))return{};let t={},r=A6(e);return await Promise.all(r.map(async n=>{if(el(n)){let o=I(e,n),a=(await Ct.read(o)).content;a.client_id&&(t[a.client_id]=n)}})),t}d();var rD;function iD(){return rD??(rD=new Fd({projectName:"shopify-cli-app"})),rD}function cl(e,t=iD()){let r=Zi(e);return ce(Se`Reading cached app information for directory ${Ae.path(r)}...`),t.get(r)}function Jo(e,t=iD()){e.directory=Zi(e.directory),ce(Se`Storing app information for directory ${Ae.path(e.directory)}:${Ae.json(e)}`);let r=t.get(e.directory);r?t.set(e.directory,{...r,...e}):t.set(e.directory,e)}function mE(e,t=iD()){let r=Zi(e),n=t.get(r);n&&t.set(r,{...n,configFile:void 0})}var nD;function oD(){return nD??(nD=new Fd({projectName:"shopify-cli-app-command"})),nD}function gE(e){let t=process.env.COMMAND_RUN_ID;if(!t)return;let r=oD(),n=r.get(t);r.set(t,{...n,...e})}function ll(){let e=process.env.COMMAND_RUN_ID;return e?oD().get(e):void 0}function mG(){oD().clear()}function _E(e){gE({tomls:e})}function yE(e){gE({selectedToml:e})}async function FE(e,t,r,n){let o=await al(n?.directory);o&&_E(o);let s=p=>o[p?.apiKey]?{label:`${p.title} (${o[p.apiKey]})`,value:p.apiKey}:{label:p.title,value:p.apiKey},a=t,l=await Cd({message:"Which existing app is this for?",choices:a.map(s),hasMorePages:r,search:async p=>{let m=await e(p);return a=m.apps,{data:a.map(s),meta:{hasNextPage:m.hasMorePages}}}});return a.find(p=>p.apiKey===l)}async function wG({stores:e,hasMorePages:t=!1,onSearchForStoresByName:r,showDomainOnPrompt:n=!0}){if(e.length===0)return;if(e.length===1)return c0(`Using your default dev store, ${e[0].shopName}, to preview your project.`),e[0];let o=p=>{let m=p.shopName;return n&&p.shopDomain&&(m=`${p.shopName} (${p.shopDomain})`),{label:m,value:p.shopId}},s=e,a={};r&&(a.search=async p=>{let m=await r(p);return s=m.stores,{data:s.map(o),meta:{hasNextPage:m.hasMorePages}}});let l=await Cd({message:"Which store would you like to use to view your project?",choices:s.map(o),hasMorePages:t,...a});return s.find(p=>p.shopId===l)}async function EE(e){return hs({message:"App name",defaultValue:e,validate:t=>{if(t.length===0)return"App name can't be empty";if(t.length>xd)return`Enter a shorter name (${xd} character max.)`;if(t.includes("shopify"))return`Name can't contain "shopify." Enter another name.`}})}async function bG(e){return Mr({message:"Finished creating a dev store?",confirmationMessage:`Yes, ${e.businessName} has a new dev store`,cancellationMessage:"No, cancel dev"})}async function vE(){return Mr({message:"Create this project as a new app on Shopify?",confirmationMessage:"Yes, create it as a new app",cancellationMessage:"No, connect it to an existing app"})}function CE(e,t){let r=["application_url","redirect_urls"];t.appProxy?.proxyUrl&&r.push("app_proxy");let n={"Currently released app URL":[e],"=> Dev URL":[t.applicationUrl],"Affected configurations":r};return Mr({message:"Have Shopify override your app URLs when running `app dev` against your dev store? This won't affect your app on other stores",confirmationMessage:"Yes, automatically update",cancellationMessage:"No, never",infoTable:n})}function AG(){return Mr({message:"--use-localhost requires a certificate for `localhost`. Generate it now?",confirmationMessage:"Yes, use mkcert to generate it",cancellationMessage:"No, I'll run `app dev` again without `--use-localhost`"})}async function $G(e){if(e.noTunnelUseLocalhost)return{frontendUrl:"https://localhost",frontendPort:e.port,usingLocalhost:!0};let t=4040,r="",n=e.noTunnelUseLocalhost;if(bd())return r=`https://${bd()}-${t}.${s0()}`,{frontendUrl:r,frontendPort:t,usingLocalhost:n};if(wd()){let o=wd()?.replace("https://","");return r=`https://${t}-${o}`,{frontendUrl:r,frontendPort:t,usingLocalhost:n}}if(e.tunnelUrl){let o=e.tunnelUrl.match(/(https:\/\/[^:]+):([0-9]+)/);if(!o)throw new k(`Invalid tunnel URL: ${e.tunnelUrl}`,'Valid format: "https://my-tunnel-url:port"');return t=Number(o[2]),r=o[1],{frontendUrl:r,frontendPort:t,usingLocalhost:n}}return e.tunnelClient&&(t=e.tunnelClient.port,r=await S6(e.tunnelClient)),{frontendUrl:r,frontendPort:t,usingLocalhost:n}}async function S6(e){return new Promise((t,r)=>{let n=0,o=async()=>{let a=e.getTunnelStatus();if(ce(`Polling tunnel status for ${e.provider} (attempt ${n}): ${a.status}`),a.status==="error")return r(new k(a.message,a.tryMessage));a.status==="connected"?t(a.url):(n+=1,s())},s=()=>{setTimeout(o,500)};o()})}function wE(e,t,r){let n;t&&t.length>0?n=(Array.isArray(t)?t:[t]).reduce((a,l)=>(l&&l.length>0&&a.push(`${e}${l}`),a),[]):n=[`${e}/auth/callback`,`${e}/auth/shopify/callback`,`${e}/api/auth/callback`];let o=r?{appProxy:{proxyUrl:x6(hi(r.url,e),e),proxySubPath:r.subpath,proxySubPathPrefix:r.prefix}}:{};return{applicationUrl:e,redirectUrlWhitelist:n,...o}}function x6(e,t){let r=new URL(e),n=new URL(t);return r.host=n.host,r.toString().replace(/\/$/,"")}async function LG(e){let t={applicationUrl:e?.application_url??"",redirectUrlWhitelist:e?.auth?.redirect_urls??[]};return e?.app_proxy&&(t.appProxy={proxyUrl:e?.app_proxy.url,proxySubPath:e?.app_proxy.subpath,proxySubPathPrefix:e?.app_proxy.prefix}),t}async function UG(e){if(e.localApp&&e.localApp.configuration.client_id!==e.apiKey||(e.newApp??!Ic()))return!0;let t=e.cachedUpdateURLs===!0;if(e.cachedUpdateURLs===void 0)if(t=await CE(e.currentURLs.applicationUrl,e.newURLs),e.localApp){let r=e.localApp.configuration;r.build={...r.build,automatically_update_urls_on_dev:t},await(await Ct.read(e.localApp.configPath)).patch({build:{automatically_update_urls_on_dev:t}})}else Jo({directory:e.appDirectory,updateURLs:t});return t}async function kG(e,t,r){let n=await Ny(e,"tunnel_start",{port:t,provider:r}),o=Object.values(n).filter(a=>!a?.isErr()||a.error.type!=="invalid-provider");if(o.length>1)throw new Nr(`Multiple tunnel plugins for ${r} found`);let s=o[0];if(!s)throw new Nr(`We couldn't find the ${r} tunnel plugin`);if(s.isErr())throw new k(`${r} failed to start the tunnel.
|
|
194
|
+
${s.error.message}`,["What to try:",{list:{items:[["Try to run the command again"],["Add the flag",{command:"--tunnel-url {URL}"},"to use a custom tunnel URL"]]}}]);return s.value}d();d();async function uD({directory:e,configName:t,warningContent:r,shouldRenderSuccess:n=!0,reset:o=!1}){if(o){mE(e);let l=await Oc(e);Ds({headline:"Cleared current configuration.",body:["In order to set a new current configuration, please run",{command:Rc(l,"shopify app config use CONFIG_NAME")},{char:"."}]});return}r&&Bc(r);let s=(await P6(e,t)).valueOrAbort(),{activeConfig:a}=await $r(e,s);return sD(a.file.content,{configFileName:s,directory:e}),n&&Ds({headline:`Using configuration file ${s}`}),s}function sD(e,t){let{configFileName:r,directory:n}=t;if(e.client_id)Jo({directory:n,configFile:r});else throw new k(`Configuration file ${r} needs a client_id.`)}async function P6(e,t){if(t){let r=yr(t);return await Q(I(e,r))?Bn(r):to(`Could not find configuration file ${r}`)}return hE(e)}async function AE(e,t,r){let n=t,o=r?.clientId?e.appConfigByClientId(r.clientId):void 0,s=cl(e.directory)?.configFile,a=s?I(e.directory,s):null,l=!!(!n&&a&&!Ut(a));if(l&&!r?.skipPrompts){let w={headline:`Couldn't find ${s}`,body:["If you have multiple config files, select a new one. If you only have one config file, it's been selected as your default."]};n=await uD({directory:e.directory,warningContent:w,shouldRenderSuccess:!1})}if(!n&&o)return bE(e,o,"flag");if(!n&&r?.clientId)throw new k("The specified client ID couldn't be found in any TOML file, or the matching TOML file is malformed.");let p=n??(l?void 0:s),m;t?m="flag":p?m="cached":m="default";let g=yr(p),F=e.appConfigByName(g);if(!F)throw new k(Se`Couldn't find ${g} in ${Ae.path(e.directory)}.`);return bE(e,F,m)}async function bE(e,t,r){let n=typeof t.content.client_id=="string"?t.content.client_id:void 0,o=!!n&&n!=="",s=fl(e,t.path),a=await pl(e,n);return{file:t,source:r,isLinked:o,dotenv:s,hiddenConfig:a}}d();async function SE(e,t){await Ly("warn-on-multiple-versions",{days:1},async()=>{if(!t["@shopify/cli"]||Ry())return;let r=Jy(),n=r?hd:await Yy();if(!n)return;let o=r?await Gy(e):hd;if(!o)return;let a={headline:`Two Shopify CLI installations found \u2013 using ${r?"global installation":"local dependency"}`,body:[`A global installation (v${n}) and a local dependency (v${o}) were detected.
|
|
195
|
+
We recommend removing the @shopify/cli and @shopify/app dependencies from your package.json, unless you want to use different versions across multiple apps.`],link:{label:"See Shopify CLI documentation.",url:"https://shopify.dev/docs/apps/build/cli-for-apps#switch-to-a-global-executable-or-local-dependency"}};ro(a)})}d();import{existsSync as O6,readFileSync as T6}from"fs";var B6=[{name:"remix",detectors:{every:[{path:"package.json",matchContent:'"(dev)?(d|D)ependencies":\\s*{[^}]*"@remix-run\\/.*":\\s*".+?"[^}]*}'},{path:"package.json",matchContent:'"(dev)?(d|D)ependencies":\\s*{[^}]*"react":\\s*".+?"[^}]*}'}]}},{name:"nextjs",detectors:{every:[{path:"package.json",matchContent:'"(dev)?(d|D)ependencies":\\s*{[^}]*"next":\\s*".+?"[^}]*}'},{path:"package.json",matchContent:'"(dev)?(d|D)ependencies":\\s*{[^}]*"react":\\s*".+?"[^}]*}'}]}},{name:"express",detectors:{every:[{path:"package.json",matchContent:'"(dev)?(d|D)ependencies":\\s*{[^}]*"express":\\s*".+?"[^}]*}'}]}},{name:"rails",detectors:{every:[{path:"Gemfile",matchContent:'gem "rails"'}]}},{name:"flask",detectors:{every:[{path:"Pipfile",matchContent:"flask"}]}},{name:"django",detectors:{every:[{path:"Pipfile",matchContent:"django"}]}},{name:"laravel",detectors:{every:[{path:"composer.json",matchContent:'"require":\\s*{[^}]*"laravel/framework":\\s*".+?"[^}]*}'}]}},{name:"symfony",detectors:{every:[{path:"composer.json",matchContent:'"require":\\s*{[^}]*"symfony\\/.*":\\s*".+?"[^}]*}'}]}}];async function OE(e){let t={},r=B6.find(n=>(!n.detectors.some||n.detectors.some.reduce((o,s)=>xE(s,PE(e,s.path,t)),!1))&&(!n.detectors.every||n.detectors.every.reduce((o,s)=>o?xE(s,PE(e,s.path,t)):!1,!0)));return r?r.name:"unknown"}function xE(e,t={}){return t[e.path]?!e.matchContent||new RegExp(e.matchContent).test(t[e.path]):!1}function PE(e,t,r={}){if(r[t])return r;let n=I(e,t);if(!O6(n))return r;let o=T6(n,{encoding:"utf8"});return r[t]=o,r}var IE=ai(AB(),1);function I6(e){if(e.file.endsWith(".toml")&&e.message==="Expected object, received array")return"Use a TOML table instead of an array. [table] defines a single table; [[table]] defines an array of tables."}function Os(e){let t=I6(e),r=t?`${e.message}. ${t}`:e.message;return e.path?.length?`[${e.path.join(".")}]: ${r}`:r}async function lD(e,t,r){let n=r;if(!n)try{n=(await Ct.read(t)).content}catch(o){if(o instanceof ms)return{errors:[{file:t,message:o.message}]};throw o}return RE(e,t,n)}function RE(e,t,r){let n=e.safeParse(r);return n.success?{data:n.data}:{errors:GF(n.error.issues).map(o=>({file:t,message:o.message,path:o.path,code:o.code}))}}function TE(e,t,r){let n=e.parseConfigurationObject(r);switch(n.state){case"ok":return{data:n.data};case"error":return{errors:n.errors.map(o=>({file:t,message:o.message??"Unknown error",path:o.path}))}}}var Ss=class{constructor(){this.errors=[]}addError(t){this.errors.push(t)}addErrors(t){this.errors.push(...t)}getErrors(t){return t?this.errors.filter(r=>r.file===t):[...this.errors]}isEmpty(){return this.errors.length===0}};async function JY(e){if(!((await tD(e)).length>0))throw new k(Se`Couldn't find an app toml file at ${Ae.path(e)}, is this an app directory?`)}async function XY(e,t){let{project:r,activeConfig:n}=await $r(e),o=n.file.content,s=cD(r,n.file),a=await Promise.all(s.map(F=>ME(F.path,F.content))),l=a.flatMap(F=>F.errors??[]);if(l.length>0)throw new k(l.map(Os).join(`
|
|
196
|
+
`));let m=a.filter(F=>"web"in F).map(F=>F.web).some(F=>dn(F,ft.Frontend)||dn(F,ft.Backend)),g=Qc(o);return{isLaunchable:m,scopesArray:g,name:t,directory:r.directory,isEmbedded:m}}async function ME(e,t){let r=await lD(VF,e,t);if(r.errors)return{errors:r.errors};let n=r.data,o=new Set("roles"in n?n.roles:[]);"type"in n&&o.add(n.type);let{type:s,...a}={...n,roles:Array.from(o),type:void 0};return{web:{directory:he(e),configuration:a,framework:await OE(he(e))}}}async function NE(e){let{project:t,activeConfig:r}=await $r(e.directory,e.userProvidedConfigName,e.skipPrompts?{skipPrompts:!0}:void 0);return Xo({project:t,activeConfig:r,specifications:e.specifications,remoteFlags:e.remoteFlags,ignoreUnknownExtensions:e.ignoreUnknownExtensions})}async function Xo(e){let{project:t,activeConfig:r,specifications:n,remoteFlags:o=[],ignoreUnknownExtensions:s,reloadState:a,clientIdOverride:l}=e,p={...r.file.content};l&&(p.client_id=l);let g=zF(n),F=r.file.path,w=Re(F),v=await lD(g,F,p);if(v.errors){let Y=v.errors.map(Os).join(`
|
|
197
|
+
`);throw new k(`Validation errors in ${F}:
|
|
198
|
+
|
|
199
|
+
${Y}`)}let x=v.data,O=j6(t.appConfigFiles,{[w]:x.client_id}),P=!1;try{P=await M6(t.directory,F)}catch{}let B={allClientIdsByConfigName:O,usesLinkedConfig:!0,name:w,gitTracked:P,source:r.source,usesCliManagedUrls:x.build?.automatically_update_urls_on_dev},U={directory:t.directory,configPath:F,configuration:x,configurationLoadResultMetadata:B,configSchema:g,specifications:n,remoteFlags:o};return new aD({ignoreUnknownExtensions:s,loadedConfiguration:U,project:t,reloadState:a}).loaded()}function R6(e){return e.access_scopes?.scopes??""}async function jE(e){try{let{project:t,activeConfig:r}=await $r(e.directory,e.configName,e.skipPrompts?{skipPrompts:!0}:void 0),n=await Xo({project:t,activeConfig:r,specifications:e.specifications,remoteFlags:e.remoteFlags});return{state:"loaded-app",app:n,configuration:n.configuration,packageManager:t.packageManager}}catch{try{let t=await bs.load(e.directory),{configurationPath:r}=await N6(t.directory,e.configName),o=(await Ct.read(r)).content;return{state:"loaded-template",rawConfig:o,scopes:R6(o),appDirectory:t.directory,packageManager:t.packageManager}}catch{return{state:"error"}}}}async function ZY(e){let{project:t,activeConfig:r}=await $r(e.directory,Re(e.configPath)),n={extensionDevUUIDs:new Map(e.allExtensions.map(s=>[s.handle,s.devUUID])),previousDevURLs:e.devApplicationURLs},o=await Xo({project:t,activeConfig:r,specifications:e.specifications,remoteFlags:e.remoteFlags??[],reloadState:n});if(!o.errors.isEmpty()){let s=o.errors.getErrors();throw new k(Se`${Ae.errorText("Validation errors")}:\n\n${s.map(Os).join(`
|
|
200
|
+
`)}`)}return o}function $E(e){let t=xs(e);return t?`${Wo.production}.${t}`:Wo.production}var aD=class{constructor({ignoreUnknownExtensions:t,loadedConfiguration:r,reloadState:n,project:o}){this.errors=new Ss,this.ignoreUnknownExtensions=t??!1,this.specifications=r.specifications,this.remoteFlags=r.remoteFlags,this.loadedConfiguration=r,this.reloadState=n,this.project=o}get activeConfigFile(){let t=this.loadedConfiguration.configPath;return this.project.appConfigFiles.find(r=>r.path===t)}async loaded(){let{configuration:t,directory:r,configPath:n,configurationLoadResultMetadata:o,configSchema:s}=this.loadedConfiguration;await k6(o);let a=fl(this.project,n),l=await this.loadExtensions(r,t),p=t.name,g=t.handle??p??"",F=await pl(this.project,t.client_id);this.reloadState||await SE(r,this.project.nodeDependencies);let{webs:w,usedCustomLayout:v}=await this.loadWebs(r,t.web_directories),x=new Xc({name:g,directory:r,configPath:n,configuration:t,webs:w,modules:l,dotenv:a,errors:this.errors,specifications:this.specifications,configSchema:s,remoteFlags:this.remoteFlags,hiddenConfig:F,devApplicationURLs:this.getDevApplicationURLs(t,w)}),O=x.realExtensions.map(P=>P.type);return await p0(O),await L6(x,this.project.usesWorkspaces,{usedCustomLayoutForWeb:v,usedCustomLayoutForExtensions:t.extension_directories!==void 0}),await x.generateExtensionTypes(),x}async loadWebs(t,r){let n=this.activeConfigFile,o=n?cD(this.project,n):this.project.webConfigFiles,s=o.map(g=>g.path),a=await Promise.all(o.map(g=>ME(g.path,g.content))),l=[];for(let g of a)g.errors?this.errors.addErrors(g.errors):l.push(g.web);this.validateWebs(l);let p=s.every(g=>Oe(t,g).startsWith("web/"));return{webs:l,usedCustomLayout:r!==void 0||!p}}findSpecificationForType(t){return this.specifications.find(r=>r.identifier===t||r.externalIdentifier===t||r.additionalIdentifiers?.includes(t))}validateWebs(t){[ft.Backend,ft.Frontend].forEach(r=>{let n=t.filter(o=>o.configuration.roles.includes(r));if(n.length>1){let o=n.map(l=>I(l.directory,jr.web)),s=o.map(l=>` ${l}`).join(`
|
|
201
|
+
`),a=o[o.length-1];this.errors.addError({file:a,message:`You can only have one "web" configuration file with the ${r} role in your app.
|
|
202
|
+
|
|
203
|
+
Conflicting configurations found at:
|
|
204
|
+
${s}`})}})}async createExtensionInstance(t,r,n,o){let s=this.findSpecificationForType(t),a,l=!1;if(s)l=!0;else{if(this.ignoreUnknownExtensions)return;this.errors.addError({file:n,message:`Invalid extension type "${t}" in "${yc(n)}"`});return}let p=TE(s,n,r);if(p.errors){this.errors.addErrors(p.errors);return}let m=p.data;l&&(a=await this.findEntryPath(o,s));let g=new ul({configuration:m,configurationPath:n,entryPath:a,directory:o,specification:s});if(this.reloadState&&m.handle){let F=this.reloadState.extensionDevUUIDs.get(m.handle);F&&(g.devUUID=F)}if(l){let F=await g.validate();F.isErr()&&this.errors.addError({file:n,message:l0(F.error).trim()})}return g}async loadExtensions(t,r){if(this.specifications.length===0)return[];let n=await this.createExtensionInstances(t),o=await this.createConfigExtensionInstances(t,r),s=this.createWebhookSubscriptionInstances(t,r),a=await Promise.all([...n,...o,...s]),l=Qi(a.flat()),p=new Set;return l.forEach(m=>{if(m.handle&&p.has(m.handle)){let g=l.filter(w=>w.handle===m.handle),F=wy(g.map(w=>w.name));this.errors.addError({file:m.configurationPath,message:`Duplicated handle "${m.handle}" in extensions ${F}. Handle needs to be unique per extension.`})}else m.handle&&p.add(m.handle)}),l}async createExtensionInstances(t){let r=this.activeConfigFile;return(r?BE(this.project,r):this.project.extensionConfigFiles).map(async o=>{let s=o.path,a=he(s),l=o.content,p=F0.safeParse(l);if(!p.success)return this.errors.addError({file:s,message:`Invalid extension configuration at ${Oe(t,s)}`}),[];let{extensions:m,type:g}=p.data;if(m){let F=await lD(v0,s,o.content);if(F.errors)return this.errors.addErrors(F.errors),[];let w=F.data,v=w.extensions.map(async x=>{let O={...w,...x};return O.handle||(this.errors.addError({file:s,message:`Missing handle for extension "${O.name}" at ${Oe(t,s)}`}),O.handle="unknown-handle"),this.createExtensionInstance(O.type,O,s,a)});return Promise.all(v)}else{if(g)return this.createExtensionInstance(g,l,s,a);this.errors.addError({file:s,message:`Invalid extension type at "${Oe(t,s)}". Please specify a type.`});return}})}createWebhookSubscriptionInstances(t,r){let n=this.loadedConfiguration.configPath,o=this.findSpecificationForType(gs);if(!o)return[];let s=RE(Uc,n,r);if(s.errors)return this.errors.addErrors(s.errors),[];let{api_version:a,subscriptions:l=[]}=s.data.webhooks;return Qi(l.flatMap(g=>{let{uri:F,topics:w,compliance_topics:v,...x}=g;return w?.map(O=>({api_version:a,uri:F,topic:O,...x}))})).map(async g=>this.createExtensionInstance(o.identifier,g,n,t))}async createConfigExtensionInstances(t,r){let n=this.loadedConfiguration.configPath,o=await Promise.all(this.specifications.filter(a=>$c(a)).filter(a=>a.identifier!==gs).map(async a=>{let l=TE(a,n,r);if(l.errors)return this.errors.addErrors(l.errors),[null,[]];let p=l.data;return Object.keys(p).length===0?[null,Object.keys(p)]:[await this.createExtensionInstance(a.identifier,p,n,t).then(g=>this.validateConfigurationExtensionInstance(r.client_id,r,g)),Object.keys(p)]})),s=Object.keys(r).filter(a=>!o.some(([l,p])=>p.includes(a))).filter(a=>![...Object.keys(Zc.shape),"organization_id"].includes(a));return s.length>0&&!this.ignoreUnknownExtensions&&this.errors.addError({file:n,message:`Unsupported section(s) in app configuration: ${s.sort().join(", ")}`}),o.filter(([a])=>a).map(([a])=>a)}async validateConfigurationExtensionInstance(t,r,n){return n&&await n.deployConfig({apiKey:t,appConfiguration:r})?n:void 0}async findEntryPath(t,r){let n;return r.appModuleFeatures().includes("single_js_entry_path")?(n=(await Promise.all(["index"].flatMap(o=>[`${o}.js`,`${o}.jsx`,`${o}.ts`,`${o}.tsx`]).flatMap(o=>[`src/${o}`,o]).map(o=>I(t,o)).map(async o=>await Q(o)?o:void 0))).find(o=>o!==void 0),n||this.errors.addError({file:t,message:`Couldn't find an index.{js,jsx,ts,tsx} file in the directories ${t} or ${I(t,"src")}`})):r.identifier==="function"&&(n=(await Promise.all(["src/index.js","src/index.ts","src/main.rs"].map(o=>I(t,o)).map(async o=>await Q(o)?o:void 0))).find(o=>o!==void 0)),n}getDevApplicationURLs(t,r){let n=this.reloadState?.previousDevURLs;return n&&wE(n.applicationUrl,r.map(({configuration:o})=>o.auth_callback_path).find(o=>o),t.app_proxy)}};async function $r(e,t,r){let n=await bs.load(e),o=await AE(n,t,r);return{project:n,activeConfig:o}}async function M6(e,t){let r=I(e,".gitignore");if(!Ut(r))return!0;let n=await $e(r),o=IE.default.default().add(n),s=Oe(e,t);return!o.ignores(s)}async function N6(e,t){let r=yr(t),n=I(e,r);if(await Q(n))return{configurationPath:n,configurationFileName:r};throw new k(Se`Couldn't find ${r} in ${Ae.path(e)}.`)}function j6(e,t){let r=e.map(n=>{let o=Re(n.path);if(t[o]!==void 0&&typeof t[o]=="string")return[o,t[o]];let s=n.content.client_id;if(typeof s=="string"&&s!=="")return[o,s]}).filter(n=>n!==void 0);return Object.fromEntries(r)}async function $6(e){let t=e.filter(l=>dn(l,ft.Backend)),r=e.filter(l=>dn(l,ft.Frontend));if(t.length>1){ce("Unable to decide project type as multiple web backends");return}else{if(t.length===0&&r.length>0)return"frontend";if(!t[0]){ce("Unable to decide project type as no web backend");return}}let{directory:n}=t[0],o=I(n,"package.json"),s=I(n,"Gemfile"),a=I(n,"composer.json");if(await Q(o))return"node";if(await Q(s))return"ruby";if(await Q(a))return"php"}function dn(e,t){return e.configuration.roles.includes(t)}async function L6(e,t,r){let n=e.webs,o=e.allExtensions.filter(m=>m.isSentToMetrics()),s=e.name,a=e.directory,l=e.configuration.client_id,p=Qc(e.configuration).sort();await U6(n,o,r,s,a,l,p,t)}async function U6(e,t,r,n,o,s,a,l){await mr.addPublicMetadata(async()=>{let p=await $6(e),m=t.filter(B=>B.isFunctionExtension).length,g=t.filter(B=>B.isESBuildExtension).length,F=t.filter(B=>B.isThemeExtension).length,w=t.length,v=e.filter(B=>dn(B,ft.Backend)).length,x=v===1?e.find(B=>dn(B,ft.Backend))?.framework:void 0,O=e.filter(B=>dn(B,ft.Frontend)).length,P={};for(let B of t)P[B.type]===void 0?P[B.type]=1:P[B.type]++;return{api_key:s,project_type:p,app_extensions_any:w>0,app_extensions_breakdown:JSON.stringify(P),app_extensions_count:w,app_extensions_custom_layout:r.usedCustomLayoutForExtensions,app_extensions_function_any:m>0,app_extensions_function_count:m,app_extensions_theme_any:F>0,app_extensions_theme_count:F,app_extensions_ui_any:g>0,app_extensions_ui_count:g,app_name_hash:ps(n),app_path_hash:ps(o),app_scopes:JSON.stringify(a),app_web_backend_any:v>0,app_web_backend_count:v,app_web_custom_layout:r.usedCustomLayoutForWeb,app_web_framework:x,app_web_frontend_any:O>0,app_web_frontend_count:O,env_package_manager_workspaces:l}}),await mr.addSensitiveMetadata(async()=>({app_name:n}))}async function k6(e){await mr.addPublicMetadata(async()=>({cmd_app_all_configs_any:Object.keys(e.allClientIdsByConfigName).length>0,cmd_app_all_configs_clients:JSON.stringify(e.allClientIdsByConfigName),cmd_app_linked_config_used:e.usesLinkedConfig,...e.usesLinkedConfig?{cmd_app_linked_config_name:e.name,cmd_app_linked_config_git_tracked:e.gitTracked,cmd_app_linked_config_source:e.source,cmd_app_linked_config_uses_cli_managed_urls:e.usesCliManagedUrls}:{}}))}d();var q6="project.json";async function fD(e){let t=await h0(e),r=I(t,q6);return await Q(r)||await Et(r,JSON.stringify({})),r}function fl(e,t){let r=xs(t);if(r){let n=`${Wo.production}.${r}`;return e.dotenvFiles.get(n)}return e.dotenvFiles.get(Wo.production)}async function pl(e,t){if(!t||typeof t!="string")return{};await fD(e.directory);let r=e.hiddenConfigRaw,n=r[t];if(n&&typeof n=="object")return n;if(typeof r.dev_store_url=="string"){try{let o=await fD(e.directory);await Jc(o,t,{dev_store_url:r.dev_store_url})}catch{}return{dev_store_url:r.dev_store_url}}return{}}function BE(e,t){let r=t.content.extension_directories,o=(Array.isArray(r)&&r.length>0?r:["extensions/*"]).map(s=>`${s}/*.extension.toml`);return e.extensionConfigFiles.filter(s=>{let a=Oe(e.directory,s.path).replace(/\\/g,"/");return o.some(l=>bc(a,l))})}function cD(e,t){let r=t.content.web_directories;if(!Array.isArray(r)||r.length===0)return e.webConfigFiles;let n=r.map(o=>`${o}/shopify.web.toml`);return e.webConfigFiles.filter(o=>{let s=Oe(e.directory,o.path).replace(/\\/g,"/");return n.some(a=>bc(s,a))})}function dJ(e,t){let r=t.content.extension_directories,n=(Array.isArray(r)&&r.length>0?r:["extensions/*"]).map(l=>`${l}/*.extension.toml`),o=t.content.web_directories,s=Array.isArray(o)&&o.length>0?o.map(l=>`${l}/shopify.web.toml`):["**/shopify.web.toml"],a=[...n,...s];return e.errors.filter(l=>{if(l.path===t.path)return!0;let p=Oe(e.directory,l.path).replace(/\\/g,"/");return a.some(m=>bc(p,m))})}d();d();var LE=2,W6=["This may happen if:"," \u2022 Running in an unstable environment (container restart, resource limits)"," \u2022 Network interruption during app fetching","","Try running the command again. If the issue persists:"," \u2022 Check system resources and stability"," \u2022 Try running outside of containers/WSL if applicable"," \u2022 Report this issue with the error details and a verbose log"].filter(Boolean).join(`
|
|
205
|
+
`);async function UE(e,t,r,n,o){let s=e.length===0;if(s||(s=await vE()),s){let a=await EE(o.name);return n.createApp(r,{...o,name:a})}else{let l=ll()?.tomls??{};for(let m=0;m<LE;m++){let g=await FE(tF(n,r.id),e,t,{directory:o.directory});if(g){let F=l[g.apiKey];F&&yE(F);let w=await n.appFromIdentifiers(g.apiKey);if(w)return w}else{m<LE-1&&a0("App selection failed. Retrying...");continue}}let p=["Unable to select an app: the selection prompt failed multiple times.","",`Available apps: ${e.length}`].join(`
|
|
206
|
+
`);throw new Nr(p,W6)}}d();d();d();async function kE(e,t,r){let n=await H6(e,t,r),{app:{versionsDiff:o}}=await r.appVersionsDiff(e,{versionId:n.uuid,appVersionId:n.id});return{versionsDiff:o,versionDetails:n}}async function H6(e,t,r){try{return await r.appVersionByTag(e,t)}catch{throw t0({headline:"Version couldn't be released.",body:["Version",{userInput:t},"could not be found."]}),new In}}d();function z6(e,t){return t?e.find(n=>n.identifier===t||n.externalIdentifier===t||n.additionalIdentifiers?.includes(t))?.uidStrategy:void 0}async function qE(e,t,r,n,o){let a=(o??await t.activeAppVersion(e))?.appModuleVersions.filter(p=>z6(r,p.specification?.identifier)!=="uuid")??[];return a.length===0?void 0:Zo(a,r,n)}function Zo(e,t,r){let n={},o=t.filter($c);return e.forEach(s=>{let a=o.find(p=>p.identifier===s.specification?.identifier.toLowerCase());if(!a)return;let l=s.config;l&&(n=fn(n,a.transformRemoteToLocal?.(l,{flags:r})??l))}),{...n}}function Qo(e,t){return{title:e,uid:t,experience:"extension"}}function pD(e){return{title:e,uid:void 0,experience:"dashboard"}}async function RJ(e,t,r){let{versionsDiff:n,versionDetails:o}=await kE(t,r,e),s=p=>p.filter(m=>m.specification.experience==="extension"&&m.specification.identifier!=="webhook_subscription").map(m=>Qo(m.registrationTitle,void 0)),a=p=>p.filter(m=>m.specification.options.managementExperience==="dashboard").map(m=>pD(m.registrationTitle));return{extensionIdentifiersBreakdown:{onlyRemote:[...s(n.removed),...a(n.removed)],toCreate:[...s(n.added),...a(n.added)],toUpdate:[],unchanged:[...s(n.updated),...a(n.updated)]},versionDetails:o}}function MJ({localApp:e,versionAppModules:t,activeAppVersion:r}){if(e.allExtensions.filter(s=>s.isAppConfigExtension).length===0)return;let n=Zo(t,e.specifications??[],e.remoteFlags),o=Zo(r?.appModuleVersions??[],e.specifications??[],e.remoteFlags);return dD(n,o)}function dD(e,t){let r=new Set([...Object.keys(e),...Object.keys(t)]);if(r.size===0)return;let n={existingFieldNames:[],existingUpdatedFieldNames:[],newFieldNames:[],deletedFieldNames:[]};for(let o of r){let s=e[o],a=t[o];s===void 0?n.deletedFieldNames.push(o):a===void 0?n.newFieldNames.push(o):zy(s,a)?n.existingFieldNames.push(o):n.existingUpdatedFieldNames.push(o)}return n}d();d();async function DD(e,t=!0){let r=e.map(({local:l})=>`"${l.handle}"`).join(", "),n=e.map(({remote:l})=>l.type.toLocaleLowerCase()),o=n.filter((l,p)=>n.indexOf(l)===p).map(l=>`"${l}"`).join(", "),s=e.map(({local:l})=>`"${l.type}"`).join(", ");ro({headline:"Extension migrations can't be undone.",body:`Your ${r} configuration has been updated. Migrating gives you access to new features and won't impact the end user experience. All previous extension versions will reflect this change.`});let a=t?`Yes, confirm migration from ${o} to ${s}`:"Yes, confirm migration";return Mr({message:`Migrate ${r}?`,confirmationMessage:a,cancellationMessage:"No, cancel"})}d();async function WE(e){let{extensionsToMigrate:t,appId:r,remoteExtensions:n,migrationClient:o}=e;await Promise.all(t.map(({remote:l})=>V6({apiKey:r,registrationId:void 0,registrationUuid:l.uuid,migrationClient:o})));let s=new Map([["flow_action_definition","FLOW_ACTION"],["flow_trigger_definition","FLOW_TRIGGER"]]),a=t.map(({remote:l})=>l.uuid);return n.filter(l=>a.includes(l.uuid)).map(l=>({...l,type:s.get(l.type)??l.type}))}async function V6(e){let{apiKey:t,registrationId:r,registrationUuid:n,migrationClient:o}=e,s={apiKey:t,registrationId:r,registrationUuid:n},a=await o.migrateFlowExtension(s);if(a?.migrateFlowExtension?.userErrors?.length>0){let l=a.migrateFlowExtension.userErrors.map(p=>p.message).join(", ");throw new k(l)}if(!a?.migrateFlowExtension?.migratedFlowExtension)throw new k("Couldn't migrate to Flow extension");return r}d();async function HE(e){let{extensionsToMigrate:t,appId:r,remoteExtensions:n,migrationClient:o}=e;return await Promise.all(t.map(({remote:s})=>K6({apiKey:r,registrationId:void 0,registrationUuid:s.uuid,migrationClient:o}))),n.map(s=>t.some(({remote:a})=>a.uuid===s.uuid)?{...s,type:"UI_EXTENSION"}:s)}async function K6(e){let{apiKey:t,registrationId:r,registrationUuid:n,migrationClient:o}=e,s={apiKey:t,registrationId:r,registrationUuid:n},a=await o.migrateToUiExtension(s);if(a?.migrateToUiExtension?.userErrors?.length>0){let l=a.migrateToUiExtension.userErrors.map(p=>p.message).join(", ");throw new k(l)}if(!a?.migrateToUiExtension?.migratedToUiExtension)throw new k("Couldn't migrate to UI extension")}d();var zE={marketing_activity:["marketing_activity_extension"]},VE={flow_action:["flow_action_definition"],flow_trigger:["flow_trigger_definition"],flow_trigger_lifecycle_callback:["flow_trigger_discovery_webhook"]},KE={ui_extension:["CHECKOUT_UI_EXTENSION","POS_UI_EXTENSION"]},GE={admin_link:["app_link","bulk_action"]};function G6(e,t){let r=new Set(e.map(n=>n.localIdentifier));return Object.fromEntries(Object.entries(t).filter(([n])=>r.has(n)))}function hD(e,t,r,n){let o=G6(e,r),s=Object.keys(n),a=Object.values(n).flat(),l=e.filter(g=>s.includes(g.type)),p=t.filter(g=>a.includes(g.type)),m=new Map;return p.forEach(g=>{m.set(g.uuid,g),m.set(Lt(g.title.substring(0,jc)),g)}),l.reduce((g,F)=>{let w=o[F.localIdentifier]??"unknown",v=m.get(w)??m.get(F.localIdentifier.toLowerCase()),x=n[F.type]?.includes(v?.type??"undefined");return v&&x&&g.push({local:F,remote:v}),g},[])}async function YE(e){let{extensionsToMigrate:t,appId:r,type:n,remoteExtensions:o,migrationClient:s}=e;await Promise.all(t.map(({remote:l})=>Y6({apiKey:r,registrationId:void 0,registrationUuid:l.uuid,type:n,migrationClient:s})));let a=t.map(({remote:l})=>l.uuid);return o.filter(l=>a.includes(l.uuid)).map(l=>({...l,type:n.toUpperCase()}))}async function Y6(e){let{apiKey:t,registrationId:r,registrationUuid:n,type:o,migrationClient:s}=e,a={apiKey:t,registrationId:r,registrationUuid:n,type:o},l=await s.migrateAppModule(a);if(l?.migrateAppModule?.userErrors?.length>0){let p=l.migrateAppModule.userErrors.map(m=>m.message).join(", ");throw new k(p)}if(!l?.migrateAppModule?.migratedAppModule)throw new k(`Couldn't migrate to app module ${o}`);return r}d();d();var JE=li`
|
|
207
|
+
mutation MigrateFlowExtension($apiKey: String!, $registrationId: ID, $registrationUuid: String) {
|
|
208
|
+
migrateFlowExtension(
|
|
209
|
+
input: {apiKey: $apiKey, registrationId: $registrationId, registrationUuid: $registrationUuid}
|
|
210
|
+
) {
|
|
211
|
+
migratedFlowExtension
|
|
212
|
+
userErrors {
|
|
213
|
+
field
|
|
214
|
+
message
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
`;d();var XE=li`
|
|
219
|
+
mutation MigrateToUiExtension($apiKey: String!, $registrationId: ID, $registrationUuid: String) {
|
|
220
|
+
migrateToUiExtension(
|
|
221
|
+
input: {apiKey: $apiKey, registrationId: $registrationId, registrationUuid: $registrationUuid}
|
|
222
|
+
) {
|
|
223
|
+
migratedToUiExtension
|
|
224
|
+
userErrors {
|
|
225
|
+
field
|
|
226
|
+
message
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
`;d();var ZE=li`
|
|
231
|
+
mutation MigrateAppModule($apiKey: String!, $registrationId: ID, $registrationUuid: String, $type: String!) {
|
|
232
|
+
migrateAppModule(
|
|
233
|
+
input: {apiKey: $apiKey, registrationId: $registrationId, registrationUuid: $registrationUuid, type: $type}
|
|
234
|
+
) {
|
|
235
|
+
migratedAppModule
|
|
236
|
+
userErrors {
|
|
237
|
+
field
|
|
238
|
+
message
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
`;var dl=class e{static getInstance(t){return e.instance??(e.instance=new e(t)),e.instance}static resetInstance(){e.instance=void 0}constructor(t){this.clientName=R0.Partners,this.webUiName="Partner Dashboard",this.organizationSource=Vo.Partners,this.bundleFormat="zip",this._session=t}async session(){if(!this._session){if(u0())throw new Error("PartnersClient.session() should not be invoked dynamically in a unit test");let{token:t,userId:r}=await Ed();this._session={token:t,businessPlatformToken:"",accountInfo:{type:"UnknownAccount"},userId:r}}return this._session}async request(t,r=void 0,n,o){return Ky(t,await this.token(),r,n,o,this.createUnauthorizedHandler())}async token(){return(await this.session()).token}async unsafeRefreshToken(){let{token:t}=await Ed([],process.env,{noPrompt:!0,forceRefresh:!0}),r=await this.session();return t&&(r.token=t),r.token}async migrateFlowExtension(t){return this.request(JE,t)}async migrateAppModule(t){return this.request(ZE,t)}async migrateToUiExtension(t){return this.request(XE,t)}createUnauthorizedHandler(){return M0(this)}};async function ev(e){return await J6(e)?e.developerPlatformClient.activeAppVersion(e.remoteApp):e.activeAppVersion}async function J6(e){let{app:t,appId:r,developerPlatformClient:n,envIdentifiers:o,remoteApp:s}=e,a=await n.appExtensionRegistrations(s,e.activeAppVersion),l=t.allExtensions,p=o,m=a.app.extensionRegistrations,g=a.app.dashboardManagedExtensionRegistrations,F=dl.getInstance(),w=!1,v=m,x=hD(l,v,p,KE);if(x.length>0){if(!await DD(x))throw new In;v=await HE({extensionsToMigrate:x,appId:r,remoteExtensions:v,migrationClient:F}),w=!0}let O=[{typesMap:VE,migrate:WE},QE(zE,"marketing_activity"),QE(GE,"admin_link")];for(let P of O){let B=hD(l,g,p,P.typesMap);if(B.length===0)continue;if(!await DD(B,!1))throw new In;let q=await P.migrate({extensionsToMigrate:B,appId:r,remoteExtensions:g,migrationClient:F});v=v.concat(q),w=!0}return w}function QE(e,t){return{typesMap:e,migrate:r=>YE({...r,type:t})}}d();d();var X6={bullet:"+",color:"green",suffix:"(new)"},Z6={color:"#FF8800",suffix:"(updated)"},Q6={bullet:"-",color:"red",suffix:"(removed)"};function gD(e){return[...e.new.map(t=>mD(t,X6)),...e.updated?e.updated.map(t=>mD(t,Z6)):[],...e.unchanged,...e.removed.map(t=>mD(t,Q6))]}function mD(e,t){let r=typeof e=="string"?[e,{subdued:t.suffix??""}]:e;return{...t.bullet?{bullet:t.bullet}:{},item:r,color:t.color}}function eR({release:e,allowUpdates:t,allowDeletes:r,extensionIdentifiersBreakdown:n,configExtensionIdentifiersBreakdown:o}){if(!e||t&&r)return!0;let s=n.onlyRemote.length>0,a=(o?.deletedFieldNames.length??0)>0,l=s||a,p=n.toCreate.length>0||n.toUpdate.length>0,m=(o?.newFieldNames.length??0)>0||(o?.existingUpdatedFieldNames.length??0)>0,g=p||m;if(t&&!l||r&&!g)return!0;if(!o0()&&(l||g)){let F=[];throw g&&F.push("--allow-updates"),l&&F.push("--allow-deletes"),new k("This deployment includes changes that require confirmation.",["Run the command with",{command:F.join(" ")},"to deploy without confirmation."])}return!1}async function tv({allowUpdates:e,allowDeletes:t,extensionIdentifiersBreakdown:r,configExtensionIdentifiersBreakdown:n,appTitle:o,release:s,installCount:a}){if(await mr.addPublicMetadata(()=>iR(n)),eR({release:s,allowUpdates:e,allowDeletes:t,extensionIdentifiersBreakdown:r,configExtensionIdentifiersBreakdown:n}))return!0;let p=await rR(r),m=await nR(s,n);return tR({appTitle:o,extensionsContentPrompt:p,configContentPrompt:m,release:s,installCount:a})}async function tR({appTitle:e,extensionsContentPrompt:{extensionsInfoTable:t,hasDeletedExtensions:r},configContentPrompt:n,release:o,installCount:s}){let a=new Date().valueOf(),l=!0,p=[];n&&p.push(n.configInfoTable.items.length===0?{...n.configInfoTable,emptyItemsText:"No changes",items:[]}:n.configInfoTable);let m=e!==void 0&&r;t?p.push(m?{...t,helperText:"Removing extensions can permanently delete app user data"}:t):p.push({header:"Extensions:",emptyItemsText:"None",items:[]});let g=`${o?"Release":"Create"} a new version${e?` of ${e}`:""}?`,F=r&&s!==void 0&&s>0;m?l=await i0({message:g,infoTable:p,confirmation:e,...F?{warningItem:["This release removes extensions and related data from",{error:s.toString()},`app installations.
|
|
243
|
+
Use caution as this may include production data on live stores.`]}:{}}):l=await Mr({message:g,infoTable:p,confirmationMessage:`Yes, ${o?"release":"create"} this new version`,cancellationMessage:"No, cancel"});let w=new Date().valueOf()-a;return await mr.addPublicMetadata(()=>({cmd_deploy_confirm_cancelled:!l,cmd_deploy_confirm_time_to_complete_ms:w})),l}async function rR(e){let{onlyRemote:t,toCreate:r,toUpdate:n,unchanged:o}=e,s=(g,F)=>{switch(g.experience){case"dashboard":return[g.title,{subdued:`(${F}from Partner Dashboard)`}];case"extension":return g.uid&&g.uid.length>0?`${g.title} (uid: ${g.uid})`:g.title}},a,l={new:r.map(g=>s(g,"new, ")),unchanged:o.map(g=>s(g,"")),updated:n.map(g=>s(g,"updated, ")),removed:t.map(g=>s(g,"removed, "))},p=gD(l),m=t.length>0;return p.length>0&&(a={header:"Extensions:",items:p}),await mr.addPublicMetadata(()=>({cmd_deploy_confirm_new_registrations:r.length,cmd_deploy_confirm_updated_registrations:n.length,cmd_deploy_confirm_removed_registrations:t.length})),{extensionsInfoTable:a,hasDeletedExtensions:m}}async function nR(e,t){if(!t)return;let{existingFieldNames:r,existingUpdatedFieldNames:n,newFieldNames:o,deletedFieldNames:s}=t,l=gD({new:o,updated:n,unchanged:r,removed:s});return{configInfoTable:{header:"Configuration:",items:o.length>0||n.length>0||s.length>0||!e?l:[]}}}function iR(e){if(!e)return{cmd_deploy_include_config_used:!1};let{existingFieldNames:t,existingUpdatedFieldNames:r,newFieldNames:n,deletedFieldNames:o}=e,s=[...r,...n,...t];return{cmd_deploy_include_config_used:!0,...s.length>0?{cmd_deploy_config_modules_breakdown:JSON.stringify(s.sort())}:{},...r.length>0?{cmd_deploy_config_modules_updated:JSON.stringify(r.sort())}:{},...n.length>0?{cmd_deploy_config_modules_added:JSON.stringify(n.sort())}:{},...o.length>0?{cmd_deploy_config_modules_deleted:JSON.stringify(o.sort())}:{}}}async function rv(e){let t=await ev(e),r=await oR({options:e,activeAppVersion:t}),n=aR(r),o=await sR(e,t),a=e.release&&!e.allowDeletes&&n.onlyRemote.length>0?await pR(e).catch(()=>{}):void 0;if(!await tv({extensionIdentifiersBreakdown:n,configExtensionIdentifiersBreakdown:o,appTitle:e.remoteApp?.title,release:e.release,allowUpdates:e.allowUpdates,allowDeletes:e.allowDeletes,installCount:a}))throw new In;return cR(r)}async function oR({options:e,activeAppVersion:t}){let r=t?.appModuleVersions??[],n=e.app.allExtensions,o=e.envIdentifiers,s=r.filter(m=>m.registrationId===""),a=r.map(m=>{if(m.registrationId===""){let g=n.find(F=>o[F.localIdentifier]===m.registrationUuid)??uR(n,s,m);if(g)return{experience:g.specification.experience,status:"updated",local:g,remote:m}}else{let g=n.find(F=>m.registrationId===F.uid);if(g)return{experience:g.specification.experience,status:"unchanged",local:g,remote:m}}return{experience:m.specification?.experience??"extension",status:"deleted",remote:m}}),l=a.map(m=>m.local),p=n.filter(m=>!l.includes(m)).map(m=>({experience:m.specification.experience,status:"created",local:m}));return[...a,...p]}function uR(e,t,r){let n=(l,p)=>Lt(l.handle)===Lt(p.registrationTitle)&&(l.specification.identifier===p.specification?.identifier||l.specification.externalIdentifier===p.specification?.identifier),o=e.filter(l=>n(l,r));if(o.length!==1)return;let s=o[0];return t.some(l=>l!==r&&n(s,l))?void 0:s}async function sR(e,t){let{app:r,appId:n}=e,o=await lR(r,n),s=Zo(t?.appModuleVersions??[],r.specifications??[],r.remoteFlags);return dD(o,s)}function aR(e){let t=e.filter(r=>r.experience==="extension");return{onlyRemote:t.filter(r=>r.status==="deleted").map(r=>fR(r.remote)),toCreate:t.filter(r=>r.status==="created").map(r=>Qo(r.local.localIdentifier,r.local.uid)),toUpdate:t.filter(r=>r.status==="updated").map(r=>Qo(r.local.localIdentifier,void 0)),unchanged:t.filter(r=>r.status==="unchanged").map(r=>Qo(r.local.localIdentifier,void 0))}}function cR(e){let t={},r={};for(let n of e){if(!n.local)continue;let o=n.local.uid,s=n.remote?.registrationUuid??o,a=n.remote?.registrationId??o;t[n.local.localIdentifier]=s,r[n.local.localIdentifier]=a}return{appModuleUuids:t,appModuleRegistrationIds:r}}async function lR(e,t){let r={},n=e.allExtensions.filter(o=>o.isAppConfigExtension);for(let o of n){let s=await o.deployConfig({apiKey:t,appConfiguration:e.configuration}),a=o.specification.transformRemoteToLocal?.(s??{},{flags:e.remoteFlags})??o.configuration;r=fn(r,a)}return r}function fR(e){return e.specification?.options.managementExperience==="dashboard"?pD(e.registrationTitle):Qo(e.registrationTitle,e.registrationId)}async function pR(e){return e.developerPlatformClient.appInstallCount({id:e.remoteApp.id,apiKey:e.remoteApp.apiKey,organizationId:e.remoteApp.organizationId})}d();function nv({appName:e,org:t,devStores:r,updateURLs:n,messages:o}){let s=[`App: ${e}`];t&&s.unshift(`Org: ${t}`),r&&r.length>0&&r.forEach(l=>s.push(`Dev store: ${l}`)),n&&s.push(`Update URLs: ${n}`);let a=[{list:{items:s}}];if(o&&o.length)for(let l=0;l<o.length;l++){let p=o[l];if(!p||p.length===0)continue;let m=l===0?`
|
|
244
|
+
`:`
|
|
245
|
+
|
|
246
|
+
`;a=a.concat(m,p)}return a}d();async function YX({app:e,appApiKey:t,extensionUuids:r,command:n},o=process.env){let s=e.dotenv;s??(s={path:I(e.directory,$E(e.configPath)),variables:{}});let a={...e.dotenv?.variables??{}};o[e.idEnvironmentVariableName]||(a[e.idEnvironmentVariableName]=t),Object.keys(r).forEach(p=>{let m=`SHOPIFY_${Fc(p)}_ID`;o[m]||(a[m]=r[p])});let l=n==="import-extensions";if(s.variables=a,l){let m=await Q(s.path)?await $e(s.path):"",g=_0(m,a);await Et(s.path,g),e.dotenv=s}return e}function iv({app:e},t=process.env){let r={...e.dotenv?.variables,...t},n={},o=s=>{Object.keys(r).includes(s.idEnvironmentVariableName)&&(n[s.localIdentifier]=r[s.idEnvironmentVariableName])};return e.allExtensions.forEach(o),n}var ov=e=>({message:Se`Invalid Client ID: ${e}`,tryMessage:Se`You can find the Client ID in the app settings in the Developer Dashboard.`}),uv=["You can pass",{command:"--reset"},"to your command to reset your app configuration."],dR=(e,t=!1)=>[{list:{title:"Next steps:",items:["Check that your account has permission to develop apps for this organization or contact the owner of the organization to grant you permission",["Run",{command:"shopify auth login"},"to log into a different",t?"organization":"account","than",{bold:e}],["Pass",{command:"--reset"},"to your command to create a new app"]]}}],Dl=async e=>{let t=Od(),r=await t.appFromIdentifiers(e.apiKey);if(!r){let n=await t.accountInfo()??{type:"UnknownAccount"},o="Unknown account",s=!1;throw ky(n)?(o=n.orgName,s=!0):Uy(n)&&(o=n.email),new k(["No app with client ID",{command:e.apiKey},"found"],dR(o,s))}return r};async function hZ(e){let{noRelease:t,app:r,remoteApp:n,developerPlatformClient:o,organization:s}=e,a=await o.activeAppVersion(n);await DR(r),av({org:s.businessName,appName:n.title,appDotEnv:r.dotenv?.path,configFile:Re(r.configPath),messages:[uv]});let l=await rv({app:r,appId:n.apiKey,appName:n.title,release:!t,developerPlatformClient:o,envIdentifiers:iv({app:r}),remoteApp:n,activeAppVersion:a,allowUpdates:e.allowUpdates,allowDeletes:e.allowDeletes}),p=!1;return a&&(p=a.appModuleVersions.some(m=>!m.registrationId)),{deployIdentifiers:l,didMigrateExtensionsToDevDash:p}}async function DR(e){let t=e.configuration.build?.include_config_on_deploy;if(t===void 0)return;await(await Ct.read(e.configPath)).remove("build.include_config_on_deploy"),t?hR():mR()}function hR(){ro({headline:"Your configuration file has been modified",body:["The `include_config_on_deploy` field is no longer supported, since all apps must now include configuration on deploy. It has been removed from your configuration file."],link:{label:"See Shopify CLI documentation.",url:"https://shopify.dev/docs/apps/build/cli-for-apps/app-configuration#build"}})}function mR(){Bc({headline:"Configuration is now included on deploy",body:["The `include_config_on_deploy` field is no longer supported and has been removed from your configuration file. Review this file to ensure it's up to date with the correct configuration."],link:{label:"See Shopify CLI documentation.",url:"https://shopify.dev/docs/apps/build/cli-for-apps/app-configuration#build"}})}async function sv(e){let t=Od(),r=e.organizationId?await kc(e.organizationId,t):await gR(),{organization:n,apps:o,hasMorePages:s}=await t.orgAndApps(r.id),a=await UE(o,s,n,t,e);return await _D(a,t.organizationSource),a}async function gR(){let e=await N0();if(e.length===0)throw new k("No organizations found.","Make sure you have access to a Shopify organization.");return D0(e)}function mZ({organization:e,app:t,remoteApp:r,selectedStore:n,tunnelMode:o}){if(gy())return;let s="Not yet configured",a=t.configuration.build?.automatically_update_urls_on_dev;a!==void 0&&(s=a?"Yes":"No");let l=[uv];o==="use-localhost"&&l.push(["Note:",{command:"--use-localhost"},"is not compatible with Shopify features which directly invoke your app","(such as Webhooks, App proxy, and Flow actions), or those which require testing your app from another","device (such as POS)."]),av({org:e.businessName,appName:r.title,devStore:n.shopDomain,updateURLs:s,configFile:Re(t.configPath),messages:l})}function av({org:e,appName:t,devStore:r,updateURLs:n,configFile:o,appDotEnv:s,messages:a}){let l=[];r&&l.push(r);let p=(s&&Re(s))??(o&&yr(o));ro({headline:o?`Using ${p} for default values:`:"Using these settings:",body:nv({appName:t,org:e,devStores:l,updateURLs:n,messages:a})})}async function _D(e,t){let n={[t===Vo.BusinessPlatform?"business_platform_id":"partner_id"]:ls(e.organizationId)};await mr.addPublicMetadata(()=>({...n,api_key:e.apiKey}))}d();d();async function cv(e,t){ce(`Writing app configuration to ${t}`);let r=yR(structuredClone(e)),n=yD(r),o=new Ct(t,{});await o.replace(n),await o.transformRaw(_R)}function yD(e){if(e==null)return e;if(Array.isArray(e))return e.map(yD);if(typeof e=="object"){let t={};for(let[r,n]of Object.entries(e)){let o=yD(n);typeof o=="object"&&o!==null&&!Array.isArray(o)&&Object.keys(o).length===0||(t[r]=o)}return t}return e}function _R(e){let t=`# Learn more about configuring your app at https://shopify.dev/docs/apps/tools/cli/configuration
|
|
247
|
+
`,r=`
|
|
248
|
+
# Learn more at https://shopify.dev/docs/apps/tools/cli/configuration#access_scopes`,n=e.split(/(\r\n|\r|\n)/);return n.unshift(`
|
|
249
|
+
`),n.unshift(t),n.forEach((o,s)=>{o==="[access_scopes]"&&n.splice(s+1,0,r)}),n.join("")}function yR(e){let t=e.webhooks;if(Array.isArray(t?.subscriptions)&&t.subscriptions.length){let r=no(e?.application_url);t.subscriptions=b0(t.subscriptions),t.subscriptions=t.subscriptions.map(({uri:n,...o})=>({uri:r&&n.includes(r)?n.replace(r,""):n,...o}))}return e}d();d();d();var FR=zo.extend({app_proxy:E.object({url:E.preprocess(no,Nc(E.string({invalid_type_error:"Value must be string"}))),subpath:E.string({invalid_type_error:"Value must be a string"}),prefix:E.string({invalid_type_error:"Value must be a string"})}).optional()}),FD="app_proxy",ER={forward:(e,t)=>{let r=e;if(!r.app_proxy)return{};let n;return"application_url"in t&&(n=t?.application_url),{url:hi(r.app_proxy.url,n),subpath:r.app_proxy.subpath,prefix:r.app_proxy.prefix}},reverse:e=>{let t=e;return{app_proxy:{url:no(t.url),subpath:t.subpath,prefix:t.prefix}}}},vR=di({identifier:FD,schema:FR,transformConfig:ER,getDevSessionUpdateMessages:async e=>e.app_proxy?[`Using URL: ${e.app_proxy.url}`,"Any changes to prefix and subpath will only apply to new installs"]:[],patchWithAppDevURLs:(e,t)=>{t.appProxy&&(e.app_proxy={url:t.appProxy.proxyUrl,subpath:t.appProxy.proxySubPath,prefix:t.appProxy.proxySubPathPrefix})}}),lv=vR;d();var CR=zo.extend({pos:E.object({embedded:E.boolean({invalid_type_error:"Value must be Boolean"})}).optional()}),ED="point_of_sale",wR={embedded:"pos.embedded"},bR=di({identifier:ED,schema:CR,transformConfig:wR}),fv=bR;d();d();function pv(e,t){let r=e;if(!r.events?.subscription)return e;let n;return t&&"application_url"in t&&(n=t?.application_url),{...r,events:{...r.events,subscription:r.events.subscription.map(o=>({...o,uri:hi(o.uri,n)}))}}}function dv(e){let t=vt(e,"events"),r=vt(t,"api_version"),o=vt(t,"subscription")?.map(a=>{let{identifier:l,...p}=a;return p});return{events:r??o?{api_version:r,subscription:o}:{}}}var vD="events",AR={forward:pv,reverse:e=>dv(e)},SR=zo.extend({events:E.any().optional()}),xR=di({identifier:vD,schema:SR,transformConfig:AR}),Dv=xR;d();var PR={forward:TR,reverse:e=>BR(e)},wD="privacy_compliance_webhooks",OR=di({identifier:wD,schema:Uc,transformConfig:PR}),hv=OR;function TR(e,t){let r=vt(e,"webhooks"),n;"application_url"in t&&(n=t?.application_url);let o=Vy({customers_redact_url:CD(IR(r),n),customers_data_request_url:CD(RR(r),n),shop_redact_url:CD(MR(r),n)});if(Object.keys(o).length===0)return o;{let{api_version:s}=r;return{api_version:s,...o}}}function BR(e){let t=vt(e,"customers_redact_url"),r=vt(e,"customers_data_request_url"),n=vt(e,"shop_redact_url"),o=[];return r&&o.push({compliance_topics:[Lc.CustomersDataRequest],uri:r}),t&&o.push({compliance_topics:[Lc.CustomersRedact],uri:t}),n&&o.push({compliance_topics:[Lc.ShopRedact],uri:n}),o.length===0?{}:{webhooks:{subscriptions:w0(o),privacy_compliance:void 0}}}function bD(e,t){return e.subscriptions?.find(r=>r.compliance_topics?.includes(t))?.uri}function CD(e,t){return t&&e?.startsWith("/")?`${no(t)}${e}`:e}function IR(e){return bD(e,"customers/redact")??e?.privacy_compliance?.customer_deletion_url}function RR(e){return bD(e,"customers/data_request")??e?.privacy_compliance?.customer_data_request_url}function MR(e){return bD(e,"shop/redact")??e?.privacy_compliance?.shop_deletion_url}d();var NR="@shopify/post-purchase-ui-extensions",jR=Ge.extend({metafields:E.array(pi).optional()}),$R=Te({identifier:"checkout_post_purchase",dependency:NR,partnersWebIdentifier:"post_purchase",schema:jR,appModuleFeatures:e=>["ui_preview","cart_url","esbuild","single_js_entry_path"],getOutputRelativePath:e=>`dist/${e.handle}.js`,clientSteps:[{lifecycle:"deploy",steps:[{id:"bundle-ui",name:"Bundle UI Extension",type:"bundle_ui",config:{}}]}],deployConfig:async(e,t)=>({metafields:e.metafields??[]})}),mv=$R;d();var LR="@shopify/checkout-ui-extensions",UR=Ge.extend({name:E.string(),extension_points:E.array(E.string()).optional(),metafields:E.array(pi).optional(),settings:E.object({fields:E.any().optional()}).optional()}),kR=Te({identifier:"checkout_ui_extension",dependency:LR,schema:UR,appModuleFeatures:e=>["ui_preview","cart_url","esbuild","single_js_entry_path","generates_source_maps"],getOutputRelativePath:e=>`dist/${e.handle}.js`,clientSteps:[{lifecycle:"deploy",steps:[{id:"bundle-ui",name:"Bundle UI Extension",type:"bundle_ui",config:{}}]}],deployConfig:async(e,t)=>({extension_points:e.extension_points,capabilities:e.capabilities,supported_features:e.supported_features,metafields:e.metafields??[],name:e.name,settings:e.settings,localization:await pn(t,"checkout_ui")})}),gv=kR;d();d();d();var wt={customer_reference:"customer_reference",order_reference:"order_reference",product_reference:"product_reference",marketing_activity_reference:"marketing_activity_reference",abandonment_reference:"abandonment_reference",company_reference:"company_reference",company_contact_reference:"company_contact_reference"},dQ=["customer","order","product","marketing_activity","abandonment","company","company_contact"],_v=[wt.customer_reference,wt.order_reference,wt.product_reference,wt.company_reference,wt.company_contact_reference],yv=[wt.customer_reference,wt.order_reference,wt.product_reference,wt.marketing_activity_reference,wt.abandonment_reference,wt.company_reference,wt.company_contact_reference],Qe={boolean:"boolean",email:"email",multiLineText:"multi_line_text_field",int:"number_integer",singleLineText:"single_line_text_field",url:"url",decimal:"number_decimal",schemaTypeReference:"schema_type_reference"},Fv=[[Qe.boolean,"checkbox"],[Qe.email,"email"],[Qe.multiLineText,"text-multi-line"],[Qe.int,"int"],[Qe.singleLineText,"text-single-line"],[Qe.url,"url"],[Qe.decimal,"number"],[Qe.schemaTypeReference,"schema-type-reference"]],qR=[Qe.boolean,Qe.email,Qe.multiLineText,Qe.int,Qe.singleLineText,Qe.url,Qe.decimal],WR=[Qe.boolean,Qe.email,Qe.singleLineText,Qe.url,Qe.decimal,Qe.schemaTypeReference],Ev=Fv.filter(([e])=>qR.includes(e)),vv=Fv.filter(([e])=>WR.includes(e));d();d();var HR=e=>{try{return new URL(e).protocol==="https:"}catch{return!1}},eu=(e,t,r)=>{let n=hi(t,r);if(n.startsWith("/"))throw new k(`Flow action ${e} is a relative URL, but no application_url is configured. Set application_url in your app configuration or use an absolute HTTPS URL.`);if(!HR(n))throw new k(`Flow action ${e} must resolve to an HTTPS URL. Set application_url to an HTTPS URL or use an absolute HTTPS URL.`);return n},hl=async(e,t)=>{if(!t)return"";let r=await Ve(I(e,t));if(r.length>1)throw new Error("Multiple files found for schema path");if(r.length===0)throw new Error("No file found for schema path");return $e(r[0])};d();var zR=new Map(Ev),VR=new Map(vv),KR=(e,t)=>{let r=t==="flow_action"?zR:VR,n=AD(e.type),o=n?r.get("schema_type_reference"):r.get(e.type);if(typeof e.key!="string")throw new k(`key property must be specified for non-commerce object fields in ${JSON.stringify(e)}`);if(!o)throw new k(`Field type ${e.type} is not supported on Flow ${t==="flow_action"?"Actions":"Triggers"}`);let s={name:e.key,description:e.description,uiType:o};return t==="flow_action"&&(s.label=e.name,s.required=e.required),n&&(s.typeRefName=e.type.replace("schema.","")),s},GR=(e,t)=>{if(t==="flow_trigger"&&!_v.includes(e.type))throw new k(`Commerce object ${e.type} is not supported for Flow Triggers`);if(t==="flow_action"&&!yv.includes(e.type))throw new k(`Commerce object ${e.type} is not supported for Flow Actions`);let r=e.type.replace("_reference",""),n={name:`${r}_id`,uiType:t==="flow_action"?"commerce-object-id":r,description:e.description};return r==="marketing_activity"&&(n.uiType="marketing-activity-id",n.marketingActivityCreateUrl=e.marketingActivityCreateUrl,n.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),t==="flow_action"&&(n.label=`${qo(r)} ID`,n.required=e.required),n},ml=(e,t)=>t?t.map(n=>Object.keys(wt).includes(n.type)?GR(n,e):KR(n,e)):[];var SD=E0.extend({key:E.string().regex(/^[a-zA-Z\s]*$/,{message:"String must contain only alphabetic characters and spaces"}).optional()}),YR=Ho.extend({type:E.literal("flow_trigger"),name:E.string(),schema:E.string().optional(),settings:E.object({fields:E.array(SD).optional()}).optional()}).refine(e=>{let t=e.settings?.fields??[],r=t.every((o,s)=>gl(o,"flow_trigger",e.handle,s)),n=wv(t,e.schema);return r&&n}),JR=Te({identifier:"flow_trigger",schema:YR,appModuleFeatures:e=>[],deployConfig:async(e,t)=>({title:e.name,description:e.description,fields:ml("flow_trigger",e.settings?.fields),schema_patch:await hl(t,e.schema)})}),Cv=JR;function bv(e,t,r,n){let o=`'${e}' property must be a string for 'field[${n}]' ${JSON.stringify(t)} of flow extension '${r}'`;return{required_error:o,invalid_type_error:o}}var xD=E.object({type:E.string(),description:E.string().optional()}).strict(),gl=(e,t,r,n)=>{let o=Object.keys(wt).includes(e.type);return o?o?xD.extend({required:E.boolean().optional(),marketingActivityCreateUrl:E.string().optional(),marketingActivityDeleteUrl:E.string().optional()}).parse(e):xD.parse(e):t==="flow_action"?xD.extend({key:E.string(bv("key",e,r,n)),name:E.string(bv("name",e,r,n)),required:E.boolean().optional()}).parse(e):SD.parse(e)},AD=e=>e.startsWith("schema."),XR=e=>/[\r\n\t]/.test(e),Ts=e=>Nc(e,{message:'Invalid URL: URL must be an absolute HTTPS URL or a relative URL starting with a single slash (e.g. "/api/endpoint").'}).refine(t=>!XR(t),{message:"Invalid URL: URL must not contain control characters such as newlines or tabs."}).refine(t=>!t.startsWith("//"),{message:"Invalid URL: Relative URLs must start with a single slash."}),Av=(e,t,r)=>{if(e||t){if(!e)throw new E.ZodError([{code:E.ZodIssueCode.custom,path:["extensions[0].config_page_url"],message:"To set a custom configuration page a `config_page_url` must be specified."}]);if(!t)throw new E.ZodError([{code:E.ZodIssueCode.custom,path:["extensions[0].config_page_preview_url"],message:"To set a custom configuration page a `config_page_preview_url` must be specified."}]);if(!r)throw new E.ZodError([{code:E.ZodIssueCode.custom,path:["extensions[0].validation_url"],message:"To set a custom configuration page a `validation_url` must be specified."}])}return!0},wv=(e,t)=>{if(e.some(r=>AD(r.type))&&!t)throw new E.ZodError([{code:E.ZodIssueCode.custom,path:["extensions[0].schema"],message:"To reference schema types a `schema` must be specified."}]);return!0},Sv=(e,t)=>{if(e||t){if(!e)throw new E.ZodError([{code:E.ZodIssueCode.custom,path:["extensions[0].return_type_ref"],message:"When uploading a schema a `return_type_ref` must be specified."}]);if(!t)throw new E.ZodError([{code:E.ZodIssueCode.custom,path:["extensions[0].schema"],message:"To set a return type a `schema` must be specified."}])}return!0};d();var xv=["runtime_url","validation_url","config_page_url","config_page_preview_url"];var ZR=Ho.extend({type:E.literal("flow_action"),name:E.string(),runtime_url:Ts(E.string({invalid_type_error:"Value must be string"})),validation_url:Ts(E.string({invalid_type_error:"Value must be string"})).optional(),config_page_url:Ts(E.string({invalid_type_error:"Value must be string"})).optional(),config_page_preview_url:Ts(E.string({invalid_type_error:"Value must be string"})).optional(),schema:E.string().optional(),return_type_ref:E.string().optional()}).refine(e=>{let t=Av(e.config_page_url,e.config_page_preview_url,e.validation_url),n=(e.settings?.fields??[]).every((s,a)=>gl(s,"flow_action",e.handle,a)),o=Sv(e.return_type_ref,e.schema);return t&&n&&o}),QR=Te({identifier:"flow_action",schema:ZR,appModuleFeatures:e=>[],patchWithAppDevURLs:(e,t)=>{for(let r of xv){let n=e[r];typeof n=="string"&&n.startsWith("/")&&(e[r]=eu(r,n,t.applicationUrl))}},deployConfig:async(e,t,r,n,o)=>{let s=o?.appConfiguration,a=typeof s?.application_url=="string"?s.application_url:void 0;return{title:e.name,description:e.description,url:eu("runtime_url",e.runtime_url,a),fields:ml("flow_action",e.settings?.fields),validation_url:e.validation_url?eu("validation_url",e.validation_url,a):void 0,custom_configuration_page_url:e.config_page_url?eu("config_page_url",e.config_page_url,a):void 0,custom_configuration_page_preview_url:e.config_page_preview_url?eu("config_page_preview_url",e.config_page_preview_url,a):void 0,schema_patch:await hl(t,e.schema),return_type_ref:e.return_type_ref}}}),Pv=QR;d();import eM from"fs";var Ov=["buyer_experience","customers","fulfillment","inventory_and_merch","loyalty","orders","promotion","risk","b2b","payment_reminders","custom_data","error_monitoring"],tM=["capture_at_fulfillment"],rM=Ho.extend({type:E.literal("flow_template"),name:E.string(),description:E.string().max(1024),template:E.object({categories:E.array(E.string().refine(e=>Ov.concat(tM).includes(e),e=>({message:`${e} is not a valid category. Valid categories include: ${Ov.join(", ")}.`}))),module:E.string(),require_app:E.boolean().optional(),discoverable:E.boolean().optional(),allow_one_click_activate:E.boolean().optional(),enabled:E.boolean().optional()})}),nM=Te({identifier:"flow_template",schema:rM,appModuleFeatures:e=>["ui_preview"],clientSteps:[{lifecycle:"deploy",steps:[{id:"copy-files",name:"Copy Files",type:"include_assets",config:{inclusions:[{type:"pattern",include:["**/*.flow","**/*.json","**/*.toml"]}]}}]}],deployConfig:async(e,t)=>({template_handle:e.handle,name:e.name,description:e.description,categories:e.template.categories,require_app:e.template.require_app,discoverable:e.template.discoverable,allow_one_click_activate:e.template.allow_one_click_activate,enabled:e.template.enabled,definition:await iM(t,e.template.module),localization:await pn(t,e.name)})});async function iM(e,t){let n=(await Ve(I(e,t)))[0];if(!n)throw new k(`Missing flow file with the path ${I(e,t)}`);return eM.readFileSync(n,"base64")}var Tv=nM;d();var oM=Ge.extend({build:E.object({command:E.string().transform(e=>e.trim()===""?void 0:e).optional(),path:E.string().optional(),watch:E.union([E.string(),E.string().array()]).optional(),wasm_opt:E.boolean().optional().default(!0),typegen_command:E.string().transform(e=>e.trim()===""?void 0:e).optional()}).optional(),name:E.string(),type:E.string(),configuration_ui:E.boolean().optional().default(!0),ui:E.object({enable_create:E.boolean().optional(),paths:E.object({create:E.string(),details:E.string()}).optional(),handle:E.string().optional()}).optional(),api_version:E.string(),input:E.object({variables:E.object({namespace:E.string(),key:E.string()}).optional()}).optional(),targeting:E.array(E.object({target:E.string(),input_query:E.string().optional(),export:E.string().optional()})).optional()}),uM=Te({identifier:"function",additionalIdentifiers:["order_discounts","cart_checkout_validation","cart_transform","delivery_customization","payment_customization","product_discounts","shipping_discounts","fulfillment_constraints","order_routing_location_rule","local_pickup_delivery_option_generator","pickup_point_delivery_option_generator"],schema:oM,appModuleFeatures:e=>["function"],getOutputRelativePath:e=>I("dist","index.wasm"),devSessionWatchConfig:e=>{let t=e.configuration;if(!t.build||!t.build.watch)return;let r=[t.build.watch].flat().map(n=>I(e.directory,n));return r.push(I(e.directory,"locales","**.json")),r.push(I(e.directory,"**","!(.)*.graphql")),r.push(I(e.directory,"**.toml")),{paths:r}},clientSteps:[{lifecycle:"deploy",steps:[{id:"build-function",name:"Build Function",type:"build_function",config:{}}]}],deployConfig:async(e,t,r)=>{let n,o=Sc(),s=I(t,"input.graphql");await Q(s)&&(n=await $e(s));let a=e.targeting&&await Promise.all(e.targeting.map(async p=>{let m;return p.input_query&&(m=await sM(I(t,p.input_query))),{handle:p.target,export:p.export,input_query:m}})),l;return e.ui?.paths&&(l={app_bridge:{details_path:e.ui.paths.details,create_path:e.ui.paths.create}}),e.ui?.handle!==void 0&&(l={...l,ui_extension_handle:e.ui.handle}),{title:e.name,module_id:o,description:e.description,app_key:r,api_type:e.type==="function"?void 0:e.type,api_version:e.api_version,input_query:n,input_query_variables:e.input?.variables?{single_json_metafield:e.input.variables}:void 0,ui:l,enable_creation_ui:e.ui?.enable_create??!0,localization:await pn(t,"function"),targets:a}},preDeployValidation:async e=>{if(!await Q(e.outputPath))throw new k(Se`The function extension "${e.handle}" hasn't compiled the wasm in the expected path: ${e.outputPath}`,"Make sure the build command outputs the wasm in the expected directory.")}});async function sM(e){if(await Q(e))return $e(e);throw new k(`No input query file at ${e}.`,"Create the file or remove the line referencing it in the extension's TOML.")}var Bv=uM;d();d();d();var Iv=50,Fr=Ge.extend({api_version:E.string(),payment_session_url:E.string().url(),refund_session_url:E.string().url().optional(),capture_session_url:E.string().url().optional(),void_session_url:E.string().url().optional(),supported_countries:E.array(E.string()),supported_payment_methods:E.array(E.string()),test_mode_available:E.boolean(),merchant_label:E.string().max(Iv),input:E.object({metafield_identifiers:E.object({namespace:E.string(),key:E.string()}).optional()}).optional()}),gi=E.object({buyer_label:E.string().max(Iv).optional(),buyer_label_translations:E.array(E.object({locale:E.string(),label:E.string()})).optional()}),tu=E.object({supports_installments:E.boolean().optional(),supports_deferred_payments:E.boolean().optional()}),_l=E.object({multiple_capture:E.boolean().optional()}),_i=E.object({confirmation_callback_url:E.string().url().optional(),supports_3ds:E.boolean()}),Dn=E.object({supported_buyer_contexts:E.array(E.object({currency:E.string(),countries:E.array(E.string()).nonempty().optional()}).strict()).optional().refine(e=>e===void 0||e.every(t=>t.countries)||e.every(t=>!t.countries),{message:"Must all be defined with only a currency, or must all be defined with a currency plus countries -- a mixture of the two is not allowed"})});var PD="payments.offsite.render",Rv=Fr.merge(gi).merge(tu).merge(_i).merge(_l).merge(Dn).extend({targeting:E.array(E.object({target:E.literal(PD)})).length(1),supports_oversell_protection:E.boolean().optional(),supports_3ds:E.boolean().optional()}).refine(e=>!e.supports_oversell_protection||e.confirmation_callback_url,{message:"Property required when supports_oversell_protection is true",path:["confirmation_callback_url"]}).refine(e=>e.supports_installments===e.supports_deferred_payments,{message:"supports_installments and supports_deferred_payments must be the same"});function Aee(e){return{api_version:e.api_version,payment_session_url:e.start_payment_session_url,refund_session_url:e.start_refund_session_url,capture_session_url:e.start_capture_session_url,void_session_url:e.start_void_session_url,confirmation_callback_url:e.confirmation_callback_url,multiple_capture:e.multiple_capture,merchant_label:e.merchant_label,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,supported_buyer_contexts:e.supported_buyer_contexts,test_mode_available:e.test_mode_available,buyer_label:e.default_buyer_label,buyer_label_translations:e.buyer_label_to_locale,supports_oversell_protection:e.supports_oversell_protection,supports_3ds:e.supports_3ds,supports_deferred_payments:e.supports_deferred_payments,supports_installments:e.supports_installments}}async function Mv(e){return{api_version:e.api_version,start_payment_session_url:e.payment_session_url,start_refund_session_url:e.refund_session_url,start_capture_session_url:e.capture_session_url,start_void_session_url:e.void_session_url,confirmation_callback_url:e.confirmation_callback_url,multiple_capture:e.multiple_capture,merchant_label:e.merchant_label,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,supported_buyer_contexts:e.supported_buyer_contexts,test_mode_available:e.test_mode_available,default_buyer_label:e.buyer_label,buyer_label_to_locale:e.buyer_label_translations,supports_oversell_protection:e.supports_oversell_protection,supports_3ds:e.supports_3ds,supports_deferred_payments:e.supports_deferred_payments,supports_installments:e.supports_installments}}d();d();function yi(e,t){let r=e.ui_extension_handle;if(r||!("ui_extension_registration_uuid"in e))return r;let n=t.find(o=>o.uuid===e.ui_extension_registration_uuid)?.title;return n?Lt(n):r}var OD="payments.redeemable.render",Nv=Fr.merge(gi).merge(Dn).extend({targeting:E.array(E.object({target:E.literal(OD)})).length(1),api_version:E.string(),balance_url:E.string().url(),ui_extension_handle:E.string().optional(),checkout_payment_method_fields:E.array(E.object({type:E.union([E.literal("string"),E.literal("number"),E.literal("boolean")]),required:E.boolean(),key:E.string()})).optional()});function Mee(e,t){let r=yi(e,t);return{api_version:e.api_version,payment_session_url:e.start_payment_session_url,refund_session_url:e.start_refund_session_url,capture_session_url:e.start_capture_session_url,void_session_url:e.start_void_session_url,merchant_label:e.merchant_label,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,supported_buyer_contexts:e.supported_buyer_contexts,test_mode_available:e.test_mode_available,buyer_label:e.default_buyer_label,buyer_label_translations:e.buyer_label_to_locale,balance_url:e.balance_url,checkout_payment_method_fields:e.checkout_payment_method_fields?.map(n=>({key:n.key,type:n.type,required:n.required})),ui_extension_handle:r}}async function jv(e){let t=e.supported_payment_methods[0]==="gift-card"?"gift_card":null;return{api_version:e.api_version,start_payment_session_url:e.payment_session_url,start_refund_session_url:e.refund_session_url,start_capture_session_url:e.capture_session_url,start_void_session_url:e.void_session_url,merchant_label:e.merchant_label,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,supported_buyer_contexts:e.supported_buyer_contexts,test_mode_available:e.test_mode_available,default_buyer_label:e.buyer_label,buyer_label_to_locale:e.buyer_label_translations,balance_url:e.balance_url,redeemable_type:t,checkout_payment_method_fields:e.checkout_payment_method_fields,ui_extension_handle:e.ui_extension_handle}}d();var TD="payments.custom-onsite.render",$v=7,Lv=Fr.merge(gi).merge(tu).merge(_i).merge(Dn).extend({targeting:E.array(E.object({target:E.literal(TD)})).length(1),supports_3ds:E.boolean().optional(),update_payment_session_url:E.string().url().optional(),multiple_capture:E.boolean().optional(),supports_oversell_protection:E.boolean().optional(),modal_payment_method_fields:E.array(E.object({})).optional(),ui_extension_handle:E.string().optional(),start_verification_session_url:E.string().url().optional(),checkout_payment_method_fields:E.array(E.object({type:E.union([E.literal("string"),E.literal("number"),E.literal("boolean")]),required:E.boolean(),key:E.string()})).max($v,`The extension can't have more than ${$v} checkout_payment_method_fields`).optional()}).refine(e=>e.supports_installments===e.supports_deferred_payments,{message:"supports_installments and supports_deferred_payments must be the same"});function kee(e,t){let r=yi(e,t);return{api_version:e.api_version,payment_session_url:e.start_payment_session_url,refund_session_url:e.start_refund_session_url,capture_session_url:e.start_capture_session_url,void_session_url:e.start_void_session_url,confirmation_callback_url:e.confirmation_callback_url,update_payment_session_url:e.update_payment_session_url,start_verification_session_url:e.start_verification_session_url,merchant_label:e.merchant_label,supports_oversell_protection:e.supports_oversell_protection,supports_3ds:e.supports_3ds,supports_installments:e.supports_installments,supports_deferred_payments:e.supports_deferred_payments,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,supported_buyer_contexts:e.supported_buyer_contexts,test_mode_available:e.test_mode_available,multiple_capture:e.multiple_capture,buyer_label:e.default_buyer_label,buyer_label_translations:e.buyer_label_to_locale,checkout_payment_method_fields:e.checkout_payment_method_fields,modal_payment_method_fields:e.modal_payment_method_fields,ui_extension_handle:r}}async function Uv(e){return{api_version:e.api_version,start_payment_session_url:e.payment_session_url,start_refund_session_url:e.refund_session_url,start_capture_session_url:e.capture_session_url,start_void_session_url:e.void_session_url,confirmation_callback_url:e.confirmation_callback_url,update_payment_session_url:e.update_payment_session_url,start_verification_session_url:e.start_verification_session_url,merchant_label:e.merchant_label,supports_oversell_protection:e.supports_oversell_protection,supports_3ds:e.supports_3ds,supports_installments:e.supports_installments,supports_deferred_payments:e.supports_deferred_payments,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,supported_buyer_contexts:e.supported_buyer_contexts,test_mode_available:e.test_mode_available,multiple_capture:e.multiple_capture,default_buyer_label:e.buyer_label,buyer_label_to_locale:e.buyer_label_translations,checkout_payment_method_fields:e.checkout_payment_method_fields,modal_payment_method_fields:e.modal_payment_method_fields,ui_extension_handle:e.ui_extension_handle}}d();var BD="payments.custom-credit-card.render",kv=7,qv=Fr.merge(gi).merge(_i).merge(Dn).required({refund_session_url:!0,capture_session_url:!0,void_session_url:!0}).extend({targeting:E.array(E.object({target:E.literal(BD)})).length(1),api_version:E.string(),multiple_capture:E.boolean(),checkout_hosted_fields:E.array(E.string()).optional(),ui_extension_handle:E.string().optional(),encryption_certificate_fingerprint:E.string(),checkout_payment_method_fields:E.array(E.object({type:E.union([E.literal("string"),E.literal("number"),E.literal("boolean")]),required:E.boolean(),key:E.string()})).max(kv,`The extension can't have more than ${kv} checkout_payment_method_fields`).optional()});function Kee(e,t){let r=yi(e,t);return{api_version:e.api_version,payment_session_url:e.start_payment_session_url,refund_session_url:e.start_refund_session_url,capture_session_url:e.start_capture_session_url,void_session_url:e.start_void_session_url,confirmation_callback_url:e.confirmation_callback_url,merchant_label:e.merchant_label,supports_3ds:e.supports_3ds,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,supported_buyer_contexts:e.supported_buyer_contexts,buyer_label:e.default_buyer_label,buyer_label_translations:e.buyer_label_to_locale,encryption_certificate_fingerprint:e.encryption_certificate.fingerprint,test_mode_available:e.test_mode_available,multiple_capture:e.multiple_capture,checkout_payment_method_fields:e.checkout_payment_method_fields,checkout_hosted_fields:e.checkout_hosted_fields,ui_extension_handle:r}}async function Wv(e){return{api_version:e.api_version,start_payment_session_url:e.payment_session_url,start_refund_session_url:e.refund_session_url,start_capture_session_url:e.capture_session_url,start_void_session_url:e.void_session_url,confirmation_callback_url:e.confirmation_callback_url,merchant_label:e.merchant_label,supports_3ds:e.supports_3ds,supported_countries:e.supported_countries,supported_buyer_contexts:e.supported_buyer_contexts,default_buyer_label:e.buyer_label,buyer_label_to_locale:e.buyer_label_translations,encryption_certificate_fingerprint:e.encryption_certificate_fingerprint,supported_payment_methods:e.supported_payment_methods,test_mode_available:e.test_mode_available,multiple_capture:e.multiple_capture,checkout_payment_method_fields:e.checkout_payment_method_fields,checkout_hosted_fields:e.checkout_hosted_fields,ui_extension_handle:e.ui_extension_handle}}d();var ID="payments.credit-card.render",Hv=7,zv=Fr.merge(tu).merge(_i).merge(_l).merge(Dn).required({refund_session_url:!0,capture_session_url:!0,void_session_url:!0}).extend({targeting:E.array(E.object({target:E.literal(ID)})).length(1),verification_session_url:E.string().url().optional(),ui_extension_handle:E.string().optional(),supports_moto:E.boolean({required_error:"supports_moto is required",invalid_type_error:"Value must be Boolean"}),encryption_certificate_fingerprint:E.string(),checkout_payment_method_fields:E.array(E.object({type:E.union([E.literal("string"),E.literal("number"),E.literal("boolean")]),required:E.boolean(),key:E.string()})).max(Hv,`The extension can't have more than ${Hv} checkout_payment_method_fields`).optional()}).refine(e=>!e.supports_3ds||e.confirmation_callback_url,{message:"Property required when supports_3ds is true",path:["confirmation_callback_url"]}).refine(e=>e.supports_installments===e.supports_deferred_payments,{message:"supports_installments and supports_deferred_payments must be the same"});function Qee(e,t){let r=yi(e,t);return{api_version:e.api_version,payment_session_url:e.start_payment_session_url,refund_session_url:e.start_refund_session_url,capture_session_url:e.start_capture_session_url,void_session_url:e.start_void_session_url,confirmation_callback_url:e.confirmation_callback_url,multiple_capture:e.multiple_capture,merchant_label:e.merchant_label,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,supported_buyer_contexts:e.supported_buyer_contexts,test_mode_available:e.test_mode_available,supports_3ds:e.supports_3ds,supports_moto:e.supports_moto,supports_deferred_payments:e.supports_deferred_payments,supports_installments:e.supports_installments,verification_session_url:e.start_verification_session_url,encryption_certificate_fingerprint:e.encryption_certificate.fingerprint,checkout_payment_method_fields:e.checkout_payment_method_fields,ui_extension_handle:r}}async function Vv(e){return{api_version:e.api_version,start_payment_session_url:e.payment_session_url,start_refund_session_url:e.refund_session_url,start_capture_session_url:e.capture_session_url,start_void_session_url:e.void_session_url,confirmation_callback_url:e.confirmation_callback_url,multiple_capture:e.multiple_capture,merchant_label:e.merchant_label,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,supported_buyer_contexts:e.supported_buyer_contexts,test_mode_available:e.test_mode_available,supports_3ds:e.supports_3ds,supports_moto:e.supports_moto,supports_deferred_payments:e.supports_deferred_payments,encryption_certificate_fingerprint:e.encryption_certificate_fingerprint,supports_installments:e.supports_installments,start_verification_session_url:e.verification_session_url,checkout_payment_method_fields:e.checkout_payment_method_fields,ui_extension_handle:e.ui_extension_handle}}d();var RD="payments.card-present.render",Kv=Fr.required({refund_session_url:!0,capture_session_url:!0,void_session_url:!0}).extend({targeting:E.array(E.object({target:E.literal(RD)})).length(1),sync_terminal_transaction_result_url:E.string().url().optional()});function ite(e){return{api_version:e.api_version,payment_session_url:e.start_payment_session_url,refund_session_url:e.start_refund_session_url,capture_session_url:e.start_capture_session_url,void_session_url:e.start_void_session_url,sync_terminal_transaction_result_url:e.sync_terminal_transaction_result_url,merchant_label:e.merchant_label,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,test_mode_available:e.test_mode_available}}async function Gv(e){return{api_version:e.api_version,start_payment_session_url:e.payment_session_url,start_refund_session_url:e.refund_session_url,start_capture_session_url:e.capture_session_url,start_void_session_url:e.void_session_url,sync_terminal_transaction_result_url:e.sync_terminal_transaction_result_url,merchant_label:e.merchant_label,supported_countries:e.supported_countries,supported_payment_methods:e.supported_payment_methods,test_mode_available:e.test_mode_available}}var aM=E.union([Rv,Nv,Lv,qv,zv,Kv]),cM=Te({identifier:"payments_extension",schema:aM,appModuleFeatures:e=>[],deployConfig:async(e,t)=>{switch(e.targeting[0]?.target){case PD:return Mv(e);case OD:return jv(e);case ID:return Vv(e);case TD:return Uv(e);case BD:return Wv(e);case RD:return Gv(e);default:return{}}}}),Yv=cM;d();var MD="@shopify/retail-ui-extensions",lM=Ge.extend({name:E.string()}),fM=Te({identifier:"pos_ui_extension",dependency:MD,schema:lM,appModuleFeatures:e=>["ui_preview","esbuild","single_js_entry_path"],getOutputRelativePath:e=>`dist/${e.handle}.js`,clientSteps:[{lifecycle:"deploy",steps:[{id:"bundle-ui",name:"Bundle UI Extension",type:"bundle_ui",config:{}}]}],deployConfig:async(e,t)=>{let r=await As(MD,t);if(r==="not_found")throw new Nr(`Dependency ${MD} not found`);return{name:e.name,description:e.description,renderer_version:r?.version}}}),Jv=fM;d();var ND="@shopify/admin-ui-extensions",pM=Te({identifier:"product_subscription",additionalIdentifiers:["subscription_management"],dependency:ND,graphQLType:"subscription_management",schema:Ge,appModuleFeatures:e=>["ui_preview","esbuild","single_js_entry_path"],getOutputRelativePath:e=>`dist/${e.handle}.js`,clientSteps:[{lifecycle:"deploy",steps:[{id:"bundle-ui",name:"Bundle UI Extension",type:"bundle_ui",config:{}}]}],deployConfig:async(e,t)=>{let r=await As(ND,t);if(r==="not_found")throw new Nr(`Dependency ${ND} not found`);return{renderer_version:r?.version}}}),Xv=pM;d();var dM=E.object({key:E.string()}),DM=Ge.extend({production_api_base_url:E.string(),benchmark_api_base_url:E.string().optional(),calculate_taxes_api_endpoint:E.string(),input:E.object({metafield_identifiers:E.object({namespace:E.string(),key:E.string()}).optional()}).optional(),metafields:E.array(pi).optional(),cart_line_properties:E.array(dM).optional()}),hM=Te({identifier:"tax_calculation",schema:DM,appModuleFeatures:e=>[],getOutputRelativePath:e=>I("dist",`${e.handle}.js`),clientSteps:[{lifecycle:"deploy",steps:[{id:"create-tax-stub",name:"Create Tax Stub",type:"create_tax_stub",config:{}}]}],deployConfig:async(e,t)=>({production_api_base_url:e.production_api_base_url,benchmark_api_base_url:e.benchmark_api_base_url,calculate_taxes_api_endpoint:e.calculate_taxes_api_endpoint,metafields:e.metafields,cart_line_properties:e.cart_line_properties,api_version:e.api_version,metafield_identifiers:e.input?.metafield_identifiers})}),Zv=hM;d();var mM=Te({identifier:"theme",schema:Ge,partnersWebIdentifier:"theme_app_extension",graphQLType:"theme_app_extension",clientSteps:[{lifecycle:"deploy",steps:[{id:"build-theme",name:"Build Theme Extension",type:"build_theme",config:{}},{id:"bundle-theme",name:"Bundle Theme Extension",type:"bundle_theme",config:{}}]}],appModuleFeatures:e=>["theme"],deployConfig:async()=>({theme_extension:{files:{}}}),preDeployValidation:async e=>yM(e)}),nC=mM,jD=1024,iC=jD*1024,oC=10,gM=oC*iC,uC=500,_M=uC*jD,Qv=[".jpg",".jpeg",".json",".js",".css",".png",".svg",".wasm"],eC=[".json"],sC={assets:{validator:new RegExp(`${Qv.join("|")}$`),failureMessage:e=>`Only these filetypes are supported in assets: ${Qv.join(", ")}`},blocks:{validator:/.liquid$/,failureMessage:e=>"Only .liquid files are allowed in blocks."},locales:{validator:new RegExp(`${eC.join("|")}$`),failureMessage:e=>`Only these filetypes are supported in locales: ${eC.join(", ")}`},snippets:{validator:/.liquid$/,failureMessage:e=>"Only .liquid files are allowed in snippets."}},tC=Object.keys(sC);async function yM(e){let t=await vs(e),r=[],n=[];await Promise.all(t.map(async o=>{let s=Oe(e.directory,o),a=he(s);vM(s,a);let l=await Cc(o);n.push(l),["blocks","snippets"].includes(a)&&r.push(l)})),FM(rC(n)),EM(rC(r))}function FM(e){if(e>gM){let t=`${(e/iC).toFixed(2)} MB`;throw new k(`Your theme app extension exceeds the file size limit (${oC} MB). It's currently ${t}.`,"Reduce your total file size and try again.")}}function EM(e){if(e>_M){let t=`${(e/jD).toFixed(2)} kB`;throw new k(`Your theme app extension exceeds the total liquid file size limit (${uC} kB). It's currently ${t}.`,"Reduce your total file size and try again.")}}function vM(e,t){if(!tC.includes(t))throw new k(Se`Your theme app extension includes files in an unsupported directory, ${Ae.path(t)}`,`Make sure all theme app extension files are in the supported directories: ${tC.join(", ")}`);let r=sC[t];if(!e.match(r.validator))throw new k(`Invalid filename in your theme app extension: ${e}
|
|
250
|
+
${r.failureMessage(e)}`)}function rC(e){return e.reduce((t,r)=>t+r,0)}d();d();var U2=ai(Rh(),1);import{createRequire as CU}from"module";async function wm(){let e=await import("./typescript-5R4Y7PXE.js");return e.default??e}var $2=CU(import.meta.url),L2="@shopify/ui-extensions";function wU(e){let t=e.toLowerCase().replace(/(::|\.).+$/,"");switch(t){case"purchase":return"checkout";case"pos":return"point-of-sale";default:return t}}function bm(e){let t=e[0];return t?`${L2}/${wU(t)}`:L2}function na(e){let[t,r]=e.split("-");return!t||!r?null:{year:parseInt(t,10),month:parseInt(r,10)}}async function k2(e,t){let r=await wm(),n=r.findConfigFile(e,r.sys.fileExists.bind(r.sys),"tsconfig.json");if(!n)return{compilerOptions:{},configPath:void 0,hasExplicitFiles:!1};let o=ot(n),s=t?.get(o);if(s)return s;let a=r.readConfigFile(n,r.sys.readFile.bind(r.sys));if(a.error)return{compilerOptions:{},configPath:o,hasExplicitFiles:!1};let l=r.parseJsonConfigFileContent(a.config,r.sys,he(n)),p=!!(l.raw?.files??l.raw?.include),m={compilerOptions:l.options,configPath:o,fileNames:l.fileNames,hasExplicitFiles:p};return t?.set(o,m),m}async function bU(e,t){if(!e.startsWith("./")&&!e.startsWith("../"))return null;let r=ot(t,e),n=["",".js",".jsx",".ts",".tsx"];for(let o of n){let s=r+o;if(await Q(s)&&!s.includes("node_modules"))return s}for(let o of[".js",".jsx",".ts",".tsx"]){let s=I(r,`index${o}`);if(await Q(s)&&!s.includes("node_modules"))return s}return null}function q2(e){return e.length>0&&e.every(t=>t.isTypeOnly)}function AU(e,t){if(e.importClause?.isTypeOnly)return!0;let r=e.importClause?.namedBindings;return e.importClause?.name||!r?!1:t.isNamedImports(r)&&q2(r.elements)}function SU(e,t){if(e.isTypeOnly)return!0;let r=e.exportClause;return r?t.isNamedExports(r)&&q2(r.elements):!1}function xU(e,t){return t?my(ot(t),ot(e)):!0}function PU(e,t){if(!t.allowedFiles)return!0;let r=ot(e);return t.allowedFiles.has(r)||!!t.alwaysAllowedFiles?.has(r)}function W2(e,t){return!e.includes("node_modules")&&!e.endsWith(".d.ts")&&PU(e,t)}function OU(e,t){let r=ot(e),n=(t.allowedFiles?.has(r)??!1)||(t.alwaysAllowedFiles?.has(r)??!1);return W2(e,t)&&(xU(e,t.boundaryDirectory)||n)}async function TU(e,t={}){try{let r=ot(e),n=t.importCache?.get(r);if(n)return n;let o=await wm(),s=eo(e).toString(),a=[],{compilerOptions:l}=await k2(e,t.tsConfigCache),p=o.ScriptKind.JSX;e.endsWith(".ts")?p=o.ScriptKind.TS:e.endsWith(".tsx")&&(p=o.ScriptKind.TSX);let m=o.createSourceFile(e,s,o.ScriptTarget.Latest,!0,p),g=new Set,F=[],w=v=>{if(o.isImportDeclaration(v)&&v.moduleSpecifier&&o.isStringLiteral(v.moduleSpecifier)){if(AU(v,o))return;F.push(v.moduleSpecifier.text)}else if(o.isCallExpression(v)&&v.expression.kind===o.SyntaxKind.ImportKeyword){let x=v.arguments[0];x&&o.isStringLiteral(x)&&F.push(x.text)}else if(o.isExportDeclaration(v)&&v.moduleSpecifier&&o.isStringLiteral(v.moduleSpecifier)){if(SU(v,o))return;F.push(v.moduleSpecifier.text)}o.forEachChild(v,w)};w(m);for(let v of F){if(!v||g.has(v))continue;g.add(v);let x=o.resolveModuleName(v,e,l,o.sys);if(x.resolvedModule?.resolvedFileName){let O=x.resolvedModule.resolvedFileName;O.includes("node_modules")||a.push(O)}else{let O=await bU(v,he(e));O&&a.push(O)}}return t.importCache?.set(r,a),a}catch(r){if(r instanceof k)throw r;return[]}}async function pf(e,t={},r=new Set){if(r.has(e))return[];r.add(e);let n=(await TU(e,t)).filter(s=>W2(s,t)),o=[...n];for(let s of n){if(!OU(s,t))continue;let a=await pf(s,t,r);o.push(...a)}return Bt(o)}async function Am(e,t,r={}){let{configPath:n,fileNames:o,hasExplicitFiles:s}=await k2(e,r.tsConfigCache);if(!(!n||!s))return new Set((o??[]).map(a=>ot(a)))}async function BU(e){let t;try{t=eo(e).toString()}catch{return!1}let r=await wm(),n=r.createSourceFile(e,t,r.ScriptTarget.Latest,!0,r.ScriptKind.TS),o=!1,s=a=>{if(!o){if(r.isExportDeclaration(a)&&a.exportClause&&r.isNamedExports(a.exportClause)){for(let l of a.exportClause.elements)if(l.name.text==="ShopifyGlobal"){o=!0;return}}r.forEachChild(a,s)}};return s(n),o}async function IU(e,t){let r=async n=>{let o=`import('@shopify/ui-extensions/${n}').Api`,s=t.get(n);return s&&await BU(s)?`${o} & import('@shopify/ui-extensions/${n}').ShopifyGlobal`:o};return e.length===1?r(e[0]??""):e.length>1?`(${(await Promise.all(e.map(r))).join(" | ")})`:null}async function RU(e,t,{includesTools:r,includesIntents:n},o){let s=await IU(e,t);if(!s)return null;if(!r&&!n)return s;let a=s;return n&&(a=`import('${o}').WithGeneratedIntents<${a}, ShopifyGeneratedIntentVariants>`),r&&(a=`import('${o}').WithGeneratedTools<${a}, ShopifyTools>`),a}async function H2({fullPath:e,typeFilePath:t,targets:r,apiVersion:n,toolsTypeDefinition:o,intentsTypeDefinition:s}){try{let a=new Map,l=!!o,p=!!s;for(let v of r)try{let x=$2.resolve(`@shopify/ui-extensions/${v}`,{paths:[e,t]});a.set(v,x)}catch{let{year:O,month:P}=na(n)??{year:2025,month:10};throw new k(`Type reference for ${v} could not be found. You might be using the wrong @shopify/ui-extensions version.`,`Fix the error by ensuring you have the correct version of @shopify/ui-extensions, for example ~${O}.${P}.0, in your dependencies.`)}let m=bm(r);if(l||p)try{$2.resolve(m,{paths:[e,t]})}catch{let{year:x,month:O}=na(n)??{year:2025,month:10};throw new k(`Type reference for ${m} could not be found. You might be using the wrong @shopify/ui-extensions version.`,`Fix the error by ensuring you have the correct version of @shopify/ui-extensions, for example ~${x}.${O}.0, in your dependencies.`)}let g=yc(e,he(t)),F=await RU(r,a,{includesTools:l,includesIntents:p},m);return F?["//@ts-ignore",`declare module './${g}' {`,...o?[o]:[],...s?[s]:[],` const shopify: ${F};`," const globalThis: { shopify: typeof shopify };","}",""].join(`
|
|
251
|
+
`):null}catch(a){if(a instanceof k)throw a;let{year:l,month:p}=na(n)??{year:2025,month:10};throw new k("Type reference could not be found. You might be using the wrong @shopify/ui-extensions version.",`Fix the error by ensuring you have the correct version of @shopify/ui-extensions, for example ~${l}.${p}.0, in your dependencies.`)}}async function z2(e,t){let r=he(e),n=await ln("tsconfig.json",{cwd:r,type:"file"});if(n){let o=ot(n),s=ot(t);if(o.startsWith(s))return he(n)}}var MU=E.object({name:E.string(),description:E.string(),inputSchema:E.object({}).passthrough(),outputSchema:E.object({}).passthrough().optional()}),V2=E.array(MU),K2=E.object({value:E.object({}).passthrough().optional(),inputSchema:E.object({}).passthrough(),outputSchema:E.object({}).passthrough().optional()});function NU(e){return qo(`${e.action} ${e.type}`.replace(/[^a-zA-Z0-9]+/g," "))}async function G2(e,{generatedTypesHelperImportPath:t}){if(e.length===0)return"";let r=new Set,n=e.map(async a=>{let l=`${a.action}:${a.type}`;if(r.has(l))throw new k(`Intent "${l}" is defined multiple times. Intents must be unique within a target.`);r.add(l);let p=NU(a),m=`${p}IntentInput`,g=`${p}IntentValue`,F=`${p}IntentOutput`,w=`${p}IntentRequest`,v=await ia(m,a.inputSchema),x=await ia(g,a.valueSchema),O=await ia(F,a.outputSchema),P=`interface ${w} {
|
|
252
|
+
action: ${JSON.stringify(a.action)};
|
|
253
|
+
type: ${JSON.stringify(a.type)};
|
|
254
|
+
data: ${m};
|
|
255
|
+
value?: ${g};
|
|
256
|
+
}`;return{inputType:v,valueType:x,outputType:O,requestType:P,requestTypeName:w,outputTypeName:F}}),o=await Promise.all(n),s=o.map(({requestTypeName:a,outputTypeName:l})=>` | import('${t}').ShopifyGeneratedIntentVariant<${a}, ${l}>`).join(`
|
|
257
|
+
`);return`${o.map(({inputType:a,valueType:l,outputType:p,requestType:m})=>`${a}
|
|
258
|
+
${l}
|
|
259
|
+
${p}
|
|
260
|
+
${m}`).join(`
|
|
261
|
+
|
|
262
|
+
`)}
|
|
263
|
+
|
|
264
|
+
type ShopifyGeneratedIntentVariants =
|
|
265
|
+
${s}
|
|
266
|
+
`}async function Y2(e){if(e.length===0)return"";let t=new Set,r=e.map(async s=>{if(t.has(s.name))throw new k(`Tool name "${s.name}" is defined multiple times. Tool names must be unique within a tools file.`);t.add(s.name);let a=qo(`${s.name}Input`),l=await ia(a,s.inputSchema),p=qo(`${s.name}Output`),m=await ia(p,s.outputSchema);return{name:s.name,description:s.description,inputType:l,outputType:m,inputTypeName:a,outputTypeName:p}}),n=await Promise.all(r),o=n.map(({name:s,description:a,inputTypeName:l,outputTypeName:p})=>` /**
|
|
267
|
+
${a.replace(/\*\//g,"*\\/").split(`
|
|
268
|
+
`).map(g=>` * ${g}`).join(`
|
|
269
|
+
`)}
|
|
270
|
+
*/
|
|
271
|
+
register(name: '${s}', handler: (input: ${l}) => ${p} | Promise<${p}>): () => void;`).join(`
|
|
272
|
+
`);return`${n.map(({inputType:s,outputType:a})=>`${s}
|
|
273
|
+
${a}`).join(`
|
|
274
|
+
`)}
|
|
275
|
+
interface ShopifyTools {
|
|
276
|
+
${o}
|
|
277
|
+
}
|
|
278
|
+
`}function jU(e,t){return e.replace(/^(interface|type|enum)\s+[A-Za-z0-9_]+/,`$1 ${t}`)}async function ia(e,t){if(!t)return`type ${e} = unknown`;let r=await(0,U2.compile)(t,e,{bannerComment:""}),n=r.startsWith("export ")?r.slice(7):r;return jU(n,e)}d();d();d();var J2=li`
|
|
279
|
+
query {
|
|
280
|
+
products(first: 1, query: "published_status:published") {
|
|
281
|
+
edges {
|
|
282
|
+
node {
|
|
283
|
+
id
|
|
284
|
+
variants(first: 1) {
|
|
285
|
+
edges {
|
|
286
|
+
node {
|
|
287
|
+
id
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
`;async function X2(e){let t=await qy(e),r=await d0(J2,t);if(r.products.edges.length===0){let a=`https://${$y(e)}/admin/products/new`,l=Se`${Ae.link("Add a product",a,`You can add a new product here: ${a}`)}`.value;throw new k("Could not find a product variant",`Your store needs to have at least one product to test a 'checkout_ui' extension.
|
|
296
|
+
|
|
297
|
+
${l}`)}return r.products.edges[0].node.variants.edges[0].node.id.split("/").pop()}async function Qie(e,t,r){return e.filter(s=>s.shouldFetchCartUrl()).length>0?r||`/cart/${await X2(t)}:1`:void 0}function Z2(e){let t=e.toLowerCase().replace(/(::|\.).+$/,""),r=e.split(".")[1];switch(t){case"purchase":return r==="post"?"post_purchase":"checkout";case"customer-account":return"customer-accounts";case"pos":return"point_of_sale";default:return t}}d();SB();async function Q2(e,t){return m0.format(e,t)}var $U="@shopify/checkout-ui-extensions",LU=e=>e.extension_points!==void 0||e.targeting!==void 0,t1="No extension targets defined, add a `targeting` field to your configuration",UU=Ge.extend({name:E.string(),type:E.literal("ui_extension"),extension_points:Pd.optional(),targeting:Pd.optional(),metafields:E.array(pi).optional()}).refine(e=>LU(e),t1).transform(e=>{let t=(e.targeting??e.extension_points??[]).map(r=>{let n={assets:{[gr.Main]:{filepath:`${e.handle}.js`,module:r.module},...r.should_render?.module?{[gr.ShouldRender]:{filepath:`${e.handle}-conditions.js`,module:r.should_render.module}}:null}};return{target:r.target,module:r.module,metafields:r.metafields??e.metafields??[],default_placement_reference:r.default_placement,urls:r.urls??{},capabilities:r.capabilities,preloads:r.preloads??{},build_manifest:n,tools:r.tools,instructions:r.instructions,intents:r.intents,assets:r.assets}});return{...e,extension_points:t}}),kU=Te({identifier:"ui_extension",dependency:$U,schema:UU,getOutputRelativePath:e=>`${e.handle}.js`,clientSteps:[{lifecycle:"deploy",steps:[{id:"bundle-ui",name:"Bundle UI Extension",type:"bundle_ui",config:{generatesAssetsManifest:!0,bundleFolder:"dist/"}},{id:"include-ui-extension-assets",name:"Include UI Extension Assets",type:"include_assets",config:{generatesAssetsManifest:!0,inclusions:[{type:"configKey",anchor:"extension_points[]",groupBy:"target",key:"extension_points[].assets"},{type:"configKey",anchor:"extension_points[]",groupBy:"target",key:"extension_points[].tools"},{type:"configKey",anchor:"extension_points[]",groupBy:"target",key:"extension_points[].instructions"},{type:"configKey",anchor:"extension_points[]",groupBy:"target",key:"extension_points[].intents[].schema"}]}}]}],appModuleFeatures:e=>{let t=["ui_preview","esbuild","generates_source_maps"];return e?.extension_points?.find(n=>Z2(n.target)==="checkout")!==void 0?[...t,"cart_url"]:t},validate:async(e,t,r)=>zU(r,e.extension_points,t),deployConfig:async(e,t)=>{let r=e.extension_points?.map(qU)??[];return{api_version:e.api_version,extension_points:r,capabilities:e.capabilities,supported_features:e.supported_features,name:e.name,description:e.description,settings:e.settings,localization:await pn(t,e.type)}},getBundleExtensionStdinContent:e=>{let t=e1(e),r=e.extension_points||[],n=r.map(({target:a,module:l},p)=>t?`import Target_${p} from '${l}';shopify.extend('${a}', (...args) => Target_${p}(...args));`:`import '${l}';`).join(`
|
|
298
|
+
`),o={};r.forEach(a=>{let l=VU(a,t);l&&(o[gr.ShouldRender]=l)});let s=Object.values(o);return{main:n,...s.length?{assets:s}:{}}},hasExtensionPointTarget:(e,t)=>e.extension_points?.find(r=>r.target===t)!==void 0,contributeToSharedTypeFile:async(e,t)=>{if(!e1(e.configuration))return;let{configuration:r}=e,n=new Map,o=new Map,s=new Map,a=new Map,l=new Map;for await(let p of r.extension_points){let m=I(e.directory,p.module);if(!await Q(m))continue;let F=n.get(m)??[];if(F.push(p.target),n.set(m,F),p.tools&&o.set(m,p.tools),p.intents?.length){let w=s.get(m)??[];w.push(...p.intents),s.set(m,w)}if(p.build_manifest.assets[gr.ShouldRender]?.module){let w=I(e.directory,p.build_manifest.assets[gr.ShouldRender].module);if(await Q(w)){let x=n.get(w)??[];x.push(Sm(p.target)),n.set(w,x)}}}for await(let p of r.extension_points){let m=I(e.directory,p.module);if(!await Q(m))continue;let F=await Am(m,e.directory,{tsConfigCache:l}),w=await pf(m,{boundaryDirectory:e.directory,allowedFiles:F,alwaysAllowedFiles:new Set([ot(m)]),importCache:a,tsConfigCache:l});for(let v of w){let x=n.get(v)??[];x.push(p.target),n.set(v,x)}if(p.build_manifest.assets[gr.ShouldRender]?.module){let v=I(e.directory,p.build_manifest.assets[gr.ShouldRender].module);if(await Q(v)){let O=await Am(v,e.directory,{tsConfigCache:l}),P=await pf(v,{boundaryDirectory:e.directory,allowedFiles:O,alwaysAllowedFiles:new Set([ot(v)]),importCache:a,tsConfigCache:l});for(let B of P){let U=n.get(B)??[];U.push(Sm(p.target)),n.set(B,U)}}}}for await(let[p,m]of n.entries()){let g=await z2(p,e.directory);if(!g)continue;let F=I(g,"shopify.d.ts"),w=Bt(m),v=bm(w);try{let x=o.get(p),O="";if(x)try{let q=await r1(e.directory,x,V2);q.status==="ok"?O=await Y2(q.data):q.status==="invalid"&&Rn(`Invalid tools definition in "${x}": ${q.issues}`)}catch(q){Rn(`Failed to create tools type definition for tools file "${x}": ${q instanceof Error?q.message:"Unknown error"}`)}let P=s.get(p),B="";if(P?.length){let q=await WU(e.directory,P);if(q.length>0)try{B=await G2(q,{generatedTypesHelperImportPath:v})}catch(Y){if(Y instanceof k)throw Y;Rn(`Failed to create intent type definition for intent schema files "${P.map(Z=>Z.schema).join(", ")}": ${Y instanceof Error?Y.message:"Unknown error"}`)}}let U=await H2({fullPath:p,typeFilePath:F,targets:w,apiVersion:r.api_version,toolsTypeDefinition:O,intentsTypeDefinition:B});if(U){let q=t.get(F)??new Set;U=await Q2(U,{parser:"typescript",singleQuote:!0}),q.add(U),t.set(F,q)}}catch(x){if(r.extension_points.some(P=>I(e.directory,P.module)===p||P.build_manifest.assets[gr.ShouldRender]?.module&&I(e.directory,P.build_manifest.assets[gr.ShouldRender].module)===p))throw x}}}});function qU(e){return{...e,build_manifest:{...e.build_manifest,assets:Object.fromEntries(Object.entries(e.build_manifest.assets).map(([t,r])=>[t,{...r,filepath:I("dist",r.filepath)}]))}}}async function r1(e,t,r){let n=I(e,t);if(!await Q(n))return{status:"missing"};let s=await $e(n),a=r.safeParse(JSON.parse(s));return a.success?{status:"ok",data:a.data}:{status:"invalid",issues:a.error.issues.map(l=>l.message).join(", ")}}async function WU(e,t){let r=await Promise.all(t.map(async o=>{try{let s=await r1(e,o.schema,K2);return s.status==="missing"?(Rn(`Intent schema file "${o.schema}" was not found. Skipping intent type generation.`),null):s.status==="invalid"?(Rn(`Invalid intent schema in "${o.schema}": ${s.issues}`),null):{action:o.action,type:o.type,inputSchema:s.data.inputSchema,valueSchema:s.data.value,outputSchema:s.data.outputSchema}}catch(s){return Rn(`Failed to create intent type definition for intent schema file "${o.schema}": ${s instanceof Error?s.message:"Unknown error"}`),null}})),n=[];for(let o of r)o&&n.push(o);return n}async function HU(e,t,r,n){if(!t)return;let o=I(e,t);return await Q(o)?void 0:Se`Couldn't find ${Ae.path(o)}
|
|
299
|
+
Please check the ${n} path for ${r}`.value}async function zU(e,t,r){let n=[],o=[],s=[];if(!t||t.length===0)return to(t1);for await(let a of t){let{module:l,target:p}=a,m=await HU(e,l,p,"module");m&&n.push(m),o.includes(p)?s.push(p):o.push(p)}return s.length&&n.push(`Duplicate targets found: ${s.join(", ")}
|
|
300
|
+
Extension point targets must be unique`),n.length?(n.push(`Please check the configuration in ${r}`),to(n.join(`
|
|
301
|
+
|
|
302
|
+
`))):Bn({})}function e1(e){let t=e.api_version;if(!t)return!1;let{year:r,month:n}=na(t)??{year:0,month:0};return r>2025||r===2025&&n>=10}function Sm(e){return e.replace(/\.render$/,".should-render")}function VU(e,t){let r=e.build_manifest.assets[gr.ShouldRender];if(r)return{identifier:gr.ShouldRender,outputFileName:r.filepath,content:t?`import shouldRender from '${r.module}';shopify.extend('${Sm(e.target)}', (...args) => shouldRender(...args));`:`import '${r.module}'`}}var n1=kU;d();var i1=1024,o1=128,KU=o1*i1,GU="@shopify/web-pixels-extension",YU=Ge.extend({runtime_context:E.string(),version:E.string().optional(),configuration:E.any(),customer_privacy:E.object({analytics:E.boolean(),preferences:E.boolean(),marketing:E.boolean(),sale_of_data:E.enum(["enabled","disabled","ldu"])}).optional(),settings:E.any()}),JU=Te({identifier:"web_pixel_extension",dependency:GU,partnersWebIdentifier:"web_pixel",schema:YU,appModuleFeatures:e=>["esbuild","single_js_entry_path"],getOutputRelativePath:e=>`dist/${e.handle}.js`,clientSteps:[{lifecycle:"deploy",steps:[{id:"bundle-ui",name:"Bundle UI Extension",type:"bundle_ui",config:{}}]}],deployConfig:async(e,t)=>({runtime_context:e.runtime_context,customer_privacy:e.customer_privacy,runtime_configuration_definition:e.settings}),buildValidation:async(e,t)=>{let r=await Cc(t);if(r>KU){let n=`${(r/i1).toFixed(2)} kB`;throw new k(`Your web pixel extension exceeds the total file size limit (${o1} kB). It's currently ${n}.`,"Reduce your total file size and try again.")}},preDeployValidation:async e=>{if(e.configuration.configuration)throw new k("The property configuration is deprecated and no longer supported.","It has been replaced by settings.");return Promise.resolve()}}),u1=JU;d();var XU=E.object({handle:E.string()}),ZU=Ge.extend({name:E.string(),include:E.array(XU).optional(),includes:E.array(E.string()).optional(),type:E.literal("editor_extension_collection")}).transform(e=>{let t=e.includes?.map(n=>({handle:n}))??[],r=e.include??[];return{...e,inCollection:[...t,...r]}}),QU=Te({identifier:"editor_extension_collection",schema:ZU,appModuleFeatures:e=>[],deployConfig:async(e,t)=>({name:e.name,handle:e.handle,in_collection:e.inCollection,localization:await pn(t,e.name)})}),s1=QU;d();var a1="specifications",ek=["json","toml","yaml","yml","svg"],tk=Di({identifier:"channel_config",uidStrategy:"single",experience:"extension",clientSteps:[{lifecycle:"deploy",steps:[{id:"copy-files",name:"Copy Files",type:"include_assets",config:{inclusions:[{type:"pattern",baseDir:a1,destination:a1,include:ek.map(e=>`**/*.${e}`)}]}}]}],appModuleFeatures:()=>[]}),c1=tk;d();var l1="icons",rk=["svg"],nk=Di({identifier:"order_attribution_config",uidStrategy:"single",experience:"extension",clientSteps:[{lifecycle:"deploy",steps:[{id:"copy-files",name:"Copy Files",type:"include_assets",config:{inclusions:[{type:"pattern",baseDir:l1,destination:l1,include:rk.map(e=>`**/*.${e}`)}]}}]}],appModuleFeatures:()=>[]}),f1=nk;d();var ik=Di({identifier:"admin_link",uidStrategy:"uuid",experience:"extension",clientSteps:[{lifecycle:"deploy",steps:[{id:"include-admin-link-assets",name:"Include Admin Link Assets",type:"include_assets",config:{generatesAssetsManifest:!0,inclusions:[{type:"configKey",anchor:"targeting[]",groupBy:"target",key:"targeting[].tools"},{type:"configKey",anchor:"targeting[]",groupBy:"target",key:"targeting[].instructions"},{type:"configKey",anchor:"targeting[]",groupBy:"target",key:"targeting[].intents[].schema"}]}}]}],appModuleFeatures:()=>["localization","ui_preview"]}),p1=ik;var d1=[x0,O0,B0,gs,vD,wD,FD,ED,A0];async function bu(){let e=(t,r)=>d1.indexOf(t.identifier)-d1.indexOf(r.identifier);return ok().sort(e)}function ok(){let e=[T0,S0,lv,P0,fv,hv,I0,C0,Dv],t=[mv,gv,Pv,Tv,Cv,Bv,Yv,Jv,Xv,Zv,nC,n1,u1,s1,c1,f1,p1];return[...e,...t]}d();d();var gS=ai(FB()),_S=ai(lA()),yS=ai(hS());async function Pf(e){let t=JSON.parse(e);return await _S.default.dereference(t,{resolve:{external:!1}}),t}function og(e,t){e==="strip"&&(t.additionalProperties=!0);let r=new gS.Ajv({allowUnionTypes:!0,allErrors:!0,verbose:!0});return r.addKeyword("x-taplo"),r.compile(t)}var mS=new Map;function FS(e,t,r,n){let o=(0,yS.default)(e),s=n??Sc(),a=mS.get(s)??og(r,t);mS.set(s,a),a(o);let l;if(a.errors&&a.errors.length>0)return l=AW(a.errors,o,t),{state:"error",data:void 0,errors:l,rawErrors:a.errors};if(r==="strip"){let p=Object.keys(t.properties??{});Object.keys(o).forEach(m=>{p.includes(m)||delete o[m]})}return{state:"ok",data:o,errors:void 0,rawErrors:void 0}}function bW(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function Da(e,t){return t.length===0?e:vt(e,t)}function AW(e,t,r){return SW(e,t,r).map(o=>{let s=o.instancePath.split("/").slice(1);if(o.params.missingProperty){let a=o.params.missingProperty;return{path:[...s,a],message:"Required"}}if(o.params.type){let a=Array.isArray(o.params.type)?o.params.type.join(", "):o.params.type,l=Da(t,s);return{path:s,message:`Expected ${a}, received ${bW(l)}`}}if(o.keyword==="anyOf"||o.keyword==="oneOf")return{path:s,message:"Invalid input"};if(o.params.allowedValues){let a=o.params.allowedValues,l=Da(t,s);return{path:s,message:`Invalid enum value. Expected ${a.map(p=>JSON.stringify(p)).join(" | ")}, received ${JSON.stringify(l)}`.replace(/"/g,"'")}}if(o.params.comparison){let a=o.params.comparison,l=o.params.limit,p=Da(t,s),m=a;switch(a){case"<=":m="less than or equal to";break;case"<":m="less than";break;case">=":m="greater than or equal to";break;case">":m="greater than";break}return{path:s,message:Cy(`${typeof p} must be ${m} ${l}`)}}if(o.params.additionalProperty){let a=Object.keys(o.parentSchema?.properties??{}),l=Object.keys(o.data??{}),p=a.filter(m=>!l.includes(m));if(p.length>0)return{path:[...s,o.params.additionalProperty],message:`No additional properties allowed. You can set ${p.sort().join(", ")}.`}}return{path:s,message:o.message}})}function SW(e,t,r){let n=e,o=new Set;for(;;){let s=n.filter(F=>(F.keyword==="oneOf"||F.keyword==="anyOf")&&!o.has(F.instancePath))[0];if(s===void 0)break;let a=n.filter(F=>!F.instancePath.startsWith(s.instancePath)),l=[s],p=s.schemaPath.replace("#/","").replace(/\//g,"."),m=vt(r,p),g=Da(t,s.instancePath.split("/").slice(1));if(m!==void 0&&g!==void 0){let F=m.map(w=>{let v=og("fail",w);v(g);let x=0;return w.type==="object"&&(x=Object.keys(w.properties).reduce((P,B)=>{let U=w.properties[B],q=Da(g,[B]);return og("fail",U)(q)?P+1:P},x)),[x,v.errors]}).sort(([w],[v])=>w-v);if(F.length>=2){let[w,v]=F[F.length-1],[x]=F[F.length-2];w!==x&&(l=[s,...v.map(O=>({...O,instancePath:s.instancePath+O.instancePath}))])}}n=[...a,...l],o.add(s.instancePath)}return n}var xW={type:{type:"string"},handle:{type:"string"},uid:{type:"string"},path:{type:"string"},extensions:{}};async function ES(e,t,r="strip"){let n=t?.jsonSchema;if(n===void 0||ds(JSON.parse(n)))return e.parseConfigurationObject;let o=await Pf(n);o.properties={...xW,...o.properties};let s=e.identifier;return l=>{let p=e.parseConfigurationObject(l),g=(p.state==="ok"?p.data:void 0)??l,F=FS(g,o,r,s),w=p.errors??[];F.state==="error"&&(w=w.concat(F.errors));let v=new Set;return w=w.filter(x=>{let O=JSON.stringify({path:x.path,message:x.message});return v.has(O)?!1:(v.add(O),!0)}),p.state!=="ok"||w.length>0?{state:"error",data:void 0,errors:w}:{state:"ok",data:F.data,errors:void 0}}}async function Of({developerPlatformClient:e,app:t}){let n=(await e.specifications(t)).filter(a=>["extension","configuration"].includes(a.experience)).map(a=>(a.identifier==="theme_app_extension"&&(a.identifier="theme"),a.identifier==="subscription_management"&&(a.identifier="product_subscription"),a.identifier==="checkout_post_purchase"&&(a.surface="post_purchase"),a.identifier==="webhook_subscription"&&(a.experience="configuration",a.uidStrategy="dynamic"),a)),o=await bu();return[...await PW(o,n)]}async function PW(e,t){let r=t.map(async a=>{let l=e.find(g=>g.identifier===a.identifier);if(!l&&a.validationSchema?.jsonSchema&&(l=await TW(a,a.validationSchema)),!l)return;let p=OW(l,a),m=await ES(p,a.validationSchema,p.experience==="extension"?"fail":"strip");return{...p,parseConfigurationObject:m}}),n=Qi(await Promise.all(r)),o=e.filter(a=>!n.find(l=>l.identifier===a.identifier));o.length>0&&ce(`The following extension specifications were defined locally but not found in the remote specifications: ${o.map(a=>a.identifier).sort().join(", ")}`);let s=t.filter(a=>!n.find(l=>l.identifier===a.identifier));return s.length>0&&ce(`The following extension specifications were found in the remote specifications but not defined locally: ${s.map(a=>a.identifier).sort().join(", ")}`),n}function OW(e,t){return{...e,loadedRemoteSpecs:!0,externalName:t.externalName,externalIdentifier:t.externalIdentifier,experience:t.experience,registrationLimit:t.registrationLimit,uidStrategy:t.uidStrategy,surface:t.surface??e.surface}}async function TW(e,t){let n=(await Pf(t.jsonSchema)).properties?.localization!==void 0;return{...Di({identifier:e.identifier,uidStrategy:e.uidStrategy,experience:e.experience,appModuleFeatures:()=>n?["localization"]:[]}),loadedRemoteSpecs:!0}}async function Tf(e,t=!0){let{remoteApp:r,appDirectory:n,developerPlatformClient:o}=await BW(e),s=await Of({developerPlatformClient:o,app:r}),a=r.flags,l=await RW(e,s,a,r.apiKey),p=await MW(r,e,{appDirectory:l.appDirectory??n});await _D(r,o.organizationSource);let m=await NW({configFileName:p,remoteApp:r,developerPlatformClient:o,specifications:s,flags:a,appDirectory:n,localAppOptions:l});return t&&$W(p,m.name,l.packageManager),{remoteApp:r,configFileName:p,configuration:m}}function vS(e){if(Ic()||e.length===0)return;let t=e.map(r=>`--${r}`).join(" ");throw new k([{command:"app config link"},"requires additional flags in non-interactive terminal environments."],["Run",{command:`shopify app config link ${t}`},"with the required values, or run the command in an interactive terminal."])}async function BW(e){let{creationOptions:t,appDirectory:r}=await IW(e),n=r??e.directory;if(e.apiKey){let a=await Dl({apiKey:e.apiKey});if(!a){let l=ov(e.apiKey);throw new k(l.message,l.tryMessage)}return e.isNewApp&&(a.newApp=!0),{remoteApp:a,appDirectory:n,developerPlatformClient:a.developerPlatformClient}}e.organizationId||vS(["client-id"]);let o=await sv({...t,directory:n,organizationId:e.organizationId}),s=o.developerPlatformClient;return{remoteApp:o,appDirectory:n,developerPlatformClient:s}}async function IW(e){let t={isLaunchable:!1,scopesArray:[],name:"",directory:e.directory,isEmbedded:!1};try{let r=await NE({specifications:await bu(),directory:e.directory,userProvidedConfigName:e.configName,remoteFlags:void 0,skipPrompts:!0});return{creationOptions:r.creationDefaultOptions(),appDirectory:r.directory}}catch{return{creationOptions:t}}}async function RW(e,t,r,n){let o=await jE({directory:e.directory,configName:e.configName,specifications:t,remoteFlags:r,skipPrompts:!0});switch(o.state){case"loaded-app":{let{app:s,configuration:a}=o;return a.client_id===n||e.isNewApp?{state:"reusable-current-app",scopes:Kd(a),localAppIdMatchedRemote:!0,existingBuildOptions:a.build,existingConfig:{...a},appDirectory:s.directory,packageManager:o.packageManager}:{state:"unable-to-reuse-current-config",scopes:"",localAppIdMatchedRemote:!0,appDirectory:void 0,existingBuildOptions:void 0,existingConfig:void 0,packageManager:"npm"}}case"loaded-template":return{state:"reusable-current-app",scopes:o.scopes,localAppIdMatchedRemote:!0,existingBuildOptions:void 0,existingConfig:o.rawConfig,appDirectory:o.appDirectory,packageManager:o.packageManager};case"error":return{state:"unable-to-load-config",scopes:"",localAppIdMatchedRemote:!1,appDirectory:void 0,existingBuildOptions:void 0,existingConfig:void 0,packageManager:"npm"}}}async function MW(e,t,r){if(t.fileName){let l=yr(t.fileName),p=r.appDirectory??t.directory;if(!t.force&&await Q(I(p,l)))throw new k(`Configuration file ${l} already exists.`,"Run the command with --force to overwrite it.");return l}if(t.configName)return yr(t.configName);let n=ll();if(n?.selectedToml)return n.selectedToml;let o=r.appDirectory??t.directory,s=await al(o),a=s[e.apiKey];return a||(ds(s)?"shopify.app.toml":(vS(["file-name"]),DE(o,e.title)))}async function NW(e){let{remoteApp:t,developerPlatformClient:r,specifications:n,flags:o,configFileName:s,appDirectory:a,localAppOptions:l}=e,p=I(a,s),m=await qE(t,r,n,o);if(!m){let w=l.scopes;m=LW(t,w)}let g=(w,v)=>v,F={...fn({...l.existingConfig??{}},{client_id:t.apiKey,...m},g),build:jW({existingBuildOptions:l.existingBuildOptions,linkedAppAndClientIdFromFileAreInSync:l.localAppIdMatchedRemote,linkedAppWasNewlyCreated:!!t.newApp,defaultToUpdateUrlsOnDev:!0})};return delete F.scopes,await cv(F,p),sD(F,{configFileName:s,directory:a}),F}function jW(e){let{existingBuildOptions:t,linkedAppAndClientIdFromFileAreInSync:r,linkedAppWasNewlyCreated:n,defaultToUpdateUrlsOnDev:o}=e,s={...n?{include_config_on_deploy:!0}:{},...o&&n?{automatically_update_urls_on_dev:!0}:{},...r?t:{}};if(!ds(s))return s}function $W(e,t,r){Ds({headline:`${e} is now linked to "${t}" on Shopify`,body:`Using ${e} as your default config.`,nextSteps:[[`Make updates to ${e} in your local project`],["To upload your config, run",{command:Rc(r,"shopify app deploy")}]],reference:[{link:{label:"App configuration",url:"https://shopify.dev/docs/apps/tools/cli/configuration"}}]})}function LW(e,t){return{...zW(e),...HW(e),...qW(e),...WW(t,e),...kW(e),...UW(e)}}function UW(e){let t={application_url:e.applicationUrl?.replace(/\/$/,"")??"",embedded:e.embedded??!0};return e.preferencesUrl?{...t,app_preferences:{url:e.preferencesUrl}}:{...t}}function kW(e){return e.appProxy?.url?{app_proxy:{url:e.appProxy.url,subpath:e.appProxy.subPath,prefix:e.appProxy.subPathPrefix}}:{}}function qW(e){let t=e.gdprWebhooks?.customerDataRequestUrl??e.gdprWebhooks?.customerDeletionUrl??e.gdprWebhooks?.shopDeletionUrl,r={privacy_compliance:{customer_data_request_url:e.gdprWebhooks?.customerDataRequestUrl,customer_deletion_url:e.gdprWebhooks?.customerDeletionUrl,shop_deletion_url:e.gdprWebhooks?.shopDeletionUrl}};return{webhooks:{api_version:e.webhookApiVersion??"2023-07",...t?r:{}}}}function WW(e,t){let r={};return t.requestedAccessScopes?r={scopes:t.requestedAccessScopes.join(",")}:e===""?r={use_legacy_install_flow:!0}:r={scopes:e,use_legacy_install_flow:!0},{auth:{redirect_urls:t.redirectUrlWhitelist??[]},access_scopes:r}}function HW(e){return{pos:{embedded:e.posEmbedded??!1}}}function zW(e){return{name:e.title}}d();d();async function CS(e){for(let t of e)await VW(t)}async function VW(e){if(!e.isUUIDStrategyExtension||e.configuration.uid)return;let t=await Ct.read(e.configurationPath),r=vt(t.content,"extensions");if(!("uid"in t.content)){if(r){let n=r.find(o=>o.handle===e.handle);if(n&&"uid"in n)return}if(r){let n=e.handle;await t.transformRaw(o=>{let s=new RegExp(`(\\n?(\\s*)handle\\s*=\\s*"${n}")`);return o.replace(s,`$1
|
|
303
|
+
$2uid = "${e.uid}"`)})}else await t.patch({uid:e.uid})}}function wS(e){let t=Os(e);return Se`${Ae.errorText("Validation error")} in ${Ae.path(e.file)}:\n\n${t}`}async function ece({directory:e,clientId:t,forceRelink:r,userProvidedConfigName:n,unsafeTolerateErrors:o=!1}){let s,a,l;if(r){let P=await Tf({directory:e,apiKey:t});l=P.remoteApp;let B=await $r(e,P.configFileName);s=B.project,a=B.activeConfig}else{let P=await $r(e,n);if(s=P.project,a=P.activeConfig,a.file.errors.length>0)throw new k(a.file.errors.map(B=>B.message).join(`
|
|
304
|
+
`));if(!a.isLinked){let B=await Tf({directory:e,apiKey:t,configName:Re(a.file.path)});l=B.remoteApp;let U=await $r(e,B.configFileName);s=U.project,a=U.activeConfig}}let p=a.file.content.client_id;if(typeof p!="string"||p.length===0)throw new Nr(`Active config at ${a.file.path} is marked as linked but has no client_id`);l??(l=await Dl({apiKey:t??p}));let g=l.developerPlatformClient,F=await kc(l.organizationId,g),w=await Of({developerPlatformClient:g,app:l}),v=await Xo({project:s,activeConfig:a,specifications:w,remoteFlags:l.flags,clientIdOverride:t&&t!==p?t:void 0});if(!o&&!v.errors.isEmpty())throw new k(wS(v.errors.getErrors()[0]));let x=cl(e),O=l.apiKey===v.configuration.client_id;return(!x||O)&&Jo({appId:l.apiKey,title:l.title,directory:e,orgId:l.organizationId}),await KW(l,F,r),v.errors.isEmpty()&&await CS(v.allExtensions),{project:s,activeConfig:a,app:v,remoteApp:l,developerPlatformClient:g,specifications:w,organization:F}}async function KW(e,t,r){let n;t.source===Vo.BusinessPlatform?n={business_platform_id:ls(t.id)}:n={partner_id:ls(t.id)},await mr.addPublicMetadata(()=>({...n,api_key:e.apiKey,cmd_app_reset_used:r}))}async function tce({directory:e,userProvidedConfigName:t,skipPrompts:r=!1}){let{project:n,activeConfig:o}=await $r(e,t,{skipPrompts:r});if(o.file.errors.length>0)throw new k(o.file.errors.map(l=>l.message).join(`
|
|
305
|
+
`));let s=await bu(),a=await Xo({project:n,activeConfig:o,specifications:s,ignoreUnknownExtensions:!0});if(!a.errors.isEmpty())throw new k(wS(a.errors.getErrors()[0]));return{app:a,project:n}}export{Td as a,oH as b,io as c,BB as d,Es as e,J0 as f,vH as g,tF as h,Kd as i,ft as j,rV as k,yr as l,Xd as m,iz as n,jF as o,cl as p,Jo as q,mG as r,$G as s,wE as t,LG as u,UG as v,kG as w,bs as x,dJ as y,uD as z,AE as A,Os as B,JY as C,XY as D,ZY as E,$E as F,dn as G,al as H,FE as I,wG as J,EE as K,bG as L,vE as M,AG as N,qE as O,RJ as P,MJ as Q,tv as R,nv as S,YX as T,uv as U,Dl as V,hZ as W,gR as X,mZ as Y,av as Z,_D as _,dQ as $,Fv as aa,PD as ba,Aee as ca,OD as da,Mee as ea,TD as fa,kee as ga,BD as ha,Kee as ia,ID as ja,Qee as ka,RD as la,ite as ma,Qie as na,Z2 as oa,Of as pa,Tf as qa,RW as ra,NW as sa,ece as ta,tce as ua};
|
|
306
|
+
/*! Bundled license information:
|
|
307
|
+
|
|
308
|
+
lodash/lodash.js:
|
|
309
|
+
(**
|
|
310
|
+
* @license
|
|
311
|
+
* Lodash <https://lodash.com/>
|
|
312
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
313
|
+
* Released under MIT license <https://lodash.com/license>
|
|
314
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
315
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
316
|
+
*)
|
|
317
|
+
*/
|