@shopify/cli 4.7.0 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-3IIUBZ3B.js +1 -0
- package/dist/analytics-OOT5AB52.js +1 -0
- package/dist/assets/hydrogen/starter/AGENTS.md +5 -0
- package/dist/assets/hydrogen/starter/CHANGELOG.md +9 -0
- package/dist/assets/hydrogen/starter/CLAUDE.md +1 -0
- package/dist/assets/hydrogen/starter/package.json +3 -3
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-6ENBE43F.js → chunk-2AK44UYM.js} +1 -1
- package/dist/{chunk-XCBEYRQI.js → chunk-2CIZE537.js} +1 -1
- package/dist/{chunk-YHPBDS52.js → chunk-2EAFYCCS.js} +1 -1
- package/dist/{chunk-U2Z5NMXV.js → chunk-2KGPH7YG.js} +1 -1
- package/dist/{chunk-6VGJVXZI.js → chunk-2O224ZPO.js} +1 -1
- package/dist/{chunk-RY2SJVWM.js → chunk-2XDUJQQN.js} +3 -3
- package/dist/{chunk-GSCWZR22.js → chunk-36ROOKQB.js} +1 -1
- package/dist/{chunk-YIZZ5LZN.js → chunk-3DCN3N23.js} +1 -1
- package/dist/{chunk-YN6A26QL.js → chunk-3JXPOOFV.js} +39 -39
- package/dist/{chunk-KIYHEMHD.js → chunk-4QBJ5JBX.js} +15 -16
- package/dist/chunk-4ZNV5YSL.js +1 -0
- package/dist/chunk-5L63PRJL.js +2 -0
- package/dist/{chunk-MRCWOOSF.js → chunk-5N6HNQQ5.js} +1 -1
- package/dist/{chunk-4JY2P2A5.js → chunk-5SEEDOQ5.js} +1 -1
- package/dist/chunk-67Z34HN5.js +5 -0
- package/dist/chunk-6BDAJ6UD.js +5 -0
- package/dist/chunk-6CXG3XLP.js +1 -0
- package/dist/{chunk-QEB3HUQE.js → chunk-6MWWJZFN.js} +1 -1
- package/dist/{chunk-LRQYUWWB.js → chunk-6RQOEPEC.js} +1 -1
- package/dist/{chunk-LJM2DUXN.js → chunk-72ZY3KTF.js} +1 -1
- package/dist/{chunk-WKUGSFTB.js → chunk-742XXXGL.js} +1 -1
- package/dist/{chunk-37TEEITE.js → chunk-7HFHL5SO.js} +1 -1
- package/dist/{chunk-6VRXGEIW.js → chunk-7ISJRIPT.js} +1 -1
- package/dist/{chunk-CZJZCJRX.js → chunk-7LWUHQIF.js} +1 -1
- package/dist/{chunk-MLZLDL6B.js → chunk-7T6M7FAC.js} +1 -1
- package/dist/{chunk-LWJA2DQG.js → chunk-A6BMJISP.js} +1 -1
- package/dist/{chunk-TY4W7AYX.js → chunk-AWUX36VG.js} +1 -1
- package/dist/chunk-BWJIZYAG.js +1 -0
- package/dist/{chunk-EW55WWT7.js → chunk-BZ73NV3L.js} +1 -1
- package/dist/chunk-C3RUVXG2.js +6 -0
- package/dist/{chunk-QKGZWOOY.js → chunk-C4YLE3NS.js} +1 -1
- package/dist/chunk-CEYIZC3M.js +2 -0
- package/dist/{chunk-WCRZJY3P.js → chunk-CIWKN4HF.js} +1 -1
- package/dist/{chunk-P5MNNBSO.js → chunk-CULTZLC4.js} +1 -1
- package/dist/{chunk-X4XP2RQJ.js → chunk-CX75OKZK.js} +1 -1
- package/dist/{chunk-LDF4PQ3B.js → chunk-DASVZTAX.js} +46 -46
- package/dist/{chunk-UPJLZHHR.js → chunk-DX3JLOUA.js} +1 -1
- package/dist/{chunk-ZCNIR6YU.js → chunk-E55KS3GZ.js} +1 -1
- package/dist/{chunk-WHLGNDRE.js → chunk-E5FXOLQO.js} +1 -1
- package/dist/{chunk-JQ2B3VHR.js → chunk-E6N4PZZR.js} +1 -1
- package/dist/{chunk-CIH6LPTG.js → chunk-EB574SY6.js} +1 -1
- package/dist/chunk-EX5GVHGE.js +1 -0
- package/dist/chunk-F3NYCSXT.js +273 -0
- package/dist/{chunk-FWPJEL6Q.js → chunk-F6X6OXXB.js} +1 -1
- package/dist/{chunk-QPWMD2VR.js → chunk-FDBHQLFK.js} +1 -1
- package/dist/{chunk-TCTVI6PK.js → chunk-FDYW3UQC.js} +1 -1
- package/dist/{chunk-2SZOPJYI.js → chunk-FEDVVYK2.js} +1 -1
- package/dist/{chunk-SSJGWLCW.js → chunk-FJ6F4XRV.js} +1 -1
- package/dist/{chunk-E5T4YRGW.js → chunk-FOREMLFZ.js} +1 -1
- package/dist/{chunk-QXHENYJH.js → chunk-FUYDGK33.js} +1 -1
- package/dist/{chunk-CYOFLJ3Z.js → chunk-FX3L344E.js} +1 -1
- package/dist/{chunk-FCGKO2KY.js → chunk-G5XIGN5D.js} +1 -1
- package/dist/{chunk-HHVHVGRT.js → chunk-GAYKYEIM.js} +1 -1
- package/dist/{chunk-2U4P6UFZ.js → chunk-GCY7LPEF.js} +1 -1
- package/dist/{chunk-OORWOTAP.js → chunk-GNBRCK7L.js} +1 -1
- package/dist/{chunk-KOVAFUYN.js → chunk-GRPKF5ZB.js} +1 -1
- package/dist/{chunk-QZBSCOJV.js → chunk-GRSF7456.js} +1 -1
- package/dist/chunk-H2TQ4ODI.js +1 -0
- package/dist/{chunk-AMLWPYNA.js → chunk-H6XEESUN.js} +1 -1
- package/dist/{chunk-I3N6NPHF.js → chunk-HB347DXT.js} +1 -1
- package/dist/chunk-HFSCXTJQ.js +97 -0
- package/dist/chunk-HHN6KZXX.js +1 -0
- package/dist/{chunk-QBIVQXUJ.js → chunk-HP64ZTEJ.js} +1 -1
- package/dist/{chunk-U7R6LYPJ.js → chunk-IARCMH7G.js} +1 -1
- package/dist/{chunk-YOO7DLOT.js → chunk-IBI5UCJO.js} +1 -1
- package/dist/{chunk-UVQL7RUY.js → chunk-IKUSLRGD.js} +1 -1
- package/dist/{chunk-HLNJL4B6.js → chunk-IT4HYLTY.js} +1 -1
- package/dist/{chunk-GZ64KWHX.js → chunk-J4T73EAS.js} +1 -1
- package/dist/chunk-JG4HH54Q.js +1 -0
- package/dist/{chunk-DKL6N3L2.js → chunk-JIYSCWCG.js} +1 -1
- package/dist/chunk-JWRK5KLD.js +560 -0
- package/dist/{chunk-DHU57LKD.js → chunk-JX7FYWPO.js} +1 -1
- package/dist/{chunk-N6YTJXIS.js → chunk-K42WBNJQ.js} +1 -1
- package/dist/{chunk-5CR5YJTU.js → chunk-KDU7VW3L.js} +1 -1
- package/dist/{chunk-CTRXLZAJ.js → chunk-KWVOJWO7.js} +1 -1
- package/dist/{chunk-RUFQCXBX.js → chunk-LANUJ7LX.js} +1 -1
- package/dist/{chunk-PAAKBWSF.js → chunk-LUKQ5HLC.js} +1 -1
- package/dist/{chunk-3K6VHXC2.js → chunk-M2XHIN57.js} +1 -1
- package/dist/{chunk-TYIGOVRQ.js → chunk-MNOQAXJW.js} +1 -1
- package/dist/chunk-MYQUYU4U.js +2 -0
- package/dist/{chunk-T5JXQ7KO.js → chunk-N65F7ET2.js} +1 -1
- package/dist/{chunk-PWSI275S.js → chunk-N6RBRPGW.js} +1 -1
- package/dist/chunk-N75VOJHO.js +15 -0
- package/dist/{chunk-4W3UE2ZI.js → chunk-NBFMP5XQ.js} +1 -1
- package/dist/{chunk-CFWHR74L.js → chunk-NE3ZFSMS.js} +1 -1
- package/dist/{chunk-D2K2ZBKH.js → chunk-NGLMZYS7.js} +2 -2
- package/dist/{chunk-JQISGC7D.js → chunk-NHAUJWEG.js} +1 -1
- package/dist/chunk-NILETICC.js +11 -0
- package/dist/{chunk-SYADOUBB.js → chunk-NNZXKFOS.js} +1 -1
- package/dist/{chunk-E2W5OYYM.js → chunk-NQK2VCDA.js} +1 -1
- package/dist/{chunk-U6HYEGAE.js → chunk-NROVZETL.js} +1 -1
- package/dist/{chunk-TSLQZTXR.js → chunk-NW6NUGN7.js} +1 -1
- package/dist/{chunk-JZMRBJH3.js → chunk-O7DZXO3O.js} +1 -1
- package/dist/{chunk-5CADTCJE.js → chunk-OBYQSIYU.js} +1 -1
- package/dist/{chunk-5NO5OXYP.js → chunk-OEG3N5PG.js} +1 -1
- package/dist/{chunk-VRVP2GQL.js → chunk-OGBZTY2G.js} +1 -1
- package/dist/chunk-OMHR423H.js +1 -0
- package/dist/{chunk-XHZ5BWXL.js → chunk-OV6SRRXR.js} +1 -1
- package/dist/{chunk-2JDCVEFK.js → chunk-OVV5YGKN.js} +1 -1
- package/dist/{chunk-SEVSMWNX.js → chunk-OZL5FTT7.js} +1 -1
- package/dist/{chunk-JUKAWTYY.js → chunk-OZMQ2EJB.js} +1 -1
- package/dist/{chunk-7WTNEG2F.js → chunk-P57P7UAN.js} +1 -1
- package/dist/{chunk-JZXA3H5K.js → chunk-PATTG7YZ.js} +1 -1
- package/dist/{chunk-2HK4MFWP.js → chunk-PG5YNPJB.js} +1 -1
- package/dist/chunk-PP4L2JJ6.js +3 -0
- package/dist/{chunk-CZPGC2E7.js → chunk-Q5JX23QU.js} +1 -1
- package/dist/{chunk-L67BU25M.js → chunk-Q5KVMLBK.js} +1 -1
- package/dist/{chunk-ZRLEAF7M.js → chunk-Q5LIJGT7.js} +1 -1
- package/dist/{chunk-JQVXH26X.js → chunk-Q6ADIMJM.js} +1 -1
- package/dist/{chunk-YUVE2I3C.js → chunk-QERQARMC.js} +1 -1
- package/dist/{chunk-GLWQMLUC.js → chunk-QOV43E26.js} +1 -1
- package/dist/{chunk-KCS75ZM4.js → chunk-QTFUYKMF.js} +1 -1
- package/dist/{chunk-7DOWT5JZ.js → chunk-QTJCCOAG.js} +3 -3
- package/dist/{chunk-XAOYKECS.js → chunk-R6ICQT2D.js} +1 -1
- package/dist/{chunk-4LRG5YBS.js → chunk-R7T3LYJL.js} +1 -1
- package/dist/{chunk-DMXQLI35.js → chunk-RXQJCJDV.js} +1 -1
- package/dist/{chunk-BR6DBMQA.js → chunk-S2TLBBSS.js} +1 -1
- package/dist/{chunk-FULWTZS6.js → chunk-S5FOQY35.js} +1 -1
- package/dist/{chunk-6OFGSZD6.js → chunk-SYLHT42O.js} +1 -1
- package/dist/{chunk-CHMEDVDZ.js → chunk-T4AA6TSF.js} +1 -1
- package/dist/{chunk-XRT2W5Y2.js → chunk-T4QWK5GG.js} +1 -1
- package/dist/{chunk-63CIFL36.js → chunk-T7PJDT5O.js} +1 -1
- package/dist/{chunk-6EBLULOC.js → chunk-TEY4LRY7.js} +1 -1
- package/dist/{chunk-PANGX7SA.js → chunk-TFBRVLDN.js} +1 -1
- package/dist/{chunk-MB7E5GEY.js → chunk-TUVDJ3PG.js} +1 -1
- package/dist/{chunk-HZIX3DIT.js → chunk-U2DWBZK2.js} +1 -1
- package/dist/chunk-U53OLUOE.js +3 -0
- package/dist/{chunk-GKOBFX4A.js → chunk-UAETNFN4.js} +1 -1
- package/dist/{chunk-EOMCXBCS.js → chunk-UAFEFKAQ.js} +1 -1
- package/dist/{chunk-Q5DQGV3M.js → chunk-ULRJDKWQ.js} +1 -1
- package/dist/chunk-UZARYOLN.js +1 -0
- package/dist/chunk-VASGXHYA.js +1 -0
- package/dist/chunk-VD4XJ6BX.js +1 -0
- package/dist/{chunk-Y34LWI3S.js → chunk-VFM2KQRM.js} +3 -3
- package/dist/{chunk-CMYQXGLO.js → chunk-VSDRNYA5.js} +1 -1
- package/dist/{chunk-OE3F7XXU.js → chunk-VVZSYHDG.js} +1 -1
- package/dist/chunk-VXEYO3ZP.js +1 -0
- package/dist/{chunk-7JIQXGDE.js → chunk-VYDSOAV4.js} +1 -1
- package/dist/{chunk-DQFSKPKL.js → chunk-WBYAGS6B.js} +1 -1
- package/dist/chunk-WGAFCKGD.js +1 -0
- package/dist/{chunk-AH2ZGMDM.js → chunk-WYBTC356.js} +1 -1
- package/dist/{chunk-TTAPXLI5.js → chunk-XF2KTEID.js} +1 -1
- package/dist/{chunk-XUEMMLXK.js → chunk-XH5YGJQR.js} +1 -1
- package/dist/chunk-XHKWITLA.js +1705 -0
- package/dist/chunk-XOCB4KNX.js +2 -0
- package/dist/{chunk-2WJAAJVX.js → chunk-XUUAKGEX.js} +1 -1
- package/dist/{chunk-LQCR4TGH.js → chunk-XUYVJEZG.js} +1 -1
- package/dist/chunk-Y47C3LSX.js +3 -0
- package/dist/{chunk-KK24VGVE.js → chunk-Y5PRPHLQ.js} +1 -1
- package/dist/{chunk-K4KTNINH.js → chunk-YD2VQEN5.js} +1 -1
- package/dist/{chunk-KUNDCAQN.js → chunk-YESGYUEL.js} +1 -1
- package/dist/{chunk-JJJTPEMD.js → chunk-YEVGLC5X.js} +1 -1
- package/dist/{chunk-GMTNOCMS.js → chunk-YFINLODF.js} +3 -3
- package/dist/{chunk-LZ3GZ7NS.js → chunk-YKL3BLWC.js} +1 -1
- package/dist/{chunk-5HPBQ6U5.js → chunk-YLXPYXQP.js} +1 -1
- package/dist/{chunk-7AALWJAO.js → chunk-YNDIZCD2.js} +1 -1
- package/dist/{chunk-6WZYX5RO.js → chunk-YPWHD3NL.js} +1 -1
- package/dist/{chunk-4HV6A6UH.js → chunk-YSAFHVV6.js} +1 -1
- package/dist/{chunk-AGOEROAI.js → chunk-YZMY2CTU.js} +1 -1
- package/dist/{chunk-S3P5WWJD.js → chunk-Z4AFEO36.js} +1 -1
- package/dist/{chunk-7MHANY34.js → chunk-Z5WPP6ME.js} +1 -1
- package/dist/chunk-Z65E4UAP.js +1 -0
- package/dist/{chunk-V2HCVJYF.js → chunk-ZDRIQC7O.js} +1 -1
- package/dist/{chunk-2CYVZUYT.js → chunk-ZH44BDUR.js} +1 -1
- package/dist/{chunk-SJMTETSU.js → chunk-ZL5LU4U2.js} +1 -1
- package/dist/{chunk-DQCIORGH.js → chunk-ZYX7UHCQ.js} +1 -1
- package/dist/{chunk-ACTDYTAV.js → chunk-ZZRFG6ME.js} +114 -114
- 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/doctor/instructions.js +1 -0
- package/dist/cli/commands/app/doctor.js +1 -0
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/list.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/status.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -0
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.js +1 -1
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/send-analytics.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/command-registry.js +1 -1
- package/dist/{conf-store-OAGJBITE.js → conf-store-ASDCTDQ4.js} +1 -1
- package/dist/configs/all.yml +60 -0
- package/dist/configs/recommended.yml +60 -0
- package/dist/data/filters.json +31 -2
- package/dist/data/setting.json +129 -4
- package/dist/data/shopify_system_translations.json +154 -13
- package/dist/{deprecations-K3NPRKBF.js → deprecations-VBQV7Q4O.js} +1 -1
- package/dist/dist-FZLOAKU7.js +1 -0
- package/dist/dist-HTY6UHG5.js +1 -0
- package/dist/environments-HSTNEQRG.js +1 -0
- package/dist/{error-YX56C43A.js → error-2LZYKRMA.js} +1 -1
- package/dist/error-handler-PIGEJ7BT.js +1 -0
- package/dist/{fs-SKHQZZTQ.js → fs-BJHNJDDK.js} +1 -1
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.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/index.js +14 -16
- package/dist/{is-global-V5VORI3F.js → is-global-6SCOAJVG.js} +1 -1
- package/dist/{local-GX5AN6ZS.js → local-PZWPRFU7.js} +1 -1
- package/dist/{metadata-XUJUTBTB.js → metadata-VVBHB3HL.js} +1 -1
- package/dist/{node-package-manager-3WIYU7Y3.js → node-package-manager-ETYQN7OM.js} +1 -1
- package/dist/notifications-system-652OG5KL.js +1 -0
- package/dist/os-7D6NT4O3.js +1 -0
- package/dist/{output-X47P6ICP.js → output-74VDGYJD.js} +1 -1
- package/dist/{prettier-RVUAAWC7.js → prettier-EGVCP5CY.js} +1 -1
- package/dist/{system-SR5G7WEW.js → system-P5QIJALL.js} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-VYWSLAQ6.js → ui-H5I5YVKV.js} +1 -1
- package/dist/upgrade-34HSYBXI.js +1 -0
- package/dist/version-EKXEAF6Q.js +1 -0
- package/dist/{version-FK4ETQ22.js → version-J2PYO6M5.js} +1 -1
- package/dist/{workerd-NAPS5TA7.js → workerd-X4TGHEG3.js} +1 -1
- package/oclif.manifest.json +903 -133
- package/package.json +9 -8
- package/dist/analytics-6LI5GLWS.js +0 -1
- package/dist/analytics-UNRIIG4Y.js +0 -1
- package/dist/chunk-5CYJG63I.js +0 -1
- package/dist/chunk-6PDR2IUL.js +0 -11
- package/dist/chunk-F5HCSUXC.js +0 -16
- package/dist/chunk-H5KWM27L.js +0 -1
- package/dist/chunk-NEMPLS7C.js +0 -1
- package/dist/chunk-OUZGGWFN.js +0 -1
- package/dist/chunk-PIFW2R3S.js +0 -1382
- package/dist/chunk-QRT4A2RV.js +0 -3
- package/dist/chunk-R2R6JDNH.js +0 -1
- package/dist/chunk-RZFBGBNA.js +0 -1
- package/dist/chunk-V5SC2RYQ.js +0 -2
- package/dist/chunk-VKSR6MJG.js +0 -2
- package/dist/chunk-XLURZ6GL.js +0 -559
- package/dist/chunk-Z5K4J7HQ.js +0 -1
- package/dist/chunk-ZO74GSWC.js +0 -5
- package/dist/chunk-ZSFAURIH.js +0 -3
- package/dist/dist-EXJEE23W.js +0 -1
- package/dist/dist-S62Z6IFV.js +0 -1
- package/dist/environments-ALH2N36U.js +0 -1
- package/dist/error-handler-FDCH72NH.js +0 -1
- package/dist/notifications-system-RHULO564.js +0 -1
- package/dist/os-M6X7KOR4.js +0 -1
- package/dist/upgrade-PFQ7JMXG.js +0 -1
- package/dist/version-U4GM2LNG.js +0 -1
- /package/dist/{chunk-NJPL5BTN.js → chunk-YLQ3LNNY.js} +0 -0
- /package/dist/{morph-77RHJICZ.js → morph-BMYYMQNX.js} +0 -0
package/dist/chunk-PIFW2R3S.js
DELETED
|
@@ -1,1382 +0,0 @@
|
|
|
1
|
-
import{a as kw,b as h4,c as m4}from"./chunk-F3TMLDLC.js";import{a as Iw}from"./chunk-IWOTLFOY.js";import{a as d4}from"./chunk-FFSDGRAN.js";import{Ba as p4,Ca as xw,l as ww}from"./chunk-YN6A26QL.js";import{q as Sw}from"./chunk-TR4OWSEX.js";import{a as ae,b as Ae,c as T,d as Xm,e as ia,f as Zm,g as y}from"./chunk-VKWPEFWQ.js";var tg=T(eg=>{"use strict";y();Object.defineProperty(eg,"__esModule",{value:!0});eg.deepGet=g4;function g4(t,e){return e.reduce((r,i)=>r?.[i],t)}});var Aw=T(rs=>{"use strict";y();Object.defineProperty(rs,"__esModule",{value:!0});rs.first=y4;rs.last=_4;rs.findLast=v4;rs.findLastIndex=rg;rs.findLastAndIndex=b4;function y4(t){return t[0]}function _4(t,e=0){return t[t.length-1+e]}function v4(t,e){return t[rg(t,e)]}function rg(t,e){for(let r=t.length-1;r>=0;r--)if(e(t[r]))return r;return-1}function b4(t,e){let r=rg(t,e);return[t[r],r]}});var Ew=T(($ie,Tw)=>{"use strict";y();var S4=kw();Tw.exports=function(e){return e!=null&&typeof e=="object"&&S4(e)===!1}});var ig=T((Gie,Ow)=>{"use strict";y();var w4=kw(),x4=Ew(),Hie=Array.prototype.slice;Ow.exports=na;function na(t,e){if(!(this instanceof na))return typeof e=="number"?new na(t).fromIndex(e):new na(t,e);this.str=t||"",this.lineToIndex=k4(this.str),e=e||{},this.origin=typeof e.origin>"u"?1:e.origin}na.prototype.fromIndex=function(t){if(t<0||t>=this.str.length||isNaN(t))return null;var e=I4(t,this.lineToIndex);return{line:e+this.origin,col:t-this.lineToIndex[e]+this.origin}};na.prototype.toIndex=function(t,e){if(typeof e>"u")return w4(t)&&t.length>=2?this.toIndex(t[0],t[1]):x4(t)&&"line"in t&&("col"in t||"column"in t)?this.toIndex(t.line,"col"in t?t.col:t.column):-1;if(isNaN(t)||isNaN(e))return-1;if(t-=this.origin,e-=this.origin,t>=0&&e>=0&&t<this.lineToIndex.length){var r=this.lineToIndex[t],i=t===this.lineToIndex.length-1?this.str.length:this.lineToIndex[t+1];if(e<i-r)return r+e}return-1};function k4(t){for(var e=t.split(`
|
|
2
|
-
`),r=new Array(e.length),i=0,n=0,s=e.length;n<s;n++)r[n]=i,i+=e[n].length+1;return r}function I4(t,e){if(t>=e[e.length-1])return e.length-1;for(var r=0,i=e.length-2,n;r<i;)if(n=r+(i-r>>1),t<e[n])i=n-1;else if(t>=e[n+1])r=n+1;else{r=n;break}return r}});var Lw=T(sa=>{"use strict";y();var A4=sa&&sa.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sa,"__esModule",{value:!0});sa.getPosition=T4;sa.getOffset=E4;var Nw=A4(ig());function T4(t,e){let r=(0,Nw.default)(t,{origin:0}).fromIndex(Math.min(e,t.length-1));return{index:e,line:r?r.line:-1,character:r?r.col:-1}}function E4(t,e,r){return(0,Nw.default)(t,{origin:1}).toIndex(e,r)}});var pl=T(fl=>{"use strict";y();Object.defineProperty(fl,"__esModule",{value:!0});fl.isError=N4;fl.asError=L4;var O4={1:"Invalid symbol found in the input.",2:"Invalid number format detected.",3:"Property name expected but not found.",4:"A value was expected but not found.",5:"Colon `:` expected after the property name.",6:"Comma `,` expected between elements and properties.",7:"Closing brace `}` expected.",8:"Closing bracket `]` expected.",9:"End of file expected.",10:"Invalid comment token found.",11:"Unexpected end of comment.",12:"Unexpected end of string.",13:"Unexpected end of number.",14:"Invalid Unicode escape sequence.",15:"Invalid escape character found.",16:"Invalid character found in the input."};function N4(t){return t instanceof Error}function L4(t){return t instanceof Error?t:typeof t=="string"?new Error(t):t&&typeof t=="object"&&"error"in t?new Error(P4(t)):t&&typeof t.toString=="function"?new Error(t.toString()):new Error("An unknown error occurred")}function P4(t){return O4[t.error]||"Unknown parse error."}});var sg=T(ng=>{"use strict";y();Object.defineProperty(ng,"__esModule",{value:!0});ng.assertNever=q4;function q4(t){throw new Error(`We should never reach this code, you are missing a case for ${t}`)}});var og=T(hl=>{"use strict";y();Object.defineProperty(hl,"__esModule",{value:!0});hl.memo=C4;hl.memoize=R4;var ag=Symbol("Unset");function C4(t){let e=ag,r=(...i)=>(e===ag&&(e=t(...i)),e);return r.clearCache=()=>{e=ag},r}function R4(t,e){let r={},i=(...n)=>{let s=e(...n);return r[s]||(r[s]=t(...n)),r[s]};return i.force=(...n)=>(i.invalidate(...n),i(...n)),i.invalidate=(...n)=>{let s=e(...n);delete r[s]},i.clearCache=()=>{r={}},i}});var cg=T(ug=>{"use strict";y();Object.defineProperty(ug,"__esModule",{value:!0});ug.indexBy=M4;function M4(t,e){let r={};for(let i of e)r[t(i)]=i;return r}});function is(t,e=!1){let r=t.length,i=0,n="",s=0,a=16,o=0,u=0,l=0,f=0,h=0;function p(w,_){let A=0,E=0;for(;A<w||!_;){let O=t.charCodeAt(i);if(O>=48&&O<=57)E=E*16+O-48;else if(O>=65&&O<=70)E=E*16+O-65+10;else if(O>=97&&O<=102)E=E*16+O-97+10;else break;i++,A++}return A<w&&(E=-1),E}function m(w){i=w,n="",s=0,a=16,h=0}function v(){let w=i;if(t.charCodeAt(i)===48)i++;else for(i++;i<t.length&&aa(t.charCodeAt(i));)i++;if(i<t.length&&t.charCodeAt(i)===46)if(i++,i<t.length&&aa(t.charCodeAt(i)))for(i++;i<t.length&&aa(t.charCodeAt(i));)i++;else return h=3,t.substring(w,i);let _=i;if(i<t.length&&(t.charCodeAt(i)===69||t.charCodeAt(i)===101))if(i++,(i<t.length&&t.charCodeAt(i)===43||t.charCodeAt(i)===45)&&i++,i<t.length&&aa(t.charCodeAt(i))){for(i++;i<t.length&&aa(t.charCodeAt(i));)i++;_=i}else h=3;return t.substring(w,_)}function S(){let w="",_=i;for(;;){if(i>=r){w+=t.substring(_,i),h=2;break}let A=t.charCodeAt(i);if(A===34){w+=t.substring(_,i),i++;break}if(A===92){if(w+=t.substring(_,i),i++,i>=r){h=2;break}switch(t.charCodeAt(i++)){case 34:w+='"';break;case 92:w+="\\";break;case 47:w+="/";break;case 98:w+="\b";break;case 102:w+="\f";break;case 110:w+=`
|
|
3
|
-
`;break;case 114:w+="\r";break;case 116:w+=" ";break;case 117:let O=p(4,!0);O>=0?w+=String.fromCharCode(O):h=4;break;default:h=5}_=i;continue}if(A>=0&&A<=31)if(qo(A)){w+=t.substring(_,i),h=2;break}else h=6;i++}return w}function b(){if(n="",h=0,s=i,u=o,f=l,i>=r)return s=r,a=17;let w=t.charCodeAt(i);if(lg(w)){do i++,n+=String.fromCharCode(w),w=t.charCodeAt(i);while(lg(w));return a=15}if(qo(w))return i++,n+=String.fromCharCode(w),w===13&&t.charCodeAt(i)===10&&(i++,n+=`
|
|
4
|
-
`),o++,l=i,a=14;switch(w){case 123:return i++,a=1;case 125:return i++,a=2;case 91:return i++,a=3;case 93:return i++,a=4;case 58:return i++,a=6;case 44:return i++,a=5;case 34:return i++,n=S(),a=10;case 47:let _=i-1;if(t.charCodeAt(i+1)===47){for(i+=2;i<r&&!qo(t.charCodeAt(i));)i++;return n=t.substring(_,i),a=12}if(t.charCodeAt(i+1)===42){i+=2;let A=r-1,E=!1;for(;i<A;){let O=t.charCodeAt(i);if(O===42&&t.charCodeAt(i+1)===47){i+=2,E=!0;break}i++,qo(O)&&(O===13&&t.charCodeAt(i)===10&&i++,o++,l=i)}return E||(i++,h=1),n=t.substring(_,i),a=13}return n+=String.fromCharCode(w),i++,a=16;case 45:if(n+=String.fromCharCode(w),i++,i===r||!aa(t.charCodeAt(i)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return n+=v(),a=11;default:for(;i<r&&g(w);)i++,w=t.charCodeAt(i);if(s!==i){switch(n=t.substring(s,i),n){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return n+=String.fromCharCode(w),i++,a=16}}function g(w){if(lg(w)||qo(w))return!1;switch(w){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function k(){let w;do w=b();while(w>=12&&w<=15);return w}return{setPosition:m,getPosition:()=>i,scan:e?k:b,getToken:()=>a,getTokenValue:()=>n,getTokenOffset:()=>s,getTokenLength:()=>i-s,getTokenStartLine:()=>u,getTokenStartCharacter:()=>s-f,getTokenError:()=>h}}function lg(t){return t===32||t===9}function qo(t){return t===10||t===13}function aa(t){return t>=48&&t<=57}var Pw,dl=Ae(()=>{"use strict";y();(function(t){t[t.lineFeed=10]="lineFeed",t[t.carriageReturn=13]="carriageReturn",t[t.space=32]="space",t[t._0=48]="_0",t[t._1=49]="_1",t[t._2=50]="_2",t[t._3=51]="_3",t[t._4=52]="_4",t[t._5=53]="_5",t[t._6=54]="_6",t[t._7=55]="_7",t[t._8=56]="_8",t[t._9=57]="_9",t[t.a=97]="a",t[t.b=98]="b",t[t.c=99]="c",t[t.d=100]="d",t[t.e=101]="e",t[t.f=102]="f",t[t.g=103]="g",t[t.h=104]="h",t[t.i=105]="i",t[t.j=106]="j",t[t.k=107]="k",t[t.l=108]="l",t[t.m=109]="m",t[t.n=110]="n",t[t.o=111]="o",t[t.p=112]="p",t[t.q=113]="q",t[t.r=114]="r",t[t.s=115]="s",t[t.t=116]="t",t[t.u=117]="u",t[t.v=118]="v",t[t.w=119]="w",t[t.x=120]="x",t[t.y=121]="y",t[t.z=122]="z",t[t.A=65]="A",t[t.B=66]="B",t[t.C=67]="C",t[t.D=68]="D",t[t.E=69]="E",t[t.F=70]="F",t[t.G=71]="G",t[t.H=72]="H",t[t.I=73]="I",t[t.J=74]="J",t[t.K=75]="K",t[t.L=76]="L",t[t.M=77]="M",t[t.N=78]="N",t[t.O=79]="O",t[t.P=80]="P",t[t.Q=81]="Q",t[t.R=82]="R",t[t.S=83]="S",t[t.T=84]="T",t[t.U=85]="U",t[t.V=86]="V",t[t.W=87]="W",t[t.X=88]="X",t[t.Y=89]="Y",t[t.Z=90]="Z",t[t.asterisk=42]="asterisk",t[t.backslash=92]="backslash",t[t.closeBrace=125]="closeBrace",t[t.closeBracket=93]="closeBracket",t[t.colon=58]="colon",t[t.comma=44]="comma",t[t.dot=46]="dot",t[t.doubleQuote=34]="doubleQuote",t[t.minus=45]="minus",t[t.openBrace=123]="openBrace",t[t.openBracket=91]="openBracket",t[t.plus=43]="plus",t[t.slash=47]="slash",t[t.formFeed=12]="formFeed",t[t.tab=9]="tab"})(Pw||(Pw={}))});var Or,oa,fg,qw,Cw=Ae(()=>{y();Or=new Array(20).fill(0).map((t,e)=>" ".repeat(e)),oa=200,fg={" ":{"\n":new Array(oa).fill(0).map((t,e)=>`
|
|
5
|
-
`+" ".repeat(e)),"\r":new Array(oa).fill(0).map((t,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(oa).fill(0).map((t,e)=>`\r
|
|
6
|
-
`+" ".repeat(e))}," ":{"\n":new Array(oa).fill(0).map((t,e)=>`
|
|
7
|
-
`+" ".repeat(e)),"\r":new Array(oa).fill(0).map((t,e)=>"\r"+" ".repeat(e)),"\r\n":new Array(oa).fill(0).map((t,e)=>`\r
|
|
8
|
-
`+" ".repeat(e))}},qw=[`
|
|
9
|
-
`,"\r",`\r
|
|
10
|
-
`]});function ml(t,e,r){let i,n,s,a,o;if(e){for(a=e.offset,o=a+e.length,s=a;s>0&&!Co(t,s-1);)s--;let A=o;for(;A<t.length&&!Co(t,A);)A++;n=t.substring(s,A),i=F4(n,r)}else n=t,i=0,s=0,a=0,o=t.length;let u=j4(r,t),l=qw.includes(u),f=0,h=0,p;r.insertSpaces?p=Or[r.tabSize||4]??ua(Or[1],r.tabSize||4):p=" ";let m=p===" "?" ":" ",v=is(n,!1),S=!1;function b(){if(f>1)return ua(u,f)+ua(p,i+h);let A=p.length*(i+h);return!l||A>fg[m][u].length?u+ua(p,i+h):A<=0?u:fg[m][u][A]}function g(){let A=v.scan();for(f=0;A===15||A===14;)A===14&&r.keepLines?f+=1:A===14&&(f=1),A=v.scan();return S=A===16||v.getTokenError()!==0,A}let k=[];function w(A,E,O){!S&&(!e||E<o&&O>a)&&t.substring(E,O)!==A&&k.push({offset:E,length:O-E,content:A})}let _=g();if(r.keepLines&&f>0&&w(ua(u,f),0,0),_!==17){let A=v.getTokenOffset()+s,E=p.length*i<20&&r.insertSpaces?Or[p.length*i]:ua(p,i);w(E,s,A)}for(;_!==17;){let A=v.getTokenOffset()+v.getTokenLength()+s,E=g(),O="",L=!1;for(;f===0&&(E===12||E===13);){let R=v.getTokenOffset()+s;w(Or[1],A,R),A=v.getTokenOffset()+v.getTokenLength()+s,L=E===12,O=L?b():"",E=g()}if(E===2)_!==1&&h--,r.keepLines&&f>0||!r.keepLines&&_!==1?O=b():r.keepLines&&(O=Or[1]);else if(E===4)_!==3&&h--,r.keepLines&&f>0||!r.keepLines&&_!==3?O=b():r.keepLines&&(O=Or[1]);else{switch(_){case 3:case 1:h++,r.keepLines&&f>0||!r.keepLines?O=b():O=Or[1];break;case 5:r.keepLines&&f>0||!r.keepLines?O=b():O=Or[1];break;case 12:O=b();break;case 13:f>0?O=b():L||(O=Or[1]);break;case 6:r.keepLines&&f>0?O=b():L||(O=Or[1]);break;case 10:r.keepLines&&f>0?O=b():E===6&&!L&&(O="");break;case 7:case 8:case 9:case 11:case 2:case 4:r.keepLines&&f>0?O=b():(E===12||E===13)&&!L?O=Or[1]:E!==5&&E!==17&&(S=!0);break;case 16:S=!0;break}f>0&&(E===12||E===13)&&(O=b())}E===17&&(r.keepLines&&f>0?O=b():O=r.insertFinalNewline?u:"");let B=v.getTokenOffset()+s;w(O,A,B),_=E}return k}function ua(t,e){let r="";for(let i=0;i<e;i++)r+=t;return r}function F4(t,e){let r=0,i=0,n=e.tabSize||4;for(;r<t.length;){let s=t.charAt(r);if(s===Or[1])i++;else if(s===" ")i+=n;else break;r++}return Math.floor(i/n)}function j4(t,e){for(let r=0;r<e.length;r++){let i=e.charAt(r);if(i==="\r")return r+1<e.length&&e.charAt(r+1)===`
|
|
11
|
-
`?`\r
|
|
12
|
-
`:"\r";if(i===`
|
|
13
|
-
`)return`
|
|
14
|
-
`}return t&&t.eol||`
|
|
15
|
-
`}function Co(t,e){return`\r
|
|
16
|
-
`.indexOf(t.charAt(e))!==-1}var pg=Ae(()=>{"use strict";y();dl();Cw()});function Rw(t,e){let r=[],i=new Object,n,s={value:{},offset:0,length:0,type:"object",parent:void 0},a=!1;function o(u,l,f,h){s.value=u,s.offset=l,s.length=f,s.type=h,s.colonOffset=void 0,n=s}try{Do(t,{onObjectBegin:(u,l)=>{if(e<=u)throw i;n=void 0,a=e>u,r.push("")},onObjectProperty:(u,l,f)=>{if(e<l||(o(u,l,f,"property"),r[r.length-1]=u,e<=l+f))throw i},onObjectEnd:(u,l)=>{if(e<=u)throw i;n=void 0,r.pop()},onArrayBegin:(u,l)=>{if(e<=u)throw i;n=void 0,r.push(0)},onArrayEnd:(u,l)=>{if(e<=u)throw i;n=void 0,r.pop()},onLiteralValue:(u,l,f)=>{if(e<l||(o(u,l,f,Fw(u)),e<=l+f))throw i},onSeparator:(u,l,f)=>{if(e<=l)throw i;if(u===":"&&n&&n.type==="property")n.colonOffset=l,a=!1,n=void 0;else if(u===","){let h=r[r.length-1];typeof h=="number"?r[r.length-1]=h+1:(a=!0,r[r.length-1]=""),n=void 0}}})}catch(u){if(u!==i)throw u}return{path:r,previousNode:n,isAtPropertyKey:a,matches:u=>{let l=0;for(let f=0;l<u.length&&f<r.length;f++)if(u[l]===r[f]||u[l]==="*")l++;else if(u[l]!=="**")return!1;return l===u.length}}}function Mw(t,e=[],r=Ro.DEFAULT){let i=null,n=[],s=[];function a(u){Array.isArray(n)?n.push(u):i!==null&&(n[i]=u)}return Do(t,{onObjectBegin:()=>{let u={};a(u),s.push(n),n=u,i=null},onObjectProperty:u=>{i=u},onObjectEnd:()=>{n=s.pop()},onArrayBegin:()=>{let u=[];a(u),s.push(n),n=u,i=null},onArrayEnd:()=>{n=s.pop()},onLiteralValue:a,onError:(u,l,f)=>{e.push({error:u,offset:l,length:f})}},r),n[0]}function yl(t,e=[],r=Ro.DEFAULT){let i={type:"array",offset:-1,length:-1,children:[],parent:void 0};function n(u){i.type==="property"&&(i.length=u-i.offset,i=i.parent)}function s(u){return i.children.push(u),u}Do(t,{onObjectBegin:u=>{i=s({type:"object",offset:u,length:-1,parent:i,children:[]})},onObjectProperty:(u,l,f)=>{i=s({type:"property",offset:l,length:-1,parent:i,children:[]}),i.children.push({type:"string",value:u,offset:l,length:f,parent:i})},onObjectEnd:(u,l)=>{n(u+l),i.length=u+l-i.offset,i=i.parent,n(u+l)},onArrayBegin:(u,l)=>{i=s({type:"array",offset:u,length:-1,parent:i,children:[]})},onArrayEnd:(u,l)=>{i.length=u+l-i.offset,i=i.parent,n(u+l)},onLiteralValue:(u,l,f)=>{s({type:Fw(u),offset:l,length:f,parent:i,value:u}),n(l+f)},onSeparator:(u,l,f)=>{i.type==="property"&&(u===":"?i.colonOffset=l:u===","&&n(l))},onError:(u,l,f)=>{e.push({error:u,offset:l,length:f})}},r);let o=i.children[0];return o&&delete o.parent,o}function Mo(t,e){if(!t)return;let r=t;for(let i of e)if(typeof i=="string"){if(r.type!=="object"||!Array.isArray(r.children))return;let n=!1;for(let s of r.children)if(Array.isArray(s.children)&&s.children[0].value===i&&s.children.length===2){r=s.children[1],n=!0;break}if(!n)return}else{let n=i;if(r.type!=="array"||n<0||!Array.isArray(r.children)||n>=r.children.length)return;r=r.children[n]}return r}function hg(t){if(!t.parent||!t.parent.children)return[];let e=hg(t.parent);if(t.parent.type==="property"){let r=t.parent.children[0].value;e.push(r)}else if(t.parent.type==="array"){let r=t.parent.children.indexOf(t);r!==-1&&e.push(r)}return e}function gl(t){switch(t.type){case"array":return t.children.map(gl);case"object":let e=Object.create(null);for(let r of t.children){let i=r.children[1];i&&(e[r.children[0].value]=gl(i))}return e;case"null":case"string":case"number":case"boolean":return t.value;default:return}}function V4(t,e,r=!1){return e>=t.offset&&e<t.offset+t.length||r&&e===t.offset+t.length}function dg(t,e,r=!1){if(V4(t,e,r)){let i=t.children;if(Array.isArray(i))for(let n=0;n<i.length&&i[n].offset<=e;n++){let s=dg(i[n],e,r);if(s)return s}return t}}function Do(t,e,r=Ro.DEFAULT){let i=is(t,!1),n=[],s=0;function a(V){return V?()=>s===0&&V(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter()):()=>!0}function o(V){return V?C=>s===0&&V(C,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter()):()=>!0}function u(V){return V?C=>s===0&&V(C,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter(),()=>n.slice()):()=>!0}function l(V){return V?()=>{s>0?s++:V(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter(),()=>n.slice())===!1&&(s=1)}:()=>!0}function f(V){return V?()=>{s>0&&s--,s===0&&V(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter())}:()=>!0}let h=l(e.onObjectBegin),p=u(e.onObjectProperty),m=f(e.onObjectEnd),v=l(e.onArrayBegin),S=f(e.onArrayEnd),b=u(e.onLiteralValue),g=o(e.onSeparator),k=a(e.onComment),w=o(e.onError),_=r&&r.disallowComments,A=r&&r.allowTrailingComma;function E(){for(;;){let V=i.scan();switch(i.getTokenError()){case 4:O(14);break;case 5:O(15);break;case 3:O(13);break;case 1:_||O(11);break;case 2:O(12);break;case 6:O(16);break}switch(V){case 12:case 13:_?O(10):k();break;case 16:O(1);break;case 15:case 14:break;default:return V}}}function O(V,C=[],F=[]){if(w(V),C.length+F.length>0){let U=i.getToken();for(;U!==17;){if(C.indexOf(U)!==-1){E();break}else if(F.indexOf(U)!==-1)break;U=E()}}}function L(V){let C=i.getTokenValue();return V?b(C):(p(C),n.push(C)),E(),!0}function B(){switch(i.getToken()){case 11:let V=i.getTokenValue(),C=Number(V);isNaN(C)&&(O(2),C=0),b(C);break;case 7:b(null);break;case 8:b(!0);break;case 9:b(!1);break;default:return!1}return E(),!0}function R(){return i.getToken()!==10?(O(3,[],[2,5]),!1):(L(!1),i.getToken()===6?(g(":"),E(),$()||O(4,[],[2,5])):O(5,[],[2,5]),n.pop(),!0)}function q(){h(),E();let V=!1;for(;i.getToken()!==2&&i.getToken()!==17;){if(i.getToken()===5){if(V||O(4,[],[]),g(","),E(),i.getToken()===2&&A)break}else V&&O(6,[],[]);R()||O(4,[],[2,5]),V=!0}return m(),i.getToken()!==2?O(7,[2],[]):E(),!0}function P(){v(),E();let V=!0,C=!1;for(;i.getToken()!==4&&i.getToken()!==17;){if(i.getToken()===5){if(C||O(4,[],[]),g(","),E(),i.getToken()===4&&A)break}else C&&O(6,[],[]);V?(n.push(0),V=!1):n[n.length-1]++,$()||O(4,[],[4,5]),C=!0}return S(),V||n.pop(),i.getToken()!==4?O(8,[4],[]):E(),!0}function $(){switch(i.getToken()){case 3:return P();case 1:return q();case 10:return L(!0);default:return B()}}return E(),i.getToken()===17?r.allowEmptyContent?!0:(O(4,[],[]),!1):$()?(i.getToken()!==17&&O(9,[],[]),!0):(O(4,[],[]),!1)}function Dw(t,e){let r=is(t),i=[],n,s=0,a;do switch(a=r.getPosition(),n=r.scan(),n){case 12:case 13:case 17:s!==a&&i.push(t.substring(s,a)),e!==void 0&&i.push(r.getTokenValue().replace(/[^\r\n]/g,e)),s=r.getPosition();break}while(n!==17);return i.join("")}function Fw(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(t){if(Array.isArray(t))return"array"}else return"null";return"object"}default:return"null"}}var Ro,mg=Ae(()=>{"use strict";y();dl();(function(t){t.DEFAULT={allowTrailingComma:!1}})(Ro||(Ro={}))});function jw(t,e,r,i){let n=e.slice(),a=yl(t,[]),o,u;for(;n.length>0&&(u=n.pop(),o=Mo(a,n),o===void 0&&r!==void 0);)typeof u=="string"?r={[u]:r}:r=[r];if(o)if(o.type==="object"&&typeof u=="string"&&Array.isArray(o.children)){let l=Mo(o,[u]);if(l!==void 0)if(r===void 0){if(!l.parent)throw new Error("Malformed AST");let f=o.children.indexOf(l.parent),h,p=l.parent.offset+l.parent.length;if(f>0){let m=o.children[f-1];h=m.offset+m.length}else h=o.offset+1,o.children.length>1&&(p=o.children[1].offset);return ns(t,{offset:h,length:p-h,content:""},i)}else return ns(t,{offset:l.offset,length:l.length,content:JSON.stringify(r)},i);else{if(r===void 0)return[];let f=`${JSON.stringify(u)}: ${JSON.stringify(r)}`,h=i.getInsertionIndex?i.getInsertionIndex(o.children.map(m=>m.children[0].value)):o.children.length,p;if(h>0){let m=o.children[h-1];p={offset:m.offset+m.length,length:0,content:","+f}}else o.children.length===0?p={offset:o.offset+1,length:0,content:f}:p={offset:o.offset+1,length:0,content:f+","};return ns(t,p,i)}}else if(o.type==="array"&&typeof u=="number"&&Array.isArray(o.children)){let l=u;if(l===-1){let f=`${JSON.stringify(r)}`,h;if(o.children.length===0)h={offset:o.offset+1,length:0,content:f};else{let p=o.children[o.children.length-1];h={offset:p.offset+p.length,length:0,content:","+f}}return ns(t,h,i)}else if(r===void 0&&o.children.length>=0){let f=u,h=o.children[f],p;if(o.children.length===1)p={offset:o.offset+1,length:o.length-2,content:""};else if(o.children.length-1===f){let m=o.children[f-1],v=m.offset+m.length,S=o.offset+o.length;p={offset:v,length:S-2-v,content:""}}else p={offset:h.offset,length:o.children[f+1].offset-h.offset,content:""};return ns(t,p,i)}else if(r!==void 0){let f,h=`${JSON.stringify(r)}`;if(!i.isArrayInsertion&&o.children.length>u){let p=o.children[u];f={offset:p.offset,length:p.length,content:h}}else if(o.children.length===0||u===0)f={offset:o.offset+1,length:0,content:o.children.length===0?h:h+","};else{let p=u>o.children.length?o.children.length:u,m=o.children[p-1];f={offset:m.offset+m.length,length:0,content:","+h}}return ns(t,f,i)}else throw new Error(`Can not ${r===void 0?"remove":i.isArrayInsertion?"insert":"modify"} Array index ${l} as length is not sufficient`)}else throw new Error(`Can not add ${typeof u!="number"?"index":"property"} to parent of type ${o.type}`);else{if(r===void 0)throw new Error("Can not delete in empty document");return ns(t,{offset:a?a.offset:0,length:a?a.length:0,content:JSON.stringify(r)},i)}}function ns(t,e,r){if(!r.formattingOptions)return[e];let i=_l(t,e),n=e.offset,s=e.offset+e.content.length;if(e.length===0||e.content.length===0){for(;n>0&&!Co(i,n-1);)n--;for(;s<i.length&&!Co(i,s);)s++}let a=ml(i,{offset:n,length:s-n},{...r.formattingOptions,keepLines:!1});for(let u=a.length-1;u>=0;u--){let l=a[u];i=_l(i,l),n=Math.min(n,l.offset),s=Math.max(s,l.offset+l.length),s+=l.content.length-l.length}let o=t.length-(i.length-s)-n;return[{offset:n,length:o,content:i.substring(n,s)}]}function _l(t,e){return t.substring(0,e.offset)+e.content+t.substring(e.offset+e.length)}var Bw=Ae(()=>{"use strict";y();pg();mg()});var ca={};Xm(ca,{ParseErrorCode:()=>_g,ScanError:()=>gg,SyntaxKind:()=>yg,applyEdits:()=>Y4,createScanner:()=>Nr,findNodeAtLocation:()=>W4,findNodeAtOffset:()=>bg,format:()=>xg,getLocation:()=>H4,getNodePath:()=>Sg,getNodeValue:()=>wg,modify:()=>Q4,parse:()=>vg,parseTree:()=>G4,printParseErrorCode:()=>K4,stripComments:()=>J4,visit:()=>z4});function K4(t){switch(t){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}function xg(t,e,r){return ml(t,e,r)}function Q4(t,e,r,i){return jw(t,e,r,i)}function Y4(t,e){let r=e.slice(0).sort((n,s)=>{let a=n.offset-s.offset;return a===0?n.length-s.length:a}),i=t.length;for(let n=r.length-1;n>=0;n--){let s=r[n];if(s.offset+s.length<=i)t=_l(t,s);else throw new Error("Overlapping edit");i=s.offset}return t}var Nr,gg,yg,H4,vg,G4,W4,bg,Sg,wg,z4,J4,_g,xi=Ae(()=>{"use strict";y();pg();Bw();dl();mg();Nr=is;(function(t){t[t.None=0]="None",t[t.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=2]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",t[t.InvalidUnicode=4]="InvalidUnicode",t[t.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",t[t.InvalidCharacter=6]="InvalidCharacter"})(gg||(gg={}));(function(t){t[t.OpenBraceToken=1]="OpenBraceToken",t[t.CloseBraceToken=2]="CloseBraceToken",t[t.OpenBracketToken=3]="OpenBracketToken",t[t.CloseBracketToken=4]="CloseBracketToken",t[t.CommaToken=5]="CommaToken",t[t.ColonToken=6]="ColonToken",t[t.NullKeyword=7]="NullKeyword",t[t.TrueKeyword=8]="TrueKeyword",t[t.FalseKeyword=9]="FalseKeyword",t[t.StringLiteral=10]="StringLiteral",t[t.NumericLiteral=11]="NumericLiteral",t[t.LineCommentTrivia=12]="LineCommentTrivia",t[t.BlockCommentTrivia=13]="BlockCommentTrivia",t[t.LineBreakTrivia=14]="LineBreakTrivia",t[t.Trivia=15]="Trivia",t[t.Unknown=16]="Unknown",t[t.EOF=17]="EOF"})(yg||(yg={}));H4=Rw,vg=Mw,G4=yl,W4=Mo,bg=dg,Sg=hg,wg=gl,z4=Do,J4=Dw;(function(t){t[t.InvalidSymbol=1]="InvalidSymbol",t[t.InvalidNumberFormat=2]="InvalidNumberFormat",t[t.PropertyNameExpected=3]="PropertyNameExpected",t[t.ValueExpected=4]="ValueExpected",t[t.ColonExpected=5]="ColonExpected",t[t.CommaExpected=6]="CommaExpected",t[t.CloseBraceExpected=7]="CloseBraceExpected",t[t.CloseBracketExpected=8]="CloseBracketExpected",t[t.EndOfFileExpected=9]="EndOfFileExpected",t[t.InvalidCommentToken=10]="InvalidCommentToken",t[t.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=12]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",t[t.InvalidUnicode=14]="InvalidUnicode",t[t.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",t[t.InvalidCharacter=16]="InvalidCharacter"})(_g||(_g={}))});var ze=T(la=>{"use strict";y();Object.defineProperty(la,"__esModule",{value:!0});la.parseJSON=t3;la.nodeAtPath=r3;la.getLocStart=i3;la.getLocEnd=n3;var X4=(xi(),Zm(ca)),Z4=Ce(),e3={disallowComments:!1,allowTrailingComma:!0,allowEmptyContent:!1};function t3(t,e,r){try{let i=[],n=(0,X4.parse)(t,i,e3);if(i.length&&r)throw i[0];return n}catch(i){return e!==void 0?e:(0,Z4.asError)(i)}}function r3(t,e){return e.reduce((r,i)=>{if(r)switch(r.type){case"Object":{let n=r.children.find(s=>s.key.value===i);return n?n.value:void 0}case"Array":return r.children[i];case"Literal":return;case"Identifier":return;case"Property":return}},t)}function i3(t){return t.loc?.start.offset??0}function n3(t){return t.loc?.end.offset??0}});var $w=T((ss,Vw)=>{y();var Fo=ww(),s3=Fo.default||Fo,vl=function(t,e){return/^\/\//.test(t)&&(t="https:"+t),s3.call(this,t,e)};vl.ponyfill=!0;Vw.exports=ss=vl;ss.fetch=vl;ss.Headers=Fo.Headers;ss.Request=Fo.Request;ss.Response=Fo.Response;ss.default=vl});var ki=T(as=>{"use strict";y();Object.defineProperty(as,"__esModule",{value:!0});as.doesFileExist=Uw;as.doesFileExceedThreshold=Hw;as.getFileSize=Gw;as.hasRemoteAssetSizeExceededThreshold=o3;as.hasLocalAssetSizeExceededThreshold=u3;var a3=$w();async function Uw(t,e){let r=t.toUri(e);return await t.fileExists(r)}async function Hw(t,e,r){let i=t.toUri(e);if(!t.fileSize)return[!1,0];let n=await t.fileSize(i);return[n>r,n]}async function Gw(t){try{let e=await(0,a3.fetch)(t,{method:"HEAD"});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);let r=e.headers.get("Content-Length");return r===null?0:parseFloat(r)}catch{return 0}}async function o3(t,e){return await Gw(t)>e}async function u3(t,e,r){if(!await Uw(t,e))return!1;let[n,s]=await Hw(t,e,r);return n}});var Yw=T(mn=>{"use strict";y();Object.defineProperty(mn,"__esModule",{value:!0});mn.getBlocks=zw;mn.isInvalidPresetBlock=Jw;mn.isInvalidDefaultBlock=l3;mn.validateNestedBlocks=Kw;mn.reportWarning=Ig;mn.validateBlockFileExistence=Qw;var kg=ze(),c3=ki();function zw(t){let e=[],r=[],i={},n=[],s=t.blocks,a=t.presets;function o(f,h){if(!f)return;"name"in f?r.push({node:f,path:["blocks",String(h),"type"]}):f.type!=="@app"&&e.push({node:f,path:["blocks",String(h),"type"]})}function u(f,h,p=0){f&&(i[p]||(i[p]=[]),i[p].push({node:f,path:h.concat("type")}),"blocks"in f&&(Array.isArray(f.blocks)?f.blocks.forEach((m,v)=>{u(m,h.concat("blocks",String(v)),p+1)}):typeof f.blocks=="object"&&f.blocks!==null&&Object.entries(f.blocks).forEach(([m,v])=>{u(v,h.concat("blocks",m),p+1)})))}function l(f,h){"name"in f&&n.push({node:f,path:["default","blocks",String(h),"type"]})}return Array.isArray(s)&&s.forEach((f,h)=>{o(f,h)}),a&&a.forEach((f,h)=>{"blocks"in f&&f.blocks&&(Array.isArray(f.blocks)?f.blocks.forEach((p,m)=>{u(p,["presets",String(h),"blocks",String(m)],0)}):typeof f.blocks=="object"&&Object.entries(f.blocks).forEach(([p,m])=>{u(m,["presets",String(h),"blocks",p],0)}))}),"default"in t&&t.default?.blocks?.forEach((f,h)=>{l(f,h)}),{rootLevelThemeBlocks:e,rootLevelLocalBlocks:r,presetLevelBlocks:i,defaultLevelBlocks:n,hasRootBlocksDeclaration:Array.isArray(s)}}function Jw(t,e,r,i,n=!0){if(e.static)return!i.some(l=>l.type===e.type&&l.id===t);let s=e.type.startsWith("_");if(s&&!n)return!1;let a=r.some(l=>l.node.type==="@theme"),o=s||!a;return!r.some(l=>l.node.type===e.type)&&o}function l3(t,e,r=!0){let i=t.type.startsWith("_");if(i&&!r)return!1;let n=e.some(o=>o.node.type==="@theme"),s=i||!n;return!e.some(o=>o.node.type===t.type)&&s}async function Ww(t,e,r,i,n,s,a,o,u=[]){let l=(0,kg.nodeAtPath)(o,e),f="id"in t?t.id:e.at(-2);if(l){if(Jw(f,t,n,u)){let p=!!t.static,m=t.type.startsWith("_"),v=p?`Could not find a static block of type "${t.type}" with id "${f}" in "blocks/${i.type}.liquid".`:m?`Private block type "${t.type}" is not allowed in "${i.type}" blocks.`:`Block type "${t.type}" is not allowed in "${i.type}" blocks. Allowed types are: ${s.join(", ")}.`;Ig(v,a,l,r)}await Qw(t.type,r)||Ig(`Theme block 'blocks/${t.type}.liquid' does not exist.`,a,l,r)}"blocks"in t&&t.blocks&&Kw(r,t,t.blocks,e.slice(0,-1),a,o)}async function Kw(t,e,r,i,n,s){if(!r)return;let a=await t.getBlockSchema?.(e.type);if(!a||a instanceof Error)return;let{validSchema:o,staticBlockDefs:u}=a;if(!o||o instanceof Error)return;let{rootLevelThemeBlocks:l}=zw(o),f=l.map(h=>h.node.type);Array.isArray(r)?Promise.all(r.map((h,p)=>{let m=i.concat(["blocks",String(p),"type"]);return Ww(h,m,t,e,l,f,n,s,u)})):typeof r=="object"&&Promise.all(Object.entries(r).map(([h,p])=>{let m=i.concat(["blocks",h,"type"]);return Ww(p,m,t,e,l,f,n,s,u)}))}function Ig(t,e,r,i){i.report({message:t,startIndex:e+(0,kg.getLocStart)(r),endIndex:e+(0,kg.getLocEnd)(r)})}async function Qw(t,e){if(t==="@theme"||t==="@app")return!0;let r=`blocks/${t}.liquid`;return await(0,c3.doesFileExist)(e,r)}});var Bx=T(Wi=>{"use strict";y();Object.defineProperty(Wi,"__esModule",{value:!0});function ar(t){let e=t||"";return function(){throw new Error("this method "+e+" is abstract! (it has no implementation in class "+this.constructor.name+")")}}function sr(t,e){if(!t)throw new Error(e||"Assertion failed")}function Og(t,e,r){let i;Object.defineProperty(t,e,{get(){return i||(i=r.call(this)),i}})}function f3(t){return t&&Object.assign({},t)}function yx(t,e){let r=[];for(;e-- >0;)r.push(t());return r}function _x(t,e){return new Array(e+1).join(t)}function Al(t,e){return yx(()=>t,e)}function Ng(t){let e=[];for(let r=0;r<t.length;r++){let i=t[r];t.lastIndexOf(i)!==r&&e.indexOf(i)<0&&e.push(i)}return e}function vx(t){let e=[];return t.forEach(r=>{e.indexOf(r)<0&&e.push(r)}),e}function os(t){let e=t[0];return e===e.toUpperCase()}function bx(t){return!os(t)}function Sx(t,e,r){let i=r||" ";return t.length<e?_x(i,e-t.length)+t:t}function ls(){this.strings=[]}ls.prototype.append=function(t){this.strings.push(t)};ls.prototype.contents=function(){return this.strings.join("")};var Ag=t=>String.fromCodePoint(parseInt(t,16));function wx(t){if(t.charAt(0)==="\\")switch(t.charAt(1)){case"b":return"\b";case"f":return"\f";case"n":return`
|
|
17
|
-
`;case"r":return"\r";case"t":return" ";case"v":return"\v";case"x":return Ag(t.slice(2,4));case"u":return t.charAt(2)==="{"?Ag(t.slice(3,-1)):Ag(t.slice(2,6));default:return t.charAt(1)}else return t}function Ug(t){if(t==null)return String(t);let e=Object.prototype.toString.call(t);try{let r;return t.constructor&&t.constructor.name?r=t.constructor.name:e.indexOf("[object ")===0?r=e.slice(8,-1):r=typeof t,r+": "+JSON.stringify(String(t))}catch{return e}}function xx(t,e="unexpected null value"){if(t==null)throw new Error(e);return t}var p3=Object.freeze({__proto__:null,abstract:ar,assert:sr,defineLazyProperty:Og,clone:f3,repeatFn:yx,repeatStr:_x,repeat:Al,getDuplicates:Ng,copyWithoutDuplicates:vx,isSyntactic:os,isLexical:bx,padLeft:Sx,StringBuffer:ls,unescapeCodePoint:wx,unexpectedObjToString:Ug,checkNotNull:xx});function h3(t){let e=0;return t.map(i=>{let n=i.toString();return e=Math.max(e,n.length),n}).map(i=>Sx(i,e))}function Xw(t,e,r){let i=t.length,n=t.slice(0,r),s=t.slice(r+e.length);return(n+e+s).substr(0,i)}function d3(...t){let e=this,{offset:r}=e,{repeatStr:i}=p3,n=new ls;n.append("Line "+e.lineNum+", col "+e.colNum+`:
|
|
18
|
-
`);let s=h3([e.prevLine==null?0:e.lineNum-1,e.lineNum,e.nextLine==null?0:e.lineNum+1]),a=(f,h,p)=>{n.append(p+s[f]+" | "+h+`
|
|
19
|
-
`)};e.prevLine!=null&&a(0,e.prevLine," "),a(1,e.line,"> ");let o=e.line.length,u=i(" ",o+1);for(let f=0;f<t.length;++f){let h=t[f][0],p=t[f][1];sr(h>=0&&h<=p,"range start must be >= 0 and <= end");let m=r-e.colNum+1;h=Math.max(0,h-m),p=Math.min(p-m,o),u=Xw(u,i("~",p-h),h)}let l=2+s[1].length+3;return n.append(i(" ",l)),u=Xw(u,"^",e.colNum-1),n.append(u.replace(/ +$/,"")+`
|
|
20
|
-
`),e.nextLine!=null&&a(2,e.nextLine," "),n.contents()}var Lg=[];function kx(t){Lg.push(t)}function m3(t){Lg.forEach(e=>{e(t)}),Lg=null}function Tl(t,e){let r=1,i=1,n=0,s=0,a=null,o=null,u=-1;for(;n<e;){let h=t.charAt(n++);h===`
|
|
21
|
-
`?(r++,i=1,u=s,s=n):h!=="\r"&&i++}let l=t.indexOf(`
|
|
22
|
-
`,s);if(l===-1)l=t.length;else{let h=t.indexOf(`
|
|
23
|
-
`,l+1);a=h===-1?t.slice(l):t.slice(l,h),a=a.replace(/^\r?\n/,"").replace(/\r$/,"")}u>=0&&(o=t.slice(u,s).replace(/\r?\n$/,""));let f=t.slice(s,l).replace(/\r$/,"");return{offset:e,lineNum:r,colNum:i,line:f,prevLine:o,nextLine:a,toString:d3}}function Hg(t,e,...r){return Tl(t,e).toString(...r)}var Zw=(()=>{let t=0;return e=>""+e+t++})();function g3(t,e,r){return r(e[t])}function y3(t,e,r){return e[t].map(r)}function ex(t){let e=t.split(/ ?\[\]/);return e.length===2?y3.bind(null,e[0]):g3.bind(null,t)}function tx(t,e,r){return t.map(i=>i(e,r))}function _3(t){return typeof t=="string"?tx.bind(null,[ex(t)]):Array.isArray(t)?tx.bind(null,t.map(ex)):(sr(typeof t=="function","Expected a string, Array, or function"),sr(t.length===2,"Expected a function of arity 2, got "+t.length),t)}function rx(t){return/^[a-zA-Z_][0-9a-zA-Z_]*$/.test(t)}function ix(t){return t.trim()}function v3(t){let e=t.split(/[()]/).map(ix);if(e.length===3&&e[2]===""){let r=e[0],i=[];if(e[1].length>0&&(i=e[1].split(",").map(ix)),rx(r)&&i.every(rx))return{name:r,formals:i}}throw new Error("Invalid operation signature: "+t)}var Pg=class{constructor(e){this._shapes=e.shapes,this._getTag=e.getTag,this.Adapter=function(r,i){this._adaptee=r,this._family=i},this.Adapter.prototype.valueOf=function(){throw new Error("heeey!")},this.operations={},this._arities=Object.create(null),this._getChildren=Object.create(null),Object.keys(this._shapes).forEach(r=>{let i=this._shapes[r];this._getChildren[r]=_3(i),typeof i!="function"&&(this._arities[r]=Array.isArray(i)?i.length:1)}),this._wrap=r=>new this.Adapter(r,this)}wrap(e){return this._wrap(e)}_checkActionDict(e){Object.keys(e).forEach(r=>{sr(r in this._getChildren,"Unrecognized action name '"+r+"'");let i=e[r];if(sr(typeof i=="function","Key '"+r+"': expected function, got "+i),r in this._arities){let n=this._arities[r],s=e[r].length;sr(s===n,"Action '"+r+"' has the wrong arity: expected "+n+", got "+s)}})}addOperation(e,r){let i=v3(e),{name:n}=i;this._checkActionDict(r),this.operations[n]={name:n,formals:i.formals,actions:r};let s=this;return this.Adapter.prototype[n]=function(...a){let o=s._getTag(this._adaptee);sr(o in s._getChildren,"getTag returned unrecognized tag '"+o+"'"),sr(o in r,"No action for '"+o+"' in operation '"+n+"'");let u=Object.create(null);for(let[h,p]of Object.entries(a))u[i.formals[h]]=p;let l=this.args;this.args=u;let f=r[o].apply(this,s._getChildren[o](this._adaptee,s._wrap));return this.args=l,f},this}};function nx(t){return t.toAST(this.args.mapping)}function sx(){return[]}function ax(t,e,r){return[t.toAST(this.args.mapping)].concat(r.toAST(this.args.mapping))}var b3={listOf:nx,ListOf:nx,emptyListOf:sx,EmptyListOf:sx,nonemptyListOf:ax,NonemptyListOf:ax},Ix={_terminal(){return this.sourceString},_nonterminal(...t){let{ctorName:e}=this._node,{mapping:r}=this.args;if(!Object.prototype.hasOwnProperty.call(r,e)){if(this.isLexical())return this.sourceString;let s=t.filter(a=>!a.isTerminal());if(s.length===1)return s[0].toAST(r)}if(typeof r[e]=="number")return t[r[e]].toAST(r);let i=r[e]||t,n={type:e};for(let s in i){let a=r[e]&&r[e][s];typeof a=="number"?n[s]=t[a].toAST(r):typeof a=="string"||typeof a=="boolean"||a===null?n[s]=a:typeof a=="object"&&a instanceof Number?n[s]=Number(a):typeof a=="function"?n[s]=a.call(this,t):a===void 0&&(t[s]&&!t[s].isTerminal()?n[s]=t[s].toAST(r):delete n[s])}return n},_iter(...t){return this._node.isOptional()?this.numChildren===0?null:t[0].toAST(this.args.mapping):t.map(e=>e.toAST(this.args.mapping))}};function S3(t,e){if(typeof t.failed!="function"||t.failed())throw new Error("toAST() expects a succesful MatchResult as first parameter");e=Object.assign({},b3,e);let r=Object.assign({},Ix);for(let s in e)typeof e[s]=="function"&&(r[s]=e[s],delete e[s]);return t._cst.grammar.createSemantics().addOperation("toAST(mapping)",r)(t).toAST(e)}function w3(t){if(typeof t.createSemantics!="function")throw new Error("semanticsToAST() expects a Grammar as parameter");return t.createSemantics().addOperation("toAST(mapping)",Ix)}var Ax=t=>new RegExp(String.raw`\p{${t}}`,"u"),qg=Object.fromEntries(["Cc","Cf","Cn","Co","Cs","Ll","Lm","Lo","Lt","Lu","Mc","Me","Mn","Nd","Nl","No","Pc","Pd","Pe","Pf","Pi","Po","Ps","Sc","Sk","Sm","So","Zl","Zp","Zs"].map(t=>[t,Ax(t)]));qg.Ltmo=/\p{Lt}|\p{Lm}|\p{Lo}/u;var ox=Object.fromEntries(["XID_Start","XID_Continue","White_Space"].map(t=>[t,Ax(t)])),me=class t{constructor(){if(this.constructor===t)throw new Error("PExpr cannot be instantiated -- it's abstract")}withSource(e){return e&&(this.source=e.trimmed()),this}},Qt=Object.create(me.prototype),Yt=Object.create(me.prototype),_t=class extends me{constructor(e){super(),this.obj=e}},At=class extends me{constructor(e,r){super(),this.from=e,this.to=r,this.matchCodePoint=e.length>1||r.length>1}},Tt=class extends me{constructor(e){super(),this.index=e}},st=class extends me{constructor(e){super(),this.terms=e}},fa=class extends st{constructor(e,r,i){let n=e.rules[r].body;super([i,n]),this.superGrammar=e,this.name=r,this.body=i}},pa=class extends st{constructor(e,r,i,n){let s=e.rules[r].body;super([...i,s,...n]),this.superGrammar=e,this.ruleName=r,this.expansionPos=i.length}},lt=class extends me{constructor(e){super(),this.factors=e}},qt=class extends me{constructor(e){super(),this.expr=e}},Hi=class extends qt{},gn=class extends qt{},oi=class extends qt{};Hi.prototype.operator="*";gn.prototype.operator="+";oi.prototype.operator="?";Hi.prototype.minNumMatches=0;gn.prototype.minNumMatches=1;oi.prototype.minNumMatches=0;Hi.prototype.maxNumMatches=Number.POSITIVE_INFINITY;gn.prototype.maxNumMatches=Number.POSITIVE_INFINITY;oi.prototype.maxNumMatches=1;var gt=class extends me{constructor(e){super(),this.expr=e}},Ct=class extends me{constructor(e){super(),this.expr=e}},Kt=class extends me{constructor(e){super(),this.expr=e}},Te=class extends me{constructor(e,r=[]){super(),this.ruleName=e,this.args=r}isSyntactic(){return os(this.ruleName)}toMemoKey(){return this._memoKey||Object.defineProperty(this,"_memoKey",{value:this.toString()}),this._memoKey}},yt=class extends me{constructor(e){if(super(),this.categoryOrProp=e,e in qg)this.pattern=qg[e];else if(e in ox)this.pattern=ox[e];else throw new Error(`Invalid Unicode category or property name: ${JSON.stringify(e)}`)}};function Ze(t,e){let r;return e?(r=new Error(e.getLineAndColumnMessage()+t),r.shortMessage=t,r.interval=e):r=new Error(t),r}function Cg(){return Ze("Interval sources don't match")}function x3(t){let e=new Error;return Object.defineProperty(e,"message",{enumerable:!0,get(){return t.message}}),Object.defineProperty(e,"shortMessage",{enumerable:!0,get(){return"Expected "+t.getExpectedText()}}),e.interval=t.getInterval(),e}function k3(t,e,r){let i=e?`Grammar ${t} is not declared in namespace '${e}'`:"Undeclared grammar "+t;return Ze(i,r)}function I3(t,e){return Ze("Grammar "+t.name+" is already declared in this namespace")}function A3(t){return Ze(`Grammar '${t.name}' does not support incremental parsing`)}function Tx(t,e,r){return Ze("Rule "+t+" is not declared in grammar "+e,r)}function T3(t,e,r){return Ze("Cannot override rule "+t+" because it is not declared in "+e,r)}function E3(t,e,r){return Ze("Cannot extend rule "+t+" because it is not declared in "+e,r)}function ux(t,e,r,i){let n="Duplicate declaration for rule '"+t+"' in grammar '"+e+"'";return e!==r&&(n+=" (originally declared in '"+r+"')"),Ze(n,i)}function Ex(t,e,r,i){return Ze("Wrong number of parameters for rule "+t+" (expected "+e+", got "+r+")",i)}function O3(t,e,r,i){return Ze("Wrong number of arguments for rule "+t+" (expected "+e+", got "+r+")",i)}function cx(t,e,r){return Ze("Duplicate parameter names in rule "+t+": "+e.join(", "),r)}function N3(t,e){return Ze("Invalid parameter to rule "+t+": "+e+" has arity "+e.getArity()+", but parameter expressions must have arity 1",e.source)}var L3="NOTE: A _syntactic rule_ is a rule whose name begins with a capital letter. See https://ohmjs.org/d/svl for more details.";function P3(t,e){return Ze("Cannot apply syntactic rule "+t+" from here (inside a lexical context)",e.source)}function q3(t){let{ruleName:e}=t;return Ze(`applySyntactic is for syntactic rules, but '${e}' is a lexical rule. `+L3,t.source)}function C3(t){return Ze("applySyntactic is not required here (in a syntactic context)",t.source)}function lx(t,e){return Ze("Incorrect argument type: expected "+t,e.source)}function R3(t){return Ze("'...' can appear at most once in a rule body",t.source)}function M3(t){let e=t._node;sr(e&&e.isNonterminal()&&e.ctorName==="escapeChar_unicodeCodePoint");let r=t.children.slice(1,-1).map(n=>n.source),i=r[0].coverageWith(...r.slice(1));return Ze(`U+${i.contents} is not a valid Unicode code point`,i)}function Ox(t,e){let r=e.length>0?e[e.length-1].args:[],n="Nullable expression "+t.expr.substituteParams(r)+" is not allowed inside '"+t.operator+"' (possible infinite loop)";if(e.length>0){let s=e.map(a=>new Te(a.ruleName,a.args)).join(`
|
|
24
|
-
`);n+=`
|
|
25
|
-
Application stack (most recent application last):
|
|
26
|
-
`+s}return Ze(n,t.expr.source)}function Nx(t,e,r,i){return Ze("Rule "+t+" involves an alternation which has inconsistent arity (expected "+e+", got "+r+")",i.source)}function D3(t){let e=t.map(r=>r.message);return Ze(["Errors:"].concat(e).join(`
|
|
27
|
-
- `),t[0].interval)}function F3(t,e,r,i){let n=i.slice(0,-1).map(u=>{let l=" "+u[0].name+" > "+u[1];return u.length===3?l+" for '"+u[2]+"'":l}).join(`
|
|
28
|
-
`);n+=`
|
|
29
|
-
`+e+" > "+t;let s="";t==="_iter"&&(s=[`
|
|
30
|
-
NOTE: as of Ohm v16, there is no default action for iteration nodes \u2014 see `," https://ohmjs.org/d/dsa for details."].join(`
|
|
31
|
-
`));let a=[`Missing semantic action for '${t}' in ${r} '${e}'.${s}`,"Action stack (most recent call last):",n].join(`
|
|
32
|
-
`),o=Ze(a);return o.name="missingSemanticAction",o}function j3(t){if(t.length===1)throw t[0];if(t.length>1)throw D3(t)}var us=class t{constructor(e,r,i){Object.defineProperty(this,"_sourceString",{value:e,configurable:!1,enumerable:!1,writable:!1}),this.startIdx=r,this.endIdx=i}get sourceString(){return this._sourceString}get contents(){return this._contents===void 0&&(this._contents=this.sourceString.slice(this.startIdx,this.endIdx)),this._contents}get length(){return this.endIdx-this.startIdx}coverageWith(...e){return t.coverage(...e,this)}collapsedLeft(){return new t(this.sourceString,this.startIdx,this.startIdx)}collapsedRight(){return new t(this.sourceString,this.endIdx,this.endIdx)}getLineAndColumn(){return Tl(this.sourceString,this.startIdx)}getLineAndColumnMessage(){let e=[this.startIdx,this.endIdx];return Hg(this.sourceString,this.startIdx,e)}minus(e){if(this.sourceString!==e.sourceString)throw Cg();return this.startIdx===e.startIdx&&this.endIdx===e.endIdx?[]:this.startIdx<e.startIdx&&e.endIdx<this.endIdx?[new t(this.sourceString,this.startIdx,e.startIdx),new t(this.sourceString,e.endIdx,this.endIdx)]:this.startIdx<e.endIdx&&e.endIdx<this.endIdx?[new t(this.sourceString,e.endIdx,this.endIdx)]:this.startIdx<e.startIdx&&e.startIdx<this.endIdx?[new t(this.sourceString,this.startIdx,e.startIdx)]:[this]}relativeTo(e){if(this.sourceString!==e.sourceString)throw Cg();return sr(this.startIdx>=e.startIdx&&this.endIdx<=e.endIdx,"other interval does not cover this one"),new t(this.sourceString,this.startIdx-e.startIdx,this.endIdx-e.startIdx)}trimmed(){let{contents:e}=this,r=this.startIdx+e.match(/^\s*/)[0].length,i=this.endIdx-e.match(/\s*$/)[0].length;return new t(this.sourceString,r,i)}subInterval(e,r){let i=this.startIdx+e;return new t(this.sourceString,i,i+r)}};us.coverage=function(t,...e){let{startIdx:r,endIdx:i}=t;for(let n of e){if(n.sourceString!==t.sourceString)throw Cg();r=Math.min(r,n.startIdx),i=Math.max(i,n.endIdx)}return new us(t.sourceString,r,i)};var B3=65535,V3=1114111,ha=class{constructor(e){this.source=e,this.pos=0,this.examinedLength=0}atEnd(){let e=this.pos>=this.source.length;return this.examinedLength=Math.max(this.examinedLength,this.pos+1),e}next(){let e=this.source[this.pos++];return this.examinedLength=Math.max(this.examinedLength,this.pos),e}nextCharCode(){let e=this.next();return e&&e.charCodeAt(0)}nextCodePoint(){let e=this.source.slice(this.pos++).codePointAt(0);return e>B3&&(this.pos+=1),this.examinedLength=Math.max(this.examinedLength,this.pos),e}matchString(e,r){let i;if(r){for(i=0;i<e.length;i++){let n=this.next(),s=e[i];if(n==null||n.toUpperCase()!==s.toUpperCase())return!1}return!0}for(i=0;i<e.length;i++)if(this.next()!==e[i])return!1;return!0}sourceSlice(e,r){return this.source.slice(e,r)}interval(e,r){return new us(this.source,e,r||this.pos)}},bl=class{constructor(e,r,i,n,s,a,o){this.matcher=e,this.input=r,this.startExpr=i,this._cst=n,this._cstOffset=s,this._rightmostFailurePosition=a,this._rightmostFailures=o,this.failed()&&(Og(this,"message",function(){let u="Expected "+this.getExpectedText();return Hg(this.input,this.getRightmostFailurePosition())+u}),Og(this,"shortMessage",function(){let u="expected "+this.getExpectedText(),l=Tl(this.input,this.getRightmostFailurePosition());return"Line "+l.lineNum+", col "+l.colNum+": "+u}))}succeeded(){return!!this._cst}failed(){return!this.succeeded()}getRightmostFailurePosition(){return this._rightmostFailurePosition}getRightmostFailures(){if(!this._rightmostFailures){this.matcher.setInput(this.input);let e=this.matcher._match(this.startExpr,{tracing:!1,positionToRecordFailures:this.getRightmostFailurePosition()});this._rightmostFailures=e.getRightmostFailures()}return this._rightmostFailures}toString(){return this.succeeded()?"[match succeeded]":"[match failed at position "+this.getRightmostFailurePosition()+"]"}getExpectedText(){if(this.succeeded())throw new Error("cannot get expected text of a successful MatchResult");let e=new ls,r=this.getRightmostFailures();r=r.filter(i=>!i.isFluffy());for(let i=0;i<r.length;i++)i>0&&(i===r.length-1?e.append(r.length>2?", or ":" or "):e.append(", ")),e.append(r[i].toString());return e.contents()}getInterval(){let e=this.getRightmostFailurePosition();return new us(this.input,e,e)}},Rg=class{constructor(){this.applicationMemoKeyStack=[],this.memo={},this.maxExaminedLength=0,this.maxRightmostFailureOffset=-1,this.currentLeftRecursion=void 0}isActive(e){return this.applicationMemoKeyStack.indexOf(e.toMemoKey())>=0}enter(e){this.applicationMemoKeyStack.push(e.toMemoKey())}exit(){this.applicationMemoKeyStack.pop()}startLeftRecursion(e,r){r.isLeftRecursion=!0,r.headApplication=e,r.nextLeftRecursion=this.currentLeftRecursion,this.currentLeftRecursion=r;let{applicationMemoKeyStack:i}=this,n=i.indexOf(e.toMemoKey())+1,s=i.slice(n);r.isInvolved=function(a){return s.indexOf(a)>=0},r.updateInvolvedApplicationMemoKeys=function(){for(let a=n;a<i.length;a++){let o=i[a];this.isInvolved(o)||s.push(o)}}}endLeftRecursion(){this.currentLeftRecursion=this.currentLeftRecursion.nextLeftRecursion}shouldUseMemoizedResult(e){if(!e.isLeftRecursion)return!0;let{applicationMemoKeyStack:r}=this;for(let i=0;i<r.length;i++){let n=r[i];if(e.isInvolved(n))return!1}return!0}memoize(e,r){return this.memo[e]=r,this.maxExaminedLength=Math.max(this.maxExaminedLength,r.examinedLength),this.maxRightmostFailureOffset=Math.max(this.maxRightmostFailureOffset,r.rightmostFailureOffset),r}clearObsoleteEntries(e,r){if(e+this.maxExaminedLength<=r)return;let{memo:i}=this;this.maxExaminedLength=0,this.maxRightmostFailureOffset=-1,Object.keys(i).forEach(n=>{let s=i[n];e+s.examinedLength>r?delete i[n]:(this.maxExaminedLength=Math.max(this.maxExaminedLength,s.examinedLength),this.maxRightmostFailureOffset=Math.max(this.maxRightmostFailureOffset,s.rightmostFailureOffset))})}},$3="\u2717",U3="\u2713",H3="\u22C5",G3="\u21D2",W3="\u2409",z3="\u240A",J3="\u240D",Mg={succeeded:1,isRootNode:2,isImplicitSpaces:4,isMemoized:8,isHeadOfLeftRecursion:16,terminatesLR:32};function K3(t){return Al(" ",t).join("")}function Q3(t,e,r){let i=Lx(t.slice(e,e+r));return i.length<r?i+Al(" ",r-i.length).join(""):i}function Lx(t){return typeof t=="string"?t.replace(/ /g,H3).replace(/\t/g,W3).replace(/\n/g,z3).replace(/\r/g,J3):String(t)}var da=class t{constructor(e,r,i,n,s,a,o){this.input=e,this.pos=this.pos1=r,this.pos2=i,this.source=new us(e,r,i),this.expr=n,this.bindings=a,this.children=o||[],this.terminatingLREntry=null,this._flags=s?Mg.succeeded:0}get displayString(){return this.expr.toDisplayString()}clone(){return this.cloneWithExpr(this.expr)}cloneWithExpr(e){let r=new t(this.input,this.pos,this.pos2,e,this.succeeded,this.bindings,this.children);return r.isHeadOfLeftRecursion=this.isHeadOfLeftRecursion,r.isImplicitSpaces=this.isImplicitSpaces,r.isMemoized=this.isMemoized,r.isRootNode=this.isRootNode,r.terminatesLR=this.terminatesLR,r.terminatingLREntry=this.terminatingLREntry,r}recordLRTermination(e,r){this.terminatingLREntry=new t(this.input,this.pos,this.pos2,this.expr,!1,[r],[e]),this.terminatingLREntry.terminatesLR=!0}walk(e,r){let i=e;typeof i=="function"&&(i={enter:i});function n(s,a,o){let u=!0;i.enter&&i.enter.call(r,s,a,o)===t.prototype.SKIP&&(u=!1),u&&(s.children.forEach(l=>{n(l,s,o+1)}),i.exit&&i.exit.call(r,s,a,o))}this.isRootNode?this.children.forEach(s=>{n(s,null,0)}):n(this,null,0)}toString(){let e=new ls;return this.walk((r,i,n)=>{if(!r)return this.SKIP;if(r.expr.constructor.name!=="Alt"){if(e.append(Q3(r.input,r.pos,10)+K3(n*2+1)),e.append((r.succeeded?U3:$3)+" "+r.displayString),r.isHeadOfLeftRecursion&&e.append(" (LR)"),r.succeeded){let a=Lx(r.source.contents);e.append(" "+G3+" "),e.append(typeof a=="string"?'"'+a+'"':a)}e.append(`
|
|
33
|
-
`)}}),e.contents()}};da.prototype.SKIP={};Object.keys(Mg).forEach(t=>{let e=Mg[t];Object.defineProperty(da.prototype,t,{get(){return(this._flags&e)!==0},set(r){r?this._flags|=e:this._flags&=~e}})});me.prototype.allowsSkippingPrecedingSpace=ar("allowsSkippingPrecedingSpace");Qt.allowsSkippingPrecedingSpace=Yt.allowsSkippingPrecedingSpace=Te.prototype.allowsSkippingPrecedingSpace=_t.prototype.allowsSkippingPrecedingSpace=At.prototype.allowsSkippingPrecedingSpace=yt.prototype.allowsSkippingPrecedingSpace=function(){return!0};st.prototype.allowsSkippingPrecedingSpace=qt.prototype.allowsSkippingPrecedingSpace=Kt.prototype.allowsSkippingPrecedingSpace=Ct.prototype.allowsSkippingPrecedingSpace=gt.prototype.allowsSkippingPrecedingSpace=Tt.prototype.allowsSkippingPrecedingSpace=lt.prototype.allowsSkippingPrecedingSpace=function(){return!1};var jo;kx(t=>{jo=t});var Sl;me.prototype.assertAllApplicationsAreValid=function(t,e){Sl=0,this._assertAllApplicationsAreValid(t,e)};me.prototype._assertAllApplicationsAreValid=ar("_assertAllApplicationsAreValid");Qt._assertAllApplicationsAreValid=Yt._assertAllApplicationsAreValid=_t.prototype._assertAllApplicationsAreValid=At.prototype._assertAllApplicationsAreValid=Tt.prototype._assertAllApplicationsAreValid=yt.prototype._assertAllApplicationsAreValid=function(t,e){};Kt.prototype._assertAllApplicationsAreValid=function(t,e){Sl++,this.expr._assertAllApplicationsAreValid(t,e),Sl--};st.prototype._assertAllApplicationsAreValid=function(t,e){for(let r=0;r<this.terms.length;r++)this.terms[r]._assertAllApplicationsAreValid(t,e)};lt.prototype._assertAllApplicationsAreValid=function(t,e){for(let r=0;r<this.factors.length;r++)this.factors[r]._assertAllApplicationsAreValid(t,e)};qt.prototype._assertAllApplicationsAreValid=gt.prototype._assertAllApplicationsAreValid=Ct.prototype._assertAllApplicationsAreValid=function(t,e){this.expr._assertAllApplicationsAreValid(t,e)};Te.prototype._assertAllApplicationsAreValid=function(t,e,r=!1){let i=e.rules[this.ruleName],n=os(t)&&Sl===0;if(!i)throw Tx(this.ruleName,e.name,this.source);if(!r&&os(this.ruleName)&&!n)throw P3(this.ruleName,this);let s=this.args.length,a=i.formals.length;if(s!==a)throw O3(this.ruleName,a,s,this.source);let o=jo&&i===jo.rules.applySyntactic;if(jo&&i===jo.rules.caseInsensitive&&!(this.args[0]instanceof _t))throw lx('a Terminal (e.g. "abc")',this.args[0]);if(o){let l=this.args[0];if(!(l instanceof Te))throw lx("a syntactic rule application",l);if(!os(l.ruleName))throw q3(l);if(n)throw C3(this)}this.args.forEach(l=>{if(l._assertAllApplicationsAreValid(t,e,o),l.getArity()!==1)throw N3(this.ruleName,l)})};me.prototype.assertChoicesHaveUniformArity=ar("assertChoicesHaveUniformArity");Qt.assertChoicesHaveUniformArity=Yt.assertChoicesHaveUniformArity=_t.prototype.assertChoicesHaveUniformArity=At.prototype.assertChoicesHaveUniformArity=Tt.prototype.assertChoicesHaveUniformArity=Kt.prototype.assertChoicesHaveUniformArity=yt.prototype.assertChoicesHaveUniformArity=function(t){};st.prototype.assertChoicesHaveUniformArity=function(t){if(this.terms.length===0)return;let e=this.terms[0].getArity();for(let r=0;r<this.terms.length;r++){let i=this.terms[r];i.assertChoicesHaveUniformArity();let n=i.getArity();if(e!==n)throw Nx(t,e,n,i)}};fa.prototype.assertChoicesHaveUniformArity=function(t){let e=this.terms[0].getArity(),r=this.terms[1].getArity();if(e!==r)throw Nx(t,r,e,this.terms[0])};lt.prototype.assertChoicesHaveUniformArity=function(t){for(let e=0;e<this.factors.length;e++)this.factors[e].assertChoicesHaveUniformArity(t)};qt.prototype.assertChoicesHaveUniformArity=function(t){this.expr.assertChoicesHaveUniformArity(t)};gt.prototype.assertChoicesHaveUniformArity=function(t){};Ct.prototype.assertChoicesHaveUniformArity=function(t){this.expr.assertChoicesHaveUniformArity(t)};Te.prototype.assertChoicesHaveUniformArity=function(t){};me.prototype.assertIteratedExprsAreNotNullable=ar("assertIteratedExprsAreNotNullable");Qt.assertIteratedExprsAreNotNullable=Yt.assertIteratedExprsAreNotNullable=_t.prototype.assertIteratedExprsAreNotNullable=At.prototype.assertIteratedExprsAreNotNullable=Tt.prototype.assertIteratedExprsAreNotNullable=yt.prototype.assertIteratedExprsAreNotNullable=function(t){};st.prototype.assertIteratedExprsAreNotNullable=function(t){for(let e=0;e<this.terms.length;e++)this.terms[e].assertIteratedExprsAreNotNullable(t)};lt.prototype.assertIteratedExprsAreNotNullable=function(t){for(let e=0;e<this.factors.length;e++)this.factors[e].assertIteratedExprsAreNotNullable(t)};qt.prototype.assertIteratedExprsAreNotNullable=function(t){if(this.expr.assertIteratedExprsAreNotNullable(t),this.expr.isNullable(t))throw Ox(this,[])};oi.prototype.assertIteratedExprsAreNotNullable=gt.prototype.assertIteratedExprsAreNotNullable=Ct.prototype.assertIteratedExprsAreNotNullable=Kt.prototype.assertIteratedExprsAreNotNullable=function(t){this.expr.assertIteratedExprsAreNotNullable(t)};Te.prototype.assertIteratedExprsAreNotNullable=function(t){this.args.forEach(e=>{e.assertIteratedExprsAreNotNullable(t)})};var Vo=class{constructor(e){this.matchLength=e}get ctorName(){throw new Error("subclass responsibility")}numChildren(){return this.children?this.children.length:0}childAt(e){if(this.children)return this.children[e]}indexOfChild(e){return this.children.indexOf(e)}hasChildren(){return this.numChildren()>0}hasNoChildren(){return!this.hasChildren()}onlyChild(){if(this.numChildren()!==1)throw new Error("cannot get only child of a node of type "+this.ctorName+" (it has "+this.numChildren()+" children)");return this.firstChild()}firstChild(){if(this.hasNoChildren())throw new Error("cannot get first child of a "+this.ctorName+" node, which has no children");return this.childAt(0)}lastChild(){if(this.hasNoChildren())throw new Error("cannot get last child of a "+this.ctorName+" node, which has no children");return this.childAt(this.numChildren()-1)}childBefore(e){let r=this.indexOfChild(e);if(r<0)throw new Error("Node.childBefore() called w/ an argument that is not a child");if(r===0)throw new Error("cannot get child before first child");return this.childAt(r-1)}childAfter(e){let r=this.indexOfChild(e);if(r<0)throw new Error("Node.childAfter() called w/ an argument that is not a child");if(r===this.numChildren()-1)throw new Error("cannot get child after last child");return this.childAt(r+1)}isTerminal(){return!1}isNonterminal(){return!1}isIteration(){return!1}isOptional(){return!1}},Gi=class extends Vo{get ctorName(){return"_terminal"}isTerminal(){return!0}get primitiveValue(){throw new Error("The `primitiveValue` property was removed in Ohm v17.")}},Dg=class extends Vo{constructor(e,r,i,n){super(n),this.ruleName=e,this.children=r,this.childOffsets=i}get ctorName(){return this.ruleName}isNonterminal(){return!0}isLexical(){return bx(this.ctorName)}isSyntactic(){return os(this.ctorName)}},wl=class extends Vo{constructor(e,r,i,n){super(i),this.children=e,this.childOffsets=r,this.optional=n}get ctorName(){return"_iter"}isIteration(){return!0}isOptional(){return this.optional}};me.prototype.eval=ar("eval");Qt.eval=function(t){let{inputStream:e}=t,r=e.pos,i=e.nextCodePoint();return i!==void 0?(t.pushBinding(new Gi(String.fromCodePoint(i).length),r),!0):(t.processFailure(r,this),!1)};Yt.eval=function(t){let{inputStream:e}=t,r=e.pos;return e.atEnd()?(t.pushBinding(new Gi(0),r),!0):(t.processFailure(r,this),!1)};_t.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos;return e.matchString(this.obj)?(t.pushBinding(new Gi(this.obj.length),r),!0):(t.processFailure(r,this),!1)};At.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos,i=this.matchCodePoint?e.nextCodePoint():e.nextCharCode();return i!==void 0&&this.from.codePointAt(0)<=i&&i<=this.to.codePointAt(0)?(t.pushBinding(new Gi(String.fromCodePoint(i).length),r),!0):(t.processFailure(r,this),!1)};Tt.prototype.eval=function(t){return t.eval(t.currentApplication().args[this.index])};Kt.prototype.eval=function(t){t.enterLexifiedContext();let e=t.eval(this.expr);return t.exitLexifiedContext(),e};st.prototype.eval=function(t){for(let e=0;e<this.terms.length;e++)if(t.eval(this.terms[e]))return!0;return!1};lt.prototype.eval=function(t){for(let e=0;e<this.factors.length;e++){let r=this.factors[e];if(!t.eval(r))return!1}return!0};qt.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos,i=this.getArity(),n=[],s=[];for(;n.length<i;)n.push([]),s.push([]);let a=0,o=r,u;for(;a<this.maxNumMatches&&t.eval(this.expr);){if(e.pos===o)throw Ox(this,t._applicationStack);o=e.pos,a++;let p=t._bindings.splice(t._bindings.length-i,i),m=t._bindingOffsets.splice(t._bindingOffsets.length-i,i);for(u=0;u<p.length;u++)n[u].push(p[u]),s[u].push(m[u])}if(a<this.minNumMatches)return!1;let l=t.posToOffset(r),f=0;if(a>0){let p=n[i-1],m=s[i-1],v=m[m.length-1]+p[p.length-1].matchLength;l=s[0][0],f=v-l}let h=this instanceof oi;for(u=0;u<n.length;u++)t._bindings.push(new wl(n[u],s[u],f,h)),t._bindingOffsets.push(l);return!0};gt.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos;t.pushFailuresInfo();let i=t.eval(this.expr);return t.popFailuresInfo(),i?(t.processFailure(r,this),!1):(e.pos=r,!0)};Ct.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos;return t.eval(this.expr)?(e.pos=r,!0):!1};Te.prototype.eval=function(t){let e=t.currentApplication(),r=e?e.args:[],i=this.substituteParams(r),n=t.getCurrentPosInfo();if(n.isActive(i))return i.handleCycle(t);let s=i.toMemoKey(),a=n.memo[s];if(a&&n.shouldUseMemoizedResult(a)){if(t.hasNecessaryInfo(a))return t.useMemoizedResult(t.inputStream.pos,a);delete n.memo[s]}return i.reallyEval(t)};Te.prototype.handleCycle=function(t){let e=t.getCurrentPosInfo(),{currentLeftRecursion:r}=e,i=this.toMemoKey(),n=e.memo[i];return r&&r.headApplication.toMemoKey()===i?n.updateInvolvedApplicationMemoKeys():n||(n=e.memoize(i,{matchLength:0,examinedLength:0,value:!1,rightmostFailureOffset:-1}),e.startLeftRecursion(this,n)),t.useMemoizedResult(t.inputStream.pos,n)};Te.prototype.reallyEval=function(t){let{inputStream:e}=t,r=e.pos,i=t.getCurrentPosInfo(),n=t.grammar.rules[this.ruleName],{body:s}=n,{description:a}=n;t.enterApplication(i,this),a&&t.pushFailuresInfo();let o=e.examinedLength;e.examinedLength=0;let u=this.evalOnce(s,t),l=i.currentLeftRecursion,f=this.toMemoKey(),h=l&&l.headApplication.toMemoKey()===f,p;t.doNotMemoize?t.doNotMemoize=!1:h?(u=this.growSeedResult(s,t,r,l,u),i.endLeftRecursion(),p=l,p.examinedLength=e.examinedLength-r,p.rightmostFailureOffset=t._getRightmostFailureOffset(),i.memoize(f,p)):(!l||!l.isInvolved(f))&&(p=i.memoize(f,{matchLength:e.pos-r,examinedLength:e.examinedLength-r,value:u,failuresAtRightmostPosition:t.cloneRecordedFailures(),rightmostFailureOffset:t._getRightmostFailureOffset()}));let m=!!u;if(a&&(t.popFailuresInfo(),m||t.processFailure(r,this),p&&(p.failuresAtRightmostPosition=t.cloneRecordedFailures(),p.rightmostFailureOffset=t._getRightmostFailureOffset())),t.isTracing()&&p){let v=t.getTraceEntry(r,this,m,m?[u]:[]);h&&(sr(v.terminatingLREntry!=null||!m),v.isHeadOfLeftRecursion=!0),p.traceEntry=v}return e.examinedLength=Math.max(e.examinedLength,o),t.exitApplication(i,u),m};Te.prototype.evalOnce=function(t,e){let{inputStream:r}=e,i=r.pos;if(e.eval(t)){let n=t.getArity(),s=e._bindings.splice(e._bindings.length-n,n),a=e._bindingOffsets.splice(e._bindingOffsets.length-n,n),o=r.pos-i;return new Dg(this.ruleName,s,a,o)}else return!1};Te.prototype.growSeedResult=function(t,e,r,i,n){if(!n)return!1;let{inputStream:s}=e;for(;;){if(i.matchLength=s.pos-r,i.value=n,i.failuresAtRightmostPosition=e.cloneRecordedFailures(),e.isTracing()){let a=e.trace[e.trace.length-1];i.traceEntry=new da(e.input,r,s.pos,this,!0,[n],[a.clone()])}if(s.pos=r,n=this.evalOnce(t,e),s.pos-r<=i.matchLength)break;e.isTracing()&&e.trace.splice(-2,1)}return e.isTracing()&&i.traceEntry.recordLRTermination(e.trace.pop(),n),s.pos=r+i.matchLength,i.value};yt.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos,i=e.nextCodePoint();if(i!==void 0&&i<=V3){let n=String.fromCodePoint(i);if(this.pattern.test(n))return t.pushBinding(new Gi(n.length),r),!0}return t.processFailure(r,this),!1};me.prototype.getArity=ar("getArity");Qt.getArity=Yt.getArity=_t.prototype.getArity=At.prototype.getArity=Tt.prototype.getArity=Te.prototype.getArity=yt.prototype.getArity=function(){return 1};st.prototype.getArity=function(){return this.terms.length===0?0:this.terms[0].getArity()};lt.prototype.getArity=function(){let t=0;for(let e=0;e<this.factors.length;e++)t+=this.factors[e].getArity();return t};qt.prototype.getArity=function(){return this.expr.getArity()};gt.prototype.getArity=function(){return 0};Ct.prototype.getArity=Kt.prototype.getArity=function(){return this.expr.getArity()};function ui(t,e){let r={};if(t.source&&e){let i=t.source.relativeTo(e);r.sourceInterval=[i.startIdx,i.endIdx]}return r}me.prototype.outputRecipe=ar("outputRecipe");Qt.outputRecipe=function(t,e){return["any",ui(this,e)]};Yt.outputRecipe=function(t,e){return["end",ui(this,e)]};_t.prototype.outputRecipe=function(t,e){return["terminal",ui(this,e),this.obj]};At.prototype.outputRecipe=function(t,e){return["range",ui(this,e),this.from,this.to]};Tt.prototype.outputRecipe=function(t,e){return["param",ui(this,e),this.index]};st.prototype.outputRecipe=function(t,e){return["alt",ui(this,e)].concat(this.terms.map(r=>r.outputRecipe(t,e)))};fa.prototype.outputRecipe=function(t,e){return this.terms[0].outputRecipe(t,e)};pa.prototype.outputRecipe=function(t,e){let r=this.terms.slice(0,this.expansionPos),i=this.terms.slice(this.expansionPos+1);return["splice",ui(this,e),r.map(n=>n.outputRecipe(t,e)),i.map(n=>n.outputRecipe(t,e))]};lt.prototype.outputRecipe=function(t,e){return["seq",ui(this,e)].concat(this.factors.map(r=>r.outputRecipe(t,e)))};Hi.prototype.outputRecipe=gn.prototype.outputRecipe=oi.prototype.outputRecipe=gt.prototype.outputRecipe=Ct.prototype.outputRecipe=Kt.prototype.outputRecipe=function(t,e){return[this.constructor.name.toLowerCase(),ui(this,e),this.expr.outputRecipe(t,e)]};Te.prototype.outputRecipe=function(t,e){return["app",ui(this,e),this.ruleName,this.args.map(r=>r.outputRecipe(t,e))]};yt.prototype.outputRecipe=function(t,e){return["unicodeChar",ui(this,e),this.categoryOrProp]};me.prototype.introduceParams=ar("introduceParams");Qt.introduceParams=Yt.introduceParams=_t.prototype.introduceParams=At.prototype.introduceParams=Tt.prototype.introduceParams=yt.prototype.introduceParams=function(t){return this};st.prototype.introduceParams=function(t){return this.terms.forEach((e,r,i)=>{i[r]=e.introduceParams(t)}),this};lt.prototype.introduceParams=function(t){return this.factors.forEach((e,r,i)=>{i[r]=e.introduceParams(t)}),this};qt.prototype.introduceParams=gt.prototype.introduceParams=Ct.prototype.introduceParams=Kt.prototype.introduceParams=function(t){return this.expr=this.expr.introduceParams(t),this};Te.prototype.introduceParams=function(t){let e=t.indexOf(this.ruleName);if(e>=0){if(this.args.length>0)throw new Error("Parameterized rules cannot be passed as arguments to another rule.");return new Tt(e).withSource(this.source)}else return this.args.forEach((r,i,n)=>{n[i]=r.introduceParams(t)}),this};me.prototype.isNullable=function(t){return this._isNullable(t,Object.create(null))};me.prototype._isNullable=ar("_isNullable");Qt._isNullable=At.prototype._isNullable=Tt.prototype._isNullable=gn.prototype._isNullable=yt.prototype._isNullable=function(t,e){return!1};Yt._isNullable=function(t,e){return!0};_t.prototype._isNullable=function(t,e){return typeof this.obj=="string"?this.obj==="":!1};st.prototype._isNullable=function(t,e){return this.terms.length===0||this.terms.some(r=>r._isNullable(t,e))};lt.prototype._isNullable=function(t,e){return this.factors.every(r=>r._isNullable(t,e))};Hi.prototype._isNullable=oi.prototype._isNullable=gt.prototype._isNullable=Ct.prototype._isNullable=function(t,e){return!0};Kt.prototype._isNullable=function(t,e){return this.expr._isNullable(t,e)};Te.prototype._isNullable=function(t,e){let r=this.toMemoKey();if(!Object.prototype.hasOwnProperty.call(e,r)){let{body:i}=t.rules[this.ruleName],n=i.substituteParams(this.args);e[r]=!1,e[r]=n._isNullable(t,e)}return e[r]};me.prototype.substituteParams=ar("substituteParams");Qt.substituteParams=Yt.substituteParams=_t.prototype.substituteParams=At.prototype.substituteParams=yt.prototype.substituteParams=function(t){return this};Tt.prototype.substituteParams=function(t){return xx(t[this.index])};st.prototype.substituteParams=function(t){return new st(this.terms.map(e=>e.substituteParams(t)))};lt.prototype.substituteParams=function(t){return new lt(this.factors.map(e=>e.substituteParams(t)))};qt.prototype.substituteParams=gt.prototype.substituteParams=Ct.prototype.substituteParams=Kt.prototype.substituteParams=function(t){return new this.constructor(this.expr.substituteParams(t))};Te.prototype.substituteParams=function(t){if(this.args.length===0)return this;{let e=this.args.map(r=>r.substituteParams(t));return new Te(this.ruleName,e)}};function fx(t){return/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)}function Gg(t){let e=Object.create(null);t.forEach(r=>{e[r]=(e[r]||0)+1}),Object.keys(e).forEach(r=>{if(e[r]<=1)return;let i=1;t.forEach((n,s)=>{n===r&&(t[s]=n+"_"+i++)})})}me.prototype.toArgumentNameList=ar("toArgumentNameList");Qt.toArgumentNameList=function(t,e){return["any"]};Yt.toArgumentNameList=function(t,e){return["end"]};_t.prototype.toArgumentNameList=function(t,e){return typeof this.obj=="string"&&/^[_a-zA-Z0-9]+$/.test(this.obj)?["_"+this.obj]:["$"+t]};At.prototype.toArgumentNameList=function(t,e){let r=this.from+"_to_"+this.to;return fx(r)||(r="_"+r),fx(r)||(r="$"+t),[r]};st.prototype.toArgumentNameList=function(t,e){let r=this.terms.map(s=>s.toArgumentNameList(t,!0)),i=[],n=r[0].length;for(let s=0;s<n;s++){let a=[];for(let u=0;u<this.terms.length;u++)a.push(r[u][s]);let o=vx(a);i.push(o.join("_or_"))}return e||Gg(i),i};lt.prototype.toArgumentNameList=function(t,e){let r=[];return this.factors.forEach(i=>{let n=i.toArgumentNameList(t,!0);r=r.concat(n),t+=n.length}),e||Gg(r),r};qt.prototype.toArgumentNameList=function(t,e){let r=this.expr.toArgumentNameList(t,e).map(i=>i[i.length-1]==="s"?i+"es":i+"s");return e||Gg(r),r};oi.prototype.toArgumentNameList=function(t,e){return this.expr.toArgumentNameList(t,e).map(r=>"opt"+r[0].toUpperCase()+r.slice(1))};gt.prototype.toArgumentNameList=function(t,e){return[]};Ct.prototype.toArgumentNameList=Kt.prototype.toArgumentNameList=function(t,e){return this.expr.toArgumentNameList(t,e)};Te.prototype.toArgumentNameList=function(t,e){return[this.ruleName]};yt.prototype.toArgumentNameList=function(t,e){return["$"+t]};Tt.prototype.toArgumentNameList=function(t,e){return["param"+this.index]};me.prototype.toDisplayString=ar("toDisplayString");st.prototype.toDisplayString=lt.prototype.toDisplayString=function(){return this.source?this.source.trimmed().contents:"["+this.constructor.name+"]"};Qt.toDisplayString=Yt.toDisplayString=qt.prototype.toDisplayString=gt.prototype.toDisplayString=Ct.prototype.toDisplayString=Kt.prototype.toDisplayString=_t.prototype.toDisplayString=At.prototype.toDisplayString=Tt.prototype.toDisplayString=function(){return this.toString()};Te.prototype.toDisplayString=function(){if(this.args.length>0){let t=this.args.map(e=>e.toDisplayString());return this.ruleName+"<"+t.join(",")+">"}else return this.ruleName};yt.prototype.toDisplayString=function(){return"Unicode ["+this.categoryOrProp+"] character"};function Y3(t){return t==="description"||t==="string"||t==="code"}var yr=class t{constructor(e,r,i){if(!Y3(i))throw new Error("invalid Failure type: "+i);this.pexpr=e,this.text=r,this.type=i,this.fluffy=!1}getPExpr(){return this.pexpr}getText(){return this.text}getType(){return this.type}isDescription(){return this.type==="description"}isStringTerminal(){return this.type==="string"}isCode(){return this.type==="code"}isFluffy(){return this.fluffy}makeFluffy(){this.fluffy=!0}clearFluffy(){this.fluffy=!1}subsumes(e){return this.getText()===e.getText()&&this.type===e.type&&(!this.isFluffy()||this.isFluffy()&&e.isFluffy())}toString(){return this.type==="string"?JSON.stringify(this.getText()):this.getText()}clone(){let e=new t(this.pexpr,this.text,this.type);return this.isFluffy()&&e.makeFluffy(),e}toKey(){return this.toString()+"#"+this.type}};me.prototype.toFailure=ar("toFailure");Qt.toFailure=function(t){return new yr(this,"any object","description")};Yt.toFailure=function(t){return new yr(this,"end of input","description")};_t.prototype.toFailure=function(t){return new yr(this,this.obj,"string")};At.prototype.toFailure=function(t){return new yr(this,JSON.stringify(this.from)+".."+JSON.stringify(this.to),"code")};gt.prototype.toFailure=function(t){let e=this.expr===Qt?"nothing":"not "+this.expr.toFailure(t);return new yr(this,e,"description")};Ct.prototype.toFailure=function(t){return this.expr.toFailure(t)};Te.prototype.toFailure=function(t){let{description:e}=t.rules[this.ruleName];return e||(e=(/^[aeiouAEIOU]/.test(this.ruleName)?"an":"a")+" "+this.ruleName),new yr(this,e,"description")};yt.prototype.toFailure=function(t){return new yr(this,"a Unicode ["+this.categoryOrProp+"] character","description")};st.prototype.toFailure=function(t){let r="("+this.terms.map(i=>i.toFailure(t)).join(" or ")+")";return new yr(this,r,"description")};lt.prototype.toFailure=function(t){let r="("+this.factors.map(i=>i.toFailure(t)).join(" ")+")";return new yr(this,r,"description")};qt.prototype.toFailure=function(t){let e="("+this.expr.toFailure(t)+this.operator+")";return new yr(this,e,"description")};me.prototype.toString=ar("toString");Qt.toString=function(){return"any"};Yt.toString=function(){return"end"};_t.prototype.toString=function(){return JSON.stringify(this.obj)};At.prototype.toString=function(){return JSON.stringify(this.from)+".."+JSON.stringify(this.to)};Tt.prototype.toString=function(){return"$"+this.index};Kt.prototype.toString=function(){return"#("+this.expr.toString()+")"};st.prototype.toString=function(){return this.terms.length===1?this.terms[0].toString():"("+this.terms.map(t=>t.toString()).join(" | ")+")"};lt.prototype.toString=function(){return this.factors.length===1?this.factors[0].toString():"("+this.factors.map(t=>t.toString()).join(" ")+")"};qt.prototype.toString=function(){return this.expr+this.operator};gt.prototype.toString=function(){return"~"+this.expr};Ct.prototype.toString=function(){return"&"+this.expr};Te.prototype.toString=function(){if(this.args.length>0){let t=this.args.map(e=>e.toString());return this.ruleName+"<"+t.join(",")+">"}else return this.ruleName};yt.prototype.toString=function(){return"\\p{"+this.categoryOrProp+"}"};var Fg=class t extends me{constructor(e){super(),this.obj=e}_getString(e){let r=e.currentApplication().args[this.obj.index];return sr(r instanceof _t,"expected a Terminal expression"),r.obj}allowsSkippingPrecedingSpace(){return!0}eval(e){let{inputStream:r}=e,i=r.pos,n=this._getString(e);return r.matchString(n,!0)?(e.pushBinding(new Gi(n.length),i),!0):(e.processFailure(i,this),!1)}getArity(){return 1}substituteParams(e){return new t(this.obj.substituteParams(e))}toDisplayString(){return this.obj.toDisplayString()+" (case-insensitive)"}toFailure(e){return new yr(this,this.obj.toFailure(e)+" (case-insensitive)","description")}_isNullable(e,r){return this.obj._isNullable(e,r)}},Px;kx(t=>{Px=t.rules.applySyntactic.body});var Tg=new Te("spaces"),jg=class{constructor(e,r,i){this.matcher=e,this.startExpr=r,this.grammar=e.grammar,this.input=e.getInput(),this.inputStream=new ha(this.input),this.memoTable=e._memoTable,this.userData=void 0,this.doNotMemoize=!1,this._bindings=[],this._bindingOffsets=[],this._applicationStack=[],this._posStack=[0],this.inLexifiedContextStack=[!1],this.rightmostFailurePosition=-1,this._rightmostFailurePositionStack=[],this._recordedFailuresStack=[],i!==void 0&&(this.positionToRecordFailures=i,this.recordedFailures=Object.create(null))}posToOffset(e){return e-this._posStack[this._posStack.length-1]}enterApplication(e,r){this._posStack.push(this.inputStream.pos),this._applicationStack.push(r),this.inLexifiedContextStack.push(!1),e.enter(r),this._rightmostFailurePositionStack.push(this.rightmostFailurePosition),this.rightmostFailurePosition=-1}exitApplication(e,r){let i=this._posStack.pop();this._applicationStack.pop(),this.inLexifiedContextStack.pop(),e.exit(),this.rightmostFailurePosition=Math.max(this.rightmostFailurePosition,this._rightmostFailurePositionStack.pop()),r&&this.pushBinding(r,i)}enterLexifiedContext(){this.inLexifiedContextStack.push(!0)}exitLexifiedContext(){this.inLexifiedContextStack.pop()}currentApplication(){return this._applicationStack[this._applicationStack.length-1]}inSyntacticContext(){let e=this.currentApplication();return e?e.isSyntactic()&&!this.inLexifiedContext():this.startExpr.factors[0].isSyntactic()}inLexifiedContext(){return this.inLexifiedContextStack[this.inLexifiedContextStack.length-1]}skipSpaces(){return this.pushFailuresInfo(),this.eval(Tg),this.popBinding(),this.popFailuresInfo(),this.inputStream.pos}skipSpacesIfInSyntacticContext(){return this.inSyntacticContext()?this.skipSpaces():this.inputStream.pos}maybeSkipSpacesBefore(e){return e.allowsSkippingPrecedingSpace()&&e!==Tg?this.skipSpacesIfInSyntacticContext():this.inputStream.pos}pushBinding(e,r){this._bindings.push(e),this._bindingOffsets.push(this.posToOffset(r))}popBinding(){this._bindings.pop(),this._bindingOffsets.pop()}numBindings(){return this._bindings.length}truncateBindings(e){for(;this._bindings.length>e;)this.popBinding()}getCurrentPosInfo(){return this.getPosInfo(this.inputStream.pos)}getPosInfo(e){let r=this.memoTable[e];return r||(r=this.memoTable[e]=new Rg),r}processFailure(e,r){if(this.rightmostFailurePosition=Math.max(this.rightmostFailurePosition,e),this.recordedFailures&&e===this.positionToRecordFailures){let i=this.currentApplication();i&&(r=r.substituteParams(i.args)),this.recordFailure(r.toFailure(this.grammar),!1)}}recordFailure(e,r){let i=e.toKey();this.recordedFailures[i]?this.recordedFailures[i].isFluffy()&&!e.isFluffy()&&this.recordedFailures[i].clearFluffy():this.recordedFailures[i]=r?e.clone():e}recordFailures(e,r){Object.keys(e).forEach(i=>{this.recordFailure(e[i],r)})}cloneRecordedFailures(){if(!this.recordedFailures)return;let e=Object.create(null);return Object.keys(this.recordedFailures).forEach(r=>{e[r]=this.recordedFailures[r].clone()}),e}getRightmostFailurePosition(){return this.rightmostFailurePosition}_getRightmostFailureOffset(){return this.rightmostFailurePosition>=0?this.posToOffset(this.rightmostFailurePosition):-1}getMemoizedTraceEntry(e,r){let i=this.memoTable[e];if(i&&r instanceof Te){let n=i.memo[r.toMemoKey()];if(n&&n.traceEntry){let s=n.traceEntry.cloneWithExpr(r);return s.isMemoized=!0,s}}return null}getTraceEntry(e,r,i,n){if(r instanceof Te){let s=this.currentApplication(),a=s?s.args:[];r=r.substituteParams(a)}return this.getMemoizedTraceEntry(e,r)||new da(this.input,e,this.inputStream.pos,r,i,n,this.trace)}isTracing(){return!!this.trace}hasNecessaryInfo(e){return this.trace&&!e.traceEntry?!1:this.recordedFailures&&this.inputStream.pos+e.rightmostFailureOffset===this.positionToRecordFailures?!!e.failuresAtRightmostPosition:!0}useMemoizedResult(e,r){this.trace&&this.trace.push(r.traceEntry);let i=this.inputStream.pos+r.rightmostFailureOffset;return this.rightmostFailurePosition=Math.max(this.rightmostFailurePosition,i),this.recordedFailures&&this.positionToRecordFailures===i&&r.failuresAtRightmostPosition&&this.recordFailures(r.failuresAtRightmostPosition,!0),this.inputStream.examinedLength=Math.max(this.inputStream.examinedLength,r.examinedLength+e),r.value?(this.inputStream.pos+=r.matchLength,this.pushBinding(r.value,e),!0):!1}eval(e){let{inputStream:r}=this,i=this._bindings.length,n=this.userData,s;this.recordedFailures&&(s=this.recordedFailures,this.recordedFailures=Object.create(null));let a=r.pos,o=this.maybeSkipSpacesBefore(e),u;this.trace&&(u=this.trace,this.trace=[]);let l=e.eval(this);if(this.trace){let f=this._bindings.slice(i),h=this.getTraceEntry(o,e,l,f);h.isImplicitSpaces=e===Tg,h.isRootNode=e===this.startExpr,u.push(h),this.trace=u}return l?this.recordedFailures&&r.pos===this.positionToRecordFailures&&Object.keys(this.recordedFailures).forEach(f=>{this.recordedFailures[f].makeFluffy()}):(r.pos=a,this.truncateBindings(i),this.userData=n),this.recordedFailures&&this.recordFailures(s,!1),e===Px&&this.skipSpaces(),l}getMatchResult(){this.grammar._setUpMatchState(this),this.eval(this.startExpr);let e;this.recordedFailures&&(e=Object.keys(this.recordedFailures).map(i=>this.recordedFailures[i]));let r=this._bindings[0];return r&&(r.grammar=this.grammar),new bl(this.matcher,this.input,this.startExpr,r,this._bindingOffsets[0],this.rightmostFailurePosition,e)}getTrace(){this.trace=[];let e=this.getMatchResult(),r=this.trace[this.trace.length-1];return r.result=e,r}pushFailuresInfo(){this._rightmostFailurePositionStack.push(this.rightmostFailurePosition),this._recordedFailuresStack.push(this.recordedFailures)}popFailuresInfo(){this.rightmostFailurePosition=this._rightmostFailurePositionStack.pop(),this.recordedFailures=this._recordedFailuresStack.pop()}},Bg=class{constructor(e){this.grammar=e,this._memoTable=[],this._input="",this._isMemoTableStale=!1}_resetMemoTable(){this._memoTable=[],this._isMemoTableStale=!1}getInput(){return this._input}setInput(e){return this._input!==e&&this.replaceInputRange(0,this._input.length,e),this}replaceInputRange(e,r,i){let n=this._input,s=this._memoTable;if(e<0||e>n.length||r<0||r>n.length||e>r)throw new Error("Invalid indices: "+e+" and "+r);this._input=n.slice(0,e)+i+n.slice(r),this._input!==n&&s.length>0&&(this._isMemoTableStale=!0);let a=s.slice(r);s.length=e;for(let o=0;o<i.length;o++)s.push(void 0);for(let o of a)s.push(o);for(let o=0;o<e;o++){let u=s[o];u&&u.clearObsoleteEntries(o,e)}return this}match(e,r={incremental:!0}){return this._match(this._getStartExpr(e),{incremental:r.incremental,tracing:!1})}trace(e,r={incremental:!0}){return this._match(this._getStartExpr(e),{incremental:r.incremental,tracing:!0})}_match(e,r={}){let i={tracing:!1,incremental:!0,positionToRecordFailures:void 0,...r};if(!i.incremental)this._resetMemoTable();else if(this._isMemoTableStale&&!this.grammar.supportsIncrementalParsing)throw A3(this.grammar);let n=new jg(this,e,i.positionToRecordFailures);return i.tracing?n.getTrace():n.getMatchResult()}_getStartExpr(e){let r=e||this.grammar.defaultStartRule;if(!r)throw new Error("Missing start rule argument -- the grammar has no default start rule.");let i=this.grammar.parseApplication(r);return new lt([i,Yt])}},Bo=[],Vg=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),xl=class{constructor(e,r,i){this._node=e,this.source=r,this._baseInterval=i,e.isNonterminal()&&sr(r===i),this._childWrappers=[]}_forgetMemoizedResultFor(e){delete this._node[this._semantics.attributeKeys[e]],this.children.forEach(r=>{r._forgetMemoizedResultFor(e)})}child(e){if(!(0<=e&&e<this._node.numChildren()))return;let r=this._childWrappers[e];if(!r){let i=this._node.childAt(e),n=this._node.childOffsets[e],s=this._baseInterval.subInterval(n,i.matchLength),a=i.isNonterminal()?s:this._baseInterval;r=this._childWrappers[e]=this._semantics.wrap(i,s,a)}return r}_children(){for(let e=0;e<this._node.numChildren();e++)this.child(e);return this._childWrappers}isIteration(){return this._node.isIteration()}isTerminal(){return this._node.isTerminal()}isNonterminal(){return this._node.isNonterminal()}isSyntactic(){return this.isNonterminal()&&this._node.isSyntactic()}isLexical(){return this.isNonterminal()&&this._node.isLexical()}isOptional(){return this._node.isOptional()}iteration(e){let r=e||[],i=r.map(a=>a._node),n=new wl(i,[],-1,!1),s=this._semantics.wrap(n,null,null);return s._childWrappers=r,s}get children(){return this._children()}get ctorName(){return this._node.ctorName}get numChildren(){return this._node.numChildren()}get sourceString(){return this.source.contents}},mr=class t{constructor(e,r){let i=this;if(this.grammar=e,this.checkedActionDicts=!1,this.Wrapper=class extends(r?r.Wrapper:xl){constructor(n,s,a){super(n,s,a),i.checkActionDictsIfHaventAlready(),this._semantics=i}toString(){return"[semantics wrapper for "+i.grammar.name+"]"}},this.super=r,r){if(!(e.equals(this.super.grammar)||e._inheritsFrom(this.super.grammar)))throw new Error("Cannot extend a semantics for grammar '"+this.super.grammar.name+"' for use with grammar '"+e.name+"' (not a sub-grammar)");this.operations=Object.create(this.super.operations),this.attributes=Object.create(this.super.attributes),this.attributeKeys=Object.create(null);for(let n in this.attributes)Object.defineProperty(this.attributeKeys,n,{value:Zw(n)})}else this.operations=Object.create(null),this.attributes=Object.create(null),this.attributeKeys=Object.create(null)}toString(){return"[semantics for "+this.grammar.name+"]"}checkActionDictsIfHaventAlready(){this.checkedActionDicts||(this.checkActionDicts(),this.checkedActionDicts=!0)}checkActionDicts(){let e;for(e in this.operations)this.operations[e].checkActionDict(this.grammar);for(e in this.attributes)this.attributes[e].checkActionDict(this.grammar)}toRecipe(e){function r(n){return n.super!==t.BuiltInSemantics._getSemantics()}let i=`(function(g) {
|
|
34
|
-
`;if(r(this)){i+=" var semantics = "+this.super.toRecipe(!0)+"(g";let n=this.super.grammar,s=this.grammar;for(;s!==n;)i+=".superGrammar",s=s.superGrammar;i+=`);
|
|
35
|
-
`,i+=" return g.extendSemantics(semantics)"}else i+=" return g.createSemantics()";return["Operation","Attribute"].forEach(n=>{let s=this[n.toLowerCase()+"s"];Object.keys(s).forEach(a=>{let{actionDict:o,formals:u,builtInDefault:l}=s[a],f=a;u.length>0&&(f+="("+u.join(", ")+")");let h;r(this)&&this.super[n.toLowerCase()+"s"][a]?h="extend"+n:h="add"+n,i+=`
|
|
36
|
-
.`+h+"("+JSON.stringify(f)+", {";let p=[];Object.keys(o).forEach(m=>{if(o[m]!==l){let v=o[m].toString().trim();v=v.replace(/^.*\(/,"function("),p.push(`
|
|
37
|
-
`+JSON.stringify(m)+": "+v)}}),i+=p.join(",")+`
|
|
38
|
-
})`})}),i+=`;
|
|
39
|
-
})`,e||(i=`(function() {
|
|
40
|
-
var grammar = this.fromRecipe(`+this.grammar.toRecipe()+`);
|
|
41
|
-
var semantics = `+i+`(grammar);
|
|
42
|
-
return semantics;
|
|
43
|
-
});
|
|
44
|
-
`),i}addOperationOrAttribute(e,r,i){let n=e+"s",s=px(r,e),{name:a}=s,{formals:o}=s;this.assertNewName(a,e);let u=X3(e,a,h),l={_default:u};Object.keys(i).forEach(p=>{l[p]=i[p]});let f=e==="operation"?new cs(a,o,l,u):new $o(a,l,u);f.checkActionDict(this.grammar),this[n][a]=f;function h(...p){let m=this._semantics[n][a];if(arguments.length!==m.formals.length)throw new Error("Invalid number of arguments passed to "+a+" "+e+" (expected "+m.formals.length+", got "+arguments.length+")");let v=Object.create(null);for(let[g,k]of Object.entries(p)){let w=m.formals[g];v[w]=k}let S=this.args;this.args=v;let b=m.execute(this._semantics,this);return this.args=S,b}e==="operation"?(this.Wrapper.prototype[a]=h,this.Wrapper.prototype[a].toString=function(){return"["+a+" operation]"}):(Object.defineProperty(this.Wrapper.prototype,a,{get:h,configurable:!0}),Object.defineProperty(this.attributeKeys,a,{value:Zw(a)}))}extendOperationOrAttribute(e,r,i){let n=e+"s";if(px(r,"attribute"),!(this.super&&r in this.super[n]))throw new Error("Cannot extend "+e+" '"+r+"': did not inherit an "+e+" with that name");if(Vg(this[n],r))throw new Error("Cannot extend "+e+" '"+r+"' again");let s=this[n][r].formals,a=this[n][r].actionDict,o=Object.create(a);Object.keys(i).forEach(u=>{o[u]=i[u]}),this[n][r]=e==="operation"?new cs(r,s,o):new $o(r,o),this[n][r].checkActionDict(this.grammar)}assertNewName(e,r){if(Vg(xl.prototype,e))throw new Error("Cannot add "+r+" '"+e+"': that's a reserved name");if(e in this.operations)throw new Error("Cannot add "+r+" '"+e+"': an operation with that name already exists");if(e in this.attributes)throw new Error("Cannot add "+r+" '"+e+"': an attribute with that name already exists")}wrap(e,r,i){let n=i||r;return e instanceof this.Wrapper?e:new this.Wrapper(e,r,n)}};function px(t,e){if(!mr.prototypeGrammar)return sr(t.indexOf("(")===-1),{name:t,formals:[]};let r=mr.prototypeGrammar.match(t,e==="operation"?"OperationSignature":"AttributeSignature");if(r.failed())throw new Error(r.message);return mr.prototypeGrammarSemantics(r).parse()}function X3(t,e,r){return function(...i){let s=(this._semantics.operations[e]||this._semantics.attributes[e]).formals.map(a=>this.args[a]);if(!this.isIteration()&&i.length===1)return r.apply(i[0],s);throw F3(this.ctorName,e,t,Bo)}}mr.createSemantics=function(t,e){let r=new mr(t,e!==void 0?e:mr.BuiltInSemantics._getSemantics()),i=function(s){if(!(s instanceof bl))throw new TypeError("Semantics expected a MatchResult, but got "+Ug(s));if(s.failed())throw new TypeError("cannot apply Semantics to "+s.toString());let a=s._cst;if(a.grammar!==t)throw new Error("Cannot use a MatchResult from grammar '"+a.grammar.name+"' with a semantics for '"+t.name+"'");let o=new ha(s.input);return r.wrap(a,o.interval(s._cstOffset,s.input.length))};return i.addOperation=function(n,s){return r.addOperationOrAttribute("operation",n,s),i},i.extendOperation=function(n,s){return r.extendOperationOrAttribute("operation",n,s),i},i.addAttribute=function(n,s){return r.addOperationOrAttribute("attribute",n,s),i},i.extendAttribute=function(n,s){return r.extendOperationOrAttribute("attribute",n,s),i},i._getActionDict=function(n){let s=r.operations[n]||r.attributes[n];if(!s)throw new Error('"'+n+'" is not a valid operation or attribute name in this semantics for "'+t.name+'"');return s.actionDict},i._remove=function(n){let s;return n in r.operations?(s=r.operations[n],delete r.operations[n]):n in r.attributes&&(s=r.attributes[n],delete r.attributes[n]),delete r.Wrapper.prototype[n],s},i.getOperationNames=function(){return Object.keys(r.operations)},i.getAttributeNames=function(){return Object.keys(r.attributes)},i.getGrammar=function(){return r.grammar},i.toRecipe=function(n){return r.toRecipe(n)},i.toString=r.toString.bind(r),i._getSemantics=function(){return r},i};var cs=class{constructor(e,r,i,n){this.name=e,this.formals=r,this.actionDict=i,this.builtInDefault=n}checkActionDict(e){e._checkTopDownActionDict(this.typeName,this.name,this.actionDict)}execute(e,r){try{let{ctorName:i}=r._node,n=this.actionDict[i];return n?(Bo.push([this,i]),n.apply(r,r._children())):r.isNonterminal()&&(n=this.actionDict._nonterminal,n)?(Bo.push([this,"_nonterminal",i]),n.apply(r,r._children())):(Bo.push([this,"default action",i]),this.actionDict._default.apply(r,r._children()))}finally{Bo.pop()}}};cs.prototype.typeName="operation";var $o=class extends cs{constructor(e,r,i){super(e,[],r,i)}execute(e,r){let i=r._node,n=e.attributeKeys[this.name];return Vg(i,n)||(i[n]=cs.prototype.execute.call(this,e,r)),i[n]}};$o.prototype.typeName="attribute";var hx=["_iter","_terminal","_nonterminal","_default"];function dx(t){return Object.keys(t.rules).sort().map(e=>t.rules[e])}var Z3=t=>t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"),qx,Cx,gr=class t{constructor(e,r,i,n){if(this.name=e,this.superGrammar=r,this.rules=i,n){if(!(n in i))throw new Error("Invalid start rule: '"+n+"' is not a rule in grammar '"+e+"'");this.defaultStartRule=n}this._matchStateInitializer=void 0,this.supportsIncrementalParsing=!0}matcher(){return new Bg(this)}isBuiltIn(){return this===t.ProtoBuiltInRules||this===t.BuiltInRules}equals(e){if(this===e)return!0;if(e==null||this.name!==e.name||this.defaultStartRule!==e.defaultStartRule||!(this.superGrammar===e.superGrammar||this.superGrammar.equals(e.superGrammar)))return!1;let r=dx(this),i=dx(e);return r.length===i.length&&r.every((n,s)=>n.description===i[s].description&&n.formals.join(",")===i[s].formals.join(",")&&n.body.toString()===i[s].body.toString())}match(e,r){let i=this.matcher();return i.replaceInputRange(0,0,e),i.match(r)}trace(e,r){let i=this.matcher();return i.replaceInputRange(0,0,e),i.trace(r)}createSemantics(){return mr.createSemantics(this)}extendSemantics(e){return mr.createSemantics(this,e._getSemantics())}_checkTopDownActionDict(e,r,i){let n=[];for(let s in i){let a=i[s];if(!hx.includes(s)&&!(s in this.rules)){n.push(`'${s}' is not a valid semantic action for '${this.name}'`);continue}if(typeof a!="function"){n.push(`'${s}' must be a function in an action dictionary for '${this.name}'`);continue}let u=a.length,l=this._topDownActionArity(s);if(u!==l){let f;s==="_iter"||s==="_nonterminal"?f=`it should use a rest parameter, e.g. \`${s}(...children) {}\`. NOTE: this is new in Ohm v16 \u2014 see https://ohmjs.org/d/ati for details.`:f=`expected ${l}, got ${u}`,n.push(`Semantic action '${s}' has the wrong arity: ${f}`)}}if(n.length>0){let s=n.map(o=>"- "+o),a=new Error([`Found errors in the action dictionary of the '${r}' ${e}:`,...s].join(`
|
|
45
|
-
`));throw a.problems=n,a}}_topDownActionArity(e){return hx.includes(e)?0:this.rules[e].body.getArity()}_inheritsFrom(e){let r=this.superGrammar;for(;r;){if(r.equals(e,!0))return!0;r=r.superGrammar}return!1}toRecipe(e=void 0){let r={};this.source&&(r.source=this.source.contents);let i=null;this.defaultStartRule&&(i=this.defaultStartRule);let n={};Object.keys(this.rules).forEach(o=>{let u=this.rules[o],{body:l}=u,f=!this.superGrammar||!this.superGrammar.rules[o],h;f?h="define":h=l instanceof fa?"extend":"override";let p={};if(u.source&&this.source){let S=u.source.relativeTo(this.source);p.sourceInterval=[S.startIdx,S.endIdx]}let m=f?u.description:null,v=l.outputRecipe(u.formals,this.source);n[o]=[h,p,m,u.formals,v]});let s="null";e?s=e:this.superGrammar&&!this.superGrammar.isBuiltIn()&&(s=this.superGrammar.toRecipe());let a=[...["grammar",r,this.name].map(JSON.stringify),s,...[i,n].map(JSON.stringify)];return Z3(`[${a.join(",")}]`)}toOperationActionDictionaryTemplate(){return this._toOperationOrAttributeActionDictionaryTemplate()}toAttributeActionDictionaryTemplate(){return this._toOperationOrAttributeActionDictionaryTemplate()}_toOperationOrAttributeActionDictionaryTemplate(){let e=new ls;e.append("{");let r=!0;for(let i in this.rules){let{body:n}=this.rules[i];r?r=!1:e.append(","),e.append(`
|
|
46
|
-
`),e.append(" "),this.addSemanticActionTemplate(i,n,e)}return e.append(`
|
|
47
|
-
}`),e.contents()}addSemanticActionTemplate(e,r,i){i.append(e),i.append(": function(");let n=this._topDownActionArity(e);i.append(Al("_",n).join(", ")),i.append(`) {
|
|
48
|
-
`),i.append(" }")}parseApplication(e){let r;if(e.indexOf("<")===-1)r=new Te(e);else{let n=qx.match(e,"Base_application");r=Cx(n,{})}if(!(r.ruleName in this.rules))throw Tx(r.ruleName,this.name);let{formals:i}=this.rules[r.ruleName];if(i.length!==r.args.length){let{source:n}=this.rules[r.ruleName];throw Ex(r.ruleName,i.length,r.args.length,n)}return r}_setUpMatchState(e){this._matchStateInitializer&&this._matchStateInitializer(e)}};gr.ProtoBuiltInRules=new gr("ProtoBuiltInRules",void 0,{any:{body:Qt,formals:[],description:"any character",primitive:!0},end:{body:Yt,formals:[],description:"end of input",primitive:!0},caseInsensitive:{body:new Fg(new Tt(0)),formals:["str"],primitive:!0},lower:{body:new yt("Ll"),formals:[],description:"a lowercase letter",primitive:!0},upper:{body:new yt("Lu"),formals:[],description:"an uppercase letter",primitive:!0},unicodeLtmo:{body:new yt("Ltmo"),formals:[],description:"a Unicode character in Lt, Lm, or Lo",primitive:!0},spaces:{body:new Hi(new Te("space")),formals:[]},space:{body:new At("\0"," "),formals:[],description:"a space"}});gr.initApplicationParser=function(t,e){qx=t,Cx=e};var kl=class{constructor(e){this.name=e}sourceInterval(e,r){return this.source.subInterval(e,r-e)}ensureSuperGrammar(){return this.superGrammar||this.withSuperGrammar(this.name==="BuiltInRules"?gr.ProtoBuiltInRules:gr.BuiltInRules),this.superGrammar}ensureSuperGrammarRuleForOverriding(e,r){let i=this.ensureSuperGrammar().rules[e];if(!i)throw T3(e,this.superGrammar.name,r);return i}installOverriddenOrExtendedRule(e,r,i,n){let s=Ng(r);if(s.length>0)throw cx(e,s,n);let a=this.ensureSuperGrammar().rules[e],o=a.formals,u=o?o.length:0;if(r.length!==u)throw Ex(e,u,r.length,n);return this.install(e,r,i,a.description,n)}install(e,r,i,n,s,a=!1){return this.rules[e]={body:i.introduceParams(r),formals:r,description:n,source:s,primitive:a},this}withSuperGrammar(e){if(this.superGrammar)throw new Error("the super grammar of a GrammarDecl cannot be set more than once");return this.superGrammar=e,this.rules=Object.create(e.rules),e.isBuiltIn()||(this.defaultStartRule=e.defaultStartRule),this}withDefaultStartRule(e){return this.defaultStartRule=e,this}withSource(e){return this.source=new ha(e).interval(0,e.length),this}build(){let e=new gr(this.name,this.ensureSuperGrammar(),this.rules,this.defaultStartRule);e._matchStateInitializer=e.superGrammar._matchStateInitializer,e.supportsIncrementalParsing=e.superGrammar.supportsIncrementalParsing;let r=[],i=!1;return Object.keys(e.rules).forEach(n=>{let{body:s}=e.rules[n];try{s.assertChoicesHaveUniformArity(n)}catch(a){r.push(a)}try{s.assertAllApplicationsAreValid(n,e)}catch(a){r.push(a),i=!0}}),i||Object.keys(e.rules).forEach(n=>{let{body:s}=e.rules[n];try{s.assertIteratedExprsAreNotNullable(e,[])}catch(a){r.push(a)}}),r.length>0&&j3(r),this.source&&(e.source=this.source),e}define(e,r,i,n,s,a){if(this.ensureSuperGrammar(),this.superGrammar.rules[e])throw ux(e,this.name,this.superGrammar.name,s);if(this.rules[e])throw ux(e,this.name,this.name,s);let o=Ng(r);if(o.length>0)throw cx(e,o,s);return this.install(e,r,i,n,s,a)}override(e,r,i,n,s){return this.ensureSuperGrammarRuleForOverriding(e,s),this.installOverriddenOrExtendedRule(e,r,i,s),this}extend(e,r,i,n,s){if(!this.ensureSuperGrammar().rules[e])throw E3(e,this.superGrammar.name,s);let o=new fa(this.superGrammar,e,i);return o.source=i.source,this.installOverriddenOrExtendedRule(e,r,o,s),this}},ma=class{constructor(e){this.currentDecl=null,this.currentRuleName=null,this.options=e||{}}newGrammar(e){return new kl(e)}grammar(e,r,i,n,s){let a=new kl(r);return i&&a.withSuperGrammar(i instanceof gr?i:this.fromRecipe(i)),n&&a.withDefaultStartRule(n),e&&e.source&&a.withSource(e.source),this.currentDecl=a,Object.keys(s).forEach(o=>{this.currentRuleName=o;let u=s[o],l=u[0],f=u[1],h=u[2],p=u[3],m=this.fromRecipe(u[4]),v;a.source&&f&&f.sourceInterval&&(v=a.source.subInterval(f.sourceInterval[0],f.sourceInterval[1]-f.sourceInterval[0])),a[l](o,p,m,h,v)}),this.currentRuleName=this.currentDecl=null,a.build()}terminal(e){return new _t(e)}range(e,r){return new At(e,r)}param(e){return new Tt(e)}alt(...e){let r=[];for(let i of e)i instanceof me||(i=this.fromRecipe(i)),i instanceof st?r=r.concat(i.terms):r.push(i);return r.length===1?r[0]:new st(r)}seq(...e){let r=[];for(let i of e)i instanceof me||(i=this.fromRecipe(i)),i instanceof lt?r=r.concat(i.factors):r.push(i);return r.length===1?r[0]:new lt(r)}star(e){return e instanceof me||(e=this.fromRecipe(e)),new Hi(e)}plus(e){return e instanceof me||(e=this.fromRecipe(e)),new gn(e)}opt(e){return e instanceof me||(e=this.fromRecipe(e)),new oi(e)}not(e){return e instanceof me||(e=this.fromRecipe(e)),new gt(e)}lookahead(e){return e instanceof me||(e=this.fromRecipe(e)),this.options.eliminateLookaheads?new gt(new gt(e)):new Ct(e)}lex(e){return e instanceof me||(e=this.fromRecipe(e)),new Kt(e)}app(e,r){return r&&r.length>0&&(r=r.map(function(i){return i instanceof me?i:this.fromRecipe(i)},this)),new Te(e,r)}splice(e,r){return new pa(this.currentDecl.superGrammar,this.currentRuleName,e.map(i=>this.fromRecipe(i)),r.map(i=>this.fromRecipe(i)))}fromRecipe(e){let r=e[0]==="grammar"?e.slice(1):e.slice(2),i=this[e[0]](...r),n=e[1];return n&&n.sourceInterval&&this.currentDecl&&i.withSource(this.currentDecl.sourceInterval(...n.sourceInterval)),i}};function Wg(t){return typeof t=="function"?t.call(new ma):(typeof t=="string"&&(t=JSON.parse(t)),new ma().fromRecipe(t))}var zg=Wg(["grammar",{source:`BuiltInRules {
|
|
49
|
-
|
|
50
|
-
alnum (an alpha-numeric character)
|
|
51
|
-
= letter
|
|
52
|
-
| digit
|
|
53
|
-
|
|
54
|
-
letter (a letter)
|
|
55
|
-
= lower
|
|
56
|
-
| upper
|
|
57
|
-
| unicodeLtmo
|
|
58
|
-
|
|
59
|
-
digit (a digit)
|
|
60
|
-
= "0".."9"
|
|
61
|
-
|
|
62
|
-
hexDigit (a hexadecimal digit)
|
|
63
|
-
= digit
|
|
64
|
-
| "a".."f"
|
|
65
|
-
| "A".."F"
|
|
66
|
-
|
|
67
|
-
ListOf<elem, sep>
|
|
68
|
-
= NonemptyListOf<elem, sep>
|
|
69
|
-
| EmptyListOf<elem, sep>
|
|
70
|
-
|
|
71
|
-
NonemptyListOf<elem, sep>
|
|
72
|
-
= elem (sep elem)*
|
|
73
|
-
|
|
74
|
-
EmptyListOf<elem, sep>
|
|
75
|
-
= /* nothing */
|
|
76
|
-
|
|
77
|
-
listOf<elem, sep>
|
|
78
|
-
= nonemptyListOf<elem, sep>
|
|
79
|
-
| emptyListOf<elem, sep>
|
|
80
|
-
|
|
81
|
-
nonemptyListOf<elem, sep>
|
|
82
|
-
= elem (sep elem)*
|
|
83
|
-
|
|
84
|
-
emptyListOf<elem, sep>
|
|
85
|
-
= /* nothing */
|
|
86
|
-
|
|
87
|
-
// Allows a syntactic rule application within a lexical context.
|
|
88
|
-
applySyntactic<app> = app
|
|
89
|
-
}`},"BuiltInRules",null,null,{alnum:["define",{sourceInterval:[18,78]},"an alpha-numeric character",[],["alt",{sourceInterval:[60,78]},["app",{sourceInterval:[60,66]},"letter",[]],["app",{sourceInterval:[73,78]},"digit",[]]]],letter:["define",{sourceInterval:[82,142]},"a letter",[],["alt",{sourceInterval:[107,142]},["app",{sourceInterval:[107,112]},"lower",[]],["app",{sourceInterval:[119,124]},"upper",[]],["app",{sourceInterval:[131,142]},"unicodeLtmo",[]]]],digit:["define",{sourceInterval:[146,177]},"a digit",[],["range",{sourceInterval:[169,177]},"0","9"]],hexDigit:["define",{sourceInterval:[181,254]},"a hexadecimal digit",[],["alt",{sourceInterval:[219,254]},["app",{sourceInterval:[219,224]},"digit",[]],["range",{sourceInterval:[231,239]},"a","f"],["range",{sourceInterval:[246,254]},"A","F"]]],ListOf:["define",{sourceInterval:[258,336]},null,["elem","sep"],["alt",{sourceInterval:[282,336]},["app",{sourceInterval:[282,307]},"NonemptyListOf",[["param",{sourceInterval:[297,301]},0],["param",{sourceInterval:[303,306]},1]]],["app",{sourceInterval:[314,336]},"EmptyListOf",[["param",{sourceInterval:[326,330]},0],["param",{sourceInterval:[332,335]},1]]]]],NonemptyListOf:["define",{sourceInterval:[340,388]},null,["elem","sep"],["seq",{sourceInterval:[372,388]},["param",{sourceInterval:[372,376]},0],["star",{sourceInterval:[377,388]},["seq",{sourceInterval:[378,386]},["param",{sourceInterval:[378,381]},1],["param",{sourceInterval:[382,386]},0]]]]],EmptyListOf:["define",{sourceInterval:[392,434]},null,["elem","sep"],["seq",{sourceInterval:[438,438]}]],listOf:["define",{sourceInterval:[438,516]},null,["elem","sep"],["alt",{sourceInterval:[462,516]},["app",{sourceInterval:[462,487]},"nonemptyListOf",[["param",{sourceInterval:[477,481]},0],["param",{sourceInterval:[483,486]},1]]],["app",{sourceInterval:[494,516]},"emptyListOf",[["param",{sourceInterval:[506,510]},0],["param",{sourceInterval:[512,515]},1]]]]],nonemptyListOf:["define",{sourceInterval:[520,568]},null,["elem","sep"],["seq",{sourceInterval:[552,568]},["param",{sourceInterval:[552,556]},0],["star",{sourceInterval:[557,568]},["seq",{sourceInterval:[558,566]},["param",{sourceInterval:[558,561]},1],["param",{sourceInterval:[562,566]},0]]]]],emptyListOf:["define",{sourceInterval:[572,682]},null,["elem","sep"],["seq",{sourceInterval:[685,685]}]],applySyntactic:["define",{sourceInterval:[685,710]},null,["app"],["param",{sourceInterval:[707,710]},0]]}]);gr.BuiltInRules=zg;m3(gr.BuiltInRules);var El=Wg(["grammar",{source:`Ohm {
|
|
90
|
-
|
|
91
|
-
Grammars
|
|
92
|
-
= Grammar*
|
|
93
|
-
|
|
94
|
-
Grammar
|
|
95
|
-
= ident SuperGrammar? "{" Rule* "}"
|
|
96
|
-
|
|
97
|
-
SuperGrammar
|
|
98
|
-
= "<:" ident
|
|
99
|
-
|
|
100
|
-
Rule
|
|
101
|
-
= ident Formals? ruleDescr? "=" RuleBody -- define
|
|
102
|
-
| ident Formals? ":=" OverrideRuleBody -- override
|
|
103
|
-
| ident Formals? "+=" RuleBody -- extend
|
|
104
|
-
|
|
105
|
-
RuleBody
|
|
106
|
-
= "|"? NonemptyListOf<TopLevelTerm, "|">
|
|
107
|
-
|
|
108
|
-
TopLevelTerm
|
|
109
|
-
= Seq caseName -- inline
|
|
110
|
-
| Seq
|
|
111
|
-
|
|
112
|
-
OverrideRuleBody
|
|
113
|
-
= "|"? NonemptyListOf<OverrideTopLevelTerm, "|">
|
|
114
|
-
|
|
115
|
-
OverrideTopLevelTerm
|
|
116
|
-
= "..." -- superSplice
|
|
117
|
-
| TopLevelTerm
|
|
118
|
-
|
|
119
|
-
Formals
|
|
120
|
-
= "<" ListOf<ident, ","> ">"
|
|
121
|
-
|
|
122
|
-
Params
|
|
123
|
-
= "<" ListOf<Seq, ","> ">"
|
|
124
|
-
|
|
125
|
-
Alt
|
|
126
|
-
= NonemptyListOf<Seq, "|">
|
|
127
|
-
|
|
128
|
-
Seq
|
|
129
|
-
= Iter*
|
|
130
|
-
|
|
131
|
-
Iter
|
|
132
|
-
= Pred "*" -- star
|
|
133
|
-
| Pred "+" -- plus
|
|
134
|
-
| Pred "?" -- opt
|
|
135
|
-
| Pred
|
|
136
|
-
|
|
137
|
-
Pred
|
|
138
|
-
= "~" Lex -- not
|
|
139
|
-
| "&" Lex -- lookahead
|
|
140
|
-
| Lex
|
|
141
|
-
|
|
142
|
-
Lex
|
|
143
|
-
= "#" Base -- lex
|
|
144
|
-
| Base
|
|
145
|
-
|
|
146
|
-
Base
|
|
147
|
-
= ident Params? ~(ruleDescr? "=" | ":=" | "+=") -- application
|
|
148
|
-
| oneCharTerminal ".." oneCharTerminal -- range
|
|
149
|
-
| terminal -- terminal
|
|
150
|
-
| "(" Alt ")" -- paren
|
|
151
|
-
|
|
152
|
-
ruleDescr (a rule description)
|
|
153
|
-
= "(" ruleDescrText ")"
|
|
154
|
-
|
|
155
|
-
ruleDescrText
|
|
156
|
-
= (~")" any)*
|
|
157
|
-
|
|
158
|
-
caseName
|
|
159
|
-
= "--" (~"\\n" space)* name (~"\\n" space)* ("\\n" | &"}")
|
|
160
|
-
|
|
161
|
-
name (a name)
|
|
162
|
-
= nameFirst nameRest*
|
|
163
|
-
|
|
164
|
-
nameFirst
|
|
165
|
-
= "_"
|
|
166
|
-
| letter
|
|
167
|
-
|
|
168
|
-
nameRest
|
|
169
|
-
= "_"
|
|
170
|
-
| alnum
|
|
171
|
-
|
|
172
|
-
ident (an identifier)
|
|
173
|
-
= name
|
|
174
|
-
|
|
175
|
-
terminal
|
|
176
|
-
= "\\"" terminalChar* "\\""
|
|
177
|
-
|
|
178
|
-
oneCharTerminal
|
|
179
|
-
= "\\"" terminalChar "\\""
|
|
180
|
-
|
|
181
|
-
terminalChar
|
|
182
|
-
= escapeChar
|
|
183
|
-
| ~"\\\\" ~"\\"" ~"\\n" "\\u{0}".."\\u{10FFFF}"
|
|
184
|
-
|
|
185
|
-
escapeChar (an escape sequence)
|
|
186
|
-
= "\\\\\\\\" -- backslash
|
|
187
|
-
| "\\\\\\"" -- doubleQuote
|
|
188
|
-
| "\\\\\\'" -- singleQuote
|
|
189
|
-
| "\\\\b" -- backspace
|
|
190
|
-
| "\\\\n" -- lineFeed
|
|
191
|
-
| "\\\\r" -- carriageReturn
|
|
192
|
-
| "\\\\t" -- tab
|
|
193
|
-
| "\\\\u{" hexDigit hexDigit? hexDigit?
|
|
194
|
-
hexDigit? hexDigit? hexDigit? "}" -- unicodeCodePoint
|
|
195
|
-
| "\\\\u" hexDigit hexDigit hexDigit hexDigit -- unicodeEscape
|
|
196
|
-
| "\\\\x" hexDigit hexDigit -- hexEscape
|
|
197
|
-
|
|
198
|
-
space
|
|
199
|
-
+= comment
|
|
200
|
-
|
|
201
|
-
comment
|
|
202
|
-
= "//" (~"\\n" any)* &("\\n" | end) -- singleLine
|
|
203
|
-
| "/*" (~"*/" any)* "*/" -- multiLine
|
|
204
|
-
|
|
205
|
-
tokens = token*
|
|
206
|
-
|
|
207
|
-
token = caseName | comment | ident | operator | punctuation | terminal | any
|
|
208
|
-
|
|
209
|
-
operator = "<:" | "=" | ":=" | "+=" | "*" | "+" | "?" | "~" | "&"
|
|
210
|
-
|
|
211
|
-
punctuation = "<" | ">" | "," | "--"
|
|
212
|
-
}`},"Ohm",null,"Grammars",{Grammars:["define",{sourceInterval:[9,32]},null,[],["star",{sourceInterval:[24,32]},["app",{sourceInterval:[24,31]},"Grammar",[]]]],Grammar:["define",{sourceInterval:[36,83]},null,[],["seq",{sourceInterval:[50,83]},["app",{sourceInterval:[50,55]},"ident",[]],["opt",{sourceInterval:[56,69]},["app",{sourceInterval:[56,68]},"SuperGrammar",[]]],["terminal",{sourceInterval:[70,73]},"{"],["star",{sourceInterval:[74,79]},["app",{sourceInterval:[74,78]},"Rule",[]]],["terminal",{sourceInterval:[80,83]},"}"]]],SuperGrammar:["define",{sourceInterval:[87,116]},null,[],["seq",{sourceInterval:[106,116]},["terminal",{sourceInterval:[106,110]},"<:"],["app",{sourceInterval:[111,116]},"ident",[]]]],Rule_define:["define",{sourceInterval:[131,181]},null,[],["seq",{sourceInterval:[131,170]},["app",{sourceInterval:[131,136]},"ident",[]],["opt",{sourceInterval:[137,145]},["app",{sourceInterval:[137,144]},"Formals",[]]],["opt",{sourceInterval:[146,156]},["app",{sourceInterval:[146,155]},"ruleDescr",[]]],["terminal",{sourceInterval:[157,160]},"="],["app",{sourceInterval:[162,170]},"RuleBody",[]]]],Rule_override:["define",{sourceInterval:[188,248]},null,[],["seq",{sourceInterval:[188,235]},["app",{sourceInterval:[188,193]},"ident",[]],["opt",{sourceInterval:[194,202]},["app",{sourceInterval:[194,201]},"Formals",[]]],["terminal",{sourceInterval:[214,218]},":="],["app",{sourceInterval:[219,235]},"OverrideRuleBody",[]]]],Rule_extend:["define",{sourceInterval:[255,305]},null,[],["seq",{sourceInterval:[255,294]},["app",{sourceInterval:[255,260]},"ident",[]],["opt",{sourceInterval:[261,269]},["app",{sourceInterval:[261,268]},"Formals",[]]],["terminal",{sourceInterval:[281,285]},"+="],["app",{sourceInterval:[286,294]},"RuleBody",[]]]],Rule:["define",{sourceInterval:[120,305]},null,[],["alt",{sourceInterval:[131,305]},["app",{sourceInterval:[131,170]},"Rule_define",[]],["app",{sourceInterval:[188,235]},"Rule_override",[]],["app",{sourceInterval:[255,294]},"Rule_extend",[]]]],RuleBody:["define",{sourceInterval:[309,362]},null,[],["seq",{sourceInterval:[324,362]},["opt",{sourceInterval:[324,328]},["terminal",{sourceInterval:[324,327]},"|"]],["app",{sourceInterval:[329,362]},"NonemptyListOf",[["app",{sourceInterval:[344,356]},"TopLevelTerm",[]],["terminal",{sourceInterval:[358,361]},"|"]]]]],TopLevelTerm_inline:["define",{sourceInterval:[385,408]},null,[],["seq",{sourceInterval:[385,397]},["app",{sourceInterval:[385,388]},"Seq",[]],["app",{sourceInterval:[389,397]},"caseName",[]]]],TopLevelTerm:["define",{sourceInterval:[366,418]},null,[],["alt",{sourceInterval:[385,418]},["app",{sourceInterval:[385,397]},"TopLevelTerm_inline",[]],["app",{sourceInterval:[415,418]},"Seq",[]]]],OverrideRuleBody:["define",{sourceInterval:[422,491]},null,[],["seq",{sourceInterval:[445,491]},["opt",{sourceInterval:[445,449]},["terminal",{sourceInterval:[445,448]},"|"]],["app",{sourceInterval:[450,491]},"NonemptyListOf",[["app",{sourceInterval:[465,485]},"OverrideTopLevelTerm",[]],["terminal",{sourceInterval:[487,490]},"|"]]]]],OverrideTopLevelTerm_superSplice:["define",{sourceInterval:[522,543]},null,[],["terminal",{sourceInterval:[522,527]},"..."]],OverrideTopLevelTerm:["define",{sourceInterval:[495,562]},null,[],["alt",{sourceInterval:[522,562]},["app",{sourceInterval:[522,527]},"OverrideTopLevelTerm_superSplice",[]],["app",{sourceInterval:[550,562]},"TopLevelTerm",[]]]],Formals:["define",{sourceInterval:[566,606]},null,[],["seq",{sourceInterval:[580,606]},["terminal",{sourceInterval:[580,583]},"<"],["app",{sourceInterval:[584,602]},"ListOf",[["app",{sourceInterval:[591,596]},"ident",[]],["terminal",{sourceInterval:[598,601]},","]]],["terminal",{sourceInterval:[603,606]},">"]]],Params:["define",{sourceInterval:[610,647]},null,[],["seq",{sourceInterval:[623,647]},["terminal",{sourceInterval:[623,626]},"<"],["app",{sourceInterval:[627,643]},"ListOf",[["app",{sourceInterval:[634,637]},"Seq",[]],["terminal",{sourceInterval:[639,642]},","]]],["terminal",{sourceInterval:[644,647]},">"]]],Alt:["define",{sourceInterval:[651,685]},null,[],["app",{sourceInterval:[661,685]},"NonemptyListOf",[["app",{sourceInterval:[676,679]},"Seq",[]],["terminal",{sourceInterval:[681,684]},"|"]]]],Seq:["define",{sourceInterval:[689,704]},null,[],["star",{sourceInterval:[699,704]},["app",{sourceInterval:[699,703]},"Iter",[]]]],Iter_star:["define",{sourceInterval:[719,736]},null,[],["seq",{sourceInterval:[719,727]},["app",{sourceInterval:[719,723]},"Pred",[]],["terminal",{sourceInterval:[724,727]},"*"]]],Iter_plus:["define",{sourceInterval:[743,760]},null,[],["seq",{sourceInterval:[743,751]},["app",{sourceInterval:[743,747]},"Pred",[]],["terminal",{sourceInterval:[748,751]},"+"]]],Iter_opt:["define",{sourceInterval:[767,783]},null,[],["seq",{sourceInterval:[767,775]},["app",{sourceInterval:[767,771]},"Pred",[]],["terminal",{sourceInterval:[772,775]},"?"]]],Iter:["define",{sourceInterval:[708,794]},null,[],["alt",{sourceInterval:[719,794]},["app",{sourceInterval:[719,727]},"Iter_star",[]],["app",{sourceInterval:[743,751]},"Iter_plus",[]],["app",{sourceInterval:[767,775]},"Iter_opt",[]],["app",{sourceInterval:[790,794]},"Pred",[]]]],Pred_not:["define",{sourceInterval:[809,824]},null,[],["seq",{sourceInterval:[809,816]},["terminal",{sourceInterval:[809,812]},"~"],["app",{sourceInterval:[813,816]},"Lex",[]]]],Pred_lookahead:["define",{sourceInterval:[831,852]},null,[],["seq",{sourceInterval:[831,838]},["terminal",{sourceInterval:[831,834]},"&"],["app",{sourceInterval:[835,838]},"Lex",[]]]],Pred:["define",{sourceInterval:[798,862]},null,[],["alt",{sourceInterval:[809,862]},["app",{sourceInterval:[809,816]},"Pred_not",[]],["app",{sourceInterval:[831,838]},"Pred_lookahead",[]],["app",{sourceInterval:[859,862]},"Lex",[]]]],Lex_lex:["define",{sourceInterval:[876,892]},null,[],["seq",{sourceInterval:[876,884]},["terminal",{sourceInterval:[876,879]},"#"],["app",{sourceInterval:[880,884]},"Base",[]]]],Lex:["define",{sourceInterval:[866,903]},null,[],["alt",{sourceInterval:[876,903]},["app",{sourceInterval:[876,884]},"Lex_lex",[]],["app",{sourceInterval:[899,903]},"Base",[]]]],Base_application:["define",{sourceInterval:[918,979]},null,[],["seq",{sourceInterval:[918,963]},["app",{sourceInterval:[918,923]},"ident",[]],["opt",{sourceInterval:[924,931]},["app",{sourceInterval:[924,930]},"Params",[]]],["not",{sourceInterval:[932,963]},["alt",{sourceInterval:[934,962]},["seq",{sourceInterval:[934,948]},["opt",{sourceInterval:[934,944]},["app",{sourceInterval:[934,943]},"ruleDescr",[]]],["terminal",{sourceInterval:[945,948]},"="]],["terminal",{sourceInterval:[951,955]},":="],["terminal",{sourceInterval:[958,962]},"+="]]]]],Base_range:["define",{sourceInterval:[986,1041]},null,[],["seq",{sourceInterval:[986,1022]},["app",{sourceInterval:[986,1001]},"oneCharTerminal",[]],["terminal",{sourceInterval:[1002,1006]},".."],["app",{sourceInterval:[1007,1022]},"oneCharTerminal",[]]]],Base_terminal:["define",{sourceInterval:[1048,1106]},null,[],["app",{sourceInterval:[1048,1056]},"terminal",[]]],Base_paren:["define",{sourceInterval:[1113,1168]},null,[],["seq",{sourceInterval:[1113,1124]},["terminal",{sourceInterval:[1113,1116]},"("],["app",{sourceInterval:[1117,1120]},"Alt",[]],["terminal",{sourceInterval:[1121,1124]},")"]]],Base:["define",{sourceInterval:[907,1168]},null,[],["alt",{sourceInterval:[918,1168]},["app",{sourceInterval:[918,963]},"Base_application",[]],["app",{sourceInterval:[986,1022]},"Base_range",[]],["app",{sourceInterval:[1048,1056]},"Base_terminal",[]],["app",{sourceInterval:[1113,1124]},"Base_paren",[]]]],ruleDescr:["define",{sourceInterval:[1172,1231]},"a rule description",[],["seq",{sourceInterval:[1210,1231]},["terminal",{sourceInterval:[1210,1213]},"("],["app",{sourceInterval:[1214,1227]},"ruleDescrText",[]],["terminal",{sourceInterval:[1228,1231]},")"]]],ruleDescrText:["define",{sourceInterval:[1235,1266]},null,[],["star",{sourceInterval:[1255,1266]},["seq",{sourceInterval:[1256,1264]},["not",{sourceInterval:[1256,1260]},["terminal",{sourceInterval:[1257,1260]},")"]],["app",{sourceInterval:[1261,1264]},"any",[]]]]],caseName:["define",{sourceInterval:[1270,1338]},null,[],["seq",{sourceInterval:[1285,1338]},["terminal",{sourceInterval:[1285,1289]},"--"],["star",{sourceInterval:[1290,1304]},["seq",{sourceInterval:[1291,1302]},["not",{sourceInterval:[1291,1296]},["terminal",{sourceInterval:[1292,1296]},`
|
|
213
|
-
`]],["app",{sourceInterval:[1297,1302]},"space",[]]]],["app",{sourceInterval:[1305,1309]},"name",[]],["star",{sourceInterval:[1310,1324]},["seq",{sourceInterval:[1311,1322]},["not",{sourceInterval:[1311,1316]},["terminal",{sourceInterval:[1312,1316]},`
|
|
214
|
-
`]],["app",{sourceInterval:[1317,1322]},"space",[]]]],["alt",{sourceInterval:[1326,1337]},["terminal",{sourceInterval:[1326,1330]},`
|
|
215
|
-
`],["lookahead",{sourceInterval:[1333,1337]},["terminal",{sourceInterval:[1334,1337]},"}"]]]]],name:["define",{sourceInterval:[1342,1382]},"a name",[],["seq",{sourceInterval:[1363,1382]},["app",{sourceInterval:[1363,1372]},"nameFirst",[]],["star",{sourceInterval:[1373,1382]},["app",{sourceInterval:[1373,1381]},"nameRest",[]]]]],nameFirst:["define",{sourceInterval:[1386,1418]},null,[],["alt",{sourceInterval:[1402,1418]},["terminal",{sourceInterval:[1402,1405]},"_"],["app",{sourceInterval:[1412,1418]},"letter",[]]]],nameRest:["define",{sourceInterval:[1422,1452]},null,[],["alt",{sourceInterval:[1437,1452]},["terminal",{sourceInterval:[1437,1440]},"_"],["app",{sourceInterval:[1447,1452]},"alnum",[]]]],ident:["define",{sourceInterval:[1456,1489]},"an identifier",[],["app",{sourceInterval:[1485,1489]},"name",[]]],terminal:["define",{sourceInterval:[1493,1531]},null,[],["seq",{sourceInterval:[1508,1531]},["terminal",{sourceInterval:[1508,1512]},'"'],["star",{sourceInterval:[1513,1526]},["app",{sourceInterval:[1513,1525]},"terminalChar",[]]],["terminal",{sourceInterval:[1527,1531]},'"']]],oneCharTerminal:["define",{sourceInterval:[1535,1579]},null,[],["seq",{sourceInterval:[1557,1579]},["terminal",{sourceInterval:[1557,1561]},'"'],["app",{sourceInterval:[1562,1574]},"terminalChar",[]],["terminal",{sourceInterval:[1575,1579]},'"']]],terminalChar:["define",{sourceInterval:[1583,1660]},null,[],["alt",{sourceInterval:[1602,1660]},["app",{sourceInterval:[1602,1612]},"escapeChar",[]],["seq",{sourceInterval:[1621,1660]},["not",{sourceInterval:[1621,1626]},["terminal",{sourceInterval:[1622,1626]},"\\"]],["not",{sourceInterval:[1627,1632]},["terminal",{sourceInterval:[1628,1632]},'"']],["not",{sourceInterval:[1633,1638]},["terminal",{sourceInterval:[1634,1638]},`
|
|
216
|
-
`]],["range",{sourceInterval:[1639,1660]},"\0","\u{10FFFF}"]]]],escapeChar_backslash:["define",{sourceInterval:[1703,1758]},null,[],["terminal",{sourceInterval:[1703,1709]},"\\\\"]],escapeChar_doubleQuote:["define",{sourceInterval:[1765,1822]},null,[],["terminal",{sourceInterval:[1765,1771]},'\\"']],escapeChar_singleQuote:["define",{sourceInterval:[1829,1886]},null,[],["terminal",{sourceInterval:[1829,1835]},"\\'"]],escapeChar_backspace:["define",{sourceInterval:[1893,1948]},null,[],["terminal",{sourceInterval:[1893,1898]},"\\b"]],escapeChar_lineFeed:["define",{sourceInterval:[1955,2009]},null,[],["terminal",{sourceInterval:[1955,1960]},"\\n"]],escapeChar_carriageReturn:["define",{sourceInterval:[2016,2076]},null,[],["terminal",{sourceInterval:[2016,2021]},"\\r"]],escapeChar_tab:["define",{sourceInterval:[2083,2132]},null,[],["terminal",{sourceInterval:[2083,2088]},"\\t"]],escapeChar_unicodeCodePoint:["define",{sourceInterval:[2139,2243]},null,[],["seq",{sourceInterval:[2139,2221]},["terminal",{sourceInterval:[2139,2145]},"\\u{"],["app",{sourceInterval:[2146,2154]},"hexDigit",[]],["opt",{sourceInterval:[2155,2164]},["app",{sourceInterval:[2155,2163]},"hexDigit",[]]],["opt",{sourceInterval:[2165,2174]},["app",{sourceInterval:[2165,2173]},"hexDigit",[]]],["opt",{sourceInterval:[2188,2197]},["app",{sourceInterval:[2188,2196]},"hexDigit",[]]],["opt",{sourceInterval:[2198,2207]},["app",{sourceInterval:[2198,2206]},"hexDigit",[]]],["opt",{sourceInterval:[2208,2217]},["app",{sourceInterval:[2208,2216]},"hexDigit",[]]],["terminal",{sourceInterval:[2218,2221]},"}"]]],escapeChar_unicodeEscape:["define",{sourceInterval:[2250,2309]},null,[],["seq",{sourceInterval:[2250,2291]},["terminal",{sourceInterval:[2250,2255]},"\\u"],["app",{sourceInterval:[2256,2264]},"hexDigit",[]],["app",{sourceInterval:[2265,2273]},"hexDigit",[]],["app",{sourceInterval:[2274,2282]},"hexDigit",[]],["app",{sourceInterval:[2283,2291]},"hexDigit",[]]]],escapeChar_hexEscape:["define",{sourceInterval:[2316,2371]},null,[],["seq",{sourceInterval:[2316,2339]},["terminal",{sourceInterval:[2316,2321]},"\\x"],["app",{sourceInterval:[2322,2330]},"hexDigit",[]],["app",{sourceInterval:[2331,2339]},"hexDigit",[]]]],escapeChar:["define",{sourceInterval:[1664,2371]},"an escape sequence",[],["alt",{sourceInterval:[1703,2371]},["app",{sourceInterval:[1703,1709]},"escapeChar_backslash",[]],["app",{sourceInterval:[1765,1771]},"escapeChar_doubleQuote",[]],["app",{sourceInterval:[1829,1835]},"escapeChar_singleQuote",[]],["app",{sourceInterval:[1893,1898]},"escapeChar_backspace",[]],["app",{sourceInterval:[1955,1960]},"escapeChar_lineFeed",[]],["app",{sourceInterval:[2016,2021]},"escapeChar_carriageReturn",[]],["app",{sourceInterval:[2083,2088]},"escapeChar_tab",[]],["app",{sourceInterval:[2139,2221]},"escapeChar_unicodeCodePoint",[]],["app",{sourceInterval:[2250,2291]},"escapeChar_unicodeEscape",[]],["app",{sourceInterval:[2316,2339]},"escapeChar_hexEscape",[]]]],space:["extend",{sourceInterval:[2375,2394]},null,[],["app",{sourceInterval:[2387,2394]},"comment",[]]],comment_singleLine:["define",{sourceInterval:[2412,2458]},null,[],["seq",{sourceInterval:[2412,2443]},["terminal",{sourceInterval:[2412,2416]},"//"],["star",{sourceInterval:[2417,2429]},["seq",{sourceInterval:[2418,2427]},["not",{sourceInterval:[2418,2423]},["terminal",{sourceInterval:[2419,2423]},`
|
|
217
|
-
`]],["app",{sourceInterval:[2424,2427]},"any",[]]]],["lookahead",{sourceInterval:[2430,2443]},["alt",{sourceInterval:[2432,2442]},["terminal",{sourceInterval:[2432,2436]},`
|
|
218
|
-
`],["app",{sourceInterval:[2439,2442]},"end",[]]]]]],comment_multiLine:["define",{sourceInterval:[2465,2501]},null,[],["seq",{sourceInterval:[2465,2487]},["terminal",{sourceInterval:[2465,2469]},"/*"],["star",{sourceInterval:[2470,2482]},["seq",{sourceInterval:[2471,2480]},["not",{sourceInterval:[2471,2476]},["terminal",{sourceInterval:[2472,2476]},"*/"]],["app",{sourceInterval:[2477,2480]},"any",[]]]],["terminal",{sourceInterval:[2483,2487]},"*/"]]],comment:["define",{sourceInterval:[2398,2501]},null,[],["alt",{sourceInterval:[2412,2501]},["app",{sourceInterval:[2412,2443]},"comment_singleLine",[]],["app",{sourceInterval:[2465,2487]},"comment_multiLine",[]]]],tokens:["define",{sourceInterval:[2505,2520]},null,[],["star",{sourceInterval:[2514,2520]},["app",{sourceInterval:[2514,2519]},"token",[]]]],token:["define",{sourceInterval:[2524,2600]},null,[],["alt",{sourceInterval:[2532,2600]},["app",{sourceInterval:[2532,2540]},"caseName",[]],["app",{sourceInterval:[2543,2550]},"comment",[]],["app",{sourceInterval:[2553,2558]},"ident",[]],["app",{sourceInterval:[2561,2569]},"operator",[]],["app",{sourceInterval:[2572,2583]},"punctuation",[]],["app",{sourceInterval:[2586,2594]},"terminal",[]],["app",{sourceInterval:[2597,2600]},"any",[]]]],operator:["define",{sourceInterval:[2604,2669]},null,[],["alt",{sourceInterval:[2615,2669]},["terminal",{sourceInterval:[2615,2619]},"<:"],["terminal",{sourceInterval:[2622,2625]},"="],["terminal",{sourceInterval:[2628,2632]},":="],["terminal",{sourceInterval:[2635,2639]},"+="],["terminal",{sourceInterval:[2642,2645]},"*"],["terminal",{sourceInterval:[2648,2651]},"+"],["terminal",{sourceInterval:[2654,2657]},"?"],["terminal",{sourceInterval:[2660,2663]},"~"],["terminal",{sourceInterval:[2666,2669]},"&"]]],punctuation:["define",{sourceInterval:[2673,2709]},null,[],["alt",{sourceInterval:[2687,2709]},["terminal",{sourceInterval:[2687,2690]},"<"],["terminal",{sourceInterval:[2693,2696]},">"],["terminal",{sourceInterval:[2699,2702]},","],["terminal",{sourceInterval:[2705,2709]},"--"]]]}]),Eg=Object.create(me.prototype);function mx(t,e){for(let r in t)if(r===e)return!0;return!1}function Rx(t,e,r,i){let n=new ma(i),s,a,o,u=!1;return(r||El).createSemantics().addOperation("visit",{Grammars(h){return h.children.map(p=>p.visit())},Grammar(h,p,m,v,S){let b=h.visit();s=n.newGrammar(b),p.child(0)&&p.child(0).visit(),v.children.map(k=>k.visit());let g=s.build();if(g.source=this.source.trimmed(),mx(e,b))throw I3(g);return e[b]=g,g},SuperGrammar(h,p){let m=p.visit();if(m==="null")s.withSuperGrammar(null);else{if(!e||!mx(e,m))throw k3(m,e,p.source);s.withSuperGrammar(e[m])}},Rule_define(h,p,m,v,S){a=h.visit(),o=p.children.map(w=>w.visit())[0]||[],!s.defaultStartRule&&s.ensureSuperGrammar()!==gr.ProtoBuiltInRules&&s.withDefaultStartRule(a);let b=S.visit(),g=m.children.map(w=>w.visit())[0],k=this.source.trimmed();return s.define(a,o,b,g,k)},Rule_override(h,p,m,v){a=h.visit(),o=p.children.map(g=>g.visit())[0]||[];let S=this.source.trimmed();s.ensureSuperGrammarRuleForOverriding(a,S),u=!0;let b=v.visit();return u=!1,s.override(a,o,b,null,S)},Rule_extend(h,p,m,v){a=h.visit(),o=p.children.map(g=>g.visit())[0]||[];let S=v.visit(),b=this.source.trimmed();return s.extend(a,o,S,null,b)},RuleBody(h,p){return n.alt(...p.visit()).withSource(this.source)},OverrideRuleBody(h,p){let m=p.visit(),v=m.indexOf(Eg);if(v>=0){let S=m.slice(0,v),b=m.slice(v+1);return b.forEach(g=>{if(g===Eg)throw R3(g)}),new pa(s.superGrammar,a,S,b).withSource(this.source)}else return n.alt(...m).withSource(this.source)},Formals(h,p,m){return p.visit()},Params(h,p,m){return p.visit()},Alt(h){return n.alt(...h.visit()).withSource(this.source)},TopLevelTerm_inline(h,p){let m=a+"_"+p.visit(),v=h.visit(),S=this.source.trimmed(),b=!(s.superGrammar&&s.superGrammar.rules[m]);u&&!b?s.override(m,o,v,null,S):s.define(m,o,v,null,S);let g=o.map(k=>n.app(k));return n.app(m,g).withSource(v.source)},OverrideTopLevelTerm_superSplice(h){return Eg},Seq(h){return n.seq(...h.children.map(p=>p.visit())).withSource(this.source)},Iter_star(h,p){return n.star(h.visit()).withSource(this.source)},Iter_plus(h,p){return n.plus(h.visit()).withSource(this.source)},Iter_opt(h,p){return n.opt(h.visit()).withSource(this.source)},Pred_not(h,p){return n.not(p.visit()).withSource(this.source)},Pred_lookahead(h,p){return n.lookahead(p.visit()).withSource(this.source)},Lex_lex(h,p){return n.lex(p.visit()).withSource(this.source)},Base_application(h,p){let m=p.children.map(v=>v.visit())[0]||[];return n.app(h.visit(),m).withSource(this.source)},Base_range(h,p,m){return n.range(h.visit(),m.visit()).withSource(this.source)},Base_terminal(h){return n.terminal(h.visit()).withSource(this.source)},Base_paren(h,p,m){return p.visit()},ruleDescr(h,p,m){return p.visit()},ruleDescrText(h){return this.sourceString.trim()},caseName(h,p,m,v,S){return m.visit()},name(h,p){return this.sourceString},nameFirst(h){},nameRest(h){},terminal(h,p,m){return p.children.map(v=>v.visit()).join("")},oneCharTerminal(h,p,m){return p.visit()},escapeChar(h){try{return wx(this.sourceString)}catch(p){throw p instanceof RangeError&&p.message.startsWith("Invalid code point ")?M3(h):p}},NonemptyListOf(h,p,m){return[h.visit()].concat(m.children.map(v=>v.visit()))},EmptyListOf(){return[]},_terminal(){return this.sourceString}})(t).visit()}var ej=Wg(["grammar",{source:`OperationsAndAttributes {
|
|
219
|
-
|
|
220
|
-
AttributeSignature =
|
|
221
|
-
name
|
|
222
|
-
|
|
223
|
-
OperationSignature =
|
|
224
|
-
name Formals?
|
|
225
|
-
|
|
226
|
-
Formals
|
|
227
|
-
= "(" ListOf<name, ","> ")"
|
|
228
|
-
|
|
229
|
-
name (a name)
|
|
230
|
-
= nameFirst nameRest*
|
|
231
|
-
|
|
232
|
-
nameFirst
|
|
233
|
-
= "_"
|
|
234
|
-
| letter
|
|
235
|
-
|
|
236
|
-
nameRest
|
|
237
|
-
= "_"
|
|
238
|
-
| alnum
|
|
239
|
-
|
|
240
|
-
}`},"OperationsAndAttributes",null,"AttributeSignature",{AttributeSignature:["define",{sourceInterval:[29,58]},null,[],["app",{sourceInterval:[54,58]},"name",[]]],OperationSignature:["define",{sourceInterval:[62,100]},null,[],["seq",{sourceInterval:[87,100]},["app",{sourceInterval:[87,91]},"name",[]],["opt",{sourceInterval:[92,100]},["app",{sourceInterval:[92,99]},"Formals",[]]]]],Formals:["define",{sourceInterval:[104,143]},null,[],["seq",{sourceInterval:[118,143]},["terminal",{sourceInterval:[118,121]},"("],["app",{sourceInterval:[122,139]},"ListOf",[["app",{sourceInterval:[129,133]},"name",[]],["terminal",{sourceInterval:[135,138]},","]]],["terminal",{sourceInterval:[140,143]},")"]]],name:["define",{sourceInterval:[147,187]},"a name",[],["seq",{sourceInterval:[168,187]},["app",{sourceInterval:[168,177]},"nameFirst",[]],["star",{sourceInterval:[178,187]},["app",{sourceInterval:[178,186]},"nameRest",[]]]]],nameFirst:["define",{sourceInterval:[191,223]},null,[],["alt",{sourceInterval:[207,223]},["terminal",{sourceInterval:[207,210]},"_"],["app",{sourceInterval:[217,223]},"letter",[]]]],nameRest:["define",{sourceInterval:[227,257]},null,[],["alt",{sourceInterval:[242,257]},["terminal",{sourceInterval:[242,245]},"_"],["app",{sourceInterval:[252,257]},"alnum",[]]]]}]);tj(gr.BuiltInRules);rj(ej);function tj(t){let e={empty(){return this.iteration()},nonEmpty(r,i,n){return this.iteration([r].concat(n.children))},self(...r){return this}};mr.BuiltInSemantics=mr.createSemantics(t,null).addOperation("asIteration",{emptyListOf:e.empty,nonemptyListOf:e.nonEmpty,EmptyListOf:e.empty,NonemptyListOf:e.nonEmpty,_iter:e.self})}function rj(t){mr.prototypeGrammarSemantics=t.createSemantics().addOperation("parse",{AttributeSignature(e){return{name:e.parse(),formals:[]}},OperationSignature(e,r){return{name:e.parse(),formals:r.children.map(i=>i.parse())[0]||[]}},Formals(e,r,i){return r.asIteration().children.map(n=>n.parse())},name(e,r){return this.sourceString}}),mr.prototypeGrammar=t}function ij(t){let e=0,r=[0],i=()=>r[r.length-1],n={},s=/( *).*(?:$|\r?\n|\r)/g,a;for(;(a=s.exec(t))!=null;){let[o,u]=a;if(o.length===0)break;let l=u.length,f=i(),h=e+l;if(l>f)r.push(l),n[h]=1;else if(l<f){let p=r.length;for(;i()!==l;)r.pop();n[h]=-1*(p-r.length)}e+=o.length}return r.length>1&&(n[e]=1-r.length),n}var Mx="an indented block",Dx="a dedent",gx=1114112,$g=class extends ha{constructor(e){super(e.input),this.state=e}_indentationAt(e){return this.state.userData[e]||0}atEnd(){return super.atEnd()&&this._indentationAt(this.pos)===0}next(){if(this._indentationAt(this.pos)!==0){this.examinedLength=Math.max(this.examinedLength,this.pos);return}return super.next()}nextCharCode(){return this._indentationAt(this.pos)!==0?(this.examinedLength=Math.max(this.examinedLength,this.pos),gx):super.nextCharCode()}nextCodePoint(){return this._indentationAt(this.pos)!==0?(this.examinedLength=Math.max(this.examinedLength,this.pos),gx):super.nextCodePoint()}},Il=class extends me{constructor(e=!0){super(),this.isIndent=e}allowsSkippingPrecedingSpace(){return!0}eval(e){let{inputStream:r}=e,i=e.userData;e.doNotMemoize=!0;let n=r.pos,s=this.isIndent?1:-1;return(i[n]||0)*s>0?(e.userData=Object.create(i),e.userData[n]-=s,e.pushBinding(new Gi(0),n),!0):(e.processFailure(n,this),!1)}getArity(){return 1}_assertAllApplicationsAreValid(e,r){}_isNullable(e,r){return!1}assertChoicesHaveUniformArity(e){}assertIteratedExprsAreNotNullable(e){}introduceParams(e){return this}substituteParams(e){return this}toString(){return this.isIndent?"indent":"dedent"}toDisplayString(){return this.toString()}toFailure(e){let r=this.isIndent?Mx:Dx;return new yr(this,r,"description")}},nj=new Te("indent"),sj=new Te("dedent"),aj=new pa(zg,"any",[nj,sj],[]),oj=new ma().newGrammar("IndentationSensitive").withSuperGrammar(zg).define("indent",[],new Il(!0),Mx,void 0,!0).define("dedent",[],new Il(!1),Dx,void 0,!0).extend("any",[],aj,"any character",void 0).build();Object.assign(oj,{_matchStateInitializer(t){t.userData=ij(t.input),t.inputStream=new $g(t)},supportsIncrementalParsing:!1});gr.initApplicationParser(El,Rx);var uj=t=>!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t);function cj(t,e,r){let i=El.match(t,"Grammars");if(i.failed())throw x3(i);return Rx(i,e,void 0,r)}function lj(t,e,r){let i=Object.create(e||{});if(typeof t!="string")if(uj(t))t=t.toString();else throw new TypeError("Expected string as first argument, got "+Ug(t));return cj(t,i,r),i}function fj(t,e){return lj(t,e)}var pj=String.raw`
|
|
241
|
-
/*
|
|
242
|
-
Superset of the Ohm grammar that allows examples to be embedded in comments.
|
|
243
|
-
Any valid Ohm grammar will also be matched by this grammar.
|
|
244
|
-
*/
|
|
245
|
-
|
|
246
|
-
// Example:
|
|
247
|
-
//+ "//+ \"x\"\nG {\n//- \"\"\nstart = \"x\"}"
|
|
248
|
-
OhmWithExamples <: Ohm {
|
|
249
|
-
Grammar := ident SuperGrammar? "{" (#exampleComments Rule)* #exampleComments "}"
|
|
250
|
-
|
|
251
|
-
exampleComments = (spacesNoExampleComment exampleComment)*
|
|
252
|
-
|
|
253
|
-
// Examples:
|
|
254
|
-
//+ "//+ \"blah\""
|
|
255
|
-
//+ "//- \"one\", \"two\""
|
|
256
|
-
//- "// - \"x\", "//-\"x\"
|
|
257
|
-
exampleComment
|
|
258
|
-
= "//+" examples -- positive
|
|
259
|
-
| "//-" examples -- negative
|
|
260
|
-
|
|
261
|
-
examples = spaceNoNl+ nonemptyListOf<jsonString, exampleSep> spaceNoNl*
|
|
262
|
-
exampleSep = "," spaces
|
|
263
|
-
|
|
264
|
-
exampleCommentPrefix = "//+" | "//-"
|
|
265
|
-
|
|
266
|
-
spaceNoNl = ~"\n" space
|
|
267
|
-
spacesNoExampleComment = (~exampleCommentPrefix space)*
|
|
268
|
-
|
|
269
|
-
jsonString = "\"" jsonChar* "\""
|
|
270
|
-
|
|
271
|
-
jsonChar
|
|
272
|
-
= jsonEscape
|
|
273
|
-
| ~"\\" ~"\"" "\u{0020}".."\u{10FFFF}"
|
|
274
|
-
|
|
275
|
-
//+ "\\n", "\\u1234"
|
|
276
|
-
jsonEscape (a JSON escape sequence)
|
|
277
|
-
= "\\\""
|
|
278
|
-
| "\\\\"
|
|
279
|
-
| "\\/"
|
|
280
|
-
| "\\b"
|
|
281
|
-
| "\\f"
|
|
282
|
-
| "\\n"
|
|
283
|
-
| "\\r"
|
|
284
|
-
| "\\t"
|
|
285
|
-
| "\\u" hexDigit hexDigit hexDigit hexDigit -- unicodeEscape
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
/*
|
|
289
|
-
A stricter version of the grammar that prevents many malformed example
|
|
290
|
-
comments from being parsed as regular comments.
|
|
291
|
-
*/
|
|
292
|
-
OhmWithExamplesStrict <: OhmWithExamples {
|
|
293
|
-
// Redefine 'comment' to avoid malformed example comments from silently
|
|
294
|
-
// being parsed as regular comments.
|
|
295
|
-
comment :=
|
|
296
|
-
| ~exampleCommentPrefix comment_singleLine
|
|
297
|
-
| comment_multiLine
|
|
298
|
-
}
|
|
299
|
-
`,Fx=fj(pj,{Ohm:El}),Ol=Fx.OhmWithExamples.createSemantics().addOperation("hasExamples",{_iter(...t){return t.some(e=>e.hasExamples())},exampleComments(t,e){return e.numChildren>0}});Ol.addOperation("examples",{Grammars(t){return t.children.flatMap(e=>e.examples())},Grammar(t,e,r,i,n,s,a){let o=[],u=this.grammarName();for(let l=0;l<n.numChildren;l++){let f=n.child(l).ruleName(),p=i.child(l).examples().map(m=>({...m,grammar:u,rule:f}));o.push(...p)}if(s.hasExamples()){let l=s.examples();o.push(...l.map(f=>({...f,grammar:u,rule:""})))}return o},exampleComments(t,e){return e.children.flatMap(r=>r.examples())},exampleComment_positive(t,e){return e.examples().map(r=>({...r,shouldMatch:!0}))},exampleComment_negative(t,e){return e.examples().map(r=>({...r,shouldMatch:!1}))},examples(t,e,r){return e.asIteration().children.map(i=>({example:JSON.parse(i.sourceString)}))},comment_singleLine(t,e,r){return[]},comment_multiLine(t,e,r){return[]}});Ol.addOperation("grammarName",{Grammar(t,e,r,i,n,s,a){return t.sourceString}});Ol.addOperation("ruleName",{Rule_define(t,e,r,i,n){return t.sourceString},Rule_override(t,e,r,i){return t.sourceString},Rule_extend(t,e,r,i){return t.sourceString}});function hj(t){let e=Fx.OhmWithExamples.match(t);if(e.failed())throw new Error(e.message);return Ol(e).examples()}var dj=(t,e)=>e.isIteration()&&e.source.startIdx===t.source.startIdx&&e.source.endIdx===t.source.endIdx&&e.children.length===t.children.length;function mj(t){let e=[];for(let r=0;r<t.length;r++){let i=t[r];if(!i.isIteration()){e.push({kind:"node",node:i});continue}let n=[i];for(let s=r+1;s<t.length&&dj(i,t[s]);s++)n.push(t[s]),r=s;e.push({kind:"iter",siblings:n})}return e}function jx(t,e=0){let r=[];for(let i of mj(t)){if(i.kind==="node"){r.push(i.node);continue}let{siblings:n}=i,s=[],a=n[0].children.length;for(let o=0;o<a;o++)s.push(...n.map(u=>u.children[o]));r.push(...jx(s,e+1))}return r}Wi.VisitorFamily=Pg;Wi.extractExamples=hj;Wi.getLineAndColumn=Tl;Wi.getLineAndColumnMessage=Hg;Wi.recoverSourceOrder=jx;Wi.semanticsForToAST=w3;Wi.toAST=S3});var bk=T(Ai=>{"use strict";y();Object.defineProperty(Ai,"__esModule",{value:!0});function or(t){let e=t||"";return function(){throw new Error("this method "+e+" is abstract! (it has no implementation in class "+this.constructor.name+")")}}function yn(t,e){if(!t)throw new Error(e||"Assertion failed")}function Yg(t,e,r){let i;Object.defineProperty(t,e,{get(){return i||(i=r.call(this)),i}})}function gj(t){return t&&Object.assign({},t)}function Zx(t,e){let r=[];for(;e-- >0;)r.push(t());return r}function ek(t,e){return new Array(e+1).join(t)}function Dl(t,e){return Zx(()=>t,e)}function Xg(t){let e=[];for(let r=0;r<t.length;r++){let i=t[r];t.lastIndexOf(i)!==r&&e.indexOf(i)<0&&e.push(i)}return e}function tk(t){let e=[];return t.forEach(r=>{e.indexOf(r)<0&&e.push(r)}),e}function fs(t){let e=t[0];return e===e.toUpperCase()}function rk(t){return!fs(t)}function ik(t,e,r){let i=r||" ";return t.length<e?ek(i,e-t.length)+t:t}function gs(){this.strings=[]}gs.prototype.append=function(t){this.strings.push(t)};gs.prototype.contents=function(){return this.strings.join("")};var Jg=t=>String.fromCodePoint(parseInt(t,16));function nk(t){if(t.charAt(0)==="\\")switch(t.charAt(1)){case"b":return"\b";case"f":return"\f";case"n":return`
|
|
300
|
-
`;case"r":return"\r";case"t":return" ";case"v":return"\v";case"x":return Jg(t.slice(2,4));case"u":return t.charAt(2)==="{"?Jg(t.slice(3,-1)):Jg(t.slice(2,6));default:return t.charAt(1)}else return t}function cy(t){if(t==null)return String(t);let e=Object.prototype.toString.call(t);try{let r;return t.constructor&&t.constructor.name?r=t.constructor.name:e.indexOf("[object ")===0?r=e.slice(8,-1):r=typeof t,r+": "+JSON.stringify(String(t))}catch{return e}}function sk(t,e="unexpected null value"){if(t==null)throw new Error(e);return t}var yj=Object.freeze({__proto__:null,abstract:or,assert:yn,defineLazyProperty:Yg,clone:gj,repeatFn:Zx,repeatStr:ek,repeat:Dl,getDuplicates:Xg,copyWithoutDuplicates:tk,isSyntactic:fs,isLexical:rk,padLeft:ik,StringBuffer:gs,unescapeCodePoint:nk,unexpectedObjToString:cy,checkNotNull:sk}),ak=t=>new RegExp(String.raw`\p{${t}}`,"u"),Zg=Object.fromEntries(["Cc","Cf","Cn","Co","Cs","Ll","Lm","Lo","Lt","Lu","Mc","Me","Mn","Nd","Nl","No","Pc","Pd","Pe","Pf","Pi","Po","Ps","Sc","Sk","Sm","So","Zl","Zp","Zs"].map(t=>[t,ak(t)]));Zg.Ltmo=/\p{Lt}|\p{Lm}|\p{Lo}/u;var Vx=Object.fromEntries(["XID_Start","XID_Continue","White_Space"].map(t=>[t,ak(t)])),he=class t{constructor(){if(this.constructor===t)throw new Error("PExpr cannot be instantiated -- it's abstract")}withSource(e){return e&&(this.source=e.trimmed()),this}},Mt=Object.create(he.prototype),Dt=Object.create(he.prototype),ht=class extends he{constructor(e){super(),this.obj=e}},vt=class extends he{constructor(e,r){super(),this.from=e,this.to=r,this.matchCodePoint=e.length>1||r.length>1}},bt=class extends he{constructor(e){super(),this.index=e}},et=class extends he{constructor(e){super(),this.terms=e}},ps=class extends et{constructor(e,r,i){let n=e.rules[r].body;super([i,n]),this.superGrammar=e,this.name=r,this.body=i}},hs=class extends et{constructor(e,r,i,n){let s=e.rules[r].body;super([...i,s,...n]),this.superGrammar=e,this.ruleName=r,this.expansionPos=i.length}},at=class extends he{constructor(e){super(),this.factors=e}},Et=class extends he{constructor(e){super(),this.expr=e}},Ii=class extends Et{},zi=class extends Et{},Wr=class extends Et{};Ii.prototype.operator="*";zi.prototype.operator="+";Wr.prototype.operator="?";Ii.prototype.minNumMatches=0;zi.prototype.minNumMatches=1;Wr.prototype.minNumMatches=0;Ii.prototype.maxNumMatches=Number.POSITIVE_INFINITY;zi.prototype.maxNumMatches=Number.POSITIVE_INFINITY;Wr.prototype.maxNumMatches=1;var ft=class extends he{constructor(e){super(),this.expr=e}},Ot=class extends he{constructor(e){super(),this.expr=e}},Rt=class extends he{constructor(e){super(),this.expr=e}},ke=class extends he{constructor(e,r=[]){super(),this.ruleName=e,this.args=r}isSyntactic(){return fs(this.ruleName)}toMemoKey(){return this._memoKey||Object.defineProperty(this,"_memoKey",{value:this.toString()}),this._memoKey}},pt=class extends he{constructor(e){if(super(),this.categoryOrProp=e,e in Zg)this.pattern=Zg[e];else if(e in Vx)this.pattern=Vx[e];else throw new Error(`Invalid Unicode category or property name: ${JSON.stringify(e)}`)}};function tt(t,e){let r;return e?(r=new Error(e.getLineAndColumnMessage()+t),r.shortMessage=t,r.interval=e):r=new Error(t),r}function ey(){return tt("Interval sources don't match")}function _j(t){let e=new Error;return Object.defineProperty(e,"message",{enumerable:!0,get(){return t.message}}),Object.defineProperty(e,"shortMessage",{enumerable:!0,get(){return"Expected "+t.getExpectedText()}}),e.interval=t.getInterval(),e}function vj(t,e,r){let i=e?`Grammar ${t} is not declared in namespace '${e}'`:"Undeclared grammar "+t;return tt(i,r)}function bj(t,e){return tt("Grammar "+t.name+" is already declared in this namespace")}function Sj(t){return tt(`Grammar '${t.name}' does not support incremental parsing`)}function ok(t,e,r){return tt("Rule "+t+" is not declared in grammar "+e,r)}function wj(t,e,r){return tt("Cannot override rule "+t+" because it is not declared in "+e,r)}function xj(t,e,r){return tt("Cannot extend rule "+t+" because it is not declared in "+e,r)}function $x(t,e,r,i){let n="Duplicate declaration for rule '"+t+"' in grammar '"+e+"'";return e!==r&&(n+=" (originally declared in '"+r+"')"),tt(n,i)}function uk(t,e,r,i){return tt("Wrong number of parameters for rule "+t+" (expected "+e+", got "+r+")",i)}function kj(t,e,r,i){return tt("Wrong number of arguments for rule "+t+" (expected "+e+", got "+r+")",i)}function Ux(t,e,r){return tt("Duplicate parameter names in rule "+t+": "+e.join(", "),r)}function Ij(t,e){return tt("Invalid parameter to rule "+t+": "+e+" has arity "+e.getArity()+", but parameter expressions must have arity 1",e.source)}var Aj="NOTE: A _syntactic rule_ is a rule whose name begins with a capital letter. See https://ohmjs.org/d/svl for more details.";function Tj(t,e){return tt("Cannot apply syntactic rule "+t+" from here (inside a lexical context)",e.source)}function Ej(t){let{ruleName:e}=t;return tt(`applySyntactic is for syntactic rules, but '${e}' is a lexical rule. `+Aj,t.source)}function Oj(t){return tt("applySyntactic is not required here (in a syntactic context)",t.source)}function Hx(t,e){return tt("Incorrect argument type: expected "+t,e.source)}function Nj(t){return tt("'...' can appear at most once in a rule body",t.source)}function Lj(t){let e=t._node;yn(e&&e.isNonterminal()&&e.ctorName==="escapeChar_unicodeCodePoint");let r=t.children.slice(1,-1).map(n=>n.source),i=r[0].coverageWith(...r.slice(1));return tt(`U+${i.contents} is not a valid Unicode code point`,i)}function ck(t,e){let r=e.length>0?e[e.length-1].args:[],n="Nullable expression "+t.expr.substituteParams(r)+" is not allowed inside '"+t.operator+"' (possible infinite loop)";if(e.length>0){let s=e.map(a=>new ke(a.ruleName,a.args)).join(`
|
|
301
|
-
`);n+=`
|
|
302
|
-
Application stack (most recent application last):
|
|
303
|
-
`+s}return tt(n,t.expr.source)}function lk(t,e,r,i){return tt("Rule "+t+" involves an alternation which has inconsistent arity (expected "+e+", got "+r+")",i.source)}function Pj(t){let e=t.map(r=>r.message);return tt(["Errors:"].concat(e).join(`
|
|
304
|
-
- `),t[0].interval)}function qj(t,e,r,i){let n=i.slice(0,-1).map(u=>{let l=" "+u[0].name+" > "+u[1];return u.length===3?l+" for '"+u[2]+"'":l}).join(`
|
|
305
|
-
`);n+=`
|
|
306
|
-
`+e+" > "+t;let s="";t==="_iter"&&(s=[`
|
|
307
|
-
NOTE: as of Ohm v16, there is no default action for iteration nodes \u2014 see `," https://ohmjs.org/d/dsa for details."].join(`
|
|
308
|
-
`));let a=[`Missing semantic action for '${t}' in ${r} '${e}'.${s}`,"Action stack (most recent call last):",n].join(`
|
|
309
|
-
`),o=tt(a);return o.name="missingSemanticAction",o}function Cj(t){if(t.length===1)throw t[0];if(t.length>1)throw Pj(t)}function Rj(t){let e=0;return t.map(i=>{let n=i.toString();return e=Math.max(e,n.length),n}).map(i=>ik(i,e))}function Gx(t,e,r){let i=t.length,n=t.slice(0,r),s=t.slice(r+e.length);return(n+e+s).substr(0,i)}function Mj(...t){let e=this,{offset:r}=e,{repeatStr:i}=yj,n=new gs;n.append("Line "+e.lineNum+", col "+e.colNum+`:
|
|
310
|
-
`);let s=Rj([e.prevLine==null?0:e.lineNum-1,e.lineNum,e.nextLine==null?0:e.lineNum+1]),a=(f,h,p)=>{n.append(p+s[f]+" | "+h+`
|
|
311
|
-
`)};e.prevLine!=null&&a(0,e.prevLine," "),a(1,e.line,"> ");let o=e.line.length,u=i(" ",o+1);for(let f=0;f<t.length;++f){let h=t[f][0],p=t[f][1];yn(h>=0&&h<=p,"range start must be >= 0 and <= end");let m=r-e.colNum+1;h=Math.max(0,h-m),p=Math.min(p-m,o),u=Gx(u,i("~",p-h),h)}let l=2+s[1].length+3;return n.append(i(" ",l)),u=Gx(u,"^",e.colNum-1),n.append(u.replace(/ +$/,"")+`
|
|
312
|
-
`),e.nextLine!=null&&a(2,e.nextLine," "),n.contents()}var ty=[];function fk(t){ty.push(t)}function Dj(t){ty.forEach(e=>{e(t)}),ty=null}function ly(t,e){let r=1,i=1,n=0,s=0,a=null,o=null,u=-1;for(;n<e;){let h=t.charAt(n++);h===`
|
|
313
|
-
`?(r++,i=1,u=s,s=n):h!=="\r"&&i++}let l=t.indexOf(`
|
|
314
|
-
`,s);if(l===-1)l=t.length;else{let h=t.indexOf(`
|
|
315
|
-
`,l+1);a=h===-1?t.slice(l):t.slice(l,h),a=a.replace(/^\r?\n/,"").replace(/\r$/,"")}u>=0&&(o=t.slice(u,s).replace(/\r?\n$/,""));let f=t.slice(s,l).replace(/\r$/,"");return{offset:e,lineNum:r,colNum:i,line:f,prevLine:o,nextLine:a,toString:Mj}}function fy(t,e,...r){return ly(t,e).toString(...r)}var Wx=(()=>{let t=0;return e=>""+e+t++})(),ds=class t{constructor(e,r,i){Object.defineProperty(this,"_sourceString",{value:e,configurable:!1,enumerable:!1,writable:!1}),this.startIdx=r,this.endIdx=i}get sourceString(){return this._sourceString}get contents(){return this._contents===void 0&&(this._contents=this.sourceString.slice(this.startIdx,this.endIdx)),this._contents}get length(){return this.endIdx-this.startIdx}coverageWith(...e){return t.coverage(...e,this)}collapsedLeft(){return new t(this.sourceString,this.startIdx,this.startIdx)}collapsedRight(){return new t(this.sourceString,this.endIdx,this.endIdx)}getLineAndColumn(){return ly(this.sourceString,this.startIdx)}getLineAndColumnMessage(){let e=[this.startIdx,this.endIdx];return fy(this.sourceString,this.startIdx,e)}minus(e){if(this.sourceString!==e.sourceString)throw ey();return this.startIdx===e.startIdx&&this.endIdx===e.endIdx?[]:this.startIdx<e.startIdx&&e.endIdx<this.endIdx?[new t(this.sourceString,this.startIdx,e.startIdx),new t(this.sourceString,e.endIdx,this.endIdx)]:this.startIdx<e.endIdx&&e.endIdx<this.endIdx?[new t(this.sourceString,e.endIdx,this.endIdx)]:this.startIdx<e.startIdx&&e.startIdx<this.endIdx?[new t(this.sourceString,this.startIdx,e.startIdx)]:[this]}relativeTo(e){if(this.sourceString!==e.sourceString)throw ey();return yn(this.startIdx>=e.startIdx&&this.endIdx<=e.endIdx,"other interval does not cover this one"),new t(this.sourceString,this.startIdx-e.startIdx,this.endIdx-e.startIdx)}trimmed(){let{contents:e}=this,r=this.startIdx+e.match(/^\s*/)[0].length,i=this.endIdx-e.match(/\s*$/)[0].length;return new t(this.sourceString,r,i)}subInterval(e,r){let i=this.startIdx+e;return new t(this.sourceString,i,i+r)}};ds.coverage=function(t,...e){let{startIdx:r,endIdx:i}=t;for(let n of e){if(n.sourceString!==t.sourceString)throw ey();r=Math.min(r,n.startIdx),i=Math.max(i,n.endIdx)}return new ds(t.sourceString,r,i)};var Fj=65535,jj=1114111,ga=class{constructor(e){this.source=e,this.pos=0,this.examinedLength=0}atEnd(){let e=this.pos>=this.source.length;return this.examinedLength=Math.max(this.examinedLength,this.pos+1),e}next(){let e=this.source[this.pos++];return this.examinedLength=Math.max(this.examinedLength,this.pos),e}nextCharCode(){let e=this.next();return e&&e.charCodeAt(0)}nextCodePoint(){let e=this.source.slice(this.pos++).codePointAt(0);return e>Fj&&(this.pos+=1),this.examinedLength=Math.max(this.examinedLength,this.pos),e}matchString(e,r){let i;if(r){for(i=0;i<e.length;i++){let n=this.next(),s=e[i];if(n==null||n.toUpperCase()!==s.toUpperCase())return!1}return!0}for(i=0;i<e.length;i++)if(this.next()!==e[i])return!1;return!0}sourceSlice(e,r){return this.source.slice(e,r)}interval(e,r){return new ds(this.source,e,r||this.pos)}},Nl=class{constructor(e,r,i,n,s,a,o){this.matcher=e,this.input=r,this.startExpr=i,this._cst=n,this._cstOffset=s,this._rightmostFailurePosition=a,this._rightmostFailures=o,this.failed()&&(Yg(this,"message",function(){let u="Expected "+this.getExpectedText();return fy(this.input,this.getRightmostFailurePosition())+u}),Yg(this,"shortMessage",function(){let u="expected "+this.getExpectedText(),l=ly(this.input,this.getRightmostFailurePosition());return"Line "+l.lineNum+", col "+l.colNum+": "+u}))}succeeded(){return!!this._cst}failed(){return!this.succeeded()}getRightmostFailurePosition(){return this._rightmostFailurePosition}getRightmostFailures(){if(!this._rightmostFailures){this.matcher.setInput(this.input);let e=this.matcher._match(this.startExpr,{tracing:!1,positionToRecordFailures:this.getRightmostFailurePosition()});this._rightmostFailures=e.getRightmostFailures()}return this._rightmostFailures}toString(){return this.succeeded()?"[match succeeded]":"[match failed at position "+this.getRightmostFailurePosition()+"]"}getExpectedText(){if(this.succeeded())throw new Error("cannot get expected text of a successful MatchResult");let e=new gs,r=this.getRightmostFailures();r=r.filter(i=>!i.isFluffy());for(let i=0;i<r.length;i++)i>0&&(i===r.length-1?e.append(r.length>2?", or ":" or "):e.append(", ")),e.append(r[i].toString());return e.contents()}getInterval(){let e=this.getRightmostFailurePosition();return new ds(this.input,e,e)}},ry=class{constructor(){this.applicationMemoKeyStack=[],this.memo={},this.maxExaminedLength=0,this.maxRightmostFailureOffset=-1,this.currentLeftRecursion=void 0}isActive(e){return this.applicationMemoKeyStack.indexOf(e.toMemoKey())>=0}enter(e){this.applicationMemoKeyStack.push(e.toMemoKey())}exit(){this.applicationMemoKeyStack.pop()}startLeftRecursion(e,r){r.isLeftRecursion=!0,r.headApplication=e,r.nextLeftRecursion=this.currentLeftRecursion,this.currentLeftRecursion=r;let{applicationMemoKeyStack:i}=this,n=i.indexOf(e.toMemoKey())+1,s=i.slice(n);r.isInvolved=function(a){return s.indexOf(a)>=0},r.updateInvolvedApplicationMemoKeys=function(){for(let a=n;a<i.length;a++){let o=i[a];this.isInvolved(o)||s.push(o)}}}endLeftRecursion(){this.currentLeftRecursion=this.currentLeftRecursion.nextLeftRecursion}shouldUseMemoizedResult(e){if(!e.isLeftRecursion)return!0;let{applicationMemoKeyStack:r}=this;for(let i=0;i<r.length;i++){let n=r[i];if(e.isInvolved(n))return!1}return!0}memoize(e,r){return this.memo[e]=r,this.maxExaminedLength=Math.max(this.maxExaminedLength,r.examinedLength),this.maxRightmostFailureOffset=Math.max(this.maxRightmostFailureOffset,r.rightmostFailureOffset),r}clearObsoleteEntries(e,r){if(e+this.maxExaminedLength<=r)return;let{memo:i}=this;this.maxExaminedLength=0,this.maxRightmostFailureOffset=-1,Object.keys(i).forEach(n=>{let s=i[n];e+s.examinedLength>r?delete i[n]:(this.maxExaminedLength=Math.max(this.maxExaminedLength,s.examinedLength),this.maxRightmostFailureOffset=Math.max(this.maxRightmostFailureOffset,s.rightmostFailureOffset))})}},Bj="\u2717",Vj="\u2713",$j="\u22C5",Uj="\u21D2",Hj="\u2409",Gj="\u240A",Wj="\u240D",iy={succeeded:1,isRootNode:2,isImplicitSpaces:4,isMemoized:8,isHeadOfLeftRecursion:16,terminatesLR:32};function zj(t){return Dl(" ",t).join("")}function Jj(t,e,r){let i=pk(t.slice(e,e+r));return i.length<r?i+Dl(" ",r-i.length).join(""):i}function pk(t){return typeof t=="string"?t.replace(/ /g,$j).replace(/\t/g,Hj).replace(/\n/g,Gj).replace(/\r/g,Wj):String(t)}var ya=class t{constructor(e,r,i,n,s,a,o){this.input=e,this.pos=this.pos1=r,this.pos2=i,this.source=new ds(e,r,i),this.expr=n,this.bindings=a,this.children=o||[],this.terminatingLREntry=null,this._flags=s?iy.succeeded:0}get displayString(){return this.expr.toDisplayString()}clone(){return this.cloneWithExpr(this.expr)}cloneWithExpr(e){let r=new t(this.input,this.pos,this.pos2,e,this.succeeded,this.bindings,this.children);return r.isHeadOfLeftRecursion=this.isHeadOfLeftRecursion,r.isImplicitSpaces=this.isImplicitSpaces,r.isMemoized=this.isMemoized,r.isRootNode=this.isRootNode,r.terminatesLR=this.terminatesLR,r.terminatingLREntry=this.terminatingLREntry,r}recordLRTermination(e,r){this.terminatingLREntry=new t(this.input,this.pos,this.pos2,this.expr,!1,[r],[e]),this.terminatingLREntry.terminatesLR=!0}walk(e,r){let i=e;typeof i=="function"&&(i={enter:i});function n(s,a,o){let u=!0;i.enter&&i.enter.call(r,s,a,o)===t.prototype.SKIP&&(u=!1),u&&(s.children.forEach(l=>{n(l,s,o+1)}),i.exit&&i.exit.call(r,s,a,o))}this.isRootNode?this.children.forEach(s=>{n(s,null,0)}):n(this,null,0)}toString(){let e=new gs;return this.walk((r,i,n)=>{if(!r)return this.SKIP;if(r.expr.constructor.name!=="Alt"){if(e.append(Jj(r.input,r.pos,10)+zj(n*2+1)),e.append((r.succeeded?Vj:Bj)+" "+r.displayString),r.isHeadOfLeftRecursion&&e.append(" (LR)"),r.succeeded){let a=pk(r.source.contents);e.append(" "+Uj+" "),e.append(typeof a=="string"?'"'+a+'"':a)}e.append(`
|
|
316
|
-
`)}}),e.contents()}};ya.prototype.SKIP={};Object.keys(iy).forEach(t=>{let e=iy[t];Object.defineProperty(ya.prototype,t,{get(){return(this._flags&e)!==0},set(r){r?this._flags|=e:this._flags&=~e}})});he.prototype.allowsSkippingPrecedingSpace=or("allowsSkippingPrecedingSpace");Mt.allowsSkippingPrecedingSpace=Dt.allowsSkippingPrecedingSpace=ke.prototype.allowsSkippingPrecedingSpace=ht.prototype.allowsSkippingPrecedingSpace=vt.prototype.allowsSkippingPrecedingSpace=pt.prototype.allowsSkippingPrecedingSpace=function(){return!0};et.prototype.allowsSkippingPrecedingSpace=Et.prototype.allowsSkippingPrecedingSpace=Rt.prototype.allowsSkippingPrecedingSpace=Ot.prototype.allowsSkippingPrecedingSpace=ft.prototype.allowsSkippingPrecedingSpace=bt.prototype.allowsSkippingPrecedingSpace=at.prototype.allowsSkippingPrecedingSpace=function(){return!1};var Uo;fk(t=>{Uo=t});var Ll;he.prototype.assertAllApplicationsAreValid=function(t,e){Ll=0,this._assertAllApplicationsAreValid(t,e)};he.prototype._assertAllApplicationsAreValid=or("_assertAllApplicationsAreValid");Mt._assertAllApplicationsAreValid=Dt._assertAllApplicationsAreValid=ht.prototype._assertAllApplicationsAreValid=vt.prototype._assertAllApplicationsAreValid=bt.prototype._assertAllApplicationsAreValid=pt.prototype._assertAllApplicationsAreValid=function(t,e){};Rt.prototype._assertAllApplicationsAreValid=function(t,e){Ll++,this.expr._assertAllApplicationsAreValid(t,e),Ll--};et.prototype._assertAllApplicationsAreValid=function(t,e){for(let r=0;r<this.terms.length;r++)this.terms[r]._assertAllApplicationsAreValid(t,e)};at.prototype._assertAllApplicationsAreValid=function(t,e){for(let r=0;r<this.factors.length;r++)this.factors[r]._assertAllApplicationsAreValid(t,e)};Et.prototype._assertAllApplicationsAreValid=ft.prototype._assertAllApplicationsAreValid=Ot.prototype._assertAllApplicationsAreValid=function(t,e){this.expr._assertAllApplicationsAreValid(t,e)};ke.prototype._assertAllApplicationsAreValid=function(t,e,r=!1){let i=e.rules[this.ruleName],n=fs(t)&&Ll===0;if(!i)throw ok(this.ruleName,e.name,this.source);if(!r&&fs(this.ruleName)&&!n)throw Tj(this.ruleName,this);let s=this.args.length,a=i.formals.length;if(s!==a)throw kj(this.ruleName,a,s,this.source);let o=Uo&&i===Uo.rules.applySyntactic;if(Uo&&i===Uo.rules.caseInsensitive&&!(this.args[0]instanceof ht))throw Hx('a Terminal (e.g. "abc")',this.args[0]);if(o){let l=this.args[0];if(!(l instanceof ke))throw Hx("a syntactic rule application",l);if(!fs(l.ruleName))throw Ej(l);if(n)throw Oj(this)}this.args.forEach(l=>{if(l._assertAllApplicationsAreValid(t,e,o),l.getArity()!==1)throw Ij(this.ruleName,l)})};he.prototype.assertChoicesHaveUniformArity=or("assertChoicesHaveUniformArity");Mt.assertChoicesHaveUniformArity=Dt.assertChoicesHaveUniformArity=ht.prototype.assertChoicesHaveUniformArity=vt.prototype.assertChoicesHaveUniformArity=bt.prototype.assertChoicesHaveUniformArity=Rt.prototype.assertChoicesHaveUniformArity=pt.prototype.assertChoicesHaveUniformArity=function(t){};et.prototype.assertChoicesHaveUniformArity=function(t){if(this.terms.length===0)return;let e=this.terms[0].getArity();for(let r=0;r<this.terms.length;r++){let i=this.terms[r];i.assertChoicesHaveUniformArity();let n=i.getArity();if(e!==n)throw lk(t,e,n,i)}};ps.prototype.assertChoicesHaveUniformArity=function(t){let e=this.terms[0].getArity(),r=this.terms[1].getArity();if(e!==r)throw lk(t,r,e,this.terms[0])};at.prototype.assertChoicesHaveUniformArity=function(t){for(let e=0;e<this.factors.length;e++)this.factors[e].assertChoicesHaveUniformArity(t)};Et.prototype.assertChoicesHaveUniformArity=function(t){this.expr.assertChoicesHaveUniformArity(t)};ft.prototype.assertChoicesHaveUniformArity=function(t){};Ot.prototype.assertChoicesHaveUniformArity=function(t){this.expr.assertChoicesHaveUniformArity(t)};ke.prototype.assertChoicesHaveUniformArity=function(t){};he.prototype.assertIteratedExprsAreNotNullable=or("assertIteratedExprsAreNotNullable");Mt.assertIteratedExprsAreNotNullable=Dt.assertIteratedExprsAreNotNullable=ht.prototype.assertIteratedExprsAreNotNullable=vt.prototype.assertIteratedExprsAreNotNullable=bt.prototype.assertIteratedExprsAreNotNullable=pt.prototype.assertIteratedExprsAreNotNullable=function(t){};et.prototype.assertIteratedExprsAreNotNullable=function(t){for(let e=0;e<this.terms.length;e++)this.terms[e].assertIteratedExprsAreNotNullable(t)};at.prototype.assertIteratedExprsAreNotNullable=function(t){for(let e=0;e<this.factors.length;e++)this.factors[e].assertIteratedExprsAreNotNullable(t)};Et.prototype.assertIteratedExprsAreNotNullable=function(t){if(this.expr.assertIteratedExprsAreNotNullable(t),this.expr.isNullable(t))throw ck(this,[])};Wr.prototype.assertIteratedExprsAreNotNullable=ft.prototype.assertIteratedExprsAreNotNullable=Ot.prototype.assertIteratedExprsAreNotNullable=Rt.prototype.assertIteratedExprsAreNotNullable=function(t){this.expr.assertIteratedExprsAreNotNullable(t)};ke.prototype.assertIteratedExprsAreNotNullable=function(t){this.args.forEach(e=>{e.assertIteratedExprsAreNotNullable(t)})};var Go=class{constructor(e){this.matchLength=e}get ctorName(){throw new Error("subclass responsibility")}numChildren(){return this.children?this.children.length:0}childAt(e){if(this.children)return this.children[e]}indexOfChild(e){return this.children.indexOf(e)}hasChildren(){return this.numChildren()>0}hasNoChildren(){return!this.hasChildren()}onlyChild(){if(this.numChildren()!==1)throw new Error("cannot get only child of a node of type "+this.ctorName+" (it has "+this.numChildren()+" children)");return this.firstChild()}firstChild(){if(this.hasNoChildren())throw new Error("cannot get first child of a "+this.ctorName+" node, which has no children");return this.childAt(0)}lastChild(){if(this.hasNoChildren())throw new Error("cannot get last child of a "+this.ctorName+" node, which has no children");return this.childAt(this.numChildren()-1)}childBefore(e){let r=this.indexOfChild(e);if(r<0)throw new Error("Node.childBefore() called w/ an argument that is not a child");if(r===0)throw new Error("cannot get child before first child");return this.childAt(r-1)}childAfter(e){let r=this.indexOfChild(e);if(r<0)throw new Error("Node.childAfter() called w/ an argument that is not a child");if(r===this.numChildren()-1)throw new Error("cannot get child after last child");return this.childAt(r+1)}isTerminal(){return!1}isNonterminal(){return!1}isIteration(){return!1}isOptional(){return!1}},Ji=class extends Go{get ctorName(){return"_terminal"}isTerminal(){return!0}get primitiveValue(){throw new Error("The `primitiveValue` property was removed in Ohm v17.")}},ny=class extends Go{constructor(e,r,i,n){super(n),this.ruleName=e,this.children=r,this.childOffsets=i}get ctorName(){return this.ruleName}isNonterminal(){return!0}isLexical(){return rk(this.ctorName)}isSyntactic(){return fs(this.ctorName)}},Pl=class extends Go{constructor(e,r,i,n){super(i),this.children=e,this.childOffsets=r,this.optional=n}get ctorName(){return"_iter"}isIteration(){return!0}isOptional(){return this.optional}};he.prototype.eval=or("eval");Mt.eval=function(t){let{inputStream:e}=t,r=e.pos,i=e.nextCodePoint();return i!==void 0?(t.pushBinding(new Ji(String.fromCodePoint(i).length),r),!0):(t.processFailure(r,this),!1)};Dt.eval=function(t){let{inputStream:e}=t,r=e.pos;return e.atEnd()?(t.pushBinding(new Ji(0),r),!0):(t.processFailure(r,this),!1)};ht.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos;return e.matchString(this.obj)?(t.pushBinding(new Ji(this.obj.length),r),!0):(t.processFailure(r,this),!1)};vt.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos,i=this.matchCodePoint?e.nextCodePoint():e.nextCharCode();return i!==void 0&&this.from.codePointAt(0)<=i&&i<=this.to.codePointAt(0)?(t.pushBinding(new Ji(String.fromCodePoint(i).length),r),!0):(t.processFailure(r,this),!1)};bt.prototype.eval=function(t){return t.eval(t.currentApplication().args[this.index])};Rt.prototype.eval=function(t){t.enterLexifiedContext();let e=t.eval(this.expr);return t.exitLexifiedContext(),e};et.prototype.eval=function(t){for(let e=0;e<this.terms.length;e++)if(t.eval(this.terms[e]))return!0;return!1};at.prototype.eval=function(t){for(let e=0;e<this.factors.length;e++){let r=this.factors[e];if(!t.eval(r))return!1}return!0};Et.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos,i=this.getArity(),n=[],s=[];for(;n.length<i;)n.push([]),s.push([]);let a=0,o=r,u;for(;a<this.maxNumMatches&&t.eval(this.expr);){if(e.pos===o)throw ck(this,t._applicationStack);o=e.pos,a++;let p=t._bindings.splice(t._bindings.length-i,i),m=t._bindingOffsets.splice(t._bindingOffsets.length-i,i);for(u=0;u<p.length;u++)n[u].push(p[u]),s[u].push(m[u])}if(a<this.minNumMatches)return!1;let l=t.posToOffset(r),f=0;if(a>0){let p=n[i-1],m=s[i-1],v=m[m.length-1]+p[p.length-1].matchLength;l=s[0][0],f=v-l}let h=this instanceof Wr;for(u=0;u<n.length;u++)t._bindings.push(new Pl(n[u],s[u],f,h)),t._bindingOffsets.push(l);return!0};ft.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos;t.pushFailuresInfo();let i=t.eval(this.expr);return t.popFailuresInfo(),i?(t.processFailure(r,this),!1):(e.pos=r,!0)};Ot.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos;return t.eval(this.expr)?(e.pos=r,!0):!1};ke.prototype.eval=function(t){let e=t.currentApplication(),r=e?e.args:[],i=this.substituteParams(r),n=t.getCurrentPosInfo();if(n.isActive(i))return i.handleCycle(t);let s=i.toMemoKey(),a=n.memo[s];if(a&&n.shouldUseMemoizedResult(a)){if(t.hasNecessaryInfo(a))return t.useMemoizedResult(t.inputStream.pos,a);delete n.memo[s]}return i.reallyEval(t)};ke.prototype.handleCycle=function(t){let e=t.getCurrentPosInfo(),{currentLeftRecursion:r}=e,i=this.toMemoKey(),n=e.memo[i];return r&&r.headApplication.toMemoKey()===i?n.updateInvolvedApplicationMemoKeys():n||(n=e.memoize(i,{matchLength:0,examinedLength:0,value:!1,rightmostFailureOffset:-1}),e.startLeftRecursion(this,n)),t.useMemoizedResult(t.inputStream.pos,n)};ke.prototype.reallyEval=function(t){let{inputStream:e}=t,r=e.pos,i=t.getCurrentPosInfo(),n=t.grammar.rules[this.ruleName],{body:s}=n,{description:a}=n;t.enterApplication(i,this),a&&t.pushFailuresInfo();let o=e.examinedLength;e.examinedLength=0;let u=this.evalOnce(s,t),l=i.currentLeftRecursion,f=this.toMemoKey(),h=l&&l.headApplication.toMemoKey()===f,p;t.doNotMemoize?t.doNotMemoize=!1:h?(u=this.growSeedResult(s,t,r,l,u),i.endLeftRecursion(),p=l,p.examinedLength=e.examinedLength-r,p.rightmostFailureOffset=t._getRightmostFailureOffset(),i.memoize(f,p)):(!l||!l.isInvolved(f))&&(p=i.memoize(f,{matchLength:e.pos-r,examinedLength:e.examinedLength-r,value:u,failuresAtRightmostPosition:t.cloneRecordedFailures(),rightmostFailureOffset:t._getRightmostFailureOffset()}));let m=!!u;if(a&&(t.popFailuresInfo(),m||t.processFailure(r,this),p&&(p.failuresAtRightmostPosition=t.cloneRecordedFailures(),p.rightmostFailureOffset=t._getRightmostFailureOffset())),t.isTracing()&&p){let v=t.getTraceEntry(r,this,m,m?[u]:[]);h&&(yn(v.terminatingLREntry!=null||!m),v.isHeadOfLeftRecursion=!0),p.traceEntry=v}return e.examinedLength=Math.max(e.examinedLength,o),t.exitApplication(i,u),m};ke.prototype.evalOnce=function(t,e){let{inputStream:r}=e,i=r.pos;if(e.eval(t)){let n=t.getArity(),s=e._bindings.splice(e._bindings.length-n,n),a=e._bindingOffsets.splice(e._bindingOffsets.length-n,n),o=r.pos-i;return new ny(this.ruleName,s,a,o)}else return!1};ke.prototype.growSeedResult=function(t,e,r,i,n){if(!n)return!1;let{inputStream:s}=e;for(;;){if(i.matchLength=s.pos-r,i.value=n,i.failuresAtRightmostPosition=e.cloneRecordedFailures(),e.isTracing()){let a=e.trace[e.trace.length-1];i.traceEntry=new ya(e.input,r,s.pos,this,!0,[n],[a.clone()])}if(s.pos=r,n=this.evalOnce(t,e),s.pos-r<=i.matchLength)break;e.isTracing()&&e.trace.splice(-2,1)}return e.isTracing()&&i.traceEntry.recordLRTermination(e.trace.pop(),n),s.pos=r+i.matchLength,i.value};pt.prototype.eval=function(t){let{inputStream:e}=t,r=e.pos,i=e.nextCodePoint();if(i!==void 0&&i<=jj){let n=String.fromCodePoint(i);if(this.pattern.test(n))return t.pushBinding(new Ji(n.length),r),!0}return t.processFailure(r,this),!1};he.prototype.getArity=or("getArity");Mt.getArity=Dt.getArity=ht.prototype.getArity=vt.prototype.getArity=bt.prototype.getArity=ke.prototype.getArity=pt.prototype.getArity=function(){return 1};et.prototype.getArity=function(){return this.terms.length===0?0:this.terms[0].getArity()};at.prototype.getArity=function(){let t=0;for(let e=0;e<this.factors.length;e++)t+=this.factors[e].getArity();return t};Et.prototype.getArity=function(){return this.expr.getArity()};ft.prototype.getArity=function(){return 0};Ot.prototype.getArity=Rt.prototype.getArity=function(){return this.expr.getArity()};function ci(t,e){let r={};if(t.source&&e){let i=t.source.relativeTo(e);r.sourceInterval=[i.startIdx,i.endIdx]}return r}he.prototype.outputRecipe=or("outputRecipe");Mt.outputRecipe=function(t,e){return["any",ci(this,e)]};Dt.outputRecipe=function(t,e){return["end",ci(this,e)]};ht.prototype.outputRecipe=function(t,e){return["terminal",ci(this,e),this.obj]};vt.prototype.outputRecipe=function(t,e){return["range",ci(this,e),this.from,this.to]};bt.prototype.outputRecipe=function(t,e){return["param",ci(this,e),this.index]};et.prototype.outputRecipe=function(t,e){return["alt",ci(this,e)].concat(this.terms.map(r=>r.outputRecipe(t,e)))};ps.prototype.outputRecipe=function(t,e){return this.terms[0].outputRecipe(t,e)};hs.prototype.outputRecipe=function(t,e){let r=this.terms.slice(0,this.expansionPos),i=this.terms.slice(this.expansionPos+1);return["splice",ci(this,e),r.map(n=>n.outputRecipe(t,e)),i.map(n=>n.outputRecipe(t,e))]};at.prototype.outputRecipe=function(t,e){return["seq",ci(this,e)].concat(this.factors.map(r=>r.outputRecipe(t,e)))};Ii.prototype.outputRecipe=zi.prototype.outputRecipe=Wr.prototype.outputRecipe=ft.prototype.outputRecipe=Ot.prototype.outputRecipe=Rt.prototype.outputRecipe=function(t,e){return[this.constructor.name.toLowerCase(),ci(this,e),this.expr.outputRecipe(t,e)]};ke.prototype.outputRecipe=function(t,e){return["app",ci(this,e),this.ruleName,this.args.map(r=>r.outputRecipe(t,e))]};pt.prototype.outputRecipe=function(t,e){return["unicodeChar",ci(this,e),this.categoryOrProp]};he.prototype.introduceParams=or("introduceParams");Mt.introduceParams=Dt.introduceParams=ht.prototype.introduceParams=vt.prototype.introduceParams=bt.prototype.introduceParams=pt.prototype.introduceParams=function(t){return this};et.prototype.introduceParams=function(t){return this.terms.forEach((e,r,i)=>{i[r]=e.introduceParams(t)}),this};at.prototype.introduceParams=function(t){return this.factors.forEach((e,r,i)=>{i[r]=e.introduceParams(t)}),this};Et.prototype.introduceParams=ft.prototype.introduceParams=Ot.prototype.introduceParams=Rt.prototype.introduceParams=function(t){return this.expr=this.expr.introduceParams(t),this};ke.prototype.introduceParams=function(t){let e=t.indexOf(this.ruleName);if(e>=0){if(this.args.length>0)throw new Error("Parameterized rules cannot be passed as arguments to another rule.");return new bt(e).withSource(this.source)}else return this.args.forEach((r,i,n)=>{n[i]=r.introduceParams(t)}),this};he.prototype.isNullable=function(t){return this._isNullable(t,Object.create(null))};he.prototype._isNullable=or("_isNullable");Mt._isNullable=vt.prototype._isNullable=bt.prototype._isNullable=zi.prototype._isNullable=pt.prototype._isNullable=function(t,e){return!1};Dt._isNullable=function(t,e){return!0};ht.prototype._isNullable=function(t,e){return typeof this.obj=="string"?this.obj==="":!1};et.prototype._isNullable=function(t,e){return this.terms.length===0||this.terms.some(r=>r._isNullable(t,e))};at.prototype._isNullable=function(t,e){return this.factors.every(r=>r._isNullable(t,e))};Ii.prototype._isNullable=Wr.prototype._isNullable=ft.prototype._isNullable=Ot.prototype._isNullable=function(t,e){return!0};Rt.prototype._isNullable=function(t,e){return this.expr._isNullable(t,e)};ke.prototype._isNullable=function(t,e){let r=this.toMemoKey();if(!Object.prototype.hasOwnProperty.call(e,r)){let{body:i}=t.rules[this.ruleName],n=i.substituteParams(this.args);e[r]=!1,e[r]=n._isNullable(t,e)}return e[r]};he.prototype.substituteParams=or("substituteParams");Mt.substituteParams=Dt.substituteParams=ht.prototype.substituteParams=vt.prototype.substituteParams=pt.prototype.substituteParams=function(t){return this};bt.prototype.substituteParams=function(t){return sk(t[this.index])};et.prototype.substituteParams=function(t){return new et(this.terms.map(e=>e.substituteParams(t)))};at.prototype.substituteParams=function(t){return new at(this.factors.map(e=>e.substituteParams(t)))};Et.prototype.substituteParams=ft.prototype.substituteParams=Ot.prototype.substituteParams=Rt.prototype.substituteParams=function(t){return new this.constructor(this.expr.substituteParams(t))};ke.prototype.substituteParams=function(t){if(this.args.length===0)return this;{let e=this.args.map(r=>r.substituteParams(t));return new ke(this.ruleName,e)}};function zx(t){return/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)}function py(t){let e=Object.create(null);t.forEach(r=>{e[r]=(e[r]||0)+1}),Object.keys(e).forEach(r=>{if(e[r]<=1)return;let i=1;t.forEach((n,s)=>{n===r&&(t[s]=n+"_"+i++)})})}he.prototype.toArgumentNameList=or("toArgumentNameList");Mt.toArgumentNameList=function(t,e){return["any"]};Dt.toArgumentNameList=function(t,e){return["end"]};ht.prototype.toArgumentNameList=function(t,e){return typeof this.obj=="string"&&/^[_a-zA-Z0-9]+$/.test(this.obj)?["_"+this.obj]:["$"+t]};vt.prototype.toArgumentNameList=function(t,e){let r=this.from+"_to_"+this.to;return zx(r)||(r="_"+r),zx(r)||(r="$"+t),[r]};et.prototype.toArgumentNameList=function(t,e){let r=this.terms.map(s=>s.toArgumentNameList(t,!0)),i=[],n=r[0].length;for(let s=0;s<n;s++){let a=[];for(let u=0;u<this.terms.length;u++)a.push(r[u][s]);let o=tk(a);i.push(o.join("_or_"))}return e||py(i),i};at.prototype.toArgumentNameList=function(t,e){let r=[];return this.factors.forEach(i=>{let n=i.toArgumentNameList(t,!0);r=r.concat(n),t+=n.length}),e||py(r),r};Et.prototype.toArgumentNameList=function(t,e){let r=this.expr.toArgumentNameList(t,e).map(i=>i[i.length-1]==="s"?i+"es":i+"s");return e||py(r),r};Wr.prototype.toArgumentNameList=function(t,e){return this.expr.toArgumentNameList(t,e).map(r=>"opt"+r[0].toUpperCase()+r.slice(1))};ft.prototype.toArgumentNameList=function(t,e){return[]};Ot.prototype.toArgumentNameList=Rt.prototype.toArgumentNameList=function(t,e){return this.expr.toArgumentNameList(t,e)};ke.prototype.toArgumentNameList=function(t,e){return[this.ruleName]};pt.prototype.toArgumentNameList=function(t,e){return["$"+t]};bt.prototype.toArgumentNameList=function(t,e){return["param"+this.index]};he.prototype.toDisplayString=or("toDisplayString");et.prototype.toDisplayString=at.prototype.toDisplayString=function(){return this.source?this.source.trimmed().contents:"["+this.constructor.name+"]"};Mt.toDisplayString=Dt.toDisplayString=Et.prototype.toDisplayString=ft.prototype.toDisplayString=Ot.prototype.toDisplayString=Rt.prototype.toDisplayString=ht.prototype.toDisplayString=vt.prototype.toDisplayString=bt.prototype.toDisplayString=function(){return this.toString()};ke.prototype.toDisplayString=function(){if(this.args.length>0){let t=this.args.map(e=>e.toDisplayString());return this.ruleName+"<"+t.join(",")+">"}else return this.ruleName};pt.prototype.toDisplayString=function(){return"Unicode ["+this.categoryOrProp+"] character"};function Kj(t){return t==="description"||t==="string"||t==="code"}var br=class t{constructor(e,r,i){if(!Kj(i))throw new Error("invalid Failure type: "+i);this.pexpr=e,this.text=r,this.type=i,this.fluffy=!1}getPExpr(){return this.pexpr}getText(){return this.text}getType(){return this.type}isDescription(){return this.type==="description"}isStringTerminal(){return this.type==="string"}isCode(){return this.type==="code"}isFluffy(){return this.fluffy}makeFluffy(){this.fluffy=!0}clearFluffy(){this.fluffy=!1}subsumes(e){return this.getText()===e.getText()&&this.type===e.type&&(!this.isFluffy()||this.isFluffy()&&e.isFluffy())}toString(){return this.type==="string"?JSON.stringify(this.getText()):this.getText()}clone(){let e=new t(this.pexpr,this.text,this.type);return this.isFluffy()&&e.makeFluffy(),e}toKey(){return this.toString()+"#"+this.type}};he.prototype.toFailure=or("toFailure");Mt.toFailure=function(t){return new br(this,"any object","description")};Dt.toFailure=function(t){return new br(this,"end of input","description")};ht.prototype.toFailure=function(t){return new br(this,this.obj,"string")};vt.prototype.toFailure=function(t){return new br(this,JSON.stringify(this.from)+".."+JSON.stringify(this.to),"code")};ft.prototype.toFailure=function(t){let e=this.expr===Mt?"nothing":"not "+this.expr.toFailure(t);return new br(this,e,"description")};Ot.prototype.toFailure=function(t){return this.expr.toFailure(t)};ke.prototype.toFailure=function(t){let{description:e}=t.rules[this.ruleName];return e||(e=(/^[aeiouAEIOU]/.test(this.ruleName)?"an":"a")+" "+this.ruleName),new br(this,e,"description")};pt.prototype.toFailure=function(t){return new br(this,"a Unicode ["+this.categoryOrProp+"] character","description")};et.prototype.toFailure=function(t){let r="("+this.terms.map(i=>i.toFailure(t)).join(" or ")+")";return new br(this,r,"description")};at.prototype.toFailure=function(t){let r="("+this.factors.map(i=>i.toFailure(t)).join(" ")+")";return new br(this,r,"description")};Et.prototype.toFailure=function(t){let e="("+this.expr.toFailure(t)+this.operator+")";return new br(this,e,"description")};he.prototype.toString=or("toString");Mt.toString=function(){return"any"};Dt.toString=function(){return"end"};ht.prototype.toString=function(){return JSON.stringify(this.obj)};vt.prototype.toString=function(){return JSON.stringify(this.from)+".."+JSON.stringify(this.to)};bt.prototype.toString=function(){return"$"+this.index};Rt.prototype.toString=function(){return"#("+this.expr.toString()+")"};et.prototype.toString=function(){return this.terms.length===1?this.terms[0].toString():"("+this.terms.map(t=>t.toString()).join(" | ")+")"};at.prototype.toString=function(){return this.factors.length===1?this.factors[0].toString():"("+this.factors.map(t=>t.toString()).join(" ")+")"};Et.prototype.toString=function(){return this.expr+this.operator};ft.prototype.toString=function(){return"~"+this.expr};Ot.prototype.toString=function(){return"&"+this.expr};ke.prototype.toString=function(){if(this.args.length>0){let t=this.args.map(e=>e.toString());return this.ruleName+"<"+t.join(",")+">"}else return this.ruleName};pt.prototype.toString=function(){return"\\p{"+this.categoryOrProp+"}"};var ql=class t extends he{constructor(e){super(),this.obj=e}_getString(e){let r=e.currentApplication().args[this.obj.index];return yn(r instanceof ht,"expected a Terminal expression"),r.obj}allowsSkippingPrecedingSpace(){return!0}eval(e){let{inputStream:r}=e,i=r.pos,n=this._getString(e);return r.matchString(n,!0)?(e.pushBinding(new Ji(n.length),i),!0):(e.processFailure(i,this),!1)}getArity(){return 1}substituteParams(e){return new t(this.obj.substituteParams(e))}toDisplayString(){return this.obj.toDisplayString()+" (case-insensitive)"}toFailure(e){return new br(this,this.obj.toFailure(e)+" (case-insensitive)","description")}_isNullable(e,r){return this.obj._isNullable(e,r)}},Qj=Object.freeze({__proto__:null,CaseInsensitiveTerminal:ql,PExpr:he,any:Mt,end:Dt,Terminal:ht,Range:vt,Param:bt,Alt:et,Extend:ps,Splice:hs,Seq:at,Iter:Et,Star:Ii,Plus:zi,Opt:Wr,Not:ft,Lookahead:Ot,Lex:Rt,Apply:ke,UnicodeChar:pt}),hk;fk(t=>{hk=t.rules.applySyntactic.body});var Kg=new ke("spaces"),sy=class{constructor(e,r,i){this.matcher=e,this.startExpr=r,this.grammar=e.grammar,this.input=e.getInput(),this.inputStream=new ga(this.input),this.memoTable=e._memoTable,this.userData=void 0,this.doNotMemoize=!1,this._bindings=[],this._bindingOffsets=[],this._applicationStack=[],this._posStack=[0],this.inLexifiedContextStack=[!1],this.rightmostFailurePosition=-1,this._rightmostFailurePositionStack=[],this._recordedFailuresStack=[],i!==void 0&&(this.positionToRecordFailures=i,this.recordedFailures=Object.create(null))}posToOffset(e){return e-this._posStack[this._posStack.length-1]}enterApplication(e,r){this._posStack.push(this.inputStream.pos),this._applicationStack.push(r),this.inLexifiedContextStack.push(!1),e.enter(r),this._rightmostFailurePositionStack.push(this.rightmostFailurePosition),this.rightmostFailurePosition=-1}exitApplication(e,r){let i=this._posStack.pop();this._applicationStack.pop(),this.inLexifiedContextStack.pop(),e.exit(),this.rightmostFailurePosition=Math.max(this.rightmostFailurePosition,this._rightmostFailurePositionStack.pop()),r&&this.pushBinding(r,i)}enterLexifiedContext(){this.inLexifiedContextStack.push(!0)}exitLexifiedContext(){this.inLexifiedContextStack.pop()}currentApplication(){return this._applicationStack[this._applicationStack.length-1]}inSyntacticContext(){let e=this.currentApplication();return e?e.isSyntactic()&&!this.inLexifiedContext():this.startExpr.factors[0].isSyntactic()}inLexifiedContext(){return this.inLexifiedContextStack[this.inLexifiedContextStack.length-1]}skipSpaces(){return this.pushFailuresInfo(),this.eval(Kg),this.popBinding(),this.popFailuresInfo(),this.inputStream.pos}skipSpacesIfInSyntacticContext(){return this.inSyntacticContext()?this.skipSpaces():this.inputStream.pos}maybeSkipSpacesBefore(e){return e.allowsSkippingPrecedingSpace()&&e!==Kg?this.skipSpacesIfInSyntacticContext():this.inputStream.pos}pushBinding(e,r){this._bindings.push(e),this._bindingOffsets.push(this.posToOffset(r))}popBinding(){this._bindings.pop(),this._bindingOffsets.pop()}numBindings(){return this._bindings.length}truncateBindings(e){for(;this._bindings.length>e;)this.popBinding()}getCurrentPosInfo(){return this.getPosInfo(this.inputStream.pos)}getPosInfo(e){let r=this.memoTable[e];return r||(r=this.memoTable[e]=new ry),r}processFailure(e,r){if(this.rightmostFailurePosition=Math.max(this.rightmostFailurePosition,e),this.recordedFailures&&e===this.positionToRecordFailures){let i=this.currentApplication();i&&(r=r.substituteParams(i.args)),this.recordFailure(r.toFailure(this.grammar),!1)}}recordFailure(e,r){let i=e.toKey();this.recordedFailures[i]?this.recordedFailures[i].isFluffy()&&!e.isFluffy()&&this.recordedFailures[i].clearFluffy():this.recordedFailures[i]=r?e.clone():e}recordFailures(e,r){Object.keys(e).forEach(i=>{this.recordFailure(e[i],r)})}cloneRecordedFailures(){if(!this.recordedFailures)return;let e=Object.create(null);return Object.keys(this.recordedFailures).forEach(r=>{e[r]=this.recordedFailures[r].clone()}),e}getRightmostFailurePosition(){return this.rightmostFailurePosition}_getRightmostFailureOffset(){return this.rightmostFailurePosition>=0?this.posToOffset(this.rightmostFailurePosition):-1}getMemoizedTraceEntry(e,r){let i=this.memoTable[e];if(i&&r instanceof ke){let n=i.memo[r.toMemoKey()];if(n&&n.traceEntry){let s=n.traceEntry.cloneWithExpr(r);return s.isMemoized=!0,s}}return null}getTraceEntry(e,r,i,n){if(r instanceof ke){let s=this.currentApplication(),a=s?s.args:[];r=r.substituteParams(a)}return this.getMemoizedTraceEntry(e,r)||new ya(this.input,e,this.inputStream.pos,r,i,n,this.trace)}isTracing(){return!!this.trace}hasNecessaryInfo(e){return this.trace&&!e.traceEntry?!1:this.recordedFailures&&this.inputStream.pos+e.rightmostFailureOffset===this.positionToRecordFailures?!!e.failuresAtRightmostPosition:!0}useMemoizedResult(e,r){this.trace&&this.trace.push(r.traceEntry);let i=this.inputStream.pos+r.rightmostFailureOffset;return this.rightmostFailurePosition=Math.max(this.rightmostFailurePosition,i),this.recordedFailures&&this.positionToRecordFailures===i&&r.failuresAtRightmostPosition&&this.recordFailures(r.failuresAtRightmostPosition,!0),this.inputStream.examinedLength=Math.max(this.inputStream.examinedLength,r.examinedLength+e),r.value?(this.inputStream.pos+=r.matchLength,this.pushBinding(r.value,e),!0):!1}eval(e){let{inputStream:r}=this,i=this._bindings.length,n=this.userData,s;this.recordedFailures&&(s=this.recordedFailures,this.recordedFailures=Object.create(null));let a=r.pos,o=this.maybeSkipSpacesBefore(e),u;this.trace&&(u=this.trace,this.trace=[]);let l=e.eval(this);if(this.trace){let f=this._bindings.slice(i),h=this.getTraceEntry(o,e,l,f);h.isImplicitSpaces=e===Kg,h.isRootNode=e===this.startExpr,u.push(h),this.trace=u}return l?this.recordedFailures&&r.pos===this.positionToRecordFailures&&Object.keys(this.recordedFailures).forEach(f=>{this.recordedFailures[f].makeFluffy()}):(r.pos=a,this.truncateBindings(i),this.userData=n),this.recordedFailures&&this.recordFailures(s,!1),e===hk&&this.skipSpaces(),l}getMatchResult(){this.grammar._setUpMatchState(this),this.eval(this.startExpr);let e;this.recordedFailures&&(e=Object.keys(this.recordedFailures).map(i=>this.recordedFailures[i]));let r=this._bindings[0];return r&&(r.grammar=this.grammar),new Nl(this.matcher,this.input,this.startExpr,r,this._bindingOffsets[0],this.rightmostFailurePosition,e)}getTrace(){this.trace=[];let e=this.getMatchResult(),r=this.trace[this.trace.length-1];return r.result=e,r}pushFailuresInfo(){this._rightmostFailurePositionStack.push(this.rightmostFailurePosition),this._recordedFailuresStack.push(this.recordedFailures)}popFailuresInfo(){this.rightmostFailurePosition=this._rightmostFailurePositionStack.pop(),this.recordedFailures=this._recordedFailuresStack.pop()}},ay=class{constructor(e){this.grammar=e,this._memoTable=[],this._input="",this._isMemoTableStale=!1}_resetMemoTable(){this._memoTable=[],this._isMemoTableStale=!1}getInput(){return this._input}setInput(e){return this._input!==e&&this.replaceInputRange(0,this._input.length,e),this}replaceInputRange(e,r,i){let n=this._input,s=this._memoTable;if(e<0||e>n.length||r<0||r>n.length||e>r)throw new Error("Invalid indices: "+e+" and "+r);this._input=n.slice(0,e)+i+n.slice(r),this._input!==n&&s.length>0&&(this._isMemoTableStale=!0);let a=s.slice(r);s.length=e;for(let o=0;o<i.length;o++)s.push(void 0);for(let o of a)s.push(o);for(let o=0;o<e;o++){let u=s[o];u&&u.clearObsoleteEntries(o,e)}return this}match(e,r={incremental:!0}){return this._match(this._getStartExpr(e),{incremental:r.incremental,tracing:!1})}trace(e,r={incremental:!0}){return this._match(this._getStartExpr(e),{incremental:r.incremental,tracing:!0})}_match(e,r={}){let i={tracing:!1,incremental:!0,positionToRecordFailures:void 0,...r};if(!i.incremental)this._resetMemoTable();else if(this._isMemoTableStale&&!this.grammar.supportsIncrementalParsing)throw Sj(this.grammar);let n=new sy(this,e,i.positionToRecordFailures);return i.tracing?n.getTrace():n.getMatchResult()}_getStartExpr(e){let r=e||this.grammar.defaultStartRule;if(!r)throw new Error("Missing start rule argument -- the grammar has no default start rule.");let i=this.grammar.parseApplication(r);return new at([i,Dt])}},Ho=[],oy=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Cl=class{constructor(e,r,i){this._node=e,this.source=r,this._baseInterval=i,e.isNonterminal()&&yn(r===i),this._childWrappers=[]}_forgetMemoizedResultFor(e){delete this._node[this._semantics.attributeKeys[e]],this.children.forEach(r=>{r._forgetMemoizedResultFor(e)})}child(e){if(!(0<=e&&e<this._node.numChildren()))return;let r=this._childWrappers[e];if(!r){let i=this._node.childAt(e),n=this._node.childOffsets[e],s=this._baseInterval.subInterval(n,i.matchLength),a=i.isNonterminal()?s:this._baseInterval;r=this._childWrappers[e]=this._semantics.wrap(i,s,a)}return r}_children(){for(let e=0;e<this._node.numChildren();e++)this.child(e);return this._childWrappers}isIteration(){return this._node.isIteration()}isTerminal(){return this._node.isTerminal()}isNonterminal(){return this._node.isNonterminal()}isSyntactic(){return this.isNonterminal()&&this._node.isSyntactic()}isLexical(){return this.isNonterminal()&&this._node.isLexical()}isOptional(){return this._node.isOptional()}iteration(e){let r=e||[],i=r.map(a=>a._node),n=new Pl(i,[],-1,!1),s=this._semantics.wrap(n,null,null);return s._childWrappers=r,s}get children(){return this._children()}get ctorName(){return this._node.ctorName}get numChildren(){return this._node.numChildren()}get sourceString(){return this.source.contents}},_r=class t{constructor(e,r){let i=this;if(this.grammar=e,this.checkedActionDicts=!1,this.Wrapper=class extends(r?r.Wrapper:Cl){constructor(n,s,a){super(n,s,a),i.checkActionDictsIfHaventAlready(),this._semantics=i}toString(){return"[semantics wrapper for "+i.grammar.name+"]"}},this.super=r,r){if(!(e.equals(this.super.grammar)||e._inheritsFrom(this.super.grammar)))throw new Error("Cannot extend a semantics for grammar '"+this.super.grammar.name+"' for use with grammar '"+e.name+"' (not a sub-grammar)");this.operations=Object.create(this.super.operations),this.attributes=Object.create(this.super.attributes),this.attributeKeys=Object.create(null);for(let n in this.attributes)Object.defineProperty(this.attributeKeys,n,{value:Wx(n)})}else this.operations=Object.create(null),this.attributes=Object.create(null),this.attributeKeys=Object.create(null)}toString(){return"[semantics for "+this.grammar.name+"]"}checkActionDictsIfHaventAlready(){this.checkedActionDicts||(this.checkActionDicts(),this.checkedActionDicts=!0)}checkActionDicts(){let e;for(e in this.operations)this.operations[e].checkActionDict(this.grammar);for(e in this.attributes)this.attributes[e].checkActionDict(this.grammar)}toRecipe(e){function r(n){return n.super!==t.BuiltInSemantics._getSemantics()}let i=`(function(g) {
|
|
317
|
-
`;if(r(this)){i+=" var semantics = "+this.super.toRecipe(!0)+"(g";let n=this.super.grammar,s=this.grammar;for(;s!==n;)i+=".superGrammar",s=s.superGrammar;i+=`);
|
|
318
|
-
`,i+=" return g.extendSemantics(semantics)"}else i+=" return g.createSemantics()";return["Operation","Attribute"].forEach(n=>{let s=this[n.toLowerCase()+"s"];Object.keys(s).forEach(a=>{let{actionDict:o,formals:u,builtInDefault:l}=s[a],f=a;u.length>0&&(f+="("+u.join(", ")+")");let h;r(this)&&this.super[n.toLowerCase()+"s"][a]?h="extend"+n:h="add"+n,i+=`
|
|
319
|
-
.`+h+"("+JSON.stringify(f)+", {";let p=[];Object.keys(o).forEach(m=>{if(o[m]!==l){let v=o[m].toString().trim();v=v.replace(/^.*\(/,"function("),p.push(`
|
|
320
|
-
`+JSON.stringify(m)+": "+v)}}),i+=p.join(",")+`
|
|
321
|
-
})`})}),i+=`;
|
|
322
|
-
})`,e||(i=`(function() {
|
|
323
|
-
var grammar = this.fromRecipe(`+this.grammar.toRecipe()+`);
|
|
324
|
-
var semantics = `+i+`(grammar);
|
|
325
|
-
return semantics;
|
|
326
|
-
});
|
|
327
|
-
`),i}addOperationOrAttribute(e,r,i){let n=e+"s",s=Jx(r,e),{name:a}=s,{formals:o}=s;this.assertNewName(a,e);let u=Yj(e,a,h),l={_default:u};Object.keys(i).forEach(p=>{l[p]=i[p]});let f=e==="operation"?new ms(a,o,l,u):new Wo(a,l,u);f.checkActionDict(this.grammar),this[n][a]=f;function h(...p){let m=this._semantics[n][a];if(arguments.length!==m.formals.length)throw new Error("Invalid number of arguments passed to "+a+" "+e+" (expected "+m.formals.length+", got "+arguments.length+")");let v=Object.create(null);for(let[g,k]of Object.entries(p)){let w=m.formals[g];v[w]=k}let S=this.args;this.args=v;let b=m.execute(this._semantics,this);return this.args=S,b}e==="operation"?(this.Wrapper.prototype[a]=h,this.Wrapper.prototype[a].toString=function(){return"["+a+" operation]"}):(Object.defineProperty(this.Wrapper.prototype,a,{get:h,configurable:!0}),Object.defineProperty(this.attributeKeys,a,{value:Wx(a)}))}extendOperationOrAttribute(e,r,i){let n=e+"s";if(Jx(r,"attribute"),!(this.super&&r in this.super[n]))throw new Error("Cannot extend "+e+" '"+r+"': did not inherit an "+e+" with that name");if(oy(this[n],r))throw new Error("Cannot extend "+e+" '"+r+"' again");let s=this[n][r].formals,a=this[n][r].actionDict,o=Object.create(a);Object.keys(i).forEach(u=>{o[u]=i[u]}),this[n][r]=e==="operation"?new ms(r,s,o):new Wo(r,o),this[n][r].checkActionDict(this.grammar)}assertNewName(e,r){if(oy(Cl.prototype,e))throw new Error("Cannot add "+r+" '"+e+"': that's a reserved name");if(e in this.operations)throw new Error("Cannot add "+r+" '"+e+"': an operation with that name already exists");if(e in this.attributes)throw new Error("Cannot add "+r+" '"+e+"': an attribute with that name already exists")}wrap(e,r,i){let n=i||r;return e instanceof this.Wrapper?e:new this.Wrapper(e,r,n)}};function Jx(t,e){if(!_r.prototypeGrammar)return yn(t.indexOf("(")===-1),{name:t,formals:[]};let r=_r.prototypeGrammar.match(t,e==="operation"?"OperationSignature":"AttributeSignature");if(r.failed())throw new Error(r.message);return _r.prototypeGrammarSemantics(r).parse()}function Yj(t,e,r){return function(...i){let s=(this._semantics.operations[e]||this._semantics.attributes[e]).formals.map(a=>this.args[a]);if(!this.isIteration()&&i.length===1)return r.apply(i[0],s);throw qj(this.ctorName,e,t,Ho)}}_r.createSemantics=function(t,e){let r=new _r(t,e!==void 0?e:_r.BuiltInSemantics._getSemantics()),i=function(s){if(!(s instanceof Nl))throw new TypeError("Semantics expected a MatchResult, but got "+cy(s));if(s.failed())throw new TypeError("cannot apply Semantics to "+s.toString());let a=s._cst;if(a.grammar!==t)throw new Error("Cannot use a MatchResult from grammar '"+a.grammar.name+"' with a semantics for '"+t.name+"'");let o=new ga(s.input);return r.wrap(a,o.interval(s._cstOffset,s.input.length))};return i.addOperation=function(n,s){return r.addOperationOrAttribute("operation",n,s),i},i.extendOperation=function(n,s){return r.extendOperationOrAttribute("operation",n,s),i},i.addAttribute=function(n,s){return r.addOperationOrAttribute("attribute",n,s),i},i.extendAttribute=function(n,s){return r.extendOperationOrAttribute("attribute",n,s),i},i._getActionDict=function(n){let s=r.operations[n]||r.attributes[n];if(!s)throw new Error('"'+n+'" is not a valid operation or attribute name in this semantics for "'+t.name+'"');return s.actionDict},i._remove=function(n){let s;return n in r.operations?(s=r.operations[n],delete r.operations[n]):n in r.attributes&&(s=r.attributes[n],delete r.attributes[n]),delete r.Wrapper.prototype[n],s},i.getOperationNames=function(){return Object.keys(r.operations)},i.getAttributeNames=function(){return Object.keys(r.attributes)},i.getGrammar=function(){return r.grammar},i.toRecipe=function(n){return r.toRecipe(n)},i.toString=r.toString.bind(r),i._getSemantics=function(){return r},i};var ms=class{constructor(e,r,i,n){this.name=e,this.formals=r,this.actionDict=i,this.builtInDefault=n}checkActionDict(e){e._checkTopDownActionDict(this.typeName,this.name,this.actionDict)}execute(e,r){try{let{ctorName:i}=r._node,n=this.actionDict[i];return n?(Ho.push([this,i]),n.apply(r,r._children())):r.isNonterminal()&&(n=this.actionDict._nonterminal,n)?(Ho.push([this,"_nonterminal",i]),n.apply(r,r._children())):(Ho.push([this,"default action",i]),this.actionDict._default.apply(r,r._children()))}finally{Ho.pop()}}};ms.prototype.typeName="operation";var Wo=class extends ms{constructor(e,r,i){super(e,[],r,i)}execute(e,r){let i=r._node,n=e.attributeKeys[this.name];return oy(i,n)||(i[n]=ms.prototype.execute.call(this,e,r)),i[n]}};Wo.prototype.typeName="attribute";var Kx=["_iter","_terminal","_nonterminal","_default"];function Qx(t){return Object.keys(t.rules).sort().map(e=>t.rules[e])}var Xj=t=>t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"),dk,mk,vr=class t{constructor(e,r,i,n){if(this.name=e,this.superGrammar=r,this.rules=i,n){if(!(n in i))throw new Error("Invalid start rule: '"+n+"' is not a rule in grammar '"+e+"'");this.defaultStartRule=n}this._matchStateInitializer=void 0,this.supportsIncrementalParsing=!0}matcher(){return new ay(this)}isBuiltIn(){return this===t.ProtoBuiltInRules||this===t.BuiltInRules}equals(e){if(this===e)return!0;if(e==null||this.name!==e.name||this.defaultStartRule!==e.defaultStartRule||!(this.superGrammar===e.superGrammar||this.superGrammar.equals(e.superGrammar)))return!1;let r=Qx(this),i=Qx(e);return r.length===i.length&&r.every((n,s)=>n.description===i[s].description&&n.formals.join(",")===i[s].formals.join(",")&&n.body.toString()===i[s].body.toString())}match(e,r){let i=this.matcher();return i.replaceInputRange(0,0,e),i.match(r)}trace(e,r){let i=this.matcher();return i.replaceInputRange(0,0,e),i.trace(r)}createSemantics(){return _r.createSemantics(this)}extendSemantics(e){return _r.createSemantics(this,e._getSemantics())}_checkTopDownActionDict(e,r,i){let n=[];for(let s in i){let a=i[s];if(!Kx.includes(s)&&!(s in this.rules)){n.push(`'${s}' is not a valid semantic action for '${this.name}'`);continue}if(typeof a!="function"){n.push(`'${s}' must be a function in an action dictionary for '${this.name}'`);continue}let u=a.length,l=this._topDownActionArity(s);if(u!==l){let f;s==="_iter"||s==="_nonterminal"?f=`it should use a rest parameter, e.g. \`${s}(...children) {}\`. NOTE: this is new in Ohm v16 \u2014 see https://ohmjs.org/d/ati for details.`:f=`expected ${l}, got ${u}`,n.push(`Semantic action '${s}' has the wrong arity: ${f}`)}}if(n.length>0){let s=n.map(o=>"- "+o),a=new Error([`Found errors in the action dictionary of the '${r}' ${e}:`,...s].join(`
|
|
328
|
-
`));throw a.problems=n,a}}_topDownActionArity(e){return Kx.includes(e)?0:this.rules[e].body.getArity()}_inheritsFrom(e){let r=this.superGrammar;for(;r;){if(r.equals(e,!0))return!0;r=r.superGrammar}return!1}toRecipe(e=void 0){let r={};this.source&&(r.source=this.source.contents);let i=null;this.defaultStartRule&&(i=this.defaultStartRule);let n={};Object.keys(this.rules).forEach(o=>{let u=this.rules[o],{body:l}=u,f=!this.superGrammar||!this.superGrammar.rules[o],h;f?h="define":h=l instanceof ps?"extend":"override";let p={};if(u.source&&this.source){let S=u.source.relativeTo(this.source);p.sourceInterval=[S.startIdx,S.endIdx]}let m=f?u.description:null,v=l.outputRecipe(u.formals,this.source);n[o]=[h,p,m,u.formals,v]});let s="null";e?s=e:this.superGrammar&&!this.superGrammar.isBuiltIn()&&(s=this.superGrammar.toRecipe());let a=[...["grammar",r,this.name].map(JSON.stringify),s,...[i,n].map(JSON.stringify)];return Xj(`[${a.join(",")}]`)}toOperationActionDictionaryTemplate(){return this._toOperationOrAttributeActionDictionaryTemplate()}toAttributeActionDictionaryTemplate(){return this._toOperationOrAttributeActionDictionaryTemplate()}_toOperationOrAttributeActionDictionaryTemplate(){let e=new gs;e.append("{");let r=!0;for(let i in this.rules){let{body:n}=this.rules[i];r?r=!1:e.append(","),e.append(`
|
|
329
|
-
`),e.append(" "),this.addSemanticActionTemplate(i,n,e)}return e.append(`
|
|
330
|
-
}`),e.contents()}addSemanticActionTemplate(e,r,i){i.append(e),i.append(": function(");let n=this._topDownActionArity(e);i.append(Dl("_",n).join(", ")),i.append(`) {
|
|
331
|
-
`),i.append(" }")}parseApplication(e){let r;if(e.indexOf("<")===-1)r=new ke(e);else{let n=dk.match(e,"Base_application");r=mk(n,{})}if(!(r.ruleName in this.rules))throw ok(r.ruleName,this.name);let{formals:i}=this.rules[r.ruleName];if(i.length!==r.args.length){let{source:n}=this.rules[r.ruleName];throw uk(r.ruleName,i.length,r.args.length,n)}return r}_setUpMatchState(e){this._matchStateInitializer&&this._matchStateInitializer(e)}};vr.ProtoBuiltInRules=new vr("ProtoBuiltInRules",void 0,{any:{body:Mt,formals:[],description:"any character",primitive:!0},end:{body:Dt,formals:[],description:"end of input",primitive:!0},caseInsensitive:{body:new ql(new bt(0)),formals:["str"],primitive:!0},lower:{body:new pt("Ll"),formals:[],description:"a lowercase letter",primitive:!0},upper:{body:new pt("Lu"),formals:[],description:"an uppercase letter",primitive:!0},unicodeLtmo:{body:new pt("Ltmo"),formals:[],description:"a Unicode character in Lt, Lm, or Lo",primitive:!0},spaces:{body:new Ii(new ke("space")),formals:[]},space:{body:new vt("\0"," "),formals:[],description:"a space"}});vr.initApplicationParser=function(t,e){dk=t,mk=e};var Rl=class{constructor(e){this.name=e}sourceInterval(e,r){return this.source.subInterval(e,r-e)}ensureSuperGrammar(){return this.superGrammar||this.withSuperGrammar(this.name==="BuiltInRules"?vr.ProtoBuiltInRules:vr.BuiltInRules),this.superGrammar}ensureSuperGrammarRuleForOverriding(e,r){let i=this.ensureSuperGrammar().rules[e];if(!i)throw wj(e,this.superGrammar.name,r);return i}installOverriddenOrExtendedRule(e,r,i,n){let s=Xg(r);if(s.length>0)throw Ux(e,s,n);let a=this.ensureSuperGrammar().rules[e],o=a.formals,u=o?o.length:0;if(r.length!==u)throw uk(e,u,r.length,n);return this.install(e,r,i,a.description,n)}install(e,r,i,n,s,a=!1){return this.rules[e]={body:i.introduceParams(r),formals:r,description:n,source:s,primitive:a},this}withSuperGrammar(e){if(this.superGrammar)throw new Error("the super grammar of a GrammarDecl cannot be set more than once");return this.superGrammar=e,this.rules=Object.create(e.rules),e.isBuiltIn()||(this.defaultStartRule=e.defaultStartRule),this}withDefaultStartRule(e){return this.defaultStartRule=e,this}withSource(e){return this.source=new ga(e).interval(0,e.length),this}build(){let e=new vr(this.name,this.ensureSuperGrammar(),this.rules,this.defaultStartRule);e._matchStateInitializer=e.superGrammar._matchStateInitializer,e.supportsIncrementalParsing=e.superGrammar.supportsIncrementalParsing;let r=[],i=!1;return Object.keys(e.rules).forEach(n=>{let{body:s}=e.rules[n];try{s.assertChoicesHaveUniformArity(n)}catch(a){r.push(a)}try{s.assertAllApplicationsAreValid(n,e)}catch(a){r.push(a),i=!0}}),i||Object.keys(e.rules).forEach(n=>{let{body:s}=e.rules[n];try{s.assertIteratedExprsAreNotNullable(e,[])}catch(a){r.push(a)}}),r.length>0&&Cj(r),this.source&&(e.source=this.source),e}define(e,r,i,n,s,a){if(this.ensureSuperGrammar(),this.superGrammar.rules[e])throw $x(e,this.name,this.superGrammar.name,s);if(this.rules[e])throw $x(e,this.name,this.name,s);let o=Xg(r);if(o.length>0)throw Ux(e,o,s);return this.install(e,r,i,n,s,a)}override(e,r,i,n,s){return this.ensureSuperGrammarRuleForOverriding(e,s),this.installOverriddenOrExtendedRule(e,r,i,s),this}extend(e,r,i,n,s){if(!this.ensureSuperGrammar().rules[e])throw xj(e,this.superGrammar.name,s);let o=new ps(this.superGrammar,e,i);return o.source=i.source,this.installOverriddenOrExtendedRule(e,r,o,s),this}},_a=class{constructor(e){this.currentDecl=null,this.currentRuleName=null,this.options=e||{}}newGrammar(e){return new Rl(e)}grammar(e,r,i,n,s){let a=new Rl(r);return i&&a.withSuperGrammar(i instanceof vr?i:this.fromRecipe(i)),n&&a.withDefaultStartRule(n),e&&e.source&&a.withSource(e.source),this.currentDecl=a,Object.keys(s).forEach(o=>{this.currentRuleName=o;let u=s[o],l=u[0],f=u[1],h=u[2],p=u[3],m=this.fromRecipe(u[4]),v;a.source&&f&&f.sourceInterval&&(v=a.source.subInterval(f.sourceInterval[0],f.sourceInterval[1]-f.sourceInterval[0])),a[l](o,p,m,h,v)}),this.currentRuleName=this.currentDecl=null,a.build()}terminal(e){return new ht(e)}range(e,r){return new vt(e,r)}param(e){return new bt(e)}alt(...e){let r=[];for(let i of e)i instanceof he||(i=this.fromRecipe(i)),i instanceof et?r=r.concat(i.terms):r.push(i);return r.length===1?r[0]:new et(r)}seq(...e){let r=[];for(let i of e)i instanceof he||(i=this.fromRecipe(i)),i instanceof at?r=r.concat(i.factors):r.push(i);return r.length===1?r[0]:new at(r)}star(e){return e instanceof he||(e=this.fromRecipe(e)),new Ii(e)}plus(e){return e instanceof he||(e=this.fromRecipe(e)),new zi(e)}opt(e){return e instanceof he||(e=this.fromRecipe(e)),new Wr(e)}not(e){return e instanceof he||(e=this.fromRecipe(e)),new ft(e)}lookahead(e){return e instanceof he||(e=this.fromRecipe(e)),this.options.eliminateLookaheads?new ft(new ft(e)):new Ot(e)}lex(e){return e instanceof he||(e=this.fromRecipe(e)),new Rt(e)}app(e,r){return r&&r.length>0&&(r=r.map(function(i){return i instanceof he?i:this.fromRecipe(i)},this)),new ke(e,r)}splice(e,r){return new hs(this.currentDecl.superGrammar,this.currentRuleName,e.map(i=>this.fromRecipe(i)),r.map(i=>this.fromRecipe(i)))}fromRecipe(e){let r=e[0]==="grammar"?e.slice(1):e.slice(2),i=this[e[0]](...r),n=e[1];return n&&n.sourceInterval&&this.currentDecl&&i.withSource(this.currentDecl.sourceInterval(...n.sourceInterval)),i}};function Fl(t){return typeof t=="function"?t.call(new _a):(typeof t=="string"&&(t=JSON.parse(t)),new _a().fromRecipe(t))}var hy=Fl(["grammar",{source:`BuiltInRules {
|
|
332
|
-
|
|
333
|
-
alnum (an alpha-numeric character)
|
|
334
|
-
= letter
|
|
335
|
-
| digit
|
|
336
|
-
|
|
337
|
-
letter (a letter)
|
|
338
|
-
= lower
|
|
339
|
-
| upper
|
|
340
|
-
| unicodeLtmo
|
|
341
|
-
|
|
342
|
-
digit (a digit)
|
|
343
|
-
= "0".."9"
|
|
344
|
-
|
|
345
|
-
hexDigit (a hexadecimal digit)
|
|
346
|
-
= digit
|
|
347
|
-
| "a".."f"
|
|
348
|
-
| "A".."F"
|
|
349
|
-
|
|
350
|
-
ListOf<elem, sep>
|
|
351
|
-
= NonemptyListOf<elem, sep>
|
|
352
|
-
| EmptyListOf<elem, sep>
|
|
353
|
-
|
|
354
|
-
NonemptyListOf<elem, sep>
|
|
355
|
-
= elem (sep elem)*
|
|
356
|
-
|
|
357
|
-
EmptyListOf<elem, sep>
|
|
358
|
-
= /* nothing */
|
|
359
|
-
|
|
360
|
-
listOf<elem, sep>
|
|
361
|
-
= nonemptyListOf<elem, sep>
|
|
362
|
-
| emptyListOf<elem, sep>
|
|
363
|
-
|
|
364
|
-
nonemptyListOf<elem, sep>
|
|
365
|
-
= elem (sep elem)*
|
|
366
|
-
|
|
367
|
-
emptyListOf<elem, sep>
|
|
368
|
-
= /* nothing */
|
|
369
|
-
|
|
370
|
-
// Allows a syntactic rule application within a lexical context.
|
|
371
|
-
applySyntactic<app> = app
|
|
372
|
-
}`},"BuiltInRules",null,null,{alnum:["define",{sourceInterval:[18,78]},"an alpha-numeric character",[],["alt",{sourceInterval:[60,78]},["app",{sourceInterval:[60,66]},"letter",[]],["app",{sourceInterval:[73,78]},"digit",[]]]],letter:["define",{sourceInterval:[82,142]},"a letter",[],["alt",{sourceInterval:[107,142]},["app",{sourceInterval:[107,112]},"lower",[]],["app",{sourceInterval:[119,124]},"upper",[]],["app",{sourceInterval:[131,142]},"unicodeLtmo",[]]]],digit:["define",{sourceInterval:[146,177]},"a digit",[],["range",{sourceInterval:[169,177]},"0","9"]],hexDigit:["define",{sourceInterval:[181,254]},"a hexadecimal digit",[],["alt",{sourceInterval:[219,254]},["app",{sourceInterval:[219,224]},"digit",[]],["range",{sourceInterval:[231,239]},"a","f"],["range",{sourceInterval:[246,254]},"A","F"]]],ListOf:["define",{sourceInterval:[258,336]},null,["elem","sep"],["alt",{sourceInterval:[282,336]},["app",{sourceInterval:[282,307]},"NonemptyListOf",[["param",{sourceInterval:[297,301]},0],["param",{sourceInterval:[303,306]},1]]],["app",{sourceInterval:[314,336]},"EmptyListOf",[["param",{sourceInterval:[326,330]},0],["param",{sourceInterval:[332,335]},1]]]]],NonemptyListOf:["define",{sourceInterval:[340,388]},null,["elem","sep"],["seq",{sourceInterval:[372,388]},["param",{sourceInterval:[372,376]},0],["star",{sourceInterval:[377,388]},["seq",{sourceInterval:[378,386]},["param",{sourceInterval:[378,381]},1],["param",{sourceInterval:[382,386]},0]]]]],EmptyListOf:["define",{sourceInterval:[392,434]},null,["elem","sep"],["seq",{sourceInterval:[438,438]}]],listOf:["define",{sourceInterval:[438,516]},null,["elem","sep"],["alt",{sourceInterval:[462,516]},["app",{sourceInterval:[462,487]},"nonemptyListOf",[["param",{sourceInterval:[477,481]},0],["param",{sourceInterval:[483,486]},1]]],["app",{sourceInterval:[494,516]},"emptyListOf",[["param",{sourceInterval:[506,510]},0],["param",{sourceInterval:[512,515]},1]]]]],nonemptyListOf:["define",{sourceInterval:[520,568]},null,["elem","sep"],["seq",{sourceInterval:[552,568]},["param",{sourceInterval:[552,556]},0],["star",{sourceInterval:[557,568]},["seq",{sourceInterval:[558,566]},["param",{sourceInterval:[558,561]},1],["param",{sourceInterval:[562,566]},0]]]]],emptyListOf:["define",{sourceInterval:[572,682]},null,["elem","sep"],["seq",{sourceInterval:[685,685]}]],applySyntactic:["define",{sourceInterval:[685,710]},null,["app"],["param",{sourceInterval:[707,710]},0]]}]);vr.BuiltInRules=hy;Dj(vr.BuiltInRules);var jl=Fl(["grammar",{source:`Ohm {
|
|
373
|
-
|
|
374
|
-
Grammars
|
|
375
|
-
= Grammar*
|
|
376
|
-
|
|
377
|
-
Grammar
|
|
378
|
-
= ident SuperGrammar? "{" Rule* "}"
|
|
379
|
-
|
|
380
|
-
SuperGrammar
|
|
381
|
-
= "<:" ident
|
|
382
|
-
|
|
383
|
-
Rule
|
|
384
|
-
= ident Formals? ruleDescr? "=" RuleBody -- define
|
|
385
|
-
| ident Formals? ":=" OverrideRuleBody -- override
|
|
386
|
-
| ident Formals? "+=" RuleBody -- extend
|
|
387
|
-
|
|
388
|
-
RuleBody
|
|
389
|
-
= "|"? NonemptyListOf<TopLevelTerm, "|">
|
|
390
|
-
|
|
391
|
-
TopLevelTerm
|
|
392
|
-
= Seq caseName -- inline
|
|
393
|
-
| Seq
|
|
394
|
-
|
|
395
|
-
OverrideRuleBody
|
|
396
|
-
= "|"? NonemptyListOf<OverrideTopLevelTerm, "|">
|
|
397
|
-
|
|
398
|
-
OverrideTopLevelTerm
|
|
399
|
-
= "..." -- superSplice
|
|
400
|
-
| TopLevelTerm
|
|
401
|
-
|
|
402
|
-
Formals
|
|
403
|
-
= "<" ListOf<ident, ","> ">"
|
|
404
|
-
|
|
405
|
-
Params
|
|
406
|
-
= "<" ListOf<Seq, ","> ">"
|
|
407
|
-
|
|
408
|
-
Alt
|
|
409
|
-
= NonemptyListOf<Seq, "|">
|
|
410
|
-
|
|
411
|
-
Seq
|
|
412
|
-
= Iter*
|
|
413
|
-
|
|
414
|
-
Iter
|
|
415
|
-
= Pred "*" -- star
|
|
416
|
-
| Pred "+" -- plus
|
|
417
|
-
| Pred "?" -- opt
|
|
418
|
-
| Pred
|
|
419
|
-
|
|
420
|
-
Pred
|
|
421
|
-
= "~" Lex -- not
|
|
422
|
-
| "&" Lex -- lookahead
|
|
423
|
-
| Lex
|
|
424
|
-
|
|
425
|
-
Lex
|
|
426
|
-
= "#" Base -- lex
|
|
427
|
-
| Base
|
|
428
|
-
|
|
429
|
-
Base
|
|
430
|
-
= ident Params? ~(ruleDescr? "=" | ":=" | "+=") -- application
|
|
431
|
-
| oneCharTerminal ".." oneCharTerminal -- range
|
|
432
|
-
| terminal -- terminal
|
|
433
|
-
| "(" Alt ")" -- paren
|
|
434
|
-
|
|
435
|
-
ruleDescr (a rule description)
|
|
436
|
-
= "(" ruleDescrText ")"
|
|
437
|
-
|
|
438
|
-
ruleDescrText
|
|
439
|
-
= (~")" any)*
|
|
440
|
-
|
|
441
|
-
caseName
|
|
442
|
-
= "--" (~"\\n" space)* name (~"\\n" space)* ("\\n" | &"}")
|
|
443
|
-
|
|
444
|
-
name (a name)
|
|
445
|
-
= nameFirst nameRest*
|
|
446
|
-
|
|
447
|
-
nameFirst
|
|
448
|
-
= "_"
|
|
449
|
-
| letter
|
|
450
|
-
|
|
451
|
-
nameRest
|
|
452
|
-
= "_"
|
|
453
|
-
| alnum
|
|
454
|
-
|
|
455
|
-
ident (an identifier)
|
|
456
|
-
= name
|
|
457
|
-
|
|
458
|
-
terminal
|
|
459
|
-
= "\\"" terminalChar* "\\""
|
|
460
|
-
|
|
461
|
-
oneCharTerminal
|
|
462
|
-
= "\\"" terminalChar "\\""
|
|
463
|
-
|
|
464
|
-
terminalChar
|
|
465
|
-
= escapeChar
|
|
466
|
-
| ~"\\\\" ~"\\"" ~"\\n" "\\u{0}".."\\u{10FFFF}"
|
|
467
|
-
|
|
468
|
-
escapeChar (an escape sequence)
|
|
469
|
-
= "\\\\\\\\" -- backslash
|
|
470
|
-
| "\\\\\\"" -- doubleQuote
|
|
471
|
-
| "\\\\\\'" -- singleQuote
|
|
472
|
-
| "\\\\b" -- backspace
|
|
473
|
-
| "\\\\n" -- lineFeed
|
|
474
|
-
| "\\\\r" -- carriageReturn
|
|
475
|
-
| "\\\\t" -- tab
|
|
476
|
-
| "\\\\u{" hexDigit hexDigit? hexDigit?
|
|
477
|
-
hexDigit? hexDigit? hexDigit? "}" -- unicodeCodePoint
|
|
478
|
-
| "\\\\u" hexDigit hexDigit hexDigit hexDigit -- unicodeEscape
|
|
479
|
-
| "\\\\x" hexDigit hexDigit -- hexEscape
|
|
480
|
-
|
|
481
|
-
space
|
|
482
|
-
+= comment
|
|
483
|
-
|
|
484
|
-
comment
|
|
485
|
-
= "//" (~"\\n" any)* &("\\n" | end) -- singleLine
|
|
486
|
-
| "/*" (~"*/" any)* "*/" -- multiLine
|
|
487
|
-
|
|
488
|
-
tokens = token*
|
|
489
|
-
|
|
490
|
-
token = caseName | comment | ident | operator | punctuation | terminal | any
|
|
491
|
-
|
|
492
|
-
operator = "<:" | "=" | ":=" | "+=" | "*" | "+" | "?" | "~" | "&"
|
|
493
|
-
|
|
494
|
-
punctuation = "<" | ">" | "," | "--"
|
|
495
|
-
}`},"Ohm",null,"Grammars",{Grammars:["define",{sourceInterval:[9,32]},null,[],["star",{sourceInterval:[24,32]},["app",{sourceInterval:[24,31]},"Grammar",[]]]],Grammar:["define",{sourceInterval:[36,83]},null,[],["seq",{sourceInterval:[50,83]},["app",{sourceInterval:[50,55]},"ident",[]],["opt",{sourceInterval:[56,69]},["app",{sourceInterval:[56,68]},"SuperGrammar",[]]],["terminal",{sourceInterval:[70,73]},"{"],["star",{sourceInterval:[74,79]},["app",{sourceInterval:[74,78]},"Rule",[]]],["terminal",{sourceInterval:[80,83]},"}"]]],SuperGrammar:["define",{sourceInterval:[87,116]},null,[],["seq",{sourceInterval:[106,116]},["terminal",{sourceInterval:[106,110]},"<:"],["app",{sourceInterval:[111,116]},"ident",[]]]],Rule_define:["define",{sourceInterval:[131,181]},null,[],["seq",{sourceInterval:[131,170]},["app",{sourceInterval:[131,136]},"ident",[]],["opt",{sourceInterval:[137,145]},["app",{sourceInterval:[137,144]},"Formals",[]]],["opt",{sourceInterval:[146,156]},["app",{sourceInterval:[146,155]},"ruleDescr",[]]],["terminal",{sourceInterval:[157,160]},"="],["app",{sourceInterval:[162,170]},"RuleBody",[]]]],Rule_override:["define",{sourceInterval:[188,248]},null,[],["seq",{sourceInterval:[188,235]},["app",{sourceInterval:[188,193]},"ident",[]],["opt",{sourceInterval:[194,202]},["app",{sourceInterval:[194,201]},"Formals",[]]],["terminal",{sourceInterval:[214,218]},":="],["app",{sourceInterval:[219,235]},"OverrideRuleBody",[]]]],Rule_extend:["define",{sourceInterval:[255,305]},null,[],["seq",{sourceInterval:[255,294]},["app",{sourceInterval:[255,260]},"ident",[]],["opt",{sourceInterval:[261,269]},["app",{sourceInterval:[261,268]},"Formals",[]]],["terminal",{sourceInterval:[281,285]},"+="],["app",{sourceInterval:[286,294]},"RuleBody",[]]]],Rule:["define",{sourceInterval:[120,305]},null,[],["alt",{sourceInterval:[131,305]},["app",{sourceInterval:[131,170]},"Rule_define",[]],["app",{sourceInterval:[188,235]},"Rule_override",[]],["app",{sourceInterval:[255,294]},"Rule_extend",[]]]],RuleBody:["define",{sourceInterval:[309,362]},null,[],["seq",{sourceInterval:[324,362]},["opt",{sourceInterval:[324,328]},["terminal",{sourceInterval:[324,327]},"|"]],["app",{sourceInterval:[329,362]},"NonemptyListOf",[["app",{sourceInterval:[344,356]},"TopLevelTerm",[]],["terminal",{sourceInterval:[358,361]},"|"]]]]],TopLevelTerm_inline:["define",{sourceInterval:[385,408]},null,[],["seq",{sourceInterval:[385,397]},["app",{sourceInterval:[385,388]},"Seq",[]],["app",{sourceInterval:[389,397]},"caseName",[]]]],TopLevelTerm:["define",{sourceInterval:[366,418]},null,[],["alt",{sourceInterval:[385,418]},["app",{sourceInterval:[385,397]},"TopLevelTerm_inline",[]],["app",{sourceInterval:[415,418]},"Seq",[]]]],OverrideRuleBody:["define",{sourceInterval:[422,491]},null,[],["seq",{sourceInterval:[445,491]},["opt",{sourceInterval:[445,449]},["terminal",{sourceInterval:[445,448]},"|"]],["app",{sourceInterval:[450,491]},"NonemptyListOf",[["app",{sourceInterval:[465,485]},"OverrideTopLevelTerm",[]],["terminal",{sourceInterval:[487,490]},"|"]]]]],OverrideTopLevelTerm_superSplice:["define",{sourceInterval:[522,543]},null,[],["terminal",{sourceInterval:[522,527]},"..."]],OverrideTopLevelTerm:["define",{sourceInterval:[495,562]},null,[],["alt",{sourceInterval:[522,562]},["app",{sourceInterval:[522,527]},"OverrideTopLevelTerm_superSplice",[]],["app",{sourceInterval:[550,562]},"TopLevelTerm",[]]]],Formals:["define",{sourceInterval:[566,606]},null,[],["seq",{sourceInterval:[580,606]},["terminal",{sourceInterval:[580,583]},"<"],["app",{sourceInterval:[584,602]},"ListOf",[["app",{sourceInterval:[591,596]},"ident",[]],["terminal",{sourceInterval:[598,601]},","]]],["terminal",{sourceInterval:[603,606]},">"]]],Params:["define",{sourceInterval:[610,647]},null,[],["seq",{sourceInterval:[623,647]},["terminal",{sourceInterval:[623,626]},"<"],["app",{sourceInterval:[627,643]},"ListOf",[["app",{sourceInterval:[634,637]},"Seq",[]],["terminal",{sourceInterval:[639,642]},","]]],["terminal",{sourceInterval:[644,647]},">"]]],Alt:["define",{sourceInterval:[651,685]},null,[],["app",{sourceInterval:[661,685]},"NonemptyListOf",[["app",{sourceInterval:[676,679]},"Seq",[]],["terminal",{sourceInterval:[681,684]},"|"]]]],Seq:["define",{sourceInterval:[689,704]},null,[],["star",{sourceInterval:[699,704]},["app",{sourceInterval:[699,703]},"Iter",[]]]],Iter_star:["define",{sourceInterval:[719,736]},null,[],["seq",{sourceInterval:[719,727]},["app",{sourceInterval:[719,723]},"Pred",[]],["terminal",{sourceInterval:[724,727]},"*"]]],Iter_plus:["define",{sourceInterval:[743,760]},null,[],["seq",{sourceInterval:[743,751]},["app",{sourceInterval:[743,747]},"Pred",[]],["terminal",{sourceInterval:[748,751]},"+"]]],Iter_opt:["define",{sourceInterval:[767,783]},null,[],["seq",{sourceInterval:[767,775]},["app",{sourceInterval:[767,771]},"Pred",[]],["terminal",{sourceInterval:[772,775]},"?"]]],Iter:["define",{sourceInterval:[708,794]},null,[],["alt",{sourceInterval:[719,794]},["app",{sourceInterval:[719,727]},"Iter_star",[]],["app",{sourceInterval:[743,751]},"Iter_plus",[]],["app",{sourceInterval:[767,775]},"Iter_opt",[]],["app",{sourceInterval:[790,794]},"Pred",[]]]],Pred_not:["define",{sourceInterval:[809,824]},null,[],["seq",{sourceInterval:[809,816]},["terminal",{sourceInterval:[809,812]},"~"],["app",{sourceInterval:[813,816]},"Lex",[]]]],Pred_lookahead:["define",{sourceInterval:[831,852]},null,[],["seq",{sourceInterval:[831,838]},["terminal",{sourceInterval:[831,834]},"&"],["app",{sourceInterval:[835,838]},"Lex",[]]]],Pred:["define",{sourceInterval:[798,862]},null,[],["alt",{sourceInterval:[809,862]},["app",{sourceInterval:[809,816]},"Pred_not",[]],["app",{sourceInterval:[831,838]},"Pred_lookahead",[]],["app",{sourceInterval:[859,862]},"Lex",[]]]],Lex_lex:["define",{sourceInterval:[876,892]},null,[],["seq",{sourceInterval:[876,884]},["terminal",{sourceInterval:[876,879]},"#"],["app",{sourceInterval:[880,884]},"Base",[]]]],Lex:["define",{sourceInterval:[866,903]},null,[],["alt",{sourceInterval:[876,903]},["app",{sourceInterval:[876,884]},"Lex_lex",[]],["app",{sourceInterval:[899,903]},"Base",[]]]],Base_application:["define",{sourceInterval:[918,979]},null,[],["seq",{sourceInterval:[918,963]},["app",{sourceInterval:[918,923]},"ident",[]],["opt",{sourceInterval:[924,931]},["app",{sourceInterval:[924,930]},"Params",[]]],["not",{sourceInterval:[932,963]},["alt",{sourceInterval:[934,962]},["seq",{sourceInterval:[934,948]},["opt",{sourceInterval:[934,944]},["app",{sourceInterval:[934,943]},"ruleDescr",[]]],["terminal",{sourceInterval:[945,948]},"="]],["terminal",{sourceInterval:[951,955]},":="],["terminal",{sourceInterval:[958,962]},"+="]]]]],Base_range:["define",{sourceInterval:[986,1041]},null,[],["seq",{sourceInterval:[986,1022]},["app",{sourceInterval:[986,1001]},"oneCharTerminal",[]],["terminal",{sourceInterval:[1002,1006]},".."],["app",{sourceInterval:[1007,1022]},"oneCharTerminal",[]]]],Base_terminal:["define",{sourceInterval:[1048,1106]},null,[],["app",{sourceInterval:[1048,1056]},"terminal",[]]],Base_paren:["define",{sourceInterval:[1113,1168]},null,[],["seq",{sourceInterval:[1113,1124]},["terminal",{sourceInterval:[1113,1116]},"("],["app",{sourceInterval:[1117,1120]},"Alt",[]],["terminal",{sourceInterval:[1121,1124]},")"]]],Base:["define",{sourceInterval:[907,1168]},null,[],["alt",{sourceInterval:[918,1168]},["app",{sourceInterval:[918,963]},"Base_application",[]],["app",{sourceInterval:[986,1022]},"Base_range",[]],["app",{sourceInterval:[1048,1056]},"Base_terminal",[]],["app",{sourceInterval:[1113,1124]},"Base_paren",[]]]],ruleDescr:["define",{sourceInterval:[1172,1231]},"a rule description",[],["seq",{sourceInterval:[1210,1231]},["terminal",{sourceInterval:[1210,1213]},"("],["app",{sourceInterval:[1214,1227]},"ruleDescrText",[]],["terminal",{sourceInterval:[1228,1231]},")"]]],ruleDescrText:["define",{sourceInterval:[1235,1266]},null,[],["star",{sourceInterval:[1255,1266]},["seq",{sourceInterval:[1256,1264]},["not",{sourceInterval:[1256,1260]},["terminal",{sourceInterval:[1257,1260]},")"]],["app",{sourceInterval:[1261,1264]},"any",[]]]]],caseName:["define",{sourceInterval:[1270,1338]},null,[],["seq",{sourceInterval:[1285,1338]},["terminal",{sourceInterval:[1285,1289]},"--"],["star",{sourceInterval:[1290,1304]},["seq",{sourceInterval:[1291,1302]},["not",{sourceInterval:[1291,1296]},["terminal",{sourceInterval:[1292,1296]},`
|
|
496
|
-
`]],["app",{sourceInterval:[1297,1302]},"space",[]]]],["app",{sourceInterval:[1305,1309]},"name",[]],["star",{sourceInterval:[1310,1324]},["seq",{sourceInterval:[1311,1322]},["not",{sourceInterval:[1311,1316]},["terminal",{sourceInterval:[1312,1316]},`
|
|
497
|
-
`]],["app",{sourceInterval:[1317,1322]},"space",[]]]],["alt",{sourceInterval:[1326,1337]},["terminal",{sourceInterval:[1326,1330]},`
|
|
498
|
-
`],["lookahead",{sourceInterval:[1333,1337]},["terminal",{sourceInterval:[1334,1337]},"}"]]]]],name:["define",{sourceInterval:[1342,1382]},"a name",[],["seq",{sourceInterval:[1363,1382]},["app",{sourceInterval:[1363,1372]},"nameFirst",[]],["star",{sourceInterval:[1373,1382]},["app",{sourceInterval:[1373,1381]},"nameRest",[]]]]],nameFirst:["define",{sourceInterval:[1386,1418]},null,[],["alt",{sourceInterval:[1402,1418]},["terminal",{sourceInterval:[1402,1405]},"_"],["app",{sourceInterval:[1412,1418]},"letter",[]]]],nameRest:["define",{sourceInterval:[1422,1452]},null,[],["alt",{sourceInterval:[1437,1452]},["terminal",{sourceInterval:[1437,1440]},"_"],["app",{sourceInterval:[1447,1452]},"alnum",[]]]],ident:["define",{sourceInterval:[1456,1489]},"an identifier",[],["app",{sourceInterval:[1485,1489]},"name",[]]],terminal:["define",{sourceInterval:[1493,1531]},null,[],["seq",{sourceInterval:[1508,1531]},["terminal",{sourceInterval:[1508,1512]},'"'],["star",{sourceInterval:[1513,1526]},["app",{sourceInterval:[1513,1525]},"terminalChar",[]]],["terminal",{sourceInterval:[1527,1531]},'"']]],oneCharTerminal:["define",{sourceInterval:[1535,1579]},null,[],["seq",{sourceInterval:[1557,1579]},["terminal",{sourceInterval:[1557,1561]},'"'],["app",{sourceInterval:[1562,1574]},"terminalChar",[]],["terminal",{sourceInterval:[1575,1579]},'"']]],terminalChar:["define",{sourceInterval:[1583,1660]},null,[],["alt",{sourceInterval:[1602,1660]},["app",{sourceInterval:[1602,1612]},"escapeChar",[]],["seq",{sourceInterval:[1621,1660]},["not",{sourceInterval:[1621,1626]},["terminal",{sourceInterval:[1622,1626]},"\\"]],["not",{sourceInterval:[1627,1632]},["terminal",{sourceInterval:[1628,1632]},'"']],["not",{sourceInterval:[1633,1638]},["terminal",{sourceInterval:[1634,1638]},`
|
|
499
|
-
`]],["range",{sourceInterval:[1639,1660]},"\0","\u{10FFFF}"]]]],escapeChar_backslash:["define",{sourceInterval:[1703,1758]},null,[],["terminal",{sourceInterval:[1703,1709]},"\\\\"]],escapeChar_doubleQuote:["define",{sourceInterval:[1765,1822]},null,[],["terminal",{sourceInterval:[1765,1771]},'\\"']],escapeChar_singleQuote:["define",{sourceInterval:[1829,1886]},null,[],["terminal",{sourceInterval:[1829,1835]},"\\'"]],escapeChar_backspace:["define",{sourceInterval:[1893,1948]},null,[],["terminal",{sourceInterval:[1893,1898]},"\\b"]],escapeChar_lineFeed:["define",{sourceInterval:[1955,2009]},null,[],["terminal",{sourceInterval:[1955,1960]},"\\n"]],escapeChar_carriageReturn:["define",{sourceInterval:[2016,2076]},null,[],["terminal",{sourceInterval:[2016,2021]},"\\r"]],escapeChar_tab:["define",{sourceInterval:[2083,2132]},null,[],["terminal",{sourceInterval:[2083,2088]},"\\t"]],escapeChar_unicodeCodePoint:["define",{sourceInterval:[2139,2243]},null,[],["seq",{sourceInterval:[2139,2221]},["terminal",{sourceInterval:[2139,2145]},"\\u{"],["app",{sourceInterval:[2146,2154]},"hexDigit",[]],["opt",{sourceInterval:[2155,2164]},["app",{sourceInterval:[2155,2163]},"hexDigit",[]]],["opt",{sourceInterval:[2165,2174]},["app",{sourceInterval:[2165,2173]},"hexDigit",[]]],["opt",{sourceInterval:[2188,2197]},["app",{sourceInterval:[2188,2196]},"hexDigit",[]]],["opt",{sourceInterval:[2198,2207]},["app",{sourceInterval:[2198,2206]},"hexDigit",[]]],["opt",{sourceInterval:[2208,2217]},["app",{sourceInterval:[2208,2216]},"hexDigit",[]]],["terminal",{sourceInterval:[2218,2221]},"}"]]],escapeChar_unicodeEscape:["define",{sourceInterval:[2250,2309]},null,[],["seq",{sourceInterval:[2250,2291]},["terminal",{sourceInterval:[2250,2255]},"\\u"],["app",{sourceInterval:[2256,2264]},"hexDigit",[]],["app",{sourceInterval:[2265,2273]},"hexDigit",[]],["app",{sourceInterval:[2274,2282]},"hexDigit",[]],["app",{sourceInterval:[2283,2291]},"hexDigit",[]]]],escapeChar_hexEscape:["define",{sourceInterval:[2316,2371]},null,[],["seq",{sourceInterval:[2316,2339]},["terminal",{sourceInterval:[2316,2321]},"\\x"],["app",{sourceInterval:[2322,2330]},"hexDigit",[]],["app",{sourceInterval:[2331,2339]},"hexDigit",[]]]],escapeChar:["define",{sourceInterval:[1664,2371]},"an escape sequence",[],["alt",{sourceInterval:[1703,2371]},["app",{sourceInterval:[1703,1709]},"escapeChar_backslash",[]],["app",{sourceInterval:[1765,1771]},"escapeChar_doubleQuote",[]],["app",{sourceInterval:[1829,1835]},"escapeChar_singleQuote",[]],["app",{sourceInterval:[1893,1898]},"escapeChar_backspace",[]],["app",{sourceInterval:[1955,1960]},"escapeChar_lineFeed",[]],["app",{sourceInterval:[2016,2021]},"escapeChar_carriageReturn",[]],["app",{sourceInterval:[2083,2088]},"escapeChar_tab",[]],["app",{sourceInterval:[2139,2221]},"escapeChar_unicodeCodePoint",[]],["app",{sourceInterval:[2250,2291]},"escapeChar_unicodeEscape",[]],["app",{sourceInterval:[2316,2339]},"escapeChar_hexEscape",[]]]],space:["extend",{sourceInterval:[2375,2394]},null,[],["app",{sourceInterval:[2387,2394]},"comment",[]]],comment_singleLine:["define",{sourceInterval:[2412,2458]},null,[],["seq",{sourceInterval:[2412,2443]},["terminal",{sourceInterval:[2412,2416]},"//"],["star",{sourceInterval:[2417,2429]},["seq",{sourceInterval:[2418,2427]},["not",{sourceInterval:[2418,2423]},["terminal",{sourceInterval:[2419,2423]},`
|
|
500
|
-
`]],["app",{sourceInterval:[2424,2427]},"any",[]]]],["lookahead",{sourceInterval:[2430,2443]},["alt",{sourceInterval:[2432,2442]},["terminal",{sourceInterval:[2432,2436]},`
|
|
501
|
-
`],["app",{sourceInterval:[2439,2442]},"end",[]]]]]],comment_multiLine:["define",{sourceInterval:[2465,2501]},null,[],["seq",{sourceInterval:[2465,2487]},["terminal",{sourceInterval:[2465,2469]},"/*"],["star",{sourceInterval:[2470,2482]},["seq",{sourceInterval:[2471,2480]},["not",{sourceInterval:[2471,2476]},["terminal",{sourceInterval:[2472,2476]},"*/"]],["app",{sourceInterval:[2477,2480]},"any",[]]]],["terminal",{sourceInterval:[2483,2487]},"*/"]]],comment:["define",{sourceInterval:[2398,2501]},null,[],["alt",{sourceInterval:[2412,2501]},["app",{sourceInterval:[2412,2443]},"comment_singleLine",[]],["app",{sourceInterval:[2465,2487]},"comment_multiLine",[]]]],tokens:["define",{sourceInterval:[2505,2520]},null,[],["star",{sourceInterval:[2514,2520]},["app",{sourceInterval:[2514,2519]},"token",[]]]],token:["define",{sourceInterval:[2524,2600]},null,[],["alt",{sourceInterval:[2532,2600]},["app",{sourceInterval:[2532,2540]},"caseName",[]],["app",{sourceInterval:[2543,2550]},"comment",[]],["app",{sourceInterval:[2553,2558]},"ident",[]],["app",{sourceInterval:[2561,2569]},"operator",[]],["app",{sourceInterval:[2572,2583]},"punctuation",[]],["app",{sourceInterval:[2586,2594]},"terminal",[]],["app",{sourceInterval:[2597,2600]},"any",[]]]],operator:["define",{sourceInterval:[2604,2669]},null,[],["alt",{sourceInterval:[2615,2669]},["terminal",{sourceInterval:[2615,2619]},"<:"],["terminal",{sourceInterval:[2622,2625]},"="],["terminal",{sourceInterval:[2628,2632]},":="],["terminal",{sourceInterval:[2635,2639]},"+="],["terminal",{sourceInterval:[2642,2645]},"*"],["terminal",{sourceInterval:[2648,2651]},"+"],["terminal",{sourceInterval:[2654,2657]},"?"],["terminal",{sourceInterval:[2660,2663]},"~"],["terminal",{sourceInterval:[2666,2669]},"&"]]],punctuation:["define",{sourceInterval:[2673,2709]},null,[],["alt",{sourceInterval:[2687,2709]},["terminal",{sourceInterval:[2687,2690]},"<"],["terminal",{sourceInterval:[2693,2696]},">"],["terminal",{sourceInterval:[2699,2702]},","],["terminal",{sourceInterval:[2705,2709]},"--"]]]}]),Qg=Object.create(he.prototype);function Yx(t,e){for(let r in t)if(r===e)return!0;return!1}function dy(t,e,r,i){let n=new _a(i),s,a,o,u=!1;return(r||jl).createSemantics().addOperation("visit",{Grammars(h){return h.children.map(p=>p.visit())},Grammar(h,p,m,v,S){let b=h.visit();s=n.newGrammar(b),p.child(0)&&p.child(0).visit(),v.children.map(k=>k.visit());let g=s.build();if(g.source=this.source.trimmed(),Yx(e,b))throw bj(g);return e[b]=g,g},SuperGrammar(h,p){let m=p.visit();if(m==="null")s.withSuperGrammar(null);else{if(!e||!Yx(e,m))throw vj(m,e,p.source);s.withSuperGrammar(e[m])}},Rule_define(h,p,m,v,S){a=h.visit(),o=p.children.map(w=>w.visit())[0]||[],!s.defaultStartRule&&s.ensureSuperGrammar()!==vr.ProtoBuiltInRules&&s.withDefaultStartRule(a);let b=S.visit(),g=m.children.map(w=>w.visit())[0],k=this.source.trimmed();return s.define(a,o,b,g,k)},Rule_override(h,p,m,v){a=h.visit(),o=p.children.map(g=>g.visit())[0]||[];let S=this.source.trimmed();s.ensureSuperGrammarRuleForOverriding(a,S),u=!0;let b=v.visit();return u=!1,s.override(a,o,b,null,S)},Rule_extend(h,p,m,v){a=h.visit(),o=p.children.map(g=>g.visit())[0]||[];let S=v.visit(),b=this.source.trimmed();return s.extend(a,o,S,null,b)},RuleBody(h,p){return n.alt(...p.visit()).withSource(this.source)},OverrideRuleBody(h,p){let m=p.visit(),v=m.indexOf(Qg);if(v>=0){let S=m.slice(0,v),b=m.slice(v+1);return b.forEach(g=>{if(g===Qg)throw Nj(g)}),new hs(s.superGrammar,a,S,b).withSource(this.source)}else return n.alt(...m).withSource(this.source)},Formals(h,p,m){return p.visit()},Params(h,p,m){return p.visit()},Alt(h){return n.alt(...h.visit()).withSource(this.source)},TopLevelTerm_inline(h,p){let m=a+"_"+p.visit(),v=h.visit(),S=this.source.trimmed(),b=!(s.superGrammar&&s.superGrammar.rules[m]);u&&!b?s.override(m,o,v,null,S):s.define(m,o,v,null,S);let g=o.map(k=>n.app(k));return n.app(m,g).withSource(v.source)},OverrideTopLevelTerm_superSplice(h){return Qg},Seq(h){return n.seq(...h.children.map(p=>p.visit())).withSource(this.source)},Iter_star(h,p){return n.star(h.visit()).withSource(this.source)},Iter_plus(h,p){return n.plus(h.visit()).withSource(this.source)},Iter_opt(h,p){return n.opt(h.visit()).withSource(this.source)},Pred_not(h,p){return n.not(p.visit()).withSource(this.source)},Pred_lookahead(h,p){return n.lookahead(p.visit()).withSource(this.source)},Lex_lex(h,p){return n.lex(p.visit()).withSource(this.source)},Base_application(h,p){let m=p.children.map(v=>v.visit())[0]||[];return n.app(h.visit(),m).withSource(this.source)},Base_range(h,p,m){return n.range(h.visit(),m.visit()).withSource(this.source)},Base_terminal(h){return n.terminal(h.visit()).withSource(this.source)},Base_paren(h,p,m){return p.visit()},ruleDescr(h,p,m){return p.visit()},ruleDescrText(h){return this.sourceString.trim()},caseName(h,p,m,v,S){return m.visit()},name(h,p){return this.sourceString},nameFirst(h){},nameRest(h){},terminal(h,p,m){return p.children.map(v=>v.visit()).join("")},oneCharTerminal(h,p,m){return p.visit()},escapeChar(h){try{return nk(this.sourceString)}catch(p){throw p instanceof RangeError&&p.message.startsWith("Invalid code point ")?Lj(h):p}},NonemptyListOf(h,p,m){return[h.visit()].concat(m.children.map(v=>v.visit()))},EmptyListOf(){return[]},_terminal(){return this.sourceString}})(t).visit()}var Zj=Fl(["grammar",{source:`OperationsAndAttributes {
|
|
502
|
-
|
|
503
|
-
AttributeSignature =
|
|
504
|
-
name
|
|
505
|
-
|
|
506
|
-
OperationSignature =
|
|
507
|
-
name Formals?
|
|
508
|
-
|
|
509
|
-
Formals
|
|
510
|
-
= "(" ListOf<name, ","> ")"
|
|
511
|
-
|
|
512
|
-
name (a name)
|
|
513
|
-
= nameFirst nameRest*
|
|
514
|
-
|
|
515
|
-
nameFirst
|
|
516
|
-
= "_"
|
|
517
|
-
| letter
|
|
518
|
-
|
|
519
|
-
nameRest
|
|
520
|
-
= "_"
|
|
521
|
-
| alnum
|
|
522
|
-
|
|
523
|
-
}`},"OperationsAndAttributes",null,"AttributeSignature",{AttributeSignature:["define",{sourceInterval:[29,58]},null,[],["app",{sourceInterval:[54,58]},"name",[]]],OperationSignature:["define",{sourceInterval:[62,100]},null,[],["seq",{sourceInterval:[87,100]},["app",{sourceInterval:[87,91]},"name",[]],["opt",{sourceInterval:[92,100]},["app",{sourceInterval:[92,99]},"Formals",[]]]]],Formals:["define",{sourceInterval:[104,143]},null,[],["seq",{sourceInterval:[118,143]},["terminal",{sourceInterval:[118,121]},"("],["app",{sourceInterval:[122,139]},"ListOf",[["app",{sourceInterval:[129,133]},"name",[]],["terminal",{sourceInterval:[135,138]},","]]],["terminal",{sourceInterval:[140,143]},")"]]],name:["define",{sourceInterval:[147,187]},"a name",[],["seq",{sourceInterval:[168,187]},["app",{sourceInterval:[168,177]},"nameFirst",[]],["star",{sourceInterval:[178,187]},["app",{sourceInterval:[178,186]},"nameRest",[]]]]],nameFirst:["define",{sourceInterval:[191,223]},null,[],["alt",{sourceInterval:[207,223]},["terminal",{sourceInterval:[207,210]},"_"],["app",{sourceInterval:[217,223]},"letter",[]]]],nameRest:["define",{sourceInterval:[227,257]},null,[],["alt",{sourceInterval:[242,257]},["terminal",{sourceInterval:[242,245]},"_"],["app",{sourceInterval:[252,257]},"alnum",[]]]]}]);e6(vr.BuiltInRules);t6(Zj);function e6(t){let e={empty(){return this.iteration()},nonEmpty(r,i,n){return this.iteration([r].concat(n.children))},self(...r){return this}};_r.BuiltInSemantics=_r.createSemantics(t,null).addOperation("asIteration",{emptyListOf:e.empty,nonemptyListOf:e.nonEmpty,EmptyListOf:e.empty,NonemptyListOf:e.nonEmpty,_iter:e.self})}function t6(t){_r.prototypeGrammarSemantics=t.createSemantics().addOperation("parse",{AttributeSignature(e){return{name:e.parse(),formals:[]}},OperationSignature(e,r){return{name:e.parse(),formals:r.children.map(i=>i.parse())[0]||[]}},Formals(e,r,i){return r.asIteration().children.map(n=>n.parse())},name(e,r){return this.sourceString}}),_r.prototypeGrammar=t}function r6(t){let e=0,r=[0],i=()=>r[r.length-1],n={},s=/( *).*(?:$|\r?\n|\r)/g,a;for(;(a=s.exec(t))!=null;){let[o,u]=a;if(o.length===0)break;let l=u.length,f=i(),h=e+l;if(l>f)r.push(l),n[h]=1;else if(l<f){let p=r.length;for(;i()!==l;)r.pop();n[h]=-1*(p-r.length)}e+=o.length}return r.length>1&&(n[e]=1-r.length),n}var gk="an indented block",yk="a dedent",Xx=1114112,uy=class extends ga{constructor(e){super(e.input),this.state=e}_indentationAt(e){return this.state.userData[e]||0}atEnd(){return super.atEnd()&&this._indentationAt(this.pos)===0}next(){if(this._indentationAt(this.pos)!==0){this.examinedLength=Math.max(this.examinedLength,this.pos);return}return super.next()}nextCharCode(){return this._indentationAt(this.pos)!==0?(this.examinedLength=Math.max(this.examinedLength,this.pos),Xx):super.nextCharCode()}nextCodePoint(){return this._indentationAt(this.pos)!==0?(this.examinedLength=Math.max(this.examinedLength,this.pos),Xx):super.nextCodePoint()}},Ml=class extends he{constructor(e=!0){super(),this.isIndent=e}allowsSkippingPrecedingSpace(){return!0}eval(e){let{inputStream:r}=e,i=e.userData;e.doNotMemoize=!0;let n=r.pos,s=this.isIndent?1:-1;return(i[n]||0)*s>0?(e.userData=Object.create(i),e.userData[n]-=s,e.pushBinding(new Ji(0),n),!0):(e.processFailure(n,this),!1)}getArity(){return 1}_assertAllApplicationsAreValid(e,r){}_isNullable(e,r){return!1}assertChoicesHaveUniformArity(e){}assertIteratedExprsAreNotNullable(e){}introduceParams(e){return this}substituteParams(e){return this}toString(){return this.isIndent?"indent":"dedent"}toDisplayString(){return this.toString()}toFailure(e){let r=this.isIndent?gk:yk;return new br(this,r,"description")}},i6=new ke("indent"),n6=new ke("dedent"),s6=new hs(hy,"any",[i6,n6],[]),_k=new _a().newGrammar("IndentationSensitive").withSuperGrammar(hy).define("indent",[],new Ml(!0),gk,void 0,!0).define("dedent",[],new Ml(!1),yk,void 0,!0).extend("any",[],s6,"any character",void 0).build();Object.assign(_k,{_matchStateInitializer(t){t.userData=r6(t.input),t.inputStream=new uy(t)},supportsIncrementalParsing:!1});var a6="17.5.0";vr.initApplicationParser(jl,dy);var o6=t=>!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t);function u6(t,e,r){let i=jl.match(t,"Grammars");if(i.failed())throw _j(i);return dy(i,e,void 0,r)}function c6(t,e,r){let i=vk(t,e,r),n=Object.keys(i);if(n.length===0)throw new Error("Missing grammar definition");if(n.length>1){let a=i[n[1]].source;throw new Error(fy(a.sourceString,a.startIdx)+"Found more than one grammar definition -- use ohm.grammars() instead.")}return i[n[0]]}function vk(t,e,r){let i=Object.create(e||{});if(typeof t!="string")if(o6(t))t=t.toString();else throw new TypeError("Expected string as first argument, got "+cy(t));return u6(t,i,r),i}function l6(t,e){return c6(t,e)}function f6(t,e){return vk(t,e)}Ai.ExperimentalIndentationSensitive=_k;Ai._buildGrammar=dy;Ai.grammar=l6;Ai.grammars=f6;Ai.makeRecipe=Fl;Ai.ohmGrammar=jl;Ai.pexprs=Qj;Ai.version=a6});var wk=T((Ene,Sk)=>{y();Sk.exports=String.raw`Helpers {
|
|
524
|
-
Node = TextNode*
|
|
525
|
-
TextNode = AnyExceptPlus<openControl>
|
|
526
|
-
openControl = end
|
|
527
|
-
|
|
528
|
-
empty = /* nothing */
|
|
529
|
-
anyExcept<lit> = (~ lit any)
|
|
530
|
-
anyExceptStar<lit> = (~ lit any)*
|
|
531
|
-
anyExceptPlus<lit> = (~ lit any)+
|
|
532
|
-
AnyExcept<lit> = (~ lit any)
|
|
533
|
-
AnyExceptPlus<lit> = (~ lit any)+
|
|
534
|
-
AnyExceptStar<lit> = (~ lit any)*
|
|
535
|
-
identifierCharacter = alnum | "_" | "-"
|
|
536
|
-
|
|
537
|
-
orderedListOf<a, b, sep> =
|
|
538
|
-
| nonemptyOrderedListOf<a, b, sep>
|
|
539
|
-
| emptyListOf<a, sep>
|
|
540
|
-
nonemptyOrderedListOf<a, b, sep> =
|
|
541
|
-
| nonemptyListOf<b, sep>
|
|
542
|
-
| nonemptyOrderedListOfBoth<a, b, sep>
|
|
543
|
-
| nonemptyListOf<a, sep>
|
|
544
|
-
nonemptyOrderedListOfBoth<a, b, sep> =
|
|
545
|
-
nonemptyListOf<a, sep> (sep nonemptyListOf<b, sep>)
|
|
546
|
-
|
|
547
|
-
singleQuote = "'" | "‘" | "’"
|
|
548
|
-
doubleQuote = "\"" | "“" | "”"
|
|
549
|
-
controls = "\u{007F}".."\u{009F}"
|
|
550
|
-
noncharacters = "\u{FDD0}".."\u{FDEF}"
|
|
551
|
-
newline = "\r"? "\n"
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
Liquid <: Helpers {
|
|
555
|
-
Node := (liquidNode | TextNode)*
|
|
556
|
-
openControl := "{{" | "{%"
|
|
557
|
-
endOfTagName = &("-%}" | "-}}" | "%}" | "}}")
|
|
558
|
-
endOfVarName = ~identifierCharacter
|
|
559
|
-
endOfIdentifier = endOfTagName | endOfVarName
|
|
560
|
-
|
|
561
|
-
liquidNode =
|
|
562
|
-
| liquidDoc
|
|
563
|
-
| liquidBlockComment
|
|
564
|
-
| liquidRawTag
|
|
565
|
-
| liquidDrop
|
|
566
|
-
| liquidTagClose
|
|
567
|
-
| liquidTagOpen
|
|
568
|
-
| liquidTag
|
|
569
|
-
| liquidInlineComment
|
|
570
|
-
|
|
571
|
-
liquidTagStrict =
|
|
572
|
-
| liquidTagAssign
|
|
573
|
-
| liquidTagBreak
|
|
574
|
-
| liquidTagContinue
|
|
575
|
-
| liquidTagCycle
|
|
576
|
-
| liquidTagContentFor
|
|
577
|
-
| liquidTagDecrement
|
|
578
|
-
| liquidTagEcho
|
|
579
|
-
| liquidTagElse
|
|
580
|
-
| liquidTagElsif
|
|
581
|
-
| liquidTagInclude
|
|
582
|
-
| liquidTagIncrement
|
|
583
|
-
| liquidTagLayout
|
|
584
|
-
| liquidTagLiquid
|
|
585
|
-
| liquidTagRender
|
|
586
|
-
| liquidTagSection
|
|
587
|
-
| liquidTagSections
|
|
588
|
-
| liquidTagWhen
|
|
589
|
-
|
|
590
|
-
liquidTag =
|
|
591
|
-
| liquidTagStrict
|
|
592
|
-
| liquidTagBaseCase
|
|
593
|
-
|
|
594
|
-
liquidTagOpenStrict =
|
|
595
|
-
| liquidTagOpenCase
|
|
596
|
-
| liquidTagOpenCapture
|
|
597
|
-
| liquidTagOpenForm
|
|
598
|
-
| liquidTagOpenFor
|
|
599
|
-
| liquidTagOpenTablerow
|
|
600
|
-
| liquidTagOpenIf
|
|
601
|
-
| liquidTagOpenPaginate
|
|
602
|
-
| liquidTagOpenUnless
|
|
603
|
-
|
|
604
|
-
liquidTagOpen =
|
|
605
|
-
| liquidTagOpenStrict
|
|
606
|
-
| liquidTagOpenBaseCase
|
|
607
|
-
|
|
608
|
-
liquidTagClose = "{%" "-"? space* "end" blockName space* tagMarkup "-"? "%}"
|
|
609
|
-
|
|
610
|
-
// These two are the same but transformed differently
|
|
611
|
-
liquidTagRule<name, markup> =
|
|
612
|
-
"{%" "-"? space* (name endOfIdentifier) space* markup "-"? "%}"
|
|
613
|
-
liquidTagOpenRule<name, markup> =
|
|
614
|
-
"{%" "-"? space* (name endOfIdentifier) space* markup "-"? "%}"
|
|
615
|
-
|
|
616
|
-
liquidTagBaseCase = liquidTagRule<liquidTagName, tagMarkup>
|
|
617
|
-
|
|
618
|
-
liquidTagEcho = liquidTagRule<"echo", liquidTagEchoMarkup>
|
|
619
|
-
liquidTagEchoMarkup = liquidVariable<delimTag>
|
|
620
|
-
|
|
621
|
-
liquidTagAssign = liquidTagRule<"assign", liquidTagAssignMarkup>
|
|
622
|
-
liquidTagAssignMarkup = variableSegment space* "=" space* liquidVariable<delimTag>
|
|
623
|
-
|
|
624
|
-
liquidTagCycle = liquidTagRule<"cycle", liquidTagCycleMarkup>
|
|
625
|
-
liquidTagCycleMarkup = (liquidExpression<delimTag> ":")? space* nonemptyListOf<liquidExpression<delimTag>, argumentSeparator> space*
|
|
626
|
-
|
|
627
|
-
liquidTagIncrement = liquidTagRule<"increment", variableSegmentAsLookupMarkup>
|
|
628
|
-
liquidTagDecrement = liquidTagRule<"decrement", variableSegmentAsLookupMarkup>
|
|
629
|
-
liquidTagOpenCapture = liquidTagOpenRule<"capture", variableSegmentAsLookupMarkup>
|
|
630
|
-
variableSegmentAsLookupMarkup = variableSegmentAsLookup space*
|
|
631
|
-
|
|
632
|
-
liquidTagSection = liquidTagRule<"section", liquidTagSectionMarkup>
|
|
633
|
-
liquidTagSectionMarkup = liquidString<delimTag> space*
|
|
634
|
-
|
|
635
|
-
liquidTagSections = liquidTagRule<"sections", liquidTagSectionsMarkup>
|
|
636
|
-
liquidTagSectionsMarkup = liquidString<delimTag> space*
|
|
637
|
-
|
|
638
|
-
liquidTagLayout = liquidTagRule<"layout", liquidTagLayoutMarkup>
|
|
639
|
-
liquidTagLayoutMarkup = liquidExpression<delimTag> space*
|
|
640
|
-
|
|
641
|
-
// We'll black hole the statement and switch parser in the cst builder
|
|
642
|
-
// We do this because it's technically the same grammar (with minor redefinitions)
|
|
643
|
-
// and it would be a huge chore and maintenance hell to rewrite all the rules with
|
|
644
|
-
// hspace = " " | "\t"
|
|
645
|
-
//
|
|
646
|
-
// The alternative is that this grammar parses the {% liquid tagMarkup %} as its own string,
|
|
647
|
-
// and then we switch to the LiquidStatement grammar that
|
|
648
|
-
// redefines liquidTagOpenRule, liquidTagRule, and space.
|
|
649
|
-
liquidTagLiquid = liquidTagRule<"liquid", liquidTagLiquidMarkup>
|
|
650
|
-
liquidTagLiquidMarkup = tagMarkup
|
|
651
|
-
|
|
652
|
-
liquidTagContentFor = liquidTagRule<"content_for", liquidTagContentForMarkup>
|
|
653
|
-
|
|
654
|
-
liquidTagContentForMarkup =
|
|
655
|
-
contentForType (argumentSeparatorOptionalComma contentForTagArgument) (space* ",")? space*
|
|
656
|
-
|
|
657
|
-
contentForTagArgument = listOf<contentForNamedArgument<delimTag>, argumentSeparatorOptionalComma>
|
|
658
|
-
completionModeContentForTagArgument = listOf<contentForNamedArgument<delimTag>, argumentSeparatorOptionalComma> (argumentSeparator? (liquidVariableLookup<delimTag>))?
|
|
659
|
-
contentForNamedArgument<delim> = (variableSegment ("." variableSegment)*) space* ":" space* (liquidExpression<delim>)
|
|
660
|
-
|
|
661
|
-
contentForType = liquidString<delimTag>
|
|
662
|
-
|
|
663
|
-
liquidTagInclude = liquidTagRule<"include", liquidTagRenderMarkup>
|
|
664
|
-
liquidTagRender = liquidTagRule<"render", liquidTagRenderMarkup>
|
|
665
|
-
liquidTagRenderMarkup =
|
|
666
|
-
snippetExpression renderVariableExpression? renderAliasExpression? renderArguments
|
|
667
|
-
|
|
668
|
-
renderArguments = (argumentSeparatorOptionalComma tagArguments) (space* ",")? space*
|
|
669
|
-
completionModeRenderArguments = (argumentSeparatorOptionalComma tagArguments) (space* ",")? space* (argumentSeparator? liquidVariableLookup<delimTag> space*)?
|
|
670
|
-
snippetExpression = liquidString<delimTag> | variableSegmentAsLookup
|
|
671
|
-
renderVariableExpression = space+ ("for" | "with") space+ liquidExpression<delimTag>
|
|
672
|
-
renderAliasExpression = space+ "as" space+ variableSegment
|
|
673
|
-
|
|
674
|
-
liquidTagOpenBaseCase = liquidTagOpenRule<blockName, tagMarkup>
|
|
675
|
-
|
|
676
|
-
liquidTagOpenForm = liquidTagOpenRule<"form", liquidTagOpenFormMarkup>
|
|
677
|
-
liquidTagOpenFormMarkup = arguments<delimTag> (space* ",")? space*
|
|
678
|
-
|
|
679
|
-
liquidTagOpenFor = liquidTagOpenRule<"for", liquidTagOpenForMarkup>
|
|
680
|
-
liquidTagOpenForMarkup =
|
|
681
|
-
variableSegment space* "in" space* liquidExpression<delimTag>
|
|
682
|
-
(space* "reversed")? argumentSeparatorOptionalComma
|
|
683
|
-
tagArguments (space* ",")? space*
|
|
684
|
-
|
|
685
|
-
// It's the same, the difference is support for different named arguments<delim>
|
|
686
|
-
liquidTagOpenTablerow = liquidTagOpenRule<"tablerow", liquidTagOpenForMarkup>
|
|
687
|
-
|
|
688
|
-
liquidTagOpenCase = liquidTagOpenRule<"case", liquidTagOpenCaseMarkup>
|
|
689
|
-
liquidTagOpenCaseMarkup = liquidExpression<delimTag> space*
|
|
690
|
-
|
|
691
|
-
liquidTagWhen = liquidTagRule<"when", liquidTagWhenMarkup>
|
|
692
|
-
liquidTagWhenMarkup = nonemptyListOf<liquidExpression<delimTag>, whenMarkupSep> space*
|
|
693
|
-
whenMarkupSep = space* ("," | "or" ~identifier) space*
|
|
694
|
-
|
|
695
|
-
liquidTagOpenIf = liquidTagOpenRule<"if", liquidTagOpenConditionalMarkup>
|
|
696
|
-
liquidTagOpenUnless = liquidTagOpenRule<"unless", liquidTagOpenConditionalMarkup>
|
|
697
|
-
liquidTagElsif = liquidTagRule<"elsif", liquidTagOpenConditionalMarkup>
|
|
698
|
-
|
|
699
|
-
liquidTagBreak = liquidTagRule<"break", empty>
|
|
700
|
-
liquidTagContinue = liquidTagRule<"continue", empty>
|
|
701
|
-
liquidTagElse = liquidTagRule<"else", empty>
|
|
702
|
-
|
|
703
|
-
liquidTagOpenConditionalMarkup = nonemptyListOf<condition<delimTag>, conditionSeparator> space*
|
|
704
|
-
conditionSeparator = &logicalOperator
|
|
705
|
-
condition<delim> = logicalOperator? space* (comparison<delim> | liquidExpression<delim>) space*
|
|
706
|
-
logicalOperator = ("and" | "or") ~identifier
|
|
707
|
-
comparison<delim> = liquidExpression<delim> space* comparator space* liquidExpression<delim>
|
|
708
|
-
comparator =
|
|
709
|
-
( "=="
|
|
710
|
-
| "!="
|
|
711
|
-
| ">="
|
|
712
|
-
| "<="
|
|
713
|
-
| ">"
|
|
714
|
-
| "<")
|
|
715
|
-
| ("contains" ~identifier)
|
|
716
|
-
|
|
717
|
-
liquidTagOpenPaginate = liquidTagOpenRule<"paginate", liquidTagOpenPaginateMarkup>
|
|
718
|
-
liquidTagOpenPaginateMarkup =
|
|
719
|
-
liquidExpression<delimTag> space+ "by" space+ liquidExpression<delimTag> argumentSeparatorOptionalComma tagArguments (space* ",")? space*
|
|
720
|
-
|
|
721
|
-
liquidDrop = "{{" "-"? space* liquidDropCases "-"? "}}"
|
|
722
|
-
liquidDropCases = liquidVariable<delimVO> | liquidDropBaseCase
|
|
723
|
-
liquidDropBaseCase = anyExceptStar<delimVO>
|
|
724
|
-
liquidInlineComment = "{%" "-"? space* "#" space? tagMarkup "-"? "%}"
|
|
725
|
-
|
|
726
|
-
liquidRawTag =
|
|
727
|
-
| liquidRawTagImpl<"raw">
|
|
728
|
-
| liquidRawTagImpl<"javascript">
|
|
729
|
-
| liquidRawTagImpl<"schema">
|
|
730
|
-
| liquidRawTagImpl<"stylesheet">
|
|
731
|
-
| liquidRawTagImpl<"style">
|
|
732
|
-
liquidRawTagImpl<name> =
|
|
733
|
-
"{%" "-"? space* (name endOfIdentifier) space* tagMarkup "-"? "%}"
|
|
734
|
-
anyExceptStar<liquidRawTagClose<name>>
|
|
735
|
-
"{%" "-"? space* "end" (name endOfIdentifier) space* "-"? "%}"
|
|
736
|
-
liquidRawTagClose<name> =
|
|
737
|
-
"{%" "-"? space* "end" (name endOfIdentifier) space* "-"? "%}"
|
|
738
|
-
|
|
739
|
-
liquidBlockComment =
|
|
740
|
-
commentBlockStart
|
|
741
|
-
(liquidBlockComment | anyExceptPlus<(commentBlockStart | commentBlockEnd)>)*
|
|
742
|
-
commentBlockEnd
|
|
743
|
-
commentBlockStart = "{%" "-"? space* ("comment" endOfIdentifier) space* tagMarkup "-"? "%}"
|
|
744
|
-
commentBlockEnd = "{%" "-"? space* ("endcomment" endOfIdentifier) space* tagMarkup "-"? "%}"
|
|
745
|
-
|
|
746
|
-
liquidDoc =
|
|
747
|
-
liquidDocStart
|
|
748
|
-
liquidDocBody
|
|
749
|
-
liquidDocEnd
|
|
750
|
-
|
|
751
|
-
liquidDocStart = "{%" "-"? space* ("doc" endOfIdentifier) space* tagMarkup "-"? "%}"
|
|
752
|
-
liquidDocEnd = "{%" "-"? space* ("enddoc" endOfIdentifier) space* tagMarkup "-"? "%}"
|
|
753
|
-
liquidDocBody = anyExceptStar<(liquidDocStart | liquidDocEnd)>
|
|
754
|
-
|
|
755
|
-
// In order for the grammar to "fallback" to the base case, this
|
|
756
|
-
// rule must pass if and only if we support what we parse. This
|
|
757
|
-
// implies that—since we don't support filters yet—we have a
|
|
758
|
-
// positive lookahead on "-}}" or "}}" in the rule. We do this
|
|
759
|
-
// because we'd otherwise positively match the following string
|
|
760
|
-
// instead of falling back to the other rule:
|
|
761
|
-
// {{ 'string' | some_filter }}
|
|
762
|
-
liquidVariable<delim> = liquidComplexExpression<delim> liquidFilter<delim>* space* &delim
|
|
763
|
-
|
|
764
|
-
liquidExpression<delim> =
|
|
765
|
-
| liquidString<delim>
|
|
766
|
-
| liquidNumber
|
|
767
|
-
| liquidLiteral
|
|
768
|
-
| liquidRange<delim>
|
|
769
|
-
| liquidVariableLookup<delim>
|
|
770
|
-
|
|
771
|
-
liquidComplexExpression<delim> =
|
|
772
|
-
| liquidBooleanExpression<delim>
|
|
773
|
-
| liquidExpression<delim>
|
|
774
|
-
|
|
775
|
-
liquidBooleanExpression<delim> = booleanExpressionCondition<delim> listOf<booleanExpressionSubsequentCondition<delim>, conditionSeparator>
|
|
776
|
-
|
|
777
|
-
// This might over-capture things since the conditions below can contain any ${"`"}liquidExpression${"`"}s.
|
|
778
|
-
// We will need to clean this up in CST. If we restrict the conditions to only contain comparisons and
|
|
779
|
-
// variable lookups, we can't support "truthy" expressions like ${"`"}{{ some_var and 'this' }}${"`"}
|
|
780
|
-
booleanExpressionSubsequentCondition<delim> = space* logicalOperator space* (comparison<delim> | liquidExpression<delim>) space*
|
|
781
|
-
booleanExpressionCondition<delim> = comparison<delim> | liquidExpression<delim>
|
|
782
|
-
|
|
783
|
-
liquidString<delim> = liquidSingleQuotedString<delim> | liquidDoubleQuotedString<delim>
|
|
784
|
-
liquidSingleQuotedString<delim> = "'" anyExceptStar<("'"| delim)> "'"
|
|
785
|
-
liquidDoubleQuotedString<delim> = "\"" anyExceptStar<("\""| delim)> "\""
|
|
786
|
-
|
|
787
|
-
liquidNumber = liquidFloat | liquidInteger
|
|
788
|
-
liquidInteger = "-"? digit+
|
|
789
|
-
liquidFloat = "-"? digit+ "." digit+
|
|
790
|
-
|
|
791
|
-
liquidLiteral =
|
|
792
|
-
( "true"
|
|
793
|
-
| "false"
|
|
794
|
-
| "blank"
|
|
795
|
-
| "empty"
|
|
796
|
-
| "nil"
|
|
797
|
-
| "null"
|
|
798
|
-
) endOfIdentifier
|
|
799
|
-
|
|
800
|
-
liquidRange<delim> =
|
|
801
|
-
"(" space* liquidExpression<delim> space* ".." space* liquidExpression<delim> space* ")"
|
|
802
|
-
|
|
803
|
-
liquidVariableLookup<delim> =
|
|
804
|
-
| variableSegment lookup<delim>*
|
|
805
|
-
| empty lookup<delim>+
|
|
806
|
-
lookup<delim> =
|
|
807
|
-
| indexLookup<delim>
|
|
808
|
-
| dotLookup
|
|
809
|
-
indexLookup<delim> = space* "[" space* liquidExpression<delim> space* "]"
|
|
810
|
-
dotLookup = space* "." space* identifier
|
|
811
|
-
|
|
812
|
-
liquidFilter<delim> = space* "|" space* identifier (space* ":" space* arguments<delim> (space* ",")?)?
|
|
813
|
-
|
|
814
|
-
arguments<delim> = nonemptyOrderedListOf<positionalArgument<delim>, namedArgument<delim>, argumentSeparator>
|
|
815
|
-
argumentSeparator = space* "," space*
|
|
816
|
-
argumentSeparatorOptionalComma = space* ","? space*
|
|
817
|
-
positionalArgument<delim> = liquidExpression<delim> ~(space* ":")
|
|
818
|
-
namedArgument<delim> = variableSegment space* ":" space* liquidExpression<delim>
|
|
819
|
-
tagArguments = listOf<namedArgument<delimTag>, argumentSeparatorOptionalComma>
|
|
820
|
-
filterArguments<delim> =
|
|
821
|
-
| complexArguments<delim>
|
|
822
|
-
| simpleArgument<delim>
|
|
823
|
-
complexArguments<delim> = arguments<delim> (space* "," space* simpleArgument<delim>)?
|
|
824
|
-
simpleArgument<delim> = liquidVariableLookup<delim>
|
|
825
|
-
|
|
826
|
-
variableSegment = (letter | "_") (~endOfTagName identifierCharacter)*
|
|
827
|
-
variableSegmentAsLookup = variableSegment
|
|
828
|
-
identifier = variableSegment "?"?
|
|
829
|
-
|
|
830
|
-
tagMarkup = anyExceptStar<delimTag>
|
|
831
|
-
|
|
832
|
-
liquidTagName =
|
|
833
|
-
letter (alnum | "_")*
|
|
834
|
-
|
|
835
|
-
blockName =
|
|
836
|
-
// Shopify blocks
|
|
837
|
-
( "form"
|
|
838
|
-
| "paginate"
|
|
839
|
-
// Base blocks
|
|
840
|
-
| "capture"
|
|
841
|
-
| "case"
|
|
842
|
-
| "for"
|
|
843
|
-
| "ifchanged"
|
|
844
|
-
| "if"
|
|
845
|
-
| "unless"
|
|
846
|
-
| "tablerow"
|
|
847
|
-
) endOfIdentifier
|
|
848
|
-
|
|
849
|
-
delimTag = "-%}" | "%}"
|
|
850
|
-
delimVO = "-}}" | "}}"
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
LiquidStatement <: Liquid {
|
|
854
|
-
Node := listOf<LiquidStatement, statementSep> (space | newline)*
|
|
855
|
-
|
|
856
|
-
// This is the big brains moment: we redefine space to exclude newlines.
|
|
857
|
-
//
|
|
858
|
-
// Which means that all our other Liquid rules can be reused
|
|
859
|
-
// without modification(!)
|
|
860
|
-
//
|
|
861
|
-
// We don't need to maintain rules like this:
|
|
862
|
-
// - liquidVariable<space>
|
|
863
|
-
// - liquidExpression<space>
|
|
864
|
-
// - variableLookup<space>
|
|
865
|
-
// - ... long list of stuff that takes space as param
|
|
866
|
-
// - liquidString<space>
|
|
867
|
-
//
|
|
868
|
-
// All we need is this little, VERY IMPORTANT, part right here that
|
|
869
|
-
// make it so we can parse the same way in Liquid tags.
|
|
870
|
-
//
|
|
871
|
-
// I'm putting in this huge comment so that it's more obvious.
|
|
872
|
-
space := " " | "\t"
|
|
873
|
-
|
|
874
|
-
LiquidStatement =
|
|
875
|
-
| liquidBlockComment
|
|
876
|
-
| liquidRawTag
|
|
877
|
-
| liquidTagClose
|
|
878
|
-
| liquidTagOpen
|
|
879
|
-
| liquidTag
|
|
880
|
-
| liquidInlineComment
|
|
881
|
-
|
|
882
|
-
liquidTagOpenRule<name, markup>
|
|
883
|
-
:= (name ~identifierCharacter) space* markup &liquidStatementEnd
|
|
884
|
-
|
|
885
|
-
liquidTagRule<name, markup>
|
|
886
|
-
:= (name ~identifierCharacter) space* markup &liquidStatementEnd
|
|
887
|
-
|
|
888
|
-
liquidTagClose
|
|
889
|
-
:= "end" (blockName ~identifierCharacter) space* tagMarkup &liquidStatementEnd
|
|
890
|
-
|
|
891
|
-
liquidRawTagImpl<name>
|
|
892
|
-
:= (name ~identifierCharacter) space* tagMarkup newline
|
|
893
|
-
anyExceptStar<liquidRawTagClose<name>>
|
|
894
|
-
"end" name space* &liquidStatementEnd
|
|
895
|
-
|
|
896
|
-
liquidRawTagClose<name>
|
|
897
|
-
:= "end" name space* &liquidStatementEnd
|
|
898
|
-
|
|
899
|
-
liquidBlockComment :=
|
|
900
|
-
commentBlockStart statementSep
|
|
901
|
-
(listOf<liquidCommentBlockStatement, statementSep> statementSep)?
|
|
902
|
-
commentBlockEnd
|
|
903
|
-
|
|
904
|
-
liquidCommentBlockStatement =
|
|
905
|
-
| liquidBlockComment
|
|
906
|
-
| nonTerminalCommentLine
|
|
907
|
-
|
|
908
|
-
commentBlockStart
|
|
909
|
-
:= ("comment" ~identifierCharacter) space* tagMarkup
|
|
910
|
-
|
|
911
|
-
commentBlockEnd
|
|
912
|
-
:= ("endcomment" ~identifierCharacter) space* tagMarkup
|
|
913
|
-
|
|
914
|
-
nonTerminalCommentLine
|
|
915
|
-
= ~commentBlockEnd anyExceptPlus<newline>
|
|
916
|
-
|
|
917
|
-
liquidInlineComment
|
|
918
|
-
:= "#" space? tagMarkup &liquidStatementEnd
|
|
919
|
-
|
|
920
|
-
tagMarkup := anyExceptStar<liquidStatementEnd>
|
|
921
|
-
|
|
922
|
-
// trailing whitespace, newline, + anything else before the next tag
|
|
923
|
-
statementSep = space* newline (space | newline)*
|
|
924
|
-
|
|
925
|
-
liquidStatementEnd = newline | end
|
|
926
|
-
delimTag := liquidStatementEnd
|
|
927
|
-
}
|
|
928
|
-
|
|
929
|
-
LiquidDoc <: Helpers {
|
|
930
|
-
Node := ImplicitDescription (LiquidDocNode | TextNode)*
|
|
931
|
-
LiquidDocNode =
|
|
932
|
-
| paramNode
|
|
933
|
-
| exampleNode
|
|
934
|
-
| descriptionNode
|
|
935
|
-
| promptNode
|
|
936
|
-
| fallbackNode
|
|
937
|
-
|
|
938
|
-
endOfDescription = strictSpace* openControl
|
|
939
|
-
descriptionContent = anyExceptStar<endOfDescription>
|
|
940
|
-
ImplicitDescription = descriptionContent
|
|
941
|
-
|
|
942
|
-
// By default, space matches new lines as well. We override it here to make writing rules easier.
|
|
943
|
-
strictSpace = " " | "\t"
|
|
944
|
-
// We use this as an escape hatch to stop matching TextNode and try again when one of these characters is encountered
|
|
945
|
-
openControl:= strictSpace* ("@" | end)
|
|
946
|
-
// List of supported tags we use to identify boundaries
|
|
947
|
-
supportedTags = "@prompt" | "@example" | "@description" | "@param"
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
paramNode = "@param" strictSpace* paramType? strictSpace* (optionalParamName | paramName) (strictSpace* "-")? strictSpace* paramDescription
|
|
951
|
-
paramType = "{" strictSpace* paramTypeContent strictSpace* "}"
|
|
952
|
-
paramTypeContent = anyExceptStar<("}"| strictSpace)>
|
|
953
|
-
|
|
954
|
-
paramName = textValue
|
|
955
|
-
optionalParamName = "[" strictSpace* textValue strictSpace* "]"
|
|
956
|
-
textValue = identifierCharacter+
|
|
957
|
-
|
|
958
|
-
paramDescription = (~"]" anyExceptStar<endOfParam>)
|
|
959
|
-
endOfParam = strictSpace* (newline | end)
|
|
960
|
-
|
|
961
|
-
// Prompt node is system-controlled, so we don't strip the leading spaces to maintain indentation
|
|
962
|
-
promptNode = "@prompt" multilineTextContent
|
|
963
|
-
exampleNode = "@example" space* multilineTextContent
|
|
964
|
-
descriptionNode = "@description" space* multilineTextContent
|
|
965
|
-
|
|
966
|
-
// We want multilineTextContent to be free-form, so instead of terminating the match at "@" we explicitly look for a suppported tag
|
|
967
|
-
// This means that malformed tags will be considered part of the multilineTextContent
|
|
968
|
-
multilineTextContent = anyExceptStar<endOfMultilineText>
|
|
969
|
-
endOfMultilineText = strictSpace* (supportedTags | end)
|
|
970
|
-
|
|
971
|
-
fallbackNode = "@" anyExceptStar<endOfParam>
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
LiquidHTML <: Liquid {
|
|
975
|
-
Node := yamlFrontmatter? (HtmlNode | liquidNode | TextNode)*
|
|
976
|
-
openControl += "<"
|
|
977
|
-
|
|
978
|
-
yamlFrontmatter =
|
|
979
|
-
"---" newline anyExceptStar<"---"> "---" newline
|
|
980
|
-
|
|
981
|
-
HtmlNode =
|
|
982
|
-
| HtmlDoctype
|
|
983
|
-
| HtmlComment
|
|
984
|
-
| HtmlRawTag
|
|
985
|
-
| HtmlVoidElement
|
|
986
|
-
| HtmlSelfClosingElement
|
|
987
|
-
| HtmlTagClose
|
|
988
|
-
| HtmlTagOpen
|
|
989
|
-
|
|
990
|
-
// https://html.spec.whatwg.org/multipage/syntax.html#the-doctype
|
|
991
|
-
HtmlDoctype =
|
|
992
|
-
#("<!" caseInsensitive<"doctype"> space+ caseInsensitive<"html">) legacyDoctypeString? ">"
|
|
993
|
-
legacyDoctypeString
|
|
994
|
-
= anyExceptPlus<">">
|
|
995
|
-
|
|
996
|
-
HtmlComment = "<!--" #(anyExceptStar<"-->"> "-->")
|
|
997
|
-
|
|
998
|
-
// These are black holes, we'll ignore what's in them
|
|
999
|
-
HtmlRawTag =
|
|
1000
|
-
| HtmlRawTagImpl<"script">
|
|
1001
|
-
| HtmlRawTagImpl<"style">
|
|
1002
|
-
| HtmlRawTagImpl<"svg">
|
|
1003
|
-
|
|
1004
|
-
HtmlRawTagImpl<name> =
|
|
1005
|
-
TagStart<name>
|
|
1006
|
-
(HtmlRawTagImpl<name> | AnyExceptPlus<(TagStart<name> | TagEnd<name>)>)*
|
|
1007
|
-
TagEnd<name>
|
|
1008
|
-
TagStart<name> = "<" name AttrList ">"
|
|
1009
|
-
TagEnd<name> = "</" name ">"
|
|
1010
|
-
|
|
1011
|
-
HtmlVoidElement =
|
|
1012
|
-
#("<" voidElementName &(space | "/" | ">")) AttrList "/"? ">"
|
|
1013
|
-
|
|
1014
|
-
HtmlSelfClosingElement =
|
|
1015
|
-
#("<" tagName) AttrList "/>"
|
|
1016
|
-
|
|
1017
|
-
HtmlTagOpen =
|
|
1018
|
-
#("<" tagName) AttrList ">"
|
|
1019
|
-
|
|
1020
|
-
HtmlTagClose =
|
|
1021
|
-
#("</" tagName) ">"
|
|
1022
|
-
|
|
1023
|
-
tagName = leadingTagNamePart trailingTagNamePart*
|
|
1024
|
-
|
|
1025
|
-
// The difference here is that the first text part must start
|
|
1026
|
-
// with a letter, but trailing text parts don't have that
|
|
1027
|
-
// requirement
|
|
1028
|
-
leadingTagNamePart =
|
|
1029
|
-
| liquidDrop
|
|
1030
|
-
| leadingTagNameTextNode
|
|
1031
|
-
|
|
1032
|
-
trailingTagNamePart =
|
|
1033
|
-
| liquidDrop
|
|
1034
|
-
| trailingTagNameTextNode
|
|
1035
|
-
|
|
1036
|
-
leadingTagNameTextNode = letter (alnum | "-" | ":")*
|
|
1037
|
-
trailingTagNameTextNode = (alnum | "-" | ":")+
|
|
1038
|
-
|
|
1039
|
-
AttrList = Attr*
|
|
1040
|
-
|
|
1041
|
-
Attr =
|
|
1042
|
-
AttrSingleQuoted | AttrDoubleQuoted | AttrUnquoted | liquidNode | attrEmpty
|
|
1043
|
-
|
|
1044
|
-
attrEmpty = attrName
|
|
1045
|
-
|
|
1046
|
-
AttrUnquoted = attrName "=" attrUnquotedValue
|
|
1047
|
-
AttrSingleQuoted = attrName "=" singleQuote #(attrSingleQuotedValue singleQuote)
|
|
1048
|
-
AttrDoubleQuoted = attrName "=" doubleQuote #(attrDoubleQuotedValue doubleQuote)
|
|
1049
|
-
|
|
1050
|
-
attrName = (liquidDrop | attrNameTextNode)+
|
|
1051
|
-
|
|
1052
|
-
// https://html.spec.whatwg.org/#attributes-2
|
|
1053
|
-
attrNameTextNode = anyExceptPlus<(space | quotes | "=" | ">" | "/>" | "{{" | "{%" | controls | noncharacters)>
|
|
1054
|
-
attrUnquotedValue = (liquidDrop | attrUnquotedTextNode)*
|
|
1055
|
-
attrSingleQuotedValue = (liquidNode | attrSingleQuotedTextNode)*
|
|
1056
|
-
attrDoubleQuotedValue = (liquidNode | attrDoubleQuotedTextNode)*
|
|
1057
|
-
|
|
1058
|
-
attrUnquotedTextNode = anyExceptPlus<(space | quotes | "=" | "<" | ">" | "${"`"}" | "{{" | "{%")>
|
|
1059
|
-
attrSingleQuotedTextNode = anyExceptPlus<(singleQuote | "{{" | "{%")>
|
|
1060
|
-
attrDoubleQuotedTextNode = anyExceptPlus<(doubleQuote | "{{" | "{%")>
|
|
1061
|
-
|
|
1062
|
-
quotes = singleQuote | doubleQuote
|
|
1063
|
-
|
|
1064
|
-
// https://www.w3.org/TR/2011/WD-html-markup-20110113/syntax.html#void-element
|
|
1065
|
-
voidElementName =
|
|
1066
|
-
( caseInsensitive<"area">
|
|
1067
|
-
| caseInsensitive<"base">
|
|
1068
|
-
| caseInsensitive<"br">
|
|
1069
|
-
| caseInsensitive<"col">
|
|
1070
|
-
| caseInsensitive<"command">
|
|
1071
|
-
| caseInsensitive<"embed">
|
|
1072
|
-
| caseInsensitive<"hr">
|
|
1073
|
-
| caseInsensitive<"img">
|
|
1074
|
-
| caseInsensitive<"input">
|
|
1075
|
-
| caseInsensitive<"keygen">
|
|
1076
|
-
| caseInsensitive<"link">
|
|
1077
|
-
| caseInsensitive<"meta">
|
|
1078
|
-
| caseInsensitive<"param">
|
|
1079
|
-
| caseInsensitive<"source">
|
|
1080
|
-
| caseInsensitive<"track">
|
|
1081
|
-
| caseInsensitive<"wbr">
|
|
1082
|
-
) ~identifierCharacter
|
|
1083
|
-
}
|
|
1084
|
-
|
|
1085
|
-
StrictLiquid <: Liquid {
|
|
1086
|
-
liquidTag := liquidTagStrict
|
|
1087
|
-
liquidTagOpen := liquidTagOpenStrict
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
StrictLiquidStatement <: LiquidStatement {
|
|
1091
|
-
liquidTag := liquidTagStrict
|
|
1092
|
-
liquidTagOpen := liquidTagOpenStrict
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
StrictLiquidHTML <: LiquidHTML {
|
|
1096
|
-
liquidTag := liquidTagStrict
|
|
1097
|
-
liquidTagOpen := liquidTagOpenStrict
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
WithPlaceholderLiquid <: Liquid {
|
|
1101
|
-
liquidFilter<delim> := space* "|" space* identifier (space* ":" space* filterArguments<delim> (space* ",")?)?
|
|
1102
|
-
liquidTagContentForMarkup :=
|
|
1103
|
-
contentForType (argumentSeparatorOptionalComma completionModeContentForTagArgument) (space* ",")? space*
|
|
1104
|
-
liquidTagRenderMarkup :=
|
|
1105
|
-
snippetExpression renderVariableExpression? renderAliasExpression? completionModeRenderArguments
|
|
1106
|
-
liquidTagName := (letter | "█") (alnum | "_")*
|
|
1107
|
-
variableSegment := (letter | "_" | "█") (identifierCharacter | "█")*
|
|
1108
|
-
liquidDoc :=
|
|
1109
|
-
liquidDocStart
|
|
1110
|
-
liquidDocBody
|
|
1111
|
-
liquidDocEnd?
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
WithPlaceholderLiquidStatement <: LiquidStatement {
|
|
1115
|
-
liquidFilter<delim> := space* "|" space* identifier (space* ":" space* filterArguments<delim> (space* ",")?)?
|
|
1116
|
-
liquidTagContentForMarkup :=
|
|
1117
|
-
contentForType (argumentSeparatorOptionalComma completionModeContentForTagArgument) (space* ",")? space*
|
|
1118
|
-
liquidTagRenderMarkup :=
|
|
1119
|
-
snippetExpression renderVariableExpression? renderAliasExpression? completionModeRenderArguments
|
|
1120
|
-
liquidTagName := (letter | "█") (alnum | "_")*
|
|
1121
|
-
variableSegment := (letter | "_" | "█") (identifierCharacter | "█")*
|
|
1122
|
-
liquidDoc :=
|
|
1123
|
-
liquidDocStart
|
|
1124
|
-
liquidDocBody
|
|
1125
|
-
liquidDocEnd?
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
WithPlaceholderLiquidHTML <: LiquidHTML {
|
|
1129
|
-
liquidFilter<delim> := space* "|" space* identifier (space* ":" space* filterArguments<delim> (space* ",")?)?
|
|
1130
|
-
liquidTagContentForMarkup :=
|
|
1131
|
-
contentForType (argumentSeparatorOptionalComma completionModeContentForTagArgument) (space* ",")? space*
|
|
1132
|
-
liquidTagRenderMarkup :=
|
|
1133
|
-
snippetExpression renderVariableExpression? renderAliasExpression? completionModeRenderArguments
|
|
1134
|
-
liquidTagName := (letter | "█") (alnum | "_")*
|
|
1135
|
-
variableSegment := (letter | "_" | "█") (identifierCharacter | "█")*
|
|
1136
|
-
leadingTagNameTextNode := (letter | "█") (alnum | "-" | ":" | "█")*
|
|
1137
|
-
trailingTagNameTextNode := (alnum | "-" | ":" | "█")+
|
|
1138
|
-
liquidDoc :=
|
|
1139
|
-
liquidDocStart
|
|
1140
|
-
liquidDocBody
|
|
1141
|
-
liquidDocEnd?
|
|
1142
|
-
}
|
|
1143
|
-
`});var Bl=T(we=>{"use strict";y();Object.defineProperty(we,"__esModule",{value:!0});we.TAGS_WITHOUT_MARKUP=we.VOID_ELEMENTS=we.RAW_TAGS=we.BLOCKS=we.placeholderGrammars=we.tolerantGrammars=we.strictGrammars=we.LiquidDocGrammar=we.TextNodeGrammar=we.liquidHtmlGrammars=void 0;var p6=bk();we.liquidHtmlGrammars=(0,p6.grammars)(wk());we.TextNodeGrammar=we.liquidHtmlGrammars.Helpers;we.LiquidDocGrammar=we.liquidHtmlGrammars.LiquidDoc;we.strictGrammars={Liquid:we.liquidHtmlGrammars.StrictLiquid,LiquidHTML:we.liquidHtmlGrammars.StrictLiquidHTML,LiquidStatement:we.liquidHtmlGrammars.StrictLiquidStatement};we.tolerantGrammars={Liquid:we.liquidHtmlGrammars.Liquid,LiquidHTML:we.liquidHtmlGrammars.LiquidHTML,LiquidStatement:we.liquidHtmlGrammars.LiquidStatement};we.placeholderGrammars={Liquid:we.liquidHtmlGrammars.WithPlaceholderLiquid,LiquidHTML:we.liquidHtmlGrammars.WithPlaceholderLiquidHTML,LiquidStatement:we.liquidHtmlGrammars.WithPlaceholderLiquidStatement};we.BLOCKS=we.strictGrammars.LiquidHTML.rules.blockName.body.factors[0].terms.map(t=>t.obj);we.RAW_TAGS=we.strictGrammars.LiquidHTML.rules.liquidRawTag.body.terms.map(t=>t.args[0].obj).concat("comment");we.VOID_ELEMENTS=we.strictGrammars.LiquidHTML.rules.voidElementName.body.factors[0].terms.map(t=>t.args[0].obj);we.TAGS_WITHOUT_MARKUP=["style","schema","javascript","else","break","continue","comment","raw","doc"]});var Vl=T(_n=>{"use strict";y();var h6=_n&&_n.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_n,"__esModule",{value:!0});_n.LiquidHTMLASTParsingError=_n.LiquidHTMLCSTParsingError=void 0;var xk=h6(ig()),my=class extends SyntaxError{constructor(e){super(e.shortMessage),this.name="LiquidHTMLParsingError";let r=e.input,i=e._rightmostFailurePosition,n=(0,xk.default)(r).fromIndex(Math.min(i,r.length-1));n&&(this.loc={start:{line:n.line,column:n.col},end:{line:n.line,column:n.col}})}};_n.LiquidHTMLCSTParsingError=my;var gy=class extends SyntaxError{constructor(e,r,i,n,s){super(e),this.name="LiquidHTMLParsingError",this.unclosed=s??null;let a=(0,xk.default)(r),o=a.fromIndex(i),u=a.fromIndex(Math.min(n,r.length-1));this.loc={start:{line:o.line,column:o.col},end:{line:u.line,column:u.col}}}};_n.LiquidHTMLASTParsingError=gy});var Ul=T(Xt=>{"use strict";y();Object.defineProperty(Xt,"__esModule",{value:!0});Xt.nonTraversableProperties=Xt.LoopNamedTags=Xt.LiquidNodeTypes=Xt.HtmlNodeTypes=Xt.Comparators=Xt.NamedTags=Xt.NodeTypes=void 0;var li;(function(t){t.Document="Document",t.LiquidRawTag="LiquidRawTag",t.LiquidTag="LiquidTag",t.LiquidBranch="LiquidBranch",t.LiquidVariableOutput="LiquidVariableOutput",t.HtmlSelfClosingElement="HtmlSelfClosingElement",t.HtmlVoidElement="HtmlVoidElement",t.HtmlDoctype="HtmlDoctype",t.HtmlComment="HtmlComment",t.HtmlElement="HtmlElement",t.HtmlDanglingMarkerClose="HtmlDanglingMarkerClose",t.HtmlRawNode="HtmlRawNode",t.AttrSingleQuoted="AttrSingleQuoted",t.AttrDoubleQuoted="AttrDoubleQuoted",t.AttrUnquoted="AttrUnquoted",t.AttrEmpty="AttrEmpty",t.TextNode="TextNode",t.YAMLFrontmatter="YAMLFrontmatter",t.LiquidVariable="LiquidVariable",t.LiquidFilter="LiquidFilter",t.NamedArgument="NamedArgument",t.LiquidLiteral="LiquidLiteral",t.BooleanExpression="BooleanExpression",t.String="String",t.Number="Number",t.Range="Range",t.VariableLookup="VariableLookup",t.Comparison="Comparison",t.LogicalExpression="LogicalExpression",t.AssignMarkup="AssignMarkup",t.ContentForMarkup="ContentForMarkup",t.CycleMarkup="CycleMarkup",t.ForMarkup="ForMarkup",t.PaginateMarkup="PaginateMarkup",t.RawMarkup="RawMarkup",t.RenderMarkup="RenderMarkup",t.RenderVariableExpression="RenderVariableExpression",t.RenderAliasExpression="RenderAliasExpression",t.LiquidDocDescriptionNode="LiquidDocDescriptionNode",t.LiquidDocParamNode="LiquidDocParamNode",t.LiquidDocExampleNode="LiquidDocExampleNode",t.LiquidDocPromptNode="LiquidDocPromptNode"})(li||(Xt.NodeTypes=li={}));var $l;(function(t){t.assign="assign",t.capture="capture",t.case="case",t.content_for="content_for",t.cycle="cycle",t.decrement="decrement",t.echo="echo",t.elsif="elsif",t.for="for",t.form="form",t.if="if",t.include="include",t.increment="increment",t.layout="layout",t.liquid="liquid",t.paginate="paginate",t.render="render",t.section="section",t.sections="sections",t.tablerow="tablerow",t.unless="unless",t.when="when"})($l||(Xt.NamedTags=$l={}));var kk;(function(t){t.CONTAINS="contains",t.EQUAL="==",t.GREATER_THAN=">",t.GREATER_THAN_OR_EQUAL=">=",t.LESS_THAN="<",t.LESS_THAN_OR_EQUAL="<=",t.NOT_EQUAL="!="})(kk||(Xt.Comparators=kk={}));Xt.HtmlNodeTypes=[li.HtmlElement,li.HtmlDanglingMarkerClose,li.HtmlRawNode,li.HtmlVoidElement,li.HtmlSelfClosingElement];Xt.LiquidNodeTypes=[li.LiquidTag,li.LiquidVariableOutput,li.LiquidBranch,li.LiquidRawTag];Xt.LoopNamedTags=[$l.for,$l.tablerow];Xt.nonTraversableProperties=new Set(["parentNode","prev","next","firstChild","lastChild"])});var yy=T(Qi=>{"use strict";y();Object.defineProperty(Qi,"__esModule",{value:!0});Qi.LiquidLiteralValues=Qi.ConcreteNodeTypes=void 0;Qi.toLiquidHtmlCST=m6;Qi.toLiquidCST=g6;var Ak=Bx(),vn=Bl(),Tk=Vl(),Hl=Ul(),ne;(function(t){t.HtmlDoctype="HtmlDoctype",t.HtmlComment="HtmlComment",t.HtmlRawTag="HtmlRawTag",t.HtmlVoidElement="HtmlVoidElement",t.HtmlSelfClosingElement="HtmlSelfClosingElement",t.HtmlTagOpen="HtmlTagOpen",t.HtmlTagClose="HtmlTagClose",t.AttrSingleQuoted="AttrSingleQuoted",t.AttrDoubleQuoted="AttrDoubleQuoted",t.AttrUnquoted="AttrUnquoted",t.AttrEmpty="AttrEmpty",t.LiquidVariableOutput="LiquidVariableOutput",t.LiquidRawTag="LiquidRawTag",t.LiquidTag="LiquidTag",t.LiquidTagOpen="LiquidTagOpen",t.LiquidTagClose="LiquidTagClose",t.TextNode="TextNode",t.YAMLFrontmatter="YAMLFrontmatter",t.LiquidVariable="LiquidVariable",t.LiquidFilter="LiquidFilter",t.NamedArgument="NamedArgument",t.LiquidLiteral="LiquidLiteral",t.VariableLookup="VariableLookup",t.BooleanExpression="BooleanExpression",t.String="String",t.Number="Number",t.Range="Range",t.Comparison="Comparison",t.Condition="Condition",t.AssignMarkup="AssignMarkup",t.ContentForMarkup="ContentForMarkup",t.CycleMarkup="CycleMarkup",t.ForMarkup="ForMarkup",t.RenderMarkup="RenderMarkup",t.PaginateMarkup="PaginateMarkup",t.RenderVariableExpression="RenderVariableExpression",t.RenderAliasExpression="RenderAliasExpression",t.ContentForNamedArgument="ContentForNamedArgument",t.LiquidDocParamNode="LiquidDocParamNode",t.LiquidDocParamNameNode="LiquidDocParamNameNode",t.LiquidDocDescriptionNode="LiquidDocDescriptionNode",t.LiquidDocExampleNode="LiquidDocExampleNode",t.LiquidDocPromptNode="LiquidDocPromptNode"})(ne||(Qi.ConcreteNodeTypes=ne={}));Qi.LiquidLiteralValues={nil:null,null:null,true:!0,false:!1,blank:"",empty:""};var d6=t=>e=>e[t].sourceString.trim(),Ik=t=>e=>e[t].sourceString.trimEnd(),Ek={strict:vn.strictGrammars,tolerant:vn.tolerantGrammars,completion:vn.placeholderGrammars};function m6(t,e={mode:"tolerant"}){let r=Ek[e.mode],i=r.LiquidHTML;return Ki(t,r,i,["HelperMappings","LiquidMappings","LiquidHTMLMappings"])}function g6(t,e={mode:"tolerant"}){let r=Ek[e.mode],i=r.Liquid;return Ki(t,r,i,["HelperMappings","LiquidMappings"])}function Ki(t,e,r,i,n=t,s=0){let a=g=>s+g[0].source.startIdx,o=g=>s+g[g.length-1].source.endIdx,u=g=>s+g[g.length-2].source.endIdx,l={type:ne.TextNode,value:function(){return this.sourceString},locStart:a,locEnd:o,source:t},f=r.match(n,"Node");if(f.failed())throw new Tk.LiquidHTMLCSTParsingError(f);let h={Node:0,TextNode:l,orderedListOf:0,empty:()=>null,nonemptyOrderedListOf:0,nonemptyOrderedListOfBoth(g,k,w){let _=this;return g.toAST(_.args.mapping).concat(w.toAST(_.args.mapping))}},p={liquidNode:0,liquidRawTag:0,liquidRawTagImpl:{type:ne.LiquidRawTag,name:3,body:9,children:g=>{let k=g[3],w=g[9];switch(k.sourceString){case"schema":case"raw":return Ki(t,e,vn.TextNodeGrammar,["HelperMappings"],w.sourceString,s+w.source.startIdx);default:return Ki(t,e,e.Liquid,["HelperMappings","LiquidMappings"],w.sourceString,s+w.source.startIdx)}},markup:6,whitespaceStart:1,whitespaceEnd:7,delimiterWhitespaceStart:11,delimiterWhitespaceEnd:17,locStart:a,locEnd:o,source:t,blockStartLocStart:g=>g[0].source.startIdx,blockStartLocEnd:g=>g[8].source.endIdx,blockEndLocStart:g=>g[10].source.startIdx,blockEndLocEnd:g=>g[18].source.endIdx},liquidBlockComment:{type:ne.LiquidRawTag,name:"comment",body:g=>g[1].sourceString,children:g=>Ki(t,e,vn.TextNodeGrammar,["HelperMappings"],g[1].sourceString,s+g[1].source.startIdx),whitespaceStart:g=>g[0].children[1].sourceString,whitespaceEnd:g=>g[0].children[7].sourceString,delimiterWhitespaceStart:g=>g[2].children[1].sourceString,delimiterWhitespaceEnd:g=>g[2].children[7].sourceString,locStart:a,locEnd:o,source:t,blockStartLocStart:g=>g[0].source.startIdx,blockStartLocEnd:g=>g[0].source.endIdx,blockEndLocStart:g=>g[2].source.startIdx,blockEndLocEnd:g=>g[2].source.endIdx},liquidDoc:{type:ne.LiquidRawTag,name:"doc",body:g=>g[1].sourceString,children:g=>{let k=g[1];return y6(t,k.sourceString,s+k.source.startIdx)},whitespaceStart:g=>g[0].children[1].sourceString,whitespaceEnd:g=>g[0].children[7].sourceString,delimiterWhitespaceStart:g=>{var k;return((k=g[2].children[1])===null||k===void 0?void 0:k.sourceString)||""},delimiterWhitespaceEnd:g=>{var k;return((k=g[2].children[7])===null||k===void 0?void 0:k.sourceString)||""},locStart:a,locEnd:o,source:t,blockStartLocStart:g=>g[0].source.startIdx,blockStartLocEnd:g=>g[0].source.endIdx,blockEndLocStart:g=>g[2].source.startIdx,blockEndLocEnd:g=>g[2].source.endIdx},liquidInlineComment:{type:ne.LiquidTag,name:3,markup:Ik(5),whitespaceStart:1,whitespaceEnd:6,locStart:a,locEnd:o,source:t},liquidTagOpen:0,liquidTagOpenStrict:0,liquidTagOpenBaseCase:0,liquidTagOpenRule:{type:ne.LiquidTagOpen,name:3,markup(g){let k=g[6],w=g[3];return Hl.NamedTags.hasOwnProperty(w.sourceString)?k.toAST(this.args.mapping):k.sourceString.trim()},whitespaceStart:1,whitespaceEnd:7,locStart:a,locEnd:o,source:t},liquidTagOpenCapture:0,liquidTagOpenForm:0,liquidTagOpenFormMarkup:0,liquidTagOpenFor:0,liquidTagOpenForMarkup:{type:ne.ForMarkup,variableName:0,collection:4,reversed:6,args:8,locStart:a,locEnd:o,source:t},liquidTagBreak:0,liquidTagContinue:0,liquidTagOpenTablerow:0,liquidTagOpenPaginate:0,liquidTagOpenPaginateMarkup:{type:ne.PaginateMarkup,collection:0,pageSize:4,args:6,locStart:a,locEnd:o,source:t},liquidTagOpenCase:0,liquidTagOpenCaseMarkup:0,liquidTagWhen:0,liquidTagWhenMarkup:0,liquidTagOpenIf:0,liquidTagOpenUnless:0,liquidTagElsif:0,liquidTagElse:0,liquidTagOpenConditionalMarkup:0,condition:{type:ne.Condition,relation:0,expression:2,locStart:a,locEnd:o,source:t},comparison:{type:ne.Comparison,comparator:2,left:0,right:4,locStart:a,locEnd:o,source:t},liquidTagClose:{type:ne.LiquidTagClose,name:4,whitespaceStart:1,whitespaceEnd:7,locStart:a,locEnd:o,source:t},liquidTag:0,liquidTagStrict:0,liquidTagBaseCase:0,liquidTagAssign:0,liquidTagEcho:0,liquidTagContentFor:0,liquidTagCycle:0,liquidTagIncrement:0,liquidTagDecrement:0,liquidTagRender:0,liquidTagInclude:0,liquidTagSection:0,liquidTagSections:0,liquidTagLayout:0,liquidTagRule:{type:ne.LiquidTag,name:3,markup(g){let k=g[6],w=g[3];return Hl.NamedTags.hasOwnProperty(w.sourceString)?k.toAST(this.args.mapping):k.sourceString.trim()},whitespaceStart:1,whitespaceEnd:7,source:t,locStart:a,locEnd:o},liquidTagLiquid:0,liquidTagLiquidMarkup(g){return Ki(t,e,e.LiquidStatement,["HelperMappings","LiquidMappings","LiquidStatement"],g.sourceString,s+g.source.startIdx)},liquidTagEchoMarkup:0,liquidTagSectionMarkup:0,liquidTagSectionsMarkup:0,liquidTagLayoutMarkup:0,liquidTagAssignMarkup:{type:ne.AssignMarkup,name:0,value:4,locStart:a,locEnd:o,source:t},liquidTagCycleMarkup:{type:ne.CycleMarkup,groupName:0,args:3,locStart:a,locEnd:o,source:t},liquidTagContentForMarkup:{type:ne.ContentForMarkup,contentForType:0,args:2,locStart:a,locEnd:o,source:t},contentForType:0,liquidTagRenderMarkup:{type:ne.RenderMarkup,snippet:0,variable:1,alias:2,renderArguments:3,locStart:a,locEnd:o,source:t},renderArguments:1,completionModeRenderArguments:function(g,k,w,_,A,E,O,L){let B=this;return k.toAST(B.args.mapping).concat(O.sourceString===""?[]:O.toAST(B.args.mapping))},snippetExpression:0,renderVariableExpression:{type:ne.RenderVariableExpression,kind:1,name:3,locStart:a,locEnd:o,source:t},renderAliasExpression:{type:ne.RenderAliasExpression,value:3,locStart:a,locEnd:o,source:t},liquidDrop:{type:ne.LiquidVariableOutput,markup:3,whitespaceStart:1,whitespaceEnd:4,locStart:a,locEnd:o,source:t},liquidDropCases:0,liquidExpression:0,liquidComplexExpression:0,liquidDropBaseCase:g=>g.sourceString.trimEnd(),liquidVariable:{type:ne.LiquidVariable,expression:0,filters:1,rawSource:g=>t.slice(a(g),g[g.length-2].source.endIdx).trimEnd(),locStart:a,locEnd:u,source:t},liquidFilter:{type:ne.LiquidFilter,name:3,locStart:a,locEnd:o,source:t,args(g){return g[7].sourceString===""?[]:g[7].toAST(this.args.mapping)}},filterArguments:0,arguments:0,complexArguments:function(g,k,w,_,A){let E=this;return g.toAST(E.args.mapping).concat(A.sourceString===""?[]:A.toAST(E.args.mapping))},simpleArgument:0,tagArguments:0,contentForTagArgument:0,completionModeContentForTagArgument:function(g,k,w){let _=this;return g.toAST(_.args.mapping).concat(w.sourceString===""?[]:w.toAST(_.args.mapping))},positionalArgument:0,namedArgument:{type:ne.NamedArgument,name:0,value:4,locStart:a,locEnd:o,source:t},contentForNamedArgument:{type:ne.NamedArgument,name:g=>g[0].sourceString+g[1].sourceString,value:6,locStart:a,locEnd:o,source:t},liquidBooleanExpression(g,k){let w=g.toAST(this.args.mapping),_=k.toAST(this.args.mapping);if(_.length===0&&w.expression.type!==ne.Comparison)return w.expression;let A=[w,..._];return{type:ne.BooleanExpression,conditions:A,locStart:A.at(0).locStart,locEnd:A.at(-1).locEnd,source:t}},booleanExpressionCondition:{type:ne.Condition,relation:null,expression:0,locStart:a,locEnd:o,source:t},booleanExpressionSubsequentCondition:{type:ne.Condition,relation:1,expression:3,locStart:a,locEnd:o,source:t},liquidString:0,liquidDoubleQuotedString:{type:ne.String,single:()=>!1,value:1,locStart:a,locEnd:o,source:t},liquidSingleQuotedString:{type:ne.String,single:()=>!0,value:1,locStart:a,locEnd:o,source:t},liquidNumber:{type:ne.Number,value:0,locStart:a,locEnd:o,source:t},liquidLiteral:{type:ne.LiquidLiteral,value:g=>{let k=g[0].sourceString;return Qi.LiquidLiteralValues[k]},keyword:0,locStart:a,locEnd:o,source:t},liquidRange:{type:ne.Range,start:2,end:6,locStart:a,locEnd:o,source:t},liquidVariableLookup:{type:ne.VariableLookup,name:0,lookups:1,locStart:a,locEnd:o,source:t},variableSegmentAsLookupMarkup:0,variableSegmentAsLookup:{type:ne.VariableLookup,name:0,lookups:()=>[],locStart:a,locEnd:o,source:t},lookup:0,indexLookup:3,dotLookup:{type:ne.String,value:3,locStart:g=>s+g[2].source.startIdx,locEnd:g=>s+g[g.length-1].source.endIdx,source:t},tagMarkup:g=>g.sourceString.trim()},m={LiquidStatement:0,liquidTagOpenRule:{type:ne.LiquidTagOpen,name:0,markup(g){let k=g[2],w=g[0];return Hl.NamedTags.hasOwnProperty(w.sourceString)?k.toAST(this.args.mapping):k.sourceString.trim()},whitespaceStart:null,whitespaceEnd:null,locStart:a,locEnd:u,source:t},liquidTagClose:{type:ne.LiquidTagClose,name:1,whitespaceStart:null,whitespaceEnd:null,locStart:a,locEnd:u,source:t},liquidTagRule:{type:ne.LiquidTag,name:0,markup(g){let k=g[2],w=g[0];return Hl.NamedTags.hasOwnProperty(w.sourceString)?k.toAST(this.args.mapping):k.sourceString.trim()},whitespaceStart:null,whitespaceEnd:null,locStart:a,locEnd:u,source:t},liquidRawTagImpl:{type:ne.LiquidRawTag,name:0,body:4,children(g){return Ki(t,e,vn.TextNodeGrammar,["HelperMappings"],g[4].sourceString,s+g[4].source.startIdx)},whitespaceStart:null,whitespaceEnd:null,delimiterWhitespaceStart:null,delimiterWhitespaceEnd:null,locStart:a,locEnd:u,source:t,blockStartLocStart:g=>s+g[0].source.startIdx,blockStartLocEnd:g=>s+g[2].source.endIdx,blockEndLocStart:g=>s+g[5].source.startIdx,blockEndLocEnd:g=>s+g[5].source.endIdx},liquidBlockComment:{type:ne.LiquidRawTag,name:"comment",body:g=>g[1].sourceString.slice(1)+g[2].sourceString,children(g){let k=g[1].sourceString.slice(1)+g[2].sourceString;return Ki(t,e,vn.TextNodeGrammar,["HelperMappings"],k,s+g[1].source.startIdx+1)},whitespaceStart:"",whitespaceEnd:"",delimiterWhitespaceStart:"",delimiterWhitespaceEnd:"",locStart:a,locEnd:o,source:t,blockStartLocStart:g=>s+g[0].source.startIdx,blockStartLocEnd:g=>s+g[0].source.endIdx,blockEndLocStart:g=>s+g[4].source.startIdx,blockEndLocEnd:g=>s+g[4].source.endIdx},liquidInlineComment:{type:ne.LiquidTag,name:0,markup:Ik(2),whitespaceStart:null,whitespaceEnd:null,locStart:a,locEnd:u,source:t}},v={Node(g,k){let w=this;return(g.sourceString.length===0?[]:[g.toAST(w.args.mapping)]).concat(k.toAST(w.args.mapping))},yamlFrontmatter:{type:ne.YAMLFrontmatter,body:2,locStart:a,locEnd:o,source:t},HtmlDoctype:{type:ne.HtmlDoctype,legacyDoctypeString:4,locStart:a,locEnd:o,source:t},HtmlComment:{type:ne.HtmlComment,body:d6(1),locStart:a,locEnd:o,source:t},HtmlRawTagImpl:{type:ne.HtmlRawTag,name:g=>g[0].children[1].sourceString,attrList(g){let k=this.args.mapping;return g[0].children[2].toAST(k)},body:g=>t.slice(g[0].source.endIdx,g[2].source.startIdx),children:g=>{let k=t.slice(g[0].source.endIdx,g[2].source.startIdx);return Ki(t,e,e.Liquid,["HelperMappings","LiquidMappings"],k,g[0].source.endIdx)},locStart:a,locEnd:o,source:t,blockStartLocStart:g=>g[0].source.startIdx,blockStartLocEnd:g=>g[0].source.endIdx,blockEndLocStart:g=>g[2].source.startIdx,blockEndLocEnd:g=>g[2].source.endIdx},HtmlVoidElement:{type:ne.HtmlVoidElement,name:1,attrList:3,locStart:a,locEnd:o,source:t},HtmlSelfClosingElement:{type:ne.HtmlSelfClosingElement,name:1,attrList:2,locStart:a,locEnd:o,source:t},HtmlTagOpen:{type:ne.HtmlTagOpen,name:1,attrList:2,locStart:a,locEnd:o,source:t},HtmlTagClose:{type:ne.HtmlTagClose,name:1,locStart:a,locEnd:o,source:t},leadingTagNamePart:0,leadingTagNameTextNode:l,trailingTagNamePart:0,trailingTagNameTextNode:l,tagName(g,k){let w=this.args.mapping;return[g.toAST(w)].concat(k.toAST(w))},AttrUnquoted:{type:ne.AttrUnquoted,name:0,value:2,locStart:a,locEnd:o,source:t},AttrSingleQuoted:{type:ne.AttrSingleQuoted,name:0,value:3,locStart:a,locEnd:o,source:t},AttrDoubleQuoted:{type:ne.AttrDoubleQuoted,name:0,value:3,locStart:a,locEnd:o,source:t},attrEmpty:{type:ne.AttrEmpty,name:0,locStart:a,locEnd:o,source:t},attrName:0,attrNameTextNode:l,attrDoubleQuotedValue:0,attrSingleQuotedValue:0,attrUnquotedValue:0,attrDoubleQuotedTextNode:l,attrSingleQuotedTextNode:l,attrUnquotedTextNode:l},S={HelperMappings:h,LiquidMappings:p,LiquidHTMLMappings:v,LiquidStatement:m},b=i.reduce((g,k)=>({...g,...S[k]}),{});return(0,Ak.toAST)(f,b)}function y6(t,e,r){let i=u=>r+u[0].source.startIdx,n=u=>r+u[u.length-1].source.endIdx,s=vn.LiquidDocGrammar.match(e,"Node");if(s.failed())throw new Tk.LiquidHTMLCSTParsingError(s);let a=()=>({type:ne.TextNode,value:function(){return this.sourceString},locStart:i,locEnd:n,source:t}),o={Node(u,l){let f=this;return(u.sourceString.length===0?[]:[u.toAST(f.args.mapping)]).concat(l.toAST(f.args.mapping))},ImplicitDescription:{type:ne.LiquidDocDescriptionNode,name:"description",locStart:i,locEnd:n,source:t,content:0,isImplicit:!0,isInline:!0},TextNode:a(),paramNode:{type:ne.LiquidDocParamNode,name:"param",locStart:i,locEnd:n,source:t,paramType:2,paramName:4,paramDescription:8},descriptionNode:{type:ne.LiquidDocDescriptionNode,name:"description",locStart:i,locEnd:n,source:t,content:2,isImplicit:!1,isInline:function(){return!this.children[1].sourceString.includes(`
|
|
1144
|
-
`)}},descriptionContent:a(),paramType:2,paramTypeContent:a(),paramName:{type:ne.LiquidDocParamNameNode,content:0,locStart:i,locEnd:n,source:t,required:!0},optionalParamName:{type:ne.LiquidDocParamNameNode,content:2,locStart:i,locEnd:n,source:t,required:!1},paramDescription:a(),exampleNode:{type:ne.LiquidDocExampleNode,name:"example",locStart:i,locEnd:n,source:t,content:2,isInline:function(){return!this.children[1].sourceString.includes(`
|
|
1145
|
-
`)}},promptNode:{type:ne.LiquidDocPromptNode,name:"prompt",locStart:i,locEnd:n,source:t,content:1},multilineTextContent:a(),textValue:a(),fallbackNode:a()};return(0,Ak.toAST)(s,o)}});var Ok=T(ys=>{"use strict";y();Object.defineProperty(ys,"__esModule",{value:!0});ys.assertNever=_6;ys.locStart=v6;ys.locEnd=b6;ys.deepGet=S6;ys.dropLast=w6;function _6(t){throw new Error(`Unexpected object: ${t.type}`)}function v6(t){return t.position.start}function b6(t){return t.position.end}function S6(t,e){return t.reduce((r,i)=>{if(r&&r[i]!==void 0)return r[i]},e)}function w6(t,e){let r=[...e];for(let i=0;i<t;i++)r.pop();return r}});var jk=T(pi=>{"use strict";y();Object.defineProperty(pi,"__esModule",{value:!0});pi.RawMarkupKinds=void 0;pi.isBranchedTag=Mk;pi.toLiquidAST=A6;pi.toLiquidHtmlAST=T6;pi.getName=Sr;pi.cstToAst=zr;pi.walk=by;pi.isLiquidHtmlNode=Sy;var ve=yy(),z=Ul(),fi=Ok(),Gl=Vl(),x6=Bl(),k6=yy(),Zt;(function(t){t.css="css",t.html="html",t.javascript="javascript",t.json="json",t.markdown="markdown",t.typescript="typescript",t.text="text"})(Zt||(pi.RawMarkupKinds=Zt={}));function Mk(t){return t.type===z.NodeTypes.LiquidTag&&["if","for","unless","case"].includes(t.name)}function I6(t){return t.type===ve.ConcreteNodeTypes.LiquidTag&&["else","elsif","when"].includes(t.name)}function A6(t,e={allowUnclosedDocumentNode:!0,mode:"tolerant"}){let r=(0,k6.toLiquidCST)(t,{mode:e.mode});return{type:z.NodeTypes.Document,source:t,_source:t,children:zr(r,e),name:"#document",position:{start:0,end:t.length}}}function T6(t,e={allowUnclosedDocumentNode:!1,mode:"tolerant"}){let r=(0,ve.toLiquidHtmlCST)(t,{mode:e.mode});return{type:z.NodeTypes.Document,source:t,_source:t,children:zr(r,e),name:"#document",position:{start:0,end:t.length}}}var _y=class{constructor(e){this.ast=[],this.cursor=[],this.source=e}get current(){return(0,fi.deepGet)(this.cursor,this.ast)}get currentPosition(){return(this.current||[]).length-1}get parent(){if(this.cursor.length!=0)return(0,fi.deepGet)((0,fi.dropLast)(1,this.cursor),this.ast)}get grandparent(){if(!(this.cursor.length<4))return(0,fi.deepGet)((0,fi.dropLast)(3,this.cursor),this.ast)}open(e){this.current.push(e),this.cursor.push(this.currentPosition),this.cursor.push("children"),Mk(e)&&this.open(C6(e))}push(e){if(e.type===z.NodeTypes.LiquidBranch){let r=this.findCloseableParentBranch(e);if(r){for(r.blockEndPosition={start:e.position.start,end:e.position.start};this.parent&&this.parent!==r&&this.parent.type===z.NodeTypes.HtmlElement;)this.parent.blockEndPosition={start:e.position.start,end:e.position.start},this.closeParentWith(e);this.closeParentWith(e)}this.open(e)}else this.current.push(e)}close(e,r){var i,n;if(E6(this.parent)&&(this.parent.blockEndPosition={start:e.locStart,end:e.locStart},this.closeParentWith(e)),!this.parent)throw new Gl.LiquidHTMLASTParsingError(`Attempting to close ${r} '${Sr(e)}' before it was opened`,this.source,e.locStart,e.locEnd);if(Sr(this.parent)!==Sr(e)||this.parent.type!==r){let s=this.findCloseableParentNode(e);if(this.parent.type===z.NodeTypes.HtmlElement&&s)for(;this.parent!==s;)this.parent.blockEndPosition={start:e.locStart,end:e.locStart},this.closeParentWith(e);else throw new Gl.LiquidHTMLASTParsingError(`Attempting to close ${r} '${Sr(e)}' before ${this.parent.type} '${Sr(this.parent)}' was closed`,this.source,this.parent.position.start,e.locEnd,Fk(this.parent))}this.parent.position.end=e.locEnd,this.parent.blockEndPosition=de(e),this.parent.type==z.NodeTypes.LiquidTag&&e.type==ve.ConcreteNodeTypes.LiquidTagClose&&(this.parent.delimiterWhitespaceStart=(i=e.whitespaceStart)!==null&&i!==void 0?i:"",this.parent.delimiterWhitespaceEnd=(n=e.whitespaceEnd)!==null&&n!==void 0?n:""),this.cursor.pop(),this.cursor.pop()}findCloseableParentBranch(e){for(let r=this.cursor.length-1;r>0;r-=2){let i=(0,fi.deepGet)(this.cursor.slice(0,r),this.ast),n=this.cursor[r],s=i.type===z.NodeTypes.HtmlElement&&n==="children";if(i.type===z.NodeTypes.LiquidBranch)return i;if(!s)throw new Gl.LiquidHTMLASTParsingError(`Attempting to open LiquidBranch '${e.name}' before ${i.type} '${Sr(i)}' was closed`,this.source,i.position.start,e.position.end)}return null}findCloseableParentNode(e){for(let r=this.cursor.length-1;r>0;r-=2){let i=(0,fi.deepGet)(this.cursor.slice(0,r),this.ast);if(Sr(i)===Sr(e)&&i.type===z.NodeTypes.LiquidTag&&["if","unless","case"].includes(i.name))return i;if(i.type===z.NodeTypes.LiquidTag)return null}return null}closeParentWith(e){this.parent&&("locStart"in e?this.parent.position.end=e.locStart:this.parent.position.end=e.position.start),this.cursor.pop(),this.cursor.pop()}};function E6(t){return!!t&&t.type===z.NodeTypes.LiquidBranch}function Sr(t){if(!t)return null;switch(t.type){case z.NodeTypes.HtmlElement:case z.NodeTypes.HtmlDanglingMarkerClose:case z.NodeTypes.HtmlSelfClosingElement:case ve.ConcreteNodeTypes.HtmlTagClose:return t.name.map(e=>e.type===z.NodeTypes.TextNode||e.type==ve.ConcreteNodeTypes.TextNode?e.value:typeof e.markup=="string"?`{{${e.markup.trim()}}}`:`{{${e.markup.rawSource}}}`).join("");case z.NodeTypes.AttrEmpty:case z.NodeTypes.AttrUnquoted:case z.NodeTypes.AttrDoubleQuoted:case z.NodeTypes.AttrSingleQuoted:return t.name.map(e=>typeof e=="string"?e:e.source.slice(e.position.start,e.position.end)).join("");default:return t.name}}function zr(t,e){var r;if(t.length===0)return[];let i=O6(t,e);if(!e.allowUnclosedDocumentNode&&i.cursor.length!==0)throw new Gl.LiquidHTMLASTParsingError(`Attempting to end parsing before ${(r=i.parent)===null||r===void 0?void 0:r.type} '${Sr(i.parent)}' was closed`,i.source,i.source.length-1,i.source.length,Fk(i.parent,i.grandparent));return i.ast}function O6(t,e){var r,i,n,s;let a=new _y(t[0].source);for(let o=0;o<t.length;o++){let u=t[o];switch(u.type){case ve.ConcreteNodeTypes.TextNode:{a.push(va(u));break}case ve.ConcreteNodeTypes.LiquidVariableOutput:{a.push(z6(u));break}case ve.ConcreteNodeTypes.LiquidTagOpen:{a.open(Pk(u,{...e,isBlockTag:!0}));break}case ve.ConcreteNodeTypes.LiquidTagClose:{a.close(u,z.NodeTypes.LiquidTag);break}case ve.ConcreteNodeTypes.LiquidTag:{a.push(Pk(u,{...e,isBlockTag:!1}));break}case ve.ConcreteNodeTypes.LiquidRawTag:{a.push({type:z.NodeTypes.LiquidRawTag,markup:vy(u.name,u.markup),name:u.name,body:qk(u,e),whitespaceStart:(r=u.whitespaceStart)!==null&&r!==void 0?r:"",whitespaceEnd:(i=u.whitespaceEnd)!==null&&i!==void 0?i:"",delimiterWhitespaceStart:(n=u.delimiterWhitespaceStart)!==null&&n!==void 0?n:"",delimiterWhitespaceEnd:(s=u.delimiterWhitespaceEnd)!==null&&s!==void 0?s:"",position:de(u),blockStartPosition:{start:u.blockStartLocStart,end:u.blockStartLocEnd},blockEndPosition:{start:u.blockEndLocStart,end:u.blockEndLocEnd},source:u.source});break}case ve.ConcreteNodeTypes.HtmlTagOpen:{a.open(Q6(u,e));break}case ve.ConcreteNodeTypes.HtmlTagClose:{e5(a,t,o,e.mode)?a.push(Y6(u,e)):a.close(u,z.NodeTypes.HtmlElement);break}case ve.ConcreteNodeTypes.HtmlVoidElement:{a.push(X6(u,e));break}case ve.ConcreteNodeTypes.HtmlSelfClosingElement:{a.push(Z6(u,e));break}case ve.ConcreteNodeTypes.HtmlDoctype:{a.push({type:z.NodeTypes.HtmlDoctype,legacyDoctypeString:u.legacyDoctypeString,position:de(u),source:u.source});break}case ve.ConcreteNodeTypes.HtmlComment:{a.push({type:z.NodeTypes.HtmlComment,body:u.body,position:de(u),source:u.source});break}case ve.ConcreteNodeTypes.HtmlRawTag:{a.push({type:z.NodeTypes.HtmlRawNode,name:u.name,body:qk(u,e),attributes:zl(u.attrList||[],e),position:de(u),source:u.source,blockStartPosition:{start:u.blockStartLocStart,end:u.blockStartLocEnd},blockEndPosition:{start:u.blockEndLocStart,end:u.blockEndLocEnd}});break}case ve.ConcreteNodeTypes.AttrEmpty:{a.push({type:z.NodeTypes.AttrEmpty,name:zr(u.name,e),position:de(u),source:u.source});break}case ve.ConcreteNodeTypes.AttrSingleQuoted:case ve.ConcreteNodeTypes.AttrDoubleQuoted:case ve.ConcreteNodeTypes.AttrUnquoted:{let l={type:u.type,name:zr(u.name,e),position:de(u),source:u.source,attributePosition:{start:-1,end:-1},value:[]},f=L6(u.value,e);l.value=f,l.attributePosition=N6(u,f),a.push(l);break}case ve.ConcreteNodeTypes.YAMLFrontmatter:{a.push({type:z.NodeTypes.YAMLFrontmatter,body:u.body,position:de(u),source:u.source});break}case ve.ConcreteNodeTypes.LiquidDocParamNode:{a.push({type:z.NodeTypes.LiquidDocParamNode,name:u.name,position:de(u),source:u.source,paramName:va(u.paramName.content),paramDescription:Rk(u.paramDescription),paramType:Rk(u.paramType),required:u.paramName.required});break}case ve.ConcreteNodeTypes.LiquidDocDescriptionNode:{a.push({type:z.NodeTypes.LiquidDocDescriptionNode,name:u.name,position:de(u),source:u.source,content:va(u.content),isImplicit:u.isImplicit,isInline:u.isInline});break}case ve.ConcreteNodeTypes.LiquidDocExampleNode:{a.push({type:z.NodeTypes.LiquidDocExampleNode,name:u.name,position:de(u),source:u.source,content:va(u.content),isInline:u.isInline});break}case ve.ConcreteNodeTypes.LiquidDocPromptNode:{a.push({type:z.NodeTypes.LiquidDocPromptNode,name:u.name,position:de(u),source:u.source,content:va(u.content)});break}default:(0,fi.assertNever)(u)}}return a}function Nk(t){let e=t.at(0);return t.at(-1).locEnd-e.locStart}function N6(t,e){return e.length===0?{start:t.locStart+Nk(t.name)+1+1,end:t.locStart+Nk(t.name)+1+1}:{start:e[0].position.start,end:e[e.length-1].position.end}}function L6(t,e){return zr(t,e)}function zl(t,e){return zr(t,e)}function Ft(t){var e,r;return{type:z.NodeTypes.LiquidTag,position:de(t),whitespaceStart:(e=t.whitespaceStart)!==null&&e!==void 0?e:"",whitespaceEnd:(r=t.whitespaceEnd)!==null&&r!==void 0?r:"",blockStartPosition:de(t),source:t.source}}function Lk(t){var e,r;return{type:z.NodeTypes.LiquidBranch,children:[],position:de(t),whitespaceStart:(e=t.whitespaceStart)!==null&&e!==void 0?e:"",whitespaceEnd:(r=t.whitespaceEnd)!==null&&r!==void 0?r:"",blockStartPosition:de(t),blockEndPosition:{start:-1,end:-1},source:t.source}}function Pk(t,e){return typeof t.markup!="string"?P6(t,e):I6(t)?q6(t):e.isBlockTag?{name:t.name,markup:vy(t.name,t.markup),children:e.isBlockTag?[]:void 0,...Ft(t)}:{name:t.name,markup:vy(t.name,t.markup),...Ft(t)}}function P6(t,e){switch(t.name){case z.NamedTags.echo:return{...Ft(t),name:z.NamedTags.echo,markup:wy(t.markup)};case z.NamedTags.assign:return{...Ft(t),name:z.NamedTags.assign,markup:R6(t.markup)};case z.NamedTags.cycle:return{...Ft(t),name:t.name,markup:M6(t.markup)};case z.NamedTags.increment:case z.NamedTags.decrement:return{...Ft(t),name:t.name,markup:Je(t.markup)};case z.NamedTags.capture:return{...Ft(t),name:t.name,markup:Je(t.markup),children:[]};case z.NamedTags.content_for:return{...Ft(t),name:t.name,markup:$6(t.markup)};case z.NamedTags.include:case z.NamedTags.render:return{...Ft(t),name:t.name,markup:U6(t.markup)};case z.NamedTags.layout:case z.NamedTags.section:return{...Ft(t),name:t.name,markup:Je(t.markup)};case z.NamedTags.sections:return{...Ft(t),name:t.name,markup:Je(t.markup)};case z.NamedTags.form:return{...Ft(t),name:t.name,markup:t.markup.map(Jl),children:[]};case z.NamedTags.tablerow:case z.NamedTags.for:return{...Ft(t),name:t.name,markup:D6(t.markup),children:[]};case z.NamedTags.paginate:return{...Ft(t),name:t.name,markup:F6(t.markup),children:[]};case z.NamedTags.if:case z.NamedTags.unless:return{...Ft(t),name:t.name,markup:Wl(t.markup),blockEndPosition:{start:-1,end:-1},children:[]};case z.NamedTags.elsif:return{...Lk(t),name:t.name,markup:Wl(t.markup)};case z.NamedTags.case:return{...Ft(t),name:t.name,markup:Je(t.markup),children:[]};case z.NamedTags.when:return{...Lk(t),name:t.name,markup:t.markup.map(Je)};case z.NamedTags.liquid:return{...Ft(t),name:t.name,markup:zr(t.markup,e)};default:return(0,fi.assertNever)(t)}}function q6(t){var e,r;return{name:t.name,type:z.NodeTypes.LiquidBranch,markup:t.name!=="else"?t.markup:"",position:{start:t.locStart,end:t.locEnd},children:[],blockStartPosition:{start:t.locStart,end:t.locEnd},blockEndPosition:{start:-1,end:-1},whitespaceStart:(e=t.whitespaceStart)!==null&&e!==void 0?e:"",whitespaceEnd:(r=t.whitespaceEnd)!==null&&r!==void 0?r:"",source:t.source}}function C6(t){return{type:z.NodeTypes.LiquidBranch,name:null,markup:"",position:{start:t.position.end,end:t.position.end},blockStartPosition:{start:t.position.end,end:t.position.end},blockEndPosition:{start:-1,end:-1},children:[],whitespaceStart:"",whitespaceEnd:"",source:t.source}}function R6(t){return{type:z.NodeTypes.AssignMarkup,name:t.name,value:wy(t.value),position:de(t),source:t.source}}function M6(t){return{type:z.NodeTypes.CycleMarkup,groupName:t.groupName?Je(t.groupName):null,args:t.args.map(Je),position:de(t),source:t.source}}function D6(t){return{type:z.NodeTypes.ForMarkup,variableName:t.variableName,collection:Je(t.collection),args:t.args.map(xy),reversed:!!t.reversed,position:de(t),source:t.source}}function F6(t){return{type:z.NodeTypes.PaginateMarkup,collection:Je(t.collection),pageSize:Je(t.pageSize),position:de(t),args:t.args?t.args.map(xy):[],source:t.source}}function qk(t,e){return{type:z.NodeTypes.RawMarkup,kind:j6(t),nodes:zr(t.children,e),value:t.body,position:{start:t.blockStartLocEnd,end:t.blockEndLocStart},source:t.source}}function j6(t){switch(t.type){case ve.ConcreteNodeTypes.HtmlRawTag:return B6(t);case ve.ConcreteNodeTypes.LiquidRawTag:return V6(t);default:return(0,fi.assertNever)(t)}}var Dk=/(\{%|\{\{)-?/g;function B6(t){var e;switch(t.name){case"script":{let r=(e=t.attrList)===null||e===void 0?void 0:e.find(n=>"name"in n&&typeof n.name!="string"&&n.name.length===1&&n.name[0].type===ve.ConcreteNodeTypes.TextNode&&n.name[0].value==="type");if(!r||!("value"in r)||r.value.length===0||r.value[0].type!==ve.ConcreteNodeTypes.TextNode)return Zt.javascript;let i=r.value[0].value;return i==="text/markdown"?Zt.markdown:i==="application/x-typescript"?Zt.typescript:i==="text/html"?Zt.html:i&&(i.endsWith("json")||i.endsWith("importmap"))||i==="speculationrules"?Zt.json:Zt.javascript}case"style":return Dk.test(t.body)?Zt.text:Zt.css;default:return Zt.text}}function V6(t){switch(t.name){case"javascript":return Zt.javascript;case"stylesheet":case"style":return Dk.test(t.body)?Zt.text:Zt.css;case"schema":return Zt.json;default:return Zt.text}}function $6(t){return{type:z.NodeTypes.ContentForMarkup,contentForType:Je(t.contentForType),args:t.args.map(Jl),position:de(t),source:t.source}}function U6(t){return{type:z.NodeTypes.RenderMarkup,snippet:Je(t.snippet),alias:G6(t.alias),variable:H6(t.variable),args:t.renderArguments.map(Jl),position:de(t),source:t.source}}function H6(t){return t?{type:z.NodeTypes.RenderVariableExpression,kind:t.kind,name:Je(t.name),position:de(t),source:t.source}:null}function G6(t){return t?{type:z.NodeTypes.RenderAliasExpression,value:t.value,position:de(t),source:t.source}:null}function Wl(t){if(t.length===1)return Ck(t[0]);let[e,r]=t,[,...i]=t;return{type:z.NodeTypes.LogicalExpression,relation:r.relation,left:Ck(e),right:Wl(i),position:{start:e.locStart,end:t[t.length-1].locEnd},source:e.source}}function Ck(t){let e=t.expression;return e.type===ve.ConcreteNodeTypes.Comparison?W6(e):Je(e)}function W6(t){return{type:z.NodeTypes.Comparison,comparator:t.comparator,left:Je(t.left),right:Je(t.right),position:de(t),source:t.source}}function z6(t){var e,r;return{type:z.NodeTypes.LiquidVariableOutput,markup:typeof t.markup=="string"?t.markup:wy(t.markup),whitespaceStart:(e=t.whitespaceStart)!==null&&e!==void 0?e:"",whitespaceEnd:(r=t.whitespaceEnd)!==null&&r!==void 0?r:"",position:de(t),source:t.source}}function wy(t){return{type:z.NodeTypes.LiquidVariable,expression:J6(t.expression),filters:t.filters.map(K6),position:de(t),rawSource:t.rawSource,source:t.source}}function J6(t){return t.type===ve.ConcreteNodeTypes.BooleanExpression?{type:z.NodeTypes.BooleanExpression,position:de(t),condition:Wl(t.conditions),source:t.source}:Je(t)}function Je(t){switch(t.type){case ve.ConcreteNodeTypes.String:return{type:z.NodeTypes.String,position:de(t),single:t.single,value:t.value,source:t.source};case ve.ConcreteNodeTypes.Number:return{type:z.NodeTypes.Number,position:de(t),value:t.value,source:t.source};case ve.ConcreteNodeTypes.LiquidLiteral:return{type:z.NodeTypes.LiquidLiteral,position:de(t),value:t.value,keyword:t.keyword,source:t.source};case ve.ConcreteNodeTypes.Range:return{type:z.NodeTypes.Range,start:Je(t.start),end:Je(t.end),position:de(t),source:t.source};case ve.ConcreteNodeTypes.VariableLookup:return{type:z.NodeTypes.VariableLookup,name:t.name,lookups:t.lookups.map(Je),position:de(t),source:t.source};default:return(0,fi.assertNever)(t)}}function K6(t){return{type:z.NodeTypes.LiquidFilter,name:t.name,args:t.args.map(Jl),position:de(t),source:t.source}}function Jl(t){return t.type===ve.ConcreteNodeTypes.NamedArgument?xy(t):Je(t)}function xy(t){return{type:z.NodeTypes.NamedArgument,name:t.name,value:Je(t.value),position:de(t),source:t.source}}function Q6(t,e){return{type:z.NodeTypes.HtmlElement,name:zr(t.name,e),attributes:zl(t.attrList||[],e),position:de(t),blockStartPosition:de(t),blockEndPosition:{start:-1,end:-1},children:[],source:t.source}}function Y6(t,e){return{type:z.NodeTypes.HtmlDanglingMarkerClose,name:zr(t.name,e),position:de(t),blockStartPosition:de(t),source:t.source}}function X6(t,e){return{type:z.NodeTypes.HtmlVoidElement,name:t.name,attributes:zl(t.attrList||[],e),position:de(t),blockStartPosition:de(t),source:t.source}}function Z6(t,e){return{type:z.NodeTypes.HtmlSelfClosingElement,name:zr(t.name,e),attributes:zl(t.attrList||[],e),position:de(t),blockStartPosition:de(t),source:t.source}}function Rk(t){return!t||t.value===""?null:va(t)}function va(t){return{type:z.NodeTypes.TextNode,value:t.value,position:de(t),source:t.source}}function e5(t,e,r,i){if(i==="completion"){let n=e[r];return!(t.parent&&t.parent.type===z.NodeTypes.HtmlElement&&Sr(t.parent)===Sr(n))}return t5(t)}function t5(t){let{parent:e,grandparent:r}=t;return!e||!r?!1:e.type===z.NodeTypes.LiquidBranch&&r.type===z.NodeTypes.LiquidTag&&["if","unless","case"].includes(r.name)}function vy(t,e){return x6.TAGS_WITHOUT_MARKUP.includes(t)?"":e}function de(t){return{start:t.locStart,end:t.locEnd}}function by(t,e,r){for(let i of Object.keys(t)){if(z.nonTraversableProperties.has(i))continue;let n=t[i];Array.isArray(n)?n.filter(Sy).forEach(s=>by(s,e,t)):Sy(n)&&by(n,e,t)}e(t,r)}function Sy(t){return t!==null&&typeof t=="object"&&"type"in t&&z.NodeTypes.hasOwnProperty(t.type)}function Fk(t,e){var r;if(t)return Sr(t)===null&&e&&(t=e),{type:t.type,name:(r=Sr(t))!==null&&r!==void 0?r:"",blockStartPosition:"blockStartPosition"in t?t.blockStartPosition:t.position}}});var Bk=T(Kl=>{"use strict";y();Object.defineProperty(Kl,"__esModule",{value:!0});Kl.getConditionalComment=void 0;var r5=/(<!--\[if[^\]]*]>)((.|\n)*)(<!\[endif\]-->)$/,i5=t=>{let e=t.match(r5);if(e)return{startTag:e[1],body:e[2].trim(),endTag:e[4]}};Kl.getConditionalComment=i5});var ge=T(St=>{"use strict";y();var n5=St&&St.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),ky=St&&St.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&n5(e,t,r)};Object.defineProperty(St,"__esModule",{value:!0});St.getConditionalComment=St.BLOCKS=St.VOID_ELEMENTS=St.RAW_TAGS=St.TAGS_WITHOUT_MARKUP=void 0;ky(jk(),St);ky(Ul(),St);ky(Vl(),St);var Ql=Bl();Object.defineProperty(St,"TAGS_WITHOUT_MARKUP",{enumerable:!0,get:function(){return Ql.TAGS_WITHOUT_MARKUP}});Object.defineProperty(St,"RAW_TAGS",{enumerable:!0,get:function(){return Ql.RAW_TAGS}});Object.defineProperty(St,"VOID_ELEMENTS",{enumerable:!0,get:function(){return Ql.VOID_ELEMENTS}});Object.defineProperty(St,"BLOCKS",{enumerable:!0,get:function(){return Ql.BLOCKS}});var s5=Bk();Object.defineProperty(St,"getConditionalComment",{enumerable:!0,get:function(){return s5.getConditionalComment}})});var Ay=T((Wne,Iy)=>{y();var Xl=process||{},Vk=Xl.argv||[],Yl=Xl.env||{},a5=!(Yl.NO_COLOR||Vk.includes("--no-color"))&&(!!Yl.FORCE_COLOR||Vk.includes("--color")||Xl.platform==="win32"||(Xl.stdout||{}).isTTY&&Yl.TERM!=="dumb"||!!Yl.CI),o5=(t,e,r=t)=>i=>{let n=""+i,s=n.indexOf(e,t.length);return~s?t+u5(n,e,r,s)+e:t+n+e},u5=(t,e,r,i)=>{let n="",s=0;do n+=t.substring(s,i)+r,s=i+e.length,i=t.indexOf(e,s);while(~i);return n+t.substring(s)},$k=(t=a5)=>{let e=t?o5:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};Iy.exports=$k();Iy.exports.createColors=$k});var tf=T((Jne,Hk)=>{"use strict";y();var Zl=/[\t\n\f\r "#'()/;[\\\]{}]/g,ef=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,c5=/.[\r\n"'(/\\]/,Uk=/[\da-f]/i;Hk.exports=function(e,r={}){let i=e.css.valueOf(),n=r.ignoreErrors,s,a,o,u,l,f,h,p,m,v,S=i.length,b=0,g=[],k=[];function w(){return b}function _(L){throw e.error("Unclosed "+L,b)}function A(){return k.length===0&&b>=S}function E(L){if(k.length)return k.pop();if(b>=S)return;let B=L?L.ignoreUnclosed:!1;switch(s=i.charCodeAt(b),s){case 10:case 32:case 9:case 13:case 12:{u=b;do u+=1,s=i.charCodeAt(u);while(s===32||s===10||s===9||s===13||s===12);f=["space",i.slice(b,u)],b=u-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let R=String.fromCharCode(s);f=[R,R,b];break}case 40:{if(v=g.length?g.pop()[1]:"",m=i.charCodeAt(b+1),v==="url"&&m!==39&&m!==34&&m!==32&&m!==10&&m!==9&&m!==12&&m!==13){u=b;do{if(h=!1,u=i.indexOf(")",u+1),u===-1)if(n||B){u=b;break}else _("bracket");for(p=u;i.charCodeAt(p-1)===92;)p-=1,h=!h}while(h);f=["brackets",i.slice(b,u+1),b,u],b=u}else u=i.indexOf(")",b+1),a=i.slice(b,u+1),u===-1||c5.test(a)?f=["(","(",b]:(f=["brackets",a,b,u],b=u);break}case 39:case 34:{l=s===39?"'":'"',u=b;do{if(h=!1,u=i.indexOf(l,u+1),u===-1)if(n||B){u=b+1;break}else _("string");for(p=u;i.charCodeAt(p-1)===92;)p-=1,h=!h}while(h);f=["string",i.slice(b,u+1),b,u],b=u;break}case 64:{Zl.lastIndex=b+1,Zl.test(i),Zl.lastIndex===0?u=i.length-1:u=Zl.lastIndex-2,f=["at-word",i.slice(b,u+1),b,u],b=u;break}case 92:{for(u=b,o=!0;i.charCodeAt(u+1)===92;)u+=1,o=!o;if(s=i.charCodeAt(u+1),o&&s!==47&&s!==32&&s!==10&&s!==9&&s!==13&&s!==12&&(u+=1,Uk.test(i.charAt(u)))){for(;Uk.test(i.charAt(u+1));)u+=1;i.charCodeAt(u+1)===32&&(u+=1)}f=["word",i.slice(b,u+1),b,u],b=u;break}default:{s===47&&i.charCodeAt(b+1)===42?(u=i.indexOf("*/",b+2)+1,u===0&&(n||B?u=i.length:_("comment")),f=["comment",i.slice(b,u+1),b,u],b=u):(ef.lastIndex=b+1,ef.test(i),ef.lastIndex===0?u=i.length-1:u=ef.lastIndex-2,f=["word",i.slice(b,u+1),b,u],g.push(f),b=u);break}}return b++,f}function O(L){k.push(L)}return{back:O,endOfFile:A,nextToken:E,position:w}}});var Ty=T((Qne,zk)=>{"use strict";y();var ur=Ay(),l5=tf(),Gk;function f5(t){Gk=t}var p5={";":ur.yellow,":":ur.yellow,"(":ur.cyan,")":ur.cyan,"[":ur.yellow,"]":ur.yellow,"{":ur.yellow,"}":ur.yellow,"at-word":ur.cyan,brackets:ur.cyan,call:ur.cyan,class:ur.yellow,comment:ur.gray,hash:ur.magenta,string:ur.green};function h5([t,e],r){if(t==="word"){if(e[0]===".")return"class";if(e[0]==="#")return"hash"}if(!r.endOfFile()){let i=r.nextToken();if(r.back(i),i[0]==="brackets"||i[0]==="(")return"call"}return t}function Wk(t){let e=l5(new Gk(t),{ignoreErrors:!0}),r="";for(;!e.endOfFile();){let i=e.nextToken(),n=p5[h5(i,e)];n?r+=i[1].split(/\r?\n/).map(s=>n(s)).join(`
|
|
1146
|
-
`):r+=i[1]}return r}Wk.registerInput=f5;zk.exports=Wk});var rf=T((Xne,Qk)=>{"use strict";y();var Jk=Ay(),Kk=Ty(),zo=class t extends Error{constructor(e,r,i,n,s,a){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),a&&(this.plugin=a),typeof r<"u"&&typeof i<"u"&&(typeof r=="number"?(this.line=r,this.column=i):(this.line=r.line,this.column=r.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let r=this.source;e==null&&(e=Jk.isColorSupported);let i=f=>f,n=f=>f,s=f=>f;if(e){let{bold:f,gray:h,red:p}=Jk.createColors(!0);n=m=>f(p(m)),i=m=>h(m),Kk&&(s=m=>Kk(m))}let a=r.split(/\r?\n/),o=Math.max(this.line-3,0),u=Math.min(this.line+2,a.length),l=String(u).length;return a.slice(o,u).map((f,h)=>{let p=o+1+h,m=" "+(" "+p).slice(-l)+" | ";if(p===this.line){if(f.length>160){let S=20,b=Math.max(0,this.column-S),g=Math.max(this.column+S,this.endColumn+S),k=f.slice(b,g),w=i(m.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,S-1)).replace(/[^\t]/g," ");return n(">")+i(m)+s(k)+`
|
|
1147
|
-
`+w+n("^")}let v=i(m.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+i(m)+s(f)+`
|
|
1148
|
-
`+v+n("^")}return" "+i(m)+s(f)}).join(`
|
|
1149
|
-
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
1150
|
-
|
|
1151
|
-
`+e+`
|
|
1152
|
-
`),this.name+": "+this.message+e}};Qk.exports=zo;zo.default=zo});var Ey=T((ese,Xk)=>{"use strict";y();var d5=/(<)(\/?style\b)/gi,m5=/(<)(!--)/g;function bn(t){return typeof t!="string"||!t.includes("<")?t:t.replace(d5,"\\3c $2").replace(m5,"\\3c $2")}var Yk={after:`
|
|
1153
|
-
`,beforeClose:`
|
|
1154
|
-
`,beforeComment:`
|
|
1155
|
-
`,beforeDecl:`
|
|
1156
|
-
`,beforeOpen:" ",beforeRule:`
|
|
1157
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function g5(t){return t[0].toUpperCase()+t.slice(1)}var Jo=class{constructor(e){this.builder=e}atrule(e,r){let i="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?i+=e.raws.afterName:n&&(i+=" "),e.nodes)this.block(e,i+n);else{let s=(e.raws.between||"")+(r?";":"");this.builder(bn(i+n+s),e)}}beforeAfter(e,r){let i;e.type==="decl"?i=this.raw(e,null,"beforeDecl"):e.type==="comment"?i=this.raw(e,null,"beforeComment"):r==="before"?i=this.raw(e,null,"beforeRule"):i=this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&n.type!=="root";)s+=1,n=n.parent;if(i.includes(`
|
|
1158
|
-
`)){let a=this.raw(e,null,"indent");if(a.length)for(let o=0;o<s;o++)i+=a}return i}block(e,r){let i=this.raw(e,"between","beforeOpen");this.builder(bn(r+i)+"{",e,"start");let n;e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(bn(n)),this.builder("}",e,"end")}body(e){let r=e.nodes.length-1;for(;r>0&&e.nodes[r].type==="comment";)r-=1;let i=this.raw(e,"semicolon"),n=e.type==="document";for(let s=0;s<e.nodes.length;s++){let a=e.nodes[s],o=this.raw(a,"before");o&&this.builder(n?o:bn(o)),this.stringify(a,r!==s||i)}}comment(e){let r=this.raw(e,"left","commentLeft"),i=this.raw(e,"right","commentRight");this.builder(bn("/*"+r+e.text+i+"*/"),e)}decl(e,r){let i=this.raw(e,"between","colon"),n=e.prop+i+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),r&&(n+=";"),this.builder(bn(n),e)}document(e){this.body(e)}raw(e,r,i){let n;if(i||(i=r),r&&(n=e.raws[r],typeof n<"u"))return n;let s=e.parent;if(i==="before"&&(!s||s.type==="root"&&s.first===e||s&&s.type==="document"))return"";if(!s)return Yk[i];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[i]<"u")return a.rawCache[i];if(i==="before"||i==="after")return this.beforeAfter(e,i);{let o="raw"+g5(i);this[o]?n=this[o](a,e):a.walk(u=>{if(n=u.raws[r],typeof n<"u")return!1})}return typeof n>"u"&&(n=Yk[i]),a.rawCache[i]=n,n}rawBeforeClose(e){let r;return e.walk(i=>{if(i.nodes&&i.nodes.length>0&&typeof i.raws.after<"u")return r=i.raws.after,r.includes(`
|
|
1159
|
-
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawBeforeComment(e,r){let i;return e.walkComments(n=>{if(typeof n.raws.before<"u")return i=n.raws.before,i.includes(`
|
|
1160
|
-
`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(r,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(e,r){let i;return e.walkDecls(n=>{if(typeof n.raws.before<"u")return i=n.raws.before,i.includes(`
|
|
1161
|
-
`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(r,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(e){let r;return e.walk(i=>{if(i.type!=="decl"&&(r=i.raws.between,typeof r<"u"))return!1}),r}rawBeforeRule(e){let r;return e.walk(i=>{if(i.nodes&&(i.parent!==e||e.first!==i)&&typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
1162
|
-
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawColon(e){let r;return e.walkDecls(i=>{if(typeof i.raws.between<"u")return r=i.raws.between.replace(/[^\s:]/g,""),!1}),r}rawEmptyBody(e){let r;return e.walk(i=>{if(i.nodes&&i.nodes.length===0&&(r=i.raws.after,typeof r<"u"))return!1}),r}rawIndent(e){if(e.raws.indent)return e.raws.indent;let r;return e.walk(i=>{let n=i.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof i.raws.before<"u"){let s=i.raws.before.split(`
|
|
1163
|
-
`);return r=s[s.length-1],r=r.replace(/\S/g,""),!1}}),r}rawSemicolon(e){let r;return e.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(r=i.raws.semicolon,typeof r<"u"))return!1}),r}rawValue(e,r){let i=e[r],n=e.raws[r];return n&&n.value===i?n.raw:i}root(e){if(this.body(e),e.raws.after){let r=e.raws.after,i=e.parent&&e.parent.type==="document";this.builder(i?r:bn(r))}}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(bn(e.raws.ownSemicolon),e,"end")}stringify(e,r){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,r)}};Xk.exports=Jo;Jo.default=Jo});var Ko=T((rse,Zk)=>{"use strict";y();var y5=Ey();function Oy(t,e){new y5(e).stringify(t)}Zk.exports=Oy;Oy.default=Oy});var nf=T((nse,Ny)=>{"use strict";y();Ny.exports.isClean=Symbol("isClean");Ny.exports.my=Symbol("my")});var Xo=T((ase,eI)=>{"use strict";y();var _5=rf(),v5=Ey(),b5=Ko(),{isClean:Qo,my:S5}=nf();function Ly(t,e){let r=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||i==="proxyCache")continue;let n=t[i],s=typeof n;i==="parent"&&s==="object"?e&&(r[i]=e):i==="source"?r[i]=n:Array.isArray(n)?r[i]=n.map(a=>Ly(a,r)):(s==="object"&&n!==null&&(n=Ly(n)),r[i]=n)}return r}function Yi(t,e){if(e&&typeof e.offset<"u")return e.offset;let r=1,i=1,n=0;for(let s=0;s<t.length;s++){if(i===e.line&&r===e.column){n=s;break}t[s]===`
|
|
1164
|
-
`?(r=1,i+=1):r+=1}return n}var Yo=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Qo]=!1,this[S5]=!0;for(let r in e)if(r==="nodes"){this.nodes=[];for(let i of e[r])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}else this[r]=e[r]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let r=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${r.input.from}:${r.start.line}:${r.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let r in e)this[r]=e[r];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let r=Ly(this);for(let i in e)r[i]=e[i];return r}cloneAfter(e={}){let r=this.clone(e);return this.parent.insertAfter(this,r),r}cloneBefore(e={}){let r=this.clone(e);return this.parent.insertBefore(this,r),r}error(e,r={}){if(this.source){let{end:i,start:n}=this.rangeBy(r);return this.source.input.error(e,{column:n.column,line:n.line},{column:i.column,line:i.line},r)}return new _5(e)}getProxyProcessor(){return{get(e,r){return r==="proxyOf"?e:r==="root"?()=>e.root().toProxy():e[r]},set(e,r,i){return e[r]===i||(e[r]=i,(r==="prop"||r==="value"||r==="name"||r==="params"||r==="important"||r==="text")&&e.markDirty()),!0}}}markClean(){this[Qo]=!0}markDirty(){if(this[Qo]){this[Qo]=!1;let e=this;for(;e=e.parent;)e[Qo]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let r=this.source.start;if(e.index)r=this.positionInside(e.index);else if(e.word){let i="document"in this.source.input?this.source.input.document:this.source.input.css,s=i.slice(Yi(i,this.source.start),Yi(i,this.source.end)).indexOf(e.word);s!==-1&&(r=this.positionInside(s))}return r}positionInside(e){let r=this.source.start.column,i=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,s=Yi(n,this.source.start),a=s+e;for(let o=s;o<a;o++)n[o]===`
|
|
1165
|
-
`?(r=1,i+=1):r+=1;return{column:r,line:i,offset:a}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let r="document"in this.source.input?this.source.input.document:this.source.input.css,i={column:this.source.start.column,line:this.source.start.line,offset:Yi(r,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:Yi(r,this.source.end)+1}:{column:i.column+1,line:i.line,offset:i.offset+1};if(e.word){let a=r.slice(Yi(r,this.source.start),Yi(r,this.source.end)).indexOf(e.word);a!==-1&&(i=this.positionInside(a),n=this.positionInside(a+e.word.length))}else e.start?i={column:e.start.column,line:e.start.line,offset:Yi(r,e.start)}:e.index&&(i=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line,offset:Yi(r,e.end)}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<i.line||n.line===i.line&&n.column<=i.column)&&(n={column:i.column+1,line:i.line,offset:i.offset+1}),{end:n,start:i}}raw(e,r){return new v5().raw(this,e,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let r=this,i=!1;for(let n of e)n===this?i=!0:i?(this.parent.insertAfter(r,n),r=n):this.parent.insertBefore(r,n);i||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,r){let i={},n=r==null;r=r||new Map;let s=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let o=this[a];if(Array.isArray(o))i[a]=o.map(u=>typeof u=="object"&&u.toJSON?u.toJSON(null,r):u);else if(typeof o=="object"&&o.toJSON)i[a]=o.toJSON(null,r);else if(a==="source"){if(o==null)continue;let u=r.get(o.input);u==null&&(u=s,r.set(o.input,s),s++),i[a]={end:o.end,inputId:u,start:o.start}}else i[a]=o}return n&&(i.inputs=[...r.keys()].map(a=>a.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=b5){e.stringify&&(e=e.stringify);let r="";return e(this,i=>{r+=i}),r}warn(e,r,i={}){let n={node:this};for(let s in i)n[s]=i[s];return e.warn(r,n)}};eI.exports=Yo;Yo.default=Yo});var ba=T((use,tI)=>{"use strict";y();var w5=Xo(),Zo=class extends w5{constructor(e){super(e),this.type="comment"}};tI.exports=Zo;Zo.default=Zo});var tu=T((lse,rI)=>{"use strict";y();var x5=Xo(),eu=class extends x5{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};rI.exports=eu;eu.default=eu});var Sn=T((pse,fI)=>{"use strict";y();var iI=ba(),nI=tu(),k5=Xo(),{isClean:sI,my:aI}=nf(),Py,oI,uI,qy;function cI(t){return t.map(e=>(e.nodes&&(e.nodes=cI(e.nodes)),delete e.source,e))}function lI(t){if(t[sI]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)lI(e)}var hi=class t extends k5{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let r of e){let i=this.normalize(r,this.last);for(let n of i)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let r of this.nodes)r.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let r=this.getIterator(),i,n;for(;this.indexes[r]<this.proxyOf.nodes.length&&(i=this.indexes[r],n=e(this.proxyOf.nodes[i],i),n!==!1);)this.indexes[r]+=1;return delete this.indexes[r],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,r){return r==="proxyOf"?e:e[r]?r==="each"||typeof r=="string"&&r.startsWith("walk")?(...i)=>e[r](...i.map(n=>typeof n=="function"?(s,a)=>n(s.toProxy(),a):n)):r==="every"||r==="some"?i=>e[r]((n,...s)=>i(n.toProxy(),...s)):r==="root"?()=>e.root().toProxy():r==="nodes"?e.nodes.map(i=>i.toProxy()):r==="first"||r==="last"?e[r].toProxy():e[r]:e[r]},set(e,r,i){return e[r]===i||(e[r]=i,(r==="name"||r==="params"||r==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,r){let i=this.index(e),n=this.normalize(r,this.proxyOf.nodes[i]).reverse();i=this.index(e);for(let a of n)this.proxyOf.nodes.splice(i+1,0,a);let s;for(let a in this.indexes)s=this.indexes[a],i<s&&(this.indexes[a]=s+n.length);return this.markDirty(),this}insertBefore(e,r){let i=this.index(e),n=i===0?"prepend":!1,s=this.normalize(r,this.proxyOf.nodes[i],n).reverse();i=this.index(e);for(let o of s)this.proxyOf.nodes.splice(i,0,o);let a;for(let o in this.indexes)a=this.indexes[o],i<=a&&(this.indexes[o]=a+s.length);return this.markDirty(),this}normalize(e,r){if(typeof e=="string")e=cI(oI(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new nI(e)]}else if(e.selector||e.selectors)e=[new qy(e)];else if(e.name)e=[new Py(e)];else if(e.text)e=[new iI(e)];else throw new Error("Unknown node type in node creation");return e.map(n=>(n[aI]||t.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[sI]&&lI(n),n.raws||(n.raws={}),typeof n.raws.before>"u"&&r&&typeof r.raws.before<"u"&&(n.raws.before=r.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let r of e){let i=this.normalize(r,this.first,"prepend").reverse();for(let n of i)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+i.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let r;for(let i in this.indexes)r=this.indexes[i],r>=e&&(this.indexes[i]=r-1);return this.markDirty(),this}replaceValues(e,r,i){return i||(i=r,r={}),this.walkDecls(n=>{r.props&&!r.props.includes(n.prop)||r.fast&&!n.value.includes(r.fast)||(n.value=n.value.replace(e,i))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((r,i)=>{let n;try{n=e(r,i)}catch(s){throw r.addToError(s)}return n!==!1&&r.walk&&(n=r.walk(e)),n})}walkAtRules(e,r){return r?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="atrule"&&e.test(i.name))return r(i,n)}):this.walk((i,n)=>{if(i.type==="atrule"&&i.name===e)return r(i,n)}):(r=e,this.walk((i,n)=>{if(i.type==="atrule")return r(i,n)}))}walkComments(e){return this.walk((r,i)=>{if(r.type==="comment")return e(r,i)})}walkDecls(e,r){return r?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="decl"&&e.test(i.prop))return r(i,n)}):this.walk((i,n)=>{if(i.type==="decl"&&i.prop===e)return r(i,n)}):(r=e,this.walk((i,n)=>{if(i.type==="decl")return r(i,n)}))}walkRules(e,r){return r?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="rule"&&e.test(i.selector))return r(i,n)}):this.walk((i,n)=>{if(i.type==="rule"&&i.selector===e)return r(i,n)}):(r=e,this.walk((i,n)=>{if(i.type==="rule")return r(i,n)}))}};hi.registerParse=t=>{oI=t};hi.registerRule=t=>{qy=t};hi.registerAtRule=t=>{Py=t};hi.registerRoot=t=>{uI=t};fI.exports=hi;hi.default=hi;hi.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,Py.prototype):t.type==="rule"?Object.setPrototypeOf(t,qy.prototype):t.type==="decl"?Object.setPrototypeOf(t,nI.prototype):t.type==="comment"?Object.setPrototypeOf(t,iI.prototype):t.type==="root"&&Object.setPrototypeOf(t,uI.prototype),t[aI]=!0,t.nodes&&t.nodes.forEach(e=>{hi.rebuild(e)})}});var sf=T((dse,hI)=>{"use strict";y();var pI=Sn(),Sa=class extends pI{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};hI.exports=Sa;Sa.default=Sa;pI.registerAtRule(Sa)});var af=T((gse,gI)=>{"use strict";y();var I5=Sn(),dI,mI,_s=class extends I5{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new dI(new mI,this,e).stringify()}};_s.registerLazyResult=t=>{dI=t};_s.registerProcessor=t=>{mI=t};gI.exports=_s;_s.default=_s});var _I=T((_se,yI)=>{y();var A5="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",T5=(t,e=21)=>(r=e)=>{let i="",n=r|0;for(;n--;)i+=t[Math.random()*t.length|0];return i},E5=(t=21)=>{let e="",r=t|0;for(;r--;)e+=A5[Math.random()*64|0];return e};yI.exports={nanoid:E5,customAlphabet:T5}});var bI=T(Cy=>{y();var vI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Cy.encode=function(t){if(0<=t&&t<vI.length)return vI[t];throw new TypeError("Must be between 0 and 63: "+t)};Cy.decode=function(t){var e=65,r=90,i=97,n=122,s=48,a=57,o=43,u=47,l=26,f=52;return e<=t&&t<=r?t-e:i<=t&&t<=n?t-i+l:s<=t&&t<=a?t-s+f:t==o?62:t==u?63:-1}});var Dy=T(My=>{y();var SI=bI(),Ry=5,wI=1<<Ry,xI=wI-1,kI=wI;function O5(t){return t<0?(-t<<1)+1:(t<<1)+0}function N5(t){var e=(t&1)===1,r=t>>1;return e?-r:r}My.encode=function(e){var r="",i,n=O5(e);do i=n&xI,n>>>=Ry,n>0&&(i|=kI),r+=SI.encode(i);while(n>0);return r};My.decode=function(e,r,i){var n=e.length,s=0,a=0,o,u;do{if(r>=n)throw new Error("Expected more digits in base 64 VLQ value.");if(u=SI.decode(e.charCodeAt(r++)),u===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));o=!!(u&kI),u&=xI,s=s+(u<<a),a+=Ry}while(o);i.value=N5(s),i.rest=r}});var xa=T(Nt=>{y();function L5(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Nt.getArg=L5;var II=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,P5=/^data:.+\,.+$/;function ru(t){var e=t.match(II);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Nt.urlParse=ru;function wa(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}Nt.urlGenerate=wa;var q5=32;function C5(t){var e=[];return function(r){for(var i=0;i<e.length;i++)if(e[i].input===r){var n=e[0];return e[0]=e[i],e[i]=n,e[0].result}var s=t(r);return e.unshift({input:r,result:s}),e.length>q5&&e.pop(),s}}var Fy=C5(function(e){var r=e,i=ru(e);if(i){if(!i.path)return e;r=i.path}for(var n=Nt.isAbsolute(r),s=[],a=0,o=0;;)if(a=o,o=r.indexOf("/",a),o===-1){s.push(r.slice(a));break}else for(s.push(r.slice(a,o));o<r.length&&r[o]==="/";)o++;for(var u,l=0,o=s.length-1;o>=0;o--)u=s[o],u==="."?s.splice(o,1):u===".."?l++:l>0&&(u===""?(s.splice(o+1,l),l=0):(s.splice(o,2),l--));return r=s.join("/"),r===""&&(r=n?"/":"."),i?(i.path=r,wa(i)):r});Nt.normalize=Fy;function AI(t,e){t===""&&(t="."),e===""&&(e=".");var r=ru(e),i=ru(t);if(i&&(t=i.path||"/"),r&&!r.scheme)return i&&(r.scheme=i.scheme),wa(r);if(r||e.match(P5))return e;if(i&&!i.host&&!i.path)return i.host=e,wa(i);var n=e.charAt(0)==="/"?e:Fy(t.replace(/\/+$/,"")+"/"+e);return i?(i.path=n,wa(i)):n}Nt.join=AI;Nt.isAbsolute=function(t){return t.charAt(0)==="/"||II.test(t)};function R5(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var i=t.lastIndexOf("/");if(i<0||(t=t.slice(0,i),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}Nt.relative=R5;var TI=(function(){var t=Object.create(null);return!("__proto__"in t)})();function EI(t){return t}function M5(t){return OI(t)?"$"+t:t}Nt.toSetString=TI?EI:M5;function D5(t){return OI(t)?t.slice(1):t}Nt.fromSetString=TI?EI:D5;function OI(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function F5(t,e,r){var i=Xi(t.source,e.source);return i!==0||(i=t.originalLine-e.originalLine,i!==0)||(i=t.originalColumn-e.originalColumn,i!==0||r)||(i=t.generatedColumn-e.generatedColumn,i!==0)||(i=t.generatedLine-e.generatedLine,i!==0)?i:Xi(t.name,e.name)}Nt.compareByOriginalPositions=F5;function j5(t,e,r){var i;return i=t.originalLine-e.originalLine,i!==0||(i=t.originalColumn-e.originalColumn,i!==0||r)||(i=t.generatedColumn-e.generatedColumn,i!==0)||(i=t.generatedLine-e.generatedLine,i!==0)?i:Xi(t.name,e.name)}Nt.compareByOriginalPositionsNoSource=j5;function B5(t,e,r){var i=t.generatedLine-e.generatedLine;return i!==0||(i=t.generatedColumn-e.generatedColumn,i!==0||r)||(i=Xi(t.source,e.source),i!==0)||(i=t.originalLine-e.originalLine,i!==0)||(i=t.originalColumn-e.originalColumn,i!==0)?i:Xi(t.name,e.name)}Nt.compareByGeneratedPositionsDeflated=B5;function V5(t,e,r){var i=t.generatedColumn-e.generatedColumn;return i!==0||r||(i=Xi(t.source,e.source),i!==0)||(i=t.originalLine-e.originalLine,i!==0)||(i=t.originalColumn-e.originalColumn,i!==0)?i:Xi(t.name,e.name)}Nt.compareByGeneratedPositionsDeflatedNoLine=V5;function Xi(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function $5(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=Xi(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:Xi(t.name,e.name)}Nt.compareByGeneratedPositionsInflated=$5;function U5(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Nt.parseSourceMapInput=U5;function H5(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var i=ru(r);if(!i)throw new Error("sourceMapURL could not be parsed");if(i.path){var n=i.path.lastIndexOf("/");n>=0&&(i.path=i.path.substring(0,n+1))}e=AI(wa(i),e)}return Fy(e)}Nt.computeSourceURL=H5});var Vy=T(NI=>{y();var jy=xa(),By=Object.prototype.hasOwnProperty,vs=typeof Map<"u";function Zi(){this._array=[],this._set=vs?new Map:Object.create(null)}Zi.fromArray=function(e,r){for(var i=new Zi,n=0,s=e.length;n<s;n++)i.add(e[n],r);return i};Zi.prototype.size=function(){return vs?this._set.size:Object.getOwnPropertyNames(this._set).length};Zi.prototype.add=function(e,r){var i=vs?e:jy.toSetString(e),n=vs?this.has(e):By.call(this._set,i),s=this._array.length;(!n||r)&&this._array.push(e),n||(vs?this._set.set(e,s):this._set[i]=s)};Zi.prototype.has=function(e){if(vs)return this._set.has(e);var r=jy.toSetString(e);return By.call(this._set,r)};Zi.prototype.indexOf=function(e){if(vs){var r=this._set.get(e);if(r>=0)return r}else{var i=jy.toSetString(e);if(By.call(this._set,i))return this._set[i]}throw new Error('"'+e+'" is not in the set.')};Zi.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};Zi.prototype.toArray=function(){return this._array.slice()};NI.ArraySet=Zi});var qI=T(PI=>{y();var LI=xa();function G5(t,e){var r=t.generatedLine,i=e.generatedLine,n=t.generatedColumn,s=e.generatedColumn;return i>r||i==r&&s>=n||LI.compareByGeneratedPositionsInflated(t,e)<=0}function of(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}of.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};of.prototype.add=function(e){G5(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};of.prototype.toArray=function(){return this._sorted||(this._array.sort(LI.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};PI.MappingList=of});var $y=T(CI=>{y();var iu=Dy(),ot=xa(),uf=Vy().ArraySet,W5=qI().MappingList;function Jr(t){t||(t={}),this._file=ot.getArg(t,"file",null),this._sourceRoot=ot.getArg(t,"sourceRoot",null),this._skipValidation=ot.getArg(t,"skipValidation",!1),this._ignoreInvalidMapping=ot.getArg(t,"ignoreInvalidMapping",!1),this._sources=new uf,this._names=new uf,this._mappings=new W5,this._sourcesContents=null}Jr.prototype._version=3;Jr.fromSourceMap=function(e,r){var i=e.sourceRoot,n=new Jr(Object.assign(r||{},{file:e.file,sourceRoot:i}));return e.eachMapping(function(s){var a={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(a.source=s.source,i!=null&&(a.source=ot.relative(i,a.source)),a.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(a.name=s.name)),n.addMapping(a)}),e.sources.forEach(function(s){var a=s;i!==null&&(a=ot.relative(i,s)),n._sources.has(a)||n._sources.add(a);var o=e.sourceContentFor(s);o!=null&&n.setSourceContent(s,o)}),n};Jr.prototype.addMapping=function(e){var r=ot.getArg(e,"generated"),i=ot.getArg(e,"original",null),n=ot.getArg(e,"source",null),s=ot.getArg(e,"name",null);!this._skipValidation&&this._validateMapping(r,i,n,s)===!1||(n!=null&&(n=String(n),this._sources.has(n)||this._sources.add(n)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:i!=null&&i.line,originalColumn:i!=null&&i.column,source:n,name:s}))};Jr.prototype.setSourceContent=function(e,r){var i=e;this._sourceRoot!=null&&(i=ot.relative(this._sourceRoot,i)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ot.toSetString(i)]=r):this._sourcesContents&&(delete this._sourcesContents[ot.toSetString(i)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Jr.prototype.applySourceMap=function(e,r,i){var n=r;if(r==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);n=e.file}var s=this._sourceRoot;s!=null&&(n=ot.relative(s,n));var a=new uf,o=new uf;this._mappings.unsortedForEach(function(u){if(u.source===n&&u.originalLine!=null){var l=e.originalPositionFor({line:u.originalLine,column:u.originalColumn});l.source!=null&&(u.source=l.source,i!=null&&(u.source=ot.join(i,u.source)),s!=null&&(u.source=ot.relative(s,u.source)),u.originalLine=l.line,u.originalColumn=l.column,l.name!=null&&(u.name=l.name))}var f=u.source;f!=null&&!a.has(f)&&a.add(f);var h=u.name;h!=null&&!o.has(h)&&o.add(h)},this),this._sources=a,this._names=o,e.sources.forEach(function(u){var l=e.sourceContentFor(u);l!=null&&(i!=null&&(u=ot.join(i,u)),s!=null&&(u=ot.relative(s,u)),this.setSourceContent(u,l))},this)};Jr.prototype._validateMapping=function(e,r,i,n){if(r&&typeof r.line!="number"&&typeof r.column!="number"){var s="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!i&&!n)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&i)return;var s="Invalid mapping: "+JSON.stringify({generated:e,source:i,original:r,name:n});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}};Jr.prototype._serializeMappings=function(){for(var e=0,r=1,i=0,n=0,s=0,a=0,o="",u,l,f,h,p=this._mappings.toArray(),m=0,v=p.length;m<v;m++){if(l=p[m],u="",l.generatedLine!==r)for(e=0;l.generatedLine!==r;)u+=";",r++;else if(m>0){if(!ot.compareByGeneratedPositionsInflated(l,p[m-1]))continue;u+=","}u+=iu.encode(l.generatedColumn-e),e=l.generatedColumn,l.source!=null&&(h=this._sources.indexOf(l.source),u+=iu.encode(h-a),a=h,u+=iu.encode(l.originalLine-1-n),n=l.originalLine-1,u+=iu.encode(l.originalColumn-i),i=l.originalColumn,l.name!=null&&(f=this._names.indexOf(l.name),u+=iu.encode(f-s),s=f)),o+=u}return o};Jr.prototype._generateSourcesContent=function(e,r){return e.map(function(i){if(!this._sourcesContents)return null;r!=null&&(i=ot.relative(r,i));var n=ot.toSetString(i);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)};Jr.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};Jr.prototype.toString=function(){return JSON.stringify(this.toJSON())};CI.SourceMapGenerator=Jr});var RI=T(bs=>{y();bs.GREATEST_LOWER_BOUND=1;bs.LEAST_UPPER_BOUND=2;function Uy(t,e,r,i,n,s){var a=Math.floor((e-t)/2)+t,o=n(r,i[a],!0);return o===0?a:o>0?e-a>1?Uy(a,e,r,i,n,s):s==bs.LEAST_UPPER_BOUND?e<i.length?e:-1:a:a-t>1?Uy(t,a,r,i,n,s):s==bs.LEAST_UPPER_BOUND?a:t<0?-1:t}bs.search=function(e,r,i,n){if(r.length===0)return-1;var s=Uy(-1,r.length,e,r,i,n||bs.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&i(r[s],r[s-1],!0)===0;)--s;return s}});var FI=T(DI=>{y();function z5(t){function e(n,s,a){var o=n[s];n[s]=n[a],n[a]=o}function r(n,s){return Math.round(n+Math.random()*(s-n))}function i(n,s,a,o){if(a<o){var u=r(a,o),l=a-1;e(n,u,o);for(var f=n[o],h=a;h<o;h++)s(n[h],f,!1)<=0&&(l+=1,e(n,l,h));e(n,l+1,h);var p=l+1;i(n,s,a,p-1),i(n,s,p+1,o)}}return i}function J5(t){let e=z5.toString();return new Function(`return ${e}`)()(t)}var MI=new WeakMap;DI.quickSort=function(t,e,r=0){let i=MI.get(e);i===void 0&&(i=J5(e),MI.set(e,i)),i(t,e,r,t.length-1)}});var VI=T(cf=>{y();var se=xa(),Gy=RI(),ka=Vy().ArraySet,K5=Dy(),nu=FI().quickSort;function $e(t,e){var r=t;return typeof t=="string"&&(r=se.parseSourceMapInput(t)),r.sections!=null?new di(r,e):new jt(r,e)}$e.fromSourceMap=function(t,e){return jt.fromSourceMap(t,e)};$e.prototype._version=3;$e.prototype.__generatedMappings=null;Object.defineProperty($e.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});$e.prototype.__originalMappings=null;Object.defineProperty($e.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});$e.prototype._charIsMappingSeparator=function(e,r){var i=e.charAt(r);return i===";"||i===","};$e.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};$e.GENERATED_ORDER=1;$e.ORIGINAL_ORDER=2;$e.GREATEST_LOWER_BOUND=1;$e.LEAST_UPPER_BOUND=2;$e.prototype.eachMapping=function(e,r,i){var n=r||null,s=i||$e.GENERATED_ORDER,a;switch(s){case $e.GENERATED_ORDER:a=this._generatedMappings;break;case $e.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var o=this.sourceRoot,u=e.bind(n),l=this._names,f=this._sources,h=this._sourceMapURL,p=0,m=a.length;p<m;p++){var v=a[p],S=v.source===null?null:f.at(v.source);S!==null&&(S=se.computeSourceURL(o,S,h)),u({source:S,generatedLine:v.generatedLine,generatedColumn:v.generatedColumn,originalLine:v.originalLine,originalColumn:v.originalColumn,name:v.name===null?null:l.at(v.name)})}};$e.prototype.allGeneratedPositionsFor=function(e){var r=se.getArg(e,"line"),i={source:se.getArg(e,"source"),originalLine:r,originalColumn:se.getArg(e,"column",0)};if(i.source=this._findSourceIndex(i.source),i.source<0)return[];var n=[],s=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",se.compareByOriginalPositions,Gy.LEAST_UPPER_BOUND);if(s>=0){var a=this._originalMappings[s];if(e.column===void 0)for(var o=a.originalLine;a&&a.originalLine===o;)n.push({line:se.getArg(a,"generatedLine",null),column:se.getArg(a,"generatedColumn",null),lastColumn:se.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s];else for(var u=a.originalColumn;a&&a.originalLine===r&&a.originalColumn==u;)n.push({line:se.getArg(a,"generatedLine",null),column:se.getArg(a,"generatedColumn",null),lastColumn:se.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s]}return n};cf.SourceMapConsumer=$e;function jt(t,e){var r=t;typeof t=="string"&&(r=se.parseSourceMapInput(t));var i=se.getArg(r,"version"),n=se.getArg(r,"sources"),s=se.getArg(r,"names",[]),a=se.getArg(r,"sourceRoot",null),o=se.getArg(r,"sourcesContent",null),u=se.getArg(r,"mappings"),l=se.getArg(r,"file",null);if(i!=this._version)throw new Error("Unsupported version: "+i);a&&(a=se.normalize(a)),n=n.map(String).map(se.normalize).map(function(f){return a&&se.isAbsolute(a)&&se.isAbsolute(f)?se.relative(a,f):f}),this._names=ka.fromArray(s.map(String),!0),this._sources=ka.fromArray(n,!0),this._absoluteSources=this._sources.toArray().map(function(f){return se.computeSourceURL(a,f,e)}),this.sourceRoot=a,this.sourcesContent=o,this._mappings=u,this._sourceMapURL=e,this.file=l}jt.prototype=Object.create($e.prototype);jt.prototype.consumer=$e;jt.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=se.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};jt.fromSourceMap=function(e,r){var i=Object.create(jt.prototype),n=i._names=ka.fromArray(e._names.toArray(),!0),s=i._sources=ka.fromArray(e._sources.toArray(),!0);i.sourceRoot=e._sourceRoot,i.sourcesContent=e._generateSourcesContent(i._sources.toArray(),i.sourceRoot),i.file=e._file,i._sourceMapURL=r,i._absoluteSources=i._sources.toArray().map(function(m){return se.computeSourceURL(i.sourceRoot,m,r)});for(var a=e._mappings.toArray().slice(),o=i.__generatedMappings=[],u=i.__originalMappings=[],l=0,f=a.length;l<f;l++){var h=a[l],p=new BI;p.generatedLine=h.generatedLine,p.generatedColumn=h.generatedColumn,h.source&&(p.source=s.indexOf(h.source),p.originalLine=h.originalLine,p.originalColumn=h.originalColumn,h.name&&(p.name=n.indexOf(h.name)),u.push(p)),o.push(p)}return nu(i.__originalMappings,se.compareByOriginalPositions),i};jt.prototype._version=3;Object.defineProperty(jt.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function BI(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var Hy=se.compareByGeneratedPositionsDeflatedNoLine;function jI(t,e){let r=t.length,i=t.length-e;if(!(i<=1))if(i==2){let n=t[e],s=t[e+1];Hy(n,s)>0&&(t[e]=s,t[e+1]=n)}else if(i<20)for(let n=e;n<r;n++)for(let s=n;s>e;s--){let a=t[s-1],o=t[s];if(Hy(a,o)<=0)break;t[s-1]=o,t[s]=a}else nu(t,Hy,e)}jt.prototype._parseMappings=function(e,r){var i=1,n=0,s=0,a=0,o=0,u=0,l=e.length,f=0,h={},p={},m=[],v=[],S,b,g,k,w;let _=0;for(;f<l;)if(e.charAt(f)===";")i++,f++,n=0,jI(v,_),_=v.length;else if(e.charAt(f)===",")f++;else{for(S=new BI,S.generatedLine=i,k=f;k<l&&!this._charIsMappingSeparator(e,k);k++);for(b=e.slice(f,k),g=[];f<k;)K5.decode(e,f,p),w=p.value,f=p.rest,g.push(w);if(g.length===2)throw new Error("Found a source, but no line and column");if(g.length===3)throw new Error("Found a source and line, but no column");if(S.generatedColumn=n+g[0],n=S.generatedColumn,g.length>1&&(S.source=o+g[1],o+=g[1],S.originalLine=s+g[2],s=S.originalLine,S.originalLine+=1,S.originalColumn=a+g[3],a=S.originalColumn,g.length>4&&(S.name=u+g[4],u+=g[4])),v.push(S),typeof S.originalLine=="number"){let E=S.source;for(;m.length<=E;)m.push(null);m[E]===null&&(m[E]=[]),m[E].push(S)}}jI(v,_),this.__generatedMappings=v;for(var A=0;A<m.length;A++)m[A]!=null&&nu(m[A],se.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...m)};jt.prototype._findMapping=function(e,r,i,n,s,a){if(e[i]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[i]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return Gy.search(e,r,s,a)};jt.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var i=this._generatedMappings[e+1];if(r.generatedLine===i.generatedLine){r.lastGeneratedColumn=i.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};jt.prototype.originalPositionFor=function(e){var r={generatedLine:se.getArg(e,"line"),generatedColumn:se.getArg(e,"column")},i=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",se.compareByGeneratedPositionsDeflated,se.getArg(e,"bias",$e.GREATEST_LOWER_BOUND));if(i>=0){var n=this._generatedMappings[i];if(n.generatedLine===r.generatedLine){var s=se.getArg(n,"source",null);s!==null&&(s=this._sources.at(s),s=se.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var a=se.getArg(n,"name",null);return a!==null&&(a=this._names.at(a)),{source:s,line:se.getArg(n,"originalLine",null),column:se.getArg(n,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};jt.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};jt.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var i=this._findSourceIndex(e);if(i>=0)return this.sourcesContent[i];var n=e;this.sourceRoot!=null&&(n=se.relative(this.sourceRoot,n));var s;if(this.sourceRoot!=null&&(s=se.urlParse(this.sourceRoot))){var a=n.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!s.path||s.path=="/")&&this._sources.has("/"+n))return this.sourcesContent[this._sources.indexOf("/"+n)]}if(r)return null;throw new Error('"'+n+'" is not in the SourceMap.')};jt.prototype.generatedPositionFor=function(e){var r=se.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var i={source:r,originalLine:se.getArg(e,"line"),originalColumn:se.getArg(e,"column")},n=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",se.compareByOriginalPositions,se.getArg(e,"bias",$e.GREATEST_LOWER_BOUND));if(n>=0){var s=this._originalMappings[n];if(s.source===i.source)return{line:se.getArg(s,"generatedLine",null),column:se.getArg(s,"generatedColumn",null),lastColumn:se.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};cf.BasicSourceMapConsumer=jt;function di(t,e){var r=t;typeof t=="string"&&(r=se.parseSourceMapInput(t));var i=se.getArg(r,"version"),n=se.getArg(r,"sections");if(i!=this._version)throw new Error("Unsupported version: "+i);this._sources=new ka,this._names=new ka;var s={line:-1,column:0};this._sections=n.map(function(a){if(a.url)throw new Error("Support for url field in sections not implemented.");var o=se.getArg(a,"offset"),u=se.getArg(o,"line"),l=se.getArg(o,"column");if(u<s.line||u===s.line&&l<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=o,{generatedOffset:{generatedLine:u+1,generatedColumn:l+1},consumer:new $e(se.getArg(a,"map"),e)}})}di.prototype=Object.create($e.prototype);di.prototype.constructor=$e;di.prototype._version=3;Object.defineProperty(di.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});di.prototype.originalPositionFor=function(e){var r={generatedLine:se.getArg(e,"line"),generatedColumn:se.getArg(e,"column")},i=Gy.search(r,this._sections,function(s,a){var o=s.generatedLine-a.generatedOffset.generatedLine;return o||s.generatedColumn-a.generatedOffset.generatedColumn}),n=this._sections[i];return n?n.consumer.originalPositionFor({line:r.generatedLine-(n.generatedOffset.generatedLine-1),column:r.generatedColumn-(n.generatedOffset.generatedLine===r.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};di.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};di.prototype.sourceContentFor=function(e,r){for(var i=0;i<this._sections.length;i++){var n=this._sections[i],s=n.consumer.sourceContentFor(e,!0);if(s||s==="")return s}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};di.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var i=this._sections[r];if(i.consumer._findSourceIndex(se.getArg(e,"source"))!==-1){var n=i.consumer.generatedPositionFor(e);if(n){var s={line:n.line+(i.generatedOffset.generatedLine-1),column:n.column+(i.generatedOffset.generatedLine===n.line?i.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};di.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var i=0;i<this._sections.length;i++)for(var n=this._sections[i],s=n.consumer._generatedMappings,a=0;a<s.length;a++){var o=s[a],u=n.consumer._sources.at(o.source);u!==null&&(u=se.computeSourceURL(n.consumer.sourceRoot,u,this._sourceMapURL)),this._sources.add(u),u=this._sources.indexOf(u);var l=null;o.name&&(l=n.consumer._names.at(o.name),this._names.add(l),l=this._names.indexOf(l));var f={source:u,generatedLine:o.generatedLine+(n.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(n.generatedOffset.generatedLine===o.generatedLine?n.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:l};this.__generatedMappings.push(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}nu(this.__generatedMappings,se.compareByGeneratedPositionsDeflated),nu(this.__originalMappings,se.compareByOriginalPositions)};cf.IndexedSourceMapConsumer=di});var UI=T($I=>{y();var Q5=$y().SourceMapGenerator,lf=xa(),Y5=/(\r?\n)/,X5=10,Ia="$$$isSourceNode$$$";function Lr(t,e,r,i,n){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=n??null,this[Ia]=!0,i!=null&&this.add(i)}Lr.fromStringWithSourceMap=function(e,r,i){var n=new Lr,s=e.split(Y5),a=0,o=function(){var p=v(),m=v()||"";return p+m;function v(){return a<s.length?s[a++]:void 0}},u=1,l=0,f=null;return r.eachMapping(function(p){if(f!==null)if(u<p.generatedLine)h(f,o()),u++,l=0;else{var m=s[a]||"",v=m.substr(0,p.generatedColumn-l);s[a]=m.substr(p.generatedColumn-l),l=p.generatedColumn,h(f,v),f=p;return}for(;u<p.generatedLine;)n.add(o()),u++;if(l<p.generatedColumn){var m=s[a]||"";n.add(m.substr(0,p.generatedColumn)),s[a]=m.substr(p.generatedColumn),l=p.generatedColumn}f=p},this),a<s.length&&(f&&h(f,o()),n.add(s.splice(a).join(""))),r.sources.forEach(function(p){var m=r.sourceContentFor(p);m!=null&&(i!=null&&(p=lf.join(i,p)),n.setSourceContent(p,m))}),n;function h(p,m){if(p===null||p.source===void 0)n.add(m);else{var v=i?lf.join(i,p.source):p.source;n.add(new Lr(p.originalLine,p.originalColumn,v,m,p.name))}}};Lr.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[Ia]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};Lr.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[Ia]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};Lr.prototype.walk=function(e){for(var r,i=0,n=this.children.length;i<n;i++)r=this.children[i],r[Ia]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};Lr.prototype.join=function(e){var r,i,n=this.children.length;if(n>0){for(r=[],i=0;i<n-1;i++)r.push(this.children[i]),r.push(e);r.push(this.children[i]),this.children=r}return this};Lr.prototype.replaceRight=function(e,r){var i=this.children[this.children.length-1];return i[Ia]?i.replaceRight(e,r):typeof i=="string"?this.children[this.children.length-1]=i.replace(e,r):this.children.push("".replace(e,r)),this};Lr.prototype.setSourceContent=function(e,r){this.sourceContents[lf.toSetString(e)]=r};Lr.prototype.walkSourceContents=function(e){for(var r=0,i=this.children.length;r<i;r++)this.children[r][Ia]&&this.children[r].walkSourceContents(e);for(var n=Object.keys(this.sourceContents),r=0,i=n.length;r<i;r++)e(lf.fromSetString(n[r]),this.sourceContents[n[r]])};Lr.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};Lr.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},i=new Q5(e),n=!1,s=null,a=null,o=null,u=null;return this.walk(function(l,f){r.code+=l,f.source!==null&&f.line!==null&&f.column!==null?((s!==f.source||a!==f.line||o!==f.column||u!==f.name)&&i.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name}),s=f.source,a=f.line,o=f.column,u=f.name,n=!0):n&&(i.addMapping({generated:{line:r.line,column:r.column}}),s=null,n=!1);for(var h=0,p=l.length;h<p;h++)l.charCodeAt(h)===X5?(r.line++,r.column=0,h+1===p?(s=null,n=!1):n&&i.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name})):r.column++}),this.walkSourceContents(function(l,f){i.setSourceContent(l,f)}),{code:r.code,map:i}};$I.SourceNode=Lr});var pf=T(ff=>{y();ff.SourceMapGenerator=$y().SourceMapGenerator;ff.SourceMapConsumer=VI().SourceMapConsumer;ff.SourceNode=UI().SourceNode});var zy=T(($se,WI)=>{"use strict";y();var{existsSync:Z5,readFileSync:e7}=ae("fs"),{dirname:Wy,join:t7}=ae("path"),{SourceMapConsumer:HI,SourceMapGenerator:GI}=pf();function r7(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}var su=class{constructor(e,r){if(r.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let i=r.map?r.map.prev:void 0,n=this.loadMap(r.from,i);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=Wy(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new HI(this.text)),this.consumerCache}decodeInline(e){let r=/^data:application\/json;charset=utf-?8;base64,/,i=/^data:application\/json;base64,/,n=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/,a=e.match(n)||e.match(s);if(a)return decodeURIComponent(e.substr(a[0].length));let o=e.match(r)||e.match(i);if(o)return r7(e.substr(o[0].length));let u=e.slice(22);throw u=u.slice(0,u.indexOf(",")),new Error("Unsupported source map encoding "+u)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let r=e.match(/\/\*\s*# sourceMappingURL=/g);if(!r)return;let i=e.lastIndexOf(r.pop()),n=e.indexOf("*/",i);i>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(i,n)))}loadFile(e){if(this.root=Wy(e),Z5(e))return this.mapFile=e,e7(e,"utf-8").toString().trim()}loadMap(e,r){if(r===!1)return!1;if(r){if(typeof r=="string")return r;if(typeof r=="function"){let i=r(e);if(i){let n=this.loadFile(i);if(!n)throw new Error("Unable to load previous source map: "+i.toString());return n}}else{if(r instanceof HI)return GI.fromSourceMap(r).toString();if(r instanceof GI)return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let i=this.annotation;return e&&(i=t7(Wy(e),i)),this.loadFile(i)}}}startWith(e,r){return e?e.substr(0,r.length)===r:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};WI.exports=su;su.default=su});var au=T((Hse,YI)=>{"use strict";y();var{nanoid:i7}=_I(),{isAbsolute:Qy,resolve:Yy}=ae("path"),{SourceMapConsumer:n7,SourceMapGenerator:s7}=pf(),{fileURLToPath:zI,pathToFileURL:hf}=ae("url"),JI=rf(),a7=zy(),Jy=Ty(),Ky=Symbol("lineToIndexCache"),o7=!!(n7&&s7),KI=!!(Yy&&Qy);function QI(t){if(t[Ky])return t[Ky];let e=t.css.split(`
|
|
1166
|
-
`),r=new Array(e.length),i=0;for(let n=0,s=e.length;n<s;n++)r[n]=i,i+=e[n].length+1;return t[Ky]=r,r}var Aa=class{get from(){return this.file||this.id}constructor(e,r={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,r.document&&(this.document=r.document.toString()),r.from&&(!KI||/^\w+:\/\//.test(r.from)||Qy(r.from)?this.file=r.from:this.file=Yy(r.from)),KI&&o7){let i=new a7(this.css,r);if(i.text){this.map=i;let n=i.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+i7(6)+">"),this.map&&(this.map.file=this.from)}error(e,r,i,n={}){let s,a,o,u,l;if(r&&typeof r=="object"){let h=r,p=i;if(typeof h.offset=="number"){u=h.offset;let m=this.fromOffset(u);r=m.line,i=m.col}else r=h.line,i=h.column,u=this.fromLineAndColumn(r,i);if(typeof p.offset=="number"){o=p.offset;let m=this.fromOffset(o);a=m.line,s=m.col}else a=p.line,s=p.column,o=this.fromLineAndColumn(p.line,p.column)}else if(i)u=this.fromLineAndColumn(r,i);else{u=r;let h=this.fromOffset(u);r=h.line,i=h.col}let f=this.origin(r,i,a,s);return f?l=new JI(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,n.plugin):l=new JI(e,a===void 0?r:{column:i,line:r},a===void 0?i:{column:s,line:a},this.css,this.file,n.plugin),l.input={column:i,endColumn:s,endLine:a,endOffset:o,line:r,offset:u,source:this.css},this.file&&(hf&&(l.input.url=hf(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(e,r){return QI(this)[e-1]+r-1}fromOffset(e){let r=QI(this),i=r[r.length-1],n=0;if(e>=i)n=r.length-1;else{let s=r.length-2,a;for(;n<s;)if(a=n+(s-n>>1),e<r[a])s=a-1;else if(e>=r[a+1])n=a+1;else{n=a;break}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Yy(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,r,i,n){if(!this.map)return!1;let s=this.map.consumer(),a=s.originalPositionFor({column:r,line:e});if(!a.source)return!1;let o;typeof i=="number"&&(o=s.originalPositionFor({column:n,line:i}));let u;Qy(a.source)?u=hf(a.source):u=new URL(a.source,this.map.consumer().sourceRoot||hf(this.map.mapFile));let l={column:a.column,endColumn:o&&o.column,endLine:o&&o.line,line:a.line,url:u.toString()};if(u.protocol==="file:")if(zI)l.file=zI(u);else throw new Error("file: protocol is not available in this PostCSS build");let f=s.sourceContentFor(a.source);return f&&(l.source=f),l}toJSON(){let e={};for(let r of["hasBOM","css","file","id"])this[r]!=null&&(e[r]=this[r]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};YI.exports=Aa;Aa.default=Aa;Jy&&Jy.registerInput&&Jy.registerInput(Aa)});var Ta=T((Wse,tA)=>{"use strict";y();var XI=Sn(),ZI,eA,wn=class extends XI{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,r,i){let n=super.normalize(e);if(r){if(i==="prepend")this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r)for(let s of n)s.raws.before=r.raws.before}return n}removeChild(e,r){let i=this.index(e);return!r&&i===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(e)}toResult(e={}){return new ZI(new eA,this,e).stringify()}};wn.registerLazyResult=t=>{ZI=t};wn.registerProcessor=t=>{eA=t};tA.exports=wn;wn.default=wn;XI.registerRoot(wn)});var Xy=T((Jse,rA)=>{"use strict";y();var ou={comma(t){return ou.split(t,[","],!0)},space(t){let e=[" ",`
|
|
1167
|
-
`," "];return ou.split(t,e)},split(t,e,r){let i=[],n="",s=!1,a=0,o=!1,u="",l=!1;for(let f of t)l?l=!1:f==="\\"?l=!0:o?f===u&&(o=!1):f==='"'||f==="'"?(o=!0,u=f):f==="("?a+=1:f===")"?a>0&&(a-=1):a===0&&e.includes(f)&&(s=!0),s?(n!==""&&i.push(n.trim()),n="",s=!1):n+=f;return(r||n!=="")&&i.push(n.trim()),i}};rA.exports=ou;ou.default=ou});var df=T((Qse,nA)=>{"use strict";y();var iA=Sn(),u7=Xy(),Ea=class extends iA{get selectors(){return u7.comma(this.selector)}set selectors(e){let r=this.selector?this.selector.match(/,\s*/):null,i=r?r[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};nA.exports=Ea;Ea.default=Ea;iA.registerRule(Ea)});var aA=T((Xse,sA)=>{"use strict";y();var c7=sf(),l7=ba(),f7=tu(),p7=au(),h7=zy(),d7=Ta(),m7=df();function uu(t,e){if(Array.isArray(t))return t.map(n=>uu(n));let{inputs:r,...i}=t;if(r){e=[];for(let n of r){let s={...n,__proto__:p7.prototype};s.map&&(s.map={...s.map,__proto__:h7.prototype}),e.push(s)}}if(i.nodes&&(i.nodes=t.nodes.map(n=>uu(n,e))),i.source){let{inputId:n,...s}=i.source;i.source=s,n!=null&&(i.source.input=e[n])}if(i.type==="root")return new d7(i);if(i.type==="decl")return new f7(i);if(i.type==="rule")return new m7(i);if(i.type==="comment")return new l7(i);if(i.type==="atrule")return new c7(i);throw new Error("Unknown node type: "+t.type)}sA.exports=uu;uu.default=uu});var e_=T((eae,pA)=>{"use strict";y();var{dirname:mf,relative:uA,resolve:cA,sep:lA}=ae("path"),{SourceMapConsumer:fA,SourceMapGenerator:gf}=pf(),{pathToFileURL:oA}=ae("url"),g7=au(),y7=!!(fA&&gf),_7=!!(mf&&cA&&uA&&lA),Zy=class{constructor(e,r,i,n){this.stringify=e,this.mapOpts=i.map||{},this.root=r,this.opts=i,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let r=`
|
|
1168
|
-
`;this.css.includes(`\r
|
|
1169
|
-
`)&&(r=`\r
|
|
1170
|
-
`),this.css+=r+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let r=this.toUrl(this.path(e.file)),i=e.root||mf(e.file),n;this.mapOpts.sourcesContent===!1?(n=new fA(e.text),n.sourcesContent&&(n.sourcesContent=null)):n=e.consumer(),this.map.applySourceMap(n,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let e;for(let r=this.root.nodes.length-1;r>=0;r--)e=this.root.nodes[r],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(r)}else if(this.css){let e;for(;(e=this.css.lastIndexOf("/*#"))!==-1;){let r=this.css.indexOf("*/",e+3);if(r===-1)break;for(;e>0&&this.css[e-1]===`
|
|
1171
|
-
`;)e--;this.css=this.css.slice(0,e)+this.css.slice(r+2)}}}}generate(){if(this.clearAnnotation(),_7&&y7&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,r=>{e+=r}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=gf.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new gf({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new gf({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,r=1,i="<no source>",n={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,a;this.stringify(this.root,(o,u,l)=>{if(this.css+=o,u&&l!=="end"&&(n.generated.line=e,n.generated.column=r-1,u.source&&u.source.start?(n.source=this.sourcePath(u),n.original.line=u.source.start.line,n.original.column=u.source.start.column-1,this.map.addMapping(n)):(n.source=i,n.original.line=1,n.original.column=0,this.map.addMapping(n))),a=o.match(/\n/g),a?(e+=a.length,s=o.lastIndexOf(`
|
|
1172
|
-
`),r=o.length-s):r+=o.length,u&&l!=="start"){let f=u.parent||{raws:{}};(!(u.type==="decl"||u.type==="atrule"&&!u.nodes)||u!==f.last||f.raws.semicolon)&&(u.source&&u.source.end?(n.source=this.sourcePath(u),n.original.line=u.source.end.line,n.original.column=u.source.end.column-1,n.generated.line=e,n.generated.column=r-2,this.map.addMapping(n)):(n.source=i,n.original.line=1,n.original.column=0,n.generated.line=e,n.generated.column=r-1,this.map.addMapping(n)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(r=>r.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let r=this.memoizedPaths.get(e);if(r)return r;let i=this.opts.to?mf(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(i=mf(cA(i,this.mapOpts.annotation)));let n=uA(i,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let r=e.source.input.map;this.previousMaps.includes(r)||this.previousMaps.push(r)}});else{let e=new g7(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(r=>{if(r.source){let i=r.source.input.from;if(i&&!e[i]){e[i]=!0;let n=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(n,r.source.input.css)}}});else if(this.css){let r=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(r,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let r=this.memoizedFileURLs.get(e);if(r)return r;if(oA){let i=oA(e).toString();return this.memoizedFileURLs.set(e,i),i}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let r=this.memoizedURLs.get(e);if(r)return r;lA==="\\"&&(e=e.replace(/\\/g,"/"));let i=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,i),i}};pA.exports=Zy});var r_=T((rae,mA)=>{"use strict";y();var v7=sf(),b7=ba(),S7=tu(),w7=Ta(),hA=df(),x7=tf(),dA={empty:!0,space:!0};function k7(t){for(let e=t.length-1;e>=0;e--){let r=t[e],i=r[3]||r[2];if(i)return i}}var t_=class{constructor(e){this.input=e,this.root=new w7,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let r=new v7;r.name=e[1].slice(1),r.name===""&&this.unnamedAtrule(r,e),this.init(r,e[2]);let i,n,s,a=!1,o=!1,u=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),i=e[0],i==="("||i==="["?l.push(i==="("?")":"]"):i==="{"&&l.length>0?l.push("}"):i===l[l.length-1]&&l.pop(),l.length===0)if(i===";"){r.source.end=this.getPosition(e[2]),r.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){o=!0;break}else if(i==="}"){if(u.length>0){for(s=u.length-1,n=u[s];n&&n[0]==="space";)n=u[--s];n&&(r.source.end=this.getPosition(n[3]||n[2]),r.source.end.offset++)}this.end(e);break}else u.push(e);else u.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(r.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(r,"params",u),a&&(e=u[u.length-1],r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++,this.spaces=r.raws.between,r.raws.between="")):(r.raws.afterName="",r.params=""),o&&(r.nodes=[],this.current=r)}checkMissedSemicolon(e){let r=this.colon(e);if(r===!1)return;let i=0,n;for(let s=r-1;s>=0&&(n=e[s],!(n[0]!=="space"&&(i+=1,i===2)));s--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let r=0,i,n,s;for(let[a,o]of e.entries()){if(n=o,s=n[0],s==="("&&(r+=1),s===")"&&(r-=1),r===0&&s===":")if(!i)this.doubleColon(n);else{if(i[0]==="word"&&i[1]==="progid")continue;return a}i=n}return!1}comment(e){let r=new b7;this.init(r,e[2]),r.source.end=this.getPosition(e[3]||e[2]),r.source.end.offset++;let i=e[1].slice(2,-2);if(!i.trim())r.text="",r.raws.left=i,r.raws.right="";else{let n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}}createTokenizer(){this.tokenizer=x7(this.input)}decl(e,r){let i=new S7;this.init(i,e[0][2]);let n=e[e.length-1];for(n[0]===";"&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(n[3]||n[2]||k7(e)),i.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let l=e[0][0];if(l===":"||l==="space"||l==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let s;for(;e.length;)if(s=e.shift(),s[0]===":"){i.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),i.raws.between+=s[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let a=[],o;for(;e.length&&(o=e[0][0],!(o!=="space"&&o!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let l=e.length-1;l>=0;l--){if(s=e[l],s[1].toLowerCase()==="!important"){i.important=!0;let f=this.stringFrom(e,l);f=this.spacesFromEnd(e)+f,f!==" !important"&&(i.raws.important=f);break}else if(s[1].toLowerCase()==="important"){let f=e.slice(0),h="";for(let p=l;p>0;p--){let m=f[p][0];if(h.trim().startsWith("!")&&m!=="space")break;h=f.pop()[1]+h}h.trim().startsWith("!")&&(i.important=!0,i.raws.important=h,e=f)}if(s[0]!=="space"&&s[0]!=="comment")break}e.some(l=>l[0]!=="space"&&l[0]!=="comment")&&(i.raws.between+=a.map(l=>l[1]).join(""),a=[]),this.raw(i,"value",a.concat(e),r),i.value.includes(":")&&!r&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let r=new hA;this.init(r,e[2]),r.selector="",r.raws.between="",this.current=r}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let r=this.current.nodes[this.current.nodes.length-1];r&&r.type==="rule"&&!r.raws.ownSemicolon&&(r.raws.ownSemicolon=this.spaces,this.spaces="",r.source.end=this.getPosition(e[2]),r.source.end.offset+=r.raws.ownSemicolon.length)}}getPosition(e){let r=this.input.fromOffset(e);return{column:r.col,line:r.line,offset:e}}init(e,r){this.current.push(e),e.source={input:this.input,start:this.getPosition(r)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let r=!1,i=null,n=!1,s=null,a=[],o=e[1].startsWith("--"),u=[],l=e;for(;l;){if(i=l[0],u.push(l),i==="("||i==="[")s||(s=l),a.push(i==="("?")":"]");else if(o&&n&&i==="{")s||(s=l),a.push("}");else if(a.length===0)if(i===";")if(n){this.decl(u,o);return}else break;else if(i==="{"){this.rule(u);return}else if(i==="}"){this.tokenizer.back(u.pop()),r=!0;break}else i===":"&&(n=!0);else i===a[a.length-1]&&(a.pop(),a.length===0&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(r=!0),a.length>0&&this.unclosedBracket(s),r&&n){if(!o)for(;u.length&&(l=u[u.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,o)}else this.unknownWord(u)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,r,i,n){let s,a,o=i.length,u="",l=!0,f,h;for(let p=0;p<o;p+=1)s=i[p],a=s[0],a==="space"&&p===o-1&&!n?l=!1:a==="comment"?(h=i[p-1]?i[p-1][0]:"empty",f=i[p+1]?i[p+1][0]:"empty",!dA[h]&&!dA[f]?u.slice(-1)===","?l=!1:u+=s[1]:l=!1):u+=s[1];if(!l){let p=i.reduce((m,v)=>m+v[1],"");e.raws[r]={raw:p,value:u}}e[r]=u}rule(e){e.pop();let r=new hA;this.init(r,e[0][2]),r.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(r,"selector",e),this.current=r}spacesAndCommentsFromEnd(e){let r,i="";for(;e.length&&(r=e[e.length-1][0],!(r!=="space"&&r!=="comment"));)i=e.pop()[1]+i;return i}spacesAndCommentsFromStart(e){let r,i="";for(;e.length&&(r=e[0][0],!(r!=="space"&&r!=="comment"));)i+=e.shift()[1];return i}spacesFromEnd(e){let r,i="";for(;e.length&&(r=e[e.length-1][0],r==="space");)i=e.pop()[1]+i;return i}stringFrom(e,r){let i="";for(let n=r;n<e.length;n++)i+=e[n][1];return e.splice(r,e.length-r),i}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,r){throw this.input.error("At-rule without name",{offset:r[2]},{offset:r[2]+r[1].length})}};mA.exports=t_});var _f=T((nae,gA)=>{"use strict";y();var I7=Sn(),A7=au(),T7=r_();function yf(t,e){let r=new A7(t,e),i=new T7(r);try{i.parse()}catch(n){throw process.env.NODE_ENV!=="production"&&n.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?n.message+=`
|
|
1173
|
-
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?n.message+=`
|
|
1174
|
-
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(n.message+=`
|
|
1175
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),n}return i.root}gA.exports=yf;yf.default=yf;I7.registerParse(yf)});var i_=T((aae,yA)=>{"use strict";y();var cu=class{constructor(e,r={}){if(this.type="warning",this.text=e,r.node&&r.node.source){let i=r.node.rangeBy(r);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in r)this[i]=r[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};yA.exports=cu;cu.default=cu});var vf=T((uae,_A)=>{"use strict";y();var E7=i_(),lu=class{get content(){return this.css}constructor(e,r,i){this.processor=e,this.messages=[],this.root=r,this.opts=i,this.css="",this.map=void 0}toString(){return this.css}warn(e,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let i=new E7(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter(e=>e.type==="warning")}};_A.exports=lu;lu.default=lu});var n_=T((lae,bA)=>{"use strict";y();var vA={};bA.exports=function(e){vA[e]||(vA[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))}});var o_=T((pae,kA)=>{"use strict";y();var O7=Sn(),N7=af(),L7=e_(),P7=_f(),SA=vf(),q7=Ta(),C7=Ko(),{isClean:Ti,my:R7}=nf(),M7=n_(),D7={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},F7={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},j7={Once:!0,postcssPlugin:!0,prepare:!0},Oa=0;function fu(t){return typeof t=="object"&&typeof t.then=="function"}function xA(t){let e=!1,r=D7[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,Oa,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,Oa,r+"Exit"]:[r,r+"Exit"]}function wA(t){let e;return t.type==="document"?e=["Document",Oa,"DocumentExit"]:t.type==="root"?e=["Root",Oa,"RootExit"]:e=xA(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function s_(t){return t[Ti]=!1,t.nodes&&t.nodes.forEach(e=>s_(e)),t}var a_={},xn=class t{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,r,i){this.stringified=!1,this.processed=!1;let n;if(typeof r=="object"&&r!==null&&(r.type==="root"||r.type==="document"))n=s_(r);else if(r instanceof t||r instanceof SA)n=s_(r.root),r.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=r.map);else{let s=P7;i.syntax&&(s=i.syntax.parse),i.parser&&(s=i.parser),s.parse&&(s=s.parse);try{n=s(r,i)}catch(a){this.processed=!0,this.error=a}n&&!n[R7]&&O7.rebuild(n)}this.result=new SA(e,n,i),this.helpers={...a_,postcss:a_,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,r){let i=this.result.lastPlugin;try{if(r&&r.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=i.postcssPlugin,e.setMessage();else if(i.postcssVersion&&process.env.NODE_ENV!=="production"){let n=i.postcssPlugin,s=i.postcssVersion,a=this.result.processor.version,o=s.split("."),u=a.split(".");(o[0]!==u[0]||parseInt(o[1])>parseInt(u[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+a+", but "+n+" uses "+s+". Perhaps this is the source of the error below.")}}catch(n){console&&console.error&&console.error(n)}return e}prepareVisitors(){this.listeners={};let e=(r,i,n)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([r,n])};for(let r of this.plugins)if(typeof r=="object")for(let i in r){if(!F7[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${r.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!j7[i])if(typeof r[i]=="object")for(let n in r[i])n==="*"?e(r,i,r[i][n]):e(r,i+"-"+n.toLowerCase(),r[i][n]);else typeof r[i]=="function"&&e(r,i,r[i])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let r=this.plugins[e],i=this.runOnRoot(r);if(fu(i))try{await i}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ti];){e[Ti]=!0;let r=[wA(e)];for(;r.length>0;){let i=this.visitTick(r);if(fu(i))try{await i}catch(n){let s=r[r.length-1].node;throw this.handleError(n,s)}}}if(this.listeners.OnceExit)for(let[r,i]of this.listeners.OnceExit){this.result.lastPlugin=r;try{if(e.type==="document"){let n=e.nodes.map(s=>i(s,this.helpers));await Promise.all(n)}else await i(e,this.helpers)}catch(n){throw this.handleError(n)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let r=this.result.root.nodes.map(i=>e.Once(i,this.helpers));return fu(r[0])?Promise.all(r):r}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(r){throw this.handleError(r)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,r=C7;e.syntax&&(r=e.syntax.stringify),e.stringifier&&(r=e.stringifier),r.stringify&&(r=r.stringify);let n=new L7(r,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let r=this.runOnRoot(e);if(fu(r))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ti];)e[Ti]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,r){return process.env.NODE_ENV!=="production"&&("from"in this.opts||M7("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,r)}toString(){return this.css}visitSync(e,r){for(let[i,n]of e){this.result.lastPlugin=i;let s;try{s=n(r,this.helpers)}catch(a){throw this.handleError(a,r.proxyOf)}if(r.type!=="root"&&r.type!=="document"&&!r.parent)return!0;if(fu(s))throw this.getAsyncError()}}visitTick(e){let r=e[e.length-1],{node:i,visitors:n}=r;if(i.type!=="root"&&i.type!=="document"&&!i.parent){e.pop();return}if(n.length>0&&r.visitorIndex<n.length){let[a,o]=n[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===n.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=a;try{return o(i.toProxy(),this.helpers)}catch(u){throw this.handleError(u,i)}}if(r.iterator!==0){let a=r.iterator,o;for(;o=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!o[Ti]){o[Ti]=!0,e.push(wA(o));return}r.iterator=0,delete i.indexes[a]}let s=r.events;for(;r.eventIndex<s.length;){let a=s[r.eventIndex];if(r.eventIndex+=1,a===Oa){i.nodes&&i.nodes.length&&(i[Ti]=!0,r.iterator=i.getIterator());return}else if(this.listeners[a]){r.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[Ti]=!0;let r=xA(e);for(let i of r)if(i===Oa)e.nodes&&e.each(n=>{n[Ti]||this.walkSync(n)});else{let n=this.listeners[i];if(n&&this.visitSync(n,e.toProxy()))return}}warnings(){return this.sync().warnings()}};xn.registerPostcss=t=>{a_=t};kA.exports=xn;xn.default=xn;q7.registerLazyResult(xn);N7.registerLazyResult(xn)});var AA=T((dae,IA)=>{"use strict";y();var B7=e_(),V7=_f(),$7=vf(),U7=Ko(),H7=n_(),pu=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,r=V7;try{e=r(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,r,i){r=r.toString(),this.stringified=!1,this._processor=e,this._css=r,this._opts=i,this._map=void 0;let n=U7;this.result=new $7(this._processor,void 0,this._opts),this.result.css=r;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let a=new B7(n,void 0,this._opts,r);if(a.isMap()){let[o,u]=a.generate();o&&(this.result.css=o),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,r){return process.env.NODE_ENV!=="production"&&("from"in this._opts||H7("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,r)}toString(){return this._css}warnings(){return[]}};IA.exports=pu;pu.default=pu});var EA=T((gae,TA)=>{"use strict";y();var G7=af(),W7=o_(),z7=AA(),J7=Ta(),Ss=class{constructor(e=[]){this.version="8.5.10",this.plugins=this.normalize(e)}normalize(e){let r=[];for(let i of e)if(i.postcss===!0?i=i():i.postcss&&(i=i.postcss),typeof i=="object"&&Array.isArray(i.plugins))r=r.concat(i.plugins);else if(typeof i=="object"&&i.postcssPlugin)r.push(i);else if(typeof i=="function")r.push(i);else if(typeof i=="object"&&(i.parse||i.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(i+" is not a PostCSS plugin");return r}process(e,r={}){return!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax?new z7(this,e,r):new W7(this,e,r)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};TA.exports=Ss;Ss.default=Ss;J7.registerProcessor(Ss);G7.registerProcessor(Ss)});var MA=T((_ae,RA)=>{"use strict";y();var OA=sf(),NA=ba(),K7=Sn(),Q7=rf(),LA=tu(),PA=af(),Y7=aA(),X7=au(),Z7=o_(),e9=Xy(),t9=Xo(),r9=_f(),u_=EA(),i9=vf(),qA=Ta(),CA=df(),n9=Ko(),s9=i_();function Pe(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new u_(t)}Pe.plugin=function(e,r){let i=!1;function n(...a){console&&console.warn&&!i&&(i=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
1176
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
1177
|
-
https://www.w3ctech.com/topic/2226`));let o=r(...a);return o.postcssPlugin=e,o.postcssVersion=new u_().version,o}let s;return Object.defineProperty(n,"postcss",{get(){return s||(s=n()),s}}),n.process=function(a,o,u){return Pe([n(u)]).process(a,o)},n};Pe.stringify=n9;Pe.parse=r9;Pe.fromJSON=Y7;Pe.list=e9;Pe.comment=t=>new NA(t);Pe.atRule=t=>new OA(t);Pe.decl=t=>new LA(t);Pe.rule=t=>new CA(t);Pe.root=t=>new qA(t);Pe.document=t=>new PA(t);Pe.CssSyntaxError=Q7;Pe.Declaration=LA;Pe.Container=K7;Pe.Processor=u_;Pe.Document=PA;Pe.Comment=NA;Pe.Warning=s9;Pe.AtRule=OA;Pe.Result=i9;Pe.Input=X7;Pe.Rule=CA;Pe.Root=qA;Pe.Node=t9;Z7.registerPostcss(Pe);RA.exports=Pe;Pe.default=Pe});var FA=T((bae,DA)=>{y();var a9=ba(),o9=r_(),u9=tf(),c_=class extends o9{checkMissedSemicolon(){}comment(e){let r=new a9;this.init(r,e[2]);let i=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:i.col,line:i.line,offset:e[3]+1};let n=e[1].slice(2);if(n.slice(-2)==="*/"&&(n=n.slice(0,-2)),/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{let s=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=u9(this.input,{ignoreErrors:!0})}decl(e){e.length>1&&e.some(r=>r[0]==="word")&&super.decl(e)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(e){let r=this.colon(e);if(r===!1)return;let i,n;for(i=r-1;i>=0&&e[i][0]!=="word";i--);if(i===0||i<0)return;for(n=i-1;n>=0;n--)if(e[n][0]!=="space"){n+=1;break}let s=e.slice(i),a=e.slice(n,i);e.splice(n,e.length-n),this.spaces=a.map(o=>o[1]).join(""),this.decl(s)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(e){this.spaces+=e.map(r=>r[1]).join("")}unnamedAtrule(e){e.name=""}};DA.exports=c_});var BA=T((wae,jA)=>{y();var{Input:c9}=MA(),l9=FA();jA.exports=function(e,r){let i=new c9(e,r),n=new l9(i);return n.parse(),n.root}});var l_=T((bf,VA)=>{"use strict";y();bf.__esModule=!0;bf.default=h9;function f9(t){for(var e=t.toLowerCase(),r="",i=!1,n=0;n<6&&e[n]!==void 0;n++){var s=e.charCodeAt(n),a=s>=97&&s<=102||s>=48&&s<=57;if(i=s===32,!a)break;r+=e[n]}if(r.length!==0){var o=parseInt(r,16),u=o>=55296&&o<=57343;return u||o===0||o>1114111?["\uFFFD",r.length+(i?1:0)]:[String.fromCodePoint(o),r.length+(i?1:0)]}}var p9=/\\/;function h9(t){var e=p9.test(t);if(!e)return t;for(var r="",i=0;i<t.length;i++){if(t[i]==="\\"){var n=f9(t.slice(i+1,i+7));if(n!==void 0){r+=n[0],i+=n[1];continue}if(t[i+1]==="\\"){r+="\\",i++;continue}t.length===i+1&&(r+=t[i]);continue}r+=t[i]}return r}VA.exports=bf.default});var UA=T((Sf,$A)=>{"use strict";y();Sf.__esModule=!0;Sf.default=d9;function d9(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];for(;r.length>0;){var n=r.shift();if(!t[n])return;t=t[n]}return t}$A.exports=Sf.default});var GA=T((wf,HA)=>{"use strict";y();wf.__esModule=!0;wf.default=m9;function m9(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];for(;r.length>0;){var n=r.shift();t[n]||(t[n]={}),t=t[n]}}HA.exports=wf.default});var zA=T((xf,WA)=>{"use strict";y();xf.__esModule=!0;xf.default=g9;function g9(t){for(var e="",r=t.indexOf("/*"),i=0;r>=0;){e=e+t.slice(i,r);var n=t.indexOf("*/",r+2);if(n<0)return e;i=n+2,r=t.indexOf("/*",i)}return e=e+t.slice(i),e}WA.exports=xf.default});var hu=T(Ei=>{"use strict";y();Ei.__esModule=!0;Ei.unesc=Ei.stripComments=Ei.getProp=Ei.ensureObject=void 0;var y9=kf(l_());Ei.unesc=y9.default;var _9=kf(UA());Ei.getProp=_9.default;var v9=kf(GA());Ei.ensureObject=v9.default;var b9=kf(zA());Ei.stripComments=b9.default;function kf(t){return t&&t.__esModule?t:{default:t}}});var en=T((du,QA)=>{"use strict";y();du.__esModule=!0;du.default=void 0;var JA=hu();function KA(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function S9(t,e,r){return e&&KA(t.prototype,e),r&&KA(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var w9=function t(e,r){if(typeof e!="object"||e===null)return e;var i=new e.constructor;for(var n in e)if(e.hasOwnProperty(n)){var s=e[n],a=typeof s;n==="parent"&&a==="object"?r&&(i[n]=r):s instanceof Array?i[n]=s.map(function(o){return t(o,i)}):i[n]=t(s,i)}return i},x9=(function(){function t(r){r===void 0&&(r={}),Object.assign(this,r),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||"",this.spaces.after=this.spaces.after||""}var e=t.prototype;return e.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},e.replaceWith=function(){if(this.parent){for(var i in arguments)this.parent.insertBefore(this,arguments[i]);this.remove()}return this},e.next=function(){return this.parent.at(this.parent.index(this)+1)},e.prev=function(){return this.parent.at(this.parent.index(this)-1)},e.clone=function(i){i===void 0&&(i={});var n=w9(this);for(var s in i)n[s]=i[s];return n},e.appendToPropertyAndEscape=function(i,n,s){this.raws||(this.raws={});var a=this[i],o=this.raws[i];this[i]=a+n,o||s!==n?this.raws[i]=(o||a)+s:delete this.raws[i]},e.setPropertyAndEscape=function(i,n,s){this.raws||(this.raws={}),this[i]=n,this.raws[i]=s},e.setPropertyWithoutEscape=function(i,n){this[i]=n,this.raws&&delete this.raws[i]},e.isAtPosition=function(i,n){if(this.source&&this.source.start&&this.source.end)return!(this.source.start.line>i||this.source.end.line<i||this.source.start.line===i&&this.source.start.column>n||this.source.end.line===i&&this.source.end.column<n)},e.stringifyProperty=function(i){return this.raws&&this.raws[i]||this[i]},e.valueToString=function(){return String(this.stringifyProperty("value"))},e.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join("")},S9(t,[{key:"rawSpaceBefore",get:function(){var i=this.raws&&this.raws.spaces&&this.raws.spaces.before;return i===void 0&&(i=this.spaces&&this.spaces.before),i||""},set:function(i){(0,JA.ensureObject)(this,"raws","spaces"),this.raws.spaces.before=i}},{key:"rawSpaceAfter",get:function(){var i=this.raws&&this.raws.spaces&&this.raws.spaces.after;return i===void 0&&(i=this.spaces.after),i||""},set:function(i){(0,JA.ensureObject)(this,"raws","spaces"),this.raws.spaces.after=i}}]),t})();du.default=x9;QA.exports=du.default});var Bt=T(De=>{"use strict";y();De.__esModule=!0;De.UNIVERSAL=De.TAG=De.STRING=De.SELECTOR=De.ROOT=De.PSEUDO=De.NESTING=De.ID=De.COMMENT=De.COMBINATOR=De.CLASS=De.ATTRIBUTE=void 0;var k9="tag";De.TAG=k9;var I9="string";De.STRING=I9;var A9="selector";De.SELECTOR=A9;var T9="root";De.ROOT=T9;var E9="pseudo";De.PSEUDO=E9;var O9="nesting";De.NESTING=O9;var N9="id";De.ID=N9;var L9="comment";De.COMMENT=L9;var P9="combinator";De.COMBINATOR=P9;var q9="class";De.CLASS=q9;var C9="attribute";De.ATTRIBUTE=C9;var R9="universal";De.UNIVERSAL=R9});var If=T((mu,eT)=>{"use strict";y();mu.__esModule=!0;mu.default=void 0;var M9=F9(en()),tn=D9(Bt());function ZA(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(ZA=function(n){return n?r:e})(t)}function D9(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=ZA(e);if(r&&r.has(t))return r.get(t);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var a=n?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function F9(t){return t&&t.__esModule?t:{default:t}}function j9(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=B9(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1178
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B9(t,e){if(t){if(typeof t=="string")return YA(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return YA(t,e)}}function YA(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function XA(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function V9(t,e,r){return e&&XA(t.prototype,e),r&&XA(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function $9(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,f_(t,e)}function f_(t,e){return f_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},f_(t,e)}var U9=(function(t){$9(e,t);function e(i){var n;return n=t.call(this,i)||this,n.nodes||(n.nodes=[]),n}var r=e.prototype;return r.append=function(n){return n.parent=this,this.nodes.push(n),this},r.prepend=function(n){n.parent=this,this.nodes.unshift(n);for(var s in this.indexes)this.indexes[s]++;return this},r.at=function(n){return this.nodes[n]},r.index=function(n){return typeof n=="number"?n:this.nodes.indexOf(n)},r.removeChild=function(n){n=this.index(n),this.at(n).parent=void 0,this.nodes.splice(n,1);var s;for(var a in this.indexes)s=this.indexes[a],s>=n&&(this.indexes[a]=s-1);return this},r.removeAll=function(){for(var n=j9(this.nodes),s;!(s=n()).done;){var a=s.value;a.parent=void 0}return this.nodes=[],this},r.empty=function(){return this.removeAll()},r.insertAfter=function(n,s){var a;s.parent=this;for(var o=this.index(n),u=[],l=2;l<arguments.length;l++)u.push(arguments[l]);(a=this.nodes).splice.apply(a,[o+1,0,s].concat(u)),s.parent=this;var f;for(var h in this.indexes)f=this.indexes[h],o<f&&(this.indexes[h]=f+arguments.length-1);return this},r.insertBefore=function(n,s){var a;s.parent=this;for(var o=this.index(n),u=[],l=2;l<arguments.length;l++)u.push(arguments[l]);(a=this.nodes).splice.apply(a,[o,0,s].concat(u)),s.parent=this;var f;for(var h in this.indexes)f=this.indexes[h],f>=o&&(this.indexes[h]=f+arguments.length-1);return this},r._findChildAtPosition=function(n,s){var a=void 0;return this.each(function(o){if(o.atPosition){var u=o.atPosition(n,s);if(u)return a=u,!1}else if(o.isAtPosition(n,s))return a=o,!1}),a},r.atPosition=function(n,s){if(this.isAtPosition(n,s))return this._findChildAtPosition(n,s)||this},r._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},Object.assign(this.source.end,this.last.source.end))},r.each=function(n){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var s=this.lastEach;if(this.indexes[s]=0,!!this.length){for(var a,o;this.indexes[s]<this.length&&(a=this.indexes[s],o=n(this.at(a),a),o!==!1);)this.indexes[s]+=1;if(delete this.indexes[s],o===!1)return!1}},r.walk=function(n){return this.each(function(s,a){var o=n(s,a);if(o!==!1&&s.length&&(o=s.walk(n)),o===!1)return!1})},r.walkAttributes=function(n){var s=this;return this.walk(function(a){if(a.type===tn.ATTRIBUTE)return n.call(s,a)})},r.walkClasses=function(n){var s=this;return this.walk(function(a){if(a.type===tn.CLASS)return n.call(s,a)})},r.walkCombinators=function(n){var s=this;return this.walk(function(a){if(a.type===tn.COMBINATOR)return n.call(s,a)})},r.walkComments=function(n){var s=this;return this.walk(function(a){if(a.type===tn.COMMENT)return n.call(s,a)})},r.walkIds=function(n){var s=this;return this.walk(function(a){if(a.type===tn.ID)return n.call(s,a)})},r.walkNesting=function(n){var s=this;return this.walk(function(a){if(a.type===tn.NESTING)return n.call(s,a)})},r.walkPseudos=function(n){var s=this;return this.walk(function(a){if(a.type===tn.PSEUDO)return n.call(s,a)})},r.walkTags=function(n){var s=this;return this.walk(function(a){if(a.type===tn.TAG)return n.call(s,a)})},r.walkUniversals=function(n){var s=this;return this.walk(function(a){if(a.type===tn.UNIVERSAL)return n.call(s,a)})},r.split=function(n){var s=this,a=[];return this.reduce(function(o,u,l){var f=n.call(s,u);return a.push(u),f?(o.push(a),a=[]):l===s.length-1&&o.push(a),o},[])},r.map=function(n){return this.nodes.map(n)},r.reduce=function(n,s){return this.nodes.reduce(n,s)},r.every=function(n){return this.nodes.every(n)},r.some=function(n){return this.nodes.some(n)},r.filter=function(n){return this.nodes.filter(n)},r.sort=function(n){return this.nodes.sort(n)},r.toString=function(){return this.map(String).join("")},V9(e,[{key:"first",get:function(){return this.at(0)}},{key:"last",get:function(){return this.at(this.length-1)}},{key:"length",get:function(){return this.nodes.length}}]),e})(M9.default);mu.default=U9;eT.exports=mu.default});var h_=T((gu,rT)=>{"use strict";y();gu.__esModule=!0;gu.default=void 0;var H9=W9(If()),G9=Bt();function W9(t){return t&&t.__esModule?t:{default:t}}function tT(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function z9(t,e,r){return e&&tT(t.prototype,e),r&&tT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function J9(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,p_(t,e)}function p_(t,e){return p_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},p_(t,e)}var K9=(function(t){J9(e,t);function e(i){var n;return n=t.call(this,i)||this,n.type=G9.ROOT,n}var r=e.prototype;return r.toString=function(){var n=this.reduce(function(s,a){return s.push(String(a)),s},[]).join(",");return this.trailingComma?n+",":n},r.error=function(n,s){return this._error?this._error(n,s):new Error(n)},z9(e,[{key:"errorGenerator",set:function(n){this._error=n}}]),e})(H9.default);gu.default=K9;rT.exports=gu.default});var m_=T((yu,iT)=>{"use strict";y();yu.__esModule=!0;yu.default=void 0;var Q9=X9(If()),Y9=Bt();function X9(t){return t&&t.__esModule?t:{default:t}}function Z9(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,d_(t,e)}function d_(t,e){return d_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},d_(t,e)}var eB=(function(t){Z9(e,t);function e(r){var i;return i=t.call(this,r)||this,i.type=Y9.SELECTOR,i}return e})(Q9.default);yu.default=eB;iT.exports=yu.default});var Af=T((Mae,nT)=>{"use strict";y();var tB={},rB=tB.hasOwnProperty,iB=function(e,r){if(!e)return r;var i={};for(var n in r)i[n]=rB.call(e,n)?e[n]:r[n];return i},nB=/[ -,\.\/:-@\[-\^`\{-~]/,sB=/[ -,\.\/:-@\[\]\^`\{-~]/,aB=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,g_=function t(e,r){r=iB(r,t.options),r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");for(var i=r.quotes=="double"?'"':"'",n=r.isIdentifier,s=e.charAt(0),a="",o=0,u=e.length;o<u;){var l=e.charAt(o++),f=l.charCodeAt(),h=void 0;if(f<32||f>126){if(f>=55296&&f<=56319&&o<u){var p=e.charCodeAt(o++);(p&64512)==56320?f=((f&1023)<<10)+(p&1023)+65536:o--}h="\\"+f.toString(16).toUpperCase()+" "}else r.escapeEverything?nB.test(l)?h="\\"+l:h="\\"+f.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(l)?h="\\"+f.toString(16).toUpperCase()+" ":l=="\\"||!n&&(l=='"'&&i==l||l=="'"&&i==l)||n&&sB.test(l)?h="\\"+l:h=l;a+=h}return n&&(/^-[-\d]/.test(a)?a="\\-"+a.slice(1):/\d/.test(s)&&(a="\\3"+s+" "+a.slice(1))),a=a.replace(aB,function(m,v,S){return v&&v.length%2?m:(v||"")+S}),!n&&r.wrap?i+a+i:a};g_.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};g_.version="3.0.0";nT.exports=g_});var __=T((_u,oT)=>{"use strict";y();_u.__esModule=!0;_u.default=void 0;var oB=aT(Af()),uB=hu(),cB=aT(en()),lB=Bt();function aT(t){return t&&t.__esModule?t:{default:t}}function sT(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function fB(t,e,r){return e&&sT(t.prototype,e),r&&sT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function pB(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,y_(t,e)}function y_(t,e){return y_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},y_(t,e)}var hB=(function(t){pB(e,t);function e(i){var n;return n=t.call(this,i)||this,n.type=lB.CLASS,n._constructed=!0,n}var r=e.prototype;return r.valueToString=function(){return"."+t.prototype.valueToString.call(this)},fB(e,[{key:"value",get:function(){return this._value},set:function(n){if(this._constructed){var s=(0,oB.default)(n,{isIdentifier:!0});s!==n?((0,uB.ensureObject)(this,"raws"),this.raws.value=s):this.raws&&delete this.raws.value}this._value=n}}]),e})(cB.default);_u.default=hB;oT.exports=_u.default});var b_=T((vu,uT)=>{"use strict";y();vu.__esModule=!0;vu.default=void 0;var dB=gB(en()),mB=Bt();function gB(t){return t&&t.__esModule?t:{default:t}}function yB(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,v_(t,e)}function v_(t,e){return v_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},v_(t,e)}var _B=(function(t){yB(e,t);function e(r){var i;return i=t.call(this,r)||this,i.type=mB.COMMENT,i}return e})(dB.default);vu.default=_B;uT.exports=vu.default});var w_=T((bu,cT)=>{"use strict";y();bu.__esModule=!0;bu.default=void 0;var vB=SB(en()),bB=Bt();function SB(t){return t&&t.__esModule?t:{default:t}}function wB(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,S_(t,e)}function S_(t,e){return S_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},S_(t,e)}var xB=(function(t){wB(e,t);function e(i){var n;return n=t.call(this,i)||this,n.type=bB.ID,n}var r=e.prototype;return r.valueToString=function(){return"#"+t.prototype.valueToString.call(this)},e})(vB.default);bu.default=xB;cT.exports=bu.default});var Tf=T((Su,pT)=>{"use strict";y();Su.__esModule=!0;Su.default=void 0;var kB=fT(Af()),IB=hu(),AB=fT(en());function fT(t){return t&&t.__esModule?t:{default:t}}function lT(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function TB(t,e,r){return e&&lT(t.prototype,e),r&&lT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function EB(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,x_(t,e)}function x_(t,e){return x_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},x_(t,e)}var OB=(function(t){EB(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.qualifiedName=function(n){return this.namespace?this.namespaceString+"|"+n:n},r.valueToString=function(){return this.qualifiedName(t.prototype.valueToString.call(this))},TB(e,[{key:"namespace",get:function(){return this._namespace},set:function(n){if(n===!0||n==="*"||n==="&"){this._namespace=n,this.raws&&delete this.raws.namespace;return}var s=(0,kB.default)(n,{isIdentifier:!0});this._namespace=n,s!==n?((0,IB.ensureObject)(this,"raws"),this.raws.namespace=s):this.raws&&delete this.raws.namespace}},{key:"ns",get:function(){return this._namespace},set:function(n){this.namespace=n}},{key:"namespaceString",get:function(){if(this.namespace){var n=this.stringifyProperty("namespace");return n===!0?"":n}else return""}}]),e})(AB.default);Su.default=OB;pT.exports=Su.default});var I_=T((wu,hT)=>{"use strict";y();wu.__esModule=!0;wu.default=void 0;var NB=PB(Tf()),LB=Bt();function PB(t){return t&&t.__esModule?t:{default:t}}function qB(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,k_(t,e)}function k_(t,e){return k_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},k_(t,e)}var CB=(function(t){qB(e,t);function e(r){var i;return i=t.call(this,r)||this,i.type=LB.TAG,i}return e})(NB.default);wu.default=CB;hT.exports=wu.default});var T_=T((xu,dT)=>{"use strict";y();xu.__esModule=!0;xu.default=void 0;var RB=DB(en()),MB=Bt();function DB(t){return t&&t.__esModule?t:{default:t}}function FB(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,A_(t,e)}function A_(t,e){return A_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},A_(t,e)}var jB=(function(t){FB(e,t);function e(r){var i;return i=t.call(this,r)||this,i.type=MB.STRING,i}return e})(RB.default);xu.default=jB;dT.exports=xu.default});var O_=T((ku,mT)=>{"use strict";y();ku.__esModule=!0;ku.default=void 0;var BB=$B(If()),VB=Bt();function $B(t){return t&&t.__esModule?t:{default:t}}function UB(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,E_(t,e)}function E_(t,e){return E_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},E_(t,e)}var HB=(function(t){UB(e,t);function e(i){var n;return n=t.call(this,i)||this,n.type=VB.PSEUDO,n}var r=e.prototype;return r.toString=function(){var n=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),n,this.rawSpaceAfter].join("")},e})(BB.default);ku.default=HB;mT.exports=ku.default});var R_=T(Tu=>{"use strict";y();Tu.__esModule=!0;Tu.default=void 0;Tu.unescapeValue=C_;var Iu=q_(Af()),GB=q_(l_()),WB=q_(Tf()),zB=Bt(),N_;function q_(t){return t&&t.__esModule?t:{default:t}}function gT(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function JB(t,e,r){return e&&gT(t.prototype,e),r&&gT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function KB(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,P_(t,e)}function P_(t,e){return P_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},P_(t,e)}var Au=h4(),QB=/^('|")([^]*)\1$/,YB=Au(function(){},"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),XB=Au(function(){},"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),ZB=Au(function(){},"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function C_(t){var e=!1,r=null,i=t,n=i.match(QB);return n&&(r=n[1],i=n[2]),i=(0,GB.default)(i),i!==t&&(e=!0),{deprecatedUsage:e,unescaped:i,quoteMark:r}}function e8(t){if(t.quoteMark!==void 0||t.value===void 0)return t;ZB();var e=C_(t.value),r=e.quoteMark,i=e.unescaped;return t.raws||(t.raws={}),t.raws.value===void 0&&(t.raws.value=t.value),t.value=i,t.quoteMark=r,t}var Ef=(function(t){KB(e,t);function e(i){var n;return i===void 0&&(i={}),n=t.call(this,e8(i))||this,n.type=zB.ATTRIBUTE,n.raws=n.raws||{},Object.defineProperty(n.raws,"unquoted",{get:Au(function(){return n.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:Au(function(){return n.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),n._constructed=!0,n}var r=e.prototype;return r.getQuotedValue=function(n){n===void 0&&(n={});var s=this._determineQuoteMark(n),a=L_[s],o=(0,Iu.default)(this._value,a);return o},r._determineQuoteMark=function(n){return n.smart?this.smartQuoteMark(n):this.preferredQuoteMark(n)},r.setValue=function(n,s){s===void 0&&(s={}),this._value=n,this._quoteMark=this._determineQuoteMark(s),this._syncRawValue()},r.smartQuoteMark=function(n){var s=this.value,a=s.replace(/[^']/g,"").length,o=s.replace(/[^"]/g,"").length;if(a+o===0){var u=(0,Iu.default)(s,{isIdentifier:!0});if(u===s)return e.NO_QUOTE;var l=this.preferredQuoteMark(n);if(l===e.NO_QUOTE){var f=this.quoteMark||n.quoteMark||e.DOUBLE_QUOTE,h=L_[f],p=(0,Iu.default)(s,h);if(p.length<u.length)return f}return l}else return o===a?this.preferredQuoteMark(n):o<a?e.DOUBLE_QUOTE:e.SINGLE_QUOTE},r.preferredQuoteMark=function(n){var s=n.preferCurrentQuoteMark?this.quoteMark:n.quoteMark;return s===void 0&&(s=n.preferCurrentQuoteMark?n.quoteMark:this.quoteMark),s===void 0&&(s=e.DOUBLE_QUOTE),s},r._syncRawValue=function(){var n=(0,Iu.default)(this._value,L_[this.quoteMark]);n===this._value?this.raws&&delete this.raws.value:this.raws.value=n},r._handleEscapes=function(n,s){if(this._constructed){var a=(0,Iu.default)(s,{isIdentifier:!0});a!==s?this.raws[n]=a:delete this.raws[n]}},r._spacesFor=function(n){var s={before:"",after:""},a=this.spaces[n]||{},o=this.raws.spaces&&this.raws.spaces[n]||{};return Object.assign(s,a,o)},r._stringFor=function(n,s,a){s===void 0&&(s=n),a===void 0&&(a=yT);var o=this._spacesFor(s);return a(this.stringifyProperty(n),o)},r.offsetOf=function(n){var s=1,a=this._spacesFor("attribute");if(s+=a.before.length,n==="namespace"||n==="ns")return this.namespace?s:-1;if(n==="attributeNS"||(s+=this.namespaceString.length,this.namespace&&(s+=1),n==="attribute"))return s;s+=this.stringifyProperty("attribute").length,s+=a.after.length;var o=this._spacesFor("operator");s+=o.before.length;var u=this.stringifyProperty("operator");if(n==="operator")return u?s:-1;s+=u.length,s+=o.after.length;var l=this._spacesFor("value");s+=l.before.length;var f=this.stringifyProperty("value");if(n==="value")return f?s:-1;s+=f.length,s+=l.after.length;var h=this._spacesFor("insensitive");return s+=h.before.length,n==="insensitive"&&this.insensitive?s:-1},r.toString=function(){var n=this,s=[this.rawSpaceBefore,"["];return s.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||this.value==="")&&(s.push(this._stringFor("operator")),s.push(this._stringFor("value")),s.push(this._stringFor("insensitiveFlag","insensitive",function(a,o){return a.length>0&&!n.quoted&&o.before.length===0&&!(n.spaces.value&&n.spaces.value.after)&&(o.before=" "),yT(a,o)}))),s.push("]"),s.push(this.rawSpaceAfter),s.join("")},JB(e,[{key:"quoted",get:function(){var n=this.quoteMark;return n==="'"||n==='"'},set:function(n){XB()}},{key:"quoteMark",get:function(){return this._quoteMark},set:function(n){if(!this._constructed){this._quoteMark=n;return}this._quoteMark!==n&&(this._quoteMark=n,this._syncRawValue())}},{key:"qualifiedAttribute",get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function(){return this.insensitive?"i":""}},{key:"value",get:function(){return this._value},set:function(n){if(this._constructed){var s=C_(n),a=s.deprecatedUsage,o=s.unescaped,u=s.quoteMark;if(a&&YB(),o===this._value&&u===this._quoteMark)return;this._value=o,this._quoteMark=u,this._syncRawValue()}else this._value=n}},{key:"insensitive",get:function(){return this._insensitive},set:function(n){n||(this._insensitive=!1,this.raws&&(this.raws.insensitiveFlag==="I"||this.raws.insensitiveFlag==="i")&&(this.raws.insensitiveFlag=void 0)),this._insensitive=n}},{key:"attribute",get:function(){return this._attribute},set:function(n){this._handleEscapes("attribute",n),this._attribute=n}}]),e})(WB.default);Tu.default=Ef;Ef.NO_QUOTE=null;Ef.SINGLE_QUOTE="'";Ef.DOUBLE_QUOTE='"';var L_=(N_={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}},N_[null]={isIdentifier:!0},N_);function yT(t,e){return""+e.before+t+e.after}});var D_=T((Eu,_T)=>{"use strict";y();Eu.__esModule=!0;Eu.default=void 0;var t8=i8(Tf()),r8=Bt();function i8(t){return t&&t.__esModule?t:{default:t}}function n8(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,M_(t,e)}function M_(t,e){return M_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},M_(t,e)}var s8=(function(t){n8(e,t);function e(r){var i;return i=t.call(this,r)||this,i.type=r8.UNIVERSAL,i.value="*",i}return e})(t8.default);Eu.default=s8;_T.exports=Eu.default});var j_=T((Ou,vT)=>{"use strict";y();Ou.__esModule=!0;Ou.default=void 0;var a8=u8(en()),o8=Bt();function u8(t){return t&&t.__esModule?t:{default:t}}function c8(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,F_(t,e)}function F_(t,e){return F_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},F_(t,e)}var l8=(function(t){c8(e,t);function e(r){var i;return i=t.call(this,r)||this,i.type=o8.COMBINATOR,i}return e})(a8.default);Ou.default=l8;vT.exports=Ou.default});var V_=T((Nu,bT)=>{"use strict";y();Nu.__esModule=!0;Nu.default=void 0;var f8=h8(en()),p8=Bt();function h8(t){return t&&t.__esModule?t:{default:t}}function d8(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,B_(t,e)}function B_(t,e){return B_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},B_(t,e)}var m8=(function(t){d8(e,t);function e(r){var i;return i=t.call(this,r)||this,i.type=p8.NESTING,i.value="&",i}return e})(f8.default);Nu.default=m8;bT.exports=Nu.default});var wT=T((Of,ST)=>{"use strict";y();Of.__esModule=!0;Of.default=g8;function g8(t){return t.sort(function(e,r){return e-r})}ST.exports=Of.default});var $_=T(re=>{"use strict";y();re.__esModule=!0;re.word=re.tilde=re.tab=re.str=re.space=re.slash=re.singleQuote=re.semicolon=re.plus=re.pipe=re.openSquare=re.openParenthesis=re.newline=re.greaterThan=re.feed=re.equals=re.doubleQuote=re.dollar=re.cr=re.comment=re.comma=re.combinator=re.colon=re.closeSquare=re.closeParenthesis=re.caret=re.bang=re.backslash=re.at=re.asterisk=re.ampersand=void 0;var y8=38;re.ampersand=y8;var _8=42;re.asterisk=_8;var v8=64;re.at=v8;var b8=44;re.comma=b8;var S8=58;re.colon=S8;var w8=59;re.semicolon=w8;var x8=40;re.openParenthesis=x8;var k8=41;re.closeParenthesis=k8;var I8=91;re.openSquare=I8;var A8=93;re.closeSquare=A8;var T8=36;re.dollar=T8;var E8=126;re.tilde=E8;var O8=94;re.caret=O8;var N8=43;re.plus=N8;var L8=61;re.equals=L8;var P8=124;re.pipe=P8;var q8=62;re.greaterThan=q8;var C8=32;re.space=C8;var xT=39;re.singleQuote=xT;var R8=34;re.doubleQuote=R8;var M8=47;re.slash=M8;var D8=33;re.bang=D8;var F8=92;re.backslash=F8;var j8=13;re.cr=j8;var B8=12;re.feed=B8;var V8=10;re.newline=V8;var $8=9;re.tab=$8;var U8=xT;re.str=U8;var H8=-1;re.comment=H8;var G8=-2;re.word=G8;var W8=-3;re.combinator=W8});var AT=T(Lu=>{"use strict";y();Lu.__esModule=!0;Lu.FIELDS=void 0;Lu.default=Z8;var X=z8($_()),Na,Re;function IT(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(IT=function(n){return n?r:e})(t)}function z8(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=IT(e);if(r&&r.has(t))return r.get(t);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var a=n?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}var J8=(Na={},Na[X.tab]=!0,Na[X.newline]=!0,Na[X.cr]=!0,Na[X.feed]=!0,Na),K8=(Re={},Re[X.space]=!0,Re[X.tab]=!0,Re[X.newline]=!0,Re[X.cr]=!0,Re[X.feed]=!0,Re[X.ampersand]=!0,Re[X.asterisk]=!0,Re[X.bang]=!0,Re[X.comma]=!0,Re[X.colon]=!0,Re[X.semicolon]=!0,Re[X.openParenthesis]=!0,Re[X.closeParenthesis]=!0,Re[X.openSquare]=!0,Re[X.closeSquare]=!0,Re[X.singleQuote]=!0,Re[X.doubleQuote]=!0,Re[X.plus]=!0,Re[X.pipe]=!0,Re[X.tilde]=!0,Re[X.greaterThan]=!0,Re[X.equals]=!0,Re[X.dollar]=!0,Re[X.caret]=!0,Re[X.slash]=!0,Re),U_={},kT="0123456789abcdefABCDEF";for(Nf=0;Nf<kT.length;Nf++)U_[kT.charCodeAt(Nf)]=!0;var Nf;function Q8(t,e){var r=e,i;do{if(i=t.charCodeAt(r),K8[i])return r-1;i===X.backslash?r=Y8(t,r)+1:r++}while(r<t.length);return r-1}function Y8(t,e){var r=e,i=t.charCodeAt(r+1);if(!J8[i])if(U_[i]){var n=0;do r++,n++,i=t.charCodeAt(r+1);while(U_[i]&&n<6);n<6&&i===X.space&&r++}else r++;return r}var X8={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6};Lu.FIELDS=X8;function Z8(t){var e=[],r=t.css.valueOf(),i=r,n=i.length,s=-1,a=1,o=0,u=0,l,f,h,p,m,v,S,b,g,k,w,_,A;function E(O,L){if(t.safe)r+=L,g=r.length-1;else throw t.error("Unclosed "+O,a,o-s,o)}for(;o<n;){switch(l=r.charCodeAt(o),l===X.newline&&(s=o,a+=1),l){case X.space:case X.tab:case X.newline:case X.cr:case X.feed:g=o;do g+=1,l=r.charCodeAt(g),l===X.newline&&(s=g,a+=1);while(l===X.space||l===X.newline||l===X.tab||l===X.cr||l===X.feed);A=X.space,p=a,h=g-s-1,u=g;break;case X.plus:case X.greaterThan:case X.tilde:case X.pipe:g=o;do g+=1,l=r.charCodeAt(g);while(l===X.plus||l===X.greaterThan||l===X.tilde||l===X.pipe);A=X.combinator,p=a,h=o-s,u=g;break;case X.asterisk:case X.ampersand:case X.bang:case X.comma:case X.equals:case X.dollar:case X.caret:case X.openSquare:case X.closeSquare:case X.colon:case X.semicolon:case X.openParenthesis:case X.closeParenthesis:g=o,A=l,p=a,h=o-s,u=g+1;break;case X.singleQuote:case X.doubleQuote:_=l===X.singleQuote?"'":'"',g=o;do for(m=!1,g=r.indexOf(_,g+1),g===-1&&E("quote",_),v=g;r.charCodeAt(v-1)===X.backslash;)v-=1,m=!m;while(m);A=X.str,p=a,h=o-s,u=g+1;break;default:l===X.slash&&r.charCodeAt(o+1)===X.asterisk?(g=r.indexOf("*/",o+2)+1,g===0&&E("comment","*/"),f=r.slice(o,g+1),b=f.split(`
|
|
1179
|
-
`),S=b.length-1,S>0?(k=a+S,w=g-b[S].length):(k=a,w=s),A=X.comment,a=k,p=k,h=g-w):l===X.slash?(g=o,A=l,p=a,h=o-s,u=g+1):(g=Q8(r,o),A=X.word,p=a,h=g-s),u=g+1;break}e.push([A,a,o-s,p,h,o,u]),w&&(s=w,w=null),o=u}return e}});var CT=T((Pu,qT)=>{"use strict";y();Pu.__esModule=!0;Pu.default=void 0;var eV=Kr(h_()),H_=Kr(m_()),tV=Kr(__()),TT=Kr(b_()),rV=Kr(w_()),iV=Kr(I_()),G_=Kr(T_()),nV=Kr(O_()),ET=Lf(R_()),sV=Kr(D_()),W_=Kr(j_()),aV=Kr(V_()),oV=Kr(wT()),G=Lf(AT()),ee=Lf($_()),uV=Lf(Bt()),He=hu(),ws,z_;function PT(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(PT=function(n){return n?r:e})(t)}function Lf(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=PT(e);if(r&&r.has(t))return r.get(t);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var a=n?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function Kr(t){return t&&t.__esModule?t:{default:t}}function OT(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function cV(t,e,r){return e&&OT(t.prototype,e),r&&OT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var Q_=(ws={},ws[ee.space]=!0,ws[ee.cr]=!0,ws[ee.feed]=!0,ws[ee.newline]=!0,ws[ee.tab]=!0,ws),lV=Object.assign({},Q_,(z_={},z_[ee.comment]=!0,z_));function NT(t){return{line:t[G.FIELDS.START_LINE],column:t[G.FIELDS.START_COL]}}function LT(t){return{line:t[G.FIELDS.END_LINE],column:t[G.FIELDS.END_COL]}}function xs(t,e,r,i){return{start:{line:t,column:e},end:{line:r,column:i}}}function La(t){return xs(t[G.FIELDS.START_LINE],t[G.FIELDS.START_COL],t[G.FIELDS.END_LINE],t[G.FIELDS.END_COL])}function J_(t,e){if(t)return xs(t[G.FIELDS.START_LINE],t[G.FIELDS.START_COL],e[G.FIELDS.END_LINE],e[G.FIELDS.END_COL])}function Pa(t,e){var r=t[e];if(typeof r=="string")return r.indexOf("\\")!==-1&&((0,He.ensureObject)(t,"raws"),t[e]=(0,He.unesc)(r),t.raws[e]===void 0&&(t.raws[e]=r)),t}function K_(t,e){for(var r=-1,i=[];(r=t.indexOf(e,r+1))!==-1;)i.push(r);return i}function fV(){var t=Array.prototype.concat.apply([],arguments);return t.filter(function(e,r){return r===t.indexOf(e)})}var pV=(function(){function t(r,i){i===void 0&&(i={}),this.rule=r,this.options=Object.assign({lossy:!1,safe:!1},i),this.position=0,this.css=typeof this.rule=="string"?this.rule:this.rule.selector,this.tokens=(0,G.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var n=J_(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new eV.default({source:n}),this.root.errorGenerator=this._errorGenerator();var s=new H_.default({source:{start:{line:1,column:1}},sourceIndex:0});this.root.append(s),this.current=s,this.loop()}var e=t.prototype;return e._errorGenerator=function(){var i=this;return function(n,s){return typeof i.rule=="string"?new Error(n):i.rule.error(n,s)}},e.attribute=function(){var i=[],n=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[G.FIELDS.TYPE]!==ee.closeSquare;)i.push(this.currToken),this.position++;if(this.currToken[G.FIELDS.TYPE]!==ee.closeSquare)return this.expected("closing square bracket",this.currToken[G.FIELDS.START_POS]);var s=i.length,a={source:xs(n[1],n[2],this.currToken[3],this.currToken[4]),sourceIndex:n[G.FIELDS.START_POS]};if(s===1&&!~[ee.word].indexOf(i[0][G.FIELDS.TYPE]))return this.expected("attribute",i[0][G.FIELDS.START_POS]);for(var o=0,u="",l="",f=null,h=!1;o<s;){var p=i[o],m=this.content(p),v=i[o+1];switch(p[G.FIELDS.TYPE]){case ee.space:if(h=!0,this.options.lossy)break;if(f){(0,He.ensureObject)(a,"spaces",f);var S=a.spaces[f].after||"";a.spaces[f].after=S+m;var b=(0,He.getProp)(a,"raws","spaces",f,"after")||null;b&&(a.raws.spaces[f].after=b+m)}else u=u+m,l=l+m;break;case ee.asterisk:if(v[G.FIELDS.TYPE]===ee.equals)a.operator=m,f="operator";else if((!a.namespace||f==="namespace"&&!h)&&v){u&&((0,He.ensureObject)(a,"spaces","attribute"),a.spaces.attribute.before=u,u=""),l&&((0,He.ensureObject)(a,"raws","spaces","attribute"),a.raws.spaces.attribute.before=u,l=""),a.namespace=(a.namespace||"")+m;var g=(0,He.getProp)(a,"raws","namespace")||null;g&&(a.raws.namespace+=m),f="namespace"}h=!1;break;case ee.dollar:if(f==="value"){var k=(0,He.getProp)(a,"raws","value");a.value+="$",k&&(a.raws.value=k+"$");break}case ee.caret:v[G.FIELDS.TYPE]===ee.equals&&(a.operator=m,f="operator"),h=!1;break;case ee.combinator:if(m==="~"&&v[G.FIELDS.TYPE]===ee.equals&&(a.operator=m,f="operator"),m!=="|"){h=!1;break}v[G.FIELDS.TYPE]===ee.equals?(a.operator=m,f="operator"):!a.namespace&&!a.attribute&&(a.namespace=!0),h=!1;break;case ee.word:if(v&&this.content(v)==="|"&&i[o+2]&&i[o+2][G.FIELDS.TYPE]!==ee.equals&&!a.operator&&!a.namespace)a.namespace=m,f="namespace";else if(!a.attribute||f==="attribute"&&!h){u&&((0,He.ensureObject)(a,"spaces","attribute"),a.spaces.attribute.before=u,u=""),l&&((0,He.ensureObject)(a,"raws","spaces","attribute"),a.raws.spaces.attribute.before=l,l=""),a.attribute=(a.attribute||"")+m;var w=(0,He.getProp)(a,"raws","attribute")||null;w&&(a.raws.attribute+=m),f="attribute"}else if(!a.value&&a.value!==""||f==="value"&&!(h||a.quoteMark)){var _=(0,He.unesc)(m),A=(0,He.getProp)(a,"raws","value")||"",E=a.value||"";a.value=E+_,a.quoteMark=null,(_!==m||A)&&((0,He.ensureObject)(a,"raws"),a.raws.value=(A||E)+m),f="value"}else{var O=m==="i"||m==="I";(a.value||a.value==="")&&(a.quoteMark||h)?(a.insensitive=O,(!O||m==="I")&&((0,He.ensureObject)(a,"raws"),a.raws.insensitiveFlag=m),f="insensitive",u&&((0,He.ensureObject)(a,"spaces","insensitive"),a.spaces.insensitive.before=u,u=""),l&&((0,He.ensureObject)(a,"raws","spaces","insensitive"),a.raws.spaces.insensitive.before=l,l="")):(a.value||a.value==="")&&(f="value",a.value+=m,a.raws.value&&(a.raws.value+=m))}h=!1;break;case ee.str:if(!a.attribute||!a.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:p[G.FIELDS.START_POS]});var L=(0,ET.unescapeValue)(m),B=L.unescaped,R=L.quoteMark;a.value=B,a.quoteMark=R,f="value",(0,He.ensureObject)(a,"raws"),a.raws.value=m,h=!1;break;case ee.equals:if(!a.attribute)return this.expected("attribute",p[G.FIELDS.START_POS],m);if(a.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:p[G.FIELDS.START_POS]});a.operator=a.operator?a.operator+m:m,f="operator",h=!1;break;case ee.comment:if(f)if(h||v&&v[G.FIELDS.TYPE]===ee.space||f==="insensitive"){var q=(0,He.getProp)(a,"spaces",f,"after")||"",P=(0,He.getProp)(a,"raws","spaces",f,"after")||q;(0,He.ensureObject)(a,"raws","spaces",f),a.raws.spaces[f].after=P+m}else{var $=a[f]||"",V=(0,He.getProp)(a,"raws",f)||$;(0,He.ensureObject)(a,"raws"),a.raws[f]=V+m}else l=l+m;break;default:return this.error('Unexpected "'+m+'" found.',{index:p[G.FIELDS.START_POS]})}o++}Pa(a,"attribute"),Pa(a,"namespace"),this.newNode(new ET.default(a)),this.position++},e.parseWhitespaceEquivalentTokens=function(i){i<0&&(i=this.tokens.length);var n=this.position,s=[],a="",o=void 0;do if(Q_[this.currToken[G.FIELDS.TYPE]])this.options.lossy||(a+=this.content());else if(this.currToken[G.FIELDS.TYPE]===ee.comment){var u={};a&&(u.before=a,a=""),o=new TT.default({value:this.content(),source:La(this.currToken),sourceIndex:this.currToken[G.FIELDS.START_POS],spaces:u}),s.push(o)}while(++this.position<i);if(a){if(o)o.spaces.after=a;else if(!this.options.lossy){var l=this.tokens[n],f=this.tokens[this.position-1];s.push(new G_.default({value:"",source:xs(l[G.FIELDS.START_LINE],l[G.FIELDS.START_COL],f[G.FIELDS.END_LINE],f[G.FIELDS.END_COL]),sourceIndex:l[G.FIELDS.START_POS],spaces:{before:a,after:""}}))}}return s},e.convertWhitespaceNodesToSpace=function(i,n){var s=this;n===void 0&&(n=!1);var a="",o="";i.forEach(function(l){var f=s.lossySpace(l.spaces.before,n),h=s.lossySpace(l.rawSpaceBefore,n);a+=f+s.lossySpace(l.spaces.after,n&&f.length===0),o+=f+l.value+s.lossySpace(l.rawSpaceAfter,n&&h.length===0)}),o===a&&(o=void 0);var u={space:a,rawSpace:o};return u},e.isNamedCombinator=function(i){return i===void 0&&(i=this.position),this.tokens[i+0]&&this.tokens[i+0][G.FIELDS.TYPE]===ee.slash&&this.tokens[i+1]&&this.tokens[i+1][G.FIELDS.TYPE]===ee.word&&this.tokens[i+2]&&this.tokens[i+2][G.FIELDS.TYPE]===ee.slash},e.namedCombinator=function(){if(this.isNamedCombinator()){var i=this.content(this.tokens[this.position+1]),n=(0,He.unesc)(i).toLowerCase(),s={};n!==i&&(s.value="/"+i+"/");var a=new W_.default({value:"/"+n+"/",source:xs(this.currToken[G.FIELDS.START_LINE],this.currToken[G.FIELDS.START_COL],this.tokens[this.position+2][G.FIELDS.END_LINE],this.tokens[this.position+2][G.FIELDS.END_COL]),sourceIndex:this.currToken[G.FIELDS.START_POS],raws:s});return this.position=this.position+3,a}else this.unexpected()},e.combinator=function(){var i=this;if(this.content()==="|")return this.namespace();var n=this.locateNextMeaningfulToken(this.position);if(n<0||this.tokens[n][G.FIELDS.TYPE]===ee.comma||this.tokens[n][G.FIELDS.TYPE]===ee.closeParenthesis){var s=this.parseWhitespaceEquivalentTokens(n);if(s.length>0){var a=this.current.last;if(a){var o=this.convertWhitespaceNodesToSpace(s),u=o.space,l=o.rawSpace;l!==void 0&&(a.rawSpaceAfter+=l),a.spaces.after+=u}else s.forEach(function(A){return i.newNode(A)})}return}var f=this.currToken,h=void 0;n>this.position&&(h=this.parseWhitespaceEquivalentTokens(n));var p;if(this.isNamedCombinator()?p=this.namedCombinator():this.currToken[G.FIELDS.TYPE]===ee.combinator?(p=new W_.default({value:this.content(),source:La(this.currToken),sourceIndex:this.currToken[G.FIELDS.START_POS]}),this.position++):Q_[this.currToken[G.FIELDS.TYPE]]||h||this.unexpected(),p){if(h){var m=this.convertWhitespaceNodesToSpace(h),v=m.space,S=m.rawSpace;p.spaces.before=v,p.rawSpaceBefore=S}}else{var b=this.convertWhitespaceNodesToSpace(h,!0),g=b.space,k=b.rawSpace;k||(k=g);var w={},_={spaces:{}};g.endsWith(" ")&&k.endsWith(" ")?(w.before=g.slice(0,g.length-1),_.spaces.before=k.slice(0,k.length-1)):g[0]===" "&&k[0]===" "?(w.after=g.slice(1),_.spaces.after=k.slice(1)):_.value=k,p=new W_.default({value:" ",source:J_(f,this.tokens[this.position-1]),sourceIndex:f[G.FIELDS.START_POS],spaces:w,raws:_})}return this.currToken&&this.currToken[G.FIELDS.TYPE]===ee.space&&(p.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(p)},e.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}this.current._inferEndPosition();var i=new H_.default({source:{start:NT(this.tokens[this.position+1])},sourceIndex:this.tokens[this.position+1][G.FIELDS.START_POS]});this.current.parent.append(i),this.current=i,this.position++},e.comment=function(){var i=this.currToken;this.newNode(new TT.default({value:this.content(),source:La(i),sourceIndex:i[G.FIELDS.START_POS]})),this.position++},e.error=function(i,n){throw this.root.error(i,n)},e.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[G.FIELDS.START_POS]})},e.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[G.FIELDS.START_POS])},e.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[G.FIELDS.START_POS])},e.unexpected=function(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[G.FIELDS.START_POS])},e.unexpectedPipe=function(){return this.error("Unexpected '|'.",this.currToken[G.FIELDS.START_POS])},e.namespace=function(){var i=this.prevToken&&this.content(this.prevToken)||!0;if(this.nextToken[G.FIELDS.TYPE]===ee.word)return this.position++,this.word(i);if(this.nextToken[G.FIELDS.TYPE]===ee.asterisk)return this.position++,this.universal(i);this.unexpectedPipe()},e.nesting=function(){if(this.nextToken){var i=this.content(this.nextToken);if(i==="|"){this.position++;return}}var n=this.currToken;this.newNode(new aV.default({value:this.content(),source:La(n),sourceIndex:n[G.FIELDS.START_POS]})),this.position++},e.parentheses=function(){var i=this.current.last,n=1;if(this.position++,i&&i.type===uV.PSEUDO){var s=new H_.default({source:{start:NT(this.tokens[this.position])},sourceIndex:this.tokens[this.position][G.FIELDS.START_POS]}),a=this.current;for(i.append(s),this.current=s;this.position<this.tokens.length&&n;)this.currToken[G.FIELDS.TYPE]===ee.openParenthesis&&n++,this.currToken[G.FIELDS.TYPE]===ee.closeParenthesis&&n--,n?this.parse():(this.current.source.end=LT(this.currToken),this.current.parent.source.end=LT(this.currToken),this.position++);this.current=a}else{for(var o=this.currToken,u="(",l;this.position<this.tokens.length&&n;)this.currToken[G.FIELDS.TYPE]===ee.openParenthesis&&n++,this.currToken[G.FIELDS.TYPE]===ee.closeParenthesis&&n--,l=this.currToken,u+=this.parseParenthesisToken(this.currToken),this.position++;i?i.appendToPropertyAndEscape("value",u,u):this.newNode(new G_.default({value:u,source:xs(o[G.FIELDS.START_LINE],o[G.FIELDS.START_COL],l[G.FIELDS.END_LINE],l[G.FIELDS.END_COL]),sourceIndex:o[G.FIELDS.START_POS]}))}if(n)return this.expected("closing parenthesis",this.currToken[G.FIELDS.START_POS])},e.pseudo=function(){for(var i=this,n="",s=this.currToken;this.currToken&&this.currToken[G.FIELDS.TYPE]===ee.colon;)n+=this.content(),this.position++;if(!this.currToken)return this.expected(["pseudo-class","pseudo-element"],this.position-1);if(this.currToken[G.FIELDS.TYPE]===ee.word)this.splitWord(!1,function(a,o){n+=a,i.newNode(new nV.default({value:n,source:J_(s,i.currToken),sourceIndex:s[G.FIELDS.START_POS]})),o>1&&i.nextToken&&i.nextToken[G.FIELDS.TYPE]===ee.openParenthesis&&i.error("Misplaced parenthesis.",{index:i.nextToken[G.FIELDS.START_POS]})});else return this.expected(["pseudo-class","pseudo-element"],this.currToken[G.FIELDS.START_POS])},e.space=function(){var i=this.content();this.position===0||this.prevToken[G.FIELDS.TYPE]===ee.comma||this.prevToken[G.FIELDS.TYPE]===ee.openParenthesis||this.current.nodes.every(function(n){return n.type==="comment"})?(this.spaces=this.optionalSpace(i),this.position++):this.position===this.tokens.length-1||this.nextToken[G.FIELDS.TYPE]===ee.comma||this.nextToken[G.FIELDS.TYPE]===ee.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(i),this.position++):this.combinator()},e.string=function(){var i=this.currToken;this.newNode(new G_.default({value:this.content(),source:La(i),sourceIndex:i[G.FIELDS.START_POS]})),this.position++},e.universal=function(i){var n=this.nextToken;if(n&&this.content(n)==="|")return this.position++,this.namespace();var s=this.currToken;this.newNode(new sV.default({value:this.content(),source:La(s),sourceIndex:s[G.FIELDS.START_POS]}),i),this.position++},e.splitWord=function(i,n){for(var s=this,a=this.nextToken,o=this.content();a&&~[ee.dollar,ee.caret,ee.equals,ee.word].indexOf(a[G.FIELDS.TYPE]);){this.position++;var u=this.content();if(o+=u,u.lastIndexOf("\\")===u.length-1){var l=this.nextToken;l&&l[G.FIELDS.TYPE]===ee.space&&(o+=this.requiredSpace(this.content(l)),this.position++)}a=this.nextToken}var f=K_(o,".").filter(function(v){var S=o[v-1]==="\\",b=/^\d+\.\d+%$/.test(o);return!S&&!b}),h=K_(o,"#").filter(function(v){return o[v-1]!=="\\"}),p=K_(o,"#{");p.length&&(h=h.filter(function(v){return!~p.indexOf(v)}));var m=(0,oV.default)(fV([0].concat(f,h)));m.forEach(function(v,S){var b=m[S+1]||o.length,g=o.slice(v,b);if(S===0&&n)return n.call(s,g,m.length);var k,w=s.currToken,_=w[G.FIELDS.START_POS]+m[S],A=xs(w[1],w[2]+v,w[3],w[2]+(b-1));if(~f.indexOf(v)){var E={value:g.slice(1),source:A,sourceIndex:_};k=new tV.default(Pa(E,"value"))}else if(~h.indexOf(v)){var O={value:g.slice(1),source:A,sourceIndex:_};k=new rV.default(Pa(O,"value"))}else{var L={value:g,source:A,sourceIndex:_};Pa(L,"value"),k=new iV.default(L)}s.newNode(k,i),i=null}),this.position++},e.word=function(i){var n=this.nextToken;return n&&this.content(n)==="|"?(this.position++,this.namespace()):this.splitWord(i)},e.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},e.parse=function(i){switch(this.currToken[G.FIELDS.TYPE]){case ee.space:this.space();break;case ee.comment:this.comment();break;case ee.openParenthesis:this.parentheses();break;case ee.closeParenthesis:i&&this.missingParenthesis();break;case ee.openSquare:this.attribute();break;case ee.dollar:case ee.caret:case ee.equals:case ee.word:this.word();break;case ee.colon:this.pseudo();break;case ee.comma:this.comma();break;case ee.asterisk:this.universal();break;case ee.ampersand:this.nesting();break;case ee.slash:case ee.combinator:this.combinator();break;case ee.str:this.string();break;case ee.closeSquare:this.missingSquareBracket();case ee.semicolon:this.missingBackslash();default:this.unexpected()}},e.expected=function(i,n,s){if(Array.isArray(i)){var a=i.pop();i=i.join(", ")+" or "+a}var o=/^[aeiou]/.test(i[0])?"an":"a";return s?this.error("Expected "+o+" "+i+', found "'+s+'" instead.',{index:n}):this.error("Expected "+o+" "+i+".",{index:n})},e.requiredSpace=function(i){return this.options.lossy?" ":i},e.optionalSpace=function(i){return this.options.lossy?"":i},e.lossySpace=function(i,n){return this.options.lossy?n?" ":"":i},e.parseParenthesisToken=function(i){var n=this.content(i);return i[G.FIELDS.TYPE]===ee.space?this.requiredSpace(n):n},e.newNode=function(i,n){return n&&(/^ +$/.test(n)&&(this.options.lossy||(this.spaces=(this.spaces||"")+n),n=!0),i.namespace=n,Pa(i,"namespace")),this.spaces&&(i.spaces.before=this.spaces,this.spaces=""),this.current.append(i)},e.content=function(i){return i===void 0&&(i=this.currToken),this.css.slice(i[G.FIELDS.START_POS],i[G.FIELDS.END_POS])},e.locateNextMeaningfulToken=function(i){i===void 0&&(i=this.position+1);for(var n=i;n<this.tokens.length;)if(lV[this.tokens[n][G.FIELDS.TYPE]]){n++;continue}else return n;return-1},cV(t,[{key:"currToken",get:function(){return this.tokens[this.position]}},{key:"nextToken",get:function(){return this.tokens[this.position+1]}},{key:"prevToken",get:function(){return this.tokens[this.position-1]}}]),t})();Pu.default=pV;qT.exports=Pu.default});var MT=T((qu,RT)=>{"use strict";y();qu.__esModule=!0;qu.default=void 0;var hV=dV(CT());function dV(t){return t&&t.__esModule?t:{default:t}}var mV=(function(){function t(r,i){this.func=r||function(){},this.funcRes=null,this.options=i}var e=t.prototype;return e._shouldUpdateSelector=function(i,n){n===void 0&&(n={});var s=Object.assign({},this.options,n);return s.updateSelector===!1?!1:typeof i!="string"},e._isLossy=function(i){i===void 0&&(i={});var n=Object.assign({},this.options,i);return n.lossless===!1},e._root=function(i,n){n===void 0&&(n={});var s=new hV.default(i,this._parseOptions(n));return s.root},e._parseOptions=function(i){return{lossy:this._isLossy(i)}},e._run=function(i,n){var s=this;return n===void 0&&(n={}),new Promise(function(a,o){try{var u=s._root(i,n);Promise.resolve(s.func(u)).then(function(l){var f=void 0;return s._shouldUpdateSelector(i,n)&&(f=u.toString(),i.selector=f),{transform:l,root:u,string:f}}).then(a,o)}catch(l){o(l);return}})},e._runSync=function(i,n){n===void 0&&(n={});var s=this._root(i,n),a=this.func(s);if(a&&typeof a.then=="function")throw new Error("Selector processor returned a promise to a synchronous call.");var o=void 0;return n.updateSelector&&typeof i!="string"&&(o=s.toString(),i.selector=o),{transform:a,root:s,string:o}},e.ast=function(i,n){return this._run(i,n).then(function(s){return s.root})},e.astSync=function(i,n){return this._runSync(i,n).root},e.transform=function(i,n){return this._run(i,n).then(function(s){return s.transform})},e.transformSync=function(i,n){return this._runSync(i,n).transform},e.process=function(i,n){return this._run(i,n).then(function(s){return s.string||s.root.toString()})},e.processSync=function(i,n){var s=this._runSync(i,n);return s.string||s.root.toString()},t})();qu.default=mV;RT.exports=qu.default});var DT=T(Fe=>{"use strict";y();Fe.__esModule=!0;Fe.universal=Fe.tag=Fe.string=Fe.selector=Fe.root=Fe.pseudo=Fe.nesting=Fe.id=Fe.comment=Fe.combinator=Fe.className=Fe.attribute=void 0;var gV=Qr(R_()),yV=Qr(__()),_V=Qr(j_()),vV=Qr(b_()),bV=Qr(w_()),SV=Qr(V_()),wV=Qr(O_()),xV=Qr(h_()),kV=Qr(m_()),IV=Qr(T_()),AV=Qr(I_()),TV=Qr(D_());function Qr(t){return t&&t.__esModule?t:{default:t}}var EV=function(e){return new gV.default(e)};Fe.attribute=EV;var OV=function(e){return new yV.default(e)};Fe.className=OV;var NV=function(e){return new _V.default(e)};Fe.combinator=NV;var LV=function(e){return new vV.default(e)};Fe.comment=LV;var PV=function(e){return new bV.default(e)};Fe.id=PV;var qV=function(e){return new SV.default(e)};Fe.nesting=qV;var CV=function(e){return new wV.default(e)};Fe.pseudo=CV;var RV=function(e){return new xV.default(e)};Fe.root=RV;var MV=function(e){return new kV.default(e)};Fe.selector=MV;var DV=function(e){return new IV.default(e)};Fe.string=DV;var FV=function(e){return new AV.default(e)};Fe.tag=FV;var jV=function(e){return new TV.default(e)};Fe.universal=jV});var VT=T(Ee=>{"use strict";y();Ee.__esModule=!0;Ee.isComment=Ee.isCombinator=Ee.isClassName=Ee.isAttribute=void 0;Ee.isContainer=YV;Ee.isIdentifier=void 0;Ee.isNamespace=XV;Ee.isNesting=void 0;Ee.isNode=Y_;Ee.isPseudo=void 0;Ee.isPseudoClass=QV;Ee.isPseudoElement=BT;Ee.isUniversal=Ee.isTag=Ee.isString=Ee.isSelector=Ee.isRoot=void 0;var Ge=Bt(),wr,BV=(wr={},wr[Ge.ATTRIBUTE]=!0,wr[Ge.CLASS]=!0,wr[Ge.COMBINATOR]=!0,wr[Ge.COMMENT]=!0,wr[Ge.ID]=!0,wr[Ge.NESTING]=!0,wr[Ge.PSEUDO]=!0,wr[Ge.ROOT]=!0,wr[Ge.SELECTOR]=!0,wr[Ge.STRING]=!0,wr[Ge.TAG]=!0,wr[Ge.UNIVERSAL]=!0,wr);function Y_(t){return typeof t=="object"&&BV[t.type]}function Yr(t,e){return Y_(e)&&e.type===t}var FT=Yr.bind(null,Ge.ATTRIBUTE);Ee.isAttribute=FT;var VV=Yr.bind(null,Ge.CLASS);Ee.isClassName=VV;var $V=Yr.bind(null,Ge.COMBINATOR);Ee.isCombinator=$V;var UV=Yr.bind(null,Ge.COMMENT);Ee.isComment=UV;var HV=Yr.bind(null,Ge.ID);Ee.isIdentifier=HV;var GV=Yr.bind(null,Ge.NESTING);Ee.isNesting=GV;var X_=Yr.bind(null,Ge.PSEUDO);Ee.isPseudo=X_;var WV=Yr.bind(null,Ge.ROOT);Ee.isRoot=WV;var zV=Yr.bind(null,Ge.SELECTOR);Ee.isSelector=zV;var JV=Yr.bind(null,Ge.STRING);Ee.isString=JV;var jT=Yr.bind(null,Ge.TAG);Ee.isTag=jT;var KV=Yr.bind(null,Ge.UNIVERSAL);Ee.isUniversal=KV;function BT(t){return X_(t)&&t.value&&(t.value.startsWith("::")||t.value.toLowerCase()===":before"||t.value.toLowerCase()===":after"||t.value.toLowerCase()===":first-letter"||t.value.toLowerCase()===":first-line")}function QV(t){return X_(t)&&!BT(t)}function YV(t){return!!(Y_(t)&&t.walk)}function XV(t){return FT(t)||jT(t)}});var $T=T(mi=>{"use strict";y();mi.__esModule=!0;var Z_=Bt();Object.keys(Z_).forEach(function(t){t==="default"||t==="__esModule"||t in mi&&mi[t]===Z_[t]||(mi[t]=Z_[t])});var ev=DT();Object.keys(ev).forEach(function(t){t==="default"||t==="__esModule"||t in mi&&mi[t]===ev[t]||(mi[t]=ev[t])});var tv=VT();Object.keys(tv).forEach(function(t){t==="default"||t==="__esModule"||t in mi&&mi[t]===tv[t]||(mi[t]=tv[t])})});var GT=T((Cu,HT)=>{"use strict";y();Cu.__esModule=!0;Cu.default=void 0;var ZV=r$(MT()),e$=t$($T());function UT(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,r=new WeakMap;return(UT=function(n){return n?r:e})(t)}function t$(t,e){if(!e&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var r=UT(e);if(r&&r.has(t))return r.get(t);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s)){var a=n?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=t[s]}return i.default=t,r&&r.set(t,i),i}function r$(t){return t&&t.__esModule?t:{default:t}}var rv=function(e){return new ZV.default(e)};Object.assign(rv,e$);delete rv.__esModule;var i$=rv;Cu.default=i$;HT.exports=Cu.default});var je=T(xr=>{"use strict";y();Object.defineProperty(xr,"__esModule",{value:!0});xr.isNodeOfType=ks;xr.isLiquidBranch=n$;xr.isHtmlTag=s$;xr.isAttr=a$;xr.isHtmlAttribute=o$;xr.isValuedHtmlAttribute=u$;xr.valueIncludes=c$;xr.hasAttributeValueOf=l$;xr.isLiquidString=f$;xr.isLoopScopedVariable=p$;xr.isLoopLiquidTag=WT;xr.isWithinRawTagThatDoesNotParseItsContents=m$;var er=ge();function ks(t,e){return e?.type===t}function n$(t){return ks(er.NodeTypes.LiquidBranch,t)}function s$(t,e){return t.name.length===1&&t.name[0].type===er.NodeTypes.TextNode&&t.name[0].value===e&&!!t.blockEndPosition}function a$(t,e){return t.name.length===1&&ks(er.NodeTypes.TextNode,t.name[0])&&t.name[0].value===e}function o$(t){return[er.NodeTypes.AttrUnquoted,er.NodeTypes.AttrDoubleQuoted,er.NodeTypes.AttrSingleQuoted,er.NodeTypes.AttrEmpty].some(e=>ks(e,t))}function u$(t){return[er.NodeTypes.AttrUnquoted,er.NodeTypes.AttrDoubleQuoted,er.NodeTypes.AttrSingleQuoted].some(e=>ks(e,t))}function c$(t,e){let r=new RegExp(`(^|\\s)${e}(\\s|$)`,"g");return t.value.filter(i=>ks(er.NodeTypes.TextNode,i)).some(i=>r.test(i.value))}function l$(t,e){return t.value.length===1&&ks(er.NodeTypes.TextNode,t.value[0])&&t.value[0].value===e}function f$(t){return t.type===er.NodeTypes.String}function p$(t,e){return e.some(r=>r.type===er.NodeTypes.LiquidTag&&WT(r)&&typeof r.markup!="string"&&r.markup.variableName===t)}function WT(t){return er.LoopNamedTags.includes(t.name)}var h$=["raw","stylesheet","javascript","schema"];function d$(t){return t.type===er.NodeTypes.LiquidRawTag&&h$.includes(t.name)}function m$(t){return t.some(d$)}});var kn=T(qa=>{"use strict";y();Object.defineProperty(qa,"__esModule",{value:!0});qa.visit=y$;qa.forEachChildNodes=qf;qa.findCurrentNode=_$;qa.findJSONNode=S$;var Pf=ge();function g$(t){return t!==null&&typeof t=="object"&&typeof t.type=="string"}function y$(t,e){let r=[],i=[{node:t,lineage:[]}],n=(s,a)=>i.push({node:s,lineage:a});for(;i.length>0;){let{node:s,lineage:a}=i.pop(),o=e[s.type],u=o?o(s,a):void 0;Array.isArray(u)?r.push(...u):u!==void 0&&r.push(u),qf(s,a.concat(s),n)}return r}function qf(t,e,r){for(let i of Object.values(t))if(Array.isArray(i))for(let n=i.length-1;n>=0;n--)r(i[n],e);else g$(i)&&r(i,e)}function _$(t,e){let r,i=t,n=[];for(;i!==r;)r=i,qf(i,n.concat(i),(s,a)=>{(b$(s)||v$(s,e)&&zT(s)<=zT(i))&&(i=s,n=a)});return[i,n]}function v$(t,e){switch(t.type){case Pf.NodeTypes.String:case Pf.NodeTypes.VariableLookup:case Pf.NodeTypes.LogicalExpression:case Pf.NodeTypes.Comparison:return t.position.start<=e&&e<=t.position.end;default:return t.position.start<e&&e<=t.position.end}}function zT(t){return t.position.end-t.position.start}function b$(t){return"blockEndPosition"in t?t.blockEndPosition?.end===-1:"children"in t?t.children.length>0:!1}function S$(t,e){let r,i=t,n=[],s=e;for(;i!==r;)r=i,qf(i,n.concat(i),(a,o)=>{a.loc.start.offset<=s&&s<a.loc.end.offset&&(i=a,n=o)});return[i,n]}});var Cf=T(Oi=>{"use strict";y();var JT=Oi&&Oi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Oi,"__esModule",{value:!0});Oi.extractCSSClassNames=iv;Oi.extractCSSClassesFromLiquidAST=QT;Oi.extractCSSClassesFromLiquidUri=I$;Oi.extractCSSClassesFromAssetUri=A$;Oi.collectUsedClasses=Ru;Oi.collectUsedClassesFromSvg=E$;var Ca=ge(),w$=JT(BA()),x$=JT(GT()),k$=je(),KT=kn();function iv(t){let e=new Set;return(0,w$.default)(t).walkRules(i=>{try{(0,x$.default)().astSync(i.selector).walk(s=>{s.type==="class"&&e.add(s.value)})}catch{}}),e}function QT(t){let e=new Set,r=(0,KT.visit)(t,{LiquidRawTag(i){if(i.name==="stylesheet")return i.body.value}});for(let i of r)for(let n of iv(i))e.add(n);return e}async function I$(t,e){let r=new Set;try{let i=await e.readFile(t);if(!/\{%-?\s*stylesheet/.test(i))return r;let n=(0,Ca.toLiquidHtmlAST)(i);if(n instanceof Error)return r;for(let s of QT(n))r.add(s)}catch{}return r}async function A$(t,e){try{let r=await e.readFile(t);return iv(r)}catch{return new Set}}function T$(t){return t.name.length===1&&t.name[0].type===Ca.NodeTypes.TextNode&&t.name[0].value.toLowerCase()==="class"}function Ru(t,e){for(let r of t){if(!(0,k$.isValuedHtmlAttribute)(r)||!T$(r))continue;let i=r.value;for(let n=0;n<i.length;n++){let s=i[n];if(s.type!==Ca.NodeTypes.TextNode)continue;let a=s,o=a.value,u=a.position.start,l=n>0&&i[n-1].type!==Ca.NodeTypes.TextNode,f=n<i.length-1&&i[n+1].type!==Ca.NodeTypes.TextNode,h=[],p=/\S+/g,m;for(;(m=p.exec(o))!==null;)h.push({className:m[0],startIndex:u+m.index,endIndex:u+m.index+m[0].length});h.length!==0&&(l&&!/^\s/.test(o)&&h.shift(),f&&!/\s$/.test(o)&&h.pop(),e.push(...h))}}}function E$(t,e,r,i){Ru(t,i);try{let n=(0,Ca.toLiquidHtmlAST)(e);if(n instanceof Error)return;let s=[],a={HtmlElement(o){Ru(o.attributes,s)},HtmlVoidElement(o){Ru(o.attributes,s)},HtmlSelfClosingElement(o){Ru(o.attributes,s)}};(0,KT.visit)(n,a);for(let o of s)i.push({className:o.className,startIndex:o.startIndex+r,endIndex:o.endIndex+r})}catch{}}});var Du=T((Mu,nv)=>{y();(function(t,e){if(typeof Mu=="object"&&typeof nv=="object")nv.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var r=e();for(var i in r)(typeof Mu=="object"?Mu:t)[i]=r[i]}})(Mu,(()=>(()=>{"use strict";var t={975:n=>{function s(u){if(typeof u!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(u))}function a(u,l){for(var f,h="",p=0,m=-1,v=0,S=0;S<=u.length;++S){if(S<u.length)f=u.charCodeAt(S);else{if(f===47)break;f=47}if(f===47){if(!(m===S-1||v===1))if(m!==S-1&&v===2){if(h.length<2||p!==2||h.charCodeAt(h.length-1)!==46||h.charCodeAt(h.length-2)!==46){if(h.length>2){var b=h.lastIndexOf("/");if(b!==h.length-1){b===-1?(h="",p=0):p=(h=h.slice(0,b)).length-1-h.lastIndexOf("/"),m=S,v=0;continue}}else if(h.length===2||h.length===1){h="",p=0,m=S,v=0;continue}}l&&(h.length>0?h+="/..":h="..",p=2)}else h.length>0?h+="/"+u.slice(m+1,S):h=u.slice(m+1,S),p=S-m-1;m=S,v=0}else f===46&&v!==-1?++v:v=-1}return h}var o={resolve:function(){for(var u,l="",f=!1,h=arguments.length-1;h>=-1&&!f;h--){var p;h>=0?p=arguments[h]:(u===void 0&&(u=process.cwd()),p=u),s(p),p.length!==0&&(l=p+"/"+l,f=p.charCodeAt(0)===47)}return l=a(l,!f),f?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(u){if(s(u),u.length===0)return".";var l=u.charCodeAt(0)===47,f=u.charCodeAt(u.length-1)===47;return(u=a(u,!l)).length!==0||l||(u="."),u.length>0&&f&&(u+="/"),l?"/"+u:u},isAbsolute:function(u){return s(u),u.length>0&&u.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var u,l=0;l<arguments.length;++l){var f=arguments[l];s(f),f.length>0&&(u===void 0?u=f:u+="/"+f)}return u===void 0?".":o.normalize(u)},relative:function(u,l){if(s(u),s(l),u===l||(u=o.resolve(u))===(l=o.resolve(l)))return"";for(var f=1;f<u.length&&u.charCodeAt(f)===47;++f);for(var h=u.length,p=h-f,m=1;m<l.length&&l.charCodeAt(m)===47;++m);for(var v=l.length-m,S=p<v?p:v,b=-1,g=0;g<=S;++g){if(g===S){if(v>S){if(l.charCodeAt(m+g)===47)return l.slice(m+g+1);if(g===0)return l.slice(m+g)}else p>S&&(u.charCodeAt(f+g)===47?b=g:g===0&&(b=0));break}var k=u.charCodeAt(f+g);if(k!==l.charCodeAt(m+g))break;k===47&&(b=g)}var w="";for(g=f+b+1;g<=h;++g)g!==h&&u.charCodeAt(g)!==47||(w.length===0?w+="..":w+="/..");return w.length>0?w+l.slice(m+b):(m+=b,l.charCodeAt(m)===47&&++m,l.slice(m))},_makeLong:function(u){return u},dirname:function(u){if(s(u),u.length===0)return".";for(var l=u.charCodeAt(0),f=l===47,h=-1,p=!0,m=u.length-1;m>=1;--m)if((l=u.charCodeAt(m))===47){if(!p){h=m;break}}else p=!1;return h===-1?f?"/":".":f&&h===1?"//":u.slice(0,h)},basename:function(u,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');s(u);var f,h=0,p=-1,m=!0;if(l!==void 0&&l.length>0&&l.length<=u.length){if(l.length===u.length&&l===u)return"";var v=l.length-1,S=-1;for(f=u.length-1;f>=0;--f){var b=u.charCodeAt(f);if(b===47){if(!m){h=f+1;break}}else S===-1&&(m=!1,S=f+1),v>=0&&(b===l.charCodeAt(v)?--v==-1&&(p=f):(v=-1,p=S))}return h===p?p=S:p===-1&&(p=u.length),u.slice(h,p)}for(f=u.length-1;f>=0;--f)if(u.charCodeAt(f)===47){if(!m){h=f+1;break}}else p===-1&&(m=!1,p=f+1);return p===-1?"":u.slice(h,p)},extname:function(u){s(u);for(var l=-1,f=0,h=-1,p=!0,m=0,v=u.length-1;v>=0;--v){var S=u.charCodeAt(v);if(S!==47)h===-1&&(p=!1,h=v+1),S===46?l===-1?l=v:m!==1&&(m=1):l!==-1&&(m=-1);else if(!p){f=v+1;break}}return l===-1||h===-1||m===0||m===1&&l===h-1&&l===f+1?"":u.slice(l,h)},format:function(u){if(u===null||typeof u!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof u);return(function(l,f){var h=f.dir||f.root,p=f.base||(f.name||"")+(f.ext||"");return h?h===f.root?h+p:h+"/"+p:p})(0,u)},parse:function(u){s(u);var l={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return l;var f,h=u.charCodeAt(0),p=h===47;p?(l.root="/",f=1):f=0;for(var m=-1,v=0,S=-1,b=!0,g=u.length-1,k=0;g>=f;--g)if((h=u.charCodeAt(g))!==47)S===-1&&(b=!1,S=g+1),h===46?m===-1?m=g:k!==1&&(k=1):m!==-1&&(k=-1);else if(!b){v=g+1;break}return m===-1||S===-1||k===0||k===1&&m===S-1&&m===v+1?S!==-1&&(l.base=l.name=v===0&&p?u.slice(1,S):u.slice(v,S)):(v===0&&p?(l.name=u.slice(1,m),l.base=u.slice(1,S)):(l.name=u.slice(v,m),l.base=u.slice(v,S)),l.ext=u.slice(m,S)),v>0?l.dir=u.slice(0,v-1):p&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,n.exports=o},70:(n,s)=>{if(Object.defineProperty(s,"__esModule",{value:!0}),s.isWindows=void 0,typeof process=="object")s.isWindows=process.platform==="win32";else if(typeof navigator=="object"){let a=navigator.userAgent;s.isWindows=a.indexOf("Windows")>=0}},231:(n,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.uriToFsPath=s.URI=void 0;let o=a(70),u=/^\w[\w\d+.-]*$/,l=/^\//,f=/^\/\//;function h(R,q){if(!R.scheme&&q)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${R.authority}", path: "${R.path}", query: "${R.query}", fragment: "${R.fragment}"}`);if(R.scheme&&!u.test(R.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(R.path){if(R.authority){if(!l.test(R.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(f.test(R.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let p="",m="/",v=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class S{static isUri(q){return q instanceof S||!!q&&typeof q.authority=="string"&&typeof q.fragment=="string"&&typeof q.path=="string"&&typeof q.query=="string"&&typeof q.scheme=="string"&&typeof q.fsPath=="string"&&typeof q.with=="function"&&typeof q.toString=="function"}scheme;authority;path;query;fragment;constructor(q,P,$,V,C,F=!1){typeof q=="object"?(this.scheme=q.scheme||p,this.authority=q.authority||p,this.path=q.path||p,this.query=q.query||p,this.fragment=q.fragment||p):(this.scheme=(function(U,W){return U||W?U:"file"})(q,F),this.authority=P||p,this.path=(function(U,W){switch(U){case"https":case"http":case"file":W?W[0]!==m&&(W=m+W):W=m}return W})(this.scheme,$||p),this.query=V||p,this.fragment=C||p,h(this,F))}get fsPath(){return A(this,!1)}with(q){if(!q)return this;let{scheme:P,authority:$,path:V,query:C,fragment:F}=q;return P===void 0?P=this.scheme:P===null&&(P=p),$===void 0?$=this.authority:$===null&&($=p),V===void 0?V=this.path:V===null&&(V=p),C===void 0?C=this.query:C===null&&(C=p),F===void 0?F=this.fragment:F===null&&(F=p),P===this.scheme&&$===this.authority&&V===this.path&&C===this.query&&F===this.fragment?this:new g(P,$,V,C,F)}static parse(q,P=!1){let $=v.exec(q);return $?new g($[2]||p,B($[4]||p),B($[5]||p),B($[7]||p),B($[9]||p),P):new g(p,p,p,p,p)}static file(q){let P=p;if(o.isWindows&&(q=q.replace(/\\/g,m)),q[0]===m&&q[1]===m){let $=q.indexOf(m,2);$===-1?(P=q.substring(2),q=m):(P=q.substring(2,$),q=q.substring($)||m)}return new g("file",P,q,p,p)}static from(q){let P=new g(q.scheme,q.authority,q.path,q.query,q.fragment);return h(P,!0),P}toString(q=!1){return E(this,q)}toJSON(){return this}static revive(q){if(q){if(q instanceof S)return q;{let P=new g(q);return P._formatted=q.external,P._fsPath=q._sep===b?q.fsPath:null,P}}return q}}s.URI=S;let b=o.isWindows?1:void 0;class g extends S{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=A(this,!1)),this._fsPath}toString(q=!1){return q?E(this,!0):(this._formatted||(this._formatted=E(this,!1)),this._formatted)}toJSON(){let q={$mid:1};return this._fsPath&&(q.fsPath=this._fsPath,q._sep=b),this._formatted&&(q.external=this._formatted),this.path&&(q.path=this.path),this.scheme&&(q.scheme=this.scheme),this.authority&&(q.authority=this.authority),this.query&&(q.query=this.query),this.fragment&&(q.fragment=this.fragment),q}}let k={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function w(R,q,P){let $,V=-1;for(let C=0;C<R.length;C++){let F=R.charCodeAt(C);if(F>=97&&F<=122||F>=65&&F<=90||F>=48&&F<=57||F===45||F===46||F===95||F===126||q&&F===47||P&&F===91||P&&F===93||P&&F===58)V!==-1&&($+=encodeURIComponent(R.substring(V,C)),V=-1),$!==void 0&&($+=R.charAt(C));else{$===void 0&&($=R.substr(0,C));let U=k[F];U!==void 0?(V!==-1&&($+=encodeURIComponent(R.substring(V,C)),V=-1),$+=U):V===-1&&(V=C)}}return V!==-1&&($+=encodeURIComponent(R.substring(V))),$!==void 0?$:R}function _(R){let q;for(let P=0;P<R.length;P++){let $=R.charCodeAt(P);$===35||$===63?(q===void 0&&(q=R.substr(0,P)),q+=k[$]):q!==void 0&&(q+=R[P])}return q!==void 0?q:R}function A(R,q){let P;return P=R.authority&&R.path.length>1&&R.scheme==="file"?`//${R.authority}${R.path}`:R.path.charCodeAt(0)===47&&(R.path.charCodeAt(1)>=65&&R.path.charCodeAt(1)<=90||R.path.charCodeAt(1)>=97&&R.path.charCodeAt(1)<=122)&&R.path.charCodeAt(2)===58?q?R.path.substr(1):R.path[1].toLowerCase()+R.path.substr(2):R.path,o.isWindows&&(P=P.replace(/\//g,"\\")),P}function E(R,q){let P=q?_:w,$="",{scheme:V,authority:C,path:F,query:U,fragment:W}=R;if(V&&($+=V,$+=":"),(C||V==="file")&&($+=m,$+=m),C){let Q=C.indexOf("@");if(Q!==-1){let K=C.substr(0,Q);C=C.substr(Q+1),Q=K.lastIndexOf(":"),Q===-1?$+=P(K,!1,!1):($+=P(K.substr(0,Q),!1,!1),$+=":",$+=P(K.substr(Q+1),!1,!0)),$+="@"}C=C.toLowerCase(),Q=C.lastIndexOf(":"),Q===-1?$+=P(C,!1,!0):($+=P(C.substr(0,Q),!1,!0),$+=C.substr(Q))}if(F){if(F.length>=3&&F.charCodeAt(0)===47&&F.charCodeAt(2)===58){let Q=F.charCodeAt(1);Q>=65&&Q<=90&&(F=`/${String.fromCharCode(Q+32)}:${F.substr(3)}`)}else if(F.length>=2&&F.charCodeAt(1)===58){let Q=F.charCodeAt(0);Q>=65&&Q<=90&&(F=`${String.fromCharCode(Q+32)}:${F.substr(2)}`)}$+=P(F,!0,!1)}return U&&($+="?",$+=P(U,!1,!1)),W&&($+="#",$+=q?W:w(W,!1,!1)),$}function O(R){try{return decodeURIComponent(R)}catch{return R.length>3?R.substr(0,3)+O(R.substr(3)):R}}s.uriToFsPath=A;let L=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function B(R){return R.match(L)?R.replace(L,(q=>O(q))):R}},552:function(n,s,a){var o=this&&this.__createBinding||(Object.create?function(v,S,b,g){g===void 0&&(g=b);var k=Object.getOwnPropertyDescriptor(S,b);k&&!("get"in k?!S.__esModule:k.writable||k.configurable)||(k={enumerable:!0,get:function(){return S[b]}}),Object.defineProperty(v,g,k)}:function(v,S,b,g){g===void 0&&(g=b),v[g]=S[b]}),u=this&&this.__setModuleDefault||(Object.create?function(v,S){Object.defineProperty(v,"default",{enumerable:!0,value:S})}:function(v,S){v.default=S}),l=this&&this.__importStar||function(v){if(v&&v.__esModule)return v;var S={};if(v!=null)for(var b in v)b!=="default"&&Object.prototype.hasOwnProperty.call(v,b)&&o(S,v,b);return u(S,v),S};Object.defineProperty(s,"__esModule",{value:!0}),s.Utils=void 0;let f=l(a(975)),h=f.posix||f,p="/";var m;(function(v){v.joinPath=function(S,...b){return S.with({path:h.join(S.path,...b)})},v.resolvePath=function(S,...b){let g=S.path,k=!1;g[0]!==p&&(g=p+g,k=!0);let w=h.resolve(g,...b);return k&&w[0]===p&&!S.authority&&(w=w.substring(1)),S.with({path:w})},v.dirname=function(S){if(S.path.length===0||S.path===p)return S;let b=h.dirname(S.path);return b.length===1&&b.charCodeAt(0)===46&&(b=""),S.with({path:b})},v.basename=function(S){return h.basename(S.path)},v.extname=function(S){return h.extname(S.path)}})(m||(s.Utils=m={}))}},e={};function r(n){var s=e[n];if(s!==void 0)return s.exports;var a=e[n]={exports:{}};return t[n].call(a.exports,a,a.exports,r),a.exports}var i={};return(()=>{var n=i;Object.defineProperty(n,"__esModule",{value:!0}),n.Utils=n.URI=void 0;let s=r(231);Object.defineProperty(n,"URI",{enumerable:!0,get:function(){return s.URI}});let a=r(552);Object.defineProperty(n,"Utils",{enumerable:!0,get:function(){return a.Utils}})})(),i})()))});var Is=T(Pr=>{"use strict";y();Object.defineProperty(Pr,"__esModule",{value:!0});Pr.Utils=Pr.URI=void 0;Pr.relative=O$;Pr.join=N$;Pr.resolve=L$;Pr.normalize=Fu;Pr.dirname=P$;Pr.basename=q$;Pr.fsPath=C$;var In=Du();Object.defineProperty(Pr,"URI",{enumerable:!0,get:function(){return In.URI}});Object.defineProperty(Pr,"Utils",{enumerable:!0,get:function(){return In.Utils}});function O$(t,e){return Fu(t).replace(e,"").replace(/\\\\/g,"/").replace(/^\/+/,"")}function N$(t,...e){return Fu(In.Utils.joinPath(Ra(t),...e))}function L$(t,e){return Fu(In.Utils.resolvePath(Ra(t),e))}function Fu(t){return Ra(t).toString(!0).replace(/\\/g,"/")}function P$(t){return Fu(In.Utils.dirname(Ra(t)))}function q$(t,e){let r=In.Utils.basename(Ra(t));return e?r.replace(new RegExp(`${e.replace(/\./g,"\\.")}$`),""):r}function C$(t){return Ra(t).fsPath}function Ra(t){return In.URI.isUri(t)?t:In.URI.parse(t)}});var sv=T(Xr=>{"use strict";y();Object.defineProperty(Xr,"__esModule",{value:!0});Xr.location=Xr.JSONCParseErrors=void 0;Xr.toJSONNode=D$;var R$=Ce(),M$=(xi(),Zm(ca)),Rf=class extends Error{errors;constructor(e,r){super(e),this.errors=r}};Xr.JSONCParseErrors=Rf;function D$(t){let e=[],r=(0,M$.parseTree)(t,e,{allowTrailingComma:!0,disallowComments:!1});if(e.length||r===void 0)throw new Rf("Failed to parse JSONC",e);return Mf(r)}function Mf(t){switch(t.type){case"object":return F$(t);case"property":return B$(t);case"array":return j$(t);case"boolean":case"null":case"number":case"string":return $$(t);default:(0,R$.assertNever)(t.type)}}function F$(t){return{type:"Object",children:(t.children??[]).map(Mf),loc:(0,Xr.location)(t.offset,t.offset+t.length)}}function j$(t){return{type:"Array",children:t.children.map(Mf),loc:(0,Xr.location)(t.offset,t.offset+t.length)}}function B$(t){return{type:"Property",key:V$(t.children[0]),value:Mf(t.children[1]),loc:(0,Xr.location)(t.offset,t.offset+t.length)}}function V$(t){return{type:"Identifier",value:t.value,raw:JSON.stringify(t.value),loc:(0,Xr.location)(t.offset,t.offset+t.length)}}function $$(t){return{type:"Literal",value:t.value,raw:JSON.stringify(t.value),loc:(0,Xr.location)(t.offset,t.offset+t.length)}}var U$=(t,e)=>({start:YT(t),end:YT(e)});Xr.location=U$;var YT=t=>({offset:t})});var ZT=T(XT=>{"use strict";y();Object.defineProperty(XT,"__esModule",{value:!0})});var eE=T(Df=>{"use strict";y();Object.defineProperty(Df,"__esModule",{value:!0});Df.SchemaProp=void 0;var av=class t{options;constructor(e){this.options=e}static string(e){return new t({type:"string",defaultValue:e})}static number(e){return new t({type:"number",defaultValue:e})}static boolean(e){return new t({type:"boolean",defaultValue:e})}static object(e,r){return new t({type:"object",defaultValue:r,properties:e})}static array(e,r){return new t({type:"array",defaultValue:r,itemType:e})}optional(){return this.options.optional=!0,this}defaultValue(){return this.options.defaultValue}};Df.SchemaProp=av});var rE=T(tE=>{"use strict";y();Object.defineProperty(tE,"__esModule",{value:!0})});var nE=T(iE=>{"use strict";y();Object.defineProperty(iE,"__esModule",{value:!0})});var sE=T(Ff=>{"use strict";y();Object.defineProperty(Ff,"__esModule",{value:!0});Ff.Setting=void 0;var H$=nE();Object.defineProperty(Ff,"Setting",{enumerable:!0,get:function(){return H$.Setting}})});var oE=T(rn=>{"use strict";y();var G$=rn&&rn.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),W$=rn&&rn.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&G$(e,t,r)};Object.defineProperty(rn,"__esModule",{value:!0});rn.ThemeSchemaType=void 0;W$(sE(),rn);var aE;(function(t){t.AppBlock="app-block",t.Block="block",t.Section="section"})(aE||(rn.ThemeSchemaType=aE={}))});var Y=T(Oe=>{"use strict";y();var z$=Oe&&Oe.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),jf=Oe&&Oe.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&z$(e,t,r)};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.ConfigTarget=Oe.Severity=Oe.LiquidHtmlNodeTypes=Oe.SourceCodeType=Oe.Modes=Oe.isLiteralNode=Oe.isValueNode=Oe.isPropertyNode=Oe.isArrayNode=Oe.isObjectNode=void 0;var J$=ge();Object.defineProperty(Oe,"LiquidHtmlNodeTypes",{enumerable:!0,get:function(){return J$.NodeTypes}});jf(ZT(),Oe);jf(eE(),Oe);jf(rE(),Oe);jf(oE(),Oe);var K$=t=>t?.type==="Object";Oe.isObjectNode=K$;var Q$=t=>t?.type==="Array";Oe.isArrayNode=Q$;var Y$=t=>t?.type==="Property";Oe.isPropertyNode=Y$;var X$=t=>t?.type==="Value";Oe.isValueNode=X$;var Z$=t=>t?.type==="Literal";Oe.isLiteralNode=Z$;Oe.Modes=["theme","app"];var uE;(function(t){t.JSON="JSON",t.LiquidHtml="LiquidHtml"})(uE||(Oe.SourceCodeType=uE={}));var cE;(function(t){t[t.ERROR=0]="ERROR",t[t.WARNING=1]="WARNING",t[t.INFO=2]="INFO"})(cE||(Oe.Severity=cE={}));var lE;(function(t){t.All="all",t.Recommended="recommended",t.ThemeAppExtension="theme-app-extension"})(lE||(Oe.ConfigTarget=lE={}))});var Bf=T(gi=>{"use strict";y();var eU=gi&&gi.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),tU=gi&&gi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),rU=gi&&gi.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var i=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(i[i.length]=n);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i=t(e),n=0;n<i.length;n++)i[n]!=="default"&&eU(r,e,i[n]);return tU(r,e),r}})();Object.defineProperty(gi,"__esModule",{value:!0});gi.toLiquidHTMLAST=dE;gi.toJSONAST=mE;gi.toSourceCode=sU;var iU=ge(),nU=sv(),fE=rU(Is()),pE=Y(),hE=pl();function dE(t){try{return(0,iU.toLiquidHtmlAST)(t)}catch(e){return(0,hE.asError)(e)}}function mE(t){try{return(0,nU.toJSONNode)(t)}catch(e){return(0,hE.asError)(e)}}function sU(t,e,r){return t.endsWith(".liquid")?{uri:fE.normalize(t),source:e,type:pE.SourceCodeType.LiquidHtml,ast:dE(e),version:r}:{uri:fE.normalize(t),source:e,type:pE.SourceCodeType.JSON,ast:mE(e),version:r}}});var xt=T(wt=>{"use strict";y();var aU=wt&&wt.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),oU=wt&&wt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),uU=wt&&wt.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var i=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(i[i.length]=n);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i=t(e),n=0;n<i.length;n++)i[n]!=="default"&&aU(r,e,i[n]);return oU(r,e),r}})();Object.defineProperty(wt,"__esModule",{value:!0});wt.toSchema=cU;wt.isBlock=Vf;wt.isSection=uv;wt.isSnippet=lU;wt.isBlockSchema=fU;wt.isSectionSchema=pU;wt.toBlockSchema=bE;wt.toSectionSchema=SE;wt.toAppBlockSchema=wE;wt.getSchema=hU;wt.getSchemaFromJSON=dU;var ov=ge(),gE=ze(),As=uU(Is()),yE=Bf(),Ma=Y(),_E=kn();async function cU(t,e,r,i,n=!0){if(r.type===Ma.SourceCodeType.LiquidHtml)switch(!0){case(t==="app"&&Vf(e)):return wE(e,r.ast,n);case(t==="theme"&&Vf(e)):return bE(e,r.ast,i,n);case(t==="theme"&&uv(e)):return SE(e,r.ast,i,n);default:return}}function Vf(t){return As.dirname(t).endsWith("blocks")}function uv(t){return As.dirname(t).endsWith("sections")}function lU(t){return As.dirname(t).endsWith("snippets")}function fU(t){return t?.type===Ma.ThemeSchemaType.Block}function pU(t){return t?.type===Ma.ThemeSchemaType.Section}async function vE(t,e,r,i){return i?e instanceof Error||await i(t,e.body.value)?r:new Error("Invalid schema"):new Error("No JSON validator provided")}async function bE(t,e,r,i){let n=As.basename(t,".liquid"),s=cv(e),a=xE(e),o=lv(s,i),u=fv(s);return{type:Ma.ThemeSchemaType.Block,validSchema:await vE(t,s,o,r),offset:s instanceof Error?0:s.blockStartPosition.end,name:n,parsed:o,ast:u,value:s instanceof Error?"":s.body.value,staticBlockDefs:a}}async function SE(t,e,r,i){let n=As.basename(t,".liquid"),s=cv(e),a=xE(e),o=lv(s,i),u=fv(s);return{type:Ma.ThemeSchemaType.Section,validSchema:await vE(t,s,o,r),offset:s instanceof Error?0:s.blockStartPosition.end,name:n,parsed:o,ast:u,value:s instanceof Error?"":s.body.value,staticBlockDefs:a}}async function wE(t,e,r){let i=As.basename(t,".liquid"),n=cv(e),s=lv(n,r),a=fv(n);return{type:Ma.ThemeSchemaType.AppBlock,offset:n instanceof Error?0:n.blockStartPosition.end,name:i,parsed:s,ast:a,value:n instanceof Error?"":n.body.value}}function cv(t){return t instanceof Error?t:(0,_E.visit)(t,{LiquidRawTag(e){if(e.name==="schema")return e}})[0]??new Error("No schema tag found")}function xE(t){return t instanceof Error?[]:(0,_E.visit)(t,{LiquidTag(e){if(e.name!==ov.NamedTags.content_for||typeof e.markup=="string")return;let r=e.markup;if(r.contentForType.value!=="block")return;let i=r.args.find(s=>s.name==="type"),n=r.args.find(s=>s.name==="id");if(!(!i||!n)&&i.value.type===ov.NodeTypes.String&&n.value.type===ov.NodeTypes.String)return{type:i.value.value,id:n.value.value}}})}function hU(t){let e=As.basename(t.file.uri,".liquid");switch(!0){case Vf(t.file.uri):return t.getBlockSchema?.(e);case uv(t.file.uri):return t.getSectionSchema?.(e);default:return}}async function dU(t){let e=t.file.source,r=(0,gE.parseJSON)(e),i=(0,yE.toJSONAST)(e);return{parsed:r,ast:i}}function lv(t,e){return t instanceof Error?t:(0,gE.parseJSON)(t.body.value,void 0,e)}function fv(t){return t instanceof Error?t:(0,yE.toJSONAST)(t.body.value)}});var $f=T(ju=>{"use strict";y();Object.defineProperty(ju,"__esModule",{value:!0});ju.getAncestorUris=mU;ju.getAllSnippetDescendantUris=gU;ju.getRenderedSnippetUris=yU;var kE=xt();async function mU(t,e){let r=[],i=new Set,n=[t];for(;n.length>0;){let s=n.shift();if(i.has(s))continue;i.add(s);let a=await e(s);for(let o of a)o.type==="direct"&&!i.has(o.source.uri)&&(r.push(o.source.uri),n.push(o.source.uri))}return r}async function gU(t,e){let r=[],i=new Set,n=[...t];for(;n.length>0;){let s=n.shift();if(i.has(s))continue;i.add(s),r.push(s);let a=await e(s);for(let o of a)o.type==="direct"&&(0,kE.isSnippet)(o.target.uri)&&!i.has(o.target.uri)&&n.push(o.target.uri)}return r}async function yU(t,e){return(await e(t)).filter(i=>i.type==="direct"&&(0,kE.isSnippet)(i.target.uri)).map(i=>i.target.uri)}});var Ce=T(tr=>{"use strict";y();var _U=tr&&tr.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),Ni=tr&&tr.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&_U(e,t,r)};Object.defineProperty(tr,"__esModule",{value:!0});Ni(tg(),tr);Ni(Aw(),tr);Ni(Lw(),tr);Ni(pl(),tr);Ni(sg(),tr);Ni(og(),tr);Ni(cg(),tr);Ni(Yw(),tr);Ni(Cf(),tr);Ni($f(),tr)});var hv=T(Uf=>{"use strict";y();Object.defineProperty(Uf,"__esModule",{value:!0});Uf.AugmentedThemeDocset=void 0;var Bu=Ce(),IE=t=>({name:t}),vU=[["camelcase","camelize"],["handle","handleize"],["t","translate"]],bU=t=>([e,r])=>{let i=t.find(n=>n.name===r);return i?{...i,name:e}:IE(e)},SU=["_online_store_editor_live_setting","addresses_url","app_block_path?","app_block_path_for","app_extension_path?","app_snippet_path?","cancel_customer_order_link","debug","delete_customer_address_link","dev_shop?","distance_from","edit_customer_address_link","encode_url_component","excerpt","format_code","global_block_type?","h","handle_from","installments_pricing","link_to_theme","login_button","login_url","logout_url","pad_spaces","paragraphize","recover_password_link","recover_url","register_url","registration_uuid_from","root_account_url","sentence","theme_url","unit","weight"],wU=["locale","direction","skip_to_content_link","checkout_html_classes","checkout_stylesheets","checkout_scripts","content_for_logo","breadcrumb","order_summary_toggle","content_for_order_summary","alternative_payment_methods","content_for_footer","tracking_code"],AE=(t,e,r)=>({name:t,...e&&{access:e},...r&&{return_type:r}}),xU=["customer_address","product_variant"],kU=wU.map(t=>AE(t,{global:!1,parents:[],template:[]},[{type:"string",name:""}])),IU=t=>({name:t}),AU=["elsif","ifchanged","when","schema"],pv=class{themeDocset;constructor(e){this.themeDocset=e}isAugmented=!0;filters=(0,Bu.memo)(async()=>{let e=await this.themeDocset.filters();return[...e,...vU.map(bU(e)),...SU.map(IE)]});objects=(0,Bu.memo)(async()=>[...await this.themeDocset.objects(),...xU.map(e=>AE(e)),...kU]);liquidDrops=(0,Bu.memo)(async()=>(await this.themeDocset.objects()).filter(e=>e.access?e.deprecated?!1:!e.access.global||e.access.global&&e.access.parents.length>0:!0));tags=(0,Bu.memo)(async()=>[...await this.themeDocset.tags(),...AU.map(IU)]);systemTranslations=(0,Bu.memo)(async()=>this.themeDocset.systemTranslations())};Uf.AugmentedThemeDocset=pv});function Ts(t,e){if(t===e)return!0;if(t==null||e===null||e===void 0||typeof t!=typeof e||typeof t!="object"||Array.isArray(t)!==Array.isArray(e))return!1;let r,i;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(r=0;r<t.length;r++)if(!Ts(t[r],e[r]))return!1}else{let n=[];for(i in t)n.push(i);n.sort();let s=[];for(i in e)s.push(i);if(s.sort(),!Ts(n,s))return!1;for(r=0;r<n.length;r++)if(!Ts(t[n[r]],e[n[r]]))return!1}return!0}function Vt(t){return typeof t=="number"}function qr(t){return typeof t<"u"}function Zr(t){return typeof t=="boolean"}function Hf(t){return typeof t=="string"}function Li(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var Vu=Ae(()=>{y()});function TU(t,e){if(t.length<e.length)return!1;for(let r=0;r<e.length;r++)if(t[r]!==e[r])return!1;return!0}function An(t,e){let r=t.length-e.length;return r>0?t.lastIndexOf(e)===r:r===0?t===e:!1}function Es(t){let e="";TU(t,"(?i)")&&(t=t.substring(4),e="i");try{return new RegExp(t,e+"u")}catch{try{return new RegExp(t,e)}catch{return}}}function dv(t){let e=0;for(let r=0;r<t.length;r++){e++;let i=t.charCodeAt(r);55296<=i&&i<=56319&&r++}return e}var $u=Ae(()=>{y()});var Gf,mv,EE,Wf,Me,oe,nn,OE,Uu,zf,Jf,Tn,Kf,gv,$t,NE,LE,Cr,En,rr,yv,Da,PE,Hu,_v,vv,bv,Gu,qE,Qf,Sv,CE,Pi,Os,Ut,Ke,Yf,RE,ME,DE,Fa,Xf,ja,Zf,FE,jE,ep,tp,Rr,BE,rp,VE,ip,np,sp,ap,op,$E,UE,up,Ns,HE,GE,WE,zE,JE,KE,QE,wv,xv,YE,XE,ZE,eO,tO,rO,iO,nO,sO,kv,D,Iv=Ae(()=>{"use strict";y();(function(t){function e(r){return typeof r=="string"}t.is=e})(Gf||(Gf={}));(function(t){function e(r){return typeof r=="string"}t.is=e})(mv||(mv={}));(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(EE||(EE={}));(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(r){return typeof r=="number"&&t.MIN_VALUE<=r&&r<=t.MAX_VALUE}t.is=e})(Wf||(Wf={}));(function(t){function e(i,n){return i===Number.MAX_VALUE&&(i=Wf.MAX_VALUE),n===Number.MAX_VALUE&&(n=Wf.MAX_VALUE),{line:i,character:n}}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&D.uinteger(n.line)&&D.uinteger(n.character)}t.is=r})(Me||(Me={}));(function(t){function e(i,n,s,a){if(D.uinteger(i)&&D.uinteger(n)&&D.uinteger(s)&&D.uinteger(a))return{start:Me.create(i,n),end:Me.create(s,a)};if(Me.is(i)&&Me.is(n))return{start:i,end:n};throw new Error(`Range#create called with invalid arguments[${i}, ${n}, ${s}, ${a}]`)}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&Me.is(n.start)&&Me.is(n.end)}t.is=r})(oe||(oe={}));(function(t){function e(i,n){return{uri:i,range:n}}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&oe.is(n.range)&&(D.string(n.uri)||D.undefined(n.uri))}t.is=r})(nn||(nn={}));(function(t){function e(i,n,s,a){return{targetUri:i,targetRange:n,targetSelectionRange:s,originSelectionRange:a}}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&oe.is(n.targetRange)&&D.string(n.targetUri)&&oe.is(n.targetSelectionRange)&&(oe.is(n.originSelectionRange)||D.undefined(n.originSelectionRange))}t.is=r})(OE||(OE={}));(function(t){function e(i,n,s,a){return{red:i,green:n,blue:s,alpha:a}}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&D.numberRange(n.red,0,1)&&D.numberRange(n.green,0,1)&&D.numberRange(n.blue,0,1)&&D.numberRange(n.alpha,0,1)}t.is=r})(Uu||(Uu={}));(function(t){function e(i,n){return{range:i,color:n}}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&oe.is(n.range)&&Uu.is(n.color)}t.is=r})(zf||(zf={}));(function(t){function e(i,n,s){return{label:i,textEdit:n,additionalTextEdits:s}}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&D.string(n.label)&&(D.undefined(n.textEdit)||rr.is(n))&&(D.undefined(n.additionalTextEdits)||D.typedArray(n.additionalTextEdits,rr.is))}t.is=r})(Jf||(Jf={}));(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Tn||(Tn={}));(function(t){function e(i,n,s,a,o,u){let l={startLine:i,endLine:n};return D.defined(s)&&(l.startCharacter=s),D.defined(a)&&(l.endCharacter=a),D.defined(o)&&(l.kind=o),D.defined(u)&&(l.collapsedText=u),l}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&D.uinteger(n.startLine)&&D.uinteger(n.startLine)&&(D.undefined(n.startCharacter)||D.uinteger(n.startCharacter))&&(D.undefined(n.endCharacter)||D.uinteger(n.endCharacter))&&(D.undefined(n.kind)||D.string(n.kind))}t.is=r})(Kf||(Kf={}));(function(t){function e(i,n){return{location:i,message:n}}t.create=e;function r(i){let n=i;return D.defined(n)&&nn.is(n.location)&&D.string(n.message)}t.is=r})(gv||(gv={}));(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})($t||($t={}));(function(t){t.Unnecessary=1,t.Deprecated=2})(NE||(NE={}));(function(t){function e(r){let i=r;return D.objectLiteral(i)&&D.string(i.href)}t.is=e})(LE||(LE={}));(function(t){function e(i,n,s,a,o,u){let l={range:i,message:n};return D.defined(s)&&(l.severity=s),D.defined(a)&&(l.code=a),D.defined(o)&&(l.source=o),D.defined(u)&&(l.relatedInformation=u),l}t.create=e;function r(i){var n;let s=i;return D.defined(s)&&oe.is(s.range)&&D.string(s.message)&&(D.number(s.severity)||D.undefined(s.severity))&&(D.integer(s.code)||D.string(s.code)||D.undefined(s.code))&&(D.undefined(s.codeDescription)||D.string((n=s.codeDescription)===null||n===void 0?void 0:n.href))&&(D.string(s.source)||D.undefined(s.source))&&(D.undefined(s.relatedInformation)||D.typedArray(s.relatedInformation,gv.is))}t.is=r})(Cr||(Cr={}));(function(t){function e(i,n,...s){let a={title:i,command:n};return D.defined(s)&&s.length>0&&(a.arguments=s),a}t.create=e;function r(i){let n=i;return D.defined(n)&&D.string(n.title)&&D.string(n.command)}t.is=r})(En||(En={}));(function(t){function e(s,a){return{range:s,newText:a}}t.replace=e;function r(s,a){return{range:{start:s,end:s},newText:a}}t.insert=r;function i(s){return{range:s,newText:""}}t.del=i;function n(s){let a=s;return D.objectLiteral(a)&&D.string(a.newText)&&oe.is(a.range)}t.is=n})(rr||(rr={}));(function(t){function e(i,n,s){let a={label:i};return n!==void 0&&(a.needsConfirmation=n),s!==void 0&&(a.description=s),a}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&D.string(n.label)&&(D.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(D.string(n.description)||n.description===void 0)}t.is=r})(yv||(yv={}));(function(t){function e(r){let i=r;return D.string(i)}t.is=e})(Da||(Da={}));(function(t){function e(s,a,o){return{range:s,newText:a,annotationId:o}}t.replace=e;function r(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}t.insert=r;function i(s,a){return{range:s,newText:"",annotationId:a}}t.del=i;function n(s){let a=s;return rr.is(a)&&(yv.is(a.annotationId)||Da.is(a.annotationId))}t.is=n})(PE||(PE={}));(function(t){function e(i,n){return{textDocument:i,edits:n}}t.create=e;function r(i){let n=i;return D.defined(n)&&Sv.is(n.textDocument)&&Array.isArray(n.edits)}t.is=r})(Hu||(Hu={}));(function(t){function e(i,n,s){let a={kind:"create",uri:i};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(a.options=n),s!==void 0&&(a.annotationId=s),a}t.create=e;function r(i){let n=i;return n&&n.kind==="create"&&D.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||D.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||D.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||Da.is(n.annotationId))}t.is=r})(_v||(_v={}));(function(t){function e(i,n,s,a){let o={kind:"rename",oldUri:i,newUri:n};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}t.create=e;function r(i){let n=i;return n&&n.kind==="rename"&&D.string(n.oldUri)&&D.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||D.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||D.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||Da.is(n.annotationId))}t.is=r})(vv||(vv={}));(function(t){function e(i,n,s){let a={kind:"delete",uri:i};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(a.options=n),s!==void 0&&(a.annotationId=s),a}t.create=e;function r(i){let n=i;return n&&n.kind==="delete"&&D.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||D.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||D.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||Da.is(n.annotationId))}t.is=r})(bv||(bv={}));(function(t){function e(r){let i=r;return i&&(i.changes!==void 0||i.documentChanges!==void 0)&&(i.documentChanges===void 0||i.documentChanges.every(n=>D.string(n.kind)?_v.is(n)||vv.is(n)||bv.is(n):Hu.is(n)))}t.is=e})(Gu||(Gu={}));(function(t){function e(i){return{uri:i}}t.create=e;function r(i){let n=i;return D.defined(n)&&D.string(n.uri)}t.is=r})(qE||(qE={}));(function(t){function e(i,n){return{uri:i,version:n}}t.create=e;function r(i){let n=i;return D.defined(n)&&D.string(n.uri)&&D.integer(n.version)}t.is=r})(Qf||(Qf={}));(function(t){function e(i,n){return{uri:i,version:n}}t.create=e;function r(i){let n=i;return D.defined(n)&&D.string(n.uri)&&(n.version===null||D.integer(n.version))}t.is=r})(Sv||(Sv={}));(function(t){function e(i,n,s,a){return{uri:i,languageId:n,version:s,text:a}}t.create=e;function r(i){let n=i;return D.defined(n)&&D.string(n.uri)&&D.string(n.languageId)&&D.integer(n.version)&&D.string(n.text)}t.is=r})(CE||(CE={}));(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(r){let i=r;return i===t.PlainText||i===t.Markdown}t.is=e})(Pi||(Pi={}));(function(t){function e(r){let i=r;return D.objectLiteral(r)&&Pi.is(i.kind)&&D.string(i.value)}t.is=e})(Os||(Os={}));(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Ut||(Ut={}));(function(t){t.PlainText=1,t.Snippet=2})(Ke||(Ke={}));(function(t){t.Deprecated=1})(Yf||(Yf={}));(function(t){function e(i,n,s){return{newText:i,insert:n,replace:s}}t.create=e;function r(i){let n=i;return n&&D.string(n.newText)&&oe.is(n.insert)&&oe.is(n.replace)}t.is=r})(RE||(RE={}));(function(t){t.asIs=1,t.adjustIndentation=2})(ME||(ME={}));(function(t){function e(r){let i=r;return i&&(D.string(i.detail)||i.detail===void 0)&&(D.string(i.description)||i.description===void 0)}t.is=e})(DE||(DE={}));(function(t){function e(r){return{label:r}}t.create=e})(Fa||(Fa={}));(function(t){function e(r,i){return{items:r||[],isIncomplete:!!i}}t.create=e})(Xf||(Xf={}));(function(t){function e(i){return i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function r(i){let n=i;return D.string(n)||D.objectLiteral(n)&&D.string(n.language)&&D.string(n.value)}t.is=r})(ja||(ja={}));(function(t){function e(r){let i=r;return!!i&&D.objectLiteral(i)&&(Os.is(i.contents)||ja.is(i.contents)||D.typedArray(i.contents,ja.is))&&(r.range===void 0||oe.is(r.range))}t.is=e})(Zf||(Zf={}));(function(t){function e(r,i){return i?{label:r,documentation:i}:{label:r}}t.create=e})(FE||(FE={}));(function(t){function e(r,i,...n){let s={label:r};return D.defined(i)&&(s.documentation=i),D.defined(n)?s.parameters=n:s.parameters=[],s}t.create=e})(jE||(jE={}));(function(t){t.Text=1,t.Read=2,t.Write=3})(ep||(ep={}));(function(t){function e(r,i){let n={range:r};return D.number(i)&&(n.kind=i),n}t.create=e})(tp||(tp={}));(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(Rr||(Rr={}));(function(t){t.Deprecated=1})(BE||(BE={}));(function(t){function e(r,i,n,s,a){let o={name:r,kind:i,location:{uri:s,range:n}};return a&&(o.containerName=a),o}t.create=e})(rp||(rp={}));(function(t){function e(r,i,n,s){return s!==void 0?{name:r,kind:i,location:{uri:n,range:s}}:{name:r,kind:i,location:{uri:n}}}t.create=e})(VE||(VE={}));(function(t){function e(i,n,s,a,o,u){let l={name:i,detail:n,kind:s,range:a,selectionRange:o};return u!==void 0&&(l.children=u),l}t.create=e;function r(i){let n=i;return n&&D.string(n.name)&&D.number(n.kind)&&oe.is(n.range)&&oe.is(n.selectionRange)&&(n.detail===void 0||D.string(n.detail))&&(n.deprecated===void 0||D.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}t.is=r})(ip||(ip={}));(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(np||(np={}));(function(t){t.Invoked=1,t.Automatic=2})(sp||(sp={}));(function(t){function e(i,n,s){let a={diagnostics:i};return n!=null&&(a.only=n),s!=null&&(a.triggerKind=s),a}t.create=e;function r(i){let n=i;return D.defined(n)&&D.typedArray(n.diagnostics,Cr.is)&&(n.only===void 0||D.typedArray(n.only,D.string))&&(n.triggerKind===void 0||n.triggerKind===sp.Invoked||n.triggerKind===sp.Automatic)}t.is=r})(ap||(ap={}));(function(t){function e(i,n,s){let a={title:i},o=!0;return typeof n=="string"?(o=!1,a.kind=n):En.is(n)?a.command=n:a.edit=n,o&&s!==void 0&&(a.kind=s),a}t.create=e;function r(i){let n=i;return n&&D.string(n.title)&&(n.diagnostics===void 0||D.typedArray(n.diagnostics,Cr.is))&&(n.kind===void 0||D.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||En.is(n.command))&&(n.isPreferred===void 0||D.boolean(n.isPreferred))&&(n.edit===void 0||Gu.is(n.edit))}t.is=r})(op||(op={}));(function(t){function e(i,n){let s={range:i};return D.defined(n)&&(s.data=n),s}t.create=e;function r(i){let n=i;return D.defined(n)&&oe.is(n.range)&&(D.undefined(n.command)||En.is(n.command))}t.is=r})($E||($E={}));(function(t){function e(i,n){return{tabSize:i,insertSpaces:n}}t.create=e;function r(i){let n=i;return D.defined(n)&&D.uinteger(n.tabSize)&&D.boolean(n.insertSpaces)}t.is=r})(UE||(UE={}));(function(t){function e(i,n,s){return{range:i,target:n,data:s}}t.create=e;function r(i){let n=i;return D.defined(n)&&oe.is(n.range)&&(D.undefined(n.target)||D.string(n.target))}t.is=r})(up||(up={}));(function(t){function e(i,n){return{range:i,parent:n}}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&oe.is(n.range)&&(n.parent===void 0||t.is(n.parent))}t.is=r})(Ns||(Ns={}));(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(HE||(HE={}));(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(GE||(GE={}));(function(t){function e(r){let i=r;return D.objectLiteral(i)&&(i.resultId===void 0||typeof i.resultId=="string")&&Array.isArray(i.data)&&(i.data.length===0||typeof i.data[0]=="number")}t.is=e})(WE||(WE={}));(function(t){function e(i,n){return{range:i,text:n}}t.create=e;function r(i){let n=i;return n!=null&&oe.is(n.range)&&D.string(n.text)}t.is=r})(zE||(zE={}));(function(t){function e(i,n,s){return{range:i,variableName:n,caseSensitiveLookup:s}}t.create=e;function r(i){let n=i;return n!=null&&oe.is(n.range)&&D.boolean(n.caseSensitiveLookup)&&(D.string(n.variableName)||n.variableName===void 0)}t.is=r})(JE||(JE={}));(function(t){function e(i,n){return{range:i,expression:n}}t.create=e;function r(i){let n=i;return n!=null&&oe.is(n.range)&&(D.string(n.expression)||n.expression===void 0)}t.is=r})(KE||(KE={}));(function(t){function e(i,n){return{frameId:i,stoppedLocation:n}}t.create=e;function r(i){let n=i;return D.defined(n)&&oe.is(i.stoppedLocation)}t.is=r})(QE||(QE={}));(function(t){t.Type=1,t.Parameter=2;function e(r){return r===1||r===2}t.is=e})(wv||(wv={}));(function(t){function e(i){return{value:i}}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&(n.tooltip===void 0||D.string(n.tooltip)||Os.is(n.tooltip))&&(n.location===void 0||nn.is(n.location))&&(n.command===void 0||En.is(n.command))}t.is=r})(xv||(xv={}));(function(t){function e(i,n,s){let a={position:i,label:n};return s!==void 0&&(a.kind=s),a}t.create=e;function r(i){let n=i;return D.objectLiteral(n)&&Me.is(n.position)&&(D.string(n.label)||D.typedArray(n.label,xv.is))&&(n.kind===void 0||wv.is(n.kind))&&n.textEdits===void 0||D.typedArray(n.textEdits,rr.is)&&(n.tooltip===void 0||D.string(n.tooltip)||Os.is(n.tooltip))&&(n.paddingLeft===void 0||D.boolean(n.paddingLeft))&&(n.paddingRight===void 0||D.boolean(n.paddingRight))}t.is=r})(YE||(YE={}));(function(t){function e(r){return{kind:"snippet",value:r}}t.createSnippet=e})(XE||(XE={}));(function(t){function e(r,i,n,s){return{insertText:r,filterText:i,range:n,command:s}}t.create=e})(ZE||(ZE={}));(function(t){function e(r){return{items:r}}t.create=e})(eO||(eO={}));(function(t){t.Invoked=0,t.Automatic=1})(tO||(tO={}));(function(t){function e(r,i){return{range:r,text:i}}t.create=e})(rO||(rO={}));(function(t){function e(r,i){return{triggerKind:r,selectedCompletionInfo:i}}t.create=e})(iO||(iO={}));(function(t){function e(r){let i=r;return D.objectLiteral(i)&&mv.is(i.uri)&&D.string(i.name)}t.is=e})(nO||(nO={}));(function(t){function e(s,a,o,u){return new kv(s,a,o,u)}t.create=e;function r(s){let a=s;return!!(D.defined(a)&&D.string(a.uri)&&(D.undefined(a.languageId)||D.string(a.languageId))&&D.uinteger(a.lineCount)&&D.func(a.getText)&&D.func(a.positionAt)&&D.func(a.offsetAt))}t.is=r;function i(s,a){let o=s.getText(),u=n(a,(f,h)=>{let p=f.range.start.line-h.range.start.line;return p===0?f.range.start.character-h.range.start.character:p}),l=o.length;for(let f=u.length-1;f>=0;f--){let h=u[f],p=s.offsetAt(h.range.start),m=s.offsetAt(h.range.end);if(m<=l)o=o.substring(0,p)+h.newText+o.substring(m,o.length);else throw new Error("Overlapping edit");l=p}return o}t.applyEdits=i;function n(s,a){if(s.length<=1)return s;let o=s.length/2|0,u=s.slice(0,o),l=s.slice(o);n(u,a),n(l,a);let f=0,h=0,p=0;for(;f<u.length&&h<l.length;)a(u[f],l[h])<=0?s[p++]=u[f++]:s[p++]=l[h++];for(;f<u.length;)s[p++]=u[f++];for(;h<l.length;)s[p++]=l[h++];return s}})(sO||(sO={}));kv=class{constructor(e,r,i,n){this._uri=e,this._languageId=r,this._version=i,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(r,i)}return this._content}update(e,r){this._content=e.text,this._version=r,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],r=this._content,i=!0;for(let n=0;n<r.length;n++){i&&(e.push(n),i=!1);let s=r.charAt(n);i=s==="\r"||s===`
|
|
1180
|
-
`,s==="\r"&&n+1<r.length&&r.charAt(n+1)===`
|
|
1181
|
-
`&&n++}i&&r.length>0&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),i=0,n=r.length;if(n===0)return Me.create(0,e);for(;i<n;){let a=Math.floor((i+n)/2);r[a]>e?n=a:i=a+1}let s=i-1;return Me.create(s,e-r[s])}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let i=r[e.line],n=e.line+1<r.length?r[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)}get lineCount(){return this.getLineOffsets().length}};(function(t){let e=Object.prototype.toString;function r(m){return typeof m<"u"}t.defined=r;function i(m){return typeof m>"u"}t.undefined=i;function n(m){return m===!0||m===!1}t.boolean=n;function s(m){return e.call(m)==="[object String]"}t.string=s;function a(m){return e.call(m)==="[object Number]"}t.number=a;function o(m,v,S){return e.call(m)==="[object Number]"&&v<=m&&m<=S}t.numberRange=o;function u(m){return e.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}t.integer=u;function l(m){return e.call(m)==="[object Number]"&&0<=m&&m<=2147483647}t.uinteger=l;function f(m){return e.call(m)==="[object Function]"}t.func=f;function h(m){return m!==null&&typeof m=="object"}t.objectLiteral=h;function p(m,v){return Array.isArray(m)&&m.every(v)}t.typedArray=p})(D||(D={}))});var OU={};Xm(OU,{TextDocument:()=>kr});function Av(t,e){if(t.length<=1)return t;let r=t.length/2|0,i=t.slice(0,r),n=t.slice(r);Av(i,e),Av(n,e);let s=0,a=0,o=0;for(;s<i.length&&a<n.length;)e(i[s],n[a])<=0?t[o++]=i[s++]:t[o++]=n[a++];for(;s<i.length;)t[o++]=i[s++];for(;a<n.length;)t[o++]=n[a++];return t}function aO(t,e,r=0){let i=e?[r]:[];for(let n=0;n<t.length;n++){let s=t.charCodeAt(n);oO(s)&&(s===13&&n+1<t.length&&t.charCodeAt(n+1)===10&&n++,i.push(r+n+1))}return i}function oO(t){return t===13||t===10}function uO(t){let e=t.start,r=t.end;return e.line>r.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function EU(t){let e=uO(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var cp,kr,cO=Ae(()=>{"use strict";y();cp=class t{constructor(e,r,i,n){this._uri=e,this._languageId=r,this._version=i,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let r=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(r,i)}return this._content}update(e,r){for(let i of e)if(t.isIncremental(i)){let n=uO(i.range),s=this.offsetAt(n.start),a=this.offsetAt(n.end);this._content=this._content.substring(0,s)+i.text+this._content.substring(a,this._content.length);let o=Math.max(n.start.line,0),u=Math.max(n.end.line,0),l=this._lineOffsets,f=aO(i.text,!1,s);if(u-o===f.length)for(let p=0,m=f.length;p<m;p++)l[p+o+1]=f[p];else f.length<1e4?l.splice(o+1,u-o,...f):this._lineOffsets=l=l.slice(0,o+1).concat(f,l.slice(u+1));let h=i.text.length-(a-s);if(h!==0)for(let p=o+1+f.length,m=l.length;p<m;p++)l[p]=l[p]+h}else if(t.isFull(i))this._content=i.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=r}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=aO(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let r=this.getLineOffsets(),i=0,n=r.length;if(n===0)return{line:0,character:e};for(;i<n;){let a=Math.floor((i+n)/2);r[a]>e?n=a:i=a+1}let s=i-1;return e=this.ensureBeforeEOL(e,r[s]),{line:s,character:e-r[s]}}offsetAt(e){let r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;let i=r[e.line];if(e.character<=0)return i;let n=e.line+1<r.length?r[e.line+1]:this._content.length,s=Math.min(i+e.character,n);return this.ensureBeforeEOL(s,i)}ensureBeforeEOL(e,r){for(;e>r&&oO(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(e){let r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(t){function e(n,s,a,o){return new cp(n,s,a,o)}t.create=e;function r(n,s,a){if(n instanceof cp)return n.update(s,a),n;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=r;function i(n,s){let a=n.getText(),o=Av(s.map(EU),(f,h)=>{let p=f.range.start.line-h.range.start.line;return p===0?f.range.start.character-h.range.start.character:p}),u=0,l=[];for(let f of o){let h=n.offsetAt(f.range.start);if(h<u)throw new Error("Overlapping edit");h>u&&l.push(a.substring(u,h)),f.newText.length&&l.push(f.newText),u=n.offsetAt(f.range.end)}return l.push(a.substr(u)),l.join("")}t.applyEdits=i})(kr||(kr={}))});function NU(t){return t>=ce.SchemaResolveError}var ce,cr,Tv,Mr=Ae(()=>{y();Iv();cO();(function(t){t[t.Undefined=0]="Undefined",t[t.EnumValueMismatch=1]="EnumValueMismatch",t[t.Deprecated=2]="Deprecated",t[t.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=258]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",t[t.InvalidUnicode=260]="InvalidUnicode",t[t.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",t[t.InvalidCharacter=262]="InvalidCharacter",t[t.PropertyExpected=513]="PropertyExpected",t[t.CommaExpected=514]="CommaExpected",t[t.ColonExpected=515]="ColonExpected",t[t.ValueExpected=516]="ValueExpected",t[t.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",t[t.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",t[t.TrailingComma=519]="TrailingComma",t[t.DuplicateKey=520]="DuplicateKey",t[t.CommentNotPermitted=521]="CommentNotPermitted",t[t.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",t[t.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature",t[t.SchemaResolveError=65536]="SchemaResolveError"})(ce||(ce={}));(function(t){t[t.v3=3]="v3",t[t.v4=4]="v4",t[t.v6=6]="v6",t[t.v7=7]="v7",t[t.v2019_09=19]="v2019_09",t[t.v2020_12=20]="v2020_12"})(cr||(cr={}));(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Pi.Markdown,Pi.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}})(Tv||(Tv={}))});var lO,Ba,tue,Ev=Ae(()=>{y();(()=>{"use strict";var t={975:q=>{function P(C){if(typeof C!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(C))}function $(C,F){for(var U,W="",Q=0,K=-1,pe=0,ye=0;ye<=C.length;++ye){if(ye<C.length)U=C.charCodeAt(ye);else{if(U===47)break;U=47}if(U===47){if(!(K===ye-1||pe===1))if(K!==ye-1&&pe===2){if(W.length<2||Q!==2||W.charCodeAt(W.length-1)!==46||W.charCodeAt(W.length-2)!==46){if(W.length>2){var nt=W.lastIndexOf("/");if(nt!==W.length-1){nt===-1?(W="",Q=0):Q=(W=W.slice(0,nt)).length-1-W.lastIndexOf("/"),K=ye,pe=0;continue}}else if(W.length===2||W.length===1){W="",Q=0,K=ye,pe=0;continue}}F&&(W.length>0?W+="/..":W="..",Q=2)}else W.length>0?W+="/"+C.slice(K+1,ye):W=C.slice(K+1,ye),Q=ye-K-1;K=ye,pe=0}else U===46&&pe!==-1?++pe:pe=-1}return W}var V={resolve:function(){for(var C,F="",U=!1,W=arguments.length-1;W>=-1&&!U;W--){var Q;W>=0?Q=arguments[W]:(C===void 0&&(C=process.cwd()),Q=C),P(Q),Q.length!==0&&(F=Q+"/"+F,U=Q.charCodeAt(0)===47)}return F=$(F,!U),U?F.length>0?"/"+F:"/":F.length>0?F:"."},normalize:function(C){if(P(C),C.length===0)return".";var F=C.charCodeAt(0)===47,U=C.charCodeAt(C.length-1)===47;return(C=$(C,!F)).length!==0||F||(C="."),C.length>0&&U&&(C+="/"),F?"/"+C:C},isAbsolute:function(C){return P(C),C.length>0&&C.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var C,F=0;F<arguments.length;++F){var U=arguments[F];P(U),U.length>0&&(C===void 0?C=U:C+="/"+U)}return C===void 0?".":V.normalize(C)},relative:function(C,F){if(P(C),P(F),C===F||(C=V.resolve(C))===(F=V.resolve(F)))return"";for(var U=1;U<C.length&&C.charCodeAt(U)===47;++U);for(var W=C.length,Q=W-U,K=1;K<F.length&&F.charCodeAt(K)===47;++K);for(var pe=F.length-K,ye=Q<pe?Q:pe,nt=-1,qe=0;qe<=ye;++qe){if(qe===ye){if(pe>ye){if(F.charCodeAt(K+qe)===47)return F.slice(K+qe+1);if(qe===0)return F.slice(K+qe)}else Q>ye&&(C.charCodeAt(U+qe)===47?nt=qe:qe===0&&(nt=0));break}var Si=C.charCodeAt(U+qe);if(Si!==F.charCodeAt(K+qe))break;Si===47&&(nt=qe)}var Xn="";for(qe=U+nt+1;qe<=W;++qe)qe!==W&&C.charCodeAt(qe)!==47||(Xn.length===0?Xn+="..":Xn+="/..");return Xn.length>0?Xn+F.slice(K+nt):(K+=nt,F.charCodeAt(K)===47&&++K,F.slice(K))},_makeLong:function(C){return C},dirname:function(C){if(P(C),C.length===0)return".";for(var F=C.charCodeAt(0),U=F===47,W=-1,Q=!0,K=C.length-1;K>=1;--K)if((F=C.charCodeAt(K))===47){if(!Q){W=K;break}}else Q=!1;return W===-1?U?"/":".":U&&W===1?"//":C.slice(0,W)},basename:function(C,F){if(F!==void 0&&typeof F!="string")throw new TypeError('"ext" argument must be a string');P(C);var U,W=0,Q=-1,K=!0;if(F!==void 0&&F.length>0&&F.length<=C.length){if(F.length===C.length&&F===C)return"";var pe=F.length-1,ye=-1;for(U=C.length-1;U>=0;--U){var nt=C.charCodeAt(U);if(nt===47){if(!K){W=U+1;break}}else ye===-1&&(K=!1,ye=U+1),pe>=0&&(nt===F.charCodeAt(pe)?--pe==-1&&(Q=U):(pe=-1,Q=ye))}return W===Q?Q=ye:Q===-1&&(Q=C.length),C.slice(W,Q)}for(U=C.length-1;U>=0;--U)if(C.charCodeAt(U)===47){if(!K){W=U+1;break}}else Q===-1&&(K=!1,Q=U+1);return Q===-1?"":C.slice(W,Q)},extname:function(C){P(C);for(var F=-1,U=0,W=-1,Q=!0,K=0,pe=C.length-1;pe>=0;--pe){var ye=C.charCodeAt(pe);if(ye!==47)W===-1&&(Q=!1,W=pe+1),ye===46?F===-1?F=pe:K!==1&&(K=1):F!==-1&&(K=-1);else if(!Q){U=pe+1;break}}return F===-1||W===-1||K===0||K===1&&F===W-1&&F===U+1?"":C.slice(F,W)},format:function(C){if(C===null||typeof C!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof C);return(function(F,U){var W=U.dir||U.root,Q=U.base||(U.name||"")+(U.ext||"");return W?W===U.root?W+Q:W+"/"+Q:Q})(0,C)},parse:function(C){P(C);var F={root:"",dir:"",base:"",ext:"",name:""};if(C.length===0)return F;var U,W=C.charCodeAt(0),Q=W===47;Q?(F.root="/",U=1):U=0;for(var K=-1,pe=0,ye=-1,nt=!0,qe=C.length-1,Si=0;qe>=U;--qe)if((W=C.charCodeAt(qe))!==47)ye===-1&&(nt=!1,ye=qe+1),W===46?K===-1?K=qe:Si!==1&&(Si=1):K!==-1&&(Si=-1);else if(!nt){pe=qe+1;break}return K===-1||ye===-1||Si===0||Si===1&&K===ye-1&&K===pe+1?ye!==-1&&(F.base=F.name=pe===0&&Q?C.slice(1,ye):C.slice(pe,ye)):(pe===0&&Q?(F.name=C.slice(1,K),F.base=C.slice(1,ye)):(F.name=C.slice(pe,K),F.base=C.slice(pe,ye)),F.ext=C.slice(K,ye)),pe>0?F.dir=C.slice(0,pe-1):Q&&(F.dir="/"),F},sep:"/",delimiter:":",win32:null,posix:null};V.posix=V,q.exports=V}},e={};function r(q){var P=e[q];if(P!==void 0)return P.exports;var $=e[q]={exports:{}};return t[q]($,$.exports,r),$.exports}r.d=(q,P)=>{for(var $ in P)r.o(P,$)&&!r.o(q,$)&&Object.defineProperty(q,$,{enumerable:!0,get:P[$]})},r.o=(q,P)=>Object.prototype.hasOwnProperty.call(q,P),r.r=q=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(q,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(q,"__esModule",{value:!0})};var i={};let n;r.r(i),r.d(i,{URI:()=>p,Utils:()=>R}),typeof process=="object"?n=process.platform==="win32":typeof navigator=="object"&&(n=navigator.userAgent.indexOf("Windows")>=0);let s=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function u(q,P){if(!q.scheme&&P)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${q.authority}", path: "${q.path}", query: "${q.query}", fragment: "${q.fragment}"}`);if(q.scheme&&!s.test(q.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(q.path){if(q.authority){if(!a.test(q.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(q.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let l="",f="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static isUri(P){return P instanceof p||!!P&&typeof P.authority=="string"&&typeof P.fragment=="string"&&typeof P.path=="string"&&typeof P.query=="string"&&typeof P.scheme=="string"&&typeof P.fsPath=="string"&&typeof P.with=="function"&&typeof P.toString=="function"}scheme;authority;path;query;fragment;constructor(P,$,V,C,F,U=!1){typeof P=="object"?(this.scheme=P.scheme||l,this.authority=P.authority||l,this.path=P.path||l,this.query=P.query||l,this.fragment=P.fragment||l):(this.scheme=(function(W,Q){return W||Q?W:"file"})(P,U),this.authority=$||l,this.path=(function(W,Q){switch(W){case"https":case"http":case"file":Q?Q[0]!==f&&(Q=f+Q):Q=f}return Q})(this.scheme,V||l),this.query=C||l,this.fragment=F||l,u(this,U))}get fsPath(){return k(this,!1)}with(P){if(!P)return this;let{scheme:$,authority:V,path:C,query:F,fragment:U}=P;return $===void 0?$=this.scheme:$===null&&($=l),V===void 0?V=this.authority:V===null&&(V=l),C===void 0?C=this.path:C===null&&(C=l),F===void 0?F=this.query:F===null&&(F=l),U===void 0?U=this.fragment:U===null&&(U=l),$===this.scheme&&V===this.authority&&C===this.path&&F===this.query&&U===this.fragment?this:new v($,V,C,F,U)}static parse(P,$=!1){let V=h.exec(P);return V?new v(V[2]||l,E(V[4]||l),E(V[5]||l),E(V[7]||l),E(V[9]||l),$):new v(l,l,l,l,l)}static file(P){let $=l;if(n&&(P=P.replace(/\\/g,f)),P[0]===f&&P[1]===f){let V=P.indexOf(f,2);V===-1?($=P.substring(2),P=f):($=P.substring(2,V),P=P.substring(V)||f)}return new v("file",$,P,l,l)}static from(P){let $=new v(P.scheme,P.authority,P.path,P.query,P.fragment);return u($,!0),$}toString(P=!1){return w(this,P)}toJSON(){return this}static revive(P){if(P){if(P instanceof p)return P;{let $=new v(P);return $._formatted=P.external,$._fsPath=P._sep===m?P.fsPath:null,$}}return P}}let m=n?1:void 0;class v extends p{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=k(this,!1)),this._fsPath}toString(P=!1){return P?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)}toJSON(){let P={$mid:1};return this._fsPath&&(P.fsPath=this._fsPath,P._sep=m),this._formatted&&(P.external=this._formatted),this.path&&(P.path=this.path),this.scheme&&(P.scheme=this.scheme),this.authority&&(P.authority=this.authority),this.query&&(P.query=this.query),this.fragment&&(P.fragment=this.fragment),P}}let S={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function b(q,P,$){let V,C=-1;for(let F=0;F<q.length;F++){let U=q.charCodeAt(F);if(U>=97&&U<=122||U>=65&&U<=90||U>=48&&U<=57||U===45||U===46||U===95||U===126||P&&U===47||$&&U===91||$&&U===93||$&&U===58)C!==-1&&(V+=encodeURIComponent(q.substring(C,F)),C=-1),V!==void 0&&(V+=q.charAt(F));else{V===void 0&&(V=q.substr(0,F));let W=S[U];W!==void 0?(C!==-1&&(V+=encodeURIComponent(q.substring(C,F)),C=-1),V+=W):C===-1&&(C=F)}}return C!==-1&&(V+=encodeURIComponent(q.substring(C))),V!==void 0?V:q}function g(q){let P;for(let $=0;$<q.length;$++){let V=q.charCodeAt($);V===35||V===63?(P===void 0&&(P=q.substr(0,$)),P+=S[V]):P!==void 0&&(P+=q[$])}return P!==void 0?P:q}function k(q,P){let $;return $=q.authority&&q.path.length>1&&q.scheme==="file"?`//${q.authority}${q.path}`:q.path.charCodeAt(0)===47&&(q.path.charCodeAt(1)>=65&&q.path.charCodeAt(1)<=90||q.path.charCodeAt(1)>=97&&q.path.charCodeAt(1)<=122)&&q.path.charCodeAt(2)===58?P?q.path.substr(1):q.path[1].toLowerCase()+q.path.substr(2):q.path,n&&($=$.replace(/\//g,"\\")),$}function w(q,P){let $=P?g:b,V="",{scheme:C,authority:F,path:U,query:W,fragment:Q}=q;if(C&&(V+=C,V+=":"),(F||C==="file")&&(V+=f,V+=f),F){let K=F.indexOf("@");if(K!==-1){let pe=F.substr(0,K);F=F.substr(K+1),K=pe.lastIndexOf(":"),K===-1?V+=$(pe,!1,!1):(V+=$(pe.substr(0,K),!1,!1),V+=":",V+=$(pe.substr(K+1),!1,!0)),V+="@"}F=F.toLowerCase(),K=F.lastIndexOf(":"),K===-1?V+=$(F,!1,!0):(V+=$(F.substr(0,K),!1,!0),V+=F.substr(K))}if(U){if(U.length>=3&&U.charCodeAt(0)===47&&U.charCodeAt(2)===58){let K=U.charCodeAt(1);K>=65&&K<=90&&(U=`/${String.fromCharCode(K+32)}:${U.substr(3)}`)}else if(U.length>=2&&U.charCodeAt(1)===58){let K=U.charCodeAt(0);K>=65&&K<=90&&(U=`${String.fromCharCode(K+32)}:${U.substr(2)}`)}V+=$(U,!0,!1)}return W&&(V+="?",V+=$(W,!1,!1)),Q&&(V+="#",V+=P?Q:b(Q,!1,!1)),V}function _(q){try{return decodeURIComponent(q)}catch{return q.length>3?q.substr(0,3)+_(q.substr(3)):q}}let A=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function E(q){return q.match(A)?q.replace(A,(P=>_(P))):q}var O=r(975);let L=O.posix||O,B="/";var R;(function(q){q.joinPath=function(P,...$){return P.with({path:L.join(P.path,...$)})},q.resolvePath=function(P,...$){let V=P.path,C=!1;V[0]!==B&&(V=B+V,C=!0);let F=L.resolve(V,...$);return C&&F[0]===B&&!P.authority&&(F=F.substring(1)),P.with({path:F})},q.dirname=function(P){if(P.path.length===0||P.path===B)return P;let $=L.dirname(P.path);return $.length===1&&$.charCodeAt(0)===46&&($=""),P.with({path:$})},q.basename=function(P){return L.basename(P.path)},q.extname=function(P){return L.extname(P.path)}})(R||(R={})),lO=i})();({URI:Ba,Utils:tue}=lO)});var Ls=T((nue,dO)=>{"use strict";y();var Ov=Object.defineProperty,LU=Object.getOwnPropertyDescriptor,PU=Object.getOwnPropertyNames,qU=Object.prototype.hasOwnProperty,CU=(t,e)=>{for(var r in e)Ov(t,r,{get:e[r],enumerable:!0})},RU=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of PU(e))!qU.call(t,n)&&n!==r&&Ov(t,n,{get:()=>e[n],enumerable:!(i=LU(e,n))||i.enumerable});return t},MU=t=>RU(Ov({},"__esModule",{value:!0}),t),pO={};CU(pO,{config:()=>VU,t:()=>hO});dO.exports=MU(pO);var DU=ae("fs"),FU=ae("fs/promises");async function jU(t){if(t.protocol==="file:")return await(0,FU.readFile)(t,"utf8");if(t.protocol==="http:"||t.protocol==="https:"){let e=await fetch(t.toString(),{headers:{"Accept-Encoding":"gzip, deflate",Accept:"application/json"},redirect:"follow"});if(!e.ok){let i=`Unexpected ${e.status} response while trying to read ${t}`;try{i+=`: ${await e.text()}`}catch{}throw new Error(i)}return await e.text()}throw new Error("Unsupported protocol")}function BU(t){return(0,DU.readFileSync)(t,"utf8")}var Wu;function VU(t){if("contents"in t){typeof t.contents=="string"?Wu=JSON.parse(t.contents):Wu=t.contents;return}if("fsPath"in t){let e=BU(t.fsPath),r=JSON.parse(e);Wu=fO(r)?r.contents.bundle:r;return}if(t.uri){let e=t.uri;return typeof t.uri=="string"&&(e=new URL(t.uri)),new Promise((r,i)=>{jU(e).then(n=>{try{let s=JSON.parse(n);Wu=fO(s)?s.contents.bundle:s,r()}catch(s){i(s)}}).catch(n=>{i(n)})})}}function hO(...t){let e=t[0],r,i,n;if(typeof e=="string")r=e,i=e,t.splice(0,1),n=!t||typeof t[0]!="object"?t:t[0];else if(e instanceof Array){let a=t.slice(1);if(e.length!==a.length+1)throw new Error("expected a string as the first argument to l10n.t");let o=e[0];for(let u=1;u<e.length;u++)o+=`{${u-1}}`+e[u];return hO(o,...a)}else i=e.message,r=i,e.comment&&e.comment.length>0&&(r+=`/${Array.isArray(e.comment)?e.comment.join(""):e.comment}`),n=e.args??{};let s=Wu?.[r];return s?typeof s=="string"?lp(s,n):s.comment?lp(s.message,n):lp(i,n):lp(i,n)}var $U=/{([^}]+)}/g;function lp(t,e){return Object.keys(e).length===0?t:t.replace($U,(r,i)=>e[i]??r)}function fO(t){return typeof t?.contents?.bundle=="object"&&typeof t?.version=="string"}});function Ht(t){return Zr(t)?t?{}:{not:{}}:t}function an(t){t.startsWith(gO)&&(t=HU+t.substring(gO.length));try{return Ba.parse(t).toString(!0)}catch{return t}}function Mv(t){return GU[an(t)]??void 0}function _O(t,e=[],r=[]){return new hp(t,e,r)}function qi(t){return wg(t)}function Ju(t){return Sg(t)}function Dv(t,e,r=!1){return e>=t.offset&&e<t.offset+t.length||r&&e===t.offset+t.length}function yO(t,e=cr.v2020_12){let r=t.$schema;return r?Mv(r)??e:e}function Lt(t,e,r,i,n){if(!t||!i.include(t))return;if(t.type==="property")return Lt(t.valueNode,e,r,i,n);let s=t;switch(a(),s.type){case"object":h(s);break;case"array":f(s);break;case"string":l(s);break;case"number":u(s);break}i.add({node:s,schema:e});function a(){function p(w){return s.type===w||w==="integer"&&s.type==="number"&&s.isInteger}if(Array.isArray(e.type)?e.type.some(p)||r.problems.push({location:{offset:s.offset,length:s.length},message:e.errorMessage||Z.t("Incorrect type. Expected one of {0}.",e.type.join(", "))}):e.type&&(p(e.type)||r.problems.push({location:{offset:s.offset,length:s.length},message:e.errorMessage||Z.t('Incorrect type. Expected "{0}".',e.type)})),Array.isArray(e.allOf))for(let w of e.allOf){let _=new Pt,A=i.newSub();Lt(s,Ht(w),_,A,n),r.merge(_),i.merge(A)}let m=Ht(e.not);if(m){let w=new Pt,_=i.newSub();Lt(s,m,w,_,n),w.hasProblems()||r.problems.push({location:{offset:s.offset,length:s.length},message:e.errorMessage||Z.t("Matches a schema that is not allowed.")});for(let A of _.schemas)A.inverted=!A.inverted,i.add(A)}let v=(w,_)=>{let A=[],E=o(w)??w,O;for(let L of E){let B=Ht(L),R=new Pt,q=i.newSub();if(Lt(s,B,R,q,n),R.hasProblems()||A.push(B),!O)O={schema:B,validationResult:R,matchingSchemas:q};else if(!_&&!R.hasProblems()&&!O.validationResult.hasProblems())O.matchingSchemas.merge(q),O.validationResult.propertiesMatches+=R.propertiesMatches,O.validationResult.propertiesValueMatches+=R.propertiesValueMatches,O.validationResult.mergeProcessedProperties(R);else{let P=R.compare(O.validationResult);P>0?O={schema:B,validationResult:R,matchingSchemas:q}:P===0&&(O.matchingSchemas.merge(q),O.validationResult.mergeEnumValues(R))}}return A.length>1&&_&&r.problems.push({location:{offset:s.offset,length:1},message:Z.t("Matches multiple schemas when only one must validate.")}),O&&(O.validationResult.updateEnumMismatchProblemMessages(),r.merge(O.validationResult),i.merge(O.matchingSchemas)),A.length};Array.isArray(e.anyOf)&&v(e.anyOf,!1),Array.isArray(e.oneOf)&&v(e.oneOf,!0);let S=w=>{let _=new Pt,A=i.newSub();Lt(s,Ht(w),_,A,n),r.merge(_),i.merge(A)},b=(w,_,A)=>{let E=Ht(w),O=new Pt,L=i.newSub();Lt(s,E,O,L,n),i.merge(L),r.mergeProcessedProperties(O),O.hasProblems()?A&&S(A):_&&S(_)},g=Ht(e.if);if(g&&b(g,Ht(e.then),Ht(e.else)),Array.isArray(e.enum)){let w=qi(s),_=!1;for(let A of e.enum)if(Ts(w,A)){_=!0;break}r.enumValues=e.enum,r.enumValueMatch=_,_||r.problems.push({location:{offset:s.offset,length:s.length},code:ce.EnumValueMismatch,message:e.errorMessage||Z.t("Value is not accepted. Valid values: {0}.",e.enum.map(A=>JSON.stringify(A)).join(", "))})}if(qr(e.const)){let w=qi(s);Ts(w,e.const)?r.enumValueMatch=!0:(r.problems.push({location:{offset:s.offset,length:s.length},code:ce.EnumValueMismatch,message:e.errorMessage||Z.t("Value must be {0}.",JSON.stringify(e.const))}),r.enumValueMatch=!1),r.enumValues=[e.const]}let k=e.deprecationMessage;if(k||e.deprecated){k=k||Z.t("Value is deprecated");let w=s.parent?.type==="property"?s.parent:s;r.problems.push({location:{offset:w.offset,length:w.length},severity:$t.Warning,message:k,code:ce.Deprecated})}}function o(p){if(p.length<2)return;let m=S=>{let b=new Map;for(let g=0;g<p.length;g++){let k=S(Ht(p[g]),g);if(!k)return;k.forEach(([w,_])=>{if(_.const!==void 0){b.has(w)||b.set(w,new Map);let A=b.get(w);A.has(_.const)||A.set(_.const,[]),A.get(_.const).push(g)}})}return b},v=(S,b)=>{for(let[g,k]of S){let w=new Set;if(k.forEach(_=>_.forEach(A=>w.add(A))),w.size===p.length){let _=b(g),A=k.get(_);if(A?.length)return A.map(E=>p[E]);break}}};if(s.type==="object"&&s.properties?.length){let S=m(b=>b.properties?Object.entries(b.properties).map(([g,k])=>[g,Ht(k)]):void 0);if(S)return v(S,b=>{let g=s.properties.find(k=>k.keyNode.value===b);return g?.valueNode?.type==="string"?g.valueNode.value:void 0})}else if(s.type==="array"&&s.items?.length){let S=m(b=>{let g=b.prefixItems||(Array.isArray(b.items)?b.items:void 0);return g?g.map((k,w)=>[w,Ht(k)]):void 0});if(S)return v(S,b=>{let g=s.items[b];return g?.type==="string"?g.value:void 0})}}function u(p){let m=p.value;function v(A){let E=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(A.toString());return E&&{value:Number(E[1]+(E[2]||"")),multiplier:(E[2]?.length||0)-(parseInt(E[3])||0)}}if(Vt(e.multipleOf)){let A=-1;if(Number.isInteger(e.multipleOf))A=m%e.multipleOf;else{let E=v(e.multipleOf),O=v(m);if(E&&O){let L=10**Math.abs(O.multiplier-E.multiplier);O.multiplier<E.multiplier?O.value*=L:E.value*=L,A=O.value%E.value}}A!==0&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Value is not divisible by {0}.",e.multipleOf)})}function S(A,E){if(Vt(E))return E;if(Zr(E)&&E)return A}function b(A,E){if(!Zr(E)||!E)return A}let g=S(e.minimum,e.exclusiveMinimum);Vt(g)&&m<=g&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Value is below the exclusive minimum of {0}.",g)});let k=S(e.maximum,e.exclusiveMaximum);Vt(k)&&m>=k&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Value is above the exclusive maximum of {0}.",k)});let w=b(e.minimum,e.exclusiveMinimum);Vt(w)&&m<w&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Value is below the minimum of {0}.",w)});let _=b(e.maximum,e.exclusiveMaximum);Vt(_)&&m>_&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Value is above the maximum of {0}.",_)})}function l(p){if(Vt(e.minLength)&&dv(p.value)<e.minLength&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("String is shorter than the minimum length of {0}.",e.minLength)}),Vt(e.maxLength)&&dv(p.value)>e.maxLength&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("String is longer than the maximum length of {0}.",e.maxLength)}),Hf(e.pattern)){let m=Es(e.pattern);m&&!m.test(p.value)&&r.problems.push({location:{offset:p.offset,length:p.length},message:e.patternErrorMessage||e.errorMessage||Z.t('String does not match the pattern of "{0}".',e.pattern)})}if(e.format)switch(e.format){case"uri":case"uri-reference":{let v;if(!p.value)v=Z.t("URI expected.");else{let S=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(p.value);S?!S[2]&&e.format==="uri"&&(v=Z.t("URI with a scheme is expected.")):v=Z.t("URI is expected.")}v&&r.problems.push({location:{offset:p.offset,length:p.length},message:e.patternErrorMessage||e.errorMessage||Z.t("String is not a URI: {0}",v)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"hostname":case"ipv4":case"ipv6":let m=UU[e.format];(!p.value||!m.pattern.exec(p.value))&&r.problems.push({location:{offset:p.offset,length:p.length},message:e.patternErrorMessage||e.errorMessage||m.errorMessage});default:}}function f(p){let m,v;n.schemaDraft>=cr.v2020_12?(m=e.prefixItems,v=Array.isArray(e.items)?void 0:e.items):(m=Array.isArray(e.items)?e.items:void 0,v=Array.isArray(e.items)?e.additionalItems:e.items);let S=0;if(m!==void 0){let k=Math.min(m.length,p.items.length);for(;S<k;S++){let w=m[S],_=Ht(w),A=new Pt,E=p.items[S];E&&(Lt(E,_,A,i,n),r.mergePropertyMatch(A)),r.processedProperties.add(String(S))}}if(v!==void 0&&S<p.items.length)if(typeof v=="boolean")for(v===!1&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Array has too many items according to schema. Expected {0} or fewer.",S)});S<p.items.length;S++)r.processedProperties.add(String(S)),r.propertiesValueMatches++;else for(;S<p.items.length;S++){let k=new Pt;Lt(p.items[S],v,k,i,n),r.mergePropertyMatch(k),r.processedProperties.add(String(S))}let b=Ht(e.contains);if(b){let k=0;for(let w=0;w<p.items.length;w++){let _=p.items[w],A=new Pt;Lt(_,b,A,Va.instance,n),A.hasProblems()||(k++,n.schemaDraft>=cr.v2020_12&&r.processedProperties.add(String(w)))}k===0&&!Vt(e.minContains)&&r.problems.push({location:{offset:p.offset,length:p.length},message:e.errorMessage||Z.t("Array does not contain required item.")}),Vt(e.minContains)&&k<e.minContains&&r.problems.push({location:{offset:p.offset,length:p.length},message:e.errorMessage||Z.t("Array has too few items that match the contains contraint. Expected {0} or more.",e.minContains)}),Vt(e.maxContains)&&k>e.maxContains&&r.problems.push({location:{offset:p.offset,length:p.length},message:e.errorMessage||Z.t("Array has too many items that match the contains contraint. Expected {0} or less.",e.maxContains)})}let g=e.unevaluatedItems;if(g!==void 0)for(let k=0;k<p.items.length;k++){if(!r.processedProperties.has(String(k)))if(g===!1)r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Item does not match any validation rule from the array.")});else{let w=new Pt;Lt(p.items[k],e.unevaluatedItems,w,i,n),r.mergePropertyMatch(w)}r.processedProperties.add(String(k)),r.propertiesValueMatches++}if(Vt(e.minItems)&&p.items.length<e.minItems&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Array has too few items. Expected {0} or more.",e.minItems)}),Vt(e.maxItems)&&p.items.length>e.maxItems&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Array has too many items. Expected {0} or fewer.",e.maxItems)}),e.uniqueItems===!0){let w=function(){for(let _=0;_<k.length-1;_++){let A=k[_];for(let E=_+1;E<k.length;E++)if(Ts(A,k[E]))return!0}return!1},k=qi(p);w()&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Array has duplicate items.")})}}function h(p){let m=Object.create(null),v=new Set;for(let _ of p.properties){let A=_.keyNode.value;m[A]=_.valueNode,v.add(A)}if(Array.isArray(e.required)){for(let _ of e.required)if(!m[_]){let A=p.parent&&p.parent.type==="property"&&p.parent.keyNode,E=A?{offset:A.offset,length:A.length}:{offset:p.offset,length:1};r.problems.push({location:E,message:Z.t('Missing property "{0}".',_)})}}let S=_=>{v.delete(_),r.processedProperties.add(_)};if(e.properties)for(let _ of Object.keys(e.properties)){S(_);let A=e.properties[_],E=m[_];if(E)if(Zr(A))if(A)r.propertiesMatches++,r.propertiesValueMatches++;else{let O=E.parent;r.problems.push({location:{offset:O.keyNode.offset,length:O.keyNode.length},message:e.errorMessage||Z.t("Property {0} is not allowed.",_)})}else{let O=new Pt;Lt(E,A,O,i,n),r.mergePropertyMatch(O)}}if(e.patternProperties)for(let _ of Object.keys(e.patternProperties)){let A=Es(_);if(A){let E=[];for(let O of v)if(A.test(O)){E.push(O);let L=m[O];if(L){let B=e.patternProperties[_];if(Zr(B))if(B)r.propertiesMatches++,r.propertiesValueMatches++;else{let R=L.parent;r.problems.push({location:{offset:R.keyNode.offset,length:R.keyNode.length},message:e.errorMessage||Z.t("Property {0} is not allowed.",O)})}else{let R=new Pt;Lt(L,B,R,i,n),r.mergePropertyMatch(R)}}}E.forEach(S)}}let b=e.additionalProperties;if(b!==void 0)for(let _ of v){S(_);let A=m[_];if(A){if(b===!1){let E=A.parent;r.problems.push({location:{offset:E.keyNode.offset,length:E.keyNode.length},message:e.errorMessage||Z.t("Property {0} is not allowed.",_)})}else if(b!==!0){let E=new Pt;Lt(A,b,E,i,n),r.mergePropertyMatch(E)}}}let g=e.unevaluatedProperties;if(g!==void 0){let _=[];for(let A of v)if(!r.processedProperties.has(A)){_.push(A);let E=m[A];if(E){if(g===!1){let O=E.parent;r.problems.push({location:{offset:O.keyNode.offset,length:O.keyNode.length},message:e.errorMessage||Z.t("Property {0} is not allowed.",A)})}else if(g!==!0){let O=new Pt;Lt(E,g,O,i,n),r.mergePropertyMatch(O)}}}_.forEach(S)}if(Vt(e.maxProperties)&&p.properties.length>e.maxProperties&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Object has more properties than limit of {0}.",e.maxProperties)}),Vt(e.minProperties)&&p.properties.length<e.minProperties&&r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Object has fewer properties than the required number of {0}",e.minProperties)}),e.dependentRequired)for(let _ in e.dependentRequired){let A=m[_],E=e.dependentRequired[_];A&&Array.isArray(E)&&w(_,E)}if(e.dependentSchemas)for(let _ in e.dependentSchemas){let A=m[_],E=e.dependentSchemas[_];A&&Li(E)&&w(_,E)}if(e.dependencies)for(let _ in e.dependencies)m[_]&&w(_,e.dependencies[_]);let k=Ht(e.propertyNames);if(k)for(let _ of p.properties){let A=_.keyNode;A&&Lt(A,k,r,i,n)}function w(_,A){if(Array.isArray(A))for(let E of A)m[E]?r.propertiesValueMatches++:r.problems.push({location:{offset:p.offset,length:p.length},message:Z.t("Object is missing property {0} required by property {1}.",E,_)});else{let E=Ht(A);if(E){let O=new Pt;Lt(p,E,O,i,n),r.mergePropertyMatch(O)}}}}}function vO(t,e){let r=[],i=-1,n=t.getText(),s=Nr(n,!1),a=e&&e.collectComments?[]:void 0;function o(){for(;;){let O=s.scan();switch(h(),O){case 12:case 13:Array.isArray(a)&&a.push(oe.create(t.positionAt(s.getTokenOffset()),t.positionAt(s.getTokenOffset()+s.getTokenLength())));break;case 15:case 14:break;default:return O}}}function u(O){return s.getToken()===O?(o(),!0):!1}function l(O,L,B,R,q=$t.Error){if(r.length===0||B!==i){let P=oe.create(t.positionAt(B),t.positionAt(R));r.push(Cr.create(P,O,q,L,t.languageId)),i=B}}function f(O,L,B=void 0,R=[],q=[]){let P=s.getTokenOffset(),$=s.getTokenOffset()+s.getTokenLength();if(P===$&&P>0){for(P--;P>0&&/\s/.test(n.charAt(P));)P--;$=P+1}if(l(O,L,P,$),B&&p(B,!1),R.length+q.length>0){let V=s.getToken();for(;V!==17;){if(R.indexOf(V)!==-1){o();break}else if(q.indexOf(V)!==-1)break;V=o()}}return B}function h(){switch(s.getTokenError()){case 4:return f(Z.t("Invalid unicode sequence in string."),ce.InvalidUnicode),!0;case 5:return f(Z.t("Invalid escape character in string."),ce.InvalidEscapeCharacter),!0;case 3:return f(Z.t("Unexpected end of number."),ce.UnexpectedEndOfNumber),!0;case 1:return f(Z.t("Unexpected end of comment."),ce.UnexpectedEndOfComment),!0;case 2:return f(Z.t("Unexpected end of string."),ce.UnexpectedEndOfString),!0;case 6:return f(Z.t("Invalid characters in string. Control characters must be escaped."),ce.InvalidCharacter),!0}return!1}function p(O,L){return O.length=s.getTokenOffset()+s.getTokenLength()-O.offset,L&&o(),O}function m(O){if(s.getToken()!==3)return;let L=new Lv(O,s.getTokenOffset());o();let B=0,R=!1;for(;s.getToken()!==4&&s.getToken()!==17;){if(s.getToken()===5){R||f(Z.t("Value expected"),ce.ValueExpected);let P=s.getTokenOffset();if(o(),s.getToken()===4){R&&l(Z.t("Trailing comma"),ce.TrailingComma,P,P+1);continue}}else R&&f(Z.t("Expected comma"),ce.CommaExpected);let q=_(L);q?L.items.push(q):f(Z.t("Value expected"),ce.ValueExpected,void 0,[],[4,5]),R=!0}return s.getToken()!==4?f(Z.t("Expected comma or closing bracket"),ce.CommaOrCloseBacketExpected,L):p(L,!0)}let v=new zu(void 0,0,0);function S(O,L){let B=new qv(O,s.getTokenOffset(),v),R=g(B);if(!R)if(s.getToken()===16){f(Z.t("Property keys must be doublequoted"),ce.PropertyKeysMustBeDoublequoted);let P=new zu(B,s.getTokenOffset(),s.getTokenLength());P.value=s.getTokenValue(),R=P,o()}else return;if(B.keyNode=R,R.value!=="//"){let P=L[R.value];P?(l(Z.t("Duplicate object key"),ce.DuplicateKey,B.keyNode.offset,B.keyNode.offset+B.keyNode.length,$t.Warning),Li(P)&&l(Z.t("Duplicate object key"),ce.DuplicateKey,P.keyNode.offset,P.keyNode.offset+P.keyNode.length,$t.Warning),L[R.value]=!0):L[R.value]=B}if(s.getToken()===6)B.colonOffset=s.getTokenOffset(),o();else if(f(Z.t("Colon expected"),ce.ColonExpected),s.getToken()===10&&t.positionAt(R.offset+R.length).line<t.positionAt(s.getTokenOffset()).line)return B.length=R.length,B;let q=_(B);return q?(B.valueNode=q,B.length=q.offset+q.length-B.offset,B):f(Z.t("Value expected"),ce.ValueExpected,B,[],[2,5])}function b(O){if(s.getToken()!==1)return;let L=new Cv(O,s.getTokenOffset()),B=Object.create(null);o();let R=!1;for(;s.getToken()!==2&&s.getToken()!==17;){if(s.getToken()===5){R||f(Z.t("Property expected"),ce.PropertyExpected);let P=s.getTokenOffset();if(o(),s.getToken()===2){R&&l(Z.t("Trailing comma"),ce.TrailingComma,P,P+1);continue}}else R&&f(Z.t("Expected comma"),ce.CommaExpected);let q=S(L,B);q?L.properties.push(q):f(Z.t("Property expected"),ce.PropertyExpected,void 0,[],[2,5]),R=!0}return s.getToken()!==2?f(Z.t("Expected comma or closing brace"),ce.CommaOrCloseBraceExpected,L):p(L,!0)}function g(O){if(s.getToken()!==10)return;let L=new zu(O,s.getTokenOffset());return L.value=s.getTokenValue(),p(L,!0)}function k(O){if(s.getToken()!==11)return;let L=new Pv(O,s.getTokenOffset());if(s.getTokenError()===0){let B=s.getTokenValue();try{let R=JSON.parse(B);if(!Vt(R))return f(Z.t("Invalid number format."),ce.Undefined,L);L.value=R}catch{return f(Z.t("Invalid number format."),ce.Undefined,L)}L.isInteger=B.indexOf(".")===-1}return p(L,!0)}function w(O){let L;switch(s.getToken()){case 7:return p(new Nv(O,s.getTokenOffset()),!0);case 8:return p(new fp(O,!0,s.getTokenOffset()),!0);case 9:return p(new fp(O,!1,s.getTokenOffset()),!0);default:return}}function _(O){return m(O)||b(O)||g(O)||k(O)||w(O)}let A;return o()!==17&&(A=_(A),A?s.getToken()!==17&&f(Z.t("End of file expected."),ce.Undefined):f(Z.t("Expected a JSON object, array or literal."),ce.Undefined)),new hp(A,r,a)}var Z,UU,sn,Nv,fp,Lv,Pv,zu,qv,Cv,mO,gO,HU,GU,pp,Rv,Va,Pt,hp,$a=Ae(()=>{y();xi();Vu();$u();Mr();Ev();Z=ia(Ls()),UU={"color-hex":{errorMessage:Z.t("Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:Z.t("String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:Z.t("String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:Z.t("String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:Z.t("String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}))$/},hostname:{errorMessage:Z.t("String is not a hostname."),pattern:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i},ipv4:{errorMessage:Z.t("String is not an IPv4 address."),pattern:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/},ipv6:{errorMessage:Z.t("String is not an IPv6 address."),pattern:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i}},sn=class{constructor(e,r,i=0){this.offset=r,this.length=i,this.parent=e}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}},Nv=class extends sn{constructor(e,r){super(e,r),this.type="null",this.value=null}},fp=class extends sn{constructor(e,r,i){super(e,i),this.type="boolean",this.value=r}},Lv=class extends sn{constructor(e,r){super(e,r),this.type="array",this.items=[]}get children(){return this.items}},Pv=class extends sn{constructor(e,r){super(e,r),this.type="number",this.isInteger=!0,this.value=Number.NaN}},zu=class extends sn{constructor(e,r,i){super(e,r,i),this.type="string",this.value=""}},qv=class extends sn{constructor(e,r,i){super(e,r),this.type="property",this.colonOffset=-1,this.keyNode=i}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},Cv=class extends sn{constructor(e,r){super(e,r),this.type="object",this.properties=[]}get children(){return this.properties}};(function(t){t[t.Key=0]="Key",t[t.Enum=1]="Enum"})(mO||(mO={}));gO="http://json-schema.org/",HU="https://json-schema.org/";GU={"https://json-schema.org/draft-03/schema":cr.v3,"https://json-schema.org/draft-04/schema":cr.v4,"https://json-schema.org/draft-06/schema":cr.v6,"https://json-schema.org/draft-07/schema":cr.v7,"https://json-schema.org/draft/2019-09/schema":cr.v2019_09,"https://json-schema.org/draft/2020-12/schema":cr.v2020_12},pp=class{constructor(e){this.schemaDraft=e}},Rv=class t{constructor(e=-1,r){this.focusOffset=e,this.exclude=r,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){Array.prototype.push.apply(this.schemas,e.schemas)}include(e){return(this.focusOffset===-1||Dv(e,this.focusOffset))&&e!==this.exclude}newSub(){return new t(-1,this.exclude)}},Va=class{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}};Va.instance=new Va;Pt=class{constructor(){this.problems=[],this.propertiesMatches=0,this.processedProperties=new Set,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}hasProblems(){return!!this.problems.length}merge(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches+=e.propertiesMatches,this.propertiesValueMatches+=e.propertiesValueMatches,this.mergeProcessedProperties(e)}mergeEnumValues(e){!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues&&(this.enumValues=this.enumValues.concat(e.enumValues))}updateEnumMismatchProblemMessages(){if(!this.enumValueMatch&&this.enumValues)for(let e of this.problems)e.code===ce.EnumValueMismatch&&(e.message=Z.t("Value is not accepted. Valid values: {0}.",this.enumValues.map(r=>JSON.stringify(r)).join(", ")))}mergePropertyMatch(e){this.problems=this.problems.concat(e.problems),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&e.enumValues.length===1&&this.primaryValueMatches++}mergeProcessedProperties(e){e.processedProperties.forEach(r=>this.processedProperties.add(r))}compare(e){let r=this.hasProblems();return r!==e.hasProblems()?r?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches}};hp=class{constructor(e,r=[],i=[]){this.root=e,this.syntaxErrors=r,this.comments=i}getNodeFromOffset(e,r=!1){if(this.root)return bg(this.root,e,r)}visit(e){if(this.root){let r=i=>{let n=e(i),s=i.children;if(Array.isArray(s))for(let a=0;a<s.length&&n;a++)n=r(s[a]);return n};r(this.root)}}validate(e,r,i=$t.Warning,n){if(this.root&&r){let s=new Pt;return Lt(this.root,r,s,Va.instance,new pp(n??yO(r))),s.problems.map(a=>{let o=oe.create(e.positionAt(a.location.offset),e.positionAt(a.location.offset+a.location.length));return Cr.create(o,a.message,a.severity??i,a.code)})}}getMatchingSchemas(e,r=-1,i){if(this.root&&e){let n=new Rv(r,i),s=yO(e),a=new pp(s);return Lt(this.root,e,new Pt,n,a),n.schemas}return[]}}});function dp(t,e,r){if(t!==null&&typeof t=="object"){let i=e+" ";if(Array.isArray(t)){if(t.length===0)return"[]";let n=`[
|
|
1182
|
-
`;for(let s=0;s<t.length;s++)n+=i+dp(t[s],i,r),s<t.length-1&&(n+=","),n+=`
|
|
1183
|
-
`;return n+=e+"]",n}else{let n=Object.keys(t);if(n.length===0)return"{}";let s=`{
|
|
1184
|
-
`;for(let a=0;a<n.length;a++){let o=n[a];s+=i+JSON.stringify(o)+": "+dp(t[o],i,r),a<n.length-1&&(s+=","),s+=`
|
|
1185
|
-
`}return s+=e+"}",s}}return r(t)}var bO=Ae(()=>{y()});var Ku,WU,zU,mp,SO=Ae(()=>{y();$a();xi();bO();$u();Vu();Mr();Ku=ia(Ls()),WU=[",","}","]"],zU=[":"],mp=class{constructor(e,r=[],i=Promise,n={}){this.schemaService=e,this.contributions=r,this.promiseConstructor=i,this.clientCapabilities=n}doResolve(e){for(let r=this.contributions.length-1;r>=0;r--){let i=this.contributions[r].resolveCompletion;if(i){let n=i(e);if(n)return n}}return this.promiseConstructor.resolve(e)}doComplete(e,r,i){let n={items:[],isIncomplete:!1},s=e.getText(),a=e.offsetAt(r),o=i.getNodeFromOffset(a,!0);if(this.isInComment(e,o?o.offset:0,a))return Promise.resolve(n);if(o&&a===o.offset+o.length&&a>0){let m=s[a-1];(o.type==="object"&&m==="}"||o.type==="array"&&m==="]")&&(o=o.parent)}let u=this.getCurrentWord(e,a),l;if(o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null"))l=oe.create(e.positionAt(o.offset),e.positionAt(o.offset+o.length));else{let m=a-u.length;m>0&&s[m-1]==='"'&&m--,l=oe.create(e.positionAt(m),r)}let f=!1,h=new Map,p={add:m=>{let v=m.label,S=h.get(v);if(S)S.documentation||(S.documentation=m.documentation),S.detail||(S.detail=m.detail),S.labelDetails||(S.labelDetails=m.labelDetails);else{if(v=v.replace(/[\n]/g,"\u21B5"),v.length>60){let b=v.substr(0,57).trim()+"...";h.has(b)||(v=b)}m.textEdit=rr.replace(l,m.insertText),f&&(m.commitCharacters=m.kind===Ut.Property?zU:WU),m.label=v,h.set(v,m),n.items.push(m)}},setAsIncomplete:()=>{n.isIncomplete=!0},error:m=>{console.error(m)},getNumberOfProposals:()=>n.items.length};return this.schemaService.getSchemaForResource(e.uri,i).then(m=>{let v=[],S=!0,b="",g;if(o&&o.type==="string"){let w=o.parent;w&&w.type==="property"&&w.keyNode===o&&(S=!w.valueNode,g=w,b=s.substr(o.offset+1,o.length-2),w&&(o=w.parent))}if(o&&o.type==="object"){if(o.offset===a)return n;o.properties.forEach(E=>{(!g||g!==E)&&h.set(E.keyNode.value,Fa.create("__"))});let _="";S&&(_=this.evaluateSeparatorAfter(e,e.offsetAt(l.end))),m?this.getPropertyCompletions(m,i,o,S,_,p):this.getSchemaLessPropertyCompletions(i,o,b,p);let A=Ju(o);this.contributions.forEach(E=>{let O=E.collectPropertyCompletions(e.uri,A,u,S,_==="",p);O&&v.push(O)}),!m&&u.length>0&&s.charAt(a-u.length-1)!=='"'&&(p.add({kind:Ut.Property,label:this.getLabelForValue(u),insertText:this.getInsertTextForProperty(u,void 0,!1,_),insertTextFormat:Ke.Snippet,documentation:""}),p.setAsIncomplete())}let k={};return m?this.getValueCompletions(m,i,o,a,e,p,k):this.getSchemaLessValueCompletions(i,o,a,e,p),this.contributions.length>0&&this.getContributedValueCompletions(i,o,a,e,p,v),this.promiseConstructor.all(v).then(()=>{if(p.getNumberOfProposals()===0){let w=a;o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null")&&(w=o.offset+o.length);let _=this.evaluateSeparatorAfter(e,w);this.addFillerValueCompletions(k,_,p)}return n})})}getPropertyCompletions(e,r,i,n,s,a){r.getMatchingSchemas(e.schema,i.offset).forEach(u=>{if(u.node===i&&!u.inverted){let l=u.schema.properties;l&&Object.keys(l).forEach(h=>{let p=l[h];if(typeof p=="object"&&!p.deprecationMessage&&!p.doNotSuggest){let m={kind:Ut.Property,label:h,insertText:this.getInsertTextForProperty(h,p,n,s),insertTextFormat:Ke.Snippet,filterText:this.getFilterTextForValue(h),documentation:this.fromMarkup(p.markdownDescription)||p.description||""};p.completionDetail!==void 0&&(m.detail=p.completionDetail),p.suggestSortText!==void 0&&(m.sortText=p.suggestSortText),m.insertText&&An(m.insertText,`$1${s}`)&&(m.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(m)}});let f=u.schema.propertyNames;if(typeof f=="object"&&!f.deprecationMessage&&!f.doNotSuggest){let h=(p,m,v,S)=>{let b={kind:Ut.Property,label:p,insertText:this.getInsertTextForProperty(p,void 0,n,s),insertTextFormat:Ke.Snippet,filterText:this.getFilterTextForValue(p),documentation:m||this.fromMarkup(f.markdownDescription)||f.description||"",sortText:S,detail:v};b.insertText&&An(b.insertText,`$1${s}`)&&(b.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(b)};if(f.enum)for(let p=0;p<f.enum.length;p++){let m;f.markdownEnumDescriptions&&p<f.markdownEnumDescriptions.length?m=this.fromMarkup(f.markdownEnumDescriptions[p]):f.enumDescriptions&&p<f.enumDescriptions.length&&(m=f.enumDescriptions[p]);let v=f.enumSortTexts?.[p],S=f.enumDetails?.[p];h(f.enum[p],m,S,v)}if(f.examples)for(let p=0;p<f.examples.length;p++)h(f.examples[p],void 0,void 0,void 0);f.const&&h(f.const,void 0,f.completionDetail,f.suggestSortText)}}})}getSchemaLessPropertyCompletions(e,r,i,n){let s=a=>{a.properties.forEach(o=>{let u=o.keyNode.value;n.add({kind:Ut.Property,label:u,insertText:this.getInsertTextForValue(u,""),insertTextFormat:Ke.Snippet,filterText:this.getFilterTextForValue(u),documentation:""})})};if(r.parent)if(r.parent.type==="property"){let a=r.parent.keyNode.value;e.visit(o=>(o.type==="property"&&o!==r.parent&&o.keyNode.value===a&&o.valueNode&&o.valueNode.type==="object"&&s(o.valueNode),!0))}else r.parent.type==="array"&&r.parent.items.forEach(a=>{a.type==="object"&&a!==r&&s(a)});else r.type==="object"&&n.add({kind:Ut.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:Ke.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(e,r,i,n,s){let a=i;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(a=r.offset+r.length,r=r.parent),!r){s.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:Ke.Snippet,documentation:""}),s.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:Ke.Snippet,documentation:""});return}let o=this.evaluateSeparatorAfter(n,a),u=l=>{l.parent&&!Dv(l.parent,i,!0)&&s.add({kind:this.getSuggestionKind(l.type),label:this.getLabelTextForMatchingNode(l,n),insertText:this.getInsertTextForMatchingNode(l,n,o),insertTextFormat:Ke.Snippet,documentation:""}),l.type==="boolean"&&this.addBooleanValueCompletion(!l.value,o,s)};if(r.type==="property"&&i>(r.colonOffset||0)){let l=r.valueNode;if(l&&(i>l.offset+l.length||l.type==="object"||l.type==="array"))return;let f=r.keyNode.value;e.visit(h=>(h.type==="property"&&h.keyNode.value===f&&h.valueNode&&u(h.valueNode),!0)),f==="$schema"&&r.parent&&!r.parent.parent&&this.addDollarSchemaCompletions(o,s)}if(r.type==="array")if(r.parent&&r.parent.type==="property"){let l=r.parent.keyNode.value;e.visit(f=>(f.type==="property"&&f.keyNode.value===l&&f.valueNode&&f.valueNode.type==="array"&&f.valueNode.items.forEach(u),!0))}else r.items.forEach(u)}getValueCompletions(e,r,i,n,s,a,o){let u=n,l,f;if(i&&(i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(u=i.offset+i.length,f=i,i=i.parent),!i){this.addSchemaValueCompletions(e.schema,"",a,o);return}if(i.type==="property"&&n>(i.colonOffset||0)){let h=i.valueNode;if(h&&n>h.offset+h.length)return;l=i.keyNode.value,i=i.parent}if(i&&(l!==void 0||i.type==="array")){let h=this.evaluateSeparatorAfter(s,u),p=r.getMatchingSchemas(e.schema,i.offset,f);for(let m of p)if(m.node===i&&!m.inverted&&m.schema){if(i.type==="array"&&m.schema.items){let v=a;if(m.schema.uniqueItems){let S=new Set;i.children.forEach(b=>{b.type!=="array"&&b.type!=="object"&&S.add(this.getLabelForValue(qi(b)))}),v={...a,add(b){S.has(b.label)||a.add(b)}}}if(Array.isArray(m.schema.items)){let S=this.findItemAtOffset(i,s,n);S<m.schema.items.length&&this.addSchemaValueCompletions(m.schema.items[S],h,v,o)}else this.addSchemaValueCompletions(m.schema.items,h,v,o)}if(l!==void 0){let v=!1;if(m.schema.properties){let S=m.schema.properties[l];S&&(v=!0,this.addSchemaValueCompletions(S,h,a,o))}if(m.schema.patternProperties&&!v){for(let S of Object.keys(m.schema.patternProperties))if(Es(S)?.test(l)){v=!0;let g=m.schema.patternProperties[S];this.addSchemaValueCompletions(g,h,a,o)}}if(m.schema.additionalProperties&&!v){let S=m.schema.additionalProperties;this.addSchemaValueCompletions(S,h,a,o)}}}l==="$schema"&&!i.parent&&this.addDollarSchemaCompletions(h,a),o.boolean&&(this.addBooleanValueCompletion(!0,h,a),this.addBooleanValueCompletion(!1,h,a)),o.null&&this.addNullValueCompletion(h,a)}}getContributedValueCompletions(e,r,i,n,s,a){if(!r)this.contributions.forEach(o=>{let u=o.collectDefaultCompletions(n.uri,s);u&&a.push(u)});else if((r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(r=r.parent),r&&r.type==="property"&&i>(r.colonOffset||0)){let o=r.keyNode.value,u=r.valueNode;if((!u||i<=u.offset+u.length)&&r.parent){let l=Ju(r.parent);this.contributions.forEach(f=>{let h=f.collectValueCompletions(n.uri,l,o,s);h&&a.push(h)})}}}addSchemaValueCompletions(e,r,i,n){typeof e=="object"&&(this.addEnumValueCompletions(e,r,i),this.addDefaultValueCompletions(e,r,i),this.collectTypes(e,n),Array.isArray(e.allOf)&&e.allOf.forEach(s=>this.addSchemaValueCompletions(s,r,i,n)),Array.isArray(e.anyOf)&&e.anyOf.forEach(s=>this.addSchemaValueCompletions(s,r,i,n)),Array.isArray(e.oneOf)&&e.oneOf.forEach(s=>this.addSchemaValueCompletions(s,r,i,n)))}addDefaultValueCompletions(e,r,i,n=0){let s=!1;if(qr(e.default)){let a=e.type,o=e.default;for(let l=n;l>0;l--)o=[o],a="array";let u={kind:this.getSuggestionKind(a),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,r),insertTextFormat:Ke.Snippet};this.doesSupportsLabelDetails()?u.labelDetails={description:Ku.t("Default value")}:u.detail=Ku.t("Default value"),i.add(u),s=!0}Array.isArray(e.examples)&&e.examples.forEach(a=>{let o=e.type,u=a;for(let l=n;l>0;l--)u=[u],o="array";i.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(u),insertText:this.getInsertTextForValue(u,r),insertTextFormat:Ke.Snippet}),s=!0}),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach(a=>{let o=e.type,u=a.body,l=a.label,f,h;if(qr(u)){let p=e.type;for(let m=n;m>0;m--)u=[u],p="array";f=this.getInsertTextForSnippetValue(u,r),h=this.getFilterTextForSnippetValue(u),l=l||this.getLabelForSnippetValue(u)}else if(typeof a.bodyText=="string"){let p="",m="",v="";for(let S=n;S>0;S--)p=p+v+`[
|
|
1186
|
-
`,m=m+`
|
|
1187
|
-
`+v+"]",v+=" ",o="array";f=p+v+a.bodyText.split(`
|
|
1188
|
-
`).join(`
|
|
1189
|
-
`+v)+m+r,l=l||f,h=f.replace(/[\n]/g,"")}else return;i.add({kind:this.getSuggestionKind(o),label:l,documentation:this.fromMarkup(a.markdownDescription)||a.description,insertText:f,insertTextFormat:Ke.Snippet,filterText:h}),s=!0}),!s&&typeof e.items=="object"&&!Array.isArray(e.items)&&n<5&&this.addDefaultValueCompletions(e.items,r,i,n+1)}addEnumValueCompletions(e,r,i){if(qr(e.const)&&i.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,r),insertTextFormat:Ke.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let n=0,s=e.enum.length;n<s;n++){let a=e.enum[n],o=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&n<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?o=this.fromMarkup(e.markdownEnumDescriptions[n]):e.enumDescriptions&&n<e.enumDescriptions.length&&(o=e.enumDescriptions[n]),i.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,r),insertTextFormat:Ke.Snippet,sortText:e.enumSortTexts?.[n],detail:e.enumDetails?.[n],documentation:o})}}collectTypes(e,r){if(Array.isArray(e.enum)||qr(e.const))return;let i=e.type;Array.isArray(i)?i.forEach(n=>r[n]=!0):i&&(r[i]=!0)}addFillerValueCompletions(e,r,i){e.object&&i.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},r),insertTextFormat:Ke.Snippet,detail:Ku.t("New object"),documentation:""}),e.array&&i.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],r),insertTextFormat:Ke.Snippet,detail:Ku.t("New array"),documentation:""})}addBooleanValueCompletion(e,r,i){i.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,r),insertTextFormat:Ke.Snippet,documentation:""})}addNullValueCompletion(e,r){r.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:Ke.Snippet,documentation:""})}addDollarSchemaCompletions(e,r){this.schemaService.getRegisteredSchemaIds(n=>n==="http"||n==="https").forEach(n=>{n.startsWith("https://json-schema.org/draft-")&&(n=n+"#"),r.add({kind:Ut.Module,label:this.getLabelForValue(n),filterText:this.getFilterTextForValue(n),insertText:this.getInsertTextForValue(n,e),insertTextFormat:Ke.Snippet,documentation:""})})}getLabelForValue(e){return JSON.stringify(e)}getValueFromLabel(e){return JSON.parse(e)}getFilterTextForValue(e){return JSON.stringify(e)}getFilterTextForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(e){return e.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(e,r){let i=JSON.stringify(e,null," ");return i==="{}"?"{$1}"+r:i==="[]"?"[$1]"+r:this.getInsertTextForPlainText(i+r)}getInsertTextForSnippetValue(e,r){return dp(e,"",n=>typeof n=="string"&&n[0]==="^"?n.substr(1):JSON.stringify(n))+r}getInsertTextForGuessedValue(e,r){switch(typeof e){case"object":return e===null?"${1:null}"+r:this.getInsertTextForValue(e,r);case"string":let i=JSON.stringify(e);return i=i.substr(1,i.length-2),i=this.getInsertTextForPlainText(i),'"${1:'+i+'}"'+r;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+r}return this.getInsertTextForValue(e,r)}getSuggestionKind(e){if(Array.isArray(e)){let r=e;e=r.length>0?r[0]:void 0}if(!e)return Ut.Value;switch(e){case"string":return Ut.Value;case"object":return Ut.Module;case"property":return Ut.Property;default:return Ut.Value}}getLabelTextForMatchingNode(e,r){switch(e.type){case"array":return"[]";case"object":return"{}";default:return r.getText().substr(e.offset,e.length)}}getInsertTextForMatchingNode(e,r,i){switch(e.type){case"array":return this.getInsertTextForValue([],i);case"object":return this.getInsertTextForValue({},i);default:let n=r.getText().substr(e.offset,e.length)+i;return this.getInsertTextForPlainText(n)}}getInsertTextForProperty(e,r,i,n){let s=this.getInsertTextForValue(e,"");if(!i)return s;let a=s+": ",o,u=0;if(r){if(Array.isArray(r.defaultSnippets)){if(r.defaultSnippets.length===1){let l=r.defaultSnippets[0].body;qr(l)&&(o=this.getInsertTextForSnippetValue(l,""))}u+=r.defaultSnippets.length}if(r.enum&&(!o&&r.enum.length===1&&(o=this.getInsertTextForGuessedValue(r.enum[0],"")),u+=r.enum.length),qr(r.const)&&(o||(o=this.getInsertTextForGuessedValue(r.const,"")),u++),qr(r.default)&&(o||(o=this.getInsertTextForGuessedValue(r.default,"")),u++),Array.isArray(r.examples)&&r.examples.length&&(o||(o=this.getInsertTextForGuessedValue(r.examples[0],"")),u+=r.examples.length),u===0){let l=Array.isArray(r.type)?r.type[0]:r.type;switch(l||(r.properties?l="object":r.items&&(l="array")),l){case"boolean":o="$1";break;case"string":o='"$1"';break;case"object":o="{$1}";break;case"array":o="[$1]";break;case"number":case"integer":o="${1:0}";break;case"null":o="${1:null}";break;default:return s}}}return(!o||u>1)&&(o="$1"),a+o+n}getCurrentWord(e,r){let i=r-1,n=e.getText();for(;i>=0&&`
|
|
1190
|
-
\r\v":{[,]}`.indexOf(n.charAt(i))===-1;)i--;return n.substring(i+1,r)}evaluateSeparatorAfter(e,r){let i=Nr(e.getText(),!0);switch(i.setPosition(r),i.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(e,r,i){let n=Nr(r.getText(),!0),s=e.items;for(let a=s.length-1;a>=0;a--){let o=s[a];if(i>o.offset+o.length)return n.setPosition(o.offset+o.length),n.scan()===5&&i>=n.getTokenOffset()+n.getTokenLength()?a+1:a;if(i>=o.offset)return a}return 0}isInComment(e,r,i){let n=Nr(e.getText(),!1);n.setPosition(r);let s=n.scan();for(;s!==17&&n.getTokenOffset()+n.getTokenLength()<i;)s=n.scan();return(s===12||s===13)&&n.getTokenOffset()<=i}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:Pi.Markdown,value:e}}doesSupportMarkdown(){if(!qr(this.supportsMarkdown)){let e=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(e)&&e.indexOf(Pi.Markdown)!==-1}return this.supportsMarkdown}doesSupportsCommitCharacters(){return qr(this.supportsCommitCharacters)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return qr(this.labelDetailsSupport)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}}});function jv(t){if(t)return t.trim().replace(/[\\`*_{}[\]()<>#+\-.!]/g,"\\$&").replace(/(^ +)/mg,(e,r)=>" ".repeat(r.length)).replace(/( {2,})/g,(e,r)=>" "+" ".repeat(r.length-1)).replace(/(\t+)/g,(e,r)=>" ".repeat(r.length*4)).replace(/\n/g,`\\
|
|
1191
|
-
`)}function JU(t){return t.indexOf("`")!==-1?"`` "+t+" ``":t}var gp,wO=Ae(()=>{y();$a();Mr();gp=class{constructor(e,r=[],i){this.schemaService=e,this.contributions=r,this.promise=i||Promise}doHover(e,r,i){let n=e.offsetAt(r),s=i.getNodeFromOffset(n);if(!s||(s.type==="object"||s.type==="array")&&n>s.offset+1&&n<s.offset+s.length-1)return this.promise.resolve(null);let a=s;if(s.type==="string"){let f=s.parent;if(f&&f.type==="property"&&f.keyNode===s&&(s=f.valueNode,!s))return this.promise.resolve(null)}let o=oe.create(e.positionAt(a.offset),e.positionAt(a.offset+a.length)),u=f=>({contents:f,range:o}),l=Ju(s);for(let f=this.contributions.length-1;f>=0;f--){let p=this.contributions[f].getInfoContribution(e.uri,l);if(p)return p.then(m=>u(m))}return this.schemaService.getSchemaForResource(e.uri,i).then(f=>{if(!f)return null;let h,p,m,v,S=i.getMatchingSchemas(f.schema,s.offset).filter(g=>g.node===s&&!g.inverted).map(g=>g.schema);for(let g of S)if(h=h||g.title,p=p||g.markdownDescription||jv(g.description),g.enum){let k=g.enum.indexOf(qi(s));g.markdownEnumDescriptions?m=g.markdownEnumDescriptions[k]:g.enumDescriptions&&(m=jv(g.enumDescriptions[k])),m&&(v=g.enum[k],typeof v!="string"&&(v=JSON.stringify(v)))}let b="";return h&&(b=jv(h)),p&&(b.length>0&&(b+=`
|
|
1192
|
-
|
|
1193
|
-
`),b+=p),m&&(b.length>0&&(b+=`
|
|
1194
|
-
|
|
1195
|
-
`),b+=`\`${JU(v)}\`: ${m}`),u([b])})}}});function kO(t){if(t&&typeof t=="object"){if(Zr(t.allowComments))return t.allowComments;if(t.allOf)for(let e of t.allOf){let r=kO(e);if(Zr(r))return r}}}function IO(t){if(t&&typeof t=="object"){if(Zr(t.allowTrailingCommas))return t.allowTrailingCommas;let e=t;if(Zr(e.allowsTrailingCommas))return e.allowsTrailingCommas;if(t.allOf)for(let r of t.allOf){let i=IO(r);if(Zr(i))return i}}}function yp(t){switch(t){case"error":return $t.Error;case"warning":return $t.Warning;case"ignore":return}}var xO,_p,KU,AO=Ae(()=>{y();Mr();xO=ia(Ls());Vu();_p=class{constructor(e,r){this.jsonSchemaService=e,this.promise=r,this.validationEnabled=!0}configure(e){e&&(this.validationEnabled=e.validate!==!1,this.commentSeverity=e.allowComments?void 0:$t.Error)}doValidation(e,r,i,n){if(!this.validationEnabled)return this.promise.resolve([]);let s=[],a={},o=l=>{let f=l.range.start.line+" "+l.range.start.character+" "+l.message;a[f]||(a[f]=!0,s.push(l))},u=l=>{let f=i?.trailingCommas?yp(i.trailingCommas):$t.Error,h=i?.comments?yp(i.comments):this.commentSeverity,p=i?.schemaValidation?yp(i.schemaValidation):$t.Warning,m=i?.schemaRequest?yp(i.schemaRequest):$t.Warning;if(l){let v=(S,b,g)=>{if(r.root&&m){let k=r.root,w=k.type==="object"?k.properties[0]:void 0;if(w&&w.keyNode.value==="$schema"){let _=w.valueNode||w,A=oe.create(e.positionAt(_.offset),e.positionAt(_.offset+_.length));o(Cr.create(A,S,m,b,"json",g))}else{let _=oe.create(e.positionAt(k.offset),e.positionAt(k.offset+1));o(Cr.create(_,S,m,b,"json",g))}}};if(l.errors.length){let S=l.errors[0];v(S.message,S.code,S.relatedInformation)}else if(p){for(let b of l.warnings)v(b.message,b.code,b.relatedInformation);let S=r.validate(e,l.schema,p,i?.schemaDraft);S&&S.forEach(o)}kO(l.schema)&&(h=void 0),IO(l.schema)&&(f=void 0)}for(let v of r.syntaxErrors){if(v.code===ce.TrailingComma){if(typeof f!="number")continue;v.severity=f}o(v)}if(typeof h=="number"){let v=xO.t("Comments are not permitted in JSON.");r.comments.forEach(S=>{o(Cr.create(S,v,h,ce.CommentNotPermitted))})}return s};if(n){let l=n.id||"schemaservice://untitled/"+KU++;return this.jsonSchemaService.registerExternalSchema({uri:l,schema:n}).getResolvedSchema().then(h=>u(h))}return this.jsonSchemaService.getSchemaForResource(e.uri,r).then(l=>u(l))}getLanguageStatus(e,r){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(e.uri,r)}}},KU=0});function ut(t){return t<48?0:t<=57?t-48:(t<97&&(t+=32),t>=97&&t<=102?t-97+10:0)}function TO(t){if(t[0]==="#")switch(t.length){case 4:return{red:ut(t.charCodeAt(1))*17/255,green:ut(t.charCodeAt(2))*17/255,blue:ut(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:ut(t.charCodeAt(1))*17/255,green:ut(t.charCodeAt(2))*17/255,blue:ut(t.charCodeAt(3))*17/255,alpha:ut(t.charCodeAt(4))*17/255};case 7:return{red:(ut(t.charCodeAt(1))*16+ut(t.charCodeAt(2)))/255,green:(ut(t.charCodeAt(3))*16+ut(t.charCodeAt(4)))/255,blue:(ut(t.charCodeAt(5))*16+ut(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(ut(t.charCodeAt(1))*16+ut(t.charCodeAt(2)))/255,green:(ut(t.charCodeAt(3))*16+ut(t.charCodeAt(4)))/255,blue:(ut(t.charCodeAt(5))*16+ut(t.charCodeAt(6)))/255,alpha:(ut(t.charCodeAt(7))*16+ut(t.charCodeAt(8)))/255}}}var EO=Ae(()=>{y()});function On(t,e){return oe.create(t.positionAt(e.offset),t.positionAt(e.offset+e.length))}function OO(t){return qi(t)||NO.t("<empty>")}var NO,vp,LO=Ae(()=>{y();$a();$u();EO();NO=ia(Ls());Mr();vp=class{constructor(e){this.schemaService=e}findDocumentSymbols(e,r,i={resultLimit:Number.MAX_VALUE}){let n=r.root;if(!n)return[];let s=i.resultLimit||Number.MAX_VALUE,a=e.uri;if((a==="vscode://defaultsettings/keybindings.json"||An(a.toLowerCase(),"/user/keybindings.json"))&&n.type==="array"){let p=[];for(let m of n.items)if(m.type==="object"){for(let v of m.properties)if(v.keyNode.value==="key"&&v.valueNode){let S=nn.create(e.uri,On(e,m));if(p.push({name:OO(v.valueNode),kind:Rr.Function,location:S}),s--,s<=0)return i&&i.onResultLimitExceeded&&i.onResultLimitExceeded(a),p}}return p}let o=[{node:n,containerName:""}],u=0,l=!1,f=[],h=(p,m)=>{p.type==="array"?p.items.forEach(v=>{v&&o.push({node:v,containerName:m})}):p.type==="object"&&p.properties.forEach(v=>{let S=v.valueNode;if(S)if(s>0){s--;let b=nn.create(e.uri,On(e,v)),g=m?m+"."+v.keyNode.value:v.keyNode.value;f.push({name:this.getKeyLabel(v),kind:this.getSymbolKind(S.type),location:b,containerName:m}),o.push({node:S,containerName:g})}else l=!0})};for(;u<o.length;){let p=o[u++];h(p.node,p.containerName)}return l&&i&&i.onResultLimitExceeded&&i.onResultLimitExceeded(a),f}findDocumentSymbols2(e,r,i={resultLimit:Number.MAX_VALUE}){let n=r.root;if(!n)return[];let s=i.resultLimit||Number.MAX_VALUE,a=e.uri;if((a==="vscode://defaultsettings/keybindings.json"||An(a.toLowerCase(),"/user/keybindings.json"))&&n.type==="array"){let p=[];for(let m of n.items)if(m.type==="object"){for(let v of m.properties)if(v.keyNode.value==="key"&&v.valueNode){let S=On(e,m),b=On(e,v.keyNode);if(p.push({name:OO(v.valueNode),kind:Rr.Function,range:S,selectionRange:b}),s--,s<=0)return i&&i.onResultLimitExceeded&&i.onResultLimitExceeded(a),p}}return p}let o=[],u=[{node:n,result:o}],l=0,f=!1,h=(p,m)=>{p.type==="array"?p.items.forEach((v,S)=>{if(v)if(s>0){s--;let b=On(e,v),g=b,w={name:String(S),kind:this.getSymbolKind(v.type),range:b,selectionRange:g,children:[]};m.push(w),u.push({result:w.children,node:v})}else f=!0}):p.type==="object"&&p.properties.forEach(v=>{let S=v.valueNode;if(S)if(s>0){s--;let b=On(e,v),g=On(e,v.keyNode),k=[],w={name:this.getKeyLabel(v),kind:this.getSymbolKind(S.type),range:b,selectionRange:g,children:k,detail:this.getDetail(S)};m.push(w),u.push({result:k,node:S})}else f=!0})};for(;l<u.length;){let p=u[l++];h(p.node,p.result)}return f&&i&&i.onResultLimitExceeded&&i.onResultLimitExceeded(a),o}getSymbolKind(e){switch(e){case"object":return Rr.Module;case"string":return Rr.String;case"number":return Rr.Number;case"array":return Rr.Array;case"boolean":return Rr.Boolean;default:return Rr.Variable}}getKeyLabel(e){let r=e.keyNode.value;return r&&(r=r.replace(/[\n]/g,"\u21B5")),r&&r.trim()?r:`"${r}"`}getDetail(e){if(e){if(e.type==="boolean"||e.type==="number"||e.type==="null"||e.type==="string")return String(e.value);if(e.type==="array")return e.children.length?void 0:"[]";if(e.type==="object")return e.children.length?void 0:"{}"}}findDocumentColors(e,r,i){return this.schemaService.getSchemaForResource(e.uri,r).then(n=>{let s=[];if(n){let a=i&&typeof i.resultLimit=="number"?i.resultLimit:Number.MAX_VALUE,o=r.getMatchingSchemas(n.schema),u={};for(let l of o)if(!l.inverted&&l.schema&&(l.schema.format==="color"||l.schema.format==="color-hex")&&l.node&&l.node.type==="string"){let f=String(l.node.offset);if(!u[f]){let h=TO(qi(l.node));if(h){let p=On(e,l.node);s.push({color:h,range:p})}if(u[f]=!0,a--,a<=0)return i&&i.onResultLimitExceeded&&i.onResultLimitExceeded(e.uri),s}}}return s})}getColorPresentations(e,r,i,n){let s=[],a=Math.round(i.red*255),o=Math.round(i.green*255),u=Math.round(i.blue*255);function l(h){let p=h.toString(16);return p.length!==2?"0"+p:p}let f;return i.alpha===1?f=`#${l(a)}${l(o)}${l(u)}`:f=`#${l(a)}${l(o)}${l(u)}${l(Math.round(i.alpha*255))}`,s.push({label:f,textEdit:rr.replace(n,JSON.stringify(f))}),s}}});var PO,qO=Ae(()=>{y();PO={$id:"https://json-schema.org/draft/2019-09/schema",$schema:"https://json-schema.org/draft/2019-09/schema",title:"(Flattened static) Core and Validation specifications meta-schema",type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/$defs/stringArray"}]}},$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$ref:"#"},default:{}},additionalItems:{$ref:"#"},unevaluatedItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$ref:"#"},additionalProperties:{$ref:"#"},unevaluatedProperties:{$ref:"#"},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$ref:"#"}},propertyNames:{$ref:"#"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$ref:"#"},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$ref:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var CO,RO=Ae(()=>{y();CO={$id:"https://json-schema.org/draft/2020-12/schema",$schema:"https://json-schema.org/draft/2020-12/schema",title:"(Flattened static) Core and Validation specifications meta-schema",type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/$defs/stringArray"}]}},$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},$ref:{type:"string",format:"uri-reference"},$dynamicRef:{type:"string",format:"uri-reference"},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$ref:"#"},default:{}},prefixItems:{$ref:"#/$defs/schemaArray"},items:{$ref:"#"},contains:{$ref:"#"},additionalProperties:{$ref:"#"},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$ref:"#"}},propertyNames:{$ref:"#"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$ref:"#"},unevaluatedItems:{$ref:"#"},unevaluatedProperties:{$ref:"#"},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$ref:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}}});var le,bp,QU,MO=Ae(()=>{y();qO();RO();le=ia(Ls()),bp={schemaAssociations:[],schemas:{"https://json-schema.org/draft-04/schema":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"https://json-schema.org/draft-07/schema":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0},"https://json-schema.org/draft/2020-12/schema":CO,"https://json-schema.org/draft/2019-09/schema":PO}},QU={id:le.t("A unique identifier for the schema."),$schema:le.t("The schema to verify this document against."),title:le.t("A descriptive title of the schema."),description:le.t("A long description of the schema. Used in hover menus and suggestions."),default:le.t("A default value. Used by suggestions."),multipleOf:le.t("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:le.t("The maximum numerical value, inclusive by default."),exclusiveMaximum:le.t("Makes the maximum property exclusive."),minimum:le.t("The minimum numerical value, inclusive by default."),exclusiveMinimum:le.t("Makes the minimum property exclusive."),maxLength:le.t("The maximum length of a string."),minLength:le.t("The minimum length of a string."),pattern:le.t("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:le.t("For arrays, only when items is set as an array. If items are a schema, this schema validates items after the ones specified by the items schema. If false, additional items will cause validation to fail."),items:le.t("For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:le.t("The maximum number of items that can be inside an array. Inclusive."),minItems:le.t("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:le.t("If all of the items in the array must be unique. Defaults to false."),maxProperties:le.t("The maximum number of properties an object can have. Inclusive."),minProperties:le.t("The minimum number of properties an object can have. Inclusive."),required:le.t("An array of strings that lists the names of all properties required on this object."),additionalProperties:le.t("Either a schema or a boolean. If a schema, used to validate all properties not matched by 'properties', 'propertyNames', or 'patternProperties'. If false, any properties not defined by the adjacent keywords will cause this schema to fail."),definitions:le.t("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:le.t("A map of property names to schemas for each property."),patternProperties:le.t("A map of regular expressions on property names to schemas for matching properties."),dependencies:le.t("A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:le.t("The set of literal values that are valid."),type:le.t("Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:le.t("Describes the format expected for the value. By default, not used for validation"),allOf:le.t("An array of schemas, all of which must match."),anyOf:le.t("An array of schemas, where at least one must match."),oneOf:le.t("An array of schemas, exactly one of which must match."),not:le.t("A schema which must not match."),$id:le.t("A unique identifier for the schema."),$ref:le.t("Reference a definition hosted on any location."),$comment:le.t("Comments from schema authors to readers or maintainers of the schema."),readOnly:le.t("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:le.t("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:le.t('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:le.t("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:le.t("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:le.t("Describes the media type of a string property."),contentEncoding:le.t("Describes the content encoding of a string property."),if:le.t('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:le.t('The "then" subschema is used for validation when the "if" subschema succeeds.'),else:le.t('The "else" subschema is used for validation when the "if" subschema fails.')};for(let t in bp.schemas){let e=bp.schemas[t];for(let r in e.properties){let i=e.properties[r];typeof i=="boolean"&&(i=e.properties[r]={});let n=QU[r];n&&(i.description=n)}}});function DO(t,e){if(typeof t!="string")throw new TypeError("Expected a string");let r=String(t),i="",n=e?!!e.extended:!1,s=e?!!e.globstar:!1,a=!1,o=e&&typeof e.flags=="string"?e.flags:"",u;for(let l=0,f=r.length;l<f;l++)switch(u=r[l],u){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":i+="\\"+u;break;case"?":if(n){i+=".";break}case"[":case"]":if(n){i+=u;break}case"{":if(n){a=!0,i+="(";break}case"}":if(n){a=!1,i+=")";break}case",":if(a){i+="|";break}i+="\\"+u;break;case"*":let h=r[l-1],p=1;for(;r[l+1]==="*";)p++,l++;let m=r[l+1];s?p>1&&(h==="/"||h===void 0||h==="{"||h===",")&&(m==="/"||m===void 0||m===","||m==="}")?(m==="/"?l++:h==="/"&&i.endsWith("\\/")&&(i=i.substr(0,i.length-2)),i+="((?:[^/]*(?:/|$))*)"):i+="([^/]*)":i+=".*";break;default:i+=u}return(!o||!~o.indexOf("g"))&&(i="^"+i+"$"),new RegExp(i,o)}var FO=Ae(()=>{y()});function Ci(t,e,r){let i=r?[{location:{uri:r,range:oe.create(0,0,0,0)},message:t}]:void 0;return{message:t,code:e,relatedInformation:i}}function jO(t){try{return Ba.parse(t).with({fragment:null,query:null}).toString(!0)}catch{return t}}function Qu(t){try{let e=Ba.parse(t);if(e.scheme==="file")return e.fsPath}catch{}return t}var yi,YU,XU,Bv,Vv,Ps,Sp,wp,ZU,BO=Ae(()=>{y();xi();Ev();$u();$a();Mr();yi=ia(Ls());FO();Vu();Iv();YU="!",XU="/",Bv=class{constructor(e,r,i){this.folderUri=r,this.uris=i,this.globWrappers=[];try{for(let n of e){let s=n[0]!==YU;s||(n=n.substring(1)),n.length>0&&(n[0]===XU&&(n=n.substring(1)),this.globWrappers.push({regexp:DO("**/"+n,{extended:!0,globstar:!0}),include:s}))}r&&(r=jO(r),r.endsWith("/")||(r=r+"/"),this.folderUri=r)}catch{this.globWrappers.length=0,this.uris=[]}}matchesPattern(e){if(this.folderUri&&!e.startsWith(this.folderUri))return!1;let r=!1;for(let{regexp:i,include:n}of this.globWrappers)i.test(e)&&(r=n);return r}getURIs(){return this.uris}},Vv=class{constructor(e,r,i){this.service=e,this.uri=r,this.dependencies=new Set,this.anchors=void 0,i&&(this.unresolvedSchema=this.service.promise.resolve(new Ps(i)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(e=>this.service.resolveSchemaContent(e,this))),this.resolvedSchema}clearSchema(){let e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,e}},Ps=class{constructor(e,r=[]){this.schema=e,this.errors=r}};Sp=class{constructor(e,r=[],i=[],n){this.schema=e,this.errors=r,this.warnings=i,this.schemaDraft=n}getSection(e){let r=this.getSectionRecursive(e,this.schema);if(r)return Ht(r)}getSectionRecursive(e,r){if(!r||typeof r=="boolean"||e.length===0)return r;let i=e.shift();if(r.properties&&typeof r.properties[i])return this.getSectionRecursive(e,r.properties[i]);if(r.patternProperties){for(let n of Object.keys(r.patternProperties))if(Es(n)?.test(i))return this.getSectionRecursive(e,r.patternProperties[n])}else{if(typeof r.additionalProperties=="object")return this.getSectionRecursive(e,r.additionalProperties);if(i.match("[0-9]+")){if(Array.isArray(r.items)){let n=parseInt(i,10);if(!isNaN(n)&&r.items[n])return this.getSectionRecursive(e,r.items[n])}else if(r.items)return this.getSectionRecursive(e,r.items)}}}},wp=class{constructor(e,r,i){this.contextService=r,this.requestService=e,this.promiseConstructor=i||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter(r=>{let i=Ba.parse(r).scheme;return i!=="schemaservice"&&(!e||e(i))})}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(e){this.cachedSchemaForResource=void 0;let r=!1;e=an(e);let i=[e],n=Object.keys(this.schemasById).map(s=>this.schemasById[s]);for(;i.length;){let s=i.pop();for(let a=0;a<n.length;a++){let o=n[a];o&&(o.uri===s||o.dependencies.has(s))&&(o.uri!==s&&i.push(o.uri),o.clearSchema()&&(r=!0),n[a]=void 0)}}return r}setSchemaContributions(e){if(e.schemas){let r=e.schemas;for(let i in r){let n=an(i);this.contributionSchemas[n]=this.addSchemaHandle(n,r[i])}}if(Array.isArray(e.schemaAssociations)){let r=e.schemaAssociations;for(let i of r){let n=i.uris.map(an),s=this.addFilePatternAssociation(i.pattern,i.folderUri,n);this.contributionAssociations.push(s)}}}addSchemaHandle(e,r){let i=new Vv(this,e,r);return this.schemasById[e]=i,i}getOrAddSchemaHandle(e,r){return this.schemasById[e]||this.addSchemaHandle(e,r)}addFilePatternAssociation(e,r,i){let n=new Bv(e,r,i);return this.filePatternAssociations.push(n),n}registerExternalSchema(e){let r=an(e.uri);return this.registeredSchemasIds[r]=!0,this.cachedSchemaForResource=void 0,e.fileMatch&&e.fileMatch.length&&this.addFilePatternAssociation(e.fileMatch,e.folderUri,[r]),e.schema?this.addSchemaHandle(r,e.schema):this.getOrAddSchemaHandle(r)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(let e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(let e of this.contributionAssociations)this.filePatternAssociations.push(e)}getResolvedSchema(e){let r=an(e),i=this.schemasById[r];return i?i.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(e){if(!this.requestService){let r=yi.t("Unable to load schema from '{0}'. No schema request service available",Qu(e));return this.promise.resolve(new Ps({},[Ci(r,ce.SchemaResolveError,e)]))}return this.requestService(e).then(r=>{if(!r){let a=yi.t("Unable to load schema from '{0}': No content.",Qu(e));return new Ps({},[Ci(a,ce.SchemaResolveError,e)])}let i=[];r.charCodeAt(0)===65279&&(i.push(Ci(yi.t("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",Qu(e)),ce.SchemaResolveError,e)),r=r.trimStart());let n={},s=[];return n=vg(r,s),s.length&&i.push(Ci(yi.t("Unable to parse content from '{0}': Parse error at offset {1}.",Qu(e),s[0].offset),ce.SchemaResolveError,e)),new Ps(n,i)},r=>{let{message:i,code:n}=r;if(typeof i!="string"){let o=r.toString(),u=r.toString().split("Error: ");u.length>1&&(o=u[1]),An(o,".")&&(o=o.substr(0,o.length-1)),i=o}let s=ce.SchemaResolveError;typeof n=="number"&&n<65536&&(s+=n);let a=yi.t("Unable to load schema from '{0}': {1}.",Qu(e),i);return new Ps({},[Ci(a,s,e)])})}resolveSchemaContent(e,r){let i=e.errors.slice(0),n=e.schema,s=n.$schema?Mv(n.$schema):void 0;if(s===cr.v3)return this.promise.resolve(new Sp({},[Ci(yi.t("Draft-03 schemas are not supported."),ce.SchemaUnsupportedFeature)],[],s));let a=new Set,o=this.contextService,u=(S,b)=>{b=decodeURIComponent(b);let g=S;return b[0]==="/"&&(b=b.substring(1)),b.split("/").some(k=>(k=k.replace(/~1/g,"/").replace(/~0/g,"~"),g=g[k],!g)),g},l=(S,b,g)=>(b.anchors||(b.anchors=v(S)),b.anchors.get(g)),f=(S,b)=>{for(let g in b)b.hasOwnProperty(g)&&g!=="id"&&g!=="$id"&&(S[g]=b[g])},h=(S,b,g,k)=>{let w;if(k===void 0||k.length===0?w=b:k.charAt(0)==="/"?w=u(b,k):w=l(b,g,k),w)f(S,w);else{let _=yi.t("$ref '{0}' in '{1}' can not be resolved.",k||"",g.uri);i.push(Ci(_,ce.SchemaResolveError))}},p=(S,b,g,k)=>{o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/.*/.test(b)&&(b=o.resolveRelativePath(b,k.uri)),b=an(b);let w=this.getOrAddSchemaHandle(b);return w.getUnresolvedSchema().then(_=>{if(k.dependencies.add(b),_.errors.length){let A=_.errors[0],E=g?b+"#"+g:b,O=g?yi.t("Problems loading reference '{0}': {1}",g,A.message):A.message;i.push(Ci(O,A.code,b))}return h(S,_.schema,w,g),m(S,_.schema,w)})},m=(S,b,g)=>{let k=[];return this.traverseNodes(S,w=>{let _=new Set;for(;w.$ref;){let A=w.$ref,E=A.split("#",2);if(delete w.$ref,E[0].length>0){k.push(p(w,E[0],E[1],g));return}else if(!_.has(A)){let O=E[1];h(w,b,g,O),_.add(A)}}w.$recursiveRef&&a.add("$recursiveRef"),w.$dynamicRef&&a.add("$dynamicRef")}),this.promise.all(k)},v=S=>{let b=new Map;return this.traverseNodes(S,g=>{let k=g.$id||g.id,w=Hf(k)&&k.charAt(0)==="#"?k.substring(1):g.$anchor;w&&(b.has(w)?i.push(Ci(yi.t("Duplicate anchor declaration: '{0}'",w),ce.SchemaResolveError)):b.set(w,g)),g.$recursiveAnchor&&a.add("$recursiveAnchor"),g.$dynamicAnchor&&a.add("$dynamicAnchor")}),b};return m(n,n,r).then(S=>{let b=[];return a.size&&b.push(Ci(yi.t("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(a.keys()).join(", ")),ce.SchemaUnsupportedFeature)),new Sp(n,i,b,s)})}traverseNodes(e,r){if(!e||typeof e!="object")return Promise.resolve(null);let i=new Set,n=(...f)=>{for(let h of f)Li(h)&&u.push(h)},s=(...f)=>{for(let h of f)if(Li(h))for(let p in h){let v=h[p];Li(v)&&u.push(v)}},a=(...f)=>{for(let h of f)if(Array.isArray(h))for(let p of h)Li(p)&&u.push(p)},o=f=>{if(Array.isArray(f))for(let h of f)Li(h)&&u.push(h);else Li(f)&&u.push(f)},u=[e],l=u.pop();for(;l;)i.has(l)||(i.add(l),r(l),n(l.additionalItems,l.additionalProperties,l.not,l.contains,l.propertyNames,l.if,l.then,l.else,l.unevaluatedItems,l.unevaluatedProperties),s(l.definitions,l.$defs,l.properties,l.patternProperties,l.dependencies,l.dependentSchemas),a(l.anyOf,l.allOf,l.oneOf,l.prefixItems),o(l.items)),l=u.pop()}getSchemaFromProperty(e,r){if(r.root?.type==="object"){for(let i of r.root.properties)if(i.keyNode.value==="$schema"&&i.valueNode?.type==="string"){let n=i.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(n)&&(n=this.contextService.resolveRelativePath(n,e)),n}}}getAssociatedSchemas(e){let r=Object.create(null),i=[],n=jO(e);for(let s of this.filePatternAssociations)if(s.matchesPattern(n))for(let a of s.getURIs())r[a]||(i.push(a),r[a]=!0);return i}getSchemaURIsForResource(e,r){let i=r&&this.getSchemaFromProperty(e,r);return i?[i]:this.getAssociatedSchemas(e)}getSchemaForResource(e,r){if(r){let s=this.getSchemaFromProperty(e,r);if(s){let a=an(s);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;let i=this.getAssociatedSchemas(e),n=i.length>0?this.createCombinedSchema(e,i).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:n},n}createCombinedSchema(e,r){if(r.length===1)return this.getOrAddSchemaHandle(r[0]);{let i="schemaservice://combinedSchema/"+encodeURIComponent(e),n={allOf:r.map(s=>({$ref:s}))};return this.addSchemaHandle(i,n)}}getMatchingSchemas(e,r,i){if(i){let n=i.id||"schemaservice://untitled/matchingSchemas/"+ZU++;return this.addSchemaHandle(n,i).getResolvedSchema().then(a=>r.getMatchingSchemas(a.schema).filter(o=>!o.inverted))}return this.getSchemaForResource(e.uri,r).then(n=>n?r.getMatchingSchemas(n.schema).filter(s=>!s.inverted):[])}},ZU=0});function VO(t,e){let r=[],i=[],n=[],s=-1,a=Nr(t.getText(),!1),o=a.scan();function u(v){r.push(v),i.push(n.length)}for(;o!==17;){switch(o){case 1:case 3:{let v=t.positionAt(a.getTokenOffset()).line,S={startLine:v,endLine:v,kind:o===1?"object":"array"};n.push(S);break}case 2:case 4:{let v=o===2?"object":"array";if(n.length>0&&n[n.length-1].kind===v){let S=n.pop(),b=t.positionAt(a.getTokenOffset()).line;S&&b>S.startLine+1&&s!==S.startLine&&(S.endLine=b-1,u(S),s=S.startLine)}break}case 13:{let v=t.positionAt(a.getTokenOffset()).line,S=t.positionAt(a.getTokenOffset()+a.getTokenLength()).line;a.getTokenError()===1&&v+1<t.lineCount?a.setPosition(t.offsetAt(Me.create(v+1,0))):v<S&&(u({startLine:v,endLine:S,kind:Tn.Comment}),s=v);break}case 12:{let S=t.getText().substr(a.getTokenOffset(),a.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(S){let b=t.positionAt(a.getTokenOffset()).line;if(S[1]){let g={startLine:b,endLine:b,kind:Tn.Region};n.push(g)}else{let g=n.length-1;for(;g>=0&&n[g].kind!==Tn.Region;)g--;if(g>=0){let k=n[g];n.length=g,b>k.startLine&&s!==k.startLine&&(k.endLine=b,u(k),s=k.startLine)}}}break}}o=a.scan()}let l=e&&e.rangeLimit;if(typeof l!="number"||r.length<=l)return r;e&&e.onRangeLimitExceeded&&e.onRangeLimitExceeded(t.uri);let f=[];for(let v of i)v<30&&(f[v]=(f[v]||0)+1);let h=0,p=0;for(let v=0;v<f.length;v++){let S=f[v];if(S){if(S+h>l){p=v;break}h+=S}}let m=[];for(let v=0;v<r.length;v++){let S=i[v];typeof S=="number"&&(S<p||S===p&&h++<l)&&m.push(r[v])}return m}var $O=Ae(()=>{y();xi();Mr()});function UO(t,e,r){function i(o){let u=t.offsetAt(o),l=r.getNodeFromOffset(u,!0),f=[];for(;l;){switch(l.type){case"string":case"object":case"array":let p=l.offset+1,m=l.offset+l.length-1;p<m&&u>=p&&u<=m&&f.push(n(p,m)),f.push(n(l.offset,l.offset+l.length));break;case"number":case"boolean":case"null":case"property":f.push(n(l.offset,l.offset+l.length));break}if(l.type==="property"||l.parent&&l.parent.type==="array"){let p=a(l.offset+l.length,5);p!==-1&&f.push(n(l.offset,p))}l=l.parent}let h;for(let p=f.length-1;p>=0;p--)h=Ns.create(f[p],h);return h||(h=Ns.create(oe.create(o,o))),h}function n(o,u){return oe.create(t.positionAt(o),t.positionAt(u))}let s=Nr(t.getText(),!0);function a(o,u){return s.setPosition(o),s.scan()===u?s.getTokenOffset()+s.getTokenLength():-1}return e.map(i)}var HO=Ae(()=>{y();Mr();xi()});function Yu(t,e,r){let i;if(r){let s=t.offsetAt(r.start),a=t.offsetAt(r.end)-s;i={offset:s,length:a}}let n={tabSize:e?e.tabSize:4,insertSpaces:e?.insertSpaces===!0,insertFinalNewline:e?.insertFinalNewline===!0,eol:`
|
|
1196
|
-
`,keepLines:e?.keepLines===!0};return xg(t.getText(),i,n).map(s=>rr.replace(oe.create(t.positionAt(s.offset),t.positionAt(s.offset+s.length)),s.content))}var $v=Ae(()=>{y();xi();Mr()});function eH(t,e){let r=t.propertyName.toLowerCase(),i=e.propertyName.toLowerCase();return r<i?-1:r>i?1:0}function tH(t,e,r){let i=e.propertyName.toLowerCase(),n=t[0].propertyName.toLowerCase(),s=t[t.length-1].propertyName.toLowerCase();if(i<n)return 0;if(i>s)return t.length;let a=0,o=t.length-1;for(;a<=o;){let u=o+a>>1,l=r(e,t[u]);if(l>0)a=u+1;else if(l<0)o=u-1;else return u}return-a-1}var ct,qs,GO=Ae(()=>{y();(function(t){t[t.Object=0]="Object",t[t.Array=1]="Array"})(ct||(ct={}));qs=class{constructor(e,r){this.propertyName=e??"",this.beginningLineNumber=r,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(e){if(e.parent=this,this.childrenProperties.length>0){let r=0;e.noKeyName?r=this.childrenProperties.length:r=tH(this.childrenProperties,e,eH),r<0&&(r=r*-1-1),this.childrenProperties.splice(r,0,e)}else this.childrenProperties.push(e);return e}}});function zO(t,e){let r={...e,keepLines:!1},i=kr.applyEdits(t,Yu(t,r,void 0)),n=kr.create("test://test.json","json",0,i),s=rH(n),a=iH(n,s),o=Yu(a,r,void 0),u=kr.applyEdits(a,o);return[rr.replace(oe.create(Me.create(0,0),t.positionAt(t.getText().length)),u)]}function rH(t){let e=t.getText(),r=Nr(e,!1),i=new qs,n=i,s=i,a=i,o,u=0,l=0,f,h,p=-1,m=-1,v=0,S=0,b=[],g=!1,k=!1;for(;(o=r.scan())!==17;){if(g===!0&&o!==14&&o!==15&&o!==12&&o!==13&&s.endLineNumber===void 0){let w=r.getTokenStartLine();h===2||h===4?a.endLineNumber=w-1:s.endLineNumber=w-1,v=w,g=!1}if(k===!0&&o!==14&&o!==15&&o!==12&&o!==13&&(v=r.getTokenStartLine(),k=!1),r.getTokenStartLine()!==u){for(let w=u;w<r.getTokenStartLine();w++){let _=t.getText(oe.create(Me.create(w,0),Me.create(w+1,0))).length;l=l+_}u=r.getTokenStartLine()}switch(o){case 10:{if(f===void 0||f===1||f===5&&b[b.length-1]===ct.Object){let w=new qs(r.getTokenValue(),v);a=s,s=n.addChildProperty(w)}break}case 3:{if(i.beginningLineNumber===void 0&&(i.beginningLineNumber=r.getTokenStartLine()),b[b.length-1]===ct.Object)n=s;else if(b[b.length-1]===ct.Array){let w=new qs(r.getTokenValue(),v);w.noKeyName=!0,a=s,s=n.addChildProperty(w),n=s}b.push(ct.Array),s.type=ct.Array,v=r.getTokenStartLine(),v++;break}case 1:{if(i.beginningLineNumber===void 0)i.beginningLineNumber=r.getTokenStartLine();else if(b[b.length-1]===ct.Array){let w=new qs(r.getTokenValue(),v);w.noKeyName=!0,a=s,s=n.addChildProperty(w)}s.type=ct.Object,b.push(ct.Object),n=s,v=r.getTokenStartLine(),v++;break}case 4:{S=r.getTokenStartLine(),b.pop(),s.endLineNumber===void 0&&(f===2||f===4)&&(s.endLineNumber=S-1,s.lastProperty=!0,s.lineWhereToAddComma=p,s.indexWhereToAddComa=m,a=s,s=s?s.parent:void 0,n=s),i.endLineNumber=S,v=S+1;break}case 2:{S=r.getTokenStartLine(),b.pop(),f!==1&&(s.endLineNumber===void 0&&(s.endLineNumber=S-1,s.lastProperty=!0,s.lineWhereToAddComma=p,s.indexWhereToAddComa=m),a=s,s=s?s.parent:void 0,n=s),i.endLineNumber=r.getTokenStartLine(),v=S+1;break}case 5:{S=r.getTokenStartLine(),s.endLineNumber===void 0&&(b[b.length-1]===ct.Object||b[b.length-1]===ct.Array&&(f===2||f===4))&&(s.endLineNumber=S,s.commaIndex=r.getTokenOffset()-l,s.commaLine=S),(f===2||f===4)&&(a=s,s=s?s.parent:void 0,n=s),v=S+1;break}case 13:{f===5&&p===r.getTokenStartLine()&&(b[b.length-1]===ct.Array&&(h===2||h===4)||b[b.length-1]===ct.Object)&&(b[b.length-1]===ct.Array&&(h===2||h===4)||b[b.length-1]===ct.Object)&&(s.endLineNumber=void 0,g=!0),(f===1||f===3)&&p===r.getTokenStartLine()&&(k=!0);break}}o!==14&&o!==13&&o!==12&&o!==15&&(h=f,f=o,p=r.getTokenStartLine(),m=r.getTokenOffset()+r.getTokenLength()-l)}return i}function iH(t,e){if(e.childrenProperties.length===0)return t;let r=kr.create("test://test.json","json",0,t.getText()),i=[];for(WO(i,e,e.beginningLineNumber);i.length>0;){let n=i.shift(),s=n.propertyTreeArray,a=n.beginningLineNumber;for(let o=0;o<s.length;o++){let u=s[o],l=oe.create(Me.create(u.beginningLineNumber,0),Me.create(u.endLineNumber+1,0)),f=t.getText(l),h=kr.create("test://test.json","json",0,f);if(u.lastProperty===!0&&o!==s.length-1){let v=u.lineWhereToAddComma-u.beginningLineNumber,S=u.indexWhereToAddComa,b={range:oe.create(Me.create(v,S),Me.create(v,S)),text:","};kr.update(h,[b],1)}else if(u.lastProperty===!1&&o===s.length-1){let v=u.commaIndex,b=u.commaLine-u.beginningLineNumber,g={range:oe.create(Me.create(b,v),Me.create(b,v+1)),text:""};kr.update(h,[g],1)}let p=u.endLineNumber-u.beginningLineNumber+1,m={range:oe.create(Me.create(a,0),Me.create(a+p,0)),text:h.getText()};kr.update(r,[m],1),WO(i,u,a),a=a+p}}return r}function nH(t){t.sort((e,r)=>e.propertyName.localeCompare(r.propertyName))}function WO(t,e,r){if(e.childrenProperties.length!==0)if(e.type===ct.Object){let i=1/0;for(let s of e.childrenProperties)s.beginningLineNumber<i&&(i=s.beginningLineNumber);let n=i-e.beginningLineNumber;r=r+n,nH(e.childrenProperties),t.push(new xp(r,e.childrenProperties))}else e.type===ct.Array&&JO(t,e,r)}function JO(t,e,r){for(let i of e.childrenProperties){if(i.type===ct.Object){let n=1/0;for(let a of i.childrenProperties)a.beginningLineNumber<n&&(n=a.beginningLineNumber);let s=n-i.beginningLineNumber;t.push(new xp(r+i.beginningLineNumber-e.beginningLineNumber+s,i.childrenProperties))}i.type===ct.Array&&JO(t,i,r+i.beginningLineNumber-e.beginningLineNumber)}}var xp,KO=Ae(()=>{y();xi();Mr();$v();GO();xp=class{constructor(e,r){this.beginningLineNumber=e,this.propertyTreeArray=r}}});function QO(t,e){let r=[];return e.visit(i=>{if(i.type==="property"&&i.keyNode.value==="$ref"&&i.valueNode?.type==="string"){let n=i.valueNode.value,s=aH(e,n);if(s){let a=t.positionAt(s.offset);r.push({target:`${t.uri}#${a.line+1},${a.character+1}`,range:sH(t,i.valueNode)})}}return!0}),Promise.resolve(r)}function sH(t,e){return oe.create(t.positionAt(e.offset+1),t.positionAt(e.offset+e.length-1))}function aH(t,e){let r=oH(e);return r?Uv(r,t.root):null}function Uv(t,e){if(!e)return null;if(t.length===0)return e;let r=t.shift();if(e&&e.type==="object"){let i=e.properties.find(n=>n.keyNode.value===r);return i?Uv(t,i.valueNode):null}else if(e&&e.type==="array"&&r.match(/^(0|[1-9][0-9]*)$/)){let i=Number.parseInt(r),n=e.items[i];return n?Uv(t,n):null}return null}function oH(t){return t==="#"?[]:t[0]!=="#"||t[1]!=="/"?null:t.substring(2).split(/\//).map(uH)}function uH(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}var YO=Ae(()=>{y();Mr()});var XO={};Xm(XO,{ClientCapabilities:()=>Tv,CodeAction:()=>op,CodeActionContext:()=>ap,CodeActionKind:()=>np,Color:()=>Uu,ColorInformation:()=>zf,ColorPresentation:()=>Jf,Command:()=>En,CompletionItem:()=>Fa,CompletionItemKind:()=>Ut,CompletionItemTag:()=>Yf,CompletionList:()=>Xf,Diagnostic:()=>Cr,DiagnosticSeverity:()=>$t,DocumentHighlight:()=>tp,DocumentHighlightKind:()=>ep,DocumentLink:()=>up,DocumentSymbol:()=>ip,DocumentUri:()=>Gf,ErrorCode:()=>ce,FoldingRange:()=>Kf,FoldingRangeKind:()=>Tn,Hover:()=>Zf,InsertTextFormat:()=>Ke,Location:()=>nn,MarkedString:()=>ja,MarkupContent:()=>Os,MarkupKind:()=>Pi,Position:()=>Me,Range:()=>oe,SchemaDraft:()=>cr,SelectionRange:()=>Ns,SymbolInformation:()=>rp,SymbolKind:()=>Rr,TextDocument:()=>kr,TextDocumentEdit:()=>Hu,TextEdit:()=>rr,VersionedTextDocumentIdentifier:()=>Qf,WorkspaceEdit:()=>Gu,getLanguageService:()=>cH,isSchemaResolveError:()=>NU});function cH(t){let e=t.promiseConstructor||Promise,r=new wp(t.schemaRequestService,t.workspaceContext,e);r.setSchemaContributions(bp);let i=new mp(r,t.contributions,e,t.clientCapabilities),n=new gp(r,t.contributions,e),s=new vp(r),a=new _p(r,e);return{configure:o=>{r.clearExternalSchemas(),o.schemas?.forEach(r.registerExternalSchema.bind(r)),a.configure(o)},resetSchema:o=>r.onResourceChange(o),doValidation:a.doValidation.bind(a),getLanguageStatus:a.getLanguageStatus.bind(a),parseJSONDocument:o=>vO(o,{collectComments:!0}),newJSONDocument:(o,u,l)=>_O(o,u,l),getMatchingSchemas:r.getMatchingSchemas.bind(r),doResolve:i.doResolve.bind(i),doComplete:i.doComplete.bind(i),findDocumentSymbols:s.findDocumentSymbols.bind(s),findDocumentSymbols2:s.findDocumentSymbols2.bind(s),findDocumentColors:s.findDocumentColors.bind(s),getColorPresentations:s.getColorPresentations.bind(s),doHover:n.doHover.bind(n),getFoldingRanges:VO,getSelectionRanges:UO,findDefinition:()=>Promise.resolve([]),findLinks:QO,format:(o,u,l)=>Yu(o,l,u),sort:(o,u)=>zO(o,u)}}var ZO=Ae(()=>{y();SO();wO();AO();LO();$a();MO();BO();$O();HO();KO();$v();YO();Mr()});var Wv=T(Xu=>{"use strict";y();Object.defineProperty(Xu,"__esModule",{value:!0});Xu.JSONValidator=void 0;Xu.isValid=eN;var Hv=(ZO(),Zm(XO)),lH=Ce(),Gv=class t{service;schemas;static async create(e,r){if(e)return new t(await e.schemas(r.context))}constructor(e){this.schemas=(0,lH.indexBy)(r=>r.uri,e),this.service=(0,Hv.getLanguageService)({schemaRequestService:this.getSchemaForURI.bind(this),workspaceContext:{resolveRelativePath:(r,i)=>new URL(r,i).toString()}}),this.service.configure({schemas:e.map(r=>({uri:r.uri,fileMatch:r.fileMatch}))})}validate=async(e,r)=>{let i=Hv.TextDocument.create(e,"json",0,r);return(await this.getOffsetDiagnostics(i)).map(s=>({message:s.message,startIndex:i.offsetAt(s.range.start),endIndex:i.offsetAt(s.range.end)}))};isValid=async(e,r)=>eN(this.service,e,r);async getOffsetDiagnostics(e){let r=this.service.parseJSONDocument(e);return this.service.doValidation(e,r,{schemaValidation:"error",trailingCommas:"ignore",comments:"ignore"})}async getSchemaForURI(e){let r=this.schemas[e]?.schema;return r||`No schema for '${e}' found`}};Xu.JSONValidator=Gv;async function eN(t,e,r){let i=Hv.TextDocument.create(e,"json",0,r),n=t.parseJSONDocument(i);return(await t.doValidation(i,n,{schemaValidation:"error",trailingCommas:"ignore",comments:"ignore"})).every(a=>a.severity!==1)}});var zv=T(kp=>{"use strict";y();Object.defineProperty(kp,"__esModule",{value:!0});kp.FileType=void 0;var tN;(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})(tN||(kp.FileType=tN={}))});var Ip=T(Ue=>{"use strict";y();Object.defineProperty(Ue,"__esModule",{value:!0});Ue.makeGetMetafieldDefinitions=Ue.FETCHED_METAFIELD_CATEGORIES=Ue.makeGetDefaultSchemaTranslations=Ue.makeGetDefaultTranslations=Ue.makeGetDefaultSchemaLocale=Ue.makeGetDefaultLocale=Ue.makeGetDefaultSchemaLocaleFileUri=Ue.makeGetDefaultLocaleFileUri=Ue.makeFileSize=Ue.makeFileExists=void 0;Ue.recursiveReadDirectory=lN;Ue.isDirectory=Jv;var rN=Du(),iN=zv(),Kv=ze(),nN=Is(),fH=Y(),sN=Ce(),pH=t=>async function(r){try{return await t.stat(r),!0}catch{return!1}};Ue.makeFileExists=pH;var hH=t=>async function(r){try{return(await t.stat(r)).size}catch{return 0}};Ue.makeFileSize=hH;Ue.makeGetDefaultLocaleFileUri=aN("default.json");Ue.makeGetDefaultSchemaLocaleFileUri=aN(".default.schema.json");function aN(t=".default.json"){return function(r){return i=>Qv(r,i,t)}}Ue.makeGetDefaultLocale=oN(".default.json");Ue.makeGetDefaultSchemaLocale=oN(".default.schema.json");function oN(t=".default.json"){return function(r,i){return cN(()=>dH(r,i,t))}}Ue.makeGetDefaultTranslations=uN(".default.json");Ue.makeGetDefaultSchemaTranslations=uN(".default.schema.json");function uN(t=".default.json"){return function(r,i,n){return cN(()=>mH(r,i,n,t))}}async function Qv(t,e,r=".default.json"){return(await t.readDirectory((0,nN.join)(e,"locales"))).find(([n])=>n.endsWith(r))?.[0]}async function dH(t,e,r){try{let i=await Qv(t,e,r);return i?rN.Utils.basename(rN.URI.parse(i)).split(".")[0]:"en"}catch(i){return console.error(i),"en"}}async function mH(t,e,r,i){try{let n=gH(e,i);if(n)return n;let s=await Qv(t,r,i);if(!s)return{};let a=await t.readFile(s);return(0,Kv.parseJSON)(a,{})}catch(n){return console.error(n),{}}}function gH(t,e){let r=t.find(n=>n.type===fH.SourceCodeType.JSON&&n.uri.match(/locales/)&&n.uri.endsWith(e));if(!r)return;let i=(0,Kv.parseJSON)(r.source);if(!(0,sN.isError)(i))return i}function cN(t){let e;return async(...r)=>(e||(e=t(...r)),e)}async function lN(t,e,r){let n=(await t.readDirectory(e)).filter(a=>!_H(a)&&(Jv(a)||r(a)));return(await Promise.all(n.map(a=>Jv(a)?lN(t,a[0],r):Promise.resolve([a[0]])))).flat()}function Jv([t,e]){return e===iN.FileType.Directory}var yH=[".git","node_modules","dist","build","tmp","vendor"];function _H([t,e]){return e===iN.FileType.Directory&&yH.some(r=>t.endsWith(r))}Ue.FETCHED_METAFIELD_CATEGORIES=["article","blog","collection","company","company_location","location","market","order","page","product","variant","shop"];var vH=t=>async function(e){let r={article:[],blog:[],collection:[],company:[],company_location:[],location:[],market:[],order:[],page:[],product:[],variant:[],shop:[]};try{let i=await t.readFile((0,nN.join)(e,".shopify","metafields.json")),n=(0,Kv.parseJSON)(i);return(0,sN.isError)(n)?r:Ue.FETCHED_METAFIELD_CATEGORIES.reduce((s,a)=>{try{s[a]=n[a].map(o=>({key:o.key,name:o.name,namespace:o.namespace,description:o.description,type:{category:o.type.category,name:o.type.name}}))}catch{}return s},r)}catch{return r}};Ue.makeGetMetafieldDefinitions=vH});var dN=T(Ap=>{"use strict";y();Object.defineProperty(Ap,"__esModule",{value:!0});Ap.createDisabledChecksModule=wH;Ap.findNextLinePosition=hN;var pN=Y(),bH=kn(),SH=Ce();function wH(){let t="@all",r=new Map;function i(a,o,u){let[l,f,h]=o.trim().match(/^(?:theme\-check\-(disable-next-line|disable|enable)) ?(.*)/)||[];(h?h.split(/,[ ]*/):[t]).forEach(m=>{let v=r.get(a.uri);if(f==="disable-next-line"&&!(0,SH.isError)(a.ast)){let S=hN(a.ast,u);S&&(v.has(m)||v.set(m,[]),v.get(m).push({from:S.start,to:S.end}))}if(f==="disable"&&(v.has(m)||v.set(m,[]),v.get(m).push({from:u.position.end})),f==="enable"){let S=v.get(m);if(S)S[S.length-1].to=u.position.start;else if(m===t)for(let b of v.values())for(let g of b)g.to||(g.to=u.position.start)}})}let n={meta:{schema:{}},create:({file:a})=>({async onCodePathStart(){r.set(a.uri,new Map)},async LiquidRawTag(o){o.name==="comment"&&i(a,o.body.value,o)},async LiquidTag(o){typeof o.markup!="string"||o.name!=="#"||i(a,o.markup,o)}})};function s(a){return[t,a.check].flatMap(u=>r.has(a.uri)?r.get(a.uri).has(u)?r.get(a.uri).get(u):[]:[]).some(u=>a.start.index>=u.from&&(!u.to||a.end.index<=u.to))}return{DisabledChecksVisitor:n,isDisabled:s}}function hN(t,e){let[r,i]=(0,bH.findCurrentNode)(t,e.position.end),n=i.at(-1),s=i.at(-2),a=fN(n,r);if(!(!a&&(n&&(a=fN(s,n)),!a)))return"blockStartPosition"in a?a.type===pN.LiquidHtmlNodeTypes.LiquidRawTag&&a.name==="doc"?a.position:a.blockStartPosition:a.position}function fN(t,e){if(!t)return;let r=[];t.type===pN.LiquidHtmlNodeTypes.LiquidTag&&Array.isArray(t.markup)?r=t.markup:"children"in t&&(r=t.children||[]);let i=r.findIndex(s=>s===e);return i===-1?void 0:r.at(i+1)}});var Xv=T(Yv=>{"use strict";y();Object.defineProperty(Yv,"__esModule",{value:!0});Yv.isIgnored=kH;var xH=Sw();function kH(t,e,r){return[...IH(r,e),...mN(e.ignore)].map(n=>n.replace(/^\//,e.rootUri+"/").replace(/^([^\/])/,"**/$1").replace(/\/\*$/,"/**")).some(n=>(0,xH.minimatch)(t,n))}function IH(t,e){return t?mN(e.settings[t.meta.code]?.ignore):[]}function mN(t){return t??[]}});var yN=T(Zv=>{"use strict";y();Object.defineProperty(Zv,"__esModule",{value:!0});Zv.visitLiquid=TH;var AH=ge();function gN(t){return!!t&&typeof t=="object"&&"type"in t}async function TH(t,e){let r=[{node:t,ancestors:[]}],i;for(;r.length>0;){let{node:n,ancestors:s}=r.pop(),a=s.concat(n);i=e[n.type],i&&await i(n,s);for(let o in n){if(!n.hasOwnProperty(o)||AH.nonTraversableProperties.has(o))continue;let u=n[o];if(Array.isArray(u))for(let l=u.length-1;l>=0;l--){let f=u[l];gN(f)&&r.push({node:f,ancestors:a})}else gN(u)&&r.push({node:u,ancestors:a})}i=e[`${n.type}:exit`],i&&await i(n,s)}}});var vN=T(eb=>{"use strict";y();Object.defineProperty(eb,"__esModule",{value:!0});eb.visitJSON=OH;function _N(t){return!!t&&typeof t=="object"&&"type"in t}var EH=new Set(["loc"]);async function OH(t,e){let r=[{node:t,ancestors:[]}],i;for(;r.length>0;){let{node:n,ancestors:s}=r.pop(),a=s.concat(n);i=e[n.type],i&&await i(n,s);for(let o in n){if(!n.hasOwnProperty(o)||EH.has(o))continue;let u=n[o];if(Array.isArray(u))for(let l=u.length-1;l>=0;l--){let f=u[l];_N(f)&&r.push({node:f,ancestors:a})}else _N(u)&&r.push({node:u,ancestors:a})}i=e[`${n.type}:exit`],i&&await i(n,s)}}});var bN=T(Ua=>{"use strict";y();Object.defineProperty(Ua,"__esModule",{value:!0});Ua.visitJSON=Ua.visitLiquid=void 0;var NH=yN();Object.defineProperty(Ua,"visitLiquid",{enumerable:!0,get:function(){return NH.visitLiquid}});var LH=vN();Object.defineProperty(Ua,"visitJSON",{enumerable:!0,get:function(){return LH.visitJSON}})});var SN=T(Ha=>{"use strict";y();Object.defineProperty(Ha,"__esModule",{value:!0});Ha.AppBlockValidTags=Ha.ForbiddenTag=void 0;var tb=Y(),rb;(function(t){t.JavaScript="javascript",t.StyleSheet="stylesheet",t.Include="include",t.Layout="layout",t.Section="section",t.Sections="sections"})(rb||(Ha.ForbiddenTag=rb={}));var PH=t=>Object.values(rb).includes(t),qH=t=>`Theme app extension blocks cannot contain '${t}' tags`;Ha.AppBlockValidTags={meta:{code:"AppBlockValidTags",name:"App Block Valid Tags",docs:{description:"Identifies forbidden Liquid tags in theme app extension app block and app embed block code.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/app-block-valid-tags",recommended:!1},type:tb.SourceCodeType.LiquidHtml,severity:tb.Severity.ERROR,schema:{},targets:[tb.ConfigTarget.ThemeAppExtension]},create(t){let e=async r=>{if(PH(r.name)){let i=r.blockEndPosition?r.blockEndPosition.end:r.position.end,n=r.blockStartPosition.start,s=qH(r.name);return t.report({message:s,startIndex:n,endIndex:i})}};return{LiquidRawTag:e,LiquidTag:e}}}});var kN=T(Tp=>{"use strict";y();Object.defineProperty(Tp,"__esModule",{value:!0});Tp.AssetPreload=void 0;var xN=ge(),wN=Y(),Zu=je();function CH(t){return(0,Zu.isAttr)(t,"rel")&&t.value.some(e=>e.type===xN.NodeTypes.TextNode&&e.value==="preload")}Tp.AssetPreload={meta:{code:"AssetPreload",name:"Prevent Manual Preloading of Assets",docs:{description:"This check is aimed at discouraging the manual preloading of assets and encourages the use of appropriate Shopify filters.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-preload",recommended:!0},type:wN.SourceCodeType.LiquidHtml,severity:wN.Severity.WARNING,schema:{},targets:[]},create(t){return{async HtmlVoidElement(e){let r=e.attributes.find(i=>(0,Zu.isValuedHtmlAttribute)(i)&&CH(i));if(e.name==="link"&&r){let n=e.attributes.filter(Zu.isValuedHtmlAttribute).find(a=>(0,Zu.isAttr)(a,"as"))?.value.find(a=>(0,Zu.isNodeOfType)(xN.NodeTypes.TextNode,a))?.value,s="";n==="style"?s="For better performance, prefer using the preload argument of the stylesheet_tag filter":n==="image"?s="For better performance, prefer using the preload argument of the image_tag filter":s="For better performance, prefer using the preload_tag filter",t.report({message:s,startIndex:e.position.start,endIndex:e.position.end})}}}}}});var AN=T(Op=>{"use strict";y();Object.defineProperty(Op,"__esModule",{value:!0});Op.AssetSizeAppBlockCSS=void 0;var RH=ze(),Ep=Y(),MH=Ce(),IN=ki(),DH={thresholdInBytes:Ep.SchemaProp.number(1e5)};Op.AssetSizeAppBlockCSS={meta:{code:"AssetSizeAppBlockCSS",name:"Asset Size App Block CSS",docs:{description:"This check is aimed at preventing large CSS bundles from being included via Theme App Extensions.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-app-block-css",recommended:!0},type:Ep.SourceCodeType.LiquidHtml,severity:Ep.Severity.ERROR,schema:DH,targets:[Ep.ConfigTarget.ThemeAppExtension]},create(t){return t.fileSize?{async LiquidRawTag(e){if(e.name!=="schema")return;let r=(0,RH.parseJSON)(e.body.value);if((0,MH.isError)(r))return;let i=r.stylesheet;if(!i)return;let n=`assets/${i}`,s=t.settings.thresholdInBytes,a=e.body.position.start+e.body.value.indexOf(i),o=a+i.length;if(!await(0,IN.doesFileExist)(t,n)){t.report({message:`'${i}' does not exist.`,startIndex:a,endIndex:o});return}let[l,f]=await(0,IN.doesFileExceedThreshold)(t,n,s);l&&t.report({message:`The file size for '${i}' (${f} B) exceeds the configured threshold (${s} B)`,startIndex:a,endIndex:o})}}:{}}}});var EN=T(Lp=>{"use strict";y();Object.defineProperty(Lp,"__esModule",{value:!0});Lp.AssetSizeAppBlockJavaScript=void 0;var FH=ze(),Np=Y(),jH=Ce(),TN=ki(),BH={thresholdInBytes:Np.SchemaProp.number(1e4)};Lp.AssetSizeAppBlockJavaScript={meta:{code:"AssetSizeAppBlockJavaScript",name:"Asset Size App Block JavaScript",docs:{description:"This check is aimed at preventing large JavaScript bundles from being included via Theme App Extensions.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-app-block-javascript",recommended:!0},type:Np.SourceCodeType.LiquidHtml,severity:Np.Severity.ERROR,schema:BH,targets:[Np.ConfigTarget.ThemeAppExtension]},create(t){return t.fileSize?{async LiquidRawTag(e){if(e.name!=="schema")return;let r=(0,FH.parseJSON)(e.body.value);if((0,jH.isError)(r))return;let i=r.javascript;if(!i)return;let n=`assets/${i}`,s=t.settings.thresholdInBytes,a=e.body.position.start+e.body.value.indexOf(i),o=a+i.length;if(!await(0,TN.doesFileExist)(t,n)){t.report({message:`'${i}' does not exist.`,startIndex:a,endIndex:o});return}let[l,f]=await(0,TN.doesFileExceedThreshold)(t,n,s);l&&t.report({message:`The file size for '${i}' (${f} B) exceeds the configured threshold (${s} B)`,startIndex:a,endIndex:o})}}:{}}}});var NN=T(Pp=>{"use strict";y();Object.defineProperty(Pp,"__esModule",{value:!0});Pp.AssetSizeCSS=void 0;var Wa=ge(),ib=Y(),VH=Ce(),ON=ki(),Ga=je(),$H={thresholdInBytes:ib.SchemaProp.number(1e5)};function UH(t){return t.type===Wa.NodeTypes.TextNode}function HH(t){return t.type===Wa.NodeTypes.LiquidVariableOutput}function GH(t){return typeof t!="string"&&t.type===Wa.NodeTypes.LiquidVariable}function WH(t){return t.type===Wa.NodeTypes.String}Pp.AssetSizeCSS={meta:{code:"AssetSizeCSS",aliases:["AssetSizeCSSStylesheetTag"],name:"Prevent Large CSS bundles",docs:{description:"This check is aimed at preventing large CSS bundles for speed.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-css",recommended:!1},type:ib.SourceCodeType.LiquidHtml,severity:ib.Severity.ERROR,schema:$H,targets:[]},create(t){if(!t.fileSize)return{};let e=t.settings.thresholdInBytes;async function r(n,s){await(0,ON.hasRemoteAssetSizeExceededThreshold)(n,e)&&t.report({message:`The CSS file size exceeds the threshold of ${e} bytes`,startIndex:s.start,endIndex:s.end})}async function i(n,s){await(0,ON.hasLocalAssetSizeExceededThreshold)(t,`assets/${n}`,e)&&t.report({message:`The CSS file size exceeds the threshold of ${e} bytes`,startIndex:s.start,endIndex:s.end})}return{async HtmlVoidElement(n){if(n.name!=="link"||!n.attributes.filter(Ga.isValuedHtmlAttribute).find(o=>(0,Ga.isAttr)(o,"rel")&&(0,Ga.valueIncludes)(o,"stylesheet")))return;let a=n.attributes.filter(Ga.isValuedHtmlAttribute).find(o=>(0,Ga.isAttr)(o,"href"));if(a&&a.value.length===1){if(UH(a.value[0])&&/(https?:)?\/\//.test(a.value[0].value)){let o=a.value[0].value;await r(o,a.attributePosition)}if(HH(a.value[0])&&GH(a.value[0].markup)&&WH(a.value[0].markup.expression)&&a.value[0].markup.filters.length===1&&a.value[0].markup.filters[0].name==="asset_url"){let o=a.value[0].markup.expression.value;await i(o,a.attributePosition)}}},async LiquidFilter(n,s){if(n.name!=="stylesheet_tag")return;let a=(0,VH.last)(s);if(!(!a||!(0,Ga.isNodeOfType)(Wa.NodeTypes.LiquidVariable,a))&&a.expression.type===Wa.NodeTypes.String){if(a.expression.value[0].length==1&&a.filters.length==1&&/(https?:)?\/\//.test(a.expression.value)){let o=a.expression.value;await r(o,a.expression.position)}if(a.expression.value[0].length==1&&a.filters.length==2&&a.filters[0].name==="asset_url"&&a.filters[1].name==="stylesheet_tag"){let o=a.expression.value;await i(o,a.position)}}}}}}});var PN=T(qp=>{"use strict";y();Object.defineProperty(qp,"__esModule",{value:!0});qp.AssetSizeJavaScript=void 0;var za=ge(),sb=Y(),zH=Ce(),LN=ki(),nb=je(),JH={thresholdInBytes:sb.SchemaProp.number(1e4)};function KH(t){return t.type===za.NodeTypes.TextNode}function QH(t){return t.type===za.NodeTypes.LiquidVariableOutput}function YH(t){return typeof t!="string"&&t.type===za.NodeTypes.LiquidVariable}function XH(t){return t.type===za.NodeTypes.String}qp.AssetSizeJavaScript={meta:{code:"AssetSizeJavaScript",name:"Prevent Large JavaScript bundles",docs:{description:"This check is aimed at preventing large JavaScript bundles for speed.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/asset-size-javascript",recommended:!1},type:sb.SourceCodeType.LiquidHtml,severity:sb.Severity.ERROR,schema:JH,targets:[]},create(t){if(!t.fileSize)return{};let e=t.settings.thresholdInBytes;async function r(n,s){await(0,LN.hasRemoteAssetSizeExceededThreshold)(n,e)&&t.report({message:`JavaScript on every page load exceeds compressed size threshold (${e} Bytes), consider using the import on interaction pattern.`,startIndex:s.start,endIndex:s.end})}async function i(n,s){await(0,LN.hasLocalAssetSizeExceededThreshold)(t,`assets/${n}`,e)&&t.report({message:`JavaScript on every page load exceeds compressed size threshold (${e} Bytes), consider using the import on interaction pattern.`,startIndex:s.start,endIndex:s.end})}return{async HtmlRawNode(n){if(n.name!=="script")return;let s=n.attributes.filter(nb.isValuedHtmlAttribute).find(a=>(0,nb.isAttr)(a,"src"));if(s&&s.value.length===1){if(KH(s.value[0])&&/(https?:)?\/\//.test(s.value[0].value)){let a=s.value[0].value;await r(a,s.attributePosition)}if(QH(s.value[0])&&YH(s.value[0].markup)&&XH(s.value[0].markup.expression)&&s.value[0].markup.filters.length===1&&s.value[0].markup.filters[0].name==="asset_url"){let a=s.value[0].markup.expression.value;await i(a,s.attributePosition)}}},async LiquidFilter(n,s){if(n.name!=="script_tag")return;let a=(0,zH.last)(s);if(!(!a||!(0,nb.isNodeOfType)(za.NodeTypes.LiquidVariable,a))&&a.expression.type===za.NodeTypes.String){if(a.expression.value[0].length==1&&a.filters.length==1&&/(https?:)?\/\//.test(a.expression.value)){let o=a.expression.value;await r(o,a.expression.position)}if(a.expression.value[0].length==1&&a.filters.length==2&&a.filters[0].name==="asset_url"&&a.filters[1].name==="script_tag"){let o=a.expression.value;await i(o,a.position)}}}}}}});var MN=T(Rp=>{"use strict";y();Object.defineProperty(Rp,"__esModule",{value:!0});Rp.BlockIdUsage=void 0;var Cp=ge(),qN=Y();Rp.BlockIdUsage={meta:{code:"BlockIdUsage",name:"Do not rely on `block.id` in if/else/unless/case",docs:{description:"The ID is dynamically generated by Shopify and is subject to change. You should avoid relying on a literal value of this ID.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/block-id-usage",recommended:!0},type:qN.SourceCodeType.LiquidHtml,severity:qN.Severity.WARNING,schema:{},targets:[]},create(t){return{async Comparison(e,r){e.comparator==="=="&&e.left.type===Cp.NodeTypes.VariableLookup&&CN(e.left)&&RN(t,e.position)},async VariableLookup(e,r){let i=r.at(-1);i?.type===Cp.NodeTypes.LiquidTag&&i.name==="case"&&CN(e)&&RN(t,e.position)}}}};function CN(t){return t.type==Cp.NodeTypes.VariableLookup&&t.name==="block"&&t.lookups[0]&&t.lookups[0].type===Cp.NodeTypes.String&&t.lookups[0].value==="id"}function RN(t,e){t.report({message:"The ID is dynamically generated by Shopify and is subject to change. You should avoid relying on a literal value of this ID.",startIndex:e.start,endIndex:e.end})}});var FN=T(Mp=>{"use strict";y();Object.defineProperty(Mp,"__esModule",{value:!0});Mp.CdnPreconnect=void 0;var DN=Y(),Ja=je();Mp.CdnPreconnect={meta:{code:"CdnPreconnect",name:"CDN Preconnect",docs:{description:"This check is aimed at signaling the redundant preconnect to Shopify's CDN",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/cdn-preconnect"},type:DN.SourceCodeType.LiquidHtml,severity:DN.Severity.ERROR,schema:{},targets:[]},create(t){return{async HtmlVoidElement(e){e.name!=="link"||!e.attributes.filter(Ja.isValuedHtmlAttribute).some(n=>(0,Ja.isAttr)(n,"rel")&&(0,Ja.valueIncludes)(n,"preconnect"))||!e.attributes.filter(Ja.isValuedHtmlAttribute).some(n=>(0,Ja.isAttr)(n,"href")&&(0,Ja.valueIncludes)(n,".+cdn.shopify.com.+"))||t.report({message:"Preconnecting to cdn.shopify.com is unnecessary and can lead to worse performance",startIndex:e.position.start,endIndex:e.position.end})}}}}});var VN=T(Dp=>{"use strict";y();Object.defineProperty(Dp,"__esModule",{value:!0});Dp.ContentForHeaderModification=void 0;var jN=ge(),BN=Y(),ZH=je();function eG(t){return t.name==="assign"&&typeof t.markup!="string"}function tG(t){return t.name==="capture"&&typeof t.markup!="string"}function rG(t){return t.name==="echo"&&typeof t.markup!="string"}Dp.ContentForHeaderModification={meta:{code:"ContentForHeaderModification",name:"Do not depend on the content of content_for_header",docs:{description:"Do not rely on the content of content_for_header as it might change in the future, which could cause your Liquid code behavior to change.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/content-for-header-modification",recommended:!0},type:BN.SourceCodeType.LiquidHtml,severity:BN.Severity.ERROR,schema:{},targets:[]},create(t){function e(r,i){(0,ZH.isNodeOfType)(jN.NodeTypes.VariableLookup,r)&&r.name==="content_for_header"&&t.report({message:"Do not rely on the content of `content_for_header`",startIndex:i.start,endIndex:i.end})}return{async LiquidTag(r){if(eG(r))e(r.markup.value.expression,r.position);else if(rG(r))e(r.markup.expression,r.position);else if(tG(r)&&r.children)for(let i of r.children)i.type===jN.NodeTypes.LiquidVariableOutput&&typeof i.markup!="string"&&e(i.markup.expression,i.position)},async LiquidVariableOutput(r){typeof r.markup!="string"&&r.markup.filters.length&&e(r.markup.expression,r.position)}}}}});var UN=T(Fp=>{"use strict";y();Object.defineProperty(Fp,"__esModule",{value:!0});Fp.DeprecateBgsizes=void 0;var $N=Y(),ec=je();Fp.DeprecateBgsizes={meta:{code:"DeprecateBgsizes",name:"Deprecate Bgsizes",docs:{description:"This check is aimed at discouraging the use of the lazySizes bgset plugin.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecate-bgsizes"},type:$N.SourceCodeType.LiquidHtml,severity:$N.Severity.WARNING,schema:{},targets:[]},create(t){return{async HtmlElement(e){let r=e.attributes.filter(ec.isValuedHtmlAttribute).find(n=>(0,ec.isAttr)(n,"class")&&(0,ec.valueIncludes)(n,"lazyload"));if(r){let n=r;t.report({message:'Use the native loading="lazy" attribute instead of lazysizes',startIndex:n.attributePosition.start,endIndex:n.attributePosition.end})}let i=e.attributes.find(n=>(0,ec.isValuedHtmlAttribute)(n)&&(0,ec.isAttr)(n,"data-bgset"));i&&t.report({message:"Use the CSS imageset attribute instead of data-bgset",startIndex:i.position.start,endIndex:i.position.end})}}}}});var GN=T(jp=>{"use strict";y();Object.defineProperty(jp,"__esModule",{value:!0});jp.DeprecateLazysizes=void 0;var HN=Y(),on=je();function iG(t){return(0,on.isAttr)(t,"data-srcset")||(0,on.isAttr)(t,"data-sizes")}jp.DeprecateLazysizes={meta:{code:"DeprecateLazysizes",name:"Deprecate Lazysizes",docs:{description:"This check is aimed at discouraging the use of the lazysizes JavaScript library",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecate-lazysizes"},type:HN.SourceCodeType.LiquidHtml,severity:HN.Severity.WARNING,schema:{},targets:[]},create(t){return{async HtmlVoidElement(e){if(e.name!=="img")return;let r=e.attributes.filter(on.isHtmlAttribute),i=r.some(o=>(0,on.isAttr)(o,"src")),n=r.some(o=>(0,on.isAttr)(o,"loading"));i&&n||!e.attributes.filter(on.isValuedHtmlAttribute).some(o=>(0,on.isAttr)(o,"class")&&(0,on.valueIncludes)(o,"lazyload"))||!e.attributes.filter(on.isValuedHtmlAttribute).some(iG)||t.report({message:'Use the native loading="lazy" attribute instead of lazysizes',startIndex:e.position.start,endIndex:e.position.end})}}}}});var QN=T(Qa=>{"use strict";y();Object.defineProperty(Qa,"__esModule",{value:!0});Qa.fixHexToRgba=nG;Qa.suggestImgTagFix=sG;Qa.suggestImgUrlFix=aG;Qa.suggestImageUrlFix=oG;var Hp=ge(),Gp=je(),WN=5760,zN={pico:16,icon:32,thumb:50,small:100,compact:160,medium:240,large:480,grande:600,original:1024};function nG(t){if(t.args.length>1)return;let{start:e,end:r}=Wp(t),i=Ka(t,0),n;return i?n=` color_to_rgb | color_modify: 'alpha', ${i}`:n=" color_to_rgb",s=>s.replace(e,r,n)}function sG(t){let e="Replace 'img_tag' with 'image_tag'.",r=Ka(t,0),i=Ka(t,1),n=Ka(t,2),{width:s,height:a}=ob(n,{width:-1,height:-1}),{start:o,end:u}=Wp(t),l=ub({width:s,height:a}),f={width:s,height:a,alt:$p(r),class:$p(i)},h=Vp("image_url",l),p=Vp("image_tag",f);return[{message:e,fix:m=>{let v=`${h} |${p}`;m.replace(o,u,v)}}]}function aG(t){let e="Replace 'img_url' with 'image_url'.",r=Bp(t,"crop"),i=Bp(t,"format"),n=Bp(t,"scale"),s=Ka(t,0),a=t.args.at(0);if(ab(n?.value)||ab(a))return;let{width:o,height:u}=ub(uG(t,ob(s))),{start:l,end:f}=Wp(t),h={width:o,height:u};return Up(r?.value)&&(h.crop=$p(r.value.value)),Up(i?.value)&&(h.format=$p(i.value.value)),ab(i?.value)&&(h.format=i.value.name),[{message:e,fix:p=>{let m=Vp("image_url",h);p.replace(l,f,m)}}]}function oG(t,e){let r=`Replace '${t}' with 'image_url'.`,i=Ka(e,0),{width:n,height:s}=ub(ob(i)),{start:a,end:o}=Wp(e);return[{message:r,fix:u=>{let l=Vp("image_url",{width:n,height:s});u.replace(a,o,l)}}]}function ob(t,e={width:100,height:100}){if(!t)return{...e};if(t in zN){let n=zN[t];return{width:n,height:n}}let[r,i]=t.split("x").map(n=>parseInt(n));return JN({width:r,height:i})}function uG(t,e){let r=parseInt(cG(t,"scale")||"0")||1;return JN({width:e.width*r,height:e.height*r})}function JN(t){return{width:Math.min(t.width,WN),height:Math.min(t.height,WN)}}function ub(t){let{width:e,height:r}=t;return(!r||r===-1)&&(!e||e===-1)&&(e=100),{width:e,height:r}}function Ka(t,e){let r=t.args.at(e);if(KN(r)||Up(r))return r.value}function cG(t,e){let i=Bp(t,e)?.value;if(KN(i)||Up(i))return i.value}function Bp(t,e){return t.args.find(i=>(0,Gp.isNodeOfType)(Hp.NodeTypes.NamedArgument,i)&&i.name===e)}function Vp(t,e){let r=Object.entries(e).filter(([i,n])=>n&&n!==-1).map(([i,n])=>`${i}: ${n}`).join(", ");return r?` ${t}: ${r}`:` ${t}`}function Wp(t){let e=t.position,r=t.source.slice(e.start).indexOf("|");return{start:e.start+r+1,end:e.end}}function $p(t){return t?`'${t}'`:null}function ab(t){return(0,Gp.isNodeOfType)(Hp.NodeTypes.VariableLookup,t)}function Up(t){return(0,Gp.isNodeOfType)(Hp.NodeTypes.String,t)}function KN(t){return(0,Gp.isNodeOfType)(Hp.NodeTypes.Number,t)}});var XN=T(Jp=>{"use strict";y();Object.defineProperty(Jp,"__esModule",{value:!0});Jp.DeprecatedFilter=void 0;var YN=Y(),zp=QN();Jp.DeprecatedFilter={meta:{code:"DeprecatedFilter",aliases:["DeprecatedFilters"],name:"Deprecated Filter",docs:{description:"Discourages using deprecated filters in themes.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-filter",recommended:!0},type:YN.SourceCodeType.LiquidHtml,severity:YN.Severity.WARNING,schema:{},targets:[]},create(t){return t.themeDocset?{LiquidFilter:async e=>{let r=await t.themeDocset.filters(),i=r.find(l=>l.deprecated&&l.name===e.name);if(!i)return;let n=hG(i),s=r.find(l=>l.name===n),a=pG(i,s),o=lG(e),u=fG(e);t.report({message:a,suggest:o,fix:u,startIndex:e.position.start+1,endIndex:e.position.end})}}:{}}};function lG(t){let e=t.name;switch(e){case"img_tag":return(0,zp.suggestImgTagFix)(t);case"img_url":return(0,zp.suggestImgUrlFix)(t);case"article_img_url":case"collection_img_url":case"product_img_url":return(0,zp.suggestImageUrlFix)(e,t);case"currency_selector":return}}function fG(t){if(t.name==="hex_to_rgba")return(0,zp.fixHexToRgba)(t)}function pG(t,e){return e?`Deprecated filter '${t.name}', consider using '${e.name}'.`:`Deprecated filter '${t.name}'.`}function hG(t){return t.deprecation_reason?.match(/replaced by \[`(.+?)`\]/)?.[1]}});var Qp=T(Kp=>{"use strict";y();Object.defineProperty(Kp,"__esModule",{value:!0});Kp.DEPRECATED_FONT_HANDLES=void 0;Kp.DEPRECATED_FONT_HANDLES=new Set(["agmena_i3","agmena_i4","agmena_i6","agmena_i7","agmena_n3","agmena_n4","agmena_n6","agmena_n7","akko_i2","akko_i3","akko_i4","akko_i5","akko_i7","akko_i9","akko_n2","akko_n3","akko_n4","akko_n5","akko_n7","akko_n9","alfie_n4","americana_i4","americana_n4","americana_n7","americana_n8","antique_olive_i4","antique_olive_n3","antique_olive_n4","antique_olive_n7","antique_olive_n9","armata_n4","avenir_next_i1","avenir_next_i2","avenir_next_i3","avenir_next_i4","avenir_next_i5","avenir_next_i6","avenir_next_i7","avenir_next_i8","avenir_next_n1","avenir_next_n2","avenir_next_n3","avenir_next_n4","avenir_next_n5","avenir_next_n6","avenir_next_n7","avenir_next_n8","avenir_next_rounded_i4","avenir_next_rounded_i5","avenir_next_rounded_i6","avenir_next_rounded_i7","avenir_next_rounded_n4","avenir_next_rounded_n5","avenir_next_rounded_n6","avenir_next_rounded_n7","azbuka_i3","azbuka_i4","azbuka_i5","azbuka_i6","azbuka_i7","azbuka_n2","azbuka_n3","azbuka_n4","azbuka_n5","azbuka_n6","azbuka_n7","azbuka_n8","azbuka_n9","basic_commercial_i3","basic_commercial_i4","basic_commercial_i7","basic_commercial_i8","basic_commercial_n3","basic_commercial_n4","basic_commercial_n7","basic_commercial_n8","basic_commercial_soft_rounded_n4","basic_commercial_soft_rounded_n7","basic_commercial_soft_rounded_n9","baskerville_no_2_i4","baskerville_no_2_i7","baskerville_no_2_n4","baskerville_no_2_n7","bauer_bodoni_i4","bauer_bodoni_i7","bauer_bodoni_i9","bauer_bodoni_n4","bauer_bodoni_n7","bauer_bodoni_n9","beefcakes_i4","beefcakes_n4","bembo_book_i4","bembo_book_i7","bembo_book_n4","bembo_book_n7","bernhard_modern_i4","bernhard_modern_i7","bernhard_modern_n4","bernhard_modern_n7","bio_rhyme_n2","bio_rhyme_n3","bio_rhyme_n4","bio_rhyme_n5","bio_rhyme_n6","bio_rhyme_n7","bio_rhyme_n8","bodoni_poster_i9","bodoni_poster_n9","burlingame_i1","burlingame_i2","burlingame_i3","burlingame_i4","burlingame_i5","burlingame_i6","burlingame_i7","burlingame_i8","burlingame_i9","burlingame_n1","burlingame_n2","burlingame_n3","burlingame_n4","burlingame_n5","burlingame_n6","burlingame_n7","burlingame_n8","burlingame_n9","cachet_i1","cachet_i2","cachet_i3","cachet_i4","cachet_i5","cachet_i6","cachet_i7","cachet_i8","cachet_n1","cachet_n2","cachet_n3","cachet_n4","cachet_n5","cachet_n6","cachet_n7","cachet_n8","cardamon_i4","cardamon_i5","cardamon_i6","cardamon_i7","cardamon_n4","cardamon_n5","cardamon_n6","cardamon_n7","carter_sans_i4","carter_sans_i5","carter_sans_i6","carter_sans_i7","carter_sans_n4","carter_sans_n5","carter_sans_n6","carter_sans_n7","caslon_bold_i4","caslon_bold_n4","caslon_old_face_i4","caslon_old_face_n4","caslon_old_face_n7","centaur_i4","centaur_i7","centaur_n4","centaur_n7","century_gothic_i4","century_gothic_i7","century_gothic_n4","century_gothic_n7","chong_modern_i3","chong_modern_i4","chong_modern_i7","chong_modern_n3","chong_modern_n4","chong_modern_n7","claire_news_n3","claire_news_n7","cooper_bt_i2","cooper_bt_i5","cooper_bt_i7","cooper_bt_i9","cooper_bt_n2","cooper_bt_n5","cooper_bt_n7","cooper_bt_n9","daytona_i2","daytona_i3","daytona_i4","daytona_i6","daytona_i7","daytona_n2","daytona_n3","daytona_n4","daytona_n6","daytona_n7","din_neuzeit_grotesk_n3","din_neuzeit_grotesk_n7","din_next_i2","din_next_i3","din_next_i4","din_next_i5","din_next_i7","din_next_i8","din_next_i9","din_next_n2","din_next_n3","din_next_n4","din_next_n5","din_next_n7","din_next_n8","din_next_n9","din_next_slab_i2","din_next_slab_i3","din_next_slab_i4","din_next_slab_i5","din_next_slab_i7","din_next_slab_i8","din_next_slab_i9","din_next_slab_n2","din_next_slab_n3","din_next_slab_n4","din_next_slab_n5","din_next_slab_n7","din_next_slab_n8","din_next_slab_n9","electra_i4","electra_i7","electra_n4","electra_n7","eurostile_next_i2","eurostile_next_i3","eurostile_next_i4","eurostile_next_i6","eurostile_next_i7","eurostile_next_n2","eurostile_next_n3","eurostile_next_n4","eurostile_next_n6","eurostile_next_n7","fette_gotisch_n4","ff_meta_i1","ff_meta_i2","ff_meta_i3","ff_meta_i4","ff_meta_i5","ff_meta_i6","ff_meta_i7","ff_meta_i9","ff_meta_n1","ff_meta_n2","ff_meta_n3","ff_meta_n4","ff_meta_n5","ff_meta_n6","ff_meta_n7","ff_meta_n9","ff_meta_serif_i3","ff_meta_serif_i4","ff_meta_serif_i5","ff_meta_serif_i7","ff_meta_serif_i8","ff_meta_serif_i9","ff_meta_serif_n3","ff_meta_serif_n4","ff_meta_serif_n5","ff_meta_serif_n7","ff_meta_serif_n8","ff_meta_serif_n9","ff_tisa_i2","ff_tisa_i3","ff_tisa_i4","ff_tisa_i5","ff_tisa_i7","ff_tisa_i8","ff_tisa_i9","ff_tisa_n2","ff_tisa_n3","ff_tisa_n4","ff_tisa_n5","ff_tisa_n7","ff_tisa_n8","ff_tisa_n9","ff_tisa_sans_i2","ff_tisa_sans_i3","ff_tisa_sans_i4","ff_tisa_sans_i5","ff_tisa_sans_i7","ff_tisa_sans_i8","ff_tisa_sans_i9","ff_tisa_sans_n2","ff_tisa_sans_n3","ff_tisa_sans_n4","ff_tisa_sans_n5","ff_tisa_sans_n7","ff_tisa_sans_n8","ff_tisa_sans_n9","ff_unit_i2","ff_unit_i3","ff_unit_i4","ff_unit_i5","ff_unit_i7","ff_unit_i8","ff_unit_i9","ff_unit_n2","ff_unit_n3","ff_unit_n4","ff_unit_n5","ff_unit_n7","ff_unit_n8","ff_unit_n9","ff_unit_rounded_i3","ff_unit_rounded_i4","ff_unit_rounded_i5","ff_unit_rounded_i7","ff_unit_rounded_i8","ff_unit_rounded_i9","ff_unit_rounded_n3","ff_unit_rounded_n4","ff_unit_rounded_n5","ff_unit_rounded_n7","ff_unit_rounded_n8","ff_unit_rounded_n9","ff_unit_slab_i2","ff_unit_slab_i3","ff_unit_slab_i4","ff_unit_slab_i5","ff_unit_slab_i7","ff_unit_slab_i8","ff_unit_slab_i9","ff_unit_slab_n2","ff_unit_slab_n3","ff_unit_slab_n4","ff_unit_slab_n5","ff_unit_slab_n7","ff_unit_slab_n8","ff_unit_slab_n9","friz_quadrata_i4","friz_quadrata_i7","friz_quadrata_n4","friz_quadrata_n7","frutiger_serif_i3","frutiger_serif_i4","frutiger_serif_i5","frutiger_serif_i7","frutiger_serif_i8","frutiger_serif_n3","frutiger_serif_n4","frutiger_serif_n5","frutiger_serif_n7","frutiger_serif_n8","fs_kim_i4","fs_kim_i5","fs_kim_i7","fs_kim_i8","fs_kim_i9","fs_kim_n4","fs_kim_n5","fs_kim_n7","fs_kim_n8","fs_kim_n9","fs_koopman_i1","fs_koopman_i3","fs_koopman_i4","fs_koopman_i5","fs_koopman_i7","fs_koopman_i8","fs_koopman_i9","fs_koopman_n1","fs_koopman_n3","fs_koopman_n4","fs_koopman_n5","fs_koopman_n7","fs_koopman_n8","fs_koopman_n9","fs_siena_i1","fs_siena_i2","fs_siena_i3","fs_siena_i4","fs_siena_i5","fs_siena_i6","fs_siena_i7","fs_siena_n1","fs_siena_n2","fs_siena_n3","fs_siena_n4","fs_siena_n5","fs_siena_n6","fs_siena_n7","futura_black_n4","futura_n3","futura_n4","futura_n5","futura_n6","futura_n7","futura_n8","futura_n9","futura_o3","futura_o4","futura_o5","futura_o6","futura_o7","futura_o8","geometric_415_i4","geometric_415_i6","geometric_415_i7","geometric_415_n4","geometric_415_n6","geometric_415_n7","georgia_pro_i3","georgia_pro_i4","georgia_pro_i6","georgia_pro_i7","georgia_pro_i9","georgia_pro_n3","georgia_pro_n4","georgia_pro_n6","georgia_pro_n7","georgia_pro_n9","gill_sans_nova_i1","gill_sans_nova_i2","gill_sans_nova_i3","gill_sans_nova_i4","gill_sans_nova_i5","gill_sans_nova_i6","gill_sans_nova_i7","gill_sans_nova_n1","gill_sans_nova_n2","gill_sans_nova_n3","gill_sans_nova_n4","gill_sans_nova_n5","gill_sans_nova_n6","gill_sans_nova_n7","gill_sans_nova_n8","gill_sans_nova_n9","glegoo_n4","glegoo_n7","goudy_old_style_i4","goudy_old_style_i7","goudy_old_style_n4","goudy_old_style_n7","goudy_old_style_n8","harmonia_sans_i3","harmonia_sans_i4","harmonia_sans_i6","harmonia_sans_i7","harmonia_sans_i9","harmonia_sans_n3","harmonia_sans_n4","harmonia_sans_n6","harmonia_sans_n7","harmonia_sans_n9","helvetica_n3","helvetica_n4","helvetica_n7","helvetica_n9","helvetica_o3","helvetica_o4","helvetica_o7","helvetica_o9","hope_sans_i1","hope_sans_i2","hope_sans_i3","hope_sans_i4","hope_sans_i6","hope_sans_i7","hope_sans_n1","hope_sans_n2","hope_sans_n3","hope_sans_n4","hope_sans_n6","hope_sans_n7","humanist_521_i2","humanist_521_i4","humanist_521_i7","humanist_521_n2","humanist_521_n4","humanist_521_n7","humanist_521_n8","humanist_521_n9","itc_avant_garde_gothic_n2","itc_avant_garde_gothic_n4","itc_avant_garde_gothic_n5","itc_avant_garde_gothic_n6","itc_avant_garde_gothic_n7","itc_avant_garde_gothic_o2","itc_avant_garde_gothic_o4","itc_avant_garde_gothic_o5","itc_avant_garde_gothic_o6","itc_avant_garde_gothic_o7","itc_benguiat_i4","itc_benguiat_i5","itc_benguiat_i7","itc_benguiat_n4","itc_benguiat_n5","itc_benguiat_n7","itc_berkeley_old_style_i4","itc_berkeley_old_style_i5","itc_berkeley_old_style_i7","itc_berkeley_old_style_i9","itc_berkeley_old_style_n4","itc_berkeley_old_style_n5","itc_berkeley_old_style_n7","itc_berkeley_old_style_n9","itc_bodoni_seventytwo_i4","itc_bodoni_seventytwo_i7","itc_bodoni_seventytwo_n4","itc_bodoni_seventytwo_n7","itc_bodoni_twelve_i4","itc_bodoni_twelve_i7","itc_bodoni_twelve_n4","itc_bodoni_twelve_n7","itc_caslon_no_224_i4","itc_caslon_no_224_i5","itc_caslon_no_224_i7","itc_caslon_no_224_i9","itc_caslon_no_224_n4","itc_caslon_no_224_n5","itc_caslon_no_224_n7","itc_caslon_no_224_n9","itc_charter_i4","itc_charter_i7","itc_charter_i9","itc_charter_n4","itc_charter_n7","itc_charter_n9","itc_cheltenham_i3","itc_cheltenham_i4","itc_cheltenham_i7","itc_cheltenham_i9","itc_cheltenham_n3","itc_cheltenham_n4","itc_cheltenham_n7","itc_cheltenham_n9","itc_clearface_i4","itc_clearface_i7","itc_clearface_i8","itc_clearface_i9","itc_clearface_n4","itc_clearface_n7","itc_clearface_n8","itc_clearface_n9","itc_conduit_i2","itc_conduit_i3","itc_conduit_i4","itc_conduit_i5","itc_conduit_i7","itc_conduit_i8","itc_conduit_i9","itc_conduit_n2","itc_conduit_n3","itc_conduit_n4","itc_conduit_n5","itc_conduit_n7","itc_conduit_n8","itc_conduit_n9","itc_esprit_i4","itc_esprit_i5","itc_esprit_i7","itc_esprit_i9","itc_esprit_n4","itc_esprit_n5","itc_esprit_n7","itc_esprit_n9","itc_founders_caslon_i4","itc_founders_caslon_n4","itc_franklin_gothic_i4","itc_franklin_gothic_i5","itc_franklin_gothic_i7","itc_franklin_gothic_i9","itc_franklin_gothic_n4","itc_franklin_gothic_n5","itc_franklin_gothic_n7","itc_franklin_gothic_n9","itc_galliard_i4","itc_galliard_i7","itc_galliard_i8","itc_galliard_i9","itc_galliard_n4","itc_galliard_n7","itc_galliard_n8","itc_galliard_n9","itc_gamma_i4","itc_gamma_i5","itc_gamma_i7","itc_gamma_i8","itc_gamma_n4","itc_gamma_n5","itc_gamma_n7","itc_gamma_n8","itc_goudy_sans_i4","itc_goudy_sans_i5","itc_goudy_sans_i7","itc_goudy_sans_i9","itc_goudy_sans_n4","itc_goudy_sans_n5","itc_goudy_sans_n7","itc_goudy_sans_n9","itc_johnston_i3","itc_johnston_i5","itc_johnston_i7","itc_johnston_n3","itc_johnston_n5","itc_johnston_n7","itc_mendoza_roman_i4","itc_mendoza_roman_i5","itc_mendoza_roman_i7","itc_mendoza_roman_n4","itc_mendoza_roman_n5","itc_mendoza_roman_n7","itc_modern_no_216_i3","itc_modern_no_216_i5","itc_modern_no_216_i7","itc_modern_no_216_i8","itc_modern_no_216_n3","itc_modern_no_216_n5","itc_modern_no_216_n7","itc_modern_no_216_n8","itc_new_baskerville_i4","itc_new_baskerville_i6","itc_new_baskerville_i7","itc_new_baskerville_i9","itc_new_baskerville_n4","itc_new_baskerville_n6","itc_new_baskerville_n7","itc_new_baskerville_n9","itc_new_esprit_i4","itc_new_esprit_i5","itc_new_esprit_i7","itc_new_esprit_i8","itc_new_esprit_n4","itc_new_esprit_n5","itc_new_esprit_n7","itc_new_esprit_n8","itc_new_veljovic_i3","itc_new_veljovic_i4","itc_new_veljovic_i5","itc_new_veljovic_i7","itc_new_veljovic_i9","itc_new_veljovic_n3","itc_new_veljovic_n4","itc_new_veljovic_n5","itc_new_veljovic_n7","itc_new_veljovic_n9","itc_novarese_i4","itc_novarese_i5","itc_novarese_i7","itc_novarese_n4","itc_novarese_n5","itc_novarese_n7","itc_novarese_n9","itc_officina_sans_i4","itc_officina_sans_i5","itc_officina_sans_i7","itc_officina_sans_i8","itc_officina_sans_i9","itc_officina_sans_n4","itc_officina_sans_n5","itc_officina_sans_n7","itc_officina_sans_n8","itc_officina_sans_n9","itc_officina_serif_i4","itc_officina_serif_i5","itc_officina_serif_i7","itc_officina_serif_i8","itc_officina_serif_i9","itc_officina_serif_n4","itc_officina_serif_n5","itc_officina_serif_n7","itc_officina_serif_n8","itc_officina_serif_n9","itc_stepp_i3","itc_stepp_i5","itc_stepp_i7","itc_stepp_i9","itc_stepp_n3","itc_stepp_n4","itc_stepp_n7","itc_stepp_n9","itc_stone_humanist_i5","itc_stone_humanist_i6","itc_stone_humanist_i7","itc_stone_humanist_n5","itc_stone_humanist_n6","itc_stone_humanist_n7","itc_stone_informal_i4","itc_stone_informal_i6","itc_stone_informal_i7","itc_stone_informal_n4","itc_stone_informal_n6","itc_stone_informal_n7","itc_stone_sans_ii_i3","itc_stone_sans_ii_i4","itc_stone_sans_ii_i5","itc_stone_sans_ii_i6","itc_stone_sans_ii_i7","itc_stone_sans_ii_i8","itc_stone_sans_ii_n3","itc_stone_sans_ii_n4","itc_stone_sans_ii_n5","itc_stone_sans_ii_n6","itc_stone_sans_ii_n7","itc_stone_sans_ii_n8","itc_stone_serif_i4","itc_stone_serif_i6","itc_stone_serif_i7","itc_stone_serif_n4","itc_stone_serif_n6","itc_stone_serif_n7","itc_tapioca_n5","joanna_nova_i1","joanna_nova_i2","joanna_nova_i3","joanna_nova_i4","joanna_nova_i5","joanna_nova_i6","joanna_nova_i7","joanna_nova_i8","joanna_nova_i9","joanna_nova_n1","joanna_nova_n2","joanna_nova_n3","joanna_nova_n4","joanna_nova_n5","joanna_nova_n6","joanna_nova_n7","joanna_nova_n8","joanna_nova_n9","joanna_sans_nova_i1","joanna_sans_nova_i2","joanna_sans_nova_i3","joanna_sans_nova_i4","joanna_sans_nova_i5","joanna_sans_nova_i7","joanna_sans_nova_i8","joanna_sans_nova_i9","joanna_sans_nova_n1","joanna_sans_nova_n2","joanna_sans_nova_n3","joanna_sans_nova_n4","joanna_sans_nova_n5","joanna_sans_nova_n7","joanna_sans_nova_n8","joanna_sans_nova_n9","kairos_i1","kairos_i2","kairos_i3","kairos_i4","kairos_i5","kairos_i7","kairos_i8","kairos_i9","kairos_n1","kairos_n2","kairos_n3","kairos_n4","kairos_n5","kairos_n7","kairos_n8","kairos_n9","laurentian_i4","laurentian_i6","laurentian_n4","laurentian_n6","laurentian_n7","libelle_n4","linotype_didot_i4","linotype_didot_i7","linotype_didot_n4","linotype_didot_n7","linotype_gianotten_i3","linotype_gianotten_i4","linotype_gianotten_i5","linotype_gianotten_i7","linotype_gianotten_i8","linotype_gianotten_n3","linotype_gianotten_n4","linotype_gianotten_n5","linotype_gianotten_n7","linotype_gianotten_n8","linotype_gianotten_n9","linotype_really_i5","linotype_really_i6","linotype_really_n5","linotype_really_n6","linotype_syntax_serif_i3","linotype_syntax_serif_i4","linotype_syntax_serif_i5","linotype_syntax_serif_i7","linotype_syntax_serif_i8","linotype_syntax_serif_i9","linotype_syntax_serif_n3","linotype_syntax_serif_n4","linotype_syntax_serif_n5","linotype_syntax_serif_n7","linotype_syntax_serif_n8","linotype_syntax_serif_n9","lobster_n4","lucia_n4","luthersche_fraktur_n4","madera_i1","madera_i2","madera_i3","madera_i4","madera_i5","madera_i6","madera_i7","madera_i8","madera_n1","madera_n2","madera_n3","madera_n4","madera_n5","madera_n6","madera_n7","madera_n8","malabar_i4","malabar_i7","malabar_i9","malabar_n4","malabar_n7","malabar_n9","mariposa_sans_i4","mariposa_sans_n4","mariposa_sans_n5","mariposa_sans_n7","mariposa_sans_n9","megrim_n4","melior_i4","melior_i7","melior_n4","melior_n7","memphis_i3","memphis_i5","memphis_i7","memphis_n3","memphis_n5","memphis_n7","memphis_n8","memphis_soft_rounded_n5","memphis_soft_rounded_n7","memphis_soft_rounded_n8","mentor_sans_i3","mentor_sans_i4","mentor_sans_i7","mentor_sans_i9","mentor_sans_n3","mentor_sans_n4","mentor_sans_n7","mentor_sans_n9","metro_nova_i2","metro_nova_i3","metro_nova_i4","metro_nova_i5","metro_nova_i7","metro_nova_i8","metro_nova_i9","metro_nova_n2","metro_nova_n3","metro_nova_n4","metro_nova_n5","metro_nova_n7","metro_nova_n8","metro_nova_n9","modern_no_20_i4","modern_no_20_n4","monotype_baskerville_i4","monotype_baskerville_i6","monotype_baskerville_i7","monotype_baskerville_n4","monotype_baskerville_n6","monotype_baskerville_n7","monotype_bodoni_i4","monotype_bodoni_i5","monotype_bodoni_i7","monotype_bodoni_i8","monotype_bodoni_i9","monotype_bodoni_n4","monotype_bodoni_n5","monotype_bodoni_n7","monotype_bodoni_n8","monotype_bodoni_n9","monotype_century_old_style_i5","monotype_century_old_style_i7","monotype_century_old_style_n5","monotype_century_old_style_n7","monotype_goudy_i4","monotype_goudy_i7","monotype_goudy_modern_i4","monotype_goudy_modern_i7","monotype_goudy_modern_n4","monotype_goudy_modern_n7","monotype_goudy_n4","monotype_goudy_n7","monotype_goudy_n8","monotype_italian_old_style_i4","monotype_italian_old_style_i7","monotype_italian_old_style_n4","monotype_italian_old_style_n7","monotype_new_clarendon_n5","monotype_new_clarendon_n7","monotype_news_gothic_i4","monotype_news_gothic_i7","monotype_news_gothic_n4","monotype_news_gothic_n7","monotype_sabon_i4","monotype_sabon_i6","monotype_sabon_n4","monotype_sabon_n6","mouse_memoirs_n4","mundo_sans_i2","mundo_sans_i3","mundo_sans_i4","mundo_sans_i5","mundo_sans_i7","mundo_sans_i8","mundo_sans_i9","mundo_sans_n2","mundo_sans_n3","mundo_sans_n4","mundo_sans_n5","mundo_sans_n7","mundo_sans_n8","mundo_sans_n9","neo_sans_i3","neo_sans_i4","neo_sans_i5","neo_sans_i7","neo_sans_i8","neo_sans_i9","neo_sans_n3","neo_sans_n4","neo_sans_n5","neo_sans_n7","neo_sans_n8","neo_sans_n9","neue_aachen_i1","neue_aachen_i2","neue_aachen_i3","neue_aachen_i4","neue_aachen_i5","neue_aachen_i6","neue_aachen_i7","neue_aachen_i8","neue_aachen_i9","neue_aachen_n1","neue_aachen_n2","neue_aachen_n3","neue_aachen_n4","neue_aachen_n5","neue_aachen_n6","neue_aachen_n7","neue_aachen_n8","neue_aachen_n9","neue_frutiger_1450_i3","neue_frutiger_1450_i4","neue_frutiger_1450_i6","neue_frutiger_1450_i7","neue_frutiger_1450_n3","neue_frutiger_1450_n4","neue_frutiger_1450_n6","neue_frutiger_1450_n7","neue_haas_unica_i1","neue_haas_unica_i2","neue_haas_unica_i3","neue_haas_unica_i4","neue_haas_unica_i5","neue_haas_unica_i6","neue_haas_unica_i7","neue_haas_unica_i8","neue_haas_unica_i9","neue_haas_unica_n1","neue_haas_unica_n2","neue_haas_unica_n3","neue_haas_unica_n4","neue_haas_unica_n5","neue_haas_unica_n6","neue_haas_unica_n7","neue_haas_unica_n8","neue_haas_unica_n9","neue_plak_i2","neue_plak_i3","neue_plak_i4","neue_plak_i6","neue_plak_i7","neue_plak_i9","neue_plak_n2","neue_plak_n3","neue_plak_n4","neue_plak_n6","neue_plak_n7","neue_plak_n9","neue_swift_i3","neue_swift_i4","neue_swift_i5","neue_swift_i6","neue_swift_i7","neue_swift_n3","neue_swift_n4","neue_swift_n5","neue_swift_n6","neue_swift_n7","neuzeit_office_i4","neuzeit_office_i7","neuzeit_office_n4","neuzeit_office_n7","neuzeit_office_soft_rounded_n4","neuzeit_office_soft_rounded_n7","neuzeit_s_n4","neuzeit_s_n9","new_century_schoolbook_i4","new_century_schoolbook_i7","new_century_schoolbook_n4","new_century_schoolbook_n7","news_702_i4","news_702_i7","news_702_n4","news_702_n7","news_705_i4","news_705_i7","news_705_n4","news_705_n7","news_cycle_n4","news_cycle_n7","news_gothic_no_2_i2","news_gothic_no_2_i3","news_gothic_no_2_i4","news_gothic_no_2_i5","news_gothic_no_2_i7","news_gothic_no_2_i8","news_gothic_no_2_n2","news_gothic_no_2_n3","news_gothic_no_2_n4","news_gothic_no_2_n5","news_gothic_no_2_n7","news_gothic_no_2_n8","news_plantin_i4","news_plantin_i7","news_plantin_n4","news_plantin_n7","noticia_text_i4","noticia_text_i7","noticia_text_n4","noticia_text_n7","optima_nova_i3","optima_nova_i4","optima_nova_i5","optima_nova_i6","optima_nova_i7","optima_nova_i8","optima_nova_i9","optima_nova_n3","optima_nova_n4","optima_nova_n5","optima_nova_n6","optima_nova_n7","optima_nova_n8","optima_nova_n9","oxygen_n3","oxygen_n4","oxygen_n7","parma_i4","parma_n4","parma_n7","perpetua_i4","perpetua_i7","perpetua_n4","perpetua_n7","plantin_i3","plantin_i4","plantin_i6","plantin_i7","plantin_n3","plantin_n4","plantin_n6","plantin_n7","pmn_caecilia_i3","pmn_caecilia_i4","pmn_caecilia_i7","pmn_caecilia_i9","pmn_caecilia_n3","pmn_caecilia_n4","pmn_caecilia_n7","pmn_caecilia_n9","prata_n4","pt_mono_n4","pt_sans_narrow_n4","pt_sans_narrow_n7","quattrocento_n4","quattrocento_n7","quire_sans_i1","quire_sans_i2","quire_sans_i3","quire_sans_i4","quire_sans_i5","quire_sans_i6","quire_sans_i7","quire_sans_i8","quire_sans_i9","quire_sans_n1","quire_sans_n2","quire_sans_n3","quire_sans_n4","quire_sans_n5","quire_sans_n6","quire_sans_n7","quire_sans_n8","quire_sans_n9","really_no_2_i3","really_no_2_i4","really_no_2_i5","really_no_2_i6","really_no_2_i7","really_no_2_i8","really_no_2_i9","really_no_2_n3","really_no_2_n4","really_no_2_n5","really_no_2_n6","really_no_2_n7","really_no_2_n8","really_no_2_n9","righteous_n4","rockwell_i4","rockwell_i7","rockwell_n4","rockwell_n7","rockwell_n8","sabon_next_i4","sabon_next_i6","sabon_next_i7","sabon_next_i8","sabon_next_i9","sabon_next_n4","sabon_next_n6","sabon_next_n7","sabon_next_n8","sabon_next_n9","sackers_square_gothic_n4","sagrantino_n4","scene_i3","scene_i4","scene_i5","scene_i7","scene_i8","scene_i9","scene_n3","scene_n4","scene_n5","scene_n7","scene_n8","scene_n9","scherzo_i4","scherzo_i6","scherzo_i7","scherzo_n4","scherzo_n6","scherzo_n7","slabo_13px_n4","slate_i2","slate_i3","slate_i4","slate_i5","slate_i7","slate_i9","slate_n2","slate_n3","slate_n4","slate_n5","slate_n7","slate_n9","soho_gothic_i2","soho_gothic_i3","soho_gothic_i4","soho_gothic_i5","soho_gothic_i7","soho_gothic_i8","soho_gothic_i9","soho_gothic_n2","soho_gothic_n3","soho_gothic_n4","soho_gothic_n5","soho_gothic_n7","soho_gothic_n8","soho_gothic_n9","soho_i1","soho_i2","soho_i3","soho_i4","soho_i5","soho_i6","soho_i7","soho_i8","soho_i9","soho_n1","soho_n2","soho_n3","soho_n4","soho_n5","soho_n6","soho_n7","soho_n8","soho_n9","stempel_schneidler_i3","stempel_schneidler_i4","stempel_schneidler_i5","stempel_schneidler_i7","stempel_schneidler_i8","stempel_schneidler_n3","stempel_schneidler_n4","stempel_schneidler_n5","stempel_schneidler_n7","stempel_schneidler_n8","swiss_721_i1","swiss_721_i2","swiss_721_i4","swiss_721_i5","swiss_721_i7","swiss_721_i8","swiss_721_i9","swiss_721_n1","swiss_721_n2","swiss_721_n4","swiss_721_n5","swiss_721_n7","swiss_721_n8","swiss_721_n9","swiss_721_rounded_n7","swiss_721_rounded_n9","tiemann_n3","tiemann_n4","tinos_i4","tinos_i7","tinos_n4","tinos_n7","trade_gothic_n3","trade_gothic_n4","trade_gothic_n7","trade_gothic_next_i3","trade_gothic_next_i4","trade_gothic_next_i7","trade_gothic_next_i8","trade_gothic_next_n3","trade_gothic_next_n4","trade_gothic_next_n7","trade_gothic_next_n8","trade_gothic_o3","trade_gothic_o4","trade_gothic_o7","twentieth_century_i3","twentieth_century_i5","twentieth_century_i7","twentieth_century_i8","twentieth_century_i9","twentieth_century_n3","twentieth_century_n4","twentieth_century_n5","twentieth_century_n6","twentieth_century_n7","twentieth_century_n8","twentieth_century_n9","univers_next_i1","univers_next_i2","univers_next_i3","univers_next_i4","univers_next_i5","univers_next_i6","univers_next_i7","univers_next_i8","univers_next_i9","univers_next_n1","univers_next_n2","univers_next_n3","univers_next_n4","univers_next_n5","univers_next_n6","univers_next_n7","univers_next_n8","univers_next_n9","univers_next_typewriter_i4","univers_next_typewriter_i7","univers_next_typewriter_n4","univers_next_typewriter_n7","unna_i4","unna_i7","unna_n4","unna_n7","vala_n4","varela_n4","varela_round_n4","verdana_pro_i3","verdana_pro_i4","verdana_pro_i6","verdana_pro_i7","verdana_pro_i9","verdana_pro_n3","verdana_pro_n4","verdana_pro_n6","verdana_pro_n7","verdana_pro_n9","vidaloka_n4","volkhov_i4","vollkorn_i5","volkhov_i7","vollkorn_i8","volkhov_n4","volkhov_n7","vollkorn_i4","vollkorn_i6","vollkorn_i7","vollkorn_i9","vollkorn_n4","vollkorn_n5","vollkorn_n6","vollkorn_n7","vollkorn_n8","vollkorn_n9","waza_n4","wola_n4","ysobel_i3","ysobel_i4","ysobel_i6","ysobel_i7","ysobel_n3","ysobel_n4","ysobel_n6","ysobel_n7","zurich_extended_n4","zurich_extended_n7","zurich_extended_n8","zurich_extended_n9","zurich_i3","zurich_i4","zurich_i7","zurich_i8","zurich_n3","zurich_n4","zurich_n7","zurich_n8","zurich_n9"])});var nL=T(Xp=>{"use strict";y();Object.defineProperty(Xp,"__esModule",{value:!0});Xp.DeprecatedFontsOnSectionsAndBlocks=void 0;var dG=xt(),ZN=Y(),Yp=ze(),cb=Qp();Xp.DeprecatedFontsOnSectionsAndBlocks={meta:{code:"DeprecatedFontsOnSectionsAndBlocks",name:"Check for deprecated fonts in section and block schema settings values",docs:{description:"Warns on deprecated fonts in section and block schema settings values.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-fonts-on-sections-and-blocks"},type:ZN.SourceCodeType.LiquidHtml,severity:ZN.Severity.WARNING,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=await(0,dG.getSchema)(t),{validSchema:i,ast:n}=r??{};if(!i||i instanceof Error||!n||n instanceof Error)return;let s=e.blockStartPosition.end;mG(i,s,n,t),gG(i,s,n,t),await yG(i,s,n,t),"default"in i&&await _G(i,s,n,t)}}}};function mG(t,e,r,i){let n=t.settings;n&&eL(n,e,r,["settings"],i)}function eL(t,e,r,i,n){t.forEach((s,a)=>{if(s.type==="font_picker"&&s.default&&cb.DEPRECATED_FONT_HANDLES.has(s.default)){let o=i.concat([String(a),"default"]);lb(n,e,r,o,`setting '${s.id}' is using deprecated font '${s.default}'`)}})}function gG(t,e,r,i){let n=t.blocks;n&&n.forEach((s,a)=>{"settings"in s&&s.settings&&eL(s.settings,e,r,["blocks",String(a),"settings"],i)})}async function yG(t,e,r,i){let n=t.presets;if(n)for(let[s,a]of n.entries()){let o=["presets",String(s)];await tL(a.settings??{},"blocks"in a?a.blocks:void 0,t,e,r,o,i)}}async function tL(t,e,r,i,n,s,a){t&&typeof t=="object"&&Object.entries(t).forEach(([o,u])=>{if(iL(r.settings??[],o)&&cb.DEPRECATED_FONT_HANDLES.has(u)){let l=s.concat(["settings",o]);lb(a,i,n,l,`setting '${o}' is using deprecated font '${u}'`)}}),e&&await rL(e,r,i,n,a,s)}async function rL(t,e,r,i,n,s){let a=Array.isArray(t)?t.entries():Object.entries(t);for(let[o,u]of a){let l=s.concat(["blocks",String(o)]),f=null;if(e.blocks?.forEach(h=>{h.type===u.type&&"name"in h&&(f=h)}),!f){let h=await n.getBlockSchema?.(u.type);if(!h||h instanceof Error||(f=h.validSchema,!f||f instanceof Error))continue}for(let[h,p]of Object.entries(u.settings??{}))p&&cb.DEPRECATED_FONT_HANDLES.has(p)&&iL(f.settings??[],h)&&lb(n,r,i,l.concat(["settings",h]),`setting '${h}' is using deprecated font '${p}'`);"blocks"in u&&u.blocks&&await rL(u.blocks,e,r,i,n,l)}}async function _G(t,e,r,i){let n=t.default;if(!n||typeof n!="object")return;let s=["default"];await tL(n.settings??{},"blocks"in n?n.blocks:void 0,t,e,r,s,i)}function iL(t,e){return t.some(r=>r.id===e&&r.type==="font_picker")}function lb(t,e,r,i,n,s=!0){let a=(0,Yp.nodeAtPath)(r,i),o=s?e+(0,Yp.getLocStart)(a):e+(0,Yp.getLocEnd)(a)-1,u=e+(0,Yp.getLocEnd)(a);t.report({message:n,startIndex:o,endIndex:u})}});var oL=T(Zp=>{"use strict";y();Object.defineProperty(Zp,"__esModule",{value:!0});Zp.DeprecatedFontsOnSettingsData=void 0;var sL=Y(),aL=ze(),vG=Qp();Zp.DeprecatedFontsOnSettingsData={meta:{code:"DeprecatedFontsOnSettingsData",name:"Check for deprecated fonts in settings_data settings values",docs:{description:"Warns on deprecated fonts in settings_data settings values.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-fonts-on-settings-data"},type:sL.SourceCodeType.JSON,severity:sL.Severity.WARNING,schema:{},targets:[]},create(t){return t.toRelativePath(t.file.uri)!=="config/settings_data.json"?{}:{async Property(r){r.value.type==="Literal"&&typeof r.value.value=="string"&&vG.DEPRECATED_FONT_HANDLES.has(r.value.value)&&t.report({message:`The font "${r.value.value}" is deprecated`,startIndex:(0,aL.getLocStart)(r.value),endIndex:(0,aL.getLocEnd)(r.value)})}}}}});var cL=T(th=>{"use strict";y();Object.defineProperty(th,"__esModule",{value:!0});th.DeprecatedFontsOnSettingsSchema=void 0;var eh=Y(),uL=ze(),bG=Qp();th.DeprecatedFontsOnSettingsSchema={meta:{code:"DeprecatedFontsOnSettingsSchema",name:"Check for deprecated fonts in settings_schema settings values",docs:{description:"Warns on deprecated fonts in settings_schema settings values.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-fonts-on-settings-schema"},type:eh.SourceCodeType.JSON,severity:eh.Severity.WARNING,schema:{},targets:[]},create(t){return t.toRelativePath(t.file.uri)!=="config/settings_schema.json"?{}:{async Property(r){if(r.key.value==="settings"&&(0,eh.isArrayNode)(r.value)){for(let i of r.value.children)if((0,eh.isObjectNode)(i)){let n=i.children.find(s=>s.key.value==="type");if(n&&n.value.type==="Literal"&&n.value.value==="font_picker"){let s=i.children.find(a=>a.key.value==="default");if(s&&s.value.type==="Literal"&&typeof s.value.value=="string"){let a=s.value.value;bG.DEPRECATED_FONT_HANDLES.has(a)&&t.report({message:`The font "${a}" is deprecated`,startIndex:(0,uL.getLocStart)(s.value),endIndex:(0,uL.getLocEnd)(s.value)})}}}}}}}}});var fL=T(rh=>{"use strict";y();Object.defineProperty(rh,"__esModule",{value:!0});rh.DeprecatedTag=void 0;var lL=Y();rh.DeprecatedTag={meta:{code:"DeprecatedTag",aliases:["DeprecatedTags"],name:"Deprecated Tag",docs:{description:"This check is aimed at eliminating the use of deprecated tags.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/deprecated-tag",recommended:!0},type:lL.SourceCodeType.LiquidHtml,severity:lL.Severity.WARNING,schema:{},targets:[]},create(t){return{async LiquidTag(e){if(e.name==="include"){let i=e.source.substring(e.position.start).indexOf("include"),n=i+7,s=e.position.start+i,a=e.position.start+n;t.report({message:"Use the 'render' tag instead of 'include'",startIndex:s,endIndex:a,suggest:[{message:"Replace 'include' with 'render'",fix:o=>{o.replace(s,a,"render")}}]})}}}}}});var Ya=T(ei=>{"use strict";y();Object.defineProperty(ei,"__esModule",{value:!0});ei.SupportedDocTagTypes=ei.BasicParamTypes=void 0;ei.getDefaultValueForType=kG;ei.inferArgumentType=IG;ei.isTypeCompatible=AG;ei.filePathSupportsLiquidDoc=TG;ei.getValidParamTypes=EG;ei.parseParamType=OG;var tc=ge(),SG=Ce(),wG=xt(),xG=xt(),lr;(function(t){t.String="string",t.Number="number",t.Boolean="boolean",t.Object="object"})(lr||(ei.BasicParamTypes=lr={}));var pL;(function(t){t.Param="param",t.Example="example",t.Description="description"})(pL||(ei.SupportedDocTagTypes=pL={}));function kG(t){switch(t?.toLowerCase()){case lr.String:return"''";case lr.Number:return"0";case lr.Boolean:return"false";case lr.Object:default:return""}}function IG(t){switch(t.type){case tc.NodeTypes.String:return lr.String;case tc.NodeTypes.Number:return lr.Number;case tc.NodeTypes.LiquidLiteral:return lr.Boolean;case tc.NodeTypes.Range:case tc.NodeTypes.VariableLookup:return lr.Object;default:return(0,SG.assertNever)(t)}}function AG(t,e){let r=t.toLowerCase();return r===lr.Boolean?!0:r===e}function TG(t){return(0,wG.isSnippet)(t)||(0,xG.isBlock)(t)}function EG(t){let e=new Map([[lr.String,void 0],[lr.Number,void 0],[lr.Boolean,void 0],[lr.Object,"A generic type used to represent any liquid object or primitive value."]]);return t.forEach(r=>e.set(r.name,r.summary||r.description)),e}function OG(t,e){let r=e.match(/^([a-z_]+)(\[\])?$/);if(!r)return;let i=r[1],n=!!r[2];if(t.has(i))return[i,n]}});var Ri=T(Dr=>{"use strict";y();Object.defineProperty(Dr,"__esModule",{value:!0});Dr.reportUnknownArguments=NG;Dr.reportMissingArguments=LG;Dr.reportDuplicateArguments=PG;Dr.findTypeMismatchParams=qG;Dr.reportTypeMismatches=CG;Dr.generateTypeMismatchSuggestions=dL;Dr.getBlockName=MG;Dr.getSnippetName=DG;Dr.getLiquidDocParams=FG;Dr.makeRemoveArgumentCorrector=fb;Dr.makeAddArgumentCorrector=mL;var Cs=ge(),Xa=Ya(),hL=je();function NG(t,e,r,i){let n="";e.type===Cs.NodeTypes.ContentForMarkup?n=` in content_for tag for static block '${i}'`:e.type===Cs.NodeTypes.RenderMarkup&&(n=` in render tag for snippet '${i}'`);for(let s of r)t.report({message:`Unknown argument '${s.name}'${n}.`,startIndex:s.position.start,endIndex:s.position.end,suggest:[{message:`Remove '${s.name}'`,fix:fb(e,s)}]})}function LG(t,e,r,i){let n="";e.type===Cs.NodeTypes.ContentForMarkup?n=` in content_for tag for static block '${i}'`:e.type===Cs.NodeTypes.RenderMarkup&&(n=` in render tag for snippet '${i}'`);for(let s of r)t.report({message:`Missing required argument '${s.name}'${n}.`,startIndex:e.position.start,endIndex:e.position.end,suggest:[{message:`Add required argument '${s.name}'`,fix:mL(e,s)}]})}function PG(t,e,r,i){let n="";e.type===Cs.NodeTypes.ContentForMarkup?n=` in content_for tag for static block '${i}'`:e.type===Cs.NodeTypes.RenderMarkup&&(n=` in render tag for snippet '${i}'`);for(let s of r)t.report({message:`Duplicate argument '${s.name}'${n}.`,startIndex:s.position.start,endIndex:s.position.end,suggest:[{message:`Remove duplicate argument '${s.name}'`,fix:fb(e,s)}]})}function qG(t,e){let r=[];for(let i of e){if(i.value.type===Cs.NodeTypes.VariableLookup)continue;let n=t.get(i.name);if(n&&n.type){let s=n.type.toLowerCase();if(!Object.keys(Xa.BasicParamTypes).map(o=>o.toLowerCase()).includes(s))continue;(0,Xa.isTypeCompatible)(s,(0,Xa.inferArgumentType)(i.value))||r.push(i)}}return r}function CG(t,e,r){for(let i of e){let n=r.get(i.name);if(!n||!n.type)continue;let s=n.type.toLowerCase(),a=(0,Xa.inferArgumentType)(i.value),o=dL(s,i.value.position.start,i.value.position.end);t.report({message:`Type mismatch for argument '${i.name}': expected ${s}, got ${a}`,startIndex:i.value.position.start,endIndex:i.value.position.end,suggest:o})}}function dL(t,e,r){let i=(0,Xa.getDefaultValueForType)(t),n=[];return i!==""&&n.push({message:`Replace with default value '${i}' for ${t}`,fix:s=>s.replace(e,r,i)}),n.push({message:"Remove value",fix:s=>s.remove(e,r)}),n}function RG(t,e){return t.args.length==1||e.position.start==t.args[t.args.length-1].position.start}function MG(t){if(t.contentForType.value!=="block")return;let e=t.args.find(r=>r.name=="type")?.value;if(!(!e||!(0,hL.isLiquidString)(e)))return e.value}function DG(t){if((0,hL.isLiquidString)(t.snippet))return t.snippet.value}async function FG(t,e){let r=t.getDocDefinition&&await t.getDocDefinition(e);if(r?.liquidDoc?.parameters)return new Map(r.liquidDoc.parameters.map(i=>[i.name,i]))}function fb(t,e){return r=>{let n=t.source.slice(t.position.start,e.position.start).match(/,\s*/g),s=n?.[n.length-1],a=s?e.position.start-(s.length-1):e.position.start;RG(t,e)&&(a-=1);let u=t.source.substring(e.position.end,t.position.end).match(/\s*,/);return u?r.remove(a,e.position.end+u[0].length):r.remove(a,e.position.end)}}function mL(t,e){return r=>{let i=`, ${e.name}: ${(0,Xa.getDefaultValueForType)(e.type)}`;if(t.args.length==0)return r.insert(t.position.end-1,i);let n=t.args[t.args.length-1],a=t.source.substring(n.position.end,t.position.end).match(/\s*,\s*/);return a?r.replace(n.position.end,n.position.end+a[0].length,`${i} `):r.insert(n.position.end,i)}}});var _L=T(ih=>{"use strict";y();Object.defineProperty(ih,"__esModule",{value:!0});ih.DuplicateRenderSnippetArguments=void 0;var gL=Y(),yL=Ri();ih.DuplicateRenderSnippetArguments={meta:{code:"DuplicateRenderSnippetArguments",name:"Duplicate Render Snippet Arguments",aliases:["DuplicateRenderSnippetParams"],docs:{description:"This check ensures that no duplicate argument names are provided when rendering a snippet.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/duplicate-render-snippet-arguments"},type:gL.SourceCodeType.LiquidHtml,severity:gL.Severity.WARNING,schema:{},targets:[]},create(t){return{async RenderMarkup(e){let r=(0,yL.getSnippetName)(e);if(!r)return;let i=new Set,n=[];e.alias?.value&&i.add(e.alias.value);for(let s of e.args)i.has(s.name)&&n.push(s),i.add(s.name);(0,yL.reportDuplicateArguments)(t,e,n,r)}}}}});var SL=T(nh=>{"use strict";y();Object.defineProperty(nh,"__esModule",{value:!0});nh.DuplicateContentForArguments=void 0;var vL=Y(),bL=Ri();nh.DuplicateContentForArguments={meta:{code:"DuplicateContentForArguments",name:"Duplicate ContentFor Arguments",docs:{description:"This check ensures that no duplicate argument names are provided when rendering a static block.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/duplicate-content-for-arguments"},type:vL.SourceCodeType.LiquidHtml,severity:vL.Severity.WARNING,schema:{},targets:[]},create(t){return{async ContentForMarkup(e){let r=(0,bL.getBlockName)(e);if(!r)return;let i=new Set,n=[];for(let s of e.args)i.has(s.name)&&n.push(s),i.add(s.name);(0,bL.reportDuplicateArguments)(t,e,n,r)}}}}});var xL=T(sh=>{"use strict";y();Object.defineProperty(sh,"__esModule",{value:!0});sh.EmptyBlockContent=void 0;var wL=Y(),jG=xt();sh.EmptyBlockContent={meta:{code:"EmptyBlockContent",name:"Prevent empty block content",docs:{description:"This check exists to warn you when the blocks array at the root level of the schema is empty.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/empty-block-content"},type:wL.SourceCodeType.LiquidHtml,severity:wL.Severity.WARNING,schema:{},targets:[]},create(t){let e=!1,r={start:0,end:0};return{async LiquidTag(i){if(i.name!=="content_for")return;let n=i.markup;typeof n=="object"&&n.contentForType.value==="blocks"&&(r.start=i.blockStartPosition.start,r.end=i.blockStartPosition.end,e=!0)},async onCodePathEnd(){let i=await(0,jG.getSchema)(t),{validSchema:n,ast:s}=i??{};if(!n||n instanceof Error||!s||s instanceof Error)return;let a=n.blocks;e&&!a?t.report({message:`The 'content_for "blocks"' tag is present, but the blocks array is not defined.`,startIndex:r.start,endIndex:r.end}):e&&a&&a.length===0&&t.report({message:`The 'content_for "blocks"' tag is present, but the blocks array is empty.`,startIndex:r.start,endIndex:r.end})}}}}});var TL=T(oh=>{"use strict";y();Object.defineProperty(oh,"__esModule",{value:!0});oh.HardcodedRoutes=void 0;var BG=ge(),kL=Y(),ah=je(),pb={"/":"root_url","/account":"account_url","/account/addresses":"account_addresses_url","/account/login":"account_login_url","/account/logout":"account_logout_url","/account/recover":"account_recover_url","/account/register":"account_register_url","/cart":"cart_url","/cart/add":"cart_add_url","/cart/change":"cart_change_url","/cart/clear":"cart_clear_url","/cart/update":"cart_update_url","/collections":"collections_url","/collections/all":"all_products_collection_url","/customer_authentication/login":"storefront_login_url","/recommendations/products":"product_recommendations_url","/search":"search_url","/search/suggest":"predictive_search_url"},AL=Object.keys(pb).reverse();oh.HardcodedRoutes={meta:{code:"HardcodedRoutes",name:"Hardcoded Routes",docs:{description:"This check encourages using the routes object instead of hardcoding URLs.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/hardcoded-routes"},type:kL.SourceCodeType.LiquidHtml,severity:kL.Severity.WARNING,schema:{},targets:[]},create(t){return{async HtmlElement(e){let r=e.attributes.filter(ah.isValuedHtmlAttribute).find(i=>((0,ah.isAttr)(i,"action")||(0,ah.isAttr)(i,"href"))&&IL(i));if(r){let i=r,n=IL(i),s=pb[n],a=i.attributePosition.start,o=a+n.length;t.report({message:`Use routes object {{ routes.${s} }} instead of hardcoding ${n}`,startIndex:a,endIndex:o})}},async LiquidFilter(e){if(e.name!=="link_to")return;let r=e.args[0],i=r.type==="String"?r.value:"",n=AL.find(s=>s==="/"?s===i:i.startsWith(s));if(n){let s=pb[n],a=r.position.start+1;t.report({message:`Use routes object {{ routes.${s} }} instead of hardcoding ${n}`,startIndex:a,endIndex:a+n.length})}}}}};function IL(t){if(!(0,ah.isNodeOfType)(BG.NodeTypes.TextNode,t.value[0]))return;let e=t.value[0].value;return AL.find(r=>r==="/"?r===e&&t.value.length===1:e.startsWith(r))}});var OL=T(ch=>{"use strict";y();Object.defineProperty(ch,"__esModule",{value:!0});ch.ImgWidthAndHeight=void 0;var EL=Y(),uh=je();ch.ImgWidthAndHeight={meta:{code:"ImgWidthAndHeight",name:"Width and height attributes on image tags",docs:{description:"This check is aimed at eliminating content layout shift in themes by enforcing the use of the width and height attributes on img tags.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/img-width-and-height"},type:EL.SourceCodeType.LiquidHtml,severity:EL.Severity.ERROR,schema:{},targets:[]},create(t){return{async HtmlVoidElement(e){if(e.name==="img"){let r=e.attributes.find(s=>(0,uh.isValuedHtmlAttribute)(s)&&(0,uh.isAttr)(s,"width")),i=e.attributes.find(s=>(0,uh.isValuedHtmlAttribute)(s)&&(0,uh.isAttr)(s,"height")),n=[];if(r||n.push("width"),i||n.push("height"),n.length>0){let s=n.length===1?"attribute":"attributes";t.report({message:`Missing ${n.join(" and ")} ${s} on img tag`,startIndex:e.position.start,endIndex:e.position.end})}}}}}}});var qL=T(lh=>{"use strict";y();Object.defineProperty(lh,"__esModule",{value:!0});lh.isPropertyNode=$G;lh.getAllBlocks=PL;var hb=ze(),VG=ki();function $G(t){return typeof t=="object"&&t!==null}function LL(t){return t.filter(e=>e==="blocks").length>1}function NL(t,e,r,i){i.report({message:t,startIndex:e+(0,hb.getLocStart)(r),endIndex:e+(0,hb.getLocEnd)(r)})}async function UG(t,e){if(t==="@theme"||t==="@app")return!0;let r=`blocks/${t}.liquid`;return await(0,VG.doesFileExist)(e,r)}async function HG(t,e,r){let i=[];if(!t)return i;let n=LL(e)?await r.getBlockSchema?.(t):await r.getSectionSchema?.(t);if(!n||n instanceof Error)return i;let{validSchema:s}=n;return!s||s instanceof Error||Array.isArray(s.blocks)&&s.blocks.forEach(a=>{!("name"in a)&&a.type!=="@app"&&i.push(a.type)}),i}async function GG(t,e,r,i,n,s,a){let o=await HG(i,n,a);if(o.length===0)return;if(!await UG(t,a))NL(`Theme block 'blocks/${t}.liquid' does not exist.`,s,r,a);else{if(e)return;{let l=t.startsWith("_"),f=o.includes("@theme"),h=o.includes(t);if(l?h:h||f)return;{let p=LL(n)?"blocks":"sections";NL(`Block type '${t}' is not allowed in '${p}/${i}.liquid'.`,s,r,a)}}}}async function PL(t,e,r,i,n,s){await Promise.all(Object.entries(i).map(async([a,o])=>{if(o.type){let u=n.concat(a,"type"),l=(0,hb.nodeAtPath)(t,u);l&&await GG(o.type,o.static,l,r,n,e,s)}"blocks"in o&&await PL(t,e,o.type,o.blocks,n.concat(a,"blocks"),s)}))}});var RL=T(fh=>{"use strict";y();Object.defineProperty(fh,"__esModule",{value:!0});fh.JSONMissingBlock=void 0;var WG=xt(),CL=Y(),db=qL();fh.JSONMissingBlock={meta:{code:"JSONMissingBlock",name:"Check for missing blocks types in JSON templates",docs:{description:"This check ensures that JSON templates contain valid block types.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/json-missing-block"},type:CL.SourceCodeType.JSON,severity:CL.Severity.ERROR,schema:{},targets:[]},create(t){return t.toRelativePath(t.file.uri).startsWith("templates/")?{async onCodePathEnd(){let r=await(0,WG.getSchemaFromJSON)(t),{ast:i}=r??{};if(!i||i instanceof Error||!r)return;let n=r.parsed.sections;n&&await Promise.all(Object.entries(n).map(async([s,a])=>{(0,db.isPropertyNode)(a)&&"blocks"in a&&(0,db.isPropertyNode)(a.blocks)&&"type"in a&&await(0,db.getAllBlocks)(i,0,a.type,a.blocks,["sections",s,"blocks"],t)}))}}:{}}}});var DL=T(ph=>{"use strict";y();Object.defineProperty(ph,"__esModule",{value:!0});ph.JSONSyntaxError=void 0;var zG=sv(),ML=Y(),JG=Ce();function KG(t){return("rawMessage"in t?t.rawMessage:t.message).replace(/\s+at \d+:\d+/,"")}ph.JSONSyntaxError={meta:{code:"JSONSyntaxError",name:"Enforce valid JSON",docs:{description:"This check exists to prevent invalid JSON files in themes.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/json-syntax-error"},type:ML.SourceCodeType.JSON,severity:ML.Severity.ERROR,schema:{},targets:[],deprecated:!0},create(t){if(t.validateJSON)return{};let e=t.file.ast;return(0,JG.isError)(e)?{async onCodePathStart(r){if(r.ast instanceof zG.JSONCParseErrors)for(let i of r.ast.errors)t.report({message:QG(i.error),startIndex:i.offset,endIndex:i.offset+i.length});else t.report({message:KG(e),startIndex:0,endIndex:r.source.length})}}:{}}};function QG(t){switch(t){case 1:return"Invalid symbol";case 2:return"Invalid number format";case 3:return"Property name expected";case 4:return"Expecting a value";case 5:return"Expecting a colon after a property name (:)";case 6:return"Expecting a comma";case 7:return"Expecting a closing brace (})";case 8:return"Expecting a closing bracket (])";case 9:return"Expecting end of file";case 10:return"Invalid comment token";case 11:return"Unexpected end of comment";case 12:return"Unexpected end of string";case 13:return"Unexpected end of number";case 14:return"Invalid unicode";case 15:return"Invalid escape character";case 16:return"Invalid character";default:return"Something went wrong with this JSON"}}});var BL=T(hh=>{"use strict";y();Object.defineProperty(hh,"__esModule",{value:!0});hh.LiquidFreeSettings=void 0;var YG=Bf(),FL=Y(),XG=kn();hh.LiquidFreeSettings={meta:{code:"LiquidFreeSettings",name:"Check for liquid free settings values",docs:{description:"Ensures settings values are liquid free.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-free-settings"},type:FL.SourceCodeType.LiquidHtml,severity:FL.Severity.WARNING,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.source.slice(e.blockStartPosition.end,e.blockEndPosition.start),i=(0,YG.toJSONAST)(r);i instanceof Error||(0,XG.visit)(i,{Property(n,s){if(!eW(s,"settings")||!jL(n.value)||ZG(s))return;let{value:a,loc:o}=n.value,u=n.key.value;typeof a=="string"&&u!=="visible_if"&&a.includes("{%")&&a.includes("%}")&&t.report({message:"Settings values cannot contain liquid logic.",startIndex:e.blockStartPosition.end+o.start.offset,endIndex:e.blockStartPosition.end+o.end.offset})}})}}}};function jL(t){return t.type==="Literal"}function ZG(t){let e=t.at(-1);return!e||e.type!=="Object"?!1:e.children.some(({key:r,value:i})=>r.value!=="type"||!jL(i)?!1:i.value==="liquid")}function eW(t,e){return t.some((r,i)=>{let n=t[i-1];return(r.type==="Array"||r.type==="Object")&&n?.type==="Property"&&n.key?.value===e})}});var Mi=T(un=>{"use strict";y();Object.defineProperty(un,"__esModule",{value:!0});un.INVALID_SYNTAX_MESSAGE=void 0;un.getValuesInMarkup=tW;un.getFragmentsInMarkup=sW;un.getRangeMatch=WL;un.doesFragmentContainUnsupportedParentheses=aW;un.fragmentKeyValuePair=oW;un.INVALID_SYNTAX_MESSAGE="Syntax is not supported";function tW(t){return[...t.matchAll(new RegExp(HL,"g"))].map(e=>({value:e[0],index:e.index}))}var rW='"[^"]*"',iW="'[^']*'",VL="\\s*(-?\\d+(?:\\.\\d+)?|\\w+(?:\\.\\w+)*)\\s*",mb=`\\(\\s*${VL}(\\.{2,})\\s*${VL}\\s*\\)`,$L="[^\\s,]+",UL=`(${rW}|${iW})`,HL=`(${UL}|${mb}|${$L})`,GL=`(\\S+):\\s*${HL}`,nW=new RegExp(`${UL}|${mb}|${GL}|${$L}`,"g");function sW(t){return[...t.matchAll(nW)].map(e=>({value:e[0],index:e.index}))}function WL(t){return t.match(mb)}function aW(t){return WL(t)?!1:t.includes("(")||t.includes(")")}function oW(t){let e=t.match(new RegExp(GL));if(!e)return;let[,r,i]=e;return{key:r,value:i}}});var JL=T(gb=>{"use strict";y();Object.defineProperty(gb,"__esModule",{value:!0});gb.detectMultipleAssignValues=uW;var zL=Mi();function uW(t){let e=/([^=]+)(=\s*)([^|]+)(?:\s*\|\s*.*)?$/m;if(t.name!=="assign")return;let r=t.markup;if(typeof r!="string")return;let i=r.match(e);if(!i)return;let[n,s,a,o]=i,u=(0,zL.getValuesInMarkup)(o).at(0)?.value;if(!u)return;let l=(p,m)=>{let v=p.indexOf(r,m);return{startIndex:v+s.length+a.length+u.length,endIndex:v+s.length+a.length+o.trimEnd().length}},{startIndex:f,endIndex:h}=l(t.source,t.position.start);if(!(h<=f)&&!(h<=f))return{message:zL.INVALID_SYNTAX_MESSAGE,startIndex:f,endIndex:h,fix:p=>{p.replace(f,h,"")}}}});var QL=T(yb=>{"use strict";y();Object.defineProperty(yb,"__esModule",{value:!0});yb.detectInvalidBooleanExpressions=fW;var KL=ge(),cW=Mi(),lW=je();function fW(t,e){if((0,lW.isWithinRawTagThatDoesNotParseItsContents)(e))return;let r=t.condition;if(!(r.type!==KL.NodeTypes.Comparison&&r.type!==KL.NodeTypes.LogicalExpression))return{message:cW.INVALID_SYNTAX_MESSAGE,startIndex:t.position.start,endIndex:t.position.end,fix:i=>{i.replace(t.position.start,t.position.end,t.source.slice(r.left.position.start,r.left.position.end))}}}});var YL=T(vb=>{"use strict";y();Object.defineProperty(vb,"__esModule",{value:!0});vb.detectInvalidEchoValue=hW;var pW=ge(),_b=Mi();function hW(t){let e=/([^|]*)(?:\s*\|\s*.*)?$/m;if(t.type===pW.NodeTypes.LiquidTag&&t.name!=="echo")return;let r=t.markup;if(typeof r!="string"||!r)return;let i=r.match(e);if(!i)return;let[,n]=i,s=(0,_b.getValuesInMarkup)(n).at(0)?.value;if(!s){let l=t.source.indexOf(r,t.position.start),f=l+r.length;return{message:_b.INVALID_SYNTAX_MESSAGE,startIndex:l,endIndex:f,fix:h=>{h.replace(l,f,"blank")}}}let a=(l,f)=>{let h=l.indexOf(r,f);return{startIndex:h+s.length,endIndex:h+n.trimEnd().length}},{startIndex:o,endIndex:u}=a(t.source,t.position.start);if(!(u<=o))return{message:_b.INVALID_SYNTAX_MESSAGE,startIndex:o,endIndex:u,fix:l=>{l.replace(o,u,"")}}}});var tP=T(bb=>{"use strict";y();Object.defineProperty(bb,"__esModule",{value:!0});bb.detectInvalidConditionalNode=gW;var eP=Mi(),dW={logical:/^(and|or)$/,comparison:/^(==|!=|>=|<=|>|<|contains)$/,invalid:/^[@#$&]$/,literal:/^(['"][^'"]*['"]|\d+(?:\.\d+)?|true|false|nil|empty|blank)$/};function mW(t){for(let[e,r]of Object.entries(dW))if(r.test(t))return e;return"variable"}function gW(t){if(!("name"in t)||!t.name||!["if","elsif","unless"].includes(String(t.name)))return;let e=t.markup;if(typeof e!="string"||!e.trim())return;let r=bW(e);if(!r)return;let i=t.blockStartPosition||t.position,s=t.source.slice(i.start,i.end).indexOf(e);if(s<0)return;let a=i.start+s,o=a+e.length;return{message:`${eP.INVALID_SYNTAX_MESSAGE}: ${r.message}`,startIndex:a,endIndex:o,fix:u=>{u.replace(a,o,r.fix)}}}function XL(t){return t.type==="literal"||t.type==="variable"}function ZL(t){return t.type==="logical"||t.type==="comparison"}function yW(t){let e=t[0];return e.type==="invalid"||e.type==="comparison"?{message:`Conditional cannot start with '${e.value}'. Use a variable or value instead`,fix:"false"}:null}function _W(t){for(let i=0;i<=t.length-4;i++){let[n,s,a]=t.slice(i,i+3),o=t.slice(i+3);if(XL(n)&&s.type==="comparison"&&XL(a)&&o.length>0&&o[0].type!=="logical"){let u=t.slice(0,i+3).map(h=>h.value).join(" "),l=o.map(h=>h.value).join(" ");return/&&|\|\|/.test(l)?{message:`Conditional is invalid. Anything after '${u}' will be ignored. Use 'and'/'or' instead of '&&'/'||' for multiple conditions`,fix:u}:{message:`Conditional is invalid. Anything after '${u}' will be ignored`,fix:u}}}return null}function vW(t){for(let e=0;e<t.length-1;e++){let r=t[e],i=t[e+1];if(r.type==="literal"&&!ZL(i)){let n=t.slice(e+1);if(!(n[0]?.type==="variable"&&n.some(ZL))){let a=n.map(u=>u.value).join(" ");return/&&|\|\|/.test(a)?{message:`Expression stops at truthy value '${r.value}', and will ignore: '${a}'. Use 'and'/'or' instead of '&&'/'||' for multiple conditions`,fix:r.value}:{message:`Expression stops at truthy value '${r.value}', and will ignore: '${a}'`,fix:r.value}}}}return null}function bW(t){let e=t.trim();if(!e)return null;let r=(0,eP.getValuesInMarkup)(e).map(({value:i})=>({value:i,type:mW(i)}));return r.length===0?null:yW(r)||_W(r)||vW(r)}});var nP=T(Za=>{"use strict";y();Object.defineProperty(Za,"__esModule",{value:!0});Za.INVALID_LOOP_RANGE_MESSAGE=void 0;Za.detectInvalidLoopRange=xW;var rP=ge(),SW=Mi(),wW=je();Za.INVALID_LOOP_RANGE_MESSAGE="Ranges must be in the format `(<start>..<end>)`. The start and end of the range must be whole numbers or variables.";function xW(t){if(t.type===rP.NodeTypes.LiquidTag&&!(0,wW.isLoopLiquidTag)(t))return;let e=t.markup;if(e){if(typeof e=="string")return iP(t,e);if(e.collection.type===rP.NodeTypes.Range)return iP(t,t.source.slice(e.collection.position.start,e.collection.position.end))}}function iP(t,e){let r=(0,SW.getRangeMatch)(e);if(!r||r.index===void 0)return;let[i,n,,s]=r,a=n,o=s;!isNaN(Number(n))&&Number(n)%1!==0&&(a=`${Math.trunc(Number(n))}`),!isNaN(Number(s))&&Number(s)%1!==0&&(o=`${Math.trunc(Number(s))}`);let u=`(${a}..${o})`;if(e.slice(r.index,r.index+i.length)===u)return;let f=t.source.indexOf(e,t.position.start)+r.index,h=f+i.length;return{message:Za.INVALID_LOOP_RANGE_MESSAGE,startIndex:f,endIndex:h,fix:p=>{p.replace(f,h,u)}}}});var aP=T(wb=>{"use strict";y();Object.defineProperty(wb,"__esModule",{value:!0});wb.detectInvalidLoopArguments=AW;var kW=ge(),Sb=Mi(),IW=je();function AW(t,e=[]){if(t.type===kW.NodeTypes.LiquidTag&&!(0,IW.isLoopLiquidTag)(t))return;let r=t.markup;if(!r)return;typeof r!="string"&&(r=r.source.slice(r.position.start,r.position.end));let i=(0,Sb.getFragmentsInMarkup)(r);if(i.length<=3)return;let n=t.source.indexOf(r,t.position.start),s=n+i.at(3).index,a=n+i.at(-1).index+i.at(-1).value.length,o=[],u=!1,l=[];for(let f=3;f<i.length;f++){let h=i[f];if((0,Sb.doesFragmentContainUnsupportedParentheses)(h.value)){u=!0,l.push(h.value);continue}let p=(0,Sb.fragmentKeyValuePair)(h.value);if(p){if(u=!0,!sP(e,t.name,p.key,!1)){l.push(h.value);continue}}else if(u||!sP(e,t.name,h.value,!0)){u=!0,l.push(h.value);continue}o.push(h.value)}if(l.length!==0)return{message:`Arguments must be provided in the format \`${t.name} in <array> <positional arguments> <named arguments>\`. Invalid/Unknown arguments: ${l.join(", ")}`,startIndex:s,endIndex:a,fix:f=>{f.replace(s,a,o.join(" "))}}}function sP(t,e,r,i){return t.find(n=>n.name===e)?.parameters?.some(n=>n.name===r&&n.positional===i)||!1}});var oP=T(kb=>{"use strict";y();Object.defineProperty(kb,"__esModule",{value:!0});kb.detectConditionalNodeUnsupportedParenthesis=TW;var xb=Mi();function TW(t){if(!["if","elsif","unless"].includes(t.name)||typeof t.markup!="string"||!t.markup.trim())return;let e=t.source.indexOf(t.markup,t.position.start),i=(0,xb.getFragmentsInMarkup)(t.markup).filter(n=>(0,xb.doesFragmentContainUnsupportedParentheses)(n.value));if(i.length)return{message:xb.INVALID_SYNTAX_MESSAGE,startIndex:e,endIndex:e+t.markup.length,fix:n=>{for(let s of i)n.replace(e+s.index,e+s.index+s.value.length,s.value.replace(/[\(\)]/g,""))}}}});var cP=T(Ib=>{"use strict";y();Object.defineProperty(Ib,"__esModule",{value:!0});Ib.detectInvalidFilterName=OW;var eo=ge(),EW=Mi();async function OW(t,e){if(!e)return[];if(t.type===eo.NodeTypes.LiquidVariableOutput)return typeof t.markup!="string"?[]:uP(t,t.markup,e);if(t.type===eo.NodeTypes.LiquidTag){if(t.name===eo.NamedTags.echo&&typeof t.markup!="string")return[];if(t.name===eo.NamedTags.assign&&typeof t.markup!="string")return[];if(typeof t.markup=="string"&&(t.name===eo.NamedTags.echo||t.name===eo.NamedTags.assign))return uP(t,t.markup,e)}return[]}async function uP(t,e,r){let i=r,n=e.trim(),s=[],a=/\|\s*([a-zA-Z][a-zA-Z0-9_]*)/g,o=Array.from(n.matchAll(a));for(let u of o){let l=u[1];if(!i.some(b=>b.name===l))continue;let f=u.index+u[0].length,p=n.slice(f).match(/^(?!\s*(?::|$|\|\s*[a-zA-Z]|\|\s*\||\s*\|\s*(?:[}%]|$)))([^:|]+?)(?=\s*(?::|$|\|))/)?.[1];if(!p)continue;let v=t.source.indexOf(e,t.position.start)+f,S=v+p.length;s.push({message:`${EW.INVALID_SYNTAX_MESSAGE} Filter '${l}' has trailing characters '${p}' that should be removed.`,startIndex:v,endIndex:S,fix:b=>{b.replace(v,S,"")}})}return s}});var pP=T(Ab=>{"use strict";y();Object.defineProperty(Ab,"__esModule",{value:!0});Ab.detectInvalidPipeSyntax=NW;var to=ge(),lP=Mi();async function NW(t){if(t.type===to.NodeTypes.LiquidVariableOutput)return typeof t.markup!="string"?[]:fP(t,t.markup);if(t.type===to.NodeTypes.LiquidTag){if(t.name===to.NamedTags.echo&&typeof t.markup!="string")return[];if(t.name===to.NamedTags.assign&&typeof t.markup!="string")return[];if(typeof t.markup=="string"&&(t.name===to.NamedTags.echo||t.name===to.NamedTags.assign))return fP(t,t.markup)}return[]}async function fP(t,e){let r=[],i=e.trim(),n=/(\|\s*){2,}/g,s=Array.from(i.matchAll(n));for(let u of s){let l=t.source.indexOf(e,t.position.start);if(l===-1)continue;let f=l+u.index,h=f+u[0].length;r.push({message:`${lP.INVALID_SYNTAX_MESSAGE}. Remove extra \`|\` character(s).`,startIndex:f,endIndex:h,fix:p=>{p.replace(f,h,"| ")}})}let a=/\s*\|\s*$/,o=i.match(a);if(o){let u=t.source.indexOf(e,t.position.start);if(u===-1)return r;let l=o.index,f=u+l,h=f+o[0].length;r.push({message:`${lP.INVALID_SYNTAX_MESSAGE}. Remove the trailing \`|\` character.`,startIndex:f,endIndex:h,fix:p=>{p.replace(f,h,"")}})}return r}});var _P=T(mh=>{"use strict";y();Object.defineProperty(mh,"__esModule",{value:!0});mh.LiquidHTMLSyntaxError=void 0;var hP=Y(),Tb=Ce(),LW=JL(),PW=QL(),dP=YL(),mP=tP(),qW=nP(),CW=aP(),RW=oP(),gP=cP(),yP=pP(),dh=je();function MW(t){return"name"in t&&t.name==="LiquidHTMLParsingError"&&"loc"in t}function DW(t,e){return t.replace(/Line \d+, col \d+:\s+/,"SyntaxError: ").replace(/(?!<expected ".+",) not .*/,` not "${e}"`)}mh.LiquidHTMLSyntaxError={meta:{code:"LiquidHTMLSyntaxError",aliases:["SyntaxError","HtmlParsingError"],name:"Prevent LiquidHTML Syntax Errors",docs:{description:"This check exists to inform the user of Liquid HTML syntax errors.",recommended:!0},type:hP.SourceCodeType.LiquidHtml,severity:hP.Severity.ERROR,schema:{},targets:[]},create(t){let e=t.file.ast,r=t.themeDocset?.filters(),i=t.themeDocset?.tags();return(0,Tb.isError)(e)?{async onCodePathStart(n){if(MW(e)){let{start:s,end:a}=e.loc,o=(0,Tb.getOffset)(n.source,s.line,s.column),u=(0,Tb.getOffset)(n.source,a.line,a.column);o===u&&(u+=1);let l=n.source.slice(o,u);t.report({message:DW(e.message,l),startIndex:o,endIndex:u})}else t.report({message:e.message,startIndex:0,endIndex:n.source.length})}}:{async BooleanExpression(n,s){if((0,dh.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=(0,PW.detectInvalidBooleanExpressions)(n,s);a&&t.report(a)},async LiquidTag(n,s){if((0,dh.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=[(0,LW.detectMultipleAssignValues)(n),(0,dP.detectInvalidEchoValue)(n),(0,qW.detectInvalidLoopRange)(n),(0,CW.detectInvalidLoopArguments)(n,await i)].filter(Boolean),o=(0,RW.detectConditionalNodeUnsupportedParenthesis)(n)||(0,mP.detectInvalidConditionalNode)(n);o&&a.push(o),a.forEach(t.report);let u=await(0,gP.detectInvalidFilterName)(n,await r);u.length>0&&u.forEach(f=>t.report(f));let l=await(0,yP.detectInvalidPipeSyntax)(n);l.length>0&&l.forEach(f=>t.report(f))},async LiquidBranch(n,s){if((0,dh.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=(0,mP.detectInvalidConditionalNode)(n);a&&t.report(a)},async LiquidVariableOutput(n,s){if((0,dh.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=await(0,gP.detectInvalidFilterName)(n,await r);a.length>0&&a.forEach(l=>t.report(l));let o=await(0,yP.detectInvalidPipeSyntax)(n);o.length>0&&o.forEach(l=>t.report(l));let u=(0,dP.detectInvalidEchoValue)(n);u&&t.report(u)}}}}});var SP=T(gh=>{"use strict";y();Object.defineProperty(gh,"__esModule",{value:!0});gh.MatchingTranslations=void 0;var vP=Y(),bP=new Set(["zero","one","two","few","many","other"]);gh.MatchingTranslations={meta:{code:"MatchingTranslations",name:"Translation files should have the same keys",docs:{description:"TODO",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/matching-translations"},type:vP.SourceCodeType.JSON,severity:vP.Severity.ERROR,schema:{},targets:[]},create(t){let e=new Set,r=new Set,i=new Map,n=t.file,s=n.uri,a=t.toRelativePath(s),o=n.ast,u=a.startsWith("locales/"),l=s.endsWith(".default.json")||s.endsWith(".default.schema.json"),f=s.endsWith(".schema.json");if(!u||l||o instanceof Error)return{};let h=()=>e.size>0,p=({type:A})=>A==="Literal",m=A=>bP.has(A.key.value),v=A=>A.startsWith("shopify.")||A.startsWith("customer_accounts."),S=A=>e.has(A)??!1,b=A=>[...bP].some(E=>A.endsWith(E)),g=A=>Object.keys(A).reduce((O,L)=>{if(typeof A[L]!="object")return O.concat(L);let B=A[L],R=g(B);return O.concat(R.map(q=>`${L}.${q}`))},[]),k=A=>A.filter(E=>E.type==="Property").reduce((E,O)=>E.concat(O.key.value),[]).join("."),w=(A,E)=>{let O=Math.min(A.length,E.length);for(let L=0;L<O;L++)if(A[L]!==E[L])return L;return O},_=A=>{let E=A.split("."),O="",L=0;for(let B of i.keys()){let R=B.split("."),q=w(R,E);q>L&&(L=q,O=B)}return i.get(O)??o};return{async onCodePathStart(){let E=await(f?t.getDefaultSchemaTranslations:t.getDefaultTranslations)().then(g);E.forEach(Set.prototype.add,e),E.forEach(Set.prototype.add,r)},async Property(A,E){let O=k(E.concat(A));if(i.set(O,A),!!h()&&!m(A)&&p(A.value)&&!v(O)){if(S(O)){r.delete(O);return}t.report({message:`A default translation for '${O}' does not exist`,startIndex:A.loc.start.offset,endIndex:A.loc.end.offset,suggest:[{message:"Delete unneeded translation key",fix(L){L.remove(O)}}]})}},async onCodePathEnd(){r.forEach(A=>{let E=_(A);b(A)||v(A)||t.report({message:`The translation for '${A}' is missing`,startIndex:E.loc.start.offset,endIndex:E.loc.end.offset,fix(O){O.add(A,"TODO")}})})}}}}});var xP=T(yh=>{"use strict";y();Object.defineProperty(yh,"__esModule",{value:!0});yh.MissingAsset=void 0;var wP=Y(),Eb=ki(),FW=je();yh.MissingAsset={meta:{code:"MissingAsset",name:"Avoid rendering missing asset files",docs:{description:"Reports missing asset files",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-asset"},type:wP.SourceCodeType.LiquidHtml,severity:wP.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidVariable(e){if(e.filters.length===0||e.filters[0].name!=="asset_url"||!(0,FW.isLiquidString)(e.expression))return;let r=e.expression,i=`assets/${r.value}`,n=i,s=await(0,Eb.doesFileExist)(t,n);s||n.endsWith(".scss.css")&&(n=n.replace(".scss.css",".scss.liquid"),s=await(0,Eb.doesFileExist)(t,n),s)||(n.endsWith(".js")||n.endsWith(".css"))&&(n+=".liquid",s=await(0,Eb.doesFileExist)(t,n),s)||t.report({message:`'${i}' does not exist`,startIndex:r.position.start,endIndex:r.position.end})}}}}});var IP=T(_h=>{"use strict";y();Object.defineProperty(_h,"__esModule",{value:!0});_h.MissingContentForArguments=void 0;var kP=Y(),Ob=Ri();_h.MissingContentForArguments={meta:{code:"MissingContentForArguments",name:"Missing ContentFor Arguments",docs:{description:"This check ensures that all required arguments are provided when rendering a static block.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-content-for-arguments"},type:kP.SourceCodeType.LiquidHtml,severity:kP.Severity.WARNING,schema:{},targets:[]},create(t){return{async ContentForMarkup(e){let r=(0,Ob.getBlockName)(e);if(!r)return;let i=await(0,Ob.getLiquidDocParams)(t,`blocks/${r}.liquid`);if(!i)return;let n=new Map(e.args.map(a=>[a.name,a])),s=Array.from(i.values()).filter(a=>a.required&&!n.has(a.name));(0,Ob.reportMissingArguments)(t,e,s,r)}}}}});var TP=T(vh=>{"use strict";y();Object.defineProperty(vh,"__esModule",{value:!0});vh.MissingRenderSnippetArguments=void 0;var AP=Y(),Nb=Ri();vh.MissingRenderSnippetArguments={meta:{code:"MissingRenderSnippetArguments",name:"Missing Render Snippet Arguments",aliases:["MissingRenderSnippetParams"],docs:{description:"This check ensures that all required arguments are provided when rendering a snippet.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-render-snippet-arguments"},type:AP.SourceCodeType.LiquidHtml,severity:AP.Severity.WARNING,schema:{},targets:[]},create(t){return{async RenderMarkup(e){let r=(0,Nb.getSnippetName)(e);if(!r)return;let i=await(0,Nb.getLiquidDocParams)(t,`snippets/${r}.liquid`);if(!i)return;let n=new Map(e.args.map(a=>[a.name,a])),s=Array.from(i.values()).filter(a=>a.required&&!n.has(a.name)&&a.name!==e.alias?.value);(0,Nb.reportMissingArguments)(t,e,s,r)}}}}});var OP=T(Sh=>{"use strict";y();Object.defineProperty(Sh,"__esModule",{value:!0});Sh.MissingTemplate=void 0;var EP=ge(),jW=Sw(),bh=Y(),BW=ki(),VW={ignoreMissing:bh.SchemaProp.array(bh.SchemaProp.string(),[])};Sh.MissingTemplate={meta:{code:"MissingTemplate",name:"Avoid rendering missing templates",docs:{description:"Reports missing include/render/section liquid file",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-template"},type:bh.SourceCodeType.LiquidHtml,severity:bh.Severity.ERROR,schema:VW,targets:[]},create(t){let e=n=>typeof n.markup!="string";function r(n){return t.settings.ignoreMissing.some(s=>(0,jW.minimatch)(n,s))}async function i(n,{position:s}){await(0,BW.doesFileExist)(t,n)||r(n)||t.report({message:`'${n}' does not exist`,startIndex:s.start,endIndex:s.end})}return{async RenderMarkup(n){if(n.snippet.type===EP.NodeTypes.VariableLookup)return;let s=n.snippet,a=`snippets/${s.value}.liquid`;await i(a,s)},async LiquidTag(n){if(!e(n)||n.name!==EP.NamedTags.section)return;let s=n.markup,a=`sections/${s.value}.liquid`;await i(a,s)}}}}});var LP=T(wh=>{"use strict";y();Object.defineProperty(wh,"__esModule",{value:!0});wh.OrphanedSnippet=void 0;var $W=xt(),NP=Y();wh.OrphanedSnippet={meta:{code:"OrphanedSnippet",name:"Prevent orphaned snippets",docs:{description:"This check exists to prevent orphaned snippets in themes.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/orphaned-snippet"},type:NP.SourceCodeType.LiquidHtml,severity:NP.Severity.WARNING,schema:{},targets:[]},create(t){return{async onCodePathEnd(){let{getReferences:e}=t;if(!e)return;let r=t.file.uri;(0,$W.isSnippet)(r)&&(await e(r)).length===0&&t.report({message:"This snippet is not referenced by any other files",startIndex:0,endIndex:1})}}}}});var CP=T(kh=>{"use strict";y();Object.defineProperty(kh,"__esModule",{value:!0});kh.PaginationSize=void 0;var Lb=ge(),xh=Y(),PP=Ce(),qP=je(),UW=ze(),HW={minSize:xh.SchemaProp.number(1),maxSize:xh.SchemaProp.number(250)};kh.PaginationSize={meta:{code:"PaginationSize",name:"Ensure paginate tags are used with performant sizes",docs:{description:"This check is aimed at keeping response times low.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/pagination-size",recommended:!0},type:xh.SourceCodeType.LiquidHtml,severity:xh.Severity.WARNING,schema:HW,targets:[]},create(t){let e=t.settings.minSize,r=t.settings.maxSize,i=[],n=[];function s(a,o,u=`Pagination size must be a positive integer between ${e} and ${r}.`){e<=o&&o<=r||t.report({message:u,startIndex:a.position.start,endIndex:a.position.end})}return{async LiquidTag(a){if(typeof a.markup=="string"||a.name!=="paginate")return;let o=a.markup.pageSize;(0,qP.isNodeOfType)(Lb.NodeTypes.VariableLookup,o)?n.push(o):(0,qP.isNodeOfType)(Lb.NodeTypes.Number,o)&&s(o,Number(o.value))},async LiquidRawTag(a){if(a.name==="schema"){let o=(0,UW.parseJSON)(a.body.value);if((0,PP.isError)(o))return;o.settings&&Array.isArray(o.settings)&&(i=o.settings)}},async onCodePathEnd(){n.forEach(a=>{let o=(0,PP.last)(a.lookups);if(o===void 0||o.type!==Lb.NodeTypes.String)return;let u=o.value,l=i.find(f=>f.id===u);if(l!==void 0){if(l.default===void 0){t.report({message:"Default pagination size should be defined in the section settings.",startIndex:a.position.start,endIndex:a.position.end});return}s(a,l.default,`This setting's default value should be between ${e} and ${r} but is currently ${l.default}.`)}})}}}}});var MP=T(ro=>{"use strict";y();Object.defineProperty(ro,"__esModule",{value:!0});ro.scriptTagSuggestion=ro.liquidFilterSuggestion=void 0;var GW=Ce(),RP=t=>`Use an HTML script tag with the ${t} attribute instead`,WW=(t,e,r,i)=>({message:RP(t),fix(n){let a=`{{ ${e.source.slice(r.expression.position.start,(0,GW.last)(r.filters,-1)?.position.end??e.position.start)} }}`;n.replace(i.position.start,i.position.end,`<script src="${a}" ${t}></script>`)}});ro.liquidFilterSuggestion=WW;var zW=(t,e)=>({message:RP(t),fix(r){r.insert(e.blockStartPosition.end-1,` ${t}`)}});ro.scriptTagSuggestion=zW});var jP=T(Ah=>{"use strict";y();Object.defineProperty(Ah,"__esModule",{value:!0});Ah.ParserBlockingScript=void 0;var DP=ge(),FP=Y(),Pb=Ce(),cn=je(),Ih=MP();Ah.ParserBlockingScript={meta:{code:"ParserBlockingScript",aliases:["ParserBlockingScriptTag"],name:"Avoid parser blocking scripts",docs:{description:"They are bad ok?",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/parser-blocking-javascript"},type:FP.SourceCodeType.LiquidHtml,severity:FP.Severity.ERROR,schema:{},targets:[]},create(t){return{LiquidFilter:async(e,r)=>{if(e.name!=="script_tag")return;let n=e.source.slice(e.position.start,e.position.end).indexOf("script_tag"),s=(0,Pb.last)(r),a=(0,Pb.last)(r,-1);t.report({message:"The script_tag filter is parser-blocking. Use a <script> tag with async or defer for better performance",startIndex:e.position.start+n,endIndex:e.position.end,suggest:a&&a.type===DP.NodeTypes.LiquidVariableOutput&&s&&s.type===DP.NodeTypes.LiquidVariable&&(0,Pb.last)(s.filters)===e?[(0,Ih.liquidFilterSuggestion)("defer",e,s,a),(0,Ih.liquidFilterSuggestion)("async",e,s,a)]:void 0})},HtmlRawNode:async e=>{if(e.name!=="script"||!e.attributes.filter(cn.isValuedHtmlAttribute).some(s=>(0,cn.isAttr)(s,"src")))return;let i=e.attributes.filter(cn.isHtmlAttribute).some(s=>(0,cn.isAttr)(s,"async")||(0,cn.isAttr)(s,"defer")),n=e.attributes.filter(cn.isValuedHtmlAttribute).some(s=>(0,cn.isAttr)(s,"type")&&((0,cn.hasAttributeValueOf)(s,"module")||(0,cn.hasAttributeValueOf)(s,"importmap")));i||n||t.report({message:"Avoid parser blocking scripts by adding `defer` or `async` on this tag",startIndex:e.position.start,endIndex:e.position.end,suggest:[(0,Ih.scriptTagSuggestion)("defer",e),(0,Ih.scriptTagSuggestion)("async",e)]})}}}}});var $P=T(Oh=>{"use strict";y();Object.defineProperty(Oh,"__esModule",{value:!0});Oh.SchemaPresetsBlockOrder=void 0;var Th=ze(),JW=xt(),BP=Y();Oh.SchemaPresetsBlockOrder={meta:{code:"SchemaPresetsBlockOrder",name:"Gives recommendations and validations for block_order",docs:{description:"Gives recommendations and validations for block_order for preset blocks as a hash.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/schema-presets-block-order"},type:BP.SourceCodeType.LiquidHtml,severity:BP.Severity.WARNING,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.blockStartPosition.end,i=await(0,JW.getSchema)(t),{validSchema:n,ast:s}=i??{};if(!n||n instanceof Error||!s||s instanceof Error)return;let a=n.presets;a&&a.forEach((o,u)=>{"blocks"in o&&o.blocks&&VP(o,t,r,s,["presets",String(u)])})}}}};function VP(t,e,r,i,n){if("blocks"in t&&typeof t.blocks=="object"&&t.blocks){let s="block_order"in t?t.block_order:void 0;s||KW(t)&&Eh(e,r,i,n,"block_order is missing",!1),s?.forEach((a,o)=>{if(!t.blocks||!Array.isArray(t.blocks)&&!t.blocks[a]){let u=n.concat(["block_order"]).concat([String(o)]);Eh(e,r,i,u,`block '${a}' is missing from 'blocks'`)}});for(let[a,o]of Object.entries(t.blocks)){if(o.static){if(Array.isArray(s)&&s.includes(a)){let u=n.concat(["block_order"]);Eh(e,r,i,u,`static block '${a}' cannot be in the block_order`)}}else if(Array.isArray(s)&&!s.includes(a)){let u=n.concat(["block_order"]);Eh(e,r,i,u,`block '${a}' is missing from the block_order`)}o.blocks&&(n.push("blocks",a),VP(o,e,r,i,n))}}}function KW(t){return"blocks"in t&&typeof t.blocks=="object"&&t.blocks!==null&&!Array.isArray(t.blocks)?Object.entries(t.blocks).some(([e,r])=>r.static!==!0):!1}function Eh(t,e,r,i,n,s=!0){let a=(0,Th.nodeAtPath)(r,i),o=s?e+(0,Th.getLocStart)(a):e+(0,Th.getLocEnd)(a)-1,u=e+(0,Th.getLocEnd)(a);t.report({message:n,startIndex:o,endIndex:u})}});var Nh=T(qb=>{"use strict";y();Object.defineProperty(qb,"__esModule",{value:!0});qb.isContentForBlock=QW;function QW(t){return typeof t=="string"?!1:t.contentForType.value==="block"}});var HP=T(Lh=>{"use strict";y();Object.defineProperty(Lh,"__esModule",{value:!0});Lh.SchemaPresetsStaticBlocks=void 0;var Cb=ge(),io=ze(),YW=xt(),UP=Y(),XW=Nh();Lh.SchemaPresetsStaticBlocks={meta:{code:"SchemaPresetsStaticBlocks",name:"Ensure the preset static blocks are used in the liquid",docs:{description:'Warns if a preset static block does not have a corresponding content_for "block" tag.',recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/schema-presets-static-blocks"},type:UP.SourceCodeType.LiquidHtml,severity:UP.Severity.ERROR,schema:{},targets:[]},create(t){let e=[],r=[],i=0;function n(){r.forEach(s=>{e.some(a=>a.id===s.id&&a.type===s.type)||t.report({message:`Static block ${s.id} is missing a corresponding content_for "block" tag.`,startIndex:s.startIndex,endIndex:s.endIndex})})}return{async LiquidTag(s){if(s.name!==Cb.NamedTags.content_for||!(0,XW.isContentForBlock)(s.markup))return;let a=s.markup.args.find(l=>l.name==="id")?.value,o=s.markup.args.find(l=>l.name==="type")?.value;if(!o||o.type!==Cb.NodeTypes.String)return;let u=o.value;a?.type===Cb.NodeTypes.String&&e.push({id:a.value,type:u})},async LiquidRawTag(s){if(s.name==="schema"&&s.body.kind==="json"){i=s.blockStartPosition.end;let a=await(0,YW.getSchema)(t),{validSchema:o,ast:u}=a??{};if(!o||o instanceof Error||!u||u instanceof Error)return;let l=o.presets;if(!l)return;l.forEach((f,h)=>{if("blocks"in f&&f.blocks){let p=["presets",h,"blocks"];Array.isArray(f.blocks)?f.blocks.forEach((m,v)=>{if(m.static===!0&&m.id){let S=(0,io.nodeAtPath)(u,p.concat([v]));r.push({id:m.id,type:m.type,startIndex:i+(0,io.getLocStart)(S),endIndex:i+(0,io.getLocEnd)(S)})}}):typeof f.blocks=="object"&&Object.entries(f.blocks).forEach(([m,v])=>{if(v.static===!0){let S=(0,io.nodeAtPath)(u,p.concat(m));r.push({id:m,type:v.type,startIndex:i+(0,io.getLocStart)(S),endIndex:i+(0,io.getLocEnd)(S)})}})}})}},async onCodePathEnd(){n()}}}}});var JP=T(qh=>{"use strict";y();Object.defineProperty(qh,"__esModule",{value:!0});qh.RemoteAsset=void 0;var fr=Y(),rc=je(),ZW=Ce(),ez=["img","link","source","script"],tz=["fonts.shopifycdn.com","cdn.shopify.com"],rz=["stylesheet_tag","script_tag","image_tag","img_tag"],WP=["product_img_url","article_img_url","collection_img_url","img_url"],zP=["asset_url","image_url","asset_img_url","file_img_url","file_url","global_asset_url","shopify_asset_url","external_video_url","font_url"],iz="canonical_url";function Rb(t){return t.type===fr.LiquidHtmlNodeTypes.LiquidVariableOutput}function Mb(t){return typeof t!="string"&&t.type===fr.LiquidHtmlNodeTypes.LiquidVariable}function nz(t){return t.startsWith("#")}function GP(t){return/^data:/i.test(t)}function sz(t){let e=t.value[0];if(!e||!Rb(e))return!1;let r=e.markup;return Mb(r)?r.expression.type===fr.LiquidHtmlNodeTypes.VariableLookup:!1}function Ph(t,e=[]){if(/^\/cdn\//.test(t))return!0;try{let r=new URL(t);return[...tz,...e].includes(r.hostname)}catch{return!1}}function az(t,e=[]){return t.value.some(r=>{if(r.type===fr.LiquidHtmlNodeTypes.TextNode&&/^(https?:)?\/\//.test(r.value)&&!Ph(r.value,e))return!0;if(Rb(r)){let i=r.markup;if(Mb(i)){let n=i.expression;if(n.type===fr.LiquidHtmlNodeTypes.String&&/^https?:\/\//.test(n.value)&&!Ph(n.value,e))return!0}}return!1})}function oz(t){let e=[...WP,...zP],r=[iz];return t.value.some(i=>!Rb(i)||!Mb(i.markup)?!1:!!(i.markup.filters.some(s=>e.includes(s.name))||(0,rc.isNodeOfType)(fr.LiquidHtmlNodeTypes.VariableLookup,i.markup.expression)&&i.markup.expression.name&&r.includes(i.markup.expression.name)))}function uz(t){return t.map(e=>{try{return new URL(e).hostname.replace(/^www\./,"")}catch{return}}).filter(e=>e!==void 0)}var cz={allowedDomains:fr.SchemaProp.array(fr.SchemaProp.string()).optional()};qh.RemoteAsset={meta:{code:"RemoteAsset",aliases:["AssetUrlFilters"],name:"Remote Asset",docs:{description:"This check is aimed at eliminating unnecessary HTTP connections.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/remote-asset",recommended:!0},type:fr.SourceCodeType.LiquidHtml,severity:fr.Severity.WARNING,schema:cz,targets:[]},create(t){let e=uz(t.settings.allowedDomains||[]);function r(n){if(!ez.includes(n.name))return;let s=n.attributes.filter(rc.isValuedHtmlAttribute).find(f=>(0,rc.isAttr)(f,"src")||(0,rc.isAttr)(f,"href"));if(!s)return;let a=s.value.find(f=>f.type===fr.LiquidHtmlNodeTypes.TextNode);if(a&&nz(a.value)||a&&GP(a.value)||sz(s)||s.value.filter(f=>f.type===fr.LiquidHtmlNodeTypes.TextNode).some(f=>Ph(f.value,e)))return;if(az(s,e)){t.report({message:"Asset should be served by the Shopify CDN for better performance.",startIndex:s.position.start,endIndex:s.position.end});return}oz(s)||t.report({message:"Use one of the asset_url filters to serve assets for better performance.",startIndex:s.position.start,endIndex:s.position.end})}function i(n,s){let a=n.name;if(!rz.includes(a))return;let o=(0,ZW.last)(s);if(!o||!(0,rc.isNodeOfType)(fr.LiquidHtmlNodeTypes.LiquidVariable,o)||o.filters.some(f=>WP.includes(f.name)||zP.includes(f.name)))return;let l=o.expression;l.type===fr.LiquidHtmlNodeTypes.String&&GP(l.value)||(l.type===fr.LiquidHtmlNodeTypes.String&&!Ph(l.value,e)&&t.report({message:"Asset should be served by the Shopify CDN for better performance.",startIndex:l.position.start,endIndex:l.position.end}),t.report({message:"Use one of the asset_url filters to serve assets for better performance.",startIndex:o.expression.position.start,endIndex:n.position.end}))}return{async HtmlVoidElement(n){r(n)},async HtmlRawNode(n){r(n)},async LiquidFilter(n,s){i(n,s)}}}}});var QP=T(Rh=>{"use strict";y();Object.defineProperty(Rh,"__esModule",{value:!0});Rh.RequiredLayoutThemeObject=void 0;var Ch=Y(),KP=je();Rh.RequiredLayoutThemeObject={meta:{code:"RequiredLayoutThemeObject",name:"Prevent missing required objects in theme.liquid",docs:{description:"This check prevents missing {{ content_for_header }} and {{ content_for_layout }} objects in layout/theme.liquid.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/required-layout-theme-object"},type:Ch.SourceCodeType.LiquidHtml,severity:Ch.Severity.ERROR,schema:{},targets:[Ch.ConfigTarget.All,Ch.ConfigTarget.Recommended]},create(t){if(t.toRelativePath(t.file.uri)!=="layout/theme.liquid")return{};let e=["content_for_header","content_for_layout"],r=new Set,i,n;function s(a){a.name&&e.includes(a.name)&&r.add(a.name)}return{async VariableLookup(a){s(a)},async HtmlElement(a){(0,KP.isHtmlTag)(a,"head")?i=a:(0,KP.isHtmlTag)(a,"body")&&(n=a)},async onCodePathEnd(){for(let a of e)if(!r.has(a)){let o=`The required object '{{ ${a} }}' is missing in layout/theme.liquid`,u=a==="content_for_header"?i:n,l=u?.blockEndPosition.start;t.report({message:o,startIndex:u?.position.start??0,endIndex:u?.position.end??0,fix:l!==void 0?f=>f.insert(l,`{{ ${a} }}`):void 0})}}}}}});var ic=T(Nn=>{"use strict";y();Object.defineProperty(Nn,"__esModule",{value:!0});Nn.CLOSEST_ARGUMENT=Nn.REQUIRED_CONTENT_FOR_ARGUMENTS=Nn.RESERVED_CONTENT_FOR_ARGUMENTS=void 0;Nn.RESERVED_CONTENT_FOR_ARGUMENTS=["attributes","block","blocks","class","context","inherit","resource","resources","schema","section","sections","settings","snippet","snippets","src","style","styles","template","templates"];Nn.REQUIRED_CONTENT_FOR_ARGUMENTS=["id","type"];Nn.CLOSEST_ARGUMENT="closest."});var ZP=T(Mh=>{"use strict";y();Object.defineProperty(Mh,"__esModule",{value:!0});Mh.ReservedDocParamNames=void 0;var YP=Y(),lz=xt(),XP=ic();Mh.ReservedDocParamNames={meta:{code:"ReservedDocParamNames",name:"Valid doc parameter names",docs:{description:"This check exists to ensure any parameter names defined in LiquidDoc do not collide with reserved words.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/reserved-doc-param-names"},type:YP.SourceCodeType.LiquidHtml,severity:YP.Severity.ERROR,schema:{},targets:[]},create(t){if(!(0,lz.isBlock)(t.file.uri))return{};let e=[...XP.REQUIRED_CONTENT_FOR_ARGUMENTS,...XP.RESERVED_CONTENT_FOR_ARGUMENTS];return{async LiquidDocParamNode(r){let i=r.paramName.value;e.includes(i)&&fz(t,"The parameter name is not supported because it's a reserved argument for 'content_for' tags.",r.paramName)}}}};function fz(t,e,r){t.report({message:e,startIndex:r.position.start,endIndex:r.position.end})}});var tq=T(Fh=>{"use strict";y();Object.defineProperty(Fh,"__esModule",{value:!0});Fh.StaticStylesheetAndJavascriptTags=void 0;var Dh=ge(),eq=Y();Fh.StaticStylesheetAndJavascriptTags={meta:{code:"StaticStylesheetAndJavascriptTags",name:"Reports non static stylesheet and javascript tags",docs:{description:"Reports the usage of Liquid within {% stylesheet %} and {% javascript %} tags, which should only contain static content.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/static-stylesheet-and-javascript-tags"},type:eq.SourceCodeType.LiquidHtml,severity:eq.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="stylesheet"&&e.name!=="javascript")return;let r=e.body.nodes.filter(i=>i.type===Dh.NodeTypes.LiquidVariableOutput||i.type===Dh.NodeTypes.LiquidTag||i.type===Dh.NodeTypes.LiquidRawTag);for(let i of r){let n=e.name==="stylesheet"?"CSS":"JavaScript",s=i.type===Dh.NodeTypes.LiquidVariableOutput?"variable":"tag";t.report({message:`Liquid ${s} found in ${n} block. {% ${e.name} %} tags should only contain static ${n} code.`,startIndex:i.position.start,endIndex:i.position.end})}}}}}});var nq=T(jh=>{"use strict";y();Object.defineProperty(jh,"__esModule",{value:!0});jh.TranslationKeyExists=void 0;var pz=ze(),rq=Y(),hz=Ce();function iq(t,e){for(let r of t.split(".")){if(typeof e!="object"||!e.hasOwnProperty(r))return!1;e=e[r]}return!0}jh.TranslationKeyExists={meta:{code:"TranslationKeyExists",name:"Reports missing translation keys",docs:{description:"Reports missing translation keys",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/translation-key-exists"},type:rq.SourceCodeType.LiquidHtml,severity:rq.Severity.ERROR,schema:{},targets:[]},create(t){let e=[],r;return{async LiquidVariable(i){i.expression.type==="String"&&i.filters.some(({name:n})=>["t","translate"].includes(n))&&e.push({translationKey:i.expression.value,startIndex:i.expression.position.start,endIndex:i.expression.position.end})},async LiquidRawTag(i){if(i.name!=="schema"||i.body.kind!=="json")return;let n=await t.getDefaultLocale(),s=(0,pz.parseJSON)(i.body.value);(0,hz.isError)(s)&&s instanceof SyntaxError||(r=s.locales?.[n])},async onCodePathEnd(){let i=await t.getDefaultTranslations(),n=await t.getDefaultLocale(),s=await t.themeDocset?.systemTranslations(),a=Object.keys(s??{});!i&&a.length===0||e.forEach(({translationKey:o,startIndex:u,endIndex:l})=>{if(iq(o,i)||iq(o,r)||a.includes(o))return;let f=`'${o}' does not have a matching entry in 'locales/${n}.default.json'`;r&&(f+=` or '${t.toRelativePath(t.file.uri)}'`),t.report({message:f,startIndex:u,endIndex:l})})}}}}});var lq=T(Vh=>{"use strict";y();Object.defineProperty(Vh,"__esModule",{value:!0});Vh.UnclosedHTMLElement=void 0;var We=ge(),sq=Y(),Db=Ce(),aq=je();Vh.UnclosedHTMLElement={meta:{code:"UnclosedHTMLElement",aliases:["UnclosedHTMLElement"],name:"Unclosed HTML Element",docs:{description:"Warns you of unbalanced HTML tags in branching code",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unclosed-html-element"},type:sq.SourceCodeType.LiquidHtml,severity:sq.Severity.WARNING,schema:{},targets:[]},create(t){let e=new Map;return{async HtmlElement(r,i){if(dz(r))return;let[n,s]=(0,Db.findLastAndIndex)(i,aq.isLiquidBranch);if(!n)return;let a=i[s-1],o=i[s-2];if(!a||!o||a.type!==We.NodeTypes.LiquidTag)return;e.has(o)||e.set(o,{open:new Map,close:new Map,identifiers:new Set});let u=e.get(o),l=oq(n,a);u.identifiers.add(l),u.open.has(l)||u.open.set(l,[]),u.open.get(l).push(r)},async HtmlDanglingMarkerClose(r,i){let[n,s]=(0,Db.findLastAndIndex)(i,aq.isLiquidBranch);if(!n)return;let a=i[s-1],o=i[s-2];if(!a||!o||a.type!==We.NodeTypes.LiquidTag)return;e.has(o)||e.set(o,{open:new Map,close:new Map,identifiers:new Set});let u=e.get(o),l=oq(n,a);u.identifiers.add(l),u.close.has(l)||u.close.set(l,[]),u.close.get(l).push(r)},async onCodePathEnd(){for(let[r,i]of e){let n=new Map;for(let u of i.identifiers){let l=i.open.get(u)??[],f=i.close.get(u)??[],h=[].concat(l,f).sort((p,m)=>p.position.start-m.position.start);n.set(u,cq(h))}let s=[].concat(...n.values()).sort((u,l)=>u.position.start-l.position.start),a=cq(s),o=new Set(a);for(let[u,l]of n)for(let f of l)o.has(f)&&(f.type===We.NodeTypes.HtmlDanglingMarkerClose?t.report({message:`Closing tag does not have a matching opening tag for condition \`${u}\` in ${r.type} '${Bh(r)}'`,startIndex:f.position.start,endIndex:f.position.end}):t.report({message:`Opening tag does not have a matching closing tag for condition \`${u}\` in ${r.type} '${Bh(r)}'`,startIndex:f.blockStartPosition.start,endIndex:f.blockStartPosition.end}))}}}}};function dz(t){return t.blockEndPosition.start!==t.blockEndPosition.end}function oq(t,e){if(t.name===null)switch(e.name){case We.NamedTags.if:return pr(e.markup);case We.NamedTags.unless:return uq(pr(e.markup));default:return"??"}switch(t.name){case"else":switch(e.name){case We.NamedTags.if:return uq(pr(e.markup));case We.NamedTags.unless:return pr(e.markup);case We.NamedTags.case:return`case ${pr(e.markup)}`;default:return"??"}case We.NamedTags.elsif:return pr(t.markup);case We.NamedTags.when:return e.name!==We.NamedTags.case?"??":`case ${pr(e.markup)} == ${mz(t.markup)}`;default:return"??"}}function mz(t){return typeof t=="string"?t:t.map(pr).join(" or ")}function pr(t){if(typeof t=="string")return t;switch(t.type){case We.NodeTypes.String:return"'"+t.value+"'";case We.NodeTypes.LiquidLiteral:return t.value===null?"null":t.value.toString();case We.NodeTypes.Number:return t.value;case We.NodeTypes.VariableLookup:return`${t.name??""}${t.lookups.map(e=>`[${pr(e)}]`)}`;case We.NodeTypes.Range:return`(${pr(t.start)}..${pr(t.end)})`;case We.NodeTypes.Comparison:return[pr(t.left),t.comparator,pr(t.right)].join(" ");case We.NodeTypes.LogicalExpression:return[pr(t.left),t.relation,pr(t.right)].join(" ");default:return(0,Db.assertNever)(t)}}function uq(t){return t.startsWith("-")?t.slice(1):`-${t}`}function cq(t){let e=[];for(let r of t)r.type===We.NodeTypes.HtmlElement?e.push(r):e.length>0&&Bh(r)===Bh(e.at(-1))&&e.at(-1).type===We.NodeTypes.HtmlElement&&r.type===We.NodeTypes.HtmlDanglingMarkerClose?e.pop():e.push(r);return e}function Bh(t){return t.type===We.NodeTypes.HtmlElement||t.type===We.NodeTypes.HtmlDanglingMarkerClose?t.name.length===0?"":t.source.slice(t.name.at(0).position.start,t.name.at(-1).position.end):t.type===We.NodeTypes.LiquidTag?t.name:t.type}});var Fb=T($h=>{"use strict";y();Object.defineProperty($h,"__esModule",{value:!0});$h.hasLiquidDoc=gz;$h.extractDocDefinition=yz;var pq=kn();function gz(t){let e=!1;return(0,pq.visit)(t,{LiquidRawTag(r){r.name==="doc"&&(e=!0)}}),e}function yz(t,e){let r=!1,i=(0,pq.visit)(e,{LiquidRawTag(o){o.name==="doc"&&(r=!0)},LiquidDocParamNode(o){return{name:o.paramName.value,description:o.paramDescription?.value??null,type:o.paramType?.value??null,required:o.required,nodeType:"param"}},LiquidDocExampleNode(o){return{content:fq(o.content.value.trim()),nodeType:"example"}},LiquidDocDescriptionNode(o){return{content:fq(o.content.value.trim()),nodeType:"description"}}});if(!r)return{uri:t};let{parameters:n,examples:s,description:a}=i.reduce((o,u)=>(u.nodeType==="param"?o.parameters.push(u):u.nodeType==="example"?o.examples.push(u):u.nodeType==="description"&&!o.description&&(o.description=u),o),{parameters:[],examples:[],description:void 0});return{uri:t,liquidDoc:{...n.length&&{parameters:n},...s.length&&{examples:s},...a&&{description:a}}}}function fq(t){let e=t.split(`
|
|
1197
|
-
`);if(e.length<=1)return t;let i=e.slice(1).filter(s=>s.trim().length>0).map(s=>{let a=s.match(/^\s*/);return a?a[0].length:0});if(i.length===0)return t;let n=Math.min(...i);return[e[0],...e.slice(1).map(s=>s.trim().length===0?s:s.slice(n))].join(`
|
|
1198
|
-
`)}});var _q=T(Uh=>{"use strict";y();Object.defineProperty(Uh,"__esModule",{value:!0});Uh.UndefinedObject=void 0;var Rs=ge(),hq=Y(),dq=Ce(),_z=Fb(),mq=je();Uh.UndefinedObject={meta:{code:"UndefinedObject",name:"Undefined Object",docs:{description:"This check exists to identify references to undefined Liquid objects.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/undefined-object"},type:hq.SourceCodeType.LiquidHtml,severity:hq.Severity.WARNING,schema:{},targets:[]},create(t){let e=t.toRelativePath(t.file.uri),r=t.file.ast;if((0,dq.isError)(r))return{};if(e.startsWith("snippets/")&&!(0,_z.hasLiquidDoc)(r))return{};if(!t.themeDocset)return{};let i=t.themeDocset,n=new Map,s=new Set,a=[];function o(u,l){if(!u)return;let f=n.get(u)??[];n.set(u,f.concat(l))}return{async LiquidDocParamNode(u){let l=u.paramName?.value;l&&s.add(l)},async LiquidTag(u,l){(0,mq.isWithinRawTagThatDoesNotParseItsContents)(l)||(kz(u)&&o(u.markup.name,{start:u.blockStartPosition.end}),yq(u)&&o(u.markup.name,{start:u.blockEndPosition?.end}),["form","paginate"].includes(u.name)&&o(u.name,{start:u.blockStartPosition.end,end:u.blockEndPosition?.start}),u.name==="layout"&&o("none",{start:u.position.start,end:u.position.end}),(Tz(u)||Ez(u))&&u.markup.name!==null&&o(u.markup.name,{start:u.position.start}),(Iz(u)||Az(u))&&(o(u.markup.variableName,{start:u.blockStartPosition.end,end:u.blockEndPosition?.start}),o(u.name==="for"?"forloop":"tablerowloop",{start:u.blockStartPosition.end,end:u.blockEndPosition?.start})))},async VariableLookup(u,l){if((0,mq.isWithinRawTagThatDoesNotParseItsContents)(l))return;let f=(0,dq.last)(l);xz(f)&&yq(f)||a.push(u)},async onCodePathEnd(){(await vz(i,e,t.mode)).forEach(l=>s.add(l.name)),a.forEach(l=>{!l.name||Sz(l.name,l.position,s,n)||t.report({message:`Unknown object '${l.name}' used.`,startIndex:l.position.start,endIndex:l.position.end})})}}}};async function vz(t,e,r="theme"){let i=await t.objects(),n=bz(e,r);return i.filter(({access:a,name:o})=>n.includes(o)||!a||a.global===!0||a.template.length>0)}var gq=["app","section","recommendations","block"];function bz(t,e="theme"){return t.startsWith("layout/checkout.liquid")?["locale","direction","skip_to_content_link","checkout_html_classes","checkout_stylesheets","checkout_scripts","content_for_logo","breadcrumb","order_summary_toggle","content_for_order_summary","alternative_payment_methods","content_for_footer","tracking_code"]:t.startsWith("sections/")?["section","predictive_search","recommendations","comment"]:t.startsWith("blocks/")?gq:t.startsWith("snippets/")?e==="app"?gq:["app"]:[]}function Sz(t,e,r,i){if(r.has(t))return!0;let n=i.get(t);return n?n.some(s=>wz(e,s)):!1}function wz(t,e){let r=t.start,i=!e.start||r>e.start,n=!e.end||r<e.end;return i&&n}function xz(t){return t?.type===Rs.NodeTypes.LiquidTag}function yq(t){return t.name===Rs.NamedTags.capture}function kz(t){return t.name===Rs.NamedTags.assign&&typeof t.markup!="string"}function Iz(t){return t.name===Rs.NamedTags.for&&typeof t.markup!="string"}function Az(t){return t.name===Rs.NamedTags.tablerow&&typeof t.markup!="string"}function Tz(t){return t.name===Rs.NamedTags.increment&&typeof t.markup!="string"}function Ez(t){return t.name===Rs.NamedTags.decrement&&typeof t.markup!="string"}});var bq=T(Hh=>{"use strict";y();Object.defineProperty(Hh,"__esModule",{value:!0});Hh.UniqueDocParamNames=void 0;var vq=Y();Hh.UniqueDocParamNames={meta:{code:"UniqueDocParamNames",name:"Unique doc parameter names",docs:{description:"This check exists to ensure any parameter names defined in the `doc` tag are unique.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unique-doc-param-names"},type:vq.SourceCodeType.LiquidHtml,severity:vq.Severity.ERROR,schema:{},targets:[]},create(t){let e=new Set;return{async LiquidDocParamNode(r){let i=r.paramName.value;if(!e.has(i)){e.add(i);return}t.report({message:`The parameter '${i}' is defined more than once.`,startIndex:r.paramName.position.start,endIndex:r.paramName.position.end})}}}}});var xq=T(Gh=>{"use strict";y();Object.defineProperty(Gh,"__esModule",{value:!0});Gh.UniqueStaticBlockId=void 0;var jb=ge(),Sq=Y(),wq=ic(),Oz=Nh(),Nz=new Set([...wq.REQUIRED_CONTENT_FOR_ARGUMENTS,...wq.RESERVED_CONTENT_FOR_ARGUMENTS]);Gh.UniqueStaticBlockId={meta:{code:"UniqueStaticBlockId",name:"Prevent use of duplicated ids for blocks rendered statically",docs:{description:"This check is aimed at preventing the use of duplicated ids for blocks rendered statically.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unique-static-block-id",recommended:!0},type:Sq.SourceCodeType.LiquidHtml,severity:Sq.Severity.ERROR,schema:{},targets:[]},create(t){let e=new Set;return{async LiquidTag(r){if(r.name!==jb.NamedTags.content_for||!(0,Oz.isContentForBlock)(r.markup))return;let i=r.markup.args.find(f=>f.name==="id");if(!i)return;let n=i.value;if(n.type!==jb.NodeTypes.String)return;let s=n.value,a=r.markup.args.filter(f=>!Nz.has(f.name)),o=[];for(let f of a){if(f.value.type!==jb.NodeTypes.String)return;o.push(`${f.name}=${f.value.value}`)}o.sort();let u=o.join(","),l=`${s}::${u}`;e.has(l)?t.report({message:`The id '${s}' is already being used by another static block`,startIndex:n.position.start,endIndex:n.position.end,suggest:[]}):e.add(l)}}}}});var Iq=T(Wh=>{"use strict";y();Object.defineProperty(Wh,"__esModule",{value:!0});Wh.UnknownFilter=void 0;var kq=Y();Wh.UnknownFilter={meta:{code:"UnknownFilter",name:"Prevent use of unknown filters",docs:{description:"This check is aimed at preventing the use of unknown filters.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unknown-filter",recommended:!0},type:kq.SourceCodeType.LiquidHtml,severity:kq.Severity.ERROR,schema:{},targets:[]},create(t){return t.themeDocset?{async LiquidFilter(e){(await t.themeDocset.filters()).some(i=>i.name===e.name)||t.report({message:`Unknown filter '${e.name}' used.`,startIndex:e.position.start+1,endIndex:e.position.end})}}:{}}}});var Tq=T(zh=>{"use strict";y();Object.defineProperty(zh,"__esModule",{value:!0});zh.UnrecognizedContentForArguments=void 0;var Aq=Y(),Bb=Ri(),Vb=ic();zh.UnrecognizedContentForArguments={meta:{code:"UnrecognizedContentForArguments",name:"Unrecognized ContentFor Arguments",docs:{description:"This check ensures that no unknown arguments are used when rendering a static block.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unrecognized-content-for-arguments"},type:Aq.SourceCodeType.LiquidHtml,severity:Aq.Severity.WARNING,schema:{},targets:[]},create(t){let e=new Set([...Vb.RESERVED_CONTENT_FOR_ARGUMENTS,...Vb.REQUIRED_CONTENT_FOR_ARGUMENTS]);return{async ContentForMarkup(r){let i=(0,Bb.getBlockName)(r);if(!i)return;let n=await(0,Bb.getLiquidDocParams)(t,`blocks/${i}.liquid`);if(!n)return;let s=r.args.filter(a=>!n.has(a.name)).filter(a=>!e.has(a.name)).filter(a=>!a.name.startsWith(Vb.CLOSEST_ARGUMENT));(0,Bb.reportUnknownArguments)(t,r,s,i)}}}}});var Oq=T(Jh=>{"use strict";y();Object.defineProperty(Jh,"__esModule",{value:!0});Jh.UnrecognizedRenderSnippetArguments=void 0;var Eq=Y(),$b=Ri();Jh.UnrecognizedRenderSnippetArguments={meta:{code:"UnrecognizedRenderSnippetArguments",name:"Unrecognized Render Snippet Arguments",aliases:["UnrecognizedRenderSnippetParams"],docs:{description:"This check ensures that no unknown arguments are used when rendering a snippet.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unrecognized-render-snippet-arguments"},type:Eq.SourceCodeType.LiquidHtml,severity:Eq.Severity.WARNING,schema:{},targets:[]},create(t){function e(r,i,n){let s=r.alias,a=r.variable;if(s&&!i.has(s.value)&&a){let o=a.position.start+1;t.report({message:`Unknown argument '${s.value}' in render tag for snippet '${n}'.`,startIndex:o,endIndex:s.position.end,suggest:[{message:`Remove '${s.value}'`,fix:u=>{if(a)return u.remove(a.position.start,s.position.end)}}]})}}return{async RenderMarkup(r){let i=(0,$b.getSnippetName)(r);if(!i)return;let n=await(0,$b.getLiquidDocParams)(t,`snippets/${i}.liquid`);if(!n)return;let s=r.args.filter(a=>!n.has(a.name));e(r,n,i),(0,$b.reportUnknownArguments)(t,r,s,i)}}}}});var qq=T(Qh=>{"use strict";y();Object.defineProperty(Qh,"__esModule",{value:!0});Qh.UnusedAssign=void 0;var Pq=ge(),Nq=Y(),Lq=je();Qh.UnusedAssign={meta:{code:"UnusedAssign",name:"Prevent unused assigns",docs:{description:"This check exists to prevent bloat in themes by surfacing variable definitions that are not used.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unused-assign"},type:Nq.SourceCodeType.LiquidHtml,severity:Nq.Severity.WARNING,schema:{},targets:[]},create(t){let e=new Map,r=new Set;function i(n){n.type===Pq.NodeTypes.VariableLookup&&r.add(n.name)}return{async LiquidTag(n,s){(0,Lq.isWithinRawTagThatDoesNotParseItsContents)(s)||(Lz(n)||Kh(n)&&n.markup.name)&&e.set(n.markup.name,n)},async VariableLookup(n,s){if((0,Lq.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=s.at(-1);a&&Kh(a)||i(n)},async onCodePathEnd(){for(let[n,s]of e.entries())!r.has(n)&&!n.startsWith("_")&&t.report({message:`The variable '${n}' is assigned but not used`,startIndex:Kh(s)?s.blockStartPosition.start:s.position.start,endIndex:Kh(s)?s.blockStartPosition.end:s.position.end,suggest:[{message:`Remove the unused variable '${n}'`,fix:a=>a.remove(s.position.start,s.position.end)}]})}}}};function Lz(t){return t.name==="assign"&&typeof t.markup!="string"}function Kh(t){return t.type==Pq.NodeTypes.LiquidTag&&t.name==="capture"&&typeof t.markup!="string"}});var Rq=T(Yh=>{"use strict";y();Object.defineProperty(Yh,"__esModule",{value:!0});Yh.UnsupportedDocTag=void 0;var Cq=Y(),Pz=Ya();Yh.UnsupportedDocTag={meta:{code:"UnsupportedDocTag",name:"Prevent unsupported doc tag usage",docs:{description:"This check exists to prevent use of `doc` tag outside of snippet file.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unsupported-doc-tag"},type:Cq.SourceCodeType.LiquidHtml,severity:Cq.Severity.ERROR,schema:{},targets:[]},create(t){return(0,Pz.filePathSupportsLiquidDoc)(t.file.uri)?{}:{async LiquidRawTag(r){r.name==="doc"&&t.report({message:"The `doc` tag can only be used within a snippet or block.",startIndex:r.position.start,endIndex:r.position.end,suggest:[{message:"Remove unsupported `doc` tag",fix:i=>i.remove(r.position.start,r.position.end)}]})}}}}});var Dq=T(Xh=>{"use strict";y();Object.defineProperty(Xh,"__esModule",{value:!0});Xh.UnsupportedFilterArguments=void 0;var Ub=ge(),Mq=Y(),qz=[Ub.NamedTags.render,Ub.NamedTags.include,Ub.NamedTags.content_for];function Cz(t){let e=null;for(let r=0;r<t.length;r++){let i=t[r];if(e){i===e&&(e=null);continue}if(i==="'"||i==='"'){e=i;continue}if(i==="|")return r}return-1}Xh.UnsupportedFilterArguments={meta:{code:"UnsupportedFilterArguments",name:"Unsupported Filter Arguments",docs:{description:"This check warns against using filters on values passed as arguments to a 'render', 'include', or 'content_for' tag. Filters are not applied in that position and the value is passed through unchanged, which silently produces incorrect output.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unsupported-filter-arguments"},type:Mq.SourceCodeType.LiquidHtml,severity:Mq.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidTag(e){if(!qz.includes(e.name)||typeof e.markup!="string")return;let r=Cz(e.markup);if(r===-1)return;let i=e.source.indexOf(e.markup,e.position.start);if(i===-1)return;let n=i+r,s=i+e.markup.length;t.report({message:`Filters cannot be used on arguments passed to the '${e.name}' tag. Apply the filter beforehand (e.g. with {% assign %}) and pass the result instead.`,startIndex:n,endIndex:s})}}}}});var jq=T(Zh=>{"use strict";y();Object.defineProperty(Zh,"__esModule",{value:!0});Zh.UnusedDocParam=void 0;var Rz=ge(),Fq=Y(),Mz=je();Zh.UnusedDocParam={meta:{code:"UnusedDocParam",name:"Prevent unused doc parameters",docs:{description:"This check exists to ensure any parameters defined in the `doc` tag are used within the snippet.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unused-doc-param"},type:Fq.SourceCodeType.LiquidHtml,severity:Fq.Severity.WARNING,schema:{},targets:[]},create(t){let e=new Map,r=new Set;return{async LiquidDocParamNode(i){e.set(i.paramName.value,i)},async VariableLookup(i,n){i.type===Rz.NodeTypes.VariableLookup&&i.name&&!(0,Mz.isLoopScopedVariable)(i.name,n)&&r.add(i.name)},async onCodePathEnd(){for(let[i,n]of e.entries())r.has(i)||t.report({message:`The parameter '${i}' is defined but not used in this file.`,startIndex:n.position.start,endIndex:n.position.end,suggest:[{message:`Remove unused parameter '${i}'`,fix:s=>s.remove(n.position.start,n.position.end)}]})}}}}});var Vq=T(ed=>{"use strict";y();Object.defineProperty(ed,"__esModule",{value:!0});ed.ValidContentForArguments=void 0;var Dz=ge(),Bq=Y(),Hb=ic();ed.ValidContentForArguments={meta:{code:"ValidContentForArguments",name:"Prevent the use of invalid arguments to the content_for tag",docs:{description:"This check is aimed at preventing the use of invalid arguments for the content_for tag.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-content-for-arguments",recommended:!0},type:Bq.SourceCodeType.LiquidHtml,severity:Bq.Severity.ERROR,schema:{},targets:[]},create(t){let e={blocks:r=>{let i=r.args.filter(n=>!n.name.startsWith(Hb.CLOSEST_ARGUMENT));for(let n of i)t.report({message:`{% content_for "blocks" %} only accepts 'closest.*' arguments`,startIndex:n.position.start,endIndex:n.position.end})},block:r=>{for(let n of Hb.REQUIRED_CONTENT_FOR_ARGUMENTS){let s=r.args.find(o=>o.name===n);if(!s){t.report({message:`{% content_for "block" %} requires a '${n}' argument`,startIndex:r.position.start,endIndex:r.position.end,suggest:[]});continue}let a=s.value;a.type!==Dz.NodeTypes.String&&t.report({message:`The '${n}' argument should be a string`,startIndex:a.position.start,endIndex:a.position.end,suggest:[]})}let i=r.args.filter(n=>Hb.RESERVED_CONTENT_FOR_ARGUMENTS.includes(n.name));for(let n of i)t.report({message:`{% content_for "block" %} doesn't support '${n.name}' because it's a reserved argument.`,startIndex:n.position.start,endIndex:n.position.end})}};return{async LiquidTag(r){if(r.name!=="content_for"||typeof r.markup=="string")return;let i=r.markup.contentForType.value,n=e[i];n&&n(r.markup)}}}}});var Uq=T(rd=>{"use strict";y();Object.defineProperty(rd,"__esModule",{value:!0});rd.ValidContentForArgumentTypes=void 0;var $q=Y(),td=Ri();rd.ValidContentForArgumentTypes={meta:{code:"ValidContentForArgumentTypes",name:"Valid ContentFor Argument Types",docs:{description:"This check ensures that arguments passed to static blocks match the expected types defined in the liquidDoc header if present.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-content-for-argument-types"},type:$q.SourceCodeType.LiquidHtml,severity:$q.Severity.WARNING,schema:{},targets:[]},create(t){return{async ContentForMarkup(e){let r=(0,td.getBlockName)(e);if(!r)return;let i=await(0,td.getLiquidDocParams)(t,`blocks/${r}.liquid`);if(!i)return;let n=(0,td.findTypeMismatchParams)(i,e.args);(0,td.reportTypeMismatches)(t,n,i)}}}}});var Wq=T(id=>{"use strict";y();Object.defineProperty(id,"__esModule",{value:!0});id.ValidBlockTarget=void 0;var Gb=ze(),Fz=xt(),Hq=Y(),ti=Ce();id.ValidBlockTarget={meta:{code:"ValidBlockTarget",name:"Validate block targeting in presets",docs:{description:"Ensures block types only reference valid block types and respect parent-child relationships",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-block-target"},type:Hq.SourceCodeType.LiquidHtml,severity:Hq.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.blockStartPosition.end,i=await(0,Fz.getSchema)(t),{validSchema:n,ast:s}=i??{};if(!n||n instanceof Error||!s||s instanceof Error||!i)return;let{staticBlockDefs:a}=i,{rootLevelThemeBlocks:o,rootLevelLocalBlocks:u,presetLevelBlocks:l,defaultLevelBlocks:f,hasRootBlocksDeclaration:h}=(0,ti.getBlocks)(n);if(u.length>0)return;let p=!1;if(await Promise.all(o.map(async({node:m,path:v})=>{let S=(0,Gb.nodeAtPath)(s,v);await(0,ti.validateBlockFileExistence)(m.type,t)||(p=!0,(0,ti.reportWarning)(Wb(m.type),r,S,t))})),!p){for(let[m,v]of Object.entries(l))parseInt(m,10)===0&&await Promise.all(v.map(async({node:b,path:g})=>{let k=(0,Gb.nodeAtPath)(s,g),w="id"in b?b.id:g.at(-2),_=!!b.static;if((0,ti.isInvalidPresetBlock)(w,b,o,a,h)){let E=_?`Could not find a static block of type "${b.type}" with id "${w}" in this file.`:Gq(b);(0,ti.reportWarning)(E,r,k,t)}await(0,ti.validateBlockFileExistence)(b.type,t)?"blocks"in b&&b.blocks&&await(0,ti.validateNestedBlocks)(t,b,b.blocks,g.slice(0,-1),r,s):(0,ti.reportWarning)(Wb(b.type),r,k,t)}));await Promise.all(f.map(async({node:m,path:v})=>{let S=(0,Gb.nodeAtPath)(s,v);(0,ti.isInvalidDefaultBlock)(m,o,h)&&(0,ti.reportWarning)(Gq(m),r,S,t),await(0,ti.validateBlockFileExistence)(m.type,t)||(0,ti.reportWarning)(Wb(m.type),r,S,t)}))}}}}};function Gq(t){return t.type.startsWith("_")?`Theme block type "${t.type}" is a private block so it must be explicitly allowed in "blocks" at the root of this schema.`:`Theme block type "${t.type}" must be allowed in "blocks" at the root of this schema.`}function Wb(t){return`Theme block 'blocks/${t}.liquid' does not exist.`}});var Kq=T(nd=>{"use strict";y();Object.defineProperty(nd,"__esModule",{value:!0});nd.ValidScopedCSSClass=void 0;var zq=Y(),jz=Ip(),nc=Cf(),zb=$f();async function Jq(t,e,r){let i=new Set;try{let n=e("assets"),a=(await t.readDirectory(n)).filter(([u])=>u.endsWith(".css")).map(([u])=>u),o=await Promise.all(a.map(u=>r(u)));for(let u of o)for(let l of u)i.add(l)}catch{}return i}async function Bz(t,e,r){let i=new Set,n=await Jq(t,e,r);for(let s of n)i.add(s);try{let s=e(""),a=await(0,jz.recursiveReadDirectory)(t,s,([u])=>u.endsWith(".liquid")),o=await Promise.all(a.map(u=>r(u)));for(let u of o)for(let l of u)i.add(l)}catch{}return i}nd.ValidScopedCSSClass={meta:{code:"ValidScopedCSSClass",name:"Validates CSS classes used in class attributes are defined in an in-scope stylesheet",docs:{description:"Reports CSS classes used in HTML class attributes that are not defined in any in-scope stylesheet tag or CSS asset file.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-scoped-css-class"},type:zq.SourceCodeType.LiquidHtml,severity:zq.Severity.WARNING,schema:{},targets:[]},create(t){let e=new Set,r=[];return{async LiquidRawTag(i){if(i.name==="stylesheet")for(let n of(0,nc.extractCSSClassNames)(i.body.value))e.add(n)},async HtmlElement(i){(0,nc.collectUsedClasses)(i.attributes,r)},async HtmlVoidElement(i){(0,nc.collectUsedClasses)(i.attributes,r)},async HtmlSelfClosingElement(i){(0,nc.collectUsedClasses)(i.attributes,r)},async HtmlRawNode(i){i.name==="svg"&&(0,nc.collectUsedClassesFromSvg)(i.attributes,i.body.value,i.body.position.start,r)},async onCodePathEnd(){if(r.length===0)return;let{getReferences:i,getDependencies:n,getCSSClassesForURI:s,fs:a,toUri:o}=t;if(!i||!n||!s)return;let u=new Set(e),l=await Jq(a,o,s);for(let g of l)u.add(g);let f=await(0,zb.getAncestorUris)(t.file.uri,i),h=await Promise.all(f.map(g=>s(g)));for(let g of h)for(let k of g)u.add(k);let p=[t.file.uri,...f],m=[];for(let g of p){let k=await(0,zb.getRenderedSnippetUris)(g,n);m.push(...k)}let v=await(0,zb.getAllSnippetDescendantUris)(m,n),S=await Promise.all(v.map(g=>s(g)));for(let g of S)for(let k of g)u.add(k);let b=await Bz(a,o,s);for(let{className:g,startIndex:k,endIndex:w}of r)b.has(g)&&!u.has(g)&&t.report({message:`CSS class '${g}' may be defined outside the scope of this file.`,startIndex:k,endIndex:w})}}}}});var Yq=T(sd=>{"use strict";y();Object.defineProperty(sd,"__esModule",{value:!0});sd.ValidHTMLTranslation=void 0;var Qq=Y(),Vz=ge();sd.ValidHTMLTranslation={meta:{code:"ValidHTMLTranslation",name:"Valid HTML Translation",docs:{description:"This check exists to prevent invalid HTML inside translations.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-html-translation",recommended:!0},type:Qq.SourceCodeType.JSON,severity:Qq.Severity.WARNING,schema:{},targets:[]},create(t){return t.toRelativePath(t.file.uri).startsWith("locales/")?{async Literal(r){let i=/<[^>]+>/;if(!(typeof r.value!="string"||!i.test(r.value)))try{(0,Vz.toLiquidHtmlAST)(r.value)}catch(n){let s=r.loc,a={message:`${n}.`,startIndex:s.start.offset,endIndex:s.end.offset};t.report(a)}}}:{}}}});var Zq=T(ad=>{"use strict";y();Object.defineProperty(ad,"__esModule",{value:!0});ad.ValidJSON=void 0;var Xq=Y();ad.ValidJSON={meta:{code:"ValidJSON",aliases:["ValidJson"],name:"Enforce valid JSON",docs:{description:"This check exists to prevent invalid JSON files in themes. Will check against schema if available.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/json-syntax-error"},type:Xq.SourceCodeType.JSON,severity:Xq.Severity.ERROR,schema:{},targets:[]},create(t){if(!t.validateJSON)return{};let e=t.validateJSON;return{async onCodePathStart(r){let i=await e(r.uri,r.source);if(i)for(let n of i)t.report(n)}}}}});var rC=T(od=>{"use strict";y();Object.defineProperty(od,"__esModule",{value:!0});od.ValidDocParamTypes=void 0;var eC=Y(),tC=Ya();od.ValidDocParamTypes={meta:{code:"ValidDocParamTypes",name:"Valid doc parameter types",docs:{description:"This check exists to ensure any parameter types defined in the `doc` tag are valid.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-doc-param-types"},type:eC.SourceCodeType.LiquidHtml,severity:eC.Severity.ERROR,schema:{},targets:[]},create(t){if(!t.themeDocset)return{};let e=t.themeDocset.liquidDrops().then(r=>new Set((0,tC.getValidParamTypes)(r).keys()));return{async LiquidDocParamNode(r){!r.paramType||(0,tC.parseParamType)(await e,r.paramType.value)||t.report({message:`The parameter type '${r.paramType.value}' is not supported.`,startIndex:r.paramType.position.start-1,endIndex:r.paramType.position.end+1,suggest:[{message:"Remove invalid parameter type",fix:n=>{r.paramType&&n.replace(r.position.start,r.position.end,r.source.slice(r.position.start,r.position.end).replace(/\s*\{\s*[^\s]+\s*\}\s*/," "))}}]})}}}}});var nC=T(ud=>{"use strict";y();Object.defineProperty(ud,"__esModule",{value:!0});ud.getBlocks=$z;ud.reportWarning=Uz;var iC=ze();function $z(t){let e=[],r=[],i=[],n=t.blocks,s=t.presets;function a(o,u,l=!1){if(!o)return;let f="static"in o,h="name"in o;f?e.push({node:o,path:u.concat("type")}):h&&!l?r.push({node:o,path:u.concat("type")}):o.type!=="@app"&&i.push({node:o,path:u.concat("type")}),"blocks"in o&&(Array.isArray(o.blocks)?o.blocks.forEach((p,m)=>{a(p,u.concat("blocks",String(m)),l)}):typeof o.blocks=="object"&&o.blocks!==null&&Object.entries(o.blocks).forEach(([p,m])=>{a(m,u.concat("blocks",p),l)}))}return Array.isArray(n)&&n.forEach((o,u)=>{a(o,["blocks",String(u)])}),s&&s.forEach((o,u)=>{"blocks"in o&&o.blocks&&(Array.isArray(o.blocks)?o.blocks.forEach((l,f)=>{a(l,["presets",String(u),"blocks",String(f)],!0)}):typeof o.blocks=="object"&&Object.entries(o.blocks).forEach(([l,f])=>{a(f,["presets",String(u),"blocks",l],!0)}))}),{staticBlockLocations:e,localBlockLocations:r,themeBlockLocations:i,hasRootLevelThemeBlocks:i.some(o=>o.path[0]==="blocks")}}function Uz(t,e,r,i){i.report({message:t,startIndex:e+(0,iC.getLocStart)(r),endIndex:e+(0,iC.getLocEnd)(r)})}});var oC=T(ld=>{"use strict";y();Object.defineProperty(ld,"__esModule",{value:!0});ld.ValidLocalBlocks=void 0;var sC=Y(),Jb=ze(),Hz=xt(),aC=xt(),cd=nC();ld.ValidLocalBlocks={meta:{code:"ValidLocalBlocks",name:"Prevent mixing static and local blocks in non-theme sections",docs:{description:"Ensures sections without theme block support do not mix static and local blocks",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-local-blocks"},type:sC.SourceCodeType.LiquidHtml,severity:sC.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.blockStartPosition.end,i=await(0,Hz.getSchema)(t),{validSchema:n,ast:s}=i??{};if(!n||n instanceof Error||!s||s instanceof Error||!i)return;let{staticBlockLocations:a,localBlockLocations:o,themeBlockLocations:u,hasRootLevelThemeBlocks:l}=(0,cd.getBlocks)(n);(0,aC.isSection)(t.file.uri)&&(a.length>0&&o.length>0&&a.forEach(f=>{let h=(0,Jb.nodeAtPath)(s,f.path);(0,cd.reportWarning)("Sections cannot use static theme blocks together with locally scoped blocks.",r,h,t)}),l&&o.length>0&&u.length>0&&o.forEach(f=>{let h=(0,Jb.nodeAtPath)(s,f.path);(0,cd.reportWarning)("Sections cannot use theme blocks together with locally scoped blocks.",r,h,t)})),(0,aC.isBlock)(t.file.uri)&&o.length>0&&o.forEach(f=>{let h=(0,Jb.nodeAtPath)(s,f.path);(0,cd.reportWarning)("Local scoped blocks are not supported in theme blocks.",r,h,t)})}}}}});var lC=T(fd=>{"use strict";y();Object.defineProperty(fd,"__esModule",{value:!0});fd.ValidRenderSnippetArgumentTypes=void 0;var uC=Y(),Gz=ge(),cC=Ya(),sc=Ri();fd.ValidRenderSnippetArgumentTypes={meta:{code:"ValidRenderSnippetArgumentTypes",name:"Valid Render Snippet Argument Types",aliases:["ValidRenderSnippetParamTypes"],docs:{description:"This check ensures that arguments passed to snippet match the expected types defined in the liquidDoc header if present.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-render-snippet-argument-types"},type:uC.SourceCodeType.LiquidHtml,severity:uC.Severity.WARNING,schema:{},targets:[]},create(t){function e(r,i){if(r.alias&&r.variable?.name&&r.variable.name.type!==Gz.NodeTypes.VariableLookup){let n=i.get(r.alias.value)?.type?.toLowerCase();if(n){let s=(0,cC.inferArgumentType)(r.variable.name);if(!(0,cC.isTypeCompatible)(n,s)){let a=(0,sc.generateTypeMismatchSuggestions)(n,r.variable.name.position.start,r.variable.name.position.end);t.report({message:`Type mismatch for argument '${r.alias.value}': expected ${n}, got ${s}`,startIndex:r.variable.name.position.start,endIndex:r.variable.name.position.end,suggest:a})}}}}return{async RenderMarkup(r){let i=(0,sc.getSnippetName)(r);if(!i)return;let n=await(0,sc.getLiquidDocParams)(t,`snippets/${i}.liquid`);if(!n)return;e(r,n);let s=(0,sc.findTypeMismatchParams)(n,r.args);(0,sc.reportTypeMismatches)(t,s,n)}}}}});var pC=T(pd=>{"use strict";y();Object.defineProperty(pd,"__esModule",{value:!0});pd.ValidSchema=void 0;var fC=Y();pd.ValidSchema={meta:{code:"ValidSchema",name:"Prevent invalid JSON in {% schema %} tags",docs:{description:"This check is aimed at eliminating JSON errors in schema tags.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-schema"},type:fC.SourceCodeType.LiquidHtml,severity:fC.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json"||!t.validateJSON)return;let r=e.source.slice(e.blockStartPosition.end,e.blockEndPosition.start),i=await t.validateJSON(t.file.uri,r);if(i)for(let n of i)t.report({message:n.message,startIndex:e.blockStartPosition.end+n.startIndex,endIndex:e.blockStartPosition.end+n.endIndex})}}}}});var mC=T(hd=>{"use strict";y();Object.defineProperty(hd,"__esModule",{value:!0});hd.ValidSchemaName=void 0;var Kb=ze(),Wz=xt(),hC=Y(),zz=Ce(),dC=25;hd.ValidSchemaName={meta:{code:"ValidSchemaName",name:"Enforce valid schema name",docs:{description:"This check is aimed at ensuring a valid schema name.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-schema-name"},type:hC.SourceCodeType.LiquidHtml,severity:hC.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.blockStartPosition.end,i=await(0,Wz.getSchema)(t),{validSchema:n,ast:s}=i??{};if(!n||n instanceof Error||!s||s instanceof Error)return;let a=n.name;if(!a)return;let o=(0,Kb.nodeAtPath)(s,["name"]),u=r+(0,Kb.getLocStart)(o),l=r+(0,Kb.getLocEnd)(o);if(a.startsWith("t:")){let f=await t.getDefaultLocale(),h=a.replace("t:",""),p=await t.getDefaultSchemaTranslations(),m=(0,zz.deepGet)(p,h.split("."));m!==void 0&&m.length>dC&&t.report({message:`Schema name '${m}' from 'locales/${f}.default.schema.json' is too long (max 25 characters)`,startIndex:u,endIndex:l})}else a.length>dC&&t.report({message:`Schema name '${a}' is too long (max 25 characters)`,startIndex:u,endIndex:l})}}}}});var _C=T(dd=>{"use strict";y();Object.defineProperty(dd,"__esModule",{value:!0});dd.ValidSchemaTranslations=void 0;var gC=ze(),Jz=xt(),yC=Y(),Kz=Ce();dd.ValidSchemaTranslations={meta:{code:"ValidSchemaTranslations",name:"Reports missing translation keys in schema",docs:{description:"This check ensures all translation keys (t:) in schema have matching entries in the default schema translations file.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-schema-translations"},type:yC.SourceCodeType.LiquidHtml,severity:yC.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.blockStartPosition.end,i=await(0,Jz.getSchema)(t),{ast:n}=i??{};if(!n||n instanceof Error)return;let s=await t.getDefaultLocale(),a=await t.getDefaultSchemaTranslations(),o=Qb(n);for(let{value:u,node:l}of o){let f=u.replace("t:","");if((0,Kz.deepGet)(a,f.split("."))===void 0){let p=r+(0,gC.getLocStart)(l),m=r+(0,gC.getLocEnd)(l);t.report({message:`'${u}' does not have a matching entry in 'locales/${s}.default.schema.json'`,startIndex:p,endIndex:m})}}}}}};function Qb(t){let e=[];switch(t.type){case"Literal":{typeof t.value=="string"&&t.value.startsWith("t:")&&e.push({value:t.value,node:t});break}case"Object":{for(let r of t.children)e.push(...Qb(r.value));break}case"Array":{for(let r of t.children)e.push(...Qb(r));break}case"Property":case"Identifier":break}return e}});var xC=T(yd=>{"use strict";y();Object.defineProperty(yd,"__esModule",{value:!0});yd.ValidSettingsKey=void 0;var vC=Y(),md=ze(),bC=xt(),wC=Ce();yd.ValidSettingsKey={meta:{code:"ValidSettingsKey",name:"Validate settings key in presets",docs:{description:"Ensures settings key only references valid settings defined in its respective schema",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-settings-key"},type:vC.SourceCodeType.LiquidHtml,severity:vC.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=e.blockStartPosition.end,i=await(0,bC.getSchema)(t),{validSchema:n,ast:s}=i??{};if(!n||n instanceof Error||!s||s instanceof Error)return;let{rootLevelLocalBlocks:a,presetLevelBlocks:o}=(0,wC.getBlocks)(n);if(n.presets)for(let u=0;u<n.presets.length;u++){let l=(0,md.nodeAtPath)(s,["presets",u,"settings"]);gd(t,r,l,n.settings)}if((0,bC.isSectionSchema)(i)&&"default"in n&&n.default){let u=(0,md.nodeAtPath)(s,["default","settings"]);gd(t,r,u,n.settings),n.default.blocks?.forEach((l,f)=>{let h=(0,md.nodeAtPath)(s,["default","blocks",f,"settings"]);SC(t,r,h,a,l)})}for(let[u,l]of Object.entries(o))l.forEach(({node:f,path:h})=>{let p=(0,md.nodeAtPath)(s,h.slice(0,-1).concat("settings"));SC(t,r,p,a,f)})}}}};async function SC(t,e,r,i,n){if(i.length>0){let s=i.find(o=>o.node.type===n.type);if(!s)return;let a=s.node;gd(t,e,r,a.settings)}else{let s=await t.getBlockSchema?.(n.type),{validSchema:a}=s??{};if(!a||a instanceof Error)return;gd(t,e,r,a.settings,n)}}function gd(t,e,r,i,n){if(!(!r||r.type!=="Object")){for(let s of r.children)if(!i?.find(o=>o?.id===s.key.value)){let o=n?`Setting '${s.key.value}' does not exist in 'blocks/${n.type}.liquid'.`:`Setting '${s.key.value}' does not exist in schema.`;(0,wC.reportWarning)(o,e,s.key,t)}}}});var IC=T(_d=>{"use strict";y();Object.defineProperty(_d,"__esModule",{value:!0});_d.ValidStaticBlockType=void 0;var Qz=ge(),kC=Y(),Yz=ki(),Xz=Nh();_d.ValidStaticBlockType={meta:{code:"ValidStaticBlockType",name:"Prevent use of type that is not valid for static blocks",docs:{description:"This check is aimed at preventing the use of an invalid type for blocks rendered statically.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-static-block-type",recommended:!0},type:kC.SourceCodeType.LiquidHtml,severity:kC.Severity.ERROR,schema:{},targets:[]},create(t){return{async LiquidTag(e){if(e.name!=="content_for"||!(0,Xz.isContentForBlock)(e.markup))return;let r=e.markup.args.find(o=>o.name==="type");if(!r)return;let i=r.value;if(i.type!==Qz.NodeTypes.String)return;let n=i.value,s=`blocks/${n}.liquid`;await(0,Yz.doesFileExist)(t,s)||t.report({message:`'blocks/${n}.liquid' does not exist`,startIndex:i.position.start,endIndex:i.position.end,suggest:[]})}}}}});var AC=T(Gt=>{"use strict";y();Object.defineProperty(Gt,"__esModule",{value:!0});Gt.offsetAdjust=Gt.adjustedSuffix=Gt.adjustedPrefix=Gt.variableExpressionMatcher=void 0;Gt.getVariableLookupsInExpression=tJ;Gt.validateLookup=rJ;Gt.getGlobalSettings=nJ;var Yb=ge(),Zz=ze(),eJ=kn();Gt.variableExpressionMatcher=/{{(.+?)}}/;Gt.adjustedPrefix="{% if ";Gt.adjustedSuffix=" %}{% endif %}";Gt.offsetAdjust=2-Gt.adjustedPrefix.length;function tJ(t){let e=Gt.variableExpressionMatcher.exec(t);if(e==null)return{warning:'Invalid visible_if expression. It should take the form "{{ <expression> }}".'};let r=e[1],i=`${Gt.adjustedPrefix}${r}${Gt.adjustedSuffix}`;try{let n=(0,Yb.toLiquidHtmlAST)(i,{mode:"strict",allowUnclosedDocumentNode:!1});if(n.children.length!==1)throw new Error("Unexpected child count for DocumentNode");let s=n.children[0];if(s.type!=="LiquidTag"||s.name!=="if")throw new Error("Expected DocumentNode to contain 'if' tag");let a=s.markup;if(typeof a=="string")return{warning:"Invalid visible_if expression."};if(a.type===Yb.NodeTypes.LiquidLiteral&&["true","false"].includes(a.keyword))return null;let o=(0,eJ.visit)(s,{VariableLookup:u=>u});return o.length===0?{warning:"visible_if expression contains no references to any settings. This is likely an error."}:o}catch(n){return n instanceof SyntaxError?{warning:"Syntax error: cannot parse visible_if expression."}:{warning:String(n)}}}function rJ(t,e){let r=iJ(t),i=[],n=e;for(;r.length>0;){let s=r.shift();i.push(s);let a=n[s];if(!a)return`Invalid variable: "${i.join(".")}" was not found.`;if(typeof a=="boolean")return r.length>0?`Invalid variable: "${i.join(".")}" refers to a variable, but is being used here as a namespace.`:null;n=a}return`Invalid variable: "${i.join(".")}" refers to a namespace, but is being used here as a variable.`}function iJ(t){let e=t.lookups.map(r=>{if(r.type!==Yb.NodeTypes.String)throw new Error(`Expected lookups to be String nodes: ${JSON.stringify(r)}`);return r.value});return[t.name,...e]}async function nJ(t){let e=[];try{let r=t.toUri("config/settings_schema.json"),i=await t.fs.readFile(r),n=(0,Zz.parseJSON)(i);if(Array.isArray(n))for(let s of n)"settings"in s&&Array.isArray(s.settings)&&e.push(...s.settings.map(a=>a.id).filter(a=>a))}catch(r){console.error("Error fetching global settings:",r)}return e}});var EC=T(so=>{"use strict";y();Object.defineProperty(so,"__esModule",{value:!0});so.ValidVisibleIfSettingsSchema=so.ValidVisibleIf=void 0;var Zb=Y(),Xb=ze(),no=xt(),sJ=Ce(),Di=AC(),TC={code:"ValidVisibleIf",name:"Validate visible_if expressions",docs:{description:"Ensures visible_if expressions are well-formed and only reference settings keys that are defined",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-visible-if"},severity:Zb.Severity.ERROR,schema:{},targets:[]};so.ValidVisibleIf={meta:{...TC,type:Zb.SourceCodeType.LiquidHtml},create(t){return{async LiquidRawTag(e){if(e.name!=="schema"||e.body.kind!=="json")return;let r=await(0,no.getSchema)(t),{validSchema:i,ast:n}=r??{};if(!i||i instanceof Error||!i.settings?.some(l=>"visible_if"in l)||!n||n instanceof Error)return;let s=e.blockStartPosition.end,a=Object.fromEntries((await(0,Di.getGlobalSettings)(t)).map(l=>[l,!0])),o=Object.fromEntries(i.settings.map(l=>[l.id,!0])),u={settings:a};(0,no.isSectionSchema)(r)?u.section={settings:o}:(0,no.isBlockSchema)(r)&&(u.block={settings:o});for(let[l,f]of i.settings.entries()){if(!("visible_if"in f)||typeof f.visible_if!="string")continue;let h=(0,Xb.nodeAtPath)(n,["settings",l,"visible_if"]),p=(0,Di.getVariableLookupsInExpression)(f.visible_if);if(p===null)continue;if("warning"in p){(0,sJ.reportWarning)(p.warning,s,h,t);continue}let m=(v,S)=>{typeof v=="string"&&t.report({message:v,startIndex:s+(0,Xb.getLocStart)(h)+S.position.start+Di.offsetAdjust+1,endIndex:s+(0,Xb.getLocStart)(h)+S.position.end+Di.offsetAdjust+1})};for(let v of p)v.name==="section"&&(0,no.isBlockSchema)(r)||(v.name==="section"&&!(0,no.isSectionSchema)(r)?m(`Invalid visible_if: can't refer to "section" when not in a section or block file.`,v):v.name==="block"&&!(0,no.isBlockSchema)(r)?m(`Invalid visible_if: can't refer to "block" when not in a block file.`,v):m((0,Di.validateLookup)(v,u),v))}}}}};so.ValidVisibleIfSettingsSchema={meta:{...TC,type:Zb.SourceCodeType.JSON},create(t){return t.toRelativePath(t.file.uri)!=="config/settings_schema.json"?{}:{async Property(r){if(r.key.value!=="visible_if"||r.value.type!=="Literal")return;let i=r.value.value;if(typeof i!="string")return;let n=r.value.loc.start.offset,s=(0,Di.getVariableLookupsInExpression)(i);if(s===null)return;if("warning"in s){t.report({message:s.warning,startIndex:r.value.loc.start.offset,endIndex:r.value.loc.end.offset});return}let o={settings:Object.fromEntries((await(0,Di.getGlobalSettings)(t)).map(l=>[l,!0]))},u=(l,f)=>{typeof l=="string"&&t.report({message:l,startIndex:n+f.position.start+Di.offsetAdjust+1,endIndex:n+f.position.end+Di.offsetAdjust+1})};for(let l of s)l.name==="section"?u(`Invalid visible_if: can't refer to "section" when not in a section file.`,l):l.name==="block"?u(`Invalid visible_if: can't refer to "block" when not in a block file.`,l):u((0,Di.validateLookup)(l,o),l)}}}}});var NC=T(bd=>{"use strict";y();Object.defineProperty(bd,"__esModule",{value:!0});bd.VariableName=void 0;var aJ=ge(),e0=Y(),vd=Iw(),oJ=t=>{let e=(0,vd.camelCase)(t);return e.charAt(0).toUpperCase()+e.slice(1)},uJ=t=>t.name==="assign"&&typeof t.markup!="string",cJ=t=>t.type==aJ.NodeTypes.LiquidTag&&t.name==="capture"&&typeof t.markup!="string",lJ={camelCase:vd.camelCase,PascalCase:oJ,snake_case:vd.snakeCase,"kebab-case":vd.kebabCase},fJ={format:e0.SchemaProp.string("snake_case")},OC=t=>t.replace(/[-_]?\d[-_]?/g,"");bd.VariableName={meta:{code:"VariableName",name:"Invalid variable naming format",docs:{description:"This check is aimed at using certain variable naming conventions",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/variable-name",recommended:!0},type:e0.SourceCodeType.LiquidHtml,severity:e0.Severity.WARNING,schema:fJ,targets:[]},create(t){let e=i=>{if(!i.markup.name)return{valid:!1};let n=lJ[t.settings.format],s=n(i.markup.name);return{valid:OC(i.markup.name)===OC(s),suggestion:s}},r=i=>t.report({message:`The variable '${i.markup.name}' uses wrong naming format`,startIndex:i.markup.position.start,endIndex:i.markup.position.end,suggest:[{message:`Change variable '${i.markup.name}' to '${e(i).suggestion}'`,fix:n=>{let{position:s,name:a,source:o}=i.markup;return n.replace(s.start,s.end,o.slice(s.start,s.end).replace(a,e(i).suggestion))}}]});return{async LiquidTag(i){(uJ(i)||cJ(i)&&i.markup.name)&&(e(i).valid||r(i))}}}}});var LC=T(Sd=>{"use strict";y();Object.defineProperty(Sd,"__esModule",{value:!0});Sd.AppBlockMissingSchema=void 0;var t0=Y();Sd.AppBlockMissingSchema={meta:{code:"AppBlockMissingSchema",name:"Missing schema definitions in theme app extensions app blocks should be avoided",docs:{description:"Report missing schema definitions in theme app extensions app blocks",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/app-block-missing-schema"},severity:t0.Severity.ERROR,type:t0.SourceCodeType.LiquidHtml,schema:{},targets:[t0.ConfigTarget.ThemeAppExtension]},create(t){let e=!1;return t.toRelativePath(t.file.uri).startsWith("blocks/")?{async LiquidRawTag(i){i.name=="schema"&&(e=!0)},async onCodePathEnd(){e||t.report({message:"The schema does not exist",startIndex:0,endIndex:0})}}:{}}}});var PC=T(wd=>{"use strict";y();Object.defineProperty(wd,"__esModule",{value:!0});wd.UniqueSettingIds=void 0;var Ln=Y();wd.UniqueSettingIds={meta:{code:"UniqueSettingId",name:"Prevent duplicate Ids in setting_schema",docs:{description:"This check is aimed at eliminating duplicate Ids in settings_schema.json",recommended:!0},type:Ln.SourceCodeType.JSON,severity:Ln.Severity.ERROR,schema:{},targets:[]},create(t){return{async onCodePathEnd(e){if((0,Ln.isArrayNode)(e.ast)){let r=[];for(let s of e.ast.children)if((0,Ln.isObjectNode)(s)&&s.children){let a=s.children.find(o=>o.key.value==="settings");if(a&&a.value&&(0,Ln.isArrayNode)(a.value)){for(let o of a.value.children)if((0,Ln.isObjectNode)(o)&&o.children){let u=o.children.find(l=>l.key.value==="id");(0,Ln.isPropertyNode)(u)&&r.push(u)}}}let i=new Map;for(let s of r)if((0,Ln.isLiteralNode)(s.value)){let a=s.value.value;typeof a=="string"&&(i.has(a)||i.set(a,[]),i.get(a).push(s))}let n=Array.from(i.entries()).filter(([s,a])=>a.length>1);if(n.length>0)for(let[s,a]of n){let o=a[a.length-1];t.report({message:`Duplicate setting id found: "${s}"`,startIndex:o.loc.start.offset,endIndex:o.loc.end.offset})}}}}}}});var CC=T(Ms=>{"use strict";y();Object.defineProperty(Ms,"__esModule",{value:!0});Ms.recommended=Ms.allChecks=void 0;var pJ=Y(),hJ=SN(),dJ=kN(),mJ=AN(),gJ=EN(),yJ=NN(),_J=PN(),vJ=MN(),bJ=FN(),SJ=VN(),wJ=UN(),xJ=GN(),kJ=XN(),IJ=nL(),AJ=oL(),TJ=cL(),EJ=fL(),OJ=_L(),NJ=SL(),LJ=xL(),PJ=TL(),qJ=OL(),CJ=RL(),RJ=DL(),MJ=BL(),DJ=_P(),FJ=SP(),jJ=xP(),BJ=IP(),VJ=TP(),$J=OP(),UJ=LP(),HJ=CP(),GJ=jP(),WJ=$P(),zJ=HP(),JJ=JP(),KJ=QP(),QJ=ZP(),YJ=tq(),XJ=nq(),ZJ=lq(),eK=_q(),tK=bq(),rK=xq(),iK=Iq(),nK=Tq(),sK=Oq(),aK=qq(),oK=Rq(),uK=Dq(),cK=jq(),lK=Vq(),fK=Uq(),pK=Wq(),hK=Kq(),dK=Yq(),mK=Zq(),gK=rC(),yK=oC(),_K=lC(),vK=pC(),bK=mC(),SK=_C(),wK=xC(),xK=IC(),qC=EC(),kK=NC(),IK=LC(),AK=PC();Ms.allChecks=[hJ.AppBlockValidTags,dJ.AssetPreload,mJ.AssetSizeAppBlockCSS,gJ.AssetSizeAppBlockJavaScript,yJ.AssetSizeCSS,_J.AssetSizeJavaScript,vJ.BlockIdUsage,bJ.CdnPreconnect,SJ.ContentForHeaderModification,wJ.DeprecateBgsizes,xJ.DeprecateLazysizes,kJ.DeprecatedFilter,IJ.DeprecatedFontsOnSectionsAndBlocks,AJ.DeprecatedFontsOnSettingsData,TJ.DeprecatedFontsOnSettingsSchema,EJ.DeprecatedTag,NJ.DuplicateContentForArguments,OJ.DuplicateRenderSnippetArguments,LJ.EmptyBlockContent,PJ.HardcodedRoutes,qJ.ImgWidthAndHeight,CJ.JSONMissingBlock,RJ.JSONSyntaxError,MJ.LiquidFreeSettings,DJ.LiquidHTMLSyntaxError,FJ.MatchingTranslations,jJ.MissingAsset,BJ.MissingContentForArguments,VJ.MissingRenderSnippetArguments,$J.MissingTemplate,uK.UnsupportedFilterArguments,IK.AppBlockMissingSchema,UJ.OrphanedSnippet,HJ.PaginationSize,GJ.ParserBlockingScript,WJ.SchemaPresetsBlockOrder,zJ.SchemaPresetsStaticBlocks,JJ.RemoteAsset,KJ.RequiredLayoutThemeObject,QJ.ReservedDocParamNames,YJ.StaticStylesheetAndJavascriptTags,XJ.TranslationKeyExists,ZJ.UnclosedHTMLElement,eK.UndefinedObject,tK.UniqueDocParamNames,AK.UniqueSettingIds,rK.UniqueStaticBlockId,iK.UnknownFilter,nK.UnrecognizedContentForArguments,sK.UnrecognizedRenderSnippetArguments,oK.UnsupportedDocTag,aK.UnusedAssign,cK.UnusedDocParam,pK.ValidBlockTarget,dK.ValidHTMLTranslation,lK.ValidContentForArguments,fK.ValidContentForArgumentTypes,hK.ValidScopedCSSClass,mK.ValidJSON,gK.ValidDocParamTypes,yK.ValidLocalBlocks,_K.ValidRenderSnippetArgumentTypes,vK.ValidSchema,wK.ValidSettingsKey,xK.ValidStaticBlockType,qC.ValidVisibleIf,qC.ValidVisibleIfSettingsSchema,kK.VariableName,bK.ValidSchemaName,SK.ValidSchemaTranslations];Ms.recommended=Ms.allChecks.filter(t=>{let e=t.meta.docs.recommended,r=!t.meta.targets||!t.meta.targets.length||t.meta.targets.includes(pJ.ConfigTarget.Recommended);return e&&r})});var FC=T(ln=>{"use strict";y();var TK=ln&&ln.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),EK=ln&&ln.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),OK=ln&&ln.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var i=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(i[i.length]=n);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i=t(e),n=0;n<i.length;n++)i[n]!=="default"&&TK(r,e,i[n]);return EK(r,e),r}})();Object.defineProperty(ln,"__esModule",{value:!0});ln.findRoot=DC;var Fr=OK(Is());async function NK(t,e){return LK(e(Fr.join(t,"shopify.extension.toml")),e(Fr.join(t,".theme-check.yml")),RC(e(Fr.join(t,".git")),e(Fr.join(t,"assets")),e(Fr.join(t,"snippets"))),RC(e(Fr.join(t,"assets")),e(Fr.join(t,"snippets")),MC(e(Fr.join(Fr.dirname(t),".theme-check.yml"))),MC(e(Fr.join(Fr.dirname(Fr.dirname(t)),".theme-check.yml")))))}async function RC(...t){return(await Promise.all(t)).reduce((r,i)=>r&&i,!0)}async function LK(...t){return(await Promise.all(t)).reduce((r,i)=>r||i,!1)}async function MC(t){return!await t}async function DC(t,e){if(await NK(t,e))return t;let i=Fr.dirname(t);return i===t?null:DC(i,e)}});var xd=T(r0=>{"use strict";y();Object.defineProperty(r0,"__esModule",{value:!0});r0.flattenFixes=jC;function jC(t){return Array.isArray(t)?t.flatMap(jC):[t]}});var VC=T(kd=>{"use strict";y();Object.defineProperty(kd,"__esModule",{value:!0});kd.JSONCorrector=void 0;var BC=Iw();function PK(t,e){switch(e.type){case"add":return(0,BC.set)(t,e.path,e.value);case"remove":return(0,BC.unset)(t,e.path),t}}var i0=class{source;patches=[];constructor(e){this.source=e}get fix(){if(this.patches.length===0)return[];let e=this.patches.reduce(PK,JSON.parse(this.source));return{startIndex:0,endIndex:this.source.length,insert:JSON.stringify(e,null,2)}}add(e,r){this.patches.push({type:"add",path:e,value:r})}replace(e,r){this.patches.push({type:"remove",path:e},{type:"add",path:e,value:r})}remove(e){this.patches.push({type:"remove",path:e})}};kd.JSONCorrector=i0});var $C=T(Id=>{"use strict";y();Object.defineProperty(Id,"__esModule",{value:!0});Id.StringCorrector=void 0;var n0=class{source;fix=[];constructor(e){this.source=e}insert(e,r){this.fix.push({startIndex:e,endIndex:e,insert:r})}replace(e,r,i){this.fix.push({startIndex:e,endIndex:r,insert:i})}remove(e,r){this.fix.push({startIndex:e,endIndex:r,insert:""})}};Id.StringCorrector=n0});var s0=T(Ds=>{"use strict";y();Object.defineProperty(Ds,"__esModule",{value:!0});Ds.StringCorrector=Ds.JSONCorrector=void 0;Ds.createCorrector=qK;var UC=Y(),HC=VC();Object.defineProperty(Ds,"JSONCorrector",{enumerable:!0,get:function(){return HC.JSONCorrector}});var GC=$C();Object.defineProperty(Ds,"StringCorrector",{enumerable:!0,get:function(){return GC.StringCorrector}});function qK(t,e){switch(t){case UC.SourceCodeType.JSON:return new HC.JSONCorrector(e);case UC.SourceCodeType.LiquidHtml:return new GC.StringCorrector(e);default:return CK(t)}}function CK(t){throw new Error(`Case statement not exhausted: ${t}`)}});var WC=T(a0=>{"use strict";y();Object.defineProperty(a0,"__esModule",{value:!0});a0.autofix=DK;var RK=s0(),MK=xd();async function DK(t,e,r){let i=e.filter(s=>"fix"in s&&!!s.fix),n=[];for(let s of t){let a=i.filter(u=>u.uri===s.uri);if(a.length===0)continue;let o=(0,RK.createCorrector)(s.type,s.source);for(let u of a)u.fix(o);n.push(r(s,(0,MK.flattenFixes)(o.fix)))}await Promise.all(n)}});var zC=T(o0=>{"use strict";y();Object.defineProperty(o0,"__esModule",{value:!0});o0.applyFixToString=jK;var FK=xd();function jK(t,e){let r=t,i=0,n=(0,FK.flattenFixes)(e).sort((s,a)=>s.startIndex-a.startIndex);for(let s=0;s<n.length-1;s++){let a=n[s],o=n[s+1];if(a.endIndex>o.startIndex)throw new Error("Overlapping ranges are not allowed")}for(let s of n){let a=s.startIndex+i,o=s.endIndex+i;if(a<0||a>r.length||o<a||o>r.length)throw new Error("Fix description is going overboard");r=r.slice(0,a)+s.insert+r.slice(o),i+=s.insert.length-(o-a)}return r}});var JC=T(Ir=>{"use strict";y();Object.defineProperty(Ir,"__esModule",{value:!0});Ir.applyFixToString=Ir.autofix=Ir.createCorrector=Ir.JSONCorrector=Ir.StringCorrector=Ir.flattenFixes=void 0;var BK=xd();Object.defineProperty(Ir,"flattenFixes",{enumerable:!0,get:function(){return BK.flattenFixes}});var u0=s0();Object.defineProperty(Ir,"StringCorrector",{enumerable:!0,get:function(){return u0.StringCorrector}});Object.defineProperty(Ir,"JSONCorrector",{enumerable:!0,get:function(){return u0.JSONCorrector}});Object.defineProperty(Ir,"createCorrector",{enumerable:!0,get:function(){return u0.createCorrector}});var VK=WC();Object.defineProperty(Ir,"autofix",{enumerable:!0,get:function(){return VK.autofix}});var $K=zC();Object.defineProperty(Ir,"applyFixToString",{enumerable:!0,get:function(){return $K.applyFixToString}})});var hr=T(Se=>{"use strict";y();var t2=Se&&Se.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),UK=Se&&Se.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),r2=Se&&Se.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var i=[];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(i[i.length]=n);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i=t(e),n=0;n<i.length;n++)i[n]!=="default"&&t2(r,e,i[n]);return UK(r,e),r}})(),rt=Se&&Se.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&t2(e,t,r)};Object.defineProperty(Se,"__esModule",{value:!0});Se.getBlockName=Se.path=void 0;Se.check=KK;var HK=hv(),GK=Wv(),Fs=Ip(),WK=dN(),KC=Xv(),QC=r2(Is()),c0=Y(),YC=Ce(),i2=bN();rt(zv(),Se);rt(hv(),Se);rt(CC(),Se);rt(Ip(),Se);rt(FC(),Se);rt(JC(),Se);rt(Xv(),Se);rt(ze(),Se);rt(Wv(),Se);Se.path=r2(Is());rt(xt(),Se);rt(Bf(),Se);rt(Y(),Se);rt(pl(),Se);rt(cg(),Se);rt(og(),Se);rt(sg(),Se);rt(tg(),Se);rt(Cf(),Se);rt($f(),Se);rt(kn(),Se);rt(Fb(),Se);var zK=Ri();Object.defineProperty(Se,"getBlockName",{enumerable:!0,get:function(){return zK.getBlockName}});rt(Ya(),Se);var JK=t=>{};async function KK(t,e,r){let i=[],n=[],{fs:s}=r,{rootUri:a}=e,o={...r,mode:e.context,fileExists:(0,Fs.makeFileExists)(s),fileSize:(0,Fs.makeFileSize)(s),getDefaultLocale:(0,Fs.makeGetDefaultLocale)(s,a),getDefaultTranslations:(0,Fs.makeGetDefaultTranslations)(s,t,a),getDefaultSchemaLocale:(0,Fs.makeGetDefaultSchemaLocale)(s,a),getDefaultSchemaTranslations:(0,Fs.makeGetDefaultSchemaTranslations)(s,t,a),getMetafieldDefinitions:r.getMetafieldDefinitions??(0,Fs.makeGetMetafieldDefinitions)(s)},{DisabledChecksVisitor:u,isDisabled:l}=(0,WK.createDisabledChecksModule)(),h=(await GK.JSONValidator.create(o.jsonValidationSet,e))?.validate;o.themeDocset&&!o.themeDocset.isAugmented&&(o.themeDocset=new HK.AugmentedThemeDocset(o.themeDocset));for(let m of Object.values(c0.SourceCodeType))switch(m){case c0.SourceCodeType.JSON:{let v=e2(m,t),S=XC(m,e.checks);for(let b of v)for(let g of S){if((0,KC.isIgnored)(b.uri,e,g))continue;let k=ZC(g,b,e,n,o,h);i.push(XK(k,b))}break}case c0.SourceCodeType.LiquidHtml:{let v=e2(m,t),S=[u,...XC(m,e.checks)];for(let b of v)for(let g of S){if((0,KC.isIgnored)(b.uri,e,g))continue;let k=ZC(g,b,e,n,o,h);i.push(ZK(k,b))}break}}let p=e.onError||JK;return await Promise.all(i.map(m=>m.catch(p))),n.filter(m=>!l(m))}function QK(t,e,r,i,n,s){let a=i.settings[t.meta.code];return{...n,validateJSON:s,settings:YK(a,t.meta.schema),toUri:o=>QC.join(i.rootUri,...o.split("/")),toRelativePath:o=>QC.relative(o,i.rootUri),report(o){r.push({type:t.meta.type,check:t.meta.code,message:o.message,uri:e.uri,severity:a?.severity??t.meta.severity,start:(0,YC.getPosition)(e.source,o.startIndex),end:(0,YC.getPosition)(e.source,o.endIndex),fix:o.fix,suggest:o.suggest})},file:e}}function YK(t,e){let r={};for(let[i,n]of Object.entries(e))r[i]=t?.[i]??n.defaultValue();return r}function XC(t,e){return e.filter(r=>r.meta.type===t)}function ZC(t,e,r,i,n,s){let a=QK(t,e,i,r,n,s);return t.create(a)}function e2(t,e){return e.filter(r=>r.type===t)}async function XK(t,e){t.onCodePathStart&&await t.onCodePathStart(e),!(e.ast instanceof Error)&&(Object.keys(t).length>0&&await(0,i2.visitJSON)(e.ast,t),t.onCodePathEnd&&await t.onCodePathEnd(e))}async function ZK(t,e){t.onCodePathStart&&await t.onCodePathStart(e),!(e.ast instanceof Error)&&(Object.keys(t).length>0&&await(0,i2.visitLiquid)(e.ast,t),t.onCodePathEnd&&await t.onCodePathEnd(e))}});var s2=T((Ad,n2)=>{y();(function(t,e){typeof Ad=="object"&&typeof n2<"u"?e(Ad):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.acorn={}))})(Ad,(function(t){"use strict";var e=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],r=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],i="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",n="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",s={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},a="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",o={5:a,"5module":a+" export import",6:a+" const class extends export import super"},u=/^in(stanceof)?$/,l=new RegExp("["+n+"]"),f=new RegExp("["+n+i+"]");function h(c,d){for(var x=65536,I=0;I<d.length;I+=2){if(x+=d[I],x>c)return!1;if(x+=d[I+1],x>=c)return!0}return!1}function p(c,d){return c<65?c===36:c<91?!0:c<97?c===95:c<123?!0:c<=65535?c>=170&&l.test(String.fromCharCode(c)):d===!1?!1:h(c,r)}function m(c,d){return c<48?c===36:c<58?!0:c<65?!1:c<91?!0:c<97?c===95:c<123?!0:c<=65535?c>=170&&f.test(String.fromCharCode(c)):d===!1?!1:h(c,r)||h(c,e)}var v=function(d,x){x===void 0&&(x={}),this.label=d,this.keyword=x.keyword,this.beforeExpr=!!x.beforeExpr,this.startsExpr=!!x.startsExpr,this.isLoop=!!x.isLoop,this.isAssign=!!x.isAssign,this.prefix=!!x.prefix,this.postfix=!!x.postfix,this.binop=x.binop||null,this.updateContext=null};function S(c,d){return new v(c,{beforeExpr:!0,binop:d})}var b={beforeExpr:!0},g={startsExpr:!0},k={};function w(c,d){return d===void 0&&(d={}),d.keyword=c,k[c]=new v(c,d)}var _={num:new v("num",g),regexp:new v("regexp",g),string:new v("string",g),name:new v("name",g),privateId:new v("privateId",g),eof:new v("eof"),bracketL:new v("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new v("]"),braceL:new v("{",{beforeExpr:!0,startsExpr:!0}),braceR:new v("}"),parenL:new v("(",{beforeExpr:!0,startsExpr:!0}),parenR:new v(")"),comma:new v(",",b),semi:new v(";",b),colon:new v(":",b),dot:new v("."),question:new v("?",b),questionDot:new v("?."),arrow:new v("=>",b),template:new v("template"),invalidTemplate:new v("invalidTemplate"),ellipsis:new v("...",b),backQuote:new v("`",g),dollarBraceL:new v("${",{beforeExpr:!0,startsExpr:!0}),eq:new v("=",{beforeExpr:!0,isAssign:!0}),assign:new v("_=",{beforeExpr:!0,isAssign:!0}),incDec:new v("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new v("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:S("||",1),logicalAND:S("&&",2),bitwiseOR:S("|",3),bitwiseXOR:S("^",4),bitwiseAND:S("&",5),equality:S("==/!=/===/!==",6),relational:S("</>/<=/>=",7),bitShift:S("<</>>/>>>",8),plusMin:new v("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:S("%",10),star:S("*",10),slash:S("/",10),starstar:new v("**",{beforeExpr:!0}),coalesce:S("??",1),_break:w("break"),_case:w("case",b),_catch:w("catch"),_continue:w("continue"),_debugger:w("debugger"),_default:w("default",b),_do:w("do",{isLoop:!0,beforeExpr:!0}),_else:w("else",b),_finally:w("finally"),_for:w("for",{isLoop:!0}),_function:w("function",g),_if:w("if"),_return:w("return",b),_switch:w("switch"),_throw:w("throw",b),_try:w("try"),_var:w("var"),_const:w("const"),_while:w("while",{isLoop:!0}),_with:w("with"),_new:w("new",{beforeExpr:!0,startsExpr:!0}),_this:w("this",g),_super:w("super",g),_class:w("class",g),_extends:w("extends",b),_export:w("export"),_import:w("import",g),_null:w("null",g),_true:w("true",g),_false:w("false",g),_in:w("in",{beforeExpr:!0,binop:7}),_instanceof:w("instanceof",{beforeExpr:!0,binop:7}),_typeof:w("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:w("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:w("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},A=/\r\n?|\n|\u2028|\u2029/,E=new RegExp(A.source,"g");function O(c){return c===10||c===13||c===8232||c===8233}function L(c,d,x){x===void 0&&(x=c.length);for(var I=d;I<x;I++){var N=c.charCodeAt(I);if(O(N))return I<x-1&&N===13&&c.charCodeAt(I+1)===10?I+2:I+1}return-1}var B=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,R=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,q=Object.prototype,P=q.hasOwnProperty,$=q.toString,V=Object.hasOwn||(function(c,d){return P.call(c,d)}),C=Array.isArray||(function(c){return $.call(c)==="[object Array]"}),F=Object.create(null);function U(c){return F[c]||(F[c]=new RegExp("^(?:"+c.replace(/ /g,"|")+")$"))}function W(c){return c<=65535?String.fromCharCode(c):(c-=65536,String.fromCharCode((c>>10)+55296,(c&1023)+56320))}var Q=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,K=function(d,x){this.line=d,this.column=x};K.prototype.offset=function(d){return new K(this.line,this.column+d)};var pe=function(d,x,I){this.start=x,this.end=I,d.sourceFile!==null&&(this.source=d.sourceFile)};function ye(c,d){for(var x=1,I=0;;){var N=L(c,I,d);if(N<0)return new K(x,d-I);++x,I=N}}var nt={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},qe=!1;function Si(c){var d={};for(var x in nt)d[x]=c&&V(c,x)?c[x]:nt[x];if(d.ecmaVersion==="latest"?d.ecmaVersion=1e8:d.ecmaVersion==null?(!qe&&typeof console=="object"&&console.warn&&(qe=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
1199
|
-
Defaulting to 2020, but this will stop working in the future.`)),d.ecmaVersion=11):d.ecmaVersion>=2015&&(d.ecmaVersion-=2009),d.allowReserved==null&&(d.allowReserved=d.ecmaVersion<5),(!c||c.allowHashBang==null)&&(d.allowHashBang=d.ecmaVersion>=14),C(d.onToken)){var I=d.onToken;d.onToken=function(N){return I.push(N)}}if(C(d.onComment)&&(d.onComment=Xn(d,d.onComment)),d.sourceType==="commonjs"&&d.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return d}function Xn(c,d){return function(x,I,N,M,j,H){var J={type:x?"Block":"Line",value:I,start:N,end:M};c.locations&&(J.loc=new pe(this,j,H)),c.ranges&&(J.range=[N,M]),d.push(J)}}var Zn=1,es=2,Hm=4,$1=8,Gm=16,U1=32,tl=64,H1=128,ts=256,Eo=512,G1=1024,rl=Zn|es|ts;function Wm(c,d){return es|(c?Hm:0)|(d?$1:0)}var il=0,zm=1,$i=2,W1=3,z1=4,J1=5,Xe=function(d,x,I){this.options=d=Si(d),this.sourceFile=d.sourceFile,this.keywords=U(o[d.ecmaVersion>=6?6:d.sourceType==="module"?"5module":5]);var N="";d.allowReserved!==!0&&(N=s[d.ecmaVersion>=6?6:d.ecmaVersion===5?5:3],d.sourceType==="module"&&(N+=" await")),this.reservedWords=U(N);var M=(N?N+" ":"")+s.strict;this.reservedWordsStrict=U(M),this.reservedWordsStrictBind=U(M+" "+s.strictBind),this.input=String(x),this.containsEsc=!1,I?(this.pos=I,this.lineStart=this.input.lastIndexOf(`
|
|
1200
|
-
`,I-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(A).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=_.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=d.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&d.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?es:Zn),this.regexpState=null,this.privateNameStack=[]},$r={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};Xe.prototype.parse=function(){var d=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(d)},$r.inFunction.get=function(){return(this.currentVarScope().flags&es)>0},$r.inGenerator.get=function(){return(this.currentVarScope().flags&$1)>0},$r.inAsync.get=function(){return(this.currentVarScope().flags&Hm)>0},$r.canAwait.get=function(){for(var c=this.scopeStack.length-1;c>=0;c--){var d=this.scopeStack[c],x=d.flags;if(x&(ts|Eo))return!1;if(x&es)return(x&Hm)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},$r.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Zn)},$r.allowSuper.get=function(){var c=this.currentThisScope(),d=c.flags;return(d&tl)>0||this.options.allowSuperOutsideMethod},$r.allowDirectSuper.get=function(){return(this.currentThisScope().flags&H1)>0},$r.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},$r.allowNewDotTarget.get=function(){for(var c=this.scopeStack.length-1;c>=0;c--){var d=this.scopeStack[c],x=d.flags;if(x&(ts|Eo)||x&es&&!(x&Gm))return!0}return!1},$r.allowUsing.get=function(){var c=this.currentScope(),d=c.flags;return!(d&G1||!this.inModule&&d&Zn)},$r.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&ts)>0},Xe.extend=function(){for(var d=[],x=arguments.length;x--;)d[x]=arguments[x];for(var I=this,N=0;N<d.length;N++)I=d[N](I);return I},Xe.parse=function(d,x){return new this(x,d).parse()},Xe.parseExpressionAt=function(d,x,I){var N=new this(I,d,x);return N.nextToken(),N.parseExpression()},Xe.tokenizer=function(d,x){return new this(x,d)},Object.defineProperties(Xe.prototype,$r);var nr=Xe.prototype,DF=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;nr.strictDirective=function(c){if(this.options.ecmaVersion<5)return!1;for(;;){R.lastIndex=c,c+=R.exec(this.input)[0].length;var d=DF.exec(this.input.slice(c));if(!d)return!1;if((d[1]||d[2])==="use strict"){R.lastIndex=c+d[0].length;var x=R.exec(this.input),I=x.index+x[0].length,N=this.input.charAt(I);return N===";"||N==="}"||A.test(x[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(N)||N==="!"&&this.input.charAt(I+1)==="=")}c+=d[0].length,R.lastIndex=c,c+=R.exec(this.input)[0].length,this.input[c]===";"&&c++}},nr.eat=function(c){return this.type===c?(this.next(),!0):!1},nr.isContextual=function(c){return this.type===_.name&&this.value===c&&!this.containsEsc},nr.eatContextual=function(c){return this.isContextual(c)?(this.next(),!0):!1},nr.expectContextual=function(c){this.eatContextual(c)||this.unexpected()},nr.canInsertSemicolon=function(){return this.type===_.eof||this.type===_.braceR||A.test(this.input.slice(this.lastTokEnd,this.start))},nr.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},nr.semicolon=function(){!this.eat(_.semi)&&!this.insertSemicolon()&&this.unexpected()},nr.afterTrailingComma=function(c,d){if(this.type===c)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),d||this.next(),!0},nr.expect=function(c){this.eat(c)||this.unexpected()},nr.unexpected=function(c){this.raise(c??this.start,"Unexpected token")};var nl=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};nr.checkPatternErrors=function(c,d){if(c){c.trailingComma>-1&&this.raiseRecoverable(c.trailingComma,"Comma is not permitted after the rest element");var x=d?c.parenthesizedAssign:c.parenthesizedBind;x>-1&&this.raiseRecoverable(x,d?"Assigning to rvalue":"Parenthesized pattern")}},nr.checkExpressionErrors=function(c,d){if(!c)return!1;var x=c.shorthandAssign,I=c.doubleProto;if(!d)return x>=0||I>=0;x>=0&&this.raise(x,"Shorthand property assignments are valid only in destructuring patterns"),I>=0&&this.raiseRecoverable(I,"Redefinition of __proto__ property")},nr.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},nr.isSimpleAssignTarget=function(c){return c.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(c.expression):c.type==="Identifier"||c.type==="MemberExpression"};var ie=Xe.prototype;ie.parseTopLevel=function(c){var d=Object.create(null);for(c.body||(c.body=[]);this.type!==_.eof;){var x=this.parseStatement(null,!0,d);c.body.push(x)}if(this.inModule)for(var I=0,N=Object.keys(this.undefinedExports);I<N.length;I+=1){var M=N[I];this.raiseRecoverable(this.undefinedExports[M].start,"Export '"+M+"' is not defined")}return this.adaptDirectivePrologue(c.body),this.next(),c.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(c,"Program")};var Jm={kind:"loop"},FF={kind:"switch"};ie.isLet=function(c){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;R.lastIndex=this.pos;var d=R.exec(this.input),x=this.pos+d[0].length,I=this.fullCharCodeAt(x);if(I===91||I===92)return!0;if(c)return!1;if(I===123)return!0;if(p(I)){var N=x;do x+=I<=65535?1:2;while(m(I=this.fullCharCodeAt(x)));if(I===92)return!0;var M=this.input.slice(N,x);if(!u.test(M))return!0}return!1},ie.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;R.lastIndex=this.pos;var c=R.exec(this.input),d=this.pos+c[0].length,x;return!A.test(this.input.slice(this.pos,d))&&this.input.slice(d,d+8)==="function"&&(d+8===this.input.length||!(m(x=this.fullCharCodeAt(d+8))||x===92))},ie.isUsingKeyword=function(c,d){if(this.options.ecmaVersion<17||!this.isContextual(c?"await":"using"))return!1;R.lastIndex=this.pos;var x=R.exec(this.input),I=this.pos+x[0].length;if(A.test(this.input.slice(this.pos,I)))return!1;if(c){var N=I+5,M;if(this.input.slice(I,N)!=="using"||N===this.input.length||m(M=this.fullCharCodeAt(N))||M===92)return!1;R.lastIndex=N;var j=R.exec(this.input);if(I=N+j[0].length,j&&A.test(this.input.slice(N,I)))return!1}var H=this.fullCharCodeAt(I);if(!p(H)&&H!==92)return!1;var J=I;do I+=H<=65535?1:2;while(m(H=this.fullCharCodeAt(I)));if(H===92)return!0;var ue=this.input.slice(J,I);return!(u.test(ue)||d&&ue==="of")},ie.isAwaitUsing=function(c){return this.isUsingKeyword(!0,c)},ie.isUsing=function(c){return this.isUsingKeyword(!1,c)},ie.parseStatement=function(c,d,x){var I=this.type,N=this.startNode(),M;switch(this.isLet(c)&&(I=_._var,M="let"),I){case _._break:case _._continue:return this.parseBreakContinueStatement(N,I.keyword);case _._debugger:return this.parseDebuggerStatement(N);case _._do:return this.parseDoStatement(N);case _._for:return this.parseForStatement(N);case _._function:return c&&(this.strict||c!=="if"&&c!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(N,!1,!c);case _._class:return c&&this.unexpected(),this.parseClass(N,!0);case _._if:return this.parseIfStatement(N);case _._return:return this.parseReturnStatement(N);case _._switch:return this.parseSwitchStatement(N);case _._throw:return this.parseThrowStatement(N);case _._try:return this.parseTryStatement(N);case _._const:case _._var:return M=M||this.value,c&&M!=="var"&&this.unexpected(),this.parseVarStatement(N,M);case _._while:return this.parseWhileStatement(N);case _._with:return this.parseWithStatement(N);case _.braceL:return this.parseBlock(!0,N);case _.semi:return this.parseEmptyStatement(N);case _._export:case _._import:if(this.options.ecmaVersion>10&&I===_._import){R.lastIndex=this.pos;var j=R.exec(this.input),H=this.pos+j[0].length,J=this.input.charCodeAt(H);if(J===40||J===46)return this.parseExpressionStatement(N,this.parseExpression())}return this.options.allowImportExportEverywhere||(d||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),I===_._import?this.parseImport(N):this.parseExport(N,x);default:if(this.isAsyncFunction())return c&&this.unexpected(),this.next(),this.parseFunctionStatement(N,!0,!c);var ue=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(ue)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),ue==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(N,!1,ue),this.semicolon(),this.finishNode(N,"VariableDeclaration");var _e=this.value,Ve=this.parseExpression();return I===_.name&&Ve.type==="Identifier"&&this.eat(_.colon)?this.parseLabeledStatement(N,_e,Ve,c):this.parseExpressionStatement(N,Ve)}},ie.parseBreakContinueStatement=function(c,d){var x=d==="break";this.next(),this.eat(_.semi)||this.insertSemicolon()?c.label=null:this.type!==_.name?this.unexpected():(c.label=this.parseIdent(),this.semicolon());for(var I=0;I<this.labels.length;++I){var N=this.labels[I];if((c.label==null||N.name===c.label.name)&&(N.kind!=null&&(x||N.kind==="loop")||c.label&&x))break}return I===this.labels.length&&this.raise(c.start,"Unsyntactic "+d),this.finishNode(c,x?"BreakStatement":"ContinueStatement")},ie.parseDebuggerStatement=function(c){return this.next(),this.semicolon(),this.finishNode(c,"DebuggerStatement")},ie.parseDoStatement=function(c){return this.next(),this.labels.push(Jm),c.body=this.parseStatement("do"),this.labels.pop(),this.expect(_._while),c.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(_.semi):this.semicolon(),this.finishNode(c,"DoWhileStatement")},ie.parseForStatement=function(c){this.next();var d=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Jm),this.enterScope(0),this.expect(_.parenL),this.type===_.semi)return d>-1&&this.unexpected(d),this.parseFor(c,null);var x=this.isLet();if(this.type===_._var||this.type===_._const||x){var I=this.startNode(),N=x?"let":this.value;return this.next(),this.parseVar(I,!0,N),this.finishNode(I,"VariableDeclaration"),this.parseForAfterInit(c,I,d)}var M=this.isContextual("let"),j=!1,H=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(H){var J=this.startNode();return this.next(),H==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(J,!0,H),this.finishNode(J,"VariableDeclaration"),this.parseForAfterInit(c,J,d)}var ue=this.containsEsc,_e=new nl,Ve=this.start,Jt=d>-1?this.parseExprSubscripts(_e,"await"):this.parseExpression(!0,_e);return this.type===_._in||(j=this.options.ecmaVersion>=6&&this.isContextual("of"))?(d>-1?(this.type===_._in&&this.unexpected(d),c.await=!0):j&&this.options.ecmaVersion>=8&&(Jt.start===Ve&&!ue&&Jt.type==="Identifier"&&Jt.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(c.await=!1)),M&&j&&this.raise(Jt.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(Jt,!1,_e),this.checkLValPattern(Jt),this.parseForIn(c,Jt)):(this.checkExpressionErrors(_e,!0),d>-1&&this.unexpected(d),this.parseFor(c,Jt))},ie.parseForAfterInit=function(c,d,x){return(this.type===_._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&d.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===_._in?x>-1&&this.unexpected(x):c.await=x>-1),this.parseForIn(c,d)):(x>-1&&this.unexpected(x),this.parseFor(c,d))},ie.parseFunctionStatement=function(c,d,x){return this.next(),this.parseFunction(c,Oo|(x?0:Km),!1,d)},ie.parseIfStatement=function(c){return this.next(),c.test=this.parseParenExpression(),c.consequent=this.parseStatement("if"),c.alternate=this.eat(_._else)?this.parseStatement("if"):null,this.finishNode(c,"IfStatement")},ie.parseReturnStatement=function(c){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(_.semi)||this.insertSemicolon()?c.argument=null:(c.argument=this.parseExpression(),this.semicolon()),this.finishNode(c,"ReturnStatement")},ie.parseSwitchStatement=function(c){this.next(),c.discriminant=this.parseParenExpression(),c.cases=[],this.expect(_.braceL),this.labels.push(FF),this.enterScope(G1);for(var d,x=!1;this.type!==_.braceR;)if(this.type===_._case||this.type===_._default){var I=this.type===_._case;d&&this.finishNode(d,"SwitchCase"),c.cases.push(d=this.startNode()),d.consequent=[],this.next(),I?d.test=this.parseExpression():(x&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),x=!0,d.test=null),this.expect(_.colon)}else d||this.unexpected(),d.consequent.push(this.parseStatement(null));return this.exitScope(),d&&this.finishNode(d,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(c,"SwitchStatement")},ie.parseThrowStatement=function(c){return this.next(),A.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),c.argument=this.parseExpression(),this.semicolon(),this.finishNode(c,"ThrowStatement")};var jF=[];ie.parseCatchClauseParam=function(){var c=this.parseBindingAtom(),d=c.type==="Identifier";return this.enterScope(d?U1:0),this.checkLValPattern(c,d?z1:$i),this.expect(_.parenR),c},ie.parseTryStatement=function(c){if(this.next(),c.block=this.parseBlock(),c.handler=null,this.type===_._catch){var d=this.startNode();this.next(),this.eat(_.parenL)?d.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),d.param=null,this.enterScope(0)),d.body=this.parseBlock(!1),this.exitScope(),c.handler=this.finishNode(d,"CatchClause")}return c.finalizer=this.eat(_._finally)?this.parseBlock():null,!c.handler&&!c.finalizer&&this.raise(c.start,"Missing catch or finally clause"),this.finishNode(c,"TryStatement")},ie.parseVarStatement=function(c,d,x){return this.next(),this.parseVar(c,!1,d,x),this.semicolon(),this.finishNode(c,"VariableDeclaration")},ie.parseWhileStatement=function(c){return this.next(),c.test=this.parseParenExpression(),this.labels.push(Jm),c.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(c,"WhileStatement")},ie.parseWithStatement=function(c){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),c.object=this.parseParenExpression(),c.body=this.parseStatement("with"),this.finishNode(c,"WithStatement")},ie.parseEmptyStatement=function(c){return this.next(),this.finishNode(c,"EmptyStatement")},ie.parseLabeledStatement=function(c,d,x,I){for(var N=0,M=this.labels;N<M.length;N+=1){var j=M[N];j.name===d&&this.raise(x.start,"Label '"+d+"' is already declared")}for(var H=this.type.isLoop?"loop":this.type===_._switch?"switch":null,J=this.labels.length-1;J>=0;J--){var ue=this.labels[J];if(ue.statementStart===c.start)ue.statementStart=this.start,ue.kind=H;else break}return this.labels.push({name:d,kind:H,statementStart:this.start}),c.body=this.parseStatement(I?I.indexOf("label")===-1?I+"label":I:"label"),this.labels.pop(),c.label=x,this.finishNode(c,"LabeledStatement")},ie.parseExpressionStatement=function(c,d){return c.expression=d,this.semicolon(),this.finishNode(c,"ExpressionStatement")},ie.parseBlock=function(c,d,x){for(c===void 0&&(c=!0),d===void 0&&(d=this.startNode()),d.body=[],this.expect(_.braceL),c&&this.enterScope(0);this.type!==_.braceR;){var I=this.parseStatement(null);d.body.push(I)}return x&&(this.strict=!1),this.next(),c&&this.exitScope(),this.finishNode(d,"BlockStatement")},ie.parseFor=function(c,d){return c.init=d,this.expect(_.semi),c.test=this.type===_.semi?null:this.parseExpression(),this.expect(_.semi),c.update=this.type===_.parenR?null:this.parseExpression(),this.expect(_.parenR),c.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(c,"ForStatement")},ie.parseForIn=function(c,d){var x=this.type===_._in;return this.next(),d.type==="VariableDeclaration"&&d.declarations[0].init!=null&&(!x||this.options.ecmaVersion<8||this.strict||d.kind!=="var"||d.declarations[0].id.type!=="Identifier")&&this.raise(d.start,(x?"for-in":"for-of")+" loop variable declaration may not have an initializer"),c.left=d,c.right=x?this.parseExpression():this.parseMaybeAssign(),this.expect(_.parenR),c.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(c,x?"ForInStatement":"ForOfStatement")},ie.parseVar=function(c,d,x,I){for(c.declarations=[],c.kind=x;;){var N=this.startNode();if(this.parseVarId(N,x),this.eat(_.eq)?N.init=this.parseMaybeAssign(d):!I&&x==="const"&&!(this.type===_._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!I&&(x==="using"||x==="await using")&&this.options.ecmaVersion>=17&&this.type!==_._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+x+" declaration"):!I&&N.id.type!=="Identifier"&&!(d&&(this.type===_._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):N.init=null,c.declarations.push(this.finishNode(N,"VariableDeclarator")),!this.eat(_.comma))break}return c},ie.parseVarId=function(c,d){c.id=d==="using"||d==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(c.id,d==="var"?zm:$i,!1)};var Oo=1,Km=2,K1=4;ie.parseFunction=function(c,d,x,I,N){this.initFunction(c),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!I)&&(this.type===_.star&&d&Km&&this.unexpected(),c.generator=this.eat(_.star)),this.options.ecmaVersion>=8&&(c.async=!!I),d&Oo&&(c.id=d&K1&&this.type!==_.name?null:this.parseIdent(),c.id&&!(d&Km)&&this.checkLValSimple(c.id,this.strict||c.generator||c.async?this.treatFunctionsAsVar?zm:$i:W1));var M=this.yieldPos,j=this.awaitPos,H=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Wm(c.async,c.generator)),d&Oo||(c.id=this.type===_.name?this.parseIdent():null),this.parseFunctionParams(c),this.parseFunctionBody(c,x,!1,N),this.yieldPos=M,this.awaitPos=j,this.awaitIdentPos=H,this.finishNode(c,d&Oo?"FunctionDeclaration":"FunctionExpression")},ie.parseFunctionParams=function(c){this.expect(_.parenL),c.params=this.parseBindingList(_.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},ie.parseClass=function(c,d){this.next();var x=this.strict;this.strict=!0,this.parseClassId(c,d),this.parseClassSuper(c);var I=this.enterClassBody(),N=this.startNode(),M=!1;for(N.body=[],this.expect(_.braceL);this.type!==_.braceR;){var j=this.parseClassElement(c.superClass!==null);j&&(N.body.push(j),j.type==="MethodDefinition"&&j.kind==="constructor"?(M&&this.raiseRecoverable(j.start,"Duplicate constructor in the same class"),M=!0):j.key&&j.key.type==="PrivateIdentifier"&&BF(I,j)&&this.raiseRecoverable(j.key.start,"Identifier '#"+j.key.name+"' has already been declared"))}return this.strict=x,this.next(),c.body=this.finishNode(N,"ClassBody"),this.exitClassBody(),this.finishNode(c,d?"ClassDeclaration":"ClassExpression")},ie.parseClassElement=function(c){if(this.eat(_.semi))return null;var d=this.options.ecmaVersion,x=this.startNode(),I="",N=!1,M=!1,j="method",H=!1;if(this.eatContextual("static")){if(d>=13&&this.eat(_.braceL))return this.parseClassStaticBlock(x),x;this.isClassElementNameStart()||this.type===_.star?H=!0:I="static"}if(x.static=H,!I&&d>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===_.star)&&!this.canInsertSemicolon()?M=!0:I="async"),!I&&(d>=9||!M)&&this.eat(_.star)&&(N=!0),!I&&!M&&!N){var J=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?j=J:I=J)}if(I?(x.computed=!1,x.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),x.key.name=I,this.finishNode(x.key,"Identifier")):this.parseClassElementName(x),d<13||this.type===_.parenL||j!=="method"||N||M){var ue=!x.static&&sl(x,"constructor"),_e=ue&&c;ue&&j!=="method"&&this.raise(x.key.start,"Constructor can't have get/set modifier"),x.kind=ue?"constructor":j,this.parseClassMethod(x,N,M,_e)}else this.parseClassField(x);return x},ie.isClassElementNameStart=function(){return this.type===_.name||this.type===_.privateId||this.type===_.num||this.type===_.string||this.type===_.bracketL||this.type.keyword},ie.parseClassElementName=function(c){this.type===_.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),c.computed=!1,c.key=this.parsePrivateIdent()):this.parsePropertyName(c)},ie.parseClassMethod=function(c,d,x,I){var N=c.key;c.kind==="constructor"?(d&&this.raise(N.start,"Constructor can't be a generator"),x&&this.raise(N.start,"Constructor can't be an async method")):c.static&&sl(c,"prototype")&&this.raise(N.start,"Classes may not have a static property named prototype");var M=c.value=this.parseMethod(d,x,I);return c.kind==="get"&&M.params.length!==0&&this.raiseRecoverable(M.start,"getter should have no params"),c.kind==="set"&&M.params.length!==1&&this.raiseRecoverable(M.start,"setter should have exactly one param"),c.kind==="set"&&M.params[0].type==="RestElement"&&this.raiseRecoverable(M.params[0].start,"Setter cannot use rest params"),this.finishNode(c,"MethodDefinition")},ie.parseClassField=function(c){return sl(c,"constructor")?this.raise(c.key.start,"Classes can't have a field named 'constructor'"):c.static&&sl(c,"prototype")&&this.raise(c.key.start,"Classes can't have a static field named 'prototype'"),this.eat(_.eq)?(this.enterScope(Eo|tl),c.value=this.parseMaybeAssign(),this.exitScope()):c.value=null,this.semicolon(),this.finishNode(c,"PropertyDefinition")},ie.parseClassStaticBlock=function(c){c.body=[];var d=this.labels;for(this.labels=[],this.enterScope(ts|tl);this.type!==_.braceR;){var x=this.parseStatement(null);c.body.push(x)}return this.next(),this.exitScope(),this.labels=d,this.finishNode(c,"StaticBlock")},ie.parseClassId=function(c,d){this.type===_.name?(c.id=this.parseIdent(),d&&this.checkLValSimple(c.id,$i,!1)):(d===!0&&this.unexpected(),c.id=null)},ie.parseClassSuper=function(c){c.superClass=this.eat(_._extends)?this.parseExprSubscripts(null,!1):null},ie.enterClassBody=function(){var c={declared:Object.create(null),used:[]};return this.privateNameStack.push(c),c.declared},ie.exitClassBody=function(){var c=this.privateNameStack.pop(),d=c.declared,x=c.used;if(this.options.checkPrivateFields)for(var I=this.privateNameStack.length,N=I===0?null:this.privateNameStack[I-1],M=0;M<x.length;++M){var j=x[M];V(d,j.name)||(N?N.used.push(j):this.raiseRecoverable(j.start,"Private field '#"+j.name+"' must be declared in an enclosing class"))}};function BF(c,d){var x=d.key.name,I=c[x],N="true";return d.type==="MethodDefinition"&&(d.kind==="get"||d.kind==="set")&&(N=(d.static?"s":"i")+d.kind),I==="iget"&&N==="iset"||I==="iset"&&N==="iget"||I==="sget"&&N==="sset"||I==="sset"&&N==="sget"?(c[x]="true",!1):I?!0:(c[x]=N,!1)}function sl(c,d){var x=c.computed,I=c.key;return!x&&(I.type==="Identifier"&&I.name===d||I.type==="Literal"&&I.value===d)}ie.parseExportAllDeclaration=function(c,d){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(c.exported=this.parseModuleExportName(),this.checkExport(d,c.exported,this.lastTokStart)):c.exported=null),this.expectContextual("from"),this.type!==_.string&&this.unexpected(),c.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(c.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(c,"ExportAllDeclaration")},ie.parseExport=function(c,d){if(this.next(),this.eat(_.star))return this.parseExportAllDeclaration(c,d);if(this.eat(_._default))return this.checkExport(d,"default",this.lastTokStart),c.declaration=this.parseExportDefaultDeclaration(),this.finishNode(c,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())c.declaration=this.parseExportDeclaration(c),c.declaration.type==="VariableDeclaration"?this.checkVariableExport(d,c.declaration.declarations):this.checkExport(d,c.declaration.id,c.declaration.id.start),c.specifiers=[],c.source=null,this.options.ecmaVersion>=16&&(c.attributes=[]);else{if(c.declaration=null,c.specifiers=this.parseExportSpecifiers(d),this.eatContextual("from"))this.type!==_.string&&this.unexpected(),c.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(c.attributes=this.parseWithClause());else{for(var x=0,I=c.specifiers;x<I.length;x+=1){var N=I[x];this.checkUnreserved(N.local),this.checkLocalExport(N.local),N.local.type==="Literal"&&this.raise(N.local.start,"A string literal cannot be used as an exported binding without `from`.")}c.source=null,this.options.ecmaVersion>=16&&(c.attributes=[])}this.semicolon()}return this.finishNode(c,"ExportNamedDeclaration")},ie.parseExportDeclaration=function(c){return this.parseStatement(null)},ie.parseExportDefaultDeclaration=function(){var c;if(this.type===_._function||(c=this.isAsyncFunction())){var d=this.startNode();return this.next(),c&&this.next(),this.parseFunction(d,Oo|K1,!1,c)}else if(this.type===_._class){var x=this.startNode();return this.parseClass(x,"nullableID")}else{var I=this.parseMaybeAssign();return this.semicolon(),I}},ie.checkExport=function(c,d,x){c&&(typeof d!="string"&&(d=d.type==="Identifier"?d.name:d.value),V(c,d)&&this.raiseRecoverable(x,"Duplicate export '"+d+"'"),c[d]=!0)},ie.checkPatternExport=function(c,d){var x=d.type;if(x==="Identifier")this.checkExport(c,d,d.start);else if(x==="ObjectPattern")for(var I=0,N=d.properties;I<N.length;I+=1){var M=N[I];this.checkPatternExport(c,M)}else if(x==="ArrayPattern")for(var j=0,H=d.elements;j<H.length;j+=1){var J=H[j];J&&this.checkPatternExport(c,J)}else x==="Property"?this.checkPatternExport(c,d.value):x==="AssignmentPattern"?this.checkPatternExport(c,d.left):x==="RestElement"&&this.checkPatternExport(c,d.argument)},ie.checkVariableExport=function(c,d){if(c)for(var x=0,I=d;x<I.length;x+=1){var N=I[x];this.checkPatternExport(c,N.id)}},ie.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},ie.parseExportSpecifier=function(c){var d=this.startNode();return d.local=this.parseModuleExportName(),d.exported=this.eatContextual("as")?this.parseModuleExportName():d.local,this.checkExport(c,d.exported,d.exported.start),this.finishNode(d,"ExportSpecifier")},ie.parseExportSpecifiers=function(c){var d=[],x=!0;for(this.expect(_.braceL);!this.eat(_.braceR);){if(x)x=!1;else if(this.expect(_.comma),this.afterTrailingComma(_.braceR))break;d.push(this.parseExportSpecifier(c))}return d},ie.parseImport=function(c){return this.next(),this.type===_.string?(c.specifiers=jF,c.source=this.parseExprAtom()):(c.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),c.source=this.type===_.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(c.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(c,"ImportDeclaration")},ie.parseImportSpecifier=function(){var c=this.startNode();return c.imported=this.parseModuleExportName(),this.eatContextual("as")?c.local=this.parseIdent():(this.checkUnreserved(c.imported),c.local=c.imported),this.checkLValSimple(c.local,$i),this.finishNode(c,"ImportSpecifier")},ie.parseImportDefaultSpecifier=function(){var c=this.startNode();return c.local=this.parseIdent(),this.checkLValSimple(c.local,$i),this.finishNode(c,"ImportDefaultSpecifier")},ie.parseImportNamespaceSpecifier=function(){var c=this.startNode();return this.next(),this.expectContextual("as"),c.local=this.parseIdent(),this.checkLValSimple(c.local,$i),this.finishNode(c,"ImportNamespaceSpecifier")},ie.parseImportSpecifiers=function(){var c=[],d=!0;if(this.type===_.name&&(c.push(this.parseImportDefaultSpecifier()),!this.eat(_.comma)))return c;if(this.type===_.star)return c.push(this.parseImportNamespaceSpecifier()),c;for(this.expect(_.braceL);!this.eat(_.braceR);){if(d)d=!1;else if(this.expect(_.comma),this.afterTrailingComma(_.braceR))break;c.push(this.parseImportSpecifier())}return c},ie.parseWithClause=function(){var c=[];if(!this.eat(_._with))return c;this.expect(_.braceL);for(var d={},x=!0;!this.eat(_.braceR);){if(x)x=!1;else if(this.expect(_.comma),this.afterTrailingComma(_.braceR))break;var I=this.parseImportAttribute(),N=I.key.type==="Identifier"?I.key.name:I.key.value;V(d,N)&&this.raiseRecoverable(I.key.start,"Duplicate attribute key '"+N+"'"),d[N]=!0,c.push(I)}return c},ie.parseImportAttribute=function(){var c=this.startNode();return c.key=this.type===_.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(_.colon),this.type!==_.string&&this.unexpected(),c.value=this.parseExprAtom(),this.finishNode(c,"ImportAttribute")},ie.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===_.string){var c=this.parseLiteral(this.value);return Q.test(c.value)&&this.raise(c.start,"An export name cannot include a lone surrogate."),c}return this.parseIdent(!0)},ie.adaptDirectivePrologue=function(c){for(var d=0;d<c.length&&this.isDirectiveCandidate(c[d]);++d)c[d].directive=c[d].expression.raw.slice(1,-1)},ie.isDirectiveCandidate=function(c){return this.options.ecmaVersion>=5&&c.type==="ExpressionStatement"&&c.expression.type==="Literal"&&typeof c.expression.value=="string"&&(this.input[c.start]==='"'||this.input[c.start]==="'")};var Ur=Xe.prototype;Ur.toAssignable=function(c,d,x){if(this.options.ecmaVersion>=6&&c)switch(c.type){case"Identifier":this.inAsync&&c.name==="await"&&this.raise(c.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":c.type="ObjectPattern",x&&this.checkPatternErrors(x,!0);for(var I=0,N=c.properties;I<N.length;I+=1){var M=N[I];this.toAssignable(M,d),M.type==="RestElement"&&(M.argument.type==="ArrayPattern"||M.argument.type==="ObjectPattern")&&this.raise(M.argument.start,"Unexpected token")}break;case"Property":c.kind!=="init"&&this.raise(c.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(c.value,d);break;case"ArrayExpression":c.type="ArrayPattern",x&&this.checkPatternErrors(x,!0),this.toAssignableList(c.elements,d);break;case"SpreadElement":c.type="RestElement",this.toAssignable(c.argument,d),c.argument.type==="AssignmentPattern"&&this.raise(c.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":c.operator!=="="&&this.raise(c.left.end,"Only '=' operator can be used for specifying default value."),c.type="AssignmentPattern",delete c.operator,this.toAssignable(c.left,d);break;case"ParenthesizedExpression":this.toAssignable(c.expression,d,x);break;case"ChainExpression":this.raiseRecoverable(c.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!d)break;default:this.raise(c.start,"Assigning to rvalue")}else x&&this.checkPatternErrors(x,!0);return c},Ur.toAssignableList=function(c,d){for(var x=c.length,I=0;I<x;I++){var N=c[I];N&&this.toAssignable(N,d)}if(x){var M=c[x-1];this.options.ecmaVersion===6&&d&&M&&M.type==="RestElement"&&M.argument.type!=="Identifier"&&this.unexpected(M.argument.start)}return c},Ur.parseSpread=function(c){var d=this.startNode();return this.next(),d.argument=this.parseMaybeAssign(!1,c),this.finishNode(d,"SpreadElement")},Ur.parseRestBinding=function(){var c=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==_.name&&this.unexpected(),c.argument=this.parseBindingAtom(),this.finishNode(c,"RestElement")},Ur.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case _.bracketL:var c=this.startNode();return this.next(),c.elements=this.parseBindingList(_.bracketR,!0,!0),this.finishNode(c,"ArrayPattern");case _.braceL:return this.parseObj(!0)}return this.parseIdent()},Ur.parseBindingList=function(c,d,x,I){for(var N=[],M=!0;!this.eat(c);)if(M?M=!1:this.expect(_.comma),d&&this.type===_.comma)N.push(null);else{if(x&&this.afterTrailingComma(c))break;if(this.type===_.ellipsis){var j=this.parseRestBinding();this.parseBindingListItem(j),N.push(j),this.type===_.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(c);break}else N.push(this.parseAssignableListItem(I))}return N},Ur.parseAssignableListItem=function(c){var d=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(d),d},Ur.parseBindingListItem=function(c){return c},Ur.parseMaybeDefault=function(c,d,x){if(x=x||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(_.eq))return x;var I=this.startNodeAt(c,d);return I.left=x,I.right=this.parseMaybeAssign(),this.finishNode(I,"AssignmentPattern")},Ur.checkLValSimple=function(c,d,x){d===void 0&&(d=il);var I=d!==il;switch(c.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(c.name)&&this.raiseRecoverable(c.start,(I?"Binding ":"Assigning to ")+c.name+" in strict mode"),I&&(d===$i&&c.name==="let"&&this.raiseRecoverable(c.start,"let is disallowed as a lexically bound name"),x&&(V(x,c.name)&&this.raiseRecoverable(c.start,"Argument name clash"),x[c.name]=!0),d!==J1&&this.declareName(c.name,d,c.start));break;case"ChainExpression":this.raiseRecoverable(c.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":I&&this.raiseRecoverable(c.start,"Binding member expression");break;case"ParenthesizedExpression":return I&&this.raiseRecoverable(c.start,"Binding parenthesized expression"),this.checkLValSimple(c.expression,d,x);default:this.raise(c.start,(I?"Binding":"Assigning to")+" rvalue")}},Ur.checkLValPattern=function(c,d,x){switch(d===void 0&&(d=il),c.type){case"ObjectPattern":for(var I=0,N=c.properties;I<N.length;I+=1){var M=N[I];this.checkLValInnerPattern(M,d,x)}break;case"ArrayPattern":for(var j=0,H=c.elements;j<H.length;j+=1){var J=H[j];J&&this.checkLValInnerPattern(J,d,x)}break;default:this.checkLValSimple(c,d,x)}},Ur.checkLValInnerPattern=function(c,d,x){switch(d===void 0&&(d=il),c.type){case"Property":this.checkLValInnerPattern(c.value,d,x);break;case"AssignmentPattern":this.checkLValPattern(c.left,d,x);break;case"RestElement":this.checkLValPattern(c.argument,d,x);break;default:this.checkLValPattern(c,d,x)}};var Hr=function(d,x,I,N,M){this.token=d,this.isExpr=!!x,this.preserveSpace=!!I,this.override=N,this.generator=!!M},Be={b_stat:new Hr("{",!1),b_expr:new Hr("{",!0),b_tmpl:new Hr("${",!1),p_stat:new Hr("(",!1),p_expr:new Hr("(",!0),q_tmpl:new Hr("`",!0,!0,function(c){return c.tryReadTemplateToken()}),f_stat:new Hr("function",!1),f_expr:new Hr("function",!0),f_expr_gen:new Hr("function",!0,!1,null,!0),f_gen:new Hr("function",!1,!1,null,!0)},Zs=Xe.prototype;Zs.initialContext=function(){return[Be.b_stat]},Zs.curContext=function(){return this.context[this.context.length-1]},Zs.braceIsBlock=function(c){var d=this.curContext();return d===Be.f_expr||d===Be.f_stat?!0:c===_.colon&&(d===Be.b_stat||d===Be.b_expr)?!d.isExpr:c===_._return||c===_.name&&this.exprAllowed?A.test(this.input.slice(this.lastTokEnd,this.start)):c===_._else||c===_.semi||c===_.eof||c===_.parenR||c===_.arrow?!0:c===_.braceL?d===Be.b_stat:c===_._var||c===_._const||c===_.name?!1:!this.exprAllowed},Zs.inGeneratorContext=function(){for(var c=this.context.length-1;c>=1;c--){var d=this.context[c];if(d.token==="function")return d.generator}return!1},Zs.updateContext=function(c){var d,x=this.type;x.keyword&&c===_.dot?this.exprAllowed=!1:(d=x.updateContext)?d.call(this,c):this.exprAllowed=x.beforeExpr},Zs.overrideContext=function(c){this.curContext()!==c&&(this.context[this.context.length-1]=c)},_.parenR.updateContext=_.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var c=this.context.pop();c===Be.b_stat&&this.curContext().token==="function"&&(c=this.context.pop()),this.exprAllowed=!c.isExpr},_.braceL.updateContext=function(c){this.context.push(this.braceIsBlock(c)?Be.b_stat:Be.b_expr),this.exprAllowed=!0},_.dollarBraceL.updateContext=function(){this.context.push(Be.b_tmpl),this.exprAllowed=!0},_.parenL.updateContext=function(c){var d=c===_._if||c===_._for||c===_._with||c===_._while;this.context.push(d?Be.p_stat:Be.p_expr),this.exprAllowed=!0},_.incDec.updateContext=function(){},_._function.updateContext=_._class.updateContext=function(c){c.beforeExpr&&c!==_._else&&!(c===_.semi&&this.curContext()!==Be.p_stat)&&!(c===_._return&&A.test(this.input.slice(this.lastTokEnd,this.start)))&&!((c===_.colon||c===_.braceL)&&this.curContext()===Be.b_stat)?this.context.push(Be.f_expr):this.context.push(Be.f_stat),this.exprAllowed=!1},_.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},_.backQuote.updateContext=function(){this.curContext()===Be.q_tmpl?this.context.pop():this.context.push(Be.q_tmpl),this.exprAllowed=!1},_.star.updateContext=function(c){if(c===_._function){var d=this.context.length-1;this.context[d]===Be.f_expr?this.context[d]=Be.f_expr_gen:this.context[d]=Be.f_gen}this.exprAllowed=!0},_.name.updateContext=function(c){var d=!1;this.options.ecmaVersion>=6&&c!==_.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(d=!0),this.exprAllowed=d};var fe=Xe.prototype;fe.checkPropClash=function(c,d,x){if(!(this.options.ecmaVersion>=9&&c.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(c.computed||c.method||c.shorthand))){var I=c.key,N;switch(I.type){case"Identifier":N=I.name;break;case"Literal":N=String(I.value);break;default:return}var M=c.kind;if(this.options.ecmaVersion>=6){N==="__proto__"&&M==="init"&&(d.proto&&(x?x.doubleProto<0&&(x.doubleProto=I.start):this.raiseRecoverable(I.start,"Redefinition of __proto__ property")),d.proto=!0);return}N="$"+N;var j=d[N];if(j){var H;M==="init"?H=this.strict&&j.init||j.get||j.set:H=j.init||j[M],H&&this.raiseRecoverable(I.start,"Redefinition of property")}else j=d[N]={init:!1,get:!1,set:!1};j[M]=!0}},fe.parseExpression=function(c,d){var x=this.start,I=this.startLoc,N=this.parseMaybeAssign(c,d);if(this.type===_.comma){var M=this.startNodeAt(x,I);for(M.expressions=[N];this.eat(_.comma);)M.expressions.push(this.parseMaybeAssign(c,d));return this.finishNode(M,"SequenceExpression")}return N},fe.parseMaybeAssign=function(c,d,x){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(c);this.exprAllowed=!1}var I=!1,N=-1,M=-1,j=-1;d?(N=d.parenthesizedAssign,M=d.trailingComma,j=d.doubleProto,d.parenthesizedAssign=d.trailingComma=-1):(d=new nl,I=!0);var H=this.start,J=this.startLoc;(this.type===_.parenL||this.type===_.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=c==="await");var ue=this.parseMaybeConditional(c,d);if(x&&(ue=x.call(this,ue,H,J)),this.type.isAssign){var _e=this.startNodeAt(H,J);return _e.operator=this.value,this.type===_.eq&&(ue=this.toAssignable(ue,!1,d)),I||(d.parenthesizedAssign=d.trailingComma=d.doubleProto=-1),d.shorthandAssign>=ue.start&&(d.shorthandAssign=-1),this.type===_.eq?this.checkLValPattern(ue):this.checkLValSimple(ue),_e.left=ue,this.next(),_e.right=this.parseMaybeAssign(c),j>-1&&(d.doubleProto=j),this.finishNode(_e,"AssignmentExpression")}else I&&this.checkExpressionErrors(d,!0);return N>-1&&(d.parenthesizedAssign=N),M>-1&&(d.trailingComma=M),ue},fe.parseMaybeConditional=function(c,d){var x=this.start,I=this.startLoc,N=this.parseExprOps(c,d);if(this.checkExpressionErrors(d))return N;if(this.eat(_.question)){var M=this.startNodeAt(x,I);return M.test=N,M.consequent=this.parseMaybeAssign(),this.expect(_.colon),M.alternate=this.parseMaybeAssign(c),this.finishNode(M,"ConditionalExpression")}return N},fe.parseExprOps=function(c,d){var x=this.start,I=this.startLoc,N=this.parseMaybeUnary(d,!1,!1,c);return this.checkExpressionErrors(d)||N.start===x&&N.type==="ArrowFunctionExpression"?N:this.parseExprOp(N,x,I,-1,c)},fe.parseExprOp=function(c,d,x,I,N){var M=this.type.binop;if(M!=null&&(!N||this.type!==_._in)&&M>I){var j=this.type===_.logicalOR||this.type===_.logicalAND,H=this.type===_.coalesce;H&&(M=_.logicalAND.binop);var J=this.value;this.next();var ue=this.start,_e=this.startLoc,Ve=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,N),ue,_e,M,N),Jt=this.buildBinary(d,x,c,Ve,J,j||H);return(j&&this.type===_.coalesce||H&&(this.type===_.logicalOR||this.type===_.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(Jt,d,x,I,N)}return c},fe.buildBinary=function(c,d,x,I,N,M){I.type==="PrivateIdentifier"&&this.raise(I.start,"Private identifier can only be left side of binary expression");var j=this.startNodeAt(c,d);return j.left=x,j.operator=N,j.right=I,this.finishNode(j,M?"LogicalExpression":"BinaryExpression")},fe.parseMaybeUnary=function(c,d,x,I){var N=this.start,M=this.startLoc,j;if(this.isContextual("await")&&this.canAwait)j=this.parseAwait(I),d=!0;else if(this.type.prefix){var H=this.startNode(),J=this.type===_.incDec;H.operator=this.value,H.prefix=!0,this.next(),H.argument=this.parseMaybeUnary(null,!0,J,I),this.checkExpressionErrors(c,!0),J?this.checkLValSimple(H.argument):this.strict&&H.operator==="delete"&&Q1(H.argument)?this.raiseRecoverable(H.start,"Deleting local variable in strict mode"):H.operator==="delete"&&Qm(H.argument)?this.raiseRecoverable(H.start,"Private fields can not be deleted"):d=!0,j=this.finishNode(H,J?"UpdateExpression":"UnaryExpression")}else if(!d&&this.type===_.privateId)(I||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),j=this.parsePrivateIdent(),this.type!==_._in&&this.unexpected();else{if(j=this.parseExprSubscripts(c,I),this.checkExpressionErrors(c))return j;for(;this.type.postfix&&!this.canInsertSemicolon();){var ue=this.startNodeAt(N,M);ue.operator=this.value,ue.prefix=!1,ue.argument=j,this.checkLValSimple(j),this.next(),j=this.finishNode(ue,"UpdateExpression")}}if(!x&&this.eat(_.starstar))if(d)this.unexpected(this.lastTokStart);else return this.buildBinary(N,M,j,this.parseMaybeUnary(null,!1,!1,I),"**",!1);else return j};function Q1(c){return c.type==="Identifier"||c.type==="ParenthesizedExpression"&&Q1(c.expression)}function Qm(c){return c.type==="MemberExpression"&&c.property.type==="PrivateIdentifier"||c.type==="ChainExpression"&&Qm(c.expression)||c.type==="ParenthesizedExpression"&&Qm(c.expression)}fe.parseExprSubscripts=function(c,d){var x=this.start,I=this.startLoc,N=this.parseExprAtom(c,d);if(N.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return N;var M=this.parseSubscripts(N,x,I,!1,d);return c&&M.type==="MemberExpression"&&(c.parenthesizedAssign>=M.start&&(c.parenthesizedAssign=-1),c.parenthesizedBind>=M.start&&(c.parenthesizedBind=-1),c.trailingComma>=M.start&&(c.trailingComma=-1)),M},fe.parseSubscripts=function(c,d,x,I,N){for(var M=this.options.ecmaVersion>=8&&c.type==="Identifier"&&c.name==="async"&&this.lastTokEnd===c.end&&!this.canInsertSemicolon()&&c.end-c.start===5&&this.potentialArrowAt===c.start,j=!1;;){var H=this.parseSubscript(c,d,x,I,M,j,N);if(H.optional&&(j=!0),H===c||H.type==="ArrowFunctionExpression"){if(j){var J=this.startNodeAt(d,x);J.expression=H,H=this.finishNode(J,"ChainExpression")}return H}c=H}},fe.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(_.arrow)},fe.parseSubscriptAsyncArrow=function(c,d,x,I){return this.parseArrowExpression(this.startNodeAt(c,d),x,!0,I)},fe.parseSubscript=function(c,d,x,I,N,M,j){var H=this.options.ecmaVersion>=11,J=H&&this.eat(_.questionDot);I&&J&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var ue=this.eat(_.bracketL);if(ue||J&&this.type!==_.parenL&&this.type!==_.backQuote||this.eat(_.dot)){var _e=this.startNodeAt(d,x);_e.object=c,ue?(_e.property=this.parseExpression(),this.expect(_.bracketR)):this.type===_.privateId&&c.type!=="Super"?_e.property=this.parsePrivateIdent():_e.property=this.parseIdent(this.options.allowReserved!=="never"),_e.computed=!!ue,H&&(_e.optional=J),c=this.finishNode(_e,"MemberExpression")}else if(!I&&this.eat(_.parenL)){var Ve=new nl,Jt=this.yieldPos,Po=this.awaitPos,ea=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var ll=this.parseExprList(_.parenR,this.options.ecmaVersion>=8,!1,Ve);if(N&&!J&&this.shouldParseAsyncArrow())return this.checkPatternErrors(Ve,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=Jt,this.awaitPos=Po,this.awaitIdentPos=ea,this.parseSubscriptAsyncArrow(d,x,ll,j);this.checkExpressionErrors(Ve,!0),this.yieldPos=Jt||this.yieldPos,this.awaitPos=Po||this.awaitPos,this.awaitIdentPos=ea||this.awaitIdentPos;var ta=this.startNodeAt(d,x);ta.callee=c,ta.arguments=ll,H&&(ta.optional=J),c=this.finishNode(ta,"CallExpression")}else if(this.type===_.backQuote){(J||M)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var ra=this.startNodeAt(d,x);ra.tag=c,ra.quasi=this.parseTemplate({isTagged:!0}),c=this.finishNode(ra,"TaggedTemplateExpression")}return c},fe.parseExprAtom=function(c,d,x){this.type===_.slash&&this.readRegexp();var I,N=this.potentialArrowAt===this.start;switch(this.type){case _._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),I=this.startNode(),this.next(),this.type===_.parenL&&!this.allowDirectSuper&&this.raise(I.start,"super() call outside constructor of a subclass"),this.type!==_.dot&&this.type!==_.bracketL&&this.type!==_.parenL&&this.unexpected(),this.finishNode(I,"Super");case _._this:return I=this.startNode(),this.next(),this.finishNode(I,"ThisExpression");case _.name:var M=this.start,j=this.startLoc,H=this.containsEsc,J=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!H&&J.name==="async"&&!this.canInsertSemicolon()&&this.eat(_._function))return this.overrideContext(Be.f_expr),this.parseFunction(this.startNodeAt(M,j),0,!1,!0,d);if(N&&!this.canInsertSemicolon()){if(this.eat(_.arrow))return this.parseArrowExpression(this.startNodeAt(M,j),[J],!1,d);if(this.options.ecmaVersion>=8&&J.name==="async"&&this.type===_.name&&!H&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return J=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(_.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(M,j),[J],!0,d)}return J;case _.regexp:var ue=this.value;return I=this.parseLiteral(ue.value),I.regex={pattern:ue.pattern,flags:ue.flags},I;case _.num:case _.string:return this.parseLiteral(this.value);case _._null:case _._true:case _._false:return I=this.startNode(),I.value=this.type===_._null?null:this.type===_._true,I.raw=this.type.keyword,this.next(),this.finishNode(I,"Literal");case _.parenL:var _e=this.start,Ve=this.parseParenAndDistinguishExpression(N,d);return c&&(c.parenthesizedAssign<0&&!this.isSimpleAssignTarget(Ve)&&(c.parenthesizedAssign=_e),c.parenthesizedBind<0&&(c.parenthesizedBind=_e)),Ve;case _.bracketL:return I=this.startNode(),this.next(),I.elements=this.parseExprList(_.bracketR,!0,!0,c),this.finishNode(I,"ArrayExpression");case _.braceL:return this.overrideContext(Be.b_expr),this.parseObj(!1,c);case _._function:return I=this.startNode(),this.next(),this.parseFunction(I,0);case _._class:return this.parseClass(this.startNode(),!1);case _._new:return this.parseNew();case _.backQuote:return this.parseTemplate();case _._import:return this.options.ecmaVersion>=11?this.parseExprImport(x):this.unexpected();default:return this.parseExprAtomDefault()}},fe.parseExprAtomDefault=function(){this.unexpected()},fe.parseExprImport=function(c){var d=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===_.parenL&&!c)return this.parseDynamicImport(d);if(this.type===_.dot){var x=this.startNodeAt(d.start,d.loc&&d.loc.start);return x.name="import",d.meta=this.finishNode(x,"Identifier"),this.parseImportMeta(d)}else this.unexpected()},fe.parseDynamicImport=function(c){if(this.next(),c.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(_.parenR)?c.options=null:(this.expect(_.comma),this.afterTrailingComma(_.parenR)?c.options=null:(c.options=this.parseMaybeAssign(),this.eat(_.parenR)||(this.expect(_.comma),this.afterTrailingComma(_.parenR)||this.unexpected())));else if(!this.eat(_.parenR)){var d=this.start;this.eat(_.comma)&&this.eat(_.parenR)?this.raiseRecoverable(d,"Trailing comma is not allowed in import()"):this.unexpected(d)}return this.finishNode(c,"ImportExpression")},fe.parseImportMeta=function(c){this.next();var d=this.containsEsc;return c.property=this.parseIdent(!0),c.property.name!=="meta"&&this.raiseRecoverable(c.property.start,"The only valid meta property for import is 'import.meta'"),d&&this.raiseRecoverable(c.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(c.start,"Cannot use 'import.meta' outside a module"),this.finishNode(c,"MetaProperty")},fe.parseLiteral=function(c){var d=this.startNode();return d.value=c,d.raw=this.input.slice(this.start,this.end),d.raw.charCodeAt(d.raw.length-1)===110&&(d.bigint=d.value!=null?d.value.toString():d.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(d,"Literal")},fe.parseParenExpression=function(){this.expect(_.parenL);var c=this.parseExpression();return this.expect(_.parenR),c},fe.shouldParseArrow=function(c){return!this.canInsertSemicolon()},fe.parseParenAndDistinguishExpression=function(c,d){var x=this.start,I=this.startLoc,N,M=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var j=this.start,H=this.startLoc,J=[],ue=!0,_e=!1,Ve=new nl,Jt=this.yieldPos,Po=this.awaitPos,ea;for(this.yieldPos=0,this.awaitPos=0;this.type!==_.parenR;)if(ue?ue=!1:this.expect(_.comma),M&&this.afterTrailingComma(_.parenR,!0)){_e=!0;break}else if(this.type===_.ellipsis){ea=this.start,J.push(this.parseParenItem(this.parseRestBinding())),this.type===_.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else J.push(this.parseMaybeAssign(!1,Ve,this.parseParenItem));var ll=this.lastTokEnd,ta=this.lastTokEndLoc;if(this.expect(_.parenR),c&&this.shouldParseArrow(J)&&this.eat(_.arrow))return this.checkPatternErrors(Ve,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Jt,this.awaitPos=Po,this.parseParenArrowList(x,I,J,d);(!J.length||_e)&&this.unexpected(this.lastTokStart),ea&&this.unexpected(ea),this.checkExpressionErrors(Ve,!0),this.yieldPos=Jt||this.yieldPos,this.awaitPos=Po||this.awaitPos,J.length>1?(N=this.startNodeAt(j,H),N.expressions=J,this.finishNodeAt(N,"SequenceExpression",ll,ta)):N=J[0]}else N=this.parseParenExpression();if(this.options.preserveParens){var ra=this.startNodeAt(x,I);return ra.expression=N,this.finishNode(ra,"ParenthesizedExpression")}else return N},fe.parseParenItem=function(c){return c},fe.parseParenArrowList=function(c,d,x,I){return this.parseArrowExpression(this.startNodeAt(c,d),x,!1,I)};var VF=[];fe.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var c=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===_.dot){var d=this.startNodeAt(c.start,c.loc&&c.loc.start);d.name="new",c.meta=this.finishNode(d,"Identifier"),this.next();var x=this.containsEsc;return c.property=this.parseIdent(!0),c.property.name!=="target"&&this.raiseRecoverable(c.property.start,"The only valid meta property for new is 'new.target'"),x&&this.raiseRecoverable(c.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(c.start,"'new.target' can only be used in functions and class static block"),this.finishNode(c,"MetaProperty")}var I=this.start,N=this.startLoc;return c.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),I,N,!0,!1),this.eat(_.parenL)?c.arguments=this.parseExprList(_.parenR,this.options.ecmaVersion>=8,!1):c.arguments=VF,this.finishNode(c,"NewExpression")},fe.parseTemplateElement=function(c){var d=c.isTagged,x=this.startNode();return this.type===_.invalidTemplate?(d||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),x.value={raw:this.value.replace(/\r\n?/g,`
|
|
1201
|
-
`),cooked:null}):x.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
1202
|
-
`),cooked:this.value},this.next(),x.tail=this.type===_.backQuote,this.finishNode(x,"TemplateElement")},fe.parseTemplate=function(c){c===void 0&&(c={});var d=c.isTagged;d===void 0&&(d=!1);var x=this.startNode();this.next(),x.expressions=[];var I=this.parseTemplateElement({isTagged:d});for(x.quasis=[I];!I.tail;)this.type===_.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(_.dollarBraceL),x.expressions.push(this.parseExpression()),this.expect(_.braceR),x.quasis.push(I=this.parseTemplateElement({isTagged:d}));return this.next(),this.finishNode(x,"TemplateLiteral")},fe.isAsyncProp=function(c){return!c.computed&&c.key.type==="Identifier"&&c.key.name==="async"&&(this.type===_.name||this.type===_.num||this.type===_.string||this.type===_.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===_.star)&&!A.test(this.input.slice(this.lastTokEnd,this.start))},fe.parseObj=function(c,d){var x=this.startNode(),I=!0,N={};for(x.properties=[],this.next();!this.eat(_.braceR);){if(I)I=!1;else if(this.expect(_.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(_.braceR))break;var M=this.parseProperty(c,d);c||this.checkPropClash(M,N,d),x.properties.push(M)}return this.finishNode(x,c?"ObjectPattern":"ObjectExpression")},fe.parseProperty=function(c,d){var x=this.startNode(),I,N,M,j;if(this.options.ecmaVersion>=9&&this.eat(_.ellipsis))return c?(x.argument=this.parseIdent(!1),this.type===_.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(x,"RestElement")):(x.argument=this.parseMaybeAssign(!1,d),this.type===_.comma&&d&&d.trailingComma<0&&(d.trailingComma=this.start),this.finishNode(x,"SpreadElement"));this.options.ecmaVersion>=6&&(x.method=!1,x.shorthand=!1,(c||d)&&(M=this.start,j=this.startLoc),c||(I=this.eat(_.star)));var H=this.containsEsc;return this.parsePropertyName(x),!c&&!H&&this.options.ecmaVersion>=8&&!I&&this.isAsyncProp(x)?(N=!0,I=this.options.ecmaVersion>=9&&this.eat(_.star),this.parsePropertyName(x)):N=!1,this.parsePropertyValue(x,c,I,N,M,j,d,H),this.finishNode(x,"Property")},fe.parseGetterSetter=function(c){var d=c.key.name;this.parsePropertyName(c),c.value=this.parseMethod(!1),c.kind=d;var x=c.kind==="get"?0:1;if(c.value.params.length!==x){var I=c.value.start;c.kind==="get"?this.raiseRecoverable(I,"getter should have no params"):this.raiseRecoverable(I,"setter should have exactly one param")}else c.kind==="set"&&c.value.params[0].type==="RestElement"&&this.raiseRecoverable(c.value.params[0].start,"Setter cannot use rest params")},fe.parsePropertyValue=function(c,d,x,I,N,M,j,H){(x||I)&&this.type===_.colon&&this.unexpected(),this.eat(_.colon)?(c.value=d?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,j),c.kind="init"):this.options.ecmaVersion>=6&&this.type===_.parenL?(d&&this.unexpected(),c.method=!0,c.value=this.parseMethod(x,I),c.kind="init"):!d&&!H&&this.options.ecmaVersion>=5&&!c.computed&&c.key.type==="Identifier"&&(c.key.name==="get"||c.key.name==="set")&&this.type!==_.comma&&this.type!==_.braceR&&this.type!==_.eq?((x||I)&&this.unexpected(),this.parseGetterSetter(c)):this.options.ecmaVersion>=6&&!c.computed&&c.key.type==="Identifier"?((x||I)&&this.unexpected(),this.checkUnreserved(c.key),c.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=N),d?c.value=this.parseMaybeDefault(N,M,this.copyNode(c.key)):this.type===_.eq&&j?(j.shorthandAssign<0&&(j.shorthandAssign=this.start),c.value=this.parseMaybeDefault(N,M,this.copyNode(c.key))):c.value=this.copyNode(c.key),c.kind="init",c.shorthand=!0):this.unexpected()},fe.parsePropertyName=function(c){if(this.options.ecmaVersion>=6){if(this.eat(_.bracketL))return c.computed=!0,c.key=this.parseMaybeAssign(),this.expect(_.bracketR),c.key;c.computed=!1}return c.key=this.type===_.num||this.type===_.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},fe.initFunction=function(c){c.id=null,this.options.ecmaVersion>=6&&(c.generator=c.expression=!1),this.options.ecmaVersion>=8&&(c.async=!1)},fe.parseMethod=function(c,d,x){var I=this.startNode(),N=this.yieldPos,M=this.awaitPos,j=this.awaitIdentPos;return this.initFunction(I),this.options.ecmaVersion>=6&&(I.generator=c),this.options.ecmaVersion>=8&&(I.async=!!d),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Wm(d,I.generator)|tl|(x?H1:0)),this.expect(_.parenL),I.params=this.parseBindingList(_.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(I,!1,!0,!1),this.yieldPos=N,this.awaitPos=M,this.awaitIdentPos=j,this.finishNode(I,"FunctionExpression")},fe.parseArrowExpression=function(c,d,x,I){var N=this.yieldPos,M=this.awaitPos,j=this.awaitIdentPos;return this.enterScope(Wm(x,!1)|Gm),this.initFunction(c),this.options.ecmaVersion>=8&&(c.async=!!x),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,c.params=this.toAssignableList(d,!0),this.parseFunctionBody(c,!0,!1,I),this.yieldPos=N,this.awaitPos=M,this.awaitIdentPos=j,this.finishNode(c,"ArrowFunctionExpression")},fe.parseFunctionBody=function(c,d,x,I){var N=d&&this.type!==_.braceL,M=this.strict,j=!1;if(N)c.body=this.parseMaybeAssign(I),c.expression=!0,this.checkParams(c,!1);else{var H=this.options.ecmaVersion>=7&&!this.isSimpleParamList(c.params);(!M||H)&&(j=this.strictDirective(this.end),j&&H&&this.raiseRecoverable(c.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var J=this.labels;this.labels=[],j&&(this.strict=!0),this.checkParams(c,!M&&!j&&!d&&!x&&this.isSimpleParamList(c.params)),this.strict&&c.id&&this.checkLValSimple(c.id,J1),c.body=this.parseBlock(!1,void 0,j&&!M),c.expression=!1,this.adaptDirectivePrologue(c.body.body),this.labels=J}this.exitScope()},fe.isSimpleParamList=function(c){for(var d=0,x=c;d<x.length;d+=1){var I=x[d];if(I.type!=="Identifier")return!1}return!0},fe.checkParams=function(c,d){for(var x=Object.create(null),I=0,N=c.params;I<N.length;I+=1){var M=N[I];this.checkLValInnerPattern(M,zm,d?null:x)}},fe.parseExprList=function(c,d,x,I){for(var N=[],M=!0;!this.eat(c);){if(M)M=!1;else if(this.expect(_.comma),d&&this.afterTrailingComma(c))break;var j=void 0;x&&this.type===_.comma?j=null:this.type===_.ellipsis?(j=this.parseSpread(I),I&&this.type===_.comma&&I.trailingComma<0&&(I.trailingComma=this.start)):j=this.parseMaybeAssign(!1,I),N.push(j)}return N},fe.checkUnreserved=function(c){var d=c.start,x=c.end,I=c.name;if(this.inGenerator&&I==="yield"&&this.raiseRecoverable(d,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&I==="await"&&this.raiseRecoverable(d,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&rl)&&I==="arguments"&&this.raiseRecoverable(d,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(I==="arguments"||I==="await")&&this.raise(d,"Cannot use "+I+" in class static initialization block"),this.keywords.test(I)&&this.raise(d,"Unexpected keyword '"+I+"'"),!(this.options.ecmaVersion<6&&this.input.slice(d,x).indexOf("\\")!==-1)){var N=this.strict?this.reservedWordsStrict:this.reservedWords;N.test(I)&&(!this.inAsync&&I==="await"&&this.raiseRecoverable(d,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(d,"The keyword '"+I+"' is reserved"))}},fe.parseIdent=function(c){var d=this.parseIdentNode();return this.next(!!c),this.finishNode(d,"Identifier"),c||(this.checkUnreserved(d),d.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=d.start)),d},fe.parseIdentNode=function(){var c=this.startNode();return this.type===_.name?c.name=this.value:this.type.keyword?(c.name=this.type.keyword,(c.name==="class"||c.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=_.name):this.unexpected(),c},fe.parsePrivateIdent=function(){var c=this.startNode();return this.type===_.privateId?c.name=this.value:this.unexpected(),this.next(),this.finishNode(c,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(c.start,"Private field '#"+c.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(c)),c},fe.parseYield=function(c){this.yieldPos||(this.yieldPos=this.start);var d=this.startNode();return this.next(),this.type===_.semi||this.canInsertSemicolon()||this.type!==_.star&&!this.type.startsExpr?(d.delegate=!1,d.argument=null):(d.delegate=this.eat(_.star),d.argument=this.parseMaybeAssign(c)),this.finishNode(d,"YieldExpression")},fe.parseAwait=function(c){this.awaitPos||(this.awaitPos=this.start);var d=this.startNode();return this.next(),d.argument=this.parseMaybeUnary(null,!0,!1,c),this.finishNode(d,"AwaitExpression")};var al=Xe.prototype;al.raise=function(c,d){var x=ye(this.input,c);d+=" ("+x.line+":"+x.column+")",this.sourceFile&&(d+=" in "+this.sourceFile);var I=new SyntaxError(d);throw I.pos=c,I.loc=x,I.raisedAt=this.pos,I},al.raiseRecoverable=al.raise,al.curPosition=function(){if(this.options.locations)return new K(this.curLine,this.pos-this.lineStart)};var dn=Xe.prototype,$F=function(d){this.flags=d,this.var=[],this.lexical=[],this.functions=[]};dn.enterScope=function(c){this.scopeStack.push(new $F(c))},dn.exitScope=function(){this.scopeStack.pop()},dn.treatFunctionsAsVarInScope=function(c){return c.flags&es||!this.inModule&&c.flags&Zn},dn.declareName=function(c,d,x){var I=!1;if(d===$i){var N=this.currentScope();I=N.lexical.indexOf(c)>-1||N.functions.indexOf(c)>-1||N.var.indexOf(c)>-1,N.lexical.push(c),this.inModule&&N.flags&Zn&&delete this.undefinedExports[c]}else if(d===z1){var M=this.currentScope();M.lexical.push(c)}else if(d===W1){var j=this.currentScope();this.treatFunctionsAsVar?I=j.lexical.indexOf(c)>-1:I=j.lexical.indexOf(c)>-1||j.var.indexOf(c)>-1,j.functions.push(c)}else for(var H=this.scopeStack.length-1;H>=0;--H){var J=this.scopeStack[H];if(J.lexical.indexOf(c)>-1&&!(J.flags&U1&&J.lexical[0]===c)||!this.treatFunctionsAsVarInScope(J)&&J.functions.indexOf(c)>-1){I=!0;break}if(J.var.push(c),this.inModule&&J.flags&Zn&&delete this.undefinedExports[c],J.flags&rl)break}I&&this.raiseRecoverable(x,"Identifier '"+c+"' has already been declared")},dn.checkLocalExport=function(c){this.scopeStack[0].lexical.indexOf(c.name)===-1&&this.scopeStack[0].var.indexOf(c.name)===-1&&(this.undefinedExports[c.name]=c)},dn.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},dn.currentVarScope=function(){for(var c=this.scopeStack.length-1;;c--){var d=this.scopeStack[c];if(d.flags&(rl|Eo|ts))return d}},dn.currentThisScope=function(){for(var c=this.scopeStack.length-1;;c--){var d=this.scopeStack[c];if(d.flags&(rl|Eo|ts)&&!(d.flags&Gm))return d}};var No=function(d,x,I){this.type="",this.start=x,this.end=0,d.options.locations&&(this.loc=new pe(d,I)),d.options.directSourceFile&&(this.sourceFile=d.options.directSourceFile),d.options.ranges&&(this.range=[x,0])},Lo=Xe.prototype;Lo.startNode=function(){return new No(this,this.start,this.startLoc)},Lo.startNodeAt=function(c,d){return new No(this,c,d)};function Y1(c,d,x,I){return c.type=d,c.end=x,this.options.locations&&(c.loc.end=I),this.options.ranges&&(c.range[1]=x),c}Lo.finishNode=function(c,d){return Y1.call(this,c,d,this.lastTokEnd,this.lastTokEndLoc)},Lo.finishNodeAt=function(c,d,x,I){return Y1.call(this,c,d,x,I)},Lo.copyNode=function(c){var d=new No(this,c.start,this.startLoc);for(var x in c)d[x]=c[x];return d};var UF="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",X1="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Z1=X1+" Extended_Pictographic",ew=Z1,tw=ew+" EBase EComp EMod EPres ExtPict",rw=tw,HF=rw,GF={9:X1,10:Z1,11:ew,12:tw,13:rw,14:HF},WF="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",zF={9:"",10:"",11:"",12:"",13:"",14:WF},iw="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",nw="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",sw=nw+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",aw=sw+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",ow=aw+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",uw=ow+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",JF=uw+" "+UF,KF={9:nw,10:sw,11:aw,12:ow,13:uw,14:JF},cw={};function QF(c){var d=cw[c]={binary:U(GF[c]+" "+iw),binaryOfStrings:U(zF[c]),nonBinary:{General_Category:U(iw),Script:U(KF[c])}};d.nonBinary.Script_Extensions=d.nonBinary.Script,d.nonBinary.gc=d.nonBinary.General_Category,d.nonBinary.sc=d.nonBinary.Script,d.nonBinary.scx=d.nonBinary.Script_Extensions}for(var Ym=0,lw=[9,10,11,12,13,14];Ym<lw.length;Ym+=1){var YF=lw[Ym];QF(YF)}var te=Xe.prototype,ol=function(d,x){this.parent=d,this.base=x||this};ol.prototype.separatedFrom=function(d){for(var x=this;x;x=x.parent)for(var I=d;I;I=I.parent)if(x.base===I.base&&x!==I)return!0;return!1},ol.prototype.sibling=function(){return new ol(this.parent,this.base)};var wi=function(d){this.parser=d,this.validFlags="gim"+(d.options.ecmaVersion>=6?"uy":"")+(d.options.ecmaVersion>=9?"s":"")+(d.options.ecmaVersion>=13?"d":"")+(d.options.ecmaVersion>=15?"v":""),this.unicodeProperties=cw[d.options.ecmaVersion>=14?14:d.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};wi.prototype.reset=function(d,x,I){var N=I.indexOf("v")!==-1,M=I.indexOf("u")!==-1;this.start=d|0,this.source=x+"",this.flags=I,N&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=M&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=M&&this.parser.options.ecmaVersion>=9)},wi.prototype.raise=function(d){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+d)},wi.prototype.at=function(d,x){x===void 0&&(x=!1);var I=this.source,N=I.length;if(d>=N)return-1;var M=I.charCodeAt(d);if(!(x||this.switchU)||M<=55295||M>=57344||d+1>=N)return M;var j=I.charCodeAt(d+1);return j>=56320&&j<=57343?(M<<10)+j-56613888:M},wi.prototype.nextIndex=function(d,x){x===void 0&&(x=!1);var I=this.source,N=I.length;if(d>=N)return N;var M=I.charCodeAt(d),j;return!(x||this.switchU)||M<=55295||M>=57344||d+1>=N||(j=I.charCodeAt(d+1))<56320||j>57343?d+1:d+2},wi.prototype.current=function(d){return d===void 0&&(d=!1),this.at(this.pos,d)},wi.prototype.lookahead=function(d){return d===void 0&&(d=!1),this.at(this.nextIndex(this.pos,d),d)},wi.prototype.advance=function(d){d===void 0&&(d=!1),this.pos=this.nextIndex(this.pos,d)},wi.prototype.eat=function(d,x){return x===void 0&&(x=!1),this.current(x)===d?(this.advance(x),!0):!1},wi.prototype.eatChars=function(d,x){x===void 0&&(x=!1);for(var I=this.pos,N=0,M=d;N<M.length;N+=1){var j=M[N],H=this.at(I,x);if(H===-1||H!==j)return!1;I=this.nextIndex(I,x)}return this.pos=I,!0},te.validateRegExpFlags=function(c){for(var d=c.validFlags,x=c.flags,I=!1,N=!1,M=0;M<x.length;M++){var j=x.charAt(M);d.indexOf(j)===-1&&this.raise(c.start,"Invalid regular expression flag"),x.indexOf(j,M+1)>-1&&this.raise(c.start,"Duplicate regular expression flag"),j==="u"&&(I=!0),j==="v"&&(N=!0)}this.options.ecmaVersion>=15&&I&&N&&this.raise(c.start,"Invalid regular expression flag")};function XF(c){for(var d in c)return!0;return!1}te.validateRegExpPattern=function(c){this.regexp_pattern(c),!c.switchN&&this.options.ecmaVersion>=9&&XF(c.groupNames)&&(c.switchN=!0,this.regexp_pattern(c))},te.regexp_pattern=function(c){c.pos=0,c.lastIntValue=0,c.lastStringValue="",c.lastAssertionIsQuantifiable=!1,c.numCapturingParens=0,c.maxBackReference=0,c.groupNames=Object.create(null),c.backReferenceNames.length=0,c.branchID=null,this.regexp_disjunction(c),c.pos!==c.source.length&&(c.eat(41)&&c.raise("Unmatched ')'"),(c.eat(93)||c.eat(125))&&c.raise("Lone quantifier brackets")),c.maxBackReference>c.numCapturingParens&&c.raise("Invalid escape");for(var d=0,x=c.backReferenceNames;d<x.length;d+=1){var I=x[d];c.groupNames[I]||c.raise("Invalid named capture referenced")}},te.regexp_disjunction=function(c){var d=this.options.ecmaVersion>=16;for(d&&(c.branchID=new ol(c.branchID,null)),this.regexp_alternative(c);c.eat(124);)d&&(c.branchID=c.branchID.sibling()),this.regexp_alternative(c);d&&(c.branchID=c.branchID.parent),this.regexp_eatQuantifier(c,!0)&&c.raise("Nothing to repeat"),c.eat(123)&&c.raise("Lone quantifier brackets")},te.regexp_alternative=function(c){for(;c.pos<c.source.length&&this.regexp_eatTerm(c););},te.regexp_eatTerm=function(c){return this.regexp_eatAssertion(c)?(c.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(c)&&c.switchU&&c.raise("Invalid quantifier"),!0):(c.switchU?this.regexp_eatAtom(c):this.regexp_eatExtendedAtom(c))?(this.regexp_eatQuantifier(c),!0):!1},te.regexp_eatAssertion=function(c){var d=c.pos;if(c.lastAssertionIsQuantifiable=!1,c.eat(94)||c.eat(36))return!0;if(c.eat(92)){if(c.eat(66)||c.eat(98))return!0;c.pos=d}if(c.eat(40)&&c.eat(63)){var x=!1;if(this.options.ecmaVersion>=9&&(x=c.eat(60)),c.eat(61)||c.eat(33))return this.regexp_disjunction(c),c.eat(41)||c.raise("Unterminated group"),c.lastAssertionIsQuantifiable=!x,!0}return c.pos=d,!1},te.regexp_eatQuantifier=function(c,d){return d===void 0&&(d=!1),this.regexp_eatQuantifierPrefix(c,d)?(c.eat(63),!0):!1},te.regexp_eatQuantifierPrefix=function(c,d){return c.eat(42)||c.eat(43)||c.eat(63)||this.regexp_eatBracedQuantifier(c,d)},te.regexp_eatBracedQuantifier=function(c,d){var x=c.pos;if(c.eat(123)){var I=0,N=-1;if(this.regexp_eatDecimalDigits(c)&&(I=c.lastIntValue,c.eat(44)&&this.regexp_eatDecimalDigits(c)&&(N=c.lastIntValue),c.eat(125)))return N!==-1&&N<I&&!d&&c.raise("numbers out of order in {} quantifier"),!0;c.switchU&&!d&&c.raise("Incomplete quantifier"),c.pos=x}return!1},te.regexp_eatAtom=function(c){return this.regexp_eatPatternCharacters(c)||c.eat(46)||this.regexp_eatReverseSolidusAtomEscape(c)||this.regexp_eatCharacterClass(c)||this.regexp_eatUncapturingGroup(c)||this.regexp_eatCapturingGroup(c)},te.regexp_eatReverseSolidusAtomEscape=function(c){var d=c.pos;if(c.eat(92)){if(this.regexp_eatAtomEscape(c))return!0;c.pos=d}return!1},te.regexp_eatUncapturingGroup=function(c){var d=c.pos;if(c.eat(40)){if(c.eat(63)){if(this.options.ecmaVersion>=16){var x=this.regexp_eatModifiers(c),I=c.eat(45);if(x||I){for(var N=0;N<x.length;N++){var M=x.charAt(N);x.indexOf(M,N+1)>-1&&c.raise("Duplicate regular expression modifiers")}if(I){var j=this.regexp_eatModifiers(c);!x&&!j&&c.current()===58&&c.raise("Invalid regular expression modifiers");for(var H=0;H<j.length;H++){var J=j.charAt(H);(j.indexOf(J,H+1)>-1||x.indexOf(J)>-1)&&c.raise("Duplicate regular expression modifiers")}}}}if(c.eat(58)){if(this.regexp_disjunction(c),c.eat(41))return!0;c.raise("Unterminated group")}}c.pos=d}return!1},te.regexp_eatCapturingGroup=function(c){if(c.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(c):c.current()===63&&c.raise("Invalid group"),this.regexp_disjunction(c),c.eat(41))return c.numCapturingParens+=1,!0;c.raise("Unterminated group")}return!1},te.regexp_eatModifiers=function(c){for(var d="",x=0;(x=c.current())!==-1&&ZF(x);)d+=W(x),c.advance();return d};function ZF(c){return c===105||c===109||c===115}te.regexp_eatExtendedAtom=function(c){return c.eat(46)||this.regexp_eatReverseSolidusAtomEscape(c)||this.regexp_eatCharacterClass(c)||this.regexp_eatUncapturingGroup(c)||this.regexp_eatCapturingGroup(c)||this.regexp_eatInvalidBracedQuantifier(c)||this.regexp_eatExtendedPatternCharacter(c)},te.regexp_eatInvalidBracedQuantifier=function(c){return this.regexp_eatBracedQuantifier(c,!0)&&c.raise("Nothing to repeat"),!1},te.regexp_eatSyntaxCharacter=function(c){var d=c.current();return fw(d)?(c.lastIntValue=d,c.advance(),!0):!1};function fw(c){return c===36||c>=40&&c<=43||c===46||c===63||c>=91&&c<=94||c>=123&&c<=125}te.regexp_eatPatternCharacters=function(c){for(var d=c.pos,x=0;(x=c.current())!==-1&&!fw(x);)c.advance();return c.pos!==d},te.regexp_eatExtendedPatternCharacter=function(c){var d=c.current();return d!==-1&&d!==36&&!(d>=40&&d<=43)&&d!==46&&d!==63&&d!==91&&d!==94&&d!==124?(c.advance(),!0):!1},te.regexp_groupSpecifier=function(c){if(c.eat(63)){this.regexp_eatGroupName(c)||c.raise("Invalid group");var d=this.options.ecmaVersion>=16,x=c.groupNames[c.lastStringValue];if(x)if(d)for(var I=0,N=x;I<N.length;I+=1){var M=N[I];M.separatedFrom(c.branchID)||c.raise("Duplicate capture group name")}else c.raise("Duplicate capture group name");d?(x||(c.groupNames[c.lastStringValue]=[])).push(c.branchID):c.groupNames[c.lastStringValue]=!0}},te.regexp_eatGroupName=function(c){if(c.lastStringValue="",c.eat(60)){if(this.regexp_eatRegExpIdentifierName(c)&&c.eat(62))return!0;c.raise("Invalid capture group name")}return!1},te.regexp_eatRegExpIdentifierName=function(c){if(c.lastStringValue="",this.regexp_eatRegExpIdentifierStart(c)){for(c.lastStringValue+=W(c.lastIntValue);this.regexp_eatRegExpIdentifierPart(c);)c.lastStringValue+=W(c.lastIntValue);return!0}return!1},te.regexp_eatRegExpIdentifierStart=function(c){var d=c.pos,x=this.options.ecmaVersion>=11,I=c.current(x);return c.advance(x),I===92&&this.regexp_eatRegExpUnicodeEscapeSequence(c,x)&&(I=c.lastIntValue),e4(I)?(c.lastIntValue=I,!0):(c.pos=d,!1)};function e4(c){return p(c,!0)||c===36||c===95}te.regexp_eatRegExpIdentifierPart=function(c){var d=c.pos,x=this.options.ecmaVersion>=11,I=c.current(x);return c.advance(x),I===92&&this.regexp_eatRegExpUnicodeEscapeSequence(c,x)&&(I=c.lastIntValue),t4(I)?(c.lastIntValue=I,!0):(c.pos=d,!1)};function t4(c){return m(c,!0)||c===36||c===95||c===8204||c===8205}te.regexp_eatAtomEscape=function(c){return this.regexp_eatBackReference(c)||this.regexp_eatCharacterClassEscape(c)||this.regexp_eatCharacterEscape(c)||c.switchN&&this.regexp_eatKGroupName(c)?!0:(c.switchU&&(c.current()===99&&c.raise("Invalid unicode escape"),c.raise("Invalid escape")),!1)},te.regexp_eatBackReference=function(c){var d=c.pos;if(this.regexp_eatDecimalEscape(c)){var x=c.lastIntValue;if(c.switchU)return x>c.maxBackReference&&(c.maxBackReference=x),!0;if(x<=c.numCapturingParens)return!0;c.pos=d}return!1},te.regexp_eatKGroupName=function(c){if(c.eat(107)){if(this.regexp_eatGroupName(c))return c.backReferenceNames.push(c.lastStringValue),!0;c.raise("Invalid named reference")}return!1},te.regexp_eatCharacterEscape=function(c){return this.regexp_eatControlEscape(c)||this.regexp_eatCControlLetter(c)||this.regexp_eatZero(c)||this.regexp_eatHexEscapeSequence(c)||this.regexp_eatRegExpUnicodeEscapeSequence(c,!1)||!c.switchU&&this.regexp_eatLegacyOctalEscapeSequence(c)||this.regexp_eatIdentityEscape(c)},te.regexp_eatCControlLetter=function(c){var d=c.pos;if(c.eat(99)){if(this.regexp_eatControlLetter(c))return!0;c.pos=d}return!1},te.regexp_eatZero=function(c){return c.current()===48&&!ul(c.lookahead())?(c.lastIntValue=0,c.advance(),!0):!1},te.regexp_eatControlEscape=function(c){var d=c.current();return d===116?(c.lastIntValue=9,c.advance(),!0):d===110?(c.lastIntValue=10,c.advance(),!0):d===118?(c.lastIntValue=11,c.advance(),!0):d===102?(c.lastIntValue=12,c.advance(),!0):d===114?(c.lastIntValue=13,c.advance(),!0):!1},te.regexp_eatControlLetter=function(c){var d=c.current();return pw(d)?(c.lastIntValue=d%32,c.advance(),!0):!1};function pw(c){return c>=65&&c<=90||c>=97&&c<=122}te.regexp_eatRegExpUnicodeEscapeSequence=function(c,d){d===void 0&&(d=!1);var x=c.pos,I=d||c.switchU;if(c.eat(117)){if(this.regexp_eatFixedHexDigits(c,4)){var N=c.lastIntValue;if(I&&N>=55296&&N<=56319){var M=c.pos;if(c.eat(92)&&c.eat(117)&&this.regexp_eatFixedHexDigits(c,4)){var j=c.lastIntValue;if(j>=56320&&j<=57343)return c.lastIntValue=(N-55296)*1024+(j-56320)+65536,!0}c.pos=M,c.lastIntValue=N}return!0}if(I&&c.eat(123)&&this.regexp_eatHexDigits(c)&&c.eat(125)&&r4(c.lastIntValue))return!0;I&&c.raise("Invalid unicode escape"),c.pos=x}return!1};function r4(c){return c>=0&&c<=1114111}te.regexp_eatIdentityEscape=function(c){if(c.switchU)return this.regexp_eatSyntaxCharacter(c)?!0:c.eat(47)?(c.lastIntValue=47,!0):!1;var d=c.current();return d!==99&&(!c.switchN||d!==107)?(c.lastIntValue=d,c.advance(),!0):!1},te.regexp_eatDecimalEscape=function(c){c.lastIntValue=0;var d=c.current();if(d>=49&&d<=57){do c.lastIntValue=10*c.lastIntValue+(d-48),c.advance();while((d=c.current())>=48&&d<=57);return!0}return!1};var hw=0,Ui=1,Gr=2;te.regexp_eatCharacterClassEscape=function(c){var d=c.current();if(i4(d))return c.lastIntValue=-1,c.advance(),Ui;var x=!1;if(c.switchU&&this.options.ecmaVersion>=9&&((x=d===80)||d===112)){c.lastIntValue=-1,c.advance();var I;if(c.eat(123)&&(I=this.regexp_eatUnicodePropertyValueExpression(c))&&c.eat(125))return x&&I===Gr&&c.raise("Invalid property name"),I;c.raise("Invalid property name")}return hw};function i4(c){return c===100||c===68||c===115||c===83||c===119||c===87}te.regexp_eatUnicodePropertyValueExpression=function(c){var d=c.pos;if(this.regexp_eatUnicodePropertyName(c)&&c.eat(61)){var x=c.lastStringValue;if(this.regexp_eatUnicodePropertyValue(c)){var I=c.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(c,x,I),Ui}}if(c.pos=d,this.regexp_eatLoneUnicodePropertyNameOrValue(c)){var N=c.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(c,N)}return hw},te.regexp_validateUnicodePropertyNameAndValue=function(c,d,x){V(c.unicodeProperties.nonBinary,d)||c.raise("Invalid property name"),c.unicodeProperties.nonBinary[d].test(x)||c.raise("Invalid property value")},te.regexp_validateUnicodePropertyNameOrValue=function(c,d){if(c.unicodeProperties.binary.test(d))return Ui;if(c.switchV&&c.unicodeProperties.binaryOfStrings.test(d))return Gr;c.raise("Invalid property name")},te.regexp_eatUnicodePropertyName=function(c){var d=0;for(c.lastStringValue="";dw(d=c.current());)c.lastStringValue+=W(d),c.advance();return c.lastStringValue!==""};function dw(c){return pw(c)||c===95}te.regexp_eatUnicodePropertyValue=function(c){var d=0;for(c.lastStringValue="";n4(d=c.current());)c.lastStringValue+=W(d),c.advance();return c.lastStringValue!==""};function n4(c){return dw(c)||ul(c)}te.regexp_eatLoneUnicodePropertyNameOrValue=function(c){return this.regexp_eatUnicodePropertyValue(c)},te.regexp_eatCharacterClass=function(c){if(c.eat(91)){var d=c.eat(94),x=this.regexp_classContents(c);return c.eat(93)||c.raise("Unterminated character class"),d&&x===Gr&&c.raise("Negated character class may contain strings"),!0}return!1},te.regexp_classContents=function(c){return c.current()===93?Ui:c.switchV?this.regexp_classSetExpression(c):(this.regexp_nonEmptyClassRanges(c),Ui)},te.regexp_nonEmptyClassRanges=function(c){for(;this.regexp_eatClassAtom(c);){var d=c.lastIntValue;if(c.eat(45)&&this.regexp_eatClassAtom(c)){var x=c.lastIntValue;c.switchU&&(d===-1||x===-1)&&c.raise("Invalid character class"),d!==-1&&x!==-1&&d>x&&c.raise("Range out of order in character class")}}},te.regexp_eatClassAtom=function(c){var d=c.pos;if(c.eat(92)){if(this.regexp_eatClassEscape(c))return!0;if(c.switchU){var x=c.current();(x===99||yw(x))&&c.raise("Invalid class escape"),c.raise("Invalid escape")}c.pos=d}var I=c.current();return I!==93?(c.lastIntValue=I,c.advance(),!0):!1},te.regexp_eatClassEscape=function(c){var d=c.pos;if(c.eat(98))return c.lastIntValue=8,!0;if(c.switchU&&c.eat(45))return c.lastIntValue=45,!0;if(!c.switchU&&c.eat(99)){if(this.regexp_eatClassControlLetter(c))return!0;c.pos=d}return this.regexp_eatCharacterClassEscape(c)||this.regexp_eatCharacterEscape(c)},te.regexp_classSetExpression=function(c){var d=Ui,x;if(!this.regexp_eatClassSetRange(c))if(x=this.regexp_eatClassSetOperand(c)){x===Gr&&(d=Gr);for(var I=c.pos;c.eatChars([38,38]);){if(c.current()!==38&&(x=this.regexp_eatClassSetOperand(c))){x!==Gr&&(d=Ui);continue}c.raise("Invalid character in character class")}if(I!==c.pos)return d;for(;c.eatChars([45,45]);)this.regexp_eatClassSetOperand(c)||c.raise("Invalid character in character class");if(I!==c.pos)return d}else c.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(c)){if(x=this.regexp_eatClassSetOperand(c),!x)return d;x===Gr&&(d=Gr)}},te.regexp_eatClassSetRange=function(c){var d=c.pos;if(this.regexp_eatClassSetCharacter(c)){var x=c.lastIntValue;if(c.eat(45)&&this.regexp_eatClassSetCharacter(c)){var I=c.lastIntValue;return x!==-1&&I!==-1&&x>I&&c.raise("Range out of order in character class"),!0}c.pos=d}return!1},te.regexp_eatClassSetOperand=function(c){return this.regexp_eatClassSetCharacter(c)?Ui:this.regexp_eatClassStringDisjunction(c)||this.regexp_eatNestedClass(c)},te.regexp_eatNestedClass=function(c){var d=c.pos;if(c.eat(91)){var x=c.eat(94),I=this.regexp_classContents(c);if(c.eat(93))return x&&I===Gr&&c.raise("Negated character class may contain strings"),I;c.pos=d}if(c.eat(92)){var N=this.regexp_eatCharacterClassEscape(c);if(N)return N;c.pos=d}return null},te.regexp_eatClassStringDisjunction=function(c){var d=c.pos;if(c.eatChars([92,113])){if(c.eat(123)){var x=this.regexp_classStringDisjunctionContents(c);if(c.eat(125))return x}else c.raise("Invalid escape");c.pos=d}return null},te.regexp_classStringDisjunctionContents=function(c){for(var d=this.regexp_classString(c);c.eat(124);)this.regexp_classString(c)===Gr&&(d=Gr);return d},te.regexp_classString=function(c){for(var d=0;this.regexp_eatClassSetCharacter(c);)d++;return d===1?Ui:Gr},te.regexp_eatClassSetCharacter=function(c){var d=c.pos;if(c.eat(92))return this.regexp_eatCharacterEscape(c)||this.regexp_eatClassSetReservedPunctuator(c)?!0:c.eat(98)?(c.lastIntValue=8,!0):(c.pos=d,!1);var x=c.current();return x<0||x===c.lookahead()&&s4(x)||a4(x)?!1:(c.advance(),c.lastIntValue=x,!0)};function s4(c){return c===33||c>=35&&c<=38||c>=42&&c<=44||c===46||c>=58&&c<=64||c===94||c===96||c===126}function a4(c){return c===40||c===41||c===45||c===47||c>=91&&c<=93||c>=123&&c<=125}te.regexp_eatClassSetReservedPunctuator=function(c){var d=c.current();return o4(d)?(c.lastIntValue=d,c.advance(),!0):!1};function o4(c){return c===33||c===35||c===37||c===38||c===44||c===45||c>=58&&c<=62||c===64||c===96||c===126}te.regexp_eatClassControlLetter=function(c){var d=c.current();return ul(d)||d===95?(c.lastIntValue=d%32,c.advance(),!0):!1},te.regexp_eatHexEscapeSequence=function(c){var d=c.pos;if(c.eat(120)){if(this.regexp_eatFixedHexDigits(c,2))return!0;c.switchU&&c.raise("Invalid escape"),c.pos=d}return!1},te.regexp_eatDecimalDigits=function(c){var d=c.pos,x=0;for(c.lastIntValue=0;ul(x=c.current());)c.lastIntValue=10*c.lastIntValue+(x-48),c.advance();return c.pos!==d};function ul(c){return c>=48&&c<=57}te.regexp_eatHexDigits=function(c){var d=c.pos,x=0;for(c.lastIntValue=0;mw(x=c.current());)c.lastIntValue=16*c.lastIntValue+gw(x),c.advance();return c.pos!==d};function mw(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}function gw(c){return c>=65&&c<=70?10+(c-65):c>=97&&c<=102?10+(c-97):c-48}te.regexp_eatLegacyOctalEscapeSequence=function(c){if(this.regexp_eatOctalDigit(c)){var d=c.lastIntValue;if(this.regexp_eatOctalDigit(c)){var x=c.lastIntValue;d<=3&&this.regexp_eatOctalDigit(c)?c.lastIntValue=d*64+x*8+c.lastIntValue:c.lastIntValue=d*8+x}else c.lastIntValue=d;return!0}return!1},te.regexp_eatOctalDigit=function(c){var d=c.current();return yw(d)?(c.lastIntValue=d-48,c.advance(),!0):(c.lastIntValue=0,!1)};function yw(c){return c>=48&&c<=55}te.regexp_eatFixedHexDigits=function(c,d){var x=c.pos;c.lastIntValue=0;for(var I=0;I<d;++I){var N=c.current();if(!mw(N))return c.pos=x,!1;c.lastIntValue=16*c.lastIntValue+gw(N),c.advance()}return!0};var cl=function(d){this.type=d.type,this.value=d.value,this.start=d.start,this.end=d.end,d.options.locations&&(this.loc=new pe(d,d.startLoc,d.endLoc)),d.options.ranges&&(this.range=[d.start,d.end])},be=Xe.prototype;be.next=function(c){!c&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new cl(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},be.getToken=function(){return this.next(),new cl(this)},typeof Symbol<"u"&&(be[Symbol.iterator]=function(){var c=this;return{next:function(){var d=c.getToken();return{done:d.type===_.eof,value:d}}}}),be.nextToken=function(){var c=this.curContext();if((!c||!c.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(_.eof);if(c.override)return c.override(this);this.readToken(this.fullCharCodeAtPos())},be.readToken=function(c){return p(c,this.options.ecmaVersion>=6)||c===92?this.readWord():this.getTokenFromCode(c)},be.fullCharCodeAt=function(c){var d=this.input.charCodeAt(c);if(d<=55295||d>=56320)return d;var x=this.input.charCodeAt(c+1);return x<=56319||x>=57344?d:(d<<10)+x-56613888},be.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},be.skipBlockComment=function(){var c=this.options.onComment&&this.curPosition(),d=this.pos,x=this.input.indexOf("*/",this.pos+=2);if(x===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=x+2,this.options.locations)for(var I=void 0,N=d;(I=L(this.input,N,this.pos))>-1;)++this.curLine,N=this.lineStart=I;this.options.onComment&&this.options.onComment(!0,this.input.slice(d+2,x),d,this.pos,c,this.curPosition())},be.skipLineComment=function(c){for(var d=this.pos,x=this.options.onComment&&this.curPosition(),I=this.input.charCodeAt(this.pos+=c);this.pos<this.input.length&&!O(I);)I=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(d+c,this.pos),d,this.pos,x,this.curPosition())},be.skipSpace=function(){e:for(;this.pos<this.input.length;){var c=this.input.charCodeAt(this.pos);switch(c){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(c>8&&c<14||c>=5760&&B.test(String.fromCharCode(c)))++this.pos;else break e}}},be.finishToken=function(c,d){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var x=this.type;this.type=c,this.value=d,this.updateContext(x)},be.readToken_dot=function(){var c=this.input.charCodeAt(this.pos+1);if(c>=48&&c<=57)return this.readNumber(!0);var d=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&c===46&&d===46?(this.pos+=3,this.finishToken(_.ellipsis)):(++this.pos,this.finishToken(_.dot))},be.readToken_slash=function(){var c=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):c===61?this.finishOp(_.assign,2):this.finishOp(_.slash,1)},be.readToken_mult_modulo_exp=function(c){var d=this.input.charCodeAt(this.pos+1),x=1,I=c===42?_.star:_.modulo;return this.options.ecmaVersion>=7&&c===42&&d===42&&(++x,I=_.starstar,d=this.input.charCodeAt(this.pos+2)),d===61?this.finishOp(_.assign,x+1):this.finishOp(I,x)},be.readToken_pipe_amp=function(c){var d=this.input.charCodeAt(this.pos+1);if(d===c){if(this.options.ecmaVersion>=12){var x=this.input.charCodeAt(this.pos+2);if(x===61)return this.finishOp(_.assign,3)}return this.finishOp(c===124?_.logicalOR:_.logicalAND,2)}return d===61?this.finishOp(_.assign,2):this.finishOp(c===124?_.bitwiseOR:_.bitwiseAND,1)},be.readToken_caret=function(){var c=this.input.charCodeAt(this.pos+1);return c===61?this.finishOp(_.assign,2):this.finishOp(_.bitwiseXOR,1)},be.readToken_plus_min=function(c){var d=this.input.charCodeAt(this.pos+1);return d===c?d===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||A.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(_.incDec,2):d===61?this.finishOp(_.assign,2):this.finishOp(_.plusMin,1)},be.readToken_lt_gt=function(c){var d=this.input.charCodeAt(this.pos+1),x=1;return d===c?(x=c===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+x)===61?this.finishOp(_.assign,x+1):this.finishOp(_.bitShift,x)):d===33&&c===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(d===61&&(x=2),this.finishOp(_.relational,x))},be.readToken_eq_excl=function(c){var d=this.input.charCodeAt(this.pos+1);return d===61?this.finishOp(_.equality,this.input.charCodeAt(this.pos+2)===61?3:2):c===61&&d===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(_.arrow)):this.finishOp(c===61?_.eq:_.prefix,1)},be.readToken_question=function(){var c=this.options.ecmaVersion;if(c>=11){var d=this.input.charCodeAt(this.pos+1);if(d===46){var x=this.input.charCodeAt(this.pos+2);if(x<48||x>57)return this.finishOp(_.questionDot,2)}if(d===63){if(c>=12){var I=this.input.charCodeAt(this.pos+2);if(I===61)return this.finishOp(_.assign,3)}return this.finishOp(_.coalesce,2)}}return this.finishOp(_.question,1)},be.readToken_numberSign=function(){var c=this.options.ecmaVersion,d=35;if(c>=13&&(++this.pos,d=this.fullCharCodeAtPos(),p(d,!0)||d===92))return this.finishToken(_.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+W(d)+"'")},be.getTokenFromCode=function(c){switch(c){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(_.parenL);case 41:return++this.pos,this.finishToken(_.parenR);case 59:return++this.pos,this.finishToken(_.semi);case 44:return++this.pos,this.finishToken(_.comma);case 91:return++this.pos,this.finishToken(_.bracketL);case 93:return++this.pos,this.finishToken(_.bracketR);case 123:return++this.pos,this.finishToken(_.braceL);case 125:return++this.pos,this.finishToken(_.braceR);case 58:return++this.pos,this.finishToken(_.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(_.backQuote);case 48:var d=this.input.charCodeAt(this.pos+1);if(d===120||d===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(d===111||d===79)return this.readRadixNumber(8);if(d===98||d===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(c);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(c);case 124:case 38:return this.readToken_pipe_amp(c);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(c);case 60:case 62:return this.readToken_lt_gt(c);case 61:case 33:return this.readToken_eq_excl(c);case 63:return this.readToken_question();case 126:return this.finishOp(_.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+W(c)+"'")},be.finishOp=function(c,d){var x=this.input.slice(this.pos,this.pos+d);return this.pos+=d,this.finishToken(c,x)},be.readRegexp=function(){for(var c,d,x=this.pos;;){this.pos>=this.input.length&&this.raise(x,"Unterminated regular expression");var I=this.input.charAt(this.pos);if(A.test(I)&&this.raise(x,"Unterminated regular expression"),c)c=!1;else{if(I==="[")d=!0;else if(I==="]"&&d)d=!1;else if(I==="/"&&!d)break;c=I==="\\"}++this.pos}var N=this.input.slice(x,this.pos);++this.pos;var M=this.pos,j=this.readWord1();this.containsEsc&&this.unexpected(M);var H=this.regexpState||(this.regexpState=new wi(this));H.reset(x,N,j),this.validateRegExpFlags(H),this.validateRegExpPattern(H);var J=null;try{J=new RegExp(N,j)}catch{}return this.finishToken(_.regexp,{pattern:N,flags:j,value:J})},be.readInt=function(c,d,x){for(var I=this.options.ecmaVersion>=12&&d===void 0,N=x&&this.input.charCodeAt(this.pos)===48,M=this.pos,j=0,H=0,J=0,ue=d??1/0;J<ue;++J,++this.pos){var _e=this.input.charCodeAt(this.pos),Ve=void 0;if(I&&_e===95){N&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),H===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),J===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),H=_e;continue}if(_e>=97?Ve=_e-97+10:_e>=65?Ve=_e-65+10:_e>=48&&_e<=57?Ve=_e-48:Ve=1/0,Ve>=c)break;H=_e,j=j*c+Ve}return I&&H===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===M||d!=null&&this.pos-M!==d?null:j};function u4(c,d){return d?parseInt(c,8):parseFloat(c.replace(/_/g,""))}function _w(c){return typeof BigInt!="function"?null:BigInt(c.replace(/_/g,""))}be.readRadixNumber=function(c){var d=this.pos;this.pos+=2;var x=this.readInt(c);return x==null&&this.raise(this.start+2,"Expected number in radix "+c),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(x=_w(this.input.slice(d,this.pos)),++this.pos):p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(_.num,x)},be.readNumber=function(c){var d=this.pos;!c&&this.readInt(10,void 0,!0)===null&&this.raise(d,"Invalid number");var x=this.pos-d>=2&&this.input.charCodeAt(d)===48;x&&this.strict&&this.raise(d,"Invalid number");var I=this.input.charCodeAt(this.pos);if(!x&&!c&&this.options.ecmaVersion>=11&&I===110){var N=_w(this.input.slice(d,this.pos));return++this.pos,p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(_.num,N)}x&&/[89]/.test(this.input.slice(d,this.pos))&&(x=!1),I===46&&!x&&(++this.pos,this.readInt(10),I=this.input.charCodeAt(this.pos)),(I===69||I===101)&&!x&&(I=this.input.charCodeAt(++this.pos),(I===43||I===45)&&++this.pos,this.readInt(10)===null&&this.raise(d,"Invalid number")),p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var M=u4(this.input.slice(d,this.pos),x);return this.finishToken(_.num,M)},be.readCodePoint=function(){var c=this.input.charCodeAt(this.pos),d;if(c===123){this.options.ecmaVersion<6&&this.unexpected();var x=++this.pos;d=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,d>1114111&&this.invalidStringToken(x,"Code point out of bounds")}else d=this.readHexChar(4);return d},be.readString=function(c){for(var d="",x=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var I=this.input.charCodeAt(this.pos);if(I===c)break;I===92?(d+=this.input.slice(x,this.pos),d+=this.readEscapedChar(!1),x=this.pos):I===8232||I===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(O(I)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return d+=this.input.slice(x,this.pos++),this.finishToken(_.string,d)};var vw={};be.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(c){if(c===vw)this.readInvalidTemplateToken();else throw c}this.inTemplateElement=!1},be.invalidStringToken=function(c,d){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw vw;this.raise(c,d)},be.readTmplToken=function(){for(var c="",d=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var x=this.input.charCodeAt(this.pos);if(x===96||x===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===_.template||this.type===_.invalidTemplate)?x===36?(this.pos+=2,this.finishToken(_.dollarBraceL)):(++this.pos,this.finishToken(_.backQuote)):(c+=this.input.slice(d,this.pos),this.finishToken(_.template,c));if(x===92)c+=this.input.slice(d,this.pos),c+=this.readEscapedChar(!0),d=this.pos;else if(O(x)){switch(c+=this.input.slice(d,this.pos),++this.pos,x){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:c+=`
|
|
1203
|
-
`;break;default:c+=String.fromCharCode(x);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),d=this.pos}else++this.pos}},be.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(_.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
|
|
1204
|
-
`&&++this.pos;case`
|
|
1205
|
-
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")},be.readEscapedChar=function(c){var d=this.input.charCodeAt(++this.pos);switch(++this.pos,d){case 110:return`
|
|
1206
|
-
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return W(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),c){var x=this.pos-1;this.invalidStringToken(x,"Invalid escape sequence in template string")}default:if(d>=48&&d<=55){var I=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],N=parseInt(I,8);return N>255&&(I=I.slice(0,-1),N=parseInt(I,8)),this.pos+=I.length-1,d=this.input.charCodeAt(this.pos),(I!=="0"||d===56||d===57)&&(this.strict||c)&&this.invalidStringToken(this.pos-1-I.length,c?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(N)}return O(d)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(d)}},be.readHexChar=function(c){var d=this.pos,x=this.readInt(16,c);return x===null&&this.invalidStringToken(d,"Bad character escape sequence"),x},be.readWord1=function(){this.containsEsc=!1;for(var c="",d=!0,x=this.pos,I=this.options.ecmaVersion>=6;this.pos<this.input.length;){var N=this.fullCharCodeAtPos();if(m(N,I))this.pos+=N<=65535?1:2;else if(N===92){this.containsEsc=!0,c+=this.input.slice(x,this.pos);var M=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var j=this.readCodePoint();(d?p:m)(j,I)||this.invalidStringToken(M,"Invalid Unicode escape"),c+=W(j),x=this.pos}else break;d=!1}return c+this.input.slice(x,this.pos)},be.readWord=function(){var c=this.readWord1(),d=_.name;return this.keywords.test(c)&&(d=k[c]),this.finishToken(d,c)};var bw="8.16.0";Xe.acorn={Parser:Xe,version:bw,defaultOptions:nt,Position:K,SourceLocation:pe,getLineInfo:ye,Node:No,TokenType:v,tokTypes:_,keywordTypes:k,TokContext:Hr,tokContexts:Be,isIdentifierChar:m,isIdentifierStart:p,Token:cl,isNewLine:O,lineBreak:A,lineBreakG:E,nonASCIIwhitespace:B};function c4(c,d){return Xe.parse(c,d)}function l4(c,d,x){return Xe.parseExpressionAt(c,d,x)}function f4(c,d){return Xe.tokenizer(c,d)}t.Node=No,t.Parser=Xe,t.Position=K,t.SourceLocation=pe,t.TokContext=Hr,t.Token=cl,t.TokenType=v,t.defaultOptions=nt,t.getLineInfo=ye,t.isIdentifierChar=m,t.isIdentifierStart=p,t.isNewLine=O,t.keywordTypes=k,t.lineBreak=A,t.lineBreakG=E,t.nonASCIIwhitespace=B,t.parse=c4,t.parseExpressionAt=l4,t.tokContexts=Be,t.tokTypes=_,t.tokenizer=f4,t.version=bw}))});var Ed=T(Td=>{"use strict";y();Object.defineProperty(Td,"__esModule",{value:!0});Td.SUPPORTED_ASSET_IMAGE_EXTENSIONS=void 0;Td.SUPPORTED_ASSET_IMAGE_EXTENSIONS=["jpg","jpeg","png","gif","webp","heic","ico"]});var ac=T(_i=>{"use strict";y();Object.defineProperty(_i,"__esModule",{value:!0});_i.identity=void 0;_i.unique=eQ;_i.assertNever=tQ;_i.unexpected=rQ;_i.isString=nQ;_i.extname=sQ;_i.exists=aQ;_i.acceptsLocalBlocks=oQ;function eQ(t){return[...new Set(t)]}function tQ(t){throw new Error(`Unknown module type ${t}`)}function rQ(){return new Error("Unexpected code path encountered")}var iQ=t=>t;_i.identity=iQ;function nQ(t){return typeof t=="string"}function sQ(t){return t.split(".").pop()||""}async function aQ(t,e){return t.stat(e).then(()=>!0).catch(()=>!1)}async function oQ(t,e){let r=await e.getSectionSchema(t).catch(n=>{});if(!r)return new Error("Section does not exist");let i=r.validSchema;return i instanceof Error?i:(i.blocks??[]).some(n=>n.type&&"name"in n&&n.name)}});var f0=T(js=>{"use strict";y();Object.defineProperty(js,"__esModule",{value:!0});js.toCssSourceCode=l0;js.toSvgSourceCode=fQ;js.toJsSourceCode=o2;js.parseJs=u2;js.toSourceCode=hQ;var a2=hr(),uQ=s2(),cQ=Ed(),lQ=ac();async function l0(t,e){return{type:"css",uri:t,source:e,ast:new Error("File parsing not implemented yet")}}async function fQ(t,e){return{type:"svg",uri:t,source:e,ast:new Error("File parsing not implemented yet")}}async function pQ(t,e){return{type:"image",uri:t,source:e,ast:new Error("Image files are not parsed")}}async function o2(t,e){return{type:"javascript",uri:t,source:e,ast:u2(e)}}function u2(t){try{return(0,uQ.parse)(t,{ecmaVersion:"latest",sourceType:"module"})}catch(e){return(0,a2.asError)(e)}}async function hQ(t,e){let r=(0,lQ.extname)(t);if(r==="json"||r==="liquid")return(0,a2.toSourceCode)(t,e);if(r==="js")return o2(t,e);if(r==="css")return l0(t,e);if(r==="svg")return l0(t,e);if(cQ.SUPPORTED_ASSET_IMAGE_EXTENSIONS.includes(r))return pQ(t,e);throw new Error(`Unknown source code type for ${t}`)}});var c2=T(h0=>{"use strict";y();Object.defineProperty(h0,"__esModule",{value:!0});h0.augmentDependencies=mQ;var Bs=hr(),dQ=f0(),p0=ac();function mQ(t,e){return{fs:e.fs,getBlockSchema:(0,Bs.memoize)(e.getBlockSchema,p0.identity),getSectionSchema:(0,Bs.memoize)(e.getSectionSchema,p0.identity),getSourceCode:(0,Bs.memoize)(e.getSourceCode??async function(i){let n=await e.fs.readFile(i);return(0,dQ.toSourceCode)(i,n)},p0.identity),getWebComponentDefinitionReference:e.getWebComponentDefinitionReference,mode:e.mode??"theme",getThemeBlockNames:(0,Bs.memo)(()=>(0,Bs.recursiveReadDirectory)(e.fs,Bs.path.join(t,"blocks"),([r])=>r.endsWith(".liquid")).then(r=>r.map(i=>Bs.path.basename(i,".liquid"))))}}});var m0=T(Fi=>{"use strict";y();Object.defineProperty(Fi,"__esModule",{value:!0});Fi.getModule=yQ;Fi.getTemplateModule=f2;Fi.getThemeBlockModule=p2;Fi.getSectionModule=h2;Fi.getSectionGroupModule=d2;Fi.getAssetModule=m2;Fi.getSnippetModule=g2;Fi.getLayoutModule=y2;var jr=hr(),gQ=Ed(),l2=ac(),d0=new WeakMap;function yQ(t,e){let r=_2(t);if(r.has(e))return r.get(e);let i=jr.path.relative(e,t.rootUri);switch(!0){case i.startsWith("assets"):return m2(t,jr.path.basename(e));case i.startsWith("blocks"):return p2(t,jr.path.basename(e,".liquid"));case i.startsWith("layout"):return y2(t,jr.path.basename(e,".liquid"));case i.startsWith("sections"):return i.endsWith(".json")?d2(t,jr.path.basename(e,".json")):h2(t,jr.path.basename(e,".liquid"));case i.startsWith("snippets"):return g2(t,jr.path.basename(e,".liquid"));case i.startsWith("templates"):return f2(t,e)}}function f2(t,e){switch((0,l2.extname)(e)){case"json":return Pn(t,{type:"JSON",kind:"template",dependencies:[],references:[],uri:e});case"liquid":return Pn(t,{type:"Liquid",kind:"template",dependencies:[],references:[],uri:e});default:throw new Error(`Unknown template type for ${e}`)}}function p2(t,e){let r=jr.path.join(t.rootUri,"blocks",`${e}.liquid`);return Pn(t,{type:"Liquid",kind:"block",dependencies:[],references:[],uri:r})}function h2(t,e){let r=jr.path.join(t.rootUri,"sections",`${e}.liquid`);return Pn(t,{type:"Liquid",kind:"section",dependencies:[],references:[],uri:r})}function d2(t,e){let r=jr.path.join(t.rootUri,"sections",`${e}.json`);return Pn(t,{type:"JSON",kind:"section-group",dependencies:[],references:[],uri:r})}function m2(t,e){let r=(0,l2.extname)(e),i;if(gQ.SUPPORTED_ASSET_IMAGE_EXTENSIONS.includes(r)?i="Image":r==="js"?i="JavaScript":r==="css"?i="CSS":r==="svg"&&(i="SVG"),!!i)return Pn(t,{type:i,kind:"unused",dependencies:[],references:[],uri:jr.path.join(t.rootUri,"assets",e)})}function g2(t,e){let r=jr.path.join(t.rootUri,"snippets",`${e}.liquid`);return Pn(t,{type:"Liquid",kind:"snippet",uri:r,dependencies:[],references:[]})}function y2(t,e="theme"){if(e===!1)return;e===void 0&&(e="theme");let r=jr.path.join(t.rootUri,"layout",`${e}.liquid`);return Pn(t,{type:"Liquid",kind:"layout",uri:r,dependencies:[],references:[]})}function _2(t){return d0.has(t)||d0.set(t,new Map),d0.get(t)}function Pn(t,e){let r=_2(t);return r.has(e.uri)||r.set(e.uri,e),r.get(e.uri)}});var x2=T(Od=>{"use strict";y();Object.defineProperty(Od,"__esModule",{value:!0});Od.traverseModule=ri;Od.bind=ii;var Vs=ge(),Wt=hr(),ji=ac(),ir=m0();async function ri(t,e,r){if(!e.modules[t.uri]&&(e.modules[t.uri]=t,t.exists=await(0,ji.exists)(r.fs,t.uri),!!t.exists))switch(t.type){case"Liquid":return _Q(t,e,r);case"JSON":return wQ(t,e,r);case"JavaScript":return;case"CSS":case"SVG":case"Image":return;default:return(0,ji.assertNever)(t)}}async function _Q(t,e,r){let i=await r.getSourceCode(t.uri);if(i.ast instanceof Error)return;let n={LiquidFilter:(u,l)=>{if(["asset_url","asset_img_url","inline_asset_content"].includes(u.name)){let f=l[l.length-1];if(f.type!==Vs.NodeTypes.LiquidVariable||f.expression.type!==Vs.NodeTypes.String||f.filters[0]!==u)return;let h=f.expression.value,p=(0,ir.getAssetModule)(e,h);return p?{target:p,sourceRange:[f.position.start,f.position.end]}:void 0}},ContentForMarkup:(u,l)=>{let f=l.at(-1);if(u.contentForType.value!=="block")return;let h=u.args.find(v=>v.name==="type");if(!h)return;let p=h.value;if(p.type!==Vs.NodeTypes.String)return;let m=p.value;return{target:(0,ir.getThemeBlockModule)(e,m),sourceRange:[f.position.start,u.position.end]}},HtmlElement:u=>{if(u.name.length!==1||u.name[0].type!==Vs.NodeTypes.TextNode)return;let l=u.name[0],f=l.value;if(!f.includes("-"))return;let h=r.getWebComponentDefinitionReference(f);if(!h)return;let{assetName:p,range:m}=h,v=(0,ir.getAssetModule)(e,p);if(v)return{target:v,sourceRange:[u.blockStartPosition.start,l.position.end],targetRange:m}},RenderMarkup:(u,l)=>{let f=u.snippet,h=l.at(-1);if(!(0,ji.isString)(f)&&f.type===Vs.NodeTypes.String)return{target:(0,ir.getSnippetModule)(e,f.value),sourceRange:[h.position.start,h.position.end]}},LiquidTag:u=>{switch(u.name){case Vs.NamedTags.sections:if(!(0,ji.isString)(u.markup)){let l=u.markup.value;return{target:(0,ir.getSectionGroupModule)(e,l),sourceRange:[u.position.start,u.position.end]}}case Vs.NamedTags.section:if(!(0,ji.isString)(u.markup)){let l=u.markup.value;return{target:(0,ir.getSectionModule)(e,l),sourceRange:[u.position.start,u.position.end]}}}}},s=(0,Wt.visit)(i.ast,n);for(let u of s)ii(t,u.target,{sourceRange:u.sourceRange,targetRange:u.targetRange});let o=(0,ji.unique)(s.map(u=>u.target)).map(u=>ri(u,e,r));if(t.kind==="section"){let u=Wt.path.basename(t.uri,".liquid"),l=await r.getSectionSchema(u);o.push(v2(l,t,e,r))}else if(t.kind==="block"&&r.mode==="theme"){let u=Wt.path.basename(t.uri,".liquid"),l=await r.getBlockSchema(u);o.push(v2(l,t,e,r))}return Promise.all(o)}async function v2(t,e,r,i){if(!t||e.kind==="section"&&await(0,ji.acceptsLocalBlocks)(Wt.path.basename(e.uri,".liquid"),i))return;let{ast:a,validSchema:o}=t;if(o instanceof Error||a instanceof Error)return;let u=[];return o.blocks&&u.push(vQ(t,e,a,o.blocks,r,i)),o.presets&&u.push(bQ(t,e,a,o.presets,r,i)),"default"in o&&o.default&&u.push(SQ(t,e,a,o.default,r,i)),Promise.all(u)}async function vQ(t,e,r,i,n,s){let a=[];for(let[o,u]of Object.entries(i)){let l=["blocks",o],h=(0,Wt.nodeAtPath)(r,l).children.find(m=>m.key.value==="type");if(!h)continue;let p=[t.offset+h.loc.start.offset,t.offset+h.loc.end.offset];switch(u.type){case"@theme":{let m=await s.getThemeBlockNames().then(v=>v.filter(S=>!S.startsWith("_")));for(let v of m){let S=(0,ir.getThemeBlockModule)(n,Wt.path.basename(v,".liquid"));ii(e,S,{sourceRange:p,type:"indirect"}),a.push(ri(S,n,s))}break}case"@app":break;default:{let m=(0,ir.getThemeBlockModule)(n,u.type);ii(e,m,{sourceRange:p}),a.push(ri(m,n,s))}}}return Promise.all(a)}async function bQ(t,e,r,i,n,s){let a=[];for(let[o,u]of i.entries()){if(!("blocks"in u))continue;let l=Array.isArray(u.blocks)?u.blocks.entries():Object.entries(u.blocks);for(let[f,h]of l){let p=["presets",o,"blocks",f],m=(0,Wt.nodeAtPath)(r,p),v=(0,ir.getThemeBlockModule)(n,h.type);if(!v)continue;let S=m.children.find(g=>g.key.value==="type");if(!S)continue;let b=[t.offset+S.loc.start.offset,t.offset+S.loc.end.offset];ii(e,v,{sourceRange:b,type:"preset"}),a.push(ri(v,n,s)),h.blocks&&a.push(S2(t,e,r,h.blocks,p,n,s))}}return Promise.all(a)}async function S2(t,e,r,i,n,s,a){let o=[],u=Array.isArray(i)?i.entries():Object.entries(i);for(let[l,f]of u){let h=[...n,"blocks",l],p=(0,Wt.nodeAtPath)(r,h),m=(0,ir.getThemeBlockModule)(s,f.type);if(!m)continue;let v=p.children.find(b=>b.key.value==="type");if(!v)continue;let S=[t.offset+v.loc.start.offset,t.offset+v.loc.end.offset];ii(e,m,{sourceRange:S,type:"preset"}),o.push(ri(m,s,a)),f.blocks&&o.push(S2(t,e,r,f.blocks,h,s,a))}return Promise.all(o)}async function SQ(t,e,r,i,n,s){let a=[];if(!("blocks"in i))return;let o=Array.isArray(i.blocks)?i.blocks.entries():Object.entries(i.blocks);for(let[u,l]of o){let f=["default","blocks",u],h=(0,Wt.nodeAtPath)(r,f),p=(0,ir.getThemeBlockModule)(n,l.type);if(!p)continue;let m=h.children.find(S=>S.key.value==="type");if(!m)continue;let v=[t.offset+m.loc.start.offset,t.offset+m.loc.end.offset];ii(e,p,{sourceRange:v,type:"preset"}),a.push(ri(p,n,s))}return Promise.all(a)}async function wQ(t,e,r){let i=await r.getSourceCode(t.uri);if(i.type!==Wt.SourceCodeType.JSON)throw(0,ji.unexpected)();let n=i.ast;if(!(n instanceof Error))switch(t.kind){case"template":{let s=(0,Wt.parseJSON)(i.source),a=[];for(let[l,f]of Object.entries(s.sections)){let h=f.type,p=["sections",l],m=(0,Wt.nodeAtPath)(n,p),v=(0,ir.getSectionModule)(e,h),S=m.children.find(w=>w.key.value==="type"),b=S.loc.start.offset,g=S.loc.end.offset;ii(t,v,{sourceRange:[b,g]}),a.push(ri(v,e,r),b2(t,n,p,f,e,r))}let o=s.layout,u=(0,ir.getLayoutModule)(e,s.layout);if(u){let l,f=!0;if(o!==!1&&o!==void 0){let h=["layout"],p=(0,Wt.nodeAtPath)(n,h);l=[p.loc.start.offset,p.loc.end.offset],f=!1}ii(t,u,{sourceRange:l,type:"indirect"}),a.push(ri(u,e,r))}return Promise.all(a)}case"section-group":{let s=(0,Wt.parseJSON)(i.source),a=[];for(let[o,u]of Object.entries(s.sections)){let l=u.type,f=["sections",o],h=(0,Wt.nodeAtPath)(n,f),p=(0,ir.getSectionModule)(e,l),m=h.children.find(g=>g.key.value==="type"),v=m.loc.start.offset,S=m.loc.end.offset;ii(t,p,{sourceRange:[v,S]}),a.push(ri(p,e,r),b2(t,n,f,u,e,r))}return Promise.all(a)}default:return(0,ji.assertNever)(t.kind)}}async function b2(t,e,r=[],i,n,s){if(!i.blocks||await(0,ji.acceptsLocalBlocks)(i.type,s))return;let o=[];for(let[u,l]of Object.entries(i.blocks)){let f=l.type,h=(0,ir.getThemeBlockModule)(n,f),p=[...r,"blocks",u],v=(0,Wt.nodeAtPath)(e,p).children.find(k=>k.key.value==="type"),S=v.loc.start.offset,b=v.loc.end.offset;ii(t,h,{sourceRange:[S,b]}),o.push(ri(h,n,s),w2(t,e,p,l,n,s))}return Promise.all(o)}async function w2(t,e,r=[],i,n,s){if(!i.blocks)return;let a=[];for(let[o,u]of Object.entries(i.blocks)){let l=u.type,f=(0,ir.getThemeBlockModule)(n,l),h=[...r,"blocks",o],m=(0,Wt.nodeAtPath)(e,h).children.find(g=>g.key.value==="type"),v=m.loc.start.offset,S=m.loc.end.offset;ii(t,f,{sourceRange:[v,S]}),a.push(ri(f,n,s),w2(t,e,h,u,n,s))}return Promise.all(a)}function ii(t,e,{sourceRange:r,targetRange:i,type:n="direct"}={}){let s={source:{uri:t.uri,range:r},target:{uri:e.uri,range:i},type:n};t.dependencies.push(s),e.references.push(s)}});var k2=T(g0=>{"use strict";y();Object.defineProperty(g0,"__esModule",{value:!0});g0.buildThemeGraph=AQ;var Nd=hr(),xQ=c2(),kQ=m0(),IQ=x2();async function AQ(t,e,r){let i=(0,xQ.augmentDependencies)(t,e);r=r??await(0,Nd.recursiveReadDirectory)(i.fs,t,([s])=>{let a=s.startsWith(Nd.path.join(t,"templates")),o=s.startsWith(Nd.path.join(t,"sections"))&&s.endsWith(".liquid"),u=i.mode==="app"&&s.startsWith(Nd.path.join(t,"blocks"))&&s.endsWith(".liquid");return a||o||u});let n={entryPoints:[],modules:{},rootUri:t};return n.entryPoints=r.map(s=>(0,kQ.getModule)(n,s)).filter(s=>s!==void 0),await Promise.all(n.entryPoints.map(s=>(0,IQ.traverseModule)(s,n,i))),n}});var I2=T(y0=>{"use strict";y();Object.defineProperty(y0,"__esModule",{value:!0});y0.serializeThemeGraph=TQ;function TQ(t){let e=Object.values(t.modules).map(i=>({uri:i.uri,type:i.type,kind:i.kind,..."exists"in i?{exists:i.exists}:{}})),r=Object.values(t.modules).flatMap(i=>i.dependencies);return{rootUri:t.rootUri,nodes:e,edges:r}}});var T2=T((Ld,A2)=>{y();(function(t,e){typeof Ld=="object"&&typeof A2<"u"?e(Ld):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e((t.acorn=t.acorn||{},t.acorn.walk={})))})(Ld,(function(t){"use strict";function e(g,k,w,_,A){w||(w=b),(function E(O,L,B){var R=B||O.type;S(w,R,O,L,E),k[R]&&k[R](O,L)})(g,_,A)}function r(g,k,w,_,A){var E=[];w||(w=b),(function O(L,B,R){var q=R||L.type,P=L!==E[E.length-1];P&&E.push(L),S(w,q,L,B,O),k[q]&&k[q](L,B||E,E),P&&E.pop()})(g,_,A)}function i(g,k,w,_,A){var E=w?p(w,_||void 0):_;(function O(L,B,R){E[R||L.type](L,B,O)})(g,k,A)}function n(g){return typeof g=="string"?function(k){return k===g}:g||function(){return!0}}var s=function(k,w){this.node=k,this.state=w};function a(g,k,w,_,A){w||(w=b);var E;(function O(L,B,R){var q=R||L.type;S(w,q,L,B,O),E!==L&&(k(L,B,q),E=L)})(g,_,A)}function o(g,k,w,_){w||(w=b);var A=[],E;(function O(L,B,R){var q=R||L.type,P=L!==A[A.length-1];P&&A.push(L),S(w,q,L,B,O),E!==L&&(k(L,B||A,A,q),E=L),P&&A.pop()})(g,_)}function u(g,k,w,_,A,E){A||(A=b),_=n(_);try{(function O(L,B,R){var q=R||L.type;if((k==null||L.start<=k)&&(w==null||L.end>=w)&&S(A,q,L,B,O),(k==null||L.start===k)&&(w==null||L.end===w)&&_(q,L))throw new s(L,B)})(g,E)}catch(O){if(O instanceof s)return O;throw O}}function l(g,k,w,_,A){w=n(w),_||(_=b);try{(function E(O,L,B){var R=B||O.type;if(!(O.start>k||O.end<k)&&(S(_,R,O,L,E),w(R,O)))throw new s(O,L)})(g,A)}catch(E){if(E instanceof s)return E;throw E}}function f(g,k,w,_,A){w=n(w),_||(_=b);try{(function E(O,L,B){if(!(O.end<k)){var R=B||O.type;if(O.start>=k&&w(R,O))throw new s(O,L);S(_,R,O,L,E)}})(g,A)}catch(E){if(E instanceof s)return E;throw E}}function h(g,k,w,_,A){w=n(w),_||(_=b);var E;return(function O(L,B,R){if(!(L.start>k)){var q=R||L.type;L.end<=k&&(!E||E.node.end<L.end)&&w(q,L)&&(E=new s(L,B)),S(_,q,L,B,O)}})(g,A),E}function p(g,k){var w=Object.create(k||b);for(var _ in g)w[_]=g[_];return w}function m(g,k,w){w(g,k)}function v(g,k,w){}function S(g,k,w,_,A){if(g[k]==null)throw new Error("No walker function defined for node type "+k);g[k](w,_,A)}var b={};b.Program=b.BlockStatement=b.StaticBlock=function(g,k,w){for(var _=0,A=g.body;_<A.length;_+=1){var E=A[_];w(E,k,"Statement")}},b.Statement=m,b.EmptyStatement=v,b.ExpressionStatement=b.ParenthesizedExpression=b.ChainExpression=function(g,k,w){return w(g.expression,k,"Expression")},b.IfStatement=function(g,k,w){w(g.test,k,"Expression"),w(g.consequent,k,"Statement"),g.alternate&&w(g.alternate,k,"Statement")},b.LabeledStatement=function(g,k,w){return w(g.body,k,"Statement")},b.BreakStatement=b.ContinueStatement=v,b.WithStatement=function(g,k,w){w(g.object,k,"Expression"),w(g.body,k,"Statement")},b.SwitchStatement=function(g,k,w){w(g.discriminant,k,"Expression");for(var _=0,A=g.cases;_<A.length;_+=1){var E=A[_];w(E,k)}},b.SwitchCase=function(g,k,w){g.test&&w(g.test,k,"Expression");for(var _=0,A=g.consequent;_<A.length;_+=1){var E=A[_];w(E,k,"Statement")}},b.ReturnStatement=b.YieldExpression=b.AwaitExpression=function(g,k,w){g.argument&&w(g.argument,k,"Expression")},b.ThrowStatement=b.SpreadElement=function(g,k,w){return w(g.argument,k,"Expression")},b.TryStatement=function(g,k,w){w(g.block,k,"Statement"),g.handler&&w(g.handler,k),g.finalizer&&w(g.finalizer,k,"Statement")},b.CatchClause=function(g,k,w){g.param&&w(g.param,k,"Pattern"),w(g.body,k,"Statement")},b.WhileStatement=b.DoWhileStatement=function(g,k,w){w(g.test,k,"Expression"),w(g.body,k,"Statement")},b.ForStatement=function(g,k,w){g.init&&w(g.init,k,"ForInit"),g.test&&w(g.test,k,"Expression"),g.update&&w(g.update,k,"Expression"),w(g.body,k,"Statement")},b.ForInStatement=b.ForOfStatement=function(g,k,w){w(g.left,k,"ForInit"),w(g.right,k,"Expression"),w(g.body,k,"Statement")},b.ForInit=function(g,k,w){g.type==="VariableDeclaration"?w(g,k):w(g,k,"Expression")},b.DebuggerStatement=v,b.FunctionDeclaration=function(g,k,w){return w(g,k,"Function")},b.VariableDeclaration=function(g,k,w){for(var _=0,A=g.declarations;_<A.length;_+=1){var E=A[_];w(E,k)}},b.VariableDeclarator=function(g,k,w){w(g.id,k,"Pattern"),g.init&&w(g.init,k,"Expression")},b.Function=function(g,k,w){g.id&&w(g.id,k,"Pattern");for(var _=0,A=g.params;_<A.length;_+=1){var E=A[_];w(E,k,"Pattern")}w(g.body,k,g.expression?"Expression":"Statement")},b.Pattern=function(g,k,w){g.type==="Identifier"?w(g,k,"VariablePattern"):g.type==="MemberExpression"?w(g,k,"MemberPattern"):w(g,k)},b.VariablePattern=v,b.MemberPattern=m,b.RestElement=function(g,k,w){return w(g.argument,k,"Pattern")},b.ArrayPattern=function(g,k,w){for(var _=0,A=g.elements;_<A.length;_+=1){var E=A[_];E&&w(E,k,"Pattern")}},b.ObjectPattern=function(g,k,w){for(var _=0,A=g.properties;_<A.length;_+=1){var E=A[_];E.type==="Property"?(E.computed&&w(E.key,k,"Expression"),w(E.value,k,"Pattern")):E.type==="RestElement"&&w(E.argument,k,"Pattern")}},b.Expression=m,b.ThisExpression=b.Super=b.MetaProperty=v,b.ArrayExpression=function(g,k,w){for(var _=0,A=g.elements;_<A.length;_+=1){var E=A[_];E&&w(E,k,"Expression")}},b.ObjectExpression=function(g,k,w){for(var _=0,A=g.properties;_<A.length;_+=1){var E=A[_];w(E,k)}},b.FunctionExpression=b.ArrowFunctionExpression=b.FunctionDeclaration,b.SequenceExpression=function(g,k,w){for(var _=0,A=g.expressions;_<A.length;_+=1){var E=A[_];w(E,k,"Expression")}},b.TemplateLiteral=function(g,k,w){for(var _=0,A=g.quasis;_<A.length;_+=1){var E=A[_];w(E,k)}for(var O=0,L=g.expressions;O<L.length;O+=1){var B=L[O];w(B,k,"Expression")}},b.TemplateElement=v,b.UnaryExpression=b.UpdateExpression=function(g,k,w){w(g.argument,k,"Expression")},b.BinaryExpression=b.LogicalExpression=function(g,k,w){w(g.left,k,"Expression"),w(g.right,k,"Expression")},b.AssignmentExpression=b.AssignmentPattern=function(g,k,w){w(g.left,k,"Pattern"),w(g.right,k,"Expression")},b.ConditionalExpression=function(g,k,w){w(g.test,k,"Expression"),w(g.consequent,k,"Expression"),w(g.alternate,k,"Expression")},b.NewExpression=b.CallExpression=function(g,k,w){if(w(g.callee,k,"Expression"),g.arguments)for(var _=0,A=g.arguments;_<A.length;_+=1){var E=A[_];w(E,k,"Expression")}},b.MemberExpression=function(g,k,w){w(g.object,k,"Expression"),g.computed&&w(g.property,k,"Expression")},b.ExportNamedDeclaration=b.ExportDefaultDeclaration=function(g,k,w){if(g.declaration&&w(g.declaration,k,g.type==="ExportNamedDeclaration"||g.declaration.id?"Statement":"Expression"),g.source&&w(g.source,k,"Expression"),g.attributes)for(var _=0,A=g.attributes;_<A.length;_+=1){var E=A[_];w(E,k)}},b.ExportAllDeclaration=function(g,k,w){if(g.exported&&w(g.exported,k),w(g.source,k,"Expression"),g.attributes)for(var _=0,A=g.attributes;_<A.length;_+=1){var E=A[_];w(E,k)}},b.ImportAttribute=function(g,k,w){w(g.value,k,"Expression")},b.ImportDeclaration=function(g,k,w){for(var _=0,A=g.specifiers;_<A.length;_+=1){var E=A[_];w(E,k)}if(w(g.source,k,"Expression"),g.attributes)for(var O=0,L=g.attributes;O<L.length;O+=1){var B=L[O];w(B,k)}},b.ImportExpression=function(g,k,w){w(g.source,k,"Expression"),g.options&&w(g.options,k,"Expression")},b.ImportSpecifier=b.ImportDefaultSpecifier=b.ImportNamespaceSpecifier=b.Identifier=b.PrivateIdentifier=b.Literal=v,b.TaggedTemplateExpression=function(g,k,w){w(g.tag,k,"Expression"),w(g.quasi,k,"Expression")},b.ClassDeclaration=b.ClassExpression=function(g,k,w){return w(g,k,"Class")},b.Class=function(g,k,w){g.id&&w(g.id,k,"Pattern"),g.superClass&&w(g.superClass,k,"Expression"),w(g.body,k)},b.ClassBody=function(g,k,w){for(var _=0,A=g.body;_<A.length;_+=1){var E=A[_];w(E,k)}},b.MethodDefinition=b.PropertyDefinition=b.Property=function(g,k,w){g.computed&&w(g.key,k,"Expression"),g.value&&w(g.value,k,"Expression")},t.ancestor=r,t.base=b,t.findNodeAfter=f,t.findNodeAround=l,t.findNodeAt=u,t.findNodeBefore=h,t.full=a,t.fullAncestor=o,t.make=p,t.recursive=i,t.simple=e}))});var O2=T(Pd=>{"use strict";y();Object.defineProperty(Pd,"__esModule",{value:!0});Pd.getWebComponentMap=NQ;Pd.findWebComponentReferences=E2;var _0=hr(),EQ=T2(),OQ=/^[a-z][-.\d_a-z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]*([-][-.\d_a-z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]*)$/u;async function NQ(t,{fs:e,getSourceCode:r}){let i=new Map,n=_0.path.join(t,"assets"),s=await(0,_0.recursiveReadDirectory)(e,n,([a])=>a.endsWith(".js"));return await Promise.all(s.map(a=>E2(a,n,r,i))),i}async function E2(t,e,r,i){let n=await r(t);if(n.type!=="javascript")return;let s=n.ast;if(!(s instanceof Error))for(let a of s.body)(0,EQ.ancestor)(a,{Literal(o,u,l){if(typeof o.value=="string"&&OQ.test(o.value)){let f=l.at(-2);if(!f||f.type!=="CallExpression")return;let h=f.callee;if(h.type!=="MemberExpression")return;let p=h.property;if(p.type!=="Identifier"||p.name!=="define")return;i.set(o.value,{assetName:_0.path.relative(t,e),range:[p.start,o.end]})}return null}})}});var L2=T(Qe=>{"use strict";y();var LQ=Qe&&Qe.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),PQ=Qe&&Qe.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&LQ(e,t,r)};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.toSvgSourceCode=Qe.toSourceCode=Qe.toJsSourceCode=Qe.toCssSourceCode=Qe.findWebComponentReferences=Qe.getWebComponentMap=Qe.serializeThemeGraph=Qe.buildThemeGraph=void 0;var qQ=k2();Object.defineProperty(Qe,"buildThemeGraph",{enumerable:!0,get:function(){return qQ.buildThemeGraph}});var CQ=I2();Object.defineProperty(Qe,"serializeThemeGraph",{enumerable:!0,get:function(){return CQ.serializeThemeGraph}});var N2=O2();Object.defineProperty(Qe,"getWebComponentMap",{enumerable:!0,get:function(){return N2.getWebComponentMap}});Object.defineProperty(Qe,"findWebComponentReferences",{enumerable:!0,get:function(){return N2.findWebComponentReferences}});var qd=f0();Object.defineProperty(Qe,"toCssSourceCode",{enumerable:!0,get:function(){return qd.toCssSourceCode}});Object.defineProperty(Qe,"toJsSourceCode",{enumerable:!0,get:function(){return qd.toJsSourceCode}});Object.defineProperty(Qe,"toSourceCode",{enumerable:!0,get:function(){return qd.toSourceCode}});Object.defineProperty(Qe,"toSvgSourceCode",{enumerable:!0,get:function(){return qd.toSvgSourceCode}});PQ(Ed(),Qe)});var C2=T((tde,b0)=>{"use strict";y();var Ye=ae("path"),P2=ae("os"),qn=P2.homedir(),v0=P2.tmpdir(),{env:ao}=process,RQ=t=>{let e=Ye.join(qn,"Library");return{data:Ye.join(e,"Application Support",t),config:Ye.join(e,"Preferences",t),cache:Ye.join(e,"Caches",t),log:Ye.join(e,"Logs",t),temp:Ye.join(v0,t)}},MQ=t=>{let e=ao.APPDATA||Ye.join(qn,"AppData","Roaming"),r=ao.LOCALAPPDATA||Ye.join(qn,"AppData","Local");return{data:Ye.join(r,t,"Data"),config:Ye.join(e,t,"Config"),cache:Ye.join(r,t,"Cache"),log:Ye.join(r,t,"Log"),temp:Ye.join(v0,t)}},DQ=t=>{let e=Ye.basename(qn);return{data:Ye.join(ao.XDG_DATA_HOME||Ye.join(qn,".local","share"),t),config:Ye.join(ao.XDG_CONFIG_HOME||Ye.join(qn,".config"),t),cache:Ye.join(ao.XDG_CACHE_HOME||Ye.join(qn,".cache"),t),log:Ye.join(ao.XDG_STATE_HOME||Ye.join(qn,".local","state"),t),temp:Ye.join(v0,e,t)}},q2=(t,e)=>{if(typeof t!="string")throw new TypeError(`Expected string, got ${typeof t}`);return e=Object.assign({suffix:"nodejs"},e),e.suffix&&(t+=`-${e.suffix}`),process.platform==="darwin"?RQ(t):process.platform==="win32"?MQ(t):DQ(t)};b0.exports=q2;b0.exports.default=q2});var S0=T(ni=>{"use strict";y();Object.defineProperty(ni,"__esModule",{value:!0});ni.memoize=ni.memo=ni.tap=ni.identity=ni.noop=void 0;var FQ=()=>{};ni.noop=FQ;var jQ=t=>t;ni.identity=jQ;var BQ=t=>e=>(t(e),e);ni.tap=BQ;var R2=hr();Object.defineProperty(ni,"memo",{enumerable:!0,get:function(){return R2.memo}});Object.defineProperty(ni,"memoize",{enumerable:!0,get:function(){return R2.memoize}})});var A0=T(Ie=>{"use strict";y();var Md=Ie&&Ie.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.Manifests=Ie.Resources=Ie.ThemeLiquidDocsSchemaRoot=Ie.ThemeLiquidDocsRoot=Ie.root=void 0;Ie.downloadSchema=M2;Ie.downloadResource=D2;Ie.download=x0;Ie.resourcePath=Cd;Ie.resourceUrl=Rd;Ie.schemaPath=k0;Ie.schemaUrl=I0;Ie.exists=F2;Ie.downloadThemeLiquidDocs=GQ;var VQ=Md(C2()),$Q=Md(ww()),uc=Md(ae("node:fs/promises")),w0=Md(ae("node:path")),oc=S0(),UQ=(0,VQ.default)("theme-liquid-docs");Ie.root=UQ.cache;Ie.ThemeLiquidDocsRoot="https://raw.githubusercontent.com/Shopify/theme-liquid-docs/main";Ie.ThemeLiquidDocsSchemaRoot=`${Ie.ThemeLiquidDocsRoot}/schemas`;Ie.Resources=["filters","objects","tags","shopify_system_translations","manifest_theme","manifest_theme_app_extension"];Ie.Manifests={app:"manifest_theme_app_extension",theme:"manifest_theme"};var HQ={filters:"data/filters.json",objects:"data/objects.json",tags:"data/tags.json",latest:"data/latest.json",shopify_system_translations:"data/shopify_system_translations.json",manifest_theme:"schemas/manifest_theme.json",manifest_theme_app_extension:"schemas/manifest_theme_app_extension.json"};async function M2(t,e=Ie.root,r=oc.noop){let i=I0(t),n=k0(t,e),s=await x0(i,r);return await uc.default.writeFile(n,s,"utf8"),s}async function D2(t,e=Ie.root,r=oc.noop){let i=Rd(t),n=Cd(t,e),s=await x0(i,r);return await uc.default.writeFile(n,s,"utf8"),s}async function x0(t,e){return t.startsWith("file:")?await uc.default.readFile(t.replace(/^file:/,""),"utf8").then((0,oc.tap)(()=>e(`Using local file: ${t}`))).catch(r=>{throw e(`Failed to read local file: ${t}`),r}):(await(0,$Q.default)(t)).text()}function Cd(t,e=Ie.root){return w0.default.join(e,`${t}.json`)}function Rd(t){let e=HQ[t];return`${process.env.SHOPIFY_TLD_ROOT?`file:${process.env.SHOPIFY_TLD_ROOT}`:Ie.ThemeLiquidDocsRoot}/${e}`}function k0(t,e=Ie.root){return w0.default.resolve(e,w0.default.basename(t))}function I0(t){return`${process.env.SHOPIFY_TLD_ROOT?`file:${process.env.SHOPIFY_TLD_ROOT}`:Ie.ThemeLiquidDocsRoot}/schemas/${t}`}async function F2(t){try{return await uc.default.stat(t),!0}catch{return!1}}async function GQ(t,e){await F2(t)||await uc.default.mkdir(t);let r=["latest"].concat(Ie.Resources),i=await Promise.all(r.map(a=>D2(a,t,e).then((0,oc.tap)(()=>e(`Successfully downloaded latest resource:
|
|
1207
|
-
${Rd(a)}
|
|
1208
|
-
> ${Cd(a,t)}`))).catch(o=>{throw e(`Failed to download latest resource:
|
|
1209
|
-
${Rd(a)} to
|
|
1210
|
-
${Cd(a,t)}
|
|
1211
|
-
${o}`),o}))),s=Object.values(Ie.Manifests).map(a=>r.indexOf(a)).map(a=>i[a]).map(a=>JSON.parse(a)).flatMap(a=>a.schemas.map(o=>o.uri));await Promise.all(WQ(s).map(a=>M2(a,t,e).then((0,oc.tap)(()=>e(`Successfully downloaded schema:
|
|
1212
|
-
${I0(a)}
|
|
1213
|
-
> ${k0(a,t)}`))).catch(o=>{throw e(`Failed to download schema: ${a}, ${o}`),o})))}function WQ(t){return[...new Set(t).values()]}});var V2=T(oo=>{"use strict";y();var j2=oo&&oo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(oo,"__esModule",{value:!0});oo.ThemeLiquidDocsManager=void 0;var lc=j2(ae("node:fs/promises")),Dd=j2(ae("node:path")),Br=A0(),Ar=S0(),T0=class{log;constructor(e=Ar.noop){this.log=e}filters=(0,Ar.memo)(async()=>Cn(this.loaders("filters"),JSON.parse,[],this.log));objects=(0,Ar.memo)(async()=>Cn(this.loaders("objects"),JSON.parse,[],this.log));liquidDrops=(0,Ar.memo)(async()=>Cn(this.loaders("objects"),JSON.parse,[],this.log));tags=(0,Ar.memo)(async()=>Cn(this.loaders("tags"),JSON.parse,[],this.log));systemTranslations=(0,Ar.memo)(async()=>Cn(this.loaders("shopify_system_translations"),JSON.parse,{},this.log));schemas=(0,Ar.memoize)(e=>Cn(this.loaders(Br.Manifests[e]),JSON.parse,{schemas:[]},this.log).then(r=>Promise.all(r.schemas.map(async i=>({uri:`${Br.ThemeLiquidDocsSchemaRoot}/${i.uri}`,fileMatch:i.fileMatch,schema:await Cn(this.schemaLoaders(i.uri),Ar.identity,"",this.log)})))),Ar.identity);setup=(0,Ar.memo)(async()=>{try{await(0,Br.exists)(Br.root)||await lc.default.mkdir(Br.root,{recursive:!0});let e=await this.latestRevision();await(0,Br.downloadResource)("latest",Br.root,this.log);let r=await this.latestRevision();e!==r&&await(0,Br.downloadThemeLiquidDocs)(Br.root,this.log)}catch(e){e instanceof Error&&this.log(`Failed to setup with the following error: ${e.message}`);return}});async latestRevision(){return(await Cn([cc(()=>this.load("latest"),"loadLatestRevision")],JSON.parse,{},this.log)).revision??""}async loadResource(e){return await this.setup(),this.load(e).then((0,Ar.tap)(()=>this.log(`Loaded resource from ${(0,Br.resourcePath)(e)}`)))}async load(e){return lc.default.readFile((0,Br.resourcePath)(e),"utf8")}async loadSchema(e){return lc.default.readFile((0,Br.schemaPath)(e),"utf8").then((0,Ar.tap)(()=>this.log(`Loaded schema from ${(0,Br.schemaPath)(e)}`)))}loaders(e){return[cc(()=>this.loadResource(e),`loadResource(${e})`),cc(()=>zQ(e,this.log),`fallbackResource(${e})`)]}schemaLoaders(e){return[cc(()=>this.loadSchema(e),`loadSchema(${e})`),cc(()=>JQ(e,this.log),`fallbackSchema(${e})`)]}};oo.ThemeLiquidDocsManager=T0;function cc(t,e){return Object.assign(t,{loaderName:e})}async function Cn(t,e,r,i){for(let n of t)try{return e(await n())}catch(s){i(`Failed to load or transform ${n.loaderName} with the following error:
|
|
1214
|
-
${s instanceof Error?s.message:s}`);continue}return r}function B2(){return Dd.default.resolve(__dirname,"./data")}async function zQ(t,e){let r=Dd.default.resolve(B2(),`${t}.json`);return lc.default.readFile(r,"utf8").then((0,Ar.tap)(()=>e(`Loaded fallback resource
|
|
1215
|
-
${t} from
|
|
1216
|
-
${r}`)))}async function JQ(t,e){let r=Dd.default.resolve(B2(),Dd.default.basename(t));return lc.default.readFile(r,"utf8").then((0,Ar.tap)(()=>e(`Loaded fallback schema
|
|
1217
|
-
${t} from
|
|
1218
|
-
${r}`)))}});var $2=T(si=>{"use strict";y();Object.defineProperty(si,"__esModule",{value:!0});si.root=si.downloadThemeLiquidDocs=si.downloadResource=si.Resources=si.ThemeLiquidDocsManager=void 0;var KQ=V2();Object.defineProperty(si,"ThemeLiquidDocsManager",{enumerable:!0,get:function(){return KQ.ThemeLiquidDocsManager}});var Fd=A0();Object.defineProperty(si,"Resources",{enumerable:!0,get:function(){return Fd.Resources}});Object.defineProperty(si,"downloadResource",{enumerable:!0,get:function(){return Fd.downloadResource}});Object.defineProperty(si,"downloadThemeLiquidDocs",{enumerable:!0,get:function(){return Fd.downloadThemeLiquidDocs}});Object.defineProperty(si,"root",{enumerable:!0,get:function(){return Fd.root}})});var U2=T(E0=>{y();var $s=ae("path"),Mn=process.platform==="win32",Rn=ae("fs"),QQ=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function YQ(){var t;if(QQ){var e=new Error;t=r}else t=i;return t;function r(n){n&&(e.message=n.message,n=e,i(n))}function i(n){if(n){if(process.throwDeprecation)throw n;if(!process.noDeprecation){var s="fs: missing callback "+(n.stack||n.message);process.traceDeprecation?console.trace(s):console.error(s)}}}}function XQ(t){return typeof t=="function"?t:YQ()}var fde=$s.normalize;Mn?fn=/(.*?)(?:[\/\\]+|$)/g:fn=/(.*?)(?:[\/]+|$)/g;var fn;Mn?fc=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:fc=/^[\/]*/;var fc;E0.realpathSync=function(e,r){if(e=$s.resolve(e),r&&Object.prototype.hasOwnProperty.call(r,e))return r[e];var i=e,n={},s={},a,o,u,l;f();function f(){var b=fc.exec(e);a=b[0].length,o=b[0],u=b[0],l="",Mn&&!s[u]&&(Rn.lstatSync(u),s[u]=!0)}for(;a<e.length;){fn.lastIndex=a;var h=fn.exec(e);if(l=o,o+=h[0],u=l+h[1],a=fn.lastIndex,!(s[u]||r&&r[u]===u)){var p;if(r&&Object.prototype.hasOwnProperty.call(r,u))p=r[u];else{var m=Rn.lstatSync(u);if(!m.isSymbolicLink()){s[u]=!0,r&&(r[u]=u);continue}var v=null;if(!Mn){var S=m.dev.toString(32)+":"+m.ino.toString(32);n.hasOwnProperty(S)&&(v=n[S])}v===null&&(Rn.statSync(u),v=Rn.readlinkSync(u)),p=$s.resolve(l,v),r&&(r[u]=p),Mn||(n[S]=v)}e=$s.resolve(p,e.slice(a)),f()}}return r&&(r[i]=e),e};E0.realpath=function(e,r,i){if(typeof i!="function"&&(i=XQ(r),r=null),e=$s.resolve(e),r&&Object.prototype.hasOwnProperty.call(r,e))return process.nextTick(i.bind(null,null,r[e]));var n=e,s={},a={},o,u,l,f;h();function h(){var b=fc.exec(e);o=b[0].length,u=b[0],l=b[0],f="",Mn&&!a[l]?Rn.lstat(l,function(g){if(g)return i(g);a[l]=!0,p()}):process.nextTick(p)}function p(){if(o>=e.length)return r&&(r[n]=e),i(null,e);fn.lastIndex=o;var b=fn.exec(e);return f=u,u+=b[0],l=f+b[1],o=fn.lastIndex,a[l]||r&&r[l]===l?process.nextTick(p):r&&Object.prototype.hasOwnProperty.call(r,l)?S(r[l]):Rn.lstat(l,m)}function m(b,g){if(b)return i(b);if(!g.isSymbolicLink())return a[l]=!0,r&&(r[l]=l),process.nextTick(p);if(!Mn){var k=g.dev.toString(32)+":"+g.ino.toString(32);if(s.hasOwnProperty(k))return v(null,s[k],l)}Rn.stat(l,function(w){if(w)return i(w);Rn.readlink(l,function(_,A){Mn||(s[k]=A),v(_,A)})})}function v(b,g,k){if(b)return i(b);var w=$s.resolve(f,g);r&&(r[k]=w),S(w)}function S(b){e=$s.resolve(b,e.slice(o)),h()}}});var P0=T((dde,z2)=>{y();z2.exports=Dn;Dn.realpath=Dn;Dn.sync=L0;Dn.realpathSync=L0;Dn.monkeypatch=eY;Dn.unmonkeypatch=tY;var uo=ae("fs"),O0=uo.realpath,N0=uo.realpathSync,ZQ=process.version,H2=/^v[0-5]\./.test(ZQ),G2=U2();function W2(t){return t&&t.syscall==="realpath"&&(t.code==="ELOOP"||t.code==="ENOMEM"||t.code==="ENAMETOOLONG")}function Dn(t,e,r){if(H2)return O0(t,e,r);typeof e=="function"&&(r=e,e=null),O0(t,e,function(i,n){W2(i)?G2.realpath(t,e,r):r(i,n)})}function L0(t,e){if(H2)return N0(t,e);try{return N0(t,e)}catch(r){if(W2(r))return G2.realpathSync(t,e);throw r}}function eY(){uo.realpath=Dn,uo.realpathSync=L0}function tY(){uo.realpath=O0,uo.realpathSync=N0}});var K2=T((gde,J2)=>{y();var rY=typeof process=="object"&&process&&process.platform==="win32";J2.exports=rY?{sep:"\\"}:{sep:"/"}});var Bd=T((vde,D0)=>{y();var Vr=D0.exports=(t,e,r={})=>(jd(e),!r.nocomment&&e.charAt(0)==="#"?!1:new co(e,r).match(t));D0.exports=Vr;var R0=K2();Vr.sep=R0.sep;var dr=Symbol("globstar **");Vr.GLOBSTAR=dr;var iY=d4(),Q2={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},M0="[^/]",q0=M0+"*?",nY="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",sY="(?:(?!(?:\\/|^)\\.).)*?",Z2=t=>t.split("").reduce((e,r)=>(e[r]=!0,e),{}),Y2=Z2("().*{}+?[]^$\\!"),aY=Z2("[.("),X2=/\/+/;Vr.filter=(t,e={})=>(r,i,n)=>Vr(r,t,e);var Fn=(t,e={})=>{let r={};return Object.keys(t).forEach(i=>r[i]=t[i]),Object.keys(e).forEach(i=>r[i]=e[i]),r};Vr.defaults=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Vr;let e=Vr,r=(i,n,s)=>e(i,n,Fn(t,s));return r.Minimatch=class extends e.Minimatch{constructor(n,s){super(n,Fn(t,s))}},r.Minimatch.defaults=i=>e.defaults(Fn(t,i)).Minimatch,r.filter=(i,n)=>e.filter(i,Fn(t,n)),r.defaults=i=>e.defaults(Fn(t,i)),r.makeRe=(i,n)=>e.makeRe(i,Fn(t,n)),r.braceExpand=(i,n)=>e.braceExpand(i,Fn(t,n)),r.match=(i,n,s)=>e.match(i,n,Fn(t,s)),r};Vr.braceExpand=(t,e)=>eR(t,e);var eR=(t,e={})=>(jd(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:iY(t)),oY=1024*64,jd=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>oY)throw new TypeError("pattern is too long")},C0=Symbol("subparse");Vr.makeRe=(t,e)=>new co(t,e||{}).makeRe();Vr.match=(t,e,r={})=>{let i=new co(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};var uY=t=>t.replace(/\\(.)/g,"$1"),cY=t=>t.replace(/\\([^-\]])/g,"$1"),lY=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fY=t=>t.replace(/[[\]\\]/g,"\\$&"),co=class{constructor(e,r){jd(e),r||(r={}),this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion!==void 0?r.maxGlobstarRecursion:200,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.make()}debug(){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();let i=this.globSet=this.braceExpand();r.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,i),i=this.globParts=i.map(n=>n.split(X2)),this.debug(this.pattern,i),i=i.map((n,s,a)=>n.map(this.parse,this)),this.debug(this.pattern,i),i=i.filter(n=>n.indexOf(!1)===-1),this.debug(this.pattern,i),this.set=i}parseNegate(){if(this.options.nonegate)return;let e=this.pattern,r=!1,i=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=e.slice(i)),this.negate=r}matchOne(e,r,i){return r.indexOf(dr)!==-1?this._matchGlobstar(e,r,i,0,0):this._matchOne(e,r,i,0,0)}_matchGlobstar(e,r,i,n,s){let a=-1;for(let k=s;k<r.length;k++)if(r[k]===dr){a=k;break}let o=-1;for(let k=r.length-1;k>=0;k--)if(r[k]===dr){o=k;break}let u=r.slice(s,a),l=i?r.slice(a+1):r.slice(a+1,o),f=i?[]:r.slice(o+1);if(u.length){let k=e.slice(n,n+u.length);if(!this._matchOne(k,u,i,0,0))return!1;n+=u.length}let h=0;if(f.length){if(f.length+n>e.length)return!1;let k=e.length-f.length;if(this._matchOne(e,f,i,k,0))h=f.length;else{if(e[e.length-1]!==""||n+f.length===e.length||!this._matchOne(e,f,i,k-1,0))return!1;h=f.length+1}}if(!l.length){let k=!!h;for(let w=n;w<e.length-h;w++){let _=String(e[w]);if(k=!0,_==="."||_===".."||!this.options.dot&&_.charAt(0)===".")return!1}return i||k}let p=[[[],0]],m=p[0],v=0,S=[0];for(let k of l)k===dr?(S.push(v),m=[[],0],p.push(m)):(m[0].push(k),v++);let b=p.length-1,g=e.length-h;for(let k of p)k[1]=g-(S[b--]+k[0].length);return!!this._matchGlobStarBodySections(e,p,n,0,i,0,!!h)}_matchGlobStarBodySections(e,r,i,n,s,a,o){let u=r[n];if(!u){for(let h=i;h<e.length;h++){o=!0;let p=e[h];if(p==="."||p===".."||!this.options.dot&&p.charAt(0)===".")return!1}return o}let[l,f]=u;for(;i<=f;){if(this._matchOne(e.slice(0,i+l.length),l,s,i,0)&&a<this.maxGlobstarRecursion){let m=this._matchGlobStarBodySections(e,r,i+l.length,n+1,s,a+1,o);if(m!==!1)return m}let p=e[i];if(p==="."||p===".."||!this.options.dot&&p.charAt(0)===".")return!1;i++}return s||null}_matchOne(e,r,i,n,s){let a,o,u,l;for(a=n,o=s,u=e.length,l=r.length;a<u&&o<l;a++,o++){this.debug("matchOne loop");let f=r[o],h=e[a];if(this.debug(r,f,h),f===!1||f===dr)return!1;let p;if(typeof f=="string"?(p=h===f,this.debug("string match",f,h,p)):(p=h.match(f),this.debug("pattern match",f,h,p)),!p)return!1}if(a===u&&o===l)return!0;if(a===u)return i;if(o===l)return a===u-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return eR(this.pattern,this.options)}parse(e,r){jd(e);let i=this.options;if(e==="**")if(i.noglobstar)e="*";else return dr;if(e==="")return"";let n="",s=!1,a=!1,o=[],u=[],l,f=!1,h=-1,p=-1,m,v,S,b=e.charAt(0)===".",g=i.dot||b,k=()=>b?"":g?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",w=O=>O.charAt(0)==="."?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",_=()=>{if(l){switch(l){case"*":n+=q0,s=!0;break;case"?":n+=M0,s=!0;break;default:n+="\\"+l;break}this.debug("clearStateChar %j %j",l,n),l=!1}};for(let O=0,L;O<e.length&&(L=e.charAt(O));O++){if(this.debug("%s %s %s %j",e,O,n,L),a){if(L==="/")return!1;Y2[L]&&(n+="\\"),n+=L,a=!1;continue}switch(L){case"/":return!1;case"\\":if(f&&e.charAt(O+1)==="-"){n+=L;continue}_(),a=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,O,n,L),f){this.debug(" in class"),L==="!"&&O===p+1&&(L="^"),n+=L;continue}if(L==="*"&&l==="*")continue;this.debug("call clearStateChar %j",l),_(),l=L,i.noext&&_();continue;case"(":{if(f){n+="(";continue}if(!l){n+="\\(";continue}let B={type:l,start:O-1,reStart:n.length,open:Q2[l].open,close:Q2[l].close};this.debug(this.pattern," ",B),o.push(B),n+=B.open,B.start===0&&B.type!=="!"&&(b=!0,n+=w(e.slice(O+1))),this.debug("plType %j %j",l,n),l=!1;continue}case")":{let B=o[o.length-1];if(f||!B){n+="\\)";continue}o.pop(),_(),s=!0,v=B,n+=v.close,v.type==="!"&&u.push(Object.assign(v,{reEnd:n.length}));continue}case"|":{let B=o[o.length-1];if(f||!B){n+="\\|";continue}_(),n+="|",B.start===0&&B.type!=="!"&&(b=!0,n+=w(e.slice(O+1)));continue}case"[":if(_(),f){n+="\\"+L;continue}f=!0,p=O,h=n.length,n+=L;continue;case"]":if(O===p+1||!f){n+="\\"+L;continue}m=e.substring(p+1,O);try{RegExp("["+fY(cY(m))+"]"),n+=L}catch{n=n.substring(0,h)+"(?:$.)"}s=!0,f=!1;continue;default:_(),Y2[L]&&!(L==="^"&&f)&&(n+="\\"),n+=L;break}}for(f&&(m=e.slice(p+1),S=this.parse(m,C0),n=n.substring(0,h)+"\\["+S[0],s=s||S[1]),v=o.pop();v;v=o.pop()){let O;O=n.slice(v.reStart+v.open.length),this.debug("setting tail",n,v),O=O.replace(/((?:\\{2}){0,64})(\\?)\|/g,(B,R,q)=>(q||(q="\\"),R+R+q+"|")),this.debug(`tail=%j
|
|
1219
|
-
%s`,O,O,v,n);let L=v.type==="*"?q0:v.type==="?"?M0:"\\"+v.type;s=!0,n=n.slice(0,v.reStart)+L+"\\("+O}_(),a&&(n+="\\\\");let A=aY[n.charAt(0)];for(let O=u.length-1;O>-1;O--){let L=u[O],B=n.slice(0,L.reStart),R=n.slice(L.reStart,L.reEnd-8),q=n.slice(L.reEnd),P=n.slice(L.reEnd-8,L.reEnd)+q,$=B.split(")").length,V=B.split("(").length-$,C=q;for(let U=0;U<V;U++)C=C.replace(/\)[+*?]?/,"");q=C;let F=q===""&&r!==C0?"(?:$|\\/)":"";n=B+R+q+F+P}if(n!==""&&s&&(n="(?=.)"+n),A&&(n=k()+n),r===C0)return[n,s];if(i.nocase&&!s&&(s=e.toUpperCase()!==e.toLowerCase()),!s)return uY(e);let E=i.nocase?"i":"";try{return Object.assign(new RegExp("^"+n+"$",E),{_glob:e,_src:n})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?q0:r.dot?nY:sY,n=r.nocase?"i":"",s=e.map(a=>(a=a.map(o=>typeof o=="string"?lY(o):o===dr?dr:o._src).reduce((o,u)=>(o[o.length-1]===dr&&u===dr||o.push(u),o),[]),a.forEach((o,u)=>{o!==dr||a[u-1]===dr||(u===0?a.length>1?a[u+1]="(?:\\/|"+i+"\\/)?"+a[u+1]:a[u]=i:u===a.length-1?a[u-1]+="(?:\\/|"+i+")?":(a[u-1]+="(?:\\/|\\/"+i+"\\/)"+a[u+1],a[u+1]=dr))}),a.filter(o=>o!==dr).join("/"))).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,n)}catch{this.regexp=!1}return this.regexp}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let i=this.options;R0.sep!=="/"&&(e=e.split(R0.sep).join("/")),e=e.split(X2),this.debug(this.pattern,"split",e);let n=this.set;this.debug(this.pattern,"set",n);let s;for(let a=e.length-1;a>=0&&(s=e[a],!s);a--);for(let a=0;a<n.length;a++){let o=n[a],u=e;if(i.matchBase&&o.length===1&&(u=[s]),this.matchOne(u,o,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return Vr.defaults(e).Minimatch}};Vr.Minimatch=co});var j0=T(jn=>{y();jn.setopts=yY;jn.ownProp=tR;jn.makeAbs=pc;jn.finish=_Y;jn.mark=vY;jn.isIgnored=iR;jn.childrenIgnored=bY;function tR(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var pY=ae("fs"),Us=ae("path"),hY=Bd(),rR=ae("path").isAbsolute,F0=hY.Minimatch;function dY(t,e){return t.localeCompare(e,"en")}function mY(t,e){t.ignore=e.ignore||[],Array.isArray(t.ignore)||(t.ignore=[t.ignore]),t.ignore.length&&(t.ignore=t.ignore.map(gY))}function gY(t){var e=null;if(t.slice(-3)==="/**"){var r=t.replace(/(\/\*\*)+$/,"");e=new F0(r,{dot:!0})}return{matcher:new F0(t,{dot:!0}),gmatcher:e}}function yY(t,e,r){if(r||(r={}),r.matchBase&&e.indexOf("/")===-1){if(r.noglobstar)throw new Error("base matching requires globstar");e="**/"+e}t.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,t.windowsPathsNoEscape&&(e=e.replace(/\\/g,"/")),t.silent=!!r.silent,t.pattern=e,t.strict=r.strict!==!1,t.realpath=!!r.realpath,t.realpathCache=r.realpathCache||Object.create(null),t.follow=!!r.follow,t.dot=!!r.dot,t.mark=!!r.mark,t.nodir=!!r.nodir,t.nodir&&(t.mark=!0),t.sync=!!r.sync,t.nounique=!!r.nounique,t.nonull=!!r.nonull,t.nosort=!!r.nosort,t.nocase=!!r.nocase,t.stat=!!r.stat,t.noprocess=!!r.noprocess,t.absolute=!!r.absolute,t.fs=r.fs||pY,t.maxLength=r.maxLength||1/0,t.cache=r.cache||Object.create(null),t.statCache=r.statCache||Object.create(null),t.symlinks=r.symlinks||Object.create(null),mY(t,r),t.changedCwd=!1;var i=process.cwd();tR(r,"cwd")?(t.cwd=Us.resolve(r.cwd),t.changedCwd=t.cwd!==i):t.cwd=Us.resolve(i),t.root=r.root||Us.resolve(t.cwd,"/"),t.root=Us.resolve(t.root),t.cwdAbs=rR(t.cwd)?t.cwd:pc(t,t.cwd),t.nomount=!!r.nomount,process.platform==="win32"&&(t.root=t.root.replace(/\\/g,"/"),t.cwd=t.cwd.replace(/\\/g,"/"),t.cwdAbs=t.cwdAbs.replace(/\\/g,"/")),r.nonegate=!0,r.nocomment=!0,t.minimatch=new F0(e,r),t.options=t.minimatch.options}function _Y(t){for(var e=t.nounique,r=e?[]:Object.create(null),i=0,n=t.matches.length;i<n;i++){var s=t.matches[i];if(!s||Object.keys(s).length===0){if(t.nonull){var a=t.minimatch.globSet[i];e?r.push(a):r[a]=!0}}else{var o=Object.keys(s);e?r.push.apply(r,o):o.forEach(function(u){r[u]=!0})}}if(e||(r=Object.keys(r)),t.nosort||(r=r.sort(dY)),t.mark){for(var i=0;i<r.length;i++)r[i]=t._mark(r[i]);t.nodir&&(r=r.filter(function(u){var l=!/\/$/.test(u),f=t.cache[u]||t.cache[pc(t,u)];return l&&f&&(l=f!=="DIR"&&!Array.isArray(f)),l}))}t.ignore.length&&(r=r.filter(function(u){return!iR(t,u)})),t.found=r}function vY(t,e){var r=pc(t,e),i=t.cache[r],n=e;if(i){var s=i==="DIR"||Array.isArray(i),a=e.slice(-1)==="/";if(s&&!a?n+="/":!s&&a&&(n=n.slice(0,-1)),n!==e){var o=pc(t,n);t.statCache[o]=t.statCache[r],t.cache[o]=t.cache[r]}}return n}function pc(t,e){var r=e;return e.charAt(0)==="/"?r=Us.join(t.root,e):rR(e)||e===""?r=e:t.changedCwd?r=Us.resolve(t.cwd,e):r=Us.resolve(e),process.platform==="win32"&&(r=r.replace(/\\/g,"/")),r}function iR(t,e){return t.ignore.length?t.ignore.some(function(r){return r.matcher.match(e)||!!(r.gmatcher&&r.gmatcher.match(e))}):!1}function bY(t,e){return t.ignore.length?t.ignore.some(function(r){return!!(r.gmatcher&&r.gmatcher.match(e))}):!1}});var uR=T((Ade,oR)=>{y();oR.exports=aR;aR.GlobSync=kt;var SY=P0(),nR=Bd(),xde=nR.Minimatch,kde=$d().Glob,Ide=ae("util"),B0=ae("path"),sR=ae("assert"),Vd=ae("path").isAbsolute,Hs=j0(),wY=Hs.setopts,V0=Hs.ownProp,xY=Hs.childrenIgnored,kY=Hs.isIgnored;function aR(t,e){if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
|
|
1220
|
-
See: https://github.com/isaacs/node-glob/issues/167`);return new kt(t,e).found}function kt(t,e){if(!t)throw new Error("must provide pattern");if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
|
|
1221
|
-
See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof kt))return new kt(t,e);if(wY(this,t,e),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var i=0;i<r;i++)this._process(this.minimatch.set[i],i,!1);this._finish()}kt.prototype._finish=function(){if(sR.ok(this instanceof kt),this.realpath){var t=this;this.matches.forEach(function(e,r){var i=t.matches[r]=Object.create(null);for(var n in e)try{n=t._makeAbs(n);var s=SY.realpathSync(n,t.realpathCache);i[s]=!0}catch(a){if(a.syscall==="stat")i[t._makeAbs(n)]=!0;else throw a}})}Hs.finish(this)};kt.prototype._process=function(t,e,r){sR.ok(this instanceof kt);for(var i=0;typeof t[i]=="string";)i++;var n;switch(i){case t.length:this._processSimple(t.join("/"),e);return;case 0:n=null;break;default:n=t.slice(0,i).join("/");break}var s=t.slice(i),a;n===null?a=".":((Vd(n)||Vd(t.map(function(l){return typeof l=="string"?l:"[*]"}).join("/")))&&(!n||!Vd(n))&&(n="/"+n),a=n);var o=this._makeAbs(a);if(!xY(this,a)){var u=s[0]===nR.GLOBSTAR;u?this._processGlobStar(n,a,o,s,e,r):this._processReaddir(n,a,o,s,e,r)}};kt.prototype._processReaddir=function(t,e,r,i,n,s){var a=this._readdir(r,s);if(a){for(var o=i[0],u=!!this.minimatch.negate,l=o._glob,f=this.dot||l.charAt(0)===".",h=[],p=0;p<a.length;p++){var m=a[p];if(m.charAt(0)!=="."||f){var v;u&&!t?v=!m.match(o):v=m.match(o),v&&h.push(m)}}var S=h.length;if(S!==0){if(i.length===1&&!this.mark&&!this.stat){this.matches[n]||(this.matches[n]=Object.create(null));for(var p=0;p<S;p++){var m=h[p];t&&(t.slice(-1)!=="/"?m=t+"/"+m:m=t+m),m.charAt(0)==="/"&&!this.nomount&&(m=B0.join(this.root,m)),this._emitMatch(n,m)}return}i.shift();for(var p=0;p<S;p++){var m=h[p],b;t?b=[t,m]:b=[m],this._process(b.concat(i),n,s)}}}};kt.prototype._emitMatch=function(t,e){if(!kY(this,e)){var r=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var i=this.cache[r];if(i==="DIR"||Array.isArray(i))return}this.matches[t][e]=!0,this.stat&&this._stat(e)}}};kt.prototype._readdirInGlobStar=function(t){if(this.follow)return this._readdir(t,!1);var e,r,i;try{r=this.fs.lstatSync(t)}catch(s){if(s.code==="ENOENT")return null}var n=r&&r.isSymbolicLink();return this.symlinks[t]=n,!n&&r&&!r.isDirectory()?this.cache[t]="FILE":e=this._readdir(t,!1),e};kt.prototype._readdir=function(t,e){var r;if(e&&!V0(this.symlinks,t))return this._readdirInGlobStar(t);if(V0(this.cache,t)){var i=this.cache[t];if(!i||i==="FILE")return null;if(Array.isArray(i))return i}try{return this._readdirEntries(t,this.fs.readdirSync(t))}catch(n){return this._readdirError(t,n),null}};kt.prototype._readdirEntries=function(t,e){if(!this.mark&&!this.stat)for(var r=0;r<e.length;r++){var i=e[r];t==="/"?i=t+i:i=t+"/"+i,this.cache[i]=!0}return this.cache[t]=e,e};kt.prototype._readdirError=function(t,e){switch(e.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(t);if(this.cache[r]="FILE",r===this.cwdAbs){var i=new Error(e.code+" invalid cwd "+this.cwd);throw i.path=this.cwd,i.code=e.code,i}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:if(this.cache[this._makeAbs(t)]=!1,this.strict)throw e;this.silent||console.error("glob error",e);break}};kt.prototype._processGlobStar=function(t,e,r,i,n,s){var a=this._readdir(r,s);if(a){var o=i.slice(1),u=t?[t]:[],l=u.concat(o);this._process(l,n,!1);var f=a.length,h=this.symlinks[r];if(!(h&&s))for(var p=0;p<f;p++){var m=a[p];if(!(m.charAt(0)==="."&&!this.dot)){var v=u.concat(a[p],o);this._process(v,n,!0);var S=u.concat(a[p],i);this._process(S,n,!0)}}}};kt.prototype._processSimple=function(t,e){var r=this._stat(t);if(this.matches[e]||(this.matches[e]=Object.create(null)),!!r){if(t&&Vd(t)&&!this.nomount){var i=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=B0.join(this.root,t):(t=B0.resolve(this.root,t),i&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t)}};kt.prototype._stat=function(t){var e=this._makeAbs(t),r=t.slice(-1)==="/";if(t.length>this.maxLength)return!1;if(!this.stat&&V0(this.cache,e)){var a=this.cache[e];if(Array.isArray(a)&&(a="DIR"),!r||a==="DIR")return a;if(r&&a==="FILE")return!1}var i,n=this.statCache[e];if(!n){var s;try{s=this.fs.lstatSync(e)}catch(o){if(o&&(o.code==="ENOENT"||o.code==="ENOTDIR"))return this.statCache[e]=!1,!1}if(s&&s.isSymbolicLink())try{n=this.fs.statSync(e)}catch{n=s}else n=s}this.statCache[e]=n;var a=!0;return n&&(a=n.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||a,r&&a==="FILE"?!1:a};kt.prototype._mark=function(t){return Hs.mark(this,t)};kt.prototype._makeAbs=function(t){return Hs.makeAbs(this,t)}});var lR=T((Ede,cR)=>{y();var IY=p4(),hc=Object.create(null),AY=xw();cR.exports=IY(TY);function TY(t,e){return hc[t]?(hc[t].push(e),null):(hc[t]=[e],EY(t))}function EY(t){return AY(function e(){var r=hc[t],i=r.length,n=OY(arguments);try{for(var s=0;s<i;s++)r[s].apply(null,n)}finally{r.length>i?(r.splice(0,i),process.nextTick(function(){e.apply(null,n)})):delete hc[t]}})}function OY(t){for(var e=t.length,r=[],i=0;i<e;i++)r[i]=t[i];return r}});var $d=T((Pde,pR)=>{y();pR.exports=Gs;var NY=P0(),fR=Bd(),Nde=fR.Minimatch,LY=m4(),PY=ae("events").EventEmitter,$0=ae("path"),U0=ae("assert"),dc=ae("path").isAbsolute,G0=uR(),Ws=j0(),qY=Ws.setopts,H0=Ws.ownProp,W0=lR(),Lde=ae("util"),CY=Ws.childrenIgnored,RY=Ws.isIgnored,MY=xw();function Gs(t,e,r){if(typeof e=="function"&&(r=e,e={}),e||(e={}),e.sync){if(r)throw new TypeError("callback provided to sync glob");return G0(t,e)}return new Ne(t,e,r)}Gs.sync=G0;var DY=Gs.GlobSync=G0.GlobSync;Gs.glob=Gs;function FY(t,e){if(e===null||typeof e!="object")return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t}Gs.hasMagic=function(t,e){var r=FY({},e);r.noprocess=!0;var i=new Ne(t,r),n=i.minimatch.set;if(!t)return!1;if(n.length>1)return!0;for(var s=0;s<n[0].length;s++)if(typeof n[0][s]!="string")return!0;return!1};Gs.Glob=Ne;LY(Ne,PY);function Ne(t,e,r){if(typeof e=="function"&&(r=e,e=null),e&&e.sync){if(r)throw new TypeError("callback provided to sync glob");return new DY(t,e)}if(!(this instanceof Ne))return new Ne(t,e,r);qY(this,t,e),this._didRealPath=!1;var i=this.minimatch.set.length;this.matches=new Array(i),typeof r=="function"&&(r=MY(r),this.on("error",r),this.on("end",function(u){r(null,u)}));var n=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(i===0)return o();for(var s=!0,a=0;a<i;a++)this._process(this.minimatch.set[a],a,!1,o);s=!1;function o(){--n._processing,n._processing<=0&&(s?process.nextTick(function(){n._finish()}):n._finish())}}Ne.prototype._finish=function(){if(U0(this instanceof Ne),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();Ws.finish(this),this.emit("end",this.found)}};Ne.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var t=this.matches.length;if(t===0)return this._finish();for(var e=this,r=0;r<this.matches.length;r++)this._realpathSet(r,i);function i(){--t===0&&e._finish()}};Ne.prototype._realpathSet=function(t,e){var r=this.matches[t];if(!r)return e();var i=Object.keys(r),n=this,s=i.length;if(s===0)return e();var a=this.matches[t]=Object.create(null);i.forEach(function(o,u){o=n._makeAbs(o),NY.realpath(o,n.realpathCache,function(l,f){l?l.syscall==="stat"?a[o]=!0:n.emit("error",l):a[f]=!0,--s===0&&(n.matches[t]=a,e())})})};Ne.prototype._mark=function(t){return Ws.mark(this,t)};Ne.prototype._makeAbs=function(t){return Ws.makeAbs(this,t)};Ne.prototype.abort=function(){this.aborted=!0,this.emit("abort")};Ne.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};Ne.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var t=this._emitQueue.slice(0);this._emitQueue.length=0;for(var e=0;e<t.length;e++){var r=t[e];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var i=this._processQueue.slice(0);this._processQueue.length=0;for(var e=0;e<i.length;e++){var n=i[e];this._processing--,this._process(n[0],n[1],n[2],n[3])}}}};Ne.prototype._process=function(t,e,r,i){if(U0(this instanceof Ne),U0(typeof i=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([t,e,r,i]);return}for(var n=0;typeof t[n]=="string";)n++;var s;switch(n){case t.length:this._processSimple(t.join("/"),e,i);return;case 0:s=null;break;default:s=t.slice(0,n).join("/");break}var a=t.slice(n),o;s===null?o=".":((dc(s)||dc(t.map(function(f){return typeof f=="string"?f:"[*]"}).join("/")))&&(!s||!dc(s))&&(s="/"+s),o=s);var u=this._makeAbs(o);if(CY(this,o))return i();var l=a[0]===fR.GLOBSTAR;l?this._processGlobStar(s,o,u,a,e,r,i):this._processReaddir(s,o,u,a,e,r,i)}};Ne.prototype._processReaddir=function(t,e,r,i,n,s,a){var o=this;this._readdir(r,s,function(u,l){return o._processReaddir2(t,e,r,i,n,s,l,a)})};Ne.prototype._processReaddir2=function(t,e,r,i,n,s,a,o){if(!a)return o();for(var u=i[0],l=!!this.minimatch.negate,f=u._glob,h=this.dot||f.charAt(0)===".",p=[],m=0;m<a.length;m++){var v=a[m];if(v.charAt(0)!=="."||h){var S;l&&!t?S=!v.match(u):S=v.match(u),S&&p.push(v)}}var b=p.length;if(b===0)return o();if(i.length===1&&!this.mark&&!this.stat){this.matches[n]||(this.matches[n]=Object.create(null));for(var m=0;m<b;m++){var v=p[m];t&&(t!=="/"?v=t+"/"+v:v=t+v),v.charAt(0)==="/"&&!this.nomount&&(v=$0.join(this.root,v)),this._emitMatch(n,v)}return o()}i.shift();for(var m=0;m<b;m++){var v=p[m],g;t&&(t!=="/"?v=t+"/"+v:v=t+v),this._process([v].concat(i),n,s,o)}o()};Ne.prototype._emitMatch=function(t,e){if(!this.aborted&&!RY(this,e)){if(this.paused){this._emitQueue.push([t,e]);return}var r=dc(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var i=this.cache[r];if(i==="DIR"||Array.isArray(i))return}this.matches[t][e]=!0;var n=this.statCache[r];n&&this.emit("stat",e,n),this.emit("match",e)}}};Ne.prototype._readdirInGlobStar=function(t,e){if(this.aborted)return;if(this.follow)return this._readdir(t,!1,e);var r="lstat\0"+t,i=this,n=W0(r,s);n&&i.fs.lstat(t,n);function s(a,o){if(a&&a.code==="ENOENT")return e();var u=o&&o.isSymbolicLink();i.symlinks[t]=u,!u&&o&&!o.isDirectory()?(i.cache[t]="FILE",e()):i._readdir(t,!1,e)}};Ne.prototype._readdir=function(t,e,r){if(!this.aborted&&(r=W0("readdir\0"+t+"\0"+e,r),!!r)){if(e&&!H0(this.symlinks,t))return this._readdirInGlobStar(t,r);if(H0(this.cache,t)){var i=this.cache[t];if(!i||i==="FILE")return r();if(Array.isArray(i))return r(null,i)}var n=this;n.fs.readdir(t,jY(this,t,r))}};function jY(t,e,r){return function(i,n){i?t._readdirError(e,i,r):t._readdirEntries(e,n,r)}}Ne.prototype._readdirEntries=function(t,e,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var i=0;i<e.length;i++){var n=e[i];t==="/"?n=t+n:n=t+"/"+n,this.cache[n]=!0}return this.cache[t]=e,r(null,e)}};Ne.prototype._readdirError=function(t,e,r){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":var i=this._makeAbs(t);if(this.cache[i]="FILE",i===this.cwdAbs){var n=new Error(e.code+" invalid cwd "+this.cwd);n.path=this.cwd,n.code=e.code,this.emit("error",n),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:this.cache[this._makeAbs(t)]=!1,this.strict&&(this.emit("error",e),this.abort()),this.silent||console.error("glob error",e);break}return r()}};Ne.prototype._processGlobStar=function(t,e,r,i,n,s,a){var o=this;this._readdir(r,s,function(u,l){o._processGlobStar2(t,e,r,i,n,s,l,a)})};Ne.prototype._processGlobStar2=function(t,e,r,i,n,s,a,o){if(!a)return o();var u=i.slice(1),l=t?[t]:[],f=l.concat(u);this._process(f,n,!1,o);var h=this.symlinks[r],p=a.length;if(h&&s)return o();for(var m=0;m<p;m++){var v=a[m];if(!(v.charAt(0)==="."&&!this.dot)){var S=l.concat(a[m],u);this._process(S,n,!0,o);var b=l.concat(a[m],i);this._process(b,n,!0,o)}}o()};Ne.prototype._processSimple=function(t,e,r){var i=this;this._stat(t,function(n,s){i._processSimple2(t,e,n,s,r)})};Ne.prototype._processSimple2=function(t,e,r,i,n){if(this.matches[e]||(this.matches[e]=Object.create(null)),!i)return n();if(t&&dc(t)&&!this.nomount){var s=/[\/\\]$/.test(t);t.charAt(0)==="/"?t=$0.join(this.root,t):(t=$0.resolve(this.root,t),s&&(t+="/"))}process.platform==="win32"&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t),n()};Ne.prototype._stat=function(t,e){var r=this._makeAbs(t),i=t.slice(-1)==="/";if(t.length>this.maxLength)return e();if(!this.stat&&H0(this.cache,r)){var n=this.cache[r];if(Array.isArray(n)&&(n="DIR"),!i||n==="DIR")return e(null,n);if(i&&n==="FILE")return e()}var s,a=this.statCache[r];if(a!==void 0){if(a===!1)return e(null,a);var o=a.isDirectory()?"DIR":"FILE";return i&&o==="FILE"?e():e(null,o,a)}var u=this,l=W0("stat\0"+r,f);l&&u.fs.lstat(r,l);function f(h,p){if(p&&p.isSymbolicLink())return u.fs.stat(r,function(m,v){m?u._stat2(t,r,null,p,e):u._stat2(t,r,m,v,e)});u._stat2(t,r,h,p,e)}};Ne.prototype._stat2=function(t,e,r,i,n){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR"))return this.statCache[e]=!1,n();var s=t.slice(-1)==="/";if(this.statCache[e]=i,e.slice(-1)==="/"&&i&&!i.isDirectory())return n(null,!1,i);var a=!0;return i&&(a=i.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||a,s&&a==="FILE"?n():n(null,a,i)}});var hR=T(lo=>{"use strict";y();Object.defineProperty(lo,"__esModule",{value:!0});lo.saveToDiskFixApplicator=void 0;lo.autofix=$Y;var BY=ae("fs/promises"),z0=hr(),VY=async(t,e)=>{let r=(0,z0.applyFixToString)(t.source,e);await(0,BY.writeFile)(z0.path.fsPath(t.uri),r,"utf8")};lo.saveToDiskFixApplicator=VY;async function $Y(t,e){await(0,z0.autofix)(t,e,lo.saveToDiskFixApplicator)}});var J0=T(mc=>{"use strict";y();var UY=mc&&mc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mc,"__esModule",{value:!0});mc.fileExists=GY;var HY=UY(ae("node:fs/promises"));async function GY(t){try{return await HY.default.stat(t),!0}catch{return!1}}});var mR=T(fo=>{"use strict";y();var dR=fo&&fo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fo,"__esModule",{value:!0});fo.thisNodeModuleRoot=void 0;var Fde=dR(ae("node:path")),WY=dR(ae("node:os")),zY=()=>WY.default.tmpdir();fo.thisNodeModuleRoot=zY});var _R=T(po=>{"use strict";y();var JY=po&&po.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(po,"__esModule",{value:!0});po.loadThirdPartyChecks=XY;po.findThirdPartyChecks=ZY;var KY=JY($d()),QY=ae("node:util"),YY=(0,QY.promisify)(KY.default);function XY(t=[]){let e=new Set;for(let r of t)try{let n=ae(r).checks;if(!Array.isArray(n))throw new Error(`Expected the 'checks' export to be an array and got ${typeof n}`);for(let s of n)eX(s)?e.add(s):console.error(`Expected ${s} to be a CheckDefinition, but it looks like it isn't`)}catch(i){console.error(`Error loading ${r}, ignoring it.
|
|
1222
|
-
${i}`)}return[...e]}async function ZY(t){let e=[gR(t.replace(/\\/g,"/"),"/node_modules/theme-check-*/"),gR(t.replace(/\\/g,"/"),"/node_modules/@*/theme-check-*/")];return(await Promise.all(e.map(i=>YY(i)))).flat().filter(i=>!/\@shopify\/theme-check-(node|common|browser|docs-updater)/.test(i)&&!/theme-check-vscode/.test(i))}function gR(...t){return t.flatMap(e=>e.replace(/\\/g,"/").replace(/\/+$/,"")).join("/")}function yR(t){return t!==null&&typeof t=="object"}function eX(t){return yR(t)&&"meta"in t&&"create"in t&&yR(t.meta)&&"code"in t.meta}});var bR=T(yc=>{"use strict";y();var tX=yc&&yc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(yc,"__esModule",{value:!0});yc.loadConfigDescription=sX;var Q0=hr(),gc=tX(ae("node:path")),vR=J0(),rX=mR(),K0=_R(),iX=Du(),nX=t=>t.flat();async function sX(t,e){let r=await pX(e),i=await Promise.all([(0,K0.findThirdPartyChecks)((0,rX.thisNodeModuleRoot)()),(0,K0.findThirdPartyChecks)(r)]).then(nX),n=(0,K0.loadThirdPartyChecks)([...t.require,...i]),s=Q0.allChecks.concat(n).filter(oX(t)),a=iX.URI.file(e);return{settings:cX(t.checkSettings,s),context:t.context??"theme",checks:s,ignore:t.ignore,rootUri:aX(a,t.root)}}function aX(t,e){if(e===void 0)return Q0.path.normalize(t);if(gc.default.isAbsolute(e))throw new Error('the "root" property can only be relative');return Q0.path.resolve(t,e)}var oX=t=>e=>{let r=t.checkSettings[e.meta.code]??uX(t,e);return r?r.enabled:!1};function uX(t,e){if(!e.meta.aliases)return;let r=e.meta.aliases.find(i=>t.checkSettings[i]);if(r)return t.checkSettings[r]}function cX(t,e){return Object.fromEntries(Object.entries(t).map(([r,i])=>[lX(r,e),i]))}function lX(t,e){return e.find(i=>i.meta.code===t||i.meta.aliases?.find(n=>n===t))?.meta.code}async function fX(t){if(gc.default.dirname(t)===t)return!0;let[e,r]=await Promise.all([(0,vR.fileExists)(gc.default.join(t,"node_modules")),(0,vR.fileExists)(gc.default.join(t,".git"))]);return e||r}async function pX(t){let e=t;for(;!await fX(e);)e=gc.default.dirname(e);return e}});var xe=T(zt=>{"use strict";y();var Y0=Symbol.for("yaml.alias"),SR=Symbol.for("yaml.document"),Ud=Symbol.for("yaml.map"),wR=Symbol.for("yaml.pair"),X0=Symbol.for("yaml.scalar"),Hd=Symbol.for("yaml.seq"),pn=Symbol.for("yaml.node.type"),hX=t=>!!t&&typeof t=="object"&&t[pn]===Y0,dX=t=>!!t&&typeof t=="object"&&t[pn]===SR,mX=t=>!!t&&typeof t=="object"&&t[pn]===Ud,gX=t=>!!t&&typeof t=="object"&&t[pn]===wR,xR=t=>!!t&&typeof t=="object"&&t[pn]===X0,yX=t=>!!t&&typeof t=="object"&&t[pn]===Hd;function kR(t){if(t&&typeof t=="object")switch(t[pn]){case Ud:case Hd:return!0}return!1}function _X(t){if(t&&typeof t=="object")switch(t[pn]){case Y0:case Ud:case X0:case Hd:return!0}return!1}var vX=t=>(xR(t)||kR(t))&&!!t.anchor;zt.ALIAS=Y0;zt.DOC=SR;zt.MAP=Ud;zt.NODE_TYPE=pn;zt.PAIR=wR;zt.SCALAR=X0;zt.SEQ=Hd;zt.hasAnchor=vX;zt.isAlias=hX;zt.isCollection=kR;zt.isDocument=dX;zt.isMap=mX;zt.isNode=_X;zt.isPair=gX;zt.isScalar=xR;zt.isSeq=yX});var _c=T(Z0=>{"use strict";y();var It=xe(),Tr=Symbol("break visit"),IR=Symbol("skip children"),Bi=Symbol("remove node");function Gd(t,e){let r=AR(e);It.isDocument(t)?ho(null,t.contents,r,Object.freeze([t]))===Bi&&(t.contents=null):ho(null,t,r,Object.freeze([]))}Gd.BREAK=Tr;Gd.SKIP=IR;Gd.REMOVE=Bi;function ho(t,e,r,i){let n=TR(t,e,r,i);if(It.isNode(n)||It.isPair(n))return ER(t,i,n),ho(t,n,r,i);if(typeof n!="symbol"){if(It.isCollection(e)){i=Object.freeze(i.concat(e));for(let s=0;s<e.items.length;++s){let a=ho(s,e.items[s],r,i);if(typeof a=="number")s=a-1;else{if(a===Tr)return Tr;a===Bi&&(e.items.splice(s,1),s-=1)}}}else if(It.isPair(e)){i=Object.freeze(i.concat(e));let s=ho("key",e.key,r,i);if(s===Tr)return Tr;s===Bi&&(e.key=null);let a=ho("value",e.value,r,i);if(a===Tr)return Tr;a===Bi&&(e.value=null)}}return n}async function Wd(t,e){let r=AR(e);It.isDocument(t)?await mo(null,t.contents,r,Object.freeze([t]))===Bi&&(t.contents=null):await mo(null,t,r,Object.freeze([]))}Wd.BREAK=Tr;Wd.SKIP=IR;Wd.REMOVE=Bi;async function mo(t,e,r,i){let n=await TR(t,e,r,i);if(It.isNode(n)||It.isPair(n))return ER(t,i,n),mo(t,n,r,i);if(typeof n!="symbol"){if(It.isCollection(e)){i=Object.freeze(i.concat(e));for(let s=0;s<e.items.length;++s){let a=await mo(s,e.items[s],r,i);if(typeof a=="number")s=a-1;else{if(a===Tr)return Tr;a===Bi&&(e.items.splice(s,1),s-=1)}}}else if(It.isPair(e)){i=Object.freeze(i.concat(e));let s=await mo("key",e.key,r,i);if(s===Tr)return Tr;s===Bi&&(e.key=null);let a=await mo("value",e.value,r,i);if(a===Tr)return Tr;a===Bi&&(e.value=null)}}return n}function AR(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function TR(t,e,r,i){if(typeof r=="function")return r(t,e,i);if(It.isMap(e))return r.Map?.(t,e,i);if(It.isSeq(e))return r.Seq?.(t,e,i);if(It.isPair(e))return r.Pair?.(t,e,i);if(It.isScalar(e))return r.Scalar?.(t,e,i);if(It.isAlias(e))return r.Alias?.(t,e,i)}function ER(t,e,r){let i=e[e.length-1];if(It.isCollection(i))i.items[t]=r;else if(It.isPair(i))t==="key"?i.key=r:i.value=r;else if(It.isDocument(i))i.contents=r;else{let n=It.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}Z0.visit=Gd;Z0.visitAsync=Wd});var eS=T(NR=>{"use strict";y();var OR=xe(),bX=_c(),SX={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},wX=t=>t.replace(/[!,[\]{}]/g,e=>SX[e]),vc=class t{constructor(e,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,r)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,r){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let i=e.trim().split(/[ \t]+/),n=i.shift();switch(n){case"%TAG":{if(i.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;let[s,a]=i;return this.tags[s]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[s]=i;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let a=/^\d+\.\d+$/.test(s);return r(6,`Unsupported YAML version ${s}`,a),!1}}default:return r(0,`Unknown directive ${n}`,!0),!1}}tagName(e,r){if(e==="!")return"!";if(e[0]!=="!")return r(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let a=e.slice(2,-1);return a==="!"||a==="!!"?(r(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&r("Verbatim tags must end with a >"),a)}let[,i,n]=e.match(/^(.*!)([^!]*)$/s);n||r(`The ${e} tag has no suffix`);let s=this.tags[i];if(s)try{return s+decodeURIComponent(n)}catch(a){return r(String(a)),null}return i==="!"?e:(r(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[r,i]of Object.entries(this.tags))if(e.startsWith(i))return r+wX(e.substring(i.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags),n;if(e&&i.length>0&&OR.isNode(e.contents)){let s={};bX.visit(e.contents,(a,o)=>{OR.isNode(o)&&o.tag&&(s[o.tag]=!0)}),n=Object.keys(s)}else n=[];for(let[s,a]of i)s==="!!"&&a==="tag:yaml.org,2002:"||(!e||n.some(o=>o.startsWith(a)))&&r.push(`%TAG ${s} ${a}`);return r.join(`
|
|
1223
|
-
`)}};vc.defaultYaml={explicit:!1,version:"1.2"};vc.defaultTags={"!!":"tag:yaml.org,2002:"};NR.Directives=vc});var zd=T(bc=>{"use strict";y();var LR=xe(),xX=_c();function kX(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(r)}return!0}function PR(t){let e=new Set;return xX.visit(t,{Value(r,i){i.anchor&&e.add(i.anchor)}}),e}function qR(t,e){for(let r=1;;++r){let i=`${t}${r}`;if(!e.has(i))return i}}function IX(t,e){let r=[],i=new Map,n=null;return{onAnchor:s=>{r.push(s),n??(n=PR(t));let a=qR(e,n);return n.add(a),a},setAnchors:()=>{for(let s of r){let a=i.get(s);if(typeof a=="object"&&a.anchor&&(LR.isScalar(a.node)||LR.isCollection(a.node)))a.node.anchor=a.anchor;else{let o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=s,o}}},sourceObjects:i}}bc.anchorIsValid=kX;bc.anchorNames=PR;bc.createNodeAnchors=IX;bc.findNewAnchor=qR});var tS=T(CR=>{"use strict";y();function Sc(t,e,r,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let n=0,s=i.length;n<s;++n){let a=i[n],o=Sc(t,i,String(n),a);o===void 0?delete i[n]:o!==a&&(i[n]=o)}else if(i instanceof Map)for(let n of Array.from(i.keys())){let s=i.get(n),a=Sc(t,i,n,s);a===void 0?i.delete(n):a!==s&&i.set(n,a)}else if(i instanceof Set)for(let n of Array.from(i)){let s=Sc(t,i,n,n);s===void 0?i.delete(n):s!==n&&(i.delete(n),i.add(s))}else for(let[n,s]of Object.entries(i)){let a=Sc(t,i,n,s);a===void 0?delete i[n]:a!==s&&(i[n]=a)}return t.call(e,r,i)}CR.applyReviver=Sc});var Bn=T(MR=>{"use strict";y();var AX=xe();function RR(t,e,r){if(Array.isArray(t))return t.map((i,n)=>RR(i,String(n),r));if(t&&typeof t.toJSON=="function"){if(!r||!AX.hasAnchor(t))return t.toJSON(e,r);let i={aliasCount:0,count:1,res:void 0};r.anchors.set(t,i),r.onCreate=s=>{i.res=s,delete r.onCreate};let n=t.toJSON(e,r);return r.onCreate&&r.onCreate(n),n}return typeof t=="bigint"&&!r?.keep?Number(t):t}MR.toJS=RR});var Jd=T(FR=>{"use strict";y();var TX=tS(),DR=xe(),EX=Bn(),rS=class{constructor(e){Object.defineProperty(this,DR.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:r,maxAliasCount:i,onAnchor:n,reviver:s}={}){if(!DR.isDocument(e))throw new TypeError("A document argument is required");let a={anchors:new Map,doc:e,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},o=EX.toJS(this,"",a);if(typeof n=="function")for(let{count:u,res:l}of a.anchors.values())n(l,u);return typeof s=="function"?TX.applyReviver(s,{"":o},"",o):o}};FR.NodeBase=rS});var wc=T(jR=>{"use strict";y();var OX=zd(),NX=_c(),go=xe(),LX=Jd(),PX=Bn(),iS=class extends LX.NodeBase{constructor(e){super(go.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,r){if(r?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let i;r?.aliasResolveCache?i=r.aliasResolveCache:(i=[],NX.visit(e,{Node:(s,a)=>{(go.isAlias(a)||go.hasAnchor(a))&&i.push(a)}}),r&&(r.aliasResolveCache=i));let n;for(let s of i){if(s===this)break;s.anchor===this.source&&(n=s)}return n}toJSON(e,r){if(!r)return{source:this.source};let{anchors:i,doc:n,maxAliasCount:s}=r,a=this.resolve(n,r);if(!a){let u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(u)}let o=i.get(a);if(o||(PX.toJS(a,null,r),o=i.get(a)),o?.res===void 0){let u="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(u)}if(s>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=Kd(n,a,i)),o.count*o.aliasCount>s)){let u="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(u)}return o.res}toString(e,r,i){let n=`*${this.source}`;if(e){if(OX.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(e.implicitKey)return`${n} `}return n}};function Kd(t,e,r){if(go.isAlias(e)){let i=e.resolve(t),n=r&&i&&r.get(i);return n?n.count*n.aliasCount:0}else if(go.isCollection(e)){let i=0;for(let n of e.items){let s=Kd(t,n,r);s>i&&(i=s)}return i}else if(go.isPair(e)){let i=Kd(t,e.key,r),n=Kd(t,e.value,r);return Math.max(i,n)}return 1}jR.Alias=iS});var dt=T(nS=>{"use strict";y();var qX=xe(),CX=Jd(),RX=Bn(),MX=t=>!t||typeof t!="function"&&typeof t!="object",Vn=class extends CX.NodeBase{constructor(e){super(qX.SCALAR),this.value=e}toJSON(e,r){return r?.keep?this.value:RX.toJS(this.value,e,r)}toString(){return String(this.value)}};Vn.BLOCK_FOLDED="BLOCK_FOLDED";Vn.BLOCK_LITERAL="BLOCK_LITERAL";Vn.PLAIN="PLAIN";Vn.QUOTE_DOUBLE="QUOTE_DOUBLE";Vn.QUOTE_SINGLE="QUOTE_SINGLE";nS.Scalar=Vn;nS.isScalarValue=MX});var xc=T(VR=>{"use strict";y();var DX=wc(),zs=xe(),BR=dt(),FX="tag:yaml.org,2002:";function jX(t,e,r){if(e){let i=r.filter(s=>s.tag===e),n=i.find(s=>!s.format)??i[0];if(!n)throw new Error(`Tag ${e} not found`);return n}return r.find(i=>i.identify?.(t)&&!i.format)}function BX(t,e,r){if(zs.isDocument(t)&&(t=t.contents),zs.isNode(t))return t;if(zs.isPair(t)){let h=r.schema[zs.MAP].createNode?.(r.schema,null,r);return h.items.push(t),h}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:i,onAnchor:n,onTagObj:s,schema:a,sourceObjects:o}=r,u;if(i&&t&&typeof t=="object"){if(u=o.get(t),u)return u.anchor??(u.anchor=n(t)),new DX.Alias(u.anchor);u={anchor:null,node:null},o.set(t,u)}e?.startsWith("!!")&&(e=FX+e.slice(2));let l=jX(t,e,a.tags);if(!l){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let h=new BR.Scalar(t);return u&&(u.node=h),h}l=t instanceof Map?a[zs.MAP]:Symbol.iterator in Object(t)?a[zs.SEQ]:a[zs.MAP]}s&&(s(l),delete r.onTagObj);let f=l?.createNode?l.createNode(r.schema,t,r):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(r.schema,t,r):new BR.Scalar(t);return e?f.tag=e:l.default||(f.tag=l.tag),u&&(u.node=f),f}VR.createNode=BX});var Yd=T(Qd=>{"use strict";y();var VX=xc(),Vi=xe(),$X=Jd();function sS(t,e,r){let i=r;for(let n=e.length-1;n>=0;--n){let s=e[n];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let a=[];a[s]=i,i=a}else i=new Map([[s,i]])}return VX.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var $R=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,aS=class extends $X.NodeBase{constructor(e,r){super(e),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(e){let r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(r.schema=e),r.items=r.items.map(i=>Vi.isNode(i)||Vi.isPair(i)?i.clone(e):i),this.range&&(r.range=this.range.slice()),r}addIn(e,r){if($R(e))this.add(r);else{let[i,...n]=e,s=this.get(i,!0);if(Vi.isCollection(s))s.addIn(n,r);else if(s===void 0&&this.schema)this.set(i,sS(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}deleteIn(e){let[r,...i]=e;if(i.length===0)return this.delete(r);let n=this.get(r,!0);if(Vi.isCollection(n))return n.deleteIn(i);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}getIn(e,r){let[i,...n]=e,s=this.get(i,!0);return n.length===0?!r&&Vi.isScalar(s)?s.value:s:Vi.isCollection(s)?s.getIn(n,r):void 0}hasAllNullValues(e){return this.items.every(r=>{if(!Vi.isPair(r))return!1;let i=r.value;return i==null||e&&Vi.isScalar(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(e){let[r,...i]=e;if(i.length===0)return this.has(r);let n=this.get(r,!0);return Vi.isCollection(n)?n.hasIn(i):!1}setIn(e,r){let[i,...n]=e;if(n.length===0)this.set(i,r);else{let s=this.get(i,!0);if(Vi.isCollection(s))s.setIn(n,r);else if(s===void 0&&this.schema)this.set(i,sS(this.schema,n,r));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}};Qd.Collection=aS;Qd.collectionFromPath=sS;Qd.isEmptyPath=$R});var kc=T(Xd=>{"use strict";y();var UX=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function oS(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var HX=(t,e,r)=>t.endsWith(`
|
|
1224
|
-
`)?oS(r,e):r.includes(`
|
|
1225
|
-
`)?`
|
|
1226
|
-
`+oS(r,e):(t.endsWith(" ")?"":" ")+r;Xd.indentComment=oS;Xd.lineComment=HX;Xd.stringifyComment=UX});var HR=T(Ic=>{"use strict";y();var GX="flow",uS="block",Zd="quoted";function WX(t,e,r="flow",{indentAtStart:i,lineWidth:n=80,minContentWidth:s=20,onFold:a,onOverflow:o}={}){if(!n||n<0)return t;n<s&&(s=0);let u=Math.max(1+s,1+n-e.length);if(t.length<=u)return t;let l=[],f={},h=n-e.length;typeof i=="number"&&(i>n-Math.max(2,s)?l.push(0):h=n-i);let p,m,v=!1,S=-1,b=-1,g=-1;r===uS&&(S=UR(t,S,e.length),S!==-1&&(h=S+u));for(let w;w=t[S+=1];){if(r===Zd&&w==="\\"){switch(b=S,t[S+1]){case"x":S+=3;break;case"u":S+=5;break;case"U":S+=9;break;default:S+=1}g=S}if(w===`
|
|
1227
|
-
`)r===uS&&(S=UR(t,S,e.length)),h=S+e.length+u,p=void 0;else{if(w===" "&&m&&m!==" "&&m!==`
|
|
1228
|
-
`&&m!==" "){let _=t[S+1];_&&_!==" "&&_!==`
|
|
1229
|
-
`&&_!==" "&&(p=S)}if(S>=h)if(p)l.push(p),h=p+u,p=void 0;else if(r===Zd){for(;m===" "||m===" ";)m=w,w=t[S+=1],v=!0;let _=S>g+1?S-2:b-1;if(f[_])return t;l.push(_),f[_]=!0,h=_+u,p=void 0}else v=!0}m=w}if(v&&o&&o(),l.length===0)return t;a&&a();let k=t.slice(0,l[0]);for(let w=0;w<l.length;++w){let _=l[w],A=l[w+1]||t.length;_===0?k=`
|
|
1230
|
-
${e}${t.slice(0,A)}`:(r===Zd&&f[_]&&(k+=`${t[_]}\\`),k+=`
|
|
1231
|
-
${e}${t.slice(_+1,A)}`)}return k}function UR(t,e,r){let i=e,n=e+1,s=t[n];for(;s===" "||s===" ";)if(e<n+r)s=t[++e];else{do s=t[++e];while(s&&s!==`
|
|
1232
|
-
`);i=e,n=e+1,s=t[n]}return i}Ic.FOLD_BLOCK=uS;Ic.FOLD_FLOW=GX;Ic.FOLD_QUOTED=Zd;Ic.foldFlowLines=WX});var Tc=T(GR=>{"use strict";y();var vi=dt(),$n=HR(),tm=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),rm=t=>/^(%|---|\.\.\.)/m.test(t);function zX(t,e,r){if(!e||e<0)return!1;let i=e-r,n=t.length;if(n<=i)return!1;for(let s=0,a=0;s<n;++s)if(t[s]===`
|
|
1233
|
-
`){if(s-a>i)return!0;if(a=s+1,n-a<=i)return!1}return!0}function Ac(t,e){let r=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return r;let{implicitKey:i}=e,n=e.options.doubleQuotedMinMultiLineLength,s=e.indent||(rm(t)?" ":""),a="",o=0;for(let u=0,l=r[u];l;l=r[++u])if(l===" "&&r[u+1]==="\\"&&r[u+2]==="n"&&(a+=r.slice(o,u)+"\\ ",u+=1,o=u,l="\\"),l==="\\")switch(r[u+1]){case"u":{a+=r.slice(o,u);let f=r.substr(u+2,4);switch(f){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:f.substr(0,2)==="00"?a+="\\x"+f.substr(2):a+=r.substr(u,6)}u+=5,o=u+1}break;case"n":if(i||r[u+2]==='"'||r.length<n)u+=1;else{for(a+=r.slice(o,u)+`
|
|
1234
|
-
|
|
1235
|
-
`;r[u+2]==="\\"&&r[u+3]==="n"&&r[u+4]!=='"';)a+=`
|
|
1236
|
-
`,u+=2;a+=s,r[u+2]===" "&&(a+="\\"),u+=1,o=u+1}break;default:u+=1}return a=o?a+r.slice(o):r,i?a:$n.foldFlowLines(a,s,$n.FOLD_QUOTED,tm(e,!1))}function cS(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
|
|
1237
|
-
`)||/[ \t]\n|\n[ \t]/.test(t))return Ac(t,e);let r=e.indent||(rm(t)?" ":""),i="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
1238
|
-
${r}`)+"'";return e.implicitKey?i:$n.foldFlowLines(i,r,$n.FOLD_FLOW,tm(e,!1))}function yo(t,e){let{singleQuote:r}=e.options,i;if(r===!1)i=Ac;else{let n=t.includes('"'),s=t.includes("'");n&&!s?i=cS:s&&!n?i=Ac:i=r?cS:Ac}return i(t,e)}var lS;try{lS=new RegExp(`(^|(?<!
|
|
1239
|
-
))
|
|
1240
|
-
+(?!
|
|
1241
|
-
|$)`,"g")}catch{lS=/\n+(?!\n|$)/g}function em({comment:t,type:e,value:r},i,n,s){let{blockQuote:a,commentString:o,lineWidth:u}=i.options;if(!a||/\n[\t ]+$/.test(r))return yo(r,i);let l=i.indent||(i.forceBlockIndent||rm(r)?" ":""),f=a==="literal"?!0:a==="folded"||e===vi.Scalar.BLOCK_FOLDED?!1:e===vi.Scalar.BLOCK_LITERAL?!0:!zX(r,u,l.length);if(!r)return f?`|
|
|
1242
|
-
`:`>
|
|
1243
|
-
`;let h,p;for(p=r.length;p>0;--p){let A=r[p-1];if(A!==`
|
|
1244
|
-
`&&A!==" "&&A!==" ")break}let m=r.substring(p),v=m.indexOf(`
|
|
1245
|
-
`);v===-1?h="-":r===m||v!==m.length-1?(h="+",s&&s()):h="",m&&(r=r.slice(0,-m.length),m[m.length-1]===`
|
|
1246
|
-
`&&(m=m.slice(0,-1)),m=m.replace(lS,`$&${l}`));let S=!1,b,g=-1;for(b=0;b<r.length;++b){let A=r[b];if(A===" ")S=!0;else if(A===`
|
|
1247
|
-
`)g=b;else break}let k=r.substring(0,g<b?g+1:b);k&&(r=r.substring(k.length),k=k.replace(/\n+/g,`$&${l}`));let _=(S?l?"2":"1":"")+h;if(t&&(_+=" "+o(t.replace(/ ?[\r\n]+/g," ")),n&&n()),!f){let A=r.replace(/\n+/g,`
|
|
1248
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),E=!1,O=tm(i,!0);a!=="folded"&&e!==vi.Scalar.BLOCK_FOLDED&&(O.onOverflow=()=>{E=!0});let L=$n.foldFlowLines(`${k}${A}${m}`,l,$n.FOLD_BLOCK,O);if(!E)return`>${_}
|
|
1249
|
-
${l}${L}`}return r=r.replace(/\n+/g,`$&${l}`),`|${_}
|
|
1250
|
-
${l}${k}${r}${m}`}function JX(t,e,r,i){let{type:n,value:s}=t,{actualString:a,implicitKey:o,indent:u,indentStep:l,inFlow:f}=e;if(o&&s.includes(`
|
|
1251
|
-
`)||f&&/[[\]{},]/.test(s))return yo(s,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return o||f||!s.includes(`
|
|
1252
|
-
`)?yo(s,e):em(t,e,r,i);if(!o&&!f&&n!==vi.Scalar.PLAIN&&s.includes(`
|
|
1253
|
-
`))return em(t,e,r,i);if(rm(s)){if(u==="")return e.forceBlockIndent=!0,em(t,e,r,i);if(o&&u===l)return yo(s,e)}let h=s.replace(/\n+/g,`$&
|
|
1254
|
-
${u}`);if(a){let p=S=>S.default&&S.tag!=="tag:yaml.org,2002:str"&&S.test?.test(h),{compat:m,tags:v}=e.doc.schema;if(v.some(p)||m?.some(p))return yo(s,e)}return o?h:$n.foldFlowLines(h,u,$n.FOLD_FLOW,tm(e,!1))}function KX(t,e,r,i){let{implicitKey:n,inFlow:s}=e,a=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:o}=t;o!==vi.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(o=vi.Scalar.QUOTE_DOUBLE);let u=f=>{switch(f){case vi.Scalar.BLOCK_FOLDED:case vi.Scalar.BLOCK_LITERAL:return n||s?yo(a.value,e):em(a,e,r,i);case vi.Scalar.QUOTE_DOUBLE:return Ac(a.value,e);case vi.Scalar.QUOTE_SINGLE:return cS(a.value,e);case vi.Scalar.PLAIN:return JX(a,e,r,i);default:return null}},l=u(o);if(l===null){let{defaultKeyType:f,defaultStringType:h}=e.options,p=n&&f||h;if(l=u(p),l===null)throw new Error(`Unsupported default string type ${p}`)}return l}GR.stringifyString=KX});var Ec=T(fS=>{"use strict";y();var QX=zd(),Un=xe(),YX=kc(),XX=Tc();function ZX(t,e){let r=Object.assign({blockQuote:!0,commentString:YX.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),i;switch(r.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:t,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:i,options:r}}function eZ(t,e){if(e.tag){let n=t.filter(s=>s.tag===e.tag);if(n.length>0)return n.find(s=>s.format===e.format)??n[0]}let r,i;if(Un.isScalar(e)){i=e.value;let n=t.filter(s=>s.identify?.(i));if(n.length>1){let s=n.filter(a=>a.test);s.length>0&&(n=s)}r=n.find(s=>s.format===e.format)??n.find(s=>!s.format)}else i=e,r=t.find(n=>n.nodeClass&&i instanceof n.nodeClass);if(!r){let n=i?.constructor?.name??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${n} value`)}return r}function tZ(t,e,{anchors:r,doc:i}){if(!i.directives)return"";let n=[],s=(Un.isScalar(t)||Un.isCollection(t))&&t.anchor;s&&QX.anchorIsValid(s)&&(r.add(s),n.push(`&${s}`));let a=t.tag??(e.default?null:e.tag);return a&&n.push(i.directives.tagString(a)),n.join(" ")}function rZ(t,e,r,i){if(Un.isPair(t))return t.toString(e,r,i);if(Un.isAlias(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let n,s=Un.isNode(t)?t:e.doc.createNode(t,{onTagObj:u=>n=u});n??(n=eZ(e.doc.schema.tags,s));let a=tZ(s,n,e);a.length>0&&(e.indentAtStart=(e.indentAtStart??0)+a.length+1);let o=typeof n.stringify=="function"?n.stringify(s,e,r,i):Un.isScalar(s)?XX.stringifyString(s,e,r,i):s.toString(e,r,i);return a?Un.isScalar(s)||o[0]==="{"||o[0]==="["?`${a} ${o}`:`${a}
|
|
1255
|
-
${e.indent}${o}`:o}fS.createStringifyContext=ZX;fS.stringify=rZ});var KR=T(JR=>{"use strict";y();var hn=xe(),WR=dt(),zR=Ec(),Oc=kc();function iZ({key:t,value:e},r,i,n){let{allNullValues:s,doc:a,indent:o,indentStep:u,options:{commentString:l,indentSeq:f,simpleKeys:h}}=r,p=hn.isNode(t)&&t.comment||null;if(h){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(hn.isCollection(t)||!hn.isNode(t)&&typeof t=="object"){let O="With simple keys, collection cannot be used as a key value";throw new Error(O)}}let m=!h&&(!t||p&&e==null&&!r.inFlow||hn.isCollection(t)||(hn.isScalar(t)?t.type===WR.Scalar.BLOCK_FOLDED||t.type===WR.Scalar.BLOCK_LITERAL:typeof t=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!m&&(h||!s),indent:o+u});let v=!1,S=!1,b=zR.stringify(t,r,()=>v=!0,()=>S=!0);if(!m&&!r.inFlow&&b.length>1024){if(h)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(r.inFlow){if(s||e==null)return v&&i&&i(),b===""?"?":m?`? ${b}`:b}else if(s&&!h||e==null&&m)return b=`? ${b}`,p&&!v?b+=Oc.lineComment(b,r.indent,l(p)):S&&n&&n(),b;v&&(p=null),m?(p&&(b+=Oc.lineComment(b,r.indent,l(p))),b=`? ${b}
|
|
1256
|
-
${o}:`):(b=`${b}:`,p&&(b+=Oc.lineComment(b,r.indent,l(p))));let g,k,w;hn.isNode(e)?(g=!!e.spaceBefore,k=e.commentBefore,w=e.comment):(g=!1,k=null,w=null,e&&typeof e=="object"&&(e=a.createNode(e))),r.implicitKey=!1,!m&&!p&&hn.isScalar(e)&&(r.indentAtStart=b.length+1),S=!1,!f&&u.length>=2&&!r.inFlow&&!m&&hn.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(r.indent=r.indent.substring(2));let _=!1,A=zR.stringify(e,r,()=>_=!0,()=>S=!0),E=" ";if(p||g||k){if(E=g?`
|
|
1257
|
-
`:"",k){let O=l(k);E+=`
|
|
1258
|
-
${Oc.indentComment(O,r.indent)}`}A===""&&!r.inFlow?E===`
|
|
1259
|
-
`&&w&&(E=`
|
|
1260
|
-
|
|
1261
|
-
`):E+=`
|
|
1262
|
-
${r.indent}`}else if(!m&&hn.isCollection(e)){let O=A[0],L=A.indexOf(`
|
|
1263
|
-
`),B=L!==-1,R=r.inFlow??e.flow??e.items.length===0;if(B||!R){let q=!1;if(B&&(O==="&"||O==="!")){let P=A.indexOf(" ");O==="&"&&P!==-1&&P<L&&A[P+1]==="!"&&(P=A.indexOf(" ",P+1)),(P===-1||L<P)&&(q=!0)}q||(E=`
|
|
1264
|
-
${r.indent}`)}}else(A===""||A[0]===`
|
|
1265
|
-
`)&&(E="");return b+=E+A,r.inFlow?_&&i&&i():w&&!_?b+=Oc.lineComment(b,r.indent,l(w)):S&&n&&n(),b}JR.stringifyPair=iZ});var hS=T(pS=>{"use strict";y();var QR=ae("process");function nZ(t,...e){t==="debug"&&console.log(...e)}function sZ(t,e){(t==="debug"||t==="warn")&&(typeof QR.emitWarning=="function"?QR.emitWarning(e):console.warn(e))}pS.debug=nZ;pS.warn=sZ});var om=T(am=>{"use strict";y();var sm=xe(),YR=dt(),im="<<",nm={identify:t=>t===im||typeof t=="symbol"&&t.description===im,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new YR.Scalar(Symbol(im)),{addToJSMap:XR}),stringify:()=>im},aZ=(t,e)=>(nm.identify(e)||sm.isScalar(e)&&(!e.type||e.type===YR.Scalar.PLAIN)&&nm.identify(e.value))&&t?.doc.schema.tags.some(r=>r.tag===nm.tag&&r.default);function XR(t,e,r){let i=ZR(t,r);if(sm.isSeq(i))for(let n of i.items)dS(t,e,n);else if(Array.isArray(i))for(let n of i)dS(t,e,n);else dS(t,e,i)}function dS(t,e,r){let i=ZR(t,r);if(!sm.isMap(i))throw new Error("Merge sources must be maps or map aliases");let n=i.toJSON(null,t,Map);for(let[s,a]of n)e instanceof Map?e.has(s)||e.set(s,a):e instanceof Set?e.add(s):Object.prototype.hasOwnProperty.call(e,s)||Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return e}function ZR(t,e){return t&&sm.isAlias(e)?e.resolve(t.doc,t):e}am.addMergeToJSMap=XR;am.isMergeKey=aZ;am.merge=nm});var gS=T(rM=>{"use strict";y();var oZ=hS(),eM=om(),uZ=Ec(),tM=xe(),mS=Bn();function cZ(t,e,{key:r,value:i}){if(tM.isNode(r)&&r.addToJSMap)r.addToJSMap(t,e,i);else if(eM.isMergeKey(t,r))eM.addMergeToJSMap(t,e,i);else{let n=mS.toJS(r,"",t);if(e instanceof Map)e.set(n,mS.toJS(i,n,t));else if(e instanceof Set)e.add(n);else{let s=lZ(r,n,t),a=mS.toJS(i,s,t);s in e?Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):e[s]=a}}return e}function lZ(t,e,r){if(e===null)return"";if(typeof e!="object")return String(e);if(tM.isNode(t)&&r?.doc){let i=uZ.createStringifyContext(r.doc,{});i.anchors=new Set;for(let s of r.anchors.keys())i.anchors.add(s.anchor);i.inFlow=!0,i.inStringifyKey=!0;let n=t.toString(i);if(!r.mapKeyWarned){let s=JSON.stringify(n);s.length>40&&(s=s.substring(0,36)+'..."'),oZ.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(e)}rM.addPairToJSMap=cZ});var Hn=T(yS=>{"use strict";y();var iM=xc(),fZ=KR(),pZ=gS(),um=xe();function hZ(t,e,r){let i=iM.createNode(t,void 0,r),n=iM.createNode(e,void 0,r);return new cm(i,n)}var cm=class t{constructor(e,r=null){Object.defineProperty(this,um.NODE_TYPE,{value:um.PAIR}),this.key=e,this.value=r}clone(e){let{key:r,value:i}=this;return um.isNode(r)&&(r=r.clone(e)),um.isNode(i)&&(i=i.clone(e)),new t(r,i)}toJSON(e,r){let i=r?.mapAsMap?new Map:{};return pZ.addPairToJSMap(r,i,this)}toString(e,r,i){return e?.doc?fZ.stringifyPair(this,e,r,i):JSON.stringify(this)}};yS.Pair=cm;yS.createPair=hZ});var _S=T(sM=>{"use strict";y();var Js=xe(),nM=Ec(),lm=kc();function dZ(t,e,r){return(e.inFlow??t.flow?gZ:mZ)(t,e,r)}function mZ({comment:t,items:e},r,{blockItemPrefix:i,flowChars:n,itemIndent:s,onChompKeep:a,onComment:o}){let{indent:u,options:{commentString:l}}=r,f=Object.assign({},r,{indent:s,type:null}),h=!1,p=[];for(let v=0;v<e.length;++v){let S=e[v],b=null;if(Js.isNode(S))!h&&S.spaceBefore&&p.push(""),fm(r,p,S.commentBefore,h),S.comment&&(b=S.comment);else if(Js.isPair(S)){let k=Js.isNode(S.key)?S.key:null;k&&(!h&&k.spaceBefore&&p.push(""),fm(r,p,k.commentBefore,h))}h=!1;let g=nM.stringify(S,f,()=>b=null,()=>h=!0);b&&(g+=lm.lineComment(g,s,l(b))),h&&b&&(h=!1),p.push(i+g)}let m;if(p.length===0)m=n.start+n.end;else{m=p[0];for(let v=1;v<p.length;++v){let S=p[v];m+=S?`
|
|
1266
|
-
${u}${S}`:`
|
|
1267
|
-
`}}return t?(m+=`
|
|
1268
|
-
`+lm.indentComment(l(t),u),o&&o()):h&&a&&a(),m}function gZ({items:t},e,{flowChars:r,itemIndent:i}){let{indent:n,indentStep:s,flowCollectionPadding:a,options:{commentString:o}}=e;i+=s;let u=Object.assign({},e,{indent:i,inFlow:!0,type:null}),l=!1,f=0,h=[];for(let v=0;v<t.length;++v){let S=t[v],b=null;if(Js.isNode(S))S.spaceBefore&&h.push(""),fm(e,h,S.commentBefore,!1),S.comment&&(b=S.comment);else if(Js.isPair(S)){let k=Js.isNode(S.key)?S.key:null;k&&(k.spaceBefore&&h.push(""),fm(e,h,k.commentBefore,!1),k.comment&&(l=!0));let w=Js.isNode(S.value)?S.value:null;w?(w.comment&&(b=w.comment),w.commentBefore&&(l=!0)):S.value==null&&k?.comment&&(b=k.comment)}b&&(l=!0);let g=nM.stringify(S,u,()=>b=null);l||(l=h.length>f||g.includes(`
|
|
1269
|
-
`)),v<t.length-1?g+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(l||(l=h.reduce((k,w)=>k+w.length+2,2)+(g.length+2)>e.options.lineWidth)),l&&(g+=",")),b&&(g+=lm.lineComment(g,i,o(b))),h.push(g),f=h.length}let{start:p,end:m}=r;if(h.length===0)return p+m;if(!l){let v=h.reduce((S,b)=>S+b.length+2,2);l=e.options.lineWidth>0&&v>e.options.lineWidth}if(l){let v=p;for(let S of h)v+=S?`
|
|
1270
|
-
${s}${n}${S}`:`
|
|
1271
|
-
`;return`${v}
|
|
1272
|
-
${n}${m}`}else return`${p}${a}${h.join(" ")}${a}${m}`}function fm({indent:t,options:{commentString:e}},r,i,n){if(i&&n&&(i=i.replace(/^\n+/,"")),i){let s=lm.indentComment(e(i),t);r.push(s.trimStart())}}sM.stringifyCollection=dZ});var Wn=T(bS=>{"use strict";y();var yZ=_S(),_Z=gS(),vZ=Yd(),Gn=xe(),pm=Hn(),bZ=dt();function Nc(t,e){let r=Gn.isScalar(e)?e.value:e;for(let i of t)if(Gn.isPair(i)&&(i.key===e||i.key===r||Gn.isScalar(i.key)&&i.key.value===r))return i}var vS=class extends vZ.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Gn.MAP,e),this.items=[]}static from(e,r,i){let{keepUndefined:n,replacer:s}=i,a=new this(e),o=(u,l)=>{if(typeof s=="function")l=s.call(r,u,l);else if(Array.isArray(s)&&!s.includes(u))return;(l!==void 0||n)&&a.items.push(pm.createPair(u,l,i))};if(r instanceof Map)for(let[u,l]of r)o(u,l);else if(r&&typeof r=="object")for(let u of Object.keys(r))o(u,r[u]);return typeof e.sortMapEntries=="function"&&a.items.sort(e.sortMapEntries),a}add(e,r){let i;Gn.isPair(e)?i=e:!e||typeof e!="object"||!("key"in e)?i=new pm.Pair(e,e?.value):i=new pm.Pair(e.key,e.value);let n=Nc(this.items,i.key),s=this.schema?.sortMapEntries;if(n){if(!r)throw new Error(`Key ${i.key} already set`);Gn.isScalar(n.value)&&bZ.isScalarValue(i.value)?n.value.value=i.value:n.value=i.value}else if(s){let a=this.items.findIndex(o=>s(i,o)<0);a===-1?this.items.push(i):this.items.splice(a,0,i)}else this.items.push(i)}delete(e){let r=Nc(this.items,e);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(e,r){let n=Nc(this.items,e)?.value;return(!r&&Gn.isScalar(n)?n.value:n)??void 0}has(e){return!!Nc(this.items,e)}set(e,r){this.add(new pm.Pair(e,r),!0)}toJSON(e,r,i){let n=i?new i:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(n);for(let s of this.items)_Z.addPairToJSMap(r,n,s);return n}toString(e,r,i){if(!e)return JSON.stringify(this);for(let n of this.items)if(!Gn.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),yZ.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:i,onComment:r})}};bS.YAMLMap=vS;bS.findPair=Nc});var _o=T(oM=>{"use strict";y();var SZ=xe(),aM=Wn(),wZ={collection:"map",default:!0,nodeClass:aM.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return SZ.isMap(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,r)=>aM.YAMLMap.from(t,e,r)};oM.map=wZ});var zn=T(uM=>{"use strict";y();var xZ=xc(),kZ=_S(),IZ=Yd(),dm=xe(),AZ=dt(),TZ=Bn(),SS=class extends IZ.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(dm.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let r=hm(e);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(e,r){let i=hm(e);if(typeof i!="number")return;let n=this.items[i];return!r&&dm.isScalar(n)?n.value:n}has(e){let r=hm(e);return typeof r=="number"&&r<this.items.length}set(e,r){let i=hm(e);if(typeof i!="number")throw new Error(`Expected a valid index, not ${e}.`);let n=this.items[i];dm.isScalar(n)&&AZ.isScalarValue(r)?n.value=r:this.items[i]=r}toJSON(e,r){let i=[];r?.onCreate&&r.onCreate(i);let n=0;for(let s of this.items)i.push(TZ.toJS(s,String(n++),r));return i}toString(e,r,i){return e?kZ.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:i,onComment:r}):JSON.stringify(this)}static from(e,r,i){let{replacer:n}=i,s=new this(e);if(r&&Symbol.iterator in Object(r)){let a=0;for(let o of r){if(typeof n=="function"){let u=r instanceof Set?o:String(a++);o=n.call(r,u,o)}s.items.push(xZ.createNode(o,void 0,i))}}return s}};function hm(t){let e=dm.isScalar(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}uM.YAMLSeq=SS});var vo=T(lM=>{"use strict";y();var EZ=xe(),cM=zn(),OZ={collection:"seq",default:!0,nodeClass:cM.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,e){return EZ.isSeq(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,r)=>cM.YAMLSeq.from(t,e,r)};lM.seq=OZ});var Lc=T(fM=>{"use strict";y();var NZ=Tc(),LZ={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,r,i){return e=Object.assign({actualString:!0},e),NZ.stringifyString(t,e,r,i)}};fM.string=LZ});var mm=T(dM=>{"use strict";y();var pM=dt(),hM={identify:t=>t==null,createNode:()=>new pM.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new pM.Scalar(null),stringify:({source:t},e)=>typeof t=="string"&&hM.test.test(t)?t:e.options.nullStr};dM.nullTag=hM});var wS=T(gM=>{"use strict";y();var PZ=dt(),mM={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new PZ.Scalar(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},r){if(t&&mM.test.test(t)){let i=t[0]==="t"||t[0]==="T";if(e===i)return t}return e?r.options.trueStr:r.options.falseStr}};gM.boolTag=mM});var bo=T(yM=>{"use strict";y();function qZ({format:t,minFractionDigits:e,tag:r,value:i}){if(typeof i=="bigint")return String(i);let n=typeof i=="number"?i:Number(i);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let s=Object.is(i,-0)?"-0":JSON.stringify(i);if(!t&&e&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(s)&&!s.includes("e")){let a=s.indexOf(".");a<0&&(a=s.length,s+=".");let o=e-(s.length-a-1);for(;o-- >0;)s+="0"}return s}yM.stringifyNumber=qZ});var kS=T(gm=>{"use strict";y();var CZ=dt(),xS=bo(),RZ={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:xS.stringifyNumber},MZ={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():xS.stringifyNumber(t)}},DZ={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new CZ.Scalar(parseFloat(t)),r=t.indexOf(".");return r!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-r-1),e},stringify:xS.stringifyNumber};gm.float=DZ;gm.floatExp=MZ;gm.floatNaN=RZ});var AS=T(_m=>{"use strict";y();var _M=bo(),ym=t=>typeof t=="bigint"||Number.isInteger(t),IS=(t,e,r,{intAsBigInt:i})=>i?BigInt(t):parseInt(t.substring(e),r);function vM(t,e,r){let{value:i}=t;return ym(i)&&i>=0?r+i.toString(e):_M.stringifyNumber(t)}var FZ={identify:t=>ym(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,r)=>IS(t,2,8,r),stringify:t=>vM(t,8,"0o")},jZ={identify:ym,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,r)=>IS(t,0,10,r),stringify:_M.stringifyNumber},BZ={identify:t=>ym(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,r)=>IS(t,2,16,r),stringify:t=>vM(t,16,"0x")};_m.int=jZ;_m.intHex=BZ;_m.intOct=FZ});var SM=T(bM=>{"use strict";y();var VZ=_o(),$Z=mm(),UZ=vo(),HZ=Lc(),GZ=wS(),TS=kS(),ES=AS(),WZ=[VZ.map,UZ.seq,HZ.string,$Z.nullTag,GZ.boolTag,ES.intOct,ES.int,ES.intHex,TS.floatNaN,TS.floatExp,TS.float];bM.schema=WZ});var kM=T(xM=>{"use strict";y();var zZ=dt(),JZ=_o(),KZ=vo();function wM(t){return typeof t=="bigint"||Number.isInteger(t)}var vm=({value:t})=>JSON.stringify(t),QZ=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:vm},{identify:t=>t==null,createNode:()=>new zZ.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:vm},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:vm},{identify:wM,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:r})=>r?BigInt(t):parseInt(t,10),stringify:({value:t})=>wM(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:vm}],YZ={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},XZ=[JZ.map,KZ.seq].concat(QZ,YZ);xM.schema=XZ});var NS=T(IM=>{"use strict";y();var Pc=ae("buffer"),OS=dt(),ZZ=Tc(),eee={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof Pc.Buffer=="function")return Pc.Buffer.from(t,"base64");if(typeof atob=="function"){let r=atob(t.replace(/[\n\r]/g,"")),i=new Uint8Array(r.length);for(let n=0;n<r.length;++n)i[n]=r.charCodeAt(n);return i}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:r},i,n,s){if(!r)return"";let a=r,o;if(typeof Pc.Buffer=="function")o=a instanceof Pc.Buffer?a.toString("base64"):Pc.Buffer.from(a.buffer).toString("base64");else if(typeof btoa=="function"){let u="";for(let l=0;l<a.length;++l)u+=String.fromCharCode(a[l]);o=btoa(u)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=OS.Scalar.BLOCK_LITERAL),e!==OS.Scalar.QUOTE_DOUBLE){let u=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),l=Math.ceil(o.length/u),f=new Array(l);for(let h=0,p=0;h<l;++h,p+=u)f[h]=o.substr(p,u);o=f.join(e===OS.Scalar.BLOCK_LITERAL?`
|
|
1273
|
-
`:" ")}return ZZ.stringifyString({comment:t,type:e,value:o},i,n,s)}};IM.binary=eee});var wm=T(Sm=>{"use strict";y();var bm=xe(),LS=Hn(),tee=dt(),ree=zn();function AM(t,e){if(bm.isSeq(t))for(let r=0;r<t.items.length;++r){let i=t.items[r];if(!bm.isPair(i)){if(bm.isMap(i)){i.items.length>1&&e("Each pair must have its own sequence indicator");let n=i.items[0]||new LS.Pair(new tee.Scalar(null));if(i.commentBefore&&(n.key.commentBefore=n.key.commentBefore?`${i.commentBefore}
|
|
1274
|
-
${n.key.commentBefore}`:i.commentBefore),i.comment){let s=n.value??n.key;s.comment=s.comment?`${i.comment}
|
|
1275
|
-
${s.comment}`:i.comment}i=n}t.items[r]=bm.isPair(i)?i:new LS.Pair(i)}}else e("Expected a sequence for this tag");return t}function TM(t,e,r){let{replacer:i}=r,n=new ree.YAMLSeq(t);n.tag="tag:yaml.org,2002:pairs";let s=0;if(e&&Symbol.iterator in Object(e))for(let a of e){typeof i=="function"&&(a=i.call(e,String(s++),a));let o,u;if(Array.isArray(a))if(a.length===2)o=a[0],u=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){let l=Object.keys(a);if(l.length===1)o=l[0],u=a[o];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else o=a;n.items.push(LS.createPair(o,u,r))}return n}var iee={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:AM,createNode:TM};Sm.createPairs=TM;Sm.pairs=iee;Sm.resolvePairs=AM});var CS=T(qS=>{"use strict";y();var EM=xe(),PS=Bn(),qc=Wn(),nee=zn(),OM=wm(),Ks=class t extends nee.YAMLSeq{constructor(){super(),this.add=qc.YAMLMap.prototype.add.bind(this),this.delete=qc.YAMLMap.prototype.delete.bind(this),this.get=qc.YAMLMap.prototype.get.bind(this),this.has=qc.YAMLMap.prototype.has.bind(this),this.set=qc.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,r){if(!r)return super.toJSON(e);let i=new Map;r?.onCreate&&r.onCreate(i);for(let n of this.items){let s,a;if(EM.isPair(n)?(s=PS.toJS(n.key,"",r),a=PS.toJS(n.value,s,r)):s=PS.toJS(n,"",r),i.has(s))throw new Error("Ordered maps must not include duplicate keys");i.set(s,a)}return i}static from(e,r,i){let n=OM.createPairs(e,r,i),s=new this;return s.items=n.items,s}};Ks.tag="tag:yaml.org,2002:omap";var see={collection:"seq",identify:t=>t instanceof Map,nodeClass:Ks,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let r=OM.resolvePairs(t,e),i=[];for(let{key:n}of r.items)EM.isScalar(n)&&(i.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):i.push(n.value));return Object.assign(new Ks,r)},createNode:(t,e,r)=>Ks.from(t,e,r)};qS.YAMLOMap=Ks;qS.omap=see});var CM=T(RS=>{"use strict";y();var NM=dt();function LM({value:t,source:e},r){return e&&(t?PM:qM).test.test(e)?e:t?r.options.trueStr:r.options.falseStr}var PM={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new NM.Scalar(!0),stringify:LM},qM={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new NM.Scalar(!1),stringify:LM};RS.falseTag=qM;RS.trueTag=PM});var RM=T(xm=>{"use strict";y();var aee=dt(),MS=bo(),oee={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:MS.stringifyNumber},uee={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():MS.stringifyNumber(t)}},cee={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new aee.Scalar(parseFloat(t.replace(/_/g,""))),r=t.indexOf(".");if(r!==-1){let i=t.substring(r+1).replace(/_/g,"");i[i.length-1]==="0"&&(e.minFractionDigits=i.length)}return e},stringify:MS.stringifyNumber};xm.float=cee;xm.floatExp=uee;xm.floatNaN=oee});var DM=T(Rc=>{"use strict";y();var MM=bo(),Cc=t=>typeof t=="bigint"||Number.isInteger(t);function km(t,e,r,{intAsBigInt:i}){let n=t[0];if((n==="-"||n==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),i){switch(r){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let a=BigInt(t);return n==="-"?BigInt(-1)*a:a}let s=parseInt(t,r);return n==="-"?-1*s:s}function DS(t,e,r){let{value:i}=t;if(Cc(i)){let n=i.toString(e);return i<0?"-"+r+n.substr(1):r+n}return MM.stringifyNumber(t)}var lee={identify:Cc,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,r)=>km(t,2,2,r),stringify:t=>DS(t,2,"0b")},fee={identify:Cc,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,r)=>km(t,1,8,r),stringify:t=>DS(t,8,"0")},pee={identify:Cc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,r)=>km(t,0,10,r),stringify:MM.stringifyNumber},hee={identify:Cc,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,r)=>km(t,2,16,r),stringify:t=>DS(t,16,"0x")};Rc.int=pee;Rc.intBin=lee;Rc.intHex=hee;Rc.intOct=fee});var jS=T(FS=>{"use strict";y();var Tm=xe(),Im=Hn(),Am=Wn(),Qs=class t extends Am.YAMLMap{constructor(e){super(e),this.tag=t.tag}add(e){let r;Tm.isPair(e)?r=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?r=new Im.Pair(e.key,null):r=new Im.Pair(e,null),Am.findPair(this.items,r.key)||this.items.push(r)}get(e,r){let i=Am.findPair(this.items,e);return!r&&Tm.isPair(i)?Tm.isScalar(i.key)?i.key.value:i.key:i}set(e,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let i=Am.findPair(this.items,e);i&&!r?this.items.splice(this.items.indexOf(i),1):!i&&r&&this.items.push(new Im.Pair(e))}toJSON(e,r){return super.toJSON(e,r,Set)}toString(e,r,i){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),r,i);throw new Error("Set items must all have null values")}static from(e,r,i){let{replacer:n}=i,s=new this(e);if(r&&Symbol.iterator in Object(r))for(let a of r)typeof n=="function"&&(a=n.call(r,a,a)),s.items.push(Im.createPair(a,null,i));return s}};Qs.tag="tag:yaml.org,2002:set";var dee={collection:"map",identify:t=>t instanceof Set,nodeClass:Qs,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,r)=>Qs.from(t,e,r),resolve(t,e){if(Tm.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new Qs,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};FS.YAMLSet=Qs;FS.set=dee});var VS=T(Em=>{"use strict";y();var mee=bo();function BS(t,e){let r=t[0],i=r==="-"||r==="+"?t.substring(1):t,n=a=>e?BigInt(a):Number(a),s=i.replace(/_/g,"").split(":").reduce((a,o)=>a*n(60)+n(o),n(0));return r==="-"?n(-1)*s:s}function FM(t){let{value:e}=t,r=a=>a;if(typeof e=="bigint")r=a=>BigInt(a);else if(isNaN(e)||!isFinite(e))return mee.stringifyNumber(t);let i="";e<0&&(i="-",e*=r(-1));let n=r(60),s=[e%n];return e<60?s.unshift(0):(e=(e-s[0])/n,s.unshift(e%n),e>=60&&(e=(e-s[0])/n,s.unshift(e))),i+s.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var gee={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:r})=>BS(t,r),stringify:FM},yee={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>BS(t,!1),stringify:FM},jM={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let e=t.match(jM.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,i,n,s,a,o]=e.map(Number),u=e[7]?Number((e[7]+"00").substr(1,3)):0,l=Date.UTC(r,i-1,n,s||0,a||0,o||0,u),f=e[8];if(f&&f!=="Z"){let h=BS(f,!1);Math.abs(h)<30&&(h*=60),l-=6e4*h}return new Date(l)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Em.floatTime=yee;Em.intTime=gee;Em.timestamp=jM});var $M=T(VM=>{"use strict";y();var _ee=_o(),vee=mm(),bee=vo(),See=Lc(),wee=NS(),BM=CM(),$S=RM(),Om=DM(),xee=om(),kee=CS(),Iee=wm(),Aee=jS(),US=VS(),Tee=[_ee.map,bee.seq,See.string,vee.nullTag,BM.trueTag,BM.falseTag,Om.intBin,Om.intOct,Om.int,Om.intHex,$S.floatNaN,$S.floatExp,$S.float,wee.binary,xee.merge,kee.omap,Iee.pairs,Aee.set,US.intTime,US.floatTime,US.timestamp];VM.schema=Tee});var XM=T(WS=>{"use strict";y();var WM=_o(),Eee=mm(),zM=vo(),Oee=Lc(),Nee=wS(),HS=kS(),GS=AS(),Lee=SM(),Pee=kM(),JM=NS(),Mc=om(),KM=CS(),QM=wm(),UM=$M(),YM=jS(),Nm=VS(),HM=new Map([["core",Lee.schema],["failsafe",[WM.map,zM.seq,Oee.string]],["json",Pee.schema],["yaml11",UM.schema],["yaml-1.1",UM.schema]]),GM={binary:JM.binary,bool:Nee.boolTag,float:HS.float,floatExp:HS.floatExp,floatNaN:HS.floatNaN,floatTime:Nm.floatTime,int:GS.int,intHex:GS.intHex,intOct:GS.intOct,intTime:Nm.intTime,map:WM.map,merge:Mc.merge,null:Eee.nullTag,omap:KM.omap,pairs:QM.pairs,seq:zM.seq,set:YM.set,timestamp:Nm.timestamp},qee={"tag:yaml.org,2002:binary":JM.binary,"tag:yaml.org,2002:merge":Mc.merge,"tag:yaml.org,2002:omap":KM.omap,"tag:yaml.org,2002:pairs":QM.pairs,"tag:yaml.org,2002:set":YM.set,"tag:yaml.org,2002:timestamp":Nm.timestamp};function Cee(t,e,r){let i=HM.get(e);if(i&&!t)return r&&!i.includes(Mc.merge)?i.concat(Mc.merge):i.slice();let n=i;if(!n)if(Array.isArray(t))n=[];else{let s=Array.from(HM.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${s} or define customTags array`)}if(Array.isArray(t))for(let s of t)n=n.concat(s);else typeof t=="function"&&(n=t(n.slice()));return r&&(n=n.concat(Mc.merge)),n.reduce((s,a)=>{let o=typeof a=="string"?GM[a]:a;if(!o){let u=JSON.stringify(a),l=Object.keys(GM).map(f=>JSON.stringify(f)).join(", ");throw new Error(`Unknown custom tag ${u}; use one of ${l}`)}return s.includes(o)||s.push(o),s},[])}WS.coreKnownTags=qee;WS.getTags=Cee});var KS=T(ZM=>{"use strict";y();var zS=xe(),Ree=_o(),Mee=vo(),Dee=Lc(),Lm=XM(),Fee=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0,JS=class t{constructor({compat:e,customTags:r,merge:i,resolveKnownTags:n,schema:s,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?Lm.getTags(e,"compat"):e?Lm.getTags(null,e):null,this.name=typeof s=="string"&&s||"core",this.knownTags=n?Lm.coreKnownTags:{},this.tags=Lm.getTags(r,this.name,i),this.toStringOptions=o??null,Object.defineProperty(this,zS.MAP,{value:Ree.map}),Object.defineProperty(this,zS.SCALAR,{value:Dee.string}),Object.defineProperty(this,zS.SEQ,{value:Mee.seq}),this.sortMapEntries=typeof a=="function"?a:a===!0?Fee:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};ZM.Schema=JS});var tD=T(eD=>{"use strict";y();var jee=xe(),QS=Ec(),Dc=kc();function Bee(t,e){let r=[],i=e.directives===!0;if(e.directives!==!1&&t.directives){let u=t.directives.toString(t);u?(r.push(u),i=!0):t.directives.docStart&&(i=!0)}i&&r.push("---");let n=QS.createStringifyContext(t,e),{commentString:s}=n.options;if(t.commentBefore){r.length!==1&&r.unshift("");let u=s(t.commentBefore);r.unshift(Dc.indentComment(u,""))}let a=!1,o=null;if(t.contents){if(jee.isNode(t.contents)){if(t.contents.spaceBefore&&i&&r.push(""),t.contents.commentBefore){let f=s(t.contents.commentBefore);r.push(Dc.indentComment(f,""))}n.forceBlockIndent=!!t.comment,o=t.contents.comment}let u=o?void 0:()=>a=!0,l=QS.stringify(t.contents,n,()=>o=null,u);o&&(l+=Dc.lineComment(l,"",s(o))),(l[0]==="|"||l[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${l}`:r.push(l)}else r.push(QS.stringify(t.contents,n));if(t.directives?.docEnd)if(t.comment){let u=s(t.comment);u.includes(`
|
|
1276
|
-
`)?(r.push("..."),r.push(Dc.indentComment(u,""))):r.push(`... ${u}`)}else r.push("...");else{let u=t.comment;u&&a&&(u=u.replace(/^\n+/,"")),u&&((!a||o)&&r[r.length-1]!==""&&r.push(""),r.push(Dc.indentComment(s(u),"")))}return r.join(`
|
|
1277
|
-
`)+`
|
|
1278
|
-
`}eD.stringifyDocument=Bee});var Fc=T(rD=>{"use strict";y();var Vee=wc(),So=Yd(),ai=xe(),$ee=Hn(),Uee=Bn(),Hee=KS(),Gee=tD(),YS=zd(),Wee=tS(),zee=xc(),XS=eS(),ZS=class t{constructor(e,r,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ai.NODE_TYPE,{value:ai.DOC});let n=null;typeof r=="function"||Array.isArray(r)?n=r:i===void 0&&r&&(i=r,r=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=s;let{version:a}=s;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new XS.Directives({version:a}),this.setSchema(a,i),this.contents=e===void 0?null:this.createNode(e,n,i)}clone(){let e=Object.create(t.prototype,{[ai.NODE_TYPE]:{value:ai.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=ai.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){wo(this.contents)&&this.contents.add(e)}addIn(e,r){wo(this.contents)&&this.contents.addIn(e,r)}createAlias(e,r){if(!e.anchor){let i=YS.anchorNames(this);e.anchor=!r||i.has(r)?YS.findNewAnchor(r||"a",i):r}return new Vee.Alias(e.anchor)}createNode(e,r,i){let n;if(typeof r=="function")e=r.call({"":e},"",e),n=r;else if(Array.isArray(r)){let b=k=>typeof k=="number"||k instanceof String||k instanceof Number,g=r.filter(b).map(String);g.length>0&&(r=r.concat(g)),n=r}else i===void 0&&r&&(i=r,r=void 0);let{aliasDuplicateObjects:s,anchorPrefix:a,flow:o,keepUndefined:u,onTagObj:l,tag:f}=i??{},{onAnchor:h,setAnchors:p,sourceObjects:m}=YS.createNodeAnchors(this,a||"a"),v={aliasDuplicateObjects:s??!0,keepUndefined:u??!1,onAnchor:h,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:m},S=zee.createNode(e,f,v);return o&&ai.isCollection(S)&&(S.flow=!0),p(),S}createPair(e,r,i={}){let n=this.createNode(e,null,i),s=this.createNode(r,null,i);return new $ee.Pair(n,s)}delete(e){return wo(this.contents)?this.contents.delete(e):!1}deleteIn(e){return So.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):wo(this.contents)?this.contents.deleteIn(e):!1}get(e,r){return ai.isCollection(this.contents)?this.contents.get(e,r):void 0}getIn(e,r){return So.isEmptyPath(e)?!r&&ai.isScalar(this.contents)?this.contents.value:this.contents:ai.isCollection(this.contents)?this.contents.getIn(e,r):void 0}has(e){return ai.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return So.isEmptyPath(e)?this.contents!==void 0:ai.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,r){this.contents==null?this.contents=So.collectionFromPath(this.schema,[e],r):wo(this.contents)&&this.contents.set(e,r)}setIn(e,r){So.isEmptyPath(e)?this.contents=r:this.contents==null?this.contents=So.collectionFromPath(this.schema,Array.from(e),r):wo(this.contents)&&this.contents.setIn(e,r)}setSchema(e,r={}){typeof e=="number"&&(e=String(e));let i;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new XS.Directives({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new XS.Directives({version:e}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{let n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(i)this.schema=new Hee.Schema(Object.assign(i,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:r,mapAsMap:i,maxAliasCount:n,onAnchor:s,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},u=Uee.toJS(this.contents,r??"",o);if(typeof s=="function")for(let{count:l,res:f}of o.anchors.values())s(f,l);return typeof a=="function"?Wee.applyReviver(a,{"":u},"",u):u}toJSON(e,r){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:r})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let r=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return Gee.stringifyDocument(this,e)}};function wo(t){if(ai.isCollection(t))return!0;throw new Error("Expected a YAML collection as document contents")}rD.Document=ZS});var Vc=T(Bc=>{"use strict";y();var jc=class extends Error{constructor(e,r,i,n){super(),this.name=e,this.code=i,this.message=n,this.pos=r}},e1=class extends jc{constructor(e,r,i){super("YAMLParseError",e,r,i)}},t1=class extends jc{constructor(e,r,i){super("YAMLWarning",e,r,i)}},Jee=(t,e)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(o=>e.linePos(o));let{line:i,col:n}=r.linePos[0];r.message+=` at line ${i}, column ${n}`;let s=n-1,a=t.substring(e.lineStarts[i-1],e.lineStarts[i]).replace(/[\n\r]+$/,"");if(s>=60&&a.length>80){let o=Math.min(s-39,a.length-79);a="\u2026"+a.substring(o),s-=o-1}if(a.length>80&&(a=a.substring(0,79)+"\u2026"),i>1&&/^ *$/.test(a.substring(0,s))){let o=t.substring(e.lineStarts[i-2],e.lineStarts[i-1]);o.length>80&&(o=o.substring(0,79)+`\u2026
|
|
1279
|
-
`),a=o+a}if(/[^ ]/.test(a)){let o=1,u=r.linePos[1];u?.line===i&&u.col>n&&(o=Math.max(1,Math.min(u.col-n,80-s)));let l=" ".repeat(s)+"^".repeat(o);r.message+=`:
|
|
1280
|
-
|
|
1281
|
-
${a}
|
|
1282
|
-
${l}
|
|
1283
|
-
`}};Bc.YAMLError=jc;Bc.YAMLParseError=e1;Bc.YAMLWarning=t1;Bc.prettifyError=Jee});var $c=T(iD=>{"use strict";y();function Kee(t,{flow:e,indicator:r,next:i,offset:n,onError:s,parentIndent:a,startOnNewline:o}){let u=!1,l=o,f=o,h="",p="",m=!1,v=!1,S=null,b=null,g=null,k=null,w=null,_=null,A=null;for(let L of t)switch(v&&(L.type!=="space"&&L.type!=="newline"&&L.type!=="comma"&&s(L.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),v=!1),S&&(l&&L.type!=="comment"&&L.type!=="newline"&&s(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),S=null),L.type){case"space":!e&&(r!=="doc-start"||i?.type!=="flow-collection")&&L.source.includes(" ")&&(S=L),f=!0;break;case"comment":{f||s(L,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let B=L.source.substring(1)||" ";h?h+=p+B:h=B,p="",l=!1;break}case"newline":l?h?h+=L.source:(!_||r!=="seq-item-ind")&&(u=!0):p+=L.source,l=!0,m=!0,(b||g)&&(k=L),f=!0;break;case"anchor":b&&s(L,"MULTIPLE_ANCHORS","A node can have at most one anchor"),L.source.endsWith(":")&&s(L.offset+L.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),b=L,A??(A=L.offset),l=!1,f=!1,v=!0;break;case"tag":{g&&s(L,"MULTIPLE_TAGS","A node can have at most one tag"),g=L,A??(A=L.offset),l=!1,f=!1,v=!0;break}case r:(b||g)&&s(L,"BAD_PROP_ORDER",`Anchors and tags must be after the ${L.source} indicator`),_&&s(L,"UNEXPECTED_TOKEN",`Unexpected ${L.source} in ${e??"collection"}`),_=L,l=r==="seq-item-ind"||r==="explicit-key-ind",f=!1;break;case"comma":if(e){w&&s(L,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),w=L,l=!1,f=!1;break}default:s(L,"UNEXPECTED_TOKEN",`Unexpected ${L.type} token`),l=!1,f=!1}let E=t[t.length-1],O=E?E.offset+E.source.length:n;return v&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&s(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S&&(l&&S.indent<=a||i?.type==="block-map"||i?.type==="block-seq")&&s(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:w,found:_,spaceBefore:u,comment:h,hasNewline:m,anchor:b,tag:g,newlineAfterProp:k,end:O,start:A??O}}iD.resolveProps=Kee});var Pm=T(nD=>{"use strict";y();function r1(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
|
|
1284
|
-
`))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let r of e.start)if(r.type==="newline")return!0;if(e.sep){for(let r of e.sep)if(r.type==="newline")return!0}if(r1(e.key)||r1(e.value))return!0}return!1;default:return!0}}nD.containsNewline=r1});var i1=T(sD=>{"use strict";y();var Qee=Pm();function Yee(t,e,r){if(e?.type==="flow-collection"){let i=e.end[0];i.indent===t&&(i.source==="]"||i.source==="}")&&Qee.containsNewline(e)&&r(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}sD.flowIndentCheck=Yee});var n1=T(oD=>{"use strict";y();var aD=xe();function Xee(t,e,r){let{uniqueKeys:i}=t.options;if(i===!1)return!1;let n=typeof i=="function"?i:(s,a)=>s===a||aD.isScalar(s)&&aD.isScalar(a)&&s.value===a.value;return e.some(s=>n(s.key,r))}oD.mapIncludes=Xee});var hD=T(pD=>{"use strict";y();var uD=Hn(),Zee=Wn(),cD=$c(),ete=Pm(),lD=i1(),tte=n1(),fD="All mapping items must start at the same column";function rte({composeNode:t,composeEmptyNode:e},r,i,n,s){let a=s?.nodeClass??Zee.YAMLMap,o=new a(r.schema);r.atRoot&&(r.atRoot=!1);let u=i.offset,l=null;for(let f of i.items){let{start:h,key:p,sep:m,value:v}=f,S=cD.resolveProps(h,{indicator:"explicit-key-ind",next:p??m?.[0],offset:u,onError:n,parentIndent:i.indent,startOnNewline:!0}),b=!S.found;if(b){if(p&&(p.type==="block-seq"?n(u,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==i.indent&&n(u,"BAD_INDENT",fD)),!S.anchor&&!S.tag&&!m){l=S.end,S.comment&&(o.comment?o.comment+=`
|
|
1285
|
-
`+S.comment:o.comment=S.comment);continue}(S.newlineAfterProp||ete.containsNewline(p))&&n(p??h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else S.found?.indent!==i.indent&&n(u,"BAD_INDENT",fD);r.atKey=!0;let g=S.end,k=p?t(r,p,S,n):e(r,g,h,null,S,n);r.schema.compat&&lD.flowIndentCheck(i.indent,p,n),r.atKey=!1,tte.mapIncludes(r,o.items,k)&&n(g,"DUPLICATE_KEY","Map keys must be unique");let w=cD.resolveProps(m??[],{indicator:"map-value-ind",next:v,offset:k.range[2],onError:n,parentIndent:i.indent,startOnNewline:!p||p.type==="block-scalar"});if(u=w.end,w.found){b&&(v?.type==="block-map"&&!w.hasNewline&&n(u,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&S.start<w.found.offset-1024&&n(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let _=v?t(r,v,w,n):e(r,u,m,null,w,n);r.schema.compat&&lD.flowIndentCheck(i.indent,v,n),u=_.range[2];let A=new uD.Pair(k,_);r.options.keepSourceTokens&&(A.srcToken=f),o.items.push(A)}else{b&&n(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),w.comment&&(k.comment?k.comment+=`
|
|
1286
|
-
`+w.comment:k.comment=w.comment);let _=new uD.Pair(k);r.options.keepSourceTokens&&(_.srcToken=f),o.items.push(_)}}return l&&l<u&&n(l,"IMPOSSIBLE","Map comment with trailing content"),o.range=[i.offset,u,l??u],o}pD.resolveBlockMap=rte});var mD=T(dD=>{"use strict";y();var ite=zn(),nte=$c(),ste=i1();function ate({composeNode:t,composeEmptyNode:e},r,i,n,s){let a=s?.nodeClass??ite.YAMLSeq,o=new a(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let u=i.offset,l=null;for(let{start:f,value:h}of i.items){let p=nte.resolveProps(f,{indicator:"seq-item-ind",next:h,offset:u,onError:n,parentIndent:i.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||h)h?.type==="block-seq"?n(p.end,"BAD_INDENT","All sequence items must start at the same column"):n(u,"MISSING_CHAR","Sequence item without - indicator");else{l=p.end,p.comment&&(o.comment=p.comment);continue}let m=h?t(r,h,p,n):e(r,p.end,f,null,p,n);r.schema.compat&&ste.flowIndentCheck(i.indent,h,n),u=m.range[2],o.items.push(m)}return o.range=[i.offset,u,l??u],o}dD.resolveBlockSeq=ate});var xo=T(gD=>{"use strict";y();function ote(t,e,r,i){let n="";if(t){let s=!1,a="";for(let o of t){let{source:u,type:l}=o;switch(l){case"space":s=!0;break;case"comment":{r&&!s&&i(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let f=u.substring(1)||" ";n?n+=a+f:n=f,a="";break}case"newline":n&&(a+=u),s=!0;break;default:i(o,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}e+=u.length}}return{comment:n,offset:e}}gD.resolveEnd=ote});var bD=T(vD=>{"use strict";y();var ute=xe(),cte=Hn(),yD=Wn(),lte=zn(),fte=xo(),_D=$c(),pte=Pm(),hte=n1(),s1="Block collections are not allowed within flow collections",a1=t=>t&&(t.type==="block-map"||t.type==="block-seq");function dte({composeNode:t,composeEmptyNode:e},r,i,n,s){let a=i.start.source==="{",o=a?"flow map":"flow sequence",u=s?.nodeClass??(a?yD.YAMLMap:lte.YAMLSeq),l=new u(r.schema);l.flow=!0;let f=r.atRoot;f&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let h=i.offset+i.start.source.length;for(let b=0;b<i.items.length;++b){let g=i.items[b],{start:k,key:w,sep:_,value:A}=g,E=_D.resolveProps(k,{flow:o,indicator:"explicit-key-ind",next:w??_?.[0],offset:h,onError:n,parentIndent:i.indent,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!_&&!A){b===0&&E.comma?n(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):b<i.items.length-1&&n(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),E.comment&&(l.comment?l.comment+=`
|
|
1287
|
-
`+E.comment:l.comment=E.comment),h=E.end;continue}!a&&r.options.strict&&pte.containsNewline(w)&&n(w,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(b===0)E.comma&&n(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(E.comma||n(E.start,"MISSING_CHAR",`Missing , between ${o} items`),E.comment){let O="";e:for(let L of k)switch(L.type){case"comma":case"space":break;case"comment":O=L.source.substring(1);break e;default:break e}if(O){let L=l.items[l.items.length-1];ute.isPair(L)&&(L=L.value??L.key),L.comment?L.comment+=`
|
|
1288
|
-
`+O:L.comment=O,E.comment=E.comment.substring(O.length+1)}}if(!a&&!_&&!E.found){let O=A?t(r,A,E,n):e(r,E.end,_,null,E,n);l.items.push(O),h=O.range[2],a1(A)&&n(O.range,"BLOCK_IN_FLOW",s1)}else{r.atKey=!0;let O=E.end,L=w?t(r,w,E,n):e(r,O,k,null,E,n);a1(w)&&n(L.range,"BLOCK_IN_FLOW",s1),r.atKey=!1;let B=_D.resolveProps(_??[],{flow:o,indicator:"map-value-ind",next:A,offset:L.range[2],onError:n,parentIndent:i.indent,startOnNewline:!1});if(B.found){if(!a&&!E.found&&r.options.strict){if(_)for(let P of _){if(P===B.found)break;if(P.type==="newline"){n(P,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<B.found.offset-1024&&n(B.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else A&&("source"in A&&A.source?.[0]===":"?n(A,"MISSING_CHAR",`Missing space after : in ${o}`):n(B.start,"MISSING_CHAR",`Missing , or : between ${o} items`));let R=A?t(r,A,B,n):B.found?e(r,B.end,_,null,B,n):null;R?a1(A)&&n(R.range,"BLOCK_IN_FLOW",s1):B.comment&&(L.comment?L.comment+=`
|
|
1289
|
-
`+B.comment:L.comment=B.comment);let q=new cte.Pair(L,R);if(r.options.keepSourceTokens&&(q.srcToken=g),a){let P=l;hte.mapIncludes(r,P.items,L)&&n(O,"DUPLICATE_KEY","Map keys must be unique"),P.items.push(q)}else{let P=new yD.YAMLMap(r.schema);P.flow=!0,P.items.push(q);let $=(R??L).range;P.range=[L.range[0],$[1],$[2]],l.items.push(P)}h=R?R.range[2]:B.end}}let p=a?"}":"]",[m,...v]=i.end,S=h;if(m?.source===p)S=m.offset+m.source.length;else{let b=o[0].toUpperCase()+o.substring(1),g=f?`${b} must end with a ${p}`:`${b} in block collection must be sufficiently indented and end with a ${p}`;n(h,f?"MISSING_CHAR":"BAD_INDENT",g),m&&m.source.length!==1&&v.unshift(m)}if(v.length>0){let b=fte.resolveEnd(v,S,r.options.strict,n);b.comment&&(l.comment?l.comment+=`
|
|
1290
|
-
`+b.comment:l.comment=b.comment),l.range=[i.offset,S,b.offset]}else l.range=[i.offset,S,S];return l}vD.resolveFlowCollection=dte});var wD=T(SD=>{"use strict";y();var mte=xe(),gte=dt(),yte=Wn(),_te=zn(),vte=hD(),bte=mD(),Ste=bD();function o1(t,e,r,i,n,s){let a=r.type==="block-map"?vte.resolveBlockMap(t,e,r,i,s):r.type==="block-seq"?bte.resolveBlockSeq(t,e,r,i,s):Ste.resolveFlowCollection(t,e,r,i,s),o=a.constructor;return n==="!"||n===o.tagName?(a.tag=o.tagName,a):(n&&(a.tag=n),a)}function wte(t,e,r,i,n){let s=i.tag,a=s?e.directives.tagName(s.source,p=>n(s,"TAG_RESOLVE_FAILED",p)):null;if(r.type==="block-seq"){let{anchor:p,newlineAfterProp:m}=i,v=p&&s?p.offset>s.offset?p:s:p??s;v&&(!m||m.offset<v.offset)&&n(v,"MISSING_CHAR","Missing newline after block sequence props")}let o=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!s||!a||a==="!"||a===yte.YAMLMap.tagName&&o==="map"||a===_te.YAMLSeq.tagName&&o==="seq")return o1(t,e,r,n,a);let u=e.schema.tags.find(p=>p.tag===a&&p.collection===o);if(!u){let p=e.schema.knownTags[a];if(p?.collection===o)e.schema.tags.push(Object.assign({},p,{default:!1})),u=p;else return p?n(s,"BAD_COLLECTION_TYPE",`${p.tag} used for ${o} collection, but expects ${p.collection??"scalar"}`,!0):n(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),o1(t,e,r,n,a)}let l=o1(t,e,r,n,a,u),f=u.resolve?.(l,p=>n(s,"TAG_RESOLVE_FAILED",p),e.options)??l,h=mte.isNode(f)?f:new gte.Scalar(f);return h.range=l.range,h.tag=a,u?.format&&(h.format=u.format),h}SD.composeCollection=wte});var c1=T(xD=>{"use strict";y();var u1=dt();function xte(t,e,r){let i=e.offset,n=kte(e,t.options.strict,r);if(!n)return{value:"",type:null,comment:"",range:[i,i,i]};let s=n.mode===">"?u1.Scalar.BLOCK_FOLDED:u1.Scalar.BLOCK_LITERAL,a=e.source?Ite(e.source):[],o=a.length;for(let S=a.length-1;S>=0;--S){let b=a[S][1];if(b===""||b==="\r")o=S;else break}if(o===0){let S=n.chomp==="+"&&a.length>0?`
|
|
1291
|
-
`.repeat(Math.max(1,a.length-1)):"",b=i+n.length;return e.source&&(b+=e.source.length),{value:S,type:s,comment:n.comment,range:[i,b,b]}}let u=e.indent+n.indent,l=e.offset+n.length,f=0;for(let S=0;S<o;++S){let[b,g]=a[S];if(g===""||g==="\r")n.indent===0&&b.length>u&&(u=b.length);else{b.length<u&&r(l+b.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(u=b.length),f=S,u===0&&!t.atRoot&&r(l,"BAD_INDENT","Block scalar values in collections must be indented");break}l+=b.length+g.length+1}for(let S=a.length-1;S>=o;--S)a[S][0].length>u&&(o=S+1);let h="",p="",m=!1;for(let S=0;S<f;++S)h+=a[S][0].slice(u)+`
|
|
1292
|
-
`;for(let S=f;S<o;++S){let[b,g]=a[S];l+=b.length+g.length+1;let k=g[g.length-1]==="\r";if(k&&(g=g.slice(0,-1)),g&&b.length<u){let _=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;r(l-g.length-(k?2:1),"BAD_INDENT",_),b=""}s===u1.Scalar.BLOCK_LITERAL?(h+=p+b.slice(u)+g,p=`
|
|
1293
|
-
`):b.length>u||g[0]===" "?(p===" "?p=`
|
|
1294
|
-
`:!m&&p===`
|
|
1295
|
-
`&&(p=`
|
|
1296
|
-
|
|
1297
|
-
`),h+=p+b.slice(u)+g,p=`
|
|
1298
|
-
`,m=!0):g===""?p===`
|
|
1299
|
-
`?h+=`
|
|
1300
|
-
`:p=`
|
|
1301
|
-
`:(h+=p+g,p=" ",m=!1)}switch(n.chomp){case"-":break;case"+":for(let S=o;S<a.length;++S)h+=`
|
|
1302
|
-
`+a[S][0].slice(u);h[h.length-1]!==`
|
|
1303
|
-
`&&(h+=`
|
|
1304
|
-
`);break;default:h+=`
|
|
1305
|
-
`}let v=i+n.length+e.source.length;return{value:h,type:s,comment:n.comment,range:[i,v,v]}}function kte({offset:t,props:e},r,i){if(e[0].type!=="block-scalar-header")return i(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=e[0],s=n[0],a=0,o="",u=-1;for(let p=1;p<n.length;++p){let m=n[p];if(!o&&(m==="-"||m==="+"))o=m;else{let v=Number(m);!a&&v?a=v:u===-1&&(u=t+p)}}u!==-1&&i(u,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let l=!1,f="",h=n.length;for(let p=1;p<e.length;++p){let m=e[p];switch(m.type){case"space":l=!0;case"newline":h+=m.source.length;break;case"comment":r&&!l&&i(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),h+=m.source.length,f=m.source.substring(1);break;case"error":i(m,"UNEXPECTED_TOKEN",m.message),h+=m.source.length;break;default:{let v=`Unexpected token in block scalar header: ${m.type}`;i(m,"UNEXPECTED_TOKEN",v);let S=m.source;S&&typeof S=="string"&&(h+=S.length)}}}return{mode:s,indent:a,chomp:o,comment:f,length:h}}function Ite(t){let e=t.split(/\n( *)/),r=e[0],i=r.match(/^( *)/),s=[i?.[1]?[i[1],r.slice(i[1].length)]:["",r]];for(let a=1;a<e.length;a+=2)s.push([e[a],e[a+1]]);return s}xD.resolveBlockScalar=xte});var f1=T(ID=>{"use strict";y();var l1=dt(),Ate=xo();function Tte(t,e,r){let{offset:i,type:n,source:s,end:a}=t,o,u,l=(p,m,v)=>r(i+p,m,v);switch(n){case"scalar":o=l1.Scalar.PLAIN,u=Ete(s,l);break;case"single-quoted-scalar":o=l1.Scalar.QUOTE_SINGLE,u=Ote(s,l);break;case"double-quoted-scalar":o=l1.Scalar.QUOTE_DOUBLE,u=Nte(s,l);break;default:return r(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[i,i+s.length,i+s.length]}}let f=i+s.length,h=Ate.resolveEnd(a,f,e,r);return{value:u,type:o,comment:h.comment,range:[i,f,h.offset]}}function Ete(t,e){let r="";switch(t[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${t[0]}`;break}case"@":case"`":{r=`reserved character ${t[0]}`;break}}return r&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),kD(t)}function Ote(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),kD(t.slice(1,-1)).replace(/''/g,"'")}function kD(t){let e,r;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
1306
|
-
`,"sy"),r=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
1307
|
-
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let i=e.exec(t);if(!i)return t;let n=i[1],s=" ",a=e.lastIndex;for(r.lastIndex=a;i=r.exec(t);)i[1]===""?s===`
|
|
1308
|
-
`?n+=s:s=`
|
|
1309
|
-
`:(n+=s+i[1],s=" "),a=r.lastIndex;let o=/[ \t]*(.*)/sy;return o.lastIndex=a,i=o.exec(t),n+s+(i?.[1]??"")}function Nte(t,e){let r="";for(let i=1;i<t.length-1;++i){let n=t[i];if(!(n==="\r"&&t[i+1]===`
|
|
1310
|
-
`))if(n===`
|
|
1311
|
-
`){let{fold:s,offset:a}=Lte(t,i);r+=s,i=a}else if(n==="\\"){let s=t[++i],a=Pte[s];if(a)r+=a;else if(s===`
|
|
1312
|
-
`)for(s=t[i+1];s===" "||s===" ";)s=t[++i+1];else if(s==="\r"&&t[i+1]===`
|
|
1313
|
-
`)for(s=t[++i+1];s===" "||s===" ";)s=t[++i+1];else if(s==="x"||s==="u"||s==="U"){let o=s==="x"?2:s==="u"?4:8;r+=qte(t,i+1,o,e),i+=o}else{let o=t.substr(i-1,2);e(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),r+=o}}else if(n===" "||n===" "){let s=i,a=t[i+1];for(;a===" "||a===" ";)a=t[++i+1];a!==`
|
|
1314
|
-
`&&!(a==="\r"&&t[i+2]===`
|
|
1315
|
-
`)&&(r+=i>s?t.slice(s,i+1):n)}else r+=n}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),r}function Lte(t,e){let r="",i=t[e+1];for(;(i===" "||i===" "||i===`
|
|
1316
|
-
`||i==="\r")&&!(i==="\r"&&t[e+2]!==`
|
|
1317
|
-
`);)i===`
|
|
1318
|
-
`&&(r+=`
|
|
1319
|
-
`),e+=1,i=t[e+1];return r||(r=" "),{fold:r,offset:e}}var Pte={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
1320
|
-
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function qte(t,e,r,i){let n=t.substr(e,r),a=n.length===r&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;try{return String.fromCodePoint(a)}catch{let o=t.substr(e-2,r+2);return i(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}}ID.resolveFlowScalar=Tte});var ED=T(TD=>{"use strict";y();var Ys=xe(),AD=dt(),Cte=c1(),Rte=f1();function Mte(t,e,r,i){let{value:n,type:s,comment:a,range:o}=e.type==="block-scalar"?Cte.resolveBlockScalar(t,e,i):Rte.resolveFlowScalar(e,t.options.strict,i),u=r?t.directives.tagName(r.source,h=>i(r,"TAG_RESOLVE_FAILED",h)):null,l;t.options.stringKeys&&t.atKey?l=t.schema[Ys.SCALAR]:u?l=Dte(t.schema,n,u,r,i):e.type==="scalar"?l=Fte(t,n,e,i):l=t.schema[Ys.SCALAR];let f;try{let h=l.resolve(n,p=>i(r??e,"TAG_RESOLVE_FAILED",p),t.options);f=Ys.isScalar(h)?h:new AD.Scalar(h)}catch(h){let p=h instanceof Error?h.message:String(h);i(r??e,"TAG_RESOLVE_FAILED",p),f=new AD.Scalar(n)}return f.range=o,f.source=n,s&&(f.type=s),u&&(f.tag=u),l.format&&(f.format=l.format),a&&(f.comment=a),f}function Dte(t,e,r,i,n){if(r==="!")return t[Ys.SCALAR];let s=[];for(let o of t.tags)if(!o.collection&&o.tag===r)if(o.default&&o.test)s.push(o);else return o;for(let o of s)if(o.test?.test(e))return o;let a=t.knownTags[r];return a&&!a.collection?(t.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),t[Ys.SCALAR])}function Fte({atKey:t,directives:e,schema:r},i,n,s){let a=r.tags.find(o=>(o.default===!0||t&&o.default==="key")&&o.test?.test(i))||r[Ys.SCALAR];if(r.compat){let o=r.compat.find(u=>u.default&&u.test?.test(i))??r[Ys.SCALAR];if(a.tag!==o.tag){let u=e.tagString(a.tag),l=e.tagString(o.tag),f=`Value may be parsed as either ${u} or ${l}`;s(n,"TAG_RESOLVE_FAILED",f,!0)}}return a}TD.composeScalar=Mte});var ND=T(OD=>{"use strict";y();function jte(t,e,r){if(e){r??(r=e.length);for(let i=r-1;i>=0;--i){let n=e[i];switch(n.type){case"space":case"comment":case"newline":t-=n.source.length;continue}for(n=e[++i];n?.type==="space";)t+=n.source.length,n=e[++i];break}}return t}OD.emptyScalarPosition=jte});var qD=T(h1=>{"use strict";y();var Bte=wc(),Vte=xe(),$te=wD(),LD=ED(),Ute=xo(),Hte=ND(),Gte={composeNode:PD,composeEmptyNode:p1};function PD(t,e,r,i){let n=t.atKey,{spaceBefore:s,comment:a,anchor:o,tag:u}=r,l,f=!0;switch(e.type){case"alias":l=Wte(t,e,i),(o||u)&&i(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=LD.composeScalar(t,e,u,i),o&&(l.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=$te.composeCollection(Gte,t,e,r,i),o&&(l.anchor=o.source.substring(1))}catch(h){let p=h instanceof Error?h.message:String(h);i(e,"RESOURCE_EXHAUSTION",p)}break;default:{let h=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;i(e,"UNEXPECTED_TOKEN",h),f=!1}}return l??(l=p1(t,e.offset,void 0,null,r,i)),o&&l.anchor===""&&i(o,"BAD_ALIAS","Anchor cannot be an empty string"),n&&t.options.stringKeys&&(!Vte.isScalar(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&i(u??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(l.spaceBefore=!0),a&&(e.type==="scalar"&&e.source===""?l.comment=a:l.commentBefore=a),t.options.keepSourceTokens&&f&&(l.srcToken=e),l}function p1(t,e,r,i,{spaceBefore:n,comment:s,anchor:a,tag:o,end:u},l){let f={type:"scalar",offset:Hte.emptyScalarPosition(e,r,i),indent:-1,source:""},h=LD.composeScalar(t,f,o,l);return a&&(h.anchor=a.source.substring(1),h.anchor===""&&l(a,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(h.spaceBefore=!0),s&&(h.comment=s,h.range[2]=u),h}function Wte({options:t},{offset:e,source:r,end:i},n){let s=new Bte.Alias(r.substring(1));s.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&n(e+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let a=e+r.length,o=Ute.resolveEnd(i,a,t.strict,n);return s.range=[e,a,o.offset],o.comment&&(s.comment=o.comment),s}h1.composeEmptyNode=p1;h1.composeNode=PD});var MD=T(RD=>{"use strict";y();var zte=Fc(),CD=qD(),Jte=xo(),Kte=$c();function Qte(t,e,{offset:r,start:i,value:n,end:s},a){let o=Object.assign({_directives:e},t),u=new zte.Document(void 0,o),l={atKey:!1,atRoot:!0,directives:u.directives,options:u.options,schema:u.schema},f=Kte.resolveProps(i,{indicator:"doc-start",next:n??s?.[0],offset:r,onError:a,parentIndent:0,startOnNewline:!0});f.found&&(u.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!f.hasNewline&&a(f.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),u.contents=n?CD.composeNode(l,n,f,a):CD.composeEmptyNode(l,f.end,i,null,f,a);let h=u.contents.range[2],p=Jte.resolveEnd(s,h,!1,a);return p.comment&&(u.comment=p.comment),u.range=[r,h,p.offset],u}RD.composeDoc=Qte});var m1=T(jD=>{"use strict";y();var Yte=ae("process"),Xte=eS(),Zte=Fc(),Uc=Vc(),DD=xe(),ere=MD(),tre=xo();function Hc(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:r}=t;return[e,e+(typeof r=="string"?r.length:1)]}function FD(t){let e="",r=!1,i=!1;for(let n=0;n<t.length;++n){let s=t[n];switch(s[0]){case"#":e+=(e===""?"":i?`
|
|
1321
|
-
|
|
1322
|
-
`:`
|
|
1323
|
-
`)+(s.substring(1)||" "),r=!0,i=!1;break;case"%":t[n+1]?.[0]!=="#"&&(n+=1),r=!1;break;default:r||(i=!0),r=!1}}return{comment:e,afterEmptyLine:i}}var d1=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,i,n,s)=>{let a=Hc(r);s?this.warnings.push(new Uc.YAMLWarning(a,i,n)):this.errors.push(new Uc.YAMLParseError(a,i,n))},this.directives=new Xte.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,r){let{comment:i,afterEmptyLine:n}=FD(this.prelude);if(i){let s=e.contents;if(r)e.comment=e.comment?`${e.comment}
|
|
1324
|
-
${i}`:i;else if(n||e.directives.docStart||!s)e.commentBefore=i;else if(DD.isCollection(s)&&!s.flow&&s.items.length>0){let a=s.items[0];DD.isPair(a)&&(a=a.key);let o=a.commentBefore;a.commentBefore=o?`${i}
|
|
1325
|
-
${o}`:i}else{let a=s.commentBefore;s.commentBefore=a?`${i}
|
|
1326
|
-
${a}`:i}}if(r){for(let s=0;s<this.errors.length;++s)e.errors.push(this.errors[s]);for(let s=0;s<this.warnings.length;++s)e.warnings.push(this.warnings[s])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:FD(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,r=!1,i=-1){for(let n of e)yield*this.next(n);yield*this.end(r,i)}*next(e){switch(Yte.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(r,i,n)=>{let s=Hc(e);s[0]+=r,this.onError(s,"BAD_DIRECTIVE",i,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let r=ere.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let r=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,i=new Uc.YAMLParseError(Hc(e),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){let i="Unexpected doc-end without preceding document";this.errors.push(new Uc.YAMLParseError(Hc(e),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;let r=tre.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){let i=this.doc.comment;this.doc.comment=i?`${i}
|
|
1327
|
-
${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Uc.YAMLParseError(Hc(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let i=Object.assign({_directives:this.directives},this.options),n=new Zte.Document(void 0,i);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,r,r],this.decorate(n,!1),yield n}}};jD.Composer=d1});var $D=T(qm=>{"use strict";y();var rre=c1(),ire=f1(),nre=Vc(),BD=Tc();function sre(t,e=!0,r){if(t){let i=(n,s,a)=>{let o=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(r)r(o,s,a);else throw new nre.YAMLParseError([o,o+1],s,a)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return ire.resolveFlowScalar(t,e,i);case"block-scalar":return rre.resolveBlockScalar({options:{strict:e}},t,i)}}return null}function are(t,e){let{implicitKey:r=!1,indent:i,inFlow:n=!1,offset:s=-1,type:a="PLAIN"}=e,o=BD.stringifyString({type:a,value:t},{implicitKey:r,indent:i>0?" ".repeat(i):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),u=e.end??[{type:"newline",offset:-1,indent:i,source:`
|
|
1328
|
-
`}];switch(o[0]){case"|":case">":{let l=o.indexOf(`
|
|
1329
|
-
`),f=o.substring(0,l),h=o.substring(l+1)+`
|
|
1330
|
-
`,p=[{type:"block-scalar-header",offset:s,indent:i,source:f}];return VD(p,u)||p.push({type:"newline",offset:-1,indent:i,source:`
|
|
1331
|
-
`}),{type:"block-scalar",offset:s,indent:i,props:p,source:h}}case'"':return{type:"double-quoted-scalar",offset:s,indent:i,source:o,end:u};case"'":return{type:"single-quoted-scalar",offset:s,indent:i,source:o,end:u};default:return{type:"scalar",offset:s,indent:i,source:o,end:u}}}function ore(t,e,r={}){let{afterKey:i=!1,implicitKey:n=!1,inFlow:s=!1,type:a}=r,o="indent"in t?t.indent:null;if(i&&typeof o=="number"&&(o+=2),!a)switch(t.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{let l=t.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a=l.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}let u=BD.stringifyString({type:a,value:e},{implicitKey:n||o===null,indent:o!==null&&o>0?" ".repeat(o):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(u[0]){case"|":case">":ure(t,u);break;case'"':g1(t,u,"double-quoted-scalar");break;case"'":g1(t,u,"single-quoted-scalar");break;default:g1(t,u,"scalar")}}function ure(t,e){let r=e.indexOf(`
|
|
1332
|
-
`),i=e.substring(0,r),n=e.substring(r+1)+`
|
|
1333
|
-
`;if(t.type==="block-scalar"){let s=t.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=i,t.source=n}else{let{offset:s}=t,a="indent"in t?t.indent:-1,o=[{type:"block-scalar-header",offset:s,indent:a,source:i}];VD(o,"end"in t?t.end:void 0)||o.push({type:"newline",offset:-1,indent:a,source:`
|
|
1334
|
-
`});for(let u of Object.keys(t))u!=="type"&&u!=="offset"&&delete t[u];Object.assign(t,{type:"block-scalar",indent:a,props:o,source:n})}}function VD(t,e){if(e)for(let r of e)switch(r.type){case"space":case"comment":t.push(r);break;case"newline":return t.push(r),!0}return!1}function g1(t,e,r){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=r,t.source=e;break;case"block-scalar":{let i=t.props.slice(1),n=e.length;t.props[0].type==="block-scalar-header"&&(n-=t.props[0].source.length);for(let s of i)s.offset+=n;delete t.props,Object.assign(t,{type:r,source:e,end:i});break}case"block-map":case"block-seq":{let n={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
|
|
1335
|
-
`};delete t.items,Object.assign(t,{type:r,source:e,end:[n]});break}default:{let i="indent"in t?t.indent:-1,n="end"in t&&Array.isArray(t.end)?t.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(t))s!=="type"&&s!=="offset"&&delete t[s];Object.assign(t,{type:r,indent:i,source:e,end:n})}}}qm.createScalarToken=are;qm.resolveAsScalar=sre;qm.setScalarValue=ore});var HD=T(UD=>{"use strict";y();var cre=t=>"type"in t?Rm(t):Cm(t);function Rm(t){switch(t.type){case"block-scalar":{let e="";for(let r of t.props)e+=Rm(r);return e+t.source}case"block-map":case"block-seq":{let e="";for(let r of t.items)e+=Cm(r);return e}case"flow-collection":{let e=t.start.source;for(let r of t.items)e+=Cm(r);for(let r of t.end)e+=r.source;return e}case"document":{let e=Cm(t);if(t.end)for(let r of t.end)e+=r.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let r of t.end)e+=r.source;return e}}}function Cm({start:t,key:e,sep:r,value:i}){let n="";for(let s of t)n+=s.source;if(e&&(n+=Rm(e)),r)for(let s of r)n+=s.source;return i&&(n+=Rm(i)),n}UD.stringify=cre});var JD=T(zD=>{"use strict";y();var y1=Symbol("break visit"),lre=Symbol("skip children"),GD=Symbol("remove item");function Xs(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),WD(Object.freeze([]),t,e)}Xs.BREAK=y1;Xs.SKIP=lre;Xs.REMOVE=GD;Xs.itemAtPath=(t,e)=>{let r=t;for(let[i,n]of e){let s=r?.[i];if(s&&"items"in s)r=s.items[n];else return}return r};Xs.parentCollection=(t,e)=>{let r=Xs.itemAtPath(t,e.slice(0,-1)),i=e[e.length-1][0],n=r?.[i];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function WD(t,e,r){let i=r(e,t);if(typeof i=="symbol")return i;for(let n of["key","value"]){let s=e[n];if(s&&"items"in s){for(let a=0;a<s.items.length;++a){let o=WD(Object.freeze(t.concat([[n,a]])),s.items[a],r);if(typeof o=="number")a=o-1;else{if(o===y1)return y1;o===GD&&(s.items.splice(a,1),a-=1)}}typeof i=="function"&&n==="key"&&(i=i(e,t))}}return typeof i=="function"?i(e,t):i}zD.visit=Xs});var Mm=T(Er=>{"use strict";y();var _1=$D(),fre=HD(),pre=JD(),v1="\uFEFF",b1="",S1="",w1="",hre=t=>!!t&&"items"in t,dre=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function mre(t){switch(t){case v1:return"<BOM>";case b1:return"<DOC>";case S1:return"<FLOW_END>";case w1:return"<SCALAR>";default:return JSON.stringify(t)}}function gre(t){switch(t){case v1:return"byte-order-mark";case b1:return"doc-mode";case S1:return"flow-error-end";case w1:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
1336
|
-
`:case`\r
|
|
1337
|
-
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}Er.createScalarToken=_1.createScalarToken;Er.resolveAsScalar=_1.resolveAsScalar;Er.setScalarValue=_1.setScalarValue;Er.stringify=fre.stringify;Er.visit=pre.visit;Er.BOM=v1;Er.DOCUMENT=b1;Er.FLOW_END=S1;Er.SCALAR=w1;Er.isCollection=hre;Er.isScalar=dre;Er.prettyToken=mre;Er.tokenType=gre});var I1=T(QD=>{"use strict";y();var Gc=Mm();function bi(t){switch(t){case void 0:case" ":case`
|
|
1338
|
-
`:case"\r":case" ":return!0;default:return!1}}var KD=new Set("0123456789ABCDEFabcdef"),yre=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Dm=new Set(",[]{}"),_re=new Set(` ,[]{}
|
|
1339
|
-
\r `),x1=t=>!t||_re.has(t),k1=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,r=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!r;let i=this.next??"stream";for(;i&&(r||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let e=this.pos,r=this.buffer[e];for(;r===" "||r===" ";)r=this.buffer[++e];return!r||r==="#"||r===`
|
|
1340
|
-
`?!0:r==="\r"?this.buffer[e+1]===`
|
|
1341
|
-
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let r=this.buffer[e];if(this.indentNext>0){let i=0;for(;r===" ";)r=this.buffer[++i+e];if(r==="\r"){let n=this.buffer[i+e+1];if(n===`
|
|
1342
|
-
`||!n&&!this.atEnd)return e+i+1}return r===`
|
|
1343
|
-
`||i>=this.indentNext||!r&&!this.atEnd?e+i:-1}if(r==="-"||r==="."){let i=this.buffer.substr(e,3);if((i==="---"||i==="...")&&bi(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
1344
|
-
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Gc.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let r=e.length,i=e.indexOf("#");for(;i!==-1;){let s=e[i-1];if(s===" "||s===" "){r=i-1;break}else i=e.indexOf("#",i+1)}for(;;){let s=e[r-1];if(s===" "||s===" ")r-=1;else break}let n=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let r=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-r),yield*this.pushNewline(),"stream"}return yield Gc.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let r=this.peek(3);if((r==="---"||r==="...")&&bi(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,r==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!bi(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&bi(r)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(e[r]){case"#":yield*this.pushCount(e.length-r);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(x1),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,r,i=-1;do e=yield*this.pushNewline(),e>0?(r=yield*this.pushSpaces(!1),this.indentValue=i=r):r=0,r+=yield*this.pushSpaces(!0);while(e+r>0);let n=this.getLine();if(n===null)return this.setNext("flow");if((i!==-1&&i<this.indentNext&&n[0]!=="#"||i===0&&(n.startsWith("---")||n.startsWith("..."))&&bi(n[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield Gc.FLOW_END,yield*this.parseLineStart();let s=0;for(;n[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),n[s]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(x1),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||bi(a)||a===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),r=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;r!==-1&&this.buffer[r+1]==="'";)r=this.buffer.indexOf("'",r+2);else for(;r!==-1;){let s=0;for(;this.buffer[r-1-s]==="\\";)s+=1;if(s%2===0)break;r=this.buffer.indexOf('"',r+1)}let i=this.buffer.substring(0,r),n=i.indexOf(`
|
|
1345
|
-
`,this.pos);if(n!==-1){for(;n!==-1;){let s=this.continueScalar(n+1);if(s===-1)break;n=i.indexOf(`
|
|
1346
|
-
`,s)}n!==-1&&(r=n-(i[n-1]==="\r"?2:1))}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}return yield*this.pushToIndex(r+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let r=this.buffer[++e];if(r==="+")this.blockScalarKeep=!0;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>bi(r)||r==="#")}*parseBlockScalar(){let e=this.pos-1,r=0,i;e:for(let s=this.pos;i=this.buffer[s];++s)switch(i){case" ":r+=1;break;case`
|
|
1347
|
-
`:e=s,r=0;break;case"\r":{let a=this.buffer[s+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===`
|
|
1348
|
-
`)break}default:break e}if(!i&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let s=this.continueScalar(e+1);if(s===-1)break;e=this.buffer.indexOf(`
|
|
1349
|
-
`,s)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let n=e+1;for(i=this.buffer[n];i===" ";)i=this.buffer[++n];if(i===" "){for(;i===" "||i===" "||i==="\r"||i===`
|
|
1350
|
-
`;)i=this.buffer[++n];e=n-1}else if(!this.blockScalarKeep)do{let s=e-1,a=this.buffer[s];a==="\r"&&(a=this.buffer[--s]);let o=s;for(;a===" ";)a=this.buffer[--s];if(a===`
|
|
1351
|
-
`&&s>=this.pos&&s+1+r>o)e=s;else break}while(!0);return yield Gc.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,r=this.pos-1,i=this.pos-1,n;for(;n=this.buffer[++i];)if(n===":"){let s=this.buffer[i+1];if(bi(s)||e&&Dm.has(s))break;r=i}else if(bi(n)){let s=this.buffer[i+1];if(n==="\r"&&(s===`
|
|
1352
|
-
`?(i+=1,n=`
|
|
1353
|
-
`,s=this.buffer[i+1]):r=i),s==="#"||e&&Dm.has(s))break;if(n===`
|
|
1354
|
-
`){let a=this.continueScalar(i+1);if(a===-1)break;i=Math.max(i,a-2)}}else{if(e&&Dm.has(n))break;r=i}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield Gc.SCALAR,yield*this.pushToIndex(r+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,r){let i=this.buffer.slice(this.pos,e);return i?(yield i,this.pos+=i.length,i.length):(r&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(x1),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let r=this.flowLevel>0,i=this.charAt(1);if(bi(i)||r&&Dm.has(i)){r?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,r=this.buffer[e];for(;!bi(r)&&r!==">";)r=this.buffer[++e];return yield*this.pushToIndex(r===">"?e+1:e,!1)}else{let e=this.pos+1,r=this.buffer[e];for(;r;)if(yre.has(r))r=this.buffer[++e];else if(r==="%"&&KD.has(this.buffer[e+1])&&KD.has(this.buffer[e+2]))r=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|
1355
|
-
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
1356
|
-
`?yield*this.pushCount(2):0}*pushSpaces(e){let r=this.pos-1,i;do i=this.buffer[++r];while(i===" "||e&&i===" ");let n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(e){let r=this.pos,i=this.buffer[r];for(;!e(i);)i=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};QD.Lexer=k1});var T1=T(YD=>{"use strict";y();var A1=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let r=0,i=this.lineStarts.length;for(;r<i;){let s=r+i>>1;this.lineStarts[s]<e?r=s+1:i=s}if(this.lineStarts[r]===e)return{line:r+1,col:1};if(r===0)return{line:0,col:e};let n=this.lineStarts[r-1];return{line:r,col:e-n+1}}}};YD.LineCounter=A1});var O1=T(rF=>{"use strict";y();var vre=ae("process"),XD=Mm(),bre=I1();function Jn(t,e){for(let r=0;r<t.length;++r)if(t[r].type===e)return!0;return!1}function ZD(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function tF(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Fm(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function ko(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function jm(t,e){if(e.length<1e5)Array.prototype.push.apply(t,e);else for(let r=0;r<e.length;++r)t.push(e[r])}function eF(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!Jn(e.start,"explicit-key-ind")&&!Jn(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,tF(e.value)?e.value.end?jm(e.value.end,e.sep):e.value.end=e.sep:jm(e.start,e.sep),delete e.sep)}var E1=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new bre.Lexer,this.onNewLine=e}*parse(e,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let i of this.lexer.lex(e,r))yield*this.next(i);r||(yield*this.end())}*next(e){if(this.source=e,vre.env.LOG_TOKENS&&console.log("|",XD.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let r=XD.tokenType(e);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let i=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let r=e??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{let i=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in i?i.indent:0:r.type==="flow-collection"&&i.type==="document"&&(r.indent=0),r.type==="flow-collection"&&eF(r),i.type){case"document":i.value=r;break;case"block-scalar":i.props.push(r);break;case"block-map":{let n=i.items[i.items.length-1];if(n.value){i.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=r;else{Object.assign(n,{key:r,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=i.items[i.items.length-1];n.value?i.items.push({start:[],value:r}):n.value=r;break}case"flow-collection":{let n=i.items[i.items.length-1];!n||n.value?i.items.push({start:[],key:r,sep:[]}):n.sep?n.value=r:Object.assign(n,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){let n=r.items[r.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&ZD(n.start)===-1&&(r.indent===0||n.start.every(s=>s.type!=="comment"||s.indent<r.indent))&&(i.type==="document"?i.end=n.start:i.items.push({start:n.start}),r.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{ZD(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let r=Fm(this.peek(2)),i=ko(r),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let r=this.source.indexOf(`
|
|
1357
|
-
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
|
|
1358
|
-
`,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){let i="end"in r.value?r.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){jm(n,r.start),n.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let i=!this.onKeyLine&&this.indent===e.indent,n=i&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",s=[];if(n&&r.sep&&!r.value){let a=[];for(let o=0;o<r.sep.length;++o){let u=r.sep[o];switch(u.type){case"newline":a.push(o);break;case"space":break;case"comment":u.indent>e.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(s=r.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":n||r.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):n||r.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Jn(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(tF(r.key)&&!Jn(r.sep,"newline")){let a=ko(r.start),o=r.key,u=r.sep;u.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:o,sep:u}]})}else s.length>0?r.sep=r.sep.concat(s,this.sourceToken):r.sep.push(this.sourceToken);else if(Jn(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let a=ko(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||n?e.items.push({start:s,key:null,sep:[this.sourceToken]}):Jn(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);n||r.value?(e.items.push({start:s,key:a,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(a):(Object.assign(r,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(e);if(a){if(a.type==="block-seq"){if(!r.explicitKey&&r.sep&&!Jn(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else i&&e.items.push({start:s});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let r=e.items[e.items.length-1];switch(this.type){case"newline":if(r.value){let i="end"in r.value?r.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){jm(n,r.start),n.push(this.sourceToken),e.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=e.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;r.value||Jn(r.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>e.indent){let i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let r=e.items[e.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?e.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?e.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);!r||r.value?e.items.push({start:[],key:n,sep:[]}):r.sep?this.stack.push(n):Object.assign(r,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let i=this.startBlockValue(e);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{let i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===e.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){let n=Fm(i),s=ko(n);eF(e);let a=e.end.splice(1,e.end.length);a.push(this.sourceToken);let o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:s,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let r=this.source.indexOf(`
|
|
1359
|
-
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
|
|
1360
|
-
`,r)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let r=Fm(e),i=ko(r);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=Fm(e),i=ko(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,r){return this.type!=="comment"||this.indent<=r?!1:e.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};rF.Parser=E1});var oF=T(zc=>{"use strict";y();var iF=m1(),Sre=Fc(),Wc=Vc(),wre=hS(),xre=xe(),kre=T1(),nF=O1();function sF(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new kre.LineCounter||null,prettyErrors:e}}function Ire(t,e={}){let{lineCounter:r,prettyErrors:i}=sF(e),n=new nF.Parser(r?.addNewLine),s=new iF.Composer(e),a=Array.from(s.compose(n.parse(t)));if(i&&r)for(let o of a)o.errors.forEach(Wc.prettifyError(t,r)),o.warnings.forEach(Wc.prettifyError(t,r));return a.length>0?a:Object.assign([],{empty:!0},s.streamInfo())}function aF(t,e={}){let{lineCounter:r,prettyErrors:i}=sF(e),n=new nF.Parser(r?.addNewLine),s=new iF.Composer(e),a=null;for(let o of s.compose(n.parse(t),!0,t.length))if(!a)a=o;else if(a.options.logLevel!=="silent"){a.errors.push(new Wc.YAMLParseError(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&r&&(a.errors.forEach(Wc.prettifyError(t,r)),a.warnings.forEach(Wc.prettifyError(t,r))),a}function Are(t,e,r){let i;typeof e=="function"?i=e:r===void 0&&e&&typeof e=="object"&&(r=e);let n=aF(t,r);if(!n)return null;if(n.warnings.forEach(s=>wre.warn(n.options.logLevel,s)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:i},r))}function Tre(t,e,r){let i=null;if(typeof e=="function"||Array.isArray(e)?i=e:r===void 0&&e&&(r=e),typeof r=="string"&&(r=r.length),typeof r=="number"){let n=Math.round(r);r=n<1?void 0:n>8?{indent:8}:{indent:n}}if(t===void 0){let{keepUndefined:n}=r??e??{};if(!n)return}return xre.isDocument(t)&&!i?t.toString(r):new Sre.Document(t,i,r).toString(r)}zc.parse=Are;zc.parseAllDocuments=Ire;zc.parseDocument=aF;zc.stringify=Tre});var cF=T(Le=>{"use strict";y();var Ere=m1(),Ore=Fc(),Nre=KS(),N1=Vc(),Lre=wc(),Kn=xe(),Pre=Hn(),qre=dt(),Cre=Wn(),Rre=zn(),Mre=Mm(),Dre=I1(),Fre=T1(),jre=O1(),Bm=oF(),uF=_c();Le.Composer=Ere.Composer;Le.Document=Ore.Document;Le.Schema=Nre.Schema;Le.YAMLError=N1.YAMLError;Le.YAMLParseError=N1.YAMLParseError;Le.YAMLWarning=N1.YAMLWarning;Le.Alias=Lre.Alias;Le.isAlias=Kn.isAlias;Le.isCollection=Kn.isCollection;Le.isDocument=Kn.isDocument;Le.isMap=Kn.isMap;Le.isNode=Kn.isNode;Le.isPair=Kn.isPair;Le.isScalar=Kn.isScalar;Le.isSeq=Kn.isSeq;Le.Pair=Pre.Pair;Le.Scalar=qre.Scalar;Le.YAMLMap=Cre.YAMLMap;Le.YAMLSeq=Rre.YAMLSeq;Le.CST=Mre;Le.Lexer=Dre.Lexer;Le.LineCounter=Fre.LineCounter;Le.Parser=jre.Parser;Le.parse=Bm.parse;Le.parseAllDocuments=Bm.parseAllDocuments;Le.parseDocument=Bm.parseDocument;Le.stringify=Bm.stringify;Le.visit=uF.visit;Le.visitAsync=uF.visitAsync});var Vm=T(Qn=>{"use strict";y();Object.defineProperty(Qn,"__esModule",{value:!0});Qn.ConvenienceSeverities=Qn.LegacyIdentifiers=Qn.ModernIdentifiers=void 0;var Jc=hr();Qn.ModernIdentifiers=["theme-check:nothing","theme-check:recommended","theme-check:theme-app-extension","theme-check:all"];Qn.LegacyIdentifiers=new Map(Object.entries({default:"theme-check:recommended",recommended:"theme-check:recommended",all:"theme-check:all",nothing:"theme-check:nothing",theme_app_extension:"theme-check:theme-app-extension",theme_app_extensions:"theme-check:theme-app-extension","theme-app-extension":"theme-check:theme-app-extension","theme-app-extensions":"theme-check:theme-app-extension"}));Qn.ConvenienceSeverities={suggestion:Jc.Severity.WARNING,style:Jc.Severity.INFO,error:Jc.Severity.ERROR,warning:Jc.Severity.WARNING,info:Jc.Severity.INFO}});var mF=T(Qc=>{"use strict";y();var fF=Qc&&Qc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qc,"__esModule",{value:!0});Qc.readYamlConfigDescription=Gre;var pF=hr(),Bre=ae("node:fs"),Vre=fF(ae("node:fs/promises")),$re=ae("node:module"),$m=fF(ae("node:path")),Ure=cF(),Kc=Vm(),P1=class extends Error{constructor(e,r){super(e),this.name="UnresolvedAliasError",this.message=`YAML parsing error: Unresolved alias *${r}.
|
|
1361
|
-
Did you forget to wrap your ignore statement in quotes? '*${r}'
|
|
1362
|
-
${e}`}};function Hre(t,e){try{let r=e.trim()===""?{}:(0,Ure.parse)(e);if(!dF(r))throw new Error(`Expecting parsed contents of config file at path '${t}' to be a plain object`);return r}catch(r){if(r instanceof Error&&r.name==="ReferenceError"&&r.message.includes("Unresolved alias")&&/: .*$/m.test(r.message)){let i=/: .*$/m.exec(r.message)[0].slice(2);throw new P1(r.message,i)}else throw r}}async function Gre(t,e=!1){let r=$m.default.dirname(t),i=await Vre.default.readFile(t,"utf8"),n=Hre(t,i),s={checkSettings:{},ignore:[],extends:[],require:[]};n.root&&(s.root=n.root,delete n.root),n.ignore&&(s.ignore=L1(n.ignore),delete n.ignore),n.require&&(s.require=L1(n.require).map(a=>hF(r,a)).filter(q1),delete n.require),n.extends?(s.extends=L1(n.extends).map(a=>lF(r,a)).filter(q1),delete n.extends):e&&(s.extends=[lF(r,"theme-check:recommended")]),n.context&&(pF.Modes.includes(n.context)&&(s.context=n.context),delete n.context),n.include_categories&&delete n.include_categories,n.exclude_categories&&delete n.exclude_categories;for(let[a,o]of Object.entries(n)){if(!dF(o))throw new Error(`Expected a plain object value for ${a} but got ${typeof o}`);s.checkSettings[a]=Wre(o)}return s}function lF(t,e){return e.startsWith(":")||Kc.LegacyIdentifiers.has(e)?Kc.LegacyIdentifiers.get(e.replace(/^:/,"")):e.startsWith("theme-check:")?e:hF(t,e)}function hF(t,e){if($m.default.isAbsolute(e))return e;if(e.startsWith("."))return $m.default.resolve(t,e);let r=(0,$re.createRequire)($m.default.join(t,"__placeholder"));return(0,Bre.realpathSync)(r.resolve(e))}function Wre(t){let e={enabled:t.enabled||!0};for(let[r,i]of Object.entries(t))e[Qre(r)]=i;return t.ignore!==void 0&&Array.isArray(t.ignore)&&t.ignore.every(q1)&&(e.ignore=t.ignore),t.severity!==void 0&&(e.severity=zre(t.severity)),e}function zre(t){if(Jre(t))return Kc.ConvenienceSeverities[t];if(Kre(t))return t;throw new Error(`Unsupported severity: ${t}. Try one of ${Object.keys(Kc.ConvenienceSeverities)}`)}function Jre(t){return typeof t=="string"&&t in Kc.ConvenienceSeverities}function Kre(t){return typeof t=="number"&&t in pF.Severity}function Qre(t){return t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase())}function dF(t){return Object.prototype.toString.call(t)==="[object Object]"}function q1(t){return typeof t=="string"}function L1(t){return Array.isArray(t)?t:[t]}});var vF=T(C1=>{"use strict";y();Object.defineProperty(C1,"__esModule",{value:!0});C1.mergeFragments=Yre;function Yre(t,e){return{root:gF(t.map(r=>r.root),e.root),extends:[],ignore:t.flatMap(r=>r.ignore).concat(e.ignore),require:t.flatMap(r=>r.require).concat(e.require),checkSettings:t.map(r=>r.checkSettings).concat(e.checkSettings).reduce(_F),context:gF(t.map(r=>r.context),e.context)??"theme"}}function gF(t,e){return t.concat(e).filter(Boolean).pop()}function _F(t,e){let r={...t};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(yF(t[i])&&yF(e[i])?r[i]=_F(t[i],e[i]):r[i]=e[i]);return r}function yF(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}});var SF=T(Yc=>{"use strict";y();var Xre=Yc&&Yc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Yc,"__esModule",{value:!0});Yc.resolveConfig=R1;var bF=Xre(ae("node:path")),Zre=mF(),eie=vF(),tie=Vm(),rie=()=>bF.default.resolve(__dirname,"./configs");async function R1(t,e=!1){if(iie(t)){let n=bF.default.join(rie(),t.replace(/^theme-check:/,"")+".yml");return R1(n)}let r=await(0,Zre.readYamlConfigDescription)(t,e),i=await Promise.all(r.extends.map(n=>R1(n)));return(0,eie.mergeFragments)(i,r)}function iie(t){return tie.ModernIdentifiers.includes(t)}});var wF=T(Um=>{"use strict";y();Object.defineProperty(Um,"__esModule",{value:!0});Um.resolveConfig=void 0;var nie=SF();Object.defineProperty(Um,"resolveConfig",{enumerable:!0,get:function(){return nie.resolveConfig}})});var kF=T(j1=>{"use strict";y();Object.defineProperty(j1,"__esModule",{value:!0});j1.validateConfig=sie;var F1=ae("node:assert");function sie(t){for(let e of t.checks){let r=t.settings[e.meta.code];(0,F1.strict)(r,`Unexpected missing settings for ${e.meta.code} in validateConfig call`),aie(e.meta.code,e.meta.schema,r,!0)}}function aie(t,e,r,i){for(let n in e){let s=e[n],a=r[n];M1(n,a,s)}i&&oie(r),uie(t,e,r)}function oie(t){let{severity:e,enabled:r,ignore:i}=t;e===void 0||D1("severity","number",typeof e),D1("enabled","boolean",typeof r),i===void 0||xF("ignore",i)}function uie(t,e,r){let i=["enabled","severity","ignore"];for(let n in r)!(n in e)&&!i.includes(n)&&console.error(`Unexpected setting: ${n} for check ${t} found in configuration`)}function M1(t,e,r){let{type:i,optional:n,defaultValue:s,properties:a,itemType:o}=r.options;if(e===void 0){if(n!==!0&&s===void 0)throw new Error(`Missing required setting: ${t}`);return}if(!(s!==void 0&&e===s))switch(i){case"string":case"number":case"boolean":{D1(t,i,typeof e);break}case"object":{if(typeof e!="object"||e===null||Array.isArray(e))throw new Error(`Invalid type for setting ${t}: expected object, got ${typeof e}`);for(let u in a)M1(u,e[u],a[u]);break}case"array":{if(xF(t,e),o)for(let u of e)M1(t,u,o);break}default:throw new Error(`Unexpected setting type: ${i}`)}}function D1(t,e,r){F1.strict.strictEqual(r,e,`Invalid type for setting ${t}: expected ${e}, got ${r}`)}function xF(t,e){F1.strict.ok(Array.isArray(e),`Invalid type for setting ${t}: expected array, got ${typeof e}`)}});var IF=T(Xc=>{"use strict";y();var cie=Xc&&Xc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Xc,"__esModule",{value:!0});Xc.loadConfig=die;var lie=bR(),fie=wF(),pie=kF(),hie=cie(ae("fs/promises"));async function die(t,e){if(!e)throw new Error("loadConfig cannot be called without a root argument");let r="theme-check:recommended";t||(await hie.default.readdir(e)).some(a=>a.endsWith(".extension.toml")||a.endsWith(".app.toml"))&&(r="theme-check:theme-app-extension");let i=await(0,fie.resolveConfig)(t??r,!0),n=await(0,lie.loadConfigDescription)(i,e);return(0,pie.validateConfig)(n),n}});var AF=T(Zc=>{"use strict";y();var mie=Zc&&Zc.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Zc,"__esModule",{value:!0});Zc.findConfigPath=vie;var gie=mie(ae("node:path")),yie=J0(),_ie=[".theme-check.yml"];function vie(t){let e=_ie.map(r=>gie.default.join(t,r));return bie(e,yie.fileExists)}async function bie(t,e){for(let r of t)if(await e(r))return r}});var TF=T(Io=>{"use strict";y();Object.defineProperty(Io,"__esModule",{value:!0});Io.findConfigPath=Io.loadConfig=void 0;var Sie=IF();Object.defineProperty(Io,"loadConfig",{enumerable:!0,get:function(){return Sie.loadConfig}});var wie=AF();Object.defineProperty(Io,"findConfigPath",{enumerable:!0,get:function(){return wie.findConfigPath}})});var EF=T(Ao=>{"use strict";y();var xie=Ao&&Ao.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ao,"__esModule",{value:!0});Ao.NodeFileSystem=void 0;var Yn=hr(),B1=xie(ae("node:fs/promises"));Ao.NodeFileSystem={async readFile(t){return B1.default.readFile(Yn.path.fsPath(t),"utf8")},async readDirectory(t){return(await B1.default.readdir(Yn.path.fsPath(t),{withFileTypes:!0})).map(r=>[Yn.path.join(t,r.name),r.isDirectory()?Yn.FileType.Directory:Yn.FileType.File])},async stat(t){try{let e=await B1.default.stat(Yn.path.fsPath(t));return{type:e.isDirectory()?Yn.FileType.Directory:Yn.FileType.File,size:e.size}}catch(e){throw new Error(`Failed to get file stat: ${e}`)}}}});var Die=T(it=>{"use strict";y();var kie=it&&it.__createBinding||(Object.create?(function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}):(function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]})),NF=it&&it.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&kie(e,t,r)},LF=it&&it.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(it,"__esModule",{value:!0});it.loadConfig=it.NodeFileSystem=void 0;it.toSourceCode=qF;it.check=Rie;it.checkAndAutofix=Mie;it.themeCheckRun=V1;it.getThemeAndConfig=CF;it.getTheme=RF;it.getThemeFilesPathPattern=MF;var mt=hr(),Iie=L2(),Aie=$2(),Tie=ge(),Eie=LF(ae("node:fs/promises")),el=LF(ae("node:path")),Oie=ae("node:util"),PF=Du(),Nie=$d(),Lie=hR(),OF=TF(),To=EF();Object.defineProperty(it,"NodeFileSystem",{enumerable:!0,get:function(){return To.NodeFileSystem}});var Pie=ae("node:url"),qie=(0,Oie.promisify)(Nie);NF(hr(),it);NF(Vm(),it);var Cie=async(t,e)=>(t??=await(0,OF.findConfigPath)(e),(0,OF.loadConfig)(t,e));it.loadConfig=Cie;async function qF(t){try{let e=await Eie.default.readFile(t,"utf8");return(0,mt.toSourceCode)(mt.path.normalize(PF.URI.file(t)),e)}catch{return}}async function Rie(t,e){return(await V1(t,e)).offenses}async function Mie(t,e){let{theme:r,offenses:i}=await V1(t,e);await(0,Lie.autofix)(r,i)}async function V1(t,e,r=()=>{}){let{theme:i,config:n}=await CF(t,e),s=new Aie.ThemeLiquidDocsManager(r),o=(await mt.JSONValidator.create(s,n))?.isValid,u=i.map(g=>(0,mt.toSchema)(n.context,g.uri,g,o)),l=new Map(i.filter(g=>(0,mt.isBlock)(g.uri)).map(g=>[el.default.basename(g.uri,".liquid"),(0,mt.memo)(async()=>(0,mt.toSchema)(n.context,g.uri,g,o))])),f=new Map(i.filter(g=>(0,mt.isSection)(g.uri)).map(g=>[el.default.basename(g.uri,".liquid"),(0,mt.memo)(async()=>(0,mt.toSchema)(n.context,g.uri,g,o))])),h=new Map(i.map(g=>[el.default.relative(PF.URI.file(t).toString(),g.uri),(0,mt.memo)(async()=>{let k=g.ast;if((0,Tie.isLiquidHtmlNode)(k)&&(0,mt.filePathSupportsLiquidDoc)(g.uri))return(0,mt.extractDocDefinition)(g.uri,k)})])),p=new Map(i.filter(g=>g.uri.endsWith(".liquid")).map(g=>[g.uri,(0,mt.memo)(async()=>(0,mt.extractCSSClassesFromLiquidUri)(g.uri,To.NodeFileSystem))]));try{let g=mt.path.join(n.rootUri,"assets"),k=await To.NodeFileSystem.readDirectory(g);for(let[w]of k.filter(([_])=>_.endsWith(".css")))p.set(w,(0,mt.memo)(async()=>(0,mt.extractCSSClassesFromAssetUri)(w,To.NodeFileSystem)))}catch{}let m=async g=>f.get(g)?.(),v=async g=>l.get(g)?.(),S;try{S=await(0,Iie.buildThemeGraph)(n.rootUri,{fs:To.NodeFileSystem,getSectionSchema:m,getBlockSchema:v,getWebComponentDefinitionReference:()=>{},mode:n.context})}catch{}let b=await(0,mt.check)(i,n,{fs:To.NodeFileSystem,themeDocset:s,jsonValidationSet:s,getSectionSchema:m,getBlockSchema:v,getAppBlockSchema:async g=>l.get(g)?.(),getDocDefinition:async g=>h.get(g)?.(),getCSSClassesForURI:async g=>p.get(g)?.()??new Set,async getReferences(g){return S?S.modules[g]?.references??[]:[]},async getDependencies(g){return S?S.modules[g]?.dependencies??[]:[]}});return{theme:i,config:n,offenses:b}}async function CF(t,e){let r=await(0,it.loadConfig)(e,t);return{theme:await RF(r),config:r}}async function RF(t){let e=MF(t.rootUri),r=await qie(e,{absolute:!0}).then(n=>n.filter(s=>!(0,mt.isIgnored)(s,t)));return(await Promise.all(r.map(qF))).filter(n=>n!==void 0)}function MF(t){return el.default.normalize(el.default.join((0,Pie.fileURLToPath)(t),"**/*.{liquid,json}")).replace(/\\/g,"/")}});export{ge as a,Du as b,Gf as c,Me as d,oe as e,nn as f,Uu as g,zf as h,Jf as i,Tn as j,Kf as k,$t as l,Cr as m,En as n,rr as o,Hu as p,Gu as q,Qf as r,Pi as s,Os as t,Ut as u,Ke as v,Yf as w,Fa as x,Xf as y,ja as z,Zf as A,ep as B,tp as C,Rr as D,rp as E,ip as F,np as G,ap as H,op as I,up as J,Ns as K,Iv as L,kr as M,OU as N,cO as O,Ba as P,tue as Q,Ev as R,Ls as S,XO as T,ZO as U,hr as V,L2 as W,$2 as X,P0 as Y,Bd as Z,lR as _,cF as $,Die as aa};
|
|
1363
|
-
/*! Bundled license information:
|
|
1364
|
-
|
|
1365
|
-
isobject/index.js:
|
|
1366
|
-
(*!
|
|
1367
|
-
* isobject <https://github.com/jonschlinkert/isobject>
|
|
1368
|
-
*
|
|
1369
|
-
* Copyright (c) 2014-2015, Jon Schlinkert.
|
|
1370
|
-
* Licensed under the MIT License.
|
|
1371
|
-
*)
|
|
1372
|
-
|
|
1373
|
-
line-column/lib/line-column.js:
|
|
1374
|
-
(**
|
|
1375
|
-
* line-column - Convert efficiently index to/from line-column in a string
|
|
1376
|
-
* @module lineColumn
|
|
1377
|
-
* @license MIT
|
|
1378
|
-
*)
|
|
1379
|
-
|
|
1380
|
-
cssesc/cssesc.js:
|
|
1381
|
-
(*! https://mths.be/cssesc v3.0.0 by @mathias *)
|
|
1382
|
-
*/
|