@shopify/cli 4.2.0 → 4.3.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/{acorn-QBS5IYTX.js → acorn-7M27BPGP.js} +1 -1
- package/dist/analytics-JH64XI2J.js +1 -0
- package/dist/analytics-MEGKKFGF.js +1 -0
- package/dist/{angular-UTTM4Y4S.js → angular-DW5TQVCM.js} +1 -1
- package/dist/{babel-JS32NLHY.js → babel-I2RLWM7N.js} +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/{chokidar-G4ONJSK4.js → chokidar-VDIVGBZH.js} +1 -1
- package/dist/{chunk-NBYS6YQ2.js → chunk-25HJX3L2.js} +1 -1
- package/dist/{chunk-ZZYFG22L.js → chunk-2EHBJWC6.js} +1 -1
- package/dist/{chunk-INFBVFMU.js → chunk-2GAFKG64.js} +1 -1
- package/dist/{chunk-F6T3UBBL.js → chunk-2GU7OY3H.js} +1 -1
- package/dist/{chunk-MIO2CV3Q.js → chunk-2K7FGAT6.js} +1 -1
- package/dist/{chunk-PRVQAHWI.js → chunk-2O22LZKV.js} +1 -1
- package/dist/{chunk-MKE434RB.js → chunk-2RBIR3NM.js} +1 -1
- package/dist/{chunk-4Z2WYNTE.js → chunk-2TMQG2UT.js} +1 -1
- package/dist/{chunk-FTN7Y6HD.js → chunk-2XZBQZ5R.js} +1 -1
- package/dist/{chunk-J6VTZEE2.js → chunk-33OHQUHZ.js} +1 -1
- package/dist/chunk-3AOQKI4B.js +1 -0
- package/dist/{chunk-4EXYYBQ6.js → chunk-3SPDFV5D.js} +1 -1
- package/dist/{chunk-X2TC7S57.js → chunk-3YDYZ232.js} +2 -2
- package/dist/{chunk-FFYYJKF7.js → chunk-4FFPTEKD.js} +1 -1
- package/dist/{chunk-IWCPQD7X.js → chunk-4J32OHLY.js} +1 -1
- package/dist/chunk-4QTEPWEJ.js +283 -0
- package/dist/{chunk-QLQGHMVU.js → chunk-57PPQKJT.js} +1 -1
- package/dist/{chunk-DCK2FX6J.js → chunk-5BKCIDMS.js} +1 -1
- package/dist/{chunk-JUVAGMIH.js → chunk-5C7HDTHJ.js} +1 -1
- package/dist/{chunk-A6X2IVGT.js → chunk-5FFHQTRC.js} +1 -1
- package/dist/{chunk-UCLSPAVX.js → chunk-5FVB7JHP.js} +1 -1
- package/dist/{chunk-HD5TYIDZ.js → chunk-5H3VTG77.js} +1 -1
- package/dist/{chunk-6TEXPRI2.js → chunk-5O43334U.js} +1 -1
- package/dist/{chunk-MZJRNFAU.js → chunk-5XDQ76DQ.js} +1 -1
- package/dist/{chunk-PD5ZHJWI.js → chunk-636CTEW7.js} +1 -1
- package/dist/chunk-6JKGUQRD.js +1 -0
- package/dist/chunk-6KETAPWL.js +1 -0
- package/dist/{chunk-UOQQNAHX.js → chunk-6LWOWDF4.js} +1 -1
- package/dist/{chunk-CE6FKJFS.js → chunk-7572RLUP.js} +1 -1
- package/dist/{chunk-XFKCDWXB.js → chunk-762JWOWJ.js} +1 -1
- package/dist/{chunk-IU2ZQ6TE.js → chunk-773TIA5M.js} +1 -1
- package/dist/{chunk-23AMFHXC.js → chunk-7D45IAMQ.js} +1 -1
- package/dist/{chunk-VPL2NDH6.js → chunk-7FQFEB33.js} +5 -5
- package/dist/{chunk-BPVZ7E63.js → chunk-7LV55VWE.js} +1 -1
- package/dist/{chunk-QUTQDXSL.js → chunk-7UNQOKZW.js} +1 -1
- package/dist/{chunk-IWE4RUI7.js → chunk-A27NZMWB.js} +1 -1
- package/dist/{chunk-7JESXDF2.js → chunk-A4SBXDZB.js} +1 -1
- package/dist/{chunk-AP3RFOPL.js → chunk-A5HKAMAC.js} +1 -1
- package/dist/{chunk-Z35BTAM6.js → chunk-AAK376RT.js} +1 -1
- package/dist/{chunk-DNLOSMHL.js → chunk-AERKD4TO.js} +1 -1
- package/dist/{chunk-WUK5NQSX.js → chunk-ANBOLDON.js} +2 -2
- package/dist/{chunk-TLSAQ6FG.js → chunk-AO3RFGNV.js} +1 -1
- package/dist/{chunk-KU5OPV7U.js → chunk-ATSMK66C.js} +1 -1
- package/dist/{chunk-LTWXTDDR.js → chunk-AU5EZQW7.js} +1 -1
- package/dist/{chunk-2YXKZWYW.js → chunk-AVD3INWF.js} +1 -1
- package/dist/chunk-AWEB5AQM.js +1 -0
- package/dist/{chunk-X4CV6TRE.js → chunk-AXNAGI32.js} +1 -1
- package/dist/{chunk-FQDRVPCY.js → chunk-BL46CZ2M.js} +1 -1
- package/dist/{chunk-OKOYLEA7.js → chunk-BQWK3C47.js} +3 -3
- package/dist/{chunk-C3LZPAAH.js → chunk-CEHXOWA6.js} +1 -1
- package/dist/{chunk-N5ROZKPZ.js → chunk-CFOXXOO2.js} +1 -1
- package/dist/{chunk-PIBY5DDZ.js → chunk-CRALWNNO.js} +1 -1
- package/dist/{chunk-NO5KVFTV.js → chunk-CV5EQGES.js} +3 -3
- package/dist/{chunk-H4W4DFKK.js → chunk-CX5CC6P5.js} +1 -1
- package/dist/{chunk-OKNBZSGN.js → chunk-DCLUZFT7.js} +1 -1
- package/dist/{chunk-2EJCY4CE.js → chunk-DNXYKGV2.js} +1 -1
- package/dist/{chunk-IOQQUHST.js → chunk-DTIWUT2T.js} +1 -1
- package/dist/{chunk-6TORWTD7.js → chunk-DYNH5SKT.js} +1 -1
- package/dist/{chunk-D3DDLLNF.js → chunk-DZQYG32N.js} +1 -1
- package/dist/{chunk-QTGMS62F.js → chunk-E7DHELFH.js} +1 -1
- package/dist/{chunk-PUTZFF2Z.js → chunk-EH7ZTFS4.js} +3 -3
- package/dist/{chunk-YS6VOQ7I.js → chunk-EJDWYASP.js} +1 -1
- package/dist/chunk-EKVTNWHM.js +1 -0
- package/dist/{chunk-6M3ZYNGO.js → chunk-ET2CGROE.js} +1 -1
- package/dist/{chunk-6ZIOYXEF.js → chunk-EVZA2TCI.js} +1 -1
- package/dist/{chunk-QSTEVZFQ.js → chunk-F3TMLDLC.js} +1 -1
- package/dist/{chunk-CW7WJZKR.js → chunk-FIYAECXH.js} +1 -1
- package/dist/{chunk-WDC3KIZT.js → chunk-FKIVKNOV.js} +1 -1
- package/dist/{chunk-7DVOSOEP.js → chunk-FOFJBRSL.js} +1 -1
- package/dist/{chunk-D656BV5Z.js → chunk-FQ5ZZX2G.js} +1 -1
- package/dist/{chunk-6YHJ554P.js → chunk-G2LVUM7N.js} +1 -1
- package/dist/{chunk-NPM3MFB3.js → chunk-G2OHWAY2.js} +1 -1
- package/dist/chunk-G3JJLXPH.js +1 -0
- package/dist/{chunk-57N2DFIF.js → chunk-G3RWLAOG.js} +1 -1
- package/dist/{chunk-4V4DQ6W7.js → chunk-G4OQABDT.js} +30 -30
- package/dist/{chunk-KLMDWDT2.js → chunk-GB3YC4TI.js} +1 -1
- package/dist/{chunk-OCOY5MV2.js → chunk-GCN4O7HM.js} +1 -1
- package/dist/{chunk-2N4O33VM.js → chunk-GDHD3TGC.js} +1 -1
- package/dist/{chunk-N3YWHJMB.js → chunk-GJXINXSU.js} +2 -2
- package/dist/{chunk-RAH5NW3R.js → chunk-GWHV62YT.js} +1 -1
- package/dist/{chunk-VA5IUGZV.js → chunk-HCTZN7L4.js} +1 -1
- package/dist/{chunk-LITB5QQX.js → chunk-HDC5V7RY.js} +1 -1
- package/dist/{chunk-K7K6GNF6.js → chunk-HIQHYPLU.js} +1 -1
- package/dist/{chunk-VEDZUOVI.js → chunk-HOSFU6UP.js} +3 -3
- package/dist/{chunk-HSYRYSX4.js → chunk-I22ZTRKK.js} +1 -1
- package/dist/{chunk-KLA7AWG6.js → chunk-I4R7TML2.js} +1 -1
- package/dist/{chunk-EENHXSWU.js → chunk-I5A6BPCP.js} +1 -1
- package/dist/{chunk-TNQXTZAX.js → chunk-IWOTLFOY.js} +1 -1
- package/dist/{chunk-PBTXPBI6.js → chunk-J3H4LPN6.js} +3 -3
- package/dist/{chunk-6HZTMQD6.js → chunk-J3HX6ZGD.js} +1 -1
- package/dist/{chunk-OYP7DKPU.js → chunk-J3JPJCWP.js} +1 -1
- package/dist/{chunk-E2YBU6D3.js → chunk-J5BRKYGE.js} +2 -2
- package/dist/{chunk-5TIJLYZU.js → chunk-JAWKLBOB.js} +1 -1
- package/dist/{chunk-6AJZKIZ3.js → chunk-JAWOP4HJ.js} +1 -1
- package/dist/{chunk-TQGTEVSR.js → chunk-JCIN73BE.js} +1 -1
- package/dist/{chunk-C6ABJCRG.js → chunk-JEZ3PGVC.js} +1 -1
- package/dist/{chunk-TGACBJIY.js → chunk-JJ6RM54S.js} +1 -1
- package/dist/{chunk-TXUTT6UA.js → chunk-JK3NIHTX.js} +1 -1
- package/dist/{chunk-OLOBQ42K.js → chunk-JLE4NBMT.js} +1 -1
- package/dist/{chunk-7KJ5TBWG.js → chunk-JSOGPMWB.js} +1 -1
- package/dist/{chunk-L2VSSINY.js → chunk-JUYJZUYU.js} +1 -1
- package/dist/chunk-KRQGLK2Q.js +3 -0
- package/dist/{chunk-3VZEETAV.js → chunk-KRZABRYT.js} +1 -1
- package/dist/{chunk-FBVBO5YQ.js → chunk-L2PC4MUV.js} +1 -1
- package/dist/{chunk-SSM346XI.js → chunk-LCZDC6EE.js} +1 -1
- package/dist/{chunk-NEZEHBT2.js → chunk-LXVORHCQ.js} +1 -1
- package/dist/{chunk-DERA4K6A.js → chunk-M2YINBHF.js} +1 -1
- package/dist/{chunk-VT77EFRL.js → chunk-M7YFD4EV.js} +6 -6
- package/dist/{chunk-DCBYHVKW.js → chunk-MEIEEENL.js} +1 -1
- package/dist/{chunk-7BFDUVOG.js → chunk-MIDYZPO4.js} +1 -1
- package/dist/{chunk-I3LX25MB.js → chunk-MINZGZ4N.js} +1 -1
- package/dist/{chunk-U3ZG675O.js → chunk-MMIHHCMW.js} +1 -1
- package/dist/{chunk-PRKBO42R.js → chunk-MPW2YJWU.js} +1 -1
- package/dist/{chunk-C2FFA4O4.js → chunk-MRS6LAY7.js} +1 -1
- package/dist/{chunk-IVGWFPMA.js → chunk-N3CNWCC2.js} +1 -1
- package/dist/{chunk-NXL6LDJU.js → chunk-N3NE4MVN.js} +1 -1
- package/dist/{chunk-WNGV4JQS.js → chunk-N3YTDGFY.js} +1 -1
- package/dist/{chunk-A5SQCM63.js → chunk-N5LVGFDS.js} +1 -1
- package/dist/{chunk-GVITHCQJ.js → chunk-NILXAUUT.js} +1 -1
- package/dist/{chunk-5Y7GIF2W.js → chunk-NJOO5XJV.js} +1 -1
- package/dist/{chunk-ULQG3XQS.js → chunk-NNOSZ447.js} +1 -1
- package/dist/{chunk-MGL4YM3S.js → chunk-NTRAWIEJ.js} +4 -4
- package/dist/{chunk-2WNODIWJ.js → chunk-NWXDOCL5.js} +1 -1
- package/dist/{chunk-K77WAKOB.js → chunk-OU3M32A2.js} +1 -1
- package/dist/chunk-OU4SKQTC.js +5 -0
- package/dist/{chunk-4KRT35A2.js → chunk-OXJBYKMX.js} +1 -1
- package/dist/{chunk-LCCMXY6N.js → chunk-OZBY45KT.js} +1 -1
- package/dist/{chunk-75VPUOC5.js → chunk-P2OI2P2M.js} +1 -1
- package/dist/{chunk-XP6IRAZN.js → chunk-PCCK4YTE.js} +1 -1
- package/dist/{chunk-2VLMN5QZ.js → chunk-PFGYC53K.js} +1 -1
- package/dist/{chunk-YGMVL6NZ.js → chunk-PMS4MNHB.js} +2 -2
- package/dist/{chunk-OA4P6AKS.js → chunk-PNP5OKNZ.js} +1 -1
- package/dist/{chunk-XX343DDG.js → chunk-PXHY753L.js} +1 -1
- package/dist/{chunk-UURFVUAH.js → chunk-Q73GEVSJ.js} +1 -1
- package/dist/{chunk-M2TJICTB.js → chunk-Q77MM2N2.js} +1 -1
- package/dist/{chunk-XDAOLCPN.js → chunk-Q7C44DX5.js} +1 -1
- package/dist/chunk-QDVJJKLB.js +1 -0
- package/dist/{chunk-5CH3B62S.js → chunk-RJ5VF3QY.js} +1 -1
- package/dist/{chunk-LQMSF3F7.js → chunk-RKDZGK5K.js} +1 -1
- package/dist/{chunk-VYXVYOIJ.js → chunk-RSRYC5ZF.js} +1 -1
- package/dist/{chunk-HLMFVORT.js → chunk-S22NCNAJ.js} +1 -1
- package/dist/{chunk-UARVYVLN.js → chunk-S5IFJ737.js} +2 -2
- package/dist/{chunk-42RMKTCJ.js → chunk-S6B2ADVR.js} +1 -1
- package/dist/chunk-S7F5KFQP.js +1 -0
- package/dist/{chunk-UBKVCI7A.js → chunk-SSCYLDSX.js} +1 -1
- package/dist/{chunk-QFWIDATO.js → chunk-STJ3LWFL.js} +1 -1
- package/dist/{chunk-LKS47US7.js → chunk-T3ERXB7F.js} +1 -1
- package/dist/{chunk-PLQFX5ZP.js → chunk-T4IV643Z.js} +1 -1
- package/dist/{chunk-BECEP46I.js → chunk-T4NS63K4.js} +1 -1
- package/dist/{chunk-3YWUSKWF.js → chunk-T6CC5WUU.js} +1 -1
- package/dist/{chunk-3TNEIDOD.js → chunk-T7KHS6RF.js} +1 -1
- package/dist/{chunk-QYR5VPQA.js → chunk-TOLPNBZK.js} +1 -1
- package/dist/{chunk-XXE7667M.js → chunk-TP7E54WN.js} +1 -1
- package/dist/chunk-TPCG6DCA.js +1 -0
- package/dist/{chunk-2KH2S7PI.js → chunk-TRYWVIVJ.js} +1 -1
- package/dist/chunk-TU47HMTL.js +1 -0
- package/dist/{chunk-HHXHOQQP.js → chunk-TUNUEOHO.js} +1 -1
- package/dist/{chunk-PS25FEBF.js → chunk-TY6BZTG3.js} +1 -1
- package/dist/chunk-TYMYIUIQ.js +1 -0
- package/dist/chunk-UB26DGTR.js +6 -0
- package/dist/{chunk-HJSYHK4S.js → chunk-UC7KMA6W.js} +1 -1
- package/dist/{chunk-FD5S2O6M.js → chunk-UOHNRH6E.js} +1 -1
- package/dist/{chunk-ZR76GGZ6.js → chunk-UQWFDL3F.js} +1 -1
- package/dist/{chunk-M4LOKANA.js → chunk-USLYL5AC.js} +1 -1
- package/dist/{chunk-VICNWPLQ.js → chunk-UTO4Z6P6.js} +12 -12
- package/dist/{chunk-F47MFBKM.js → chunk-UU5P2IYU.js} +1 -1
- package/dist/chunk-UYSF234H.js +1 -0
- package/dist/chunk-VE35YELD.js +1 -0
- package/dist/{chunk-6YAXFS6V.js → chunk-VI34CKV6.js} +1 -1
- package/dist/{chunk-M4V2OQAX.js → chunk-VJ6KDRZI.js} +1 -1
- package/dist/{chunk-VBUZWRUL.js → chunk-VJEKDBGZ.js} +1 -1
- package/dist/chunk-VKWPEFWQ.js +1 -0
- package/dist/chunk-VPPWSKOY.js +1 -0
- package/dist/chunk-VRJTLVG3.js +1 -0
- package/dist/chunk-VUMUCNI7.js +1 -0
- package/dist/chunk-W7DDV2EY.js +1 -0
- package/dist/{chunk-RL5BWZ7D.js → chunk-WA3YC5W4.js} +1 -1
- package/dist/{chunk-MFLBTJO7.js → chunk-WHNWE7P2.js} +1 -1
- package/dist/{chunk-R6JNXEB3.js → chunk-WVRGCNBZ.js} +1 -1
- package/dist/{chunk-MOA33ZFO.js → chunk-WW7TENNA.js} +1 -1
- package/dist/{chunk-HZA6IAA4.js → chunk-XVUHUA36.js} +1 -1
- package/dist/{chunk-PSQFZAF3.js → chunk-XWPPBOGF.js} +1 -1
- package/dist/chunk-YIRFEW5M.js +1 -0
- package/dist/{chunk-RGNAWKD7.js → chunk-YL3TYQGT.js} +1 -1
- package/dist/{chunk-A3VYI4LO.js → chunk-YLQ3LNNY.js} +3 -3
- package/dist/{chunk-MA52QGHP.js → chunk-YMAWEIUR.js} +1 -1
- package/dist/{chunk-6LK6ZP3Q.js → chunk-YPBCSDFQ.js} +1 -1
- package/dist/{chunk-3BRUCKZ2.js → chunk-YSIBRY6C.js} +1 -1
- package/dist/{chunk-FGVC22EY.js → chunk-YVQXEPHY.js} +1 -1
- package/dist/{chunk-4LNCYIS3.js → chunk-ZDF5N422.js} +1 -1
- package/dist/{chunk-T4M5CWAO.js → chunk-ZG7BVVT2.js} +1 -1
- package/dist/chunk-ZGJ3DFTQ.js +9 -0
- package/dist/{chunk-NKQBEFPS.js → chunk-ZI7LK3LW.js} +1 -1
- package/dist/{chunk-IXUVSFW2.js → chunk-ZM75DSIW.js} +1 -1
- package/dist/{chunk-3V63X7WZ.js → chunk-ZUKLGZOU.js} +1 -1
- 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/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/constants.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.d.ts +12 -0
- package/dist/cli/commands/doc/fetch.js +1 -0
- package/dist/cli/commands/doc/search.d.ts +13 -0
- package/dist/cli/commands/doc/search.js +1 -0
- 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.d.ts +4 -0
- 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/services/commands/doc/fetch.d.ts +1 -0
- package/dist/cli/services/commands/doc/fetch.js +45 -0
- package/dist/cli/services/commands/doc/search.d.ts +1 -0
- package/dist/cli/services/commands/doc/search.js +47 -0
- package/dist/command-registry.js +1 -1
- package/dist/{conf-store-6QNH5BID.js → conf-store-UY3MDGGA.js} +1 -1
- package/dist/{custom-oclif-loader-TSPWW5YF.js → custom-oclif-loader-3AICQCNU.js} +1 -1
- package/dist/deprecations-KNUMDRIU.js +1 -0
- package/dist/{devtools-HCKYP7DQ.js → devtools-37DE4MUR.js} +1 -1
- package/dist/{devtools-VEZNCV6W.js → devtools-WAWU5KQL.js} +1 -1
- package/dist/dist-C5IV2YDQ.js +1 -0
- package/dist/dist-VL4KZWV2.js +1 -0
- package/dist/environments-YPRVO2CF.js +1 -0
- package/dist/error-XRBQTNFM.js +1 -0
- package/dist/error-handler-NI7D6GSY.js +1 -0
- package/dist/{estree-BYYJYS3A.js → estree-JV5M77BA.js} +1 -1
- package/dist/{flow-M3Q2HPQT.js → flow-N4JYPYMQ.js} +1 -1
- package/dist/{fs-YMUQ6JLE.js → fs-LJWVNO4H.js} +1 -1
- package/dist/{glimmer-3DEJJGOJ.js → glimmer-JEV3BXHR.js} +1 -1
- package/dist/{graphql-A4HHE3MB.js → graphql-DTF6MHYF.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/{html-HETICZ2F.js → html-LVOJ3RQS.js} +1 -1
- package/dist/{http-proxy-node16-Q5DZMBHC.js → http-proxy-node16-X2WAMUT5.js} +1 -1
- package/dist/index.js +28 -7
- package/dist/is-global-W6ALVC5L.js +1 -0
- package/dist/{is-wsl-TN2CXYI7.js → is-wsl-UEMXYJPN.js} +1 -1
- package/dist/{latest-version-6OAYLOBL.js → latest-version-32HXMWJ7.js} +1 -1
- package/dist/lib-AIKYSHWL.js +1 -0
- package/dist/lib-O5EZ4NVT.js +1 -0
- package/dist/lib-Q4PWEMFD.js +1 -0
- package/dist/lib-QJDPPAWN.js +1 -0
- package/dist/{local-GPDAXHE6.js → local-GKEWZAIV.js} +1 -1
- package/dist/local-storage-ZOZMA22B.js +1 -0
- package/dist/{markdown-5TVCXM53.js → markdown-J6CE6POI.js} +1 -1
- package/dist/{meriyah-23OZNYWC.js → meriyah-PNQQZQYI.js} +1 -1
- package/dist/metadata-UEUN64TK.js +1 -0
- package/dist/{morph-I35VYPBH.js → morph-CGOZEPPZ.js} +1 -1
- package/dist/{multipart-parser-Q4QJZK3V.js → multipart-parser-5NSSTW27.js} +1 -1
- package/dist/{node-package-manager-GO4ZRTKQ.js → node-package-manager-4ASQQIIF.js} +1 -1
- package/dist/notifications-system-HLXJCAMG.js +1 -0
- package/dist/{npa-VNALV7XY.js → npa-A4YSCQ5Q.js} +1 -1
- package/dist/{open-VA7TLUIL.js → open-KLSGXBIW.js} +1 -1
- package/dist/out-CDCY25QC.js +1 -0
- package/dist/{output-7IYOMPSA.js → output-S6E37GJQ.js} +1 -1
- package/dist/{path-CWUNINMX.js → path-MBXP7ZIC.js} +1 -1
- package/dist/{postcss-IIK6CGAW.js → postcss-Q36SHOML.js} +1 -1
- package/dist/{prettier-ZSBNNQTK.js → prettier-EGVCP5CY.js} +1 -1
- package/dist/{source-map-3K6Y2OMO.js → source-map-E7FCCJL7.js} +1 -1
- package/dist/system-YQZNGSWB.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typescript-5R4Y7PXE.js +1 -0
- package/dist/{typescript-YKZ232QT.js → typescript-WYPDGPSV.js} +1 -1
- package/dist/ui-D2FFWRK7.js +1 -0
- package/dist/upgrade-TVTCFMXM.js +1 -0
- package/dist/version-J6MDN7BZ.js +1 -0
- package/dist/version-RIRW5EXQ.js +1 -0
- package/dist/{workerd-ST6XJKUN.js → workerd-QOTT6UCO.js} +1 -1
- package/dist/{yaml-SJKIH3VD.js → yaml-6KWCJ64X.js} +1 -1
- package/oclif.manifest.json +304 -6
- package/package.json +11 -8
- package/dist/analytics-CX22YIUZ.js +0 -1
- package/dist/analytics-UBWQIQYF.js +0 -1
- package/dist/chunk-4ZGSSQC6.js +0 -1
- package/dist/chunk-6SXOUZ7V.js +0 -1
- package/dist/chunk-ATPFTRCC.js +0 -1
- package/dist/chunk-AWQ5AR2K.js +0 -5
- package/dist/chunk-BHWEA4V2.js +0 -1
- package/dist/chunk-CCEA5CUX.js +0 -1
- package/dist/chunk-FP2NOZSD.js +0 -1
- package/dist/chunk-FSTCEWXX.js +0 -1
- package/dist/chunk-K3PGC6DC.js +0 -1
- package/dist/chunk-KFCGMT67.js +0 -1
- package/dist/chunk-KQU6HOJ3.js +0 -1
- package/dist/chunk-NP4UFPAX.js +0 -9
- package/dist/chunk-RVMB5LC2.js +0 -1
- package/dist/chunk-T5MK7ZSF.js +0 -1
- package/dist/chunk-UOQ75BL3.js +0 -1
- package/dist/chunk-UWJ73J4B.js +0 -1
- package/dist/chunk-VPRTJUIN.js +0 -1
- package/dist/chunk-WCWNI3ZV.js +0 -283
- package/dist/chunk-XEFQQPL4.js +0 -1
- package/dist/chunk-YJB7P2HC.js +0 -1
- package/dist/chunk-YOZNRLFC.js +0 -1
- package/dist/deprecations-F6JWVV2W.js +0 -1
- package/dist/dist-4BD6KOLR.js +0 -1
- package/dist/dist-AUABCVPI.js +0 -1
- package/dist/environments-RGLI75HN.js +0 -1
- package/dist/error-OZALZZ3U.js +0 -1
- package/dist/error-handler-V7LSEXHM.js +0 -1
- package/dist/is-global-BLIZ57HQ.js +0 -1
- package/dist/lib-AK5EOIKR.js +0 -1
- package/dist/lib-LVUMLZ4H.js +0 -1
- package/dist/lib-ME6554NA.js +0 -1
- package/dist/lib-WU3FEA6I.js +0 -1
- package/dist/local-storage-P66KJG6I.js +0 -1
- package/dist/metadata-TRH25EHU.js +0 -1
- package/dist/notifications-system-HM6JZ6WJ.js +0 -1
- package/dist/out-WLY6KV4B.js +0 -1
- package/dist/system-X5C4EQQH.js +0 -1
- package/dist/typescript-K5CWIA4V.js +0 -1
- package/dist/ui-H62CMRLG.js +0 -1
- package/dist/upgrade-EEOPH464.js +0 -1
- package/dist/version-76NBQR4K.js +0 -1
- package/dist/version-IGSEISUA.js +0 -1
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import{a as w0,b as b0}from"./chunk-S6B2ADVR.js";import{b as C0,o as QB}from"./chunk-YLQ3LNNY.js";import{a as JB}from"./chunk-VJEKDBGZ.js";import{$ as Ld,A as Zo,B as Fn,C as Ie,D as Dr,E as _i,F as Yc,G as O0,H as rn,I as T0,J as Gc,K as I0,L as B0,M as Kc,N as Jc,R as R0,S as M0,T as N0,U as j0,V as $0,W as L0,X as U0,Z as k0,_ as q0,ba as W0,c as E0,da as Qc,e as Md,f as $n,g as Jo,k as Hc,l as zc,m as Nd,n as jd,p as Vc,q as x0,r as gi,s as A0,t as $d,u as S0,v as Ge,w as Qo,x as Xo,y as P0,z as hr}from"./chunk-UTO4Z6P6.js";import{a as v0}from"./chunk-YL3TYQGT.js";import{aa as KB}from"./chunk-4J32OHLY.js";import{a as F0}from"./chunk-CFOXXOO2.js";import{b as vs,c as lt}from"./chunk-A5HKAMAC.js";import{a as nn}from"./chunk-QDVJJKLB.js";import{a as r0,b as i0}from"./chunk-NILXAUUT.js";import{a as y0}from"./chunk-E7DHELFH.js";import{$ as $c,H as Ky,I as Jy,N as Qy,T as Xy,U as Zy,V as zB,W as VB,X as e0,Y as YB,Z as hi,_ as Di,aa as t0,ba as vt,d as qy,da as _s,ea as n0,g as WB,j as Wy,n as Hy,p as zy,r as F,t as Vy,z as Yy}from"./chunk-G4OQABDT.js";import{m as Lc,n as u0,s as s0,t as a0,w as Uc,x as c0}from"./chunk-ANBOLDON.js";import{o as Gy}from"./chunk-HDC5V7RY.js";import{a as wd}from"./chunk-VPPWSKOY.js";import{a as $r,b as io}from"./chunk-J3HX6ZGD.js";import{a as HB,b as Td}from"./chunk-N5LVGFDS.js";import{a as gs,c as Nc,d as jc}from"./chunk-5C7HDTHJ.js";import{A as Ct,B as Fs,D as p0,F as Es,G as d0,I as h0,O as mi,R as D0,q as GB,u as oo,v as ys,w as kc,x as l0,z as f0}from"./chunk-NTRAWIEJ.js";import{f as Id}from"./chunk-VI34CKV6.js";import{d as k,f as tn,g as jn}from"./chunk-TPCG6DCA.js";import{$ as Od,$a as pr,Ba as Ny,Ea as di,F as LB,Fa as jy,Fb as xe,Ga as Ic,Gb as qc,Hb as Ae,Ka as $y,L as ro,La as Ly,Mb as Ko,N as It,O as Ad,Oa as Bc,Ob as Wc,P as Sd,Pa as Uy,Pb as ce,Qb as Lr,R as UB,S as kB,Sb as g0,Ta as Z,Tb as _0,U as Iy,Ua as Ut,W as Ds,Wa as Ve,Xa as ky,Y as Lt,Z as Pd,b as BB,ba as Pc,bb as Rc,c as RB,db as Mc,ea as By,f as Ay,fa as Go,i as MB,ia as Ry,k as NB,ka as Oc,m as Py,ma as $e,n as Oy,na as jr,oa as ms,pa as Mn,q as jB,qa as Tc,u as Ty,ua as Et,v as $B,va as My,w as xd,wa as Nn,yb as o0}from"./chunk-7FQFEB33.js";import{b as TB,c as IB,e as xy,f as Sy,j as qB,u as dr}from"./chunk-A4SBXDZB.js";import{l as Bd,m as Rd,n as m0}from"./chunk-S5IFJ737.js";import{a as hs}from"./chunk-NNOSZ447.js";import{d as R,e as no,f as Nr,g as Oe,h as Cy,i as De,j as Te,k as Ac,l as wy,n as Sc,s as by,t as bd}from"./chunk-773TIA5M.js";import{a as ze,c as B,e as fr,f as OB,g as d}from"./chunk-VKWPEFWQ.js";var pF=B((Zc,fF)=>{d();(function(e,t){typeof Zc=="object"&&typeof fF<"u"?t(Zc,(kB(),OB(UB)),WB()):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))})(Zc,(function(e,t,n){"use strict";var r=new Map,i=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 h(q){var Q=new Set,X=[];return q.definitions.forEach(function(fe){if(fe.kind==="FragmentDefinition"){var ye=fe.name.value,We=p(fe.loc),mt=i.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||i.set(ye,mt=new Set),mt.add(We),Q.has(We)||(Q.add(We),X.push(fe))}else X.push(fe)}),t.__assign(t.__assign({},q),{definitions:X})}function m(q){var Q=new Set(q.definitions);Q.forEach(function(fe){fe.loc&&delete fe.loc,Object.keys(fe).forEach(function(ye){var We=fe[ye];We&&typeof We=="object"&&Q.add(We)})});var X=q.loc;return X&&(delete X.startToken,delete X.endToken),q}function _(q){var Q=l(q);if(!r.has(Q)){var X=n.parse(q,{experimentalFragmentVariables:a,allowLegacyFragmentVariables:a});if(!X||X.kind!=="Document")throw new Error("Not a valid GraphQL document.");r.set(Q,m(h(X)))}return r.get(Q)}function C(q){for(var Q=[],X=1;X<arguments.length;X++)Q[X-1]=arguments[X];typeof q=="string"&&(q=[q]);var fe=q[0];return Q.forEach(function(ye,We){ye&&ye.kind==="Document"?fe+=ye.loc.source.body:fe+=ye,fe+=q[We+1]}),_(fe)}function v(){r.clear(),i.clear()}function b(){s=!1}function A(){a=!0}function O(){a=!1}var T={gql:C,resetCaches:v,disableFragmentWarnings:b,enableExperimentalFragmentVariables:A,disableExperimentalFragmentVariables:O};(function(q){q.gql=T.gql,q.resetCaches=T.resetCaches,q.disableFragmentWarnings=T.disableFragmentWarnings,q.enableExperimentalFragmentVariables=T.enableExperimentalFragmentVariables,q.disableExperimentalFragmentVariables=T.disableExperimentalFragmentVariables})(C||(C={})),C.default=C;var L=C;e.default=L,e.disableExperimentalFragmentVariables=O,e.disableFragmentWarnings=b,e.enableExperimentalFragmentVariables=A,e.gql=C,e.resetCaches=v,Object.defineProperty(e,"__esModule",{value:!0})}))});var hF=B((Rz,dF)=>{d();dF.exports=pF().gql});var vF=B(EF=>{d();var m8=Object.create,el=Object.defineProperty,g8=Object.getPrototypeOf,_8=Object.prototype.hasOwnProperty,y8=Object.getOwnPropertyNames,F8=Object.getOwnPropertyDescriptor,mF=e=>el(e,"__esModule",{value:!0}),E8=(e,t)=>{mF(e);for(var n in t)el(e,n,{get:t[n],enumerable:!0})},v8=(e,t,n)=>{if(mF(e),t&&typeof t=="object"||typeof t=="function")for(let r of y8(t))!_8.call(e,r)&&r!=="default"&&el(e,r,{get:()=>t[r],enumerable:!(n=F8(t,r))||n.enumerable});return e},tl=e=>e&&e.__esModule?e:v8(el(e!=null?m8(g8(e)):{},"default",{value:e,enumerable:!0}),e);E8(EF,{default:()=>T8,generateContentsFromGraphqlString:()=>FF,generateGraphQLString:()=>_F});var C8=tl(ze("fs")),w8=tl(hF()),b8=tl(ze("readline")),DF=tl(ze("path")),gF=(e,t)=>{let n=t?t(e):e;return JSON.stringify(n,(r,i)=>i===void 0?"__undefined":i).replace(/"__undefined"/g,"undefined")},x8=(e,t)=>{let n=new Set,r=[],i=s=>{n.has(s)||(n.add(s),s.imports.forEach(a=>{let l=t[a.absolutePath];i(l)}),r.unshift(s))};return e.forEach(i),r},A8=e=>new Promise(t=>{let n=b8.default.createInterface({input:C8.default.createReadStream(e)}),r="",i=[],s=!1,a=(l,p)=>{let h=p.replace(l,""),m=h.replace(/"|'/g,""),_=DF.default.join(DF.default.dirname(e),m);i.push({absolutePath:_,relativePath:h})};n.on("line",l=>{l.startsWith("#import ")?a("#import ",l):l.startsWith("# import ")?a("# import ",l):s?r+=l+`
|
|
4
|
+
`:l[0]!=="#"&&l!==""&&(s=!0,r+=l+`
|
|
5
|
+
`)}),n.on("close",()=>{t({body:r.trim(),filePath:e,imports:i})})}),_F=e=>{let t={},n=[],r=new Set,i=s=>t[s]?Promise.resolve(null):new Promise(a=>{A8(s).then(l=>{t[l.filePath]=l,l.imports.forEach(h=>{r.has(h.absolutePath)||(r.add(h.absolutePath),n.push(i(h.absolutePath)))});let p=n.shift();return p?p.then(a):a(null)})});return i(e).then(()=>x8(Object.values(t),t).reduce((l,p)=>p.body+`
|
|
6
|
+
|
|
7
|
+
`+l,""))},S8=(e,t,n)=>{let r={kind:"Document",definitions:[e,...t]};return gF(r,n)},P8=e=>((n,r)=>(n.forEach(i=>{i.kind==="FragmentDefinition"&&(r[i.name.value]=i)}),r))(e.definitions,{}),yF=(e,t)=>{let n=[],r=i=>{if(i.kind==="FragmentSpread"){let s=t[i.name.value],a=yF(s,t);n.push(...a,i.name.value)}};return e.kind==="OperationDefinition"?e.selectionSet.selections.forEach(i=>{var s;i.kind==="Field"&&((s=i.selectionSet)==null||s.selections.forEach(r))}):e.selectionSet.selections.forEach(r),n},FF=(e,t)=>{let n=w8.default(e),r=gF(n,t),i=P8(n),s=n.definitions.reduce((a,l)=>{if(l.kind==="OperationDefinition"&&l.name&&l.name.value){let p=l.name.value,m=yF(l,i).map(C=>{let v=i[C];if(!v)throw new Error(`Expected to find fragment definition for ${C}`);return v}),_=S8(l,m,t);a.push(`export const ${p} = ${_};`)}return a},[`const documentNode = ${r};`]);return s.push("export default documentNode;"),s.join(`
|
|
8
|
+
`)},O8=(e={})=>({name:"graphql-loader",setup(t){t.onLoad({filter:e.filterRegex||/\.graphql$|\.gql$/},n=>_F(n.path).then(r=>({contents:FF(r,e.mapDocumentNode)})))}}),T8=O8});var AF=B((nV,xF)=>{d();function En(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))}xF.exports=En;En.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};En.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};En.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 n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),n=this._timeouts.shift();else return!1;var r=this,i=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},n);return this._options.unref&&i.unref(),!0};En.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};En.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};En.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};En.prototype.start=En.prototype.try;En.prototype.errors=function(){return this._errors};En.prototype.attempts=function(){return this._attempts};En.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var i=this._errors[r],s=i.message,a=(e[s]||0)+1;e[s]=a,a>=n&&(t=i,n=a)}return t}});var SF=B(so=>{d();var L8=AF();so.operation=function(e){var t=so.timeouts(e);return new L8(t,{forever:e&&e.forever,unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};so.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 n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],i=0;i<t.retries;i++)r.push(this.createTimeout(i,t));return e&&e.forever&&!r.length&&r.push(this.createTimeout(i,t)),r.sort(function(s,a){return s-a}),r};so.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,r=Math.round(n*t.minTimeout*Math.pow(t.factor,e));return r=Math.min(r,t.maxTimeout),r};so.wrap=function(e,t,n){if(t instanceof Array&&(n=t,t=null),!n){n=[];for(var r in e)typeof e[r]=="function"&&n.push(r)}for(var i=0;i<n.length;i++){var s=n[i],a=e[s];e[s]=function(p){var h=so.operation(t),m=Array.prototype.slice.call(arguments,1),_=m.pop();m.push(function(C){h.retry(C)||(C&&(arguments[0]=h.mainError()),_.apply(this,arguments))}),h.attempt(function(){p.apply(e,m)})}.bind(e,a),e[s].options=t}}});var OF=B((uV,PF)=>{d();PF.exports=SF()});var IF=B((aV,Kd)=>{"use strict";d();var TF=Symbol();function U8(e,t,n){let r=t[TF];if(r)return t.stat(e,(s,a)=>{if(s)return n(s);n(null,a.mtime,r)});let i=new Date(Math.ceil(Date.now()/1e3)*1e3+5);t.utimes(e,i,i,s=>{if(s)return n(s);t.stat(e,(a,l)=>{if(a)return n(a);let p=l.mtime.getTime()%1e3===0?"s":"ms";Object.defineProperty(t,TF,{value:p}),n(null,l.mtime,p)})})}function k8(e){let t=Date.now();return e==="s"&&(t=Math.ceil(t/1e3)*1e3),new Date(t)}Kd.exports.probe=U8;Kd.exports.getMtime=k8});var jF=B((lV,Ps)=>{"use strict";d();var q8=ze("path"),Xd=Ry(),W8=OF(),H8=qB(),BF=IF(),Ur={};function Ss(e,t){return t.lockfilePath||`${e}.lock`}function Zd(e,t,n){if(!t.realpath)return n(null,q8.resolve(e));t.fs.realpath(e,n)}function Qd(e,t,n){let r=Ss(e,t);t.fs.mkdir(r,i=>{if(!i)return BF.probe(r,t.fs,(s,a,l)=>{if(s)return t.fs.rmdir(r,()=>{}),n(s);n(null,a,l)});if(i.code!=="EEXIST")return n(i);if(t.stale<=0)return n(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:e}));t.fs.stat(r,(s,a)=>{if(s)return s.code==="ENOENT"?Qd(e,{...t,stale:0},n):n(s);if(!RF(a,t))return n(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:e}));MF(e,t,l=>{if(l)return n(l);Qd(e,{...t,stale:0},n)})})})}function RF(e,t){return e.mtime.getTime()<Date.now()-t.stale}function MF(e,t,n){t.fs.rmdir(Ss(e,t),r=>{if(r&&r.code!=="ENOENT")return n(r);n()})}function rl(e,t){let n=Ur[e];n.updateTimeout||(n.updateDelay=n.updateDelay||t.update,n.updateTimeout=setTimeout(()=>{n.updateTimeout=null,t.fs.stat(n.lockfilePath,(r,i)=>{let s=n.lastUpdate+t.stale<Date.now();if(r)return r.code==="ENOENT"||s?Jd(e,n,Object.assign(r,{code:"ECOMPROMISED"})):(n.updateDelay=1e3,rl(e,t));if(!(n.mtime.getTime()===i.mtime.getTime()))return Jd(e,n,Object.assign(new Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let l=BF.getMtime(n.mtimePrecision);t.fs.utimes(n.lockfilePath,l,l,p=>{let h=n.lastUpdate+t.stale<Date.now();if(!n.released){if(p)return p.code==="ENOENT"||h?Jd(e,n,Object.assign(p,{code:"ECOMPROMISED"})):(n.updateDelay=1e3,rl(e,t));n.mtime=l,n.lastUpdate=Date.now(),n.updateDelay=null,rl(e,t)}})})},n.updateDelay),n.updateTimeout.unref&&n.updateTimeout.unref())}function Jd(e,t,n){t.released=!0,t.updateTimeout&&clearTimeout(t.updateTimeout),Ur[e]===t&&delete Ur[e],t.options.onCompromised(n)}function z8(e,t,n){t={stale:1e4,update:null,realpath:!0,retries:0,fs:Xd,onCompromised:r=>{throw r},...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),Zd(e,t,(r,i)=>{if(r)return n(r);let s=W8.operation(t.retries);s.attempt(()=>{Qd(i,t,(a,l,p)=>{if(s.retry(a))return;if(a)return n(s.mainError());let h=Ur[i]={lockfilePath:Ss(i,t),mtime:l,mtimePrecision:p,options:t,lastUpdate:Date.now()};rl(i,t),n(null,m=>{if(h.released)return m&&m(Object.assign(new Error("Lock is already released"),{code:"ERELEASED"}));NF(i,{...t,realpath:!1},m)})})})})}function NF(e,t,n){t={fs:Xd,realpath:!0,...t},Zd(e,t,(r,i)=>{if(r)return n(r);let s=Ur[i];if(!s)return n(Object.assign(new Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));s.updateTimeout&&clearTimeout(s.updateTimeout),s.released=!0,delete Ur[i],MF(i,t,n)})}function V8(e,t,n){t={stale:1e4,realpath:!0,fs:Xd,...t},t.stale=Math.max(t.stale||0,2e3),Zd(e,t,(r,i)=>{if(r)return n(r);t.fs.stat(Ss(i,t),(s,a)=>s?s.code==="ENOENT"?n(null,!1):n(s):n(null,!RF(a,t)))})}function Y8(){return Ur}H8(()=>{for(let e in Ur){let t=Ur[e].options;try{t.fs.rmdirSync(Ss(e,t))}catch{}}});Ps.exports.lock=z8;Ps.exports.unlock=NF;Ps.exports.check=V8;Ps.exports.getLocks=Y8});var LF=B((pV,$F)=>{"use strict";d();var G8=Ry();function K8(e){let t=["mkdir","realpath","stat","rmdir","utimes"],n={...e};return t.forEach(r=>{n[r]=(...i)=>{let s=i.pop(),a;try{a=e[`${r}Sync`](...i)}catch(l){return s(l)}s(null,a)}}),n}function J8(e){return(...t)=>new Promise((n,r)=>{t.push((i,s)=>{i?r(i):n(s)}),e(...t)})}function Q8(e){return(...t)=>{let n,r;if(t.push((i,s)=>{n=i,r=s}),e(...t),n)throw n;return r}}function X8(e){if(e={...e},e.fs=K8(e.fs||G8),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}$F.exports={toPromise:J8,toSync:Q8,toSyncOptions:X8}});var kF=B((hV,yi)=>{"use strict";d();var eu=jF(),{toPromise:il,toSync:ol,toSyncOptions:eh}=LF();async function UF(e,t){let n=await il(eu.lock)(e,t);return il(n)}function Z8(e,t){let n=ol(eu.lock)(e,eh(t));return ol(n)}function e6(e,t){return il(eu.unlock)(e,t)}function t6(e,t){return ol(eu.unlock)(e,eh(t))}function n6(e,t){return il(eu.check)(e,t)}function r6(e,t){return ol(eu.check)(e,eh(t))}yi.exports=UF;yi.exports.lock=UF;yi.exports.unlock=e6;yi.exports.lockSync=Z8;yi.exports.unlockSync=t6;yi.exports.check=n6;yi.exports.checkSync=r6});var XE=B((NQ,QE)=>{d();function FR(e,t,n,r){for(var i=-1,s=e==null?0:e.length;++i<s;){var a=e[i];t(r,a,n(a),e)}return r}QE.exports=FR});var ev=B(($Q,ZE)=>{d();var ER=GB();function vR(e,t,n,r){return ER(e,function(i,s,a){t(r,i,n(i),a)}),r}ZE.exports=vR});var vh=B((UQ,tv)=>{d();var CR=XE(),wR=ev(),bR=LB(),xR=Ay();function AR(e,t){return function(n,r){var i=xR(n)?CR:wR,s=t?t():{};return i(n,e,bR(r,2),s)}}tv.exports=AR});var rv=B((qQ,nv)=>{d();var SR=Xy(),PR=vh(),OR=Object.prototype,TR=OR.hasOwnProperty,IR=PR(function(e,t,n){TR.call(e,n)?e[n].push(t):SR(e,n,[t])});nv.exports=IR});var ov=B((HQ,iv)=>{d();var BR=vh(),RR=BR(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});iv.exports=RR});var kr=B((su,ks)=>{d();(function(){var e,t="4.17.23",n=200,r="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",s="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",l=500,p="__lodash_placeholder__",h=1,m=2,_=4,C=1,v=2,b=1,A=2,O=4,T=8,L=16,q=32,Q=64,X=128,fe=256,ye=512,We=30,mt="...",rr=800,dt=16,Pn=1,cn=2,wa=3,Cr=1/0,ir=9007199254740991,wr=17976931348623157e292,Oo=NaN,ln=4294967295,kf=ln-1,Xr=ln>>>1,ba=[["ary",X],["bind",b],["bindKey",A],["curry",T],["curryRight",L],["flip",ye],["partial",q],["partialRight",Q],["rearg",fe]],Zr="[object Arguments]",ei="[object Array]",To="[object AsyncFunction]",br="[object Boolean]",Ni="[object Date]",qf="[object DOMException]",ji="[object Error]",Io="[object Function]",xa="[object GeneratorFunction]",zt="[object Map]",ti="[object Number]",$i="[object Null]",On="[object Object]",Aa="[object Promise]",Wf="[object Proxy]",Li="[object RegExp]",Vt="[object Set]",Ui="[object String]",At="[object Symbol]",Sa="[object Undefined]",ki="[object WeakMap]",Hf="[object WeakSet]",or="[object ArrayBuffer]",Yt="[object DataView]",Nu="[object Float32Array]",ju="[object Float64Array]",$u="[object Int8Array]",Lu="[object Int16Array]",qi="[object Int32Array]",Uu="[object Uint8Array]",ku="[object Uint8ClampedArray]",Bo="[object Uint16Array]",qu="[object Uint32Array]",zf=/\b__p \+= '';/g,Vf=/\b(__p \+=) '' \+/g,Pa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Oa=/&(?:amp|lt|gt|quot|#39);/g,Ta=/[&<>"']/g,Yf=RegExp(Oa.source),Wu=RegExp(Ta.source),Gf=/<%-([\s\S]+?)%>/g,Ia=/<%([\s\S]+?)%>/g,Hu=/<%=([\s\S]+?)%>/g,Kf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jf=/^\w*$/,Qf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zu=/[\\^$.*+?()[\]{}|]/g,Xf=RegExp(zu.source),Vu=/^\s+/,Zf=/\s/,ep=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,tp=/\{\n\/\* \[wrapped with (.+)\] \*/,np=/,? & /,rp=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ip=/[()=,{}\[\]\/\s]/,op=/\\(\\)?/g,up=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ba=/\w*$/,sp=/^[-+]0x[0-9a-f]+$/i,ap=/^0b[01]+$/i,cp=/^\[object .+?Constructor\]$/,lp=/^0o[0-7]+$/i,fp=/^(?:0|[1-9]\d*)$/,Ra=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wi=/($^)/,Ma=/['\n\r\u2028\u2029\\]/g,Hi="\\ud800-\\udfff",Na="\\u0300-\\u036f",pp="\\ufe20-\\ufe2f",dp="\\u20d0-\\u20ff",Yu=Na+pp+dp,Gu="\\u2700-\\u27bf",ja="a-z\\xdf-\\xf6\\xf8-\\xff",hp="\\xac\\xb1\\xd7\\xf7",Dp="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",$a="\\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",Ro="\\ufe0e\\ufe0f",zi=hp+Dp+$a+gt,Ku="['\u2019]",mp="["+Hi+"]",La="["+zi+"]",Mo="["+Yu+"]",D="\\d+",M="["+Gu+"]",W="["+ja+"]",z="[^"+Hi+zi+D+Gu+ja+Gt+"]",ie="\\ud83c[\\udffb-\\udfff]",Y="(?:"+Mo+"|"+ie+")",K="[^"+Hi+"]",ge="(?:\\ud83c[\\udde6-\\uddff]){2}",ke="[\\ud800-\\udbff][\\udc00-\\udfff]",Ce="["+Gt+"]",nt="\\u200d",Be="(?:"+W+"|"+z+")",ur="(?:"+Ce+"|"+z+")",ut="(?:"+Ku+"(?:d|ll|m|re|s|t|ve))?",Me="(?:"+Ku+"(?:D|LL|M|RE|S|T|VE))?",St=Y+"?",Ju="["+Ro+"]?",Ua="(?:"+nt+"(?:"+[K,ge,ke].join("|")+")"+Ju+St+")*",Fe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ht="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",re=Ju+St+Ua,st="(?:"+[M,ge,ke].join("|")+")"+re,_t="(?:"+[K+Mo+"?",Mo,ge,ke,mp].join("|")+")",xr=RegExp(Ku,"g"),ni=RegExp(Mo,"g"),fn=RegExp(ie+"(?="+ie+")|"+_t+re,"g"),Vi=RegExp([Ce+"?"+W+"+"+ut+"(?="+[La,Ce,"$"].join("|")+")",ur+"+"+Me+"(?="+[La,Ce+Be,"$"].join("|")+")",Ce+"?"+Be+"+"+ut,Ce+"+"+Me,ht,Fe,D,st].join("|"),"g"),sr=RegExp("["+nt+Hi+Yu+Ro+"]"),Qu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Xu=["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"],ka=-1,Se={};Se[Nu]=Se[ju]=Se[$u]=Se[Lu]=Se[qi]=Se[Uu]=Se[ku]=Se[Bo]=Se[qu]=!0,Se[Zr]=Se[ei]=Se[or]=Se[br]=Se[Yt]=Se[Ni]=Se[ji]=Se[Io]=Se[zt]=Se[ti]=Se[On]=Se[Li]=Se[Vt]=Se[Ui]=Se[ki]=!1;var Pe={};Pe[Zr]=Pe[ei]=Pe[or]=Pe[Yt]=Pe[br]=Pe[Ni]=Pe[Nu]=Pe[ju]=Pe[$u]=Pe[Lu]=Pe[qi]=Pe[zt]=Pe[ti]=Pe[On]=Pe[Li]=Pe[Vt]=Pe[Ui]=Pe[At]=Pe[Uu]=Pe[ku]=Pe[Bo]=Pe[qu]=!0,Pe[ji]=Pe[Io]=Pe[ki]=!1;var gp={\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"},Dg={"&":"&","<":"<",">":">",'"':""","'":"'"},_p={"&":"&","<":"<",">":">",""":'"',"'":"'"},KA={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},JA=parseFloat,QA=parseInt,mg=typeof global=="object"&&global&&global.Object===Object&&global,XA=typeof self=="object"&&self&&self.Object===Object&&self,at=mg||XA||Function("return this")(),yp=typeof su=="object"&&su&&!su.nodeType&&su,Yi=yp&&typeof ks=="object"&&ks&&!ks.nodeType&&ks,gg=Yi&&Yi.exports===yp,Fp=gg&&mg.process,pn=(function(){try{var S=Yi&&Yi.require&&Yi.require("util").types;return S||Fp&&Fp.binding&&Fp.binding("util")}catch{}})(),_g=pn&&pn.isArrayBuffer,yg=pn&&pn.isDate,Fg=pn&&pn.isMap,Eg=pn&&pn.isRegExp,vg=pn&&pn.isSet,Cg=pn&&pn.isTypedArray;function Kt(S,N,I){switch(I.length){case 0:return S.call(N);case 1:return S.call(N,I[0]);case 2:return S.call(N,I[0],I[1]);case 3:return S.call(N,I[0],I[1],I[2])}return S.apply(N,I)}function ZA(S,N,I,V){for(var se=-1,ve=S==null?0:S.length;++se<ve;){var rt=S[se];N(V,rt,I(rt),S)}return V}function dn(S,N){for(var I=-1,V=S==null?0:S.length;++I<V&&N(S[I],I,S)!==!1;);return S}function eS(S,N){for(var I=S==null?0:S.length;I--&&N(S[I],I,S)!==!1;);return S}function wg(S,N){for(var I=-1,V=S==null?0:S.length;++I<V;)if(!N(S[I],I,S))return!1;return!0}function ri(S,N){for(var I=-1,V=S==null?0:S.length,se=0,ve=[];++I<V;){var rt=S[I];N(rt,I,S)&&(ve[se++]=rt)}return ve}function qa(S,N){var I=S==null?0:S.length;return!!I&&No(S,N,0)>-1}function Ep(S,N,I){for(var V=-1,se=S==null?0:S.length;++V<se;)if(I(N,S[V]))return!0;return!1}function qe(S,N){for(var I=-1,V=S==null?0:S.length,se=Array(V);++I<V;)se[I]=N(S[I],I,S);return se}function ii(S,N){for(var I=-1,V=N.length,se=S.length;++I<V;)S[se+I]=N[I];return S}function vp(S,N,I,V){var se=-1,ve=S==null?0:S.length;for(V&&ve&&(I=S[++se]);++se<ve;)I=N(I,S[se],se,S);return I}function tS(S,N,I,V){var se=S==null?0:S.length;for(V&&se&&(I=S[--se]);se--;)I=N(I,S[se],se,S);return I}function Cp(S,N){for(var I=-1,V=S==null?0:S.length;++I<V;)if(N(S[I],I,S))return!0;return!1}var nS=wp("length");function rS(S){return S.split("")}function iS(S){return S.match(rp)||[]}function bg(S,N,I){var V;return I(S,function(se,ve,rt){if(N(se,ve,rt))return V=ve,!1}),V}function Wa(S,N,I,V){for(var se=S.length,ve=I+(V?1:-1);V?ve--:++ve<se;)if(N(S[ve],ve,S))return ve;return-1}function No(S,N,I){return N===N?mS(S,N,I):Wa(S,xg,I)}function oS(S,N,I,V){for(var se=I-1,ve=S.length;++se<ve;)if(V(S[se],N))return se;return-1}function xg(S){return S!==S}function Ag(S,N){var I=S==null?0:S.length;return I?xp(S,N)/I:Oo}function wp(S){return function(N){return N==null?e:N[S]}}function bp(S){return function(N){return S==null?e:S[N]}}function Sg(S,N,I,V,se){return se(S,function(ve,rt,Re){I=V?(V=!1,ve):N(I,ve,rt,Re)}),I}function uS(S,N){var I=S.length;for(S.sort(N);I--;)S[I]=S[I].value;return S}function xp(S,N){for(var I,V=-1,se=S.length;++V<se;){var ve=N(S[V]);ve!==e&&(I=I===e?ve:I+ve)}return I}function Ap(S,N){for(var I=-1,V=Array(S);++I<S;)V[I]=N(I);return V}function sS(S,N){return qe(N,function(I){return[I,S[I]]})}function Pg(S){return S&&S.slice(0,Bg(S)+1).replace(Vu,"")}function Jt(S){return function(N){return S(N)}}function Sp(S,N){return qe(N,function(I){return S[I]})}function Zu(S,N){return S.has(N)}function Og(S,N){for(var I=-1,V=S.length;++I<V&&No(N,S[I],0)>-1;);return I}function Tg(S,N){for(var I=S.length;I--&&No(N,S[I],0)>-1;);return I}function aS(S,N){for(var I=S.length,V=0;I--;)S[I]===N&&++V;return V}var cS=bp(gp),lS=bp(Dg);function fS(S){return"\\"+KA[S]}function pS(S,N){return S==null?e:S[N]}function jo(S){return sr.test(S)}function dS(S){return Qu.test(S)}function hS(S){for(var N,I=[];!(N=S.next()).done;)I.push(N.value);return I}function Pp(S){var N=-1,I=Array(S.size);return S.forEach(function(V,se){I[++N]=[se,V]}),I}function Ig(S,N){return function(I){return S(N(I))}}function oi(S,N){for(var I=-1,V=S.length,se=0,ve=[];++I<V;){var rt=S[I];(rt===N||rt===p)&&(S[I]=p,ve[se++]=I)}return ve}function Ha(S){var N=-1,I=Array(S.size);return S.forEach(function(V){I[++N]=V}),I}function DS(S){var N=-1,I=Array(S.size);return S.forEach(function(V){I[++N]=[V,V]}),I}function mS(S,N,I){for(var V=I-1,se=S.length;++V<se;)if(S[V]===N)return V;return-1}function gS(S,N,I){for(var V=I+1;V--;)if(S[V]===N)return V;return V}function $o(S){return jo(S)?yS(S):nS(S)}function Tn(S){return jo(S)?FS(S):rS(S)}function Bg(S){for(var N=S.length;N--&&Zf.test(S.charAt(N)););return N}var _S=bp(_p);function yS(S){for(var N=fn.lastIndex=0;fn.test(S);)++N;return N}function FS(S){return S.match(fn)||[]}function ES(S){return S.match(Vi)||[]}var vS=(function S(N){N=N==null?at:ui.defaults(at.Object(),N,ui.pick(at,Xu));var I=N.Array,V=N.Date,se=N.Error,ve=N.Function,rt=N.Math,Re=N.Object,Op=N.RegExp,CS=N.String,hn=N.TypeError,za=I.prototype,wS=ve.prototype,Lo=Re.prototype,Va=N["__core-js_shared__"],Ya=wS.toString,we=Lo.hasOwnProperty,bS=0,Rg=(function(){var o=/[^.]+$/.exec(Va&&Va.keys&&Va.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),Ga=Lo.toString,xS=Ya.call(Re),AS=at._,SS=Op("^"+Ya.call(we).replace(zu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ka=gg?N.Buffer:e,si=N.Symbol,Ja=N.Uint8Array,Mg=Ka?Ka.allocUnsafe:e,Qa=Ig(Re.getPrototypeOf,Re),Ng=Re.create,jg=Lo.propertyIsEnumerable,Xa=za.splice,$g=si?si.isConcatSpreadable:e,es=si?si.iterator:e,Gi=si?si.toStringTag:e,Za=(function(){try{var o=Zi(Re,"defineProperty");return o({},"",{}),o}catch{}})(),PS=N.clearTimeout!==at.clearTimeout&&N.clearTimeout,OS=V&&V.now!==at.Date.now&&V.now,TS=N.setTimeout!==at.setTimeout&&N.setTimeout,ec=rt.ceil,tc=rt.floor,Tp=Re.getOwnPropertySymbols,IS=Ka?Ka.isBuffer:e,Lg=N.isFinite,BS=za.join,RS=Ig(Re.keys,Re),it=rt.max,yt=rt.min,MS=V.now,NS=N.parseInt,Ug=rt.random,jS=za.reverse,Ip=Zi(N,"DataView"),ts=Zi(N,"Map"),Bp=Zi(N,"Promise"),Uo=Zi(N,"Set"),ns=Zi(N,"WeakMap"),rs=Zi(Re,"create"),nc=ns&&new ns,ko={},$S=eo(Ip),LS=eo(ts),US=eo(Bp),kS=eo(Uo),qS=eo(ns),rc=si?si.prototype:e,is=rc?rc.valueOf:e,kg=rc?rc.toString:e;function y(o){if(Ye(o)&&!ae(o)&&!(o instanceof me)){if(o instanceof Dn)return o;if(we.call(o,"__wrapped__"))return q_(o)}return new Dn(o)}var qo=(function(){function o(){}return function(u){if(!He(u))return{};if(Ng)return Ng(u);o.prototype=u;var c=new o;return o.prototype=e,c}})();function ic(){}function Dn(o,u){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!u,this.__index__=0,this.__values__=e}y.templateSettings={escape:Gf,evaluate:Ia,interpolate:Hu,variable:"",imports:{_:y}},y.prototype=ic.prototype,y.prototype.constructor=y,Dn.prototype=qo(ic.prototype),Dn.prototype.constructor=Dn;function me(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ln,this.__views__=[]}function WS(){var o=new me(this.__wrapped__);return o.__actions__=Mt(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=Mt(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=Mt(this.__views__),o}function HS(){if(this.__filtered__){var o=new me(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function zS(){var o=this.__wrapped__.value(),u=this.__dir__,c=ae(o),f=u<0,g=c?o.length:0,E=rO(0,g,this.__views__),w=E.start,x=E.end,P=x-w,j=f?x:w-1,$=this.__iteratees__,U=$.length,H=0,G=yt(P,this.__takeCount__);if(!c||!f&&g==P&&G==P)return f_(o,this.__actions__);var te=[];e:for(;P--&&H<G;){j+=u;for(var pe=-1,ne=o[j];++pe<U;){var he=$[pe],_e=he.iteratee,Zt=he.type,Tt=_e(ne);if(Zt==cn)ne=Tt;else if(!Tt){if(Zt==Pn)continue e;break e}}te[H++]=ne}return te}me.prototype=qo(ic.prototype),me.prototype.constructor=me;function Ki(o){var u=-1,c=o==null?0:o.length;for(this.clear();++u<c;){var f=o[u];this.set(f[0],f[1])}}function VS(){this.__data__=rs?rs(null):{},this.size=0}function YS(o){var u=this.has(o)&&delete this.__data__[o];return this.size-=u?1:0,u}function GS(o){var u=this.__data__;if(rs){var c=u[o];return c===a?e:c}return we.call(u,o)?u[o]:e}function KS(o){var u=this.__data__;return rs?u[o]!==e:we.call(u,o)}function JS(o,u){var c=this.__data__;return this.size+=this.has(o)?0:1,c[o]=rs&&u===e?a:u,this}Ki.prototype.clear=VS,Ki.prototype.delete=YS,Ki.prototype.get=GS,Ki.prototype.has=KS,Ki.prototype.set=JS;function Ar(o){var u=-1,c=o==null?0:o.length;for(this.clear();++u<c;){var f=o[u];this.set(f[0],f[1])}}function QS(){this.__data__=[],this.size=0}function XS(o){var u=this.__data__,c=oc(u,o);if(c<0)return!1;var f=u.length-1;return c==f?u.pop():Xa.call(u,c,1),--this.size,!0}function ZS(o){var u=this.__data__,c=oc(u,o);return c<0?e:u[c][1]}function eP(o){return oc(this.__data__,o)>-1}function tP(o,u){var c=this.__data__,f=oc(c,o);return f<0?(++this.size,c.push([o,u])):c[f][1]=u,this}Ar.prototype.clear=QS,Ar.prototype.delete=XS,Ar.prototype.get=ZS,Ar.prototype.has=eP,Ar.prototype.set=tP;function Sr(o){var u=-1,c=o==null?0:o.length;for(this.clear();++u<c;){var f=o[u];this.set(f[0],f[1])}}function nP(){this.size=0,this.__data__={hash:new Ki,map:new(ts||Ar),string:new Ki}}function rP(o){var u=gc(this,o).delete(o);return this.size-=u?1:0,u}function iP(o){return gc(this,o).get(o)}function oP(o){return gc(this,o).has(o)}function uP(o,u){var c=gc(this,o),f=c.size;return c.set(o,u),this.size+=c.size==f?0:1,this}Sr.prototype.clear=nP,Sr.prototype.delete=rP,Sr.prototype.get=iP,Sr.prototype.has=oP,Sr.prototype.set=uP;function Ji(o){var u=-1,c=o==null?0:o.length;for(this.__data__=new Sr;++u<c;)this.add(o[u])}function sP(o){return this.__data__.set(o,a),this}function aP(o){return this.__data__.has(o)}Ji.prototype.add=Ji.prototype.push=sP,Ji.prototype.has=aP;function In(o){var u=this.__data__=new Ar(o);this.size=u.size}function cP(){this.__data__=new Ar,this.size=0}function lP(o){var u=this.__data__,c=u.delete(o);return this.size=u.size,c}function fP(o){return this.__data__.get(o)}function pP(o){return this.__data__.has(o)}function dP(o,u){var c=this.__data__;if(c instanceof Ar){var f=c.__data__;if(!ts||f.length<n-1)return f.push([o,u]),this.size=++c.size,this;c=this.__data__=new Sr(f)}return c.set(o,u),this.size=c.size,this}In.prototype.clear=cP,In.prototype.delete=lP,In.prototype.get=fP,In.prototype.has=pP,In.prototype.set=dP;function qg(o,u){var c=ae(o),f=!c&&to(o),g=!c&&!f&&pi(o),E=!c&&!f&&!g&&Vo(o),w=c||f||g||E,x=w?Ap(o.length,CS):[],P=x.length;for(var j in o)(u||we.call(o,j))&&!(w&&(j=="length"||g&&(j=="offset"||j=="parent")||E&&(j=="buffer"||j=="byteLength"||j=="byteOffset")||Ir(j,P)))&&x.push(j);return x}function Wg(o){var u=o.length;return u?o[Hp(0,u-1)]:e}function hP(o,u){return _c(Mt(o),Qi(u,0,o.length))}function DP(o){return _c(Mt(o))}function Rp(o,u,c){(c!==e&&!Bn(o[u],c)||c===e&&!(u in o))&&Pr(o,u,c)}function os(o,u,c){var f=o[u];(!(we.call(o,u)&&Bn(f,c))||c===e&&!(u in o))&&Pr(o,u,c)}function oc(o,u){for(var c=o.length;c--;)if(Bn(o[c][0],u))return c;return-1}function mP(o,u,c,f){return ai(o,function(g,E,w){u(f,g,c(g),w)}),f}function Hg(o,u){return o&&cr(u,ct(u),o)}function gP(o,u){return o&&cr(u,jt(u),o)}function Pr(o,u,c){u=="__proto__"&&Za?Za(o,u,{configurable:!0,enumerable:!0,value:c,writable:!0}):o[u]=c}function Mp(o,u){for(var c=-1,f=u.length,g=I(f),E=o==null;++c<f;)g[c]=E?e:Dd(o,u[c]);return g}function Qi(o,u,c){return o===o&&(c!==e&&(o=o<=c?o:c),u!==e&&(o=o>=u?o:u)),o}function mn(o,u,c,f,g,E){var w,x=u&h,P=u&m,j=u&_;if(c&&(w=g?c(o,f,g,E):c(o)),w!==e)return w;if(!He(o))return o;var $=ae(o);if($){if(w=oO(o),!x)return Mt(o,w)}else{var U=Ft(o),H=U==Io||U==xa;if(pi(o))return h_(o,x);if(U==On||U==Zr||H&&!g){if(w=P||H?{}:B_(o),!x)return P?GP(o,gP(w,o)):YP(o,Hg(w,o))}else{if(!Pe[U])return g?o:{};w=uO(o,U,x)}}E||(E=new In);var G=E.get(o);if(G)return G;E.set(o,w),ay(o)?o.forEach(function(ne){w.add(mn(ne,u,c,ne,o,E))}):uy(o)&&o.forEach(function(ne,he){w.set(he,mn(ne,u,c,he,o,E))});var te=j?P?td:ed:P?jt:ct,pe=$?e:te(o);return dn(pe||o,function(ne,he){pe&&(he=ne,ne=o[he]),os(w,he,mn(ne,u,c,he,o,E))}),w}function _P(o){var u=ct(o);return function(c){return zg(c,o,u)}}function zg(o,u,c){var f=c.length;if(o==null)return!f;for(o=Re(o);f--;){var g=c[f],E=u[g],w=o[g];if(w===e&&!(g in o)||!E(w))return!1}return!0}function Vg(o,u,c){if(typeof o!="function")throw new hn(i);return ps(function(){o.apply(e,c)},u)}function us(o,u,c,f){var g=-1,E=qa,w=!0,x=o.length,P=[],j=u.length;if(!x)return P;c&&(u=qe(u,Jt(c))),f?(E=Ep,w=!1):u.length>=n&&(E=Zu,w=!1,u=new Ji(u));e:for(;++g<x;){var $=o[g],U=c==null?$:c($);if($=f||$!==0?$:0,w&&U===U){for(var H=j;H--;)if(u[H]===U)continue e;P.push($)}else E(u,U,f)||P.push($)}return P}var ai=y_(ar),Yg=y_(jp,!0);function yP(o,u){var c=!0;return ai(o,function(f,g,E){return c=!!u(f,g,E),c}),c}function uc(o,u,c){for(var f=-1,g=o.length;++f<g;){var E=o[f],w=u(E);if(w!=null&&(x===e?w===w&&!Xt(w):c(w,x)))var x=w,P=E}return P}function FP(o,u,c,f){var g=o.length;for(c=le(c),c<0&&(c=-c>g?0:g+c),f=f===e||f>g?g:le(f),f<0&&(f+=g),f=c>f?0:ly(f);c<f;)o[c++]=u;return o}function Gg(o,u){var c=[];return ai(o,function(f,g,E){u(f,g,E)&&c.push(f)}),c}function Dt(o,u,c,f,g){var E=-1,w=o.length;for(c||(c=aO),g||(g=[]);++E<w;){var x=o[E];u>0&&c(x)?u>1?Dt(x,u-1,c,f,g):ii(g,x):f||(g[g.length]=x)}return g}var Np=F_(),Kg=F_(!0);function ar(o,u){return o&&Np(o,u,ct)}function jp(o,u){return o&&Kg(o,u,ct)}function sc(o,u){return ri(u,function(c){return Br(o[c])})}function Xi(o,u){u=li(u,o);for(var c=0,f=u.length;o!=null&&c<f;)o=o[lr(u[c++])];return c&&c==f?o:e}function Jg(o,u,c){var f=u(o);return ae(o)?f:ii(f,c(o))}function Pt(o){return o==null?o===e?Sa:$i:Gi&&Gi in Re(o)?nO(o):DO(o)}function $p(o,u){return o>u}function EP(o,u){return o!=null&&we.call(o,u)}function vP(o,u){return o!=null&&u in Re(o)}function CP(o,u,c){return o>=yt(u,c)&&o<it(u,c)}function Lp(o,u,c){for(var f=c?Ep:qa,g=o[0].length,E=o.length,w=E,x=I(E),P=1/0,j=[];w--;){var $=o[w];w&&u&&($=qe($,Jt(u))),P=yt($.length,P),x[w]=!c&&(u||g>=120&&$.length>=120)?new Ji(w&&$):e}$=o[0];var U=-1,H=x[0];e:for(;++U<g&&j.length<P;){var G=$[U],te=u?u(G):G;if(G=c||G!==0?G:0,!(H?Zu(H,te):f(j,te,c))){for(w=E;--w;){var pe=x[w];if(!(pe?Zu(pe,te):f(o[w],te,c)))continue e}H&&H.push(te),j.push(G)}}return j}function wP(o,u,c,f){return ar(o,function(g,E,w){u(f,c(g),E,w)}),f}function ss(o,u,c){u=li(u,o),o=j_(o,u);var f=o==null?o:o[lr(_n(u))];return f==null?e:Kt(f,o,c)}function Qg(o){return Ye(o)&&Pt(o)==Zr}function bP(o){return Ye(o)&&Pt(o)==or}function xP(o){return Ye(o)&&Pt(o)==Ni}function as(o,u,c,f,g){return o===u?!0:o==null||u==null||!Ye(o)&&!Ye(u)?o!==o&&u!==u:AP(o,u,c,f,as,g)}function AP(o,u,c,f,g,E){var w=ae(o),x=ae(u),P=w?ei:Ft(o),j=x?ei:Ft(u);P=P==Zr?On:P,j=j==Zr?On:j;var $=P==On,U=j==On,H=P==j;if(H&&pi(o)){if(!pi(u))return!1;w=!0,$=!1}if(H&&!$)return E||(E=new In),w||Vo(o)?O_(o,u,c,f,g,E):eO(o,u,P,c,f,g,E);if(!(c&C)){var G=$&&we.call(o,"__wrapped__"),te=U&&we.call(u,"__wrapped__");if(G||te){var pe=G?o.value():o,ne=te?u.value():u;return E||(E=new In),g(pe,ne,c,f,E)}}return H?(E||(E=new In),tO(o,u,c,f,g,E)):!1}function SP(o){return Ye(o)&&Ft(o)==zt}function Up(o,u,c,f){var g=c.length,E=g,w=!f;if(o==null)return!E;for(o=Re(o);g--;){var x=c[g];if(w&&x[2]?x[1]!==o[x[0]]:!(x[0]in o))return!1}for(;++g<E;){x=c[g];var P=x[0],j=o[P],$=x[1];if(w&&x[2]){if(j===e&&!(P in o))return!1}else{var U=new In;if(f)var H=f(j,$,P,o,u,U);if(!(H===e?as($,j,C|v,f,U):H))return!1}}return!0}function Xg(o){if(!He(o)||lO(o))return!1;var u=Br(o)?SS:cp;return u.test(eo(o))}function PP(o){return Ye(o)&&Pt(o)==Li}function OP(o){return Ye(o)&&Ft(o)==Vt}function TP(o){return Ye(o)&&wc(o.length)&&!!Se[Pt(o)]}function Zg(o){return typeof o=="function"?o:o==null?$t:typeof o=="object"?ae(o)?n_(o[0],o[1]):t_(o):Ey(o)}function kp(o){if(!fs(o))return RS(o);var u=[];for(var c in Re(o))we.call(o,c)&&c!="constructor"&&u.push(c);return u}function IP(o){if(!He(o))return hO(o);var u=fs(o),c=[];for(var f in o)f=="constructor"&&(u||!we.call(o,f))||c.push(f);return c}function qp(o,u){return o<u}function e_(o,u){var c=-1,f=Nt(o)?I(o.length):[];return ai(o,function(g,E,w){f[++c]=u(g,E,w)}),f}function t_(o){var u=rd(o);return u.length==1&&u[0][2]?M_(u[0][0],u[0][1]):function(c){return c===o||Up(c,o,u)}}function n_(o,u){return od(o)&&R_(u)?M_(lr(o),u):function(c){var f=Dd(c,o);return f===e&&f===u?md(c,o):as(u,f,C|v)}}function ac(o,u,c,f,g){o!==u&&Np(u,function(E,w){if(g||(g=new In),He(E))BP(o,u,w,c,ac,f,g);else{var x=f?f(sd(o,w),E,w+"",o,u,g):e;x===e&&(x=E),Rp(o,w,x)}},jt)}function BP(o,u,c,f,g,E,w){var x=sd(o,c),P=sd(u,c),j=w.get(P);if(j){Rp(o,c,j);return}var $=E?E(x,P,c+"",o,u,w):e,U=$===e;if(U){var H=ae(P),G=!H&&pi(P),te=!H&&!G&&Vo(P);$=P,H||G||te?ae(x)?$=x:Qe(x)?$=Mt(x):G?(U=!1,$=h_(P,!0)):te?(U=!1,$=D_(P,!0)):$=[]:ds(P)||to(P)?($=x,to(x)?$=fy(x):(!He(x)||Br(x))&&($=B_(P))):U=!1}U&&(w.set(P,$),g($,P,f,E,w),w.delete(P)),Rp(o,c,$)}function r_(o,u){var c=o.length;if(c)return u+=u<0?c:0,Ir(u,c)?o[u]:e}function i_(o,u,c){u.length?u=qe(u,function(E){return ae(E)?function(w){return Xi(w,E.length===1?E[0]:E)}:E}):u=[$t];var f=-1;u=qe(u,Jt(ee()));var g=e_(o,function(E,w,x){var P=qe(u,function(j){return j(E)});return{criteria:P,index:++f,value:E}});return uS(g,function(E,w){return VP(E,w,c)})}function RP(o,u){return o_(o,u,function(c,f){return md(o,f)})}function o_(o,u,c){for(var f=-1,g=u.length,E={};++f<g;){var w=u[f],x=Xi(o,w);c(x,w)&&cs(E,li(w,o),x)}return E}function MP(o){return function(u){return Xi(u,o)}}function Wp(o,u,c,f){var g=f?oS:No,E=-1,w=u.length,x=o;for(o===u&&(u=Mt(u)),c&&(x=qe(o,Jt(c)));++E<w;)for(var P=0,j=u[E],$=c?c(j):j;(P=g(x,$,P,f))>-1;)x!==o&&Xa.call(x,P,1),Xa.call(o,P,1);return o}function u_(o,u){for(var c=o?u.length:0,f=c-1;c--;){var g=u[c];if(c==f||g!==E){var E=g;Ir(g)?Xa.call(o,g,1):Yp(o,g)}}return o}function Hp(o,u){return o+tc(Ug()*(u-o+1))}function NP(o,u,c,f){for(var g=-1,E=it(ec((u-o)/(c||1)),0),w=I(E);E--;)w[f?E:++g]=o,o+=c;return w}function zp(o,u){var c="";if(!o||u<1||u>ir)return c;do u%2&&(c+=o),u=tc(u/2),u&&(o+=o);while(u);return c}function de(o,u){return ad(N_(o,u,$t),o+"")}function jP(o){return Wg(Yo(o))}function $P(o,u){var c=Yo(o);return _c(c,Qi(u,0,c.length))}function cs(o,u,c,f){if(!He(o))return o;u=li(u,o);for(var g=-1,E=u.length,w=E-1,x=o;x!=null&&++g<E;){var P=lr(u[g]),j=c;if(P==="__proto__"||P==="constructor"||P==="prototype")return o;if(g!=w){var $=x[P];j=f?f($,P,x):e,j===e&&(j=He($)?$:Ir(u[g+1])?[]:{})}os(x,P,j),x=x[P]}return o}var s_=nc?function(o,u){return nc.set(o,u),o}:$t,LP=Za?function(o,u){return Za(o,"toString",{configurable:!0,enumerable:!1,value:_d(u),writable:!0})}:$t;function UP(o){return _c(Yo(o))}function gn(o,u,c){var f=-1,g=o.length;u<0&&(u=-u>g?0:g+u),c=c>g?g:c,c<0&&(c+=g),g=u>c?0:c-u>>>0,u>>>=0;for(var E=I(g);++f<g;)E[f]=o[f+u];return E}function kP(o,u){var c;return ai(o,function(f,g,E){return c=u(f,g,E),!c}),!!c}function cc(o,u,c){var f=0,g=o==null?f:o.length;if(typeof u=="number"&&u===u&&g<=Xr){for(;f<g;){var E=f+g>>>1,w=o[E];w!==null&&!Xt(w)&&(c?w<=u:w<u)?f=E+1:g=E}return g}return Vp(o,u,$t,c)}function Vp(o,u,c,f){var g=0,E=o==null?0:o.length;if(E===0)return 0;u=c(u);for(var w=u!==u,x=u===null,P=Xt(u),j=u===e;g<E;){var $=tc((g+E)/2),U=c(o[$]),H=U!==e,G=U===null,te=U===U,pe=Xt(U);if(w)var ne=f||te;else j?ne=te&&(f||H):x?ne=te&&H&&(f||!G):P?ne=te&&H&&!G&&(f||!pe):G||pe?ne=!1:ne=f?U<=u:U<u;ne?g=$+1:E=$}return yt(E,kf)}function a_(o,u){for(var c=-1,f=o.length,g=0,E=[];++c<f;){var w=o[c],x=u?u(w):w;if(!c||!Bn(x,P)){var P=x;E[g++]=w===0?0:w}}return E}function c_(o){return typeof o=="number"?o:Xt(o)?Oo:+o}function Qt(o){if(typeof o=="string")return o;if(ae(o))return qe(o,Qt)+"";if(Xt(o))return kg?kg.call(o):"";var u=o+"";return u=="0"&&1/o==-Cr?"-0":u}function ci(o,u,c){var f=-1,g=qa,E=o.length,w=!0,x=[],P=x;if(c)w=!1,g=Ep;else if(E>=n){var j=u?null:XP(o);if(j)return Ha(j);w=!1,g=Zu,P=new Ji}else P=u?[]:x;e:for(;++f<E;){var $=o[f],U=u?u($):$;if($=c||$!==0?$:0,w&&U===U){for(var H=P.length;H--;)if(P[H]===U)continue e;u&&P.push(U),x.push($)}else g(P,U,c)||(P!==x&&P.push(U),x.push($))}return x}function Yp(o,u){u=li(u,o);var c=-1,f=u.length;if(!f)return!0;for(var g=o==null||typeof o!="object"&&typeof o!="function";++c<f;){var E=u[c];if(typeof E=="string"){if(E==="__proto__"&&!we.call(o,"__proto__"))return!1;if(E==="constructor"&&c+1<f&&typeof u[c+1]=="string"&&u[c+1]==="prototype"){if(g&&c===0)continue;return!1}}}var w=j_(o,u);return w==null||delete w[lr(_n(u))]}function l_(o,u,c,f){return cs(o,u,c(Xi(o,u)),f)}function lc(o,u,c,f){for(var g=o.length,E=f?g:-1;(f?E--:++E<g)&&u(o[E],E,o););return c?gn(o,f?0:E,f?E+1:g):gn(o,f?E+1:0,f?g:E)}function f_(o,u){var c=o;return c instanceof me&&(c=c.value()),vp(u,function(f,g){return g.func.apply(g.thisArg,ii([f],g.args))},c)}function Gp(o,u,c){var f=o.length;if(f<2)return f?ci(o[0]):[];for(var g=-1,E=I(f);++g<f;)for(var w=o[g],x=-1;++x<f;)x!=g&&(E[g]=us(E[g]||w,o[x],u,c));return ci(Dt(E,1),u,c)}function p_(o,u,c){for(var f=-1,g=o.length,E=u.length,w={};++f<g;){var x=f<E?u[f]:e;c(w,o[f],x)}return w}function Kp(o){return Qe(o)?o:[]}function Jp(o){return typeof o=="function"?o:$t}function li(o,u){return ae(o)?o:od(o,u)?[o]:k_(be(o))}var qP=de;function fi(o,u,c){var f=o.length;return c=c===e?f:c,!u&&c>=f?o:gn(o,u,c)}var d_=PS||function(o){return at.clearTimeout(o)};function h_(o,u){if(u)return o.slice();var c=o.length,f=Mg?Mg(c):new o.constructor(c);return o.copy(f),f}function Qp(o){var u=new o.constructor(o.byteLength);return new Ja(u).set(new Ja(o)),u}function WP(o,u){var c=u?Qp(o.buffer):o.buffer;return new o.constructor(c,o.byteOffset,o.byteLength)}function HP(o){var u=new o.constructor(o.source,Ba.exec(o));return u.lastIndex=o.lastIndex,u}function zP(o){return is?Re(is.call(o)):{}}function D_(o,u){var c=u?Qp(o.buffer):o.buffer;return new o.constructor(c,o.byteOffset,o.length)}function m_(o,u){if(o!==u){var c=o!==e,f=o===null,g=o===o,E=Xt(o),w=u!==e,x=u===null,P=u===u,j=Xt(u);if(!x&&!j&&!E&&o>u||E&&w&&P&&!x&&!j||f&&w&&P||!c&&P||!g)return 1;if(!f&&!E&&!j&&o<u||j&&c&&g&&!f&&!E||x&&c&&g||!w&&g||!P)return-1}return 0}function VP(o,u,c){for(var f=-1,g=o.criteria,E=u.criteria,w=g.length,x=c.length;++f<w;){var P=m_(g[f],E[f]);if(P){if(f>=x)return P;var j=c[f];return P*(j=="desc"?-1:1)}}return o.index-u.index}function g_(o,u,c,f){for(var g=-1,E=o.length,w=c.length,x=-1,P=u.length,j=it(E-w,0),$=I(P+j),U=!f;++x<P;)$[x]=u[x];for(;++g<w;)(U||g<E)&&($[c[g]]=o[g]);for(;j--;)$[x++]=o[g++];return $}function __(o,u,c,f){for(var g=-1,E=o.length,w=-1,x=c.length,P=-1,j=u.length,$=it(E-x,0),U=I($+j),H=!f;++g<$;)U[g]=o[g];for(var G=g;++P<j;)U[G+P]=u[P];for(;++w<x;)(H||g<E)&&(U[G+c[w]]=o[g++]);return U}function Mt(o,u){var c=-1,f=o.length;for(u||(u=I(f));++c<f;)u[c]=o[c];return u}function cr(o,u,c,f){var g=!c;c||(c={});for(var E=-1,w=u.length;++E<w;){var x=u[E],P=f?f(c[x],o[x],x,c,o):e;P===e&&(P=o[x]),g?Pr(c,x,P):os(c,x,P)}return c}function YP(o,u){return cr(o,id(o),u)}function GP(o,u){return cr(o,T_(o),u)}function fc(o,u){return function(c,f){var g=ae(c)?ZA:mP,E=u?u():{};return g(c,o,ee(f,2),E)}}function Wo(o){return de(function(u,c){var f=-1,g=c.length,E=g>1?c[g-1]:e,w=g>2?c[2]:e;for(E=o.length>3&&typeof E=="function"?(g--,E):e,w&&Ot(c[0],c[1],w)&&(E=g<3?e:E,g=1),u=Re(u);++f<g;){var x=c[f];x&&o(u,x,f,E)}return u})}function y_(o,u){return function(c,f){if(c==null)return c;if(!Nt(c))return o(c,f);for(var g=c.length,E=u?g:-1,w=Re(c);(u?E--:++E<g)&&f(w[E],E,w)!==!1;);return c}}function F_(o){return function(u,c,f){for(var g=-1,E=Re(u),w=f(u),x=w.length;x--;){var P=w[o?x:++g];if(c(E[P],P,E)===!1)break}return u}}function KP(o,u,c){var f=u&b,g=ls(o);function E(){var w=this&&this!==at&&this instanceof E?g:o;return w.apply(f?c:this,arguments)}return E}function E_(o){return function(u){u=be(u);var c=jo(u)?Tn(u):e,f=c?c[0]:u.charAt(0),g=c?fi(c,1).join(""):u.slice(1);return f[o]()+g}}function Ho(o){return function(u){return vp(yy(_y(u).replace(xr,"")),o,"")}}function ls(o){return function(){var u=arguments;switch(u.length){case 0:return new o;case 1:return new o(u[0]);case 2:return new o(u[0],u[1]);case 3:return new o(u[0],u[1],u[2]);case 4:return new o(u[0],u[1],u[2],u[3]);case 5:return new o(u[0],u[1],u[2],u[3],u[4]);case 6:return new o(u[0],u[1],u[2],u[3],u[4],u[5]);case 7:return new o(u[0],u[1],u[2],u[3],u[4],u[5],u[6])}var c=qo(o.prototype),f=o.apply(c,u);return He(f)?f:c}}function JP(o,u,c){var f=ls(o);function g(){for(var E=arguments.length,w=I(E),x=E,P=zo(g);x--;)w[x]=arguments[x];var j=E<3&&w[0]!==P&&w[E-1]!==P?[]:oi(w,P);if(E-=j.length,E<c)return x_(o,u,pc,g.placeholder,e,w,j,e,e,c-E);var $=this&&this!==at&&this instanceof g?f:o;return Kt($,this,w)}return g}function v_(o){return function(u,c,f){var g=Re(u);if(!Nt(u)){var E=ee(c,3);u=ct(u),c=function(x){return E(g[x],x,g)}}var w=o(u,c,f);return w>-1?g[E?u[w]:w]:e}}function C_(o){return Tr(function(u){var c=u.length,f=c,g=Dn.prototype.thru;for(o&&u.reverse();f--;){var E=u[f];if(typeof E!="function")throw new hn(i);if(g&&!w&&mc(E)=="wrapper")var w=new Dn([],!0)}for(f=w?f:c;++f<c;){E=u[f];var x=mc(E),P=x=="wrapper"?nd(E):e;P&&ud(P[0])&&P[1]==(X|T|q|fe)&&!P[4].length&&P[9]==1?w=w[mc(P[0])].apply(w,P[3]):w=E.length==1&&ud(E)?w[x]():w.thru(E)}return function(){var j=arguments,$=j[0];if(w&&j.length==1&&ae($))return w.plant($).value();for(var U=0,H=c?u[U].apply(this,j):$;++U<c;)H=u[U].call(this,H);return H}})}function pc(o,u,c,f,g,E,w,x,P,j){var $=u&X,U=u&b,H=u&A,G=u&(T|L),te=u&ye,pe=H?e:ls(o);function ne(){for(var he=arguments.length,_e=I(he),Zt=he;Zt--;)_e[Zt]=arguments[Zt];if(G)var Tt=zo(ne),en=aS(_e,Tt);if(f&&(_e=g_(_e,f,g,G)),E&&(_e=__(_e,E,w,G)),he-=en,G&&he<j){var Xe=oi(_e,Tt);return x_(o,u,pc,ne.placeholder,c,_e,Xe,x,P,j-he)}var Rn=U?c:this,Mr=H?Rn[o]:o;return he=_e.length,x?_e=mO(_e,x):te&&he>1&&_e.reverse(),$&&P<he&&(_e.length=P),this&&this!==at&&this instanceof ne&&(Mr=pe||ls(Mr)),Mr.apply(Rn,_e)}return ne}function w_(o,u){return function(c,f){return wP(c,o,u(f),{})}}function dc(o,u){return function(c,f){var g;if(c===e&&f===e)return u;if(c!==e&&(g=c),f!==e){if(g===e)return f;typeof c=="string"||typeof f=="string"?(c=Qt(c),f=Qt(f)):(c=c_(c),f=c_(f)),g=o(c,f)}return g}}function Xp(o){return Tr(function(u){return u=qe(u,Jt(ee())),de(function(c){var f=this;return o(u,function(g){return Kt(g,f,c)})})})}function hc(o,u){u=u===e?" ":Qt(u);var c=u.length;if(c<2)return c?zp(u,o):u;var f=zp(u,ec(o/$o(u)));return jo(u)?fi(Tn(f),0,o).join(""):f.slice(0,o)}function QP(o,u,c,f){var g=u&b,E=ls(o);function w(){for(var x=-1,P=arguments.length,j=-1,$=f.length,U=I($+P),H=this&&this!==at&&this instanceof w?E:o;++j<$;)U[j]=f[j];for(;P--;)U[j++]=arguments[++x];return Kt(H,g?c:this,U)}return w}function b_(o){return function(u,c,f){return f&&typeof f!="number"&&Ot(u,c,f)&&(c=f=e),u=Rr(u),c===e?(c=u,u=0):c=Rr(c),f=f===e?u<c?1:-1:Rr(f),NP(u,c,f,o)}}function Dc(o){return function(u,c){return typeof u=="string"&&typeof c=="string"||(u=yn(u),c=yn(c)),o(u,c)}}function x_(o,u,c,f,g,E,w,x,P,j){var $=u&T,U=$?w:e,H=$?e:w,G=$?E:e,te=$?e:E;u|=$?q:Q,u&=~($?Q:q),u&O||(u&=~(b|A));var pe=[o,u,g,G,U,te,H,x,P,j],ne=c.apply(e,pe);return ud(o)&&$_(ne,pe),ne.placeholder=f,L_(ne,o,u)}function Zp(o){var u=rt[o];return function(c,f){if(c=yn(c),f=f==null?0:yt(le(f),292),f&&Lg(c)){var g=(be(c)+"e").split("e"),E=u(g[0]+"e"+(+g[1]+f));return g=(be(E)+"e").split("e"),+(g[0]+"e"+(+g[1]-f))}return u(c)}}var XP=Uo&&1/Ha(new Uo([,-0]))[1]==Cr?function(o){return new Uo(o)}:Ed;function A_(o){return function(u){var c=Ft(u);return c==zt?Pp(u):c==Vt?DS(u):sS(u,o(u))}}function Or(o,u,c,f,g,E,w,x){var P=u&A;if(!P&&typeof o!="function")throw new hn(i);var j=f?f.length:0;if(j||(u&=~(q|Q),f=g=e),w=w===e?w:it(le(w),0),x=x===e?x:le(x),j-=g?g.length:0,u&Q){var $=f,U=g;f=g=e}var H=P?e:nd(o),G=[o,u,c,f,g,$,U,E,w,x];if(H&&dO(G,H),o=G[0],u=G[1],c=G[2],f=G[3],g=G[4],x=G[9]=G[9]===e?P?0:o.length:it(G[9]-j,0),!x&&u&(T|L)&&(u&=~(T|L)),!u||u==b)var te=KP(o,u,c);else u==T||u==L?te=JP(o,u,x):(u==q||u==(b|q))&&!g.length?te=QP(o,u,c,f):te=pc.apply(e,G);var pe=H?s_:$_;return L_(pe(te,G),o,u)}function S_(o,u,c,f){return o===e||Bn(o,Lo[c])&&!we.call(f,c)?u:o}function P_(o,u,c,f,g,E){return He(o)&&He(u)&&(E.set(u,o),ac(o,u,e,P_,E),E.delete(u)),o}function ZP(o){return ds(o)?e:o}function O_(o,u,c,f,g,E){var w=c&C,x=o.length,P=u.length;if(x!=P&&!(w&&P>x))return!1;var j=E.get(o),$=E.get(u);if(j&&$)return j==u&&$==o;var U=-1,H=!0,G=c&v?new Ji:e;for(E.set(o,u),E.set(u,o);++U<x;){var te=o[U],pe=u[U];if(f)var ne=w?f(pe,te,U,u,o,E):f(te,pe,U,o,u,E);if(ne!==e){if(ne)continue;H=!1;break}if(G){if(!Cp(u,function(he,_e){if(!Zu(G,_e)&&(te===he||g(te,he,c,f,E)))return G.push(_e)})){H=!1;break}}else if(!(te===pe||g(te,pe,c,f,E))){H=!1;break}}return E.delete(o),E.delete(u),H}function eO(o,u,c,f,g,E,w){switch(c){case Yt:if(o.byteLength!=u.byteLength||o.byteOffset!=u.byteOffset)return!1;o=o.buffer,u=u.buffer;case or:return!(o.byteLength!=u.byteLength||!E(new Ja(o),new Ja(u)));case br:case Ni:case ti:return Bn(+o,+u);case ji:return o.name==u.name&&o.message==u.message;case Li:case Ui:return o==u+"";case zt:var x=Pp;case Vt:var P=f&C;if(x||(x=Ha),o.size!=u.size&&!P)return!1;var j=w.get(o);if(j)return j==u;f|=v,w.set(o,u);var $=O_(x(o),x(u),f,g,E,w);return w.delete(o),$;case At:if(is)return is.call(o)==is.call(u)}return!1}function tO(o,u,c,f,g,E){var w=c&C,x=ed(o),P=x.length,j=ed(u),$=j.length;if(P!=$&&!w)return!1;for(var U=P;U--;){var H=x[U];if(!(w?H in u:we.call(u,H)))return!1}var G=E.get(o),te=E.get(u);if(G&&te)return G==u&&te==o;var pe=!0;E.set(o,u),E.set(u,o);for(var ne=w;++U<P;){H=x[U];var he=o[H],_e=u[H];if(f)var Zt=w?f(_e,he,H,u,o,E):f(he,_e,H,o,u,E);if(!(Zt===e?he===_e||g(he,_e,c,f,E):Zt)){pe=!1;break}ne||(ne=H=="constructor")}if(pe&&!ne){var Tt=o.constructor,en=u.constructor;Tt!=en&&"constructor"in o&&"constructor"in u&&!(typeof Tt=="function"&&Tt instanceof Tt&&typeof en=="function"&&en instanceof en)&&(pe=!1)}return E.delete(o),E.delete(u),pe}function Tr(o){return ad(N_(o,e,z_),o+"")}function ed(o){return Jg(o,ct,id)}function td(o){return Jg(o,jt,T_)}var nd=nc?function(o){return nc.get(o)}:Ed;function mc(o){for(var u=o.name+"",c=ko[u],f=we.call(ko,u)?c.length:0;f--;){var g=c[f],E=g.func;if(E==null||E==o)return g.name}return u}function zo(o){var u=we.call(y,"placeholder")?y:o;return u.placeholder}function ee(){var o=y.iteratee||yd;return o=o===yd?Zg:o,arguments.length?o(arguments[0],arguments[1]):o}function gc(o,u){var c=o.__data__;return cO(u)?c[typeof u=="string"?"string":"hash"]:c.map}function rd(o){for(var u=ct(o),c=u.length;c--;){var f=u[c],g=o[f];u[c]=[f,g,R_(g)]}return u}function Zi(o,u){var c=pS(o,u);return Xg(c)?c:e}function nO(o){var u=we.call(o,Gi),c=o[Gi];try{o[Gi]=e;var f=!0}catch{}var g=Ga.call(o);return f&&(u?o[Gi]=c:delete o[Gi]),g}var id=Tp?function(o){return o==null?[]:(o=Re(o),ri(Tp(o),function(u){return jg.call(o,u)}))}:vd,T_=Tp?function(o){for(var u=[];o;)ii(u,id(o)),o=Qa(o);return u}:vd,Ft=Pt;(Ip&&Ft(new Ip(new ArrayBuffer(1)))!=Yt||ts&&Ft(new ts)!=zt||Bp&&Ft(Bp.resolve())!=Aa||Uo&&Ft(new Uo)!=Vt||ns&&Ft(new ns)!=ki)&&(Ft=function(o){var u=Pt(o),c=u==On?o.constructor:e,f=c?eo(c):"";if(f)switch(f){case $S:return Yt;case LS:return zt;case US:return Aa;case kS:return Vt;case qS:return ki}return u});function rO(o,u,c){for(var f=-1,g=c.length;++f<g;){var E=c[f],w=E.size;switch(E.type){case"drop":o+=w;break;case"dropRight":u-=w;break;case"take":u=yt(u,o+w);break;case"takeRight":o=it(o,u-w);break}}return{start:o,end:u}}function iO(o){var u=o.match(tp);return u?u[1].split(np):[]}function I_(o,u,c){u=li(u,o);for(var f=-1,g=u.length,E=!1;++f<g;){var w=lr(u[f]);if(!(E=o!=null&&c(o,w)))break;o=o[w]}return E||++f!=g?E:(g=o==null?0:o.length,!!g&&wc(g)&&Ir(w,g)&&(ae(o)||to(o)))}function oO(o){var u=o.length,c=new o.constructor(u);return u&&typeof o[0]=="string"&&we.call(o,"index")&&(c.index=o.index,c.input=o.input),c}function B_(o){return typeof o.constructor=="function"&&!fs(o)?qo(Qa(o)):{}}function uO(o,u,c){var f=o.constructor;switch(u){case or:return Qp(o);case br:case Ni:return new f(+o);case Yt:return WP(o,c);case Nu:case ju:case $u:case Lu:case qi:case Uu:case ku:case Bo:case qu:return D_(o,c);case zt:return new f;case ti:case Ui:return new f(o);case Li:return HP(o);case Vt:return new f;case At:return zP(o)}}function sO(o,u){var c=u.length;if(!c)return o;var f=c-1;return u[f]=(c>1?"& ":"")+u[f],u=u.join(c>2?", ":" "),o.replace(ep,`{
|
|
9
|
+
/* [wrapped with `+u+`] */
|
|
10
|
+
`)}function aO(o){return ae(o)||to(o)||!!($g&&o&&o[$g])}function Ir(o,u){var c=typeof o;return u=u??ir,!!u&&(c=="number"||c!="symbol"&&fp.test(o))&&o>-1&&o%1==0&&o<u}function Ot(o,u,c){if(!He(c))return!1;var f=typeof u;return(f=="number"?Nt(c)&&Ir(u,c.length):f=="string"&&u in c)?Bn(c[u],o):!1}function od(o,u){if(ae(o))return!1;var c=typeof o;return c=="number"||c=="symbol"||c=="boolean"||o==null||Xt(o)?!0:Jf.test(o)||!Kf.test(o)||u!=null&&o in Re(u)}function cO(o){var u=typeof o;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?o!=="__proto__":o===null}function ud(o){var u=mc(o),c=y[u];if(typeof c!="function"||!(u in me.prototype))return!1;if(o===c)return!0;var f=nd(c);return!!f&&o===f[0]}function lO(o){return!!Rg&&Rg in o}var fO=Va?Br:Cd;function fs(o){var u=o&&o.constructor,c=typeof u=="function"&&u.prototype||Lo;return o===c}function R_(o){return o===o&&!He(o)}function M_(o,u){return function(c){return c==null?!1:c[o]===u&&(u!==e||o in Re(c))}}function pO(o){var u=vc(o,function(f){return c.size===l&&c.clear(),f}),c=u.cache;return u}function dO(o,u){var c=o[1],f=u[1],g=c|f,E=g<(b|A|X),w=f==X&&c==T||f==X&&c==fe&&o[7].length<=u[8]||f==(X|fe)&&u[7].length<=u[8]&&c==T;if(!(E||w))return o;f&b&&(o[2]=u[2],g|=c&b?0:O);var x=u[3];if(x){var P=o[3];o[3]=P?g_(P,x,u[4]):x,o[4]=P?oi(o[3],p):u[4]}return x=u[5],x&&(P=o[5],o[5]=P?__(P,x,u[6]):x,o[6]=P?oi(o[5],p):u[6]),x=u[7],x&&(o[7]=x),f&X&&(o[8]=o[8]==null?u[8]:yt(o[8],u[8])),o[9]==null&&(o[9]=u[9]),o[0]=u[0],o[1]=g,o}function hO(o){var u=[];if(o!=null)for(var c in Re(o))u.push(c);return u}function DO(o){return Ga.call(o)}function N_(o,u,c){return u=it(u===e?o.length-1:u,0),function(){for(var f=arguments,g=-1,E=it(f.length-u,0),w=I(E);++g<E;)w[g]=f[u+g];g=-1;for(var x=I(u+1);++g<u;)x[g]=f[g];return x[u]=c(w),Kt(o,this,x)}}function j_(o,u){return u.length<2?o:Xi(o,gn(u,0,-1))}function mO(o,u){for(var c=o.length,f=yt(u.length,c),g=Mt(o);f--;){var E=u[f];o[f]=Ir(E,c)?g[E]:e}return o}function sd(o,u){if(!(u==="constructor"&&typeof o[u]=="function")&&u!="__proto__")return o[u]}var $_=U_(s_),ps=TS||function(o,u){return at.setTimeout(o,u)},ad=U_(LP);function L_(o,u,c){var f=u+"";return ad(o,sO(f,gO(iO(f),c)))}function U_(o){var u=0,c=0;return function(){var f=MS(),g=dt-(f-c);if(c=f,g>0){if(++u>=rr)return arguments[0]}else u=0;return o.apply(e,arguments)}}function _c(o,u){var c=-1,f=o.length,g=f-1;for(u=u===e?f:u;++c<u;){var E=Hp(c,g),w=o[E];o[E]=o[c],o[c]=w}return o.length=u,o}var k_=pO(function(o){var u=[];return o.charCodeAt(0)===46&&u.push(""),o.replace(Qf,function(c,f,g,E){u.push(g?E.replace(op,"$1"):f||c)}),u});function lr(o){if(typeof o=="string"||Xt(o))return o;var u=o+"";return u=="0"&&1/o==-Cr?"-0":u}function eo(o){if(o!=null){try{return Ya.call(o)}catch{}try{return o+""}catch{}}return""}function gO(o,u){return dn(ba,function(c){var f="_."+c[0];u&c[1]&&!qa(o,f)&&o.push(f)}),o.sort()}function q_(o){if(o instanceof me)return o.clone();var u=new Dn(o.__wrapped__,o.__chain__);return u.__actions__=Mt(o.__actions__),u.__index__=o.__index__,u.__values__=o.__values__,u}function _O(o,u,c){(c?Ot(o,u,c):u===e)?u=1:u=it(le(u),0);var f=o==null?0:o.length;if(!f||u<1)return[];for(var g=0,E=0,w=I(ec(f/u));g<f;)w[E++]=gn(o,g,g+=u);return w}function yO(o){for(var u=-1,c=o==null?0:o.length,f=0,g=[];++u<c;){var E=o[u];E&&(g[f++]=E)}return g}function FO(){var o=arguments.length;if(!o)return[];for(var u=I(o-1),c=arguments[0],f=o;f--;)u[f-1]=arguments[f];return ii(ae(c)?Mt(c):[c],Dt(u,1))}var EO=de(function(o,u){return Qe(o)?us(o,Dt(u,1,Qe,!0)):[]}),vO=de(function(o,u){var c=_n(u);return Qe(c)&&(c=e),Qe(o)?us(o,Dt(u,1,Qe,!0),ee(c,2)):[]}),CO=de(function(o,u){var c=_n(u);return Qe(c)&&(c=e),Qe(o)?us(o,Dt(u,1,Qe,!0),e,c):[]});function wO(o,u,c){var f=o==null?0:o.length;return f?(u=c||u===e?1:le(u),gn(o,u<0?0:u,f)):[]}function bO(o,u,c){var f=o==null?0:o.length;return f?(u=c||u===e?1:le(u),u=f-u,gn(o,0,u<0?0:u)):[]}function xO(o,u){return o&&o.length?lc(o,ee(u,3),!0,!0):[]}function AO(o,u){return o&&o.length?lc(o,ee(u,3),!0):[]}function SO(o,u,c,f){var g=o==null?0:o.length;return g?(c&&typeof c!="number"&&Ot(o,u,c)&&(c=0,f=g),FP(o,u,c,f)):[]}function W_(o,u,c){var f=o==null?0:o.length;if(!f)return-1;var g=c==null?0:le(c);return g<0&&(g=it(f+g,0)),Wa(o,ee(u,3),g)}function H_(o,u,c){var f=o==null?0:o.length;if(!f)return-1;var g=f-1;return c!==e&&(g=le(c),g=c<0?it(f+g,0):yt(g,f-1)),Wa(o,ee(u,3),g,!0)}function z_(o){var u=o==null?0:o.length;return u?Dt(o,1):[]}function PO(o){var u=o==null?0:o.length;return u?Dt(o,Cr):[]}function OO(o,u){var c=o==null?0:o.length;return c?(u=u===e?1:le(u),Dt(o,u)):[]}function TO(o){for(var u=-1,c=o==null?0:o.length,f={};++u<c;){var g=o[u];f[g[0]]=g[1]}return f}function V_(o){return o&&o.length?o[0]:e}function IO(o,u,c){var f=o==null?0:o.length;if(!f)return-1;var g=c==null?0:le(c);return g<0&&(g=it(f+g,0)),No(o,u,g)}function BO(o){var u=o==null?0:o.length;return u?gn(o,0,-1):[]}var RO=de(function(o){var u=qe(o,Kp);return u.length&&u[0]===o[0]?Lp(u):[]}),MO=de(function(o){var u=_n(o),c=qe(o,Kp);return u===_n(c)?u=e:c.pop(),c.length&&c[0]===o[0]?Lp(c,ee(u,2)):[]}),NO=de(function(o){var u=_n(o),c=qe(o,Kp);return u=typeof u=="function"?u:e,u&&c.pop(),c.length&&c[0]===o[0]?Lp(c,e,u):[]});function jO(o,u){return o==null?"":BS.call(o,u)}function _n(o){var u=o==null?0:o.length;return u?o[u-1]:e}function $O(o,u,c){var f=o==null?0:o.length;if(!f)return-1;var g=f;return c!==e&&(g=le(c),g=g<0?it(f+g,0):yt(g,f-1)),u===u?gS(o,u,g):Wa(o,xg,g,!0)}function LO(o,u){return o&&o.length?r_(o,le(u)):e}var UO=de(Y_);function Y_(o,u){return o&&o.length&&u&&u.length?Wp(o,u):o}function kO(o,u,c){return o&&o.length&&u&&u.length?Wp(o,u,ee(c,2)):o}function qO(o,u,c){return o&&o.length&&u&&u.length?Wp(o,u,e,c):o}var WO=Tr(function(o,u){var c=o==null?0:o.length,f=Mp(o,u);return u_(o,qe(u,function(g){return Ir(g,c)?+g:g}).sort(m_)),f});function HO(o,u){var c=[];if(!(o&&o.length))return c;var f=-1,g=[],E=o.length;for(u=ee(u,3);++f<E;){var w=o[f];u(w,f,o)&&(c.push(w),g.push(f))}return u_(o,g),c}function cd(o){return o==null?o:jS.call(o)}function zO(o,u,c){var f=o==null?0:o.length;return f?(c&&typeof c!="number"&&Ot(o,u,c)?(u=0,c=f):(u=u==null?0:le(u),c=c===e?f:le(c)),gn(o,u,c)):[]}function VO(o,u){return cc(o,u)}function YO(o,u,c){return Vp(o,u,ee(c,2))}function GO(o,u){var c=o==null?0:o.length;if(c){var f=cc(o,u);if(f<c&&Bn(o[f],u))return f}return-1}function KO(o,u){return cc(o,u,!0)}function JO(o,u,c){return Vp(o,u,ee(c,2),!0)}function QO(o,u){var c=o==null?0:o.length;if(c){var f=cc(o,u,!0)-1;if(Bn(o[f],u))return f}return-1}function XO(o){return o&&o.length?a_(o):[]}function ZO(o,u){return o&&o.length?a_(o,ee(u,2)):[]}function eT(o){var u=o==null?0:o.length;return u?gn(o,1,u):[]}function tT(o,u,c){return o&&o.length?(u=c||u===e?1:le(u),gn(o,0,u<0?0:u)):[]}function nT(o,u,c){var f=o==null?0:o.length;return f?(u=c||u===e?1:le(u),u=f-u,gn(o,u<0?0:u,f)):[]}function rT(o,u){return o&&o.length?lc(o,ee(u,3),!1,!0):[]}function iT(o,u){return o&&o.length?lc(o,ee(u,3)):[]}var oT=de(function(o){return ci(Dt(o,1,Qe,!0))}),uT=de(function(o){var u=_n(o);return Qe(u)&&(u=e),ci(Dt(o,1,Qe,!0),ee(u,2))}),sT=de(function(o){var u=_n(o);return u=typeof u=="function"?u:e,ci(Dt(o,1,Qe,!0),e,u)});function aT(o){return o&&o.length?ci(o):[]}function cT(o,u){return o&&o.length?ci(o,ee(u,2)):[]}function lT(o,u){return u=typeof u=="function"?u:e,o&&o.length?ci(o,e,u):[]}function ld(o){if(!(o&&o.length))return[];var u=0;return o=ri(o,function(c){if(Qe(c))return u=it(c.length,u),!0}),Ap(u,function(c){return qe(o,wp(c))})}function G_(o,u){if(!(o&&o.length))return[];var c=ld(o);return u==null?c:qe(c,function(f){return Kt(u,e,f)})}var fT=de(function(o,u){return Qe(o)?us(o,u):[]}),pT=de(function(o){return Gp(ri(o,Qe))}),dT=de(function(o){var u=_n(o);return Qe(u)&&(u=e),Gp(ri(o,Qe),ee(u,2))}),hT=de(function(o){var u=_n(o);return u=typeof u=="function"?u:e,Gp(ri(o,Qe),e,u)}),DT=de(ld);function mT(o,u){return p_(o||[],u||[],os)}function gT(o,u){return p_(o||[],u||[],cs)}var _T=de(function(o){var u=o.length,c=u>1?o[u-1]:e;return c=typeof c=="function"?(o.pop(),c):e,G_(o,c)});function K_(o){var u=y(o);return u.__chain__=!0,u}function yT(o,u){return u(o),o}function yc(o,u){return u(o)}var FT=Tr(function(o){var u=o.length,c=u?o[0]:0,f=this.__wrapped__,g=function(E){return Mp(E,o)};return u>1||this.__actions__.length||!(f instanceof me)||!Ir(c)?this.thru(g):(f=f.slice(c,+c+(u?1:0)),f.__actions__.push({func:yc,args:[g],thisArg:e}),new Dn(f,this.__chain__).thru(function(E){return u&&!E.length&&E.push(e),E}))});function ET(){return K_(this)}function vT(){return new Dn(this.value(),this.__chain__)}function CT(){this.__values__===e&&(this.__values__=cy(this.value()));var o=this.__index__>=this.__values__.length,u=o?e:this.__values__[this.__index__++];return{done:o,value:u}}function wT(){return this}function bT(o){for(var u,c=this;c instanceof ic;){var f=q_(c);f.__index__=0,f.__values__=e,u?g.__wrapped__=f:u=f;var g=f;c=c.__wrapped__}return g.__wrapped__=o,u}function xT(){var o=this.__wrapped__;if(o instanceof me){var u=o;return this.__actions__.length&&(u=new me(this)),u=u.reverse(),u.__actions__.push({func:yc,args:[cd],thisArg:e}),new Dn(u,this.__chain__)}return this.thru(cd)}function AT(){return f_(this.__wrapped__,this.__actions__)}var ST=fc(function(o,u,c){we.call(o,c)?++o[c]:Pr(o,c,1)});function PT(o,u,c){var f=ae(o)?wg:yP;return c&&Ot(o,u,c)&&(u=e),f(o,ee(u,3))}function OT(o,u){var c=ae(o)?ri:Gg;return c(o,ee(u,3))}var TT=v_(W_),IT=v_(H_);function BT(o,u){return Dt(Fc(o,u),1)}function RT(o,u){return Dt(Fc(o,u),Cr)}function MT(o,u,c){return c=c===e?1:le(c),Dt(Fc(o,u),c)}function J_(o,u){var c=ae(o)?dn:ai;return c(o,ee(u,3))}function Q_(o,u){var c=ae(o)?eS:Yg;return c(o,ee(u,3))}var NT=fc(function(o,u,c){we.call(o,c)?o[c].push(u):Pr(o,c,[u])});function jT(o,u,c,f){o=Nt(o)?o:Yo(o),c=c&&!f?le(c):0;var g=o.length;return c<0&&(c=it(g+c,0)),bc(o)?c<=g&&o.indexOf(u,c)>-1:!!g&&No(o,u,c)>-1}var $T=de(function(o,u,c){var f=-1,g=typeof u=="function",E=Nt(o)?I(o.length):[];return ai(o,function(w){E[++f]=g?Kt(u,w,c):ss(w,u,c)}),E}),LT=fc(function(o,u,c){Pr(o,c,u)});function Fc(o,u){var c=ae(o)?qe:e_;return c(o,ee(u,3))}function UT(o,u,c,f){return o==null?[]:(ae(u)||(u=u==null?[]:[u]),c=f?e:c,ae(c)||(c=c==null?[]:[c]),i_(o,u,c))}var kT=fc(function(o,u,c){o[c?0:1].push(u)},function(){return[[],[]]});function qT(o,u,c){var f=ae(o)?vp:Sg,g=arguments.length<3;return f(o,ee(u,4),c,g,ai)}function WT(o,u,c){var f=ae(o)?tS:Sg,g=arguments.length<3;return f(o,ee(u,4),c,g,Yg)}function HT(o,u){var c=ae(o)?ri:Gg;return c(o,Cc(ee(u,3)))}function zT(o){var u=ae(o)?Wg:jP;return u(o)}function VT(o,u,c){(c?Ot(o,u,c):u===e)?u=1:u=le(u);var f=ae(o)?hP:$P;return f(o,u)}function YT(o){var u=ae(o)?DP:UP;return u(o)}function GT(o){if(o==null)return 0;if(Nt(o))return bc(o)?$o(o):o.length;var u=Ft(o);return u==zt||u==Vt?o.size:kp(o).length}function KT(o,u,c){var f=ae(o)?Cp:kP;return c&&Ot(o,u,c)&&(u=e),f(o,ee(u,3))}var JT=de(function(o,u){if(o==null)return[];var c=u.length;return c>1&&Ot(o,u[0],u[1])?u=[]:c>2&&Ot(u[0],u[1],u[2])&&(u=[u[0]]),i_(o,Dt(u,1),[])}),Ec=OS||function(){return at.Date.now()};function QT(o,u){if(typeof u!="function")throw new hn(i);return o=le(o),function(){if(--o<1)return u.apply(this,arguments)}}function X_(o,u,c){return u=c?e:u,u=o&&u==null?o.length:u,Or(o,X,e,e,e,e,u)}function Z_(o,u){var c;if(typeof u!="function")throw new hn(i);return o=le(o),function(){return--o>0&&(c=u.apply(this,arguments)),o<=1&&(u=e),c}}var fd=de(function(o,u,c){var f=b;if(c.length){var g=oi(c,zo(fd));f|=q}return Or(o,f,u,c,g)}),ey=de(function(o,u,c){var f=b|A;if(c.length){var g=oi(c,zo(ey));f|=q}return Or(u,f,o,c,g)});function ty(o,u,c){u=c?e:u;var f=Or(o,T,e,e,e,e,e,u);return f.placeholder=ty.placeholder,f}function ny(o,u,c){u=c?e:u;var f=Or(o,L,e,e,e,e,e,u);return f.placeholder=ny.placeholder,f}function ry(o,u,c){var f,g,E,w,x,P,j=0,$=!1,U=!1,H=!0;if(typeof o!="function")throw new hn(i);u=yn(u)||0,He(c)&&($=!!c.leading,U="maxWait"in c,E=U?it(yn(c.maxWait)||0,u):E,H="trailing"in c?!!c.trailing:H);function G(Xe){var Rn=f,Mr=g;return f=g=e,j=Xe,w=o.apply(Mr,Rn),w}function te(Xe){return j=Xe,x=ps(he,u),$?G(Xe):w}function pe(Xe){var Rn=Xe-P,Mr=Xe-j,vy=u-Rn;return U?yt(vy,E-Mr):vy}function ne(Xe){var Rn=Xe-P,Mr=Xe-j;return P===e||Rn>=u||Rn<0||U&&Mr>=E}function he(){var Xe=Ec();if(ne(Xe))return _e(Xe);x=ps(he,pe(Xe))}function _e(Xe){return x=e,H&&f?G(Xe):(f=g=e,w)}function Zt(){x!==e&&d_(x),j=0,f=P=g=x=e}function Tt(){return x===e?w:_e(Ec())}function en(){var Xe=Ec(),Rn=ne(Xe);if(f=arguments,g=this,P=Xe,Rn){if(x===e)return te(P);if(U)return d_(x),x=ps(he,u),G(P)}return x===e&&(x=ps(he,u)),w}return en.cancel=Zt,en.flush=Tt,en}var XT=de(function(o,u){return Vg(o,1,u)}),ZT=de(function(o,u,c){return Vg(o,yn(u)||0,c)});function e3(o){return Or(o,ye)}function vc(o,u){if(typeof o!="function"||u!=null&&typeof u!="function")throw new hn(i);var c=function(){var f=arguments,g=u?u.apply(this,f):f[0],E=c.cache;if(E.has(g))return E.get(g);var w=o.apply(this,f);return c.cache=E.set(g,w)||E,w};return c.cache=new(vc.Cache||Sr),c}vc.Cache=Sr;function Cc(o){if(typeof o!="function")throw new hn(i);return function(){var u=arguments;switch(u.length){case 0:return!o.call(this);case 1:return!o.call(this,u[0]);case 2:return!o.call(this,u[0],u[1]);case 3:return!o.call(this,u[0],u[1],u[2])}return!o.apply(this,u)}}function t3(o){return Z_(2,o)}var n3=qP(function(o,u){u=u.length==1&&ae(u[0])?qe(u[0],Jt(ee())):qe(Dt(u,1),Jt(ee()));var c=u.length;return de(function(f){for(var g=-1,E=yt(f.length,c);++g<E;)f[g]=u[g].call(this,f[g]);return Kt(o,this,f)})}),pd=de(function(o,u){var c=oi(u,zo(pd));return Or(o,q,e,u,c)}),iy=de(function(o,u){var c=oi(u,zo(iy));return Or(o,Q,e,u,c)}),r3=Tr(function(o,u){return Or(o,fe,e,e,e,u)});function i3(o,u){if(typeof o!="function")throw new hn(i);return u=u===e?u:le(u),de(o,u)}function o3(o,u){if(typeof o!="function")throw new hn(i);return u=u==null?0:it(le(u),0),de(function(c){var f=c[u],g=fi(c,0,u);return f&&ii(g,f),Kt(o,this,g)})}function u3(o,u,c){var f=!0,g=!0;if(typeof o!="function")throw new hn(i);return He(c)&&(f="leading"in c?!!c.leading:f,g="trailing"in c?!!c.trailing:g),ry(o,u,{leading:f,maxWait:u,trailing:g})}function s3(o){return X_(o,1)}function a3(o,u){return pd(Jp(u),o)}function c3(){if(!arguments.length)return[];var o=arguments[0];return ae(o)?o:[o]}function l3(o){return mn(o,_)}function f3(o,u){return u=typeof u=="function"?u:e,mn(o,_,u)}function p3(o){return mn(o,h|_)}function d3(o,u){return u=typeof u=="function"?u:e,mn(o,h|_,u)}function h3(o,u){return u==null||zg(o,u,ct(u))}function Bn(o,u){return o===u||o!==o&&u!==u}var D3=Dc($p),m3=Dc(function(o,u){return o>=u}),to=Qg((function(){return arguments})())?Qg:function(o){return Ye(o)&&we.call(o,"callee")&&!jg.call(o,"callee")},ae=I.isArray,g3=_g?Jt(_g):bP;function Nt(o){return o!=null&&wc(o.length)&&!Br(o)}function Qe(o){return Ye(o)&&Nt(o)}function _3(o){return o===!0||o===!1||Ye(o)&&Pt(o)==br}var pi=IS||Cd,y3=yg?Jt(yg):xP;function F3(o){return Ye(o)&&o.nodeType===1&&!ds(o)}function E3(o){if(o==null)return!0;if(Nt(o)&&(ae(o)||typeof o=="string"||typeof o.splice=="function"||pi(o)||Vo(o)||to(o)))return!o.length;var u=Ft(o);if(u==zt||u==Vt)return!o.size;if(fs(o))return!kp(o).length;for(var c in o)if(we.call(o,c))return!1;return!0}function v3(o,u){return as(o,u)}function C3(o,u,c){c=typeof c=="function"?c:e;var f=c?c(o,u):e;return f===e?as(o,u,e,c):!!f}function dd(o){if(!Ye(o))return!1;var u=Pt(o);return u==ji||u==qf||typeof o.message=="string"&&typeof o.name=="string"&&!ds(o)}function w3(o){return typeof o=="number"&&Lg(o)}function Br(o){if(!He(o))return!1;var u=Pt(o);return u==Io||u==xa||u==To||u==Wf}function oy(o){return typeof o=="number"&&o==le(o)}function wc(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=ir}function He(o){var u=typeof o;return o!=null&&(u=="object"||u=="function")}function Ye(o){return o!=null&&typeof o=="object"}var uy=Fg?Jt(Fg):SP;function b3(o,u){return o===u||Up(o,u,rd(u))}function x3(o,u,c){return c=typeof c=="function"?c:e,Up(o,u,rd(u),c)}function A3(o){return sy(o)&&o!=+o}function S3(o){if(fO(o))throw new se(r);return Xg(o)}function P3(o){return o===null}function O3(o){return o==null}function sy(o){return typeof o=="number"||Ye(o)&&Pt(o)==ti}function ds(o){if(!Ye(o)||Pt(o)!=On)return!1;var u=Qa(o);if(u===null)return!0;var c=we.call(u,"constructor")&&u.constructor;return typeof c=="function"&&c instanceof c&&Ya.call(c)==xS}var hd=Eg?Jt(Eg):PP;function T3(o){return oy(o)&&o>=-ir&&o<=ir}var ay=vg?Jt(vg):OP;function bc(o){return typeof o=="string"||!ae(o)&&Ye(o)&&Pt(o)==Ui}function Xt(o){return typeof o=="symbol"||Ye(o)&&Pt(o)==At}var Vo=Cg?Jt(Cg):TP;function I3(o){return o===e}function B3(o){return Ye(o)&&Ft(o)==ki}function R3(o){return Ye(o)&&Pt(o)==Hf}var M3=Dc(qp),N3=Dc(function(o,u){return o<=u});function cy(o){if(!o)return[];if(Nt(o))return bc(o)?Tn(o):Mt(o);if(es&&o[es])return hS(o[es]());var u=Ft(o),c=u==zt?Pp:u==Vt?Ha:Yo;return c(o)}function Rr(o){if(!o)return o===0?o:0;if(o=yn(o),o===Cr||o===-Cr){var u=o<0?-1:1;return u*wr}return o===o?o:0}function le(o){var u=Rr(o),c=u%1;return u===u?c?u-c:u:0}function ly(o){return o?Qi(le(o),0,ln):0}function yn(o){if(typeof o=="number")return o;if(Xt(o))return Oo;if(He(o)){var u=typeof o.valueOf=="function"?o.valueOf():o;o=He(u)?u+"":u}if(typeof o!="string")return o===0?o:+o;o=Pg(o);var c=ap.test(o);return c||lp.test(o)?QA(o.slice(2),c?2:8):sp.test(o)?Oo:+o}function fy(o){return cr(o,jt(o))}function j3(o){return o?Qi(le(o),-ir,ir):o===0?o:0}function be(o){return o==null?"":Qt(o)}var $3=Wo(function(o,u){if(fs(u)||Nt(u)){cr(u,ct(u),o);return}for(var c in u)we.call(u,c)&&os(o,c,u[c])}),py=Wo(function(o,u){cr(u,jt(u),o)}),xc=Wo(function(o,u,c,f){cr(u,jt(u),o,f)}),L3=Wo(function(o,u,c,f){cr(u,ct(u),o,f)}),U3=Tr(Mp);function k3(o,u){var c=qo(o);return u==null?c:Hg(c,u)}var q3=de(function(o,u){o=Re(o);var c=-1,f=u.length,g=f>2?u[2]:e;for(g&&Ot(u[0],u[1],g)&&(f=1);++c<f;)for(var E=u[c],w=jt(E),x=-1,P=w.length;++x<P;){var j=w[x],$=o[j];($===e||Bn($,Lo[j])&&!we.call(o,j))&&(o[j]=E[j])}return o}),W3=de(function(o){return o.push(e,P_),Kt(dy,e,o)});function H3(o,u){return bg(o,ee(u,3),ar)}function z3(o,u){return bg(o,ee(u,3),jp)}function V3(o,u){return o==null?o:Np(o,ee(u,3),jt)}function Y3(o,u){return o==null?o:Kg(o,ee(u,3),jt)}function G3(o,u){return o&&ar(o,ee(u,3))}function K3(o,u){return o&&jp(o,ee(u,3))}function J3(o){return o==null?[]:sc(o,ct(o))}function Q3(o){return o==null?[]:sc(o,jt(o))}function Dd(o,u,c){var f=o==null?e:Xi(o,u);return f===e?c:f}function X3(o,u){return o!=null&&I_(o,u,EP)}function md(o,u){return o!=null&&I_(o,u,vP)}var Z3=w_(function(o,u,c){u!=null&&typeof u.toString!="function"&&(u=Ga.call(u)),o[u]=c},_d($t)),eI=w_(function(o,u,c){u!=null&&typeof u.toString!="function"&&(u=Ga.call(u)),we.call(o,u)?o[u].push(c):o[u]=[c]},ee),tI=de(ss);function ct(o){return Nt(o)?qg(o):kp(o)}function jt(o){return Nt(o)?qg(o,!0):IP(o)}function nI(o,u){var c={};return u=ee(u,3),ar(o,function(f,g,E){Pr(c,u(f,g,E),f)}),c}function rI(o,u){var c={};return u=ee(u,3),ar(o,function(f,g,E){Pr(c,g,u(f,g,E))}),c}var iI=Wo(function(o,u,c){ac(o,u,c)}),dy=Wo(function(o,u,c,f){ac(o,u,c,f)}),oI=Tr(function(o,u){var c={};if(o==null)return c;var f=!1;u=qe(u,function(E){return E=li(E,o),f||(f=E.length>1),E}),cr(o,td(o),c),f&&(c=mn(c,h|m|_,ZP));for(var g=u.length;g--;)Yp(c,u[g]);return c});function uI(o,u){return hy(o,Cc(ee(u)))}var sI=Tr(function(o,u){return o==null?{}:RP(o,u)});function hy(o,u){if(o==null)return{};var c=qe(td(o),function(f){return[f]});return u=ee(u),o_(o,c,function(f,g){return u(f,g[0])})}function aI(o,u,c){u=li(u,o);var f=-1,g=u.length;for(g||(g=1,o=e);++f<g;){var E=o==null?e:o[lr(u[f])];E===e&&(f=g,E=c),o=Br(E)?E.call(o):E}return o}function cI(o,u,c){return o==null?o:cs(o,u,c)}function lI(o,u,c,f){return f=typeof f=="function"?f:e,o==null?o:cs(o,u,c,f)}var Dy=A_(ct),my=A_(jt);function fI(o,u,c){var f=ae(o),g=f||pi(o)||Vo(o);if(u=ee(u,4),c==null){var E=o&&o.constructor;g?c=f?new E:[]:He(o)?c=Br(E)?qo(Qa(o)):{}:c={}}return(g?dn:ar)(o,function(w,x,P){return u(c,w,x,P)}),c}function pI(o,u){return o==null?!0:Yp(o,u)}function dI(o,u,c){return o==null?o:l_(o,u,Jp(c))}function hI(o,u,c,f){return f=typeof f=="function"?f:e,o==null?o:l_(o,u,Jp(c),f)}function Yo(o){return o==null?[]:Sp(o,ct(o))}function DI(o){return o==null?[]:Sp(o,jt(o))}function mI(o,u,c){return c===e&&(c=u,u=e),c!==e&&(c=yn(c),c=c===c?c:0),u!==e&&(u=yn(u),u=u===u?u:0),Qi(yn(o),u,c)}function gI(o,u,c){return u=Rr(u),c===e?(c=u,u=0):c=Rr(c),o=yn(o),CP(o,u,c)}function _I(o,u,c){if(c&&typeof c!="boolean"&&Ot(o,u,c)&&(u=c=e),c===e&&(typeof u=="boolean"?(c=u,u=e):typeof o=="boolean"&&(c=o,o=e)),o===e&&u===e?(o=0,u=1):(o=Rr(o),u===e?(u=o,o=0):u=Rr(u)),o>u){var f=o;o=u,u=f}if(c||o%1||u%1){var g=Ug();return yt(o+g*(u-o+JA("1e-"+((g+"").length-1))),u)}return Hp(o,u)}var yI=Ho(function(o,u,c){return u=u.toLowerCase(),o+(c?gy(u):u)});function gy(o){return gd(be(o).toLowerCase())}function _y(o){return o=be(o),o&&o.replace(Ra,cS).replace(ni,"")}function FI(o,u,c){o=be(o),u=Qt(u);var f=o.length;c=c===e?f:Qi(le(c),0,f);var g=c;return c-=u.length,c>=0&&o.slice(c,g)==u}function EI(o){return o=be(o),o&&Wu.test(o)?o.replace(Ta,lS):o}function vI(o){return o=be(o),o&&Xf.test(o)?o.replace(zu,"\\$&"):o}var CI=Ho(function(o,u,c){return o+(c?"-":"")+u.toLowerCase()}),wI=Ho(function(o,u,c){return o+(c?" ":"")+u.toLowerCase()}),bI=E_("toLowerCase");function xI(o,u,c){o=be(o),u=le(u);var f=u?$o(o):0;if(!u||f>=u)return o;var g=(u-f)/2;return hc(tc(g),c)+o+hc(ec(g),c)}function AI(o,u,c){o=be(o),u=le(u);var f=u?$o(o):0;return u&&f<u?o+hc(u-f,c):o}function SI(o,u,c){o=be(o),u=le(u);var f=u?$o(o):0;return u&&f<u?hc(u-f,c)+o:o}function PI(o,u,c){return c||u==null?u=0:u&&(u=+u),NS(be(o).replace(Vu,""),u||0)}function OI(o,u,c){return(c?Ot(o,u,c):u===e)?u=1:u=le(u),zp(be(o),u)}function TI(){var o=arguments,u=be(o[0]);return o.length<3?u:u.replace(o[1],o[2])}var II=Ho(function(o,u,c){return o+(c?"_":"")+u.toLowerCase()});function BI(o,u,c){return c&&typeof c!="number"&&Ot(o,u,c)&&(u=c=e),c=c===e?ln:c>>>0,c?(o=be(o),o&&(typeof u=="string"||u!=null&&!hd(u))&&(u=Qt(u),!u&&jo(o))?fi(Tn(o),0,c):o.split(u,c)):[]}var RI=Ho(function(o,u,c){return o+(c?" ":"")+gd(u)});function MI(o,u,c){return o=be(o),c=c==null?0:Qi(le(c),0,o.length),u=Qt(u),o.slice(c,c+u.length)==u}function NI(o,u,c){var f=y.templateSettings;c&&Ot(o,u,c)&&(u=e),o=be(o),u=xc({},u,f,S_);var g=xc({},u.imports,f.imports,S_),E=ct(g),w=Sp(g,E),x,P,j=0,$=u.interpolate||Wi,U="__p += '",H=Op((u.escape||Wi).source+"|"+$.source+"|"+($===Hu?up:Wi).source+"|"+(u.evaluate||Wi).source+"|$","g"),G="//# sourceURL="+(we.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ka+"]")+`
|
|
11
|
+
`;o.replace(H,function(ne,he,_e,Zt,Tt,en){return _e||(_e=Zt),U+=o.slice(j,en).replace(Ma,fS),he&&(x=!0,U+=`' +
|
|
12
|
+
__e(`+he+`) +
|
|
13
|
+
'`),Tt&&(P=!0,U+=`';
|
|
14
|
+
`+Tt+`;
|
|
15
|
+
__p += '`),_e&&(U+=`' +
|
|
16
|
+
((__t = (`+_e+`)) == null ? '' : __t) +
|
|
17
|
+
'`),j=en+ne.length,ne}),U+=`';
|
|
18
|
+
`;var te=we.call(u,"variable")&&u.variable;if(!te)U=`with (obj) {
|
|
19
|
+
`+U+`
|
|
20
|
+
}
|
|
21
|
+
`;else if(ip.test(te))throw new se(s);U=(P?U.replace(zf,""):U).replace(Vf,"$1").replace(Pa,"$1;"),U="function("+(te||"obj")+`) {
|
|
22
|
+
`+(te?"":`obj || (obj = {});
|
|
23
|
+
`)+"var __t, __p = ''"+(x?", __e = _.escape":"")+(P?`, __j = Array.prototype.join;
|
|
24
|
+
function print() { __p += __j.call(arguments, '') }
|
|
25
|
+
`:`;
|
|
26
|
+
`)+U+`return __p
|
|
27
|
+
}`;var pe=Fy(function(){return ve(E,G+"return "+U).apply(e,w)});if(pe.source=U,dd(pe))throw pe;return pe}function jI(o){return be(o).toLowerCase()}function $I(o){return be(o).toUpperCase()}function LI(o,u,c){if(o=be(o),o&&(c||u===e))return Pg(o);if(!o||!(u=Qt(u)))return o;var f=Tn(o),g=Tn(u),E=Og(f,g),w=Tg(f,g)+1;return fi(f,E,w).join("")}function UI(o,u,c){if(o=be(o),o&&(c||u===e))return o.slice(0,Bg(o)+1);if(!o||!(u=Qt(u)))return o;var f=Tn(o),g=Tg(f,Tn(u))+1;return fi(f,0,g).join("")}function kI(o,u,c){if(o=be(o),o&&(c||u===e))return o.replace(Vu,"");if(!o||!(u=Qt(u)))return o;var f=Tn(o),g=Og(f,Tn(u));return fi(f,g).join("")}function qI(o,u){var c=We,f=mt;if(He(u)){var g="separator"in u?u.separator:g;c="length"in u?le(u.length):c,f="omission"in u?Qt(u.omission):f}o=be(o);var E=o.length;if(jo(o)){var w=Tn(o);E=w.length}if(c>=E)return o;var x=c-$o(f);if(x<1)return f;var P=w?fi(w,0,x).join(""):o.slice(0,x);if(g===e)return P+f;if(w&&(x+=P.length-x),hd(g)){if(o.slice(x).search(g)){var j,$=P;for(g.global||(g=Op(g.source,be(Ba.exec(g))+"g")),g.lastIndex=0;j=g.exec($);)var U=j.index;P=P.slice(0,U===e?x:U)}}else if(o.indexOf(Qt(g),x)!=x){var H=P.lastIndexOf(g);H>-1&&(P=P.slice(0,H))}return P+f}function WI(o){return o=be(o),o&&Yf.test(o)?o.replace(Oa,_S):o}var HI=Ho(function(o,u,c){return o+(c?" ":"")+u.toUpperCase()}),gd=E_("toUpperCase");function yy(o,u,c){return o=be(o),u=c?e:u,u===e?dS(o)?ES(o):iS(o):o.match(u)||[]}var Fy=de(function(o,u){try{return Kt(o,e,u)}catch(c){return dd(c)?c:new se(c)}}),zI=Tr(function(o,u){return dn(u,function(c){c=lr(c),Pr(o,c,fd(o[c],o))}),o});function VI(o){var u=o==null?0:o.length,c=ee();return o=u?qe(o,function(f){if(typeof f[1]!="function")throw new hn(i);return[c(f[0]),f[1]]}):[],de(function(f){for(var g=-1;++g<u;){var E=o[g];if(Kt(E[0],this,f))return Kt(E[1],this,f)}})}function YI(o){return _P(mn(o,h))}function _d(o){return function(){return o}}function GI(o,u){return o==null||o!==o?u:o}var KI=C_(),JI=C_(!0);function $t(o){return o}function yd(o){return Zg(typeof o=="function"?o:mn(o,h))}function QI(o){return t_(mn(o,h))}function XI(o,u){return n_(o,mn(u,h))}var ZI=de(function(o,u){return function(c){return ss(c,o,u)}}),eB=de(function(o,u){return function(c){return ss(o,c,u)}});function Fd(o,u,c){var f=ct(u),g=sc(u,f);c==null&&!(He(u)&&(g.length||!f.length))&&(c=u,u=o,o=this,g=sc(u,ct(u)));var E=!(He(c)&&"chain"in c)||!!c.chain,w=Br(o);return dn(g,function(x){var P=u[x];o[x]=P,w&&(o.prototype[x]=function(){var j=this.__chain__;if(E||j){var $=o(this.__wrapped__),U=$.__actions__=Mt(this.__actions__);return U.push({func:P,args:arguments,thisArg:o}),$.__chain__=j,$}return P.apply(o,ii([this.value()],arguments))})}),o}function tB(){return at._===this&&(at._=AS),this}function Ed(){}function nB(o){return o=le(o),de(function(u){return r_(u,o)})}var rB=Xp(qe),iB=Xp(wg),oB=Xp(Cp);function Ey(o){return od(o)?wp(lr(o)):MP(o)}function uB(o){return function(u){return o==null?e:Xi(o,u)}}var sB=b_(),aB=b_(!0);function vd(){return[]}function Cd(){return!1}function cB(){return{}}function lB(){return""}function fB(){return!0}function pB(o,u){if(o=le(o),o<1||o>ir)return[];var c=ln,f=yt(o,ln);u=ee(u),o-=ln;for(var g=Ap(f,u);++c<o;)u(c);return g}function dB(o){return ae(o)?qe(o,lr):Xt(o)?[o]:Mt(k_(be(o)))}function hB(o){var u=++bS;return be(o)+u}var DB=dc(function(o,u){return o+u},0),mB=Zp("ceil"),gB=dc(function(o,u){return o/u},1),_B=Zp("floor");function yB(o){return o&&o.length?uc(o,$t,$p):e}function FB(o,u){return o&&o.length?uc(o,ee(u,2),$p):e}function EB(o){return Ag(o,$t)}function vB(o,u){return Ag(o,ee(u,2))}function CB(o){return o&&o.length?uc(o,$t,qp):e}function wB(o,u){return o&&o.length?uc(o,ee(u,2),qp):e}var bB=dc(function(o,u){return o*u},1),xB=Zp("round"),AB=dc(function(o,u){return o-u},0);function SB(o){return o&&o.length?xp(o,$t):0}function PB(o,u){return o&&o.length?xp(o,ee(u,2)):0}return y.after=QT,y.ary=X_,y.assign=$3,y.assignIn=py,y.assignInWith=xc,y.assignWith=L3,y.at=U3,y.before=Z_,y.bind=fd,y.bindAll=zI,y.bindKey=ey,y.castArray=c3,y.chain=K_,y.chunk=_O,y.compact=yO,y.concat=FO,y.cond=VI,y.conforms=YI,y.constant=_d,y.countBy=ST,y.create=k3,y.curry=ty,y.curryRight=ny,y.debounce=ry,y.defaults=q3,y.defaultsDeep=W3,y.defer=XT,y.delay=ZT,y.difference=EO,y.differenceBy=vO,y.differenceWith=CO,y.drop=wO,y.dropRight=bO,y.dropRightWhile=xO,y.dropWhile=AO,y.fill=SO,y.filter=OT,y.flatMap=BT,y.flatMapDeep=RT,y.flatMapDepth=MT,y.flatten=z_,y.flattenDeep=PO,y.flattenDepth=OO,y.flip=e3,y.flow=KI,y.flowRight=JI,y.fromPairs=TO,y.functions=J3,y.functionsIn=Q3,y.groupBy=NT,y.initial=BO,y.intersection=RO,y.intersectionBy=MO,y.intersectionWith=NO,y.invert=Z3,y.invertBy=eI,y.invokeMap=$T,y.iteratee=yd,y.keyBy=LT,y.keys=ct,y.keysIn=jt,y.map=Fc,y.mapKeys=nI,y.mapValues=rI,y.matches=QI,y.matchesProperty=XI,y.memoize=vc,y.merge=iI,y.mergeWith=dy,y.method=ZI,y.methodOf=eB,y.mixin=Fd,y.negate=Cc,y.nthArg=nB,y.omit=oI,y.omitBy=uI,y.once=t3,y.orderBy=UT,y.over=rB,y.overArgs=n3,y.overEvery=iB,y.overSome=oB,y.partial=pd,y.partialRight=iy,y.partition=kT,y.pick=sI,y.pickBy=hy,y.property=Ey,y.propertyOf=uB,y.pull=UO,y.pullAll=Y_,y.pullAllBy=kO,y.pullAllWith=qO,y.pullAt=WO,y.range=sB,y.rangeRight=aB,y.rearg=r3,y.reject=HT,y.remove=HO,y.rest=i3,y.reverse=cd,y.sampleSize=VT,y.set=cI,y.setWith=lI,y.shuffle=YT,y.slice=zO,y.sortBy=JT,y.sortedUniq=XO,y.sortedUniqBy=ZO,y.split=BI,y.spread=o3,y.tail=eT,y.take=tT,y.takeRight=nT,y.takeRightWhile=rT,y.takeWhile=iT,y.tap=yT,y.throttle=u3,y.thru=yc,y.toArray=cy,y.toPairs=Dy,y.toPairsIn=my,y.toPath=dB,y.toPlainObject=fy,y.transform=fI,y.unary=s3,y.union=oT,y.unionBy=uT,y.unionWith=sT,y.uniq=aT,y.uniqBy=cT,y.uniqWith=lT,y.unset=pI,y.unzip=ld,y.unzipWith=G_,y.update=dI,y.updateWith=hI,y.values=Yo,y.valuesIn=DI,y.without=fT,y.words=yy,y.wrap=a3,y.xor=pT,y.xorBy=dT,y.xorWith=hT,y.zip=DT,y.zipObject=mT,y.zipObjectDeep=gT,y.zipWith=_T,y.entries=Dy,y.entriesIn=my,y.extend=py,y.extendWith=xc,Fd(y,y),y.add=DB,y.attempt=Fy,y.camelCase=yI,y.capitalize=gy,y.ceil=mB,y.clamp=mI,y.clone=l3,y.cloneDeep=p3,y.cloneDeepWith=d3,y.cloneWith=f3,y.conformsTo=h3,y.deburr=_y,y.defaultTo=GI,y.divide=gB,y.endsWith=FI,y.eq=Bn,y.escape=EI,y.escapeRegExp=vI,y.every=PT,y.find=TT,y.findIndex=W_,y.findKey=H3,y.findLast=IT,y.findLastIndex=H_,y.findLastKey=z3,y.floor=_B,y.forEach=J_,y.forEachRight=Q_,y.forIn=V3,y.forInRight=Y3,y.forOwn=G3,y.forOwnRight=K3,y.get=Dd,y.gt=D3,y.gte=m3,y.has=X3,y.hasIn=md,y.head=V_,y.identity=$t,y.includes=jT,y.indexOf=IO,y.inRange=gI,y.invoke=tI,y.isArguments=to,y.isArray=ae,y.isArrayBuffer=g3,y.isArrayLike=Nt,y.isArrayLikeObject=Qe,y.isBoolean=_3,y.isBuffer=pi,y.isDate=y3,y.isElement=F3,y.isEmpty=E3,y.isEqual=v3,y.isEqualWith=C3,y.isError=dd,y.isFinite=w3,y.isFunction=Br,y.isInteger=oy,y.isLength=wc,y.isMap=uy,y.isMatch=b3,y.isMatchWith=x3,y.isNaN=A3,y.isNative=S3,y.isNil=O3,y.isNull=P3,y.isNumber=sy,y.isObject=He,y.isObjectLike=Ye,y.isPlainObject=ds,y.isRegExp=hd,y.isSafeInteger=T3,y.isSet=ay,y.isString=bc,y.isSymbol=Xt,y.isTypedArray=Vo,y.isUndefined=I3,y.isWeakMap=B3,y.isWeakSet=R3,y.join=jO,y.kebabCase=CI,y.last=_n,y.lastIndexOf=$O,y.lowerCase=wI,y.lowerFirst=bI,y.lt=M3,y.lte=N3,y.max=yB,y.maxBy=FB,y.mean=EB,y.meanBy=vB,y.min=CB,y.minBy=wB,y.stubArray=vd,y.stubFalse=Cd,y.stubObject=cB,y.stubString=lB,y.stubTrue=fB,y.multiply=bB,y.nth=LO,y.noConflict=tB,y.noop=Ed,y.now=Ec,y.pad=xI,y.padEnd=AI,y.padStart=SI,y.parseInt=PI,y.random=_I,y.reduce=qT,y.reduceRight=WT,y.repeat=OI,y.replace=TI,y.result=aI,y.round=xB,y.runInContext=S,y.sample=zT,y.size=GT,y.snakeCase=II,y.some=KT,y.sortedIndex=VO,y.sortedIndexBy=YO,y.sortedIndexOf=GO,y.sortedLastIndex=KO,y.sortedLastIndexBy=JO,y.sortedLastIndexOf=QO,y.startCase=RI,y.startsWith=MI,y.subtract=AB,y.sum=SB,y.sumBy=PB,y.template=NI,y.times=pB,y.toFinite=Rr,y.toInteger=le,y.toLength=ly,y.toLower=jI,y.toNumber=yn,y.toSafeInteger=j3,y.toString=be,y.toUpper=$I,y.trim=LI,y.trimEnd=UI,y.trimStart=kI,y.truncate=qI,y.unescape=WI,y.uniqueId=hB,y.upperCase=HI,y.upperFirst=gd,y.each=J_,y.eachRight=Q_,y.first=V_,Fd(y,(function(){var o={};return ar(y,function(u,c){we.call(y.prototype,c)||(o[c]=u)}),o})(),{chain:!1}),y.VERSION=t,dn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){y[o].placeholder=y}),dn(["drop","take"],function(o,u){me.prototype[o]=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,ln),type:o+(f.__dir__<0?"Right":"")}),f},me.prototype[o+"Right"]=function(c){return this.reverse()[o](c).reverse()}}),dn(["filter","map","takeWhile"],function(o,u){var c=u+1,f=c==Pn||c==wa;me.prototype[o]=function(g){var E=this.clone();return E.__iteratees__.push({iteratee:ee(g,3),type:c}),E.__filtered__=E.__filtered__||f,E}}),dn(["head","last"],function(o,u){var c="take"+(u?"Right":"");me.prototype[o]=function(){return this[c](1).value()[0]}}),dn(["initial","tail"],function(o,u){var c="drop"+(u?"":"Right");me.prototype[o]=function(){return this.__filtered__?new me(this):this[c](1)}}),me.prototype.compact=function(){return this.filter($t)},me.prototype.find=function(o){return this.filter(o).head()},me.prototype.findLast=function(o){return this.reverse().find(o)},me.prototype.invokeMap=de(function(o,u){return typeof o=="function"?new me(this):this.map(function(c){return ss(c,o,u)})}),me.prototype.reject=function(o){return this.filter(Cc(ee(o)))},me.prototype.slice=function(o,u){o=le(o);var c=this;return c.__filtered__&&(o>0||u<0)?new me(c):(o<0?c=c.takeRight(-o):o&&(c=c.drop(o)),u!==e&&(u=le(u),c=u<0?c.dropRight(-u):c.take(u-o)),c)},me.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},me.prototype.toArray=function(){return this.take(ln)},ar(me.prototype,function(o,u){var c=/^(?:filter|find|map|reject)|While$/.test(u),f=/^(?:head|last)$/.test(u),g=y[f?"take"+(u=="last"?"Right":""):u],E=f||/^find/.test(u);g&&(y.prototype[u]=function(){var w=this.__wrapped__,x=f?[1]:arguments,P=w instanceof me,j=x[0],$=P||ae(w),U=function(he){var _e=g.apply(y,ii([he],x));return f&&H?_e[0]:_e};$&&c&&typeof j=="function"&&j.length!=1&&(P=$=!1);var H=this.__chain__,G=!!this.__actions__.length,te=E&&!H,pe=P&&!G;if(!E&&$){w=pe?w:new me(this);var ne=o.apply(w,x);return ne.__actions__.push({func:yc,args:[U],thisArg:e}),new Dn(ne,H)}return te&&pe?o.apply(this,x):(ne=this.thru(U),te?f?ne.value()[0]:ne.value():ne)})}),dn(["pop","push","shift","sort","splice","unshift"],function(o){var u=za[o],c=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",f=/^(?:pop|shift)$/.test(o);y.prototype[o]=function(){var g=arguments;if(f&&!this.__chain__){var E=this.value();return u.apply(ae(E)?E:[],g)}return this[c](function(w){return u.apply(ae(w)?w:[],g)})}}),ar(me.prototype,function(o,u){var c=y[u];if(c){var f=c.name+"";we.call(ko,f)||(ko[f]=[]),ko[f].push({name:u,func:c})}}),ko[pc(e,A).name]=[{name:"wrapper",func:e}],me.prototype.clone=WS,me.prototype.reverse=HS,me.prototype.value=zS,y.prototype.at=FT,y.prototype.chain=ET,y.prototype.commit=vT,y.prototype.next=CT,y.prototype.plant=bT,y.prototype.reverse=xT,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=AT,y.prototype.first=y.prototype.head,es&&(y.prototype[es]=wT),y}),ui=vS();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(at._=ui,define(function(){return ui})):Yi?((Yi.exports=ui)._=ui,yp._=ui):at._=ui}).call(su)});var jC=B((NC,Gh)=>{d();(function(e){function t(){var r=e();return r.default||r}if(typeof NC=="object"&&typeof Gh=="object")Gh.exports=t();else if(typeof define=="function"&&define.amd)define(t);else{var n=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};n.doc=t()}})(function(){"use strict";var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i=(D,M)=>{for(var W in M)e(D,W,{get:M[W],enumerable:!0})},s=(D,M,W,z)=>{if(M&&typeof M=="object"||typeof M=="function")for(let ie of n(M))!r.call(D,ie)&&ie!==W&&e(D,ie,{get:()=>M[ie],enumerable:!(z=t(M,ie))||z.enumerable});return D},a=D=>s(e({},"__esModule",{value:!0}),D),l={};i(l,{builders:()=>mp,printer:()=>La,utils:()=>Mo});var p=1,h=(D,M)=>(W,z,...ie)=>W|p&&z==null?void 0:(M.call(z)??z[D]).apply(z,ie);function m(D){return this[D<0?this.length+D:D]}var _=h("at",function(){if(Array.isArray(this)||typeof this=="string")return m}),C=_,v=()=>{},b=v,A="string",O="array",T="cursor",L="indent",q="align",Q="trim",X="group",fe="fill",ye="if-break",We="indent-if-break",mt="line-suffix",rr="line-suffix-boundary",dt="line",Pn="label",cn="break-parent",wa=new Set([T,L,q,Q,X,fe,ye,We,mt,rr,dt,Pn,cn]);function Cr(D){let M=D.length;for(;M>0&&(D[M-1]==="\r"||D[M-1]===`
|
|
28
|
+
`);)M--;return M<D.length?D.slice(0,M):D}function ir(D){if(typeof D=="string")return A;if(Array.isArray(D))return O;if(!D)return;let{type:M}=D;if(wa.has(M))return M}var wr=ir,Oo=D=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(D);function ln(D){let M=D===null?"null":typeof D;if(M!=="string"&&M!=="object")return`Unexpected doc '${M}',
|
|
29
|
+
Expected it to be 'string' or 'object'.`;if(wr(D))throw new Error("doc is valid.");let W=Object.prototype.toString.call(D);if(W!=="[object Object]")return`Unexpected doc '${W}'.`;let z=Oo([...wa].map(ie=>`'${ie}'`));return`Unexpected doc.type '${D.type}'.
|
|
30
|
+
Expected it to be ${z}.`}var kf=class extends Error{name="InvalidDocError";constructor(D){super(ln(D)),this.doc=D}},Xr=kf,ba={};function Zr(D,M,W,z){let ie=[D];for(;ie.length>0;){let Y=ie.pop();if(Y===ba){W(ie.pop());continue}W&&ie.push(Y,ba);let K=wr(Y);if(!K)throw new Xr(Y);if(M?.(Y)!==!1)switch(K){case O:case fe:{let ge=K===O?Y:Y.parts;for(let ke=ge.length,Ce=ke-1;Ce>=0;--Ce)ie.push(ge[Ce]);break}case ye:ie.push(Y.flatContents,Y.breakContents);break;case X:if(z&&Y.expandedStates)for(let ge=Y.expandedStates.length,ke=ge-1;ke>=0;--ke)ie.push(Y.expandedStates[ke]);else ie.push(Y.contents);break;case q:case L:case We:case Pn:case mt:ie.push(Y.contents);break;case A:case T:case Q:case rr:case dt:case cn:break;default:throw new Xr(Y)}}}var ei=Zr;function To(D,M){if(typeof D=="string")return M(D);let W=new Map;return z(D);function z(Y){if(W.has(Y))return W.get(Y);let K=ie(Y);return W.set(Y,K),K}function ie(Y){switch(wr(Y)){case O:return M(Y.map(z));case fe:return M({...Y,parts:Y.parts.map(z)});case ye:return M({...Y,breakContents:z(Y.breakContents),flatContents:z(Y.flatContents)});case X:{let{expandedStates:K,contents:ge}=Y;return K?(K=K.map(z),ge=K[0]):ge=z(ge),M({...Y,contents:ge,expandedStates:K})}case q:case L:case We:case Pn:case mt:return M({...Y,contents:z(Y.contents)});case A:case T:case Q:case rr:case dt:case cn:return M(Y);default:throw new Xr(Y)}}}function br(D,M,W){let z=W,ie=!1;function Y(K){if(ie)return!1;let ge=M(K);ge!==void 0&&(ie=!0,z=ge)}return ei(D,Y),z}function Ni(D){if(D.type===X&&D.break||D.type===dt&&D.hard||D.type===cn)return!0}function qf(D){return br(D,Ni,!1)}function ji(D){if(D.length>0){let M=C(0,D,-1);!M.expandedStates&&!M.break&&(M.break="propagated")}return null}function Io(D){let M=new Set,W=[];function z(Y){if(Y.type===cn&&ji(W),Y.type===X){if(W.push(Y),M.has(Y))return!1;M.add(Y)}}function ie(Y){Y.type===X&&W.pop().break&&ji(W)}ei(D,z,ie,!0)}function xa(D){return D.type===dt&&!D.hard?D.soft?"":" ":D.type===ye?D.flatContents:D}function zt(D){return To(D,xa)}function ti(D){for(D=[...D];D.length>=2&&C(0,D,-2).type===dt&&C(0,D,-1).type===cn;)D.length-=2;if(D.length>0){let M=$i(C(0,D,-1));D[D.length-1]=M}return D}function $i(D){switch(wr(D)){case L:case We:case X:case mt:case Pn:{let M=$i(D.contents);return{...D,contents:M}}case ye:return{...D,breakContents:$i(D.breakContents),flatContents:$i(D.flatContents)};case fe:return{...D,parts:ti(D.parts)};case O:return ti(D);case A:return Cr(D);case q:case T:case Q:case rr:case dt:case cn:break;default:throw new Xr(D)}return D}function On(D){return $i(Wf(D))}function Aa(D){switch(wr(D)){case fe:if(D.parts.every(M=>M===""))return"";break;case X:if(!D.contents&&!D.id&&!D.break&&!D.expandedStates)return"";if(D.contents.type===X&&D.contents.id===D.id&&D.contents.break===D.break&&D.contents.expandedStates===D.expandedStates)return D.contents;break;case q:case L:case We:case mt:if(!D.contents)return"";break;case ye:if(!D.flatContents&&!D.breakContents)return"";break;case O:{let M=[];for(let W of D){if(!W)continue;let[z,...ie]=Array.isArray(W)?W:[W];typeof z=="string"&&typeof C(0,M,-1)=="string"?M[M.length-1]+=z:M.push(z),M.push(...ie)}return M.length===0?"":M.length===1?M[0]:M}case A:case T:case Q:case rr:case dt:case Pn:case cn:break;default:throw new Xr(D)}return D}function Wf(D){return To(D,M=>Aa(M))}function Li(D,M=Hu){return To(D,W=>typeof W=="string"?Pa(M,W.split(`
|
|
31
|
+
`)):W)}function Vt(D){if(D.type===dt)return!0}function Ui(D){return br(D,Vt,!1)}var At=b,Sa=b,ki=b,Hf=b;function or(D){return At(D),{type:L,contents:D}}function Yt(D,M){return Hf(D),At(M),{type:q,contents:M,n:D}}function Nu(D){return Yt(Number.NEGATIVE_INFINITY,D)}function ju(D){return Yt({type:"root"},D)}function $u(D){return Yt(-1,D)}function Lu(D,M,W){At(D);let z=D;if(M>0){for(let ie=0;ie<Math.floor(M/W);++ie)z=or(z);z=Yt(M%W,z),z=Yt(Number.NEGATIVE_INFINITY,z)}return z}var qi={type:cn},Uu={type:T};function ku(D){return ki(D),{type:fe,parts:D}}function Bo(D,M={}){return At(D),Sa(M.expandedStates,!0),{type:X,id:M.id,contents:D,break:!!M.shouldBreak,expandedStates:M.expandedStates}}function qu(D,M){return Bo(D[0],{...M,expandedStates:D})}function zf(D,M="",W={}){return At(D),M!==""&&At(M),{type:ye,breakContents:D,flatContents:M,groupId:W.groupId}}function Vf(D,M){return At(D),{type:We,contents:D,groupId:M.groupId,negate:M.negate}}function Pa(D,M){At(D),Sa(M);let W=[];for(let z=0;z<M.length;z++)z!==0&&W.push(D),W.push(M[z]);return W}function Oa(D,M){return At(M),D?{type:Pn,label:D,contents:M}:M}var Ta={type:dt},Yf={type:dt,soft:!0},Wu={type:dt,hard:!0},Gf=[Wu,qi],Ia={type:dt,hard:!0,literal:!0},Hu=[Ia,qi];function Kf(D){return At(D),{type:mt,contents:D}}var Jf={type:rr},Qf={type:Q},zu=String.prototype.replaceAll??function(D,M){return D.global?this.replace(D,M):this.split(D).join(M)},Xf=h("replaceAll",function(){if(typeof this=="string")return zu}),Vu=Xf,Zf="cr",ep="crlf",tp="\r",np=`\r
|
|
32
|
+
`,rp=`
|
|
33
|
+
`,ip=rp;function op(D){return D===Zf?tp:D===ep?np:ip}var up=()=>/[#*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 Ba(D){return D===12288||D>=65281&&D<=65376||D>=65504&&D<=65510}function sp(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 ap="\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",cp=/[^\x20-\x7F]/u,lp=new Set(ap);function fp(D){if(!D)return 0;if(!cp.test(D))return D.length;D=D.replace(up(),W=>lp.has(W)?" ":" ");let M=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||(M+=Ba(z)||sp(z)?2:1)}return M}var Ra=fp,Wi=0,Ma=1,Hi=2,Na=3,pp={type:Wi},dp={type:Ma},Yu={value:"",length:0,queue:[],get root(){return Yu}};function Gu(D,M,W){let z=M.type===Ma?D.queue.slice(0,-1):[...D.queue,M],ie="",Y=0,K=0,ge=0;for(let Me of z)switch(Me.type){case Wi:nt(),W.useTabs?ke(1):Ce(W.tabWidth);break;case Na:{let{string:St}=Me;nt(),ie+=St,Y+=St.length;break}case Hi:{let{width:St}=Me;K+=1,ge+=St;break}default:throw new Error(`Unexpected indent comment '${Me.type}'.`)}return ur(),{...D,value:ie,length:Y,queue:z};function ke(Me){ie+=" ".repeat(Me),Y+=W.tabWidth*Me}function Ce(Me){ie+=" ".repeat(Me),Y+=Me}function nt(){W.useTabs?Be():ur()}function Be(){K>0&&ke(K),ut()}function ur(){ge>0&&Ce(ge),ut()}function ut(){K=0,ge=0}}function ja(D,M,W){if(!M)return D;if(M.type==="root")return{...D,root:D};if(M===Number.NEGATIVE_INFINITY)return D.root;let z;return typeof M=="number"?M<0?z=dp:z={type:Hi,width:M}:z={type:Na,string:M},Gu(D,z,W)}function hp(D,M){return Gu(D,pp,M)}function Dp(D){let M=0;for(let W=D.length-1;W>=0;W--){let z=D[W];if(z===" "||z===" ")M++;else break}return M}function $a(D){let M=Dp(D);return{text:M===0?D:D.slice(0,D.length-M),count:M}}var gt=Symbol("MODE_BREAK"),Gt=Symbol("MODE_FLAT"),Ro=Symbol("DOC_FILL_PRINTED_LENGTH");function zi(D,M,W,z,ie,Y){if(W===Number.POSITIVE_INFINITY)return!0;let K=M.length,ge=!1,ke=[D],Ce="";for(;W>=0;){if(ke.length===0){if(K===0)return!0;ke.push(M[--K]);continue}let{mode:nt,doc:Be}=ke.pop(),ur=wr(Be);switch(ur){case A:Be&&(ge&&(Ce+=" ",W-=1,ge=!1),Ce+=Be,W-=Ra(Be));break;case O:case fe:{let ut=ur===O?Be:Be.parts,Me=Be[Ro]??0;for(let St=ut.length-1;St>=Me;St--)ke.push({mode:nt,doc:ut[St]});break}case L:case q:case We:case Pn:ke.push({mode:nt,doc:Be.contents});break;case Q:{let{text:ut,count:Me}=$a(Ce);Ce=ut,W+=Me;break}case X:{if(Y&&Be.break)return!1;let ut=Be.break?gt:nt,Me=Be.expandedStates&&ut===gt?C(0,Be.expandedStates,-1):Be.contents;ke.push({mode:ut,doc:Me});break}case ye:{let Me=(Be.groupId?ie[Be.groupId]||Gt:nt)===gt?Be.breakContents:Be.flatContents;Me&&ke.push({mode:nt,doc:Me});break}case dt:if(nt===gt||Be.hard)return!0;Be.soft||(ge=!0);break;case mt:z=!0;break;case rr:if(z)return!1;break}}return!1}function Ku(D,M){let W=Object.create(null),z=M.printWidth,ie=op(M.endOfLine),Y=0,K=[{indent:Yu,mode:gt,doc:D}],ge="",ke=!1,Ce=[],nt=[],Be=[],ur=[],ut=0;for(Io(D);K.length>0;){let{indent:Fe,mode:ht,doc:re}=K.pop();switch(wr(re)){case A:{let st=ie!==`
|
|
34
|
+
`?Vu(0,re,`
|
|
35
|
+
`,ie):re;st&&(ge+=st,K.length>0&&(Y+=Ra(st)));break}case O:for(let st=re.length-1;st>=0;st--)K.push({indent:Fe,mode:ht,doc:re[st]});break;case T:if(nt.length>=2)throw new Error("There are too many 'cursor' in doc.");nt.push(ut+ge.length);break;case L:K.push({indent:hp(Fe,M),mode:ht,doc:re.contents});break;case q:K.push({indent:ja(Fe,re.n,M),mode:ht,doc:re.contents});break;case Q:Ua();break;case X:switch(ht){case Gt:if(!ke){K.push({indent:Fe,mode:re.break?gt:Gt,doc:re.contents});break}case gt:{ke=!1;let st={indent:Fe,mode:Gt,doc:re.contents},_t=z-Y,xr=Ce.length>0;if(!re.break&&zi(st,K,_t,xr,W))K.push(st);else if(re.expandedStates){let ni=C(0,re.expandedStates,-1);if(re.break){K.push({indent:Fe,mode:gt,doc:ni});break}else for(let fn=1;fn<re.expandedStates.length+1;fn++)if(fn>=re.expandedStates.length){K.push({indent:Fe,mode:gt,doc:ni});break}else{let Vi=re.expandedStates[fn],sr={indent:Fe,mode:Gt,doc:Vi};if(zi(sr,K,_t,xr,W)){K.push(sr);break}}}else K.push({indent:Fe,mode:gt,doc:re.contents});break}}re.id&&(W[re.id]=C(0,K,-1).mode);break;case fe:{let st=z-Y,_t=re[Ro]??0,{parts:xr}=re,ni=xr.length-_t;if(ni===0)break;let fn=xr[_t+0],Vi=xr[_t+1],sr={indent:Fe,mode:Gt,doc:fn},Qu={indent:Fe,mode:gt,doc:fn},Xu=zi(sr,[],st,Ce.length>0,W,!0);if(ni===1){Xu?K.push(sr):K.push(Qu);break}let ka={indent:Fe,mode:Gt,doc:Vi},Se={indent:Fe,mode:gt,doc:Vi};if(ni===2){Xu?K.push(ka,sr):K.push(Se,Qu);break}let Pe=xr[_t+2],gp={indent:Fe,mode:ht,doc:{...re,[Ro]:_t+2}},_p=zi({indent:Fe,mode:Gt,doc:[fn,Vi,Pe]},[],st,Ce.length>0,W,!0);K.push(gp),_p?K.push(ka,sr):Xu?K.push(Se,sr):K.push(Se,Qu);break}case ye:case We:{let st=re.groupId?W[re.groupId]:ht;if(st===gt){let _t=re.type===ye?re.breakContents:re.negate?re.contents:or(re.contents);_t&&K.push({indent:Fe,mode:ht,doc:_t})}if(st===Gt){let _t=re.type===ye?re.flatContents:re.negate?or(re.contents):re.contents;_t&&K.push({indent:Fe,mode:ht,doc:_t})}break}case mt:Ce.push({indent:Fe,mode:ht,doc:re.contents});break;case rr:Ce.length>0&&K.push({indent:Fe,mode:ht,doc:Wu});break;case dt:switch(ht){case Gt:if(re.hard)ke=!0;else{re.soft||(ge+=" ",Y+=1);break}case gt:if(Ce.length>0){K.push({indent:Fe,mode:ht,doc:re},...Ce.reverse()),Ce.length=0;break}re.literal?(ge+=ie,Y=0,Fe.root&&(Fe.root.value&&(ge+=Fe.root.value),Y=Fe.root.length)):(Ua(),ge+=ie+Fe.value,Y=Fe.length);break}break;case Pn:K.push({indent:Fe,mode:ht,doc:re.contents});break;case cn:break;default:throw new Xr(re)}K.length===0&&Ce.length>0&&(K.push(...Ce.reverse()),Ce.length=0)}let Me=Be.join("")+ge,St=[...ur,...nt];if(St.length!==2)return{formatted:Me};let Ju=St[0];return{formatted:Me,cursorNodeStart:Ju,cursorNodeText:Me.slice(Ju,C(0,St,-1))};function Ua(){let{text:Fe,count:ht}=$a(ge);Fe&&(Be.push(Fe),ut+=Fe.length),ge="",Y-=ht,nt.length>0&&(ur.push(...nt.map(re=>Math.min(re,ut))),nt.length=0)}}var mp={join:Pa,line:Ta,softline:Yf,hardline:Gf,literalline:Hu,group:Bo,conditionalGroup:qu,fill:ku,lineSuffix:Kf,lineSuffixBoundary:Jf,cursor:Uu,breakParent:qi,ifBreak:zf,trim:Qf,indent:or,indentIfBreak:Vf,align:Yt,addAlignmentToDoc:Lu,markAsRoot:ju,dedentToRoot:Nu,dedent:$u,hardlineWithoutBreakParent:Wu,literallineWithoutBreakParent:Ia,label:Oa,concat:D=>D},La={printDocToString:Ku},Mo={willBreak:qf,traverseDoc:ei,findInDoc:br,mapDoc:To,removeLines:zt,stripTrailingHardline:On,replaceEndOfLine:Li,canBreak:Ui};return a(l)})});var mw=B((wre,Dw)=>{"use strict";d();var Zh=Object.defineProperty,vN=Object.getOwnPropertyDescriptor,WC=Object.getOwnPropertyNames,CN=Object.prototype.hasOwnProperty,Ne=(e,t)=>function(){return e&&(t=(0,e[WC(e)[0]])(e=0)),t},HC=(e,t)=>{for(var n in t)Zh(e,n,{get:t[n],enumerable:!0})},wN=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of WC(t))!CN.call(e,i)&&i!==n&&Zh(e,i,{get:()=>t[i],enumerable:!(r=vN(t,i))||r.enumerable});return e},$C=e=>wN(Zh({},"__esModule",{value:!0}),e),LC,zC,bN=Ne({"scripts/build/shims/shared.js"(){LC=1,zC=(e,t)=>(n,r,...i)=>n|LC&&r==null?void 0:(t.call(r)??r[e]).apply(r,i)}}),UC,kC,VC,xN=Ne({"scripts/build/shims/method-replace-all.js"(){bN(),UC=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},kC=zC("replaceAll",function(){if(typeof this=="string")return UC}),VC=kC}});function qs(e){return(t,n,r)=>{let i=!!r?.backwards;if(n===!1)return!1;let{length:s}=t,a=n;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;i?a--:a++}return a===-1||a===s?a:!1}}var YC,wi,eD,tD,Do=Ne({"src/utilities/skip.js"(){YC=qs(/\s/u),wi=qs(" "),eD=qs(",; "),tD=qs(/[^\n\r]/u)}});function AN(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n<e.length;++n)if(e.charAt(n)==="*"&&e.charAt(n+1)==="/")return n+2}return t}var Sl,nD=Ne({"src/utilities/skip-inline-comment.js"(){Sl=AN}});function SN(e,t,n){let r=!!n?.backwards;if(t===!1)return!1;let i=e.charAt(t);if(r){if(e.charAt(t-1)==="\r"&&i===`
|
|
36
|
+
`)return t-2;if(Qh(i))return t-1}else{if(i==="\r"&&e.charAt(t+1)===`
|
|
37
|
+
`)return t+2;if(Qh(i))return t+1}return t}var Qh,ho,Ws=Ne({"src/utilities/skip-newline.js"(){Qh=e=>e===`
|
|
38
|
+
`||e==="\r"||e==="\u2028"||e==="\u2029",ho=SN}});function PN(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?tD(e,t):t}var Pl,rD=Ne({"src/utilities/skip-trailing-comment.js"(){Do(),Pl=PN}});function ON(e,t){let n=null,r=t;for(;r!==n;)n=r,r=wi(e,r),r=Sl(e,r),r=Pl(e,r),r=ho(e,r);return r}var Ol,GC=Ne({"src/utilities/get-next-non-space-non-comment-character-index.js"(){Do(),nD(),Ws(),rD(),Ol=ON}});function TN(e,t,n={}){let r=wi(e,n.backwards?t-1:t,n),i=ho(e,r,n);return r!==i}var iD,KC=Ne({"src/utilities/has-newline.js"(){Do(),Ws(),iD=TN}});function IN(e,t){let n=null,r=t;for(;r!==n;)n=r,r=eD(e,r),r=Sl(e,r),r=wi(e,r);return r=Pl(e,r),r=ho(e,r),r!==!1&&iD(e,r)}var Tl,BN=Ne({"src/utilities/is-next-line-empty.js"(){KC(),Do(),nD(),Ws(),rD(),Tl=IN}});function RN(e,t){let n=t-1;n=wi(e,n,{backwards:!0}),n=ho(e,n,{backwards:!0}),n=wi(e,n,{backwards:!0});let r=ho(e,n,{backwards:!0});return n!==r}var oD,MN=Ne({"src/utilities/is-previous-line-empty.js"(){Do(),Ws(),oD=RN}});function NN(e){let t=e.type||e.kind||"(unknown type)",n=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 n.length>20&&(n=n.slice(0,19)+"\u2026"),t+(n?" "+n:"")}function uD(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=NN(e)}function jN(e,t){t.leading=!0,t.trailing=!1,uD(e,t)}function $N(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),uD(e,t)}function LN(e,t){t.leading=!1,t.trailing=!0,uD(e,t)}var UN=Ne({"src/main/comments/utilities.js"(){}});function kN(e,t,n=0){let r=0;for(let i=n;i<e.length;++i)e[i]===" "?r=r+t-r%t:r++;return r}var sD,JC=Ne({"src/utilities/get-alignment-size.js"(){sD=kN}});function qN(e,t){let n=e.lastIndexOf(`
|
|
39
|
+
`);return n===-1?0:sD(e.slice(n+1).match(/^[\t ]*/u)[0],t)}var QC,WN=Ne({"src/utilities/get-indent-size.js"(){JC(),QC=qN}});function HN(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var zN=Ne({"node_modules/escape-string-regexp/index.js"(){}});function VN(e,t){let n=e.matchAll(new RegExp(`(?:${HN(t)})+`,"gu"));return n.reduce||(n=[...n]),n.reduce((r,[i])=>Math.max(r,i.length),0)/t.length}var XC,YN=Ne({"src/utilities/get-max-continuous-count.js"(){zN(),XC=VN}});function GN(e,t){let n=Ol(e,t);return n===!1?"":e.charAt(n)}var ZC,KN=Ne({"src/utilities/get-next-non-space-non-comment-character.js"(){GC(),ZC=GN}});function JN(e,t){let{preferred:n,alternate:r}=t===!0||t===Xh?ew:tw,{length:i}=e,s=0,a=0;for(let l=0;l<i;l++){let p=e.charCodeAt(l);p===n.codePoint?s++:p===r.codePoint&&a++}return(s>a?r:n).character}var Xh,qC,Kh,Jh,ew,tw,nw,QN=Ne({"src/utilities/get-preferred-quote.js"(){Xh="'",qC='"',Kh=Object.freeze({character:Xh,codePoint:39}),Jh=Object.freeze({character:qC,codePoint:34}),ew=Object.freeze({preferred:Kh,alternate:Jh}),tw=Object.freeze({preferred:Jh,alternate:Kh}),nw=JN}}),rw,XN=Ne({"node_modules/emoji-regex/index.mjs"(){rw=()=>/[#*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 ZN(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function ej(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 tj=Ne({"node_modules/get-east-asian-width/lookup.js"(){}}),nj=Ne({"node_modules/get-east-asian-width/index.js"(){tj()}}),iw,rj=Ne({"src/utilities/narrow-emojis.evaluate.js"(){iw="\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 ij(e){if(!e)return 0;if(!ow.test(e))return e.length;e=e.replace(rw(),n=>uw.has(n)?" ":" ");let t=0;for(let n of e){let r=n.codePointAt(0);r<=31||r>=127&&r<=159||r>=768&&r<=879||r>=65024&&r<=65039||(t+=ZN(r)||ej(r)?2:1)}return t}var ow,uw,sw,oj=Ne({"src/utilities/get-string-width.js"(){XN(),nj(),rj(),ow=/[^\x20-\x7F]/u,uw=new Set(iw),sw=ij}});function uj(e,t,n){for(let r=t;r<n;++r)if(e.charAt(r)===`
|
|
40
|
+
`)return!0;return!1}var aw,sj=Ne({"src/utilities/has-newline-in-range.js"(){aw=uj}});function aj(e,t,n={}){return wi(e,n.backwards?t-1:t,n)!==t}var cw,cj=Ne({"src/utilities/has-spaces.js"(){Do(),cw=aj}}),lw={};HC(lw,{addDanglingComment:()=>$N,addLeadingComment:()=>jN,addTrailingComment:()=>LN,getAlignmentSize:()=>sD,getIndentSize:()=>QC,getMaxContinuousCount:()=>XC,getNextNonSpaceNonCommentCharacter:()=>ZC,getNextNonSpaceNonCommentCharacterIndex:()=>fj,getPreferredQuote:()=>nw,getStringWidth:()=>sw,hasNewline:()=>iD,hasNewlineInRange:()=>aw,hasSpaces:()=>cw,isNextLineEmpty:()=>mj,isNextLineEmptyAfterIndex:()=>Tl,isPreviousLineEmpty:()=>dj,makeString:()=>Dj,skip:()=>qs,skipEverythingButNewLine:()=>tD,skipInlineComment:()=>Sl,skipNewline:()=>ho,skipSpaces:()=>wi,skipToLineEnd:()=>eD,skipTrailingComment:()=>Pl,skipWhitespace:()=>YC});function lj(e,t,n){return Ol(e,n(t))}function fj(e,t){return arguments.length===2||typeof t=="number"?Ol(e,t):lj(...arguments)}function pj(e,t,n){return oD(e,n(t))}function dj(e,t){return arguments.length===2||typeof t=="number"?oD(e,t):pj(...arguments)}function hj(e,t,n){return Tl(e,n(t))}function Dj(e,t,n){let r=t==='"'?"'":'"',s=VC(0,e,/\\(.)|(["'])/gsu,(a,l,p)=>l===r?l:p===t?"\\"+p:p||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(l)?l:"\\"+l));return t+s+t}function mj(e,t){return arguments.length===2||typeof t=="number"?Tl(e,t):hj(...arguments)}var gj=Ne({"src/utilities/public.js"(){xN(),GC(),BN(),MN(),UN(),JC(),WN(),YN(),KN(),QN(),oj(),KC(),sj(),cj(),Do(),nD(),Ws(),rD()}}),fw={};HC(fw,{default:()=>pw});var pw,_j=Ne({"src/main/version.evaluate.js"(){pw="3.8.4"}}),dw=import("./prettier-EGVCP5CY.js"),yj=["formatWithCursor","format","check","resolveConfig","resolveConfigFile","clearConfigCache","getFileInfo","getSupportInfo"],au=Object.create(null);for(let e of yj)au[e]=async(...t)=>(await dw)[e](...t);var Fj=["parse","formatAST","formatDoc","printToDoc","printDocToString"],hw=Object.create(null);for(let e of Fj)hw[e]=async(...t)=>(await dw).__debug[e](...t);au.__debug=hw;au.util=(gj(),$C(lw)),au.doc=jC(),au.version=(_j(),$C(fw)).default;Dw.exports=au});var gw=B(cu=>{"use strict";d();var Ej=cu&&cu.__awaiter||function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function l(m){try{h(r.next(m))}catch(_){a(_)}}function p(m){try{h(r.throw(m))}catch(_){a(_)}}function h(m){m.done?s(m.value):i(m.value).then(l,p)}h((r=r.apply(e,t||[])).next())})};Object.defineProperty(cu,"__esModule",{value:!0});cu.format=void 0;var vj=mw();function Cj(e,t){return Ej(this,void 0,void 0,function*(){return t.format?(0,vj.format)(e,Object.assign({parser:"typescript"},t.style)):e})}cu.format=Cj});var Il=B(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 wj(e){return"comment"in e&&e.comment!=null&&e.comment!==""||"deprecated"in e&&e.deprecated===!0}kt.hasComment=wj;function bj(e){return"standaloneName"in e&&e.standaloneName!=null&&e.standaloneName!==""}kt.hasStandaloneName=bj;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 mo=B(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 _w=kr();pt.Parent=Symbol("Parent");pt.Types=Symbol("Types");pt.Intersection=Symbol("Intersection");pt.getRootSchema=(0,_w.memoize)(e=>{let t=e[pt.Parent];return t?(0,pt.getRootSchema)(t):e});function xj(e){return e===!0||e===!1}pt.isBoolean=xj;function Aj(e){return!(0,_w.isPlainObject)(e)}pt.isPrimitive=Aj;function Sj(e){return Array.isArray(e.type)||"anyOf"in e||"oneOf"in e}pt.isCompound=Sj});var lu=B((Ire,go)=>{"use strict";d();function yw(e){return typeof e>"u"||e===null}function Pj(e){return typeof e=="object"&&e!==null}function Oj(e){return Array.isArray(e)?e:yw(e)?[]:[e]}function Tj(e,t){var n,r,i,s;if(t)for(s=Object.keys(t),n=0,r=s.length;n<r;n+=1)i=s[n],e[i]=t[i];return e}function Ij(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function Bj(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}go.exports.isNothing=yw;go.exports.isObject=Pj;go.exports.toArray=Oj;go.exports.repeat=Ij;go.exports.isNegativeZero=Bj;go.exports.extend=Tj});var fu=B((Rre,Ew)=>{"use strict";d();function Fw(e,t){var n="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+=`
|
|
41
|
+
|
|
42
|
+
`+e.mark.snippet),r+" "+n):r}function Hs(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Fw(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Hs.prototype=Object.create(Error.prototype);Hs.prototype.constructor=Hs;Hs.prototype.toString=function(t){return this.name+": "+Fw(this,t)};Ew.exports=Hs});var Cw=B((Nre,vw)=>{"use strict";d();var zs=lu();function aD(e,t,n,r,i){var s="",a="",l=Math.floor(i/2)-1;return r-t>l&&(s=" ... ",t=r-l+s.length),n-r>l&&(a=" ...",n=r+l-a.length),{str:s+e.slice(t,n).replace(/\t/g,"\u2192")+a,pos:r-t+s.length}}function cD(e,t){return zs.repeat(" ",t-e.length)+e}function Rj(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 n=/\r?\n|\r|\0/g,r=[0],i=[],s,a=-1;s=n.exec(e.buffer);)i.push(s.index),r.push(s.index+s[0].length),e.position<=s.index&&a<0&&(a=r.length-2);a<0&&(a=r.length-1);var l="",p,h,m=Math.min(e.line+t.linesAfter,i.length).toString().length,_=t.maxLength-(t.indent+m+3);for(p=1;p<=t.linesBefore&&!(a-p<0);p++)h=aD(e.buffer,r[a-p],i[a-p],e.position-(r[a]-r[a-p]),_),l=zs.repeat(" ",t.indent)+cD((e.line-p+1).toString(),m)+" | "+h.str+`
|
|
43
|
+
`+l;for(h=aD(e.buffer,r[a],i[a],e.position,_),l+=zs.repeat(" ",t.indent)+cD((e.line+1).toString(),m)+" | "+h.str+`
|
|
44
|
+
`,l+=zs.repeat("-",t.indent+m+3+h.pos)+`^
|
|
45
|
+
`,p=1;p<=t.linesAfter&&!(a+p>=i.length);p++)h=aD(e.buffer,r[a+p],i[a+p],e.position-(r[a]-r[a+p]),_),l+=zs.repeat(" ",t.indent)+cD((e.line+p+1).toString(),m)+" | "+h.str+`
|
|
46
|
+
`;return l.replace(/\n$/,"")}vw.exports=Rj});var bt=B(($re,bw)=>{"use strict";d();var ww=fu(),Mj=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Nj=["scalar","sequence","mapping"];function jj(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function $j(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(Mj.indexOf(n)===-1)throw new ww('Unknown option "'+n+'" 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(n){return n},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=jj(t.styleAliases||null),Nj.indexOf(this.kind)===-1)throw new ww('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}bw.exports=$j});var pD=B((Ure,Aw)=>{"use strict";d();var Vs=fu(),lD=bt();function xw(e,t){var n=[];return e[t].forEach(function(r){var i=n.length;n.forEach(function(s,a){s.tag===r.tag&&s.kind===r.kind&&s.multi===r.multi&&(i=a)}),n[i]=r}),n}function Lj(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function r(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}function fD(e){return this.extend(e)}fD.prototype.extend=function(t){var n=[],r=[];if(t instanceof lD)r.push(t);else if(Array.isArray(t))r=r.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(n=n.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit));else throw new Vs("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(s){if(!(s instanceof lD))throw new Vs("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new Vs("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 Vs("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(s){if(!(s instanceof lD))throw new Vs("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(fD.prototype);return i.implicit=(this.implicit||[]).concat(n),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=xw(i,"implicit"),i.compiledExplicit=xw(i,"explicit"),i.compiledTypeMap=Lj(i.compiledImplicit,i.compiledExplicit),i};Aw.exports=fD});var dD=B((qre,Sw)=>{"use strict";d();var Uj=bt();Sw.exports=new Uj("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var hD=B((Hre,Pw)=>{"use strict";d();var kj=bt();Pw.exports=new kj("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var DD=B((Vre,Ow)=>{"use strict";d();var qj=bt();Ow.exports=new qj("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var mD=B((Gre,Tw)=>{"use strict";d();var Wj=pD();Tw.exports=new Wj({explicit:[dD(),hD(),DD()]})});var gD=B((Jre,Iw)=>{"use strict";d();var Hj=bt();function zj(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Vj(){return null}function Yj(e){return e===null}Iw.exports=new Hj("tag:yaml.org,2002:null",{kind:"scalar",resolve:zj,construct:Vj,predicate:Yj,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})});var _D=B((Xre,Bw)=>{"use strict";d();var Gj=bt();function Kj(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 Jj(e){return e==="true"||e==="True"||e==="TRUE"}function Qj(e){return Object.prototype.toString.call(e)==="[object Boolean]"}Bw.exports=new Gj("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Kj,construct:Jj,predicate:Qj,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 yD=B((eie,Rw)=>{"use strict";d();var Xj=lu(),Zj=bt();function e$(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function t$(e){return 48<=e&&e<=55}function n$(e){return 48<=e&&e<=57}function r$(e){if(e===null)return!1;var t=e.length,n=0,r=!1,i;if(!t)return!1;if(i=e[n],(i==="-"||i==="+")&&(i=e[++n]),i==="0"){if(n+1===t)return!0;if(i=e[++n],i==="b"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(i!=="0"&&i!=="1")return!1;r=!0}return r&&i!=="_"}if(i==="x"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(!e$(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}if(i==="o"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(!t$(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}}if(i==="_")return!1;for(;n<t;n++)if(i=e[n],i!=="_"){if(!n$(e.charCodeAt(n)))return!1;r=!0}return!(!r||i==="_")}function i$(e){var t=e,n=1,r;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),t=t.slice(1),r=t[0]),t==="0")return 0;if(r==="0"){if(t[1]==="b")return n*parseInt(t.slice(2),2);if(t[1]==="x")return n*parseInt(t.slice(2),16);if(t[1]==="o")return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}function o$(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Xj.isNegativeZero(e)}Rw.exports=new Zj("tag:yaml.org,2002:int",{kind:"scalar",resolve:r$,construct:i$,predicate:o$,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 FD=B((nie,Nw)=>{"use strict";d();var Mw=lu(),u$=bt(),s$=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function a$(e){return!(e===null||!s$.test(e)||e[e.length-1]==="_")}function c$(e){var t,n;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:n*parseFloat(t,10)}var l$=/^[-+]?[0-9]+e/;function f$(e,t){var n;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(Mw.isNegativeZero(e))return"-0.0";return n=e.toString(10),l$.test(n)?n.replace("e",".e"):n}function p$(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Mw.isNegativeZero(e))}Nw.exports=new u$("tag:yaml.org,2002:float",{kind:"scalar",resolve:a$,construct:c$,predicate:p$,represent:f$,defaultStyle:"lowercase"})});var ED=B((iie,jw)=>{"use strict";d();jw.exports=mD().extend({implicit:[gD(),_D(),yD(),FD()]})});var vD=B((uie,$w)=>{"use strict";d();$w.exports=ED()});var CD=B((aie,kw)=>{"use strict";d();var d$=bt(),Lw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Uw=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 h$(e){return e===null?!1:Lw.exec(e)!==null||Uw.exec(e)!==null}function D$(e){var t,n,r,i,s,a,l,p=0,h=null,m,_,C;if(t=Lw.exec(e),t===null&&(t=Uw.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));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]&&(m=+t[10],_=+(t[11]||0),h=(m*60+_)*6e4,t[9]==="-"&&(h=-h)),C=new Date(Date.UTC(n,r,i,s,a,l,p)),h&&C.setTime(C.getTime()-h),C}function m$(e){return e.toISOString()}kw.exports=new d$("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:h$,construct:D$,instanceOf:Date,represent:m$})});var wD=B((lie,qw)=>{"use strict";d();var g$=bt();function _$(e){return e==="<<"||e===null}qw.exports=new g$("tag:yaml.org,2002:merge",{kind:"scalar",resolve:_$})});var xD=B((pie,Ww)=>{"use strict";d();var y$=bt(),bD=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
47
|
+
\r`;function F$(e){if(e===null)return!1;var t,n,r=0,i=e.length,s=bD;for(n=0;n<i;n++)if(t=s.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function E$(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,s=bD,a=0,l=[];for(t=0;t<i;t++)t%4===0&&t&&(l.push(a>>16&255),l.push(a>>8&255),l.push(a&255)),a=a<<6|s.indexOf(r.charAt(t));return n=i%4*6,n===0?(l.push(a>>16&255),l.push(a>>8&255),l.push(a&255)):n===18?(l.push(a>>10&255),l.push(a>>2&255)):n===12&&l.push(a>>4&255),new Uint8Array(l)}function v$(e){var t="",n=0,r,i,s=e.length,a=bD;for(r=0;r<s;r++)r%3===0&&r&&(t+=a[n>>18&63],t+=a[n>>12&63],t+=a[n>>6&63],t+=a[n&63]),n=(n<<8)+e[r];return i=s%3,i===0?(t+=a[n>>18&63],t+=a[n>>12&63],t+=a[n>>6&63],t+=a[n&63]):i===2?(t+=a[n>>10&63],t+=a[n>>4&63],t+=a[n<<2&63],t+=a[64]):i===1&&(t+=a[n>>2&63],t+=a[n<<4&63],t+=a[64],t+=a[64]),t}function C$(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}Ww.exports=new y$("tag:yaml.org,2002:binary",{kind:"scalar",resolve:F$,construct:E$,predicate:C$,represent:v$})});var AD=B((hie,Hw)=>{"use strict";d();var w$=bt(),b$=Object.prototype.hasOwnProperty,x$=Object.prototype.toString;function A$(e){if(e===null)return!0;var t=[],n,r,i,s,a,l=e;for(n=0,r=l.length;n<r;n+=1){if(i=l[n],a=!1,x$.call(i)!=="[object Object]")return!1;for(s in i)if(b$.call(i,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 S$(e){return e!==null?e:[]}Hw.exports=new w$("tag:yaml.org,2002:omap",{kind:"sequence",resolve:A$,construct:S$})});var SD=B((mie,zw)=>{"use strict";d();var P$=bt(),O$=Object.prototype.toString;function T$(e){if(e===null)return!0;var t,n,r,i,s,a=e;for(s=new Array(a.length),t=0,n=a.length;t<n;t+=1){if(r=a[t],O$.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;s[t]=[i[0],r[i[0]]]}return!0}function I$(e){if(e===null)return[];var t,n,r,i,s,a=e;for(s=new Array(a.length),t=0,n=a.length;t<n;t+=1)r=a[t],i=Object.keys(r),s[t]=[i[0],r[i[0]]];return s}zw.exports=new P$("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:T$,construct:I$})});var PD=B((_ie,Vw)=>{"use strict";d();var B$=bt(),R$=Object.prototype.hasOwnProperty;function M$(e){if(e===null)return!0;var t,n=e;for(t in n)if(R$.call(n,t)&&n[t]!==null)return!1;return!0}function N$(e){return e!==null?e:{}}Vw.exports=new B$("tag:yaml.org,2002:set",{kind:"mapping",resolve:M$,construct:N$})});var Bl=B((Fie,Yw)=>{"use strict";d();Yw.exports=vD().extend({implicit:[CD(),wD()],explicit:[xD(),AD(),SD(),PD()]})});var lb=B((vie,BD)=>{"use strict";d();var yo=lu(),eb=fu(),j$=Cw(),$$=Bl(),xi=Object.prototype.hasOwnProperty,Rl=1,tb=2,nb=3,Ml=4,OD=1,L$=2,Gw=3,U$=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,k$=/[\x85\u2028\u2029]/,q$=/[,\[\]\{\}]/,rb=/^(?:!|!!|![a-z\-]+!)$/i,ib=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Kw(e){return Object.prototype.toString.call(e)}function yr(e){return e===10||e===13}function Fo(e){return e===9||e===32}function qt(e){return e===9||e===32||e===10||e===13}function pu(e){return e===44||e===91||e===93||e===123||e===125}function W$(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function H$(e){return e===120?2:e===117?4:e===85?8:0}function z$(e){return 48<=e&&e<=57?e-48:-1}function Jw(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 V$(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function ob(e,t,n){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}var ub=new Array(256),sb=new Array(256);for(_o=0;_o<256;_o++)ub[_o]=Jw(_o)?1:0,sb[_o]=Jw(_o);var _o;function Y$(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||$$,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 ab(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=j$(n),new eb(t,n)}function J(e,t){throw ab(e,t)}function Nl(e,t){e.onWarning&&e.onWarning.call(null,ab(e,t))}var Qw={YAML:function(t,n,r){var i,s,a;t.version!==null&&J(t,"duplication of %YAML directive"),r.length!==1&&J(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&J(t,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),a=parseInt(i[2],10),s!==1&&J(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&Nl(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,s;r.length!==2&&J(t,"TAG directive accepts exactly two arguments"),i=r[0],s=r[1],rb.test(i)||J(t,"ill-formed tag handle (first argument) of the TAG directive"),xi.call(t.tagMap,i)&&J(t,'there is a previously declared suffix for "'+i+'" tag handle'),ib.test(s)||J(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{J(t,"tag prefix is malformed: "+s)}t.tagMap[i]=s}};function bi(e,t,n,r){var i,s,a,l;if(t<n){if(l=e.input.slice(t,n),r)for(i=0,s=l.length;i<s;i+=1)a=l.charCodeAt(i),a===9||32<=a&&a<=1114111||J(e,"expected valid JSON character");else U$.test(l)&&J(e,"the stream contains non-printable characters");e.result+=l}}function Xw(e,t,n,r){var i,s,a,l;for(yo.isObject(n)||J(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),a=0,l=i.length;a<l;a+=1)s=i[a],xi.call(t,s)||(ob(t,s,n[s]),r[s]=!0)}function du(e,t,n,r,i,s,a,l,p){var h,m;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),h=0,m=i.length;h<m;h+=1)Array.isArray(i[h])&&J(e,"nested arrays are not supported inside keys"),typeof i=="object"&&Kw(i[h])==="[object Object]"&&(i[h]="[object Object]");if(typeof i=="object"&&Kw(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(h=0,m=s.length;h<m;h+=1)Xw(e,t,s[h],n);else Xw(e,t,s,n);else!e.json&&!xi.call(n,i)&&xi.call(t,i)&&(e.line=a||e.line,e.lineStart=l||e.lineStart,e.position=p||e.position,J(e,"duplicated mapping key")),ob(t,i,s),delete n[i];return t}function TD(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++):J(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function et(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;Fo(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(yr(i))for(TD(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&Nl(e,"deficient indentation"),r}function jl(e){var t=e.position,n;return n=e.input.charCodeAt(t),!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||qt(n)))}function ID(e,t){t===1?e.result+=" ":t>1&&(e.result+=yo.repeat(`
|
|
49
|
+
`,t-1))}function G$(e,t,n){var r,i,s,a,l,p,h,m,_=e.kind,C=e.result,v;if(v=e.input.charCodeAt(e.position),qt(v)||pu(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)&&(i=e.input.charCodeAt(e.position+1),qt(i)||n&&pu(i)))return!1;for(e.kind="scalar",e.result="",s=a=e.position,l=!1;v!==0;){if(v===58){if(i=e.input.charCodeAt(e.position+1),qt(i)||n&&pu(i))break}else if(v===35){if(r=e.input.charCodeAt(e.position-1),qt(r))break}else{if(e.position===e.lineStart&&jl(e)||n&&pu(v))break;if(yr(v))if(p=e.line,h=e.lineStart,m=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=h,e.lineIndent=m;break}}l&&(bi(e,s,a,!1),ID(e,e.line-p),s=a=e.position,l=!1),Fo(v)||(a=e.position+1),v=e.input.charCodeAt(++e.position)}return bi(e,s,a,!1),e.result?!0:(e.kind=_,e.result=C,!1)}function K$(e,t){var n,r,i;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(bi(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else yr(n)?(bi(e,r,i,!0),ID(e,et(e,!1,t)),r=i=e.position):e.position===e.lineStart&&jl(e)?J(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);J(e,"unexpected end of the stream within a single quoted scalar")}function J$(e,t){var n,r,i,s,a,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return bi(e,n,e.position,!0),e.position++,!0;if(l===92){if(bi(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),yr(l))et(e,!1,t);else if(l<256&&ub[l])e.result+=sb[l],e.position++;else if((a=H$(l))>0){for(i=a,s=0;i>0;i--)l=e.input.charCodeAt(++e.position),(a=W$(l))>=0?s=(s<<4)+a:J(e,"expected hexadecimal character");e.result+=V$(s),e.position++}else J(e,"unknown escape sequence");n=r=e.position}else yr(l)?(bi(e,n,r,!0),ID(e,et(e,!1,t)),n=r=e.position):e.position===e.lineStart&&jl(e)?J(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}J(e,"unexpected end of the stream within a double quoted scalar")}function Q$(e,t){var n=!0,r,i,s,a=e.tag,l,p=e.anchor,h,m,_,C,v,b=Object.create(null),A,O,T,L;if(L=e.input.charCodeAt(e.position),L===91)m=93,v=!1,l=[];else if(L===123)m=125,v=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),L=e.input.charCodeAt(++e.position);L!==0;){if(et(e,!0,t),L=e.input.charCodeAt(e.position),L===m)return e.position++,e.tag=a,e.anchor=p,e.kind=v?"mapping":"sequence",e.result=l,!0;n?L===44&&J(e,"expected the node content, but found ','"):J(e,"missed comma between flow collection entries"),O=A=T=null,_=C=!1,L===63&&(h=e.input.charCodeAt(e.position+1),qt(h)&&(_=C=!0,e.position++,et(e,!0,t))),r=e.line,i=e.lineStart,s=e.position,hu(e,t,Rl,!1,!0),O=e.tag,A=e.result,et(e,!0,t),L=e.input.charCodeAt(e.position),(C||e.line===r)&&L===58&&(_=!0,L=e.input.charCodeAt(++e.position),et(e,!0,t),hu(e,t,Rl,!1,!0),T=e.result),v?du(e,l,b,O,A,T,r,i,s):_?l.push(du(e,null,b,O,A,T,r,i,s)):l.push(A),et(e,!0,t),L=e.input.charCodeAt(e.position),L===44?(n=!0,L=e.input.charCodeAt(++e.position)):n=!1}J(e,"unexpected end of the stream within a flow collection")}function X$(e,t){var n,r,i=OD,s=!1,a=!1,l=t,p=0,h=!1,m,_;if(_=e.input.charCodeAt(e.position),_===124)r=!1;else if(_===62)r=!0;else return!1;for(e.kind="scalar",e.result="";_!==0;)if(_=e.input.charCodeAt(++e.position),_===43||_===45)OD===i?i=_===43?Gw:L$:J(e,"repeat of a chomping mode identifier");else if((m=z$(_))>=0)m===0?J(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?J(e,"repeat of an indentation width identifier"):(l=t+m-1,a=!0);else break;if(Fo(_)){do _=e.input.charCodeAt(++e.position);while(Fo(_));if(_===35)do _=e.input.charCodeAt(++e.position);while(!yr(_)&&_!==0)}for(;_!==0;){for(TD(e),e.lineIndent=0,_=e.input.charCodeAt(e.position);(!a||e.lineIndent<l)&&_===32;)e.lineIndent++,_=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>l&&(l=e.lineIndent),yr(_)){p++;continue}if(e.lineIndent<l){i===Gw?e.result+=yo.repeat(`
|
|
50
|
+
`,s?1+p:p):i===OD&&s&&(e.result+=`
|
|
51
|
+
`);break}for(r?Fo(_)?(h=!0,e.result+=yo.repeat(`
|
|
52
|
+
`,s?1+p:p)):h?(h=!1,e.result+=yo.repeat(`
|
|
53
|
+
`,p+1)):p===0?s&&(e.result+=" "):e.result+=yo.repeat(`
|
|
54
|
+
`,p):e.result+=yo.repeat(`
|
|
55
|
+
`,s?1+p:p),s=!0,a=!0,p=0,n=e.position;!yr(_)&&_!==0;)_=e.input.charCodeAt(++e.position);bi(e,n,e.position,!1)}return!0}function Zw(e,t){var n,r=e.tag,i=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,J(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(n=e.line,hu(e,t,nb,!1,!0),s.push(e.result),et(e,!0,-1),p=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&p!==0)J(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return l?(e.tag=r,e.anchor=i,e.kind="sequence",e.result=s,!0):!1}function Z$(e,t,n){var r,i,s,a,l,p,h=e.tag,m=e.anchor,_={},C=Object.create(null),v=null,b=null,A=null,O=!1,T=!1,L;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=_),L=e.input.charCodeAt(e.position);L!==0;){if(!O&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,J(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),s=e.line,(L===63||L===58)&&qt(r))L===63?(O&&(du(e,_,C,v,b,null,a,l,p),v=b=A=null),T=!0,O=!0,i=!0):O?(O=!1,i=!0):J(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,L=r;else{if(a=e.line,l=e.lineStart,p=e.position,!hu(e,n,tb,!1,!0))break;if(e.line===s){for(L=e.input.charCodeAt(e.position);Fo(L);)L=e.input.charCodeAt(++e.position);if(L===58)L=e.input.charCodeAt(++e.position),qt(L)||J(e,"a whitespace character is expected after the key-value separator within a block mapping"),O&&(du(e,_,C,v,b,null,a,l,p),v=b=A=null),T=!0,O=!1,i=!1,v=e.tag,b=e.result;else if(T)J(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=m,!0}else if(T)J(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=h,e.anchor=m,!0}if((e.line===s||e.lineIndent>t)&&(O&&(a=e.line,l=e.lineStart,p=e.position),hu(e,t,Ml,!0,i)&&(O?b=e.result:A=e.result),O||(du(e,_,C,v,b,A,a,l,p),v=b=A=null),et(e,!0,-1),L=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&L!==0)J(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return O&&du(e,_,C,v,b,null,a,l,p),T&&(e.tag=h,e.anchor=m,e.kind="mapping",e.result=_),T}function e7(e){var t,n=!1,r=!1,i,s,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&J(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(n=!0,a=e.input.charCodeAt(++e.position)):a===33?(r=!0,i="!!",a=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){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)):J(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!qt(a);)a===33&&(r?J(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),rb.test(i)||J(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),q$.test(s)&&J(e,"tag suffix cannot contain flow indicator characters")}s&&!ib.test(s)&&J(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{J(e,"tag name is malformed: "+s)}return n?e.tag=s:xi.call(e.tagMap,i)?e.tag=e.tagMap[i]+s:i==="!"?e.tag="!"+s:i==="!!"?e.tag="tag:yaml.org,2002:"+s:J(e,'undeclared tag handle "'+i+'"'),!0}function t7(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&J(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!qt(n)&&!pu(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&J(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function n7(e){var t,n,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!qt(r)&&!pu(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&J(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),xi.call(e.anchorMap,n)||J(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],et(e,!0,-1),!0}function hu(e,t,n,r,i){var s,a,l,p=1,h=!1,m=!1,_,C,v,b,A,O;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=a=l=Ml===n||nb===n,r&&et(e,!0,-1)&&(h=!0,e.lineIndent>t?p=1:e.lineIndent===t?p=0:e.lineIndent<t&&(p=-1)),p===1)for(;e7(e)||t7(e);)et(e,!0,-1)?(h=!0,l=s,e.lineIndent>t?p=1:e.lineIndent===t?p=0:e.lineIndent<t&&(p=-1)):l=!1;if(l&&(l=h||i),(p===1||Ml===n)&&(Rl===n||tb===n?A=t:A=t+1,O=e.position-e.lineStart,p===1?l&&(Zw(e,O)||Z$(e,O,A))||Q$(e,A)?m=!0:(a&&X$(e,A)||K$(e,A)||J$(e,A)?m=!0:n7(e)?(m=!0,(e.tag!==null||e.anchor!==null)&&J(e,"alias node should not have any properties")):G$(e,A,Rl===n)&&(m=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):p===0&&(m=l&&Zw(e,O))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&J(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),_=0,C=e.implicitTypes.length;_<C;_+=1)if(b=e.implicitTypes[_],b.resolve(e.result)){e.result=b.construct(e.result),e.tag=b.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(xi.call(e.typeMap[e.kind||"fallback"],e.tag))b=e.typeMap[e.kind||"fallback"][e.tag];else for(b=null,v=e.typeMap.multi[e.kind||"fallback"],_=0,C=v.length;_<C;_+=1)if(e.tag.slice(0,v[_].tag.length)===v[_].tag){b=v[_];break}b||J(e,"unknown tag !<"+e.tag+">"),e.result!==null&&b.kind!==e.kind&&J(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+b.kind+'", not "'+e.kind+'"'),b.resolve(e.result,e.tag)?(e.result=b.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):J(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||m}function r7(e){var t=e.position,n,r,i,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),n=e.position;a!==0&&!qt(a);)a=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&J(e,"directive name must not be less than one character in length");a!==0;){for(;Fo(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!yr(a));break}if(yr(a))break;for(n=e.position;a!==0&&!qt(a);)a=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}a!==0&&TD(e),xi.call(Qw,r)?Qw[r](e,r,i):Nl(e,'unknown document directive "'+r+'"')}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&&J(e,"directives end mark is expected"),hu(e,e.lineIndent-1,Ml,!1,!0),et(e,!0,-1),e.checkLineBreaks&&k$.test(e.input.slice(t,e.position))&&Nl(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&jl(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,et(e,!0,-1));return}if(e.position<e.length-1)J(e,"end of the stream or a document separator is expected");else return}function cb(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 n=new Y$(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,J(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)r7(n);return n.documents}function i7(e,t,n){t!==null&&typeof t=="object"&&typeof n>"u"&&(n=t,t=null);var r=cb(e,n);if(typeof t!="function")return r;for(var i=0,s=r.length;i<s;i+=1)t(r[i])}function o7(e,t){var n=cb(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new eb("expected a single document in the stream, but found more")}}BD.exports.loadAll=i7;BD.exports.load=o7});var Tb=B((wie,Ob)=>{"use strict";d();var Ul=lu(),Qs=fu(),u7=Bl(),yb=Object.prototype.toString,Fb=Object.prototype.hasOwnProperty,$D=65279,s7=9,Gs=10,a7=13,c7=32,l7=33,f7=34,RD=35,p7=37,d7=38,h7=39,D7=42,Eb=44,m7=45,$l=58,g7=61,_7=62,y7=63,F7=64,vb=91,Cb=93,E7=96,wb=123,v7=124,bb=125,xt={};xt[0]="\\0";xt[7]="\\a";xt[8]="\\b";xt[9]="\\t";xt[10]="\\n";xt[11]="\\v";xt[12]="\\f";xt[13]="\\r";xt[27]="\\e";xt[34]='\\"';xt[92]="\\\\";xt[133]="\\N";xt[160]="\\_";xt[8232]="\\L";xt[8233]="\\P";var C7=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],w7=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function b7(e,t){var n,r,i,s,a,l,p;if(t===null)return{};for(n={},r=Object.keys(t),i=0,s=r.length;i<s;i+=1)a=r[i],l=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),p=e.compiledTypeMap.fallback[a],p&&Fb.call(p.styleAliases,l)&&(l=p.styleAliases[l]),n[a]=l;return n}function x7(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n="x",r=2;else if(e<=65535)n="u",r=4;else if(e<=4294967295)n="U",r=8;else throw new Qs("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+Ul.repeat("0",r-t.length)+t}var A7=1,Ks=2;function S7(e){this.schema=e.schema||u7,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ul.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=b7(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==='"'?Ks:A7,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 fb(e,t){for(var n=Ul.repeat(" ",t),r=0,i=-1,s="",a,l=e.length;r<l;)i=e.indexOf(`
|
|
57
|
+
`,r),i===-1?(a=e.slice(r),r=l):(a=e.slice(r,i+1),r=i+1),a.length&&a!==`
|
|
58
|
+
`&&(s+=n),s+=a;return s}function MD(e,t){return`
|
|
59
|
+
`+Ul.repeat(" ",e.indent*t)}function P7(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}function Ll(e){return e===c7||e===s7}function Js(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==$D||65536<=e&&e<=1114111}function pb(e){return Js(e)&&e!==$D&&e!==a7&&e!==Gs}function db(e,t,n){var r=pb(e),i=r&&!Ll(e);return(n?r:r&&e!==Eb&&e!==vb&&e!==Cb&&e!==wb&&e!==bb)&&e!==RD&&!(t===$l&&!i)||pb(t)&&!Ll(t)&&e===RD||t===$l&&i}function O7(e){return Js(e)&&e!==$D&&!Ll(e)&&e!==m7&&e!==y7&&e!==$l&&e!==Eb&&e!==vb&&e!==Cb&&e!==wb&&e!==bb&&e!==RD&&e!==d7&&e!==D7&&e!==l7&&e!==v7&&e!==g7&&e!==_7&&e!==h7&&e!==f7&&e!==p7&&e!==F7&&e!==E7}function T7(e){return!Ll(e)&&e!==$l}function Ys(e,t){var n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function xb(e){var t=/^\n* /;return t.test(e)}var Ab=1,ND=2,Sb=3,Pb=4,Du=5;function I7(e,t,n,r,i,s,a,l){var p,h=0,m=null,_=!1,C=!1,v=r!==-1,b=-1,A=O7(Ys(e,0))&&T7(Ys(e,e.length-1));if(t||a)for(p=0;p<e.length;h>=65536?p+=2:p++){if(h=Ys(e,p),!Js(h))return Du;A=A&&db(h,m,l),m=h}else{for(p=0;p<e.length;h>=65536?p+=2:p++){if(h=Ys(e,p),h===Gs)_=!0,v&&(C=C||p-b-1>r&&e[b+1]!==" ",b=p);else if(!Js(h))return Du;A=A&&db(h,m,l),m=h}C=C||v&&p-b-1>r&&e[b+1]!==" "}return!_&&!C?A&&!a&&!i(e)?Ab:s===Ks?Du:ND:n>9&&xb(e)?Du:a?s===Ks?Du:ND:C?Pb:Sb}function B7(e,t,n,r,i){e.dump=(function(){if(t.length===0)return e.quotingType===Ks?'""':"''";if(!e.noCompatMode&&(C7.indexOf(t)!==-1||w7.test(t)))return e.quotingType===Ks?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,n),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),l=r||e.flowLevel>-1&&n>=e.flowLevel;function p(h){return P7(e,h)}switch(I7(t,l,e.indent,a,p,e.quotingType,e.forceQuotes&&!r,i)){case Ab:return t;case ND:return"'"+t.replace(/'/g,"''")+"'";case Sb:return"|"+hb(t,e.indent)+Db(fb(t,s));case Pb:return">"+hb(t,e.indent)+Db(fb(R7(t,a),s));case Du:return'"'+M7(t,a)+'"';default:throw new Qs("impossible error: invalid scalar style")}})()}function hb(e,t){var n=xb(e)?String(t):"",r=e[e.length-1]===`
|
|
60
|
+
`,i=r&&(e[e.length-2]===`
|
|
61
|
+
`||e===`
|
|
62
|
+
`),s=i?"+":r?"":"-";return n+s+`
|
|
63
|
+
`}function Db(e){return e[e.length-1]===`
|
|
64
|
+
`?e.slice(0,-1):e}function R7(e,t){for(var n=/(\n+)([^\n]*)/g,r=(function(){var h=e.indexOf(`
|
|
65
|
+
`);return h=h!==-1?h:e.length,n.lastIndex=h,mb(e.slice(0,h),t)})(),i=e[0]===`
|
|
66
|
+
`||e[0]===" ",s,a;a=n.exec(e);){var l=a[1],p=a[2];s=p[0]===" ",r+=l+(!i&&!s&&p!==""?`
|
|
67
|
+
`:"")+mb(p,t),i=s}return r}function mb(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,s,a=0,l=0,p="";r=n.exec(e);)l=r.index,l-i>t&&(s=a>i?a:l,p+=`
|
|
68
|
+
`+e.slice(i,s),i=s+1),a=l;return p+=`
|
|
69
|
+
`,e.length-i>t&&a>i?p+=e.slice(i,a)+`
|
|
70
|
+
`+e.slice(a+1):p+=e.slice(i),p.slice(1)}function M7(e){for(var t="",n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=Ys(e,i),r=xt[n],!r&&Js(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||x7(n);return t}function N7(e,t,n){var r="",i=e.tag,s,a,l;for(s=0,a=n.length;s<a;s+=1)l=n[s],e.replacer&&(l=e.replacer.call(n,String(s),l)),(qr(e,t,l,!1,!1)||typeof l>"u"&&qr(e,t,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function gb(e,t,n,r){var i="",s=e.tag,a,l,p;for(a=0,l=n.length;a<l;a+=1)p=n[a],e.replacer&&(p=e.replacer.call(n,String(a),p)),(qr(e,t+1,p,!0,!0,!1,!0)||typeof p>"u"&&qr(e,t+1,null,!0,!0,!1,!0))&&((!r||i!=="")&&(i+=MD(e,t)),e.dump&&Gs===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=s,e.dump=i||"[]"}function j7(e,t,n){var r="",i=e.tag,s=Object.keys(n),a,l,p,h,m;for(a=0,l=s.length;a<l;a+=1)m="",r!==""&&(m+=", "),e.condenseFlow&&(m+='"'),p=s[a],h=n[p],e.replacer&&(h=e.replacer.call(n,p,h)),qr(e,t,p,!1,!1)&&(e.dump.length>1024&&(m+="? "),m+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),qr(e,t,h,!1,!1)&&(m+=e.dump,r+=m));e.tag=i,e.dump="{"+r+"}"}function $7(e,t,n,r){var i="",s=e.tag,a=Object.keys(n),l,p,h,m,_,C;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)C="",(!r||i!=="")&&(C+=MD(e,t)),h=a[l],m=n[h],e.replacer&&(m=e.replacer.call(n,h,m)),qr(e,t+1,h,!0,!0,!0)&&(_=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,_&&(e.dump&&Gs===e.dump.charCodeAt(0)?C+="?":C+="? "),C+=e.dump,_&&(C+=MD(e,t)),qr(e,t+1,m,!0,_)&&(e.dump&&Gs===e.dump.charCodeAt(0)?C+=":":C+=": ",C+=e.dump,i+=C));e.tag=s,e.dump=i||"{}"}function _b(e,t,n){var r,i,s,a,l,p;for(i=n?e.explicitTypes:e.implicitTypes,s=0,a=i.length;s<a;s+=1)if(l=i[s],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof t=="object"&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(n?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,yb.call(l.represent)==="[object Function]")r=l.represent(t,p);else if(Fb.call(l.represent,p))r=l.represent[p](t,p);else throw new Qs("!<"+l.tag+'> tag resolver accepts not "'+p+'" style');e.dump=r}return!0}return!1}function qr(e,t,n,r,i,s,a){e.tag=null,e.dump=n,_b(e,n,!1)||_b(e,n,!0);var l=yb.call(e.dump),p=r,h;r&&(r=e.flowLevel<0||e.flowLevel>t);var m=l==="[object Object]"||l==="[object Array]",_,C;if(m&&(_=e.duplicates.indexOf(n),C=_!==-1),(e.tag!==null&&e.tag!=="?"||C||e.indent!==2&&t>0)&&(i=!1),C&&e.usedDuplicates[_])e.dump="*ref_"+_;else{if(m&&C&&!e.usedDuplicates[_]&&(e.usedDuplicates[_]=!0),l==="[object Object]")r&&Object.keys(e.dump).length!==0?($7(e,t,e.dump,i),C&&(e.dump="&ref_"+_+e.dump)):(j7(e,t,e.dump),C&&(e.dump="&ref_"+_+" "+e.dump));else if(l==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?gb(e,t-1,e.dump,i):gb(e,t,e.dump,i),C&&(e.dump="&ref_"+_+e.dump)):(N7(e,t,e.dump),C&&(e.dump="&ref_"+_+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&B7(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!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}function L7(e,t){var n=[],r=[],i,s;for(jD(e,n,r),i=0,s=r.length;i<s;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(s)}function jD(e,t,n){var r,i,s;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,s=e.length;i<s;i+=1)jD(e[i],t,n);else for(r=Object.keys(e),i=0,s=r.length;i<s;i+=1)jD(e[r[i]],t,n)}function U7(e,t){t=t||{};var n=new S7(t);n.noRefs||L7(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},"",r)),qr(n,0,r,!0,!0)?n.dump+`
|
|
71
|
+
`:""}Ob.exports.dump=U7});var mu=B((xie,Bt)=>{"use strict";d();var Ib=lb(),k7=Tb();function LD(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.")}}Bt.exports.Type=bt();Bt.exports.Schema=pD();Bt.exports.FAILSAFE_SCHEMA=mD();Bt.exports.JSON_SCHEMA=ED();Bt.exports.CORE_SCHEMA=vD();Bt.exports.DEFAULT_SCHEMA=Bl();Bt.exports.load=Ib.load;Bt.exports.loadAll=Ib.loadAll;Bt.exports.dump=k7.dump;Bt.exports.YAMLException=fu();Bt.exports.types={binary:xD(),float:FD(),map:DD(),null:gD(),pairs:SD(),set:PD(),timestamp:CD(),bool:_D(),int:yD(),merge:wD(),omap:AD(),seq:hD(),str:dD()};Bt.exports.safeLoad=LD("safeLoad","load");Bt.exports.safeLoadAll=LD("safeLoadAll","loadAll");Bt.exports.safeDump=LD("safeDump","dump")});var Si=B(Ee=>{"use strict";d();var q7=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 Xs=kr(),Wr=ze("path"),Bb=mo(),W7=q7(mu());function UD(e,t){try{return e()}catch(n){return t(n)}}Ee.Try=UD;var H7=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 gu(e,t,n){Object.keys(e).forEach(r=>{e[r]&&typeof e[r]=="object"&&!Array.isArray(e[r])&&Eo(e[r],t,n,r)})}function _u(e,t,n){e.forEach((r,i)=>Eo(r,t,n,i.toString()))}function z7(e,t,n){if(typeof e!="object"||!e)return;let i=e[Bb.Intersection];i&&Array.isArray(i.allOf)&&_u(i.allOf,t,n)}function Eo(e,t,n=new Set,r){if(!n.has(e)){if(n.add(e),t(e,r??null),e.anyOf&&_u(e.anyOf,t,n),e.allOf&&_u(e.allOf,t,n),e.oneOf&&_u(e.oneOf,t,n),e.properties&&gu(e.properties,t,n),e.patternProperties&&gu(e.patternProperties,t,n),e.additionalProperties&&typeof e.additionalProperties=="object"&&Eo(e.additionalProperties,t,n),e.items){let{items:i}=e;Array.isArray(i)?_u(i,t,n):Eo(i,t,n)}e.additionalItems&&typeof e.additionalItems=="object"&&Eo(e.additionalItems,t,n),e.dependencies&&(Array.isArray(e.dependencies)?_u(e.dependencies,t,n):gu(e.dependencies,t,n)),e.definitions&&gu(e.definitions,t,n),e.$defs&&gu(e.$defs,t,n),e.not&&Eo(e.not,t,n),z7(e,t,n),Object.keys(e).filter(i=>!H7.has(i)).forEach(i=>{let s=e[i];s&&typeof s=="object"&&gu(s,t,n)})}}Ee.traverse=Eo;function V7(e=""){return Rb((0,Wr.basename)(e))}Ee.justName=V7;function Rb(e){return e.replace((0,Wr.extname)(e),"")}Ee.stripExtension=Rb;function Mb(e){return(0,Xs.upperFirst)((0,Xs.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,Xs.trim)(t.toUpperCase())).replace(/\s/g,""))}Ee.toSafeString=Mb;function Y7(e,t){let n=Mb(e);if(n||(n="NoName"),t.has(n)){let r=1,i=`${n}${r}`;for(;t.has(i);)i=`${n}${r}`,r++;n=i}return t.add(n),n}Ee.generateName=Y7;function G7(...e){var t;if(!process.env.VERBOSE)return console.error(e);console.error((t=Nb("red"))===null||t===void 0?void 0:t("error"),...e)}Ee.error=G7;function K7(e,t,...n){var r,i;if(!process.env.VERBOSE)return;let s=null;n.length>1&&typeof n[n.length-1]!="string"&&(s=n.splice(n.length-1,1)),console.info((r=Ai())===null||r===void 0?void 0:r.whiteBright.bgCyan("debug"),(i=Nb(e))===null||i===void 0?void 0:i(t),...n),s&&console.dir(s,{depth:6,maxArrayLength:6})}Ee.log=K7;function Nb(e){var t,n,r,i,s,a,l;if(process.env.VERBOSE)switch(e){case"blue":return(t=Ai())===null||t===void 0?void 0:t.whiteBright.bgBlue;case"cyan":return(n=Ai())===null||n===void 0?void 0:n.whiteBright.bgCyan;case"green":return(r=Ai())===null||r===void 0?void 0:r.whiteBright.bgGreen;case"magenta":return(i=Ai())===null||i===void 0?void 0:i.whiteBright.bgMagenta;case"red":return(s=Ai())===null||s===void 0?void 0:s.whiteBright.bgRedBright;case"white":return(a=Ai())===null||a===void 0?void 0:a.black.bgWhite;case"yellow":return(l=Ai())===null||l===void 0?void 0:l.whiteBright.bgYellow}}function J7(e){if(!(e===null||typeof e!="object"))for(let n of Object.keys(e))n==="description"&&typeof e[n]=="string"&&(e[n]=e[n].replace(/\*\//g,"* /"))}Ee.escapeBlockComment=J7;function Q7(e,t,n){let r=(0,Wr.normalize)(t).split(Wr.sep),s=(0,Wr.dirname)((0,Wr.normalize)(n)).split(Wr.sep).filter((a,l)=>a!==r[l]);return Wr.posix.join(Wr.posix.normalize(e),...s)}Ee.pathTransform=Q7;function X7(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,Xs.isPlainObject)(e.default))return e;break}return delete e.default,e}Ee.maybeStripDefault=X7;function Z7(e,...t){return e?`${e}
|
|
72
|
+
|
|
73
|
+
${t.join(`
|
|
74
|
+
`)}`:t.join(`
|
|
75
|
+
`)}Ee.appendToDescription=Z7;function e9(e){if(!(0,Xs.isPlainObject)(e))return!1;let t=e[Bb.Parent];return t===null?!0:!["$defs","allOf","anyOf","definitions","dependencies","enum","not","oneOf","patternProperties","properties","required"].some(r=>t[r]===e)}Ee.isSchemaLike=e9;function t9(e,t){return e!=null&&n9(e)?UD(()=>W7.default.load(t.toString()),()=>{throw new TypeError(`Error parsing YML in file "${e}"`)}):UD(()=>JSON.parse(t.toString()),()=>{throw new TypeError(`Error parsing JSON in file "${e}"`)})}Ee.parseFileAsJSONSchema=t9;function n9(e){return e.endsWith(".yaml")||e.endsWith(".yml")}function Ai(){let e;try{e=ze("cli-color")}catch{}return e}});var WD=B(un=>{"use strict";d();Object.defineProperty(un,"__esModule",{value:!0});un.generateType=un.generate=void 0;var $b=kr(),r9=HD(),on=Il(),Fu=Si();function i9(e,t=r9.DEFAULT_OPTIONS){return[t.bannerComment,ea(e,t,e.standaloneName),Zs(e,t,e.standaloneName),yu(e,t)].filter(Boolean).join(`
|
|
76
|
+
|
|
77
|
+
`)+`
|
|
78
|
+
`}un.generate=i9;function yu(e,t,n=new Set){if(n.has(e))return"";n.add(e);let r="";switch(e.type){case"ENUM":return s9(e,t)+`
|
|
79
|
+
`;case"ARRAY":return yu(e.params,t,n);case"UNION":case"INTERSECTION":return e.params.reduce((i,s)=>i+yu(s,t,n),"");case"TUPLE":return r=e.params.reduce((i,s)=>i+yu(s,t,n),""),e.spreadParam&&(r+=yu(e.spreadParam,t,n)),r;case"INTERFACE":return qD(e).reduce((i,s)=>i+yu(s,t,n),"");default:return""}}function Zs(e,t,n,r=new Set){if(r.has(e))return"";r.add(e);let i="";switch(e.type){case"ARRAY":i=Zs(e.params,t,n,r);break;case"INTERFACE":i=[(0,on.hasStandaloneName)(e)&&(e.standaloneName===n||t.declareExternallyReferenced)&&a9(e,t),qD(e).map(s=>Zs(s,t,n,r)).filter(Boolean).join(`
|
|
80
|
+
`)].filter(Boolean).join(`
|
|
81
|
+
`);break;case"INTERSECTION":case"TUPLE":case"UNION":i=e.params.map(s=>Zs(s,t,n,r)).filter(Boolean).join(`
|
|
82
|
+
`),e.type==="TUPLE"&&e.spreadParam&&(i+=Zs(e.spreadParam,t,n,r));break;default:i=""}return i}function ea(e,t,n,r=new Set){if(r.has(e))return"";switch(r.add(e),e.type){case"ARRAY":return[ea(e.params,t,n,r),(0,on.hasStandaloneName)(e)?kD(e,t):void 0].filter(Boolean).join(`
|
|
83
|
+
`);case"ENUM":return"";case"INTERFACE":return qD(e).map(i=>(i.standaloneName===n||t.declareExternallyReferenced)&&ea(i,t,n,r)).filter(Boolean).join(`
|
|
84
|
+
`);case"INTERSECTION":case"TUPLE":case"UNION":return[(0,on.hasStandaloneName)(e)?kD(e,t):void 0,e.params.map(i=>ea(i,t,n,r)).filter(Boolean).join(`
|
|
85
|
+
`),"spreadParam"in e&&e.spreadParam?ea(e.spreadParam,t,n,r):void 0].filter(Boolean).join(`
|
|
86
|
+
`);default:return(0,on.hasStandaloneName)(e)?kD(e,t):""}}function o9(e,t){let n=u9(e,t);return t.strictIndexSignatures&&e.keyName==="[k: string]"?`${n} | undefined`:n}un.generateType=(0,$b.memoize)(o9);function u9(e,t){if((0,Fu.log)("magenta","generator",e),(0,on.hasStandaloneName)(e))return(0,Fu.toSafeString)(e.standaloneName);switch(e.type){case"ANY":return"any";case"ARRAY":return(()=>{let n=(0,un.generateType)(e.params,t);return n.endsWith('"')?"("+n+")[]":n+"[]"})();case"BOOLEAN":return"boolean";case"INTERFACE":return Lb(e,t);case"INTERSECTION":return jb(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 n=e.minItems,r=e.maxItems||-1,i=e.spreadParam,s=[...e.params];if(n>0&&n>s.length&&e.spreadParam===void 0&&r<0&&(i=t.unknownAny?on.T_UNKNOWN:on.T_ANY),r>s.length&&e.spreadParam===void 0)for(let h=s.length;h<r;h+=1)s.push(t.unknownAny?on.T_UNKNOWN:on.T_ANY);function a(h){if(i){let m="...("+(0,un.generateType)(i,t)+")[]";h.push(m)}return h}function l(h){return"["+h.join(", ")+"]"}let p=s.map(h=>(0,un.generateType)(h,t));if(p.length>n){let h=p.slice(0,n),m=[];h.length>0?m.push(l(h)):m.push(l([]));for(let _=n;_<p.length;_+=1)h.push(p[_]),_===p.length-1&&a(h),m.push(l(h));return m.join("|")}return l(a(p))})();case"UNION":return jb(e,t);case"UNKNOWN":return"unknown";case"CUSTOM_TYPE":return e.params}}function jb(e,t){let n=e.params.map(i=>(0,un.generateType)(i,t)),r=e.type==="UNION"?"|":"&";return n.length===1?n[0]:"("+n.join(" "+r+" ")+")"}function Lb(e,t){return`{
|
|
87
|
+
`+e.params.filter(n=>!n.isPatternProperty&&!n.isUnreachableDefinition).map(({isRequired:n,keyName:r,ast:i})=>[n,r,i,(0,un.generateType)(i,t)]).map(([n,r,i,s])=>((0,on.hasComment)(i)&&!i.standaloneName?kl(i.comment,i.deprecated)+`
|
|
88
|
+
`:"")+c9(r)+(n?"":"?")+": "+s).join(`
|
|
89
|
+
`)+`
|
|
90
|
+
}`}function kl(e,t){let n=["/**"];return t&&n.push(" * @deprecated"),typeof e<"u"&&n.push(...e.split(`
|
|
91
|
+
`).map(r=>" * "+r)),n.push(" */"),n.join(`
|
|
92
|
+
`)}function s9(e,t){let n=r=>/[^a-zA-Z0-9_]/.test(r);return((0,on.hasComment)(e)?kl(e.comment,e.deprecated)+`
|
|
93
|
+
`:"")+"export "+(t.enableConstEnums?"const ":"")+`enum ${(0,Fu.toSafeString)(e.standaloneName)} {
|
|
94
|
+
`+e.params.map(({ast:r,keyName:i})=>(n(i)?`"${i}"`:i)+" = "+(0,un.generateType)(r,t)).join(`,
|
|
95
|
+
`)+`
|
|
96
|
+
}`}function a9(e,t){return((0,on.hasComment)(e)?kl(e.comment,e.deprecated)+`
|
|
97
|
+
`:"")+`export interface ${(0,Fu.toSafeString)(e.standaloneName)} `+(e.superTypes.length>0?`extends ${e.superTypes.map(n=>(0,Fu.toSafeString)(n.standaloneName)).join(", ")} `:"")+Lb(e,t)}function kD(e,t){return((0,on.hasComment)(e)?kl(e.comment)+`
|
|
98
|
+
`:"")+`export type ${(0,Fu.toSafeString)(e.standaloneName)} = ${(0,un.generateType)((0,$b.omit)(e,"standaloneName"),t)}`}function c9(e){return e.length&&/[A-Za-z_$]/.test(e.charAt(0))&&/^[\w$]+$/.test(e)||e==="[k: string]"?e:JSON.stringify(e)}function qD(e){return e.params.map(t=>t.ast).concat(e.superTypes)}});var Ub=B(ql=>{"use strict";d();Object.defineProperty(ql,"__esModule",{value:!0});ql.typesOfSchema=void 0;var l9=kr(),zD=mo();function f9(e){if(e.tsType)return new Set(["CUSTOM_TYPE"]);let t=new Set;for(let[n,r]of Object.entries(p9))r(e)&&t.add(n);return t.size||t.add("UNNAMED_SCHEMA"),t}ql.typesOfSchema=f9;var p9={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,zD.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,zD.isCompound)(e)&&typeof e.default=="number"},OBJECT(e){return e.type==="object"&&!(0,l9.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,zD.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 VD=B(Hl=>{"use strict";d();Object.defineProperty(Hl,"__esModule",{value:!0});Hl.applySchemaTyping=void 0;var Wl=mo(),d9=Ub();function h9(e){var t;let n=(0,d9.typesOfSchema)(e);if(Object.defineProperty(e,Wl.Types,{enumerable:!1,value:n,writable:!1}),n.size===1)return;let r={[Wl.Parent]:e,[Wl.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};n.delete("ALL_OF"),delete e.allOf,delete e.$id,delete e.description,delete e.name,delete e.title,Object.defineProperty(e,Wl.Intersection,{enumerable:!1,value:r,writable:!1})}Hl.applySchemaTyping=h9});var kb=B(Vl=>{"use strict";d();Object.defineProperty(Vl,"__esModule",{value:!0});Vl.normalize=void 0;var D9=mo(),Hr=Si(),m9=VD(),g9=ze("util"),tt=new Map;function zl(e,t){return e.type===t||Array.isArray(e.type)&&e.type.includes(t)}function YD(e){return e.properties!==void 0||zl(e,"object")||zl(e,"any")}function ta(e){return e.items!==void 0||zl(e,"array")||zl(e,"any")}function _9(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=>{YD(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,n)=>{YD(e)&&!("additionalProperties"in e)&&e.patternProperties===void 0&&(e.additionalProperties=n.additionalProperties)});tt.set("Transform id to $id",(e,t)=>{if((0,Hr.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,n,r,i)=>{if(!(0,Hr.isSchemaLike)(e))return;if(!e.$id&&!e[D9.Parent]){e.$id=(0,Hr.toSafeString)((0,Hr.justName)(t));return}if(!ta(e)&&!YD(e))return;let s=i.get(e);!e.$id&&!e.title&&s&&(e.$id=(0,Hr.toSafeString)((0,Hr.justName)(s))),s&&i.delete(e)});tt.set("Escape closing JSDoc comment",e=>{(0,Hr.escapeBlockComment)(e)});tt.set("Add JSDoc comments for minItems and maxItems",e=>{if(!ta(e))return;let t=["minItems"in e?`@minItems ${e.minItems}`:"","maxItems"in e?`@maxItems ${e.maxItems}`:""].filter(Boolean);t.length&&(e.description=(0,Hr.appendToDescription)(e.description,...t))});tt.set("Optionally remove maxItems and minItems",(e,t,n)=>{ta(e)&&("minItems"in e&&n.ignoreMinAndMaxItems&&delete e.minItems,"maxItems"in e&&(n.ignoreMinAndMaxItems||n.maxItems===-1)&&delete e.maxItems)});tt.set("Normalize schema.minItems",(e,t,n)=>{if(n.ignoreMinAndMaxItems||!ta(e))return;let{minItems:r}=e;e.minItems=typeof r=="number"?r:0});tt.set("Remove maxItems if it is big enough to likely cause OOMs",(e,t,n)=>{if(n.ignoreMinAndMaxItems||n.maxItems===-1||!ta(e))return;let{maxItems:r,minItems:i}=e;r!==void 0&&r-i>n.maxItems&&delete e.maxItems});tt.set("Normalize schema.items",(e,t,n)=>{if(n.ignoreMinAndMaxItems)return;let{maxItems:r,minItems:i}=e,s=typeof r=="number"&&r>=0,a=typeof i=="number"&&i>0;if(e.items&&!Array.isArray(e.items)&&(s||a)){let l=e.items,p=Array(r||i||0).fill(l);s||(e.additionalItems=l),e.items=p}return Array.isArray(e.items)&&s&&r<e.items.length&&(e.items=e.items.slice(0,r)),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,g9.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,n)=>{var r;_9(e)&&n.inferStringEnumKeysFromValues&&(e.tsEnumNames=(r=e.enum)===null||r===void 0?void 0:r.map(String))});tt.set("Pre-calculate schema types and intersections",e=>{e!==null&&typeof e=="object"&&(0,m9.applySchemaTyping)(e)});function y9(e,t,n,r){return tt.forEach(i=>(0,Hr.traverse)(e,(s,a)=>i(s,n,r,a,t))),e}Vl.normalize=y9});var Hb=B(Gl=>{"use strict";d();Object.defineProperty(Gl,"__esModule",{value:!0});Gl.optimize=void 0;var F9=kr(),GD=WD(),qb=Il(),Yl=Si();function na(e,t,n=new Set){if(n.has(e))return e;switch(n.add(e),e.type){case"ARRAY":return Object.assign(e,{params:na(e.params,t,n)});case"INTERFACE":return Object.assign(e,{params:e.params.map(s=>Object.assign(s,{ast:na(s.ast,t,n)}))});case"INTERSECTION":case"UNION":let r=Object.assign(e,{params:e.params.map(s=>na(s,t,n))});if(r.params.some(s=>s.type==="ANY"))return(0,Yl.log)("cyan","optimizer","[A, B, C, Any] -> Any",r),qb.T_ANY;if(r.params.some(s=>s.type==="UNKNOWN"))return(0,Yl.log)("cyan","optimizer","[A, B, C, Unknown] -> Unknown",r),qb.T_UNKNOWN;r.params.every(s=>{let a=(0,GD.generateType)(Wb(s),t),l=(0,GD.generateType)(Wb(r.params[0]),t);return a===l})&&r.params.some(s=>s.standaloneName!==void 0)&&((0,Yl.log)("cyan","optimizer","[A (named), A] -> [A (named)]",r),r.params=r.params.filter(s=>s.standaloneName!==void 0));let i=(0,F9.uniqBy)(r.params,s=>(0,GD.generateType)(s,t));return i.length!==r.params.length&&((0,Yl.log)("cyan","optimizer","[A, B, B] -> [A, B]",r),r.params=i),Object.assign(r,{params:r.params.map(s=>na(s,t,n))});default:return e}}Gl.optimize=na;function Wb(e){return e.type==="ENUM"?e:Object.assign(Object.assign({},e),{standaloneName:void 0})}});var Vb=B(Jl=>{"use strict";d();Object.defineProperty(Jl,"__esModule",{value:!0});Jl.parse=void 0;var Fr=kr(),E9=ze("util"),v9=VD(),Pi=Il(),ra=mo(),Kl=Si();function sn(e,t,n,r=new Map,i=new Set){if((0,ra.isPrimitive)(e))return(0,ra.isBoolean)(e)?C9(e,n,t):JD(e,n);let s=e[ra.Intersection],a=e[ra.Types];if(s){let l=KD(s,"ALL_OF",t,n,r,i);return a.forEach(p=>{l.params.push(KD(e,p,t,n,r,i))}),(0,Kl.log)("blue","parser","Types:",[...a],"Input:",e,"Output:",l),l}if(a.size===1){let l=[...a][0],p=KD(e,l,t,n,r,i);return(0,Kl.log)("blue","parser","Type:",l,"Input:",e,"Output:",p),p}throw new ReferenceError("Expected intersection schema. Please file an issue on GitHub.")}Jl.parse=sn;function KD(e,t,n,r,i=new Map,s=new Set){let a=i.get(e);a||(a=new Map,i.set(e,a));let l=a.get(t);if(l)return l;let p={};return a.set(t,p),Object.assign(p,w9(e,t,n,r,i,s))}function C9(e,t,n){return e?{keyName:t,type:n.unknownAny?"UNKNOWN":"ANY"}:{keyName:t,type:"NEVER"}}function JD(e,t){return{keyName:t,params:e,type:"LITERAL"}}function w9(e,t,n,r,i,s){let a=A9((0,ra.getRootSchema)(e)),l=(0,Fr.findKey)(a,p=>p===e);switch(t){case"ALL_OF":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ot(e,l,s,n),params:e.allOf.map(_=>sn(_,n,void 0,i,s)),type:"INTERSECTION"};case"ANY":return Object.assign(Object.assign({},n.unknownAny?Pi.T_UNKNOWN:Pi.T_ANY),{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ot(e,l,s,n)});case"ANY_OF":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ot(e,l,s,n),params:e.anyOf.map(_=>sn(_,n,void 0,i,s)),type:"UNION"};case"BOOLEAN":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ot(e,l,s,n),type:"BOOLEAN"};case"CUSTOM_TYPE":return{comment:e.description,deprecated:e.deprecated,keyName:r,params:e.tsType,standaloneName:ot(e,l,s,n),type:"CUSTOM_TYPE"};case"NAMED_ENUM":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ot(e,l??r,s,n),params:e.enum.map((_,C)=>({ast:JD(_,void 0),keyName:e.tsEnumNames[C]})),type:"ENUM"};case"NAMED_SCHEMA":return zb(e,n,i,s,r);case"NEVER":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ot(e,l,s,n),type:"NEVER"};case"NULL":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ot(e,l,s,n),type:"NULL"};case"NUMBER":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ot(e,l,s,n),type:"NUMBER"};case"OBJECT":return{comment:e.description,keyName:r,standaloneName:ot(e,l,s,n),type:"OBJECT",deprecated:e.deprecated};case"ONE_OF":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ot(e,l,s,n),params:e.oneOf.map(_=>sn(_,n,void 0,i,s)),type:"UNION"};case"REFERENCE":throw Error((0,E9.format)("Refs should have been resolved by the resolver!",e));case"STRING":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ot(e,l,s,n),type:"STRING"};case"TYPED_ARRAY":if(Array.isArray(e.items)){let _=e.minItems,C=e.maxItems,v={comment:e.description,deprecated:e.deprecated,keyName:r,maxItems:C,minItems:_,standaloneName:ot(e,l,s,n),params:e.items.map(b=>sn(b,n,void 0,i,s)),type:"TUPLE"};return e.additionalItems===!0?v.spreadParam=n.unknownAny?Pi.T_UNKNOWN:Pi.T_ANY:e.additionalItems&&(v.spreadParam=sn(e.additionalItems,n,void 0,i,s)),v}else return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ot(e,l,s,n),params:sn(e.items,n,"{keyNameFromDefinition}Items",i,s),type:"ARRAY"};case"UNION":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ot(e,l,s,n),params:e.type.map(_=>{let C=Object.assign(Object.assign({},(0,Fr.omit)(e,"$id","description","title")),{type:_});return(0,Kl.maybeStripDefault)(C),(0,v9.applySchemaTyping)(C),sn(C,n,void 0,i,s)}),type:"UNION"};case"UNNAMED_ENUM":return{comment:e.description,deprecated:e.deprecated,keyName:r,standaloneName:ot(e,l,s,n),params:e.enum.map(_=>JD(_,void 0)),type:"UNION"};case"UNNAMED_SCHEMA":return zb(e,n,i,s,r,l);case"UNTYPED_ARRAY":let p=e.minItems,h=typeof e.maxItems=="number"?e.maxItems:-1,m=n.unknownAny?Pi.T_UNKNOWN:Pi.T_ANY;return p>0||h>=0?{comment:e.description,deprecated:e.deprecated,keyName:r,maxItems:e.maxItems,minItems:p,params:Array(Math.max(h,p)||0).fill(m),spreadParam:h>=0?void 0:m,standaloneName:ot(e,l,s,n),type:"TUPLE"}:{comment:e.description,deprecated:e.deprecated,keyName:r,params:m,standaloneName:ot(e,l,s,n),type:"ARRAY"}}}function ot(e,t,n,r){var i;let s=((i=r.customName)===null||i===void 0?void 0:i.call(r,e,t))||e.title||e.$id||t;if(s)return(0,Kl.generateName)(s,n)}function zb(e,t,n,r,i,s){let a=ot(e,s,r,t);return{comment:e.description,deprecated:e.deprecated,keyName:i,params:x9(e,t,n,r,a),standaloneName:a,superTypes:b9(e,t,n,r),type:"INTERFACE"}}function b9(e,t,n,r){let i=e.extends;return i?i.map(s=>sn(s,t,void 0,n,r)):[]}function x9(e,t,n,r,i){let s=(0,Fr.map)(e.properties,(l,p)=>({ast:sn(l,t,p,n,r),isPatternProperty:!1,isRequired:(0,Fr.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,Fr.map)(e.patternProperties,(l,p)=>{let h=sn(l,t,p,n,r),m=`This interface was referenced by \`${i}\`'s JSON-Schema definition
|
|
99
|
+
via the \`patternProperty\` "${p.replace("*/","*\\/")}".`;return h.comment=h.comment?`${h.comment}
|
|
100
|
+
|
|
101
|
+
${m}`:m,{ast:h,isPatternProperty:!a,isRequired:a||(0,Fr.includes)(e.required||[],p),isUnreachableDefinition:!1,keyName:a?"[k: string]":p}}))),t.unreachableDefinitions&&(s=s.concat((0,Fr.map)(e.$defs,(l,p)=>{let h=sn(l,t,p,n,r),m=`This interface was referenced by \`${i}\`'s JSON-Schema
|
|
102
|
+
via the \`definition\` "${p}".`;return h.comment=h.comment?`${h.comment}
|
|
103
|
+
|
|
104
|
+
${m}`:m,{ast:h,isPatternProperty:!1,isRequired:(0,Fr.includes)(e.required||[],p),isUnreachableDefinition:!0,keyName:p}}))),e.additionalProperties){case void 0:case!0:return a?s:s.concat({ast:t.unknownAny?Pi.T_UNKNOWN_ADDITIONAL_PROPERTIES:Pi.T_ANY_ADDITIONAL_PROPERTIES,isPatternProperty:!1,isRequired:!0,isUnreachableDefinition:!1,keyName:"[k: string]"});case!1:return s;default:return s.concat({ast:sn(e.additionalProperties,t,"[k: string]",n,r),isPatternProperty:!1,isRequired:!0,isUnreachableDefinition:!1,keyName:"[k: string]"})}}function QD(e,t=!0,n=new Set){return n.has(e)?{}:(n.add(e),Array.isArray(e)?e.reduce((r,i)=>Object.assign(Object.assign({},r),QD(i,!1,n)),{}):(0,Fr.isPlainObject)(e)?Object.assign(Object.assign({},t&&S9(e)?e.$defs:{}),Object.keys(e).reduce((r,i)=>Object.assign(Object.assign({},r),QD(e[i],!1,n)),{})):{})}var A9=(0,Fr.memoize)(QD);function S9(e){return"$defs"in e}});var Ql=B(Eu=>{"use strict";d();Object.defineProperty(Eu,"__esModule",{value:!0});Eu.getDeepKeys=Eu.toJSON=void 0;var P9=["function","symbol","undefined"],O9=["constructor","prototype","__proto__"],T9=Object.getPrototypeOf({});function I9(){let e={},t=this;for(let n of Yb(t))if(typeof n=="string"){let r=t[n],i=typeof r;P9.includes(i)||(e[n]=r)}return e}Eu.toJSON=I9;function Yb(e,t=[]){let n=[];for(;e&&e!==T9;)n=n.concat(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e)),e=Object.getPrototypeOf(e);let r=new Set(n);for(let i of t.concat(O9))r.delete(i);return r}Eu.getDeepKeys=Yb});var XD=B(vu=>{"use strict";d();Object.defineProperty(vu,"__esModule",{value:!0});vu.addInspectMethod=vu.format=void 0;var Gb=ze("util"),B9=Ql(),Kb=Gb.inspect.custom||Symbol.for("nodejs.util.inspect.custom");vu.format=Gb.format;function R9(e){e[Kb]=M9}vu.addInspectMethod=R9;function M9(){let e={},t=this;for(let n of B9.getDeepKeys(t)){let r=t[n];e[n]=r}return delete e[Kb],e}});var Xb=B(Er=>{"use strict";d();Object.defineProperty(Er,"__esModule",{value:!0});Er.lazyJoinStacks=Er.joinStacks=Er.isWritableStack=Er.isLazyStack=void 0;var N9=/\r?\n/,j9=/\bono[ @]/;function $9(e){return!!(e&&e.configurable&&typeof e.get=="function")}Er.isLazyStack=$9;function L9(e){return!!(!e||e.writable||typeof e.set=="function")}Er.isWritableStack=L9;function Jb(e,t){let n=Qb(e.stack),r=t?t.stack:void 0;return n&&r?n+`
|
|
105
|
+
|
|
106
|
+
`+r:n||r}Er.joinStacks=Jb;function U9(e,t,n){n?Object.defineProperty(t,"stack",{get:()=>{let r=e.get.apply(t);return Jb({stack:r},n)},enumerable:!1,configurable:!0}):k9(t,e)}Er.lazyJoinStacks=U9;function Qb(e){if(e){let t=e.split(N9),n;for(let r=0;r<t.length;r++){let i=t[r];if(j9.test(i))n===void 0&&(n=r);else if(n!==void 0){t.splice(n,r-n);break}}if(t.length>0)return t.join(`
|
|
107
|
+
`)}return e}function k9(e,t){Object.defineProperty(e,"stack",{get:()=>Qb(t.get.apply(e)),enumerable:!1,configurable:!0})}});var t2=B(Zl=>{"use strict";d();Object.defineProperty(Zl,"__esModule",{value:!0});Zl.extendError=void 0;var Zb=XD(),Xl=Xb(),e2=Ql(),q9=["name","message","stack"];function W9(e,t,n){let r=e;return H9(r,t),t&&typeof t=="object"&&z9(r,t),r.toJSON=e2.toJSON,Zb.addInspectMethod&&Zb.addInspectMethod(r),n&&typeof n=="object"&&Object.assign(r,n),r}Zl.extendError=W9;function H9(e,t){let n=Object.getOwnPropertyDescriptor(e,"stack");Xl.isLazyStack(n)?Xl.lazyJoinStacks(n,e,t):Xl.isWritableStack(n)&&(e.stack=Xl.joinStacks(e,t))}function z9(e,t){let n=e2.getDeepKeys(t,q9),r=e,i=t;for(let s of n)if(r[s]===void 0)try{r[s]=i[s]}catch{}}});var n2=B(Cu=>{"use strict";d();Object.defineProperty(Cu,"__esModule",{value:!0});Cu.normalizeArgs=Cu.normalizeOptions=void 0;var V9=XD();function Y9(e){return e=e||{},{concatMessages:e.concatMessages===void 0?!0:!!e.concatMessages,format:e.format===void 0?V9.format:typeof e.format=="function"?e.format:!1}}Cu.normalizeOptions=Y9;function G9(e,t){let n,r,i,s="";return typeof e[0]=="string"?i=e:typeof e[1]=="string"?(e[0]instanceof Error?n=e[0]:r=e[0],i=e.slice(1)):(n=e[0],r=e[1],i=e.slice(2)),i.length>0&&(t.format?s=t.format.apply(void 0,i):s=i.join(" ")),t.concatMessages&&n&&n.message&&(s+=(s?`
|
|
108
|
+
`:"")+n.message),{originalError:n,props:r,message:s}}Cu.normalizeArgs=G9});var em=B(tf=>{"use strict";d();Object.defineProperty(tf,"__esModule",{value:!0});tf.Ono=void 0;var ef=t2(),r2=n2(),K9=Ql(),J9=ZD;tf.Ono=J9;function ZD(e,t){t=r2.normalizeOptions(t);function n(...r){let{originalError:i,props:s,message:a}=r2.normalizeArgs(r,t),l=new e(a);return ef.extendError(l,i,s)}return n[Symbol.species]=e,n}ZD.toJSON=function(t){return K9.toJSON.call(t)};ZD.extend=function(t,n,r){return r||n instanceof Error?ef.extendError(t,n,r):n?ef.extendError(t,void 0,n):ef.extendError(t)}});var i2=B(nf=>{"use strict";d();Object.defineProperty(nf,"__esModule",{value:!0});nf.ono=void 0;var vo=em(),Q9=vr;nf.ono=Q9;vr.error=new vo.Ono(Error);vr.eval=new vo.Ono(EvalError);vr.range=new vo.Ono(RangeError);vr.reference=new vo.Ono(ReferenceError);vr.syntax=new vo.Ono(SyntaxError);vr.type=new vo.Ono(TypeError);vr.uri=new vo.Ono(URIError);var X9=vr;function vr(...e){let t=e[0];if(typeof t=="object"&&typeof t.name=="string"){for(let n of Object.values(X9))if(typeof n=="function"&&n.name==="ono"){let r=n[Symbol.species];if(r&&r!==Error&&(t instanceof r||t.name===r.name))return n.apply(void 0,e)}}return vr.error.apply(void 0,e)}});var u2=B(o2=>{"use strict";d();Object.defineProperty(o2,"__esModule",{value:!0});var noe=ze("util")});var Rt=B((kn,wu)=>{"use strict";d();var Z9=kn&&kn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),eL=kn&&kn.__exportStar||function(e,t){for(var n in e)n!=="default"&&!t.hasOwnProperty(n)&&Z9(t,e,n)};Object.defineProperty(kn,"__esModule",{value:!0});kn.ono=void 0;var s2=i2();Object.defineProperty(kn,"ono",{enumerable:!0,get:function(){return s2.ono}});var tL=em();Object.defineProperty(kn,"Ono",{enumerable:!0,get:function(){return tL.Ono}});eL(u2(),kn);kn.default=s2.ono;typeof wu=="object"&&typeof wu.exports=="object"&&(wu.exports=Object.assign(wu.exports.default,wu.exports))});var tm=B(ia=>{"use strict";d();var nL=ia&&ia.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ia,"__esModule",{value:!0});ia.default=rL;var a2=nL(ze("path"));function rL(e){return e.startsWith("\\\\?\\")?e:e.split(a2.default?.win32?.sep).join(a2.default?.posix?.sep??"/")}});var c2=B(rf=>{"use strict";d();Object.defineProperty(rf,"__esModule",{value:!0});rf.isWindows=void 0;var iL=/^win/.test(globalThis.process?globalThis.process.platform:""),oL=()=>iL;rf.isWindows=oL});var Cn=B(Le=>{"use strict";d();var uL=Le&&Le.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),sL=Le&&Le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),aL=Le&&Le.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&uL(n,t,r[i]);return sL(n,t),n}})(),cL=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Le,"__esModule",{value:!0});Le.parse=void 0;Le.resolve=l2;Le.cwd=f2;Le.getProtocol=um;Le.getExtension=gL;Le.stripQuery=p2;Le.getHash=d2;Le.stripHash=im;Le.isHttp=_L;Le.isFileSystemPath=om;Le.fromFileSystemPath=yL;Le.toFileSystemPath=FL;Le.safePointerToPath=EL;Le.relative=vL;var uf=cL(tm()),rm=aL(ze("path")),lL=/\//g,fL=/^(\w{2,}):\/\//i,pL=/~1/g,dL=/~0/g,hL=ze("path"),of=c2(),DL=[[/\?/g,"%3F"],[/#/g,"%23"]],nm=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],mL=e=>new URL(e);Le.parse=mL;function l2(e,t){let n=new URL((0,uf.default)(e),"resolve://"),r=new URL((0,uf.default)(t),n),i=t.match(/(\s*)$/)?.[1]||"";if(r.protocol==="resolve:"){let{pathname:s,search:a,hash:l}=r;return s+a+l+i}return r.toString()+i}function f2(){if(typeof window<"u")return location.href;let e=process.cwd(),t=e.slice(-1);return t==="/"||t==="\\"?e:e+"/"}function um(e){let t=fL.exec(e||"");if(t)return t[1].toLowerCase()}function gL(e){let t=e.lastIndexOf(".");return t>=0?p2(e.substr(t).toLowerCase()):""}function p2(e){let t=e.indexOf("?");return t>=0&&(e=e.substr(0,t)),e}function d2(e){if(!e)return"#";let t=e.indexOf("#");return t>=0?e.substring(t):"#"}function im(e){if(!e)return"";let t=e.indexOf("#");return t>=0&&(e=e.substring(0,t)),e}function _L(e){let t=um(e);return t==="http"||t==="https"?!0:t===void 0?typeof window<"u":!1}function om(e){if(typeof window<"u"||typeof process<"u"&&process.browser)return!1;let t=um(e);return t===void 0||t==="file"}function yL(e){if((0,of.isWindows)()){let t=f2(),n=e.toUpperCase(),i=(0,uf.default)(t).toUpperCase(),s=n.includes(i),a=n.includes(i),l=rm.win32?.isAbsolute(e)||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://");!(s||a||l)&&!t.startsWith("http")&&(e=(0,hL.join)(t,e)),e=(0,uf.default)(e)}e=encodeURI(e);for(let t of DL)e=e.replace(t[0],t[1]);return e}function FL(e,t){e=decodeURI(e);for(let r=0;r<nm.length;r+=2)e=e.replace(nm[r],nm[r+1]);let n=e.substr(0,7).toLowerCase()==="file://";return n&&(e=e[7]==="/"?e.substr(8):e.substr(7),(0,of.isWindows)()&&e[1]==="/"&&(e=e[0]+":"+e.substr(1)),t?e="file:///"+e:(n=!1,e=(0,of.isWindows)()?e:"/"+e)),(0,of.isWindows)()&&!n&&(e=e.replace(lL,"\\"),e.substr(1,2)===":\\"&&(e=e[0].toUpperCase()+e.substr(1))),e}function EL(e){return e.length<=1||e[0]!=="#"||e[1]!=="/"?[]:e.slice(2).split("/").map(t=>decodeURIComponent(t).replace(pL,"/").replace(dL,"~"))}function vL(e,t){if(!om(e)||!om(t))return l2(e,t);let n=rm.default.dirname(im(e)),r=im(t);return rm.default.relative(n,r)+d2(t)}});var wn=B(Ke=>{"use strict";d();Object.defineProperty(Ke,"__esModule",{value:!0});Ke.InvalidPointerError=Ke.TimeoutError=Ke.MissingPointerError=Ke.UnmatchedResolverError=Ke.ResolverError=Ke.UnmatchedParserError=Ke.ParserError=Ke.JSONParserErrorGroup=Ke.JSONParserError=void 0;Ke.isHandledError=CL;Ke.normalizeError=wL;var h2=Rt(),sf=Cn(),qn=class extends Error{constructor(t,n){super(),this.code="EUNKNOWN",this.name="JSONParserError",this.message=t,this.source=n,this.path=null,h2.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}};Ke.JSONParserError=qn;var af=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,sf.toFileSystemPath)(t.$refs._root$Ref.path)}'`,h2.Ono.extend(this)}static getParserErrors(t){let n=[];for(let r of Object.values(t.$refs._$refs))r.errors&&n.push(...r.errors);return n}get errors(){return e.getParserErrors(this.files)}};Ke.JSONParserErrorGroup=af;var sm=class extends qn{constructor(t,n){super(`Error parsing ${n}: ${t}`,n),this.code="EPARSER",this.name="ParserError"}};Ke.ParserError=sm;var am=class extends qn{constructor(t){super(`Could not find parser for "${t}"`,t),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}};Ke.UnmatchedParserError=am;var cm=class extends qn{constructor(t,n){super(t.message||`Error reading file "${n}"`,n),this.code="ERESOLVER",this.name="ResolverError","code"in t&&(this.ioErrorCode=String(t.code))}};Ke.ResolverError=cm;var lm=class extends qn{constructor(t){super(`Could not find resolver for "${t}"`,t),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}};Ke.UnmatchedResolverError=lm;var fm=class extends qn{constructor(t,n){super(`Missing $ref pointer "${(0,sf.getHash)(n)}". Token "${t}" does not exist.`,(0,sf.stripHash)(n)),this.code="EMISSINGPOINTER",this.name="MissingPointerError"}};Ke.MissingPointerError=fm;var pm=class extends qn{constructor(t){super(`Dereferencing timeout reached: ${t}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}};Ke.TimeoutError=pm;var dm=class extends qn{constructor(t,n){super(`Invalid $ref pointer "${t}". Pointers must begin with "#/"`,(0,sf.stripHash)(n)),this.code="EUNMATCHEDRESOLVER",this.name="InvalidPointerError"}};Ke.InvalidPointerError=dm;function CL(e){return e instanceof qn||e instanceof af}function wL(e){return e.path===null&&(e.path=[]),e}});var oa=B(Wn=>{"use strict";d();var bL=Wn&&Wn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),xL=Wn&&Wn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),AL=Wn&&Wn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&bL(n,t,r[i]);return xL(n,t),n}})(),SL=Wn&&Wn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wn,"__esModule",{value:!0});var hm=SL(bu()),Dm=AL(Cn()),lf=wn(),PL=/\//g,OL=/~/g,TL=/~1/g,IL=/~0/g,BL=e=>{try{return decodeURIComponent(e)}catch{return e}},ff=class e{constructor(t,n,r){this.$ref=t,this.path=n,this.originalPath=r||n,this.value=void 0,this.circular=!1,this.indirections=0}resolve(t,n,r){let i=e.parse(this.path,this.originalPath);this.value=m2(t);for(let s=0;s<i.length;s++){if(cf(this,n,r)&&(this.path=e.join(this.path,i.slice(s))),typeof this.value=="object"&&this.value!==null&&!g2(r)&&"$ref"in this.value)return this;let a=i[s];if(this.value[a]===void 0||this.value[a]===null&&s===i.length-1){let l=!1;for(let p=i.length-1;p>s;p--){let h=i.slice(s,p+1).join("/");if(this.value[h]!==void 0){this.value=this.value[h],s=p,l=!0;break}}if(l)continue;throw this.value=null,new lf.MissingPointerError(a,decodeURI(this.originalPath))}else this.value=this.value[a]}return(!this.value||this.value.$ref&&Dm.resolve(this.path,this.value.$ref)!==r)&&cf(this,n,r),this}set(t,n,r){let i=e.parse(this.path),s;if(i.length===0)return this.value=n,n;this.value=m2(t);for(let a=0;a<i.length-1;a++)cf(this,r),s=i[a],this.value&&this.value[s]!==void 0?this.value=this.value[s]:this.value=D2(this,s,{});return cf(this,r),s=i[i.length-1],D2(this,s,n),t}static parse(t,n){let r=Dm.getHash(t).substring(1);if(!r)return[];let i=r.split("/");for(let s=0;s<i.length;s++)i[s]=BL(i[s].replace(TL,"/").replace(IL,"~"));if(i[0]!=="")throw new lf.InvalidPointerError(r,n===void 0?t:n);return i.slice(1)}static join(t,n){t.indexOf("#")===-1&&(t+="#"),n=Array.isArray(n)?n:[n];for(let r=0;r<n.length;r++){let i=n[r];t+="/"+encodeURIComponent(i.replace(OL,"~0").replace(PL,"~1"))}return t}};function cf(e,t,n){if(hm.default.isAllowed$Ref(e.value,t)){let r=Dm.resolve(e.path,e.value.$ref);if(r===e.path&&!g2(n))e.circular=!0;else{let i=e.$ref.$refs._resolve(r,e.path,t);return i===null?!1:(e.indirections+=i.indirections+1,hm.default.isExtended$Ref(e.value)?(e.value=hm.default.dereference(e.value,i.value),!1):(e.$ref=i.$ref,e.path=i.path,e.value=i.value,!0))}}}Wn.default=ff;function D2(e,t,n){if(e.value&&typeof e.value=="object")t==="-"&&Array.isArray(e.value)?e.value.push(n):e.value[t]=n;else throw new lf.JSONParserError(`Error assigning $ref pointer "${e.path}".
|
|
109
|
+
Cannot set "${t}" of a non-object.`);return n}function m2(e){if((0,lf.isHandledError)(e))throw e;return e}function g2(e){return typeof e=="string"&&ff.parse(e).length==0}});var bu=B(ua=>{"use strict";d();var RL=ua&&ua.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ua,"__esModule",{value:!0});var _2=RL(oa()),pf=wn(),mm=Cn(),gm=class e{constructor(t){this.errors=[],this.$refs=t}addError(t){this.errors===void 0&&(this.errors=[]);let n=this.errors.map(({footprint:r})=>r);"errors"in t&&Array.isArray(t.errors)?this.errors.push(...t.errors.map(pf.normalizeError).filter(({footprint:r})=>!n.includes(r))):(!("footprint"in t)||!n.includes(t.footprint))&&this.errors.push((0,pf.normalizeError)(t))}exists(t,n){try{return this.resolve(t,n),!0}catch{return!1}}get(t,n){return this.resolve(t,n)?.value}resolve(t,n,r,i){let s=new _2.default(this,t,r);try{return s.resolve(this.value,n,i)}catch(a){if(!n||!n.continueOnError||!(0,pf.isHandledError)(a))throw a;return a.path===null&&(a.path=(0,mm.safePointerToPath)((0,mm.getHash)(i))),a instanceof pf.InvalidPointerError&&(a.source=decodeURI((0,mm.stripHash)(i))),this.addError(a),null}}set(t,n){let r=new _2.default(this,t);this.value=r.set(this.value,n)}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,n){if(this.is$Ref(t)){if(t.$ref.substring(0,2)==="#/"||t.$ref==="#")return!0;if(t.$ref[0]!=="#"&&(!n||n.resolve?.external))return!0}}static isExtended$Ref(t){return e.is$Ref(t)&&Object.keys(t).length>1}static dereference(t,n){if(n&&typeof n=="object"&&e.isExtended$Ref(t)){let r={};for(let i of Object.keys(t))i!=="$ref"&&(r[i]=t[i]);for(let i of Object.keys(n))i in r||(r[i]=n[i]);return r}else return n}};ua.default=gm});var C2=B(Hn=>{"use strict";d();var ML=Hn&&Hn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),NL=Hn&&Hn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),jL=Hn&&Hn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&ML(n,t,r[i]);return NL(n,t),n}})(),v2=Hn&&Hn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hn,"__esModule",{value:!0});var y2=Rt(),$L=v2(bu()),Oi=jL(Cn()),F2=v2(tm()),_m=class{paths(...t){return E2(this._$refs,t.flat()).map(r=>(0,F2.default)(r.decoded))}values(...t){let n=this._$refs;return E2(n,t.flat()).reduce((i,s)=>(i[(0,F2.default)(s.decoded)]=n[s.encoded].value,i),{})}exists(t,n){try{return this._resolve(t,"",n),!0}catch{return!1}}get(t,n){return this._resolve(t,"",n).value}set(t,n){let r=Oi.resolve(this._root$Ref.path,t),i=Oi.stripHash(r),s=this._$refs[i];if(!s)throw(0,y2.ono)(`Error resolving $ref pointer "${t}".
|
|
110
|
+
"${i}" not found.`);s.set(r,n)}_get$Ref(t){t=Oi.resolve(this._root$Ref.path,t);let n=Oi.stripHash(t);return this._$refs[n]}_add(t){let n=Oi.stripHash(t),r=new $L.default(this);return r.path=n,this._$refs[n]=r,this._root$Ref=this._root$Ref||r,r}_resolve(t,n,r){let i=Oi.resolve(this._root$Ref.path,t),s=Oi.stripHash(i),a=this._$refs[s];if(!a)throw(0,y2.ono)(`Error resolving $ref pointer "${t}".
|
|
111
|
+
"${s}" not found.`);return a.resolve(i,r,t,n)}constructor(){this._$refs={},this.toJSON=this.values,this.circular=!1,this._$refs={},this._root$Ref=null}};Hn.default=_m;function E2(e,t){let n=Object.keys(e);return t=Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t),t.length>0&&t[0]&&(n=n.filter(r=>t.includes(e[r].pathType))),n.map(r=>({encoded:r,decoded:e[r].pathType==="file"?Oi.toFileSystemPath(r,!0):r}))}});var b2=B(xu=>{"use strict";d();Object.defineProperty(xu,"__esModule",{value:!0});xu.all=LL;xu.filter=UL;xu.sort=kL;xu.run=qL;function LL(e){return Object.keys(e||{}).filter(t=>typeof e[t]=="object").map(t=>(e[t].name=t,e[t]))}function UL(e,t,n){return e.filter(r=>!!w2(r,t,n))}function kL(e){for(let t of e)t.order=t.order||Number.MAX_SAFE_INTEGER;return e.sort((t,n)=>t.order-n.order)}async function qL(e,t,n,r){let i,s,a=0;return new Promise((l,p)=>{h();function h(){if(i=e[a++],!i)return p(s);try{let v=w2(i,t,n,m,r);if(v&&typeof v.then=="function")v.then(_,C);else if(v!==void 0)_(v);else if(a===e.length)throw new Error("No promise has been returned or callback has been called.")}catch(v){C(v)}}function m(v,b){v?C(v):_(b)}function _(v){l({plugin:i,result:v})}function C(v){s={plugin:i,error:v},h()}})}function w2(e,t,n,r,i){let s=e[t];if(typeof s=="function")return s.apply(e,[n,r,i]);if(!r){if(s instanceof RegExp)return s.test(n.url);if(typeof s=="string")return s===n.extension;if(Array.isArray(s))return s.indexOf(n.extension)!==-1}return s}});var Fm=B(zr=>{"use strict";d();var WL=zr&&zr.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),HL=zr&&zr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),x2=zr&&zr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&WL(n,t,r[i]);return HL(n,t),n}})();Object.defineProperty(zr,"__esModule",{value:!0});var ym=Rt(),zL=x2(Cn()),Ti=x2(b2()),Co=wn();async function VL(e,t,n){let r=e.indexOf("#"),i="";r>=0&&(i=e.substring(r),e=e.substring(0,r));let s=t._add(e),a={url:e,hash:i,extension:zL.getExtension(e)};try{let l=await YL(a,n,t);s.pathType=l.plugin.name,a.data=l.result;let p=await GL(a,n,t);return s.value=p.result,p.result}catch(l){throw(0,Co.isHandledError)(l)&&(s.value=l),l}}async function YL(e,t,n){let r=Ti.all(t.resolve);r=Ti.filter(r,"canRead",e),Ti.sort(r);try{return await Ti.run(r,"read",e,n)}catch(i){throw!i&&t.continueOnError?new Co.UnmatchedResolverError(e.url):!i||!("error"in i)?ym.ono.syntax(`Unable to resolve $ref pointer "${e.url}"`):i.error instanceof Co.ResolverError?i.error:new Co.ResolverError(i,e.url)}}async function GL(e,t,n){let r=Ti.all(t.parse),i=Ti.filter(r,"canParse",e),s=i.length>0?i:r;Ti.sort(s);try{let a=await Ti.run(s,"parse",e,n);if(!a.plugin.allowEmpty&&KL(a.result))throw ym.ono.syntax(`Error parsing "${e.url}" as ${a.plugin.name}.
|
|
112
|
+
Parsed value is empty`);return a}catch(a){throw!a&&t.continueOnError?new Co.UnmatchedParserError(e.url):a&&a.message&&a.message.startsWith("Error parsing")?a:!a||!("error"in a)?ym.ono.syntax(`Unable to parse ${e.url}`):a.error instanceof Co.ParserError?a.error:new Co.ParserError(a.error.message,e.url)}}function KL(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}zr.default=VL});var S2=B(Em=>{"use strict";d();Object.defineProperty(Em,"__esModule",{value:!0});var A2=wn();Em.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(n){if(this.allowBOM)try{let r=t.indexOf("{");return t=t.slice(r),JSON.parse(t)}catch(r){throw new A2.ParserError(r.message,e.url)}throw new A2.ParserError(n.message,e.url)}}else return t}}});var P2=B(sa=>{"use strict";d();var JL=sa&&sa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sa,"__esModule",{value:!0});var QL=wn(),XL=JL(mu()),ZL=mu();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 XL.default.load(t,{schema:ZL.JSON_SCHEMA})}catch(n){throw new QL.ParserError(n?.message||"Parser Error",e.url)}else return t}}});var O2=B(vm=>{"use strict";d();Object.defineProperty(vm,"__esModule",{value:!0});var eU=wn(),tU=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;vm.default={order:300,allowEmpty:!0,encoding:"utf8",canParse(e){return(typeof e.data=="string"||Buffer.isBuffer(e.data))&&tU.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 eU.ParserError("data is not text",e.url)}}});var T2=B(Cm=>{"use strict";d();Object.defineProperty(Cm,"__esModule",{value:!0});var nU=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;Cm.default={order:400,allowEmpty:!0,canParse(e){return Buffer.isBuffer(e.data)&&nU.test(e.url)},parse(e){return Buffer.isBuffer(e.data)?e.data:Buffer.from(e.data)}}});var M2=B(zn=>{"use strict";d();var rU=zn&&zn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),iU=zn&&zn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),oU=zn&&zn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&rU(n,t,r[i]);return iU(n,t),n}})(),uU=zn&&zn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zn,"__esModule",{value:!0});var sU=uU(ze("fs")),I2=Rt(),B2=oU(Cn()),R2=wn();zn.default={order:100,canRead(e){return B2.isFileSystemPath(e.url)},async read(e){let t;try{t=B2.toFileSystemPath(e.url)}catch(n){throw new R2.ResolverError(I2.ono.uri(n,`Malformed URI: ${e.url}`),e.url)}try{return await sU.default.promises.readFile(t)}catch(n){throw new R2.ResolverError((0,I2.ono)(n,`Error opening file "${t}"`),t)}}}});var $2=B(Vr=>{"use strict";d();var aU=Vr&&Vr.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),cU=Vr&&Vr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),lU=Vr&&Vr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&aU(n,t,r[i]);return cU(n,t),n}})();Object.defineProperty(Vr,"__esModule",{value:!0});var df=Rt(),aa=lU(Cn()),N2=wn();Vr.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),j2(t,this)}};async function j2(e,t,n){e=aa.parse(e);let r=n||[];r.push(e.href);try{let i=await fU(e,t);if(i.status>=400)throw(0,df.ono)({status:i.status},`HTTP ERROR ${i.status}`);if(i.status>=300){if(!Number.isNaN(t.redirects)&&r.length>t.redirects)throw new N2.ResolverError((0,df.ono)({status:i.status},`Error downloading ${r[0]}.
|
|
113
|
+
Too many redirects:
|
|
114
|
+
${r.join(`
|
|
115
|
+
`)}`));if(!("location"in i.headers)||!i.headers.location)throw(0,df.ono)({status:i.status},`HTTP ${i.status} redirect with no location header`);{let s=aa.resolve(e.href,i.headers.location);return j2(s,t,r)}}else{if(i.body){let s=await i.arrayBuffer();return Buffer.from(s)}return Buffer.alloc(0)}}catch(i){throw new N2.ResolverError((0,df.ono)(i,`Error downloading ${e.href}`),e.href)}}async function fU(e,t){let n,r;t.timeout&&(n=new AbortController,r=setTimeout(()=>n.abort(),t.timeout));let i=await fetch(e,{method:"GET",headers:t.headers||{},credentials:t.withCredentials?"include":"same-origin",signal:n?n.signal:null});return r&&clearTimeout(r),i}});var wm=B(Yr=>{"use strict";d();var Au=Yr&&Yr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yr,"__esModule",{value:!0});Yr.getNewOptions=Yr.getJsonSchemaRefParserDefaultOptions=void 0;var pU=Au(S2()),dU=Au(P2()),hU=Au(O2()),DU=Au(T2()),mU=Au(M2()),gU=Au($2()),_U=()=>({parse:{json:{...pU.default},yaml:{...dU.default},text:{...hU.default},binary:{...DU.default}},resolve:{file:{...mU.default},http:{...gU.default},external:!0},continueOnError:!1,dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative"},mutateInputSchema:!0});Yr.getJsonSchemaRefParserDefaultOptions=_U;var yU=e=>{let t=(0,Yr.getJsonSchemaRefParserDefaultOptions)();return e&&U2(t,e),t};Yr.getNewOptions=yU;function U2(e,t){if(L2(t)){let n=Object.keys(t).filter(r=>!["__proto__","constructor","prototype"].includes(r));for(let r=0;r<n.length;r++){let i=n[r],s=t[i],a=e[i];L2(s)?e[i]=U2(a||{},s):s!==void 0&&(e[i]=s)}}return e}function L2(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}});var q2=B(hf=>{"use strict";d();Object.defineProperty(hf,"__esModule",{value:!0});hf.normalizeArgs=k2;var FU=wm();function k2(e){let t,n,r,i,s=Array.prototype.slice.call(e);typeof s[s.length-1]=="function"&&(i=s.pop()),typeof s[0]=="string"?(t=s[0],typeof s[2]=="object"?(n=s[1],r=s[2]):(n=void 0,r=s[1])):(t="",n=s[0],r=s[1]);try{r=(0,FU.getNewOptions)(r)}catch(a){console.error(`JSON Schema Ref Parser: Error normalizing options: ${a}`)}return!r.mutateInputSchema&&typeof n=="object"&&(n=JSON.parse(JSON.stringify(n))),{path:t,schema:n,options:r,callback:i}}hf.default=k2});var W2=B(Vn=>{"use strict";d();var EU=Vn&&Vn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),vU=Vn&&Vn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),CU=Vn&&Vn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&EU(n,t,r[i]);return vU(n,t),n}})(),bm=Vn&&Vn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vn,"__esModule",{value:!0});var wU=bm(bu()),bU=bm(oa()),xU=bm(Fm()),Su=CU(Cn()),AU=wn();function SU(e,t){if(!t.resolve?.external)return Promise.resolve();try{let n=xm(e.schema,e.$refs._root$Ref.path+"#",e.$refs,t);return Promise.all(n)}catch(n){return Promise.reject(n)}}function xm(e,t,n,r,i,s){i||(i=new Set);let a=[];if(e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!i.has(e)){i.add(e),wU.default.isExternal$Ref(e)&&a.push(PU(e,t,n,r));let l=Object.keys(e);for(let p of l){let h=bU.default.join(t,p),m=e[p];a=a.concat(xm(m,h,n,r,i,s))}}return a}async function PU(e,t,n,r){let i=r.dereference?.externalReferenceResolution==="root",s=Su.resolve(i?Su.cwd():t,e.$ref),a=Su.stripHash(s),l=n._$refs[a];if(l)return Promise.resolve(l.value);try{let p=await(0,xU.default)(s,n,r),h=xm(p,a+"#",n,r,new Set,!0);return Promise.all(h)}catch(p){if(!r?.continueOnError||!(0,AU.isHandledError)(p))throw p;return n._$refs[a]&&(p.source=decodeURI(Su.stripHash(t)),p.path=Su.safePointerToPath(Su.getHash(t))),[]}}Vn.default=SU});var V2=B(Yn=>{"use strict";d();var OU=Yn&&Yn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),TU=Yn&&Yn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),IU=Yn&&Yn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&OU(n,t,r[i]);return TU(n,t),n}})(),z2=Yn&&Yn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yn,"__esModule",{value:!0});var Df=z2(bu()),ca=z2(oa()),Am=IU(Cn());function BU(e,t){let n=[];Sm(e,"schema",e.$refs._root$Ref.path+"#","#",0,n,e.$refs,t),RU(n)}function Sm(e,t,n,r,i,s,a,l){let p=t===null?e:e[t];if(p&&typeof p=="object"&&!ArrayBuffer.isView(p))if(Df.default.isAllowed$Ref(p))H2(e,t,n,r,i,s,a,l);else{let h=Object.keys(p).sort((m,_)=>m==="definitions"?-1:_==="definitions"?1:m.length-_.length);for(let m of h){let _=ca.default.join(n,m),C=ca.default.join(r,m),v=p[m];Df.default.isAllowed$Ref(v)?H2(p,m,n,C,i,s,a,l):Sm(p,m,_,C,i,s,a,l)}}}function H2(e,t,n,r,i,s,a,l){let p=t===null?e:e[t],h=Am.resolve(n,p.$ref),m=a._resolve(h,r,l);if(m===null)return;let C=ca.default.parse(r).length,v=Am.stripHash(m.path),b=Am.getHash(m.path),A=v!==a._root$Ref.path,O=Df.default.isExtended$Ref(p);i+=m.indirections;let T=MU(s,e,t);if(T)if(C<T.depth||i<T.indirections)NU(s,T);else return;s.push({$ref:p,parent:e,key:t,pathFromRoot:r,depth:C,file:v,hash:b,value:m.value,circular:m.circular,extended:O,external:A,indirections:i}),(!T||A)&&Sm(m.value,null,m.path,r,i+1,s,a,l)}function RU(e){e.sort((i,s)=>{if(i.file!==s.file)return i.file<s.file?-1:1;if(i.hash!==s.hash)return i.hash<s.hash?-1:1;if(i.circular!==s.circular)return i.circular?-1:1;if(i.extended!==s.extended)return i.extended?1:-1;if(i.indirections!==s.indirections)return i.indirections-s.indirections;if(i.depth!==s.depth)return i.depth-s.depth;{let a=i.pathFromRoot.lastIndexOf("/definitions"),l=s.pathFromRoot.lastIndexOf("/definitions");return a!==l?l-a:i.pathFromRoot.length-s.pathFromRoot.length}});let t,n,r;for(let i of e)i.external?i.file===t&&i.hash===n?i.$ref.$ref=r:i.file===t&&i.hash.indexOf(n+"/")===0?i.$ref.$ref=ca.default.join(r,ca.default.parse(i.hash.replace(n,"#"))):(t=i.file,n=i.hash,r=i.pathFromRoot,i.$ref=i.parent[i.key]=Df.default.dereference(i.$ref,i.value),i.circular&&(i.$ref.$ref=i.pathFromRoot)):i.$ref.$ref=i.hash}function MU(e,t,n){for(let r of e)if(r&&r.parent===t&&r.key===n)return r}function NU(e,t){let n=e.indexOf(t);e.splice(n,1)}Yn.default=BU});var X2=B(Gn=>{"use strict";d();var jU=Gn&&Gn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),$U=Gn&&Gn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),LU=Gn&&Gn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&jU(n,t,r[i]);return $U(n,t),n}})(),J2=Gn&&Gn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gn,"__esModule",{value:!0});var mf=J2(bu()),Y2=J2(oa()),UU=Rt(),G2=LU(Cn()),kU=wn();Gn.default=qU;function qU(e,t){let n=Date.now(),r=Pm(e.schema,e.$refs._root$Ref.path,"#",new Set,new Set,new Map,e.$refs,t,n);e.$refs.circular=r.circular,e.schema=r.value}function Pm(e,t,n,r,i,s,a,l,p){let h,m={value:e,circular:!1};if(l&&l.timeoutMs&&Date.now()-p>l.timeoutMs)throw new kU.TimeoutError(l.timeoutMs);let _=l.dereference||{},C=_.excludedPathMatcher||(()=>!1);if((_?.circular==="ignore"||!i.has(e))&&e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!C(n)){if(r.add(e),i.add(e),mf.default.isAllowed$Ref(e,l))h=K2(e,t,n,r,i,s,a,l,p),m.circular=h.circular,m.value=h.value;else for(let v of Object.keys(e)){let b=Y2.default.join(t,v),A=Y2.default.join(n,v);if(C(A))continue;let O=e[v],T=!1;mf.default.isAllowed$Ref(O,l)?(h=K2(O,b,A,r,i,s,a,l,p),T=h.circular,e[v]!==h.value&&(e[v]=h.value,_?.onDereference?.(O.$ref,e[v],e,v))):r.has(O)?T=Q2(b,a,l):(h=Pm(O,b,A,r,i,s,a,l,p),T=h.circular,e[v]!==h.value&&(e[v]=h.value)),m.circular=m.circular||T}r.delete(e)}return m}function K2(e,t,n,r,i,s,a,l,p){let m=mf.default.isExternal$Ref(e)&&l?.dereference?.externalReferenceResolution==="root",_=G2.resolve(m?G2.cwd():t,e.$ref),C=s.get(_);if(C&&!C.circular){let L=Object.keys(e);if(L.length>1){let q={};for(let Q of L)Q!=="$ref"&&!(Q in C.value)&&(q[Q]=e[Q]);return{circular:C.circular,value:Object.assign({},C.value,q)}}return C}let v=a._resolve(_,t,l);if(v===null)return{circular:!1,value:null};let b=v.circular,A=b||r.has(v.value);A&&Q2(t,a,l);let O=mf.default.dereference(e,v.value);if(!A){let L=Pm(O,v.path,n,r,i,s,a,l,p);A=L.circular,O=L.value}A&&!b&&l.dereference?.circular==="ignore"&&(O=e),b&&(O.$ref=n);let T={circular:A,value:O};return Object.keys(e).length===1&&s.set(_,T),T}function Q2(e,t,n){if(t.circular=!0,!n.dereference.circular)throw UU.ono.reference(`Circular $ref pointer found at ${e}`);return!0}});var Z2=B(Om=>{"use strict";d();Object.defineProperty(Om,"__esModule",{value:!0});function WU(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}Om.default=WU()});var t1=B(la=>{"use strict";d();var HU=la&&la.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(la,"__esModule",{value:!0});la.default=zU;var e1=HU(Z2());function zU(e,t){if(e){t.then(function(n){(0,e1.default)(function(){e(null,n)})},function(n){(0,e1.default)(function(){e(n)})});return}else return t}});var o1=B(oe=>{"use strict";d();var VU=oe&&oe.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),YU=oe&&oe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),GU=oe&&oe.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&VU(n,t,r[i]);return YU(n,t),n}})(),bo=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 n1=bo(C2()),KU=bo(Fm()),fa=bo(q2());oe.jsonSchemaParserNormalizeArgs=fa.default;var JU=bo(W2()),QU=bo(V2()),i1=bo(X2());oe.dereferenceInternal=i1.default;var wo=GU(Cn()),bn=wn();Object.defineProperty(oe,"JSONParserError",{enumerable:!0,get:function(){return bn.JSONParserError}});Object.defineProperty(oe,"InvalidPointerError",{enumerable:!0,get:function(){return bn.InvalidPointerError}});Object.defineProperty(oe,"MissingPointerError",{enumerable:!0,get:function(){return bn.MissingPointerError}});Object.defineProperty(oe,"ResolverError",{enumerable:!0,get:function(){return bn.ResolverError}});Object.defineProperty(oe,"ParserError",{enumerable:!0,get:function(){return bn.ParserError}});Object.defineProperty(oe,"UnmatchedParserError",{enumerable:!0,get:function(){return bn.UnmatchedParserError}});Object.defineProperty(oe,"UnmatchedResolverError",{enumerable:!0,get:function(){return bn.UnmatchedResolverError}});Object.defineProperty(oe,"isHandledError",{enumerable:!0,get:function(){return bn.isHandledError}});Object.defineProperty(oe,"JSONParserErrorGroup",{enumerable:!0,get:function(){return bn.JSONParserErrorGroup}});var r1=Rt(),Kn=bo(t1()),XU=wm();Object.defineProperty(oe,"getJsonSchemaRefParserDefaultOptions",{enumerable:!0,get:function(){return XU.getJsonSchemaRefParserDefaultOptions}});var Ii=class e{constructor(){this.schema=null,this.$refs=new n1.default}async parse(){let t=(0,fa.default)(arguments),n;if(!t.path&&!t.schema){let i=(0,r1.ono)(`Expected a file path, URL, or object. Got ${t.path||t.schema}`);return(0,Kn.default)(t.callback,Promise.reject(i))}this.schema=null,this.$refs=new n1.default;let r="http";if(wo.isFileSystemPath(t.path))t.path=wo.fromFileSystemPath(t.path),r="file";else if(!t.path&&t.schema&&"$id"in t.schema&&t.schema.$id){let i=wo.parse(t.schema.$id),s=i.protocol==="https:"?443:80;t.path=`${i.protocol}//${i.hostname}:${s}`}if(t.path=wo.resolve(wo.cwd(),t.path),t.schema&&typeof t.schema=="object"){let i=this.$refs._add(t.path);i.value=t.schema,i.pathType=r,n=Promise.resolve(t.schema)}else n=(0,KU.default)(t.path,this.$refs,t.options);try{let i=await n;if(i!==null&&typeof i=="object"&&!Buffer.isBuffer(i))return this.schema=i,(0,Kn.default)(t.callback,Promise.resolve(this.schema));if(t.options.continueOnError)return this.schema=null,(0,Kn.default)(t.callback,Promise.resolve(this.schema));throw r1.ono.syntax(`"${this.$refs._root$Ref.path||i}" is not a valid JSON Schema`)}catch(i){return!t.options.continueOnError||!(0,bn.isHandledError)(i)?(0,Kn.default)(t.callback,Promise.reject(i)):(this.$refs._$refs[wo.stripHash(t.path)]&&this.$refs._$refs[wo.stripHash(t.path)].addError(i),(0,Kn.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,JU.default)(this,t.options),Tm(this),(0,Kn.default)(t.callback,Promise.resolve(this.$refs))}catch(n){return(0,Kn.default)(t.callback,Promise.reject(n))}}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,QU.default)(this,t.options),Tm(this),(0,Kn.default)(t.callback,Promise.resolve(this.schema))}catch(n){return(0,Kn.default)(t.callback,Promise.reject(n))}}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,i1.default)(this,t.options),Tm(this),(0,Kn.default)(t.callback,Promise.resolve(this.schema))}catch(n){return(0,Kn.default)(t.callback,Promise.reject(n))}}};oe.$RefParser=Ii;oe.default=Ii;function Tm(e){if(bn.JSONParserErrorGroup.getParserErrors(e).length>0)throw new bn.JSONParserErrorGroup(e)}oe.parse=Ii.parse;oe.resolve=Ii.resolve;oe.bundle=Ii.bundle;oe.dereference=Ii.dereference});var u1=B(Pu=>{"use strict";d();var ZU=Pu&&Pu.__awaiter||function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function l(m){try{h(r.next(m))}catch(_){a(_)}}function p(m){try{h(r.throw(m))}catch(_){a(_)}}function h(m){m.done?s(m.value):i(m.value).then(l,p)}h((r=r.apply(e,t||[])).next())})};Object.defineProperty(Pu,"__esModule",{value:!0});Pu.dereference=void 0;var ek=o1(),tk=Si();function nk(e,t){return ZU(this,arguments,void 0,function*(n,{cwd:r,$refOptions:i}){(0,tk.log)("green","dereferencer","Dereferencing input schema:",r,n);let s=new ek.$RefParser,a=new WeakMap,l=yield s.dereference(r,n,Object.assign(Object.assign({},i),{dereference:Object.assign(Object.assign({},i.dereference),{onDereference(p,h){a.set(h,p)}})}));return{dereferencedPaths:a,dereferencedSchema:l}})}Pu.dereference=nk});var s1=B(gf=>{"use strict";d();Object.defineProperty(gf,"__esModule",{value:!0});gf.validate=void 0;var rk=Si(),xo=new Map;xo.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});xo.set("tsEnumNames must be an array of strings",e=>{if(e.tsEnumNames&&e.tsEnumNames.some(t=>typeof t!="string"))return!1});xo.set("When both maxItems and minItems are present, maxItems >= minItems",e=>{let{maxItems:t,minItems:n}=e;if(typeof t=="number"&&typeof n=="number")return t>=n});xo.set("When maxItems exists, maxItems >= 0",e=>{let{maxItems:t}=e;if(typeof t=="number")return t>=0});xo.set("When minItems exists, minItems >= 0",e=>{let{minItems:t}=e;if(typeof t=="number")return t>=0});xo.set("deprecated must be a boolean",e=>{let t=typeof e.deprecated;return t==="boolean"||t==="undefined"});function ik(e,t){let n=[];return xo.forEach((r,i)=>{(0,rk.traverse)(e,(s,a)=>(r(s)===!1&&n.push(`Error at key "${a}" in file "${t}": ${i}`),s))}),n}gf.validate=ik});var c1=B(_f=>{"use strict";d();Object.defineProperty(_f,"__esModule",{value:!0});_f.link=void 0;var a1=mo(),ok=kr();function Im(e,t=null){if(!Array.isArray(e)&&!(0,ok.isPlainObject)(e)||e.hasOwnProperty(a1.Parent))return e;Object.defineProperty(e,a1.Parent,{enumerable:!1,value:t,writable:!1}),Array.isArray(e)&&e.forEach(n=>Im(n,e));for(let n in e)Im(e[n],e);return e}_f.link=Im});var l1=B(yf=>{"use strict";d();Object.defineProperty(yf,"__esModule",{value:!0});yf.validateOptions=void 0;function uk({maxItems:e}){if(e!==void 0&&e<-1)throw RangeError(`Expected options.maxItems to be >= -1, but was given ${e}.`)}yf.validateOptions=uk});var HD=B(Wt=>{"use strict";d();var sk=Wt&&Wt.__awaiter||function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function l(m){try{h(r.next(m))}catch(_){a(_)}}function p(m){try{h(r.throw(m))}catch(_){a(_)}}function h(m){m.done?s(m.value):i(m.value).then(l,p)}h((r=r.apply(e,t||[])).next())})};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.ValidationError=Wt.compile=Wt.compileFromFile=Wt.DEFAULT_OPTIONS=void 0;var ak=ze("fs"),Bm=kr(),ck=ze("path"),lk=gw(),fk=WD(),pk=kb(),dk=Hb(),hk=Vb(),Dk=u1(),an=Si(),mk=s1(),gk=ze("util"),_k=c1(),yk=l1();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 Fk(e,t=Wt.DEFAULT_OPTIONS){let n=Ek(e);return f1(n,(0,an.stripExtension)(e),Object.assign({cwd:(0,ck.dirname)(e)},t))}Wt.compileFromFile=Fk;function Ek(e){let t=(0,an.Try)(()=>(0,ak.readFileSync)(e),()=>{throw new ReferenceError(`Unable to read file "${e}"`)});return(0,an.parseFileAsJSONSchema)(e,t.toString())}function f1(e,t){return sk(this,arguments,void 0,function*(n,r,i={}){(0,yk.validateOptions)(i);let s=(0,Bm.merge)({},Wt.DEFAULT_OPTIONS,i),a=Date.now();function l(){return`(${Date.now()-a}ms)`}(0,Bm.endsWith)(s.cwd,"/")||(s.cwd+="/");let p=(0,Bm.cloneDeep)(n),{dereferencedPaths:h,dereferencedSchema:m}=yield(0,Dk.dereference)(p,s);process.env.VERBOSE&&((0,gk.isDeepStrictEqual)(p,m)?(0,an.log)("green","dereferencer",l(),"\u2705 No change"):(0,an.log)("green","dereferencer",l(),"\u2705 Result:",m));let _=(0,_k.link)(m);process.env.VERBOSE&&(0,an.log)("green","linker",l(),"\u2705 No change");let C=(0,mk.validate)(_,r);if(C.length)throw C.forEach(L=>(0,an.error)(L)),new Ff;process.env.VERBOSE&&(0,an.log)("green","validator",l(),"\u2705 No change");let v=(0,pk.normalize)(_,h,r,s);(0,an.log)("yellow","normalizer",l(),"\u2705 Result:",v);let b=(0,hk.parse)(v,s);(0,an.log)("blue","parser",l(),"\u2705 Result:",b);let A=(0,dk.optimize)(b,s);(0,an.log)("cyan","optimizer",l(),"\u2705 Result:",A);let O=(0,fk.generate)(A,s);(0,an.log)("magenta","generator",l(),"\u2705 Result:",O);let T=yield(0,lk.format)(O,s);return(0,an.log)("white","formatter",l(),"\u2705 Result:",T),T})}Wt.compile=f1;var Ff=class extends Error{};Wt.ValidationError=Ff});var jm=B(ha=>{"use strict";d();var t4=ha&&ha.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ha,"__esModule",{value:!0});ha.default=n4;var L1=t4(ze("path"));function n4(e){return e.startsWith("\\\\?\\")?e:e.split(L1.default?.win32?.sep).join(L1.default?.posix?.sep??"/")}});var U1=B(vf=>{"use strict";d();Object.defineProperty(vf,"__esModule",{value:!0});vf.isWindows=void 0;var r4=/^win/.test(globalThis.process?globalThis.process.platform:""),i4=()=>r4;vf.isWindows=i4});var xn=B(Ue=>{"use strict";d();var o4=Ue&&Ue.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),u4=Ue&&Ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),s4=Ue&&Ue.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&o4(n,t,r[i]);return u4(n,t),n}})(),a4=Ue&&Ue.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.parse=void 0;Ue.resolve=k1;Ue.cwd=q1;Ue.getProtocol=qm;Ue.getExtension=m4;Ue.stripQuery=W1;Ue.getHash=H1;Ue.stripHash=Um;Ue.isHttp=g4;Ue.isFileSystemPath=km;Ue.fromFileSystemPath=_4;Ue.toFileSystemPath=y4;Ue.safePointerToPath=F4;Ue.relative=E4;var wf=a4(jm()),Lm=s4(ze("path")),c4=/\//g,l4=/^(\w{2,}):\/\//i,f4=/~1/g,p4=/~0/g,d4=ze("path"),Cf=U1(),h4=[[/\?/g,"%3F"],[/#/g,"%23"]],$m=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],D4=e=>new URL(e);Ue.parse=D4;function k1(e,t){let n=new URL((0,wf.default)(e),"https://aaa.nonexistanturl.com"),r=new URL((0,wf.default)(t),n),i=t.match(/(\s*)$/)?.[1]||"";if(r.hostname==="aaa.nonexistanturl.com"){let{pathname:s,search:a,hash:l}=r;return s+a+l+i}return r.toString()+i}function q1(){if(typeof window<"u")return location.href;let e=process.cwd(),t=e.slice(-1);return t==="/"||t==="\\"?e:e+"/"}function qm(e){let t=l4.exec(e||"");if(t)return t[1].toLowerCase()}function m4(e){let t=e.lastIndexOf(".");return t>=0?W1(e.substr(t).toLowerCase()):""}function W1(e){let t=e.indexOf("?");return t>=0&&(e=e.substr(0,t)),e}function H1(e){if(!e)return"#";let t=e.indexOf("#");return t>=0?e.substring(t):"#"}function Um(e){if(!e)return"";let t=e.indexOf("#");return t>=0&&(e=e.substring(0,t)),e}function g4(e){let t=qm(e);return t==="http"||t==="https"?!0:t===void 0?typeof window<"u":!1}function km(e){if(typeof window<"u"||typeof process<"u"&&process.browser)return!1;let t=qm(e);return t===void 0||t==="file"}function _4(e){if((0,Cf.isWindows)()){let t=q1(),n=e.toUpperCase(),i=(0,wf.default)(t).toUpperCase(),s=n.includes(i),a=n.includes(i),l=Lm.win32?.isAbsolute(e)||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://");!(s||a||l)&&!t.startsWith("http")&&(e=(0,d4.join)(t,e)),e=(0,wf.default)(e)}e=encodeURI(e);for(let t of h4)e=e.replace(t[0],t[1]);return e}function y4(e,t){e=decodeURI(e);for(let r=0;r<$m.length;r+=2)e=e.replace($m[r],$m[r+1]);let n=e.substr(0,7).toLowerCase()==="file://";return n&&(e=e[7]==="/"?e.substr(8):e.substr(7),(0,Cf.isWindows)()&&e[1]==="/"&&(e=e[0]+":"+e.substr(1)),t?e="file:///"+e:(n=!1,e=(0,Cf.isWindows)()?e:"/"+e)),(0,Cf.isWindows)()&&!n&&(e=e.replace(c4,"\\"),e.substr(1,2)===":\\"&&(e=e[0].toUpperCase()+e.substr(1))),e}function F4(e){return e.length<=1||e[0]!=="#"||e[1]!=="/"?[]:e.slice(2).split("/").map(t=>decodeURIComponent(t).replace(f4,"/").replace(p4,"~"))}function E4(e,t){if(!km(e)||!km(t))return k1(e,t);let n=Lm.default.dirname(Um(e)),r=Um(t);return Lm.default.relative(n,r)+H1(t)}});var An=B(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=v4;Je.normalizeError=C4;var z1=Rt(),bf=xn(),Jn=class extends Error{constructor(t,n){super(),this.code="EUNKNOWN",this.name="JSONParserError",this.message=t,this.source=n,this.path=null,z1.Ono.extend(this)}get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}};Je.JSONParserError=Jn;var xf=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,bf.toFileSystemPath)(t.$refs._root$Ref.path)}'`,z1.Ono.extend(this)}static getParserErrors(t){let n=[];for(let r of Object.values(t.$refs._$refs))r.errors&&n.push(...r.errors);return n}get errors(){return e.getParserErrors(this.files)}};Je.JSONParserErrorGroup=xf;var Wm=class extends Jn{constructor(t,n){super(`Error parsing ${n}: ${t}`,n),this.code="EPARSER",this.name="ParserError"}};Je.ParserError=Wm;var Hm=class extends Jn{constructor(t){super(`Could not find parser for "${t}"`,t),this.code="EUNMATCHEDPARSER",this.name="UnmatchedParserError"}};Je.UnmatchedParserError=Hm;var zm=class extends Jn{constructor(t,n){super(t.message||`Error reading file "${n}"`,n),this.code="ERESOLVER",this.name="ResolverError","code"in t&&(this.ioErrorCode=String(t.code))}};Je.ResolverError=zm;var Vm=class extends Jn{constructor(t){super(`Could not find resolver for "${t}"`,t),this.code="EUNMATCHEDRESOLVER",this.name="UnmatchedResolverError"}};Je.UnmatchedResolverError=Vm;var Ym=class extends Jn{constructor(t,n,r,i,s){super(`Missing $ref pointer "${(0,bf.getHash)(n)}". Token "${t}" does not exist.`,(0,bf.stripHash)(n)),this.code="EMISSINGPOINTER",this.name="MissingPointerError",this.targetToken=t,this.targetRef=r,this.targetFound=i,this.parentPath=s}};Je.MissingPointerError=Ym;var Gm=class extends Jn{constructor(t){super(`Dereferencing timeout reached: ${t}ms`),this.code="ETIMEOUT",this.name="TimeoutError"}};Je.TimeoutError=Gm;var Km=class extends Jn{constructor(t,n){super(`Invalid $ref pointer "${t}". Pointers must begin with "#/"`,(0,bf.stripHash)(n)),this.code="EUNMATCHEDRESOLVER",this.name="InvalidPointerError"}};Je.InvalidPointerError=Km;function v4(e){return e instanceof Jn||e instanceof xf}function C4(e){return e.path===null&&(e.path=[]),e}});var Da=B(Ht=>{"use strict";d();var w4=Ht&&Ht.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),b4=Ht&&Ht.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),x4=Ht&&Ht.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&w4(n,t,r[i]);return b4(n,t),n}})(),A4=Ht&&Ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ht,"__esModule",{value:!0});Ht.nullSymbol=void 0;var Jm=A4(Tu()),Qm=x4(xn()),Sf=An();Ht.nullSymbol=Symbol("null");var S4=/\//g,P4=/~/g,O4=/~1/g,T4=/~0/g,I4=e=>{try{return decodeURIComponent(e)}catch{return e}},Pf=class e{constructor(t,n,r){this.$ref=t,this.path=n,this.originalPath=r||n,this.value=void 0,this.circular=!1,this.indirections=0}resolve(t,n,r){let i=e.parse(this.path,this.originalPath),s=[];this.value=Y1(t);for(let a=0;a<i.length;a++){if(Af(this,n,r)&&(this.path=e.join(this.path,i.slice(a))),typeof this.value=="object"&&this.value!==null&&!G1(r)&&"$ref"in this.value)return this;let l=i[a];if(this.value[l]===void 0||this.value[l]===null&&a===i.length-1){let p=!1;for(let v=i.length-1;v>a;v--){let b=i.slice(a,v+1).join("/");if(this.value[b]!==void 0){this.value=this.value[b],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 h=this.$ref.path||"",m=this.path.replace(h,""),_=e.join("",s),C=r?.replace(h,"");throw new Sf.MissingPointerError(l,decodeURI(this.originalPath),m,_,C)}else this.value=this.value[l];s.push(l)}return(!this.value||this.value.$ref&&Qm.resolve(this.path,this.value.$ref)!==r)&&Af(this,n,r),this}set(t,n,r){let i=e.parse(this.path),s;if(i.length===0)return this.value=n,n;this.value=Y1(t);for(let a=0;a<i.length-1;a++)Af(this,r),s=i[a],this.value&&this.value[s]!==void 0?this.value=this.value[s]:this.value=V1(this,s,{});return Af(this,r),s=i[i.length-1],V1(this,s,n),t}static parse(t,n){let r=Qm.getHash(t).substring(1);if(!r)return[];let i=r.split("/");for(let s=0;s<i.length;s++)i[s]=I4(i[s].replace(O4,"/").replace(T4,"~"));if(i[0]!=="")throw new Sf.InvalidPointerError(r,n===void 0?t:n);return i.slice(1)}static join(t,n){t.indexOf("#")===-1&&(t+="#"),n=Array.isArray(n)?n:[n];for(let r=0;r<n.length;r++){let i=n[r];t+="/"+encodeURIComponent(i.replace(P4,"~0").replace(S4,"~1"))}return t}};function Af(e,t,n){if(Jm.default.isAllowed$Ref(e.value,t)){let r=Qm.resolve(e.path,e.value.$ref);if(r===e.path&&!G1(n))e.circular=!0;else{let i=e.$ref.$refs._resolve(r,e.path,t);return i===null?!1:(e.indirections+=i.indirections+1,Jm.default.isExtended$Ref(e.value)?(e.value=Jm.default.dereference(e.value,i.value),!1):(e.$ref=i.$ref,e.path=i.path,e.value=i.value,!0))}}}Ht.default=Pf;function V1(e,t,n){if(e.value&&typeof e.value=="object")t==="-"&&Array.isArray(e.value)?e.value.push(n):e.value[t]=n;else throw new Sf.JSONParserError(`Error assigning $ref pointer "${e.path}".
|
|
121
|
+
Cannot set "${t}" of a non-object.`);return n}function Y1(e){if((0,Sf.isHandledError)(e))throw e;return e}function G1(e){return typeof e=="string"&&Pf.parse(e).length==0}});var Tu=B(Gr=>{"use strict";d();var B4=Gr&&Gr.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),R4=Gr&&Gr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),M4=Gr&&Gr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&B4(n,t,r[i]);return R4(n,t),n}})();Object.defineProperty(Gr,"__esModule",{value:!0});var Of=M4(Da()),Tf=An(),Xm=xn(),Zm=class e{constructor(t){this.errors=[],this.$refs=t}addError(t){this.errors===void 0&&(this.errors=[]);let n=this.errors.map(({footprint:r})=>r);"errors"in t&&Array.isArray(t.errors)?this.errors.push(...t.errors.map(Tf.normalizeError).filter(({footprint:r})=>!n.includes(r))):(!("footprint"in t)||!n.includes(t.footprint))&&this.errors.push((0,Tf.normalizeError)(t))}exists(t,n){try{return this.resolve(t,n),!0}catch{return!1}}get(t,n){return this.resolve(t,n)?.value}resolve(t,n,r,i){let s=new Of.default(this,t,r);try{let a=s.resolve(this.value,n,i);return a.value===Of.nullSymbol&&(a.value=null),a}catch(a){if(!n||!n.continueOnError||!(0,Tf.isHandledError)(a))throw a;return a.path===null&&(a.path=(0,Xm.safePointerToPath)((0,Xm.getHash)(i))),a instanceof Tf.InvalidPointerError&&(a.source=decodeURI((0,Xm.stripHash)(i))),this.addError(a),null}}set(t,n){let r=new Of.default(this,t);this.value=r.set(this.value,n),this.value===Of.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,n){if(this.is$Ref(t)){if(t.$ref.substring(0,2)==="#/"||t.$ref==="#")return!0;if(t.$ref[0]!=="#"&&(!n||n.resolve?.external))return!0}}static isExtended$Ref(t){return e.is$Ref(t)&&Object.keys(t).length>1}static dereference(t,n){if(n&&typeof n=="object"&&e.isExtended$Ref(t)){let r={};for(let i of Object.keys(t))i!=="$ref"&&(r[i]=t[i]);for(let i of Object.keys(n))i in r||(r[i]=n[i]);return r}else return n}};Gr.default=Zm});var Z1=B(Qn=>{"use strict";d();var N4=Qn&&Qn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),j4=Qn&&Qn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),$4=Qn&&Qn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&N4(n,t,r[i]);return j4(n,t),n}})(),X1=Qn&&Qn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qn,"__esModule",{value:!0});var K1=Rt(),L4=X1(Tu()),Bi=$4(xn()),J1=X1(jm()),eg=class{paths(...t){return Q1(this._$refs,t.flat()).map(r=>(0,J1.default)(r.decoded))}values(...t){let n=this._$refs;return Q1(n,t.flat()).reduce((i,s)=>(i[(0,J1.default)(s.decoded)]=n[s.encoded].value,i),{})}exists(t,n){try{return this._resolve(t,"",n),!0}catch{return!1}}get(t,n){return this._resolve(t,"",n).value}set(t,n){let r=Bi.resolve(this._root$Ref.path,t),i=Bi.stripHash(r),s=this._$refs[i];if(!s)throw(0,K1.ono)(`Error resolving $ref pointer "${t}".
|
|
122
|
+
"${i}" not found.`);s.set(r,n)}_get$Ref(t){t=Bi.resolve(this._root$Ref.path,t);let n=Bi.stripHash(t);return this._$refs[n]}_add(t){let n=Bi.stripHash(t),r=new L4.default(this);return r.path=n,this._$refs[n]=r,this._root$Ref=this._root$Ref||r,r}_resolve(t,n,r){let i=Bi.resolve(this._root$Ref.path,t),s=Bi.stripHash(i),a=this._$refs[s];if(!a)throw(0,K1.ono)(`Error resolving $ref pointer "${t}".
|
|
123
|
+
"${s}" not found.`);return a.resolve(i,r,t,n)}constructor(){this._$refs={},this.toJSON=this.values,this.circular=!1,this._$refs={},this._root$Ref=null}};Qn.default=eg;function Q1(e,t){let n=Object.keys(e);return t=Array.isArray(t[0])?t[0]:Array.prototype.slice.call(t),t.length>0&&t[0]&&(n=n.filter(r=>t.includes(e[r].pathType))),n.map(r=>({encoded:r,decoded:e[r].pathType==="file"?Bi.toFileSystemPath(r,!0):r}))}});var tx=B(Iu=>{"use strict";d();Object.defineProperty(Iu,"__esModule",{value:!0});Iu.all=U4;Iu.filter=k4;Iu.sort=q4;Iu.run=W4;function U4(e){return Object.keys(e||{}).filter(t=>typeof e[t]=="object").map(t=>(e[t].name=t,e[t]))}function k4(e,t,n){return e.filter(r=>!!ex(r,t,n))}function q4(e){for(let t of e)t.order=t.order||Number.MAX_SAFE_INTEGER;return e.sort((t,n)=>t.order-n.order)}async function W4(e,t,n,r){let i,s,a=0;return new Promise((l,p)=>{h();function h(){if(i=e[a++],!i)return p(s);try{let v=ex(i,t,n,m,r);if(v&&typeof v.then=="function")v.then(_,C);else if(v!==void 0)_(v);else if(a===e.length)throw new Error("No promise has been returned or callback has been called.")}catch(v){C(v)}}function m(v,b){v?C(v):_(b)}function _(v){l({plugin:i,result:v})}function C(v){s={plugin:i,error:v},h()}})}function ex(e,t,n,r,i){let s=e[t];if(typeof s=="function")return s.apply(e,[n,r,i]);if(!r){if(s instanceof RegExp)return s.test(n.url);if(typeof s=="string")return s===n.extension;if(Array.isArray(s))return s.indexOf(n.extension)!==-1}return s}});var ng=B(Kr=>{"use strict";d();var H4=Kr&&Kr.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),z4=Kr&&Kr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),nx=Kr&&Kr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&H4(n,t,r[i]);return z4(n,t),n}})();Object.defineProperty(Kr,"__esModule",{value:!0});var tg=Rt(),V4=nx(xn()),Ri=nx(tx()),Ao=An();async function Y4(e,t,n){let r=e.indexOf("#"),i="";r>=0&&(i=e.substring(r),e=e.substring(0,r));let s=t._add(e),a={url:e,hash:i,extension:V4.getExtension(e)};try{let l=await G4(a,n,t);s.pathType=l.plugin.name,a.data=l.result;let p=await K4(a,n,t);return s.value=p.result,p.result}catch(l){throw(0,Ao.isHandledError)(l)&&(s.value=l),l}}async function G4(e,t,n){let r=Ri.all(t.resolve);r=Ri.filter(r,"canRead",e),Ri.sort(r);try{return await Ri.run(r,"read",e,n)}catch(i){throw!i&&t.continueOnError?new Ao.UnmatchedResolverError(e.url):!i||!("error"in i)?tg.ono.syntax(`Unable to resolve $ref pointer "${e.url}"`):i.error instanceof Ao.ResolverError?i.error:new Ao.ResolverError(i,e.url)}}async function K4(e,t,n){let r=Ri.all(t.parse),i=Ri.filter(r,"canParse",e),s=i.length>0?i:r;Ri.sort(s);try{let a=await Ri.run(s,"parse",e,n);if(!a.plugin.allowEmpty&&J4(a.result))throw tg.ono.syntax(`Error parsing "${e.url}" as ${a.plugin.name}.
|
|
124
|
+
Parsed value is empty`);return a}catch(a){throw!a&&t.continueOnError?new Ao.UnmatchedParserError(e.url):a&&a.message&&a.message.startsWith("Error parsing")?a:!a||!("error"in a)?tg.ono.syntax(`Unable to parse ${e.url}`):a.error instanceof Ao.ParserError?a.error:new Ao.ParserError(a.error.message,e.url)}}function J4(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}Kr.default=Y4});var ix=B(rg=>{"use strict";d();Object.defineProperty(rg,"__esModule",{value:!0});var rx=An();rg.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(n){if(this.allowBOM)try{let r=t.indexOf("{");return t=t.slice(r),JSON.parse(t)}catch(r){throw new rx.ParserError(r.message,e.url)}throw new rx.ParserError(n.message,e.url)}}else return t}}});var ox=B(ma=>{"use strict";d();var Q4=ma&&ma.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ma,"__esModule",{value:!0});var X4=An(),Z4=Q4(mu()),eq=mu();ma.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 Z4.default.load(t,{schema:eq.JSON_SCHEMA})}catch(n){throw new X4.ParserError(n?.message||"Parser Error",e.url)}else return t}}});var ux=B(ig=>{"use strict";d();Object.defineProperty(ig,"__esModule",{value:!0});var tq=An(),nq=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;ig.default={order:300,allowEmpty:!0,encoding:"utf8",canParse(e){return(typeof e.data=="string"||Buffer.isBuffer(e.data))&&nq.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 tq.ParserError("data is not text",e.url)}}});var sx=B(og=>{"use strict";d();Object.defineProperty(og,"__esModule",{value:!0});var rq=/\.(jpeg|jpg|gif|png|bmp|ico)$/i;og.default={order:400,allowEmpty:!0,canParse(e){return Buffer.isBuffer(e.data)&&rq.test(e.url)},parse(e){return Buffer.isBuffer(e.data)?e.data:Buffer.from(e.data)}}});var fx=B(Xn=>{"use strict";d();var iq=Xn&&Xn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),oq=Xn&&Xn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),uq=Xn&&Xn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&iq(n,t,r[i]);return oq(n,t),n}})(),sq=Xn&&Xn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xn,"__esModule",{value:!0});var aq=sq(ze("fs")),ax=Rt(),cx=uq(xn()),lx=An();Xn.default={order:100,canRead(e){return cx.isFileSystemPath(e.url)},async read(e){let t;try{t=cx.toFileSystemPath(e.url)}catch(n){throw new lx.ResolverError(ax.ono.uri(n,`Malformed URI: ${e.url}`),e.url)}try{return await aq.default.promises.readFile(t)}catch(n){throw new lx.ResolverError((0,ax.ono)(n,`Error opening file "${t}"`),t)}}}});var hx=B(Jr=>{"use strict";d();var cq=Jr&&Jr.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),lq=Jr&&Jr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),fq=Jr&&Jr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&cq(n,t,r[i]);return lq(n,t),n}})();Object.defineProperty(Jr,"__esModule",{value:!0});var If=Rt(),ga=fq(xn()),px=An();Jr.default={order:200,headers:null,timeout:6e4,redirects:5,withCredentials:!1,canRead(e){return ga.isHttp(e.url)},read(e){let t=ga.parse(e.url);return typeof window<"u"&&!t.protocol&&(t.protocol=ga.parse(location.href).protocol),dx(t,this)}};async function dx(e,t,n){e=ga.parse(e);let r=n||[];r.push(e.href);try{let i=await pq(e,t);if(i.status>=400)throw(0,If.ono)({status:i.status},`HTTP ERROR ${i.status}`);if(i.status>=300){if(!Number.isNaN(t.redirects)&&r.length>t.redirects)throw new px.ResolverError((0,If.ono)({status:i.status},`Error downloading ${r[0]}.
|
|
125
|
+
Too many redirects:
|
|
126
|
+
${r.join(`
|
|
127
|
+
`)}`));if(!("location"in i.headers)||!i.headers.location)throw(0,If.ono)({status:i.status},`HTTP ${i.status} redirect with no location header`);{let s=ga.resolve(e.href,i.headers.location);return dx(s,t,r)}}else{if(i.body){let s=await i.arrayBuffer();return Buffer.from(s)}return Buffer.alloc(0)}}catch(i){throw new px.ResolverError((0,If.ono)(i,`Error downloading ${e.href}`),e.href)}}async function pq(e,t){let n,r;t.timeout&&(n=new AbortController,r=setTimeout(()=>n.abort(),t.timeout));let i=await fetch(e,{method:"GET",headers:t.headers||{},credentials:t.withCredentials?"include":"same-origin",signal:n?n.signal:null});return r&&clearTimeout(r),i}});var ug=B(Qr=>{"use strict";d();var Bu=Qr&&Qr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qr,"__esModule",{value:!0});Qr.getNewOptions=Qr.getJsonSchemaRefParserDefaultOptions=void 0;var dq=Bu(ix()),hq=Bu(ox()),Dq=Bu(ux()),mq=Bu(sx()),gq=Bu(fx()),_q=Bu(hx()),yq=()=>({parse:{json:{...dq.default},yaml:{...hq.default},text:{...Dq.default},binary:{...mq.default}},resolve:{file:{...gq.default},http:{..._q.default},external:!0},continueOnError:!1,dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative"},mutateInputSchema:!0});Qr.getJsonSchemaRefParserDefaultOptions=yq;var Fq=e=>{let t=(0,Qr.getJsonSchemaRefParserDefaultOptions)();return e&&mx(t,e),t};Qr.getNewOptions=Fq;function mx(e,t){if(Dx(t)){let n=Object.keys(t).filter(r=>!["__proto__","constructor","prototype"].includes(r));for(let r=0;r<n.length;r++){let i=n[r],s=t[i],a=e[i];Dx(s)?e[i]=mx(a||{},s):s!==void 0&&(e[i]=s)}}return e}function Dx(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}});var _x=B(Bf=>{"use strict";d();Object.defineProperty(Bf,"__esModule",{value:!0});Bf.normalizeArgs=gx;var Eq=ug();function gx(e){let t,n,r,i,s=Array.prototype.slice.call(e);typeof s[s.length-1]=="function"&&(i=s.pop()),typeof s[0]=="string"?(t=s[0],typeof s[2]=="object"?(n=s[1],r=s[2]):(n=void 0,r=s[1])):(t="",n=s[0],r=s[1]);try{r=(0,Eq.getNewOptions)(r)}catch(a){console.error(`JSON Schema Ref Parser: Error normalizing options: ${a}`)}return!r.mutateInputSchema&&typeof n=="object"&&(n=JSON.parse(JSON.stringify(n))),{path:t,schema:n,options:r,callback:i}}Bf.default=gx});var yx=B(Zn=>{"use strict";d();var vq=Zn&&Zn.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Cq=Zn&&Zn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),wq=Zn&&Zn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&vq(n,t,r[i]);return Cq(n,t),n}})(),sg=Zn&&Zn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zn,"__esModule",{value:!0});var bq=sg(Tu()),xq=sg(Da()),Aq=sg(ng()),Ru=wq(xn()),Sq=An();function Pq(e,t){if(!t.resolve?.external)return Promise.resolve();try{let n=ag(e.schema,e.$refs._root$Ref.path+"#",e.$refs,t);return Promise.all(n)}catch(n){return Promise.reject(n)}}function ag(e,t,n,r,i,s){i||(i=new Set);let a=[];if(e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!i.has(e)){i.add(e),bq.default.isExternal$Ref(e)&&a.push(Oq(e,t,n,r));let l=Object.keys(e);for(let p of l){let h=xq.default.join(t,p),m=e[p];a=a.concat(ag(m,h,n,r,i,s))}}return a}async function Oq(e,t,n,r){let i=r.dereference?.externalReferenceResolution==="root",s=Ru.resolve(i?Ru.cwd():t,e.$ref),a=Ru.stripHash(s),l=n._$refs[a];if(l)return Promise.resolve(l.value);try{let p=await(0,Aq.default)(s,n,r),h=ag(p,a+"#",n,r,new Set,!0);return Promise.all(h)}catch(p){if(!r?.continueOnError||!(0,Sq.isHandledError)(p))throw p;return n._$refs[a]&&(p.source=decodeURI(Ru.stripHash(t)),p.path=Ru.safePointerToPath(Ru.getHash(t))),[]}}Zn.default=Pq});var vx=B(er=>{"use strict";d();var Tq=er&&er.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Iq=er&&er.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Bq=er&&er.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&Tq(n,t,r[i]);return Iq(n,t),n}})(),Ex=er&&er.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(er,"__esModule",{value:!0});var Rf=Ex(Tu()),_a=Ex(Da()),cg=Bq(xn());function Rq(e,t){let n=[];lg(e,"schema",e.$refs._root$Ref.path+"#","#",0,n,e.$refs,t),Mq(n)}function lg(e,t,n,r,i,s,a,l){let p=t===null?e:e[t];if(p&&typeof p=="object"&&!ArrayBuffer.isView(p))if(Rf.default.isAllowed$Ref(p))Fx(e,t,n,r,i,s,a,l);else{let h=Object.keys(p).sort((m,_)=>m==="definitions"?-1:_==="definitions"?1:m.length-_.length);for(let m of h){let _=_a.default.join(n,m),C=_a.default.join(r,m),v=p[m];Rf.default.isAllowed$Ref(v)?Fx(p,m,n,C,i,s,a,l):lg(p,m,_,C,i,s,a,l)}}}function Fx(e,t,n,r,i,s,a,l){let p=t===null?e:e[t],h=cg.resolve(n,p.$ref),m=a._resolve(h,r,l);if(m===null)return;let C=_a.default.parse(r).length,v=cg.stripHash(m.path),b=cg.getHash(m.path),A=v!==a._root$Ref.path,O=Rf.default.isExtended$Ref(p);i+=m.indirections;let T=Nq(s,e,t);if(T)if(C<T.depth||i<T.indirections)jq(s,T);else return;s.push({$ref:p,parent:e,key:t,pathFromRoot:r,depth:C,file:v,hash:b,value:m.value,circular:m.circular,extended:O,external:A,indirections:i}),(!T||A)&&lg(m.value,null,m.path,r,i+1,s,a,l)}function Mq(e){e.sort((i,s)=>{if(i.file!==s.file)return i.file<s.file?-1:1;if(i.hash!==s.hash)return i.hash<s.hash?-1:1;if(i.circular!==s.circular)return i.circular?-1:1;if(i.extended!==s.extended)return i.extended?1:-1;if(i.indirections!==s.indirections)return i.indirections-s.indirections;if(i.depth!==s.depth)return i.depth-s.depth;{let a=i.pathFromRoot.lastIndexOf("/definitions"),l=s.pathFromRoot.lastIndexOf("/definitions");return a!==l?l-a:i.pathFromRoot.length-s.pathFromRoot.length}});let t,n,r;for(let i of e)i.external?i.file===t&&i.hash===n?i.$ref.$ref=r:i.file===t&&i.hash.indexOf(n+"/")===0?i.$ref.$ref=_a.default.join(r,_a.default.parse(i.hash.replace(n,"#"))):(t=i.file,n=i.hash,r=i.pathFromRoot,i.$ref=i.parent[i.key]=Rf.default.dereference(i.$ref,i.value),i.circular&&(i.$ref.$ref=i.pathFromRoot)):i.$ref.$ref=i.hash}function Nq(e,t,n){for(let r of e)if(r&&r.parent===t&&r.key===n)return r}function jq(e,t){let n=e.indexOf(t);e.splice(n,1)}er.default=Rq});var Sx=B(tr=>{"use strict";d();var $q=tr&&tr.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Lq=tr&&tr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Uq=tr&&tr.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&$q(n,t,r[i]);return Lq(n,t),n}})(),xx=tr&&tr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0});var Mf=xx(Tu()),Cx=xx(Da()),kq=Rt(),wx=Uq(xn()),qq=An();tr.default=Wq;function Wq(e,t){let n=Date.now(),r=fg(e.schema,e.$refs._root$Ref.path,"#",new Set,new Set,new Map,e.$refs,t,n);e.$refs.circular=r.circular,e.schema=r.value}function fg(e,t,n,r,i,s,a,l,p){let h,m={value:e,circular:!1};if(l&&l.timeoutMs&&Date.now()-p>l.timeoutMs)throw new qq.TimeoutError(l.timeoutMs);let _=l.dereference||{},C=_.excludedPathMatcher||(()=>!1);if((_?.circular==="ignore"||!i.has(e))&&e&&typeof e=="object"&&!ArrayBuffer.isView(e)&&!C(n)){if(r.add(e),i.add(e),Mf.default.isAllowed$Ref(e,l))h=bx(e,t,n,r,i,s,a,l,p),m.circular=h.circular,m.value=h.value;else for(let v of Object.keys(e)){let b=Cx.default.join(t,v),A=Cx.default.join(n,v);if(C(A))continue;let O=e[v],T=!1;if(Mf.default.isAllowed$Ref(O,l)){if(h=bx(O,b,A,r,i,s,a,l,p),T=h.circular,e[v]!==h.value){let L=new Map;_?.preservedProperties&&typeof e[v]=="object"&&!Array.isArray(e[v])&&_?.preservedProperties.forEach(q=>{q in e[v]&&L.set(q,e[v][q])}),e[v]=h.value,_?.preservedProperties&&L.size&&typeof e[v]=="object"&&!Array.isArray(e[v])&&L.forEach((q,Q)=>{e[v][Q]=q}),_?.onDereference?.(O.$ref,e[v],e,v)}}else r.has(O)?T=Ax(b,a,l):(h=fg(O,b,A,r,i,s,a,l,p),T=h.circular,e[v]!==h.value&&(e[v]=h.value));m.circular=m.circular||T}r.delete(e)}return m}function bx(e,t,n,r,i,s,a,l,p){let m=Mf.default.isExternal$Ref(e)&&l?.dereference?.externalReferenceResolution==="root",_=wx.resolve(m?wx.cwd():t,e.$ref),C=s.get(_);if(C&&!C.circular){let L=Object.keys(e);if(L.length>1){let q={};for(let Q of L)Q!=="$ref"&&!(Q in C.value)&&(q[Q]=e[Q]);return{circular:C.circular,value:Object.assign({},C.value,q)}}return C}let v=a._resolve(_,t,l);if(v===null)return{circular:!1,value:null};let b=v.circular,A=b||r.has(v.value);A&&Ax(t,a,l);let O=Mf.default.dereference(e,v.value);if(!A){let L=fg(O,v.path,n,r,i,s,a,l,p);A=L.circular,O=L.value}A&&!b&&l.dereference?.circular==="ignore"&&(O=e),b&&(O.$ref=n);let T={circular:A,value:O};return Object.keys(e).length===1&&s.set(_,T),T}function Ax(e,t,n){if(t.circular=!0,n?.dereference?.onCircular?.(e),!n.dereference.circular)throw kq.ono.reference(`Circular $ref pointer found at ${e}`);return!0}});var Px=B(pg=>{"use strict";d();Object.defineProperty(pg,"__esModule",{value:!0});function Hq(){return typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:typeof setImmediate=="function"?setImmediate:function(t){setTimeout(t,0)}}pg.default=Hq()});var Tx=B(ya=>{"use strict";d();var zq=ya&&ya.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ya,"__esModule",{value:!0});ya.default=Vq;var Ox=zq(Px());function Vq(e,t){if(e){t.then(function(n){(0,Ox.default)(function(){e(null,n)})},function(n){(0,Ox.default)(function(){e(n)})});return}else return t}});var Mx=B(ue=>{"use strict";d();var Yq=ue&&ue.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),Gq=ue&&ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Kq=ue&&ue.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[r.length]=i);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),i=0;i<r.length;i++)r[i]!=="default"&&Yq(n,t,r[i]);return Gq(n,t),n}})(),Po=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 Ix=Po(Z1()),Jq=Po(ng()),Fa=Po(_x());ue.jsonSchemaParserNormalizeArgs=Fa.default;var Qq=Po(yx()),Xq=Po(vx()),Rx=Po(Sx());ue.dereferenceInternal=Rx.default;var So=Kq(xn()),Sn=An();Object.defineProperty(ue,"JSONParserError",{enumerable:!0,get:function(){return Sn.JSONParserError}});Object.defineProperty(ue,"InvalidPointerError",{enumerable:!0,get:function(){return Sn.InvalidPointerError}});Object.defineProperty(ue,"MissingPointerError",{enumerable:!0,get:function(){return Sn.MissingPointerError}});Object.defineProperty(ue,"ResolverError",{enumerable:!0,get:function(){return Sn.ResolverError}});Object.defineProperty(ue,"ParserError",{enumerable:!0,get:function(){return Sn.ParserError}});Object.defineProperty(ue,"UnmatchedParserError",{enumerable:!0,get:function(){return Sn.UnmatchedParserError}});Object.defineProperty(ue,"UnmatchedResolverError",{enumerable:!0,get:function(){return Sn.UnmatchedResolverError}});Object.defineProperty(ue,"isHandledError",{enumerable:!0,get:function(){return Sn.isHandledError}});Object.defineProperty(ue,"JSONParserErrorGroup",{enumerable:!0,get:function(){return Sn.JSONParserErrorGroup}});var Bx=Rt(),nr=Po(Tx()),Zq=ug();Object.defineProperty(ue,"getJsonSchemaRefParserDefaultOptions",{enumerable:!0,get:function(){return Zq.getJsonSchemaRefParserDefaultOptions}});var Mi=class e{constructor(){this.schema=null,this.$refs=new Ix.default}async parse(){let t=(0,Fa.default)(arguments),n;if(!t.path&&!t.schema){let i=(0,Bx.ono)(`Expected a file path, URL, or object. Got ${t.path||t.schema}`);return(0,nr.default)(t.callback,Promise.reject(i))}this.schema=null,this.$refs=new Ix.default;let r="http";if(So.isFileSystemPath(t.path))t.path=So.fromFileSystemPath(t.path),r="file";else if(!t.path&&t.schema&&"$id"in t.schema&&t.schema.$id){let i=So.parse(t.schema.$id),s=i.protocol==="https:"?443:80;t.path=`${i.protocol}//${i.hostname}:${s}`}if(t.path=So.resolve(So.cwd(),t.path),t.schema&&typeof t.schema=="object"){let i=this.$refs._add(t.path);i.value=t.schema,i.pathType=r,n=Promise.resolve(t.schema)}else n=(0,Jq.default)(t.path,this.$refs,t.options);try{let i=await n;if(i!==null&&typeof i=="object"&&!Buffer.isBuffer(i))return this.schema=i,(0,nr.default)(t.callback,Promise.resolve(this.schema));if(t.options.continueOnError)return this.schema=null,(0,nr.default)(t.callback,Promise.resolve(this.schema));throw Bx.ono.syntax(`"${this.$refs._root$Ref.path||i}" is not a valid JSON Schema`)}catch(i){return!t.options.continueOnError||!(0,Sn.isHandledError)(i)?(0,nr.default)(t.callback,Promise.reject(i)):(this.$refs._$refs[So.stripHash(t.path)]&&this.$refs._$refs[So.stripHash(t.path)].addError(i),(0,nr.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,Qq.default)(this,t.options),dg(this),(0,nr.default)(t.callback,Promise.resolve(this.$refs))}catch(n){return(0,nr.default)(t.callback,Promise.reject(n))}}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,Xq.default)(this,t.options),dg(this),(0,nr.default)(t.callback,Promise.resolve(this.schema))}catch(n){return(0,nr.default)(t.callback,Promise.reject(n))}}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,Rx.default)(this,t.options),dg(this),(0,nr.default)(t.callback,Promise.resolve(this.schema))}catch(n){return(0,nr.default)(t.callback,Promise.reject(n))}}};ue.$RefParser=Mi;ue.default=Mi;function dg(e){if(Sn.JSONParserErrorGroup.getParserErrors(e).length>0)throw new Sn.JSONParserErrorGroup(e)}ue.parse=Mi.parse;ue.resolve=Mi.resolve;ue.bundle=Mi.bundle;ue.dereference=Mi.dereference});var jx=B(($ae,Nx)=>{d();function e5(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}Nx.exports=e5});var Ea=B((Uae,$x)=>{d();var t5=Zy(),n5=Xy();function r5(e,t,n,r){var i=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var l=t[s],p=r?r(n[l],e[l],l,n,e):void 0;p===void 0&&(p=e[l]),i?n5(n,l,p):t5(n,l,p)}return n}$x.exports=r5});var Ux=B((qae,Lx)=>{d();var i5=Ea(),o5=Ty();function u5(e,t){return e&&i5(t,o5(t),e)}Lx.exports=u5});var qx=B((Hae,kx)=>{d();var s5=Ea(),a5=e0();function c5(e,t){return e&&s5(t,a5(t),e)}kx.exports=c5});var Yx=B((va,Mu)=>{d();var l5=TB(),Vx=typeof va=="object"&&va&&!va.nodeType&&va,Wx=Vx&&typeof Mu=="object"&&Mu&&!Mu.nodeType&&Mu,f5=Wx&&Wx.exports===Vx,Hx=f5?l5.Buffer:void 0,zx=Hx?Hx.allocUnsafe:void 0;function p5(e,t){if(t)return e.slice();var n=e.length,r=zx?zx(n):new e.constructor(n);return e.copy(r),r}Mu.exports=p5});var Kx=B((Yae,Gx)=>{d();function d5(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}Gx.exports=d5});var Qx=B((Kae,Jx)=>{d();var h5=Ea(),D5=MB();function m5(e,t){return h5(e,D5(e),t)}Jx.exports=m5});var Zx=B((Qae,Xx)=>{d();var g5=Ea(),_5=VB();function y5(e,t){return g5(e,_5(e),t)}Xx.exports=y5});var tA=B((Zae,eA)=>{d();var F5=Object.prototype,E5=F5.hasOwnProperty;function v5(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&E5.call(e,"index")&&(n.index=e.index,n.input=e.input),n}eA.exports=v5});var Nf=B((tce,rA)=>{d();var nA=RB();function C5(e){var t=new e.constructor(e.byteLength);return new nA(t).set(new nA(e)),t}rA.exports=C5});var oA=B((rce,iA)=>{d();var w5=Nf();function b5(e,t){var n=t?w5(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}iA.exports=b5});var sA=B((oce,uA)=>{d();var x5=/\w*$/;function A5(e){var t=new e.constructor(e.source,x5.exec(e));return t.lastIndex=e.lastIndex,t}uA.exports=A5});var pA=B((sce,fA)=>{d();var aA=IB(),cA=aA?aA.prototype:void 0,lA=cA?cA.valueOf:void 0;function S5(e){return lA?Object(lA.call(e)):{}}fA.exports=S5});var hA=B((cce,dA)=>{d();var P5=Nf();function O5(e,t){var n=t?P5(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}dA.exports=O5});var mA=B((fce,DA)=>{d();var T5=Nf(),I5=oA(),B5=sA(),R5=pA(),M5=hA(),N5="[object Boolean]",j5="[object Date]",$5="[object Map]",L5="[object Number]",U5="[object RegExp]",k5="[object Set]",q5="[object String]",W5="[object Symbol]",H5="[object ArrayBuffer]",z5="[object DataView]",V5="[object Float32Array]",Y5="[object Float64Array]",G5="[object Int8Array]",K5="[object Int16Array]",J5="[object Int32Array]",Q5="[object Uint8Array]",X5="[object Uint8ClampedArray]",Z5="[object Uint16Array]",eW="[object Uint32Array]";function tW(e,t,n){var r=e.constructor;switch(t){case H5:return T5(e);case N5:case j5:return new r(+e);case z5:return I5(e,n);case V5:case Y5:case G5:case K5:case J5:case Q5:case X5:case Z5:case eW:return M5(e,n);case $5:return new r;case L5:case q5:return new r(e);case U5:return B5(e);case k5:return new r;case W5:return R5(e)}}DA.exports=tW});var yA=B((dce,_A)=>{d();var nW=xy(),gA=Object.create,rW=(function(){function e(){}return function(t){if(!nW(t))return{};if(gA)return gA(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})();_A.exports=rW});var EA=B((Dce,FA)=>{d();var iW=yA(),oW=zB(),uW=jB();function sW(e){return typeof e.constructor=="function"&&!uW(e)?iW(oW(e)):{}}FA.exports=sW});var CA=B((gce,vA)=>{d();var aW=xd(),cW=Sy(),lW="[object Map]";function fW(e){return cW(e)&&aW(e)==lW}vA.exports=fW});var AA=B((yce,xA)=>{d();var pW=CA(),dW=Py(),wA=Oy(),bA=wA&&wA.isMap,hW=bA?dW(bA):pW;xA.exports=hW});var PA=B((Ece,SA)=>{d();var DW=xd(),mW=Sy(),gW="[object Set]";function _W(e){return mW(e)&&DW(e)==gW}SA.exports=_W});var BA=B((Cce,IA)=>{d();var yW=PA(),FW=Py(),OA=Oy(),TA=OA&&OA.isSet,EW=TA?FW(TA):yW;IA.exports=EW});var $A=B((bce,jA)=>{d();var vW=BB(),CW=jx(),wW=Zy(),bW=Ux(),xW=qx(),AW=Yx(),SW=Kx(),PW=Qx(),OW=Zx(),TW=$B(),IW=YB(),BW=xd(),RW=tA(),MW=mA(),NW=EA(),jW=Ay(),$W=NB(),LW=AA(),UW=xy(),kW=BA(),qW=Ty(),WW=e0(),HW=1,zW=2,VW=4,RA="[object Arguments]",YW="[object Array]",GW="[object Boolean]",KW="[object Date]",JW="[object Error]",MA="[object Function]",QW="[object GeneratorFunction]",XW="[object Map]",ZW="[object Number]",NA="[object Object]",eH="[object RegExp]",tH="[object Set]",nH="[object String]",rH="[object Symbol]",iH="[object WeakMap]",oH="[object ArrayBuffer]",uH="[object DataView]",sH="[object Float32Array]",aH="[object Float64Array]",cH="[object Int8Array]",lH="[object Int16Array]",fH="[object Int32Array]",pH="[object Uint8Array]",dH="[object Uint8ClampedArray]",hH="[object Uint16Array]",DH="[object Uint32Array]",je={};je[RA]=je[YW]=je[oH]=je[uH]=je[GW]=je[KW]=je[sH]=je[aH]=je[cH]=je[lH]=je[fH]=je[XW]=je[ZW]=je[NA]=je[eH]=je[tH]=je[nH]=je[rH]=je[pH]=je[dH]=je[hH]=je[DH]=!0;je[JW]=je[MA]=je[iH]=!1;function jf(e,t,n,r,i,s){var a,l=t&HW,p=t&zW,h=t&VW;if(n&&(a=i?n(e,r,i,s):n(e)),a!==void 0)return a;if(!UW(e))return e;var m=jW(e);if(m){if(a=RW(e),!l)return SW(e,a)}else{var _=BW(e),C=_==MA||_==QW;if($W(e))return AW(e,l);if(_==NA||_==RA||C&&!i){if(a=p||C?{}:NW(e),!l)return p?OW(e,xW(a,e)):PW(e,bW(a,e))}else{if(!je[_])return i?e:{};a=MW(e,_,l)}}s||(s=new vW);var v=s.get(e);if(v)return v;s.set(e,a),kW(e)?e.forEach(function(O){a.add(jf(O,t,n,O,e,s))}):LW(e)&&e.forEach(function(O,T){a.set(T,jf(O,t,n,T,e,s))});var b=h?p?IW:TW:p?WW:qW,A=m?void 0:b(e);return CW(A||e,function(O,T){A&&(T=O,O=e[T]),wW(a,T,jf(O,t,n,T,e,s))}),a}jA.exports=jf});var UA=B((Ace,LA)=>{d();var mH=$A(),gH=1,_H=4;function yH(e){return mH(e,gH|_H)}LA.exports=yH});d();d();async function Ud(e,t,n=1){let r;try{return r=await e(),r}catch(i){if(n>0)return await t(),Ud(e,t,n-1);throw i}}import{pipeline as XB}from"stream/promises";import H0 from"node:stream/promises";import*as z0 from"node:zlib";import{fileURLToPath as Hd}from"node:url";var V0="9.1.2",Y0="7.0.1",G0="3",ZB="123.0.0",K0="1.0.2",J0="2.0.1";function Q0(e){return e==="0"||e==="1"?{functionRunner:"7.0.1",javy:"4.0.0",javyPlugin:"1"}:e==="2"?{functionRunner:V0,javy:Y0,javyPlugin:G0}:null}var Cs=class{constructor(t,n,r,i,s=`v${n}`){this.name=t,this.version=n,this.release=s,this.supportsWindowsOnArm=i;let a;a=`${t}-${n}`,a=process.platform==="win32"?`${a}.exe`:a,this.path=R(De(Hd(import.meta.url)),"..","bin",a),this.gitHubRepo=r}downloadUrl(t,n){let r,i;switch(t.toLowerCase()){case"darwin":r="macos";break;case"linux":r="linux";break;case"win32":r="windows";break;default:throw Error(`Unsupported platform ${t}`)}switch(n.toLowerCase()){case"arm":case"arm64":i="arm";break;case"ia32":case"x64":i="x86_64";break;default:throw Error(`Unsupported architecture ${n}`)}let s=`${i}-${r}`,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}/${n}`);return`https://github.com/${this.gitHubRepo}/releases/download/${this.release}/${this.name}-${s}-v${this.version}.gz`}async processResponse(t,n){return t8(t,n)}},qd=class{constructor(t){this.name=`shopify_functions_javy_v${t}`,this.version=t,this.path=R(De(Hd(import.meta.url)),"..","bin",`shopify_functions_javy_v${t}.wasm`)}downloadUrl(t,n){return`https://cdn.shopify.com/shopifycloud/shopify-functions-javy-plugin/shopify_functions_javy_v${this.version}.wasm`}async processResponse(t,n){return XB(t,n)}},Wd=class{constructor(t,n){this.name=t,this.version=n,this.path=R(De(Hd(import.meta.url)),"..","bin",t)}downloadUrl(t,n){return`https://cdn.jsdelivr.net/npm/binaryen@${this.version}/bin/wasm-opt`}async processResponse(t,n){await H0.pipeline(t,n)}},kd;function zd(e=Y0){return new Cs("javy",e,"bytecodealliance/javy",Uc(e,">=7.0.0"))}function Vd(e=G0){return new qd(e)}function ez(e=V0){return new Cs("function-runner",e,"Shopify/function-runner",Uc(e,">=9.1.1"))}function ws(){return kd||(kd=new Wd("wasm-opt.cjs",ZB)),kd}function X0(e){return new Cs("shopify-function-trampoline",e,"Shopify/shopify-function-wasm-api",Uc(e,">=2.0.1"),`shopify_function_trampoline/v${e}`)}var Xc=new Map;async function uo(e){if(await Z(e.path)&&!Xc.has(e.path))return;let n=Xc.get(e.path);if(n){await n;return}let r=e8(e);Xc.set(e.path,r);try{await r}finally{Xc.delete(e.path)}}async function e8(e){let t=e.downloadUrl(process.platform,process.arch);ce(`Downloading ${e.name} ${e.version} from ${t} to ${e.path}`);let n=De(e.path);await Z(n)||await Nn(n),await Ud(async()=>{let r=await Hy(t,void 0,"slow-request");if(r.status!==200)throw new Error(`Downloading ${e.name} failed with status code of ${r.status}`);let i=r.body;if(i===null)throw new Error(`Downloading ${e.name} failed with empty response body`);await Oc(async s=>{let a=R(s,"binary"),l=Ly(a);await e.processResponse(i,l),await Uy(a,509),await Bc(a,e.path,{overwrite:!0})})},async()=>{},2)}async function t8(e,t){let n=z0.createGunzip();await H0.pipeline(e,n,t)}d();import{build as eF}from"esbuild";var n8="2",bs=class extends k{constructor(t){super(t,Ae`Make sure you have a compatible version of the ${xe.yellow("@shopify/shopify_function")} library installed.`,[Ae`Add ${xe.green(`"@shopify/shopify_function": "~${n8}.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 tF(e,t){let n=a8(e),r=n.length===0?s8:new Yd(n),i=await rF(e);return t.useTasks?i8(e,t,r,i):r8(e,t,r,i)}async function r8(e,t,n,r){t.signal?.aborted||(t.stdout.write(`Building function ${e.localIdentifier}...`),t.stdout.write(`Building GraphQL types...
|
|
128
|
+
`),await xs(e,t)),t.signal?.aborted||(t.stdout.write(`Bundling JS function...
|
|
129
|
+
`),await n.bundle(e,t)),t.signal?.aborted||(t.stdout.write(`Running javy...
|
|
130
|
+
`),await n.compile(e,t,r)),t.signal?.aborted||t.stdout.write(`Done!
|
|
131
|
+
`)}async function i8(e,t,n,r){await p0([{title:"Building GraphQL types",task:async()=>{await xs(e,t)}},{title:"Bundling JS function",task:async()=>{await n.bundle(e,t)}},{title:"Running javy",task:async()=>{await n.compile(e,t,r)}}])}async function xs(e,t){if(e.typegenCommand){let r=e.typegenCommand.split(" ");return Id("cmd_all_timing_network_ms")(async()=>mi(r[0],r.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 n=await u0(e.directory,"graphql-code-generator","--config","package.json");return Id("cmd_all_timing_network_ms")(async()=>mi(n.command,n.args,{cwd:e.directory,stderr:t.stderr,signal:t.signal}))}async function nF(e){let t=await pr("node_modules/@shopify/shopify_function/index.ts",{type:"file",cwd:e.directory}),n=await pr("node_modules/@shopify/shopify_function/run.ts",{type:"file",cwd:e.directory});if(!t||!n)throw new bs("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 rF(e){let t=await pr("node_modules/@shopify/shopify_function/package.json",{type:"file",cwd:e.directory});if(!t)throw new bs("Could not find the Shopify Functions JavaScript library.");let r=JSON.parse(await $e(t)).version.split(".")[0],i=Q0(r);if(i===null)throw new bs("The installed version of the Shopify Functions JavaScript library is not compatible with this version of Shopify CLI.");return i}async function o8(e,t,n=process.env){let r=await nF(e),i={...iF(e.directory,e.entrySourceFilePath,t.app.dotenv?.variables??{},n),entryPoints:[r]};return eF(i)}function iF(e,t,n,r=process.env){let i=Di(r,(p,h)=>Hc.test(h)&&p),s={...n,...i},a=Object.keys(s||{}).reduce((p,h)=>({...p,[`process.env.${h}`]:JSON.stringify(s[h])}),{});return{outfile:R(e,"dist/function.js"),alias:{"user-function":t},define:a,logLevel:"silent",bundle:!0,legalComments:"none",target:"es2022",format:"esm"}}async function oF(e){let t=ws();await uo(t);let n=De(ws().path),r="node",i=[ws().name,e,"-Oz","--enable-bulk-memory","--enable-multimemory","--enable-nontrapping-float-to-int","--strip-debug","-o",e];ce(`Wasm binary: ${ws().name}`),ce("Optimizing this wasm binary using wasm-opt."),await mi(r,i,{cwd:n})}async function uF(e){let t,n=await u8(e);if(n.includes("shopify_function_v1")?t=K0:n.includes("shopify_function_v2")&&(t=J0),!t)return;let r=X0(t);await uo(r);let i=r.path,s=["-i",e,"-o",e];ce(`Applying trampoline to the wasm binary with command: ${i} ${s.join(" ")}`),await mi(i,s)}async function u8(e){let t=new Uint8Array(jr(e));if(!WebAssembly.validate(t))return[];let r=new WebAssembly.Module(t),i=WebAssembly.Module.imports(r);return It(i.map(s=>s.module))}async function sF(e,t,n,r=[]){let i=zd(n.javy),s=Vd(n.javyPlugin);await Promise.all([uo(i),uo(s)]);let a=["build","-C","dynamic","-C",`plugin=${s.path}`,...r,"-o",e.outputPath,"dist/function.js"];return mi(i.path,a,{cwd:e.directory,stdout:"inherit",stderr:"inherit",signal:t.signal})}async function gz(e){let n=e.allExtensions.filter(l=>l.features.includes("function")&&l.isJavaScript).map(l=>rF(l)),r=await Promise.all(n),i=new Set,s=new Set;r.forEach(l=>{i.add(l.javy),s.add(l.javyPlugin)});let a=[];i.forEach(l=>{a.push(uo(zd(l)))}),s.forEach(l=>{a.push(uo(Vd(l)))}),await Promise.all(a)}var s8={async bundle(e,t){return o8(e,t)},async compile(e,t,n){return sF(e,t,n)}},Z0="shopify-function",Yd=class{constructor(t){this.exports=t}async bundle(t,n,r=process.env){await nF(t);let i=this.entrypointContents;ce("Generating dist/function.js using generated module:"),ce(i);let s={...iF(t.directory,t.entrySourceFilePath,n.app.dotenv?.variables??{},r),stdin:{contents:i,loader:"ts",resolveDir:t.directory}};return eF(s)}async compile(t,n,r){let i=this.wit;return ce("Generating world to use with Javy:"),ce(i),Oc(async s=>{let a=R(s,"javy-world.wit");return await Et(a,i),sF(t,n,r,["-C",`wit=${a}`,"-C",`wit-world=${Z0}`])})}get wit(){let t=this.exports.map(n=>`export %${Od(n)}: func();`);return`package function:impl;
|
|
132
|
+
|
|
133
|
+
world ${Z0} {
|
|
134
|
+
${t.join(`
|
|
135
|
+
`)}
|
|
136
|
+
}`}get entrypointContents(){let t=`
|
|
137
|
+
import __runFunction from "@shopify/shopify_function/run"`,n=this.exports.map(r=>{let i=Pd(r),s=Pd(`run-${r}`);return`
|
|
138
|
+
import { ${i} as ${s} } from "user-function"
|
|
139
|
+
export function ${i}() { return __runFunction(${s}) }`});return`${t}
|
|
140
|
+
${n.join(`
|
|
141
|
+
`)}`}};function a8(e){let t=e.configuration.targeting??[],n=t.filter(s=>!s.export),r=t.filter(s=>!!s.export);if(t.length>1&&n.length>0)throw new Error(`Can't infer export name for targets:
|
|
142
|
+
${n.map(({target:s})=>`- '${s}'`).join(`
|
|
143
|
+
`)}
|
|
144
|
+
All targets must have an export when multiple targets are present.`);let i=r.filter(s=>!s.export.match(/^[a-z0-9-]+$/));if(i.length>0){let s=[],a=i.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:"),i.forEach(l=>{let p=l.export;s.push(`- Change export for '${l.target}' to '${Od(p)}'.`)}),new Error(s.join(`
|
|
150
|
+
`))}return r.map(s=>s.export)}d();function aF(e,t){return async n=>{let r=await e.appsForOrg(t,n);return{apps:r.apps,hasMorePages:r.hasMorePages}}}d();d();import{deflate as c8}from"node:zlib";import{promisify as l8}from"node:util";var f8=l8(c8);async function p8(e){let t=await $e(e),n=Buffer.byteLength(t),i=(await f8(Buffer.from(t))).byteLength;return{path:e,rawBytes:n,compressedBytes:i}}function cF(e){return e>=1024*1024?`${(e/(1024*1024)).toFixed(2)} MB`:`${(e/1024).toFixed(1)} KB`}async function lF(e){try{let{rawBytes:t,compressedBytes:n}=await p8(e);return` (${cF(t)} original, ~${cF(n)} compressed)`}catch(t){return ce(`Failed to get bundle size for ${e}: ${t}`),""}}d();d();import{createInterface as d8}from"readline";var h8=[".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 As(e){let n=R(e.directory,".shopifyignore"),r=h8.map(i=>R("*",i));if(Ut(n)){let i=await D8(n);r.push(...i)}return Ve("*/*",{absolute:!0,cwd:e.directory,ignore:r})}function D8(e){return new Promise((t,n)=>{let r=[],i=d8({input:$y(e),crlfDelay:1/0});i.on("line",s=>{let a=s.trim();a.length>0&&!a.startsWith("#")&&r.push(a)}),i.on("close",()=>{t(r)}),i.on("error",s=>{n(s)})})}import{context as I8,formatMessagesSync as CF}from"esbuild";var wF=fr(vF(),1);async function Gd(e,t=process.env){let n=M8(e,t),r=await I8(n),i=await r.rebuild();R8(i,e),await B8(i,e.outputPath),await r.dispose()}async function B8(e,t){if(!e?.metafile)return;let{dir:n,name:r}=wy(t),i=R(n,`${r}.metafile.json`);try{await Et(i,JSON.stringify(e.metafile))}catch(s){Lr(`Failed to write metafile to ${i}: ${s}`)}}function R8(e,t){let n=e?.warnings??[],r=e?.errors??[];n.length>0&&CF(n,{kind:"warning"}).forEach(s=>{t.stdout.write(s)}),r.length>0&&CF(r,{kind:"error"}).forEach(s=>{t.stderr.write(s)})}function M8(e,t=process.env){let n=Di(t,(a,l)=>Hc.test(l)&&a),r={...e.env,...n},i=Object.keys(r||{}).reduce((a,l)=>({...a,[`process.env.${l}`]:JSON.stringify(r[l])}),{"process.env.NODE_ENV":JSON.stringify(e.environment)}),s={outfile:e.outputPath,stdin:e.stdin,bundle:!0,define:i,jsx:"automatic",logLevel:e.logLevel??"error",loader:{".esnext":"ts",".js":"jsx"},legalComments:"none",minify:e.minify,plugins:N8(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=r[Md.disableMinificationOnDev];s.minify=!hs(a),s.logLevel="silent"}return s}function N8(e,t=process.env){let n=[wF.default.default()],r=hs(t[Md.skipEsbuildReactDedeuplication]);if(e&&!r){let i;try{i=ze.resolve("react",{paths:[e]})}catch{ce(`Unable to load React in ${e}, skipping React de-duplication`)}i&&(ce(`Deduplicating React dependency for ${e}, using ${i}`),n.push(j8(i)))}return n}function j8(e){return{name:"shopify:deduplicate-react",setup({onResolve:t}){t({filter:/^react$/},n=>({path:e}))}}}d();var nl="# api_version: ";function Zz(e,t){return`${nl}${t}
|
|
151
|
+
|
|
152
|
+
${e}`}async function $8(e){if(!await Z(e)){ce(`Could not determine api_version: schema file not found at ${e}.`);return}let n=(await $e(e)).split(`
|
|
153
|
+
`,1)[0];if(n.startsWith(nl))return n.slice(nl.length).trim();ce(`Could not determine api_version from ${e}: missing '${nl}' marker on the first line.`)}async function bF({directory:e,localIdentifier:t,apiVersion:n}){let r=R(e,"schema.graphql"),i=await $8(r);if(i!==void 0&&i!==n)throw new k(Ae`The ${xe.cyan("schema.graphql")} file for ${xe.cyan(t)} was generated for api_version ${xe.yellow(i)} but your function is now on api_version ${xe.yellow(n)}.`,Ae`Run ${xe.genericShellCommand("shopify app function schema")} to refresh it.`)}var qF=fr(kF(),1);async function WF(e,t){t.stdout.write(`Bundling UI extension ${e.localIdentifier}...`);let n=t.app.dotenv?.variables??{};t.appURL&&(n.APP_URL=t.appURL);let r=t.buildDirectory??"",i=R(e.directory,r,e.outputRelativePath),{main:s,assets:a}=e.getBundleExtensionStdinContent(),l=performance.now();if(!t.skipBuild)try{await Gd({minify:!0,outputPath:i,stdin:{contents:s,resolveDir:e.directory,loader:"tsx"},environment:t.environment,env:n,stderr:t.stderr,stdout:t.stdout,sourceMaps:e.isSourceMapGeneratingExtension}),a&&await Promise.all(a.map(async m=>{await Gd({minify:!0,outputPath:R(De(i),m.outputFileName),stdin:{contents:m.content,resolveDir:e.directory,loader:"tsx"},environment:t.environment,env:n,stderr:t.stderr,stdout:t.stdout})}))}catch(m){let _=m.message??"Unknown error occurred",C=new k(`Failed to bundle extension ${e.localIdentifier}. Please check the extension source code for errors.`,_);throw C.errors=m.errors,C}await e.buildValidation({outputPath:i});let p=Math.round(performance.now()-l),h=await lF(i);return t.stdout.write(`${e.localIdentifier} successfully built in ${p}ms${h}`),i}async function HF(e,t){let n=R(e.directory,".build-lock"),r;try{r=await qF.default.lock(e.directory,{retries:20,lockfilePath:n})}catch(i){throw ce(`Failed to acquire function build lock: ${i.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 i=e.configuration,s=e.outputPath,a=i.build?.path??e.outputRelativePath;if(e.outputPath=R(e.directory,a),await bF({directory:e.directory,localIdentifier:e.localIdentifier,apiVersion:i.api_version}),!t.skipBuild){e.isJavaScript?await o6(e,t):await u6(e,t);let p=e.configuration.build?.wasm_opt;Ut(e.outputPath)&&p&&await oF(e.outputPath),Ut(e.outputPath)&&await uF(e.outputPath)}let l=R(e.directory,e.outputRelativePath);Ut(e.outputPath)&&s!==e.outputPath&&s!==l&&De(s)!==De(e.outputPath)&&await i6(e.outputPath,s)}catch(i){if(i instanceof k)throw i;let s=i.message??"Unknown error occurred",a=new k("Failed to build function.",s);throw a.errors=i.errors,a}finally{await r()}}async function i6(e,t){ce(`Converting WASM from ${e} to base64 in ${t}`);let n=await $e(e,{encoding:"base64"});await Tc(t),await Et(t,n)}async function o6(e,t){return e.buildCommand?(e.typegenCommand&&await xs(e,t),zF(e.buildCommand,e,t)):tF(e,t)}async function u6(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 tn;return e.typegenCommand&&await xs(e,t),zF(e.buildCommand,e,t)}async function zF(e,t,n){let r=e.split(" ");n.stdout.write(`Building function ${t.localIdentifier}...`),await mi(r[0],r.slice(1),{stdout:n.stdout,stderr:n.stderr,cwd:t.directory,signal:n.signal})}d();var VF="shopify.app*.toml",s6=/^shopify\.app(\.[-\w]+)?\.toml$/,a6="*.extension.toml",c6="shopify.web.toml",YF="extensions/*",GF="**/node_modules/**",l6=".env*",Os=class e{static async load(t){let n=await f6(t),r=[],i=await p6(n,r);if(i.length===0)throw new k(`Could not find a Shopify app TOML file in ${n}`);let s=new Set;for(let O of i){let T=O.content.extension_directories;if(Array.isArray(T))for(let L of T)s.add(L);else s.add(YF)}let a=await d6(n,[...s],r),l=new Set;for(let O of i){let T=O.content.web_directories;if(Array.isArray(T))for(let L of T)l.add(L)}let p=await h6(n,l.size>0?[...l]:void 0,r),h=R(n,"package.json"),m=await Z(h),_=m?await Lc(n):"unknown",C=m?await s0(h):{},v=m?await a0(n):!1,b=await D6(n),A=await m6(n);return new e({directory:n,packageManager:_,nodeDependencies:C,usesWorkspaces:v,appConfigFiles:i,extensionConfigFiles:a,webConfigFiles:p,dotenvFiles:b,hiddenConfigRaw:A,errors:r})}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(n=>Te(n.path)===t)}appConfigByClientId(t){return this.appConfigFiles.find(n=>n.content.client_id===t)}get defaultAppConfig(){return this.appConfigByName($n.app)}};async function f6(e){let t=await pr(async n=>{if((await Ve(R(n,VF))).length>0)return n},{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 p6(e,t){let n=R(e,VF),i=(await Ve(n)).filter(s=>s6.test(Te(s)));return th(i,t)}async function d6(e,t,n){let i=(t.length>0?t:[YF]).map(a=>R(e,a,a6));i.push(`!${R(e,GF)}`);let s=await Ve(i);return th(s,n)}async function h6(e,t,n){let i=(t??["**"]).map(a=>R(e,a,c6));i.push(`!${R(e,GF)}`);let s=await Ve(i);return th(s,n)}async function th(e,t){let n=[];return await Promise.all(e.map(async r=>{try{n.push(await lt.read(r))}catch(i){let s=i instanceof vs?i:new vs(r,`Failed to read ${r}`),a=new lt(r,{});a.errors.push(s),n.push(a),t.push(s)}})),n}async function D6(e){let t=R(e,l6),r=(await Ve(t,{dot:!0})).filter(a=>{let l=Te(a);return l===".env"||/^\.env\.[\w-]+$/.test(l)}),i=await Promise.all(r.map(async a=>{try{let l=await w0(a);return[Te(a),l]}catch{return}})),s=new Map;for(let a of i)a&&s.set(a[0],a[1]);return s}async function m6(e){let t=R(e,$n.hiddenFolder,$n.hiddenConfig);try{if(await Z(t)){let n=await $e(t);return JSON.parse(n)}}catch{}return{}}d();d();d();d();function g6(e,t){return t}async function ul(e,t,n){let r={};try{let a=await $e(e);r=JSON.parse(a)}catch{}let i={[t]:n},s=hi(r,i,g6);await Et(e,JSON.stringify(s,null,2))}var _6=F.array(F.string()).optional().transform(y6).transform(F6);function y6(e){return e?.map(t=>t.replace(/[\/\\]+$/,""))}function F6(e){return e?.map(t=>t.replace(/([^\*])\*$/,"$1**"))}var Ts=F.object({client_id:F.string(),build:F.object({automatically_update_urls_on_dev:F.boolean().optional(),dev_store_url:F.string().optional(),include_config_on_deploy:F.boolean().optional()}).optional(),extension_directories:_6,web_directories:F.array(F.string()).optional()}).passthrough();function XF(e,t=!0){let n=e.reduce((r,i)=>i.contributeToAppConfigurationSchema(r),Ts);return t?n.passthrough():e.length>0?n.strict():n}function nh(e){return e.access_scopes?.scopes??""}function al(e){let t=nh(e);return t.length?t.split(",").map(n=>n.trim()):[]}function E6(e){return R(e,$n.hiddenFolder,$n.hiddenConfig)}function rh(e){let t=Object.keys(Ts.shape).concat("organization_id");return Object.keys(e).filter(n=>!t.includes(n))}var ft;(function(e){e.Frontend="frontend",e.Backend="backend",e.Background="background"})(ft||(ft={}));var KF=F.preprocess(Nd,F.string()),JF=F.object({auth_callback_path:F.union([KF,KF.array()]).optional(),webhooks_path:F.preprocess(Nd,F.string()).optional(),port:F.number().max(65536).min(0).optional(),commands:F.object({build:F.string().optional(),predev:F.string().optional(),dev:F.string()}),name:F.string().optional(),hmr_server:F.object({http_paths:F.string().array()}).optional()}),QF=F.enum([ft.Frontend,ft.Backend,ft.Background]).default(ft.Frontend),ZF=F.union([JF.extend({roles:F.array(QF)}),JF.extend({type:QF})]),sl=class{constructor({name:t,directory:n,configPath:r,configuration:i,webs:s,modules:a,dotenv:l,errors:p,specifications:h,configSchema:m,remoteFlags:_,hiddenConfig:C,devApplicationURLs:v}){this.idEnvironmentVariableName="SHOPIFY_API_KEY",this.name=t,this.directory=n,this.configPath=r,this.configuration=i,this.webs=s,this.dotenv=l,this.realExtensions=a,this.errors=p??new Bs,this.specifications=h,this.configSchema=m??Ts,this.remoteFlags=_??[],this._hiddenConfig=C,v&&this.setDevApplicationURLs(v)}get allExtensions(){return this.includeConfigOnDeploy===!1?this.nonConfigExtensions:this.realExtensions}get nonConfigExtensions(){return this.realExtensions.filter(t=>!t.isAppConfigExtension)}get draftableExtensions(){return this.realExtensions.filter(t=>t.isUUIDStrategyExtension||t.specification.identifier===Yc)}setDevApplicationURLs(t){this.patchAppConfiguration(t),this.realExtensions.forEach(n=>n.patchWithAppDevURLs(t))}async manifest(t){let n=await Promise.all(this.realExtensions.map(async r=>{let i=await r.deployConfig({apiKey:String(this.configuration.client_id??""),appConfiguration:this.configuration});return{type:r.externalType,handle:r.handle,uid:r.uid,uuid:t?.extensions[r.localIdentifier],assets:r.uid,target:r.contextValue,config:i??{}}}));return{name:this.name,handle:"",modules:ro(n)}}get hiddenConfig(){return this._hiddenConfig}getLogsDir(){return R(this.directory,".shopify","logs")}async updateHiddenConfig(t){if(!this.configuration.client_id)return;this._hiddenConfig=hi(this.hiddenConfig,t);let n=E6(this.directory);await ul(n,String(this.configuration.client_id),this.hiddenConfig)}async preDeployValidation(){this.validateWebhookLegacyFlowCompatibility();let t=this.allExtensions.filter(r=>r.isFunctionExtension&&r.configuration.ui?.handle);if(t.length>0){let r=v6(t,this.allExtensions);if(r)throw new k("Invalid function configuration",r.join(`
|
|
161
|
+
`))}let n=this.allExtensions.filter(r=>r.isEditorExtensionCollection);if(n.length>0){let r=C6(n,this.allExtensions);if(r)throw new k("Invalid editor extension collection configuration",r.join(`
|
|
162
|
+
|
|
163
|
+
`))}await Promise.all(this.allExtensions.map(r=>r.preDeployValidation()))}extensionsForType(t){return this.allExtensions.filter(n=>n.type===t.identifier||n.type===t.externalIdentifier)}updateExtensionUUIDS(t){this.allExtensions.forEach(n=>{n.devUUID=t[n.localIdentifier]??n.devUUID})}appIsLaunchable(){let t=this.webs.find(r=>mr(r,ft.Frontend)),n=this.webs.find(r=>mr(r,ft.Backend));return!!(t??n)}get appIsEmbedded(){return this.configuration.embedded}creationDefaultOptions(){return{isLaunchable:this.appIsLaunchable(),scopesArray:al(this.configuration),name:this.name,isEmbedded:this.appIsEmbedded,directory:this.directory}}removeExtension(t){this.realExtensions=this.realExtensions.filter(n=>n.uid!==t)}async generateExtensionTypes(){let t=new Map;await Promise.all(this.allExtensions.map(n=>n.contributeToSharedTypeFile(t))),t.forEach((n,r)=>{let i=Ut(r);if(n.size===0){i&&Ny(r);return}let s=i?jr(r).toString():"",a=[`import '@shopify/ui-extensions';
|
|
164
|
+
`,...Array.from(n)].join(`
|
|
165
|
+
`);s!==a&&My(r,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(r=>r.topics&&r.topics.length>0)??!1,n=this.configuration.access_scopes?.use_legacy_install_flow===!0;if(t&&n)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 v6(e,t){let n=[];return e.forEach(r=>{let i=r.configuration.ui.handle,s=eE(t,i);s?s.type!=="ui_extension"&&n.push(`[${r.name}] - Local app must contain one extension of type 'ui_extension' and handle '${i}'`):n.push(`[${r.name}] - Local app must contain a ui_extension with handle '${i}'`)}),n.length>0?n:void 0}function C6(e,t){let n=[],r=["ui_extension"];return e.forEach(i=>{i.configuration.inCollection.forEach(s=>{let a=eE(t,s.handle);a?r.includes(a.specification.identifier)?a.specification.identifier==="ui_extension"&&a.configuration.extension_points.forEach(p=>{p.target.startsWith("admin.")&&n.push(`[${i.handle}] editor extension collection: Remove extension '${a.configuration.handle}' with target '${p.target}' from this collection. This extension target is not supported in collections.`)}):n.push(`[${i.handle}] editor extension collection: Remove extension of type '${a.specification.identifier}' from this collection. This extension type is not supported in collections.`):n.push(`[${i.handle}] editor extension collection: Add extension with handle '${s.handle}' to local app. Local app must include extension with handle '${s.handle}'.`)})}),n.length>0?n:void 0}function eE(e,t){return e.find(n=>n.handle===t)}async function XV(e){let t=e.dependency;if(t)return Is(t,e.directory)}async function Is(e,t){let n=e.replace("-react","").split("/"),r=R("node_modules",n[0],n[1],"package.json"),i=await pr(r,{cwd:t,type:"file",allowSymlinks:!0});if(!i)return"not_found";i=await ms(i);let s=await c0(i);return s.version?{name:e,version:s.version}:"not_found"}d();function w6(e){if(!e?.length)return null;let t=null,n=-1;for(let r of e){if(!r.issues?.length)continue;let i=0,s=0,a=0;for(let p of r.issues)p.message?.includes("Required")||p.message?.includes("required")?i++:p.message?.includes("Expected")&&p.message?.includes("received")?s++:a++;let l;i>0?l=1e3-i*10-s-a:s>0?l=100-s*5-a:l=50-a,l>n&&(n=l,t=r)}return t}function tE(e){let t=[];for(let n of e)if(n.code==="invalid_union"&&n.unionErrors){let r=w6(n.unionErrors);if(r?.issues?.length)for(let i of r.issues)t.push({path:i.path,message:i.message,code:n.code});else t.push({path:n.path,message:n.message??"Configuration doesn't match any expected format",code:n.code})}else t.push({path:n.path,message:n.message??"Unknown error",code:n.code});return t}d();var nE=/^shopify\.app(\.[-\w]+)?\.toml$/;function Ln(e){return e?cl(e)?e:`shopify.app.${Lt(e)}.toml`:$n.app}function Rs(e){return Te(e).match(nE)?.[1]?.slice(1)}function cl(e){return!!nE.test(e)}d();d();d();d();d();d();d();async function tu(e,t,n){let[r,i]=await Promise.all([ms(e),ms(t)]),s=Oe(i,r);if(s.split(/[/\\]/,1)[0]===".."||Cy(s))throw new k(`Asset path '${n}' resolves outside the app directory.`,`Asset sources must be inside the app folder. Resolved to: ${r}`)}async function iE(e){let{key:t,baseDir:n,outputDir:r,context:i,appDirectory:s,destination:a,usedBasenames:l=new Set,preserveFilePaths:p=!1}=e,{stdout:h}=i.options,m=ll(i.extension.configuration,t),_;typeof m=="string"?_=[m]:Array.isArray(m)?_=m.filter(O=>typeof O=="string"):_=[];for(let O of _)if(O.trim()==="")throw new k(`'${t}' can't be empty.`);if(_.length===0)return ce(`No value for configKey '${t}', skipping
|
|
172
|
+
`,h),{filesCopied:0,pathMap:new Map};let C=a?R(r,a):r,v=It(_),b=new Map,A=0;for(let O of v){let T=R(n,O);if(!await Z(T))throw new Error(Ae`Couldn't find ${xe.path(T)}\n Please check the path '${O}' in your configuration`.value);await tu(T,s,O);let q=await di(T),Q=C;if(q){let X=await Ve(["**/*"],{cwd:T,absolute:!1}),fe=X.map(ye=>Oe(r,R(Q,ye)));if(p)for(let ye of X)rE(Te(ye),O,l);await Mc(T,Q),h.write(`Included '${O}'
|
|
173
|
+
`);for(let ye of X)l.add(Te(ye));b.set(O,fe),A+=X.length}else{await Nn(Q);let X=Te(T),fe;p?(rE(X,O,l),fe=X):fe=b6(X,l),l.add(fe);let ye=Oe(r,R(Q,fe)),We=R(Q,fe);await Mn(T,We),h.write(`Included '${O}'
|
|
174
|
+
`),b.set(O,ye),A+=1}}return{filesCopied:A,pathMap:b}}function rE(e,t,n){if(n.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 b6(e,t){if(!t.has(e))return e;let n=Ac(e),r=n?e.slice(0,-n.length):e,i=1e3,s=1;for(;t.has(`${r}-${s}${n}`);)if(s++,s>i)throw new Error(`Unable to find unique basename for '${e}' after ${i} attempts`);return`${r}-${s}${n}`}function ih(e){return e.split(".").map(t=>{let n=t.endsWith("[]");return{name:n?t.slice(0,-2):t,flatten:n}})}function ll(e,t){let n=e;for(let{name:r,flatten:i}of ih(t)){if(n==null)return;if(Array.isArray(n)){let s=n.map(a=>a!==null&&typeof a=="object"?a[r]:void 0).filter(a=>a!==void 0);n=s.length>0?s:void 0}else if(typeof n=="object")n=n[r];else return;if(i){if(!Array.isArray(n))return;n=n.flat(1)}}return n}function sh(e){return Ac(e)?De(e):e}async function oE(e,t,n,r){let{extension:i,options:s}=t,a=[],l=[];for(let m of e)typeof m.anchor=="string"&&typeof m.groupBy=="string"?a.push(m):l.push(m);if(a.length===0&&l.length===0&&r.length===0)return;let p={};for(let m of l){let _=S6(m.key),C=ll(i.configuration,m.key);C!=null&&(p[_]=fl(C,n))}let h=new Map;for(let m of a){let _=`${m.anchor}||${m.groupBy}`,C=h.get(_);C?C.push(m):h.set(_,[m])}for(let m of h.values()){let{anchor:_,groupBy:C}=m[0],v=ll(i.configuration,_);if(Array.isArray(v))for(let b of v){if(b===null||typeof b!="object"||Array.isArray(b))continue;let A=b,O=A[C];if(typeof O!="string")continue;let T=m.map(Q=>{let X=x6(Q.key,_),fe=oh(A,X);return fl(fe,n)});T.some(uh)&&s.stdout.write(`Warning: manifest entry '${O}' contains unresolved paths \u2014 source files may be missing
|
|
175
|
+
`);let q=p[O]??{};p[O]=A6([q,...T])}}if(r.length>0&&(p.files=r),Object.keys(p).length===0){s.stdout.write(`Warning: no manifest entries produced \u2014 skipping manifest.json
|
|
176
|
+
`);return}await ah(t,p)}async function ah(e,t){let n=sh(e.extension.outputPath),r=R(n,"manifest.json");await Z(n)||await Nn(n);let i={};if(await Z(r))try{let s=await $e(r);i=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=i[s];l&&typeof l=="object"&&!Array.isArray(l)&&typeof a=="object"&&!Array.isArray(a)?i[s]={...l,...a}:i[s]=a}await Et(r,JSON.stringify(i,null,2)),ce(`Updated manifest.json in ${n}
|
|
178
|
+
`,e.options.stdout)}function x6(e,t){if(t===e)return"";let n=`${t}.`;return e.startsWith(n)?e.slice(n.length):e}function oh(e,t){if(t==="")return e;let n=ih(t),[r,...i]=n;if(!r)return e;let s=i.map(l=>`${l.name}${l.flatten?"[]":""}`).join("."),a=e[r.name];if(r.flatten){if(!Array.isArray(a))return{[r.name]:a};let l=a.map(p=>s?oh(p,s):p);return{[r.name]:l}}return s&&a!==null&&a!==void 0&&typeof a=="object"&&!Array.isArray(a)?{[r.name]:oh(a,s)}:{[r.name]:a}}function A6(e){return Object.assign({},...e)}function fl(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(n=>fl(n,t));if(e!==null&&typeof e=="object"){let n={};for(let[r,i]of Object.entries(e))n[r]=fl(i,t);return n}return e}function S6(e){let t=e.split(".").at(-1)??e;return t.endsWith("[]")?t.slice(0,-2):t}function uh(e){return typeof e=="string"?e.startsWith("./")||e.startsWith("../"):Array.isArray(e)?e.some(uh):e!==null&&typeof e=="object"?Object.values(e).some(uh):!1}d();async function uE(e,t){let{sourceDir:n,outputDir:r,patterns:i,ignore:s,appDirectory:a,sourceDirConfigValue:l}=e;if(!await Z(n))return{filesCopied:0,outputPaths:[]};await tu(n,a,l);let p=await Ve(i,{absolute:!0,cwd:n,ignore:s});if(p.length===0)return{filesCopied:0,outputPaths:[]};await Nn(r);let h=p,m=await Promise.all(h.map(async v=>{let b=Oe(n,v),A=R(r,b);return Oe(r,A).startsWith("..")?(t.stdout.write(`Warning: skipping '${v}' - resolved destination is outside the output directory
|
|
179
|
+
`),{count:0,path:null}):v===A?{count:0,path:null}:(await Nn(De(A)),await Mn(v,A),{count:1,path:b})})),_=m.reduce((v,b)=>v+b.count,0),C=m.flatMap(v=>v.path===null?[]:[v.path]);return t.stdout.write(`Included ${_} file(s)
|
|
180
|
+
`),{filesCopied:_,outputPaths:C}}d();async function sE(e,t){let{source:n,destination:r,baseDir:i,outputDir:s,appDirectory:a}=e,l=R(i,n);if(!await Z(l))throw new Error(`Source does not exist: ${l}`);await tu(l,a,n);let p=await di(l),h,m;if(r===void 0?(h=R(s,Te(l)),m=`Included ${n}
|
|
181
|
+
`):(h=R(s,r),m=`Included ${n}
|
|
182
|
+
`),p){let _=await Ve(["**/*"],{cwd:l,absolute:!1});await Mc(l,h),t.stdout.write(m);let C=Oe(s,h),v=C?_.map(b=>R(C,b)):_;return{filesCopied:_.length,outputPaths:v}}return await Nn(De(h)),await Mn(l,h),t.stdout.write(m),{filesCopied:1,outputPaths:[Oe(s,h)]}}var P6=F.object({type:F.literal("pattern"),baseDir:F.string().optional(),include:F.array(F.string()).default(["**/*"]),ignore:F.array(F.string()).optional(),destination:F.string().optional()}),O6=F.object({type:F.literal("static"),source:F.string(),destination:F.string().optional()}),T6=F.object({type:F.literal("configKey"),key:F.string(),destination:F.string().optional(),anchor:F.string().optional(),groupBy:F.string().optional(),preserveFilePaths:F.boolean().default(!1)}),I6=F.discriminatedUnion("type",[P6,O6,T6]),B6=F.object({inclusions:F.array(I6),generatesAssetsManifest:F.boolean().default(!1)}).strict().superRefine((e,t)=>{for(let[n,r]of e.inclusions.entries())if(r.type==="configKey"){let i=r.anchor!==void 0,s=r.groupBy!==void 0;i!==s&&t.addIssue({code:F.ZodIssueCode.custom,message:"`anchor` and `groupBy` must both be set or both be omitted",path:["inclusions",n]})}});async function aE(e,t){let n=B6.parse(e.config),{extension:r,options:i}=t,s=sh(r.outputPath),a=i.app.directory,l=new Map,p=new Set,h=0;for(let v of n.inclusions){if(v.type!=="configKey")continue;let b=L=>i.stdout.write(L),A=v.destination?bd(v.destination,b):void 0,O=A===""?void 0:A,T=await iE({key:v.key,baseDir:r.directory,outputDir:s,context:t,appDirectory:a,destination:O,usedBasenames:p,preserveFilePaths:v.preserveFilePaths});T.pathMap.forEach((L,q)=>l.set(q,L)),h+=T.filesCopied}let m=await Promise.all(n.inclusions.filter(v=>v.type!=="configKey").map(async v=>{let b=T=>i.stdout.write(T),A=v.destination?bd(v.destination,b):void 0,O=A===""?void 0:A;if(v.type==="pattern"){let T=v.baseDir?R(r.directory,v.baseDir):r.directory,L=O?R(s,O):s,q=await uE({sourceDir:T,outputDir:L,patterns:v.include,ignore:v.ignore??[],appDirectory:a,sourceDirConfigValue:v.baseDir??"."},i),Q=O?q.outputPaths.map(X=>R(O,X)):q.outputPaths;return{filesCopied:q.filesCopied,outputPaths:Q}}if(v.type==="static")return sE({source:v.source,destination:O,baseDir:r.directory,outputDir:s,appDirectory:a},i)})),_=n.generatesAssetsManifest?m.flatMap(v=>v?.outputPaths??[]):[],C=[h,...m.map(v=>v?.filesCopied??0)];if(n.generatesAssetsManifest){let v=n.inclusions.filter(b=>b.type==="configKey");await oE(v,t,l,_)}return{filesCopied:C.reduce((v,b)=>v+(b??0),0)}}d();d();var Fi=fr(KB(),1);function R6(e,t,n){let r=Fi.path.fsPath(e),a=jr(r).toString().split(`
|
|
183
|
+
`).slice(t,n+1),l=a.length===1;return a.map((p,h)=>{let m=t+h+1,_=l?p.trim():p;return`${m} ${_}`}).join(`
|
|
184
|
+
`)}function M6(e){switch(e){case Fi.Severity.ERROR:return{error:`
|
|
185
|
+
[error]:`};case Fi.Severity.WARNING:return{warn:`
|
|
186
|
+
[warning]:`};case Fi.Severity.INFO:return{info:`
|
|
187
|
+
[info]:`}}}function N6(e){return e.map((n,r)=>{let{message:i,uri:s,start:a,end:l,check:p,severity:h}=n,m=R6(s,a.line,l.line),_=r===e.length-1?"":`
|
|
188
|
+
|
|
189
|
+
`;return[M6(h),{bold:p},{subdued:`
|
|
190
|
+
${i}`},`
|
|
191
|
+
|
|
192
|
+
${m}`,_]}).flat()}async function cE(e){let n=await Z(R(e,".theme-check.yml"))?void 0:"theme-check:theme-app-extension",r=await(0,Fi.check)(e,n),i=N6(r);return _0(i)}async function lE(e,t){let{extension:n,options:r}=t;r.stdout.write("Running theme check on your Theme app extension...");let i=await cE(n.directory);i&&r.stdout.write(i)}d();async function fE(e,t){let{extension:n,options:r}=t;r.stdout.write(`Bundling theme extension ${n.localIdentifier}...`);let i=await As(n);return await Promise.all(i.map(async s=>{let a=Oe(n.directory,s),l=R(n.outputPath,a);s!==l&&await Mn(s,l)})),{filesCopied:i.length}}d();async function pE(e,t){let n=t.extension.configuration;t.options.buildDirectory=e.config?.bundleFolder??void 0;let r=await WF(t.extension,t.options),i=De(r),s=e.config?.bundleFolder?R(De(t.extension.outputPath),e.config.bundleFolder):De(t.extension.outputPath);if(Nr(i)===Nr(s)||(await Mn(i,s),!e.config?.generatesAssetsManifest)||!Array.isArray(n.extension_points))return;let a=n.extension_points.filter(p=>typeof p=="object"&&p.build_manifest),l=j6(a,e.config?.bundleFolder);Object.keys(l).length>0&&await ah(t,l)}function j6(e,t){let n={};for(let{target:r,build_manifest:i}of e){if(!i?.assets)continue;let s={};for(let[a,l]of Object.entries(i.assets))l?.filepath&&(s[a]=t?R(t,l.filepath):l.filepath);Object.keys(s).length>0&&(n[r]=s)}return n}d();async function dE(e,t){return HF(t.extension,t.options)}d();async function hE(e,t){let{extension:n}=t;if(await Z(n.outputPath)&&await di(n.outputPath))throw new Error(`outputPath '${n.outputPath}' is a directory \u2014 expected a file path for the tax stub`);await Tc(n.outputPath),await Et(n.outputPath,"(()=>{})();")}async function DE(e,t){switch(e.type){case"include_assets":return aE(e,t);case"build_theme":return lE(e,t);case"bundle_theme":return fE(e,t);case"bundle_ui":return pE(e,t);case"build_function":return dE(e,t);case"create_tax_stub":return hE(e,t);default:throw new Error(`Unknown build step type: ${e.type}`)}}async function mE(e,t){let n=Date.now();try{let r=await DE(e,t);return{id:e.id,success:!0,duration:Date.now()-n,output:r}}catch(r){let i=r;if(e.continueOnError)return t.options.stderr.write(`Warning: Step "${e.name}" failed but continuing: ${i.message}
|
|
193
|
+
`),{id:e.id,success:!1,duration:Date.now()-n,error:i};throw i.message=`Build step "${e.name}" failed: ${i.message}`,i}}d();import{openSync as $6,readSync as L6,closeSync as U6}from"fs";var gE=128*1024,pl=new Map,dl=new Map,hl=new Map;function ao(e){let t=dl.get(e);if(t!==void 0)return t;let n=Ut(e);return dl.set(e,n),n}function Ms(e){let t=hl.get(e);if(t!==void 0)return t;let n=jy(e);return hl.set(e,n),n}function k6(e){let t=$6(e,"r");try{let n=Buffer.alloc(gE),r=L6(t,n,0,gE,0);return n.subarray(0,r).toString()}finally{U6(t)}}function _E(){pl.clear(),dl.clear(),hl.clear()}function q6(e){let t=pl.get(e);if(t)return t;let n=k6(e),r=e.substring(e.lastIndexOf(".")),i;switch(r){case".js":case".mjs":case".cjs":case".ts":case".tsx":case".jsx":i=FE(n,e);break;case".rs":i=W6(n,e);break;default:i=[]}return pl.set(e,i),i}function ch(e,t=new Set){if(t.has(e))return[];t.add(e);let n=q6(e),r=[e,...n];for(let i of n)try{if(ao(i)&&!Ms(i)){let s=ch(i,t);r.push(...s)}}catch(s){if(s instanceof Error&&s.message.includes("ENOENT"))continue;throw s}return It(r)}function yE(){return{directImports:pl.size,fileExists:dl.size,isDir:hl.size}}function lh(e,t){return FE(e,t)}function FE(e,t){let n=[],r=[/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 i of r){let s;for(;(s=i.exec(e))!==null;){let a=s[1];if(a&&a.startsWith(".")){let l=H6(a,t);l&&n.push(l)}}}return It(n)}function W6(e,t){let n=[],r=/^\s*(?:pub\s+)?mod\s+([a-z_][a-z0-9_]*)\s*;/gm,i;for(;(i=r.exec(e))!==null;){let a=i[1];if(a){let l=z6(a,t);l&&n.push(l)}}let s=/#\[path\s*=\s*"([^"]+)"\]/g;for(;(i=s.exec(e))!==null;){let a=i[1];if(a){let l=R(De(t),a);ao(l)&&n.push(l)}}return It(n)}function H6(e,t){let n=ao(t)&&Ms(t)?t:De(t),r=R(n,e);if(ao(r)&&Ms(r)){let s=[R(r,"index.js"),R(r,"index.ts"),R(r,"index.tsx"),R(r,"index.jsx")];for(let a of s)if(ao(a)&&!Ms(a))return a;return null}let i=[r,`${r}.js`,`${r}.ts`,`${r}.tsx`,`${r}.jsx`];for(let s of i)if(ao(s)&&!Ms(s))return s;return null}function z6(e,t){let n=De(t),r=[R(n,`${e}.rs`),R(n,e,"mod.rs")];for(let i of r)if(ao(i))return i;return null}var V6=["**/node_modules/**","**/.git/**","**/*.test.*","**/dist/**","**/*.swp","**/generated/**","**/.gitignore"],Dl=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 Te(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_${Pc(this.localIdentifier)}_ID`,this.outputPath=R(this.directory,this.outputRelativePath),this.uid=this.buildUIDFromStrategy(),this.devUUID=`dev-${this.uid}`}get draftMessages(){if(this.isAppConfigExtension)return{successMessage:void 0,errorMessage:void 0};let t=`Draft updated successfully for extension: ${this.localIdentifier}`,n=`Error updating extension draft for ${this.localIdentifier}`;return{successMessage:t,errorMessage:n}}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:n}){let r=await this.specification.deployConfig?.(this.configuration,this.directory,t,void 0,{appConfiguration:n}),i=this.specification.transformLocalToRemote?.(this.configuration,n),s=r??i??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($r(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 r=(await Ve(`**/${this.handle}.js.map`,{cwd:t,absolute:!0,followSymbolicLinks:!1}))[0];if(r===void 0)return Promise.resolve();let i=R(this.directory,Oe(t,r));await Bc(r,i,{overwrite:!0}),ce(`Source map for ${this.localIdentifier} created: ${i}`)}async publishURL(t){let n=await Vy(),r=this.specification.partnersWebIdentifier;return`https://${n}/${t.orgId}/apps/${t.appId}/extensions/${r}/${t.extensionId}`}getOutputFolderId(t){return t??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:n}=this.getBundleExtensionStdinContent(),r=lh(t,this.directory),i=n?.flatMap(s=>lh(s.content,this.directory))??[];return r.concat(...i)}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 Z(R(this.directory,"locales"))&&t.push(R(this.directory,"locales","**.json")),t.push(R(this.directory,"**.toml")),t}}get inputQueryPath(){return R(this.directory,"input.graphql")}get isJavaScript(){return!!(this.entrySourceFilePath.endsWith(".js")||this.entrySourceFilePath.endsWith(".ts"))}async build(t){let{clientSteps:n=[]}=this.specification,r={extension:this,options:t,stepResults:new Map},i=n.find(s=>s.lifecycle==="deploy")?.steps??[];for(let s of i){let a=await mE(s,r);r.stepResults.set(s.id,a)}}async buildForBundle(t,n,r){this.outputPath=this.getOutputPathForDirectory(n,r),await this.build(t);let i=R(n,this.getOutputFolderId(r));await this.keepBuiltSourcemapsLocally(i)}getOutputPathForDirectory(t,n){let r=this.getOutputFolderId(n);return R(t,r,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({identifiers:t,developerPlatformClient:n,apiKey:r,appConfiguration:i}){let s=await this.deployConfig({apiKey:r,appConfiguration:i});if(!s)return;let a={config:JSON.stringify(s),context:this.contextValue,handle:this.handle},l=this.isUUIDStrategyExtension?t.extensions[this.localIdentifier]:t.extensionsNonUuidManaged[this.localIdentifier];return{...a,uid:this.uid,uuid:l,specificationIdentifier:n.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??V6}}watchedFiles(){let t=[],{paths:n,ignore:r}=this.watchPatterns(),i=n.flatMap(s=>ky(s,{cwd:this.directory,absolute:!0,followSymbolicLinks:!1,ignore:r}));if(t.push(...i.flat()),!this.devSessionWatchConfig){let s=this.scanImports();t.push(...s)}return It(t.map(s=>no(s)))}async rescanImports(){let t=this.cachedImportPaths;return this.cachedImportPaths=void 0,_E(),this.scanImports(),t!==this.cachedImportPaths}scanImports(){if(this.cachedImportPaths!==void 0)return this.cachedImportPaths;if(hs(process.env.SHOPIFY_CLI_DISABLE_IMPORT_SCANNING))return this.cachedImportPaths=[],this.cachedImportPaths;try{let t=performance.now(),n=this.devSessionDefaultWatchPaths(),r=n.flatMap(l=>ch(l).map(p=>no(Nr(p))));this.cachedImportPaths=It(r)??[];let i=Math.round(performance.now()-t),s=yE(),a=s?` (cache: ${s.directImports} parsed, ${s.fileExists} stats)`:"";return ce(`Import scan for "${this.handle}": ${n.length} entries, ${this.cachedImportPaths.length} files, ${i}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,n=`${t.topic}${t.uri}${t.filter}`;return gs(n).substring(0,Vc)}else return jc(JSON.stringify(this.configuration))}}buildUIDFromStrategy(){switch(this.specification.uidStrategy){case"single":return this.specification.identifier;case"uuid":return this.configuration.uid??jc(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,x0)}else return jc(JSON.stringify(this.configuration))}}};d();async function EE(e,t=""){let n=Y6(t),r=await Es(n);for(;await Z(R(e,ml(r)))&&await Ct({message:`Configuration file ${ml(r)} 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"});)r=await Es(n);return ml(r)}function ml(e,t=!1){let n=Lt(e);return n===""?"shopify.app.toml":`shopify.app.${t?dr.cyan(n):n}.toml`}async function fh(e){return Ve(R(e,"shopify.app*.toml"))}async function vE(e){let t=(await fh(e)).map(r=>Te(r));if(t.length===0)return io("Could not find any shopify.app.toml file in the directory.");if(t.length===1)return $r(t[0]);let n=await f0({message:"Configuration file",choices:t.map(r=>({label:r,value:r}))});return $r(n)}function Y6(e){return{message:"Configuration file name:",initialAnswer:e,validate:G6,preview:t=>`${ml(t,!0)} will be generated in your root directory`}}function G6(e){if(Lt(e).length>238)return"The file name is too long."}d();d();function gr(e,t){return!t||!e.startsWith("/")?e:`${rn(t)}${e}`}var nu="webhook_subscription",K6=F.object({topic:F.string(),actions:F.array(F.string({invalid_type_error:"Value must be a string"})).optional(),api_version:F.string(),uri:F.preprocess(rn,T0,{required_error:"Missing value at"}),include_fields:F.array(F.string({invalid_type_error:"Value must be a string"})).optional(),filter:F.string({invalid_type_error:"Value must be a string"}).optional(),payload_query:F.string({invalid_type_error:"Value must be a string"}).trim().min(1).optional(),name:F.string({invalid_type_error:"Value must be a string"}).trim().min(1).max(50).optional()});function J6(e){let{api_version:t,topic:n,...r}=e;return{webhooks:{subscriptions:[{topics:[n],...r}]}}}var Q6={forward:(e,t)=>{let n=e,r;return"application_url"in t&&(r=t?.application_url),{...n,uri:gr(n.uri,r)}},reverse:J6},X6=Dr({identifier:nu,schema:K6,transformConfig:Q6,uidStrategy:"dynamic"}),CE=X6;d();d();d();import{readdirSync as Z6}from"fs";async function gl(e){if(!e||!await di(e))return{};let t={},n=Z6(e);return await Promise.all(n.map(async r=>{if(cl(r)){let i=R(e,r),a=(await lt.read(i)).content;a.client_id&&(t[a.client_id]=r)}})),t}d();var ph;function hh(){return ph??(ph=new Td({projectName:"shopify-cli-app"})),ph}function _l(e,t=hh()){let n=no(e);return ce(Ae`Reading cached app information for directory ${xe.path(n)}...`),t.get(n)}function ru(e,t=hh()){e.directory=no(e.directory),ce(Ae`Storing app information for directory ${xe.path(e.directory)}:${xe.json(e)}`);let n=t.get(e.directory);n?t.set(e.directory,{...n,...e}):t.set(e.directory,e)}function wE(e,t=hh()){let n=no(e),r=t.get(n);r&&t.set(n,{...r,configFile:void 0})}var dh;function Dh(){return dh??(dh=new Td({projectName:"shopify-cli-app-command"})),dh}function bE(e){let t=process.env.COMMAND_RUN_ID;if(!t)return;let n=Dh(),r=n.get(t);n.set(t,{...r,...e})}function yl(){let e=process.env.COMMAND_RUN_ID;return e?Dh().get(e):void 0}function EK(){Dh().clear()}function xE(e){bE({tomls:e})}function AE(e){bE({selectedToml:e})}async function SE(e,t,n,r){let i=await gl(r?.directory);i&&xE(i);let s=p=>i[p?.apiKey]?{label:`${p.title} (${i[p.apiKey]})`,value:p.apiKey}:{label:p.title,value:p.apiKey},a=t,l=await Fs({message:"Which existing app is this for?",choices:a.map(s),hasMorePages:n,search:async p=>{let h=await e(p);return a=h.apps,{data:a.map(s),meta:{hasNextPage:h.hasMorePages}}}});return a.find(p=>p.apiKey===l)}async function PK({stores:e,hasMorePages:t=!1,onSearchForStoresByName:n,showDomainOnPrompt:r=!0}){if(e.length===0)return;if(e.length===1)return Wc(`Using your default dev store, ${e[0].shopName}, to preview your project.`),e[0];let i=p=>{let h=p.shopName;return r&&p.shopDomain&&(h=`${p.shopName} (${p.shopDomain})`),{label:h,value:p.shopId}},s=e,a={};n&&(a.search=async p=>{let h=await n(p);return s=h.stores,{data:s.map(i),meta:{hasNextPage:h.hasMorePages}}});let l=await Fs({message:"Which store would you like to use to view your project?",choices:s.map(i),hasMorePages:t,...a});return s.find(p=>p.shopId===l)}async function OK(){return Ct({message:"Make this store transfer-disabled? For security, once you use a dev store to preview an app locally, the store can never be transferred to a merchant to use as a production store.",confirmationMessage:"Yes, make this store transfer-disabled permanently",cancellationMessage:"No, select another store",defaultValue:!1})}async function PE(e){return Es({message:"App name",defaultValue:e,validate:t=>{if(t.length===0)return"App name can't be empty";if(t.length>jd)return`Enter a shorter name (${jd} character max.)`;if(t.includes("shopify"))return`Name can't contain "shopify." Enter another name.`}})}async function TK(e){return Ct({message:"Finished creating a dev store?",confirmationMessage:`Yes, ${e.businessName} has a new dev store`,cancellationMessage:"No, cancel dev"})}async function OE(){return Ct({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 TE(e,t,n,r){return e?tR(t,r):eR(t,n)}function eR(e,t){return Ct({message:"Have Shopify automatically update your app's URL in order to create a preview experience?",confirmationMessage:"Yes, automatically update",cancellationMessage:"No, never",infoTable:{"Current app URL":[e],"Current redirect URLs":t}})}function tR(e,t){let n=["application_url","redirect_urls"];t.appProxy?.proxyUrl&&n.push("app_proxy");let r={"Currently released app URL":[e],"=> Dev URL":[t.applicationUrl],"Affected configurations":n};return Ct({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:r})}function IK(){return Ct({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 HK(e){if(e.noTunnelUseLocalhost)return{frontendUrl:"https://localhost",frontendPort:e.port,usingLocalhost:!0};let t=4040,n="",r=e.noTunnelUseLocalhost;if(Rd())return n=`https://${Rd()}-${t}.${m0()}`,{frontendUrl:n,frontendPort:t,usingLocalhost:r};if(Bd()){let i=Bd()?.replace("https://","");return n=`https://${t}-${i}`,{frontendUrl:n,frontendPort:t,usingLocalhost:r}}if(e.tunnelUrl){let i=e.tunnelUrl.match(/(https:\/\/[^:]+):([0-9]+)/);if(!i)throw new k(`Invalid tunnel URL: ${e.tunnelUrl}`,'Valid format: "https://my-tunnel-url:port"');return t=Number(i[2]),n=i[1],{frontendUrl:n,frontendPort:t,usingLocalhost:r}}return e.tunnelClient&&(t=e.tunnelClient.port,n=await nR(e.tunnelClient)),{frontendUrl:n,frontendPort:t,usingLocalhost:r}}async function nR(e){return new Promise((t,n)=>{let r=0,i=async()=>{let a=e.getTunnelStatus();if(ce(`Polling tunnel status for ${e.provider} (attempt ${r}): ${a.status}`),a.status==="error")return n(new k(a.message,a.tryMessage));a.status==="connected"?t(a.url):(r+=1,s())},s=()=>{setTimeout(i,500)};i()})}function IE(e,t,n){let r;t&&t.length>0?r=(Array.isArray(t)?t:[t]).reduce((a,l)=>(l&&l.length>0&&a.push(`${e}${l}`),a),[]):r=[`${e}/auth/callback`,`${e}/auth/shopify/callback`,`${e}/api/auth/callback`];let i=n?{appProxy:{proxyUrl:rR(gr(n.url,e),e),proxySubPath:n.subpath,proxySubPathPrefix:n.prefix}}:{};return{applicationUrl:e,redirectUrlWhitelist:r,...i}}function rR(e,t){let n=new URL(e),r=new URL(t);return n.host=r.host,n.toString().replace(/\/$/,"")}async function zK(e,t,n,r){let i={apiKey:t,...e},s=await n.updateURLs(i);if(s.appUpdate.userErrors.length>0){let a=s.appUpdate.userErrors.map(l=>l.message).join(", ");throw new k(a)}if(r&&r.configuration.client_id===t){let a=await lt.read(r.configPath),l={application_url:e.applicationUrl,auth:{redirect_urls:e.redirectUrlWhitelist}};e.appProxy&&(l.app_proxy={url:e.appProxy.proxyUrl,subpath:e.appProxy.proxySubPath,prefix:e.appProxy.proxySubPathPrefix}),await a.patch(l)}}async function VK(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 YK(e){if(e.localApp&&e.localApp.configuration.client_id!==e.apiKey||(e.newApp??!D0()))return!0;let t=e.cachedUpdateURLs===!0;if(e.cachedUpdateURLs===void 0)if(t=await TE(e.developerPlatformClient.supportsDevSessions,e.currentURLs.applicationUrl,e.currentURLs.redirectUrlWhitelist,e.newURLs),e.localApp){let n=e.localApp.configuration;n.build={...n.build,automatically_update_urls_on_dev:t},await(await lt.read(e.localApp.configPath)).patch({build:{automatically_update_urls_on_dev:t}})}else ru({directory:e.appDirectory,updateURLs:t});return t}async function GK(e,t,n){let r=await zy(e,"tunnel_start",{port:t,provider:n}),i=Object.values(r).filter(a=>!a?.isErr()||a.error.type!=="invalid-provider");if(i.length>1)throw new jn(`Multiple tunnel plugins for ${n} found`);let s=i[0];if(!s)throw new jn(`We couldn't find the ${n} tunnel plugin`);if(s.isErr())throw new k(`${n} 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 mh({directory:e,configName:t,warningContent:n,shouldRenderSuccess:r=!0,reset:i=!1}){if(i){wE(e);let l=await Lc(e);ys({headline:"Cleared current configuration.",body:["In order to set a new current configuration, please run",{command:qc(l,"shopify app config use CONFIG_NAME")},{char:"."}]});return}n&&kc(n);let s=(await iR(e,t)).valueOrAbort(),{activeConfig:a}=await Un(e,s);return gh(a.file.content,{configFileName:s,directory:e}),r&&ys({headline:`Using configuration file ${s}`}),s}function gh(e,t){let{configFileName:n,directory:r}=t;if(e.client_id)ru({directory:r,configFile:n});else throw new k(`Configuration file ${n} needs a client_id.`)}async function iR(e,t){if(t){let n=Ln(t);return await Z(R(e,n))?$r(n):io(`Could not find configuration file ${n}`)}return vE(e)}async function BE(e,t,n){let r=t,i=_l(e.directory)?.configFile,s=i?R(e.directory,i):null,a=!!(!r&&s&&!Ut(s));if(a&&!n?.skipPrompts){let m={headline:`Couldn't find ${i}`,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."]};r=await mh({directory:e.directory,warningContent:m,shouldRenderSuccess:!1})}r=r??(a?void 0:i);let l;t?l="flag":r?l="cached":l="default";let p=Ln(r),h=e.appConfigByName(p);if(!h)throw new k(Ae`Couldn't find ${p} in ${xe.path(e.directory)}.`);return oR(e,h,l)}async function oR(e,t,n){let r=typeof t.content.client_id=="string"?t.content.client_id:void 0,i=!!r&&r!=="",s=Fl(e,t.path),a=await El(e,r);return{file:t,source:n,isLinked:i,dotenv:s,hiddenConfig:a}}d();async function RE(e,t){await Gy("warn-on-multiple-versions",{days:1},async()=>{if(!t["@shopify/cli"]||qy())return;let n=o0(),r=n?wd:await i0();if(!r)return;let i=n?await r0(e):wd;if(!i)return;let a={headline:`Two Shopify CLI installations found \u2013 using ${n?"global installation":"local dependency"}`,body:[`A global installation (v${r}) and a local dependency (v${i}) 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"}};oo(a)})}d();import{existsSync as uR,readFileSync as sR}from"fs";var aR=[{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 jE(e){let t={},n=aR.find(r=>(!r.detectors.some||r.detectors.some.reduce((i,s)=>ME(s,NE(e,s.path,t)),!1))&&(!r.detectors.every||r.detectors.every.reduce((i,s)=>i?ME(s,NE(e,s.path,t)):!1,!0)));return n?n.name:"unknown"}function ME(e,t={}){return t[e.path]?!e.matchContent||new RegExp(e.matchContent).test(t[e.path]):!1}function NE(e,t,n={}){if(n[t])return n;let r=R(e,t);if(!uR(r))return n;let i=sR(r,{encoding:"utf8"});return n[t]=i,n}var UE=fr(JB(),1);function cR(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 Ns(e){let t=cR(e),n=t?`${e.message}. ${t}`:e.message;return e.path?.length?`[${e.path.join(".")}]: ${n}`:n}async function Fh(e,t,n){let r=n;if(!r)try{r=(await lt.read(t)).content}catch(i){if(i instanceof vs)return{errors:[{file:t,message:i.message}]};throw i}return kE(e,t,r)}function kE(e,t,n){let r=e.safeParse(n);return r.success?{data:r.data}:{errors:tE(r.error.issues).map(i=>({file:t,message:i.message,path:i.path,code:i.code}))}}function $E(e,t,n){let r=e.parseConfigurationObject(n);switch(r.state){case"ok":return{data:r.data};case"error":return{errors:r.errors.map(i=>({file:t,message:i.message??"Unknown error",path:i.path}))}}}var Bs=class{constructor(){this.errors=[]}addError(t){this.errors.push(t)}addErrors(t){this.errors.push(...t)}getErrors(t){return t?this.errors.filter(n=>n.file===t):[...this.errors]}isEmpty(){return this.errors.length===0}};async function rQ(e){if(!((await fh(e)).length>0))throw new k(Ae`Couldn't find an app toml file at ${xe.path(e)}, is this an app directory?`)}async function iQ(e,t){let{project:n,activeConfig:r}=await Un(e),i=r.file.content,s=yh(n,r.file),a=await Promise.all(s.map(_=>qE(_.path,_.content))),l=a.flatMap(_=>_.errors??[]);if(l.length>0)throw new k(l.map(Ns).join(`
|
|
196
|
+
`));let h=a.filter(_=>"web"in _).map(_=>_.web).some(_=>mr(_,ft.Frontend)||mr(_,ft.Backend)),m=al(i);return{isLaunchable:h,scopesArray:m,name:t,directory:n.directory,isEmbedded:h}}async function qE(e,t){let n=await Fh(ZF,e,t);if(n.errors)return{errors:n.errors};let r=n.data,i=new Set("roles"in r?r.roles:[]);"type"in r&&i.add(r.type);let{type:s,...a}={...r,roles:Array.from(i),type:void 0};return{web:{directory:De(e),configuration:a,framework:await jE(De(e))}}}async function WE(e){let{project:t,activeConfig:n}=await Un(e.directory,e.userProvidedConfigName,e.skipPrompts?{skipPrompts:!0}:void 0);return iu({project:t,activeConfig:n,specifications:e.specifications,remoteFlags:e.remoteFlags,ignoreUnknownExtensions:e.ignoreUnknownExtensions})}async function iu(e){let{project:t,activeConfig:n,specifications:r,remoteFlags:i=[],ignoreUnknownExtensions:s,reloadState:a,clientIdOverride:l}=e,p={...n.file.content};l&&(p.client_id=l);let m=XF(r),_=n.file.path,C=Te(_),v=await Fh(m,_,p);if(v.errors){let Q=v.errors.map(Ns).join(`
|
|
197
|
+
`);throw new k(`Validation errors in ${_}:
|
|
198
|
+
|
|
199
|
+
${Q}`)}let b=v.data,A=dR(t.appConfigFiles,{[C]:b.client_id}),O=!1;try{O=await fR(t.directory,_)}catch{}let T={allClientIdsByConfigName:A,usesLinkedConfig:!0,name:C,gitTracked:O,source:n.source,usesCliManagedUrls:b.build?.automatically_update_urls_on_dev},L={directory:t.directory,configPath:_,configuration:b,configurationLoadResultMetadata:T,configSchema:m,specifications:r,remoteFlags:i};return new _h({ignoreUnknownExtensions:s,loadedConfiguration:L,project:t,reloadState:a}).loaded()}function lR(e){return e.access_scopes?.scopes??""}async function HE(e){try{let{project:t,activeConfig:n}=await Un(e.directory,e.configName,e.skipPrompts?{skipPrompts:!0}:void 0),r=await iu({project:t,activeConfig:n,specifications:e.specifications,remoteFlags:e.remoteFlags});return{state:"loaded-app",app:r,configuration:r.configuration,packageManager:t.packageManager}}catch{try{let t=await Os.load(e.directory),{configurationPath:n}=await pR(t.directory,e.configName),i=(await lt.read(n)).content;return{state:"loaded-template",rawConfig:i,scopes:lR(i),appDirectory:t.directory,packageManager:t.packageManager}}catch{return{state:"error"}}}}async function oQ(e){let{project:t,activeConfig:n}=await Un(e.directory,Te(e.configPath)),r={extensionDevUUIDs:new Map(e.allExtensions.map(s=>[s.handle,s.devUUID])),previousDevURLs:e.devApplicationURLs},i=await iu({project:t,activeConfig:n,specifications:e.specifications,remoteFlags:e.remoteFlags??[],reloadState:r});if(!i.errors.isEmpty()){let s=i.errors.getErrors();throw new k(Ae`${xe.errorText("Validation errors")}:\n\n${s.map(Ns).join(`
|
|
200
|
+
`)}`)}return i}function zE(e){let t=Rs(e);return t?`${Jo.production}.${t}`:Jo.production}var _h=class{constructor({ignoreUnknownExtensions:t,loadedConfiguration:n,reloadState:r,project:i}){this.errors=new Bs,this.ignoreUnknownExtensions=t??!1,this.specifications=n.specifications,this.remoteFlags=n.remoteFlags,this.loadedConfiguration=n,this.reloadState=r,this.project=i}get activeConfigFile(){let t=this.loadedConfiguration.configPath;return this.project.appConfigFiles.find(n=>n.path===t)}async loaded(){let{configuration:t,directory:n,configPath:r,configurationLoadResultMetadata:i,configSchema:s}=this.loadedConfiguration;await gR(i);let a=Fl(this.project,r),l=await this.loadExtensions(n,t),p=t.name,m=t.handle??p??"",_=await El(this.project,t.client_id);this.reloadState||await RE(n,this.project.nodeDependencies);let{webs:C,usedCustomLayout:v}=await this.loadWebs(n,t.web_directories),b=new sl({name:m,directory:n,configPath:r,configuration:t,webs:C,modules:l,dotenv:a,errors:this.errors,specifications:this.specifications,configSchema:s,remoteFlags:this.remoteFlags,hiddenConfig:_,devApplicationURLs:this.getDevApplicationURLs(t,C)}),A=b.realExtensions.map(O=>O.type);return await y0(A),await DR(b,this.project.usesWorkspaces,{usedCustomLayoutForWeb:v,usedCustomLayoutForExtensions:t.extension_directories!==void 0}),await b.generateExtensionTypes(),b}async loadWebs(t,n){let r=this.activeConfigFile,i=r?yh(this.project,r):this.project.webConfigFiles,s=i.map(m=>m.path),a=await Promise.all(i.map(m=>qE(m.path,m.content))),l=[];for(let m of a)m.errors?this.errors.addErrors(m.errors):l.push(m.web);this.validateWebs(l);let p=s.every(m=>Oe(t,m).startsWith("web/"));return{webs:l,usedCustomLayout:n!==void 0||!p}}findSpecificationForType(t){return this.specifications.find(n=>n.identifier===t||n.externalIdentifier===t||n.additionalIdentifiers?.includes(t))}validateWebs(t){[ft.Backend,ft.Frontend].forEach(n=>{let r=t.filter(i=>i.configuration.roles.includes(n));if(r.length>1){let i=r.map(l=>R(l.directory,$n.web)),s=i.map(l=>` ${l}`).join(`
|
|
201
|
+
`),a=i[i.length-1];this.errors.addError({file:a,message:`You can only have one "web" configuration file with the ${n} role in your app.
|
|
202
|
+
|
|
203
|
+
Conflicting configurations found at:
|
|
204
|
+
${s}`})}})}async createExtensionInstance(t,n,r,i){let s=this.findSpecificationForType(t),a,l=!1;if(s)l=!0;else{if(this.ignoreUnknownExtensions)return;this.errors.addError({file:r,message:`Invalid extension type "${t}" in "${Sc(r)}"`});return}let p=$E(s,r,n);if(p.errors){this.errors.addErrors(p.errors);return}let h=p.data;l&&(a=await this.findEntryPath(i,s));let m=new Dl({configuration:h,configurationPath:r,entryPath:a,directory:i,specification:s});if(this.reloadState&&h.handle){let _=this.reloadState.extensionDevUUIDs.get(h.handle);_&&(m.devUUID=_)}if(l){let _=await m.validate();_.isErr()&&this.errors.addError({file:r,message:g0(_.error).trim()})}return m}async loadExtensions(t,n){if(this.specifications.length===0)return[];let r=await this.createExtensionInstances(t),i=await this.createConfigExtensionInstances(t,n),s=this.createWebhookSubscriptionInstances(t,n),a=await Promise.all([...r,...i,...s]),l=ro(a.flat()),p=new Set;return l.forEach(h=>{if(h.handle&&p.has(h.handle)){let m=l.filter(C=>C.handle===h.handle),_=By(m.map(C=>C.name));this.errors.addError({file:h.configurationPath,message:`Duplicated handle "${h.handle}" in extensions ${_}. Handle needs to be unique per extension.`})}else h.handle&&p.add(h.handle)}),l}async createExtensionInstances(t){let n=this.activeConfigFile;return(n?LE(this.project,n):this.project.extensionConfigFiles).map(async i=>{let s=i.path,a=De(s),l=i.content,p=A0.safeParse(l);if(!p.success)return this.errors.addError({file:s,message:`Invalid extension configuration at ${Oe(t,s)}`}),[];let{extensions:h,type:m}=p.data;if(h){let _=await Fh(P0,s,i.content);if(_.errors)return this.errors.addErrors(_.errors),[];let C=_.data,v=C.extensions.map(async b=>{let A={...C,...b};return A.handle||(this.errors.addError({file:s,message:`Missing handle for extension "${A.name}" at ${Oe(t,s)}`}),A.handle="unknown-handle"),this.createExtensionInstance(A.type,A,s,a)});return Promise.all(v)}else{if(m)return this.createExtensionInstance(m,l,s,a);this.errors.addError({file:s,message:`Invalid extension type at "${Oe(t,s)}". Please specify a type.`});return}})}createWebhookSubscriptionInstances(t,n){let r=this.loadedConfiguration.configPath,i=this.findSpecificationForType(nu);if(!i)return[];let s=kE(Kc,r,n);if(s.errors)return this.errors.addErrors(s.errors),[];let{api_version:a,subscriptions:l=[]}=s.data.webhooks;return ro(l.flatMap(m=>{let{uri:_,topics:C,compliance_topics:v,...b}=m;return C?.map(A=>({api_version:a,uri:_,topic:A,...b}))})).map(async m=>this.createExtensionInstance(i.identifier,m,r,t))}async createConfigExtensionInstances(t,n){let r=this.loadedConfiguration.configPath,i=await Promise.all(this.specifications.filter(a=>Zo(a)).filter(a=>a.identifier!==nu).map(async a=>{let l=$E(a,r,n);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,r,t).then(m=>this.validateConfigurationExtensionInstance(n.client_id,n,m)),Object.keys(p)]})),s=Object.keys(n).filter(a=>!i.some(([l,p])=>p.includes(a))).filter(a=>![...Object.keys(Ts.shape),"organization_id"].includes(a));return s.length>0&&!this.ignoreUnknownExtensions&&this.errors.addError({file:r,message:`Unsupported section(s) in app configuration: ${s.sort().join(", ")}`}),i.filter(([a])=>a).map(([a])=>a)}async validateConfigurationExtensionInstance(t,n,r){return r&&await r.deployConfig({apiKey:t,appConfiguration:n})?r:void 0}async findEntryPath(t,n){let r;return n.appModuleFeatures().includes("single_js_entry_path")?(r=(await Promise.all(["index"].flatMap(i=>[`${i}.js`,`${i}.jsx`,`${i}.ts`,`${i}.tsx`]).flatMap(i=>[`src/${i}`,i]).map(i=>R(t,i)).map(async i=>await Z(i)?i:void 0))).find(i=>i!==void 0),r||this.errors.addError({file:t,message:`Couldn't find an index.{js,jsx,ts,tsx} file in the directories ${t} or ${R(t,"src")}`})):n.identifier==="function"&&(r=(await Promise.all(["src/index.js","src/index.ts","src/main.rs"].map(i=>R(t,i)).map(async i=>await Z(i)?i:void 0))).find(i=>i!==void 0)),r}getDevApplicationURLs(t,n){let r=this.reloadState?.previousDevURLs;return r&&IE(r.applicationUrl,n.map(({configuration:i})=>i.auth_callback_path).find(i=>i),t.app_proxy)}};async function Un(e,t,n){let r=await Os.load(e),i=await BE(r,t,n);return{project:r,activeConfig:i}}async function fR(e,t){let n=R(e,".gitignore");if(!Ut(n))return!0;let r=await $e(n),i=UE.default.default().add(r),s=Oe(e,t);return!i.ignores(s)}async function pR(e,t){let n=Ln(t),r=R(e,n);if(await Z(r))return{configurationPath:r,configurationFileName:n};throw new k(Ae`Couldn't find ${n} in ${xe.path(e)}.`)}function dR(e,t){let n=e.map(r=>{let i=Te(r.path);if(t[i]!==void 0&&typeof t[i]=="string")return[i,t[i]];let s=r.content.client_id;if(typeof s=="string"&&s!=="")return[i,s]}).filter(r=>r!==void 0);return Object.fromEntries(n)}async function hR(e){let t=e.filter(l=>mr(l,ft.Backend)),n=e.filter(l=>mr(l,ft.Frontend));if(t.length>1){ce("Unable to decide project type as multiple web backends");return}else{if(t.length===0&&n.length>0)return"frontend";if(!t[0]){ce("Unable to decide project type as no web backend");return}}let{directory:r}=t[0],i=R(r,"package.json"),s=R(r,"Gemfile"),a=R(r,"composer.json");if(await Z(i))return"node";if(await Z(s))return"ruby";if(await Z(a))return"php"}function mr(e,t){return e.configuration.roles.includes(t)}async function DR(e,t,n){let r=e.webs,i=e.allExtensions.filter(h=>h.isSentToMetrics()),s=e.name,a=e.directory,l=e.configuration.client_id,p=al(e.configuration).sort();await mR(r,i,n,s,a,l,p,t)}async function mR(e,t,n,r,i,s,a,l){await nn.addPublicMetadata(async()=>{let p=await hR(e),h=t.filter(T=>T.isFunctionExtension).length,m=t.filter(T=>T.isESBuildExtension).length,_=t.filter(T=>T.isThemeExtension).length,C=t.length,v=e.filter(T=>mr(T,ft.Backend)).length,b=v===1?e.find(T=>mr(T,ft.Backend))?.framework:void 0,A=e.filter(T=>mr(T,ft.Frontend)).length,O={};for(let T of t)O[T.type]===void 0?O[T.type]=1:O[T.type]++;return{api_key:s,project_type:p,app_extensions_any:C>0,app_extensions_breakdown:JSON.stringify(O),app_extensions_count:C,app_extensions_custom_layout:n.usedCustomLayoutForExtensions,app_extensions_function_any:h>0,app_extensions_function_count:h,app_extensions_theme_any:_>0,app_extensions_theme_count:_,app_extensions_ui_any:m>0,app_extensions_ui_count:m,app_name_hash:gs(r),app_path_hash:gs(i),app_scopes:JSON.stringify(a),app_web_backend_any:v>0,app_web_backend_count:v,app_web_custom_layout:n.usedCustomLayoutForWeb,app_web_framework:b,app_web_frontend_any:A>0,app_web_frontend_count:A,env_package_manager_workspaces:l}}),await nn.addSensitiveMetadata(async()=>({app_name:r}))}async function gR(e){await nn.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 _R="project.json";async function Eh(e){let t=await v0(e),n=R(t,_R);return await Z(n)||await Et(n,JSON.stringify({})),n}function Fl(e,t){let n=Rs(t);if(n){let r=`${Jo.production}.${n}`;return e.dotenvFiles.get(r)}return e.dotenvFiles.get(Jo.production)}async function El(e,t){if(!t||typeof t!="string")return{};await Eh(e.directory);let n=e.hiddenConfigRaw,r=n[t];if(r&&typeof r=="object")return r;if(typeof n.dev_store_url=="string"){try{let i=await Eh(e.directory);await ul(i,t,{dev_store_url:n.dev_store_url})}catch{}return{dev_store_url:n.dev_store_url}}return{}}function LE(e,t){let n=t.content.extension_directories,i=(Array.isArray(n)&&n.length>0?n:["extensions/*"]).map(s=>`${s}/*.extension.toml`);return e.extensionConfigFiles.filter(s=>{let a=Oe(e.directory,s.path).replace(/\\/g,"/");return i.some(l=>Rc(a,l))})}function yh(e,t){let n=t.content.web_directories;if(!Array.isArray(n)||n.length===0)return e.webConfigFiles;let r=n.map(i=>`${i}/shopify.web.toml`);return e.webConfigFiles.filter(i=>{let s=Oe(e.directory,i.path).replace(/\\/g,"/");return r.some(a=>Rc(s,a))})}function FQ(e,t){let n=t.content.extension_directories,r=(Array.isArray(n)&&n.length>0?n:["extensions/*"]).map(l=>`${l}/*.extension.toml`),i=t.content.web_directories,s=Array.isArray(i)&&i.length>0?i.map(l=>`${l}/shopify.web.toml`):["**/shopify.web.toml"],a=[...r,...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(h=>Rc(p,h))})}d();d();var VE=2,yR=["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 YE(e,t,n,r,i){let s=e.length===0;if(s||(s=await OE()),s){let a=await PE(i.name);return r.createApp(n,{...i,name:a})}else{let l=yl()?.tomls??{};for(let h=0;h<VE;h++){let m=await SE(aF(r,n.id),e,t,{directory:i.directory});if(m){let _=l[m.apiKey];_&&AE(_);let C=await r.appFromIdentifiers(m.apiKey);if(C)return C}else{h<VE-1&&Ko("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 jn(p,yR)}}d();d();d();d();async function GE(e,t,n="extension"){return Ct({message:`Match ${e.handle} (local name) with ${t.title} (name on Shopify Partners, ID: ${t.id})?`,confirmationMessage:`Yes, match to existing ${n}`,cancellationMessage:`No, create as a new ${n}`})}async function KE(e,t){let n=t.map(i=>({label:`Match it to ${i.title} (ID: ${i.id} on Shopify Partners)`,value:i.uuid}));n.push({label:"Create new extension",value:"create"});let r=await Fs({message:`How would you like to deploy your "${e.handle}"?`,choices:n});return t.find(i=>i.uuid===r)}async function co(e,t=!0){let n=e.map(({local:l})=>`"${l.handle}"`).join(", "),r=e.map(({remote:l})=>l.type.toLocaleLowerCase()),i=r.filter((l,p)=>r.indexOf(l)===p).map(l=>`"${l}"`).join(", "),s=e.map(({local:l})=>`"${l.type}"`).join(", ");oo({headline:"Extension migrations can't be undone.",body:`Your ${n} 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 ${i} to ${s}`:"Yes, confirm migration";return Ct({message:`Migrate ${n}?`,confirmationMessage:a,cancellationMessage:"No, cancel"})}async function JE(e){let t={},n=e.remote,r=e.local;for(let i of e.local){let s=n.filter(l=>l.type===i.graphQLType);if(s.length===0)continue;let a=await KE(i,s);a&&(t[i.localIdentifier]=a.uuid,n=n.filter(l=>l.uuid!==a.uuid),r=r.filter(l=>l.localIdentifier!==i.localIdentifier))}return{identifiers:t,toCreate:r,onlyRemote:n}}d();d();var uv=fr(rv()),sv=fr(ov());function js(e,t){return(0,uv.default)(e,t)}function av(e,t){return(0,sv.default)(e,t)}var MR=(e,t)=>(t.type.toLowerCase()===e.graphQLType.toLowerCase()||t.type.toLowerCase()===e.externalType.toLowerCase()||t.type.toLowerCase()===e.type.toLowerCase())&&Lt(t.title)===Lt(e.handle);function cv(e,t){let n=Ad(e,m=>[m.graphQLType,m.handle]),r=Ad(t,m=>[m.type,m.title]),i={};n.forEach(m=>{let _=r.find(C=>MR(m,C));_&&(i[m.localIdentifier]=_.uuid)});let s=e.filter(m=>!i[m.localIdentifier]),a=t.filter(m=>!Object.values(i).includes(m.uuid)),{toConfirm:l,toCreate:p,toManualMatch:h}=$R(s,a);return{matched:i,toCreate:p,toConfirm:l,toManualMatch:h}}function NR(e,t,n){let r={},i=[],s={};e.forEach(v=>{let b=t.find(O=>O.id===v.uid),A=t.find(O=>O.uuid===n[v.localIdentifier]);b?r[v.localIdentifier]=b.id:A&&A.id.length===0?s[v.localIdentifier]=A.uuid:i.push(v)});let a=t.filter(v=>!Object.values(s).includes(v.uuid)&&!Object.values(r).includes(v.id)&&v.id.length===0),{matched:l,toCreate:p,toConfirm:h,toManualMatch:m}=cv(i,a),_={...s,...l},C=e.filter(v=>_[v.localIdentifier]);return jR(C),{matched:{...r,..._},toCreate:p,toConfirm:h,toManualMatch:m}}function jR(e){if(e.length===0)return;let t=[dr.cyan,dr.magenta,dr.blue,dr.green,dr.yellow,dr.red],n=e.reduce((r,i)=>Math.max(r,i.handle.length),0);Ko(`Generating extension IDs
|
|
207
|
+
`),e.forEach((r,i)=>{let s=t[i%t.length]??dr.white;Ko(`${s(r.handle.padStart(n))} | Added ID: ${r.uid}`)}),Ko(`
|
|
208
|
+
`)}function $R(e,t){let n=js(e,"graphQLType"),r=Object.values(Di(n,(v,b)=>v.length===1)).flat(),i=t.map(v=>({...v,type:v.type.toLowerCase()})),s=js(i,"type"),a=Di(s,(v,b)=>v.length===1),l=[],p=[];for(let v of r){let b=a[v.graphQLType.toLowerCase()];b&&b[0]?l.push({local:v,remote:b[0]}):p.push(v)}let h=Sd(e,r),m=Sd(i,l.map(v=>v.remote)),[_,C]=av(h,v=>m.map(b=>b.type.toLowerCase()).includes(v.graphQLType.toLowerCase()));return p.push(...C),{toCreate:p,toConfirm:l,toManualMatch:{local:_,remote:m}}}async function lv(e,t,n,r){let i=r.supportsAtomicDeployments,s=Ch(e,n),a=Object.values(s),l=b=>t.some(A=>A.type!==r.toExtensionGraphQLType(b.graphQLType)?!1:s[b.localIdentifier]===A.uuid),p=e.filter(b=>!l(b)),h=t.filter(b=>!a.includes(b.uuid)),{matched:m,toCreate:_,toConfirm:C,toManualMatch:v}=i?NR(e,t,s):cv(p,h);return{identifiers:{...s,...m},toConfirm:C,toCreate:_,toManualMatch:v}}function Ch(e,t){let n=e.map(r=>r.localIdentifier);return Di(t,(r,i)=>n.includes(i))}d();async function wh(e,t,n,r,i){let s={apiKey:e,type:t,title:n,config:JSON.stringify({}),context:i??null,handle:n},a=await r.createExtension(s);if(a.extensionCreate.userErrors?.length>0){let l=a.extensionCreate.userErrors.map(p=>p.message).join(", ");throw new k(l)}return a.extensionCreate.extensionRegistration}d();async function fv(e){let{extensionsToMigrate:t,appId:n,remoteExtensions:r,migrationClient:i}=e;return await Promise.all(t.map(({remote:s})=>LR({apiKey:n,registrationId:void 0,registrationUuid:s.uuid,migrationClient:i}))),r.map(s=>t.some(({remote:a})=>a.uuid===s.uuid)?{...s,type:"UI_EXTENSION"}:s)}async function LR(e){let{apiKey:t,registrationId:n,registrationUuid:r,migrationClient:i}=e,s={apiKey:t,registrationId:n,registrationUuid:r},a=await i.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();async function pv(e){let{extensionsToMigrate:t,appId:n,remoteExtensions:r,migrationClient:i}=e;await Promise.all(t.map(({remote:l})=>UR({apiKey:n,registrationId:void 0,registrationUuid:l.uuid,migrationClient:i})));let s=new Map([["flow_action_definition","FLOW_ACTION"],["flow_trigger_definition","FLOW_TRIGGER"]]),a=t.map(({remote:l})=>l.uuid);return r.filter(l=>a.includes(l.uuid)).map(l=>({...l,type:s.get(l.type)??l.type}))}async function UR(e){let{apiKey:t,registrationId:n,registrationUuid:r,migrationClient:i}=e,s={apiKey:t,registrationId:n,registrationUuid:r},a=await i.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 n}d();var dv={payments_extension:["payments_app","payments_app_credit_card","payments_app_custom_credit_card","payments_app_custom_onsite","payments_app_redeemable"]},hv={marketing_activity:["marketing_activity_extension"]},Dv={flow_action:["flow_action_definition"],flow_trigger:["flow_trigger_definition"],flow_trigger_lifecycle_callback:["flow_trigger_discovery_webhook"]},mv={ui_extension:["CHECKOUT_UI_EXTENSION","POS_UI_EXTENSION"]},gv={subscription_link_extension:["subscription_link"]},_v={admin_link:["app_link","bulk_action"]};function lo(e,t,n,r){let i=Ch(e,n),s=Object.keys(r),a=Object.values(r).flat(),l=e.filter(m=>s.includes(m.type)),p=t.filter(m=>a.includes(m.type)),h=new Map;return p.forEach(m=>{h.set(m.uuid,m),h.set(Lt(m.title.substring(0,Vc)),m)}),l.reduce((m,_)=>{let C=i[_.localIdentifier]??"unknown",v=h.get(C)??h.get(_.localIdentifier.toLowerCase()),b=r[_.type]?.includes(v?.type??"undefined");return v&&b&&m.push({local:_,remote:v}),m},[])}async function $s(e){let{extensionsToMigrate:t,appId:n,type:r,remoteExtensions:i,migrationClient:s}=e;await Promise.all(t.map(({remote:l})=>kR({apiKey:n,registrationId:void 0,registrationUuid:l.uuid,type:r,migrationClient:s})));let a=t.map(({remote:l})=>l.uuid);return i.filter(l=>a.includes(l.uuid)).map(l=>({...l,type:r.toUpperCase()}))}async function kR(e){let{apiKey:t,registrationId:n,registrationUuid:r,type:i,migrationClient:s}=e,a={apiKey:t,registrationId:n,registrationUuid:r,type:i},l=await s.migrateAppModule(a);if(l?.migrateAppModule?.userErrors?.length>0){let p=l.migrateAppModule.userErrors.map(h=>h.message).join(", ");throw new k(p)}if(!l?.migrateAppModule?.migratedAppModule)throw new k(`Couldn't migrate to app module ${i}`);return n}async function yv(e,{extensionRegistrations:t,dashboardManagedExtensionRegistrations:n}){let r=t,i=e.envIdentifiers.extensions??{},s=e.app.allExtensions.filter(L=>!L.isAppConfigExtension),a=lo(s,r,i,mv),l=lo(s,n,i,Dv),p=lo(s,n,i,dv),h=lo(s,n,i,hv),m=lo(s,n,i,gv),_=lo(s,n,i,_v),v=e.developerPlatformClient.clientName===k0.Partners?e.developerPlatformClient:R0.getInstance(),b=!1;if(a.length>0){if(!await co(a))throw new tn;r=await fv({extensionsToMigrate:a,appId:e.appId,remoteExtensions:r,migrationClient:v}),b=!0}if(l.length>0){if(!await co(l,!1))throw new tn;let q=await pv({extensionsToMigrate:l,appId:e.appId,remoteExtensions:n,migrationClient:v});r=r.concat(q),b=!0}if(h.length>0){if(!await co(h,!1))throw new tn;let q=await $s({extensionsToMigrate:h,appId:e.appId,type:"marketing_activity",remoteExtensions:n,migrationClient:v});r=r.concat(q),b=!0}if(p.length>0){if(!await co(p,!1))throw new tn;let q=await $s({extensionsToMigrate:p,appId:e.appId,type:"payments_extension",remoteExtensions:n,migrationClient:v});r=r.concat(q),b=!0}if(m.length>0){if(!await co(m,!1))throw new tn;let q=await $s({extensionsToMigrate:m,appId:e.appId,type:"subscription_link_extension",remoteExtensions:n,migrationClient:v});r=r.concat(q),b=!0}if(_.length>0){if(!await co(_,!1))throw new tn;let q=await $s({extensionsToMigrate:_,appId:e.appId,type:"admin_link",remoteExtensions:n,migrationClient:v});r=r.concat(q),b=!0}let A=await lv(s,r,i,e.developerPlatformClient),O=A.identifiers,T=A.toCreate??[];for(let L of A.toConfirm)await GE(L.local,L.remote)?O[L.local.localIdentifier]=L.remote.uuid:T.push(L.local);if(A.toManualMatch.local.length>0){let L=await JE(A.toManualMatch);O={...O,...L.identifiers},T.push(...L.toCreate)}return{validMatches:O,extensionsToCreate:T,dashboardOnlyExtensions:n,didMigrateDashboardExtensions:b}}async function Fv(e,t,n,{validMatches:r,extensionsToCreate:i}){let{uuidUidStrategyExtensions:s,singleAndDynamicStrategyExtensions:a}=zR(t,n,e.app.specifications||[]),{extensionsNonUuidManaged:l,extensionsIdsNonUuidManaged:p}=await HR(a,e.app,e.appId,e.includeDraftExtensions,e.developerPlatformClient),h={};if(i.length>0){let m=await Ev(i,e.appId,e.developerPlatformClient);for(let[_,C]of Object.entries(m))r[_]=C.uuid,h[_]=C.id}for(let[m,_]of Object.entries(r)){let C=s.find(v=>v.uuid===_);C&&(h[m]=C.id)}return{extensions:r,extensionIds:{...h,...p},extensionsNonUuidManaged:l}}function qR(e,t){let n=e.activeVersion?.config,r=n?JSON.parse(n):{},i=t.configuration,s=r.uri??"";return r.topic===i.topic&&s.endsWith(i.uri)&&r.filter===i.filter}function WR(e,t,n,r,i,s){n.forEach(a=>{let l=e.filter(h=>h.type===t.toExtensionGraphQLType(a.graphQLType)),p;a.isSingleStrategyExtension&&l.length===1?p=l[0]:a.isDynamicStrategyExtension&&(p=l.find(h=>qR(h,a))),p?(i[a.localIdentifier]=p.uuid,s[a.localIdentifier]=p.id):r.push(a)})}async function HR(e,t,n,r=!1,i){let s=r?t.draftableExtensions:t.allExtensions;s=s.filter(h=>!h.isUUIDStrategyExtension);let a=[],l={},p={};if(WR(e,i,s,a,l,p),a.length>0){let h=await Ev(a,n,i,!1);for(let[m,_]of Object.entries(h))l[m]=_.uuid,p[m]=_.id}return{extensionsNonUuidManaged:l,extensionsIdsNonUuidManaged:p}}async function Ev(e,t,n,r=!0){let i={};for(let s of e)if(n.supportsAtomicDeployments)i[s.localIdentifier]={id:s.uid,uuid:s.uid,type:s.type,title:s.handle};else{let a=await wh(t,s.graphQLType,s.handle,n,s.contextValue);r&&Wc(`Created extension ${s.handle}.`),i[s.localIdentifier]=a}return i}function zR(e,t,n){let r=n.filter(l=>l.uidStrategy==="dynamic").map(l=>l.identifier),s=js(e,l=>r.includes(l.type.toLowerCase())),a=t.concat(s.true??[]);return{uuidUidStrategyExtensions:s.false??[],singleAndDynamicStrategyExtensions:a}}d();d();async function vv(e,t,n){let r=await VR(e,t,n),{app:{versionsDiff:i}}=await n.appVersionsDiff(e,{versionId:r.uuid,appVersionId:r.id});return{versionsDiff:i,versionDetails:r}}async function VR(e,t,n){try{return await n.appVersionByTag(e,t)}catch{throw l0({headline:"Version couldn't be released.",body:["Version",{userInput:t},"could not be found."]}),new tn}}d();function YR(e,t){return t?e.find(r=>r.identifier===t||r.externalIdentifier===t||r.additionalIdentifiers?.includes(t))?.uidStrategy:void 0}async function vl(e,t,n,r,i){let a=(i??await t.activeAppVersion(e))?.appModuleVersions.filter(p=>YR(n,p.specification?.identifier)!=="uuid")??[];return a.length===0?void 0:bh(a,n,r)}function bh(e,t,n){let r={},i=t.filter(Zo);return e.forEach(s=>{let a=i.find(p=>p.identifier===s.specification?.identifier.toLowerCase());if(!a)return;let l=s.config;l&&(r=hi(r,a.transformRemoteToLocal?.(l,{flags:n})??l))}),{...r}}d();async function Cv(e,t){ce(`Writing app configuration to ${t}`);let n=KR(structuredClone(e)),r=xh(n),i=new lt(t,{});await i.replace(r),await i.transformRaw(GR)}function xh(e){if(e==null)return e;if(Array.isArray(e))return e.map(xh);if(typeof e=="object"){let t={};for(let[n,r]of Object.entries(e)){let i=xh(r);typeof i=="object"&&i!==null&&!Array.isArray(i)&&Object.keys(i).length===0||(t[n]=i)}return t}return e}var fo=(e,t)=>{if(e==null)return null;if(e instanceof F.ZodNullable||e instanceof F.ZodOptional)return fo(e.unwrap(),t);if(e instanceof F.ZodArray)return t.map(n=>fo(e.element,n));if(e instanceof F.ZodEffects)return fo(e._def.schema,t);if(e instanceof F.ZodObject){let n=Object.entries(e.shape),r=t,i={};n.forEach(([a,l])=>{if(r!==void 0&&r[a]!==void 0){let p=fo(l,r[a]);!(p instanceof Array)&&p instanceof Object&&Object.keys(p).length===0&&(p=void 0),i={...i,[a]:p}}});let s=["scopes"];return Object.entries(r).filter(([a])=>!s.includes(a)).sort(([a],[l])=>a.localeCompare(l)).forEach(([a,l])=>{n.map(([p])=>p).includes(a)||(i={...i,[a]:l})}),i}return t};function GR(e){let t=`# Learn more about configuring your app at https://shopify.dev/docs/apps/tools/cli/configuration
|
|
209
|
+
`,n=`
|
|
210
|
+
# Learn more at https://shopify.dev/docs/apps/tools/cli/configuration#access_scopes`,r=e.split(/(\r\n|\r|\n)/);return r.unshift(`
|
|
211
|
+
`),r.unshift(t),r.forEach((i,s)=>{i==="[access_scopes]"&&r.splice(s+1,0,n)}),r.join("")}function KR(e){let t=e.webhooks;if(Array.isArray(t?.subscriptions)&&t.subscriptions.length){let n=rn(e?.application_url);t.subscriptions=B0(t.subscriptions),t.subscriptions=t.subscriptions.map(({uri:r,...i})=>({uri:n&&r.includes(n)?r.replace(n,""):r,...i}))}return e}d();function wv(){let e=["Your app has extensions which need to be assigned",{command:"uid"},"identifiers."],t=["You must first map IDs to your existing extensions by running",{command:"shopify app deploy"},"interactively, without",{command:"--allow-updates"},"or",{command:"--allow-deletes"},", to finish the migration."],n={title:"Reference",body:{list:{items:[{link:{label:"Migrating from the Partner Dashboard",url:"https://shopify.dev/docs/apps/build/dev-dashboard/migrate-from-partners"}}]}}};throw new k(e,void 0,[t],[n])}function po(e,t){return{title:e,uid:t,experience:"extension"}}function Ls(e){return{title:e,uid:void 0,experience:"dashboard"}}async function xv(e){let t=await bv(e);e.force&&!e.developerPlatformClient.supportsDashboardManagedExtensions&&t.app.extensionRegistrations.filter(s=>!s.id).length>0&&wv();let n=await yv(e,t.app);if(n.didMigrateDashboardExtensions){let i=await e.developerPlatformClient.activeAppVersion(e.remoteApp);e.activeAppVersion=i}n.dashboardOnlyExtensions.length>0&&(t=await bv({...e,activeAppVersion:void 0}));let r=ZR(n);return e.release&&(r=await eM(e.developerPlatformClient,e.remoteApp,n.validMatches,n.extensionsToCreate,n.dashboardOnlyExtensions,e.app.specifications??[],e.activeAppVersion)??r),{extensionIdentifiersBreakdown:r,extensionsToConfirm:n,remoteExtensionsRegistrations:t.app}}async function iZ(e,t,n){let{versionsDiff:r,versionDetails:i}=await vv(t,n,e),s=p=>p.filter(h=>h.specification.experience==="extension"&&h.specification.identifier!=="webhook_subscription").map(h=>po(h.registrationTitle,void 0)),a=p=>p.filter(h=>h.specification.options.managementExperience==="dashboard").map(h=>Ls(h.registrationTitle));return{extensionIdentifiersBreakdown:{onlyRemote:[...s(r.removed),...a(r.removed)],toCreate:[...s(r.added),...a(r.added)],toUpdate:[],unchanged:[...s(r.updated),...a(r.updated)]},versionDetails:i}}async function Av({developerPlatformClient:e,remoteApp:t,localApp:n,versionAppModules:r,release:i,activeAppVersion:s}){if(n.allExtensions.filter(a=>a.isAppConfigExtension).length!==0)return i?QR(e,t,n,r,s):JR(n)}function JR(e){return{existingFieldNames:rh(e.configuration),existingUpdatedFieldNames:[],newFieldNames:[],deletedFieldNames:[]}}async function bv(e){return e.developerPlatformClient.appExtensionRegistrations(e.remoteApp,e.activeAppVersion)}async function QR(e,t,n,r,i){let s=await vl(t,e,n.specifications??[],n.remoteFlags,i)??{},a=r?bh(r,n.specifications??[],n.remoteFlags):n.configuration;a?.webhooks?.subscriptions?.length&&(a.webhooks.subscriptions=a.webhooks.subscriptions.map(A=>(A.uri.startsWith("/")&&(A.uri=`${rn(a.application_url)}${A.uri}`),A)),a.webhooks.subscriptions.sort((A,O)=>{let T=A.uri+(A.topics?.sort().join(",")??""),L=O.uri+(O.topics?.sort().join(",")??"");return T.localeCompare(L)}),s.webhooks?.subscriptions?.sort((A,O)=>{let T=A.uri+(A.topics?.sort().join(",")??""),L=O.uri+(O.topics?.sort().join(",")??"");return T.localeCompare(L)}));let l=XR(a,s,n.configSchema),p=rh(a),h=l?.baselineFieldNames??[],m=l?.updatedFieldNames??[],_=p.filter(A=>!h.includes(A)&&!m.includes(A)),C=p.filter(A=>h.includes(A)&&m.includes(A)),v=m.filter(A=>!h.includes(A)&&p.includes(A)),b=h.filter(A=>!m.includes(A)&&A!=="handle");return{existingFieldNames:_,existingUpdatedFieldNames:C,newFieldNames:v,deletedFieldNames:b}}function XR(e,t,n){let[r,i]=t0({...fo(n,e),build:void 0},{...fo(n,t),build:void 0});if($c(r,i))return;let s=a=>Object.entries(a).filter(([l,p])=>p!==void 0).map(([l])=>l);return{updatedFieldNames:s(r),baselineFieldNames:s(i)}}function ZR({validMatches:e,extensionsToCreate:t,dashboardOnlyExtensions:n}){let r=Object.keys(e).map(a=>po(a,void 0)),i=t.map(a=>po(a.localIdentifier,void 0)),s=n.filter(a=>!Object.values(e).includes(a.uuid)).map(a=>Ls(a.title));return{onlyRemote:[],toCreate:[],toUpdate:[],unchanged:[...r,...i,...s]}}async function eM(e,t,n,r,i,s,a){let l=a??await e.activeAppVersion(t);if(!l)return;let p=tM(l,n,r,s,e),h=i.filter(_=>!Object.values(n).includes(_.uuid)&&!r.map(C=>C.localIdentifier).includes(_.uuid)),m=nM(h,l);return{onlyRemote:[...p.onlyRemote,...m.onlyRemote],toCreate:[...p.toCreate,...m.toCreate],toUpdate:[...p.toUpdate,...m.toUpdate],unchanged:[...p.unchanged,...m.unchanged]}}function tM(e,t,n,r,i){let s=e?.appModuleVersions.filter(b=>{let A=r.find(O=>O.identifier===b.specification?.identifier||O.externalIdentifier===b.specification?.identifier);return A&&!Zo(A)});function a(b,A){let O=b.registrationUuid===A,T=b.registrationId===A,L=b.registrationId.length===0;return i.supportsAtomicDeployments?T||L&&O:O}let l=Object.entries(t).filter(([b,A])=>s.some(O=>a(O,A))).map(([b,A])=>b),p=s.filter(b=>b.registrationId===""),h=l.filter(b=>p.some(A=>A.registrationUuid===t[b])),m=l.filter(b=>!p.some(A=>A.registrationUuid===t[b])),_=Object.entries(t).filter(([b,A])=>!s.some(O=>a(O,A))).map(([b,A])=>({title:b,uid:A}));return n.map(b=>({title:b.localIdentifier,uid:b.uid})).forEach(b=>{let A=_.findIndex(O=>O.title===b.title);A===-1?_.push(b):_[A]=b}),{onlyRemote:s.filter(b=>!Object.values(t).some(A=>a(b,A))&&!n.map(A=>A.localIdentifier).some(A=>a(b,A))).map(b=>({title:b.registrationTitle,uid:b.registrationId})).map(({title:b,uid:A})=>po(b,A)),toCreate:_.map(({title:b,uid:A})=>po(b,A)),toUpdate:h.map(b=>po(b,void 0)),unchanged:m.map(b=>po(b,void 0))}}function nM(e,t){let n=t?.appModuleVersions.filter(h=>h.specification.options.managementExperience==="dashboard")||[],r=h=>!e.map(m=>m.uuid).includes(h.registrationUuid),i=n.filter(r).map(h=>Ls(h.registrationTitle)),s=h=>n.map(m=>m.registrationUuid).includes(h.uuid),a=h=>!s(h),l=e.filter(a).map(h=>Ls(h.title)),p=e.filter(s).map(h=>Ls(h.title));return{onlyRemote:i,toCreate:l,toUpdate:[],unchanged:p}}d();d();var rM={bullet:"+",color:"green",suffix:"(new)"},iM={color:"#FF8800",suffix:"(updated)"},oM={bullet:"-",color:"red",suffix:"(removed)"};function Sh(e){return[...e.new.map(t=>Ah(t,rM)),...e.updated?e.updated.map(t=>Ah(t,iM)):[],...e.unchanged,...e.removed.map(t=>Ah(t,oM))]}function Ah(e,t){let n=typeof e=="string"?[e,{subdued:t.suffix??""}]:e;return{...t.bullet?{bullet:t.bullet}:{},item:n,color:t.color}}function uM({force:e,allowUpdates:t,allowDeletes:n,extensionIdentifiersBreakdown:r,configExtensionIdentifiersBreakdown:i}){if(e||t&&n)return!0;let s=r.onlyRemote.length>0,a=(i?.deletedFieldNames.length??0)>0,l=s||a,p=r.toCreate.length>0||r.toUpdate.length>0,h=(i?.newFieldNames.length??0)>0||(i?.existingUpdatedFieldNames.length??0)>0,m=p||h;if(t&&!l||n&&!m)return!0;if(!h0()&&(l||m)){let _=[];throw m&&_.push("--allow-updates"),l&&_.push("--allow-deletes"),new k("This deployment includes changes that require confirmation.",["Run the command with",{command:_.join(" ")},"to deploy without confirmation."])}return!1}async function Sv({force:e,allowUpdates:t,allowDeletes:n,extensionIdentifiersBreakdown:r,configExtensionIdentifiersBreakdown:i,appTitle:s,release:a,installCount:l}){if(await nn.addPublicMetadata(()=>lM(i)),uM({force:e,allowUpdates:t,allowDeletes:n,extensionIdentifiersBreakdown:r,configExtensionIdentifiersBreakdown:i}))return!0;let h=await aM(r),m=await cM(a,i);return sM({appTitle:s,extensionsContentPrompt:h,configContentPrompt:m,release:a,installCount:l})}async function sM({appTitle:e,extensionsContentPrompt:{extensionsInfoTable:t,hasDeletedExtensions:n},configContentPrompt:r,release:i,installCount:s}){let a=new Date().valueOf(),l=!0,p=[];r&&p.push(r.configInfoTable.items.length===0?{...r.configInfoTable,emptyItemsText:"No changes",items:[]}:r.configInfoTable);let h=e!==void 0&&n;t?p.push(h?{...t,helperText:"Removing extensions can permanently delete app user data"}:t):p.push({header:"Extensions:",emptyItemsText:"None",items:[]});let m=`${i?"Release":"Create"} a new version${e?` of ${e}`:""}?`,_=n&&s!==void 0&&s>0;h?l=await d0({message:m,infoTable:p,confirmation:e,..._?{warningItem:["This release removes extensions and related data from",{error:s.toString()},`app installations.
|
|
212
|
+
Use caution as this may include production data on live stores.`]}:{}}):l=await Ct({message:m,infoTable:p,confirmationMessage:`Yes, ${i?"release":"create"} this new version`,cancellationMessage:"No, cancel"});let C=new Date().valueOf()-a;return await nn.addPublicMetadata(()=>({cmd_deploy_confirm_cancelled:!l,cmd_deploy_confirm_time_to_complete_ms:C})),l}async function aM(e){let{onlyRemote:t,toCreate:n,toUpdate:r,unchanged:i}=e,s=(m,_)=>{switch(m.experience){case"dashboard":return[m.title,{subdued:`(${_}from Partner Dashboard)`}];case"extension":return m.uid&&m.uid.length>0?`${m.title} (uid: ${m.uid})`:m.title}},a,l={new:n.map(m=>s(m,"new, ")),unchanged:i.map(m=>s(m,"")),updated:r.map(m=>s(m,"updated, ")),removed:t.map(m=>s(m,"removed, "))},p=Sh(l),h=t.length>0;return p.length>0&&(a={header:"Extensions:",items:p}),await nn.addPublicMetadata(()=>({cmd_deploy_confirm_new_registrations:n.length,cmd_deploy_confirm_updated_registrations:r.length,cmd_deploy_confirm_removed_registrations:t.length})),{extensionsInfoTable:a,hasDeletedExtensions:h}}async function cM(e,t){if(!t)return;let{existingFieldNames:n,existingUpdatedFieldNames:r,newFieldNames:i,deletedFieldNames:s}=t,l=Sh({new:i,updated:r,unchanged:n,removed:s});return{configInfoTable:{header:"Configuration:",items:i.length>0||r.length>0||s.length>0||!e?l:[]}}}function lM(e){if(!e)return{cmd_deploy_include_config_used:!1};let{existingFieldNames:t,existingUpdatedFieldNames:n,newFieldNames:r,deletedFieldNames:i}=e,s=[...n,...r,...t];return{cmd_deploy_include_config_used:!0,...s.length>0?{cmd_deploy_config_modules_breakdown:JSON.stringify(s.sort())}:{},...n.length>0?{cmd_deploy_config_modules_updated:JSON.stringify(n.sort())}:{},...r.length>0?{cmd_deploy_config_modules_added:JSON.stringify(r.sort())}:{},...i.length>0?{cmd_deploy_config_modules_deleted:JSON.stringify(i.sort())}:{}}}async function Pv(e){let{extensionIdentifiersBreakdown:t,extensionsToConfirm:n,remoteExtensionsRegistrations:r}=await xv(e),i=await Av({developerPlatformClient:e.developerPlatformClient,apiKey:e.appId,localApp:e.app,remoteApp:e.remoteApp,release:e.release,activeAppVersion:e.activeAppVersion}),s=t.onlyRemote.length>0&&!e.force&&!(e.allowUpdates&&e.allowDeletes),a;if(s)try{a=await e.developerPlatformClient.appInstallCount({id:e.remoteApp.id,apiKey:e.remoteApp.apiKey,organizationId:e.remoteApp.organizationId})}catch{a=void 0}if(!await Sv({extensionIdentifiersBreakdown:t,configExtensionIdentifiersBreakdown:i,appTitle:e.remoteApp?.title,release:e.release,force:e.force,allowUpdates:e.allowUpdates,allowDeletes:e.allowDeletes,installCount:a}))throw new tn;let p=await Fv(e,r.extensionRegistrations,r.configurationRegistrations,n);return{app:e.appId,extensions:p.extensions,extensionIds:p.extensionIds,extensionsNonUuidManaged:p.extensionsNonUuidManaged}}d();function Ov({appName:e,org:t,devStores:n,updateURLs:r,includeConfigOnDeploy:i,messages:s}){let a=[`App: ${e}`];t&&a.unshift(`Org: ${t}`),n&&n.length>0&&n.forEach(p=>a.push(`Dev store: ${p}`)),r&&a.push(`Update URLs: ${r}`),i!==void 0&&a.push(`Include config: ${i?"Yes":"No"}`);let l=[{list:{items:a}}];if(s&&s.length)for(let p=0;p<s.length;p++){let h=s[p];if(!h||h.length===0)continue;let m=p===0?`
|
|
213
|
+
`:`
|
|
214
|
+
|
|
215
|
+
`;l=l.concat(m,h)}return l}d();async function Tv({app:e,identifiers:t,command:n,developerPlatformClient:r},i=process.env){let s=e.dotenv;s??(s={path:R(e.directory,zE(e.configPath)),variables:{}});let a={...e.dotenv?.variables??{}};i[e.idEnvironmentVariableName]||(a[e.idEnvironmentVariableName]=t.app),Object.keys(t.extensions).forEach(h=>{let m=`SHOPIFY_${Pc(h)}_ID`;i[m]||(a[m]=t.extensions[h])});let p=!$c(s.variables,a)&&(n==="deploy"||n==="release")&&!r.supportsAtomicDeployments||n==="import-extensions";if(s.variables=a,p){let m=await Z(s.path)?await $e(s.path):"",_=b0(m,a);await Et(s.path,_),e.dotenv=s}return e}function Iv({app:e},t=process.env){let n={...e.dotenv?.variables,...t},r={},i=s=>{Object.keys(n).includes(s.idEnvironmentVariableName)&&(r[s.localIdentifier]=n[s.idEnvironmentVariableName])};return e.allExtensions.forEach(i),{app:n[e.idEnvironmentVariableName],extensions:r}}var Bv=e=>({message:Ae`Invalid Client ID: ${e}`,tryMessage:Ae`You can find the Client ID in the app settings in the Developer Dashboard.`}),Rv=["You can pass",{command:"--reset"},"to your command to reset your app configuration."],fM=(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"]]}}],Cl=async e=>{let t=q0(),n;for(let r of t)try{if(n=await r.appFromIdentifiers(e.apiKey),n)break}catch(i){if("statusCode"in i&&i.statusCode===404)continue;throw i}if(!n){let r=await t[0]?.accountInfo()??{type:"UnknownAccount"},i="Unknown account",s=!1;throw Jy(r)?(i=r.orgName,s=!0):Ky(r)&&(i=r.email),new k(["No app with client ID",{command:e.apiKey},"found"],fM(i,s))}return n};async function KZ(e){let{reset:t,force:n,noRelease:r,app:i,remoteApp:s,developerPlatformClient:a,organization:l}=e,p=await a.activeAppVersion(s),h=await pM({app:i,reset:t,force:n,developerPlatformClient:a});Nv({org:l.businessName,appName:s.title,appDotEnv:i.dotenv?.path,configFile:Te(i.configPath),includeConfigOnDeploy:h,messages:[Rv]});let m=await Pv({app:i,appId:s.apiKey,appName:s.title,force:n,release:!r,developerPlatformClient:a,envIdentifiers:Iv({app:i}),remoteApp:s,activeAppVersion:p,allowUpdates:e.allowUpdates,allowDeletes:e.allowDeletes});await Tv({app:i,identifiers:m,command:"deploy",developerPlatformClient:a});let _=!1;return a.supportsAtomicDeployments&&p&&(_=p.appModuleVersions.some(C=>!C.registrationId)),{identifiers:m,didMigrateExtensionsToDevDash:_}}async function pM({app:e,reset:t,force:n,developerPlatformClient:r}){if(r.supportsAtomicDeployments){await dM(e);return}let i=e.includeConfigOnDeploy;if(t&&(i=void 0),n&&i===void 0){let s=["You must specify a value for",{command:"include_config_on_deploy"},"in your TOML file. Including configuration will be required very soon."],a=["Run",{command:"shopify app deploy"},"interactively, without",{command:"--allow-updates"},"or",{command:"--allow-deletes"},"."];throw new k(s,a)}return n||i===!0?i:mM({appDirectory:e.directory,localApp:e})}async function dM(e){let t=e.configuration.build?.include_config_on_deploy;if(t===void 0)return;await(await lt.read(e.configPath)).remove("build.include_config_on_deploy"),t?hM():DM()}function hM(){oo({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 DM(){kc({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 mM(e){let t=await gM(e.localApp.configPath);return e.localApp.configuration.build={...e.localApp.configuration.build,include_config_on_deploy:t},await(await lt.read(e.localApp.configPath)).patch({build:{include_config_on_deploy:t}}),await nn.addPublicMetadata(()=>({cmd_deploy_confirm_include_config_used:t})),t}function gM(e){return Ct({message:`Include \`${Te(e)}\` configuration on \`deploy\`? Soon, this will no longer be optional and configuration will be included on every deploy.`,confirmationMessage:"Yes, always (Recommended)",cancellationMessage:"No, not now"})}async function Mv(e){let t=e.organizationId?await Qc(e.organizationId,Ld()):await _M(),n=Ld({organization:t}),{organization:r,apps:i,hasMorePages:s}=await n.orgAndApps(t.id),a=await YE(i,s,r,n,e);return await Ph(a,n.organizationSource),a}async function _M(){let e=await W0();if(e.length===0)throw new k("No organizations found.","Make sure you have access to a Shopify organization.");return E0(e)}function JZ({organization:e,app:t,remoteApp:n,selectedStore:r,tunnelMode:i}){if(by())return;let s="Not yet configured",a=t.configuration.build?.automatically_update_urls_on_dev;a!==void 0&&(s=a?"Yes":"No");let l=[Rv];i==="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)."]),Nv({org:e.businessName,appName:n.title,devStore:r.shopDomain,updateURLs:s,configFile:Te(t.configPath),messages:l})}function Nv({org:e,appName:t,devStore:n,updateURLs:r,configFile:i,appDotEnv:s,includeConfigOnDeploy:a,messages:l}){let p=[];n&&p.push(n);let h=(s&&Te(s))??(i&&Ln(i));oo({headline:i?`Using ${h} for default values:`:"Using these settings:",body:Ov({appName:t,org:e,devStores:p,updateURLs:r,includeConfigOnDeploy:a,messages:l})})}async function Ph(e,t){let r={[t===Jc.BusinessPlatform?"business_platform_id":"partner_id"]:Ds(e.organizationId)};await nn.addPublicMetadata(()=>({...r,api_key:e.apiKey}))}async function QZ({apiKey:e,developerPlatformClient:t}){return jv({apiKey:e,developerPlatformClient:t,enabled:!0})}async function XZ({apiKey:e,developerPlatformClient:t}){await jv({apiKey:e,developerPlatformClient:t,enabled:!1})}async function jv({apiKey:e,developerPlatformClient:t,enabled:n}){let r={input:{apiKey:e,enabled:n}},s=(await t.updateDeveloperPreview(r)).developmentStorePreviewUpdate.userErrors;return!s||s.length===0}d();d();d();d();var yM=Xo.extend({app_proxy:F.object({url:F.preprocess(rn,zc(F.string({invalid_type_error:"Value must be string"}))),subpath:F.string({invalid_type_error:"Value must be a string"}),prefix:F.string({invalid_type_error:"Value must be a string"})}).optional()}),Oh="app_proxy",FM={forward:(e,t)=>{let n=e;if(!n.app_proxy)return{};let r;return"application_url"in t&&(r=t?.application_url),{url:gr(n.app_proxy.url,r),subpath:n.app_proxy.subpath,prefix:n.app_proxy.prefix}},reverse:e=>{let t=e;return{app_proxy:{url:rn(t.url),subpath:t.subpath,prefix:t.prefix}}}},EM=Dr({identifier:Oh,schema:yM,transformConfig:FM,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})}}),$v=EM;d();var vM=Xo.extend({pos:F.object({embedded:F.boolean({invalid_type_error:"Value must be Boolean"})}).optional()}),Th="point_of_sale",CM={embedded:"pos.embedded"},wM=Dr({identifier:Th,schema:vM,transformConfig:CM}),Lv=wM;d();d();function Uv(e,t){let n=e;if(!n.events?.subscription)return e;let r;return t&&"application_url"in t&&(r=t?.application_url),{...n,events:{...n.events,subscription:n.events.subscription.map(i=>({...i,uri:gr(i.uri,r)}))}}}function kv(e){let t=vt(e,"events"),n=vt(t,"api_version"),i=vt(t,"subscription")?.map(a=>{let{identifier:l,...p}=a;return p});return{events:n??i?{api_version:n,subscription:i}:{}}}var Ih="events",bM={forward:Uv,reverse:e=>kv(e)},xM=Xo.extend({events:F.any().optional()}),AM=Dr({identifier:Ih,schema:xM,transformConfig:bM}),qv=AM;d();var SM={forward:OM,reverse:e=>TM(e)},Rh="privacy_compliance_webhooks",PM=Dr({identifier:Rh,schema:Kc,transformConfig:SM}),Wv=PM;function OM(e,t){let n=vt(e,"webhooks"),r;"application_url"in t&&(r=t?.application_url);let i=n0({customers_redact_url:Bh(IM(n),r),customers_data_request_url:Bh(BM(n),r),shop_redact_url:Bh(RM(n),r)});if(Object.keys(i).length===0)return i;{let{api_version:s}=n;return{api_version:s,...i}}}function TM(e){let t=vt(e,"customers_redact_url"),n=vt(e,"customers_data_request_url"),r=vt(e,"shop_redact_url"),i=[];return n&&i.push({compliance_topics:[Gc.CustomersDataRequest],uri:n}),t&&i.push({compliance_topics:[Gc.CustomersRedact],uri:t}),r&&i.push({compliance_topics:[Gc.ShopRedact],uri:r}),i.length===0?{}:{webhooks:{subscriptions:I0(i),privacy_compliance:void 0}}}function Mh(e,t){return e.subscriptions?.find(n=>n.compliance_topics?.includes(t))?.uri}function Bh(e,t){return t&&e?.startsWith("/")?`${rn(t)}${e}`:e}function IM(e){return Mh(e,"customers/redact")??e?.privacy_compliance?.customer_deletion_url}function BM(e){return Mh(e,"customers/data_request")??e?.privacy_compliance?.customer_data_request_url}function RM(e){return Mh(e,"shop/redact")??e?.privacy_compliance?.shop_deletion_url}d();var MM="@shopify/post-purchase-ui-extensions",NM=Ge.extend({metafields:F.array(gi).optional()}),jM=Ie({identifier:"checkout_post_purchase",dependency:MM,partnersWebIdentifier:"post_purchase",schema:NM,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??[]})}),Hv=jM;d();var $M="@shopify/checkout-ui-extensions",LM=Ge.extend({name:F.string(),extension_points:F.array(F.string()).optional(),metafields:F.array(gi).optional(),settings:F.object({fields:F.any().optional()}).optional()}),UM=Ie({identifier:"checkout_ui_extension",dependency:$M,schema:LM,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 hr(t,"checkout_ui")})}),zv=UM;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"},Wee=["customer","order","product","marketing_activity","abandonment","company","company_contact"],Vv=[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],Ze={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"},Gv=[[Ze.boolean,"checkbox"],[Ze.email,"email"],[Ze.multiLineText,"text-multi-line"],[Ze.int,"int"],[Ze.singleLineText,"text-single-line"],[Ze.url,"url"],[Ze.decimal,"number"],[Ze.schemaTypeReference,"schema-type-reference"]],kM=[Ze.boolean,Ze.email,Ze.multiLineText,Ze.int,Ze.singleLineText,Ze.url,Ze.decimal],qM=[Ze.boolean,Ze.email,Ze.singleLineText,Ze.url,Ze.decimal,Ze.schemaTypeReference],Kv=Gv.filter(([e])=>kM.includes(e)),Jv=Gv.filter(([e])=>qM.includes(e));d();d();var WM=e=>{try{return new URL(e).protocol==="https:"}catch{return!1}},ou=(e,t,n)=>{let r=gr(t,n);if(r.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(!WM(r))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 r},wl=async(e,t)=>{if(!t)return"";let n=await Ve(R(e,t));if(n.length>1)throw new Error("Multiple files found for schema path");if(n.length===0)throw new Error("No file found for schema path");return $e(n[0])};d();var HM=new Map(Kv),zM=new Map(Jv),VM=(e,t)=>{let n=t==="flow_action"?HM:zM,r=Nh(e.type),i=r?n.get("schema_type_reference"):n.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(!i)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:i};return t==="flow_action"&&(s.label=e.name,s.required=e.required),r&&(s.typeRefName=e.type.replace("schema.","")),s},YM=(e,t)=>{if(t==="flow_trigger"&&!Vv.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 n=e.type.replace("_reference",""),r={name:`${n}_id`,uiType:t==="flow_action"?"commerce-object-id":n,description:e.description};return n==="marketing_activity"&&(r.uiType="marketing-activity-id",r.marketingActivityCreateUrl=e.marketingActivityCreateUrl,r.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),t==="flow_action"&&(r.label=`${Go(n)} ID`,r.required=e.required),r},bl=(e,t)=>t?t.map(r=>Object.keys(wt).includes(r.type)?YM(r,e):VM(r,e)):[];var jh=S0.extend({key:F.string().regex(/^[a-zA-Z\s]*$/,{message:"String must contain only alphabetic characters and spaces"}).optional()}),GM=Qo.extend({type:F.literal("flow_trigger"),name:F.string(),schema:F.string().optional(),settings:F.object({fields:F.array(jh).optional()}).optional()}).refine(e=>{let t=e.settings?.fields??[],n=t.every((i,s)=>xl(i,"flow_trigger",e.handle,s)),r=Xv(t,e.schema);return n&&r}),KM=Ie({identifier:"flow_trigger",schema:GM,appModuleFeatures:e=>[],deployConfig:async(e,t)=>({title:e.name,description:e.description,fields:bl("flow_trigger",e.settings?.fields),schema_patch:await wl(t,e.schema)})}),Qv=KM;function Zv(e,t,n,r){let i=`'${e}' property must be a string for 'field[${r}]' ${JSON.stringify(t)} of flow extension '${n}'`;return{required_error:i,invalid_type_error:i}}var $h=F.object({type:F.string(),description:F.string().optional()}).strict(),xl=(e,t,n,r)=>{let i=Object.keys(wt).includes(e.type);return i?i?$h.extend({required:F.boolean().optional(),marketingActivityCreateUrl:F.string().optional(),marketingActivityDeleteUrl:F.string().optional()}).parse(e):$h.parse(e):t==="flow_action"?$h.extend({key:F.string(Zv("key",e,n,r)),name:F.string(Zv("name",e,n,r)),required:F.boolean().optional()}).parse(e):jh.parse(e)},Nh=e=>e.startsWith("schema."),JM=e=>/[\r\n\t]/.test(e),Us=e=>zc(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=>!JM(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."}),eC=(e,t,n)=>{if(e||t){if(!e)throw new F.ZodError([{code:F.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 F.ZodError([{code:F.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(!n)throw new F.ZodError([{code:F.ZodIssueCode.custom,path:["extensions[0].validation_url"],message:"To set a custom configuration page a `validation_url` must be specified."}])}return!0},Xv=(e,t)=>{if(e.some(n=>Nh(n.type))&&!t)throw new F.ZodError([{code:F.ZodIssueCode.custom,path:["extensions[0].schema"],message:"To reference schema types a `schema` must be specified."}]);return!0},tC=(e,t)=>{if(e||t){if(!e)throw new F.ZodError([{code:F.ZodIssueCode.custom,path:["extensions[0].return_type_ref"],message:"When uploading a schema a `return_type_ref` must be specified."}]);if(!t)throw new F.ZodError([{code:F.ZodIssueCode.custom,path:["extensions[0].schema"],message:"To set a return type a `schema` must be specified."}])}return!0};d();var nC=["runtime_url","validation_url","config_page_url","config_page_preview_url"];var QM=Qo.extend({type:F.literal("flow_action"),name:F.string(),runtime_url:Us(F.string({invalid_type_error:"Value must be string"})),validation_url:Us(F.string({invalid_type_error:"Value must be string"})).optional(),config_page_url:Us(F.string({invalid_type_error:"Value must be string"})).optional(),config_page_preview_url:Us(F.string({invalid_type_error:"Value must be string"})).optional(),schema:F.string().optional(),return_type_ref:F.string().optional()}).refine(e=>{let t=eC(e.config_page_url,e.config_page_preview_url,e.validation_url),r=(e.settings?.fields??[]).every((s,a)=>xl(s,"flow_action",e.handle,a)),i=tC(e.return_type_ref,e.schema);return t&&r&&i}),XM=Ie({identifier:"flow_action",schema:QM,appModuleFeatures:e=>[],patchWithAppDevURLs:(e,t)=>{for(let n of nC){let r=e[n];typeof r=="string"&&r.startsWith("/")&&(e[n]=ou(n,r,t.applicationUrl))}},deployConfig:async(e,t,n,r,i)=>{let s=i?.appConfiguration,a=typeof s?.application_url=="string"?s.application_url:void 0;return{title:e.name,description:e.description,url:ou("runtime_url",e.runtime_url,a),fields:bl("flow_action",e.settings?.fields),validation_url:e.validation_url?ou("validation_url",e.validation_url,a):void 0,custom_configuration_page_url:e.config_page_url?ou("config_page_url",e.config_page_url,a):void 0,custom_configuration_page_preview_url:e.config_page_preview_url?ou("config_page_preview_url",e.config_page_preview_url,a):void 0,schema_patch:await wl(t,e.schema),return_type_ref:e.return_type_ref}}}),rC=XM;d();import ZM from"fs";var iC=["buyer_experience","customers","fulfillment","inventory_and_merch","loyalty","orders","promotion","risk","b2b","payment_reminders","custom_data","error_monitoring"],eN=["capture_at_fulfillment"],tN=Qo.extend({type:F.literal("flow_template"),name:F.string(),description:F.string().max(1024),template:F.object({categories:F.array(F.string().refine(e=>iC.concat(eN).includes(e),e=>({message:`${e} is not a valid category. Valid categories include: ${iC.join(", ")}.`}))),module:F.string(),require_app:F.boolean().optional(),discoverable:F.boolean().optional(),allow_one_click_activate:F.boolean().optional(),enabled:F.boolean().optional()})}),nN=Ie({identifier:"flow_template",schema:tN,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 rN(t,e.template.module),localization:await hr(t,e.name)})});async function rN(e,t){let r=(await Ve(R(e,t)))[0];if(!r)throw new k(`Missing flow file with the path ${R(e,t)}`);return ZM.readFileSync(r,"base64")}var oC=nN;d();var iN=Ge.extend({build:F.object({command:F.string().transform(e=>e.trim()===""?void 0:e).optional(),path:F.string().optional(),watch:F.union([F.string(),F.string().array()]).optional(),wasm_opt:F.boolean().optional().default(!0),typegen_command:F.string().transform(e=>e.trim()===""?void 0:e).optional()}).optional(),name:F.string(),type:F.string(),configuration_ui:F.boolean().optional().default(!0),ui:F.object({enable_create:F.boolean().optional(),paths:F.object({create:F.string(),details:F.string()}).optional(),handle:F.string().optional()}).optional(),api_version:F.string(),input:F.object({variables:F.object({namespace:F.string(),key:F.string()}).optional()}).optional(),targeting:F.array(F.object({target:F.string(),input_query:F.string().optional(),export:F.string().optional()})).optional()}),oN=Ie({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:iN,appModuleFeatures:e=>["function"],getOutputRelativePath:e=>R("dist","index.wasm"),devSessionWatchConfig:e=>{let t=e.configuration;if(!t.build||!t.build.watch)return;let n=[t.build.watch].flat().map(r=>R(e.directory,r));return n.push(R(e.directory,"locales","**.json")),n.push(R(e.directory,"**","!(.)*.graphql")),n.push(R(e.directory,"**.toml")),{paths:n}},clientSteps:[{lifecycle:"deploy",steps:[{id:"build-function",name:"Build Function",type:"build_function",config:{}}]}],deployConfig:async(e,t,n)=>{let r,i=Nc(),s=R(t,"input.graphql");await Z(s)&&(r=await $e(s));let a=e.targeting&&await Promise.all(e.targeting.map(async p=>{let h;return p.input_query&&(h=await uN(R(t,p.input_query))),{handle:p.target,export:p.export,input_query:h}})),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:i,description:e.description,app_key:n,api_type:e.type==="function"?void 0:e.type,api_version:e.api_version,input_query:r,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 hr(t,"function"),targets:a}},preDeployValidation:async e=>{if(!await Z(e.outputPath))throw new k(Ae`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 uN(e){if(await Z(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 uC=oN;d();d();d();var sC=50,vn=Ge.extend({api_version:F.string(),payment_session_url:F.string().url(),refund_session_url:F.string().url().optional(),capture_session_url:F.string().url().optional(),void_session_url:F.string().url().optional(),supported_countries:F.array(F.string()),supported_payment_methods:F.array(F.string()),test_mode_available:F.boolean(),merchant_label:F.string().max(sC),input:F.object({metafield_identifiers:F.object({namespace:F.string(),key:F.string()}).optional()}).optional()}),Ei=F.object({buyer_label:F.string().max(sC).optional(),buyer_label_translations:F.array(F.object({locale:F.string(),label:F.string()})).optional()}),uu=F.object({supports_installments:F.boolean(),supports_deferred_payments:F.boolean()}),Al=F.object({multiple_capture:F.boolean().optional()}),vi=F.object({confirmation_callback_url:F.string().url().optional(),supports_3ds:F.boolean()}),_r=F.object({supported_buyer_contexts:F.array(F.object({currency:F.string(),countries:F.array(F.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 Lh="payments.offsite.render",aC=vn.merge(Ei).merge(uu).merge(vi).merge(Al).merge(_r).extend({targeting:F.array(F.object({target:F.literal(Lh)})).length(1),supports_oversell_protection:F.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 nne(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 cC(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 Ci(e,t){let n=e.ui_extension_handle;if(n||!("ui_extension_registration_uuid"in e))return n;let r=t.find(i=>i.uuid===e.ui_extension_registration_uuid)?.title;return r?Lt(r):n}var Uh="payments.redeemable.render",lC=vn.merge(Ei).merge(_r).extend({targeting:F.array(F.object({target:F.literal(Uh)})).length(1),api_version:F.string(),balance_url:F.string().url(),ui_extension_handle:F.string().optional(),checkout_payment_method_fields:F.array(F.object({type:F.union([F.literal("string"),F.literal("number"),F.literal("boolean")]),required:F.boolean(),key:F.string()})).optional()});function fne(e,t){let n=Ci(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(r=>({key:r.key,type:r.type,required:r.required})),ui_extension_handle:n}}async function fC(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 kh="payments.custom-onsite.render",pC=7,dC=vn.merge(Ei).merge(uu).merge(vi).merge(_r).extend({targeting:F.array(F.object({target:F.literal(kh)})).length(1),update_payment_session_url:F.string().url().optional(),multiple_capture:F.boolean().optional(),supports_oversell_protection:F.boolean().optional(),modal_payment_method_fields:F.array(F.object({})).optional(),ui_extension_handle:F.string().optional(),start_verification_session_url:F.string().url().optional(),checkout_payment_method_fields:F.array(F.object({type:F.union([F.literal("string"),F.literal("number"),F.literal("boolean")]),required:F.boolean(),key:F.string()})).max(pC,`The extension can't have more than ${pC} 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 gne(e,t){let n=Ci(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:n}}async function hC(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 qh="payments.custom-credit-card.render",DC=7,mC=vn.merge(Ei).merge(vi).merge(_r).required({refund_session_url:!0,capture_session_url:!0,void_session_url:!0}).extend({targeting:F.array(F.object({target:F.literal(qh)})).length(1),api_version:F.string(),multiple_capture:F.boolean(),checkout_hosted_fields:F.array(F.string()).optional(),ui_extension_handle:F.string().optional(),encryption_certificate_fingerprint:F.string(),checkout_payment_method_fields:F.array(F.object({type:F.union([F.literal("string"),F.literal("number"),F.literal("boolean")]),required:F.boolean(),key:F.string()})).max(DC,`The extension can't have more than ${DC} checkout_payment_method_fields`).optional()});function Cne(e,t){let n=Ci(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:n}}async function gC(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 Wh="payments.credit-card.render",_C=7,yC=vn.merge(uu).merge(vi).merge(Al).merge(_r).required({refund_session_url:!0,capture_session_url:!0,void_session_url:!0}).extend({targeting:F.array(F.object({target:F.literal(Wh)})).length(1),verification_session_url:F.string().url().optional(),ui_extension_handle:F.string().optional(),supports_moto:F.boolean({required_error:"supports_moto is required",invalid_type_error:"Value must be Boolean"}),encryption_certificate_fingerprint:F.string(),checkout_payment_method_fields:F.array(F.object({type:F.union([F.literal("string"),F.literal("number"),F.literal("boolean")]),required:F.boolean(),key:F.string()})).max(_C,`The extension can't have more than ${_C} 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 Pne(e,t){let n=Ci(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:n}}async function FC(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 Hh="payments.card-present.render",EC=vn.required({refund_session_url:!0,capture_session_url:!0,void_session_url:!0}).extend({targeting:F.array(F.object({target:F.literal(Hh)})).length(1),sync_terminal_transaction_result_url:F.string().url().optional()});function Rne(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 vC(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 sN=F.union([aC,lC,dC,mC,yC,EC]),aN=Ie({identifier:"payments_extension",schema:sN,appModuleFeatures:e=>[],deployConfig:async(e,t)=>{switch(e.targeting[0]?.target){case Lh:return cC(e);case Uh:return fC(e);case Wh:return FC(e);case kh:return hC(e);case qh:return gC(e);case Hh:return vC(e);default:return{}}}}),CC=aN;d();var zh="@shopify/retail-ui-extensions",cN=Ge.extend({name:F.string()}),lN=Ie({identifier:"pos_ui_extension",dependency:zh,schema:cN,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 n=await Is(zh,t);if(n==="not_found")throw new jn(`Dependency ${zh} not found`);return{name:e.name,description:e.description,renderer_version:n?.version}}}),wC=lN;d();var Vh="@shopify/admin-ui-extensions",fN=Ie({identifier:"product_subscription",additionalIdentifiers:["subscription_management"],dependency:Vh,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 n=await Is(Vh,t);if(n==="not_found")throw new jn(`Dependency ${Vh} not found`);return{renderer_version:n?.version}}}),bC=fN;d();var pN=F.object({key:F.string()}),dN=Ge.extend({production_api_base_url:F.string(),benchmark_api_base_url:F.string().optional(),calculate_taxes_api_endpoint:F.string(),input:F.object({metafield_identifiers:F.object({namespace:F.string(),key:F.string()}).optional()}).optional(),metafields:F.array(gi).optional(),cart_line_properties:F.array(pN).optional()}),hN=Ie({identifier:"tax_calculation",schema:dN,appModuleFeatures:e=>[],getOutputRelativePath:e=>R("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})}),xC=hN;d();var DN=Ie({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=>_N(e)}),TC=DN,Yh=1024,IC=Yh*1024,BC=10,mN=BC*IC,RC=500,gN=RC*Yh,AC=[".jpg",".jpeg",".json",".js",".css",".png",".svg",".wasm"],SC=[".json"],MC={assets:{validator:new RegExp(`${AC.join("|")}$`),failureMessage:e=>`Only these filetypes are supported in assets: ${AC.join(", ")}`},blocks:{validator:/.liquid$/,failureMessage:e=>"Only .liquid files are allowed in blocks."},locales:{validator:new RegExp(`${SC.join("|")}$`),failureMessage:e=>`Only these filetypes are supported in locales: ${SC.join(", ")}`},snippets:{validator:/.liquid$/,failureMessage:e=>"Only .liquid files are allowed in snippets."}},PC=Object.keys(MC);async function _N(e){let t=await As(e),n=[],r=[];await Promise.all(t.map(async i=>{let s=Oe(e.directory,i),a=De(s);EN(s,a);let l=await Ic(i);r.push(l),["blocks","snippets"].includes(a)&&n.push(l)})),yN(OC(r)),FN(OC(n))}function yN(e){if(e>mN){let t=`${(e/IC).toFixed(2)} MB`;throw new k(`Your theme app extension exceeds the file size limit (${BC} MB). It's currently ${t}.`,"Reduce your total file size and try again.")}}function FN(e){if(e>gN){let t=`${(e/Yh).toFixed(2)} kB`;throw new k(`Your theme app extension exceeds the total liquid file size limit (${RC} kB). It's currently ${t}.`,"Reduce your total file size and try again.")}}function EN(e,t){if(!PC.includes(t))throw new k(Ae`Your theme app extension includes files in an unsupported directory, ${xe.path(t)}`,`Make sure all theme app extension files are in the supported directories: ${PC.join(", ")}`);let n=MC[t];if(!e.match(n.validator))throw new k(`Invalid filename in your theme app extension: ${e}
|
|
216
|
+
${n.failureMessage(e)}`)}function OC(e){return e.reduce((t,n)=>t+n,0)}d();d();var h1=fr(HD(),1);import{createRequire as vk}from"module";async function Rm(){let e=await import("./typescript-5R4Y7PXE.js");return e.default??e}var p1=vk(import.meta.url),d1="@shopify/ui-extensions";function Ck(e){let t=e.toLowerCase().replace(/(::|\.).+$/,"");switch(t){case"purchase":return"checkout";case"pos":return"point-of-sale";default:return t}}function Mm(e){let t=e[0];return t?`${d1}/${Ck(t)}`:d1}function pa(e){let[t,n]=e.split("-");return!t||!n?null:{year:parseInt(t,10),month:parseInt(n,10)}}async function wk(e){let t=await Rm(),n=t.findConfigFile(e,t.sys.fileExists.bind(t.sys),"tsconfig.json");if(!n)return{compilerOptions:{},configPath:void 0};let r=t.readConfigFile(n,t.sys.readFile.bind(t.sys));return r.error?{compilerOptions:{},configPath:n}:{compilerOptions:t.parseJsonConfigFileContent(r.config,t.sys,De(n)).options,configPath:n}}async function bk(e,t){if(!e.startsWith("./")&&!e.startsWith("../"))return null;let n=Nr(t,e),r=["",".js",".jsx",".ts",".tsx"];for(let i of r){let s=n+i;if(await Z(s)&&!s.includes("node_modules"))return s}for(let i of[".js",".jsx",".ts",".tsx"]){let s=R(n,`index${i}`);if(await Z(s)&&!s.includes("node_modules"))return s}return null}async function xk(e){try{let t=await Rm(),n=jr(e).toString(),r=[],{compilerOptions:i}=await wk(e),s=t.ScriptKind.JSX;e.endsWith(".ts")?s=t.ScriptKind.TS:e.endsWith(".tsx")&&(s=t.ScriptKind.TSX);let a=t.createSourceFile(e,n,t.ScriptTarget.Latest,!0,s),l=new Set,p=[],h=m=>{if(t.isImportDeclaration(m)&&m.moduleSpecifier&&t.isStringLiteral(m.moduleSpecifier))p.push(m.moduleSpecifier.text);else if(t.isCallExpression(m)&&m.expression.kind===t.SyntaxKind.ImportKeyword){let _=m.arguments[0];_&&t.isStringLiteral(_)&&p.push(_.text)}else t.isExportDeclaration(m)&&m.moduleSpecifier&&t.isStringLiteral(m.moduleSpecifier)&&p.push(m.moduleSpecifier.text);t.forEachChild(m,h)};h(a);for(let m of p){if(!m||l.has(m))continue;l.add(m);let _=t.resolveModuleName(m,e,i,t.sys);if(_.resolvedModule?.resolvedFileName){let C=_.resolvedModule.resolvedFileName;C.includes("node_modules")||r.push(C)}else{let C=await bk(m,De(e));C&&r.push(C)}}return r}catch(t){if(t instanceof k)throw t;return[]}}async function Ef(e,t=new Set){if(t.has(e))return[];t.add(e);let n=await xk(e),r=[...n];for(let i of n){let s=await Ef(i,t);r.push(...s)}return It(r)}async function Ak(e){let t;try{t=jr(e).toString()}catch{return!1}let n=await Rm(),r=n.createSourceFile(e,t,n.ScriptTarget.Latest,!0,n.ScriptKind.TS),i=!1,s=a=>{if(!i){if(n.isExportDeclaration(a)&&a.exportClause&&n.isNamedExports(a.exportClause)){for(let l of a.exportClause.elements)if(l.name.text==="ShopifyGlobal"){i=!0;return}}n.forEachChild(a,s)}};return s(r),i}async function Sk(e,t){let n=async r=>{let i=`import('@shopify/ui-extensions/${r}').Api`,s=t.get(r);return s&&await Ak(s)?`${i} & import('@shopify/ui-extensions/${r}').ShopifyGlobal`:i};return e.length===1?n(e[0]??""):e.length>1?`(${(await Promise.all(e.map(n))).join(" | ")})`:null}async function Pk(e,t,{includesTools:n,includesIntents:r},i){let s=await Sk(e,t);if(!s)return null;if(!n&&!r)return s;let a=s;return r&&(a=`import('${i}').WithGeneratedIntents<${a}, ShopifyGeneratedIntentVariants>`),n&&(a=`import('${i}').WithGeneratedTools<${a}, ShopifyTools>`),a}async function D1({fullPath:e,typeFilePath:t,targets:n,apiVersion:r,toolsTypeDefinition:i,intentsTypeDefinition:s}){try{let a=new Map,l=!!i,p=!!s;for(let v of n)try{let b=p1.resolve(`@shopify/ui-extensions/${v}`,{paths:[e,t]});a.set(v,b)}catch{let{year:A,month:O}=pa(r)??{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 ~${A}.${O}.0, in your dependencies.`)}let h=Mm(n);if(l||p)try{p1.resolve(h,{paths:[e,t]})}catch{let{year:b,month:A}=pa(r)??{year:2025,month:10};throw new k(`Type reference for ${h} 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 ~${b}.${A}.0, in your dependencies.`)}let m=Sc(e,De(t)),_=await Pk(n,a,{includesTools:l,includesIntents:p},h);return _?["//@ts-ignore",`declare module './${m}' {`,...i?[i]:[],...s?[s]:[],` const shopify: ${_};`," const globalThis: { shopify: typeof shopify };","}",""].join(`
|
|
217
|
+
`):null}catch(a){if(a instanceof k)throw a;let{year:l,month:p}=pa(r)??{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 m1(e,t){let n=De(e),r=await pr("tsconfig.json",{cwd:n,type:"file"});if(r){let i=Nr(r),s=Nr(t);if(i.startsWith(s))return De(r)}}var Ok=F.object({name:F.string(),description:F.string(),inputSchema:F.object({}).passthrough(),outputSchema:F.object({}).passthrough().optional()}),g1=F.array(Ok),_1=F.object({value:F.object({}).passthrough().optional(),inputSchema:F.object({}).passthrough(),outputSchema:F.object({}).passthrough().optional()});function Tk(e){return Go(`${e.action} ${e.type}`.replace(/[^a-zA-Z0-9]+/g," "))}async function y1(e,{generatedTypesHelperImportPath:t}){if(e.length===0)return"";let n=new Set,r=e.map(async a=>{let l=`${a.action}:${a.type}`;if(n.has(l))throw new k(`Intent "${l}" is defined multiple times. Intents must be unique within a target.`);n.add(l);let p=Tk(a),h=`${p}IntentInput`,m=`${p}IntentValue`,_=`${p}IntentOutput`,C=`${p}IntentRequest`,v=await da(h,a.inputSchema),b=await da(m,a.valueSchema),A=await da(_,a.outputSchema),O=`interface ${C} {
|
|
218
|
+
action: ${JSON.stringify(a.action)};
|
|
219
|
+
type: ${JSON.stringify(a.type)};
|
|
220
|
+
data: ${h};
|
|
221
|
+
value?: ${m};
|
|
222
|
+
}`;return{inputType:v,valueType:b,outputType:A,requestType:O,requestTypeName:C,outputTypeName:_}}),i=await Promise.all(r),s=i.map(({requestTypeName:a,outputTypeName:l})=>` | import('${t}').ShopifyGeneratedIntentVariant<${a}, ${l}>`).join(`
|
|
223
|
+
`);return`${i.map(({inputType:a,valueType:l,outputType:p,requestType:h})=>`${a}
|
|
224
|
+
${l}
|
|
225
|
+
${p}
|
|
226
|
+
${h}`).join(`
|
|
227
|
+
|
|
228
|
+
`)}
|
|
229
|
+
|
|
230
|
+
type ShopifyGeneratedIntentVariants =
|
|
231
|
+
${s}
|
|
232
|
+
`}async function F1(e){if(e.length===0)return"";let t=new Set,n=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=Go(`${s.name}Input`),l=await da(a,s.inputSchema),p=Go(`${s.name}Output`),h=await da(p,s.outputSchema);return{name:s.name,description:s.description,inputType:l,outputType:h,inputTypeName:a,outputTypeName:p}}),r=await Promise.all(n),i=r.map(({name:s,description:a,inputTypeName:l,outputTypeName:p})=>` /**
|
|
233
|
+
${a.replace(/\*\//g,"*\\/").split(`
|
|
234
|
+
`).map(m=>` * ${m}`).join(`
|
|
235
|
+
`)}
|
|
236
|
+
*/
|
|
237
|
+
register(name: '${s}', handler: (input: ${l}) => ${p} | Promise<${p}>): () => void;`).join(`
|
|
238
|
+
`);return`${r.map(({inputType:s,outputType:a})=>`${s}
|
|
239
|
+
${a}`).join(`
|
|
240
|
+
`)}
|
|
241
|
+
interface ShopifyTools {
|
|
242
|
+
${i}
|
|
243
|
+
}
|
|
244
|
+
`}function Ik(e,t){return e.replace(/^(interface|type|enum)\s+[A-Za-z0-9_]+/,`$1 ${t}`)}async function da(e,t){if(!t)return`type ${e} = unknown`;let n=await(0,h1.compile)(t,e,{bannerComment:""}),r=n.startsWith("export ")?n.slice(7):n;return Ik(r,e)}d();d();d();var E1=Wy`
|
|
245
|
+
query {
|
|
246
|
+
products(first: 1, query: "published_status:published") {
|
|
247
|
+
edges {
|
|
248
|
+
node {
|
|
249
|
+
id
|
|
250
|
+
variants(first: 1) {
|
|
251
|
+
edges {
|
|
252
|
+
node {
|
|
253
|
+
id
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
`;async function v1(e){let t=await Qy(e),n=await F0(E1,t);if(n.products.edges.length===0){let a=`https://${Yy(e)}/admin/products/new`,l=Ae`${xe.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.
|
|
262
|
+
|
|
263
|
+
${l}`)}return n.products.edges[0].node.variants.edges[0].node.id.split("/").pop()}async function Pue(e,t,n){return e.filter(s=>s.shouldFetchCartUrl()).length>0?n||`/cart/${await v1(t)}:1`:void 0}function C1(e){let t=e.toLowerCase().replace(/(::|\.).+$/,""),n=e.split(".")[1];switch(t){case"purchase":return n==="post"?"post_purchase":"checkout";case"customer-account":return"customer-accounts";case"pos":return"point_of_sale";default:return t}}d();QB();async function w1(e,t){return C0.format(e,t)}var Bk="@shopify/checkout-ui-extensions",Rk=e=>e.extension_points!==void 0||e.targeting!==void 0,x1="No extension targets defined, add a `targeting` field to your configuration",Mk=Ge.extend({name:F.string(),type:F.literal("ui_extension"),extension_points:$d.optional(),targeting:$d.optional(),metafields:F.array(gi).optional()}).refine(e=>Rk(e),x1).transform(e=>{let t=(e.targeting??e.extension_points??[]).map(n=>{let r={assets:{[Fn.Main]:{filepath:`${e.handle}.js`,module:n.module},...n.should_render?.module?{[Fn.ShouldRender]:{filepath:`${e.handle}-conditions.js`,module:n.should_render.module}}:null}};return{target:n.target,module:n.module,metafields:n.metafields??e.metafields??[],default_placement_reference:n.default_placement,urls:n.urls??{},capabilities:n.capabilities,preloads:n.preloads??{},build_manifest:r,tools:n.tools,instructions:n.instructions,intents:n.intents,assets:n.assets}});return{...e,extension_points:t}}),Nk=Ie({identifier:"ui_extension",dependency:Bk,schema:Mk,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(r=>C1(r.target)==="checkout")!==void 0?[...t,"cart_url"]:t},validate:async(e,t,n)=>Uk(n,e.extension_points,t),deployConfig:async(e,t)=>{let n=e.extension_points?.map(jk)??[];return{api_version:e.api_version,extension_points:n,capabilities:e.capabilities,supported_features:e.supported_features,name:e.name,description:e.description,settings:e.settings,localization:await hr(t,e.type)}},getBundleExtensionStdinContent:e=>{let t=b1(e),n=e.extension_points||[],r=n.map(({target:a,module:l},p)=>t?`import Target_${p} from '${l}';shopify.extend('${a}', (...args) => Target_${p}(...args));`:`import '${l}';`).join(`
|
|
264
|
+
`),i={};n.forEach(a=>{let l=kk(a,t);l&&(i[Fn.ShouldRender]=l)});let s=Object.values(i);return{main:r,...s.length?{assets:s}:{}}},hasExtensionPointTarget:(e,t)=>e.extension_points?.find(n=>n.target===t)!==void 0,contributeToSharedTypeFile:async(e,t)=>{if(!b1(e.configuration))return;let{configuration:n}=e,r=new Map,i=new Map,s=new Map;for await(let a of n.extension_points){let l=R(e.directory,a.module);if(!await Z(l))continue;let h=r.get(l)??[];if(h.push(a.target),r.set(l,h),a.tools&&i.set(l,a.tools),a.intents?.length){let m=s.get(l)??[];m.push(...a.intents),s.set(l,m)}if(a.build_manifest.assets[Fn.ShouldRender]?.module){let m=R(e.directory,a.build_manifest.assets[Fn.ShouldRender].module);if(await Z(m)){let C=r.get(m)??[];C.push(Nm(a.target)),r.set(m,C)}}}for await(let a of n.extension_points){let l=R(e.directory,a.module);if(!await Z(l))continue;let h=await Ef(l);for(let m of h){let _=r.get(m)??[];_.push(a.target),r.set(m,_)}if(a.build_manifest.assets[Fn.ShouldRender]?.module){let m=R(e.directory,a.build_manifest.assets[Fn.ShouldRender].module);if(await Z(m)){let C=await Ef(m);for(let v of C){let b=r.get(v)??[];b.push(Nm(a.target)),r.set(v,b)}}}}for await(let[a,l]of r.entries()){let p=await m1(a,e.directory);if(!p)continue;let h=R(p,"shopify.d.ts"),m=It(l),_=Mm(m);try{let C=i.get(a),v="";if(C)try{let T=await A1(e.directory,C,g1);T.status==="ok"?v=await F1(T.data):T.status==="invalid"&&Lr(`Invalid tools definition in "${C}": ${T.issues}`)}catch(T){Lr(`Failed to create tools type definition for tools file "${C}": ${T instanceof Error?T.message:"Unknown error"}`)}let b=s.get(a),A="";if(b?.length){let T=await $k(e.directory,b);if(T.length>0)try{A=await y1(T,{generatedTypesHelperImportPath:_})}catch(L){if(L instanceof k)throw L;Lr(`Failed to create intent type definition for intent schema files "${b.map(q=>q.schema).join(", ")}": ${L instanceof Error?L.message:"Unknown error"}`)}}let O=await D1({fullPath:a,typeFilePath:h,targets:m,apiVersion:n.api_version,toolsTypeDefinition:v,intentsTypeDefinition:A});if(O){let T=t.get(h)??new Set;O=await w1(O,{parser:"typescript",singleQuote:!0}),T.add(O),t.set(h,T)}}catch(C){if(n.extension_points.some(b=>R(e.directory,b.module)===a||b.build_manifest.assets[Fn.ShouldRender]?.module&&R(e.directory,b.build_manifest.assets[Fn.ShouldRender].module)===a))throw C}}}});function jk(e){return{...e,build_manifest:{...e.build_manifest,assets:Object.fromEntries(Object.entries(e.build_manifest.assets).map(([t,n])=>[t,{...n,filepath:R("dist",n.filepath)}]))}}}async function A1(e,t,n){let r=R(e,t);if(!await Z(r))return{status:"missing"};let s=await $e(r),a=n.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 $k(e,t){let n=await Promise.all(t.map(async i=>{try{let s=await A1(e,i.schema,_1);return s.status==="missing"?(Lr(`Intent schema file "${i.schema}" was not found. Skipping intent type generation.`),null):s.status==="invalid"?(Lr(`Invalid intent schema in "${i.schema}": ${s.issues}`),null):{action:i.action,type:i.type,inputSchema:s.data.inputSchema,valueSchema:s.data.value,outputSchema:s.data.outputSchema}}catch(s){return Lr(`Failed to create intent type definition for intent schema file "${i.schema}": ${s instanceof Error?s.message:"Unknown error"}`),null}})),r=[];for(let i of n)i&&r.push(i);return r}async function Lk(e,t,n,r){if(!t)return;let i=R(e,t);return await Z(i)?void 0:Ae`Couldn't find ${xe.path(i)}
|
|
265
|
+
Please check the ${r} path for ${n}`.value}async function Uk(e,t,n){let r=[],i=[],s=[];if(!t||t.length===0)return io(x1);for await(let a of t){let{module:l,target:p}=a,h=await Lk(e,l,p,"module");h&&r.push(h),i.includes(p)?s.push(p):i.push(p)}return s.length&&r.push(`Duplicate targets found: ${s.join(", ")}
|
|
266
|
+
Extension point targets must be unique`),r.length?(r.push(`Please check the configuration in ${n}`),io(r.join(`
|
|
267
|
+
|
|
268
|
+
`))):$r({})}function b1(e){let t=e.api_version;if(!t)return!1;let{year:n,month:r}=pa(t)??{year:0,month:0};return n>2025||n===2025&&r>=10}function Nm(e){return e.replace(/\.render$/,".should-render")}function kk(e,t){let n=e.build_manifest.assets[Fn.ShouldRender];if(n)return{identifier:Fn.ShouldRender,outputFileName:n.filepath,content:t?`import shouldRender from '${n.module}';shopify.extend('${Nm(e.target)}', (...args) => shouldRender(...args));`:`import '${n.module}'`}}var S1=Nk;d();var P1=1024,O1=128,qk=O1*P1,Wk="@shopify/web-pixels-extension",Hk=Ge.extend({runtime_context:F.string(),version:F.string().optional(),configuration:F.any(),customer_privacy:F.object({analytics:F.boolean(),preferences:F.boolean(),marketing:F.boolean(),sale_of_data:F.enum(["enabled","disabled","ldu"])}).optional(),settings:F.any()}),zk=Ie({identifier:"web_pixel_extension",dependency:Wk,partnersWebIdentifier:"web_pixel",schema:Hk,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 n=await Ic(t);if(n>qk){let r=`${(n/P1).toFixed(2)} kB`;throw new k(`Your web pixel extension exceeds the total file size limit (${O1} kB). It's currently ${r}.`,"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()}}),T1=zk;d();var Vk=F.object({handle:F.string()}),Yk=Ge.extend({name:F.string(),include:F.array(Vk).optional(),includes:F.array(F.string()).optional(),type:F.literal("editor_extension_collection")}).transform(e=>{let t=e.includes?.map(r=>({handle:r}))??[],n=e.include??[];return{...e,inCollection:[...t,...n]}}),Gk=Ie({identifier:"editor_extension_collection",schema:Yk,appModuleFeatures:e=>[],deployConfig:async(e,t)=>({name:e.name,handle:e.handle,in_collection:e.inCollection,localization:await hr(t,e.name)})}),I1=Gk;d();var B1="specifications",Kk=["json","toml","yaml","yml","svg"],Jk=_i({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:B1,destination:B1,include:Kk.map(e=>`**/*.${e}`)}]}}]}],appModuleFeatures:()=>[]}),R1=Jk;d();var M1="icons",Qk=["svg"],Xk=_i({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:M1,destination:M1,include:Qk.map(e=>`**/*.${e}`)}]}}]}],appModuleFeatures:()=>[]}),N1=Xk;d();var Zk=_i({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"]}),j1=Zk;var $1=[j0,Yc,L0,nu,Ih,Rh,Oh,Th,M0];async function Ou(){let e=(t,n)=>$1.indexOf(t.identifier)-$1.indexOf(n.identifier);return e4().sort(e)}function e4(){let e=[O0,N0,$v,$0,Lv,Wv,U0,CE,qv],t=[Hv,zv,rC,oC,Qv,uC,CC,wC,bC,xC,TC,S1,T1,I1,R1,N1,j1];return[...e,...t]}d();d();var qA=fr(HB()),WA=fr(Mx()),HA=fr(UA());async function $f(e){let t=JSON.parse(e);return await WA.default.dereference(t,{resolve:{external:!1}}),t}function hg(e,t){e==="strip"&&(t.additionalProperties=!0);let n=new qA.Ajv({allowUnionTypes:!0,allErrors:!0,verbose:!0});return n.addKeyword("x-taplo"),n.compile(t)}var kA=new Map;function zA(e,t,n,r){let i=(0,HA.default)(e),s=r??Nc(),a=kA.get(s)??hg(n,t);kA.set(s,a),a(i);let l;if(a.errors&&a.errors.length>0)return l=EH(a.errors,i,t),{state:"error",data:void 0,errors:l,rawErrors:a.errors};if(n==="strip"){let p=Object.keys(t.properties??{});Object.keys(i).forEach(h=>{p.includes(h)||delete i[h]})}return{state:"ok",data:i,errors:void 0,rawErrors:void 0}}function FH(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function Ca(e,t){return t.length===0?e:vt(e,t)}function EH(e,t,n){return vH(e,t,n).map(i=>{let s=i.instancePath.split("/").slice(1);if(i.params.missingProperty){let a=i.params.missingProperty;return{path:[...s,a],message:"Required"}}if(i.params.type){let a=Array.isArray(i.params.type)?i.params.type.join(", "):i.params.type,l=Ca(t,s);return{path:s,message:`Expected ${a}, received ${FH(l)}`}}if(i.keyword==="anyOf"||i.keyword==="oneOf")return{path:s,message:"Invalid input"};if(i.params.allowedValues){let a=i.params.allowedValues,l=Ca(t,s);return{path:s,message:`Invalid enum value. Expected ${a.map(p=>JSON.stringify(p)).join(" | ")}, received ${JSON.stringify(l)}`.replace(/"/g,"'")}}if(i.params.comparison){let a=i.params.comparison,l=i.params.limit,p=Ca(t,s),h=a;switch(a){case"<=":h="less than or equal to";break;case"<":h="less than";break;case">=":h="greater than or equal to";break;case">":h="greater than";break}return{path:s,message:Iy(`${typeof p} must be ${h} ${l}`)}}if(i.params.additionalProperty){let a=Object.keys(i.parentSchema?.properties??{}),l=Object.keys(i.data??{}),p=a.filter(h=>!l.includes(h));if(p.length>0)return{path:[...s,i.params.additionalProperty],message:`No additional properties allowed. You can set ${p.sort().join(", ")}.`}}return{path:s,message:i.message}})}function vH(e,t,n){let r=e,i=new Set;for(;;){let s=r.filter(_=>(_.keyword==="oneOf"||_.keyword==="anyOf")&&!i.has(_.instancePath))[0];if(s===void 0)break;let a=r.filter(_=>!_.instancePath.startsWith(s.instancePath)),l=[s],p=s.schemaPath.replace("#/","").replace(/\//g,"."),h=vt(n,p),m=Ca(t,s.instancePath.split("/").slice(1));if(h!==void 0&&m!==void 0){let _=h.map(C=>{let v=hg("fail",C);v(m);let b=0;return C.type==="object"&&(b=Object.keys(C.properties).reduce((O,T)=>{let L=C.properties[T],q=Ca(m,[T]);return hg("fail",L)(q)?O+1:O},b)),[b,v.errors]}).sort(([C],[v])=>C-v);if(_.length>=2){let[C,v]=_[_.length-1],[b]=_[_.length-2];C!==b&&(l=[s,...v.map(A=>({...A,instancePath:s.instancePath+A.instancePath}))])}}r=[...a,...l],i.add(s.instancePath)}return r}var CH={type:{type:"string"},handle:{type:"string"},uid:{type:"string"},path:{type:"string"},extensions:{}};async function VA(e,t,n="strip"){let r=t?.jsonSchema;if(r===void 0||_s(JSON.parse(r)))return e.parseConfigurationObject;let i=await $f(r);i.properties={...CH,...i.properties};let s=e.identifier;return l=>{let p=e.parseConfigurationObject(l),m=(p.state==="ok"?p.data:void 0)??l,_=zA(m,i,n,s),C=p.errors??[];_.state==="error"&&(C=C.concat(_.errors));let v=new Set;return C=C.filter(b=>{let A=JSON.stringify({path:b.path,message:b.message});return v.has(A)?!1:(v.add(A),!0)}),p.state!=="ok"||C.length>0?{state:"error",data:void 0,errors:C}:{state:"ok",data:_.data,errors:void 0}}}async function Lf({developerPlatformClient:e,app:t}){let r=(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)),i=await Ou();return[...await wH(i,r)]}async function wH(e,t){let n=t.map(async a=>{let l=e.find(m=>m.identifier===a.identifier);if(!l&&a.validationSchema?.jsonSchema&&(l=await xH(a,a.validationSchema)),!l)return;let p=bH(l,a),h=await VA(p,a.validationSchema,p.experience==="extension"?"fail":"strip");return{...p,parseConfigurationObject:h}}),r=ro(await Promise.all(n)),i=e.filter(a=>!r.find(l=>l.identifier===a.identifier));i.length>0&&ce(`The following extension specifications were defined locally but not found in the remote specifications: ${i.map(a=>a.identifier).sort().join(", ")}`);let s=t.filter(a=>!r.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(", ")}`),r}function bH(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 xH(e,t){let r=(await $f(t.jsonSchema)).properties?.localization!==void 0;return{..._i({identifier:e.identifier,uidStrategy:e.uidStrategy,experience:e.experience,appModuleFeatures:()=>r?["localization"]:[]}),loadedRemoteSpecs:!0}}async function Uf(e,t=!0){let{remoteApp:n,appDirectory:r,developerPlatformClient:i}=await AH(e),s=await Lf({developerPlatformClient:i,app:n}),a=n.flags,l=await PH(e,s,a,n.apiKey),p=await OH(n,e,{appDirectory:l.appDirectory});await Ph(n,i.organizationSource);let h=await TH({configFileName:p,remoteApp:n,developerPlatformClient:i,specifications:s,flags:a,appDirectory:r,localAppOptions:l});return t&&BH(p,h.name,l.packageManager),{remoteApp:n,configFileName:p,configuration:h}}async function AH(e){let{creationOptions:t,appDirectory:n}=await SH(e),r=n??e.directory;if(e.apiKey){let a=await Cl({apiKey:e.apiKey});if(!a){let l=Bv(e.apiKey);throw new k(l.message,l.tryMessage)}return e.isNewApp&&(a.newApp=!0),{remoteApp:a,appDirectory:r,developerPlatformClient:a.developerPlatformClient}}let i=await Mv({...t,directory:r,organizationId:e.organizationId}),s=i.developerPlatformClient;return{remoteApp:i,appDirectory:r,developerPlatformClient:s}}async function SH(e){let t={isLaunchable:!1,scopesArray:[],name:"",directory:e.directory,isEmbedded:!1};try{let n=await WE({specifications:await Ou(),directory:e.directory,userProvidedConfigName:e.configName,remoteFlags:void 0,skipPrompts:!0});return{creationOptions:n.creationDefaultOptions(),appDirectory:n.directory}}catch{return{creationOptions:t}}}async function PH(e,t,n,r){let i=await HE({directory:e.directory,configName:e.configName,specifications:t,remoteFlags:n,skipPrompts:!0});switch(i.state){case"loaded-app":{let{app:s,configuration:a}=i;return a.client_id===r||e.isNewApp?{state:"reusable-current-app",scopes:nh(a),localAppIdMatchedRemote:!0,existingBuildOptions:a.build,existingConfig:{...a},appDirectory:s.directory,packageManager:i.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:i.scopes,localAppIdMatchedRemote:!0,existingBuildOptions:void 0,existingConfig:i.rawConfig,appDirectory:i.appDirectory,packageManager:i.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 OH(e,t,n){if(t.configName)return Ln(t.configName);let r=yl();if(r?.selectedToml)return r.selectedToml;let i=await gl(t.directory),s=i[e.apiKey];return s||(_s(i)?"shopify.app.toml":EE(n.appDirectory??t.directory,e.title))}async function TH(e){let{remoteApp:t,developerPlatformClient:n,specifications:r,flags:i,configFileName:s,appDirectory:a,localAppOptions:l}=e,p=R(a,s),h=await vl(t,n,r,i);if(!h){let C=l.scopes;h=RH(t,C)}let m=(C,v)=>v,_={...hi({...l.existingConfig??{}},{client_id:t.apiKey,...h},m),build:IH({existingBuildOptions:l.existingBuildOptions,linkedAppAndClientIdFromFileAreInSync:l.localAppIdMatchedRemote,linkedAppWasNewlyCreated:!!t.newApp,defaultToUpdateUrlsOnDev:n.supportsDevSessions})};return delete _.scopes,await Cv(_,p),gh(_,{configFileName:s,directory:a}),_}function IH(e){let{existingBuildOptions:t,linkedAppAndClientIdFromFileAreInSync:n,linkedAppWasNewlyCreated:r,defaultToUpdateUrlsOnDev:i}=e,s={...r?{include_config_on_deploy:!0}:{},...i&&r?{automatically_update_urls_on_dev:!0}:{},...n?t:{}};if(!_s(s))return s}function BH(e,t,n){ys({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:qc(n,"shopify app deploy")}]],reference:[{link:{label:"App configuration",url:"https://shopify.dev/docs/apps/tools/cli/configuration"}}]})}function RH(e,t){return{...UH(e),...LH(e),...jH(e),...$H(t,e),...NH(e),...MH(e)}}function MH(e){let t={application_url:e.applicationUrl?.replace(/\/$/,"")??"",embedded:e.embedded??!0};return e.preferencesUrl?{...t,app_preferences:{url:e.preferencesUrl}}:{...t}}function NH(e){return e.appProxy?.url?{app_proxy:{url:e.appProxy.url,subpath:e.appProxy.subPath,prefix:e.appProxy.subPathPrefix}}:{}}function jH(e){let t=e.gdprWebhooks?.customerDataRequestUrl??e.gdprWebhooks?.customerDeletionUrl??e.gdprWebhooks?.shopDeletionUrl,n={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?n:{}}}}function $H(e,t){let n={};return t.requestedAccessScopes?n={scopes:t.requestedAccessScopes.join(",")}:e===""?n={use_legacy_install_flow:!0}:n={scopes:e,use_legacy_install_flow:!0},{auth:{redirect_urls:t.redirectUrlWhitelist??[]},access_scopes:n}}function LH(e){return{pos:{embedded:e.posEmbedded??!1}}}function UH(e){return{name:e.title}}d();d();async function YA(e,t){if(t.supportsAtomicDeployments)for(let n of e)await kH(n)}async function kH(e){if(!e.isUUIDStrategyExtension||e.configuration.uid)return;let t=await lt.read(e.configurationPath),n=vt(t.content,"extensions");if(!("uid"in t.content)){if(n){let r=n.find(i=>i.handle===e.handle);if(r&&"uid"in r)return}if(n){let r=e.handle;await t.transformRaw(i=>{let s=new RegExp(`(\\n?(\\s*)handle\\s*=\\s*"${r}")`);return i.replace(s,`$1
|
|
269
|
+
$2uid = "${e.uid}"`)})}else await t.patch({uid:e.uid})}}function GA(e){let t=Ns(e);return Ae`${xe.errorText("Validation error")} in ${xe.path(e.file)}:\n\n${t}`}async function Sle({directory:e,clientId:t,forceRelink:n,userProvidedConfigName:r,unsafeTolerateErrors:i=!1}){let s,a,l;if(n){let O=await Uf({directory:e,apiKey:t});l=O.remoteApp;let T=await Un(e,O.configFileName);s=T.project,a=T.activeConfig}else{let O=await Un(e,r);if(s=O.project,a=O.activeConfig,a.file.errors.length>0)throw new k(a.file.errors.map(T=>T.message).join(`
|
|
270
|
+
`));if(!a.isLinked){let T=await Uf({directory:e,apiKey:t,configName:Te(a.file.path)});l=T.remoteApp;let L=await Un(e,T.configFileName);s=L.project,a=L.activeConfig}}let p=a.file.content.client_id;if(typeof p!="string"||p.length===0)throw new jn(`Active config at ${a.file.path} is marked as linked but has no client_id`);l??(l=await Cl({apiKey:t??p}));let m=l.developerPlatformClient,_=await Qc(l.organizationId,m),C=await Lf({developerPlatformClient:m,app:l}),v=await iu({project:s,activeConfig:a,specifications:C,remoteFlags:l.flags,clientIdOverride:t&&t!==p?t:void 0});if(!i&&!v.errors.isEmpty())throw new k(GA(v.errors.getErrors()[0]));let b=_l(e),A=l.apiKey===v.configuration.client_id;return(!b||A)&&ru({appId:l.apiKey,title:l.title,directory:e,orgId:l.organizationId}),await qH(l,_,n),v.errors.isEmpty()&&await YA(v.allExtensions,m),{project:s,activeConfig:a,app:v,remoteApp:l,developerPlatformClient:m,specifications:C,organization:_}}async function qH(e,t,n){let r;t.source===Jc.BusinessPlatform?r={business_platform_id:Ds(t.id)}:r={partner_id:Ds(t.id)},await nn.addPublicMetadata(()=>({...r,api_key:e.apiKey,cmd_app_reset_used:n}))}async function Ple({directory:e,userProvidedConfigName:t,skipPrompts:n=!1}){let{project:r,activeConfig:i}=await Un(e,t,{skipPrompts:n});if(i.file.errors.length>0)throw new k(i.file.errors.map(l=>l.message).join(`
|
|
271
|
+
`));let s=await Ou(),a=await iu({project:r,activeConfig:i,specifications:s,ignoreUnknownExtensions:!0});if(!a.errors.isEmpty())throw new k(GA(a.errors.getErrors()[0]));return{app:a,project:r}}export{Ud as a,ez as b,uo as c,n8 as d,xs as e,rF as f,gz as g,aF as h,nh as i,al as j,ft as k,XV as l,Ln as m,sh as n,As as o,Zz as p,HF as q,_l as r,ru as s,EK as t,HK as u,IE as v,zK as w,VK as x,YK as y,GK as z,Os as A,FQ as B,mh as C,BE as D,Ns as E,rQ as F,iQ as G,oQ as H,zE as I,mr as J,gl as K,SE as L,PK as M,OK as N,PE as O,TK as P,OE as Q,IK as R,js as S,av as T,vl as U,wv as V,iZ as W,Av as X,Sv as Y,Pv as Z,Ov as _,Tv as $,Iv as aa,Rv as ba,Cl as ca,KZ as da,_M as ea,JZ as fa,Nv as ga,Ph as ha,QZ as ia,XZ as ja,jv as ka,Wee as la,Gv as ma,Lh as na,nne as oa,Uh as pa,fne as qa,kh as ra,gne as sa,qh as ta,Cne as ua,Wh as va,Pne as wa,Hh as xa,Rne as ya,Pue as za,C1 as Aa,Lf as Ba,Uf as Ca,PH as Da,TH as Ea,Sle as Fa,Ple as Ga};
|
|
272
|
+
/*! Bundled license information:
|
|
273
|
+
|
|
274
|
+
lodash/lodash.js:
|
|
275
|
+
(**
|
|
276
|
+
* @license
|
|
277
|
+
* Lodash <https://lodash.com/>
|
|
278
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
279
|
+
* Released under MIT license <https://lodash.com/license>
|
|
280
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
281
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
282
|
+
*)
|
|
283
|
+
*/
|