shopify 5.0.2 → 5.2.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.
Files changed (529) hide show
  1. package/dist/analytics-23GM6KJU.js +1 -0
  2. package/dist/analytics-743FYOAE.js +1 -0
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/{chunk-RPCIFYCY.js → chunk-2EQRXSF6.js} +2 -2
  5. package/dist/{chunk-NXAEBGMO.js → chunk-2IXP3IPE.js} +1 -1
  6. package/dist/{chunk-T4XJKM6B.js → chunk-2KACAQJS.js} +1 -1
  7. package/dist/chunk-2KFYIYLI.js +1 -0
  8. package/dist/chunk-2OCSYLKZ.js +1 -0
  9. package/dist/{chunk-AQKWPRZE.js → chunk-2PILNMHJ.js} +2 -2
  10. package/dist/chunk-36S6MFJQ.js +47 -0
  11. package/dist/{chunk-TFPW2VGN.js → chunk-3DB4EC62.js} +1 -1
  12. package/dist/chunk-3GL3IT4K.js +16 -0
  13. package/dist/{chunk-C3RFAKWR.js → chunk-3JRB7Q3T.js} +1 -1
  14. package/dist/chunk-3KGN6N7E.js +1 -0
  15. package/dist/chunk-3OYMK5X6.js +11 -0
  16. package/dist/chunk-3PYDIBTX.js +1 -0
  17. package/dist/chunk-422BGHXN.js +1 -0
  18. package/dist/chunk-43C32FUQ.js +1 -0
  19. package/dist/chunk-4AN7ECPE.js +9 -0
  20. package/dist/chunk-4AWVU2OV.js +1 -0
  21. package/dist/chunk-4IP37MBX.js +1 -0
  22. package/dist/chunk-4KBOLN7Q.js +8 -0
  23. package/dist/chunk-4LJERO23.js +89 -0
  24. package/dist/chunk-4M5WHOZW.js +1 -0
  25. package/dist/chunk-4RO35FFQ.js +1 -0
  26. package/dist/chunk-4ZS5354G.js +3 -0
  27. package/dist/chunk-55AWBPKU.js +7 -0
  28. package/dist/chunk-5BUYR23E.js +1 -0
  29. package/dist/chunk-5EDA7PVE.js +11 -0
  30. package/dist/{chunk-UKWIWCOH.js → chunk-5P6OELKZ.js} +1 -1
  31. package/dist/chunk-5PVXLQNX.js +1 -0
  32. package/dist/{chunk-J5ERDFIC.js → chunk-5S2P4MHJ.js} +1 -1
  33. package/dist/{chunk-26PWHH3B.js → chunk-5TJJVSCI.js} +1 -1
  34. package/dist/chunk-5TOK5OJS.js +1 -0
  35. package/dist/chunk-5ZG2SWU2.js +1 -0
  36. package/dist/{chunk-SLY27GDC.js → chunk-62F4ZMSC.js} +2 -2
  37. package/dist/chunk-652NT7OW.js +1 -0
  38. package/dist/chunk-6B5KM3A4.js +97 -0
  39. package/dist/chunk-6LCESSY3.js +1 -0
  40. package/dist/chunk-6QHDMCAA.js +1 -0
  41. package/dist/{chunk-D2KIGKBI.js → chunk-7A4ZE5IS.js} +60 -60
  42. package/dist/{chunk-CGVROSPS.js → chunk-7AQZKPJU.js} +1 -1
  43. package/dist/chunk-7FBOMPO5.js +203 -0
  44. package/dist/chunk-7HECBXSP.js +1 -0
  45. package/dist/chunk-7UK565VJ.js +1 -0
  46. package/dist/{chunk-LHXFTFFM.js → chunk-A5BSUUNQ.js} +1 -1
  47. package/dist/chunk-ADGE7MKB.js +1 -0
  48. package/dist/chunk-AEWRZ7AE.js +1 -0
  49. package/dist/chunk-ALDJTWCO.js +1 -0
  50. package/dist/chunk-ARL5WBDK.js +1 -0
  51. package/dist/chunk-AXFEIJC7.js +1 -0
  52. package/dist/{chunk-KZRLZWOU.js → chunk-AYGL6F3P.js} +1 -1
  53. package/dist/{chunk-URXM5A2K.js → chunk-AYTTE7X5.js} +1 -1
  54. package/dist/{chunk-3ODQKAEA.js → chunk-BDIZUTKC.js} +1 -1
  55. package/dist/chunk-BQKF4SRH.js +6 -0
  56. package/dist/chunk-C2AOCLEZ.js +1 -0
  57. package/dist/{chunk-WRZWHT6M.js → chunk-C2SGJ5IG.js} +1 -1
  58. package/dist/chunk-C3S3UMV3.js +1 -0
  59. package/dist/{chunk-WBJ6ZHYH.js → chunk-C5DKLOW4.js} +37 -37
  60. package/dist/chunk-C72QNK6O.js +4 -0
  61. package/dist/{chunk-6ES4KRFW.js → chunk-CA3GVT4D.js} +1 -1
  62. package/dist/chunk-CCLU5ZRK.js +9 -0
  63. package/dist/chunk-CE6XQDAG.js +10 -0
  64. package/dist/chunk-CEJ5WS4I.js +5 -0
  65. package/dist/{chunk-VEUKT5EI.js → chunk-CIBBQO2L.js} +2 -2
  66. package/dist/{chunk-IILLQOUC.js → chunk-CKJXJ6HD.js} +1 -1
  67. package/dist/{chunk-MEYVUHQH.js → chunk-COGKVNQB.js} +1 -1
  68. package/dist/chunk-CQAD5WML.js +1 -0
  69. package/dist/chunk-CQPZOXWO.js +6 -0
  70. package/dist/{chunk-62EOM3Y2.js → chunk-CZYQIWNL.js} +1 -1
  71. package/dist/chunk-DA5RQFXA.js +10 -0
  72. package/dist/{chunk-7GHSE7SG.js → chunk-DDRP6QTC.js} +1 -1
  73. package/dist/{chunk-Q5IC3IYY.js → chunk-DESZFFOK.js} +1 -1
  74. package/dist/{chunk-PLSS456F.js → chunk-DKR7562G.js} +1 -1
  75. package/dist/{chunk-LGXI7EGM.js → chunk-DNNTAMC5.js} +2 -2
  76. package/dist/chunk-DUPQUQ2Z.js +1 -0
  77. package/dist/{chunk-Q4JYAUVL.js → chunk-DUTIWCJ2.js} +1 -1
  78. package/dist/chunk-E6JEBSHZ.js +20 -0
  79. package/dist/chunk-E6KNAPIY.js +4 -0
  80. package/dist/chunk-E7XCCLQH.js +1 -0
  81. package/dist/chunk-EE72PCKT.js +1 -0
  82. package/dist/chunk-EEYXBKR7.js +4 -0
  83. package/dist/{chunk-ZRI3SSLG.js → chunk-EGLA3WLZ.js} +2 -2
  84. package/dist/chunk-EVQPYZ7F.js +5 -0
  85. package/dist/chunk-FDFE3SSG.js +35 -0
  86. package/dist/{chunk-Q7BOSHWX.js → chunk-FDSNRKGQ.js} +1 -1
  87. package/dist/chunk-FI5TQHUA.js +1 -0
  88. package/dist/chunk-FIKZQ4RA.js +1 -0
  89. package/dist/chunk-FJOVMEPN.js +3 -0
  90. package/dist/{chunk-ER6C5WS3.js → chunk-FLARCZ5F.js} +1 -1
  91. package/dist/chunk-FOMMPAWZ.js +1 -0
  92. package/dist/{chunk-6PUU6ZNQ.js → chunk-FRWQJAW2.js} +1 -1
  93. package/dist/{chunk-HXZAY5OA.js → chunk-G3DXNSA2.js} +1 -1
  94. package/dist/{chunk-XWSWXQCC.js → chunk-G7JO3W2R.js} +1 -1
  95. package/dist/{chunk-WESTVWWD.js → chunk-GABIWYY3.js} +1 -1
  96. package/dist/chunk-GFSEU7PF.js +6 -0
  97. package/dist/chunk-GFVUWVEM.js +1 -0
  98. package/dist/{chunk-ISKQQXLZ.js → chunk-GHNSXX7R.js} +1 -1
  99. package/dist/{chunk-2L6AN3QA.js → chunk-GQ3LY7BY.js} +1 -1
  100. package/dist/{chunk-2A2JSAAA.js → chunk-H45S4MGC.js} +1 -1
  101. package/dist/chunk-HEB4YYM6.js +9 -0
  102. package/dist/{chunk-CXI3RHPW.js → chunk-HI5FTI3M.js} +1 -1
  103. package/dist/chunk-HJ24NEP5.js +1 -0
  104. package/dist/chunk-HQFXVVTB.js +1 -0
  105. package/dist/{chunk-TODZ3TJR.js → chunk-HR6R7JXN.js} +1 -1
  106. package/dist/chunk-HRHJA5ZP.js +3 -0
  107. package/dist/{chunk-QEKGGTMN.js → chunk-HT5JQJMB.js} +1 -1
  108. package/dist/chunk-HT7273V7.js +1 -0
  109. package/dist/{chunk-UXVXVI6O.js → chunk-HUB4HDWN.js} +78 -76
  110. package/dist/chunk-IATNIWOC.js +13 -0
  111. package/dist/chunk-IHVWDKDV.js +2 -0
  112. package/dist/{chunk-3KM5ZOW2.js → chunk-IKXUYCK7.js} +1 -1
  113. package/dist/chunk-IVQN2RUP.js +1 -0
  114. package/dist/chunk-IWNFPBH2.js +33 -0
  115. package/dist/{chunk-ESFCYB46.js → chunk-J324ZPO6.js} +1 -1
  116. package/dist/{chunk-KNWT7JLL.js → chunk-JJQ3DJG5.js} +2 -2
  117. package/dist/{chunk-7CCTPBCT.js → chunk-JLAN6JXJ.js} +1 -1
  118. package/dist/chunk-K2GCCCCV.js +1 -0
  119. package/dist/{chunk-NVKJ7ZLP.js → chunk-K4KKSBUW.js} +1 -1
  120. package/dist/{chunk-BAHIL37I.js → chunk-K4QJEQI4.js} +1 -1
  121. package/dist/{chunk-QDCLL5OI.js → chunk-K5UVCBIP.js} +1 -1
  122. package/dist/{chunk-64G5TGFF.js → chunk-KN2JIDNO.js} +1 -1
  123. package/dist/chunk-KORVOCNN.js +1 -0
  124. package/dist/chunk-KRQCQ57O.js +1 -0
  125. package/dist/{chunk-3MYDSQHF.js → chunk-KT2AMFVW.js} +1 -1
  126. package/dist/chunk-L23Q53FM.js +70 -0
  127. package/dist/{chunk-UBP3LQFY.js → chunk-L3DTONOI.js} +2 -2
  128. package/dist/{chunk-BN7ZXAZJ.js → chunk-LG3KEHGD.js} +2 -2
  129. package/dist/chunk-LRETOC6P.js +1 -0
  130. package/dist/chunk-LXFWK3O2.js +1 -0
  131. package/dist/chunk-LZ2TN7EZ.js +1 -0
  132. package/dist/chunk-MBAPM5HA.js +15 -0
  133. package/dist/{chunk-UUAKOX7E.js → chunk-MGZK5EQW.js} +2 -2
  134. package/dist/chunk-MKUXSM33.js +1 -0
  135. package/dist/chunk-MQ55QUOJ.js +276 -0
  136. package/dist/chunk-NAQJMRPT.js +2296 -0
  137. package/dist/{chunk-DZKFP6H2.js → chunk-NMXRDF4T.js} +1 -1
  138. package/dist/chunk-NOWM3CCG.js +1 -0
  139. package/dist/chunk-NVDFXEQ5.js +5 -0
  140. package/dist/{chunk-CX5CC6P5.js → chunk-O472FAYX.js} +1 -1
  141. package/dist/{chunk-B2O3ANRZ.js → chunk-OCILF2DD.js} +1 -1
  142. package/dist/{chunk-67L7FIB6.js → chunk-OGBMFGYC.js} +1 -1
  143. package/dist/chunk-OIQ5NQ5I.js +18 -0
  144. package/dist/chunk-OKRKVVTK.js +103 -0
  145. package/dist/chunk-ONNUEQGR.js +3 -0
  146. package/dist/chunk-OSASE35V.js +6 -0
  147. package/dist/chunk-OTMTS5L4.js +3 -0
  148. package/dist/chunk-OWPAHXDF.js +3 -0
  149. package/dist/chunk-P7HZGJRU.js +6 -0
  150. package/dist/chunk-PIU3GVJ4.js +1 -0
  151. package/dist/{chunk-2WJOTJOD.js → chunk-PSNCWS3Q.js} +2 -2
  152. package/dist/chunk-PSREELSQ.js +22 -0
  153. package/dist/{chunk-AQ6EVL73.js → chunk-Q2CKRCPM.js} +1 -1
  154. package/dist/chunk-QA2D7DT2.js +1 -0
  155. package/dist/chunk-QBRRFFMZ.js +1 -0
  156. package/dist/chunk-QDMTJKQ3.js +1 -0
  157. package/dist/{chunk-3Z3MADXZ.js → chunk-QIJ7D2JS.js} +1 -1
  158. package/dist/chunk-QLN6IOOY.js +1 -0
  159. package/dist/chunk-QU3USVKT.js +1 -0
  160. package/dist/chunk-R2E6TMBE.js +22 -0
  161. package/dist/chunk-R4E2E4NN.js +1 -0
  162. package/dist/chunk-R5COVIJM.js +1 -0
  163. package/dist/chunk-RFJ2LI64.js +81 -0
  164. package/dist/chunk-RNF6T6IO.js +5 -0
  165. package/dist/chunk-RSNFNZ6F.js +2 -0
  166. package/dist/{chunk-I4CEH7AK.js → chunk-RZ3UGOV4.js} +2 -2
  167. package/dist/{chunk-35XFNKNB.js → chunk-S23ZG2RG.js} +1 -1
  168. package/dist/{chunk-PF53E2DC.js → chunk-SAK42CAY.js} +1 -1
  169. package/dist/chunk-SBX7CMHM.js +1 -0
  170. package/dist/{chunk-S5P7KWY4.js → chunk-SGQTRKYZ.js} +1 -1
  171. package/dist/chunk-SNPJVVVE.js +5 -0
  172. package/dist/chunk-SNRGS3YU.js +1 -0
  173. package/dist/chunk-SUTSCIXU.js +7 -0
  174. package/dist/chunk-SWFCT5B7.js +2 -0
  175. package/dist/{chunk-4KECSZTL.js → chunk-SZ64GAVG.js} +2 -2
  176. package/dist/{chunk-WBVS5NBV.js → chunk-TDHIOONG.js} +2 -2
  177. package/dist/{chunk-W37IFK3P.js → chunk-TLN4BKXJ.js} +102 -102
  178. package/dist/{chunk-QW52RPAU.js → chunk-TXMZPF2U.js} +1 -1
  179. package/dist/chunk-TZHVCMZN.js +6 -0
  180. package/dist/{chunk-IHXGZW42.js → chunk-TZOB52QK.js} +1 -1
  181. package/dist/{chunk-N57Y7THE.js → chunk-U5BKU3OL.js} +1 -1
  182. package/dist/{chunk-Y55T4IIQ.js → chunk-UK3BDOHR.js} +1 -1
  183. package/dist/chunk-UORSJB4A.js +857 -0
  184. package/dist/chunk-UU6UQ2QY.js +1 -0
  185. package/dist/{chunk-PWAT52M4.js → chunk-UY44O4IZ.js} +1 -1
  186. package/dist/{chunk-QF5WKTPD.js → chunk-V3H6SYK3.js} +1 -1
  187. package/dist/{chunk-YTUUU33R.js → chunk-VBPMVVLV.js} +1 -1
  188. package/dist/{chunk-SNH4XZ6E.js → chunk-VGBCG3I5.js} +1 -1
  189. package/dist/{chunk-QEVTBD33.js → chunk-VHRUPKWH.js} +1 -1
  190. package/dist/chunk-VVHJ2AUF.js +3 -0
  191. package/dist/chunk-WB5GRBHW.js +1 -0
  192. package/dist/{chunk-YSWVYPWR.js → chunk-WBKQSSWW.js} +1 -1
  193. package/dist/{chunk-SIL6HPMK.js → chunk-WDXDT7XY.js} +2 -2
  194. package/dist/{chunk-SACNUF4I.js → chunk-WHOD5I7N.js} +1 -1
  195. package/dist/{chunk-Z2WAW6MM.js → chunk-WL3M63DG.js} +1 -1
  196. package/dist/{chunk-LEHBZKK3.js → chunk-WLJDMI7E.js} +1 -1
  197. package/dist/{chunk-PTSCGSQV.js → chunk-WZ3QWPK5.js} +2 -2
  198. package/dist/{chunk-H6GNKWYM.js → chunk-X5V7AGVU.js} +1 -1
  199. package/dist/{chunk-RPVZ2JON.js → chunk-X76AYO36.js} +1 -1
  200. package/dist/chunk-XB7H2RYV.js +31 -0
  201. package/dist/chunk-XHHAVKKV.js +1 -0
  202. package/dist/chunk-XKNDU62O.js +1 -0
  203. package/dist/chunk-XVJRGOJA.js +4 -0
  204. package/dist/chunk-Y3ZAQZPH.js +16 -0
  205. package/dist/chunk-YF4AXKM4.js +1 -0
  206. package/dist/chunk-YGN65N6W.js +16 -0
  207. package/dist/{chunk-HF4NDEX3.js → chunk-YR4J46US.js} +1 -1
  208. package/dist/chunk-YTC367JI.js +3 -0
  209. package/dist/{chunk-ZBL7XMJ6.js → chunk-Z2FGYMJ6.js} +2 -2
  210. package/dist/chunk-Z3QZNLT5.js +1 -0
  211. package/dist/chunk-ZC3EDADH.js +26 -0
  212. package/dist/chunk-ZLITAXPT.js +1 -0
  213. package/dist/{chunk-ACA2BGAD.js → chunk-ZNEPRGFY.js} +1 -1
  214. package/dist/chunk-ZNEQZV5K.js +3 -0
  215. package/dist/chunk-ZOU6SOXW.js +20 -0
  216. package/dist/{chunk-YV2TP44L.js → chunk-ZQNGYJKJ.js} +1 -1
  217. package/dist/chunk-ZRM7ESSS.js +4 -0
  218. package/dist/chunk-ZX33FUW3.js +5 -0
  219. package/dist/cli/commands/app/build.js +1 -1
  220. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  221. package/dist/cli/commands/app/bulk/execute.js +1 -1
  222. package/dist/cli/commands/app/bulk/status.js +1 -1
  223. package/dist/cli/commands/app/config/link.js +1 -1
  224. package/dist/cli/commands/app/config/pull.js +1 -1
  225. package/dist/cli/commands/app/config/use.js +1 -1
  226. package/dist/cli/commands/app/config/validate.js +1 -1
  227. package/dist/cli/commands/app/demo/watcher.js +1 -1
  228. package/dist/cli/commands/app/deploy.js +1 -1
  229. package/dist/cli/commands/app/dev/clean.js +1 -1
  230. package/dist/cli/commands/app/dev.js +1 -1
  231. package/dist/cli/commands/app/env/pull.js +1 -1
  232. package/dist/cli/commands/app/env/show.js +1 -1
  233. package/dist/cli/commands/app/execute.js +1 -1
  234. package/dist/cli/commands/app/function/build.js +1 -1
  235. package/dist/cli/commands/app/function/info.js +1 -1
  236. package/dist/cli/commands/app/function/replay.js +1 -1
  237. package/dist/cli/commands/app/function/run.js +1 -1
  238. package/dist/cli/commands/app/function/schema.js +1 -1
  239. package/dist/cli/commands/app/function/typegen.js +1 -1
  240. package/dist/cli/commands/app/generate/extension.js +1 -1
  241. package/dist/cli/commands/app/graphiql.js +1 -1
  242. package/dist/cli/commands/app/import/channel-config.js +1 -1
  243. package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
  244. package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
  245. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  246. package/dist/cli/commands/app/import-extensions.js +1 -1
  247. package/dist/cli/commands/app/info.js +1 -1
  248. package/dist/cli/commands/app/init.js +1 -1
  249. package/dist/cli/commands/app/logs.js +1 -1
  250. package/dist/cli/commands/app/release.js +1 -1
  251. package/dist/cli/commands/app/security/check.js +1 -1
  252. package/dist/cli/commands/app/security/clean.js +1 -1
  253. package/dist/cli/commands/app/security/instructions.js +1 -1
  254. package/dist/cli/commands/app/security/record.js +1 -1
  255. package/dist/cli/commands/app/security/review.js +1 -1
  256. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
  257. package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
  258. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
  259. package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
  260. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
  261. package/dist/cli/commands/app/versions/list.js +1 -1
  262. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  263. package/dist/cli/commands/auth/login.d.ts +10 -10
  264. package/dist/cli/commands/auth/login.js +1 -1
  265. package/dist/cli/commands/auth/logout.d.ts +7 -7
  266. package/dist/cli/commands/auth/logout.js +1 -1
  267. package/dist/cli/commands/cache/clear.js +1 -1
  268. package/dist/cli/commands/config/autoupgrade/off.d.ts +7 -7
  269. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  270. package/dist/cli/commands/config/autoupgrade/on.d.ts +7 -7
  271. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  272. package/dist/cli/commands/config/autoupgrade/status.d.ts +7 -7
  273. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  274. package/dist/cli/commands/debug/command-flags.js +1 -1
  275. package/dist/cli/commands/doc/fetch.d.ts +21 -21
  276. package/dist/cli/commands/doc/fetch.js +1 -1
  277. package/dist/cli/commands/doc/search.d.ts +23 -23
  278. package/dist/cli/commands/doc/search.js +1 -1
  279. package/dist/cli/commands/docs/generate.js +1 -1
  280. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  281. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  282. package/dist/cli/commands/help.d.ts +90 -90
  283. package/dist/cli/commands/help.js +1 -1
  284. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  285. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  286. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  287. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  288. package/dist/cli/commands/notifications/generate.js +1 -1
  289. package/dist/cli/commands/notifications/list.js +1 -1
  290. package/dist/cli/commands/organization/list.js +1 -1
  291. package/dist/cli/commands/search.d.ts +7 -7
  292. package/dist/cli/commands/search.js +1 -1
  293. package/dist/cli/commands/send-analytics.js +1 -1
  294. package/dist/cli/commands/theme/check.js +1 -1
  295. package/dist/cli/commands/theme/console.js +1 -1
  296. package/dist/cli/commands/theme/delete.js +1 -1
  297. package/dist/cli/commands/theme/dev.js +1 -1
  298. package/dist/cli/commands/theme/duplicate.js +1 -1
  299. package/dist/cli/commands/theme/info.js +1 -1
  300. package/dist/cli/commands/theme/init.js +1 -1
  301. package/dist/cli/commands/theme/language-server.js +1 -1
  302. package/dist/cli/commands/theme/list.js +1 -1
  303. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  304. package/dist/cli/commands/theme/open.js +1 -1
  305. package/dist/cli/commands/theme/package.js +1 -1
  306. package/dist/cli/commands/theme/preview.js +1 -1
  307. package/dist/cli/commands/theme/profile.js +1 -1
  308. package/dist/cli/commands/theme/publish.js +1 -1
  309. package/dist/cli/commands/theme/pull.js +1 -1
  310. package/dist/cli/commands/theme/push.js +1 -1
  311. package/dist/cli/commands/theme/rename.js +1 -1
  312. package/dist/cli/commands/theme/share.js +1 -1
  313. package/dist/cli/commands/upgrade.d.ts +24 -24
  314. package/dist/cli/commands/upgrade.js +1 -1
  315. package/dist/cli/commands/version.d.ts +7 -7
  316. package/dist/cli/commands/version.js +1 -1
  317. package/dist/cli/help.js +1 -1
  318. package/dist/cli-version-check-BW2CUMX4.js +1 -0
  319. package/dist/{command-event-context-LFUZ7UCA.js → command-event-context-ILIANB5Q.js} +1 -1
  320. package/dist/command-json-schema-LGR44Q2G.js +1 -0
  321. package/dist/command-registry.js +1 -1
  322. package/dist/conf-store-TODPQ2LC.js +1 -0
  323. package/dist/configs/all.yml +9 -0
  324. package/dist/configs/recommended.yml +9 -0
  325. package/dist/custom-oclif-loader-BPE2TH4B.js +1 -0
  326. package/dist/data/filters.json +41 -2
  327. package/dist/data/local_block_entry.json +1 -1
  328. package/dist/data/manifest_theme.json +1 -0
  329. package/dist/data/objects.json +279 -44
  330. package/dist/data/section.json +15 -1
  331. package/dist/data/setting.json +9 -5
  332. package/dist/data/shopify_system_translations.json +312 -32
  333. package/dist/data/strict_settings.json +24 -0
  334. package/dist/data/tags.json +57 -24
  335. package/dist/data/theme_block.json +1 -1
  336. package/dist/deprecations-5CSI24TV.js +1 -0
  337. package/dist/dist-LPKYTX3M.js +1 -0
  338. package/dist/dist-WT6MPTKJ.js +1 -0
  339. package/dist/environment-5P7JJ3GI.js +1 -0
  340. package/dist/environments-3HTT5CVC.js +1 -0
  341. package/dist/error-PFOKPWFX.js +1 -0
  342. package/dist/error-handler-23FASAEU.js +1 -0
  343. package/dist/fs-RA25PWSJ.js +1 -0
  344. package/dist/hooks/did-you-mean.js +1 -1
  345. package/dist/hooks/hydrogen-init.js +1 -1
  346. package/dist/hooks/plugin-plugins.js +1 -1
  347. package/dist/hooks/postrun.js +1 -1
  348. package/dist/hooks/prerun.js +2 -2
  349. package/dist/hooks/public-metadata.js +1 -1
  350. package/dist/hooks/sensitive-metadata.js +1 -1
  351. package/dist/hooks/tunnel-provider.js +1 -1
  352. package/dist/hooks/tunnel-start.js +1 -1
  353. package/dist/http-EVDTYINS.js +1 -0
  354. package/dist/http-proxy-node16-NZZ674YW.js +38 -0
  355. package/dist/index.js +12 -12
  356. package/dist/is-global-3DNAMKUU.js +1 -0
  357. package/dist/json-error-HGCRNJRF.js +1 -0
  358. package/dist/latest-version-75YEFEMK.js +9 -0
  359. package/dist/lib-4ZA53LTZ.js +1 -0
  360. package/dist/lib-F3MES3XF.js +1 -0
  361. package/dist/lib-XPJABU24.js +1 -0
  362. package/dist/{local-OKPVB4NH.js → local-LNGPIGLG.js} +1 -1
  363. package/dist/metadata-VHLSUKCW.js +1 -0
  364. package/dist/{morph-CRY35DIK.js → morph-H7XQP55V.js} +3 -3
  365. package/dist/node-package-manager-SSFNUVWB.js +1 -0
  366. package/dist/notifications-system-3NQRYYKW.js +1 -0
  367. package/dist/{npa-A4YSCQ5Q.js → npa-LVYMN7GE.js} +1 -1
  368. package/dist/os-KIKVJONE.js +1 -0
  369. package/dist/output-DUJTSURG.js +1 -0
  370. package/dist/{prettier-EGVCP5CY.js → prettier-NOE3TJJ5.js} +1 -1
  371. package/dist/registry-auth-token-EDH77OOW.js +1 -0
  372. package/dist/registry-url-JMNV3LLX.js +1 -0
  373. package/dist/semver-HHZRKD6Y.js +1 -0
  374. package/dist/system-CGOZSROX.js +1 -0
  375. package/dist/tsconfig.tsbuildinfo +1 -1
  376. package/dist/ui-YMBFS3NG.js +1 -0
  377. package/dist/upgrade-73RRPDSC.js +1 -0
  378. package/dist/version-AMUEEBIG.js +1 -0
  379. package/dist/version-S4MGCKDO.js +1 -0
  380. package/dist/workerd-DRWNY3S4.js +18 -0
  381. package/oclif.manifest.json +25618 -1167
  382. package/package.json +7 -7
  383. package/dist/analytics-NMMVOF4B.js +0 -1
  384. package/dist/analytics-UK77WNLG.js +0 -1
  385. package/dist/chunk-224UPIYS.js +0 -4
  386. package/dist/chunk-27NXPOAS.js +0 -1
  387. package/dist/chunk-2MT3LSMZ.js +0 -1
  388. package/dist/chunk-2T4HDR6R.js +0 -70
  389. package/dist/chunk-2ZBXHCQZ.js +0 -1
  390. package/dist/chunk-335BUVBP.js +0 -1
  391. package/dist/chunk-33ZE3DRQ.js +0 -16
  392. package/dist/chunk-34MOWGRL.js +0 -1
  393. package/dist/chunk-3JSKNXL7.js +0 -1
  394. package/dist/chunk-3MG4MTWQ.js +0 -1
  395. package/dist/chunk-3XRI3D44.js +0 -1
  396. package/dist/chunk-43R5VGKT.js +0 -1
  397. package/dist/chunk-4WYKPIN3.js +0 -1
  398. package/dist/chunk-5AEZJZNQ.js +0 -1
  399. package/dist/chunk-5ED7SOQZ.js +0 -20
  400. package/dist/chunk-5IDJALJH.js +0 -1
  401. package/dist/chunk-66TMIQMB.js +0 -1
  402. package/dist/chunk-74NRFUGQ.js +0 -1
  403. package/dist/chunk-7GUMJ5E4.js +0 -1
  404. package/dist/chunk-7NFTSBHQ.js +0 -10
  405. package/dist/chunk-ACZNWIRY.js +0 -1
  406. package/dist/chunk-AUE7LM32.js +0 -1
  407. package/dist/chunk-AXL2VIWA.js +0 -16
  408. package/dist/chunk-B3ZJGYZY.js +0 -3
  409. package/dist/chunk-BOAGJ6P5.js +0 -1
  410. package/dist/chunk-BWN2QG6D.js +0 -5
  411. package/dist/chunk-CCUQM4FX.js +0 -6
  412. package/dist/chunk-CLUUA3HX.js +0 -3
  413. package/dist/chunk-CYEEGTVZ.js +0 -11
  414. package/dist/chunk-DBDTE3EE.js +0 -5
  415. package/dist/chunk-DLVB3237.js +0 -31
  416. package/dist/chunk-DN6X7SHW.js +0 -2
  417. package/dist/chunk-E5COIKGY.js +0 -5
  418. package/dist/chunk-E6RONHMT.js +0 -1
  419. package/dist/chunk-EAZIQI2D.js +0 -1
  420. package/dist/chunk-EEY4FKAW.js +0 -1
  421. package/dist/chunk-EKFPTBXC.js +0 -1
  422. package/dist/chunk-F3CK3EJJ.js +0 -1
  423. package/dist/chunk-FEBOZ2XX.js +0 -31
  424. package/dist/chunk-FFSDGRAN.js +0 -1
  425. package/dist/chunk-FZCGRIOM.js +0 -1
  426. package/dist/chunk-GNCVDN7U.js +0 -1
  427. package/dist/chunk-GQLNG537.js +0 -836
  428. package/dist/chunk-GVI3DWSB.js +0 -4
  429. package/dist/chunk-GW7YIJPJ.js +0 -5
  430. package/dist/chunk-H6GYBLVQ.js +0 -2
  431. package/dist/chunk-HB3MJYBK.js +0 -1
  432. package/dist/chunk-HSKDFEXW.js +0 -1
  433. package/dist/chunk-HTRJU4R4.js +0 -1
  434. package/dist/chunk-I7PEEJVH.js +0 -1
  435. package/dist/chunk-IHMATNOR.js +0 -1
  436. package/dist/chunk-IJY3RJPJ.js +0 -47
  437. package/dist/chunk-J3JPJCWP.js +0 -1
  438. package/dist/chunk-J55GQLP4.js +0 -1
  439. package/dist/chunk-JLQRDFR5.js +0 -18
  440. package/dist/chunk-JPWRZ5SL.js +0 -16
  441. package/dist/chunk-K7ZSPQKL.js +0 -4
  442. package/dist/chunk-L5TSPCSY.js +0 -26
  443. package/dist/chunk-LUGMXSRI.js +0 -9
  444. package/dist/chunk-M2CWCOFU.js +0 -11
  445. package/dist/chunk-M5VIFG2V.js +0 -1
  446. package/dist/chunk-MADINS4Z.js +0 -1
  447. package/dist/chunk-MGHPF7HU.js +0 -6
  448. package/dist/chunk-MHR5OHT5.js +0 -10
  449. package/dist/chunk-MXEXP3HT.js +0 -15
  450. package/dist/chunk-OJULL7HT.js +0 -1
  451. package/dist/chunk-OMPQ7REW.js +0 -3
  452. package/dist/chunk-OR4IJ4BQ.js +0 -1
  453. package/dist/chunk-P2RMFHQP.js +0 -1
  454. package/dist/chunk-P4VZYOKO.js +0 -15
  455. package/dist/chunk-PDZBKVWL.js +0 -97
  456. package/dist/chunk-Q2KWXZQB.js +0 -12
  457. package/dist/chunk-QFSENE5T.js +0 -3
  458. package/dist/chunk-QFWWCZOI.js +0 -1
  459. package/dist/chunk-QFYLJVJW.js +0 -77
  460. package/dist/chunk-QQJNQNKP.js +0 -6
  461. package/dist/chunk-R4UVIYZP.js +0 -4
  462. package/dist/chunk-RLNIOJH3.js +0 -272
  463. package/dist/chunk-RW6G4ZPU.js +0 -1
  464. package/dist/chunk-S4LOWCGS.js +0 -1
  465. package/dist/chunk-SB27UOXX.js +0 -1
  466. package/dist/chunk-SHD4VV5V.js +0 -3
  467. package/dist/chunk-SK7EPN6C.js +0 -1
  468. package/dist/chunk-TAWCKJKP.js +0 -1
  469. package/dist/chunk-U2T5HPRD.js +0 -319
  470. package/dist/chunk-U6YOP562.js +0 -1
  471. package/dist/chunk-UPPO3BMT.js +0 -7
  472. package/dist/chunk-USXIXANP.js +0 -103
  473. package/dist/chunk-UV5GAGAD.js +0 -1
  474. package/dist/chunk-UY6W2EVZ.js +0 -1
  475. package/dist/chunk-UYELAINQ.js +0 -16
  476. package/dist/chunk-V75WUEFU.js +0 -1
  477. package/dist/chunk-VAVXDIUX.js +0 -6
  478. package/dist/chunk-VGSH52JM.js +0 -1
  479. package/dist/chunk-VHZ6RL67.js +0 -1
  480. package/dist/chunk-VQA3X7O3.js +0 -1
  481. package/dist/chunk-VZCMJRYV.js +0 -1
  482. package/dist/chunk-W56ZGEQQ.js +0 -2265
  483. package/dist/chunk-WCC52MR2.js +0 -1
  484. package/dist/chunk-WSDKCQH6.js +0 -6
  485. package/dist/chunk-X2PFXSU4.js +0 -1
  486. package/dist/chunk-X5NIAZA4.js +0 -1
  487. package/dist/chunk-XBMD3FEZ.js +0 -3
  488. package/dist/chunk-XDVPIGXE.js +0 -2
  489. package/dist/chunk-XLIJYJ6Q.js +0 -1
  490. package/dist/chunk-XUHGWIWW.js +0 -4
  491. package/dist/chunk-Y5CVX5LJ.js +0 -1
  492. package/dist/chunk-Y6J46XYF.js +0 -3
  493. package/dist/chunk-YKMINHYY.js +0 -3
  494. package/dist/chunk-ZDQO6CNY.js +0 -1
  495. package/dist/chunk-ZGASBRSQ.js +0 -5
  496. package/dist/chunk-ZGBTO46A.js +0 -1
  497. package/dist/chunk-ZJOX5HW4.js +0 -22
  498. package/dist/chunk-ZOOT3GBY.js +0 -5
  499. package/dist/command-json-schema-F5XF7XHL.js +0 -1
  500. package/dist/conf-store-5CBLWTOC.js +0 -1
  501. package/dist/custom-oclif-loader-UDVUFKMD.js +0 -1
  502. package/dist/deprecations-EOHPSTCS.js +0 -1
  503. package/dist/dist-RNV3GFZ7.js +0 -1
  504. package/dist/dist-ZFKWJVNB.js +0 -1
  505. package/dist/environment-O7ECODHU.js +0 -1
  506. package/dist/environments-4FLRZW4P.js +0 -1
  507. package/dist/error-JY2ADS6S.js +0 -1
  508. package/dist/error-handler-4GCXKC6I.js +0 -1
  509. package/dist/fs-XS5YF34R.js +0 -1
  510. package/dist/http-proxy-node16-D3JUYA5D.js +0 -38
  511. package/dist/is-global-27MUENOK.js +0 -1
  512. package/dist/json-error-S5XFS3UX.js +0 -1
  513. package/dist/latest-version-LDWU5F7A.js +0 -49
  514. package/dist/lib-PJHT4MKY.js +0 -1
  515. package/dist/lib-VKSQ65BQ.js +0 -1
  516. package/dist/lib-YEZOHXF3.js +0 -1
  517. package/dist/metadata-2YJBAKR7.js +0 -1
  518. package/dist/node-package-manager-B3OW3PFQ.js +0 -1
  519. package/dist/notifications-system-BWTDYBG2.js +0 -1
  520. package/dist/os-F6QKJCFW.js +0 -1
  521. package/dist/output-BRIPK7UC.js +0 -1
  522. package/dist/system-466QKFDI.js +0 -1
  523. package/dist/ui-VJTNGCS6.js +0 -1
  524. package/dist/upgrade-VHVJLXKX.js +0 -1
  525. package/dist/version-FETZRLZO.js +0 -1
  526. package/dist/version-T4XXTJMB.js +0 -1
  527. package/dist/workerd-32DMKLMN.js +0 -18
  528. /package/dist/{chunk-YLQ3LNNY.js → chunk-HVECVOIO.js} +0 -0
  529. /package/dist/{chunk-YRHFPXC3.js → chunk-Z2AV4BWZ.js} +0 -0
@@ -1,272 +0,0 @@
1
- import{a as tx}from"./chunk-IWOTLFOY.js";import{a as b$}from"./chunk-FFSDGRAN.js";import{Aa as ex,d as Zw,za as v$}from"./chunk-GQLNG537.js";import{l as Xw}from"./chunk-QFYLJVJW.js";import{a as oe,b as we,c as x,d as Oy,e as Ia,f as Py,g as p}from"./chunk-VKWPEFWQ.js";var qy=x(Ny=>{"use strict";p();Object.defineProperty(Ny,"__esModule",{value:!0});Ny.deepGet=k$;function k$(e,t){return t.reduce((r,n)=>r?.[n],e)}});var rx=x(fs=>{"use strict";p();Object.defineProperty(fs,"__esModule",{value:!0});fs.first=S$;fs.last=T$;fs.findLast=w$;fs.findLastIndex=Ly;fs.findLastAndIndex=x$;function S$(e){return e[0]}function T$(e,t=0){return e[e.length-1+t]}function w$(e,t){return e[Ly(e,t)]}function Ly(e,t){for(let r=e.length-1;r>=0;r--)if(t(e[r]))return r;return-1}function x$(e,t){let r=Ly(e,t);return[e[r],r]}});var Cy=x((Ope,nx)=>{p();var E$={}.toString;nx.exports=Array.isArray||function(e){return E$.call(e)=="[object Array]"}});var sx=x((Npe,ix)=>{"use strict";p();var A$=Cy();ix.exports=function(t){return t!=null&&typeof t=="object"&&A$(t)===!1}});var Iy=x((Cpe,ax)=>{"use strict";p();var O$=Cy(),P$=sx(),Lpe=Array.prototype.slice;ax.exports=Ma;function Ma(e,t){if(!(this instanceof Ma))return typeof t=="number"?new Ma(e).fromIndex(t):new Ma(e,t);this.str=e||"",this.lineToIndex=N$(this.str),t=t||{},this.origin=typeof t.origin>"u"?1:t.origin}Ma.prototype.fromIndex=function(e){if(e<0||e>=this.str.length||isNaN(e))return null;var t=q$(e,this.lineToIndex);return{line:t+this.origin,col:e-this.lineToIndex[t]+this.origin}};Ma.prototype.toIndex=function(e,t){if(typeof t>"u")return O$(e)&&e.length>=2?this.toIndex(e[0],e[1]):P$(e)&&"line"in e&&("col"in e||"column"in e)?this.toIndex(e.line,"col"in e?e.col:e.column):-1;if(isNaN(e)||isNaN(t))return-1;if(e-=this.origin,t-=this.origin,e>=0&&t>=0&&e<this.lineToIndex.length){var r=this.lineToIndex[e],n=e===this.lineToIndex.length-1?this.str.length:this.lineToIndex[e+1];if(t<n-r)return r+t}return-1};function N$(e){for(var t=e.split(`
2
- `),r=new Array(t.length),n=0,i=0,s=t.length;i<s;i++)r[i]=n,n+=t[i].length+1;return r}function q$(e,t){if(e>=t[t.length-1])return t.length-1;for(var r=0,n=t.length-2,i;r<n;)if(i=r+(n-r>>1),e<t[i])n=i-1;else if(e>=t[i+1])r=i+1;else{r=i;break}return r}});var cx=x(Ra=>{"use strict";p();var L$=Ra&&Ra.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ra,"__esModule",{value:!0});Ra.getPosition=C$;Ra.getOffset=I$;var ox=L$(Iy());function C$(e,t){let r=(0,ox.default)(e,{origin:0}).fromIndex(Math.min(t,e.length-1));return{index:t,line:r?r.line:-1,character:r?r.col:-1}}function I$(e,t,r){return(0,ox.default)(e,{origin:1}).toIndex(t,r)}});var df=x(pf=>{"use strict";p();Object.defineProperty(pf,"__esModule",{value:!0});pf.isError=R$;pf.asError=D$;var M$={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 R$(e){return e instanceof Error}function D$(e){return e instanceof Error?e:typeof e=="string"?new Error(e):e&&typeof e=="object"&&"error"in e?new Error(j$(e)):e&&typeof e.toString=="function"?new Error(e.toString()):new Error("An unknown error occurred")}function j$(e){return M$[e.error]||"Unknown parse error."}});var Ry=x(My=>{"use strict";p();Object.defineProperty(My,"__esModule",{value:!0});My.assertNever=F$;function F$(e){throw new Error(`We should never reach this code, you are missing a case for ${e}`)}});var jy=x(hf=>{"use strict";p();Object.defineProperty(hf,"__esModule",{value:!0});hf.memo=B$;hf.memoize=V$;var Dy=Symbol("Unset");function B$(e){let t=Dy,r=(...n)=>(t===Dy&&(t=e(...n)),t);return r.clearCache=()=>{t=Dy},r}function V$(e,t){let r={},n=(...i)=>{let s=t(...i);return r[s]||(r[s]=e(...i)),r[s]};return n.force=(...i)=>(n.invalidate(...i),n(...i)),n.invalidate=(...i)=>{let s=t(...i);delete r[s]},n.clearCache=()=>{r={}},n}});var By=x(Fy=>{"use strict";p();Object.defineProperty(Fy,"__esModule",{value:!0});Fy.indexBy=$$;function $$(e,t){let r={};for(let n of t)r[e(n)]=n;return r}});function ps(e,t=!1){let r=e.length,n=0,i="",s=0,a=16,o=0,c=0,l=0,f=0,m=0;function d(T,y){let A=0,O=0;for(;A<T||!y;){let P=e.charCodeAt(n);if(P>=48&&P<=57)O=O*16+P-48;else if(P>=65&&P<=70)O=O*16+P-65+10;else if(P>=97&&P<=102)O=O*16+P-97+10;else break;n++,A++}return A<T&&(O=-1),O}function g(T){n=T,i="",s=0,a=16,m=0}function v(){let T=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&Da(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&Da(e.charCodeAt(n)))for(n++;n<e.length&&Da(e.charCodeAt(n));)n++;else return m=3,e.substring(T,n);let y=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&Da(e.charCodeAt(n))){for(n++;n<e.length&&Da(e.charCodeAt(n));)n++;y=n}else m=3;return e.substring(T,y)}function b(){let T="",y=n;for(;;){if(n>=r){T+=e.substring(y,n),m=2;break}let A=e.charCodeAt(n);if(A===34){T+=e.substring(y,n),n++;break}if(A===92){if(T+=e.substring(y,n),n++,n>=r){m=2;break}switch(e.charCodeAt(n++)){case 34:T+='"';break;case 92:T+="\\";break;case 47:T+="/";break;case 98:T+="\b";break;case 102:T+="\f";break;case 110:T+=`
3
- `;break;case 114:T+="\r";break;case 116:T+=" ";break;case 117:let P=d(4,!0);P>=0?T+=String.fromCharCode(P):m=4;break;default:m=5}y=n;continue}if(A>=0&&A<=31)if(xc(A)){T+=e.substring(y,n),m=2;break}else m=6;n++}return T}function _(){if(i="",m=0,s=n,c=o,f=l,n>=r)return s=r,a=17;let T=e.charCodeAt(n);if(Vy(T)){do n++,i+=String.fromCharCode(T),T=e.charCodeAt(n);while(Vy(T));return a=15}if(xc(T))return n++,i+=String.fromCharCode(T),T===13&&e.charCodeAt(n)===10&&(n++,i+=`
4
- `),o++,l=n,a=14;switch(T){case 123:return n++,a=1;case 125:return n++,a=2;case 91:return n++,a=3;case 93:return n++,a=4;case 58:return n++,a=6;case 44:return n++,a=5;case 34:return n++,i=b(),a=10;case 47:let y=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<r&&!xc(e.charCodeAt(n));)n++;return i=e.substring(y,n),a=12}if(e.charCodeAt(n+1)===42){n+=2;let A=r-1,O=!1;for(;n<A;){let P=e.charCodeAt(n);if(P===42&&e.charCodeAt(n+1)===47){n+=2,O=!0;break}n++,xc(P)&&(P===13&&e.charCodeAt(n)===10&&n++,o++,l=n)}return O||(n++,m=1),i=e.substring(y,n),a=13}return i+=String.fromCharCode(T),n++,a=16;case 45:if(i+=String.fromCharCode(T),n++,n===r||!Da(e.charCodeAt(n)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=v(),a=11;default:for(;n<r&&k(T);)n++,T=e.charCodeAt(n);if(s!==n){switch(i=e.substring(s,n),i){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return i+=String.fromCharCode(T),n++,a=16}}function k(T){if(Vy(T)||xc(T))return!1;switch(T){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function w(){let T;do T=_();while(T>=12&&T<=15);return T}return{setPosition:g,getPosition:()=>n,scan:t?w:_,getToken:()=>a,getTokenValue:()=>i,getTokenOffset:()=>s,getTokenLength:()=>n-s,getTokenStartLine:()=>c,getTokenStartCharacter:()=>s-f,getTokenError:()=>m}}function Vy(e){return e===32||e===9}function xc(e){return e===10||e===13}function Da(e){return e>=48&&e<=57}var ux,mf=we(()=>{"use strict";p();(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(ux||(ux={}))});var ur,ja,$y,lx,fx=we(()=>{p();ur=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),ja=200,$y={" ":{"\n":new Array(ja).fill(0).map((e,t)=>`
5
- `+" ".repeat(t)),"\r":new Array(ja).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(ja).fill(0).map((e,t)=>`\r
6
- `+" ".repeat(t))}," ":{"\n":new Array(ja).fill(0).map((e,t)=>`
7
- `+" ".repeat(t)),"\r":new Array(ja).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(ja).fill(0).map((e,t)=>`\r
8
- `+" ".repeat(t))}},lx=[`
9
- `,"\r",`\r
10
- `]});function gf(e,t,r){let n,i,s,a,o;if(t){for(a=t.offset,o=a+t.length,s=a;s>0&&!Ec(e,s-1);)s--;let A=o;for(;A<e.length&&!Ec(e,A);)A++;i=e.substring(s,A),n=H$(i,r)}else i=e,n=0,s=0,a=0,o=e.length;let c=z$(r,e),l=lx.includes(c),f=0,m=0,d;r.insertSpaces?d=ur[r.tabSize||4]??Fa(ur[1],r.tabSize||4):d=" ";let g=d===" "?" ":" ",v=ps(i,!1),b=!1;function _(){if(f>1)return Fa(c,f)+Fa(d,n+m);let A=d.length*(n+m);return!l||A>$y[g][c].length?c+Fa(d,n+m):A<=0?c:$y[g][c][A]}function k(){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 b=A===16||v.getTokenError()!==0,A}let w=[];function T(A,O,P){!b&&(!t||O<o&&P>a)&&e.substring(O,P)!==A&&w.push({offset:O,length:P-O,content:A})}let y=k();if(r.keepLines&&f>0&&T(Fa(c,f),0,0),y!==17){let A=v.getTokenOffset()+s,O=d.length*n<20&&r.insertSpaces?ur[d.length*n]:Fa(d,n);T(O,s,A)}for(;y!==17;){let A=v.getTokenOffset()+v.getTokenLength()+s,O=k(),P="",q=!1;for(;f===0&&(O===12||O===13);){let M=v.getTokenOffset()+s;T(ur[1],A,M),A=v.getTokenOffset()+v.getTokenLength()+s,q=O===12,P=q?_():"",O=k()}if(O===2)y!==1&&m--,r.keepLines&&f>0||!r.keepLines&&y!==1?P=_():r.keepLines&&(P=ur[1]);else if(O===4)y!==3&&m--,r.keepLines&&f>0||!r.keepLines&&y!==3?P=_():r.keepLines&&(P=ur[1]);else{switch(y){case 3:case 1:m++,r.keepLines&&f>0||!r.keepLines?P=_():P=ur[1];break;case 5:r.keepLines&&f>0||!r.keepLines?P=_():P=ur[1];break;case 12:P=_();break;case 13:f>0?P=_():q||(P=ur[1]);break;case 6:r.keepLines&&f>0?P=_():q||(P=ur[1]);break;case 10:r.keepLines&&f>0?P=_():O===6&&!q&&(P="");break;case 7:case 8:case 9:case 11:case 2:case 4:r.keepLines&&f>0?P=_():(O===12||O===13)&&!q?P=ur[1]:O!==5&&O!==17&&(b=!0);break;case 16:b=!0;break}f>0&&(O===12||O===13)&&(P=_())}O===17&&(r.keepLines&&f>0?P=_():P=r.insertFinalNewline?c:"");let B=v.getTokenOffset()+s;T(P,A,B),y=O}return w}function Fa(e,t){let r="";for(let n=0;n<t;n++)r+=e;return r}function H$(e,t){let r=0,n=0,i=t.tabSize||4;for(;r<e.length;){let s=e.charAt(r);if(s===ur[1])n++;else if(s===" ")n+=i;else break;r++}return Math.floor(n/i)}function z$(e,t){for(let r=0;r<t.length;r++){let n=t.charAt(r);if(n==="\r")return r+1<t.length&&t.charAt(r+1)===`
11
- `?`\r
12
- `:"\r";if(n===`
13
- `)return`
14
- `}return e&&e.eol||`
15
- `}function Ec(e,t){return`\r
16
- `.indexOf(e.charAt(t))!==-1}var Uy=we(()=>{"use strict";p();mf();fx()});function px(e,t){let r=[],n=new Object,i,s={value:{},offset:0,length:0,type:"object",parent:void 0},a=!1;function o(c,l,f,m){s.value=c,s.offset=l,s.length=f,s.type=m,s.colonOffset=void 0,i=s}try{Pc(e,{onObjectBegin:(c,l)=>{if(t<=c)throw n;i=void 0,a=t>c,r.push("")},onObjectProperty:(c,l,f)=>{if(t<l||(o(c,l,f,"property"),r[r.length-1]=c,t<=l+f))throw n},onObjectEnd:(c,l)=>{if(t<=c)throw n;i=void 0,r.pop()},onArrayBegin:(c,l)=>{if(t<=c)throw n;i=void 0,r.push(0)},onArrayEnd:(c,l)=>{if(t<=c)throw n;i=void 0,r.pop()},onLiteralValue:(c,l,f)=>{if(t<l||(o(c,l,f,mx(c)),t<=l+f))throw n},onSeparator:(c,l,f)=>{if(t<=l)throw n;if(c===":"&&i&&i.type==="property")i.colonOffset=l,a=!1,i=void 0;else if(c===","){let m=r[r.length-1];typeof m=="number"?r[r.length-1]=m+1:(a=!0,r[r.length-1]=""),i=void 0}}})}catch(c){if(c!==n)throw c}return{path:r,previousNode:i,isAtPropertyKey:a,matches:c=>{let l=0;for(let f=0;l<c.length&&f<r.length;f++)if(c[l]===r[f]||c[l]==="*")l++;else if(c[l]!=="**")return!1;return l===c.length}}}function dx(e,t=[],r=Ac.DEFAULT){let n=null,i=[],s=[];function a(c){Array.isArray(i)?i.push(c):n!==null&&(i[n]=c)}return Pc(e,{onObjectBegin:()=>{let c={};a(c),s.push(i),i=c,n=null},onObjectProperty:c=>{n=c},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{let c=[];a(c),s.push(i),i=c,n=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:a,onError:(c,l,f)=>{t.push({error:c,offset:l,length:f})}},r),i[0]}function _f(e,t=[],r=Ac.DEFAULT){let n={type:"array",offset:-1,length:-1,children:[],parent:void 0};function i(c){n.type==="property"&&(n.length=c-n.offset,n=n.parent)}function s(c){return n.children.push(c),c}Pc(e,{onObjectBegin:c=>{n=s({type:"object",offset:c,length:-1,parent:n,children:[]})},onObjectProperty:(c,l,f)=>{n=s({type:"property",offset:l,length:-1,parent:n,children:[]}),n.children.push({type:"string",value:c,offset:l,length:f,parent:n})},onObjectEnd:(c,l)=>{i(c+l),n.length=c+l-n.offset,n=n.parent,i(c+l)},onArrayBegin:(c,l)=>{n=s({type:"array",offset:c,length:-1,parent:n,children:[]})},onArrayEnd:(c,l)=>{n.length=c+l-n.offset,n=n.parent,i(c+l)},onLiteralValue:(c,l,f)=>{s({type:mx(c),offset:l,length:f,parent:n,value:c}),i(l+f)},onSeparator:(c,l,f)=>{n.type==="property"&&(c===":"?n.colonOffset=l:c===","&&i(l))},onError:(c,l,f)=>{t.push({error:c,offset:l,length:f})}},r);let o=n.children[0];return o&&delete o.parent,o}function Oc(e,t){if(!e)return;let r=e;for(let n of t)if(typeof n=="string"){if(r.type!=="object"||!Array.isArray(r.children))return;let i=!1;for(let s of r.children)if(Array.isArray(s.children)&&s.children[0].value===n&&s.children.length===2){r=s.children[1],i=!0;break}if(!i)return}else{let i=n;if(r.type!=="array"||i<0||!Array.isArray(r.children)||i>=r.children.length)return;r=r.children[i]}return r}function Hy(e){if(!e.parent||!e.parent.children)return[];let t=Hy(e.parent);if(e.parent.type==="property"){let r=e.parent.children[0].value;t.push(r)}else if(e.parent.type==="array"){let r=e.parent.children.indexOf(e);r!==-1&&t.push(r)}return t}function yf(e){switch(e.type){case"array":return e.children.map(yf);case"object":let t=Object.create(null);for(let r of e.children){let n=r.children[1];n&&(t[r.children[0].value]=yf(n))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function G$(e,t,r=!1){return t>=e.offset&&t<e.offset+e.length||r&&t===e.offset+e.length}function zy(e,t,r=!1){if(G$(e,t,r)){let n=e.children;if(Array.isArray(n))for(let i=0;i<n.length&&n[i].offset<=t;i++){let s=zy(n[i],t,r);if(s)return s}return e}}function Pc(e,t,r=Ac.DEFAULT){let n=ps(e,!1),i=[],s=0;function a(V){return V?()=>s===0&&V(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function o(V){return V?I=>s===0&&V(I,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function c(V){return V?I=>s===0&&V(I,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice()):()=>!0}function l(V){return V?()=>{s>0?s++:V(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice())===!1&&(s=1)}:()=>!0}function f(V){return V?()=>{s>0&&s--,s===0&&V(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:()=>!0}let m=l(t.onObjectBegin),d=c(t.onObjectProperty),g=f(t.onObjectEnd),v=l(t.onArrayBegin),b=f(t.onArrayEnd),_=c(t.onLiteralValue),k=o(t.onSeparator),w=a(t.onComment),T=o(t.onError),y=r&&r.disallowComments,A=r&&r.allowTrailingComma;function O(){for(;;){let V=n.scan();switch(n.getTokenError()){case 4:P(14);break;case 5:P(15);break;case 3:P(13);break;case 1:y||P(11);break;case 2:P(12);break;case 6:P(16);break}switch(V){case 12:case 13:y?P(10):w();break;case 16:P(1);break;case 15:case 14:break;default:return V}}}function P(V,I=[],F=[]){if(T(V),I.length+F.length>0){let U=n.getToken();for(;U!==17;){if(I.indexOf(U)!==-1){O();break}else if(F.indexOf(U)!==-1)break;U=O()}}}function q(V){let I=n.getTokenValue();return V?_(I):(d(I),i.push(I)),O(),!0}function B(){switch(n.getToken()){case 11:let V=n.getTokenValue(),I=Number(V);isNaN(I)&&(P(2),I=0),_(I);break;case 7:_(null);break;case 8:_(!0);break;case 9:_(!1);break;default:return!1}return O(),!0}function M(){return n.getToken()!==10?(P(3,[],[2,5]),!1):(q(!1),n.getToken()===6?(k(":"),O(),$()||P(4,[],[2,5])):P(5,[],[2,5]),i.pop(),!0)}function L(){m(),O();let V=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(V||P(4,[],[]),k(","),O(),n.getToken()===2&&A)break}else V&&P(6,[],[]);M()||P(4,[],[2,5]),V=!0}return g(),n.getToken()!==2?P(7,[2],[]):O(),!0}function C(){v(),O();let V=!0,I=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(I||P(4,[],[]),k(","),O(),n.getToken()===4&&A)break}else I&&P(6,[],[]);V?(i.push(0),V=!1):i[i.length-1]++,$()||P(4,[],[4,5]),I=!0}return b(),V||i.pop(),n.getToken()!==4?P(8,[4],[]):O(),!0}function $(){switch(n.getToken()){case 3:return C();case 1:return L();case 10:return q(!0);default:return B()}}return O(),n.getToken()===17?r.allowEmptyContent?!0:(P(4,[],[]),!1):$()?(n.getToken()!==17&&P(9,[],[]),!0):(P(4,[],[]),!1)}function hx(e,t){let r=ps(e),n=[],i,s=0,a;do switch(a=r.getPosition(),i=r.scan(),i){case 12:case 13:case 17:s!==a&&n.push(e.substring(s,a)),t!==void 0&&n.push(r.getTokenValue().replace(/[^\r\n]/g,t)),s=r.getPosition();break}while(i!==17);return n.join("")}function mx(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(e){if(Array.isArray(e))return"array"}else return"null";return"object"}default:return"null"}}var Ac,Wy=we(()=>{"use strict";p();mf();(function(e){e.DEFAULT={allowTrailingComma:!1}})(Ac||(Ac={}))});function gx(e,t,r,n){let i=t.slice(),a=_f(e,[]),o,c;for(;i.length>0&&(c=i.pop(),o=Oc(a,i),o===void 0&&r!==void 0);)typeof c=="string"?r={[c]:r}:r=[r];if(o)if(o.type==="object"&&typeof c=="string"&&Array.isArray(o.children)){let l=Oc(o,[c]);if(l!==void 0)if(r===void 0){if(!l.parent)throw new Error("Malformed AST");let f=o.children.indexOf(l.parent),m,d=l.parent.offset+l.parent.length;if(f>0){let g=o.children[f-1];m=g.offset+g.length}else m=o.offset+1,o.children.length>1&&(d=o.children[1].offset);return ds(e,{offset:m,length:d-m,content:""},n)}else return ds(e,{offset:l.offset,length:l.length,content:JSON.stringify(r)},n);else{if(r===void 0)return[];let f=`${JSON.stringify(c)}: ${JSON.stringify(r)}`,m=n.getInsertionIndex?n.getInsertionIndex(o.children.map(g=>g.children[0].value)):o.children.length,d;if(m>0){let g=o.children[m-1];d={offset:g.offset+g.length,length:0,content:","+f}}else o.children.length===0?d={offset:o.offset+1,length:0,content:f}:d={offset:o.offset+1,length:0,content:f+","};return ds(e,d,n)}}else if(o.type==="array"&&typeof c=="number"&&Array.isArray(o.children)){let l=c;if(l===-1){let f=`${JSON.stringify(r)}`,m;if(o.children.length===0)m={offset:o.offset+1,length:0,content:f};else{let d=o.children[o.children.length-1];m={offset:d.offset+d.length,length:0,content:","+f}}return ds(e,m,n)}else if(r===void 0&&o.children.length>=0){let f=c,m=o.children[f],d;if(o.children.length===1)d={offset:o.offset+1,length:o.length-2,content:""};else if(o.children.length-1===f){let g=o.children[f-1],v=g.offset+g.length,b=o.offset+o.length;d={offset:v,length:b-2-v,content:""}}else d={offset:m.offset,length:o.children[f+1].offset-m.offset,content:""};return ds(e,d,n)}else if(r!==void 0){let f,m=`${JSON.stringify(r)}`;if(!n.isArrayInsertion&&o.children.length>c){let d=o.children[c];f={offset:d.offset,length:d.length,content:m}}else if(o.children.length===0||c===0)f={offset:o.offset+1,length:0,content:o.children.length===0?m:m+","};else{let d=c>o.children.length?o.children.length:c,g=o.children[d-1];f={offset:g.offset+g.length,length:0,content:","+m}}return ds(e,f,n)}else throw new Error(`Can not ${r===void 0?"remove":n.isArrayInsertion?"insert":"modify"} Array index ${l} as length is not sufficient`)}else throw new Error(`Can not add ${typeof c!="number"?"index":"property"} to parent of type ${o.type}`);else{if(r===void 0)throw new Error("Can not delete in empty document");return ds(e,{offset:a?a.offset:0,length:a?a.length:0,content:JSON.stringify(r)},n)}}function ds(e,t,r){if(!r.formattingOptions)return[t];let n=vf(e,t),i=t.offset,s=t.offset+t.content.length;if(t.length===0||t.content.length===0){for(;i>0&&!Ec(n,i-1);)i--;for(;s<n.length&&!Ec(n,s);)s++}let a=gf(n,{offset:i,length:s-i},{...r.formattingOptions,keepLines:!1});for(let c=a.length-1;c>=0;c--){let l=a[c];n=vf(n,l),i=Math.min(i,l.offset),s=Math.max(s,l.offset+l.length),s+=l.content.length-l.length}let o=e.length-(n.length-s)-i;return[{offset:i,length:o,content:n.substring(i,s)}]}function vf(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}var yx=we(()=>{"use strict";p();Uy();Wy()});var Ba={};Oy(Ba,{ParseErrorCode:()=>Ky,ScanError:()=>Gy,SyntaxKind:()=>Jy,applyEdits:()=>n3,createScanner:()=>lr,findNodeAtLocation:()=>X$,findNodeAtOffset:()=>Qy,format:()=>e_,getLocation:()=>Y$,getNodePath:()=>Xy,getNodeValue:()=>Zy,modify:()=>r3,parse:()=>Yy,parseTree:()=>Q$,printParseErrorCode:()=>t3,stripComments:()=>e3,visit:()=>Z$});function t3(e){switch(e){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 e_(e,t,r){return gf(e,t,r)}function r3(e,t,r,n){return gx(e,t,r,n)}function n3(e,t){let r=t.slice(0).sort((i,s)=>{let a=i.offset-s.offset;return a===0?i.length-s.length:a}),n=e.length;for(let i=r.length-1;i>=0;i--){let s=r[i];if(s.offset+s.length<=n)e=vf(e,s);else throw new Error("Overlapping edit");n=s.offset}return e}var lr,Gy,Jy,Y$,Yy,Q$,X$,Qy,Xy,Zy,Z$,e3,Ky,mn=we(()=>{"use strict";p();Uy();yx();mf();Wy();lr=ps;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(Gy||(Gy={}));(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(Jy||(Jy={}));Y$=px,Yy=dx,Q$=_f,X$=Oc,Qy=zy,Xy=Hy,Zy=yf,Z$=Pc,e3=hx;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(Ky||(Ky={}))});var He=x(Va=>{"use strict";p();Object.defineProperty(Va,"__esModule",{value:!0});Va.parseJSON=o3;Va.nodeAtPath=c3;Va.getLocStart=u3;Va.getLocEnd=l3;var i3=(mn(),Py(Ba)),s3=Ae(),a3={disallowComments:!1,allowTrailingComma:!0,allowEmptyContent:!1};function o3(e,t,r){try{let n=[],i=(0,i3.parse)(e,n,a3);if(n.length&&r)throw n[0];return i}catch(n){return t!==void 0?t:(0,s3.asError)(n)}}function c3(e,t){return t.reduce((r,n)=>{if(r)switch(r.type){case"Object":{let i=r.children.find(s=>s.key.value===n);return i?i.value:void 0}case"Array":return r.children[n];case"Literal":return;case"Identifier":return;case"Property":return}},e)}function u3(e){return e.loc?.start.offset??0}function l3(e){return e.loc?.end.offset??0}});var vx=x((hs,_x)=>{p();var Nc=Zw(),f3=Nc.default||Nc,bf=function(e,t){return/^\/\//.test(e)&&(e="https:"+e),f3.call(this,e,t)};bf.ponyfill=!0;_x.exports=hs=bf;hs.fetch=bf;hs.Headers=Nc.Headers;hs.Request=Nc.Request;hs.Response=Nc.Response;hs.default=bf});var Hr=x(ms=>{"use strict";p();Object.defineProperty(ms,"__esModule",{value:!0});ms.doesFileExist=bx;ms.doesFileExceedThreshold=kx;ms.getFileSize=Sx;ms.hasRemoteAssetSizeExceededThreshold=d3;ms.hasLocalAssetSizeExceededThreshold=h3;var p3=vx();async function bx(e,t){let r=e.toUri(t);return await e.fileExists(r)}async function kx(e,t,r){let n=e.toUri(t);if(!e.fileSize)return[!1,0];let i=await e.fileSize(n);return[i>r,i]}async function Sx(e){try{let t=await(0,p3.fetch)(e,{method:"HEAD"});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);let r=t.headers.get("Content-Length");return r===null?0:parseFloat(r)}catch{return 0}}async function d3(e,t){return await Sx(e)>t}async function h3(e,t,r){if(!await bx(e,t))return!1;let[i,s]=await kx(e,t,r);return i}});var Ox=x(hi=>{"use strict";p();Object.defineProperty(hi,"__esModule",{value:!0});hi.getBlocks=wx;hi.isInvalidPresetBlock=xx;hi.isInvalidDefaultBlock=g3;hi.validateNestedBlocks=Ex;hi.reportWarning=r_;hi.validateBlockFileExistence=Ax;var t_=He(),m3=Hr();function wx(e){let t=[],r=[],n={},i=[],s=e.blocks,a=e.presets;function o(f,m){if(!f)return;"name"in f?r.push({node:f,path:["blocks",String(m),"type"]}):f.type!=="@app"&&t.push({node:f,path:["blocks",String(m),"type"]})}function c(f,m,d=0){f&&(n[d]||(n[d]=[]),n[d].push({node:f,path:m.concat("type")}),"blocks"in f&&(Array.isArray(f.blocks)?f.blocks.forEach((g,v)=>{c(g,m.concat("blocks",String(v)),d+1)}):typeof f.blocks=="object"&&f.blocks!==null&&Object.entries(f.blocks).forEach(([g,v])=>{c(v,m.concat("blocks",g),d+1)})))}function l(f,m){"name"in f&&i.push({node:f,path:["default","blocks",String(m),"type"]})}return Array.isArray(s)&&s.forEach((f,m)=>{o(f,m)}),a&&a.forEach((f,m)=>{"blocks"in f&&f.blocks&&(Array.isArray(f.blocks)?f.blocks.forEach((d,g)=>{c(d,["presets",String(m),"blocks",String(g)],0)}):typeof f.blocks=="object"&&Object.entries(f.blocks).forEach(([d,g])=>{c(g,["presets",String(m),"blocks",d],0)}))}),"default"in e&&e.default?.blocks?.forEach((f,m)=>{l(f,m)}),{rootLevelThemeBlocks:t,rootLevelLocalBlocks:r,presetLevelBlocks:n,defaultLevelBlocks:i,hasRootBlocksDeclaration:Array.isArray(s)}}function xx(e,t,r,n,i=!0){if(t.static)return!n.some(l=>l.type===t.type&&l.id===e);let s=t.type.startsWith("_");if(s&&!i)return!1;let a=r.some(l=>l.node.type==="@theme"),o=s||!a;return!r.some(l=>l.node.type===t.type)&&o}function g3(e,t,r=!0){let n=e.type.startsWith("_");if(n&&!r)return!1;let i=t.some(o=>o.node.type==="@theme"),s=n||!i;return!t.some(o=>o.node.type===e.type)&&s}async function Tx(e,t,r,n,i,s,a,o,c=[]){let l=(0,t_.nodeAtPath)(o,t),f="id"in e?e.id:t.at(-2);if(l){if(xx(f,e,i,c)){let d=!!e.static,g=e.type.startsWith("_"),v=d?`Could not find a static block of type "${e.type}" with id "${f}" in "blocks/${n.type}.liquid".`:g?`Private block type "${e.type}" is not allowed in "${n.type}" blocks.`:`Block type "${e.type}" is not allowed in "${n.type}" blocks. Allowed types are: ${s.join(", ")}.`;r_(v,a,l,r)}await Ax(e.type,r)||r_(`Theme block 'blocks/${e.type}.liquid' does not exist.`,a,l,r)}"blocks"in e&&e.blocks&&await Ex(r,e,e.blocks,t.slice(0,-1),a,o)}async function Ex(e,t,r,n,i,s){if(!r)return;let a=await e.getBlockSchema?.(t.type);if(!a||a instanceof Error)return;let{validSchema:o,staticBlockDefs:c}=a;if(!o||o instanceof Error)return;let{rootLevelThemeBlocks:l}=wx(o),f=l.map(m=>m.node.type);Array.isArray(r)?await Promise.all(r.map((m,d)=>{let g=n.concat(["blocks",String(d),"type"]);return Tx(m,g,e,t,l,f,i,s,c)})):typeof r=="object"&&await Promise.all(Object.entries(r).map(([m,d])=>{let g=n.concat(["blocks",m,"type"]);return Tx(d,g,e,t,l,f,i,s,c)}))}function r_(e,t,r,n){n.report({message:e,startIndex:t+(0,t_.getLocStart)(r),endIndex:t+(0,t_.getLocEnd)(r)})}async function Ax(e,t){if(e==="@theme"||e==="@app")return!0;let r=`blocks/${e}.liquid`;return await(0,m3.doesFileExist)(t,r)}});var Qe=x(bt=>{"use strict";p();Object.defineProperty(bt,"__esModule",{value:!0});bt.nonTraversableProperties=bt.LoopNamedTags=bt.LiquidNodeTypes=bt.HtmlNodeTypes=bt.Comparators=bt.RawTags=bt.NamedTags=bt.NodeTypes=void 0;var zr;(function(e){e.Document="Document",e.LiquidRawTag="LiquidRawTag",e.LiquidTag="LiquidTag",e.LiquidBranch="LiquidBranch",e.LiquidVariableOutput="LiquidVariableOutput",e.HtmlSelfClosingElement="HtmlSelfClosingElement",e.HtmlVoidElement="HtmlVoidElement",e.HtmlDoctype="HtmlDoctype",e.HtmlComment="HtmlComment",e.HtmlElement="HtmlElement",e.HtmlDanglingMarkerClose="HtmlDanglingMarkerClose",e.HtmlRawNode="HtmlRawNode",e.AttrSingleQuoted="AttrSingleQuoted",e.AttrDoubleQuoted="AttrDoubleQuoted",e.AttrUnquoted="AttrUnquoted",e.AttrEmpty="AttrEmpty",e.TextNode="TextNode",e.YAMLFrontmatter="YAMLFrontmatter",e.LiquidVariable="LiquidVariable",e.LiquidFilter="LiquidFilter",e.NamedArgument="NamedArgument",e.LiquidLiteral="LiquidLiteral",e.BooleanExpression="BooleanExpression",e.String="String",e.Number="Number",e.Range="Range",e.VariableLookup="VariableLookup",e.Comparison="Comparison",e.LogicalExpression="LogicalExpression",e.AssignMarkup="AssignMarkup",e.BlockMarkup="BlockMarkup",e.ContentForMarkup="ContentForMarkup",e.CycleMarkup="CycleMarkup",e.ForMarkup="ForMarkup",e.PaginateMarkup="PaginateMarkup",e.RawMarkup="RawMarkup",e.RenderMarkup="RenderMarkup",e.SectionMarkup="SectionMarkup",e.RenderVariableExpression="RenderVariableExpression",e.RenderAliasExpression="RenderAliasExpression",e.LiquidDocDescriptionNode="LiquidDocDescriptionNode",e.LiquidDocParamNode="LiquidDocParamNode",e.LiquidDocExampleNode="LiquidDocExampleNode",e.LiquidDocPromptNode="LiquidDocPromptNode",e.LiquidErrorNode="LiquidErrorNode"})(zr||(bt.NodeTypes=zr={}));var kf;(function(e){e.assign="assign",e.block="block",e.capture="capture",e.case="case",e.content_for="content_for",e.cycle="cycle",e.decrement="decrement",e.echo="echo",e.elsif="elsif",e.for="for",e.form="form",e.if="if",e.ifchanged="ifchanged",e.include="include",e.increment="increment",e.layout="layout",e.liquid="liquid",e.paginate="paginate",e.partial="partial",e.render="render",e.section="section",e.sections="sections",e.tablerow="tablerow",e.unless="unless",e.when="when"})(kf||(bt.NamedTags=kf={}));var Px;(function(e){e.comment="comment",e.doc="doc",e.javascript="javascript",e.raw="raw",e.schema="schema",e.style="style",e.stylesheet="stylesheet"})(Px||(bt.RawTags=Px={}));var Nx;(function(e){e.CONTAINS="contains",e.EQUAL="==",e.GREATER_THAN=">",e.GREATER_THAN_OR_EQUAL=">=",e.LESS_THAN="<",e.LESS_THAN_OR_EQUAL="<=",e.NOT_EQUAL="!="})(Nx||(bt.Comparators=Nx={}));bt.HtmlNodeTypes=[zr.HtmlElement,zr.HtmlDanglingMarkerClose,zr.HtmlRawNode,zr.HtmlVoidElement,zr.HtmlSelfClosingElement];bt.LiquidNodeTypes=[zr.LiquidTag,zr.LiquidVariableOutput,zr.LiquidBranch,zr.LiquidRawTag];bt.LoopNamedTags=[kf.for,kf.tablerow];bt.nonTraversableProperties=new Set(["parentNode","prev","next","firstChild","lastChild"])});var Bn=x(gs=>{"use strict";p();Object.defineProperty(gs,"__esModule",{value:!0});gs.assertNever=y3;gs.locStart=_3;gs.locEnd=v3;gs.deepGet=b3;gs.dropLast=k3;function y3(e){throw new Error(`Unexpected object: ${e.type}`)}function _3(e){return e.position.start}function v3(e){return e.position.end}function b3(e,t){return e.reduce((r,n)=>{if(r&&r[n]!==void 0)return r[n]},t)}function k3(e,t){let r=[...t];for(let n=0;n<e;n++)r.pop();return r}});var tr=x(qc=>{"use strict";p();Object.defineProperty(qc,"__esModule",{value:!0});qc.TokenType=void 0;qc.tokenize=T3;var S3=Bn(),Xe;(function(e){e.Text="Text",e.LiquidTagOpen="LiquidTagOpen",e.LiquidTagClose="LiquidTagClose",e.LiquidVariableOutputOpen="LiquidVariableOutputOpen",e.LiquidVariableOutputClose="LiquidVariableOutputClose",e.HtmlTagOpen="HtmlTagOpen",e.HtmlCloseTagOpen="HtmlCloseTagOpen",e.HtmlTagClose="HtmlTagClose",e.HtmlSelfClose="HtmlSelfClose",e.HtmlCommentOpen="HtmlCommentOpen",e.HtmlCommentClose="HtmlCommentClose",e.HtmlDoctypeOpen="HtmlDoctypeOpen",e.HtmlEquals="HtmlEquals",e.HtmlQuoteOpen="HtmlQuoteOpen",e.HtmlQuoteClose="HtmlQuoteClose",e.YamlFrontmatter="YamlFrontmatter",e.EndOfInput="EndOfInput"})(Xe||(qc.TokenType=Xe={}));function T3(e,t={}){let r=[],n=[],i=pt.Default,s=0,a=-1,o="";t.insideQuotedAttribute?(o=t.insideQuotedAttribute,n.push(pt.HtmlTag),i=pt.QuotedValue):t.insideHtmlTag&&(i=pt.HtmlTag);function c(_){let k=s+_;return k<e.length?e[k]:""}function l(_){return e.startsWith(_,s)}function f(){a!==-1&&(r.push({type:Xe.Text,start:a,end:s}),a=-1)}function m(_,k){f(),r.push({type:_,start:s,end:s+k}),s+=k}function d(_){n.push(i),i=_}function g(){i=n.length>0?n.pop():pt.Default}function v(){a===-1&&(a=s)}if(!t.skipFrontmatter&&(l(`---
17
- `)||l(`---\r
18
- `))){let _=e.indexOf(`
19
- `,0)+1,k=e.indexOf(`
20
- ---`,_);if(k!==-1){let w=k+4;w<e.length&&e[w]==="\r"&&w++,w<e.length&&e[w]===`
21
- `&&w++,r.push({type:Xe.YamlFrontmatter,start:0,end:w}),s=w}}function b(){return l("{{-")?(m(Xe.LiquidVariableOutputOpen,3),d(pt.LiquidVariableOutput),!0):l("{{")?(m(Xe.LiquidVariableOutputOpen,2),d(pt.LiquidVariableOutput),!0):l("{%-")?(m(Xe.LiquidTagOpen,3),d(pt.LiquidTag),!0):l("{%")?(m(Xe.LiquidTagOpen,2),d(pt.LiquidTag),!0):!1}for(;s<e.length;)switch(i){case pt.LiquidTag:{l("-%}")?(m(Xe.LiquidTagClose,3),g()):l("%}")?(m(Xe.LiquidTagClose,2),g()):(v(),s++);break}case pt.LiquidVariableOutput:{l("-}}")?(m(Xe.LiquidVariableOutputClose,3),g()):l("}}")?(m(Xe.LiquidVariableOutputClose,2),g()):(v(),s++);break}case pt.Default:{if(b())continue;if(l("<!--")){m(Xe.HtmlCommentOpen,4);continue}if(l("-->")){m(Xe.HtmlCommentClose,3);continue}if(l("<!")){m(Xe.HtmlDoctypeOpen,2),d(pt.HtmlTag);continue}if(l("</")){let _=c(2);if(/[a-zA-Z]/.test(_)||_==="{"){m(Xe.HtmlCloseTagOpen,2),d(pt.HtmlTag);continue}}if(c(0)==="<"){let _=c(1);if(/[a-zA-Z]/.test(_)||_==="{"){m(Xe.HtmlTagOpen,1),d(pt.HtmlTag);continue}}v(),s++;break}case pt.HtmlTag:{if(b())continue;if(l("/>")){m(Xe.HtmlSelfClose,2),g();continue}if(c(0)===">"){m(Xe.HtmlTagClose,1),g();continue}if(c(0)==="="){m(Xe.HtmlEquals,1);continue}if(c(0)==='"'||c(0)==="'"||c(0)==="\u201C"||c(0)==="\u201D"||c(0)==="\u2018"||c(0)==="\u2019"){o=c(0),m(Xe.HtmlQuoteOpen,1),d(pt.QuotedValue);continue}v(),s++;break}case pt.QuotedValue:{if(b())continue;if(c(0)===w3(o)||c(0)===o){m(Xe.HtmlQuoteClose,1),g();continue}v(),s++;break}default:(0,S3.assertNever)(i)}return f(),r.push({type:Xe.EndOfInput,start:e.length,end:e.length}),r}var pt;(function(e){e.Default="Default",e.HtmlTag="HtmlTag",e.QuotedValue="QuotedValue",e.LiquidTag="LiquidTag",e.LiquidVariableOutput="LiquidVariableOutput"})(pt||(pt={}));function w3(e){switch(e){case"\u201C":return"\u201D";case"\u201D":return"\u201C";case"\u2018":return"\u2019";case"\u2019":return"\u2018";default:return e}}});var Wr=x($a=>{"use strict";p();var x3=$a&&$a.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($a,"__esModule",{value:!0});$a.LiquidHTMLASTParsingError=void 0;var E3=x3(Iy()),n_=class extends SyntaxError{loc;unclosed;constructor(t,r,n,i,s){super(t),this.name="LiquidHTMLParsingError",this.unclosed=s??null;let a=(0,E3.default)(r),o=Math.max(0,r.length-1),c=a.fromIndex(Math.min(Math.max(n,0),o)),l=a.fromIndex(Math.min(Math.max(i,0),o));this.loc={start:{line:c?.line??1,column:c?.col??1},end:{line:l?.line??1,column:l?.col??1}}}};$a.LiquidHTMLASTParsingError=n_});var qx=x(Sf=>{"use strict";p();Object.defineProperty(Sf,"__esModule",{value:!0});Sf.ParserBase=void 0;var Vn=tr(),A3=Wr(),i_=class{tokens;source;p;constructor(t,r){this.tokens=t,this.source=r,this.p=0}consume(t){let r=this.tokens[this.p];if(r.type!==t)throw new A3.LiquidHTMLASTParsingError(`Expected ${t} but got ${r.type}`,this.source,r.start,r.end);return this.p++,r}accept(t){return this.tokens[this.p].type===t?this.tokens[this.p++]:null}check(t,r=0){let n=this.p+r;return n<this.tokens.length&&this.tokens[n].type===t}peek(){return this.tokens[this.p]}advance(){return this.tokens[this.p++]}isAtEnd(){return this.tokens[this.p].type===Vn.TokenType.EndOfInput}getSource(){return this.source}isTolerant(){return!1}tokenAt(t){return this.tokens[t]}tokenCount(){return this.tokens.length}getPosition(){return this.p}setPosition(t){this.p=t}seekToSourceOffset(t){let r=0;for(;r<this.tokens.length&&this.tokens[r].start<t;)r++;this.p=r}openQuoteCharBefore(t){let r;for(let n of t)n.type===Vn.TokenType.HtmlQuoteOpen?r=n:n.type===Vn.TokenType.HtmlQuoteClose&&(r=void 0);return r?this.source[r.start]:void 0}insideOpenHtmlTag(t){let r=!1;for(let n of t)n.type===Vn.TokenType.HtmlTagOpen||n.type===Vn.TokenType.HtmlCloseTagOpen||n.type===Vn.TokenType.HtmlDoctypeOpen?r=!0:(n.type===Vn.TokenType.HtmlTagClose||n.type===Vn.TokenType.HtmlSelfClose)&&(r=!1);return r}resliceTokensFrom(t){if(this.tokens.some(i=>i.start<t&&i.end>t)){let i=this.tokens.filter(c=>c.end<=t),s=this.openQuoteCharBefore(i),a=!s&&this.insideOpenHtmlTag(i),o=(0,Vn.tokenize)(this.source.slice(t),{skipFrontmatter:!0,insideQuotedAttribute:s,insideHtmlTag:a}).map(c=>({type:c.type,start:c.start+t,end:c.end+t}));this.tokens=[...i,...o],this.p=i.length;return}let n=0;for(;n<this.tokens.length&&this.tokens[n].start<t;)n++;this.p=n}};Sf.ParserBase=i_});var Gr=x(Je=>{"use strict";p();Object.defineProperty(Je,"__esModule",{value:!0});Je.makeDocumentNode=O3;Je.envelopeFromTokens=P3;Je.makeLiquidTagBaseCase=N3;Je.makeLiquidTagNamed=q3;Je.makeLiquidBranchUnnamed=L3;Je.makeLiquidBranchNamed=C3;Je.makeLiquidRawTag=I3;Je.makeLiquidVariableOutput=M3;Je.makeTextNode=R3;Je.makeRawMarkup=D3;Je.makeYamlFrontmatter=j3;Je.makeHtmlElement=F3;Je.makeHtmlVoidElement=B3;Je.makeHtmlSelfClosingElement=V3;Je.makeHtmlRawNode=$3;Je.makeHtmlComment=U3;Je.makeHtmlDoctype=H3;Je.makeAttrDoubleQuoted=z3;Je.makeAttrSingleQuoted=W3;Je.makeAttrUnquoted=G3;Je.makeAttrEmpty=J3;Je.makeHtmlDanglingMarkerClose=K3;var ot=Qe();function O3(e,t){return{type:ot.NodeTypes.Document,children:e,name:"#document",_source:t,position:{start:0,end:t.length},source:t}}function P3(e,t,r){let n=r.slice(e.end,t.start),i=n.trimStart(),s=n.length-i.length,a=i.search(/\s/),o=a===-1?i.trim():i.slice(0,a),l=s+o.length,f=n.slice(l),m=l;for(;m<n.length&&(n[m]===" "||n[m]===" ");)m++;let d=e.end+m,g=e.end-e.start>2?"-":"",v=t.end-t.start>2?"-":"";return{tagName:o,markupString:f,markupOffset:d,markupEnd:t.start,whitespaceStart:g,whitespaceEnd:v,blockStartPosition:{start:e.start,end:t.end},source:r}}function N3(e,t,r,n,i,s=!1){let a=r?r.end:e.blockStartPosition.end;return{type:ot.NodeTypes.LiquidTag,name:e.tagName,markup:s?e.markupString:e.markupString.trim(),children:t,whitespaceStart:e.whitespaceStart,whitespaceEnd:e.whitespaceEnd,delimiterWhitespaceStart:n?.start,delimiterWhitespaceEnd:n?.end,blockStartPosition:e.blockStartPosition,blockEndPosition:r,markupPosition:{start:e.markupOffset,end:e.markupEnd},position:{start:e.blockStartPosition.start,end:a},source:e.source,reason:i}}function q3(e,t,r,n,i){let s=n?n.end:e.blockStartPosition.end;return{type:ot.NodeTypes.LiquidTag,name:e.tagName,markup:t,children:r,whitespaceStart:e.whitespaceStart,whitespaceEnd:e.whitespaceEnd,delimiterWhitespaceStart:i?.start,delimiterWhitespaceEnd:i?.end,blockStartPosition:e.blockStartPosition,blockEndPosition:n,markupPosition:{start:e.markupOffset,end:e.markupEnd},position:{start:e.blockStartPosition.start,end:s},source:e.source}}function L3(e,t){return{type:ot.NodeTypes.LiquidBranch,name:null,markup:"",children:[],whitespaceStart:"",whitespaceEnd:"",markupPosition:{start:e,end:e},blockStartPosition:{start:e,end:e},blockEndPosition:{start:-1,end:-1},position:{start:e,end:e},source:t}}function C3(e,t){return{type:ot.NodeTypes.LiquidBranch,name:e.tagName,markup:t,children:[],whitespaceStart:e.whitespaceStart,whitespaceEnd:e.whitespaceEnd,markupPosition:{start:e.markupOffset,end:e.markupEnd},blockStartPosition:e.blockStartPosition,blockEndPosition:{start:-1,end:-1},position:{start:e.blockStartPosition.start,end:e.blockStartPosition.end},source:e.source}}function I3(e,t,r,n){let i=e.markupEnd;for(;i>e.markupOffset&&(e.source[i-1]===" "||e.source[i-1]===" ");)i--;return{type:ot.NodeTypes.LiquidRawTag,name:e.tagName,markup:e.markupString.trim(),markupPosition:{start:e.markupOffset,end:i},body:t,whitespaceStart:e.whitespaceStart,whitespaceEnd:e.whitespaceEnd,delimiterWhitespaceStart:n.start,delimiterWhitespaceEnd:n.end,blockStartPosition:e.blockStartPosition,blockEndPosition:r,position:{start:e.blockStartPosition.start,end:r.end},source:e.source}}function M3(e,t,r,n){return{type:ot.NodeTypes.LiquidVariableOutput,markup:r,whitespaceStart:e.end-e.start>2?"-":"",whitespaceEnd:t.end-t.start>2?"-":"",markupPosition:{start:e.end,end:t.start},position:{start:e.start,end:t.end},source:n}}function R3(e,t,r,n){return{type:ot.NodeTypes.TextNode,value:e,position:{start:t,end:r},source:n}}function D3(e,t,r,n,i,s){return{type:ot.NodeTypes.RawMarkup,kind:e,value:t,nodes:r,position:{start:n,end:i},source:s}}function j3(e,t,r,n){return{type:ot.NodeTypes.YAMLFrontmatter,body:e,position:{start:t,end:r},source:n}}function F3(e,t,r,n,i,s){return{type:ot.NodeTypes.HtmlElement,name:e,attributes:t,children:r,blockStartPosition:n,blockEndPosition:i,position:{start:n.start,end:i.end},source:s}}function B3(e,t,r,n){return{type:ot.NodeTypes.HtmlVoidElement,name:e,attributes:t,blockStartPosition:r,position:r,source:n}}function V3(e,t,r,n){return{type:ot.NodeTypes.HtmlSelfClosingElement,name:e,attributes:t,blockStartPosition:r,position:r,source:n}}function $3(e,t,r,n,i,s){return{type:ot.NodeTypes.HtmlRawNode,name:e,attributes:t,body:r,blockStartPosition:n,blockEndPosition:i,position:{start:n.start,end:i.end},source:s}}function U3(e,t,r,n){return{type:ot.NodeTypes.HtmlComment,body:e,position:{start:t,end:r},source:n}}function H3(e,t,r,n){return{type:ot.NodeTypes.HtmlDoctype,legacyDoctypeString:e,position:{start:t,end:r},source:n}}function z3(e,t,r,n,i,s){return{type:ot.NodeTypes.AttrDoubleQuoted,name:e,value:t,attributePosition:r,position:{start:n,end:i},source:s}}function W3(e,t,r,n,i,s){return{type:ot.NodeTypes.AttrSingleQuoted,name:e,value:t,attributePosition:r,position:{start:n,end:i},source:s}}function G3(e,t,r,n,i,s){return{type:ot.NodeTypes.AttrUnquoted,name:e,value:t,attributePosition:r,position:{start:n,end:i},source:s}}function J3(e,t,r,n){return{type:ot.NodeTypes.AttrEmpty,name:e,position:{start:t,end:r},source:n}}function K3(e,t,r,n){return{type:ot.NodeTypes.HtmlDanglingMarkerClose,name:e,blockStartPosition:{start:t,end:r},position:{start:t,end:r},source:n}}});var Ua=x($n=>{"use strict";p();Object.defineProperty($n,"__esModule",{value:!0});$n.ChildFilterMode=void 0;$n.filterChildren=Q3;$n.mergeAdjacentTextNodes=wf;$n.mergeAdjacentTextNodesTrimmed=Rx;$n.mergeAdjacentTextNodesStripEdges=Dx;$n.compoundNamesMatch=X3;var Tf=Qe(),Mx=Gr(),Y3=Bn(),Lc;(function(e){e[e.Syntactic=0]="Syntactic",e[e.Preserve=1]="Preserve",e[e.StripEdges=2]="StripEdges"})(Lc||($n.ChildFilterMode=Lc={}));function Q3(e,t,r){switch(e){case Lc.Syntactic:return Rx(t,r);case Lc.Preserve:return wf(t,r);case Lc.StripEdges:return Dx(t,r);default:(0,Y3.assertNever)(e)}}function ys(e){return e.type===Tf.NodeTypes.TextNode}function Lx(e){return e.type===Tf.NodeTypes.LiquidVariableOutput}function wf(e,t){if(e.length<=1)return e;let r=[],n=-1;for(let i=0;i<=e.length;i++){let s=e[i],a=n!==-1,o=s!==void 0&&ys(s);if(o&&!a){n=i;continue}if(!o&&a){let c=i-1;if(n===c)r.push(e[n]);else{let l=e[n],f=e[c];r.push((0,Mx.makeTextNode)(t.slice(l.position.start,f.position.end),l.position.start,f.position.end,t))}n=-1}s!==void 0&&!o&&r.push(s)}return r}function Rx(e,t){let r=wf(e,t);if(r.length===0)return r;let n=[];for(let i=0;i<r.length;i++){let s=r[i];if(!ys(s)){n.push(s);continue}let a=s.value,o=s.position.start,c=s.position.end,l=r[i-1];if(!l||!ys(l)){let m=a.replace(/^\s+/,""),d=a.length-m.length;a=m,o+=d}let f=r[i+1];if(!f||!ys(f)){let m=a.replace(/\s+$/,""),d=a.length-m.length;a=m,c-=d}a.length>0&&n.push((0,Mx.makeTextNode)(a,o,c,t))}return n}function Dx(e,t){let r=wf(e,t),n=0,i=r.length;for(;n<i&&Cx(r[n]);)n++;for(;i>n&&Cx(r[i-1]);)i--;return n===0&&i===r.length?r:r.slice(n,i)}function Cx(e){return ys(e)&&/^\s+$/.test(e.value)}function X3(e,t){if(Ix(e)&&Ix(t))return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let n=e[r],i=t[r];if(n.type!==i.type)return!1;if(ys(n)&&ys(i)){if(n.value!==i.value)return!1;continue}if(Lx(n)&&Lx(i)){let s=typeof n.markup=="string"?n.markup:n.markup.rawSource,a=typeof i.markup=="string"?i.markup:i.markup.rawSource;if(s!==a)return!1;continue}if(n.type===i.type&&"source"in n&&"source"in i){let s=n.source.slice(n.position.start,n.position.end),a=i.source.slice(i.position.start,i.position.end);if(s!==a)return!1;continue}return!1}return!0}function Ix(e){return e.length===1&&(e[0].type===Tf.NodeTypes.LiquidTag||e[0].type===Tf.NodeTypes.LiquidRawTag)}});var je=x(xf=>{"use strict";p();Object.defineProperty(xf,"__esModule",{value:!0});xf.TagKind=void 0;var jx;(function(e){e.Block="block",e.Tag="tag",e.Raw="raw",e.Hybrid="hybrid"})(jx||(xf.TagKind=jx={}))});var Ef=x(_s=>{"use strict";p();Object.defineProperty(_s,"__esModule",{value:!0});_s.unlessTag=_s.ifTag=void 0;_s.elsifBranchParse=Z3;var Fx=je();function Bx(e,t,r){return t.conditionalExpression()}_s.ifTag={kind:Fx.TagKind.Block,branches:["elsif","else"],parse:Bx};_s.unlessTag={kind:Fx.TagKind.Block,branches:["elsif","else"],parse:Bx};function Z3(e,t){return t.conditionalExpression()}});var kt=x(Ic=>{"use strict";p();Object.defineProperty(Ic,"__esModule",{value:!0});Ic.MarkupTokenType=void 0;Ic.tokenizeMarkup=rU;var xe;(function(e){e.Id="Id",e.String="String",e.Number="Number",e.Dot="Dot",e.DotDot="DotDot",e.Pipe="Pipe",e.Colon="Colon",e.Comma="Comma",e.OpenRound="OpenRound",e.CloseRound="CloseRound",e.OpenSquare="OpenSquare",e.CloseSquare="CloseSquare",e.Dash="Dash",e.Comparison="Comparison",e.Equality="Equality",e.Logical="Logical",e.EndOfString="EndOfString"})(xe||(Ic.MarkupTokenType=xe={}));var Cc=/[a-zA-Z_][\w-]*\??/y,mi=/\d[\d_]*(\.\d[\d_]*)?/y,s_=/\s+/y,eU=/'[^']*'/y,tU=/"[^"]*"/y;function rU(e,t=0){let r=[],n=0,i;for(;n<e.length;){if(s_.lastIndex=n,s_.test(e)){n=s_.lastIndex;continue}let s=e[n],a=n+1<e.length?e[n+1]:"";if(s==="'"||s==='"'){let c=s==="'"?eU:tU;if(c.lastIndex=n,c.test(e)){let l=e.slice(n,c.lastIndex);r.push({type:xe.String,value:l,start:n+t,end:c.lastIndex+t}),i=xe.String,n=c.lastIndex;continue}}if(s==="-"&&/\d/.test(a)&&(mi.lastIndex=n+1,mi.test(e))){let c=e.slice(n,mi.lastIndex);r.push({type:xe.Number,value:c,start:n+t,end:mi.lastIndex+t}),i=xe.Number,n=mi.lastIndex;continue}if(/\d/.test(s)&&(mi.lastIndex=n,mi.test(e))){let c=mi.lastIndex,l=e.slice(n,c);r.push({type:xe.Number,value:l,start:n+t,end:c+t}),i=xe.Number,n=c;continue}if(Cc.lastIndex=n,Cc.test(e)){let c=e.slice(n,Cc.lastIndex),l=xe.Id;i!==xe.Dot&&(c==="contains"?l=xe.Comparison:(c==="and"||c==="or")&&(l=xe.Logical)),r.push({type:l,value:c,start:n+t,end:Cc.lastIndex+t}),i=l,n=Cc.lastIndex;continue}if(a!==""){let c=s+a;if(c==="=="||c==="!="){r.push({type:xe.Equality,value:c,start:n+t,end:n+2+t}),i=xe.Equality,n+=2;continue}if(c===">="||c==="<="){r.push({type:xe.Comparison,value:c,start:n+t,end:n+2+t}),i=xe.Comparison,n+=2;continue}if(c===".."){r.push({type:xe.DotDot,value:"..",start:n+t,end:n+2+t}),i=xe.DotDot,n+=2;continue}}let o=nU(s);if(o!==void 0){r.push({type:o,value:s,start:n+t,end:n+1+t}),i=o,n+=1;continue}n+=1}return r.push({type:xe.EndOfString,value:"",start:e.length+t,end:e.length+t}),r}function nU(e){switch(e){case".":return xe.Dot;case"|":return xe.Pipe;case":":return xe.Colon;case",":return xe.Comma;case"(":return xe.OpenRound;case")":return xe.CloseRound;case"[":return xe.OpenSquare;case"]":return xe.CloseSquare;case"-":return xe.Dash;case">":return xe.Comparison;case"<":return xe.Comparison;case"=":return xe.Equality;default:return}}});var Rc=x(Mc=>{"use strict";p();Object.defineProperty(Mc,"__esModule",{value:!0});Mc.caseTag=void 0;Mc.whenBranchParse=aU;var Ha=kt(),iU=je(),sU=Qe();Mc.caseTag={kind:iU.TagKind.Block,branches:["when","else"],parse(e,t,r){return t.valueExpression()}};function aU(e,t){let r=[t.valueExpression()];for(;;){if(t.consumeOptional(Ha.MarkupTokenType.Comma)){if(t.isLax()&&!t.atValueStart())break;r.push(t.valueExpression());continue}let s=t.peek();if(s.type===Ha.MarkupTokenType.Logical&&s.value==="or"){if(t.consume(Ha.MarkupTokenType.Logical),t.isLax()&&!t.atValueStart())break;r.push(t.valueExpression());continue}break}let n=t.peek(),i=r[r.length-1];return n.type===Ha.MarkupTokenType.Colon&&t.look(Ha.MarkupTokenType.EndOfString,1)&&i.type===sU.NodeTypes.String&&i.position.end===n.start&&t.consume(Ha.MarkupTokenType.Colon),t.isLax()&&!t.isAtEnd()&&t.discardTrailing(),r}});var Hx=x(za=>{"use strict";p();Object.defineProperty(za,"__esModule",{value:!0});za.tablerowTag=za.forTag=void 0;var Vx=kt(),oU=Qe(),$x=je();function Ux(e,t,r){let n=t.consume(Vx.MarkupTokenType.Id);if(!t.id("in"))throw new Error("Expected 'in'");let i=t.valueExpression(),s=t.id("reversed"),a=[];for(;!t.isAtEnd();)if(t.consumeOptional(Vx.MarkupTokenType.Comma),t.isLax())try{a.push(t.namedArgument())}catch{break}else a.push(t.namedArgument());return{type:oU.NodeTypes.ForMarkup,variableName:n.value,collection:i,reversed:s,args:a,position:{start:n.start,end:t.peek().start},source:i.source}}za.forTag={kind:$x.TagKind.Block,branches:["else"],parse:Ux};za.tablerowTag={kind:$x.TagKind.Block,branches:["else"],parse:Ux}});var zx=x(Af=>{"use strict";p();Object.defineProperty(Af,"__esModule",{value:!0});Af.assignTag=void 0;var a_=kt(),cU=Qe(),uU=je();Af.assignTag={kind:uU.TagKind.Tag,parse(e,t,r){let n=t.peek().start,i;if(t.isLax()){let c=t.consumeRawUntil(a_.MarkupTokenType.Equality).match(/[\w\-.[\]()]+/g);if(i=c?c[c.length-1]:"",i.length===0)throw new Error("Expected an assignment target before '=' in assign tag")}else i=t.consume(a_.MarkupTokenType.Id).value;if(t.consume(a_.MarkupTokenType.Equality).value!=="=")throw new Error("Expected '=' in assign tag");let a=t.liquidVariable();return{type:cU.NodeTypes.AssignMarkup,name:i,value:a,position:{start:n,end:t.peek().start},source:a.source}}}});var Wx=x(Of=>{"use strict";p();Object.defineProperty(Of,"__esModule",{value:!0});Of.echoTag=void 0;var lU=je();Of.echoTag={kind:lU.TagKind.Tag,parse(e,t,r){return t.liquidVariable()}}});var Kx=x(Wa=>{"use strict";p();Object.defineProperty(Wa,"__esModule",{value:!0});Wa.includeTag=Wa.renderTag=void 0;var jc=kt(),Dc=Qe(),Gx=je();function fU(e){return e.look(jc.MarkupTokenType.Id)&&e.look(jc.MarkupTokenType.Colon,1)}function Jx(e,t,r,n=!1){let i=t.valueExpression();if(!n&&i.type!==Dc.NodeTypes.String&&i.type!==Dc.NodeTypes.VariableLookup)throw new Error(`Expected string or variable lookup for snippet, got ${i.type}`);let s=null,a=null,o=null,c=t.peek().start;if(t.id("for")?o="for":t.id("with")&&(o="with"),o!==null){let d=t.valueExpression();s={type:Dc.NodeTypes.RenderVariableExpression,kind:o,name:d,position:{start:c,end:d.position.end},source:d.source}}let l=t.peek().start;if(t.id("as")){let d=t.consume(jc.MarkupTokenType.Id);a={type:Dc.NodeTypes.RenderAliasExpression,value:d.value,position:{start:l,end:d.end},source:i.source}}let f=[];for(t.consumeOptional(jc.MarkupTokenType.Comma);fU(t);)f.push(t.namedArgument()),t.consumeOptional(jc.MarkupTokenType.Comma);let m=t.peek().start;return{type:Dc.NodeTypes.RenderMarkup,snippet:i,variable:s,alias:a,args:f,position:{start:i.position.start,end:m},source:i.source}}Wa.renderTag={kind:Gx.TagKind.Tag,parse:Jx};Wa.includeTag={kind:Gx.TagKind.Tag,parse:(e,t,r)=>Jx(e,t,r,!0)}});var Qx=x(Pf=>{"use strict";p();Object.defineProperty(Pf,"__esModule",{value:!0});Pf.cycleTag=void 0;var Yx=kt(),pU=Qe(),dU=je();Pf.cycleTag={kind:dU.TagKind.Tag,parse(e,t,r){let n=t.valueExpression(),i=null,s=[];for(t.consumeOptional(Yx.MarkupTokenType.Colon)?(i=n,s.push(t.valueExpression())):s.push(n);t.consumeOptional(Yx.MarkupTokenType.Comma)&&!(t.isLax()&&t.isAtEnd());)s.push(t.valueExpression());return{type:pU.NodeTypes.CycleMarkup,groupName:i,args:s,position:{start:n.position.start,end:t.peek().start},source:n.source}}}});var Zx=x(Nf=>{"use strict";p();Object.defineProperty(Nf,"__esModule",{value:!0});Nf.sectionTag=void 0;var hU=kt(),Xx=Qe(),mU=je();Nf.sectionTag={kind:mU.TagKind.Hybrid,parse(e,t,r){let n=t.valueExpression();if(n.type!==Xx.NodeTypes.String)throw new Error(`Expected string for section name, got ${n.type}`);let i=[];return t.consumeOptional(hU.MarkupTokenType.Comma)&&i.push(...t.blockNamedArguments()),{type:Xx.NodeTypes.SectionMarkup,name:n,args:i,position:{start:n.position.start,end:t.peek().start},source:n.source}}}});var tE=x(qf=>{"use strict";p();Object.defineProperty(qf,"__esModule",{value:!0});qf.contentForTag=void 0;var o_=kt(),eE=Qe(),gU=je();qf.contentForTag={kind:gU.TagKind.Tag,parse(e,t,r){let n=t.valueExpression();if(n.type!==eE.NodeTypes.String)throw new Error(`Expected string for content_for type, got ${n.type}`);let i=[];for(t.consumeOptional(o_.MarkupTokenType.Comma);t.look(o_.MarkupTokenType.Id);){try{i.push(t.namedArgument())}catch{break}t.consumeOptional(o_.MarkupTokenType.Comma)}return{type:eE.NodeTypes.ContentForMarkup,contentForType:n,args:i,position:{start:n.position.start,end:t.peek().start},source:n.source}}}});var nE=x(Lf=>{"use strict";p();Object.defineProperty(Lf,"__esModule",{value:!0});Lf.blockTag=void 0;var yU=kt(),rE=Qe(),_U=je(),vU=/^_?[a-zA-Z0-9][\w-]*$/;Lf.blockTag={kind:_U.TagKind.Block,branches:[],parse(e,t,r){if(t.isAtEnd())throw new Error("in 'block' - missing block type");let n=t.valueExpression();if(n.type!==rE.NodeTypes.String)throw new Error("in 'block' - file name must be a string literal");if(!vU.test(n.value))throw new Error(`in 'block' - '${n.value}' is not a valid block type`);let i=[];if(t.consumeOptional(yU.MarkupTokenType.Comma)&&!t.isAtEnd()&&(i=t.blockNamedArguments()),!t.isAtEnd()){let s=t.peek();throw new Error(`Unexpected token in 'block' tag: ${s.value}`)}return{type:rE.NodeTypes.BlockMarkup,name:n,args:i,position:{start:n.position.start,end:t.peek().start},source:n.source}}}});var sE=x(Cf=>{"use strict";p();Object.defineProperty(Cf,"__esModule",{value:!0});Cf.paginateTag=void 0;var iE=kt(),bU=Qe(),kU=je();Cf.paginateTag={kind:kU.TagKind.Block,branches:[],parse(e,t,r){let n=t.valueExpression();if(!t.id("by"))throw new Error("Expected 'by' in paginate tag");let i=t.valueExpression(),s=[];return t.consumeOptional(iE.MarkupTokenType.Comma)?s.push(...t.namedArguments()):t.isTolerant()&&t.peek().type===iE.MarkupTokenType.Id&&s.push(...t.namedArguments()),{type:bU.NodeTypes.PaginateMarkup,collection:n,pageSize:i,args:s,position:{start:n.position.start,end:t.peek().start},source:n.source}}}});var aE=x(If=>{"use strict";p();Object.defineProperty(If,"__esModule",{value:!0});If.formTag=void 0;var SU=je();If.formTag={kind:SU.TagKind.Block,branches:[],parse(e,t,r){return t.arguments()}}});var oE=x(Mf=>{"use strict";p();Object.defineProperty(Mf,"__esModule",{value:!0});Mf.incrementTag=void 0;var TU=je();Mf.incrementTag={kind:TU.TagKind.Tag,parse(e,t,r){return t.variableLookup()}}});var cE=x(Rf=>{"use strict";p();Object.defineProperty(Rf,"__esModule",{value:!0});Rf.decrementTag=void 0;var wU=je();Rf.decrementTag={kind:wU.TagKind.Tag,parse(e,t,r){return t.variableLookup()}}});var uE=x(Df=>{"use strict";p();Object.defineProperty(Df,"__esModule",{value:!0});Df.captureTag=void 0;var xU=Qe(),EU=je(),AU=/((?:\(?[\w\-.[\]]\)?)+)/;Df.captureTag={kind:EU.TagKind.Block,branches:[],parse(e,t,r){if(t.isLax()){let{source:n,bodyStart:i,bodyEnd:s}=t.bodyContext(),a=AU.exec(n.slice(i,s));if(a)return{type:xU.NodeTypes.VariableLookup,name:a[1],lookups:[],position:{start:i,end:s},source:n}}return t.variableLookup()}}});var lE=x(jf=>{"use strict";p();Object.defineProperty(jf,"__esModule",{value:!0});jf.layoutTag=void 0;var OU=je();jf.layoutTag={kind:OU.TagKind.Tag,parse(e,t,r){return t.valueExpression()}}});var fE=x(Ff=>{"use strict";p();Object.defineProperty(Ff,"__esModule",{value:!0});Ff.sectionsTag=void 0;var PU=Qe(),NU=je();Ff.sectionsTag={kind:NU.TagKind.Tag,parse(e,t,r){let n=t.valueExpression();if(n.type!==PU.NodeTypes.String)throw new Error(`Expected string for sections name, got ${n.type}`);return n}}});var pE=x(Bf=>{"use strict";p();Object.defineProperty(Bf,"__esModule",{value:!0});Bf.partialTag=void 0;var qU=Qe(),LU=je();Bf.partialTag={kind:LU.TagKind.Block,branches:[],parse(e,t,r){let n=t.valueExpression();if(n.type!==qU.NodeTypes.String)throw new Error(`Expected string for partial name, got ${n.type}`);return n}}});var dE=x(Vf=>{"use strict";p();Object.defineProperty(Vf,"__esModule",{value:!0});Vf.ifchangedTag=void 0;var CU=je();Vf.ifchangedTag={kind:CU.TagKind.Block,branches:[],parse(e,t,r){return null}}});var hE=x($f=>{"use strict";p();Object.defineProperty($f,"__esModule",{value:!0});$f.breakTag=void 0;var IU=je();$f.breakTag={kind:IU.TagKind.Tag,parse(e,t,r){if(!t.isAtEnd())throw new Error(`'${e}' tag does not accept markup`);return""}}});var mE=x(Uf=>{"use strict";p();Object.defineProperty(Uf,"__esModule",{value:!0});Uf.continueTag=void 0;var MU=je();Uf.continueTag={kind:MU.TagKind.Tag,parse(e,t,r){if(!t.isAtEnd())throw new Error(`'${e}' tag does not accept markup`);return""}}});var gE=x(Ut=>{"use strict";p();Object.defineProperty(Ut,"__esModule",{value:!0});Ut.stylesheetRaw=Ut.styleRaw=Ut.schemaRaw=Ut.javascriptRaw=Ut.rawRaw=Ut.docRaw=Ut.commentRaw=void 0;var vs=je();function bs(e,t,r){if(!t.isAtEnd())throw new Error(`'${e}' tag does not accept markup`)}Ut.commentRaw={kind:vs.TagKind.Raw,parseLiquidInBody:!1,parse:bs};Ut.docRaw={kind:vs.TagKind.Raw,parse:bs};Ut.rawRaw={kind:vs.TagKind.Raw,parseLiquidInBody:!1,parse:bs};Ut.javascriptRaw={kind:vs.TagKind.Raw,parseLiquidInBody:!0,parse:bs};Ut.schemaRaw={kind:vs.TagKind.Raw,parseLiquidInBody:!1,parse:bs};Ut.styleRaw={kind:vs.TagKind.Raw,parseLiquidInBody:!0,parse:bs};Ut.stylesheetRaw={kind:vs.TagKind.Raw,parseLiquidInBody:!0,parse:bs}});var yE=x(Hf=>{"use strict";p();Object.defineProperty(Hf,"__esModule",{value:!0});Hf.liquidTag=void 0;var RU=je();function DU(e,t){return e.endsWith(",")?/^\w+\s*:/.test(t):!1}function jU(e,t){let r=[],n=e.split(`
22
- `),i=[],s=0;for(let a=0;a<n.length;a++){let o=n[a],c=t+s,l=o.trimStart();if(l.length>0&&i.length>0){let f=i[i.length-1],m=f.raw.trimEnd();if(DU(m,l)){f.raw+=`
23
- `+o,s+=o.length+1;continue}}i.push({raw:o,startIndex:c}),s+=o.length+1}for(let{raw:a,startIndex:o}of i){let c=a.trimStart(),l=a.length-c.length,f=a.lastIndexOf(`
24
- `),m=f===-1?a:a.slice(f+1),d=f===-1?o+a.trimEnd().length:o+f+1+m.trimEnd().length;if(c.length>0){let g,v,b,_,k=c.indexOf(`
25
- `),w=k===-1?c:c.slice(0,k);if(w.startsWith("#"))g="#",v=c.slice(1).replace(/^[ \t]/,""),_=o+l,b=o+l+1+(c.length-1-v.length);else{let T=w.search(/\s/);if(T===-1)g=w,v="",_=o+l,b=o+l+w.length;else{g=w.slice(0,T);let y=c.slice(T);v=y.trimStart(),_=o+l,b=o+l+T+(y.length-v.length)}}r.push({tagName:g,markup:v,markupOffset:b,nameOffset:_,lineEnd:d})}}return r}Hf.liquidTag={kind:RU.TagKind.Tag,parse(e,t,r){let{source:n,bodyStart:i,bodyEnd:s}=t.bodyContext(),a=n.slice(i,s),c={lines:jU(a,i),index:0},l=[];for(;c.index<c.lines.length;){let f=c.lines[c.index];c.index++,l.push(r.parseLiquidStatement(f.tagName,f.markup,f.markupOffset,c))}return l}}});var Wf=x(zf=>{"use strict";p();Object.defineProperty(zf,"__esModule",{value:!0});zf.builtinTags=void 0;var _E=Ef(),FU=Rc(),vE=Hx(),BU=zx(),VU=Wx(),bE=Kx(),$U=Qx(),UU=Zx(),HU=tE(),zU=nE(),WU=sE(),GU=aE(),JU=oE(),KU=cE(),YU=uE(),QU=lE(),XU=fE(),ZU=pE(),e7=dE(),t7=hE(),r7=mE(),ks=gE(),n7=yE();zf.builtinTags={assign:BU.assignTag,block:zU.blockTag,break:t7.breakTag,capture:YU.captureTag,case:FU.caseTag,content_for:HU.contentForTag,continue:r7.continueTag,cycle:$U.cycleTag,decrement:KU.decrementTag,echo:VU.echoTag,for:vE.forTag,form:GU.formTag,if:_E.ifTag,ifchanged:e7.ifchangedTag,include:bE.includeTag,increment:JU.incrementTag,layout:QU.layoutTag,liquid:n7.liquidTag,paginate:WU.paginateTag,partial:ZU.partialTag,render:bE.renderTag,section:UU.sectionTag,sections:XU.sectionsTag,tablerow:vE.tablerowTag,unless:_E.unlessTag,comment:ks.commentRaw,doc:ks.docRaw,javascript:ks.javascriptRaw,raw:ks.rawRaw,schema:ks.schemaRaw,style:ks.styleRaw,stylesheet:ks.stylesheetRaw}});var Ja=x(Ga=>{"use strict";p();Object.defineProperty(Ga,"__esModule",{value:!0});Ga.Environment=Ga.TagKind=void 0;var i7=je();Object.defineProperty(Ga,"TagKind",{enumerable:!0,get:function(){return i7.TagKind}});var s7=Wf(),c_=class e{builtins;custom;static _default;constructor(t={}){this.builtins=t,this.custom=new Map}tagForName(t){return this.custom.get(t)??this.builtins[t]}registerTag(t,r){this.custom.set(t,r)}static default(){return e._default||(e._default=new e(s7.builtinTags)),e._default}static resetDefault(){e._default=void 0}};Ga.Environment=c_});var SE=x(At=>{"use strict";p();Object.defineProperty(At,"__esModule",{value:!0});At.COMPARISON_OPERATORS=At.EQUALITY_OPERATORS=At.LOGICAL_OPERATORS=At.ComparisonOperator=At.EqualityOperator=At.LogicalOperator=void 0;At.isBinaryExpression=u_;At.adaptConditional=Gf;At.adaptComplex=c7;var Jr=Qe(),kE=Bn(),Fc;(function(e){e.And="and",e.Or="or"})(Fc||(At.LogicalOperator=Fc={}));var Bc;(function(e){e.Equal="==",e.NotEqual="!="})(Bc||(At.EqualityOperator=Bc={}));var gi;(function(e){e.LessThan="<",e.GreaterThan=">",e.LessThanOrEqual="<=",e.GreaterThanOrEqual=">=",e.Contains="contains"})(gi||(At.ComparisonOperator=gi={}));At.LOGICAL_OPERATORS=new Set(Object.values(Fc));At.EQUALITY_OPERATORS=new Set(Object.values(Bc));At.COMPARISON_OPERATORS=new Set(Object.values(gi));function u_(e){return"kind"in e}function a7(e){switch(e){case Fc.And:return"and";case Fc.Or:return"or";default:return(0,kE.assertNever)(e)}}function o7(e){switch(e){case Bc.Equal:return Jr.Comparators.EQUAL;case Bc.NotEqual:return Jr.Comparators.NOT_EQUAL;case gi.LessThan:return Jr.Comparators.LESS_THAN;case gi.GreaterThan:return Jr.Comparators.GREATER_THAN;case gi.LessThanOrEqual:return Jr.Comparators.LESS_THAN_OR_EQUAL;case gi.GreaterThanOrEqual:return Jr.Comparators.GREATER_THAN_OR_EQUAL;case gi.Contains:return Jr.Comparators.CONTAINS;default:return e}}function Gf(e){if(!u_(e))return e;switch(e.kind){case"logical":{let t=Gf(e.right);return t.type===Jr.NodeTypes.LogicalExpression&&(t.position={...t.position,start:e.opStart}),{type:Jr.NodeTypes.LogicalExpression,relation:a7(e.op),left:Gf(e.left),right:t,position:e.position,source:e.source}}case"comparison":return{type:Jr.NodeTypes.Comparison,comparator:o7(e.op),left:e.left,right:e.right,position:e.position,source:e.source};default:return(0,kE.assertNever)(e)}}function c7(e){return u_(e)?{type:Jr.NodeTypes.BooleanExpression,condition:Gf(e),position:e.position,source:e.source}:e}});var _i=x(Jf=>{"use strict";p();Object.defineProperty(Jf,"__esModule",{value:!0});Jf.MarkupParser=void 0;var yi=Wr(),TE=Ka(),Vc=SE(),ct=Qe(),H=kt(),f_=class e{static WORD_SEGMENT_RE=/[\w-]+\??/y;tokens;source;p;markupStart;markupEnd;lax;tolerant;inCondition;constructor(t,r,n,i){this.tokens=t,this.source=r,this.p=0,this.markupStart=n??t[0]?.start??0,this.markupEnd=i??this.computeLastTokenEnd(),this.lax=!1,this.tolerant=!1,this.inCondition=!1}enableLax(){return this.lax=!0,this}isLax(){return this.lax}enableTolerant(){return this.tolerant=!0,this}isTolerant(){return this.tolerant}consumeRawUntil(t){let r=this.peek().start,n=r;for(;!this.isAtEnd()&&this.peek().type!==t;)n=this.peek().end,this.p+=1;return this.source.slice(r,n).trim()}discardRemaining(){for(;!this.isAtEnd();)this.p+=1}discardTrailing(){this.lax&&this.discardRemaining()}atValueStart(){switch(this.peek().type){case H.MarkupTokenType.String:case H.MarkupTokenType.Number:case H.MarkupTokenType.Id:case H.MarkupTokenType.OpenSquare:case H.MarkupTokenType.OpenRound:return!0;case H.MarkupTokenType.Dash:return this.lax;default:return!1}}atArgumentStart(){switch(this.peek().type){case H.MarkupTokenType.String:case H.MarkupTokenType.Number:case H.MarkupTokenType.Id:case H.MarkupTokenType.OpenSquare:case H.MarkupTokenType.OpenRound:return!0;default:return!1}}openSquareContinuesLookup(t,r){return this.lax?!/\S/.test(this.source.slice(t,r.start)):!0}skipToNextPipe(){for(;!this.isAtEnd()&&!this.look(H.MarkupTokenType.Pipe);)this.p+=1}consume(t){let r=this.tokens[this.p];if(r.type!==t)throw new yi.LiquidHTMLASTParsingError(`Expected ${t} but found ${r.type} (${r.value})`,this.source,r.start,r.end);return this.p+=1,r}consumeOptional(t){let r=this.tokens[this.p];return r.type!==t?null:(this.p+=1,r)}look(t,r=0){let n=this.p+r;return n<0||n>=this.tokens.length?!1:this.tokens[n].type===t}peek(){return this.tokens[this.p]}id(t){let r=this.tokens[this.p];return r.type!==H.MarkupTokenType.Id||r.value!==t?!1:(this.p+=1,!0)}isAtEnd(){return this.tokens[this.p].type===H.MarkupTokenType.EndOfString}eosStart(){return this.tokens[this.tokens.length-1].start}bodyContext(){for(;!this.isAtEnd();)this.p++;return{source:this.source,bodyStart:this.markupStart,bodyEnd:this.markupEnd}}remainingSource(){let t=this.tokens[this.p];if(t.type===H.MarkupTokenType.EndOfString)return"";let r=this.tokens[this.tokens.length-1];return this.source.slice(t.start,r.start).trim()}valueExpression(){let t=this.peek();switch(t.type){case H.MarkupTokenType.String:return this.p+=1,{type:ct.NodeTypes.String,single:t.value[0]==="'",value:t.value.slice(1,-1),position:{start:t.start,end:t.end},source:this.source};case H.MarkupTokenType.Number:{if(this.lax){let r=this.tokens[this.p+1];if(r&&r.type===H.MarkupTokenType.Id&&r.start===t.end)return this.p+=2,{type:ct.NodeTypes.VariableLookup,name:this.source.slice(t.start,r.end),lookups:[],position:{start:t.start,end:r.end},source:this.source};if(this.laxLookupSeparatorFollows(t.end))return this.variableLookup()}return this.p+=1,{type:ct.NodeTypes.Number,value:t.value,position:{start:t.start,end:t.end},source:this.source}}case H.MarkupTokenType.Id:{let r=this.tokens[this.p+1],n=r?.type===H.MarkupTokenType.OpenSquare&&this.openSquareContinuesLookup(t.end,r);return l7(t.value)&&!this.look(H.MarkupTokenType.Dot,1)&&!n&&!(this.lax&&this.laxLookupSeparatorFollows(t.end))?(this.p+=1,{type:ct.NodeTypes.LiquidLiteral,keyword:t.value,value:TE.LiquidLiteralValues[t.value],position:{start:t.start,end:t.end},source:this.source}):this.variableLookup()}case H.MarkupTokenType.OpenSquare:return this.variableLookup();case H.MarkupTokenType.Dot:if(this.lax){let r=this.tokens[this.p+1];if(r&&r.type===H.MarkupTokenType.Number&&r.start===t.end){let n=r.value.split(".")[0],i=r.end,s=2;if(!r.value.includes(".")){let a=this.tokens[this.p+s];for(;a&&a.start===i&&!a.value.includes(".")&&(a.type===H.MarkupTokenType.Id||a.type===H.MarkupTokenType.Dash||a.type===H.MarkupTokenType.Number);)n+=a.value,i=a.end,s+=1,a=this.tokens[this.p+s]}return this.p+=s,{type:ct.NodeTypes.VariableLookup,name:n,lookups:[],position:{start:t.start,end:i},source:this.source}}}throw new yi.LiquidHTMLASTParsingError(`Expected expression but found ${t.type} (${t.value})`,this.source,t.start,t.end);case H.MarkupTokenType.OpenRound:{let r=this.consume(H.MarkupTokenType.OpenRound);if(this.lax&&!this.parenContainsRange()){let o=this.consumeRawUntil(H.MarkupTokenType.CloseRound);return this.consumeOptional(H.MarkupTokenType.CloseRound),this.discardRemaining(),{type:ct.NodeTypes.VariableLookup,name:o,lookups:[],position:{start:r.start,end:this.eosStart()},source:this.source}}let n=this.valueExpression();if(this.consume(H.MarkupTokenType.DotDot),this.lax)for(;this.look(H.MarkupTokenType.Dot)||this.look(H.MarkupTokenType.DotDot);)this.p+=1;let i=this.valueExpression(),s=this.lax?this.consumeOptional(H.MarkupTokenType.CloseRound):this.consume(H.MarkupTokenType.CloseRound),a=s?s.end:i.position.end;return{type:ct.NodeTypes.Range,start:n,end:i,position:{start:r.start,end:a},source:this.source}}case H.MarkupTokenType.Dash:if(this.lax)return this.p+=1,{type:ct.NodeTypes.VariableLookup,name:"-",lookups:[],position:{start:t.start,end:t.end},source:this.source};throw new yi.LiquidHTMLASTParsingError(`Expected expression but found ${t.type} (${t.value})`,this.source,t.start,t.end);default:throw new yi.LiquidHTMLASTParsingError(`Expected expression but found ${t.type} (${t.value})`,this.source,t.start,t.end)}}parenContainsRange(){let t=0;for(let r=this.p;r<this.tokens.length;r++){let n=this.tokens[r];if(n.type===H.MarkupTokenType.EndOfString)break;if(n.type===H.MarkupTokenType.OpenRound)t+=1;else if(n.type===H.MarkupTokenType.CloseRound){if(t===0)break;t-=1}else if(n.type===H.MarkupTokenType.DotDot&&t===0)return!0}return!1}variableLookup(){let t,r,n=this.peek();if(n.type===H.MarkupTokenType.Id){let c=this.consume(H.MarkupTokenType.Id);t=c.value,r=c.start}else if(n.type===H.MarkupTokenType.OpenSquare)t=null,r=n.start;else if(this.lax&&n.type===H.MarkupTokenType.Number&&this.laxLookupSeparatorFollows(n.end))this.p+=1,t=n.value,r=n.start;else throw new yi.LiquidHTMLASTParsingError(`Expected identifier or [ but found ${n.type} (${n.value})`,this.source,n.start,n.end);let i=[],s=[],a=t!==null?this.tokens[this.p-1].end:r,o=null;for(;!this.isAtEnd();)if(this.consumeOptional(H.MarkupTokenType.Dot)){let c=this.consume(H.MarkupTokenType.Id);i.push({type:ct.NodeTypes.String,value:c.value,position:{start:c.start,end:c.end},source:this.source}),s.push("bareword"),a=c.end}else if(this.look(H.MarkupTokenType.OpenSquare)&&this.openSquareContinuesLookup(a,this.peek())){this.consume(H.MarkupTokenType.OpenSquare);let c=this.valueExpression(),l=this.lax?this.consumeOptional(H.MarkupTokenType.CloseSquare):this.consume(H.MarkupTokenType.CloseSquare);if(i.push(c),s.push("subscript"),a=l?l.end:c.position.end,this.lax&&!l&&!this.look(H.MarkupTokenType.Dot)&&!this.look(H.MarkupTokenType.OpenSquare))break}else if(this.lax&&!this.inCondition&&(o=this.tryConsumeLaxLookupSeparator(a)))i.push({type:ct.NodeTypes.String,value:o.value,position:{start:o.start,end:o.end},source:this.source}),s.push("bareword"),a=o.end;else break;if(this.lax&&t===null&&i.length===1&&i[0].type===ct.NodeTypes.VariableLookup&&i[0].name===null&&i[0].lookups.length===1){let c=i[0].lookupModes?.[0];return{type:ct.NodeTypes.VariableLookup,name:null,lookups:[i[0].lookups[0]],lookupModes:c?[c]:["subscript"],position:{start:r,end:a},source:this.source}}return{type:ct.NodeTypes.VariableLookup,name:t,lookups:i,lookupModes:s,position:{start:r,end:a},source:this.source}}tryConsumeLaxLookupSeparator(t){let r=this.p,n=t;for(;r<this.tokens.length;){let c=this.tokens[r];if(c.type===H.MarkupTokenType.EndOfString||c.start!==n)return null;if(!((c.type===H.MarkupTokenType.Equality||c.type===H.MarkupTokenType.Comparison)&&/^[=<>!]+$/.test(c.value)))break;n=c.end,r+=1}if(r===this.p)return null;e.WORD_SEGMENT_RE.lastIndex=n;let i=e.WORD_SEGMENT_RE.exec(this.source);if(!i||i.index!==n)return null;let s=i[0],a=n+s.length,o=r;for(;o<this.tokens.length&&this.tokens[o].type!==H.MarkupTokenType.EndOfString&&this.tokens[o].start>=n&&this.tokens[o].end<=a;)o+=1;return this.p=o,{value:s,start:n,end:a}}laxLookupSeparatorFollows(t){let r=this.p+1,n=r,i=t;for(;n<this.tokens.length;){let a=this.tokens[n];if(a.type===H.MarkupTokenType.EndOfString||a.start!==i||!((a.type===H.MarkupTokenType.Equality||a.type===H.MarkupTokenType.Comparison)&&/^[=<>!]+$/.test(a.value)))break;i=a.end,n+=1}if(n===r)return!1;if(!this.inCondition)return!0;e.WORD_SEGMENT_RE.lastIndex=i;let s=e.WORD_SEGMENT_RE.exec(this.source);return!!s&&s.index===i}comparison(){this.lax&&this.inCondition&&this.skipLaxConditionParens();let t=this.valueExpression(),r=this.peek();if(this.lax&&this.inCondition&&r.type!==H.MarkupTokenType.Logical){let i=this.laxConditionOperatorRun(t.position.end);if(i&&!l_(i.value))return this.unknownOperatorComparison(t,i);if(i&&l_(i.value)&&r.type!==H.MarkupTokenType.Comparison&&r.type!==H.MarkupTokenType.Equality)return this.mergedOperatorComparison(t,i)}if(r.type!==H.MarkupTokenType.Comparison&&r.type!==H.MarkupTokenType.Equality)return this.lax&&this.consumeOptional(H.MarkupTokenType.CloseRound),t;if(!l_(r.value)){if(this.lax)return t;throw new yi.LiquidHTMLASTParsingError(`Unknown operator ${r.value}`,this.source,r.start,r.end)}if(this.p+=1,this.lax&&!this.atValueStart())return t;let n=this.valueExpression();return this.lax&&this.consumeOptional(H.MarkupTokenType.CloseRound),{kind:"comparison",left:t,op:r.value,right:n,position:{start:t.position.start,end:n.position.end},source:this.source}}laxConditionOperatorRun(t){let r=t;for(;r<this.markupEnd&&/\s/.test(this.source[r]);)r+=1;let n=/^[=!<>a-z_]+/.exec(this.source.slice(r,this.markupEnd));return n?{value:n[0],start:r,end:r+n[0].length}:null}unknownOperatorComparison(t,r){for(;this.peek().type!==H.MarkupTokenType.EndOfString&&this.peek().start<r.end;)this.p+=1;let n=t;if(this.atValueStart()){let i=this.p;try{n=this.valueExpression()}catch{for(this.p=i;this.peek().type!==H.MarkupTokenType.EndOfString&&this.peek().type!==H.MarkupTokenType.Logical;)this.p+=1;n=t}}return this.consumeOptional(H.MarkupTokenType.CloseRound),{kind:"comparison",left:t,op:r.value,right:n,position:{start:t.position.start,end:n.position.end},source:this.source}}mergedOperatorComparison(t,r){for(;this.peek().type!==H.MarkupTokenType.EndOfString&&this.peek().start<r.end;)this.p+=1;let n=this.source.slice(r.end,this.markupEnd),i=new e((0,H.tokenizeMarkup)(n,r.end),this.source,r.end,this.markupEnd).enableLax(),s={type:ct.NodeTypes.VariableLookup,name:null,lookups:[],position:{start:r.end,end:r.end},source:this.source};for(i.atValueStart()&&(s=i.valueExpression());this.peek().type!==H.MarkupTokenType.EndOfString&&this.peek().start<s.position.end;)this.p+=1;return this.consumeOptional(H.MarkupTokenType.CloseRound),{kind:"comparison",left:t,op:r.value,right:s,position:{start:t.position.start,end:s.position.end},source:this.source}}skipLaxConditionParens(){for(;this.look(H.MarkupTokenType.OpenRound)&&!this.parenAtCursorContainsRange();)this.p+=1}parenAtCursorContainsRange(){let t=0;for(let r=this.p;r<this.tokens.length;r++){let n=this.tokens[r];if(n.type===H.MarkupTokenType.EndOfString)break;if(n.type===H.MarkupTokenType.OpenRound)t+=1;else if(n.type===H.MarkupTokenType.CloseRound){if(t-=1,t===0)break}else if(n.type===H.MarkupTokenType.DotDot&&t===1)return!0}return!1}logicalExpr(){let t=this.comparison(),r=this.peek();if(r.type!==H.MarkupTokenType.Logical)return t;if(!u7(r.value)){if(this.lax)return t;throw new yi.LiquidHTMLASTParsingError(`Unknown logical operator: ${r.value}`,this.source,r.start,r.end)}let n=r.start;this.p+=1;let i=this.logicalExpr();return{kind:"logical",left:t,op:r.value,right:i,opStart:n,position:{start:t.position.start,end:i.position.end},source:this.source}}conditionalExpression(){let t=this.inCondition;this.inCondition=!0;let r;try{r=(0,Vc.adaptConditional)(this.logicalExpr())}finally{this.inCondition=t}return this.lax&&this.discardRemaining(),r.type===ct.NodeTypes.LogicalExpression&&wE(r,this.eosStart()),r}expression(){return(0,Vc.adaptComplex)(this.logicalExpr())}liquidVariable(){let t=this.expression(),r=this.filters(t.position.end);this.lax&&this.discardRemaining();let n=r.length>0?r[r.length-1].position.end:t.position.end,i=t.position.start,a=this.tokens[this.tokens.length-1].start;return{type:ct.NodeTypes.LiquidVariable,expression:t,filters:r,rawSource:this.source.slice(i,n),position:{start:i,end:a},source:this.source}}filters(t=0){let r=[];for(;this.consumeOptional(H.MarkupTokenType.Pipe);){if((this.lax||this.tolerant)&&!this.look(H.MarkupTokenType.Id)){this.skipToNextPipe();continue}let n=this.filter(t);r.push(n),t=n.position.end,this.lax&&!this.isAtEnd()&&!this.look(H.MarkupTokenType.Pipe)&&this.skipToNextPipe()}return r}filter(t){let r=this.consume(H.MarkupTokenType.Id),n=[],i=r.end,s=this.consumeOptional(H.MarkupTokenType.Colon);if(s){i=s.end;let a=this.isAtEnd()||this.look(H.MarkupTokenType.Pipe),o=!/\S/.test(this.source.slice(s.end,this.peek().start));!(a&&o)&&(!(this.lax||this.tolerant)||this.atArgumentStart())&&(n=this.arguments()),n.length>0&&(i=n[n.length-1].position.end)}return{type:ct.NodeTypes.LiquidFilter,name:r.value,args:n,position:{start:t,end:i},source:this.source}}argument(){return this.look(H.MarkupTokenType.Id)&&this.lookaheadForNamedArgument()?this.namedArgument():this.valueExpression()}lookaheadForNamedArgument(){let t=1;for(;this.look(H.MarkupTokenType.Dot,t)&&this.look(H.MarkupTokenType.Id,t+1);)t+=2;return this.look(H.MarkupTokenType.Colon,t)}namedArgument(){let t=this.consume(H.MarkupTokenType.Id),r=t.value;for(;this.consumeOptional(H.MarkupTokenType.Dot);){let i=this.consume(H.MarkupTokenType.Id);r+="."+i.value}this.consume(H.MarkupTokenType.Colon);let n=this.valueExpression();return{type:ct.NodeTypes.NamedArgument,name:r,value:n,position:{start:t.start,end:n.position.end},source:this.source}}arguments(){let t=[];for(t.push(this.argument());this.consumeOptional(H.MarkupTokenType.Comma)&&!((this.lax||this.tolerant)&&!this.atArgumentStart());)t.push(this.argument());return t}namedArguments(){let t=[];for(t.push(this.namedArgument());this.consumeOptional(H.MarkupTokenType.Comma)&&this.look(H.MarkupTokenType.Id);)t.push(this.namedArgument());return t}blockNamedArguments(){let t=[];for(this.pushBlockNamedArgument(t);this.consumeOptional(H.MarkupTokenType.Comma)&&this.look(H.MarkupTokenType.Id);)this.pushBlockNamedArgument(t);return t}pushBlockNamedArgument(t){let r=this.consume(H.MarkupTokenType.Id),n=r.value;for(;this.consumeOptional(H.MarkupTokenType.Dot);){let a=this.consume(H.MarkupTokenType.Id);n+="."+a.value}this.consume(H.MarkupTokenType.Colon);let i=this.blockValueExpression(),s={start:r.start,end:i.position.end};i.type==="BlockArrayLiteral"?t.push({type:ct.NodeTypes.NamedArgument,name:n,value:i,position:s,source:this.source}):t.push({type:ct.NodeTypes.NamedArgument,name:n,value:i,position:s,source:this.source})}blockValueExpression(){return this.look(H.MarkupTokenType.OpenSquare)?this.blockArrayLiteral():this.valueExpression()}assertNotNestedArray(){if(this.look(H.MarkupTokenType.OpenSquare)){let t=this.peek();throw new yi.LiquidHTMLASTParsingError("nested arrays are not supported in block array literal",this.source,t.start,t.end)}}blockArrayLiteral(){let t=this.consume(H.MarkupTokenType.OpenSquare),r=[];for(;!this.look(H.MarkupTokenType.CloseSquare);)this.assertNotNestedArray(),r.push(this.valueExpression()),this.look(H.MarkupTokenType.CloseSquare)||this.consume(H.MarkupTokenType.Comma);let n=this.consume(H.MarkupTokenType.CloseSquare);return{type:"BlockArrayLiteral",elements:r,position:{start:t.start,end:n.end},source:this.source}}computeLastTokenEnd(){for(let t=this.tokens.length-1;t>=0;t--)if(this.tokens[t].type!==H.MarkupTokenType.EndOfString)return this.tokens[t].end;return this.tokens[0]?.start??0}};Jf.MarkupParser=f_;function wE(e,t){e.type===ct.NodeTypes.LogicalExpression&&(e.position={...e.position,end:t},wE(e.right,t))}function l_(e){return Vc.EQUALITY_OPERATORS.has(e)||Vc.COMPARISON_OPERATORS.has(e)}function u7(e){return Vc.LOGICAL_OPERATORS.has(e)}function l7(e){return e in TE.LiquidLiteralValues}});var xE=x(h_=>{"use strict";p();Object.defineProperty(h_,"__esModule",{value:!0});h_.parseLiquidVariableOutput=d7;var p_=tr(),d_=Gr(),f7=_i(),p7=kt();function d7(e){let t=e.consume(p_.TokenType.LiquidVariableOutputOpen);e.accept(p_.TokenType.Text);let r=e.consume(p_.TokenType.LiquidVariableOutputClose),n=e.getSource(),i=n.slice(t.end,r.start);try{let s=(0,p7.tokenizeMarkup)(i,t.end),a=new f7.MarkupParser(s,n);e.isTolerant()&&a.enableTolerant();let o=a.liquidVariable();return a.isAtEnd()?(0,d_.makeLiquidVariableOutput)(t,r,o,n):(0,d_.makeLiquidVariableOutput)(t,r,i.trim(),n)}catch{return(0,d_.makeLiquidVariableOutput)(t,r,i.trim(),n)}}});var Qa=x(Kr=>{"use strict";p();Object.defineProperty(Kr,"__esModule",{value:!0});Kr.parseBlockTag=y7;Kr.parseBlockBody=EE;Kr.parseBranchedBody=AE;Kr.finalizeBranch=Kf;Kr.parseBranchMarkup=OE;Kr.peekTagName=y_;Kr.isBlockTerminator=_7;Kr.consumeEndTag=v7;Kr.isBranchName=NE;var fr=tr(),Ss=Gr(),Un=Ua(),Ya=Wr(),h7=Bn(),m_=_i(),g_=kt(),m7=Ef(),g7=Rc();function y7(e,t,r,n){let i,s=!1,a;try{let c=n.start-r.markupString.length,l=(0,g_.tokenizeMarkup)(r.markupString,c),f=new m_.MarkupParser(l,e.getSource());e.isTolerant()&&f.enableTolerant(),i=t.parse(r.tagName,f,e),f.isAtEnd()?s=!0:(i=void 0,a="unexpected tokens after markup")}catch(c){i=void 0,a=c instanceof Error?c.message:"unknown error"}let o=e.blockAllowUnclosedHtml;e.blockAllowUnclosedHtml=b7.has(r.tagName);try{if(t.branches.length===0){let{children:m,endPosition:d,endWhitespace:g}=EE(e,r);return s?(0,Ss.makeLiquidTagNamed)(r,i,m,d,g):(0,Ss.makeLiquidTagBaseCase)(r,m,d,g,a)}let{branches:c,endPosition:l,endWhitespace:f}=AE(e,r,t);return s?(0,Ss.makeLiquidTagNamed)(r,i,c,l,f):(0,Ss.makeLiquidTagBaseCase)(r,c,l,f,a)}finally{e.blockAllowUnclosedHtml=o}}function EE(e,t){let r=t.tagName,n=[];for(;!e.isAtEnd();){if(e.check(fr.TokenType.LiquidTagOpen)){let s=e.peekTagName();if(s===`end${r}`){let a=e.consumeEndTag();return{children:(0,Un.filterChildren)(Un.ChildFilterMode.Syntactic,n,e.getSource()),endPosition:a.position,endWhitespace:a.whitespace}}if(s&&s.startsWith("end")){let a=s.slice(3);if(e.blockEnv.tagForName(a))throw new Ya.LiquidHTMLASTParsingError(`Attempting to close LiquidTag '${a}' before LiquidTag '${r}' was closed`,e.getSource(),t.blockStartPosition.start,t.blockStartPosition.end)}if(s&&(s==="else"||s==="elsif"||s==="when"))throw new Ya.LiquidHTMLASTParsingError(`Attempting to open LiquidBranch '${s}' before LiquidTag '${r}' was closed`,e.getSource(),t.blockStartPosition.start,t.blockStartPosition.end)}let i=e.getPosition();if(e.blockInAttributeContext&&!e.blockInAttributeValueContext?n.push(...e.parseBranchAttributes()):n.push(e.parseNode()),e.getPosition()===i){if(e.blockAllowUnclosedDocumentNode||PE(e,r),e.check(fr.TokenType.LiquidTagOpen)){n.push(e.parseLiquidTag());continue}break}}{let i=(0,Un.filterChildren)(Un.ChildFilterMode.Syntactic,n,e.getSource()),s=e.peek().start,a={start:s,end:s};if(e.blockAllowUnclosedDocumentNode)return{children:i,endPosition:a,endWhitespace:{start:"",end:""}};throw new Ya.LiquidHTMLASTParsingError(`Attempting to end parsing before LiquidTag '${r}' was closed`,e.getSource(),t.blockStartPosition.start,t.blockStartPosition.end)}}function AE(e,t,r){let n=t.tagName,i=t.blockStartPosition.end,s=[],a=(0,Ss.makeLiquidBranchUnnamed)(i,e.getSource()),o=[],c=e.blockInAttributeValueContext?Un.ChildFilterMode.Preserve:Un.ChildFilterMode.Syntactic;for(;!e.isAtEnd();){if(e.check(fr.TokenType.LiquidTagOpen)){let f=e.peekTagName();if(f===`end${n}`){Kf(a,o,e.peek().start,e.getSource(),c),s.push(a);let m=e.consumeEndTag();return{branches:s,endPosition:m.position,endWhitespace:m.whitespace}}if(NE(f)&&r.branches.includes(f)){Kf(a,o,e.peek().start,e.getSource(),c),s.push(a);let m=e.consume(fr.TokenType.LiquidTagOpen);e.accept(fr.TokenType.Text);let d=e.consume(fr.TokenType.LiquidTagClose),g=(0,Ss.envelopeFromTokens)(m,d,e.getSource()),v=OE(e,f,g);a=(0,Ss.makeLiquidBranchNamed)(g,v),o=[];continue}if(f&&f.startsWith("end")){let m=f.slice(3);if(e.blockEnv.tagForName(m))throw new Ya.LiquidHTMLASTParsingError(`Attempting to close LiquidTag '${m}' before LiquidTag '${n}' was closed`,e.getSource(),t.blockStartPosition.start,t.blockStartPosition.end)}}let l=e.getPosition();if(e.blockInAttributeContext&&!e.blockInAttributeValueContext?o.push(...e.parseBranchAttributes()):o.push(e.parseNode()),e.getPosition()===l){if(e.blockAllowUnclosedDocumentNode||PE(e,n),e.check(fr.TokenType.LiquidTagOpen)){o.push(e.parseLiquidTag());continue}break}}{let l=e.peek().start;Kf(a,o,l,e.getSource(),c),s.push(a);let f={start:l,end:l};if(e.blockAllowUnclosedDocumentNode)return{branches:s,endPosition:f,endWhitespace:{start:"",end:""}};throw new Ya.LiquidHTMLASTParsingError(`Attempting to end parsing before LiquidTag '${n}' was closed`,e.getSource(),t.blockStartPosition.start,t.blockStartPosition.end)}}function Kf(e,t,r,n,i=Un.ChildFilterMode.StripEdges){let s=(0,Un.mergeAdjacentTextNodes)(t,n);if(e.children=(0,Un.filterChildren)(i,t,n),e.blockEndPosition={start:r,end:r},e.position.end=r,s.length>0){let a=s[s.length-1].position.end;a>r&&(e.position.end=a)}}function OE(e,t,r){let n=r.whitespaceEnd==="-"?3:2,s=r.blockStartPosition.end-n-r.markupString.length;switch(t){case"elsif":try{let a=(0,g_.tokenizeMarkup)(r.markupString,s),o=new m_.MarkupParser(a,e.getSource());e.isTolerant()&&o.enableTolerant();let c=(0,m7.elsifBranchParse)(t,o);return o.isAtEnd()?c:r.markupString.trim()}catch{return r.markupString.trim()}case"when":try{let a=(0,g_.tokenizeMarkup)(r.markupString,s),o=new m_.MarkupParser(a,e.getSource());e.isTolerant()&&o.enableTolerant();let c=(0,g7.whenBranchParse)(t,o);return o.isAtEnd()?c:r.markupString.trim()}catch{return r.markupString.trim()}case"else":return"";default:return(0,h7.assertNever)(t)}}function y_(e){if(!e.check(fr.TokenType.LiquidTagOpen))return null;let r=(e.check(fr.TokenType.Text,1)?e.getSource().slice(e.tokenAt(e.getPosition()+1).start,e.tokenAt(e.getPosition()+1).end):"").trimStart(),n=r.search(/\s/);return n===-1?r.trim():r.slice(0,n)}function _7(e){if(!e.check(fr.TokenType.LiquidTagOpen))return!1;let t=y_(e);return t?t.startsWith("end")||t==="elsif"||t==="else"||t==="when":!1}function PE(e,t){let r=e.peek(),n=y_(e);throw new Ya.LiquidHTMLASTParsingError(`Unexpected Liquid tag '${n??r.type}' inside LiquidTag '${t}'`,e.getSource(),r.start,r.end)}function v7(e){let t=e.consume(fr.TokenType.LiquidTagOpen);e.accept(fr.TokenType.Text);let r=e.consume(fr.TokenType.LiquidTagClose),n=t.end-t.start>2?"-":"",i=r.end-r.start>2?"-":"";return{position:{start:t.start,end:r.end},whitespace:{start:n,end:i}}}function NE(e){return e==="elsif"||e==="else"||e==="when"}var b7=new Set(["if","unless","case"])});var T_=x(bi=>{"use strict";p();Object.defineProperty(bi,"__esModule",{value:!0});bi.ParamTokenType=bi.LiquidDocTokenType=void 0;bi.tokenizeLiquidDoc=k7;bi.tokenizeParamContent=S7;var Za;(function(e){e.Annotation="Annotation",e.TextLine="TextLine",e.Newline="Newline",e.EndOfInput="EndOfInput"})(Za||(bi.LiquidDocTokenType=Za={}));var vi;(function(e){e.Type="Type",e.OptionalName="OptionalName",e.Word="Word",e.Dash="Dash",e.Text="Text",e.EndOfInput="EndOfInput"})(vi||(bi.ParamTokenType=vi={}));function k7(e,t){let r=[],n=0,i=!1;for(;n<e.length;){if(v_.lastIndex=n,v_.test(e)){let f=v_.lastIndex;r.push({type:Za.Newline,value:e.slice(n,f),start:n+t,end:f+t}),n=f,i=!1;continue}Xa.lastIndex=n;let s=Xa.test(e)?Xa.lastIndex:n;if(__.lastIndex=s,__.test(e)){let f=__.lastIndex;r.push({type:Za.Annotation,value:e.slice(s+1,f),start:s+t,end:f+t}),n=f,i=!0,Xa.lastIndex=n,Xa.test(e)&&(n=Xa.lastIndex);continue}let a=e.indexOf(`
26
- `,n),o=a===-1?e.length:a,c=o;if(!i){let f=e.slice(n,o);qE.lastIndex=0;let m=qE.exec(f);m&&(c=n+m.index+1)}let l=e.slice(n,c);l.length>0&&r.push({type:Za.TextLine,value:l,start:n+t,end:c+t}),n=c,i=!1}return r.push({type:Za.EndOfInput,value:"",start:e.length+t,end:e.length+t}),r}function S7(e,t){let r=[],n=0;for(;n<e.length;){if(S_.lastIndex=n,S_.test(e)){n=S_.lastIndex;continue}let i=T7(e,n);if(i!==void 0){r.push({type:vi.Type,value:e.slice(n+1,i-1),start:n+t,end:i+t}),n=i;continue}if(b_.lastIndex=n,b_.test(e)){let a=b_.lastIndex;r.push({type:vi.OptionalName,value:e.slice(n+1,a-1),start:n+t,end:a+t}),n=a;continue}if(e[n]==="-"&&(n+1>=e.length||e[n+1]===" "||e[n+1]===" ")){r.push({type:vi.Dash,value:"-",start:n+t,end:n+1+t}),n+=1;continue}if(k_.lastIndex=n,k_.test(e)){let a=k_.lastIndex;r.push({type:vi.Word,value:e.slice(n,a),start:n+t,end:a+t}),n=a;continue}let s=e.slice(n);r.push({type:vi.Text,value:s,start:n+t,end:e.length+t}),n=e.length}return r.push({type:vi.EndOfInput,value:"",start:e.length+t,end:e.length+t}),r}function T7(e,t){if(e[t]==="{")for(let r=t+1;r<e.length;r++){let n=e[r];if(n==="'"||n==='"'){let i=e.indexOf(n,r+1);if(i===-1){let s=e.indexOf("}",r+1);return s===-1?void 0:s+1}r=i;continue}if(n==="}")return r+1}}var __=/@(\w+)/y,Xa=/[ \t]+/y,v_=/\r?\n/y,qE=/.@\w+/g,b_=/\[([^\]]*)\]/y,k_=/[\w][\w-]*/y,S_=/[ \t]+/y});var LE=x(Ts=>{"use strict";p();Object.defineProperty(Ts,"__esModule",{value:!0});Ts.makeTextNode=w7;Ts.makeLiquidDocParamNode=x7;Ts.makeLiquidDocDescriptionNode=E7;Ts.makeLiquidDocExampleNode=A7;Ts.makeLiquidDocPromptNode=O7;var $c=Qe();function w7(e,t,r,n){return{type:$c.NodeTypes.TextNode,value:e,position:{start:t,end:r},source:n}}function x7(e,t,r,n,i,s,a){return{type:$c.NodeTypes.LiquidDocParamNode,name:"param",paramName:e,paramType:t,paramDescription:r,required:n,position:{start:i,end:s},source:a}}function E7(e,t,r,n,i,s){return{type:$c.NodeTypes.LiquidDocDescriptionNode,name:"description",content:e,isImplicit:t,isInline:r,position:{start:n,end:i},source:s}}function A7(e,t,r,n,i){return{type:$c.NodeTypes.LiquidDocExampleNode,name:"example",content:e,isInline:t,position:{start:r,end:n},source:i}}function O7(e,t,r,n){return{type:$c.NodeTypes.LiquidDocPromptNode,name:"prompt",content:e,position:{start:t,end:r},source:n}}});var IE=x(Uc=>{"use strict";p();Object.defineProperty(Uc,"__esModule",{value:!0});Uc.LiquidDocParser=void 0;Uc.parseLiquidDoc=N7;var ke=T_(),CE=T_(),Fe=LE(),P7=Bn();function N7(e,t,r){let n=(0,CE.tokenizeLiquidDoc)(e,t);return new Yf(n,r).parse()}var Yf=class{tokens;source;p;constructor(t,r){this.tokens=t,this.source=r,this.p=0}parse(){let t=[];for(this.skipBlankLines(),this.check(ke.LiquidDocTokenType.TextLine)&&t.push(this.parseImplicitDescription()),this.skipBlankLines();!this.isAtEnd();){if(this.check(ke.LiquidDocTokenType.Newline)){this.skipNewlines();continue}if(this.check(ke.LiquidDocTokenType.Annotation)){t.push(this.parseAnnotation());continue}if(this.check(ke.LiquidDocTokenType.TextLine)&&this.peek().value.trim()===""){this.advance();continue}if(this.check(ke.LiquidDocTokenType.TextLine)){let{value:n,startPos:i,endPos:s}=this.collectContentLines({trimTrailingNewlines:!0});n.trim().length>0&&t.push((0,Fe.makeTextNode)(n,i,s,this.source));continue}let r=this.advance();t.push((0,Fe.makeTextNode)(r.value,r.start,r.end,this.source))}return t}parseImplicitDescription(){let{value:t,startPos:r,endPos:n}=this.collectContentLines(),i=(0,Fe.makeTextNode)(t,r,n,this.source);return(0,Fe.makeLiquidDocDescriptionNode)(i,!0,!0,r,n,this.source)}parseAnnotation(){let t=this.consume(ke.LiquidDocTokenType.Annotation),r=t.value;if(r!==pr.Description&&r.startsWith(pr.Description))return this.parseGluedDescription(t);if(!q7(r))return this.parseUnsupportedAnnotation(t);switch(r){case pr.Param:return this.parseParam(t);case pr.Description:return this.parseDescription(t);case pr.Example:return this.parseExample(t);case pr.Prompt:return this.parsePrompt(t);default:(0,P7.assertNever)(r)}}parseParam(t){let r=t.start,n=this.accept(ke.LiquidDocTokenType.TextLine);if(!n){let y=(0,Fe.makeTextNode)("",t.end,t.end,this.source);return(0,Fe.makeLiquidDocParamNode)(y,null,null,!0,r,t.end,this.source)}let i=new w_((0,CE.tokenizeParamContent)(n.value,n.start)),s=null,a=i.accept(ke.ParamTokenType.Type);a&&(s=(0,Fe.makeTextNode)(a.value,a.start+1,a.end-1,this.source));let o,c,l=i.accept(ke.ParamTokenType.OptionalName);if(l)c=!1,o=(0,Fe.makeTextNode)(l.value,l.start+1,l.end-1,this.source);else{c=!0;let y=i.accept(ke.ParamTokenType.Word);y?o=(0,Fe.makeTextNode)(y.value,y.start,y.end,this.source):o=(0,Fe.makeTextNode)("",t.end,t.end,this.source)}let f=null,m=i.accept(ke.ParamTokenType.Dash),d=-1,g=-1;for(;!i.isAtEnd();){let y=i.advance();d===-1&&(d=y.start),g=y.end}let v=d!==-1?this.source.slice(d,g):"",{value:b,startPos:_,endPos:k}=this.collectContentLines({stopAtParagraphBreak:!0,trimTrailingNewlines:!0}),w=b.trim().length>0;if(v||w){let y=w?v+b:v,A=d!==-1?d:m?m.end+1:t.end,O=w?k:g;f=(0,Fe.makeTextNode)(y,A,O,this.source)}let T=f?.position.end??n.end;return(0,Fe.makeLiquidDocParamNode)(o,s,f,c,r,T,this.source)}parseDescription(t){let r=t.start,n=this.accept(ke.LiquidDocTokenType.TextLine);if(n!==null){let{value:f,endPos:m}=this.collectContentLines(),d=f.trim().length>0,g=d?n.value+f:n.value,v=d?m:n.end,b=(0,Fe.makeTextNode)(g,n.start,v,this.source);return(0,Fe.makeLiquidDocDescriptionNode)(b,!1,!0,r,v,this.source)}this.skipBlankLines();let{value:s,startPos:a,endPos:o}=this.collectContentLines(),c=s?a:t.end,l=(0,Fe.makeTextNode)(s||"",c,s?o:c,this.source);return(0,Fe.makeLiquidDocDescriptionNode)(l,!1,!1,r,s?o:c,this.source)}parseGluedDescription(t){let r=t.start,n=r+1+pr.Description.length,i=this.accept(ke.LiquidDocTokenType.TextLine),{value:s,endPos:a}=this.collectContentLines(),o=s.trim().length>0,c;o?c=a:i?c=i.end:c=t.end;let l=(0,Fe.makeTextNode)(this.source.slice(n,c),n,c,this.source);return(0,Fe.makeLiquidDocDescriptionNode)(l,!1,!0,r,c,this.source)}parseExample(t){let r=t.start,n=this.accept(ke.LiquidDocTokenType.TextLine);if(n!==null){let{value:f,endPos:m}=this.collectContentLines(),d=f.trim().length>0,g=d?n.value+f:n.value,v=d?m:n.end,b=(0,Fe.makeTextNode)(g,n.start,v,this.source);return(0,Fe.makeLiquidDocExampleNode)(b,!0,r,v,this.source)}this.skipBlankLines();let{value:s,startPos:a,endPos:o}=this.collectContentLines(),c=s?a:t.end,l=(0,Fe.makeTextNode)(s||"",c,s?o:c,this.source);return(0,Fe.makeLiquidDocExampleNode)(l,!1,r,s?o:c,this.source)}parsePrompt(t){let r=t.start,{value:n,startPos:i,endPos:s}=this.collectContentLines(),a=n?i:t.end,o=(0,Fe.makeTextNode)(n||"",a,n?s:a,this.source);return(0,Fe.makeLiquidDocPromptNode)(o,r,n?s:a,this.source)}parseUnsupportedAnnotation(t){let r=t.start,n=this.accept(ke.LiquidDocTokenType.TextLine);if(n){let s=this.source.slice(r,n.end);return(0,Fe.makeTextNode)(s,r,n.end,this.source)}let i="@"+t.value;return(0,Fe.makeTextNode)(i,r,t.end,this.source)}peek(){return this.tokens[this.p]}consume(t){let r=this.peek();if(r.type!==t)throw new Error(`Expected ${t} but found ${r.type} (${JSON.stringify(r.value)})`);return this.advance(),r}accept(t){return this.peek().type!==t?null:this.advance()}check(t){return this.tokens[this.p].type===t}isAtEnd(){return this.check(ke.LiquidDocTokenType.EndOfInput)}advance(){return this.tokens[this.p++]}skipNewlines(){let t=!1;for(;this.check(ke.LiquidDocTokenType.Newline);)this.advance(),t=!0;return t}skipBlankLines(){for(;!this.isAtEnd();){if(this.check(ke.LiquidDocTokenType.Newline)){this.advance();continue}if(this.check(ke.LiquidDocTokenType.TextLine)&&this.peek().value.trim()===""){this.advance();continue}break}}collectContentLines(t={}){let{stopAtParagraphBreak:r=!1,trimTrailingNewlines:n=!1}=t,i="",s=this.tokens[this.p]?.start??this.tokens[this.p-1].end,a=s;for(;!this.isAtEnd();){let o=this.peek();if(this.check(ke.LiquidDocTokenType.Annotation))break;if(this.check(ke.LiquidDocTokenType.Newline)){let l=this.p+1;for(;l<this.tokens.length;){let m=this.tokens[l];if(m.type===ke.LiquidDocTokenType.Newline){l++;continue}if(m.type===ke.LiquidDocTokenType.TextLine&&m.value.trim()===""){l++;continue}break}let f=l-this.p;if(r&&f>=2&&l<this.tokens.length&&this.tokens[l].type===ke.LiquidDocTokenType.TextLine&&this.tokens[l].value.trim()!=="")break;if(l<this.tokens.length&&this.tokens[l].type===ke.LiquidDocTokenType.Annotation){for(;this.p<l&&(this.check(ke.LiquidDocTokenType.Newline)||this.check(ke.LiquidDocTokenType.TextLine)&&this.peek().value.trim()==="");)n||(this.check(ke.LiquidDocTokenType.Newline)&&(i+=`
27
- `),a=this.peek().end),this.advance();break}if(l>=this.tokens.length||this.tokens[l].type===ke.LiquidDocTokenType.EndOfInput){for(;!this.isAtEnd()&&(this.check(ke.LiquidDocTokenType.Newline)||this.check(ke.LiquidDocTokenType.TextLine)&&this.peek().value.trim()==="");)n||(this.check(ke.LiquidDocTokenType.Newline)&&(i+=`
28
- `),a=this.peek().end),this.advance();break}i+=`
29
- `,a=o.end,this.advance();continue}if(this.check(ke.LiquidDocTokenType.TextLine)&&o.value.trim()===""){this.advance();continue}if(i===""){let l=o.value.length-o.value.trimStart().length;s=o.start+l}let c=i===""?o.value.trimStart():o.value;i+=c,a=o.end,this.advance()}return{value:i,startPos:s,endPos:a}}};Uc.LiquidDocParser=Yf;var pr;(function(e){e.Param="param",e.Description="description",e.Example="example",e.Prompt="prompt"})(pr||(pr={}));function q7(e){return e===pr.Param||e===pr.Description||e===pr.Example||e===pr.Prompt}var w_=class{tokens;p=0;constructor(t){this.tokens=t}accept(t){return this.tokens[this.p].type!==t?null:this.tokens[this.p++]}check(t){return this.tokens[this.p].type===t}isAtEnd(){return this.check(ke.ParamTokenType.EndOfInput)}current(){return this.tokens[this.p]}advance(){return this.tokens[this.p++]}}});var Xf=x(ws=>{"use strict";p();Object.defineProperty(ws,"__esModule",{value:!0});ws.parseRawTag=I7;ws.parseLiquidInRange=ME;ws.parseRawTagBody=RE;ws.scanForEndTag=DE;ws.rawMarkupKindForTag=jE;var eo=tr(),Hc=Gr(),Qf=Ua(),ki=Ka(),L7=Wr(),C7=IE();function I7(e,t,r,n){let i=r.tagName,s=`end${i}`,a=DE(e,s);if(!a)throw new L7.LiquidHTMLASTParsingError(`Attempting to end parsing before LiquidRawTag '${i}' was closed`,e.getSource(),r.blockStartPosition.start,r.blockStartPosition.end);let o=n.end,c=a.tagStart,l=e.getSource().slice(o,c),f=RE(e,t,i,o,c),m=(0,Hc.makeRawMarkup)(jE(i,l),l,f,o,c,e.getSource());e.resliceTokensFrom(a.tagEnd);let d={start:a.tagStart,end:a.tagEnd};return(0,Hc.makeLiquidRawTag)(r,m,d,{start:a.wsStart,end:a.wsEnd})}function ME(e,t,r){let n=[],i=e.getSource(),s=e.rawParseHtml;e.rawParseHtml=!1;let a=e.getPosition();for(;a<e.tokenCount()&&e.tokenAt(a).start<r;){let o=e.tokenAt(a);if(o.type===eo.TokenType.LiquidVariableOutputOpen||o.type===eo.TokenType.LiquidTagOpen){let c=o.type===eo.TokenType.LiquidVariableOutputOpen?eo.TokenType.LiquidVariableOutputClose:eo.TokenType.LiquidTagClose,l=a+1;for(;l<e.tokenCount()&&e.tokenAt(l).type!==c;)l++;if(!(l<e.tokenCount()&&e.tokenAt(l).end<=r)){for(n.push((0,Hc.makeTextNode)(i.slice(o.start,r),o.start,r,i));a<e.tokenCount()&&e.tokenAt(a).start<r;)a++;break}e.setPosition(a),n.push(o.type===eo.TokenType.LiquidVariableOutputOpen?e.parseLiquidVariableOutput():e.parseLiquidTag()),a=e.getPosition();continue}n.push((0,Hc.makeTextNode)(i.slice(o.start,o.end),o.start,o.end,i)),a++}return e.rawParseHtml=s,e.setPosition(a),(0,Qf.filterChildren)(Qf.ChildFilterMode.Syntactic,n,i)}function RE(e,t,r,n,i){if(r==="doc"){let c=e.getSource().slice(n,i);return(0,C7.parseLiquidDoc)(c,n,e.getSource())}if(t.parseLiquidInBody===!0)return ME(e,n,i);if(n>=i)return[];let s=e.getSource(),a=s.slice(n,i),o=(0,Hc.makeTextNode)(a,n,i,s);return(0,Qf.filterChildren)(Qf.ChildFilterMode.Syntactic,[o],s)}function DE(e,t){let r=e.getSource(),n=e.tokenAt(e.getPosition()).start;if(t==="endcomment"||t==="enddoc")return M7(r,n,t);let s=new RegExp(`\\{%(-?)\\s*${t}\\s*(-?)%\\}`).exec(r.slice(n));if(!s)return null;let a=n+s.index,o=a+s[0].length,c=s[1]==="-"?"-":"",l=s[2]==="-"?"-":"";return{tagStart:a,tagEnd:o,wsStart:c,wsEnd:l}}function M7(e,t,r){let n=r.slice(3),i=new RegExp(`\\{%(-?)\\s*(${n}|${r}|raw|endraw)\\b\\s*(-?)%\\}`,"g");i.lastIndex=t;let s=0,a=!1,o;for(;(o=i.exec(e))!==null;){let c=o[2];if(a){c==="endraw"&&(a=!1);continue}if(c==="raw")a=!0;else if(c===n)s++;else if(c===r){if(s===0){let l=o.index,f=l+o[0].length,m=o[1]==="-"?"-":"",d=o[3]==="-"?"-":"";return{tagStart:l,tagEnd:f,wsStart:m,wsEnd:d}}s--}}return null}function jE(e,t=""){switch(e){case"javascript":return ki.RawMarkupKinds.javascript;case"stylesheet":return/\{[{%]/.test(t)?ki.RawMarkupKinds.text:ki.RawMarkupKinds.css;case"style":return/\{[{%]/.test(t)?ki.RawMarkupKinds.text:ki.RawMarkupKinds.css;case"schema":return ki.RawMarkupKinds.json;case"raw":case"comment":case"doc":return ki.RawMarkupKinds.text;default:return ki.RawMarkupKinds.text}}});var VE=x(ep=>{"use strict";p();Object.defineProperty(ep,"__esModule",{value:!0});ep.parseHybridTag=F7;ep.scanForEndTagNested=BE;var FE=tr(),Zf=Gr(),R7=_i(),D7=kt(),j7=Qa();function F7(e,t,r,n){let i,s=!1,a;try{let m=n.start-r.markupString.length,d=(0,D7.tokenizeMarkup)(r.markupString,m),g=new R7.MarkupParser(d,e.getSource());e.isTolerant()&&g.enableTolerant(),i=t.parse(r.tagName,g,e),g.isAtEnd()?s=!0:(i=void 0,a="unexpected tokens after markup")}catch(m){i=void 0,a=m instanceof Error?m.message:"unknown error"}if(BE(e,r.tagName)===-1)return s?(0,Zf.makeLiquidTagNamed)(r,i):(0,Zf.makeLiquidTagBaseCase)(r,void 0,void 0,void 0,a);let{children:c,endPosition:l,endWhitespace:f}=(0,j7.parseBlockBody)(e,r);return s?(0,Zf.makeLiquidTagNamed)(r,i,c,l,f):(0,Zf.makeLiquidTagBaseCase)(r,c,l,f,a)}function BE(e,t){let r=0,n=`end${t}`,i=e.getSource(),s=e.tokenCount(),a=e.getPosition();for(let o=a;o<s;o++){if(e.tokenAt(o).type!==FE.TokenType.LiquidTagOpen)continue;let c=o+1;if(c>=s||e.tokenAt(c).type!==FE.TokenType.Text)continue;let l=e.tokenAt(c),m=i.slice(l.start,l.end).trimStart(),d=m.search(/\s/),g=d===-1?m.trim():m.slice(0,d);if(g===t)r++;else if(g===n){if(r===0)return o;r--}}return-1}});var $E=x(E_=>{"use strict";p();Object.defineProperty(E_,"__esModule",{value:!0});E_.parseLiquidTag=G7;var x_=tr(),to=Gr(),tp=Ja(),B7=Wr(),V7=Bn(),$7=_i(),U7=kt(),H7=Qa(),z7=Xf(),W7=VE();function G7(e){let t=e.consume(x_.TokenType.LiquidTagOpen);e.accept(x_.TokenType.Text);let r=e.consume(x_.TokenType.LiquidTagClose),n=(0,to.envelopeFromTokens)(t,r,e.getSource());if(n.tagName.startsWith("#")){let s=n.tagName.slice(1)+n.markupString,a=n.markupEnd-s.length;return(0,to.makeLiquidTagBaseCase)({...n,tagName:"#",markupString:s,markupOffset:a})}if(n.tagName.startsWith("end")){let s=n.tagName.slice(3);if(e.tagForName(s))throw new B7.LiquidHTMLASTParsingError(`Attempting to close LiquidTag '${s}' before it was opened without a matching '${s}'`,e.getSource(),t.start,r.end)}let i=e.tagForName(n.tagName);if(!i)return(0,to.makeLiquidTagBaseCase)(n);switch(i.kind){case tp.TagKind.Tag:return J7(e,i,n,r);case tp.TagKind.Block:return(0,H7.parseBlockTag)(e,i,n,r);case tp.TagKind.Raw:return(0,z7.parseRawTag)(e,i,n,r);case tp.TagKind.Hybrid:return(0,W7.parseHybridTag)(e,i,n,r);default:return(0,V7.assertNever)(i)}}function J7(e,t,r,n){let i;try{let s=n.start-r.markupString.length,a=s+r.markupString.length,o=(0,U7.tokenizeMarkup)(r.markupString,s),c=new $7.MarkupParser(o,e.getSource(),s,a);e.isTolerant()&&c.enableTolerant();let l=t.parse(r.tagName,c,e);return c.isAtEnd()?(0,to.makeLiquidTagNamed)(r,l):(0,to.makeLiquidTagBaseCase)(r,void 0,void 0,void 0,"unexpected tokens after markup")}catch(s){return i=s instanceof Error?s.message:"unknown error",(0,to.makeLiquidTagBaseCase)(r,void 0,void 0,void 0,i)}}});var A_=x(Or=>{"use strict";p();Object.defineProperty(Or,"__esModule",{value:!0});Or.HTML_RAW_TAGS=Or.VOID_ELEMENTS=Or.RAW_TAGS=Or.BLOCKS=Or.TAGS_WITHOUT_MARKUP=void 0;Or.TAGS_WITHOUT_MARKUP=["style","schema","javascript","else","break","continue","comment","raw","doc"];Or.BLOCKS=["if","unless","for","case","tablerow","capture","form","paginate","block","ifchanged","partial"];Or.RAW_TAGS=["raw","javascript","schema","stylesheet","style","comment","doc"];Or.VOID_ELEMENTS=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];Or.HTML_RAW_TAGS=["script","style","svg"]});var GE=x(St=>{"use strict";p();Object.defineProperty(St,"__esModule",{value:!0});St.parseHtmlElement=K7;St.parseHtmlRawBody=UE;St.parseHtmlComment=Y7;St.parseHtmlDoctype=Q7;St.parseOrphanedHtmlCloseTag=X7;St.parseHtmlDanglingMarkerClose=Z7;St.parseBranchAttributesImpl=e5;St.parseCompoundName=Ti;St.parseAttributes=HE;St.parseQuotedAttributeValue=P_;St.parseUnquotedAttributeValue=N_;St.consumeTextPrefix=q_;St.extractPlainName=zc;St.peekHtmlCloseTagMatches=s5;St.scanForHtmlCloseTag=zE;St.rawMarkupKindForHtmlTag=WE;var se=tr(),dt=Gr(),ro=Ua(),rp=Qe(),Si=Ka(),O_=A_(),xs=Wr();function K7(e){let t=e.getSource(),r=e.peek().start;e.consume(se.TokenType.HtmlTagOpen);let n=Ti(e),i=HE(e);if(e.accept(se.TokenType.HtmlSelfClose)){let v=e.tokenAt(e.getPosition()-1).end,b={start:r,end:v};return(0,dt.makeHtmlSelfClosingElement)(n,i,b,t)}e.consume(se.TokenType.HtmlTagClose);let s=e.tokenAt(e.getPosition()-1).end,a={start:r,end:s},o=zc(n);if(o!==null&&O_.VOID_ELEMENTS.includes(o.toLowerCase()))return(0,dt.makeHtmlVoidElement)(o,i,a,t);if(o!==null&&O_.HTML_RAW_TAGS.includes(o.toLowerCase()))return UE(e,o,i,a);let c=[];for(;!e.isAtEnd()&&!e.check(se.TokenType.HtmlCloseTagOpen);){if(e.isBlockTerminator()){if(!e.htmlAllowUnclosedHtml){let v=e.peekTagName();throw new xs.LiquidHTMLASTParsingError(`Attempting to close LiquidTag '${v}' before HtmlElement '${o||"compound"}' was closed`,t,r,s)}break}c.push(e.parseNode())}if(e.isAtEnd()||e.htmlAllowUnclosedHtml&&e.isBlockTerminator()){if(!e.htmlAllowUnclosedHtml)throw new xs.LiquidHTMLASTParsingError(`Attempting to end parsing before HtmlElement '${o||"compound"}' was closed`,t,r,s);let v=c.length>0?c[c.length-1].position.end:s,b={start:v,end:v},_=(0,ro.filterChildren)(ro.ChildFilterMode.Syntactic,c,t);return(0,dt.makeHtmlElement)(n,i,_,a,b,t)}let l=e.peek().start;e.consume(se.TokenType.HtmlCloseTagOpen);let f=Ti(e);for(;e.check(se.TokenType.Text);){let v=t.slice(e.tokenAt(e.getPosition()).start,e.tokenAt(e.getPosition()).end);if(/^\s*$/.test(v))e.advance();else break}e.consume(se.TokenType.HtmlTagClose);let m=e.tokenAt(e.getPosition()-1).end;if(!(0,ro.compoundNamesMatch)(n,f)){let v=zc(f);throw new xs.LiquidHTMLASTParsingError(`Attempting to close HtmlElement '${v||"compound"}' before HtmlElement '${o||"compound"}' was closed`,t,l,m)}let d={start:l,end:m},g=(0,ro.filterChildren)(ro.ChildFilterMode.Syntactic,c,t);return(0,dt.makeHtmlElement)(n,i,g,a,d,t)}function UE(e,t,r,n){let i=e.getSource(),s=n.end,a=zE(e,t);if(a===-1)throw new xs.LiquidHTMLASTParsingError(`Attempting to end parsing before HtmlRawNode '${t}' was closed`,i,n.start,n.end);let o=e.tokenAt(a).start,c=i.slice(s,o),l=e.parseLiquidInRange(s,o),f=WE(t,r,c),m=(0,dt.makeRawMarkup)(f,c,l,s,o,i);e.seekToSourceOffset(o);let d=e.peek().start;for(e.consume(se.TokenType.HtmlCloseTagOpen);e.check(se.TokenType.Text);)e.advance();let g=e.consume(se.TokenType.HtmlTagClose).end,v={start:d,end:g};return(0,dt.makeHtmlRawNode)(t,r,m,n,v,i)}function Y7(e){let t=e.getSource(),r=e.consume(se.TokenType.HtmlCommentOpen),n=r.end,i=t.indexOf("-->",n);if(i===-1)throw new xs.LiquidHTMLASTParsingError("Attempting to end parsing before HtmlComment '<!--' was closed",t,r.start,r.end);let s=i,a=i+3,o=t.slice(n,s).trim();return e.seekToSourceOffset(a),(0,dt.makeHtmlComment)(o,r.start,a,t)}function Q7(e){let t=e.getSource(),r=e.consume(se.TokenType.HtmlDoctypeOpen);for(;!e.isAtEnd()&&!e.check(se.TokenType.HtmlTagClose);)e.advance();let n=e.consume(se.TokenType.HtmlTagClose),i=t.slice(r.end,n.start).trim(),s=i.match(/^doctype\s+html\s*(.*)/i),a=s?s[1].length>0?s[1]:null:i;return(0,dt.makeHtmlDoctype)(a,r.start,n.end,t)}function X7(e){let t=e.getSource(),r=e.peek().start;e.consume(se.TokenType.HtmlCloseTagOpen);let n=Ti(e);for(;e.check(se.TokenType.Text);){let a=t.slice(e.tokenAt(e.getPosition()).start,e.tokenAt(e.getPosition()).end);if(/^\s*$/.test(a))e.advance();else break}let i=e.consume(se.TokenType.HtmlTagClose).end,s=zc(n);throw new xs.LiquidHTMLASTParsingError(`Attempting to close HtmlElement '${s||"compound"}' before it was opened`,t,r,i)}function Z7(e){let t=e.getSource(),r=e.peek().start;e.consume(se.TokenType.HtmlCloseTagOpen);let n=Ti(e);for(;e.check(se.TokenType.Text);){let s=t.slice(e.tokenAt(e.getPosition()).start,e.tokenAt(e.getPosition()).end);if(/^\s*$/.test(s))e.advance();else break}e.consume(se.TokenType.HtmlTagClose);let i=e.tokenAt(e.getPosition()-1).end;return(0,dt.makeHtmlDanglingMarkerClose)(n,r,i,t)}function e5(e){let t=[],r=e.getSource();for(;!e.isAtEnd()&&!(e.check(se.TokenType.HtmlTagClose)||e.check(se.TokenType.HtmlSelfClose)||e.isBlockTerminator());){if(e.check(se.TokenType.Text)){let s=e.tokenAt(e.getPosition()),a=r.slice(s.start,s.end);if(/^\s+$/.test(a)){e.advance();continue}let o=a.search(/\S/);o>0&&(s.start=s.start+o)}if(e.check(se.TokenType.LiquidTagOpen)){let s=e.htmlInAttributeContext;e.htmlInAttributeContext=!0,t.push(e.parseLiquidTag()),e.htmlInAttributeContext=s;continue}if(e.check(se.TokenType.LiquidVariableOutputOpen)){t.push(e.parseLiquidVariableOutput());continue}let n=e.peek().start,i=Ti(e);if(i.length===0){e.advance();continue}if(e.accept(se.TokenType.HtmlEquals)){let s=e.accept(se.TokenType.HtmlQuoteOpen);if(s){let a=r[s.start],o=s.end,c=P_(e),l=e.consume(se.TokenType.HtmlQuoteClose),f=l.start,m=l.end,d={start:o,end:f};a==='"'?t.push((0,dt.makeAttrDoubleQuoted)(i,c,d,n,m,r)):t.push((0,dt.makeAttrSingleQuoted)(i,c,d,n,m,r))}else{let{value:a,end:o}=N_(e),c={start:a.length>0?a[0].position.start:e.peek().start,end:o};t.push((0,dt.makeAttrUnquoted)(i,a,c,n,o,r))}}else{let a=i[i.length-1].position.end;t.push((0,dt.makeAttrEmpty)(i,n,a,r))}}return t}function Ti(e){let t=[];for(;!e.isAtEnd();){if(e.check(se.TokenType.LiquidVariableOutputOpen)){t.push(e.parseLiquidVariableOutput());continue}if(!e.htmlInAttributeContext&&e.check(se.TokenType.LiquidTagOpen)&&!t.some(n=>n.type===rp.NodeTypes.LiquidVariableOutput)&&!r5(e,t)){t.push(e.parseLiquidTag());continue}let r=q_(e);if(r!==null){t.push(r);continue}break}return t}function HE(e){let t=e.htmlInAttributeContext;e.htmlInAttributeContext=!0;try{return t5(e)}finally{e.htmlInAttributeContext=t}}function t5(e){let t=[],r=e.getSource();for(;!e.isAtEnd()&&!(e.check(se.TokenType.HtmlTagClose)||e.check(se.TokenType.HtmlSelfClose));){if(e.check(se.TokenType.Text)){let s=e.tokenAt(e.getPosition()),a=r.slice(s.start,s.end);if(/^\s+$/.test(a)){e.advance();continue}let o=a.search(/\S/);o>0&&(s.start=s.start+o)}if(e.check(se.TokenType.LiquidTagOpen)){let s=e.htmlInAttributeContext;e.htmlInAttributeContext=!0,t.push(e.parseLiquidTag()),e.htmlInAttributeContext=s;continue}if(e.check(se.TokenType.LiquidVariableOutputOpen)){t.push(e.parseLiquidVariableOutput());continue}let n=e.peek().start,i=Ti(e);if(i.length===0){e.advance();continue}if(e.accept(se.TokenType.HtmlEquals)){let s=e.accept(se.TokenType.HtmlQuoteOpen);if(s){let a=r[s.start],o=s.end,c=P_(e),l=e.consume(se.TokenType.HtmlQuoteClose),f=l.start,m=l.end,d={start:o,end:f};a==='"'||a==="\u201C"||a==="\u201D"?t.push((0,dt.makeAttrDoubleQuoted)(i,c,d,n,m,r)):t.push((0,dt.makeAttrSingleQuoted)(i,c,d,n,m,r))}else{let{value:a,end:o}=N_(e),c={start:a.length>0?a[0].position.start:e.peek().start,end:o};t.push((0,dt.makeAttrUnquoted)(i,a,c,n,o,r))}}else{let a=i[i.length-1].position.end;t.push((0,dt.makeAttrEmpty)(i,n,a,r))}}return t}function P_(e){let t=[],r=e.getSource();for(;!e.isAtEnd()&&!e.check(se.TokenType.HtmlQuoteClose);)if(e.check(se.TokenType.LiquidVariableOutputOpen))t.push(e.parseLiquidVariableOutput());else if(e.check(se.TokenType.LiquidTagOpen)){let n=e.peekTagName();if(n&&(c5.has(n)||n.startsWith("end"))){let s=e.peek();throw new xs.LiquidHTMLASTParsingError(`Unexpected Liquid tag '${n}' inside quoted attribute value`,r,s.start,s.end)}let i=e.htmlInAttributeValueContext;e.htmlInAttributeValueContext=!0,t.push(e.parseLiquidTag()),e.htmlInAttributeValueContext=i}else if(e.check(se.TokenType.Text)){let n=e.advance();t.push((0,dt.makeTextNode)(r.slice(n.start,n.end),n.start,n.end,r))}else break;return t}function N_(e){let t=[],r=e.peek().start;for(;!e.isAtEnd()&&!(e.check(se.TokenType.HtmlTagClose)||e.check(se.TokenType.HtmlSelfClose));){if(e.check(se.TokenType.Text)){let n=e.tokenAt(e.getPosition()),s=e.getSource().slice(n.start,n.end);if(/^\s/.test(s))break;let a=q_(e);if(a){t.push(a),r=a.position.end;continue}break}if(e.check(se.TokenType.LiquidVariableOutputOpen)){let n=e.parseLiquidVariableOutput();t.push(n),r=n.position.end;continue}break}return{value:t,end:r}}function q_(e){if(!e.check(se.TokenType.Text))return null;let t=e.tokenAt(e.getPosition()),r=e.getSource(),n=r.slice(t.start,t.end),i=n.search(/\s/);if(i===0)return null;if(i===-1)return e.advance(),(0,dt.makeTextNode)(n,t.start,t.end,r);let s=(0,dt.makeTextNode)(n.slice(0,i),t.start,t.start+i,r);return t.start=t.start+i,s}function r5(e,t){if(!t.some(n=>n.type===rp.NodeTypes.TextNode))return!1;let r=e.peekTagName();return r===null||!O_.BLOCKS.includes(r)?!1:i5(e)}function n5(e){return e!==void 0&&(e.type===se.TokenType.LiquidVariableOutputOpen||e.type===se.TokenType.LiquidTagOpen)&&e.end-e.start===3}function i5(e){let t=e.getSource(),r=e.tokenCount(),n=!1,i=!1;for(let s=e.getPosition();s<r;s++){let a=e.tokenAt(s);switch(a.type){case se.TokenType.LiquidTagOpen:n=!0;break;case se.TokenType.LiquidTagClose:n=!1,i=a.end-a.start===3;break;case se.TokenType.Text:if(!n){let o=t.slice(a.start,a.end);if(i&&(o=o.replace(/^\s+/,"")),i=!1,o.length===0||/^\s+$/.test(o)&&n5(e.tokenAt(s+1)))break;return/^\s/.test(o)}break;case se.TokenType.LiquidVariableOutputOpen:if(!n)return!1;break;case se.TokenType.HtmlTagClose:case se.TokenType.HtmlSelfClose:case se.TokenType.EndOfInput:if(!n)return!1;break}}return!1}function zc(e){return e.length===1&&e[0].type===rp.NodeTypes.TextNode?e[0].value:null}function s5(e,t){if(!e.check(se.TokenType.HtmlCloseTagOpen))return!1;let r=e.getPosition();e.advance();let n=Ti(e);return e.setPosition(r),(0,ro.compoundNamesMatch)(t,n)}function zE(e,t){let r=t.toLowerCase(),n=e.getSource(),i=e.tokenCount(),s=e.getPosition(),a=0;for(let o=s;o<i;o++){let c=e.tokenAt(o);if(c.type===se.TokenType.HtmlTagOpen){let m=o+1;if(m>=i||e.tokenAt(m).type!==se.TokenType.Text)continue;let d=n.slice(e.tokenAt(m).start,e.tokenAt(m).end).trimStart(),g=d.search(/\s/);(g===-1?d.trim():d.slice(0,g)).toLowerCase()===r&&a++;continue}if(c.type!==se.TokenType.HtmlCloseTagOpen)continue;let l=o+1;if(l>=i||e.tokenAt(l).type!==se.TokenType.Text)continue;if(n.slice(e.tokenAt(l).start,e.tokenAt(l).end).trim().toLowerCase()===r){if(a===0)return o;a--}}return-1}function WE(e,t=[],r=""){switch(e.toLowerCase()){case"script":return a5(t);case"style":return/\{[{%]/.test(r)?Si.RawMarkupKinds.text:Si.RawMarkupKinds.css;default:return Si.RawMarkupKinds.text}}function a5(e){let t=o5(e,"type");return t===null?Si.RawMarkupKinds.javascript:t==="text/html"?Si.RawMarkupKinds.html:t==="text/markdown"?Si.RawMarkupKinds.markdown:t.endsWith("json")||t.endsWith("importmap")||t==="speculationrules"?Si.RawMarkupKinds.json:Si.RawMarkupKinds.javascript}function o5(e,t){for(let r of e){if(!("name"in r)||!("value"in r))continue;let n=r,i=zc(n.name);if(i===null||i.toLowerCase()!==t)continue;let s=n.value;return s.length===1&&s[0].type===rp.NodeTypes.TextNode?s[0].value:null}return null}var c5=new Set(["else","elsif","when"])});var JE=x(L_=>{"use strict";p();Object.defineProperty(L_,"__esModule",{value:!0});L_.envelopeFromLine=u5;function u5(e,t){return{tagName:e.tagName,markupString:e.markup,markupOffset:e.markupOffset,markupEnd:e.markupOffset+e.markup.length,whitespaceStart:"",whitespaceEnd:"",blockStartPosition:{start:e.nameOffset,end:e.lineEnd},source:t}}});var rA=x(Hn=>{"use strict";p();Object.defineProperty(Hn,"__esModule",{value:!0});Hn.parseLiquidStatement=C_;Hn.parseLineBlockTag=QE;Hn.parseLineRawTag=XE;Hn.parseLineHybridTag=ZE;Hn.parseLineBlockBody=I_;Hn.parseLineBranchedBody=eA;Hn.parseLineBranchMarkup=tA;var Tt=Gr(),np=Ja(),sp=Wr(),KE=Bn(),Wc=_i(),Gc=kt(),l5=Ef(),f5=Rc(),YE=JE(),ip=Qa(),wi=Ua(),p5=Xf();function C_(e,t,r,n,i){let s=i.lines[i.index-1],a=(0,YE.envelopeFromLine)(s,e.getSource());if(t==="#")return(0,Tt.makeLiquidTagBaseCase)(a,void 0,void 0,void 0,void 0,!0);if(t.startsWith("end"))throw new sp.LiquidHTMLASTParsingError(`Unexpected end tag '${t}' in {% liquid %} block`,e.getSource(),s.nameOffset,s.lineEnd);let o=e.lineEnv.tagForName(t);if(!o)return(0,Tt.makeLiquidTagBaseCase)(a);switch(o.kind){case np.TagKind.Tag:{let c;try{let l=(0,Gc.tokenizeMarkup)(r,n),f=new Wc.MarkupParser(l,e.getSource(),n,a.markupEnd);e.isTolerant()&&f.enableTolerant();let m=o.parse(t,f,e);return f.isAtEnd()?(0,Tt.makeLiquidTagNamed)(a,m):(0,Tt.makeLiquidTagBaseCase)(a,void 0,void 0,void 0,"unexpected tokens after markup")}catch(l){return c=l instanceof Error?l.message:"unknown error",(0,Tt.makeLiquidTagBaseCase)(a,void 0,void 0,void 0,c)}}case np.TagKind.Block:return QE(e,o,a,r,n,i);case np.TagKind.Raw:return XE(e,o,a,i);case np.TagKind.Hybrid:return ZE(e,o,a,r,n,i);default:return(0,KE.assertNever)(o)}}function QE(e,t,r,n,i,s){let a,o=!1,c;try{let g=(0,Gc.tokenizeMarkup)(n,i),v=new Wc.MarkupParser(g,e.getSource());e.isTolerant()&&v.enableTolerant(),a=t.parse(r.tagName,v,e),v.isAtEnd()?o=!0:(a=void 0,c="unexpected tokens after markup")}catch(g){a=void 0,c=g instanceof Error?g.message:"unknown error"}let l=3+r.tagName.length;if(t.branches.length===0){let{children:g,endNameOffset:v}=I_(e,r.tagName,s),b={start:v,end:v+l};return o?(0,Tt.makeLiquidTagNamed)(r,a,g,b,{start:"",end:""}):(0,Tt.makeLiquidTagBaseCase)(r,g,b,{start:"",end:""},c)}let{branches:f,endNameOffset:m}=eA(e,r.tagName,t,s),d={start:m,end:m+l};return o?(0,Tt.makeLiquidTagNamed)(r,a,f,d,{start:"",end:""}):(0,Tt.makeLiquidTagBaseCase)(r,f,d,{start:"",end:""},c)}function XE(e,t,r,n){let i=r.tagName,s=`end${i}`,a=n.index>0&&n.index<=n.lines.length?n.lines[n.index-1].lineEnd:r.blockStartPosition.end,o=n.index>0&&n.index<=n.lines.length?n.lines[n.index-1].lineEnd+1:r.blockStartPosition.end,c=i==="comment"||i==="doc",l=-1;if(c){let k=0;for(let w=n.index;w<n.lines.length;w++){let T=n.lines[w].tagName;if(T==="raw"){for(w++;w<n.lines.length&&n.lines[w].tagName!=="endraw";)w++;continue}if(T===i)k++;else if(T===s){if(k===0){l=w;break}k--}}}else for(let k=n.index;k<n.lines.length;k++)if(n.lines[k].tagName===s){l=k;break}if(l===-1)throw new sp.LiquidHTMLASTParsingError(`Unclosed raw tag '${i}' in {% liquid %} block`,e.getSource(),r.blockStartPosition.start,r.blockStartPosition.end);let f=n.lines[l],m=f.nameOffset,d=e.getSource(),g=d.slice(o,m),v=o<m?(0,wi.filterChildren)(wi.ChildFilterMode.Syntactic,[(0,Tt.makeTextNode)(g,o,m,d)],d):[],b=(0,Tt.makeRawMarkup)((0,p5.rawMarkupKindForTag)(i,g),g,v,a,m,d),_={start:f.nameOffset,end:f.nameOffset+s.length};return n.index=l+1,(0,Tt.makeLiquidRawTag)(r,b,_,{start:"",end:""})}function ZE(e,t,r,n,i,s){let a,o=!1,c;try{let _=(0,Gc.tokenizeMarkup)(n,i),k=new Wc.MarkupParser(_,e.getSource());e.isTolerant()&&k.enableTolerant(),a=t.parse(r.tagName,k,e),k.isAtEnd()?o=!0:(a=void 0,c="unexpected tokens after markup")}catch(_){a=void 0,c=_ instanceof Error?_.message:"unknown error"}let l=`end${r.tagName}`,f=!1,m=0;for(let _=s.index;_<s.lines.length;_++)if(s.lines[_].tagName===r.tagName)m++;else if(s.lines[_].tagName===l){if(m===0){f=!0;break}m--}if(!f)return o?(0,Tt.makeLiquidTagNamed)(r,a):(0,Tt.makeLiquidTagBaseCase)(r,void 0,void 0,void 0,c);let{children:d,endNameOffset:g}=I_(e,r.tagName,s),v=3+r.tagName.length,b={start:g,end:g+v};return o?(0,Tt.makeLiquidTagNamed)(r,a,d,b,{start:"",end:""}):(0,Tt.makeLiquidTagBaseCase)(r,d,b,{start:"",end:""},c)}function I_(e,t,r){let n=[];for(;r.index<r.lines.length;){let i=r.lines[r.index];if(i.tagName===`end${t}`)return r.index++,{children:n,endNameOffset:i.nameOffset};r.index++,n.push(C_(e,i.tagName,i.markup,i.markupOffset,r))}if(e.lineAllowUnclosedDocumentNode){let i=r.lines.length>0?r.lines[r.lines.length-1].lineEnd:0;return{children:n,endNameOffset:i}}throw new sp.LiquidHTMLASTParsingError(`Unclosed block tag '${t}' in {% liquid %} block`,e.getSource(),0,0)}function eA(e,t,r,n){let i=[],s=n.index>0?n.lines[n.index-1].lineEnd:0,a=(0,Tt.makeLiquidBranchUnnamed)(s,e.getSource()),o=[];for(;n.index<n.lines.length;){let c=n.lines[n.index];if(c.tagName===`end${t}`)return(0,ip.finalizeBranch)(a,o,c.nameOffset,e.getSource(),e.lineParseHtml?wi.ChildFilterMode.StripEdges:wi.ChildFilterMode.Syntactic),i.push(a),n.index++,{branches:i,endNameOffset:c.nameOffset};if((0,ip.isBranchName)(c.tagName)&&r.branches.includes(c.tagName)){(0,ip.finalizeBranch)(a,o,c.nameOffset,e.getSource(),e.lineParseHtml?wi.ChildFilterMode.StripEdges:wi.ChildFilterMode.Syntactic),i.push(a);let l=(0,YE.envelopeFromLine)(c,e.getSource()),f=tA(c.tagName,l,e.getSource(),e.isTolerant());a=(0,Tt.makeLiquidBranchNamed)(l,f),o=[],n.index++;continue}n.index++,o.push(C_(e,c.tagName,c.markup,c.markupOffset,n))}if(e.lineAllowUnclosedDocumentNode){let c=n.lines.length>0?n.lines[n.lines.length-1].lineEnd:0;return(0,ip.finalizeBranch)(a,o,c,e.getSource(),e.lineParseHtml?wi.ChildFilterMode.StripEdges:wi.ChildFilterMode.Syntactic),i.push(a),{branches:i,endNameOffset:c}}throw new sp.LiquidHTMLASTParsingError(`Unclosed block tag '${t}' in {% liquid %} block`,e.getSource(),0,0)}function tA(e,t,r,n=!1){switch(e){case"elsif":try{let i=(0,Gc.tokenizeMarkup)(t.markupString,t.markupOffset),s=new Wc.MarkupParser(i,r);n&&s.enableTolerant();let a=(0,l5.elsifBranchParse)(e,s);return s.isAtEnd()?a:t.markupString.trim()}catch{return t.markupString.trim()}case"when":try{let i=(0,Gc.tokenizeMarkup)(t.markupString,t.markupOffset),s=new Wc.MarkupParser(i,r);n&&s.enableTolerant();let a=(0,f5.whenBranchParse)(e,s);return s.isAtEnd()?a:t.markupString.trim()}catch{return t.markupString.trim()}case"else":return"";default:return(0,KE.assertNever)(e)}}});var iA=x(Jc=>{"use strict";p();Object.defineProperty(Jc,"__esModule",{value:!0});Jc.parseNode=m5;Jc.parseYamlFrontmatter=nA;Jc.advanceAsText=Es;var Ot=tr(),M_=Gr(),d5=Wr(),h5=Bn();function m5(e){let t=e.peek();switch(t.type){case Ot.TokenType.Text:return e.advance(),(0,M_.makeTextNode)(e.getSource().slice(t.start,t.end),t.start,t.end,e.getSource());case Ot.TokenType.YamlFrontmatter:return nA(e);case Ot.TokenType.EndOfInput:throw new d5.LiquidHTMLASTParsingError("Unexpected end of input in parseNode",e.getSource(),t.start,t.end);case Ot.TokenType.LiquidVariableOutputOpen:return e.parseLiquidVariableOutput();case Ot.TokenType.LiquidTagOpen:return e.parseLiquidTag();case Ot.TokenType.LiquidTagClose:case Ot.TokenType.LiquidVariableOutputClose:return Es(e);case Ot.TokenType.HtmlTagOpen:return e.dispatchParseHtml?e.parseHtmlElement():Es(e);case Ot.TokenType.HtmlCloseTagOpen:return e.dispatchParseHtml&&e.dispatchAllowUnclosedHtml?e.parseHtmlDanglingMarkerClose():e.dispatchParseHtml?e.parseOrphanedHtmlCloseTag():Es(e);case Ot.TokenType.HtmlCommentOpen:return e.dispatchParseHtml?e.parseHtmlComment():Es(e);case Ot.TokenType.HtmlDoctypeOpen:return e.dispatchParseHtml?e.parseHtmlDoctype():Es(e);case Ot.TokenType.HtmlTagClose:case Ot.TokenType.HtmlSelfClose:case Ot.TokenType.HtmlCommentClose:case Ot.TokenType.HtmlEquals:case Ot.TokenType.HtmlQuoteOpen:case Ot.TokenType.HtmlQuoteClose:return Es(e);default:return(0,h5.assertNever)(t.type)}}function nA(e){let t=e.advance(),r=e.getSource(),n=r.slice(t.start,t.end),i=n.indexOf(`
30
- `),s=n.lastIndexOf("---"),a=i!==-1&&s>i?n.slice(i+1,s):"";return(0,M_.makeYamlFrontmatter)(a,t.start,t.end,r)}function Es(e){let t=e.advance(),r=e.getSource();return(0,M_.makeTextNode)(r.slice(t.start,t.end),t.start,t.end,r)}});var j_=x(io=>{"use strict";p();Object.defineProperty(io,"__esModule",{value:!0});io.finalizeBranch=io.DocumentParser=void 0;var g5=tr(),y5=qx(),_5=Gr(),sA=Ua();Ja();var v5=xE(),R_=Qa(),b5=Xf(),k5=$E(),no=GE(),S5=rA(),aA=iA(),D_=class extends y5.ParserBase{env;_parseHtml;_allowUnclosedHtml;_allowUnclosedDocumentNode;_inAttributeContext=!1;_inAttributeValueContext=!1;constructor(t,r,n,i,s=!1){super(t,r),this.env=n,this._parseHtml=i,this._allowUnclosedHtml=s,this._allowUnclosedDocumentNode=s}get rawParseHtml(){return this._parseHtml}set rawParseHtml(t){this._parseHtml=t}get blockEnv(){return this.env}get blockParseHtml(){return this._parseHtml}get blockAllowUnclosedHtml(){return this._allowUnclosedHtml}set blockAllowUnclosedHtml(t){this._allowUnclosedHtml=t}get blockAllowUnclosedDocumentNode(){return this._allowUnclosedDocumentNode}get blockInAttributeContext(){return this._inAttributeContext}get blockInAttributeValueContext(){return this._inAttributeValueContext}set blockInAttributeValueContext(t){this._inAttributeValueContext=t}get htmlParseHtml(){return this._parseHtml}get htmlAllowUnclosedHtml(){return this._allowUnclosedHtml}set htmlAllowUnclosedHtml(t){this._allowUnclosedHtml=t}get htmlInAttributeContext(){return this._inAttributeContext}set htmlInAttributeContext(t){this._inAttributeContext=t}get htmlInAttributeValueContext(){return this._inAttributeValueContext}set htmlInAttributeValueContext(t){this._inAttributeValueContext=t}get lineEnv(){return this.env}get lineParseHtml(){return this._parseHtml}get lineAllowUnclosedDocumentNode(){return this._allowUnclosedDocumentNode}get dispatchParseHtml(){return this._parseHtml}get dispatchAllowUnclosedHtml(){return this._allowUnclosedHtml}tagForName(t){return this.env.tagForName(t)}parseDocument(){let t=[];for(this.check(g5.TokenType.YamlFrontmatter)&&t.push((0,aA.parseNode)(this));!this.isAtEnd();)t.push(this.parseNode());return(0,_5.makeDocumentNode)((0,sA.filterChildren)(sA.ChildFilterMode.Syntactic,t,this.source),this.source)}parseNode(){return(0,aA.parseNode)(this)}parseLiquidTag(){return(0,k5.parseLiquidTag)(this)}parseLiquidVariableOutput(){return(0,v5.parseLiquidVariableOutput)(this)}peekTagName(){return(0,R_.peekTagName)(this)}isBlockTerminator(){return(0,R_.isBlockTerminator)(this)}consumeEndTag(){return(0,R_.consumeEndTag)(this)}parseLiquidInRange(t,r){return(0,b5.parseLiquidInRange)(this,t,r)}parseBranchAttributes(){return(0,no.parseBranchAttributesImpl)(this)}parseLiquidStatement(t,r,n,i){return(0,S5.parseLiquidStatement)(this,t,r,n,i)}parseHtmlElement(){return(0,no.parseHtmlElement)(this)}parseHtmlComment(){return(0,no.parseHtmlComment)(this)}parseHtmlDoctype(){return(0,no.parseHtmlDoctype)(this)}parseOrphanedHtmlCloseTag(){return(0,no.parseOrphanedHtmlCloseTag)(this)}parseHtmlDanglingMarkerClose(){return(0,no.parseHtmlDanglingMarkerClose)(this)}};io.DocumentParser=D_;var T5=Qa();Object.defineProperty(io,"finalizeBranch",{enumerable:!0,get:function(){return T5.finalizeBranch}})});var Ka=x(Yr=>{"use strict";p();Object.defineProperty(Yr,"__esModule",{value:!0});Yr.RawMarkupKinds=Yr.LiquidLiteralValues=void 0;Yr.isBranchedTag=w5;Yr.toLiquidAST=x5;Yr.toLiquidHtmlAST=E5;Yr.walk=F_;Yr.isLiquidHtmlNode=B_;var V_=Qe(),cA=j_(),uA=tr(),lA=Ja();Yr.LiquidLiteralValues={nil:null,null:null,true:!0,false:!1,blank:"",empty:""};var oA;(function(e){e.css="css",e.html="html",e.javascript="javascript",e.json="json",e.markdown="markdown",e.typescript="typescript",e.text="text"})(oA||(Yr.RawMarkupKinds=oA={}));function w5(e){return e.type===V_.NodeTypes.LiquidTag&&["if","for","unless","case"].includes(e.name)}function x5(e,t={allowUnclosedDocumentNode:!0,mode:"tolerant"}){let r=t.environment??lA.Environment.default(),n=(0,uA.tokenize)(e);return new cA.DocumentParser(n,e,r,!1,t.allowUnclosedDocumentNode).parseDocument()}function E5(e,t={allowUnclosedDocumentNode:!1,mode:"tolerant"}){let r=t.environment??lA.Environment.default(),n=(0,uA.tokenize)(e);return new cA.DocumentParser(n,e,r,!0,t.allowUnclosedDocumentNode).parseDocument()}function F_(e,t,r){for(let n of Object.keys(e)){if(V_.nonTraversableProperties.has(n))continue;let i=e[n];Array.isArray(i)?i.filter(B_).forEach(s=>F_(s,t,e)):B_(i)&&F_(i,t,e)}t(e,r)}function B_(e){return e!==null&&typeof e=="object"&&"type"in e&&V_.NodeTypes.hasOwnProperty(e.type)}});var dA=x(gn=>{"use strict";p();Object.defineProperty(gn,"__esModule",{value:!0});gn.TolerantDocumentParser=gn.RESYNC_TOKENS=void 0;gn.isResyncToken=fA;gn.tokenTypeName=N5;gn.makeLiquidErrorNode=pA;var A5=j_(),As=tr(),O5=Qe(),P5=Wr();gn.RESYNC_TOKENS=new Set([As.TokenType.LiquidTagOpen,As.TokenType.LiquidVariableOutputOpen,As.TokenType.HtmlTagOpen,As.TokenType.HtmlCloseTagOpen,As.TokenType.HtmlCommentOpen,As.TokenType.HtmlDoctypeOpen,As.TokenType.EndOfInput]);function fA(e){return gn.RESYNC_TOKENS.has(e)}function N5(e){return e}function pA(e,t,r,n,i){return{type:O5.NodeTypes.LiquidErrorNode,position:{start:e,end:t},source:r,message:n,found:i}}var $_=class extends A5.DocumentParser{isTolerant(){return!0}parseNode(){let t=this.peek(),r=this.getPosition();try{return super.parseNode()}catch(n){if(!(n instanceof P5.LiquidHTMLASTParsingError))throw n;let i=this.getSource(),s=this.peek().type;for(this.getPosition()<=r&&this.advance();!this.isAtEnd()&&!fA(this.peek().type);)this.advance();let a=this.peek().start;return pA(t.start,a,i,n.message,s)}}};gn.TolerantDocumentParser=$_});var yA=x(Kc=>{"use strict";p();Object.defineProperty(Kc,"__esModule",{value:!0});Kc.toTolerantLiquidAST=C5;Kc.toTolerantLiquidHtmlAST=I5;Kc.findErrorNodeAtOffset=M5;var q5=Ka(),hA=dA(),mA=tr(),gA=Ja(),L5=Qe();function C5(e,t={allowUnclosedDocumentNode:!0,mode:"tolerant"}){let r=t.environment??gA.Environment.default(),n=(0,mA.tokenize)(e);return new hA.TolerantDocumentParser(n,e,r,!1,t.allowUnclosedDocumentNode).parseDocument()}function I5(e,t={allowUnclosedDocumentNode:!0,mode:"tolerant"}){let r=t.environment??gA.Environment.default(),n=(0,mA.tokenize)(e);return new hA.TolerantDocumentParser(n,e,r,!0,t.allowUnclosedDocumentNode).parseDocument()}function M5(e,t){let r=new Map,n=[];if((0,q5.walk)(e,(o,c)=>{r.set(o,c),o.type===L5.NodeTypes.LiquidErrorNode&&t>=o.position.start&&t<=o.position.end&&n.push(o)}),n.length===0)return null;let i=o=>{let c=[],l=r.get(o);for(;l!==void 0;)c.push(l),l=r.get(l);return c.reverse()},s=n[0],a=i(s).length;for(let o=1;o<n.length;o++){let c=i(n[o]).length;c>a&&(s=n[o],a=c)}return{node:s,ancestors:i(s)}}});var _A=x(ap=>{"use strict";p();Object.defineProperty(ap,"__esModule",{value:!0});ap.getConditionalComment=void 0;var R5=/(<!--\[if[^\]]*]>)((.|\n)*)(<!\[endif\]-->)$/,D5=e=>{let t=e.match(R5);if(t)return{startTag:t[1],body:t[2].trim(),endTag:t[4]}};ap.getConditionalComment=D5});var bA=x(Os=>{"use strict";p();Object.defineProperty(Os,"__esModule",{value:!0});Os.LaxTagRecoveryError=void 0;Os.laxRecoverVariable=V5;Os.laxRecoverTagMarkup=$5;Os.laxRecoverWhenValues=U5;var U_=_i(),H_=kt(),j5=Wf(),F5=Rc(),vA=je(),B5={parseLiquidStatement(e,t,r,n){throw new Error("lax-recover: nested statement parsing is not supported during recovery")}};function V5(e,t,r){try{let n=(0,H_.tokenizeMarkup)(e,r);return new U_.MarkupParser(n,t,r,r+e.length).enableLax().liquidVariable()}catch{return}}function $5(e,t,r,n,i){let s=j5.builtinTags[e];if(!s||s.kind!==vA.TagKind.Tag&&s.kind!==vA.TagKind.Block)throw new op(`Unknown tag '${e}'`);if((e==="increment"||e==="decrement")&&t.trim()==="")return;let a=(0,H_.tokenizeMarkup)(t,n),o=new U_.MarkupParser(a,r,n,i).enableLax();return s.parse(e,o,B5)}var op=class extends Error{constructor(t){super(t),this.name="LaxTagRecoveryError"}};Os.LaxTagRecoveryError=op;function U5(e,t,r,n){try{let i=(0,H_.tokenizeMarkup)(e,r),s=new U_.MarkupParser(i,t,r,n).enableLax();return(0,F5.whenBranchParse)("when",s)}catch{return}}});var ce=x(me=>{"use strict";p();var H5=me&&me.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),z_=me&&me.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&H5(t,e,r)};Object.defineProperty(me,"__esModule",{value:!0});me.LaxTagRecoveryError=me.laxRecoverWhenValues=me.laxRecoverTagMarkup=me.laxRecoverVariable=me.builtinTags=me.MarkupParser=me.MarkupTokenType=me.tokenizeMarkup=me.TokenType=me.tokenize=me.getConditionalComment=me.BLOCKS=me.VOID_ELEMENTS=me.RAW_TAGS=me.TAGS_WITHOUT_MARKUP=me.toTolerantLiquidHtmlAST=me.toTolerantLiquidAST=me.findErrorNodeAtOffset=void 0;z_(Ka(),me);z_(Qe(),me);z_(Wr(),me);var W_=yA();Object.defineProperty(me,"findErrorNodeAtOffset",{enumerable:!0,get:function(){return W_.findErrorNodeAtOffset}});Object.defineProperty(me,"toTolerantLiquidAST",{enumerable:!0,get:function(){return W_.toTolerantLiquidAST}});Object.defineProperty(me,"toTolerantLiquidHtmlAST",{enumerable:!0,get:function(){return W_.toTolerantLiquidHtmlAST}});var cp=A_();Object.defineProperty(me,"TAGS_WITHOUT_MARKUP",{enumerable:!0,get:function(){return cp.TAGS_WITHOUT_MARKUP}});Object.defineProperty(me,"RAW_TAGS",{enumerable:!0,get:function(){return cp.RAW_TAGS}});Object.defineProperty(me,"VOID_ELEMENTS",{enumerable:!0,get:function(){return cp.VOID_ELEMENTS}});Object.defineProperty(me,"BLOCKS",{enumerable:!0,get:function(){return cp.BLOCKS}});var z5=_A();Object.defineProperty(me,"getConditionalComment",{enumerable:!0,get:function(){return z5.getConditionalComment}});var kA=tr();Object.defineProperty(me,"tokenize",{enumerable:!0,get:function(){return kA.tokenize}});Object.defineProperty(me,"TokenType",{enumerable:!0,get:function(){return kA.TokenType}});var SA=kt();Object.defineProperty(me,"tokenizeMarkup",{enumerable:!0,get:function(){return SA.tokenizeMarkup}});Object.defineProperty(me,"MarkupTokenType",{enumerable:!0,get:function(){return SA.MarkupTokenType}});var W5=_i();Object.defineProperty(me,"MarkupParser",{enumerable:!0,get:function(){return W5.MarkupParser}});var G5=Wf();Object.defineProperty(me,"builtinTags",{enumerable:!0,get:function(){return G5.builtinTags}});var up=bA();Object.defineProperty(me,"laxRecoverVariable",{enumerable:!0,get:function(){return up.laxRecoverVariable}});Object.defineProperty(me,"laxRecoverTagMarkup",{enumerable:!0,get:function(){return up.laxRecoverTagMarkup}});Object.defineProperty(me,"laxRecoverWhenValues",{enumerable:!0,get:function(){return up.laxRecoverWhenValues}});Object.defineProperty(me,"LaxTagRecoveryError",{enumerable:!0,get:function(){return up.LaxTagRecoveryError}})});var J_=x((hme,G_)=>{p();var fp=process||{},TA=fp.argv||[],lp=fp.env||{},J5=!(lp.NO_COLOR||TA.includes("--no-color"))&&(!!lp.FORCE_COLOR||TA.includes("--color")||fp.platform==="win32"||(fp.stdout||{}).isTTY&&lp.TERM!=="dumb"||!!lp.CI),K5=(e,t,r=e)=>n=>{let i=""+n,s=i.indexOf(t,e.length);return~s?e+Y5(i,t,r,s)+t:e+i+t},Y5=(e,t,r,n)=>{let i="",s=0;do i+=e.substring(s,n)+r,s=n+t.length,n=e.indexOf(t,s);while(~n);return i+e.substring(s)},wA=(e=J5)=>{let t=e?K5:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};G_.exports=wA();G_.exports.createColors=wA});var hp=x((gme,EA)=>{"use strict";p();var pp=/[\t\n\f\r "#'()/;[\\\]{}]/g,dp=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Q5=/.[\r\n"'(/\\]/,xA=/[\da-f]/i;EA.exports=function(t,r={}){let n=t.css.valueOf(),i=r.ignoreErrors,s,a,o,c,l,f,m,d,g,v,b=n.length,_=0,k=[],w=[],T=-1;function y(){return _}function A(B){throw t.error("Unclosed "+B,_)}function O(){return w.length===0&&_>=b}function P(B){if(w.length)return w.pop();if(_>=b)return;let M=B?B.ignoreUnclosed:!1;switch(s=n.charCodeAt(_),s){case 10:case 32:case 9:case 13:case 12:{c=_;do c+=1,s=n.charCodeAt(c);while(s===32||s===10||s===9||s===13||s===12);f=["space",n.slice(_,c)],_=c-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let L=String.fromCharCode(s);f=[L,L,_];break}case 40:{if(v=k.length?k.pop()[1]:"",g=n.charCodeAt(_+1),v==="url"&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){c=_;do{if(m=!1,c=n.indexOf(")",c+1),c===-1)if(i||M){c=_;break}else A("bracket");for(d=c;n.charCodeAt(d-1)===92;)d-=1,m=!m}while(m);f=["brackets",n.slice(_,c+1),_,c],_=c}else _<=T?f=["(","(",_]:(c=n.indexOf(")",_+1),a=n.slice(_,c+1),c===-1||Q5.test(a)?(T=c===-1?b:c,f=["(","(",_]):(f=["brackets",a,_,c],_=c));break}case 39:case 34:{l=s===39?"'":'"',c=_;do{if(m=!1,c=n.indexOf(l,c+1),c===-1)if(i||M){c=_+1;break}else A("string");for(d=c;n.charCodeAt(d-1)===92;)d-=1,m=!m}while(m);f=["string",n.slice(_,c+1),_,c],_=c;break}case 64:{pp.lastIndex=_+1,pp.test(n),pp.lastIndex===0?c=n.length-1:c=pp.lastIndex-2,f=["at-word",n.slice(_,c+1),_,c],_=c;break}case 92:{for(c=_,o=!0;n.charCodeAt(c+1)===92;)c+=1,o=!o;if(s=n.charCodeAt(c+1),o&&s!==47&&s!==32&&s!==10&&s!==9&&s!==13&&s!==12&&(c+=1,xA.test(n.charAt(c)))){for(;xA.test(n.charAt(c+1));)c+=1;n.charCodeAt(c+1)===32&&(c+=1)}f=["word",n.slice(_,c+1),_,c],_=c;break}default:{s===47&&n.charCodeAt(_+1)===42?(c=n.indexOf("*/",_+2)+1,c===0&&(i||M?c=n.length:A("comment")),f=["comment",n.slice(_,c+1),_,c],_=c):(dp.lastIndex=_+1,dp.test(n),dp.lastIndex===0?c=n.length-1:c=dp.lastIndex-2,f=["word",n.slice(_,c+1),_,c],k.push(f),_=c);break}}return _++,f}function q(B){w.push(B)}return{back:q,endOfFile:O,nextToken:P,position:y}}});var K_=x((_me,PA)=>{"use strict";p();var Jt=J_(),X5=hp(),AA;function Z5(e){AA=e}var e9={";":Jt.yellow,":":Jt.yellow,"(":Jt.cyan,")":Jt.cyan,"[":Jt.yellow,"]":Jt.yellow,"{":Jt.yellow,"}":Jt.yellow,"at-word":Jt.cyan,brackets:Jt.cyan,call:Jt.cyan,class:Jt.yellow,comment:Jt.gray,hash:Jt.magenta,string:Jt.green};function t9([e,t],r){if(e==="word"){if(t[0]===".")return"class";if(t[0]==="#")return"hash"}if(!r.endOfFile()){let n=r.nextToken();if(r.back(n),n[0]==="brackets"||n[0]==="(")return"call"}return e}function OA(e){let t=X5(new AA(e),{ignoreErrors:!0}),r="";for(;!t.endOfFile();){let n=t.nextToken(),i=e9[t9(n,t)];i?r+=n[1].split(/\r?\n/).map(s=>i(s)).join(`
31
- `):r+=n[1]}return r}OA.registerInput=Z5;PA.exports=OA});var mp=x((bme,LA)=>{"use strict";p();var NA=J_(),qA=K_(),Yc=class e extends Error{constructor(t,r,n,i,s,a){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),i&&(this.source=i),a&&(this.plugin=a),typeof r<"u"&&typeof n<"u"&&(typeof r=="number"?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}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(t){if(!this.source)return"";let r=this.source;t==null&&(t=NA.isColorSupported);let n=f=>f,i=f=>f,s=f=>f;if(t){let{bold:f,gray:m,red:d}=NA.createColors(!0);i=g=>f(d(g)),n=g=>m(g),qA&&(s=g=>qA(g))}let a=r.split(/\r?\n/),o=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),l=String(c).length;return a.slice(o,c).map((f,m)=>{let d=o+1+m,g=" "+(" "+d).slice(-l)+" | ";if(d===this.line){if(f.length>160){let b=20,_=Math.max(0,this.column-b),k=Math.max(this.column+b,this.endColumn+b),w=f.slice(_,k),T=n(g.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return i(">")+n(g)+s(w)+`
32
- `+T+i("^")}let v=n(g.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+n(g)+s(f)+`
33
- `+v+i("^")}return" "+n(g)+s(f)}).join(`
34
- `)}toString(){let t=this.showSourceCode();return t&&(t=`
35
-
36
- `+t+`
37
- `),this.name+": "+this.message+t}};LA.exports=Yc;Yc.default=Yc});var Y_=x((Sme,DA)=>{"use strict";p();var r9=/(<)(\/?style\b)/gi,n9=/(<)(!--)/g,i9=/[\t\n\f\r "#'()/;[\\\]{}]/;function Qr(e){return typeof e!="string"||!e.includes("<")?e:e.replace(r9,"\\3c $2").replace(n9,"\\3c $2")}var CA={after:`
38
- `,beforeClose:`
39
- `,beforeComment:`
40
- `,beforeDecl:`
41
- `,beforeOpen:" ",beforeRule:`
42
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function s9(e){return e[0].toUpperCase()+e.slice(1)}function IA(e,t){let r="@"+t.name,n=t.params?e.rawValue(t,"params"):"",i=t.raws.afterName;return typeof i>"u"?i=n?" ":"":i===""&&n&&!i9.test(n[0])&&(i=" "),r+i+n}function RA(e,t,r){let n=r.nodes,i=n.length-1;for(;i>0&&n[i].type==="comment";)i-=1;let s=e.raw(r,"semicolon"),a=r.type==="document";for(let o=n.length-1;o>=0;o--){let c=n[o],l=i!==o||s;!l&&o<n.length-1&&(c.type==="atrule"&&!c.nodes||c.type==="decl"&&c.prop.startsWith("--"))&&(l=!0),t.push({document:a,node:c,semicolon:l})}}function MA(e,t,r,n){let i=e.raw(r,"between","beforeOpen");e.builder(Qr(n+i)+"{",r,"start");let s=r.nodes&&r.nodes.length,a=()=>{let o=s?e.raw(r,"after"):e.raw(r,"after","emptyBody");o&&e.builder(Qr(o)),e.builder("}",r,"end"),r.type==="rule"&&r.raws.ownSemicolon&&e.builder(Qr(r.raws.ownSemicolon),r,"end")};s?(t.push(a),RA(e,t,r)):a()}var Qc=class e{constructor(t){this.builder=t}atrule(t,r){let n=IA(this,t);if(t.nodes)this.block(t,n);else{let i=(t.raws.between||"")+(r?";":"");this.builder(Qr(n+i),t)}}beforeAfter(t,r){let n;t.type==="decl"?n=this.raw(t,null,"beforeDecl"):t.type==="comment"?n=this.raw(t,null,"beforeComment"):r==="before"?n=this.raw(t,null,"beforeRule"):n=this.raw(t,null,"beforeClose");let i=t.parent,s=0;for(;i&&i.type!=="root";)s+=1,i=i.parent;if(n.includes(`
43
- `)){let a=this.raw(t,null,"indent");if(a.length)for(let o=0;o<s;o++)n+=a}return n}block(t,r){let n=this.raw(t,"between","beforeOpen");this.builder(Qr(r+n)+"{",t,"start");let i;t.nodes&&t.nodes.length?(this.body(t),i=this.raw(t,"after")):i=this.raw(t,"after","emptyBody"),i&&this.builder(Qr(i)),this.builder("}",t,"end")}body(t){let r=e.prototype,n=["atrule","block","body","rule","stringify"].every(s=>this[s]===r[s]),i=[];for(RA(this,i,t);i.length>0;){let s=i.pop();if(typeof s=="function"){s();continue}let a=s.node,o=this.raw(a,"before");o&&this.builder(s.document?o:Qr(o)),n&&a.type==="rule"?MA(this,i,a,this.rawValue(a,"selector")):n&&a.type==="atrule"&&a.nodes?MA(this,i,a,IA(this,a)):this.stringify(a,s.semicolon)}}comment(t){let r=this.raw(t,"left","commentLeft"),n=this.raw(t,"right","commentRight");this.builder(Qr("/*"+r+t.text+n+"*/"),t)}decl(t,r){let n=t.raws,i=this.raw(t,"between","colon"),s=t.prop+i+this.rawValue(t,"value");t.important&&(s+=n.important||" !important"),r&&(s+=";"),this.builder(Qr(s),t)}document(t){this.body(t)}raw(t,r,n){let i;if(n||(n=r),r&&(i=t.raws[r],typeof i<"u"))return i;let s=t.parent;if(n==="before"&&(!s||s.type==="root"&&s.first===t||s&&s.type==="document"))return"";if(!s)return CA[n];let a=t.root(),o=a.rawCache||(a.rawCache={});if(typeof o[n]<"u")return o[n];if(n==="before"||n==="after")return this.beforeAfter(t,n);{let c="raw"+s9(n);this[c]?i=this[c](a,t):a.walk(l=>{if(i=l.raws[r],typeof i<"u")return!1})}return typeof i>"u"&&(i=CA[n]),o[n]=i,i}rawBeforeClose(t){let r;return t.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return r=n.raws.after,r.includes(`
44
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawBeforeComment(t,r){let n;return t.walkComments(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(`
45
- `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(r,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(t,r){let n;return t.walkDecls(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(`
46
- `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(r,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(t){let r;return t.walk(n=>{if(n.type!=="decl"&&(r=n.raws.between,typeof r<"u"))return!1}),r}rawBeforeRule(t){let r;return t.walk(n=>{if(n.nodes&&(n.parent!==t||t.first!==n)&&typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
47
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r}rawColon(t){let r;return t.walkDecls(n=>{if(typeof n.raws.between<"u")return r=n.raws.between.replace(/[^\s:]/g,""),!1}),r}rawEmptyBody(t){let r;return t.walk(n=>{if(n.nodes&&n.nodes.length===0&&(r=n.raws.after,typeof r<"u"))return!1}),r}rawIndent(t){if(t.raws.indent)return t.raws.indent;let r;return t.walk(n=>{let i=n.parent;if(i&&i!==t&&i.parent&&i.parent===t&&typeof n.raws.before<"u"){let s=n.raws.before.split(`
48
- `);return r=s[s.length-1],r=r.replace(/\S/g,""),!1}}),r}rawSemicolon(t){let r;return t.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(r=n.raws.semicolon,typeof r<"u"))return!1}),r}rawValue(t,r){let n=t[r],i=t.raws[r];return i&&i.value===n?i.raw:n}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\uFEFF",t,"start"),this.body(t),t.raws.after){let r=t.raws.after,n=t.parent&&t.parent.type==="document";this.builder(n?r:Qr(r))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(Qr(t.raws.ownSemicolon),t,"end")}stringify(t,r){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,r)}};DA.exports=Qc;Qc.default=Qc});var Xc=x((wme,jA)=>{"use strict";p();var a9=Y_();function Q_(e,t){new a9(t).stringify(e)}jA.exports=Q_;Q_.default=Q_});var Zc=x((Eme,X_)=>{"use strict";p();X_.exports.isClean=Symbol("isClean");X_.exports.my=Symbol("my")});var ru=x((Ome,FA)=>{"use strict";p();var o9=mp(),c9=Y_(),u9=Xc(),{isClean:eu,my:l9}=Zc();function f9(e,t){let r=new e.constructor,n=[[e,r,t]];for(;n.length>0;){let[i,s,a]=n.pop();for(let o in i){if(!Object.prototype.hasOwnProperty.call(i,o)||o==="proxyCache")continue;let c=i[o],l=typeof c;if(o==="parent"&&l==="object")a&&(s[o]=a);else if(o==="source")s[o]=c;else if(Array.isArray(c)){let f=[];s[o]=f;for(let m of c){let d=new m.constructor;f.push(d),n.push([m,d,s])}}else{if(l==="object"&&c!==null){let f=new c.constructor;n.push([c,f,void 0]),c=f}s[o]=c}}}return r}function yn(e,t){if(t&&typeof t.offset<"u")return t.offset;let r=1,n=1,i=0;for(let s=0;s<e.length;s++){if(n===t.line&&r===t.column){i=s;break}e[s]===`
49
- `?(r=1,n+=1):r+=1}return i}var tu=class e{get proxyOf(){return this}constructor(t={}){this.raws={},this[eu]=!1,this[l9]=!0;for(let r of Object.keys(t))if(r!=="__proto__")if(r==="nodes"){this.nodes=[];for(let n of t[r])typeof n.clone=="function"&&n.parent?this.append(n.clone()):this.append(n)}else this[r]=t[r]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let r=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${r.input.from}:${r.start.line}:${r.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let r in t)this[r]=t[r];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let r=f9(this);for(let n in t)r[n]=t[n];return r}cloneAfter(t={}){let r=this.clone(t);return this.parent.insertAfter(this,r),r}cloneBefore(t={}){let r=this.clone(t);return this.parent.insertBefore(this,r),r}error(t,r={}){if(this.source){let{end:n,start:i}=this.rangeBy(r);return this.source.input.error(t,{column:i.column,line:i.line},{column:n.column,line:n.line},r)}return new o9(t)}getProxyProcessor(){return{get(t,r){return r==="proxyOf"?t:r==="root"?()=>t.root().toProxy():t[r]},set(t,r,n){return t[r]===n||(t[r]=n,(r==="prop"||r==="value"||r==="name"||r==="params"||r==="important"||r==="text")&&t.markDirty()),!0}}}markClean(){this[eu]=!0}markDirty(){if(this[eu]){this[eu]=!1;let t=this;for(;t=t.parent;)t[eu]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t={}){let r="document"in this.source.input?this.source.input.document:this.source.input.css,n={column:this.source.start.column,line:this.source.start.line,offset:yn(r,this.source.start)};if(t.index)n=this.positionInside(t.index);else if(t.word){let s=r.slice(yn(r,this.source.start),yn(r,this.source.end)).indexOf(t.word);s!==-1&&(n=this.positionInside(s))}return n}positionInside(t){let r=this.source.start.column,n=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,s=yn(i,this.source.start),a=s+t;for(let o=s;o<a;o++)i[o]===`
50
- `?(r=1,n+=1):r+=1;return{column:r,line:n,offset:a}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t={}){let r="document"in this.source.input?this.source.input.document:this.source.input.css,n={column:this.source.start.column,line:this.source.start.line,offset:yn(r,this.source.start)},i=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:yn(r,this.source.end)+1}:{column:n.column+1,line:n.line,offset:n.offset+1};if(t.word){let a=r.slice(yn(r,this.source.start),yn(r,this.source.end)).indexOf(t.word);a!==-1&&(n=this.positionInside(a),i=this.positionInside(a+t.word.length))}else t.start?n={column:t.start.column,line:t.start.line,offset:yn(r,t.start)}:typeof t.index=="number"&&(n=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:yn(r,t.end)}:typeof t.endIndex=="number"?i=this.positionInside(t.endIndex):typeof t.index=="number"&&(i=this.positionInside(t.index+1));return(i.line<n.line||i.line===n.line&&i.column<=n.column)&&(i={column:n.column+1,line:n.line,offset:n.offset+1}),{end:i,start:n}}raw(t,r){return new c9().raw(this,t,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let r=this,n=!1;for(let i of t)i===this?n=!0:n?(this.parent.insertAfter(r,i),r=i):this.parent.insertBefore(r,i);n||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,r){let n=r==null;r=r||new Map;let i=[],s=[[this,i,0]];for(let o=0;o<s.length;o++){let[c,l,f]=s[o],m={};l[f]=m;for(let d in c){if(!Object.prototype.hasOwnProperty.call(c,d)||d==="parent"||d==="proxyCache")continue;let g=c[d];if(Array.isArray(g)){let v=[];m[d]=v;for(let b=0;b<g.length;b++){let _=g[b];typeof _=="object"&&_.toJSON?_.toJSON===e.prototype.toJSON?s.push([_,v,b]):v[b]=_.toJSON(null,r):v[b]=_}}else if(typeof g=="object"&&g.toJSON)g.toJSON===e.prototype.toJSON?s.push([g,m,d]):m[d]=g.toJSON(null,r);else if(d==="source"){if(g==null)continue;let v=r.get(g.input);v==null&&(v=r.size,r.set(g.input,v)),m[d]={end:g.end,inputId:v,start:g.start}}else m[d]=g}}let a=i[0];return n&&(a.inputs=[...r.keys()].map(o=>o.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=u9){t.stringify&&(t=t.stringify);let r="";return t(this,n=>{r+=n}),r}warn(t,r,n={}){let i={node:this};for(let s in n)i[s]=n[s];return t.warn(r,i)}};FA.exports=tu;tu.default=tu});var so=x((Nme,BA)=>{"use strict";p();var p9=ru(),nu=class extends p9{constructor(t){super(t),this.type="comment"}};BA.exports=nu;nu.default=nu});var su=x((Lme,VA)=>{"use strict";p();var d9=ru(),iu=class extends d9{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}};VA.exports=iu;iu.default=iu});var zn=x((Ime,KA)=>{"use strict";p();var UA=so(),HA=su(),$A=ru(),{isClean:zA,my:WA}=Zc(),Z_,GA,JA,ev;function h9(e){let t=e.slice();for(;t.length>0;){let r=t.pop();if(delete r.source,r.nodes){r.nodes=r.nodes.slice();for(let n of r.nodes)t.push(n)}}return e.slice()}function m9(e){let t=[e];for(;t.length>0;){let r=t.pop();if(r[zA]=!1,r.proxyOf.nodes)for(let n of r.proxyOf.nodes)t.push(n)}}var _n=class e extends $A{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(...t){for(let r of t){let n=this.normalize(r,this.last);for(let i of n)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(t){let r=[this];for(;r.length>0;){let n=r.pop();if(n!==this&&n.cleanRaws!==e.prototype.cleanRaws){n.cleanRaws(t);continue}if($A.prototype.cleanRaws.call(n,t),n.nodes)for(let i of n.nodes)r.push(i)}}each(t){if(!this.proxyOf.nodes)return;let r=this.getIterator(),n,i;for(;this.indexes[r]<this.proxyOf.nodes.length&&(n=this.indexes[r],i=t(this.proxyOf.nodes[n],n),i!==!1);)this.indexes[r]+=1;return delete this.indexes[r],i}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,r){return r==="proxyOf"?t:t[r]?r==="each"||typeof r=="string"&&r.startsWith("walk")?(...n)=>t[r](...n.map(i=>typeof i=="function"?(s,a)=>i(s.toProxy(),a):i)):r==="every"||r==="some"?n=>t[r]((i,...s)=>n(i.toProxy(),...s)):r==="root"?()=>t.root().toProxy():r==="nodes"?t.nodes.map(n=>n.toProxy()):r==="first"||r==="last"?t[r].toProxy():t[r]:t[r]},set(t,r,n){return t[r]===n||(t[r]=n,(r==="name"||r==="params"||r==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,r){let n=this.index(t),i=this.normalize(r,this.proxyOf.nodes[n]).reverse();n=this.index(t);for(let a of i)this.proxyOf.nodes.splice(n+1,0,a);let s;for(let a in this.indexes)s=this.indexes[a],n<s&&(this.indexes[a]=s+i.length);return this.markDirty(),this}insertBefore(t,r){let n=this.index(t),i=n===0?"prepend":!1,s=this.normalize(r,this.proxyOf.nodes[n],i).reverse();n=this.index(t);for(let o of s)this.proxyOf.nodes.splice(n,0,o);let a;for(let o in this.indexes)a=this.indexes[o],n<=a&&(this.indexes[o]=a+s.length);return this.markDirty(),this}normalize(t,r){if(typeof t=="string")t=h9(GA(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let i of t)i.parent&&i.parent.removeChild(i,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let i of t)i.parent&&i.parent.removeChild(i,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new HA(t)]}else if(t.selector||t.selectors)t=[new ev(t)];else if(t.name)t=[new Z_(t)];else if(t.text)t=[new UA(t)];else throw new Error("Unknown node type in node creation");return t.map(i=>(i[WA]||e.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[zA]&&m9(i),i.raws||(i.raws={}),typeof i.raws.before>"u"&&r&&typeof r.raws.before<"u"&&(i.raws.before=r.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...t){t=t.reverse();for(let r of t){let n=this.normalize(r,this.first,"prepend").reverse();for(let i of n)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let r;for(let n in this.indexes)r=this.indexes[n],r>=t&&(this.indexes[n]=r-1);return this.markDirty(),this}replaceValues(t,r,n){return n||(n=r,r={}),this.walkDecls(i=>{r.props&&!r.props.includes(i.prop)||r.fast&&!i.value.includes(r.fast)||(i.value=i.value.replace(t,n))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(!this.proxyOf.nodes)return;let r=[{iterator:this.getIterator(),node:this.proxyOf}];for(;r.length>0;){let{iterator:n,node:i}=r[r.length-1],s=i.indexes[n];if(s>=i.proxyOf.nodes.length){delete i.indexes[n],r.pop();let c=r[r.length-1];c&&(c.node.indexes[c.iterator]+=1);continue}let a=i.proxyOf.nodes[s],o;try{o=t(a,s)}catch(c){throw a.addToError(c)}if(o===!1){for(let c of r)delete c.node.indexes[c.iterator];return!1}a.walk&&a.proxyOf.nodes?r.push({iterator:a.getIterator(),node:a}):i.indexes[n]+=1}}walkAtRules(t,r){return r?t instanceof RegExp?this.walk((n,i)=>{if(n.type==="atrule"&&t.test(n.name))return r(n,i)}):this.walk((n,i)=>{if(n.type==="atrule"&&n.name===t)return r(n,i)}):(r=t,this.walk((n,i)=>{if(n.type==="atrule")return r(n,i)}))}walkComments(t){return this.walk((r,n)=>{if(r.type==="comment")return t(r,n)})}walkDecls(t,r){return r?t instanceof RegExp?this.walk((n,i)=>{if(n.type==="decl"&&t.test(n.prop))return r(n,i)}):this.walk((n,i)=>{if(n.type==="decl"&&n.prop===t)return r(n,i)}):(r=t,this.walk((n,i)=>{if(n.type==="decl")return r(n,i)}))}walkRules(t,r){return r?t instanceof RegExp?this.walk((n,i)=>{if(n.type==="rule"&&t.test(n.selector))return r(n,i)}):this.walk((n,i)=>{if(n.type==="rule"&&n.selector===t)return r(n,i)}):(r=t,this.walk((n,i)=>{if(n.type==="rule")return r(n,i)}))}};_n.registerParse=e=>{GA=e};_n.registerRule=e=>{ev=e};_n.registerAtRule=e=>{Z_=e};_n.registerRoot=e=>{JA=e};KA.exports=_n;_n.default=_n;_n.rebuild=e=>{let t=[e];for(;t.length>0;){let r=t.pop();if(r.type==="atrule"?Object.setPrototypeOf(r,Z_.prototype):r.type==="rule"?Object.setPrototypeOf(r,ev.prototype):r.type==="decl"?Object.setPrototypeOf(r,HA.prototype):r.type==="comment"?Object.setPrototypeOf(r,UA.prototype):r.type==="root"&&Object.setPrototypeOf(r,JA.prototype),r[WA]=!0,r.nodes)for(let n of r.nodes)t.push(n)}}});var gp=x((Rme,QA)=>{"use strict";p();var YA=zn(),ao=class extends YA{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};QA.exports=ao;ao.default=ao;YA.registerAtRule(ao)});var yp=x((jme,eO)=>{"use strict";p();var g9=zn(),XA,ZA,Ps=class extends g9{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new XA(new ZA,this,t).stringify()}};Ps.registerLazyResult=e=>{XA=e};Ps.registerProcessor=e=>{ZA=e};eO.exports=Ps;Ps.default=Ps});var rO=x((Bme,tO)=>{p();var y9="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",_9=(e,t=21)=>(r=t)=>{let n="",i=r|0;for(;i--;)n+=e[Math.random()*e.length|0];return n},v9=(e=21)=>{let t="",r=e|0;for(;r--;)t+=y9[Math.random()*64|0];return t};tO.exports={nanoid:v9,customAlphabet:_9}});var iO=x(tv=>{p();var nO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");tv.encode=function(e){if(0<=e&&e<nO.length)return nO[e];throw new TypeError("Must be between 0 and 63: "+e)};tv.decode=function(e){var t=65,r=90,n=97,i=122,s=48,a=57,o=43,c=47,l=26,f=52;return t<=e&&e<=r?e-t:n<=e&&e<=i?e-n+l:s<=e&&e<=a?e-s+f:e==o?62:e==c?63:-1}});var iv=x(nv=>{p();var sO=iO(),rv=5,aO=1<<rv,oO=aO-1,cO=aO;function b9(e){return e<0?(-e<<1)+1:(e<<1)+0}function k9(e){var t=(e&1)===1,r=e>>1;return t?-r:r}nv.encode=function(t){var r="",n,i=b9(t);do n=i&oO,i>>>=rv,i>0&&(n|=cO),r+=sO.encode(n);while(i>0);return r};nv.decode=function(t,r,n){var i=t.length,s=0,a=0,o,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=sO.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));o=!!(c&cO),c&=oO,s=s+(c<<a),a+=rv}while(o);n.value=k9(s),n.rest=r}});var co=x(wt=>{p();function S9(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}wt.getArg=S9;var uO=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,T9=/^data:.+\,.+$/;function au(e){var t=e.match(uO);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}wt.urlParse=au;function oo(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}wt.urlGenerate=oo;var w9=32;function x9(e){var t=[];return function(r){for(var n=0;n<t.length;n++)if(t[n].input===r){var i=t[0];return t[0]=t[n],t[n]=i,t[0].result}var s=e(r);return t.unshift({input:r,result:s}),t.length>w9&&t.pop(),s}}var sv=x9(function(t){var r=t,n=au(t);if(n){if(!n.path)return t;r=n.path}for(var i=wt.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 c,l=0,o=s.length-1;o>=0;o--)c=s[o],c==="."?s.splice(o,1):c===".."?l++:l>0&&(c===""?(s.splice(o+1,l),l=0):(s.splice(o,2),l--));return r=s.join("/"),r===""&&(r=i?"/":"."),n?(n.path=r,oo(n)):r});wt.normalize=sv;function lO(e,t){e===""&&(e="."),t===""&&(t=".");var r=au(t),n=au(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),oo(r);if(r||t.match(T9))return t;if(n&&!n.host&&!n.path)return n.host=t,oo(n);var i=t.charAt(0)==="/"?t:sv(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=i,oo(n)):i}wt.join=lO;wt.isAbsolute=function(e){return e.charAt(0)==="/"||uO.test(e)};function E9(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}wt.relative=E9;var fO=(function(){var e=Object.create(null);return!("__proto__"in e)})();function pO(e){return e}function A9(e){return dO(e)?"$"+e:e}wt.toSetString=fO?pO:A9;function O9(e){return dO(e)?e.slice(1):e}wt.fromSetString=fO?pO:O9;function dO(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function P9(e,t,r){var n=Wn(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:Wn(e.name,t.name)}wt.compareByOriginalPositions=P9;function N9(e,t,r){var n;return n=e.originalLine-t.originalLine,n!==0||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:Wn(e.name,t.name)}wt.compareByOriginalPositionsNoSource=N9;function q9(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=Wn(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:Wn(e.name,t.name)}wt.compareByGeneratedPositionsDeflated=q9;function L9(e,t,r){var n=e.generatedColumn-t.generatedColumn;return n!==0||r||(n=Wn(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:Wn(e.name,t.name)}wt.compareByGeneratedPositionsDeflatedNoLine=L9;function Wn(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function C9(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=Wn(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:Wn(e.name,t.name)}wt.compareByGeneratedPositionsInflated=C9;function I9(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}wt.parseSourceMapInput=I9;function M9(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=au(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}t=lO(oo(n),t)}return sv(t)}wt.computeSourceURL=M9});var cv=x(hO=>{p();var av=co(),ov=Object.prototype.hasOwnProperty,Ns=typeof Map<"u";function Gn(){this._array=[],this._set=Ns?new Map:Object.create(null)}Gn.fromArray=function(t,r){for(var n=new Gn,i=0,s=t.length;i<s;i++)n.add(t[i],r);return n};Gn.prototype.size=function(){return Ns?this._set.size:Object.getOwnPropertyNames(this._set).length};Gn.prototype.add=function(t,r){var n=Ns?t:av.toSetString(t),i=Ns?this.has(t):ov.call(this._set,n),s=this._array.length;(!i||r)&&this._array.push(t),i||(Ns?this._set.set(t,s):this._set[n]=s)};Gn.prototype.has=function(t){if(Ns)return this._set.has(t);var r=av.toSetString(t);return ov.call(this._set,r)};Gn.prototype.indexOf=function(t){if(Ns){var r=this._set.get(t);if(r>=0)return r}else{var n=av.toSetString(t);if(ov.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};Gn.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};Gn.prototype.toArray=function(){return this._array.slice()};hO.ArraySet=Gn});var yO=x(gO=>{p();var mO=co();function R9(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,s=t.generatedColumn;return n>r||n==r&&s>=i||mO.compareByGeneratedPositionsInflated(e,t)<=0}function _p(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}_p.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};_p.prototype.add=function(t){R9(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};_p.prototype.toArray=function(){return this._sorted||(this._array.sort(mO.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};gO.MappingList=_p});var uv=x(_O=>{p();var ou=iv(),ut=co(),vp=cv().ArraySet,D9=yO().MappingList;function Pr(e){e||(e={}),this._file=ut.getArg(e,"file",null),this._sourceRoot=ut.getArg(e,"sourceRoot",null),this._skipValidation=ut.getArg(e,"skipValidation",!1),this._ignoreInvalidMapping=ut.getArg(e,"ignoreInvalidMapping",!1),this._sources=new vp,this._names=new vp,this._mappings=new D9,this._sourcesContents=null}Pr.prototype._version=3;Pr.fromSourceMap=function(t,r){var n=t.sourceRoot,i=new Pr(Object.assign(r||{},{file:t.file,sourceRoot:n}));return t.eachMapping(function(s){var a={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(a.source=s.source,n!=null&&(a.source=ut.relative(n,a.source)),a.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(a.name=s.name)),i.addMapping(a)}),t.sources.forEach(function(s){var a=s;n!==null&&(a=ut.relative(n,s)),i._sources.has(a)||i._sources.add(a);var o=t.sourceContentFor(s);o!=null&&i.setSourceContent(s,o)}),i};Pr.prototype.addMapping=function(t){var r=ut.getArg(t,"generated"),n=ut.getArg(t,"original",null),i=ut.getArg(t,"source",null),s=ut.getArg(t,"name",null);!this._skipValidation&&this._validateMapping(r,n,i,s)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:s}))};Pr.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=ut.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ut.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[ut.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Pr.prototype.applySourceMap=function(t,r,n){var i=r;if(r==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=t.file}var s=this._sourceRoot;s!=null&&(i=ut.relative(s,i));var a=new vp,o=new vp;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var l=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});l.source!=null&&(c.source=l.source,n!=null&&(c.source=ut.join(n,c.source)),s!=null&&(c.source=ut.relative(s,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var f=c.source;f!=null&&!a.has(f)&&a.add(f);var m=c.name;m!=null&&!o.has(m)&&o.add(m)},this),this._sources=a,this._names=o,t.sources.forEach(function(c){var l=t.sourceContentFor(c);l!=null&&(n!=null&&(c=ut.join(n,c)),s!=null&&(c=ut.relative(s,c)),this.setSourceContent(c,l))},this)};Pr.prototype._validateMapping=function(t,r,n,i){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(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!i)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;var s="Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}};Pr.prototype._serializeMappings=function(){for(var t=0,r=1,n=0,i=0,s=0,a=0,o="",c,l,f,m,d=this._mappings.toArray(),g=0,v=d.length;g<v;g++){if(l=d[g],c="",l.generatedLine!==r)for(t=0;l.generatedLine!==r;)c+=";",r++;else if(g>0){if(!ut.compareByGeneratedPositionsInflated(l,d[g-1]))continue;c+=","}c+=ou.encode(l.generatedColumn-t),t=l.generatedColumn,l.source!=null&&(m=this._sources.indexOf(l.source),c+=ou.encode(m-a),a=m,c+=ou.encode(l.originalLine-1-i),i=l.originalLine-1,c+=ou.encode(l.originalColumn-n),n=l.originalColumn,l.name!=null&&(f=this._names.indexOf(l.name),c+=ou.encode(f-s),s=f)),o+=c}return o};Pr.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=ut.relative(r,n));var i=ut.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Pr.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};Pr.prototype.toString=function(){return JSON.stringify(this.toJSON())};_O.SourceMapGenerator=Pr});var vO=x(qs=>{p();qs.GREATEST_LOWER_BOUND=1;qs.LEAST_UPPER_BOUND=2;function lv(e,t,r,n,i,s){var a=Math.floor((t-e)/2)+e,o=i(r,n[a],!0);return o===0?a:o>0?t-a>1?lv(a,t,r,n,i,s):s==qs.LEAST_UPPER_BOUND?t<n.length?t:-1:a:a-e>1?lv(e,a,r,n,i,s):s==qs.LEAST_UPPER_BOUND?a:e<0?-1:e}qs.search=function(t,r,n,i){if(r.length===0)return-1;var s=lv(-1,r.length,t,r,n,i||qs.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&n(r[s],r[s-1],!0)===0;)--s;return s}});var SO=x(kO=>{p();function j9(e){function t(i,s,a){var o=i[s];i[s]=i[a],i[a]=o}function r(i,s){return Math.round(i+Math.random()*(s-i))}function n(i,s,a,o){if(a<o){var c=r(a,o),l=a-1;t(i,c,o);for(var f=i[o],m=a;m<o;m++)s(i[m],f,!1)<=0&&(l+=1,t(i,l,m));t(i,l+1,m);var d=l+1;n(i,s,a,d-1),n(i,s,d+1,o)}}return n}function F9(e){let t=j9.toString();return new Function(`return ${t}`)()(e)}var bO=new WeakMap;kO.quickSort=function(e,t,r=0){let n=bO.get(t);n===void 0&&(n=F9(t),bO.set(t,n)),n(e,t,r,e.length-1)}});var xO=x(bp=>{p();var ie=co(),pv=vO(),uo=cv().ArraySet,B9=iv(),cu=SO().quickSort;function ze(e,t){var r=e;return typeof e=="string"&&(r=ie.parseSourceMapInput(e)),r.sections!=null?new Xr(r,t):new Pt(r,t)}ze.fromSourceMap=function(e,t){return Pt.fromSourceMap(e,t)};ze.prototype._version=3;ze.prototype.__generatedMappings=null;Object.defineProperty(ze.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});ze.prototype.__originalMappings=null;Object.defineProperty(ze.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});ze.prototype._charIsMappingSeparator=function(t,r){var n=t.charAt(r);return n===";"||n===","};ze.prototype._parseMappings=function(t,r){throw new Error("Subclasses must implement _parseMappings")};ze.GENERATED_ORDER=1;ze.ORIGINAL_ORDER=2;ze.GREATEST_LOWER_BOUND=1;ze.LEAST_UPPER_BOUND=2;ze.prototype.eachMapping=function(t,r,n){var i=r||null,s=n||ze.GENERATED_ORDER,a;switch(s){case ze.GENERATED_ORDER:a=this._generatedMappings;break;case ze.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var o=this.sourceRoot,c=t.bind(i),l=this._names,f=this._sources,m=this._sourceMapURL,d=0,g=a.length;d<g;d++){var v=a[d],b=v.source===null?null:f.at(v.source);b!==null&&(b=ie.computeSourceURL(o,b,m)),c({source:b,generatedLine:v.generatedLine,generatedColumn:v.generatedColumn,originalLine:v.originalLine,originalColumn:v.originalColumn,name:v.name===null?null:l.at(v.name)})}};ze.prototype.allGeneratedPositionsFor=function(t){var r=ie.getArg(t,"line"),n={source:ie.getArg(t,"source"),originalLine:r,originalColumn:ie.getArg(t,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",ie.compareByOriginalPositions,pv.LEAST_UPPER_BOUND);if(s>=0){var a=this._originalMappings[s];if(t.column===void 0)for(var o=a.originalLine;a&&a.originalLine===o;)i.push({line:ie.getArg(a,"generatedLine",null),column:ie.getArg(a,"generatedColumn",null),lastColumn:ie.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s];else for(var c=a.originalColumn;a&&a.originalLine===r&&a.originalColumn==c;)i.push({line:ie.getArg(a,"generatedLine",null),column:ie.getArg(a,"generatedColumn",null),lastColumn:ie.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s]}return i};bp.SourceMapConsumer=ze;function Pt(e,t){var r=e;typeof e=="string"&&(r=ie.parseSourceMapInput(e));var n=ie.getArg(r,"version"),i=ie.getArg(r,"sources"),s=ie.getArg(r,"names",[]),a=ie.getArg(r,"sourceRoot",null),o=ie.getArg(r,"sourcesContent",null),c=ie.getArg(r,"mappings"),l=ie.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);a&&(a=ie.normalize(a)),i=i.map(String).map(ie.normalize).map(function(f){return a&&ie.isAbsolute(a)&&ie.isAbsolute(f)?ie.relative(a,f):f}),this._names=uo.fromArray(s.map(String),!0),this._sources=uo.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(f){return ie.computeSourceURL(a,f,t)}),this.sourceRoot=a,this.sourcesContent=o,this._mappings=c,this._sourceMapURL=t,this.file=l}Pt.prototype=Object.create(ze.prototype);Pt.prototype.consumer=ze;Pt.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=ie.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1};Pt.fromSourceMap=function(t,r){var n=Object.create(Pt.prototype),i=n._names=uo.fromArray(t._names.toArray(),!0),s=n._sources=uo.fromArray(t._sources.toArray(),!0);n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(g){return ie.computeSourceURL(n.sourceRoot,g,r)});for(var a=t._mappings.toArray().slice(),o=n.__generatedMappings=[],c=n.__originalMappings=[],l=0,f=a.length;l<f;l++){var m=a[l],d=new wO;d.generatedLine=m.generatedLine,d.generatedColumn=m.generatedColumn,m.source&&(d.source=s.indexOf(m.source),d.originalLine=m.originalLine,d.originalColumn=m.originalColumn,m.name&&(d.name=i.indexOf(m.name)),c.push(d)),o.push(d)}return cu(n.__originalMappings,ie.compareByOriginalPositions),n};Pt.prototype._version=3;Object.defineProperty(Pt.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function wO(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var fv=ie.compareByGeneratedPositionsDeflatedNoLine;function TO(e,t){let r=e.length,n=e.length-t;if(!(n<=1))if(n==2){let i=e[t],s=e[t+1];fv(i,s)>0&&(e[t]=s,e[t+1]=i)}else if(n<20)for(let i=t;i<r;i++)for(let s=i;s>t;s--){let a=e[s-1],o=e[s];if(fv(a,o)<=0)break;e[s-1]=o,e[s]=a}else cu(e,fv,t)}Pt.prototype._parseMappings=function(t,r){var n=1,i=0,s=0,a=0,o=0,c=0,l=t.length,f=0,m={},d={},g=[],v=[],b,_,k,w,T;let y=0;for(;f<l;)if(t.charAt(f)===";")n++,f++,i=0,TO(v,y),y=v.length;else if(t.charAt(f)===",")f++;else{for(b=new wO,b.generatedLine=n,w=f;w<l&&!this._charIsMappingSeparator(t,w);w++);for(_=t.slice(f,w),k=[];f<w;)B9.decode(t,f,d),T=d.value,f=d.rest,k.push(T);if(k.length===2)throw new Error("Found a source, but no line and column");if(k.length===3)throw new Error("Found a source and line, but no column");if(b.generatedColumn=i+k[0],i=b.generatedColumn,k.length>1&&(b.source=o+k[1],o+=k[1],b.originalLine=s+k[2],s=b.originalLine,b.originalLine+=1,b.originalColumn=a+k[3],a=b.originalColumn,k.length>4&&(b.name=c+k[4],c+=k[4])),v.push(b),typeof b.originalLine=="number"){let O=b.source;for(;g.length<=O;)g.push(null);g[O]===null&&(g[O]=[]),g[O].push(b)}}TO(v,y),this.__generatedMappings=v;for(var A=0;A<g.length;A++)g[A]!=null&&cu(g[A],ie.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...g)};Pt.prototype._findMapping=function(t,r,n,i,s,a){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[i]);return pv.search(t,r,s,a)};Pt.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var r=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};Pt.prototype.originalPositionFor=function(t){var r={generatedLine:ie.getArg(t,"line"),generatedColumn:ie.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",ie.compareByGeneratedPositionsDeflated,ie.getArg(t,"bias",ze.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var s=ie.getArg(i,"source",null);s!==null&&(s=this._sources.at(s),s=ie.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var a=ie.getArg(i,"name",null);return a!==null&&(a=this._names.at(a)),{source:s,line:ie.getArg(i,"originalLine",null),column:ie.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};Pt.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};Pt.prototype.sourceContentFor=function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var i=t;this.sourceRoot!=null&&(i=ie.relative(this.sourceRoot,i));var s;if(this.sourceRoot!=null&&(s=ie.urlParse(this.sourceRoot))){var a=i.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("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};Pt.prototype.generatedPositionFor=function(t){var r=ie.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:ie.getArg(t,"line"),originalColumn:ie.getArg(t,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",ie.compareByOriginalPositions,ie.getArg(t,"bias",ze.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:ie.getArg(s,"generatedLine",null),column:ie.getArg(s,"generatedColumn",null),lastColumn:ie.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};bp.BasicSourceMapConsumer=Pt;function Xr(e,t){var r=e;typeof e=="string"&&(r=ie.parseSourceMapInput(e));var n=ie.getArg(r,"version"),i=ie.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new uo,this._names=new uo;var s={line:-1,column:0};this._sections=i.map(function(a){if(a.url)throw new Error("Support for url field in sections not implemented.");var o=ie.getArg(a,"offset"),c=ie.getArg(o,"line"),l=ie.getArg(o,"column");if(c<s.line||c===s.line&&l<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=o,{generatedOffset:{generatedLine:c+1,generatedColumn:l+1},consumer:new ze(ie.getArg(a,"map"),t)}})}Xr.prototype=Object.create(ze.prototype);Xr.prototype.constructor=ze;Xr.prototype._version=3;Object.defineProperty(Xr.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}});Xr.prototype.originalPositionFor=function(t){var r={generatedLine:ie.getArg(t,"line"),generatedColumn:ie.getArg(t,"column")},n=pv.search(r,this._sections,function(s,a){var o=s.generatedLine-a.generatedOffset.generatedLine;return o||s.generatedColumn-a.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}};Xr.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};Xr.prototype.sourceContentFor=function(t,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],s=i.consumer.sourceContentFor(t,!0);if(s||s==="")return s}if(r)return null;throw new Error('"'+t+'" is not in the SourceMap.')};Xr.prototype.generatedPositionFor=function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(ie.getArg(t,"source"))!==-1){var i=n.consumer.generatedPositionFor(t);if(i){var s={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};Xr.prototype._parseMappings=function(t,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],s=i.consumer._generatedMappings,a=0;a<s.length;a++){var o=s[a],c=i.consumer._sources.at(o.source);c!==null&&(c=ie.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL)),this._sources.add(c),c=this._sources.indexOf(c);var l=null;o.name&&(l=i.consumer._names.at(o.name),this._names.add(l),l=this._names.indexOf(l));var f={source:c,generatedLine:o.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(i.generatedOffset.generatedLine===o.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:l};this.__generatedMappings.push(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}cu(this.__generatedMappings,ie.compareByGeneratedPositionsDeflated),cu(this.__originalMappings,ie.compareByOriginalPositions)};bp.IndexedSourceMapConsumer=Xr});var AO=x(EO=>{p();var V9=uv().SourceMapGenerator,kp=co(),$9=/(\r?\n)/,U9=10,lo="$$$isSourceNode$$$";function dr(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=r??null,this.name=i??null,this[lo]=!0,n!=null&&this.add(n)}dr.fromStringWithSourceMap=function(t,r,n){var i=new dr,s=t.split($9),a=0,o=function(){var d=v(),g=v()||"";return d+g;function v(){return a<s.length?s[a++]:void 0}},c=1,l=0,f=null;return r.eachMapping(function(d){if(f!==null)if(c<d.generatedLine)m(f,o()),c++,l=0;else{var g=s[a]||"",v=g.substr(0,d.generatedColumn-l);s[a]=g.substr(d.generatedColumn-l),l=d.generatedColumn,m(f,v),f=d;return}for(;c<d.generatedLine;)i.add(o()),c++;if(l<d.generatedColumn){var g=s[a]||"";i.add(g.substr(0,d.generatedColumn)),s[a]=g.substr(d.generatedColumn),l=d.generatedColumn}f=d},this),a<s.length&&(f&&m(f,o()),i.add(s.splice(a).join(""))),r.sources.forEach(function(d){var g=r.sourceContentFor(d);g!=null&&(n!=null&&(d=kp.join(n,d)),i.setSourceContent(d,g))}),i;function m(d,g){if(d===null||d.source===void 0)i.add(g);else{var v=n?kp.join(n,d.source):d.source;i.add(new dr(d.originalLine,d.originalColumn,v,g,d.name))}}};dr.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[lo]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};dr.prototype.prepend=function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[lo]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};dr.prototype.walk=function(t){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[lo]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})};dr.prototype.join=function(t){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(t);r.push(this.children[n]),this.children=r}return this};dr.prototype.replaceRight=function(t,r){var n=this.children[this.children.length-1];return n[lo]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this};dr.prototype.setSourceContent=function(t,r){this.sourceContents[kp.toSetString(t)]=r};dr.prototype.walkSourceContents=function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][lo]&&this.children[r].walkSourceContents(t);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)t(kp.fromSetString(i[r]),this.sourceContents[i[r]])};dr.prototype.toString=function(){var t="";return this.walk(function(r){t+=r}),t};dr.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new V9(t),i=!1,s=null,a=null,o=null,c=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||c!==f.name)&&n.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,c=f.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),s=null,i=!1);for(var m=0,d=l.length;m<d;m++)l.charCodeAt(m)===U9?(r.line++,r.column=0,m+1===d?(s=null,i=!1):i&&n.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){n.setSourceContent(l,f)}),{code:r.code,map:n}};EO.SourceNode=dr});var Tp=x(Sp=>{p();Sp.SourceMapGenerator=uv().SourceMapGenerator;Sp.SourceMapConsumer=xO().SourceMapConsumer;Sp.SourceNode=AO().SourceNode});var dv=x((lge,qO)=>{"use strict";p();var{existsSync:H9,readFileSync:z9,realpathSync:W9}=oe("fs"),{dirname:wp,isAbsolute:G9,join:J9,relative:K9,sep:Y9}=oe("path"),{SourceMapConsumer:OO,SourceMapGenerator:PO}=Tp();function NO(e){try{return W9(e)}catch{return e}}function Q9(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var uu=class{constructor(t,r){if(r.map===!1)return;r.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let n=r.map?r.map.prev:void 0,i=this.loadMap(r.from,n);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=wp(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new OO(this.json||this.text)),this.consumerCache}decodeInline(t){let r=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/,a=t.match(i)||t.match(s);if(a)return decodeURIComponent(t.substr(a[0].length));let o=t.match(r)||t.match(n);if(o)return Q9(t.substr(o[0].length));let c=t.slice(22);throw c=c.slice(0,c.indexOf(",")),new Error("Unsupported source map encoding "+c)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let r=t.match(/\/\*\s*# sourceMappingURL=/g);if(!r)return;let n=t.lastIndexOf(r.pop()),i=t.indexOf("*/",n);n>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(n,i)))}loadFile(t,r,n){if(!n&&!this.unsafeMap){if(!/\.map$/i.test(t)||!r)return;let i=K9(NO(wp(r)),NO(t));if(i===".."||i.startsWith(".."+Y9)||G9(i))return}if(this.root=wp(t),H9(t))return this.mapFile=t,z9(t,"utf-8").toString().trim()}loadMap(t,r){if(r===!1)return!1;if(r){if(typeof r=="string")return r;if(typeof r=="function"){let n=r(t);if(n){let i=this.loadFile(n,t,!0);if(!i)throw new Error("Unable to load previous source map: "+n.toString());return i}}else{if(r instanceof OO)return PO.fromSourceMap(r).toString();if(r instanceof PO)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 n=this.annotation;t&&(n=J9(wp(t),n));let i=this.loadFile(n,t,!1);if(i)try{this.json=JSON.parse(i.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return i}}}startWith(t,r){return t?t.substr(0,r.length)===r:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};qO.exports=uu;uu.default=uu});var lu=x((pge,RO)=>{"use strict";p();var{nanoid:X9}=rO(),{isAbsolute:gv,resolve:yv}=oe("path"),{SourceMapConsumer:Z9,SourceMapGenerator:e6}=Tp(),{fileURLToPath:LO,pathToFileURL:xp}=oe("url"),CO=mp(),t6=dv(),hv=K_(),mv=Symbol("lineToIndexCache"),r6=!!(Z9&&e6),IO=!!(yv&&gv);function MO(e){if(e[mv])return e[mv];let t=e.css.split(`
51
- `),r=new Array(t.length),n=0;for(let i=0,s=t.length;i<s;i++)r[i]=n,n+=t[i].length+1;return e[mv]=r,r}var fo=class{get from(){return this.file||this.id}constructor(t,r={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.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&&(!IO||/^\w+:\/\//.test(r.from)||gv(r.from)?this.file=r.from:this.file=yv(r.from)),IO&&r6){let n=new t6(this.css,r);if(n.text){this.map=n;let i=n.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+X9(6)+">"),this.map&&(this.map.file=this.from)}error(t,r,n,i={}){let s,a,o,c,l;if(r&&typeof r=="object"){let m=r,d=n;if(typeof m.offset=="number"){c=m.offset;let g=this.fromOffset(c);r=g.line,n=g.col}else r=m.line,n=m.column,c=this.fromLineAndColumn(r,n);if(typeof d.offset=="number"){o=d.offset;let g=this.fromOffset(o);a=g.line,s=g.col}else a=d.line,s=d.column,o=this.fromLineAndColumn(d.line,d.column)}else if(n)c=this.fromLineAndColumn(r,n);else{c=r;let m=this.fromOffset(c);r=m.line,n=m.col}let f=this.origin(r,n,a,s);return f?l=new CO(t,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,i.plugin):l=new CO(t,a===void 0?r:{column:n,line:r},a===void 0?n:{column:s,line:a},this.css,this.file,i.plugin),l.input={column:n,endColumn:s,endLine:a,endOffset:o,line:r,offset:c,source:this.css},this.file&&(xp&&(l.input.url=xp(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,r){return MO(this)[t-1]+r-1}fromOffset(t){let r=MO(this),n=r[r.length-1],i=0;if(t>=n)i=r.length-1;else{let s=r.length-2,a;for(;i<s;)if(a=i+(s-i>>1),t<r[a])s=a-1;else if(t>=r[a+1])i=a+1;else{i=a;break}}return{col:t-r[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:yv(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,r,n,i){if(!this.map)return!1;let s=this.map.consumer(),a=s.originalPositionFor({column:r-1,line:t});if(!a.source)return!1;let o;if(typeof n=="number"){let m=s.originalPositionFor({column:i-1,line:n});m.source&&(o=m)}let c;gv(a.source)?c=xp(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||xp(this.map.mapFile));let l={column:a.column+1,endColumn:o&&o.column+1,endLine:o&&o.line,line:a.line,url:c.toString()};if(c.protocol==="file:")if(LO)l.file=LO(c);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 t={};for(let r of["hasBOM","css","file","id"])this[r]!=null&&(t[r]=this[r]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};RO.exports=fo;fo.default=fo;hv&&hv.registerInput&&hv.registerInput(fo)});var po=x((hge,BO)=>{"use strict";p();var DO=zn(),jO,FO,xi=class extends DO{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,r,n){let i=new Set;for(let a of Array.isArray(t)?t:[t])a&&typeof a=="object"&&!a.parent&&a.raws&&typeof a.raws.before<"u"&&i.add(a.raws);let s=super.normalize(t);if(r){if(n==="prepend")this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r)for(let a of s)i.has(a.raws)||(a.raws.before=r.raws.before)}return s}removeChild(t,r){let n=this.index(t);return!r&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(t)}toResult(t={}){return new jO(new FO,this,t).stringify()}};xi.registerLazyResult=e=>{jO=e};xi.registerProcessor=e=>{FO=e};BO.exports=xi;xi.default=xi;DO.registerRoot(xi)});var _v=x((gge,VO)=>{"use strict";p();var fu={comma(e){return fu.split(e,[","],!0)},space(e){let t=[" ",`
52
- `," "];return fu.split(e,t)},split(e,t,r){if(typeof e!="string")return[];let n=[],i="",s=!1,a=0,o=!1,c="",l=!1;for(let f of e)l?l=!1:f==="\\"?l=!0:o?f===c&&(o=!1):f==='"'||f==="'"?(o=!0,c=f):f==="("?a+=1:f===")"?a>0&&(a-=1):a===0&&t.includes(f)&&(s=!0),s?(i!==""&&n.push(i.trim()),i="",s=!1):i+=f;return(r||i!=="")&&n.push(i.trim()),n}};VO.exports=fu;fu.default=fu});var Ep=x((_ge,UO)=>{"use strict";p();var $O=zn(),n6=_v(),ho=class extends $O{get selectors(){return n6.comma(this.selector)}set selectors(t){let r=this.selector?this.selector.match(/,\s*/):null,n=r?r[0]:","+this.raw("between","beforeOpen");this.selector=t.join(n)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}};UO.exports=ho;ho.default=ho;$O.registerRule(ho)});var WO=x((bge,zO)=>{"use strict";p();var i6=gp(),s6=so(),a6=su(),o6=lu(),c6=dv(),u6=po(),l6=Ep();function HO(e,t){return e.inputs?e.inputs.map(r=>{let n={...r,__proto__:o6.prototype};return n.map&&(n.map={...n.map,__proto__:c6.prototype}),n}):t}function f6(e,t,r){let n={...e};if(delete n.inputs,delete n.nodes,n.source){let{inputId:s,...a}=n.source;n.source=a,s!=null&&(n.source.input=t[s])}let i;if(n.type==="root")i=new u6(n);else if(n.type==="decl")i=new a6(n);else if(n.type==="rule")i=new l6(n);else if(n.type==="comment")i=new s6(n);else if(n.type==="atrule")i=new i6(n);else throw new Error("Unknown node type: "+e.type);if(r){i.nodes=r;for(let s of r)s.parent=i}return i}function Ap(e,t){if(Array.isArray(e))return e.map(i=>Ap(i));let r,n=[{childIndex:0,children:[],inputs:HO(e,t),json:e}];for(;n.length>0;){let i=n[n.length-1],s=i.json.nodes;if(s&&i.childIndex<s.length){let o=s[i.childIndex];i.childIndex+=1,n.push({childIndex:0,children:[],inputs:HO(o,i.inputs),json:o});continue}n.pop();let a=f6(i.json,i.inputs,s?i.children:void 0);n.length>0?n[n.length-1].children.push(a):r=a}return r}zO.exports=Ap;Ap.default=Ap});var bv=x((Sge,XO)=>{"use strict";p();var{dirname:Op,relative:JO,resolve:KO,sep:YO}=oe("path"),{SourceMapConsumer:QO,SourceMapGenerator:Pp}=Tp(),{pathToFileURL:GO}=oe("url"),p6=lu(),d6=!!(QO&&Pp),h6=!!(Op&&KO&&JO&&YO),vv=class{constructor(t,r,n,i){this.stringify=t,this.mapOpts=n.map||{},this.root=r,this.opts=n,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let r=`
53
- `;this.css.includes(`\r
54
- `)&&(r=`\r
55
- `),this.css+=r+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let r=this.toUrl(this.path(t.file)),n=t.root||Op(t.file),i;this.mapOpts.sourcesContent===!1?(i=new QO(t.text),i.sourcesContent&&(i.sourcesContent=null)):i=t.consumer(),this.map.applySourceMap(i,r,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let t;for(let r=this.root.nodes.length-1;r>=0;r--)t=this.root.nodes[r],t.type==="comment"&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(r)}else if(this.css){let t;for(;(t=this.css.lastIndexOf("/*#"))!==-1;){let r=this.css.indexOf("*/",t+3);if(r===-1)break;for(;t>0&&this.css[t-1]===`
56
- `;)t--;this.css=this.css.slice(0,t)+this.css.slice(r+2)}}}}generate(){if(this.clearAnnotation(),h6&&d6&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,r=>{t+=r}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Pp.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Pp({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 Pp({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,r=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,a;this.stringify(this.root,(o,c,l)=>{if(this.css+=o,c&&l!=="end"&&(i.generated.line=t,i.generated.column=r-1,c.source&&c.source.start?(i.source=this.sourcePath(c),i.original.line=c.source.start.line,i.original.column=c.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=o.match(/\n/g),a?(t+=a.length,s=o.lastIndexOf(`
57
- `),r=o.length-s):r+=o.length,c&&l!=="start"){let f=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==f.last||f.raws.semicolon)&&(c.source&&c.source.end?(i.source=this.sourcePath(c),i.original.line=c.source.end.line,i.original.column=c.source.end.column-1,i.generated.line=t,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=t,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!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(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let r=this.memoizedPaths.get(t);if(r)return r;let n=this.opts.to?Op(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=Op(KO(n,this.mapOpts.annotation)));let i=JO(n,t);return this.memoizedPaths.set(t,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let r=t.source.input.map;this.previousMaps.includes(r)||this.previousMaps.push(r)}});else{let t=new p6(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(r=>{if(r.source){let n=r.source.input.from;if(n&&!t[n]){t[n]=!0;let i=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(i,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(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let r=this.memoizedFileURLs.get(t);if(r)return r;if(GO){let n=GO(t).toString();return this.memoizedFileURLs.set(t,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let r=this.memoizedURLs.get(t);if(r)return r;YO==="\\"&&(t=t.replace(/\\/g,"/"));let n=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,n),n}};XO.exports=vv});var Tv=x((wge,tP)=>{"use strict";p();var m6=gp(),g6=so(),y6=su(),_6=po(),ZO=Ep(),v6=hp(),eP={empty:!0,space:!0};function b6(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}function kv(e,t,r){let n="";for(let i=t;i<r;i++)n+=e[i][1];return n}var Sv=class{constructor(t){this.input=t,this.root=new _6,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let r=new m6;r.name=t[1].slice(1),r.name===""&&this.unnamedAtrule(r,t),this.init(r,t[2]);let n,i,s,a=!1,o=!1,c=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),n=t[0],n==="("||n==="["?l.push(n==="("?")":"]"):n==="{"&&l.length>0?l.push("}"):n===l[l.length-1]&&l.pop(),l.length===0)if(n===";"){r.source.end=this.getPosition(t[2]),r.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){o=!0;break}else if(n==="}"){if(c.length>0){for(s=c.length-1,i=c[s];i&&i[0]==="space";)i=c[--s];i&&(r.source.end=this.getPosition(i[3]||i[2]),r.source.end.offset++)}this.end(t);break}else c.push(t);else c.push(t);if(this.tokenizer.endOfFile()){a=!0;break}}r.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(r.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(r,"params",c),a&&(t=c[c.length-1],r.source.end=this.getPosition(t[3]||t[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(t){let r=this.colon(t);if(r===!1)return;let n=0,i;for(let s=r-1;s>=0&&(i=t[s],!(i[0]!=="space"&&(n+=1,n===2)));s--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(t){let r=0,n,i,s;for(let[a,o]of t.entries()){if(i=o,s=i[0],s==="("&&(r+=1),s===")"&&(r-=1),r===0&&s===":")if(!n)this.doubleColon(i);else{if(n[0]==="word"&&n[1]==="progid")continue;return a}n=i}return!1}comment(t){let r=new g6;this.init(r,t[2]),r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++;let n=t[1].slice(2,-2);if(!n.trim())r.text="",r.raws.left=n,r.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=i[2],r.raws.left=i[1],r.raws.right=i[3]}}createTokenizer(){this.tokenizer=v6(this.input)}decl(t,r){let n=new y6;this.init(n,t[0][2]);let i=t[t.length-1];i[0]===";"&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(i[3]||i[2]||b6(t)),n.source.end.offset++;let s=0;for(;t[s][0]!=="word";)s===t.length-1&&this.unknownWord([t[s]]),s++;n.raws.before+=kv(t,0,s),n.source.start=this.getPosition(t[s][2]);let a=s;for(;s<t.length;){let d=t[s][0];if(d===":"||d==="space"||d==="comment")break;s++}n.prop=kv(t,a,s);let o=s,c;for(;s<t.length&&(c=t[s],s++,c[0]!==":");)c[0]==="word"&&/\w/.test(c[1])&&this.unknownWord([c]);n.raws.between=kv(t,o,s),(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let l=s;for(;s<t.length;){let d=t[s][0];if(d!=="space"&&d!=="comment")break;s++}let f=t.slice(l,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(let d=t.length-1;d>=0;d--){if(c=t[d],c[1].toLowerCase()==="!important"){n.important=!0;let g=this.stringFrom(t,d);g=this.spacesFromEnd(t)+g,g!==" !important"&&(n.raws.important=g);break}else if(c[1].toLowerCase()==="important"){let g=t.slice(0),v="";for(let b=d;b>0;b--){let _=g[b][0];if(v.trim().startsWith("!")&&_!=="space")break;v=g.pop()[1]+v}v.trim().startsWith("!")&&(n.important=!0,n.raws.important=v,t=g)}if(c[0]!=="space"&&c[0]!=="comment")break}t.some(d=>d[0]!=="space"&&d[0]!=="comment")&&(n.raws.between+=f.map(d=>d[1]).join(""),f=[]),this.raw(n,"value",f.concat(t),r),n.value.includes(":")&&!r&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let r=new ZO;this.init(r,t[2]),r.selector="",r.raws.between="",this.current=r}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[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(t[2]),r.source.end.offset+=r.raws.ownSemicolon.length)}}getPosition(t){let r=this.input.fromOffset(t);return{column:r.col,line:r.line,offset:t}}init(t,r){this.current.push(t),t.source={input:this.input,start:this.getPosition(r)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let r=!1,n=null,i=!1,s=null,a=[],o=t[1].startsWith("--"),c=[],l=t;for(;l;){if(n=l[0],c.push(l),n==="("||n==="[")s||(s=l),a.push(n==="("?")":"]");else if(o&&i&&n==="{")s||(s=l),a.push("}");else if(a.length===0)if(n===";")if(i){this.decl(c,o);return}else break;else if(n==="{"){this.rule(c);return}else if(n==="}"){this.tokenizer.back(c.pop()),r=!0;break}else n===":"&&(i=!0);else n===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&&i){if(!o)for(;c.length&&(l=c[c.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,o)}else this.unknownWord(c)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,r,n,i){let s,a,o=n.length,c="",l=!0,f,m;for(let d=0;d<o;d+=1)s=n[d],a=s[0],a==="space"&&d===o-1&&!i?l=!1:a==="comment"?(m=n[d-1]?n[d-1][0]:"empty",f=n[d+1]?n[d+1][0]:"empty",!eP[m]&&!eP[f]?c.slice(-1)===","?l=!1:c+=s[1]:l=!1):c+=s[1];if(!l){let d=n.reduce((g,v)=>g+v[1],"");t.raws[r]={raw:d,value:c}}t[r]=c}rule(t){t.pop();let r=new ZO;this.init(r,t[0][2]),r.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(r,"selector",t),this.current=r}spacesAndCommentsFromEnd(t){let r,n="";for(;t.length&&(r=t[t.length-1][0],!(r!=="space"&&r!=="comment"));)n=t.pop()[1]+n;return n}spacesAndCommentsFromStart(t){let r,n="";for(;t.length&&(r=t[0][0],!(r!=="space"&&r!=="comment"));)n+=t.shift()[1];return n}spacesFromEnd(t){let r,n="";for(;t.length&&(r=t[t.length-1][0],r==="space");)n=t.pop()[1]+n;return n}stringFrom(t,r){let n="";for(let i=r;i<t.length;i++)n+=t[i][1];return t.splice(r,t.length-r),n}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,r){throw this.input.error("At-rule without name",{offset:r[2]},{offset:r[2]+r[1].length})}};tP.exports=Sv});var qp=x((Ege,rP)=>{"use strict";p();var k6=zn(),S6=lu(),T6=Tv();function Np(e,t){let r=new S6(e,t),n=new T6(r);try{n.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&t&&t.from&&(/\.scss$/i.test(t.from)?i.message+=`
58
- You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(t.from)?i.message+=`
59
- You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(t.from)&&(i.message+=`
60
- You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return n.root}rP.exports=Np;Np.default=Np;k6.registerParse(Np)});var wv=x((Oge,nP)=>{"use strict";p();var w6=zn(),{my:x6}=Zc(),pu=class{constructor(t,r={}){if(this.type="warning",this.text=t,r.node&&r.node.source){r.node[x6]||w6.rebuild(r.node);let n=r.node.rangeBy(r);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in r)this[n]=r[n]}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}};nP.exports=pu;pu.default=pu});var Lp=x((Nge,iP)=>{"use strict";p();var E6=wv(),du=class{get content(){return this.css}constructor(t,r,n){this.processor=t,this.messages=[],this.root=r,this.opts=n,this.css="",this.map=void 0}toString(){return this.css}warn(t,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new E6(t,r);return this.messages.push(n),n}warnings(){return this.messages.filter(t=>t.type==="warning")}};iP.exports=du;du.default=du});var xv=x((Lge,aP)=>{"use strict";p();var sP={};aP.exports=function(t){sP[t]||(sP[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}});var Ov=x((Ige,lP)=>{"use strict";p();var A6=zn(),O6=yp(),P6=bv(),N6=qp(),oP=Lp(),q6=po(),L6=Xc(),{isClean:Zr,my:C6}=Zc(),I6=xv(),M6={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},R6={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},D6={Once:!0,postcssPlugin:!0,prepare:!0},mo=0;function hu(e){return typeof e=="object"&&typeof e.then=="function"}function Ev(e){let t=!1,r=M6[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,mo,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,mo,r+"Exit"]:[r,r+"Exit"]}function cP(e){let t;return e.type==="document"?t=["Document",mo,"DocumentExit"]:e.type==="root"?t=["Root",mo,"RootExit"]:t=Ev(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function uP(e){let t=[e];for(;t.length>0;){let r=t.pop();if(r[Zr]=!1,r.nodes)for(let n of r.nodes)t.push(n)}return e}var Av={},Ei=class e{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(t,r,n){this.stringified=!1,this.processed=!1;let i;if(typeof r=="object"&&r!==null&&(r.type==="root"||r.type==="document"))i=uP(r);else if(r instanceof e||r instanceof oP)i=uP(r.root),r.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let s=N6;n.syntax&&(s=n.syntax.parse),n.parser&&(s=n.parser),s.parse&&(s=s.parse);try{i=s(r,n)}catch(a){this.processed=!0,this.error=a}i&&!i[C6]&&A6.rebuild(i)}this.result=new oP(t,i,n),this.helpers={...Av,postcss:Av,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(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,r){let n=this.result.lastPlugin;try{if(r&&r.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin)t.plugin=n.postcssPlugin,t.setMessage();else if(n.postcssVersion&&process.env.NODE_ENV!=="production"){let i=n.postcssPlugin,s=n.postcssVersion,a=this.result.processor.version,o=s.split("."),c=a.split(".");(o[0]!==c[0]||parseInt(o[1])>parseInt(c[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+a+", but "+i+" uses "+s+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return t}prepareVisitors(){this.listeners={};let t=(r,n,i)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([r,i])};for(let r of this.plugins)if(typeof r=="object")for(let n in r){if(!R6[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${r.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!D6[n])if(typeof r[n]=="object")for(let i in r[n])i==="*"?t(r,n,r[n][i]):t(r,n+"-"+i.toLowerCase(),r[n][i]);else typeof r[n]=="function"&&t(r,n,r[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let r=this.plugins[t],n=this.runOnRoot(r);if(hu(n))try{await n}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Zr];){t[Zr]=!0;let r=[cP(t)];for(;r.length>0;){let n=this.visitTick(r);if(hu(n))try{await n}catch(i){let s=r[r.length-1].node;throw this.handleError(i,s)}}}if(this.listeners.OnceExit)for(let[r,n]of this.listeners.OnceExit){this.result.lastPlugin=r;try{if(t.type==="document"){let i=t.nodes.map(s=>n(s,this.helpers));await Promise.all(i)}else await n(t,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let r=this.result.root.nodes.map(n=>t.Once(n,this.helpers));return hu(r[0])?Promise.all(r):r}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(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 t=this.result.opts,r=L6;t.syntax&&(r=t.syntax.stringify),t.stringifier&&(r=t.stringifier),r.stringify&&(r=r.stringify);let n=this.result.root.source;if(t.map===void 0&&!(n&&n.input&&n.input.map)){let a="";return r(this.result.root,o=>{a+=o}),this.result.css=a,this.result}let s=new P6(r,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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 t of this.plugins){let r=this.runOnRoot(t);if(hu(r))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Zr];)t[Zr]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let r of t.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,r){return process.env.NODE_ENV!=="production"&&("from"in this.opts||I6("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(t,r)}toString(){return this.css}visitSync(t,r){for(let[n,i]of t){this.result.lastPlugin=n;let s;try{s=i(r,this.helpers)}catch(a){throw this.handleError(a,r.proxyOf)}if(r.type!=="root"&&r.type!=="document"&&!r.parent)return!0;if(hu(s))throw this.getAsyncError()}}visitTick(t){let r=t[t.length-1],{node:n,visitors:i}=r;if(n.type!=="root"&&n.type!=="document"&&!n.parent){t.pop();return}if(i.length>0&&r.visitorIndex<i.length){let[a,o]=i[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===i.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=a;try{return o(n.toProxy(),this.helpers)}catch(c){throw this.handleError(c,n)}}if(r.iterator!==0){let a=r.iterator;r.descending&&(r.descending=!1,n.indexes[a]+=1);let o;for(;o=n.nodes[n.indexes[a]];){if(!o[Zr]){o[Zr]=!0,r.descending=!0,t.push(cP(o));return}n.indexes[a]+=1}r.iterator=0,delete n.indexes[a]}let s=r.events;for(;r.eventIndex<s.length;){let a=s[r.eventIndex];if(r.eventIndex+=1,a===mo){n.nodes&&n.nodes.length&&(n[Zr]=!0,r.iterator=n.getIterator());return}else if(this.listeners[a]){r.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[Zr]=!0;let r=[{eventIndex:0,events:Ev(t),iterator:0,node:t}];for(;r.length>0;){let n=r[r.length-1],i=n.node;if(n.iterator!==0){let s=n.iterator;n.descending&&(n.descending=!1,i.indexes[s]+=1);let a,o=!1;for(;a=i.nodes[i.indexes[s]];){if(!a[Zr]){a[Zr]=!0,n.descending=!0,r.push({eventIndex:0,events:Ev(a),iterator:0,node:a}),o=!0;break}i.indexes[s]+=1}if(o)continue;n.iterator=0,delete i.indexes[s]}if(n.eventIndex<n.events.length){let s=n.events[n.eventIndex];if(n.eventIndex+=1,s===mo)i.nodes&&i.nodes.length&&(n.iterator=i.getIterator());else{let a=this.listeners[s];a&&this.visitSync(a,i.toProxy())&&r.pop()}continue}r.pop()}}warnings(){return this.sync().warnings()}};Ei.registerPostcss=e=>{Av=e};lP.exports=Ei;Ei.default=Ei;q6.registerLazyResult(Ei);O6.registerLazyResult(Ei)});var pP=x((Rge,fP)=>{"use strict";p();var j6=bv(),F6=qp(),B6=Lp(),V6=Xc(),$6=xv(),mu=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 t,r=F6;try{t=r(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,r,n){r=r.toString(),this.stringified=!1,this._processor=t,this._css=r,this._opts=n,this._map=void 0;let i=V6;this.result=new B6(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 j6(i,void 0,this._opts,r);if(a.isMap()){let[o,c]=a.generate();o&&(this.result.css=o),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,r){return process.env.NODE_ENV!=="production"&&("from"in this._opts||$6("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(t,r)}toString(){return this._css}warnings(){return[]}};fP.exports=mu;mu.default=mu});var hP=x((jge,dP)=>{"use strict";p();var U6=yp(),H6=Ov(),z6=pP(),W6=po(),Ls=class{constructor(t=[]){this.version="8.5.26",this.plugins=this.normalize(t)}normalize(t){let r=[];for(let n of t)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))r=r.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)r.push(n);else if(typeof n=="function")r.push(n);else if(typeof n=="object"&&(n.parse||n.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(n+" is not a PostCSS plugin");return r}process(t,r={}){return!this.plugins.length&&!r.parser&&!r.stringifier&&!r.syntax?new z6(this,t,r):new H6(this,t,r)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};dP.exports=Ls;Ls.default=Ls;W6.registerProcessor(Ls);U6.registerProcessor(Ls)});var SP=x((Bge,kP)=>{"use strict";p();var mP=gp(),gP=so(),G6=zn(),J6=mp(),yP=su(),_P=yp(),K6=WO(),Y6=lu(),Q6=Ov(),X6=_v(),Z6=ru(),eH=qp(),Pv=hP(),tH=Lp(),vP=po(),bP=Ep(),rH=Xc(),nH=wv();function Le(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new Pv(e)}Le.plugin=function(t,r){let n=!1;function i(...a){console&&console.warn&&!n&&(n=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
61
- https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
62
- https://www.w3ctech.com/topic/2226`));let o=r(...a);return o.postcssPlugin=t,o.postcssVersion=new Pv().version,o}let s;return Object.defineProperty(i,"postcss",{get(){return s||(s=i()),s}}),i.process=function(a,o,c){return Le([i(c)]).process(a,o)},i};Le.stringify=rH;Le.parse=eH;Le.fromJSON=K6;Le.list=X6;Le.comment=e=>new gP(e);Le.atRule=e=>new mP(e);Le.decl=e=>new yP(e);Le.rule=e=>new bP(e);Le.root=e=>new vP(e);Le.document=e=>new _P(e);Le.CssSyntaxError=J6;Le.Declaration=yP;Le.Container=G6;Le.Processor=Pv;Le.Document=_P;Le.Comment=gP;Le.Warning=nH;Le.AtRule=mP;Le.Result=tH;Le.Input=Y6;Le.Rule=bP;Le.Root=vP;Le.Node=Z6;Q6.registerPostcss(Le);kP.exports=Le;Le.default=Le});var wP=x(($ge,TP)=>{p();var iH=so(),sH=Tv(),aH=hp(),Nv=class extends sH{checkMissedSemicolon(){}comment(t){let r=new iH;this.init(r,t[2]);let n=this.input.fromOffset(t[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:n.col,line:n.line,offset:t[3]+1};let i=t[1].slice(2);if(i.slice(-2)==="*/"&&(i=i.slice(0,-2)),/^\s*$/.test(i))r.text="",r.raws.left=i,r.raws.right="";else{let s=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=aH(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some(r=>r[0]==="word")&&super.decl(t)}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(t){let r=this.colon(t);if(r===!1)return;let n,i;for(n=r-1;n>=0&&t[n][0]!=="word";n--);if(n===0||n<0)return;for(i=n-1;i>=0;i--)if(t[i][0]!=="space"){i+=1;break}let s=t.slice(n),a=t.slice(i,n);t.splice(i,t.length-i),this.spaces=a.map(o=>o[1]).join(""),this.decl(s)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map(r=>r[1]).join("")}unnamedAtrule(t){t.name=""}};TP.exports=Nv});var EP=x((Hge,xP)=>{p();var{Input:oH}=SP(),cH=wP();xP.exports=function(t,r){let n=new oH(t,r),i=new cH(n);return i.parse(),i.root}});var Lv=x(qv=>{"use strict";p();Object.defineProperty(qv,"__esModule",{value:!0});qv.default=fH;function uH(e){for(var t=e.toLowerCase(),r="",n=!1,i=0;i<6&&t[i]!==void 0;i++){var s=t.charCodeAt(i),a=s>=97&&s<=102||s>=48&&s<=57;if(n=s===32,!a)break;r+=t[i]}if(r.length!==0){var o=parseInt(r,16),c=o>=55296&&o<=57343;return c||o===0||o>1114111?["\uFFFD",r.length+(n?1:0)]:[String.fromCodePoint(o),r.length+(n?1:0)]}}var lH=/\\/;function fH(e){var t=lH.test(e);if(!t)return e;for(var r="",n=0;n<e.length;n++){if(e[n]==="\\"){var i=uH(e.slice(n+1,n+7));if(i!==void 0){r+=i[0],n+=i[1];continue}if(e[n+1]==="\\"){r+="\\",n++;continue}e.length===n+1&&(r+=e[n]);continue}r+=e[n]}return r}});var AP=x(Cv=>{"use strict";p();Object.defineProperty(Cv,"__esModule",{value:!0});Cv.default=pH;function pH(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(;t.length>0;){var n=t.shift();if(!e[n])return;e=e[n]}return e}});var OP=x(Iv=>{"use strict";p();Object.defineProperty(Iv,"__esModule",{value:!0});Iv.default=dH;function dH(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(;t.length>0;){var n=t.shift();e[n]||(e[n]={}),e=e[n]}}});var PP=x(Mv=>{"use strict";p();Object.defineProperty(Mv,"__esModule",{value:!0});Mv.default=hH;function hH(e){for(var t="",r=e.indexOf("/*"),n=0;r>=0;){t=t+e.slice(n,r);var i=e.indexOf("*/",r+2);if(i<0)return t;n=i+2,r=e.indexOf("/*",n)}return t=t+e.slice(n),t}});var NP=x(go=>{"use strict";p();Object.defineProperty(go,"__esModule",{value:!0});go.MAX_NESTING_DEPTH=void 0;go.default=mH;go.MAX_NESTING_DEPTH=256;function mH(e){return Number.isSafeInteger(e)&&e>=0?e:go.MAX_NESTING_DEPTH}});var yo=x(Ht=>{"use strict";p();var gu=Ht&&Ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ht,"__esModule",{value:!0});Ht.MAX_NESTING_DEPTH=Ht.resolveMaxNestingDepth=Ht.stripComments=Ht.ensureObject=Ht.getProp=Ht.unesc=void 0;var gH=Lv();Object.defineProperty(Ht,"unesc",{enumerable:!0,get:function(){return gu(gH).default}});var yH=AP();Object.defineProperty(Ht,"getProp",{enumerable:!0,get:function(){return gu(yH).default}});var _H=OP();Object.defineProperty(Ht,"ensureObject",{enumerable:!0,get:function(){return gu(_H).default}});var vH=PP();Object.defineProperty(Ht,"stripComments",{enumerable:!0,get:function(){return gu(vH).default}});var qP=NP();Object.defineProperty(Ht,"resolveMaxNestingDepth",{enumerable:!0,get:function(){return gu(qP).default}});Object.defineProperty(Ht,"MAX_NESTING_DEPTH",{enumerable:!0,get:function(){return qP.MAX_NESTING_DEPTH}})});var Jn=x(Dv=>{"use strict";p();Object.defineProperty(Dv,"__esModule",{value:!0});var Cp=yo(),Rv=function(e,t,r){if(r===void 0&&(r=0),r>Cp.MAX_NESTING_DEPTH)throw new Error("Cannot clone selector: nesting depth exceeds the maximum of ".concat(Cp.MAX_NESTING_DEPTH,"."));if(typeof e!="object"||e===null)return e;var n=new e.constructor;for(var i in e)if(e.hasOwnProperty(i)){var s=e[i],a=typeof s;i==="parent"&&a==="object"?t&&(n[i]=t):s instanceof Array?n[i]=s.map(function(o){return Rv(o,n,r+1)}):n[i]=Rv(s,n,r+1)}return n},bH=(function(){function e(t){t===void 0&&(t={}),Object.assign(this,t),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||"",this.spaces.after=this.spaces.after||""}return e.prototype.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},e.prototype.replaceWith=function(){if(this.parent){for(var t in arguments)this.parent.insertBefore(this,arguments[t]);this.remove()}return this},e.prototype.next=function(){return this.parent.at(this.parent.index(this)+1)},e.prototype.prev=function(){return this.parent.at(this.parent.index(this)-1)},e.prototype.clone=function(t){t===void 0&&(t={});var r=Rv(this);for(var n in t)r[n]=t[n];return r},e.prototype.appendToPropertyAndEscape=function(t,r,n){this.raws||(this.raws={});var i=this[t],s=this.raws[t];this[t]=i+r,s||n!==r?this.raws[t]=(s||i)+n:delete this.raws[t]},e.prototype.setPropertyAndEscape=function(t,r,n){this.raws||(this.raws={}),this[t]=r,this.raws[t]=n},e.prototype.setPropertyWithoutEscape=function(t,r){this[t]=r,this.raws&&delete this.raws[t]},e.prototype.isAtPosition=function(t,r){if(this.source&&this.source.start&&this.source.end)return!(this.source.start.line>t||this.source.end.line<t||this.source.start.line===t&&this.source.start.column>r||this.source.end.line===t&&this.source.end.column<r)},e.prototype.stringifyProperty=function(t){return this.raws&&this.raws[t]||this[t]},Object.defineProperty(e.prototype,"rawSpaceBefore",{get:function(){var t=this.raws&&this.raws.spaces&&this.raws.spaces.before;return t===void 0&&(t=this.spaces&&this.spaces.before),t||""},set:function(t){(0,Cp.ensureObject)(this,"raws","spaces"),this.raws.spaces.before=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rawSpaceAfter",{get:function(){var t=this.raws&&this.raws.spaces&&this.raws.spaces.after;return t===void 0&&(t=this.spaces.after),t||""},set:function(t){(0,Cp.ensureObject)(this,"raws","spaces"),this.raws.spaces.after=t},enumerable:!1,configurable:!0}),e.prototype.valueToString=function(){return String(this.stringifyProperty("value"))},e.prototype.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join("")},e.prototype._stringify=function(){return this.toString()},e})();Dv.default=bH});var Nt=x(Be=>{"use strict";p();Object.defineProperty(Be,"__esModule",{value:!0});Be.UNIVERSAL=Be.ATTRIBUTE=Be.CLASS=Be.COMBINATOR=Be.COMMENT=Be.ID=Be.NESTING=Be.PSEUDO=Be.ROOT=Be.SELECTOR=Be.STRING=Be.TAG=void 0;Be.TAG="tag";Be.STRING="string";Be.SELECTOR="selector";Be.ROOT="root";Be.PSEUDO="pseudo";Be.NESTING="nesting";Be.ID="id";Be.COMMENT="comment";Be.COMBINATOR="combinator";Be.CLASS="class";Be.ATTRIBUTE="attribute";Be.UNIVERSAL="universal"});var Ip=x(yt=>{"use strict";p();var kH=yt&&yt.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),SH=yt&&yt.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),TH=yt&&yt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),wH=yt&&yt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&SH(r,t,n[i]);return TH(r,t),r}})(),xH=yt&&yt.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},LP=yt&&yt.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},CP=yt&&yt.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},EH=yt&&yt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yt,"__esModule",{value:!0});var jv=yo(),AH=EH(Jn()),Kn=wH(Nt()),OH=(function(e){kH(t,e);function t(r){var n=e.call(this,r)||this;return n.nodes||(n.nodes=[]),n}return t.prototype.append=function(r){return r.parent=this,this.nodes.push(r),this},t.prototype.prepend=function(r){r.parent=this,this.nodes.unshift(r);for(var n in this.indexes)this.indexes[n]++;return this},t.prototype.at=function(r){return this.nodes[r]},t.prototype.index=function(r){return typeof r=="number"?r:this.nodes.indexOf(r)},Object.defineProperty(t.prototype,"first",{get:function(){return this.at(0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){return this.at(this.length-1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.nodes.length},enumerable:!1,configurable:!0}),t.prototype.removeChild=function(r){r=this.index(r),this.at(r).parent=void 0,this.nodes.splice(r,1);var n;for(var i in this.indexes)n=this.indexes[i],n>=r&&(this.indexes[i]=n-1);return this},t.prototype.removeAll=function(){var r,n;try{for(var i=xH(this.nodes),s=i.next();!s.done;s=i.next()){var a=s.value;a.parent=void 0}}catch(o){r={error:o}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this.nodes=[],this},t.prototype.empty=function(){return this.removeAll()},t.prototype.insertAfter=function(r,n){var i;n.parent=this;for(var s=this.index(r),a=[],o=2;o<arguments.length;o++)a.push(arguments[o]);(i=this.nodes).splice.apply(i,CP([s+1,0,n],LP(a),!1)),n.parent=this;var c;for(var l in this.indexes)c=this.indexes[l],s<c&&(this.indexes[l]=c+arguments.length-1);return this},t.prototype.insertBefore=function(r,n){var i;n.parent=this;for(var s=this.index(r),a=[],o=2;o<arguments.length;o++)a.push(arguments[o]);(i=this.nodes).splice.apply(i,CP([s,0,n],LP(a),!1)),n.parent=this;var c;for(var l in this.indexes)c=this.indexes[l],c>=s&&(this.indexes[l]=c+arguments.length-1);return this},t.prototype._findChildAtPosition=function(r,n){var i=void 0;return this.each(function(s){if(s.atPosition){var a=s.atPosition(r,n);if(a)return i=a,!1}else if(s.isAtPosition(r,n))return i=s,!1}),i},t.prototype.atPosition=function(r,n){if(this.isAtPosition(r,n))return this._findChildAtPosition(r,n)||this},t.prototype._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))},t.prototype.each=function(r){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var n=this.lastEach;if(this.indexes[n]=0,!!this.length){for(var i,s;this.indexes[n]<this.length&&(i=this.indexes[n],s=r(this.at(i),i),s!==!1);)this.indexes[n]+=1;if(delete this.indexes[n],s===!1)return!1}},t.prototype.walk=function(r,n){if(n===void 0&&(n=0),n>jv.MAX_NESTING_DEPTH)throw new Error("Cannot walk selector: nesting depth exceeds the maximum of ".concat(jv.MAX_NESTING_DEPTH,"."));return this.each(function(i,s){var a=r(i,s);if(a!==!1&&i.length&&(a=i.walk(r,n+1)),a===!1)return!1})},t.prototype.walkAttributes=function(r){var n=this;return this.walk(function(i){if(i.type===Kn.ATTRIBUTE)return r.call(n,i)})},t.prototype.walkClasses=function(r){var n=this;return this.walk(function(i){if(i.type===Kn.CLASS)return r.call(n,i)})},t.prototype.walkCombinators=function(r){var n=this;return this.walk(function(i){if(i.type===Kn.COMBINATOR)return r.call(n,i)})},t.prototype.walkComments=function(r){var n=this;return this.walk(function(i){if(i.type===Kn.COMMENT)return r.call(n,i)})},t.prototype.walkIds=function(r){var n=this;return this.walk(function(i){if(i.type===Kn.ID)return r.call(n,i)})},t.prototype.walkNesting=function(r){var n=this;return this.walk(function(i){if(i.type===Kn.NESTING)return r.call(n,i)})},t.prototype.walkPseudos=function(r){var n=this;return this.walk(function(i){if(i.type===Kn.PSEUDO)return r.call(n,i)})},t.prototype.walkTags=function(r){var n=this;return this.walk(function(i){if(i.type===Kn.TAG)return r.call(n,i)})},t.prototype.walkUniversals=function(r){var n=this;return this.walk(function(i){if(i.type===Kn.UNIVERSAL)return r.call(n,i)})},t.prototype.split=function(r){var n=this,i=[];return this.reduce(function(s,a,o){var c=r.call(n,a);return i.push(a),c?(s.push(i),i=[]):o===n.length-1&&s.push(i),s},[])},t.prototype.map=function(r){return this.nodes.map(r)},t.prototype.reduce=function(r,n){return this.nodes.reduce(r,n)},t.prototype.every=function(r){return this.nodes.every(r)},t.prototype.some=function(r){return this.nodes.some(r)},t.prototype.filter=function(r){return this.nodes.filter(r)},t.prototype.sort=function(r){return this.nodes.sort(r)},t.prototype.toString=function(r){return r===void 0&&(r={}),this._stringify(r,0,(0,jv.resolveMaxNestingDepth)(r.maxNestingDepth))},t.prototype._stringify=function(r,n,i){var s=this;return this.map(function(a){return s._stringifyChild(a,r,n,i)}).join("")},t.prototype._stringifyChild=function(r,n,i,s){return typeof r._stringify=="function"?r._stringify(n,i,s):String(r)},t})(AH.default);yt.default=OH});var Fv=x(Cs=>{"use strict";p();var PH=Cs&&Cs.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),NH=Cs&&Cs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cs,"__esModule",{value:!0});var qH=NH(Ip()),LH=Nt(),CH=(function(e){PH(t,e);function t(r){var n=e.call(this,r)||this;return n.type=LH.ROOT,n}return t.prototype._stringify=function(r,n,i){var s=this,a=this.reduce(function(o,c){return o.push(s._stringifyChild(c,r,n,i)),o},[]).join(",");return this.trailingComma?a+",":a},t.prototype.error=function(r,n){return this._error?this._error(r,n):new Error(r)},Object.defineProperty(t.prototype,"errorGenerator",{set:function(r){this._error=r},enumerable:!1,configurable:!0}),t})(qH.default);Cs.default=CH});var Bv=x(Is=>{"use strict";p();var IH=Is&&Is.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),MH=Is&&Is.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Is,"__esModule",{value:!0});var RH=MH(Ip()),DH=Nt(),jH=(function(e){IH(t,e);function t(r){var n=e.call(this,r)||this;return n.type=DH.SELECTOR,n}return t})(RH.default);Is.default=jH});var Mp=x((hye,IP)=>{"use strict";p();var FH={},BH=FH.hasOwnProperty,VH=function(t,r){if(!t)return r;var n={};for(var i in r)n[i]=BH.call(t,i)?t[i]:r[i];return n},$H=/[ -,\.\/:-@\[-\^`\{-~]/,UH=/[ -,\.\/:-@\[\]\^`\{-~]/,HH=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,Vv=function e(t,r){r=VH(r,e.options),r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");for(var n=r.quotes=="double"?'"':"'",i=r.isIdentifier,s=t.charAt(0),a="",o=0,c=t.length;o<c;){var l=t.charAt(o++),f=l.charCodeAt(),m=void 0;if(f<32||f>126){if(f>=55296&&f<=56319&&o<c){var d=t.charCodeAt(o++);(d&64512)==56320?f=((f&1023)<<10)+(d&1023)+65536:o--}m="\\"+f.toString(16).toUpperCase()+" "}else r.escapeEverything?$H.test(l)?m="\\"+l:m="\\"+f.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(l)?m="\\"+f.toString(16).toUpperCase()+" ":l=="\\"||!i&&(l=='"'&&n==l||l=="'"&&n==l)||i&&UH.test(l)?m="\\"+l:m=l;a+=m}return i&&(/^-[-\d]/.test(a)?a="\\-"+a.slice(1):/\d/.test(s)&&(a="\\3"+s+" "+a.slice(1))),a=a.replace(HH,function(g,v,b){return v&&v.length%2?g:(v||"")+b}),!i&&r.wrap?n+a+n:a};Vv.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};Vv.version="3.0.0";IP.exports=Vv});var $v=x(Ms=>{"use strict";p();var zH=Ms&&Ms.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),MP=Ms&&Ms.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ms,"__esModule",{value:!0});var WH=MP(Mp()),GH=yo(),JH=MP(Jn()),KH=Nt(),YH=(function(e){zH(t,e);function t(r){var n=e.call(this,r)||this;return n.type=KH.CLASS,n._constructed=!0,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(r){if(this._constructed){var n=(0,WH.default)(r,{isIdentifier:!0});n!==r?((0,GH.ensureObject)(this,"raws"),this.raws.value=n):this.raws&&delete this.raws.value}this._value=r},enumerable:!1,configurable:!0}),t.prototype.valueToString=function(){return"."+e.prototype.valueToString.call(this)},t})(JH.default);Ms.default=YH});var Uv=x(Rs=>{"use strict";p();var QH=Rs&&Rs.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),XH=Rs&&Rs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rs,"__esModule",{value:!0});var ZH=XH(Jn()),e8=Nt(),t8=(function(e){QH(t,e);function t(r){var n=e.call(this,r)||this;return n.type=e8.COMMENT,n}return t})(ZH.default);Rs.default=t8});var Hv=x(Ds=>{"use strict";p();var r8=Ds&&Ds.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),n8=Ds&&Ds.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ds,"__esModule",{value:!0});var i8=n8(Jn()),s8=Nt(),a8=(function(e){r8(t,e);function t(r){var n=e.call(this,r)||this;return n.type=s8.ID,n}return t.prototype.valueToString=function(){return"#"+e.prototype.valueToString.call(this)},t})(i8.default);Ds.default=a8});var Rp=x(js=>{"use strict";p();var o8=js&&js.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),RP=js&&js.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(js,"__esModule",{value:!0});var c8=RP(Mp()),u8=yo(),l8=RP(Jn()),f8=(function(e){o8(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"namespace",{get:function(){return this._namespace},set:function(r){if(r===!0||r==="*"||r==="&"){this._namespace=r,this.raws&&delete this.raws.namespace;return}var n=(0,c8.default)(r,{isIdentifier:!0});this._namespace=r,n!==r?((0,u8.ensureObject)(this,"raws"),this.raws.namespace=n):this.raws&&delete this.raws.namespace},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ns",{get:function(){return this._namespace},set:function(r){this.namespace=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"namespaceString",{get:function(){if(this.namespace){var r=this.stringifyProperty("namespace");return r===!0?"":r}else return""},enumerable:!1,configurable:!0}),t.prototype.qualifiedName=function(r){return this.namespace?"".concat(this.namespaceString,"|").concat(r):r},t.prototype.valueToString=function(){return this.qualifiedName(e.prototype.valueToString.call(this))},t})(l8.default);js.default=f8});var zv=x(Fs=>{"use strict";p();var p8=Fs&&Fs.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),d8=Fs&&Fs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fs,"__esModule",{value:!0});var h8=d8(Rp()),m8=Nt(),g8=(function(e){p8(t,e);function t(r){var n=e.call(this,r)||this;return n.type=m8.TAG,n}return t})(h8.default);Fs.default=g8});var Wv=x(Bs=>{"use strict";p();var y8=Bs&&Bs.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+DP(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),_8=Bs&&Bs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bs,"__esModule",{value:!0});var v8=_8(Jn()),b8=Nt(),DP=(function(e){y8(t,e);function t(r){var n=e.call(this,r)||this;return n.type=b8.STRING,n}return t})(v8.default);Bs.default=DP});var Gv=x(Vs=>{"use strict";p();var k8=Vs&&Vs.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),S8=Vs&&Vs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vs,"__esModule",{value:!0});var T8=S8(Ip()),w8=Nt(),x8=(function(e){k8(t,e);function t(r){var n=e.call(this,r)||this;return n.type=w8.PSEUDO,n}return t.prototype._stringify=function(r,n,i){var s=this;if(n>=i)throw new Error("Cannot serialize selector: nesting depth exceeds the maximum of ".concat(i,"."));var a=this.length?"("+this.map(function(o){return s._stringifyChild(o,r,n+1,i)}).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),a,this.rawSpaceAfter].join("")},t})(T8.default);Vs.default=x8});var FP=x((Nye,jP)=>{p();jP.exports=oe("util").deprecate});var Xv=x(Ai=>{"use strict";p();var E8=Ai&&Ai.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Yv=Ai&&Ai.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Jv;Object.defineProperty(Ai,"__esModule",{value:!0});Ai.unescapeValue=Qv;var yu=Yv(Mp()),A8=Yv(Lv()),O8=Yv(Rp()),P8=Nt(),_u=FP(),N8=/^('|")([^]*)\1$/,q8=_u(function(){},"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),L8=_u(function(){},"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),C8=_u(function(){},"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function Qv(e){var t=!1,r=null,n=e,i=n.match(N8);return i&&(r=i[1],n=i[2]),n=(0,A8.default)(n),n!==e&&(t=!0),{deprecatedUsage:t,unescaped:n,quoteMark:r}}function I8(e){if(e.quoteMark!==void 0||e.value===void 0)return e;C8();var t=Qv(e.value),r=t.quoteMark,n=t.unescaped;return e.raws||(e.raws={}),e.raws.value===void 0&&(e.raws.value=e.value),e.value=n,e.quoteMark=r,e}var M8=(function(e){E8(t,e);function t(r){r===void 0&&(r={});var n=e.call(this,I8(r))||this;return n.type=P8.ATTRIBUTE,n.raws=n.raws||{},Object.defineProperty(n.raws,"unquoted",{get:_u(function(){return n.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:_u(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}return t.prototype.getQuotedValue=function(r){r===void 0&&(r={});var n=this._determineQuoteMark(r),i=Kv[n],s=(0,yu.default)(this._value,i);return s},t.prototype._determineQuoteMark=function(r){return r.smart?this.smartQuoteMark(r):this.preferredQuoteMark(r)},t.prototype.setValue=function(r,n){n===void 0&&(n={}),this._value=r,this._quoteMark=this._determineQuoteMark(n),this._syncRawValue()},t.prototype.smartQuoteMark=function(r){var n=this.value,i=n.replace(/[^']/g,"").length,s=n.replace(/[^"]/g,"").length;if(i+s===0){var a=(0,yu.default)(n,{isIdentifier:!0});if(a===n)return t.NO_QUOTE;var o=this.preferredQuoteMark(r);if(o===t.NO_QUOTE){var c=this.quoteMark||r.quoteMark||t.DOUBLE_QUOTE,l=Kv[c],f=(0,yu.default)(n,l);if(f.length<a.length)return c}return o}else return s===i?this.preferredQuoteMark(r):s<i?t.DOUBLE_QUOTE:t.SINGLE_QUOTE},t.prototype.preferredQuoteMark=function(r){var n=r.preferCurrentQuoteMark?this.quoteMark:r.quoteMark;return n===void 0&&(n=r.preferCurrentQuoteMark?r.quoteMark:this.quoteMark),n===void 0&&(n=t.DOUBLE_QUOTE),n},Object.defineProperty(t.prototype,"quoted",{get:function(){var r=this.quoteMark;return r==="'"||r==='"'},set:function(r){L8()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quoteMark",{get:function(){return this._quoteMark},set:function(r){if(!this._constructed){this._quoteMark=r;return}this._quoteMark!==r&&(this._quoteMark=r,this._syncRawValue())},enumerable:!1,configurable:!0}),t.prototype._syncRawValue=function(){var r=(0,yu.default)(this._value,Kv[this.quoteMark]);r===this._value?this.raws&&delete this.raws.value:this.raws.value=r},Object.defineProperty(t.prototype,"qualifiedAttribute",{get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"insensitiveFlag",{get:function(){return this.insensitive?"i":""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(r){if(this._constructed){var n=Qv(r),i=n.deprecatedUsage,s=n.unescaped,a=n.quoteMark;if(i&&q8(),s===this._value&&a===this._quoteMark)return;this._value=s,this._quoteMark=a,this._syncRawValue()}else this._value=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"insensitive",{get:function(){return this._insensitive},set:function(r){r||(this._insensitive=!1,this.raws&&(this.raws.insensitiveFlag==="I"||this.raws.insensitiveFlag==="i")&&(this.raws.insensitiveFlag=void 0)),this._insensitive=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attribute",{get:function(){return this._attribute},set:function(r){this._handleEscapes("attribute",r),this._attribute=r},enumerable:!1,configurable:!0}),t.prototype._handleEscapes=function(r,n){if(this._constructed){var i=(0,yu.default)(n,{isIdentifier:!0});i!==n?this.raws[r]=i:delete this.raws[r]}},t.prototype._spacesFor=function(r){var n={before:"",after:""},i=this.spaces[r]||{},s=this.raws.spaces&&this.raws.spaces[r]||{};return Object.assign(n,i,s)},t.prototype._stringFor=function(r,n,i){n===void 0&&(n=r),i===void 0&&(i=BP);var s=this._spacesFor(n);return i(this.stringifyProperty(r),s)},t.prototype.offsetOf=function(r){var n=1,i=this._spacesFor("attribute");if(n+=i.before.length,r==="namespace"||r==="ns")return this.namespace?n:-1;if(r==="attributeNS"||(n+=this.namespaceString.length,this.namespace&&(n+=1),r==="attribute"))return n;n+=this.stringifyProperty("attribute").length,n+=i.after.length;var s=this._spacesFor("operator");n+=s.before.length;var a=this.stringifyProperty("operator");if(r==="operator")return a?n:-1;n+=a.length,n+=s.after.length;var o=this._spacesFor("value");n+=o.before.length;var c=this.stringifyProperty("value");if(r==="value")return c?n:-1;n+=c.length,n+=o.after.length;var l=this._spacesFor("insensitive");return n+=l.before.length,r==="insensitive"&&this.insensitive?n:-1},t.prototype.toString=function(){var r=this,n=[this.rawSpaceBefore,"["];return n.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||this.value==="")&&(n.push(this._stringFor("operator")),n.push(this._stringFor("value")),n.push(this._stringFor("insensitiveFlag","insensitive",function(i,s){return i.length>0&&!r.quoted&&s.before.length===0&&!(r.spaces.value&&r.spaces.value.after)&&(s.before=" "),BP(i,s)}))),n.push("]"),n.push(this.rawSpaceAfter),n.join("")},t.NO_QUOTE=null,t.SINGLE_QUOTE="'",t.DOUBLE_QUOTE='"',t})(O8.default);Ai.default=M8;var Kv=(Jv={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}},Jv[null]={isIdentifier:!0},Jv);function BP(e,t){return"".concat(t.before).concat(e).concat(t.after)}});var Zv=x($s=>{"use strict";p();var R8=$s&&$s.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),D8=$s&&$s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($s,"__esModule",{value:!0});var j8=D8(Rp()),F8=Nt(),B8=(function(e){R8(t,e);function t(r){var n=e.call(this,r)||this;return n.type=F8.UNIVERSAL,n.value="*",n}return t})(j8.default);$s.default=B8});var eb=x(Us=>{"use strict";p();var V8=Us&&Us.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),$8=Us&&Us.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Us,"__esModule",{value:!0});var U8=$8(Jn()),H8=Nt(),z8=(function(e){V8(t,e);function t(r){var n=e.call(this,r)||this;return n.type=H8.COMBINATOR,n}return t})(U8.default);Us.default=z8});var tb=x(Hs=>{"use strict";p();var W8=Hs&&Hs.__extends||(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),G8=Hs&&Hs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hs,"__esModule",{value:!0});var J8=G8(Jn()),K8=Nt(),Y8=(function(e){W8(t,e);function t(r){var n=e.call(this,r)||this;return n.type=K8.NESTING,n.value="&",n}return t})(J8.default);Hs.default=Y8});var VP=x(rb=>{"use strict";p();Object.defineProperty(rb,"__esModule",{value:!0});rb.default=Q8;function Q8(e){return e.sort(function(t,r){return t-r})}});var nb=x(te=>{"use strict";p();Object.defineProperty(te,"__esModule",{value:!0});te.combinator=te.word=te.comment=te.str=te.tab=te.newline=te.feed=te.cr=te.backslash=te.bang=te.slash=te.doubleQuote=te.singleQuote=te.space=te.greaterThan=te.pipe=te.equals=te.plus=te.caret=te.tilde=te.dollar=te.closeSquare=te.openSquare=te.closeParenthesis=te.openParenthesis=te.semicolon=te.colon=te.comma=te.at=te.asterisk=te.ampersand=void 0;te.ampersand=38;te.asterisk=42;te.at=64;te.comma=44;te.colon=58;te.semicolon=59;te.openParenthesis=40;te.closeParenthesis=41;te.openSquare=91;te.closeSquare=93;te.dollar=36;te.tilde=126;te.caret=94;te.plus=43;te.equals=61;te.pipe=124;te.greaterThan=62;te.space=32;te.singleQuote=39;te.doubleQuote=34;te.slash=47;te.bang=33;te.backslash=92;te.cr=13;te.feed=12;te.newline=10;te.tab=9;te.str=te.singleQuote;te.comment=-1;te.word=-2;te.combinator=-3});var UP=x(en=>{"use strict";p();var X8=en&&en.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Z8=en&&en.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ez=en&&en.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&X8(r,t,n[i]);return Z8(r,t),r}})(),_o,Me;Object.defineProperty(en,"__esModule",{value:!0});en.FIELDS=void 0;en.default=sz;var X=ez(nb()),tz=(_o={},_o[X.tab]=!0,_o[X.newline]=!0,_o[X.cr]=!0,_o[X.feed]=!0,_o),rz=(Me={},Me[X.space]=!0,Me[X.tab]=!0,Me[X.newline]=!0,Me[X.cr]=!0,Me[X.feed]=!0,Me[X.ampersand]=!0,Me[X.asterisk]=!0,Me[X.bang]=!0,Me[X.comma]=!0,Me[X.colon]=!0,Me[X.semicolon]=!0,Me[X.openParenthesis]=!0,Me[X.closeParenthesis]=!0,Me[X.openSquare]=!0,Me[X.closeSquare]=!0,Me[X.singleQuote]=!0,Me[X.doubleQuote]=!0,Me[X.plus]=!0,Me[X.pipe]=!0,Me[X.tilde]=!0,Me[X.greaterThan]=!0,Me[X.equals]=!0,Me[X.dollar]=!0,Me[X.caret]=!0,Me[X.slash]=!0,Me),ib={},$P="0123456789abcdefABCDEF";for(Dp=0;Dp<$P.length;Dp++)ib[$P.charCodeAt(Dp)]=!0;var Dp;function nz(e,t){var r=t,n;do{if(n=e.charCodeAt(r),rz[n])return r-1;n===X.backslash?r=iz(e,r)+1:r++}while(r<e.length);return r-1}function iz(e,t){var r=t,n=e.charCodeAt(r+1);if(!tz[n])if(ib[n]){var i=0;do r++,i++,n=e.charCodeAt(r+1);while(ib[n]&&i<6);i<6&&n===X.space&&r++}else r++;return r}en.FIELDS={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6};function sz(e){var t=[],r=e.css.valueOf(),n=r.length,i=-1,s=1,a=0,o=0,c,l,f,m,d,g,v,b,_,k,w,T,y;function A(O,P){if(e.safe)r+=P,_=r.length-1;else throw e.error("Unclosed "+O,s,a-i,a)}for(;a<n;){switch(c=r.charCodeAt(a),c===X.newline&&(i=a,s+=1),c){case X.space:case X.tab:case X.newline:case X.cr:case X.feed:_=a;do _+=1,c=r.charCodeAt(_),c===X.newline&&(i=_,s+=1);while(c===X.space||c===X.newline||c===X.tab||c===X.cr||c===X.feed);y=X.space,m=s,f=_-i-1,o=_;break;case X.plus:case X.greaterThan:case X.tilde:case X.pipe:_=a;do _+=1,c=r.charCodeAt(_);while(c===X.plus||c===X.greaterThan||c===X.tilde||c===X.pipe);y=X.combinator,m=s,f=a-i,o=_;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:_=a,y=c,m=s,f=a-i,o=_+1;break;case X.singleQuote:case X.doubleQuote:T=c===X.singleQuote?"'":'"',_=a;do for(d=!1,_=r.indexOf(T,_+1),_===-1&&A("quote",T),g=_;r.charCodeAt(g-1)===X.backslash;)g-=1,d=!d;while(d);y=X.str,m=s,f=a-i,o=_+1;break;default:c===X.slash&&r.charCodeAt(a+1)===X.asterisk?(_=r.indexOf("*/",a+2)+1,_===0&&A("comment","*/"),l=r.slice(a,_+1),b=l.split(`
63
- `),v=b.length-1,v>0?(k=s+v,w=_-b[v].length):(k=s,w=i),y=X.comment,s=k,m=k,f=_-w):c===X.slash?(_=a,y=c,m=s,f=a-i,o=_+1):(_=nz(r,a),y=X.word,m=s,f=_-i),o=_+1;break}t.push([y,s,a-i,m,f,a,o]),w&&(i=w,w=null),a=o}return t}});var YP=x(qt=>{"use strict";p();var jp=qt&&qt.__assign||function(){return jp=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},jp.apply(this,arguments)},az=qt&&qt.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),oz=qt&&qt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Fp=qt&&qt.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&az(r,t,n[i]);return oz(r,t),r}})(),HP=qt&&qt.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},zP=qt&&qt.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Nr=qt&&qt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},zs,sb;Object.defineProperty(qt,"__esModule",{value:!0});var cz=Nr(Fv()),ab=Nr(Bv()),uz=Nr($v()),WP=Nr(Uv()),lz=Nr(Hv()),fz=Nr(zv()),ob=Nr(Wv()),pz=Nr(Gv()),GP=Fp(Xv()),dz=Nr(Zv()),cb=Nr(eb()),hz=Nr(tb()),mz=Nr(VP()),z=Fp(UP()),Z=Fp(nb()),gz=Fp(Nt()),We=yo(),fb=(zs={},zs[Z.space]=!0,zs[Z.cr]=!0,zs[Z.feed]=!0,zs[Z.newline]=!0,zs[Z.tab]=!0,zs),yz=jp(jp({},fb),(sb={},sb[Z.comment]=!0,sb));function JP(e){return{line:e[z.FIELDS.START_LINE],column:e[z.FIELDS.START_COL]}}function KP(e){return{line:e[z.FIELDS.END_LINE],column:e[z.FIELDS.END_COL]}}function Ws(e,t,r,n){return{start:{line:e,column:t},end:{line:r,column:n}}}function vo(e){return Ws(e[z.FIELDS.START_LINE],e[z.FIELDS.START_COL],e[z.FIELDS.END_LINE],e[z.FIELDS.END_COL])}function ub(e,t){if(e)return Ws(e[z.FIELDS.START_LINE],e[z.FIELDS.START_COL],t[z.FIELDS.END_LINE],t[z.FIELDS.END_COL])}function bo(e,t){var r=e[t];if(typeof r=="string")return r.indexOf("\\")!==-1&&((0,We.ensureObject)(e,"raws"),e[t]=(0,We.unesc)(r),e.raws[t]===void 0&&(e.raws[t]=r)),e}function lb(e,t){for(var r=-1,n=[];(r=e.indexOf(t,r+1))!==-1;)n.push(r);return n}function _z(){return Array.from(new Set(Array.prototype.concat.apply([],arguments)))}var vz=(function(){function e(t,r){r===void 0&&(r={}),this.rule=t,this.options=Object.assign({lossy:!1,safe:!1},r),this.position=0,this.nestingDepth=0,this.maxNestingDepth=(0,We.resolveMaxNestingDepth)(this.options.maxNestingDepth),this.css=typeof this.rule=="string"?this.rule:this.rule.selector,this.tokens=(0,z.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var n=ub(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new cz.default({source:n}),this.root.errorGenerator=this._errorGenerator();var i=new ab.default({source:{start:{line:1,column:1}},sourceIndex:0});this.root.append(i),this.current=i,this.loop()}return e.prototype._errorGenerator=function(){var t=this;return function(r,n){return typeof t.rule=="string"?new Error(r):t.rule.error(r,n)}},e.prototype.attribute=function(){var t=[],r=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[z.FIELDS.TYPE]!==Z.closeSquare;)t.push(this.currToken),this.position++;if(!this.currToken)return this.expected("closing square bracket",r[z.FIELDS.START_POS]);if(this.currToken[z.FIELDS.TYPE]!==Z.closeSquare)return this.expected("closing square bracket",this.currToken[z.FIELDS.START_POS]);var n=t.length,i={source:Ws(r[1],r[2],this.currToken[3],this.currToken[4]),sourceIndex:r[z.FIELDS.START_POS]};if(n===1&&!~[Z.word].indexOf(t[0][z.FIELDS.TYPE]))return this.expected("attribute",t[0][z.FIELDS.START_POS]);for(var s=0,a="",o="",c=null,l=!1;s<n;){var f=t[s],m=this.content(f),d=t[s+1];switch(f[z.FIELDS.TYPE]){case Z.space:if(l=!0,this.options.lossy)break;if(c){(0,We.ensureObject)(i,"spaces",c);var g=i.spaces[c].after||"";i.spaces[c].after=g+m;var v=(0,We.getProp)(i,"raws","spaces",c,"after")||null;v&&(i.raws.spaces[c].after=v+m)}else a=a+m,o=o+m;break;case Z.asterisk:if(d[z.FIELDS.TYPE]===Z.equals)i.operator=m,c="operator";else if((!i.namespace||c==="namespace"&&!l)&&d){a&&((0,We.ensureObject)(i,"spaces","attribute"),i.spaces.attribute.before=a,a=""),o&&((0,We.ensureObject)(i,"raws","spaces","attribute"),i.raws.spaces.attribute.before=o,o=""),i.namespace=(i.namespace||"")+m;var b=(0,We.getProp)(i,"raws","namespace")||null;b&&(i.raws.namespace+=m),c="namespace"}l=!1;break;case Z.dollar:if(c==="value"){var _=(0,We.getProp)(i,"raws","value");i.value+="$",_&&(i.raws.value=_+"$");break}case Z.caret:d[z.FIELDS.TYPE]===Z.equals&&(i.operator=m,c="operator"),l=!1;break;case Z.combinator:if(m==="~"&&d[z.FIELDS.TYPE]===Z.equals&&(i.operator=m,c="operator"),m!=="|"){l=!1;break}d[z.FIELDS.TYPE]===Z.equals?(i.operator=m,c="operator"):!i.namespace&&!i.attribute&&(i.namespace=!0),l=!1;break;case Z.word:if(d&&this.content(d)==="|"&&t[s+2]&&t[s+2][z.FIELDS.TYPE]!==Z.equals&&!i.operator&&!i.namespace)i.namespace=m,c="namespace";else if(!i.attribute||c==="attribute"&&!l){a&&((0,We.ensureObject)(i,"spaces","attribute"),i.spaces.attribute.before=a,a=""),o&&((0,We.ensureObject)(i,"raws","spaces","attribute"),i.raws.spaces.attribute.before=o,o=""),i.attribute=(i.attribute||"")+m;var b=(0,We.getProp)(i,"raws","attribute")||null;b&&(i.raws.attribute+=m),c="attribute"}else if(!i.value&&i.value!==""||c==="value"&&!(l||i.quoteMark)){var k=(0,We.unesc)(m),_=(0,We.getProp)(i,"raws","value")||"",w=i.value||"";i.value=w+k,i.quoteMark=null,(k!==m||_)&&((0,We.ensureObject)(i,"raws"),i.raws.value=(_||w)+m),c="value"}else{var T=m==="i"||m==="I";(i.value||i.value==="")&&(i.quoteMark||l)?(i.insensitive=T,(!T||m==="I")&&((0,We.ensureObject)(i,"raws"),i.raws.insensitiveFlag=m),c="insensitive",a&&((0,We.ensureObject)(i,"spaces","insensitive"),i.spaces.insensitive.before=a,a=""),o&&((0,We.ensureObject)(i,"raws","spaces","insensitive"),i.raws.spaces.insensitive.before=o,o="")):(i.value||i.value==="")&&(c="value",i.value+=m,i.raws.value&&(i.raws.value+=m))}l=!1;break;case Z.str:if(!i.attribute||!i.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:f[z.FIELDS.START_POS]});var y=(0,GP.unescapeValue)(m),A=y.unescaped,O=y.quoteMark;i.value=A,i.quoteMark=O,c="value",(0,We.ensureObject)(i,"raws"),i.raws.value=m,l=!1;break;case Z.equals:if(!i.attribute)return this.expected("attribute",f[z.FIELDS.START_POS],m);if(i.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:f[z.FIELDS.START_POS]});i.operator=i.operator?i.operator+m:m,c="operator",l=!1;break;case Z.comment:if(c)if(l||d&&d[z.FIELDS.TYPE]===Z.space||c==="insensitive"){var P=(0,We.getProp)(i,"spaces",c,"after")||"",q=(0,We.getProp)(i,"raws","spaces",c,"after")||P;(0,We.ensureObject)(i,"raws","spaces",c),i.raws.spaces[c].after=q+m}else{var B=i[c]||"",M=(0,We.getProp)(i,"raws",c)||B;(0,We.ensureObject)(i,"raws"),i.raws[c]=M+m}else o=o+m;break;default:return this.error('Unexpected "'.concat(m,'" found.'),{index:f[z.FIELDS.START_POS]})}s++}bo(i,"attribute"),bo(i,"namespace"),this.newNode(new GP.default(i)),this.position++},e.prototype.parseWhitespaceEquivalentTokens=function(t){t<0&&(t=this.tokens.length);var r=this.position,n=[],i="",s=void 0;do if(fb[this.currToken[z.FIELDS.TYPE]])this.options.lossy||(i+=this.content());else if(this.currToken[z.FIELDS.TYPE]===Z.comment){var a={};i&&(a.before=i,i=""),s=new WP.default({value:this.content(),source:vo(this.currToken),sourceIndex:this.currToken[z.FIELDS.START_POS],spaces:a}),n.push(s)}while(++this.position<t);if(i){if(s)s.spaces.after=i;else if(!this.options.lossy){var o=this.tokens[r],c=this.tokens[this.position-1];n.push(new ob.default({value:"",source:Ws(o[z.FIELDS.START_LINE],o[z.FIELDS.START_COL],c[z.FIELDS.END_LINE],c[z.FIELDS.END_COL]),sourceIndex:o[z.FIELDS.START_POS],spaces:{before:i,after:""}}))}}return n},e.prototype.convertWhitespaceNodesToSpace=function(t,r){var n=this;r===void 0&&(r=!1);var i="",s="";t.forEach(function(o){var c=n.lossySpace(o.spaces.before,r),l=n.lossySpace(o.rawSpaceBefore,r);i+=c+n.lossySpace(o.spaces.after,r&&c.length===0),s+=c+o.value+n.lossySpace(o.rawSpaceAfter,r&&l.length===0)}),s===i&&(s=void 0);var a={space:i,rawSpace:s};return a},e.prototype.isNamedCombinator=function(t){return t===void 0&&(t=this.position),this.tokens[t+0]&&this.tokens[t+0][z.FIELDS.TYPE]===Z.slash&&this.tokens[t+1]&&this.tokens[t+1][z.FIELDS.TYPE]===Z.word&&this.tokens[t+2]&&this.tokens[t+2][z.FIELDS.TYPE]===Z.slash},e.prototype.namedCombinator=function(){if(this.isNamedCombinator()){var t=this.content(this.tokens[this.position+1]),r=(0,We.unesc)(t).toLowerCase(),n={};r!==t&&(n.value="/".concat(t,"/"));var i=new cb.default({value:"/".concat(r,"/"),source:Ws(this.currToken[z.FIELDS.START_LINE],this.currToken[z.FIELDS.START_COL],this.tokens[this.position+2][z.FIELDS.END_LINE],this.tokens[this.position+2][z.FIELDS.END_COL]),sourceIndex:this.currToken[z.FIELDS.START_POS],raws:n});return this.position=this.position+3,i}else this.unexpected()},e.prototype.combinator=function(){var t=this;if(this.content()==="|")return this.namespace();var r=this.locateNextMeaningfulToken(this.position);if(r<0||this.tokens[r][z.FIELDS.TYPE]===Z.comma||this.tokens[r][z.FIELDS.TYPE]===Z.closeParenthesis){var n=this.parseWhitespaceEquivalentTokens(r);if(n.length>0){var i=this.current.last;if(i){var s=this.convertWhitespaceNodesToSpace(n),a=s.space,o=s.rawSpace;o!==void 0&&(i.rawSpaceAfter+=o),i.spaces.after+=a}else n.forEach(function(b){return t.newNode(b)})}return}var c=this.currToken,l=void 0;r>this.position&&(l=this.parseWhitespaceEquivalentTokens(r));var f;if(this.isNamedCombinator()?f=this.namedCombinator():this.currToken[z.FIELDS.TYPE]===Z.combinator?(f=new cb.default({value:this.content(),source:vo(this.currToken),sourceIndex:this.currToken[z.FIELDS.START_POS]}),this.position++):fb[this.currToken[z.FIELDS.TYPE]]||l||this.unexpected(),f){if(l){var m=this.convertWhitespaceNodesToSpace(l),a=m.space,o=m.rawSpace;f.spaces.before=a,f.rawSpaceBefore=o}}else{var d=this.convertWhitespaceNodesToSpace(l,!0),a=d.space,o=d.rawSpace;o||(o=a);var g={},v={spaces:{}};a.endsWith(" ")&&o.endsWith(" ")?(g.before=a.slice(0,a.length-1),v.spaces.before=o.slice(0,o.length-1)):a[0]===" "&&o[0]===" "?(g.after=a.slice(1),v.spaces.after=o.slice(1)):v.value=o,f=new cb.default({value:" ",source:ub(c,this.tokens[this.position-1]),sourceIndex:c[z.FIELDS.START_POS],spaces:g,raws:v})}return this.currToken&&this.currToken[z.FIELDS.TYPE]===Z.space&&(f.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(f)},e.prototype.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}this.current._inferEndPosition();var t=new ab.default({source:{start:JP(this.tokens[this.position+1])},sourceIndex:this.tokens[this.position+1][z.FIELDS.START_POS]});this.current.parent.append(t),this.current=t,this.position++},e.prototype.comment=function(){var t=this.currToken;this.newNode(new WP.default({value:this.content(),source:vo(t),sourceIndex:t[z.FIELDS.START_POS]})),this.position++},e.prototype.error=function(t,r){throw this.root.error(t,r)},e.prototype.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[z.FIELDS.START_POS]})},e.prototype.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[z.FIELDS.START_POS])},e.prototype.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[z.FIELDS.START_POS])},e.prototype.unexpected=function(){return this.error("Unexpected '".concat(this.content(),"'. Escaping special characters with \\ may help."),this.currToken[z.FIELDS.START_POS])},e.prototype.unexpectedPipe=function(){return this.error("Unexpected '|'.",this.currToken[z.FIELDS.START_POS])},e.prototype.namespace=function(){var t=this.prevToken,r=t&&(t[z.FIELDS.TYPE]===Z.word||t[z.FIELDS.TYPE]===Z.asterisk||t[z.FIELDS.TYPE]===Z.ampersand)?this.content(t):!0;if(!this.nextToken)return this.unexpectedPipe();if(this.nextToken[z.FIELDS.TYPE]===Z.word)return this.position++,this.word(r);if(this.nextToken[z.FIELDS.TYPE]===Z.asterisk)return this.position++,this.universal(r);this.unexpectedPipe()},e.prototype.nesting=function(){if(this.nextToken){var t=this.content(this.nextToken);if(t==="|"){this.position++;return}}var r=this.currToken;this.newNode(new hz.default({value:this.content(),source:vo(r),sourceIndex:r[z.FIELDS.START_POS]})),this.position++},e.prototype.parentheses=function(){var t=this.current.last,r=1,n=this.currToken;if(this.position++,t&&t.type===gz.PSEUDO){var i=new ab.default({source:{start:JP(this.tokens[this.position])},sourceIndex:this.tokens[this.position][z.FIELDS.START_POS]}),s=this.current;t.append(i),this.current=i,this.nestingDepth++;try{for(this.nestingDepth>this.maxNestingDepth&&this.error("Cannot parse selector: nesting depth exceeds the maximum of ".concat(this.maxNestingDepth,"."),{index:this.currToken[z.FIELDS.START_POS]});this.position<this.tokens.length&&r;)this.currToken[z.FIELDS.TYPE]===Z.openParenthesis&&r++,this.currToken[z.FIELDS.TYPE]===Z.closeParenthesis&&r--,r?this.parse():(this.current.source.end=KP(this.currToken),this.current.parent.source.end=KP(this.currToken),this.position++)}finally{this.nestingDepth--}this.current=s}else{for(var a=this.currToken,o="(",c=void 0;this.position<this.tokens.length&&r;)this.currToken[z.FIELDS.TYPE]===Z.openParenthesis&&r++,this.currToken[z.FIELDS.TYPE]===Z.closeParenthesis&&r--,c=this.currToken,o+=this.parseParenthesisToken(this.currToken),this.position++;t?t.appendToPropertyAndEscape("value",o,o):this.newNode(new ob.default({value:o,source:Ws(a[z.FIELDS.START_LINE],a[z.FIELDS.START_COL],c[z.FIELDS.END_LINE],c[z.FIELDS.END_COL]),sourceIndex:a[z.FIELDS.START_POS]}))}if(r)return this.expected("closing parenthesis",(this.currToken||n)[z.FIELDS.START_POS])},e.prototype.pseudo=function(){for(var t=this,r="",n=this.currToken;this.currToken&&this.currToken[z.FIELDS.TYPE]===Z.colon;)r+=this.content(),this.position++;if(!this.currToken)return this.expected(["pseudo-class","pseudo-element"],this.position-1);if(this.currToken[z.FIELDS.TYPE]===Z.word)this.splitWord(!1,function(i,s){r+=i,t.newNode(new pz.default({value:r,source:ub(n,t.currToken),sourceIndex:n[z.FIELDS.START_POS]})),s>1&&t.nextToken&&t.nextToken[z.FIELDS.TYPE]===Z.openParenthesis&&t.error("Misplaced parenthesis.",{index:t.nextToken[z.FIELDS.START_POS]})});else return this.expected(["pseudo-class","pseudo-element"],this.currToken[z.FIELDS.START_POS])},e.prototype.space=function(){var t=this.content();this.position===0||this.prevToken[z.FIELDS.TYPE]===Z.comma||this.prevToken[z.FIELDS.TYPE]===Z.openParenthesis||this.current.nodes.every(function(r){return r.type==="comment"})?(this.spaces=this.optionalSpace(t),this.position++):this.position===this.tokens.length-1||this.nextToken[z.FIELDS.TYPE]===Z.comma||this.nextToken[z.FIELDS.TYPE]===Z.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(t),this.position++):this.combinator()},e.prototype.string=function(){var t=this.currToken;this.newNode(new ob.default({value:this.content(),source:vo(t),sourceIndex:t[z.FIELDS.START_POS]})),this.position++},e.prototype.universal=function(t){var r=this.nextToken;if(r&&this.content(r)==="|")return this.position++,this.namespace();var n=this.currToken;this.newNode(new dz.default({value:this.content(),source:vo(n),sourceIndex:n[z.FIELDS.START_POS]}),t),this.position++},e.prototype.splitWord=function(t,r){for(var n=this,i=this.nextToken,s=this.content();i&&~[Z.dollar,Z.caret,Z.equals,Z.word].indexOf(i[z.FIELDS.TYPE]);){this.position++;var a=this.content();if(s+=a,a.lastIndexOf("\\")===a.length-1){var o=this.nextToken;o&&o[z.FIELDS.TYPE]===Z.space&&(s+=this.requiredSpace(this.content(o)),this.position++)}i=this.nextToken}var c=lb(s,".").filter(function(b){var _=s[b-1]==="\\",k=/^\d+\.\d+%$/.test(s);return!_&&!k}),l=lb(s,"#").filter(function(b){return s[b-1]!=="\\"}),f=lb(s,"#{");if(f.length){var m=new Set(f);l=l.filter(function(b){return!m.has(b)})}var d=new Set(c),g=new Set(l),v=(0,mz.default)(_z(zP(zP([0],HP(c),!1),HP(l),!1)));v.forEach(function(b,_){var k=v[_+1]||s.length,w=s.slice(b,k);if(_===0&&r)return r.call(n,w,v.length);var T,y=n.currToken,A=y[z.FIELDS.START_POS]+v[_],O=Ws(y[1],y[2]+b,y[3],y[2]+(k-1));if(d.has(b)){var P={value:w.slice(1),source:O,sourceIndex:A};T=new uz.default(bo(P,"value"))}else if(g.has(b)){var q={value:w.slice(1),source:O,sourceIndex:A};T=new lz.default(bo(q,"value"))}else{var B={value:w,source:O,sourceIndex:A};bo(B,"value"),T=new fz.default(B)}n.newNode(T,t),t=null}),this.position++},e.prototype.word=function(t){var r=this.nextToken;return r&&this.content(r)==="|"?(this.position++,this.namespace()):this.splitWord(t)},e.prototype.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},e.prototype.parse=function(t){switch(this.currToken[z.FIELDS.TYPE]){case Z.space:this.space();break;case Z.comment:this.comment();break;case Z.openParenthesis:this.parentheses();break;case Z.closeParenthesis:t&&this.missingParenthesis();break;case Z.openSquare:this.attribute();break;case Z.dollar:case Z.caret:case Z.equals:case Z.word:this.word();break;case Z.colon:this.pseudo();break;case Z.comma:this.comma();break;case Z.asterisk:this.universal();break;case Z.ampersand:this.nesting();break;case Z.slash:case Z.combinator:this.combinator();break;case Z.str:this.string();break;case Z.closeSquare:this.missingSquareBracket();case Z.semicolon:this.missingBackslash();default:this.unexpected()}},e.prototype.expected=function(t,r,n){if(Array.isArray(t)){var i=t.pop();t="".concat(t.join(", ")," or ").concat(i)}var s=/^[aeiou]/.test(t[0])?"an":"a";return n?this.error("Expected ".concat(s," ").concat(t,', found "').concat(n,'" instead.'),{index:r}):this.error("Expected ".concat(s," ").concat(t,"."),{index:r})},e.prototype.requiredSpace=function(t){return this.options.lossy?" ":t},e.prototype.optionalSpace=function(t){return this.options.lossy?"":t},e.prototype.lossySpace=function(t,r){return this.options.lossy?r?" ":"":t},e.prototype.parseParenthesisToken=function(t){var r=this.content(t);return t[z.FIELDS.TYPE]===Z.space?this.requiredSpace(r):r},e.prototype.newNode=function(t,r){return r&&(/^ +$/.test(r)&&(this.options.lossy||(this.spaces=(this.spaces||"")+r),r=!0),t.namespace=r,bo(t,"namespace")),this.spaces&&(t.spaces.before=this.spaces,this.spaces=""),this.current.append(t)},e.prototype.content=function(t){return t===void 0&&(t=this.currToken),this.css.slice(t[z.FIELDS.START_POS],t[z.FIELDS.END_POS])},Object.defineProperty(e.prototype,"currToken",{get:function(){return this.tokens[this.position]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextToken",{get:function(){return this.tokens[this.position+1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"prevToken",{get:function(){return this.tokens[this.position-1]},enumerable:!1,configurable:!0}),e.prototype.locateNextMeaningfulToken=function(t){t===void 0&&(t=this.position+1);for(var r=t;r<this.tokens.length;)if(yz[this.tokens[r][z.FIELDS.TYPE]]){r++;continue}else return r;return-1},e})();qt.default=vz});var QP=x(vu=>{"use strict";p();var bz=vu&&vu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vu,"__esModule",{value:!0});var kz=bz(YP()),Sz=(function(){function e(t,r){this.func=t||function(){},this.funcRes=null,this.options=r}return e.prototype._shouldUpdateSelector=function(t,r){r===void 0&&(r={});var n=Object.assign({},this.options,r);return n.updateSelector===!1?!1:typeof t!="string"},e.prototype._isLossy=function(t){t===void 0&&(t={});var r=Object.assign({},this.options,t);return r.lossless===!1},e.prototype._root=function(t,r){r===void 0&&(r={});var n=new kz.default(t,this._parseOptions(r));return n.root},e.prototype._parseOptions=function(t){var r=Object.assign({},this.options,t);return{lossy:this._isLossy(r),maxNestingDepth:r.maxNestingDepth}},e.prototype._stringifyOptions=function(t){var r=Object.assign({},this.options,t);return{maxNestingDepth:r.maxNestingDepth}},e.prototype._run=function(t,r){var n=this;return r===void 0&&(r={}),new Promise(function(i,s){try{var a=n._root(t,r);Promise.resolve(n.func(a)).then(function(o){var c=void 0;return n._shouldUpdateSelector(t,r)&&(c=a.toString(n._stringifyOptions(r)),t.selector=c),{transform:o,root:a,string:c}}).then(i,s)}catch(o){s(o);return}})},e.prototype._runSync=function(t,r){r===void 0&&(r={});var n=this._root(t,r),i=this.func(n);if(i&&typeof i.then=="function")throw new Error("Selector processor returned a promise to a synchronous call.");var s=void 0;return r.updateSelector&&typeof t!="string"&&(s=n.toString(this._stringifyOptions(r)),t.selector=s),{transform:i,root:n,string:s}},e.prototype.ast=function(t,r){return this._run(t,r).then(function(n){return n.root})},e.prototype.astSync=function(t,r){return this._runSync(t,r).root},e.prototype.transform=function(t,r){return this._run(t,r).then(function(n){return n.transform})},e.prototype.transformSync=function(t,r){return this._runSync(t,r).transform},e.prototype.process=function(t,r){var n=this;return this._run(t,r).then(function(i){return i.string||i.root.toString(n._stringifyOptions(r))})},e.prototype.processSync=function(t,r){var n=this._runSync(t,r);return n.string||n.root.toString(this._stringifyOptions(r))},e})();vu.default=Sz});var XP=x(Ie=>{"use strict";p();var qr=Ie&&Ie.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.universal=Ie.tag=Ie.string=Ie.selector=Ie.root=Ie.pseudo=Ie.nesting=Ie.id=Ie.comment=Ie.combinator=Ie.className=Ie.attribute=void 0;var Tz=qr(Xv()),wz=qr($v()),xz=qr(eb()),Ez=qr(Uv()),Az=qr(Hv()),Oz=qr(tb()),Pz=qr(Gv()),Nz=qr(Fv()),qz=qr(Bv()),Lz=qr(Wv()),Cz=qr(zv()),Iz=qr(Zv()),Mz=function(e){return new Tz.default(e)};Ie.attribute=Mz;var Rz=function(e){return new wz.default(e)};Ie.className=Rz;var Dz=function(e){return new xz.default(e)};Ie.combinator=Dz;var jz=function(e){return new Ez.default(e)};Ie.comment=jz;var Fz=function(e){return new Az.default(e)};Ie.id=Fz;var Bz=function(e){return new Oz.default(e)};Ie.nesting=Bz;var Vz=function(e){return new Pz.default(e)};Ie.pseudo=Vz;var $z=function(e){return new Nz.default(e)};Ie.root=$z;var Uz=function(e){return new qz.default(e)};Ie.selector=Uz;var Hz=function(e){return new Lz.default(e)};Ie.string=Hz;var zz=function(e){return new Cz.default(e)};Ie.tag=zz;var Wz=function(e){return new Iz.default(e)};Ie.universal=Wz});var eN=x(be=>{"use strict";p();var rr;Object.defineProperty(be,"__esModule",{value:!0});be.isUniversal=be.isTag=be.isString=be.isSelector=be.isRoot=be.isPseudo=be.isNesting=be.isIdentifier=be.isComment=be.isCombinator=be.isClassName=be.isAttribute=void 0;be.isNode=pb;be.isPseudoElement=ZP;be.isPseudoClass=Jz;be.isContainer=Kz;be.isNamespace=Yz;var Ke=Nt(),Gz=(rr={},rr[Ke.ATTRIBUTE]=!0,rr[Ke.CLASS]=!0,rr[Ke.COMBINATOR]=!0,rr[Ke.COMMENT]=!0,rr[Ke.ID]=!0,rr[Ke.NESTING]=!0,rr[Ke.PSEUDO]=!0,rr[Ke.ROOT]=!0,rr[Ke.SELECTOR]=!0,rr[Ke.STRING]=!0,rr[Ke.TAG]=!0,rr[Ke.UNIVERSAL]=!0,rr);function pb(e){return typeof e=="object"&&Gz[e.type]}function Lr(e,t){return pb(t)&&t.type===e}be.isAttribute=Lr.bind(null,Ke.ATTRIBUTE);be.isClassName=Lr.bind(null,Ke.CLASS);be.isCombinator=Lr.bind(null,Ke.COMBINATOR);be.isComment=Lr.bind(null,Ke.COMMENT);be.isIdentifier=Lr.bind(null,Ke.ID);be.isNesting=Lr.bind(null,Ke.NESTING);be.isPseudo=Lr.bind(null,Ke.PSEUDO);be.isRoot=Lr.bind(null,Ke.ROOT);be.isSelector=Lr.bind(null,Ke.SELECTOR);be.isString=Lr.bind(null,Ke.STRING);be.isTag=Lr.bind(null,Ke.TAG);be.isUniversal=Lr.bind(null,Ke.UNIVERSAL);function ZP(e){return(0,be.isPseudo)(e)&&e.value&&(e.value.startsWith("::")||e.value.toLowerCase()===":before"||e.value.toLowerCase()===":after"||e.value.toLowerCase()===":first-letter"||e.value.toLowerCase()===":first-line")}function Jz(e){return(0,be.isPseudo)(e)&&!ZP(e)}function Kz(e){return!!(pb(e)&&e.walk)}function Yz(e){return(0,be.isAttribute)(e)||(0,be.isTag)(e)}});var tN=x(Yn=>{"use strict";p();var Qz=Yn&&Yn.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),db=Yn&&Yn.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Qz(t,e,r)};Object.defineProperty(Yn,"__esModule",{value:!0});db(Nt(),Yn);db(XP(),Yn);db(eN(),Yn)});var nN=x((Qn,rN)=>{"use strict";p();var Xz=Qn&&Qn.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Zz=Qn&&Qn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),eW=Qn&&Qn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&Xz(r,t,n[i]);return Zz(r,t),r}})(),tW=Qn&&Qn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},rW=tW(QP()),nW=eW(tN()),hb=function(e){return new rW.default(e)};Object.assign(hb,nW);delete hb.__esModule;rN.exports=hb});var Re=x(Kt=>{"use strict";p();Object.defineProperty(Kt,"__esModule",{value:!0});Kt.isNodeOfType=Oi;Kt.isLiquidBranch=iW;Kt.getHtmlNodeName=sW;Kt.isHtmlTag=aW;Kt.isAttr=oW;Kt.isHtmlAttribute=cW;Kt.isValuedHtmlAttribute=uW;Kt.valueIncludes=lW;Kt.hasAttributeValueOf=fW;Kt.isLiquidString=pW;Kt.isLoopScopedVariable=dW;Kt.isLoopLiquidTag=iN;Kt.isWithinRawTagThatDoesNotParseItsContents=gW;var Lt=ce();function Oi(e,t){return t?.type===e}function iW(e){return Oi(Lt.NodeTypes.LiquidBranch,e)}function sW(e){if(typeof e.name=="string")return e.name;if(e.name.length===1&&Oi(Lt.NodeTypes.TextNode,e.name[0]))return e.name[0].value}function aW(e,t){return e.name.length===1&&e.name[0].type===Lt.NodeTypes.TextNode&&e.name[0].value===t&&!!e.blockEndPosition}function oW(e,t){return e.name.length===1&&Oi(Lt.NodeTypes.TextNode,e.name[0])&&e.name[0].value===t}function cW(e){return[Lt.NodeTypes.AttrUnquoted,Lt.NodeTypes.AttrDoubleQuoted,Lt.NodeTypes.AttrSingleQuoted,Lt.NodeTypes.AttrEmpty].some(t=>Oi(t,e))}function uW(e){return[Lt.NodeTypes.AttrUnquoted,Lt.NodeTypes.AttrDoubleQuoted,Lt.NodeTypes.AttrSingleQuoted].some(t=>Oi(t,e))}function lW(e,t){let r=new RegExp(`(^|\\s)${t}(\\s|$)`,"g");return e.value.filter(n=>Oi(Lt.NodeTypes.TextNode,n)).some(n=>r.test(n.value))}function fW(e,t){return e.value.length===1&&Oi(Lt.NodeTypes.TextNode,e.value[0])&&e.value[0].value===t}function pW(e){return e.type===Lt.NodeTypes.String}function dW(e,t){return t.some(r=>r.type===Lt.NodeTypes.LiquidTag&&iN(r)&&typeof r.markup!="string"&&r.markup.variableName===e)}function iN(e){return Lt.LoopNamedTags.includes(e.name)}var hW=["raw","stylesheet","javascript","schema"];function mW(e){return e.type===Lt.NodeTypes.LiquidRawTag&&hW.includes(e.name)}function gW(e){return e.some(mW)}});var Xn=x(ko=>{"use strict";p();Object.defineProperty(ko,"__esModule",{value:!0});ko.visit=yW;ko.forEachChildNodes=Vp;ko.findCurrentNode=_W;ko.findJSONNode=kW;var Bp=ce();function sN(e){return e!==null&&typeof e=="object"&&typeof e.type=="string"}function yW(e,t){let r=[],n=[{node:e,lineage:[]}],i=(s,a)=>n.push({node:s,lineage:a});for(;n.length>0;){let{node:s,lineage:a}=n.pop(),o=t[s.type],c=o?o(s,a):void 0;Array.isArray(c)?r.push(...c):c!==void 0&&r.push(c),Vp(s,a.concat(s),i)}return r}function Vp(e,t,r){for(let n of Object.values(e))if(Array.isArray(n))for(let i=n.length-1;i>=0;i--)sN(n[i])&&r(n[i],t);else sN(n)&&r(n,t)}function _W(e,t){let r,n=e,i=[];for(;n!==r;)r=n,Vp(n,i.concat(n),(s,a)=>{(bW(s)||vW(s,t)&&aN(s)<=aN(n))&&(n=s,i=a)});return[n,i]}function vW(e,t){switch(e.type){case Bp.NodeTypes.String:case Bp.NodeTypes.VariableLookup:case Bp.NodeTypes.LogicalExpression:case Bp.NodeTypes.Comparison:return e.position.start<=t&&t<=e.position.end;default:return e.position.start<t&&t<=e.position.end}}function aN(e){return e.position.end-e.position.start}function bW(e){return"blockEndPosition"in e?e.blockEndPosition?.end===-1:"children"in e?e.children.length>0:!1}function kW(e,t){let r,n=e,i=[],s=t;for(;n!==r;)r=n,Vp(n,i.concat(n),(a,o)=>{a.loc.start.offset<=s&&s<a.loc.end.offset&&(n=a,i=o)});return[n,i]}});var $p=x(vn=>{"use strict";p();var oN=vn&&vn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vn,"__esModule",{value:!0});vn.extractCSSClassNames=mb;vn.extractCSSClassesFromLiquidAST=uN;vn.extractCSSClassesFromLiquidUri=xW;vn.extractCSSClassesFromAssetUri=EW;vn.collectUsedClasses=bu;vn.collectUsedClassesFromSvg=OW;var So=ce(),SW=oN(EP()),TW=oN(nN()),wW=Re(),cN=Xn();function mb(e){let t=new Set;return(0,SW.default)(e).walkRules(n=>{try{(0,TW.default)().astSync(n.selector).walk(s=>{s.type==="class"&&t.add(s.value)})}catch{}}),t}function uN(e){let t=new Set,r=(0,cN.visit)(e,{LiquidRawTag(n){if(n.name==="stylesheet")return n.body.value}});for(let n of r)for(let i of mb(n))t.add(i);return t}async function xW(e,t){let r=new Set;try{let n=await t.readFile(e);if(!/\{%-?\s*stylesheet/.test(n))return r;let i=(0,So.toLiquidHtmlAST)(n);if(i instanceof Error)return r;for(let s of uN(i))r.add(s)}catch{}return r}async function EW(e,t){try{let r=await t.readFile(e);return mb(r)}catch{return new Set}}function AW(e){return e.name.length===1&&e.name[0].type===So.NodeTypes.TextNode&&e.name[0].value.toLowerCase()==="class"}function bu(e,t){for(let r of e){if(!(0,wW.isValuedHtmlAttribute)(r)||!AW(r))continue;let n=r.value;for(let i=0;i<n.length;i++){let s=n[i];if(s.type!==So.NodeTypes.TextNode)continue;let a=s,o=a.value,c=a.position.start,l=i>0&&n[i-1].type!==So.NodeTypes.TextNode,f=i<n.length-1&&n[i+1].type!==So.NodeTypes.TextNode,m=[],d=/\S+/g,g;for(;(g=d.exec(o))!==null;)m.push({className:g[0],startIndex:c+g.index,endIndex:c+g.index+g[0].length});m.length!==0&&(l&&!/^\s/.test(o)&&m.shift(),f&&!/\s$/.test(o)&&m.pop(),t.push(...m))}}}function OW(e,t,r,n){bu(e,n);try{let i=(0,So.toLiquidHtmlAST)(t);if(i instanceof Error)return;let s=[],a={HtmlElement(o){bu(o.attributes,s)},HtmlVoidElement(o){bu(o.attributes,s)},HtmlSelfClosingElement(o){bu(o.attributes,s)}};(0,cN.visit)(i,a);for(let o of s)n.push({className:o.className,startIndex:o.startIndex+r,endIndex:o.endIndex+r})}catch{}}});var Su=x((ku,gb)=>{p();(function(e,t){if(typeof ku=="object"&&typeof gb=="object")gb.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var r=t();for(var n in r)(typeof ku=="object"?ku:e)[n]=r[n]}})(ku,(()=>(()=>{"use strict";var e={975:i=>{function s(c){if(typeof c!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(c))}function a(c,l){for(var f,m="",d=0,g=-1,v=0,b=0;b<=c.length;++b){if(b<c.length)f=c.charCodeAt(b);else{if(f===47)break;f=47}if(f===47){if(!(g===b-1||v===1))if(g!==b-1&&v===2){if(m.length<2||d!==2||m.charCodeAt(m.length-1)!==46||m.charCodeAt(m.length-2)!==46){if(m.length>2){var _=m.lastIndexOf("/");if(_!==m.length-1){_===-1?(m="",d=0):d=(m=m.slice(0,_)).length-1-m.lastIndexOf("/"),g=b,v=0;continue}}else if(m.length===2||m.length===1){m="",d=0,g=b,v=0;continue}}l&&(m.length>0?m+="/..":m="..",d=2)}else m.length>0?m+="/"+c.slice(g+1,b):m=c.slice(g+1,b),d=b-g-1;g=b,v=0}else f===46&&v!==-1?++v:v=-1}return m}var o={resolve:function(){for(var c,l="",f=!1,m=arguments.length-1;m>=-1&&!f;m--){var d;m>=0?d=arguments[m]:(c===void 0&&(c=process.cwd()),d=c),s(d),d.length!==0&&(l=d+"/"+l,f=d.charCodeAt(0)===47)}return l=a(l,!f),f?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(c){if(s(c),c.length===0)return".";var l=c.charCodeAt(0)===47,f=c.charCodeAt(c.length-1)===47;return(c=a(c,!l)).length!==0||l||(c="."),c.length>0&&f&&(c+="/"),l?"/"+c:c},isAbsolute:function(c){return s(c),c.length>0&&c.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var c,l=0;l<arguments.length;++l){var f=arguments[l];s(f),f.length>0&&(c===void 0?c=f:c+="/"+f)}return c===void 0?".":o.normalize(c)},relative:function(c,l){if(s(c),s(l),c===l||(c=o.resolve(c))===(l=o.resolve(l)))return"";for(var f=1;f<c.length&&c.charCodeAt(f)===47;++f);for(var m=c.length,d=m-f,g=1;g<l.length&&l.charCodeAt(g)===47;++g);for(var v=l.length-g,b=d<v?d:v,_=-1,k=0;k<=b;++k){if(k===b){if(v>b){if(l.charCodeAt(g+k)===47)return l.slice(g+k+1);if(k===0)return l.slice(g+k)}else d>b&&(c.charCodeAt(f+k)===47?_=k:k===0&&(_=0));break}var w=c.charCodeAt(f+k);if(w!==l.charCodeAt(g+k))break;w===47&&(_=k)}var T="";for(k=f+_+1;k<=m;++k)k!==m&&c.charCodeAt(k)!==47||(T.length===0?T+="..":T+="/..");return T.length>0?T+l.slice(g+_):(g+=_,l.charCodeAt(g)===47&&++g,l.slice(g))},_makeLong:function(c){return c},dirname:function(c){if(s(c),c.length===0)return".";for(var l=c.charCodeAt(0),f=l===47,m=-1,d=!0,g=c.length-1;g>=1;--g)if((l=c.charCodeAt(g))===47){if(!d){m=g;break}}else d=!1;return m===-1?f?"/":".":f&&m===1?"//":c.slice(0,m)},basename:function(c,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');s(c);var f,m=0,d=-1,g=!0;if(l!==void 0&&l.length>0&&l.length<=c.length){if(l.length===c.length&&l===c)return"";var v=l.length-1,b=-1;for(f=c.length-1;f>=0;--f){var _=c.charCodeAt(f);if(_===47){if(!g){m=f+1;break}}else b===-1&&(g=!1,b=f+1),v>=0&&(_===l.charCodeAt(v)?--v==-1&&(d=f):(v=-1,d=b))}return m===d?d=b:d===-1&&(d=c.length),c.slice(m,d)}for(f=c.length-1;f>=0;--f)if(c.charCodeAt(f)===47){if(!g){m=f+1;break}}else d===-1&&(g=!1,d=f+1);return d===-1?"":c.slice(m,d)},extname:function(c){s(c);for(var l=-1,f=0,m=-1,d=!0,g=0,v=c.length-1;v>=0;--v){var b=c.charCodeAt(v);if(b!==47)m===-1&&(d=!1,m=v+1),b===46?l===-1?l=v:g!==1&&(g=1):l!==-1&&(g=-1);else if(!d){f=v+1;break}}return l===-1||m===-1||g===0||g===1&&l===m-1&&l===f+1?"":c.slice(l,m)},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(l,f){var m=f.dir||f.root,d=f.base||(f.name||"")+(f.ext||"");return m?m===f.root?m+d:m+"/"+d:d})(0,c)},parse:function(c){s(c);var l={root:"",dir:"",base:"",ext:"",name:""};if(c.length===0)return l;var f,m=c.charCodeAt(0),d=m===47;d?(l.root="/",f=1):f=0;for(var g=-1,v=0,b=-1,_=!0,k=c.length-1,w=0;k>=f;--k)if((m=c.charCodeAt(k))!==47)b===-1&&(_=!1,b=k+1),m===46?g===-1?g=k:w!==1&&(w=1):g!==-1&&(w=-1);else if(!_){v=k+1;break}return g===-1||b===-1||w===0||w===1&&g===b-1&&g===v+1?b!==-1&&(l.base=l.name=v===0&&d?c.slice(1,b):c.slice(v,b)):(v===0&&d?(l.name=c.slice(1,g),l.base=c.slice(1,b)):(l.name=c.slice(v,g),l.base=c.slice(v,b)),l.ext=c.slice(g,b)),v>0?l.dir=c.slice(0,v-1):d&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o},70:(i,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:(i,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.uriToFsPath=s.URI=void 0;let o=a(70),c=/^\w[\w\d+.-]*$/,l=/^\//,f=/^\/\//;function m(M,L){if(!M.scheme&&L)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${M.authority}", path: "${M.path}", query: "${M.query}", fragment: "${M.fragment}"}`);if(M.scheme&&!c.test(M.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(M.path){if(M.authority){if(!l.test(M.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(M.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let d="",g="/",v=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class b{static isUri(L){return L instanceof b||!!L&&typeof L.authority=="string"&&typeof L.fragment=="string"&&typeof L.path=="string"&&typeof L.query=="string"&&typeof L.scheme=="string"&&typeof L.fsPath=="string"&&typeof L.with=="function"&&typeof L.toString=="function"}scheme;authority;path;query;fragment;constructor(L,C,$,V,I,F=!1){typeof L=="object"?(this.scheme=L.scheme||d,this.authority=L.authority||d,this.path=L.path||d,this.query=L.query||d,this.fragment=L.fragment||d):(this.scheme=(function(U,J){return U||J?U:"file"})(L,F),this.authority=C||d,this.path=(function(U,J){switch(U){case"https":case"http":case"file":J?J[0]!==g&&(J=g+J):J=g}return J})(this.scheme,$||d),this.query=V||d,this.fragment=I||d,m(this,F))}get fsPath(){return A(this,!1)}with(L){if(!L)return this;let{scheme:C,authority:$,path:V,query:I,fragment:F}=L;return C===void 0?C=this.scheme:C===null&&(C=d),$===void 0?$=this.authority:$===null&&($=d),V===void 0?V=this.path:V===null&&(V=d),I===void 0?I=this.query:I===null&&(I=d),F===void 0?F=this.fragment:F===null&&(F=d),C===this.scheme&&$===this.authority&&V===this.path&&I===this.query&&F===this.fragment?this:new k(C,$,V,I,F)}static parse(L,C=!1){let $=v.exec(L);return $?new k($[2]||d,B($[4]||d),B($[5]||d),B($[7]||d),B($[9]||d),C):new k(d,d,d,d,d)}static file(L){let C=d;if(o.isWindows&&(L=L.replace(/\\/g,g)),L[0]===g&&L[1]===g){let $=L.indexOf(g,2);$===-1?(C=L.substring(2),L=g):(C=L.substring(2,$),L=L.substring($)||g)}return new k("file",C,L,d,d)}static from(L){let C=new k(L.scheme,L.authority,L.path,L.query,L.fragment);return m(C,!0),C}toString(L=!1){return O(this,L)}toJSON(){return this}static revive(L){if(L){if(L instanceof b)return L;{let C=new k(L);return C._formatted=L.external,C._fsPath=L._sep===_?L.fsPath:null,C}}return L}}s.URI=b;let _=o.isWindows?1:void 0;class k extends b{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=A(this,!1)),this._fsPath}toString(L=!1){return L?O(this,!0):(this._formatted||(this._formatted=O(this,!1)),this._formatted)}toJSON(){let L={$mid:1};return this._fsPath&&(L.fsPath=this._fsPath,L._sep=_),this._formatted&&(L.external=this._formatted),this.path&&(L.path=this.path),this.scheme&&(L.scheme=this.scheme),this.authority&&(L.authority=this.authority),this.query&&(L.query=this.query),this.fragment&&(L.fragment=this.fragment),L}}let w={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 T(M,L,C){let $,V=-1;for(let I=0;I<M.length;I++){let F=M.charCodeAt(I);if(F>=97&&F<=122||F>=65&&F<=90||F>=48&&F<=57||F===45||F===46||F===95||F===126||L&&F===47||C&&F===91||C&&F===93||C&&F===58)V!==-1&&($+=encodeURIComponent(M.substring(V,I)),V=-1),$!==void 0&&($+=M.charAt(I));else{$===void 0&&($=M.substr(0,I));let U=w[F];U!==void 0?(V!==-1&&($+=encodeURIComponent(M.substring(V,I)),V=-1),$+=U):V===-1&&(V=I)}}return V!==-1&&($+=encodeURIComponent(M.substring(V))),$!==void 0?$:M}function y(M){let L;for(let C=0;C<M.length;C++){let $=M.charCodeAt(C);$===35||$===63?(L===void 0&&(L=M.substr(0,C)),L+=w[$]):L!==void 0&&(L+=M[C])}return L!==void 0?L:M}function A(M,L){let C;return C=M.authority&&M.path.length>1&&M.scheme==="file"?`//${M.authority}${M.path}`:M.path.charCodeAt(0)===47&&(M.path.charCodeAt(1)>=65&&M.path.charCodeAt(1)<=90||M.path.charCodeAt(1)>=97&&M.path.charCodeAt(1)<=122)&&M.path.charCodeAt(2)===58?L?M.path.substr(1):M.path[1].toLowerCase()+M.path.substr(2):M.path,o.isWindows&&(C=C.replace(/\//g,"\\")),C}function O(M,L){let C=L?y:T,$="",{scheme:V,authority:I,path:F,query:U,fragment:J}=M;if(V&&($+=V,$+=":"),(I||V==="file")&&($+=g,$+=g),I){let Q=I.indexOf("@");if(Q!==-1){let Y=I.substr(0,Q);I=I.substr(Q+1),Q=Y.lastIndexOf(":"),Q===-1?$+=C(Y,!1,!1):($+=C(Y.substr(0,Q),!1,!1),$+=":",$+=C(Y.substr(Q+1),!1,!0)),$+="@"}I=I.toLowerCase(),Q=I.lastIndexOf(":"),Q===-1?$+=C(I,!1,!0):($+=C(I.substr(0,Q),!1,!0),$+=I.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)}`)}$+=C(F,!0,!1)}return U&&($+="?",$+=C(U,!1,!1)),J&&($+="#",$+=L?J:T(J,!1,!1)),$}function P(M){try{return decodeURIComponent(M)}catch{return M.length>3?M.substr(0,3)+P(M.substr(3)):M}}s.uriToFsPath=A;let q=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function B(M){return M.match(q)?M.replace(q,(L=>P(L))):M}},552:function(i,s,a){var o=this&&this.__createBinding||(Object.create?function(v,b,_,k){k===void 0&&(k=_);var w=Object.getOwnPropertyDescriptor(b,_);w&&!("get"in w?!b.__esModule:w.writable||w.configurable)||(w={enumerable:!0,get:function(){return b[_]}}),Object.defineProperty(v,k,w)}:function(v,b,_,k){k===void 0&&(k=_),v[k]=b[_]}),c=this&&this.__setModuleDefault||(Object.create?function(v,b){Object.defineProperty(v,"default",{enumerable:!0,value:b})}:function(v,b){v.default=b}),l=this&&this.__importStar||function(v){if(v&&v.__esModule)return v;var b={};if(v!=null)for(var _ in v)_!=="default"&&Object.prototype.hasOwnProperty.call(v,_)&&o(b,v,_);return c(b,v),b};Object.defineProperty(s,"__esModule",{value:!0}),s.Utils=void 0;let f=l(a(975)),m=f.posix||f,d="/";var g;(function(v){v.joinPath=function(b,..._){return b.with({path:m.join(b.path,..._)})},v.resolvePath=function(b,..._){let k=b.path,w=!1;k[0]!==d&&(k=d+k,w=!0);let T=m.resolve(k,..._);return w&&T[0]===d&&!b.authority&&(T=T.substring(1)),b.with({path:T})},v.dirname=function(b){if(b.path.length===0||b.path===d)return b;let _=m.dirname(b.path);return _.length===1&&_.charCodeAt(0)===46&&(_=""),b.with({path:_})},v.basename=function(b){return m.basename(b.path)},v.extname=function(b){return m.extname(b.path)}})(g||(s.Utils=g={}))}},t={};function r(i){var s=t[i];if(s!==void 0)return s.exports;var a=t[i]={exports:{}};return e[i].call(a.exports,a,a.exports,r),a.exports}var n={};return(()=>{var i=n;Object.defineProperty(i,"__esModule",{value:!0}),i.Utils=i.URI=void 0;let s=r(231);Object.defineProperty(i,"URI",{enumerable:!0,get:function(){return s.URI}});let a=r(552);Object.defineProperty(i,"Utils",{enumerable:!0,get:function(){return a.Utils}})})(),n})()))});var bn=x(hr=>{"use strict";p();Object.defineProperty(hr,"__esModule",{value:!0});hr.Utils=hr.URI=void 0;hr.relative=PW;hr.join=NW;hr.resolve=qW;hr.normalize=Tu;hr.dirname=LW;hr.basename=CW;hr.fsPath=IW;var Pi=Su();Object.defineProperty(hr,"URI",{enumerable:!0,get:function(){return Pi.URI}});Object.defineProperty(hr,"Utils",{enumerable:!0,get:function(){return Pi.Utils}});function PW(e,t){return Tu(e).replace(t,"").replace(/\\\\/g,"/").replace(/^\/+/,"")}function NW(e,...t){return Tu(Pi.Utils.joinPath(To(e),...t))}function qW(e,t){return Tu(Pi.Utils.resolvePath(To(e),t))}function Tu(e){return To(e).toString(!0).replace(/\\/g,"/")}function LW(e){return Tu(Pi.Utils.dirname(To(e)))}function CW(e,t){let r=Pi.Utils.basename(To(e));return t?r.replace(new RegExp(`${t.replace(/\./g,"\\.")}$`),""):r}function IW(e){return To(e).fsPath}function To(e){return Pi.URI.isUri(e)?e:Pi.URI.parse(e)}});var yb=x(Cr=>{"use strict";p();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.location=Cr.JSONCParseErrors=void 0;Cr.toJSONNode=DW;var MW=Ae(),RW=(mn(),Py(Ba)),Up=class extends Error{errors;constructor(t,r){super(t),this.errors=r}};Cr.JSONCParseErrors=Up;function DW(e){let t=[],r=(0,RW.parseTree)(e,t,{allowTrailingComma:!0,disallowComments:!1});if(t.length||r===void 0)throw new Up("Failed to parse JSONC",t);return Hp(r)}function Hp(e){switch(e.type){case"object":return jW(e);case"property":return BW(e);case"array":return FW(e);case"boolean":case"null":case"number":case"string":return $W(e);default:(0,MW.assertNever)(e.type)}}function jW(e){return{type:"Object",children:(e.children??[]).map(Hp),loc:(0,Cr.location)(e.offset,e.offset+e.length)}}function FW(e){return{type:"Array",children:e.children.map(Hp),loc:(0,Cr.location)(e.offset,e.offset+e.length)}}function BW(e){return{type:"Property",key:VW(e.children[0]),value:Hp(e.children[1]),loc:(0,Cr.location)(e.offset,e.offset+e.length)}}function VW(e){return{type:"Identifier",value:e.value,raw:JSON.stringify(e.value),loc:(0,Cr.location)(e.offset,e.offset+e.length)}}function $W(e){return{type:"Literal",value:e.value,raw:JSON.stringify(e.value),loc:(0,Cr.location)(e.offset,e.offset+e.length)}}var UW=(e,t)=>({start:lN(e),end:lN(t)});Cr.location=UW;var lN=e=>({offset:e})});var pN=x(fN=>{"use strict";p();Object.defineProperty(fN,"__esModule",{value:!0})});var dN=x(zp=>{"use strict";p();Object.defineProperty(zp,"__esModule",{value:!0});zp.SchemaProp=void 0;var _b=class e{options;constructor(t){this.options=t}static string(t){return new e({type:"string",defaultValue:t})}static number(t){return new e({type:"number",defaultValue:t})}static boolean(t){return new e({type:"boolean",defaultValue:t})}static object(t,r){return new e({type:"object",defaultValue:r,properties:t})}static array(t,r){return new e({type:"array",defaultValue:r,itemType:t})}optional(){return this.options.optional=!0,this}defaultValue(){return this.options.defaultValue}};zp.SchemaProp=_b});var mN=x(hN=>{"use strict";p();Object.defineProperty(hN,"__esModule",{value:!0})});var yN=x(gN=>{"use strict";p();Object.defineProperty(gN,"__esModule",{value:!0})});var _N=x(Wp=>{"use strict";p();Object.defineProperty(Wp,"__esModule",{value:!0});Wp.Setting=void 0;var HW=yN();Object.defineProperty(Wp,"Setting",{enumerable:!0,get:function(){return HW.Setting}})});var bN=x(Zn=>{"use strict";p();var zW=Zn&&Zn.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),WW=Zn&&Zn.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&zW(t,e,r)};Object.defineProperty(Zn,"__esModule",{value:!0});Zn.ThemeSchemaType=void 0;WW(_N(),Zn);var vN;(function(e){e.AppBlock="app-block",e.Block="block",e.Section="section"})(vN||(Zn.ThemeSchemaType=vN={}))});var G=x(Oe=>{"use strict";p();var GW=Oe&&Oe.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Gp=Oe&&Oe.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&GW(t,e,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 JW=ce();Object.defineProperty(Oe,"LiquidHtmlNodeTypes",{enumerable:!0,get:function(){return JW.NodeTypes}});Gp(pN(),Oe);Gp(dN(),Oe);Gp(mN(),Oe);Gp(bN(),Oe);var KW=e=>e?.type==="Object";Oe.isObjectNode=KW;var YW=e=>e?.type==="Array";Oe.isArrayNode=YW;var QW=e=>e?.type==="Property";Oe.isPropertyNode=QW;var XW=e=>e?.type==="Value";Oe.isValueNode=XW;var ZW=e=>e?.type==="Literal";Oe.isLiteralNode=ZW;Oe.Modes=["theme","app"];var kN;(function(e){e.JSON="JSON",e.LiquidHtml="LiquidHtml"})(kN||(Oe.SourceCodeType=kN={}));var SN;(function(e){e[e.ERROR=0]="ERROR",e[e.WARNING=1]="WARNING",e[e.INFO=2]="INFO"})(SN||(Oe.Severity=SN={}));var TN;(function(e){e.All="all",e.Recommended="recommended",e.ThemeAppExtension="theme-app-extension"})(TN||(Oe.ConfigTarget=TN={}))});var wu=x(tn=>{"use strict";p();var eG=tn&&tn.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),tG=tn&&tn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),rG=tn&&tn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&eG(r,t,n[i]);return tG(r,t),r}})();Object.defineProperty(tn,"__esModule",{value:!0});tn.toLiquidHTMLAST=AN;tn.toJSONAST=ON;tn.toSourceCode=sG;var nG=ce(),iG=yb(),wN=rG(bn()),xN=G(),EN=df();function AN(e){try{return(0,nG.toLiquidHtmlAST)(e)}catch(t){return(0,EN.asError)(t)}}function ON(e){try{return(0,iG.toJSONNode)(e)}catch(t){return(0,EN.asError)(t)}}function sG(e,t,r){return e.endsWith(".liquid")?{uri:wN.normalize(e),source:t,type:xN.SourceCodeType.LiquidHtml,ast:AN(t),version:r}:{uri:wN.normalize(e),source:t,type:xN.SourceCodeType.JSON,ast:ON(t),version:r}}});var Ve=x(ht=>{"use strict";p();var aG=ht&&ht.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),oG=ht&&ht.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),cG=ht&&ht.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&aG(r,t,n[i]);return oG(r,t),r}})();Object.defineProperty(ht,"__esModule",{value:!0});ht.toSchema=uG;ht.isBlock=Jp;ht.isSection=bb;ht.isSnippet=lG;ht.isBlockSchema=fG;ht.isSectionSchema=pG;ht.toBlockSchema=CN;ht.toSectionSchema=IN;ht.toAppBlockSchema=MN;ht.hasNoSchemaTag=dG;ht.getSchema=hG;ht.getSchemaFromJSON=mG;var vb=ce(),PN=He(),Gs=cG(bn()),NN=wu(),wo=G(),qN=Xn();async function uG(e,t,r,n,i=!0){if(r.type===wo.SourceCodeType.LiquidHtml)switch(!0){case(e==="app"&&Jp(t)):return MN(t,r.ast,i);case(e==="theme"&&Jp(t)):return CN(t,r.ast,n,i);case(e==="theme"&&bb(t)):return IN(t,r.ast,n,i);default:return}}function Jp(e){return Gs.dirname(e).endsWith("blocks")}function bb(e){return Gs.dirname(e).endsWith("sections")}function lG(e){return Gs.dirname(e).endsWith("snippets")}function fG(e){return e?.type===wo.ThemeSchemaType.Block}function pG(e){return e?.type===wo.ThemeSchemaType.Section}async function LN(e,t,r,n){return n?t instanceof Error||await n(e,t.body.value)?r:new Error("Invalid schema"):new Error("No JSON validator provided")}async function CN(e,t,r,n){let i=Gs.basename(e,".liquid"),s=kb(t),a=DN(t),o=Sb(s,n),c=Tb(s);return{type:wo.ThemeSchemaType.Block,validSchema:await LN(e,s,o,r),offset:s instanceof Error?0:s.blockStartPosition.end,name:i,parsed:o,ast:c,value:s instanceof Error?"":s.body.value,staticBlockDefs:a}}async function IN(e,t,r,n){let i=Gs.basename(e,".liquid"),s=kb(t),a=DN(t),o=Sb(s,n),c=Tb(s);return{type:wo.ThemeSchemaType.Section,validSchema:await LN(e,s,o,r),offset:s instanceof Error?0:s.blockStartPosition.end,name:i,parsed:o,ast:c,value:s instanceof Error?"":s.body.value,staticBlockDefs:a}}async function MN(e,t,r){let n=Gs.basename(e,".liquid"),i=kb(t),s=Sb(i,r),a=Tb(i);return{type:wo.ThemeSchemaType.AppBlock,offset:i instanceof Error?0:i.blockStartPosition.end,name:n,parsed:s,ast:a,value:i instanceof Error?"":i.body.value}}var RN="No schema tag found";function dG(e){return e.parsed instanceof Error&&e.parsed.message===RN}function kb(e){return e instanceof Error?e:(0,qN.visit)(e,{LiquidRawTag(t){if(t.name==="schema")return t}})[0]??new Error(RN)}function DN(e){return e instanceof Error?[]:(0,qN.visit)(e,{LiquidTag(t){if(t.name!==vb.NamedTags.content_for||typeof t.markup=="string")return;let r=t.markup;if(r.contentForType.value!=="block")return;let n=r.args.find(s=>s.name==="type"),i=r.args.find(s=>s.name==="id");if(!(!n||!i)&&n.value.type===vb.NodeTypes.String&&i.value.type===vb.NodeTypes.String)return{type:n.value.value,id:i.value.value}}})}function hG(e){let t=Gs.basename(e.file.uri,".liquid");switch(!0){case Jp(e.file.uri):return e.getBlockSchema?.(t);case bb(e.file.uri):return e.getSectionSchema?.(t);default:return}}async function mG(e){let t=e.file.source,r=(0,PN.parseJSON)(t),n=(0,NN.toJSONAST)(t);return{parsed:r,ast:n}}function Sb(e,t){return e instanceof Error?e:(0,PN.parseJSON)(e.body.value,void 0,t)}function Tb(e){return e instanceof Error?e:(0,NN.toJSONAST)(e.body.value)}});var Kp=x(xu=>{"use strict";p();Object.defineProperty(xu,"__esModule",{value:!0});xu.getAncestorUris=gG;xu.getAllSnippetDescendantUris=yG;xu.getRenderedSnippetUris=_G;var jN=Ve();async function gG(e,t){let r=[],n=new Set,i=[e];for(;i.length>0;){let s=i.shift();if(n.has(s))continue;n.add(s);let a=await t(s);for(let o of a)o.type==="direct"&&!n.has(o.source.uri)&&(r.push(o.source.uri),i.push(o.source.uri))}return r}async function yG(e,t){let r=[],n=new Set,i=[...e];for(;i.length>0;){let s=i.shift();if(n.has(s))continue;n.add(s),r.push(s);let a=await t(s);for(let o of a)o.type==="direct"&&(0,jN.isSnippet)(o.target.uri)&&!n.has(o.target.uri)&&i.push(o.target.uri)}return r}async function _G(e,t){return(await t(e)).filter(n=>n.type==="direct"&&(0,jN.isSnippet)(n.target.uri)).map(n=>n.target.uri)}});var Ae=x(zt=>{"use strict";p();var vG=zt&&zt.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),kn=zt&&zt.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&vG(t,e,r)};Object.defineProperty(zt,"__esModule",{value:!0});kn(qy(),zt);kn(rx(),zt);kn(cx(),zt);kn(df(),zt);kn(Ry(),zt);kn(jy(),zt);kn(By(),zt);kn(Ox(),zt);kn($p(),zt);kn(Kp(),zt)});var xb=x(Yp=>{"use strict";p();Object.defineProperty(Yp,"__esModule",{value:!0});Yp.AugmentedThemeDocset=void 0;var Eu=Ae(),FN=e=>({name:e}),bG=[["camelcase","camelize"],["handle","handleize"],["t","translate"]],kG=e=>([t,r])=>{let n=e.find(i=>i.name===r);return n?{...n,name:t}:FN(t)},SG=["_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"],TG=["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"],BN=(e,t,r)=>({name:e,...t&&{access:t},...r&&{return_type:r}}),wG=["customer_address","product_variant"],xG=TG.map(e=>BN(e,{global:!1,parents:[],template:[]},[{type:"string",name:""}])),EG=e=>({name:e}),AG=["elsif","ifchanged","when","schema"],wb=class{themeDocset;constructor(t){this.themeDocset=t}isAugmented=!0;filters=(0,Eu.memo)(async()=>{let t=await this.themeDocset.filters();return[...t,...bG.map(kG(t)),...SG.map(FN)]});objects=(0,Eu.memo)(async()=>[...await this.themeDocset.objects(),...wG.map(t=>BN(t)),...xG]);liquidDrops=(0,Eu.memo)(async()=>(await this.themeDocset.objects()).filter(t=>t.access?t.deprecated?!1:!t.access.global||t.access.global&&t.access.parents.length>0:!0));tags=(0,Eu.memo)(async()=>[...await this.themeDocset.tags(),...AG.map(EG)]);systemTranslations=(0,Eu.memo)(async()=>this.themeDocset.systemTranslations())};Yp.AugmentedThemeDocset=wb});var Ab=x(Js=>{"use strict";p();Object.defineProperty(Js,"__esModule",{value:!0});Js.parseDocParamType=OG;Js.parseStringLiterals=VN;Js.parseParamType=$N;Js.normalizeNamedParamType=PG;Js.parseParamTypeSyntax=Eb;function OG(e,t){let r=VN(t);if(r)return r.length===1?r[0]:{kind:"union",types:r};let n=$N(e,t);if(!n)return;let[i,s]=n;return s?{kind:"array",valueType:i}:{kind:"named",name:i}}function VN(e){if(/[\r\n]/.test(e))return;let t=[],r=0;function n(){for(;e[r]===" "||e[r]===" ";)r++}for(;r<e.length;){n();let i=e[r];if(i!=="'"&&i!=='"')return;let s=e.indexOf(i,r+1);if(s===-1)return;if(t.push({kind:"literal",value:e.slice(r+1,s),raw:e.slice(r,s+1)}),r=s+1,n(),r===e.length)return t;if(e[r]!=="|")return;r++}}function $N(e,t){let r=Eb(t);if(!(!r||!e.has(r[0])))return r}function PG(e){let t=e.toLowerCase();return Eb(t)?t:void 0}function Eb(e){let t=e.match(/^([a-z_]+)(\[\])?$/);if(t)return[t[1],!!t[2]]}});var Ni=x(Ze=>{"use strict";p();Object.defineProperty(Ze,"__esModule",{value:!0});Ze.SupportedDocTagTypes=Ze.BasicParamTypes=Ze.parseStringLiterals=Ze.parseParamTypeSyntax=Ze.parseParamType=Ze.parseDocParamType=Ze.normalizeNamedParamType=void 0;Ze.getDefaultValueForType=CG;Ze.inferArgumentType=Ob;Ze.isTypeCompatible=zN;Ze.checkArgumentType=IG;Ze.getArgumentTypeMismatchMessage=RG;Ze.filePathSupportsLiquidDoc=DG;Ze.getValidParamTypes=jG;var Ks=ce(),NG=Ae(),qG=Ve(),LG=Ve(),Qp=Ab(),Au=Ab();Object.defineProperty(Ze,"normalizeNamedParamType",{enumerable:!0,get:function(){return Au.normalizeNamedParamType}});Object.defineProperty(Ze,"parseDocParamType",{enumerable:!0,get:function(){return Au.parseDocParamType}});Object.defineProperty(Ze,"parseParamType",{enumerable:!0,get:function(){return Au.parseParamType}});Object.defineProperty(Ze,"parseParamTypeSyntax",{enumerable:!0,get:function(){return Au.parseParamTypeSyntax}});Object.defineProperty(Ze,"parseStringLiterals",{enumerable:!0,get:function(){return Au.parseStringLiterals}});var Wt;(function(e){e.String="string",e.Number="number",e.Boolean="boolean",e.Object="object"})(Wt||(Ze.BasicParamTypes=Wt={}));var UN;(function(e){e.Param="param",e.Example="example",e.Description="description"})(UN||(Ze.SupportedDocTagTypes=UN={}));function CG(e){let t=e?(0,Qp.parseStringLiterals)(e):void 0;if(t)return t[0].raw;switch(e?.toLowerCase()){case Wt.String:return"''";case Wt.Number:return"0";case Wt.Boolean:return"false";case Wt.Object:default:return""}}function Ob(e){switch(e.type){case Ks.NodeTypes.String:return Wt.String;case Ks.NodeTypes.Number:return Wt.Number;case Ks.NodeTypes.LiquidLiteral:return Wt.Boolean;case Ks.NodeTypes.Range:case Ks.NodeTypes.VariableLookup:return Wt.Object;default:return(0,NG.assertNever)(e)}}function zN(e,t){let r=e.toLowerCase();return r===Wt.Boolean?!0:r===t}function IG(e,t){if(t.type===Ks.NodeTypes.VariableLookup)return{kind:"unchecked"};let r=(0,Qp.parseStringLiterals)(e);if(r)return HN(t.type===Ks.NodeTypes.String&&r.some(i=>i.value===t.value));if(t.type==="BlockArrayLiteral")return{kind:"unchecked"};let n=(0,Qp.normalizeNamedParamType)(e);return n?MG(n)?HN(zN(n,Ob(t))):{kind:"named-type",type:n}:{kind:"unchecked"}}function HN(e){return e?{kind:"compatible"}:{kind:"incompatible"}}function MG(e){return Object.values(Wt).some(t=>t===e)}function RG(e,t,r){if((0,Qp.parseStringLiterals)(t)){let i=r.source.slice(r.position.start,r.position.end);return`Invalid value for argument '${e}': expected ${t.trim()}, got ${i}`}let n=r.type==="BlockArrayLiteral"?"array":Ob(r);return`Type mismatch for argument '${e}': expected ${t.toLowerCase()}, got ${n}`}function DG(e){return(0,qG.isSnippet)(e)||(0,LG.isBlock)(e)}function jG(e){let t=new Map([[Wt.String,void 0],[Wt.Number,void 0],[Wt.Boolean,void 0],[Wt.Object,"A generic type used to represent any liquid object or primitive value."]]);return e.forEach(r=>t.set(r.name,r.summary||r.description)),t}});var Xp=x(Pb=>{"use strict";p();Object.defineProperty(Pb,"__esModule",{value:!0});Pb.schemaSettingLiquidType=FG;function FG(e){switch(e){case"checkbox":return"boolean";case"number":case"range":return"number";case"color_background":case"color_palette":case"html":case"inline_richtext":case"liquid":case"radio":case"richtext":case"select":case"text":case"text_alignment":case"textarea":case"url":case"video_url":return"string";case"article":case"blog":case"collection":case"color":case"color_scheme":case"page":case"product":case"video":return e;case"font_picker":return"font";case"image_picker":return"image";case"link_list":return"linklist";case"collection_list":return"collection[]";case"product_list":return"product[]";default:return}}});var ei=x(Sn=>{"use strict";p();Object.defineProperty(Sn,"__esModule",{value:!0});Sn.BLOCK_CONTENT_PARAMETER=void 0;Sn.makeGetBlockParameters=$G;Sn.resolveBlockParameters=Nb;Sn.liquidDocType=GN;var WN=Ni(),BG=Xp(),VG=Ve();Sn.BLOCK_CONTENT_PARAMETER="content";function $G({getBlockSchema:e,getDocDefinition:t}){if(!e||!t)return async()=>{};let r=new Map,n=async i=>{let[s,a]=await Promise.all([e(i),t(`blocks/${i}.liquid`)]);if(!(!s||!a))return s.validSchema instanceof Error?(0,VG.hasNoSchemaTag)(s)?Nb(void 0,a):void 0:Nb(s.validSchema,a)};return i=>(r.has(i)||r.set(i,n(i)),r.get(i))}function Nb(e,t){let r=new Map([[Sn.BLOCK_CONTENT_PARAMETER,{name:Sn.BLOCK_CONTENT_PARAMETER,type:"string",required:!1}]]);for(let n of e?.settings??[])HG(n)&&r.set(n.id,{name:n.id,type:n.id===Sn.BLOCK_CONTENT_PARAMETER?"string":(0,BG.schemaSettingLiquidType)(n.type),required:!1,schemaSetting:n});for(let n of t?.liquidDoc?.parameters??[])r.set(n.name,UG(r.get(n.name),n));return r}function GN(e){return e?(0,WN.normalizeNamedParamType)(e):void 0}function UG(e,t){return e?{...e,required:t.required,liquidDoc:t}:{name:t.name,type:t.type&&(0,WN.parseStringLiterals)(t.type)?t.type.trim():GN(t.type),required:t.required,liquidDoc:t}}function HG(e){return typeof e.id=="string"&&e.type!=="header"&&e.type!=="paragraph"}});function Ys(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0||typeof e!=typeof t||typeof e!="object"||Array.isArray(e)!==Array.isArray(t))return!1;let r,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(r=0;r<e.length;r++)if(!Ys(e[r],t[r]))return!1}else{let i=[];for(n in e)i.push(n);i.sort();let s=[];for(n in t)s.push(n);if(s.sort(),!Ys(i,s))return!1;for(r=0;r<i.length;r++)if(!Ys(e[i[r]],t[i[r]]))return!1}return!0}function Ct(e){return typeof e=="number"}function mr(e){return typeof e<"u"}function Ir(e){return typeof e=="boolean"}function Zp(e){return typeof e=="string"}function Tn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Ou=we(()=>{p()});function zG(e,t){if(e.length<t.length)return!1;for(let r=0;r<t.length;r++)if(e[r]!==t[r])return!1;return!0}function qi(e,t){let r=e.length-t.length;return r>0?e.lastIndexOf(t)===r:r===0?e===t:!1}function Qs(e){let t="";zG(e,"(?i)")&&(e=e.substring(4),t="i");try{return new RegExp(e,t+"u")}catch{try{return new RegExp(e,t)}catch{return}}}function qb(e){let t=0;for(let r=0;r<e.length;r++){t++;let n=e.charCodeAt(r);55296<=n&&n<=56319&&r++}return t}var Pu=we(()=>{p()});var ed,Lb,KN,td,De,ue,ti,YN,Nu,rd,nd,Li,id,Cb,It,QN,XN,gr,Ci,Gt,Ib,xo,ZN,qu,Mb,Rb,Db,Lu,eq,sd,jb,tq,wn,Xs,Mt,et,ad,rq,nq,iq,Eo,od,Ao,cd,sq,aq,ud,ld,yr,oq,fd,cq,pd,dd,hd,md,gd,uq,lq,yd,Zs,fq,pq,dq,hq,mq,gq,yq,Fb,Bb,_q,vq,bq,kq,Sq,Tq,wq,xq,Eq,Vb,D,$b=we(()=>{"use strict";p();(function(e){function t(r){return typeof r=="string"}e.is=t})(ed||(ed={}));(function(e){function t(r){return typeof r=="string"}e.is=t})(Lb||(Lb={}));(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}e.is=t})(KN||(KN={}));(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}e.is=t})(td||(td={}));(function(e){function t(n,i){return n===Number.MAX_VALUE&&(n=td.MAX_VALUE),i===Number.MAX_VALUE&&(i=td.MAX_VALUE),{line:n,character:i}}e.create=t;function r(n){let i=n;return D.objectLiteral(i)&&D.uinteger(i.line)&&D.uinteger(i.character)}e.is=r})(De||(De={}));(function(e){function t(n,i,s,a){if(D.uinteger(n)&&D.uinteger(i)&&D.uinteger(s)&&D.uinteger(a))return{start:De.create(n,i),end:De.create(s,a)};if(De.is(n)&&De.is(i))return{start:n,end:i};throw new Error(`Range#create called with invalid arguments[${n}, ${i}, ${s}, ${a}]`)}e.create=t;function r(n){let i=n;return D.objectLiteral(i)&&De.is(i.start)&&De.is(i.end)}e.is=r})(ue||(ue={}));(function(e){function t(n,i){return{uri:n,range:i}}e.create=t;function r(n){let i=n;return D.objectLiteral(i)&&ue.is(i.range)&&(D.string(i.uri)||D.undefined(i.uri))}e.is=r})(ti||(ti={}));(function(e){function t(n,i,s,a){return{targetUri:n,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}e.create=t;function r(n){let i=n;return D.objectLiteral(i)&&ue.is(i.targetRange)&&D.string(i.targetUri)&&ue.is(i.targetSelectionRange)&&(ue.is(i.originSelectionRange)||D.undefined(i.originSelectionRange))}e.is=r})(YN||(YN={}));(function(e){function t(n,i,s,a){return{red:n,green:i,blue:s,alpha:a}}e.create=t;function r(n){let i=n;return D.objectLiteral(i)&&D.numberRange(i.red,0,1)&&D.numberRange(i.green,0,1)&&D.numberRange(i.blue,0,1)&&D.numberRange(i.alpha,0,1)}e.is=r})(Nu||(Nu={}));(function(e){function t(n,i){return{range:n,color:i}}e.create=t;function r(n){let i=n;return D.objectLiteral(i)&&ue.is(i.range)&&Nu.is(i.color)}e.is=r})(rd||(rd={}));(function(e){function t(n,i,s){return{label:n,textEdit:i,additionalTextEdits:s}}e.create=t;function r(n){let i=n;return D.objectLiteral(i)&&D.string(i.label)&&(D.undefined(i.textEdit)||Gt.is(i))&&(D.undefined(i.additionalTextEdits)||D.typedArray(i.additionalTextEdits,Gt.is))}e.is=r})(nd||(nd={}));(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Li||(Li={}));(function(e){function t(n,i,s,a,o,c){let l={startLine:n,endLine:i};return D.defined(s)&&(l.startCharacter=s),D.defined(a)&&(l.endCharacter=a),D.defined(o)&&(l.kind=o),D.defined(c)&&(l.collapsedText=c),l}e.create=t;function r(n){let i=n;return D.objectLiteral(i)&&D.uinteger(i.startLine)&&D.uinteger(i.startLine)&&(D.undefined(i.startCharacter)||D.uinteger(i.startCharacter))&&(D.undefined(i.endCharacter)||D.uinteger(i.endCharacter))&&(D.undefined(i.kind)||D.string(i.kind))}e.is=r})(id||(id={}));(function(e){function t(n,i){return{location:n,message:i}}e.create=t;function r(n){let i=n;return D.defined(i)&&ti.is(i.location)&&D.string(i.message)}e.is=r})(Cb||(Cb={}));(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(It||(It={}));(function(e){e.Unnecessary=1,e.Deprecated=2})(QN||(QN={}));(function(e){function t(r){let n=r;return D.objectLiteral(n)&&D.string(n.href)}e.is=t})(XN||(XN={}));(function(e){function t(n,i,s,a,o,c){let l={range:n,message:i};return D.defined(s)&&(l.severity=s),D.defined(a)&&(l.code=a),D.defined(o)&&(l.source=o),D.defined(c)&&(l.relatedInformation=c),l}e.create=t;function r(n){var i;let s=n;return D.defined(s)&&ue.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((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(D.string(s.source)||D.undefined(s.source))&&(D.undefined(s.relatedInformation)||D.typedArray(s.relatedInformation,Cb.is))}e.is=r})(gr||(gr={}));(function(e){function t(n,i,...s){let a={title:n,command:i};return D.defined(s)&&s.length>0&&(a.arguments=s),a}e.create=t;function r(n){let i=n;return D.defined(i)&&D.string(i.title)&&D.string(i.command)}e.is=r})(Ci||(Ci={}));(function(e){function t(s,a){return{range:s,newText:a}}e.replace=t;function r(s,a){return{range:{start:s,end:s},newText:a}}e.insert=r;function n(s){return{range:s,newText:""}}e.del=n;function i(s){let a=s;return D.objectLiteral(a)&&D.string(a.newText)&&ue.is(a.range)}e.is=i})(Gt||(Gt={}));(function(e){function t(n,i,s){let a={label:n};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}e.create=t;function r(n){let i=n;return D.objectLiteral(i)&&D.string(i.label)&&(D.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(D.string(i.description)||i.description===void 0)}e.is=r})(Ib||(Ib={}));(function(e){function t(r){let n=r;return D.string(n)}e.is=t})(xo||(xo={}));(function(e){function t(s,a,o){return{range:s,newText:a,annotationId:o}}e.replace=t;function r(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}e.insert=r;function n(s,a){return{range:s,newText:"",annotationId:a}}e.del=n;function i(s){let a=s;return Gt.is(a)&&(Ib.is(a.annotationId)||xo.is(a.annotationId))}e.is=i})(ZN||(ZN={}));(function(e){function t(n,i){return{textDocument:n,edits:i}}e.create=t;function r(n){let i=n;return D.defined(i)&&jb.is(i.textDocument)&&Array.isArray(i.edits)}e.is=r})(qu||(qu={}));(function(e){function t(n,i,s){let a={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function r(n){let i=n;return i&&i.kind==="create"&&D.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||D.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||D.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||xo.is(i.annotationId))}e.is=r})(Mb||(Mb={}));(function(e){function t(n,i,s,a){let o={kind:"rename",oldUri:n,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}e.create=t;function r(n){let i=n;return i&&i.kind==="rename"&&D.string(i.oldUri)&&D.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||D.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||D.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||xo.is(i.annotationId))}e.is=r})(Rb||(Rb={}));(function(e){function t(n,i,s){let a={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function r(n){let i=n;return i&&i.kind==="delete"&&D.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||D.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||D.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||xo.is(i.annotationId))}e.is=r})(Db||(Db={}));(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(i=>D.string(i.kind)?Mb.is(i)||Rb.is(i)||Db.is(i):qu.is(i)))}e.is=t})(Lu||(Lu={}));(function(e){function t(n){return{uri:n}}e.create=t;function r(n){let i=n;return D.defined(i)&&D.string(i.uri)}e.is=r})(eq||(eq={}));(function(e){function t(n,i){return{uri:n,version:i}}e.create=t;function r(n){let i=n;return D.defined(i)&&D.string(i.uri)&&D.integer(i.version)}e.is=r})(sd||(sd={}));(function(e){function t(n,i){return{uri:n,version:i}}e.create=t;function r(n){let i=n;return D.defined(i)&&D.string(i.uri)&&(i.version===null||D.integer(i.version))}e.is=r})(jb||(jb={}));(function(e){function t(n,i,s,a){return{uri:n,languageId:i,version:s,text:a}}e.create=t;function r(n){let i=n;return D.defined(i)&&D.string(i.uri)&&D.string(i.languageId)&&D.integer(i.version)&&D.string(i.text)}e.is=r})(tq||(tq={}));(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){let n=r;return n===e.PlainText||n===e.Markdown}e.is=t})(wn||(wn={}));(function(e){function t(r){let n=r;return D.objectLiteral(r)&&wn.is(n.kind)&&D.string(n.value)}e.is=t})(Xs||(Xs={}));(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Mt||(Mt={}));(function(e){e.PlainText=1,e.Snippet=2})(et||(et={}));(function(e){e.Deprecated=1})(ad||(ad={}));(function(e){function t(n,i,s){return{newText:n,insert:i,replace:s}}e.create=t;function r(n){let i=n;return i&&D.string(i.newText)&&ue.is(i.insert)&&ue.is(i.replace)}e.is=r})(rq||(rq={}));(function(e){e.asIs=1,e.adjustIndentation=2})(nq||(nq={}));(function(e){function t(r){let n=r;return n&&(D.string(n.detail)||n.detail===void 0)&&(D.string(n.description)||n.description===void 0)}e.is=t})(iq||(iq={}));(function(e){function t(r){return{label:r}}e.create=t})(Eo||(Eo={}));(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}e.create=t})(od||(od={}));(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function r(n){let i=n;return D.string(i)||D.objectLiteral(i)&&D.string(i.language)&&D.string(i.value)}e.is=r})(Ao||(Ao={}));(function(e){function t(r){let n=r;return!!n&&D.objectLiteral(n)&&(Xs.is(n.contents)||Ao.is(n.contents)||D.typedArray(n.contents,Ao.is))&&(r.range===void 0||ue.is(r.range))}e.is=t})(cd||(cd={}));(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}e.create=t})(sq||(sq={}));(function(e){function t(r,n,...i){let s={label:r};return D.defined(n)&&(s.documentation=n),D.defined(i)?s.parameters=i:s.parameters=[],s}e.create=t})(aq||(aq={}));(function(e){e.Text=1,e.Read=2,e.Write=3})(ud||(ud={}));(function(e){function t(r,n){let i={range:r};return D.number(n)&&(i.kind=n),i}e.create=t})(ld||(ld={}));(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(yr||(yr={}));(function(e){e.Deprecated=1})(oq||(oq={}));(function(e){function t(r,n,i,s,a){let o={name:r,kind:n,location:{uri:s,range:i}};return a&&(o.containerName=a),o}e.create=t})(fd||(fd={}));(function(e){function t(r,n,i,s){return s!==void 0?{name:r,kind:n,location:{uri:i,range:s}}:{name:r,kind:n,location:{uri:i}}}e.create=t})(cq||(cq={}));(function(e){function t(n,i,s,a,o,c){let l={name:n,detail:i,kind:s,range:a,selectionRange:o};return c!==void 0&&(l.children=c),l}e.create=t;function r(n){let i=n;return i&&D.string(i.name)&&D.number(i.kind)&&ue.is(i.range)&&ue.is(i.selectionRange)&&(i.detail===void 0||D.string(i.detail))&&(i.deprecated===void 0||D.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=r})(pd||(pd={}));(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(dd||(dd={}));(function(e){e.Invoked=1,e.Automatic=2})(hd||(hd={}));(function(e){function t(n,i,s){let a={diagnostics:n};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}e.create=t;function r(n){let i=n;return D.defined(i)&&D.typedArray(i.diagnostics,gr.is)&&(i.only===void 0||D.typedArray(i.only,D.string))&&(i.triggerKind===void 0||i.triggerKind===hd.Invoked||i.triggerKind===hd.Automatic)}e.is=r})(md||(md={}));(function(e){function t(n,i,s){let a={title:n},o=!0;return typeof i=="string"?(o=!1,a.kind=i):Ci.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}e.create=t;function r(n){let i=n;return i&&D.string(i.title)&&(i.diagnostics===void 0||D.typedArray(i.diagnostics,gr.is))&&(i.kind===void 0||D.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Ci.is(i.command))&&(i.isPreferred===void 0||D.boolean(i.isPreferred))&&(i.edit===void 0||Lu.is(i.edit))}e.is=r})(gd||(gd={}));(function(e){function t(n,i){let s={range:n};return D.defined(i)&&(s.data=i),s}e.create=t;function r(n){let i=n;return D.defined(i)&&ue.is(i.range)&&(D.undefined(i.command)||Ci.is(i.command))}e.is=r})(uq||(uq={}));(function(e){function t(n,i){return{tabSize:n,insertSpaces:i}}e.create=t;function r(n){let i=n;return D.defined(i)&&D.uinteger(i.tabSize)&&D.boolean(i.insertSpaces)}e.is=r})(lq||(lq={}));(function(e){function t(n,i,s){return{range:n,target:i,data:s}}e.create=t;function r(n){let i=n;return D.defined(i)&&ue.is(i.range)&&(D.undefined(i.target)||D.string(i.target))}e.is=r})(yd||(yd={}));(function(e){function t(n,i){return{range:n,parent:i}}e.create=t;function r(n){let i=n;return D.objectLiteral(i)&&ue.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=r})(Zs||(Zs={}));(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(fq||(fq={}));(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(pq||(pq={}));(function(e){function t(r){let n=r;return D.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}e.is=t})(dq||(dq={}));(function(e){function t(n,i){return{range:n,text:i}}e.create=t;function r(n){let i=n;return i!=null&&ue.is(i.range)&&D.string(i.text)}e.is=r})(hq||(hq={}));(function(e){function t(n,i,s){return{range:n,variableName:i,caseSensitiveLookup:s}}e.create=t;function r(n){let i=n;return i!=null&&ue.is(i.range)&&D.boolean(i.caseSensitiveLookup)&&(D.string(i.variableName)||i.variableName===void 0)}e.is=r})(mq||(mq={}));(function(e){function t(n,i){return{range:n,expression:i}}e.create=t;function r(n){let i=n;return i!=null&&ue.is(i.range)&&(D.string(i.expression)||i.expression===void 0)}e.is=r})(gq||(gq={}));(function(e){function t(n,i){return{frameId:n,stoppedLocation:i}}e.create=t;function r(n){let i=n;return D.defined(i)&&ue.is(n.stoppedLocation)}e.is=r})(yq||(yq={}));(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}e.is=t})(Fb||(Fb={}));(function(e){function t(n){return{value:n}}e.create=t;function r(n){let i=n;return D.objectLiteral(i)&&(i.tooltip===void 0||D.string(i.tooltip)||Xs.is(i.tooltip))&&(i.location===void 0||ti.is(i.location))&&(i.command===void 0||Ci.is(i.command))}e.is=r})(Bb||(Bb={}));(function(e){function t(n,i,s){let a={position:n,label:i};return s!==void 0&&(a.kind=s),a}e.create=t;function r(n){let i=n;return D.objectLiteral(i)&&De.is(i.position)&&(D.string(i.label)||D.typedArray(i.label,Bb.is))&&(i.kind===void 0||Fb.is(i.kind))&&i.textEdits===void 0||D.typedArray(i.textEdits,Gt.is)&&(i.tooltip===void 0||D.string(i.tooltip)||Xs.is(i.tooltip))&&(i.paddingLeft===void 0||D.boolean(i.paddingLeft))&&(i.paddingRight===void 0||D.boolean(i.paddingRight))}e.is=r})(_q||(_q={}));(function(e){function t(r){return{kind:"snippet",value:r}}e.createSnippet=t})(vq||(vq={}));(function(e){function t(r,n,i,s){return{insertText:r,filterText:n,range:i,command:s}}e.create=t})(bq||(bq={}));(function(e){function t(r){return{items:r}}e.create=t})(kq||(kq={}));(function(e){e.Invoked=0,e.Automatic=1})(Sq||(Sq={}));(function(e){function t(r,n){return{range:r,text:n}}e.create=t})(Tq||(Tq={}));(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}e.create=t})(wq||(wq={}));(function(e){function t(r){let n=r;return D.objectLiteral(n)&&Lb.is(n.uri)&&D.string(n.name)}e.is=t})(xq||(xq={}));(function(e){function t(s,a,o,c){return new Vb(s,a,o,c)}e.create=t;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))}e.is=r;function n(s,a){let o=s.getText(),c=i(a,(f,m)=>{let d=f.range.start.line-m.range.start.line;return d===0?f.range.start.character-m.range.start.character:d}),l=o.length;for(let f=c.length-1;f>=0;f--){let m=c[f],d=s.offsetAt(m.range.start),g=s.offsetAt(m.range.end);if(g<=l)o=o.substring(0,d)+m.newText+o.substring(g,o.length);else throw new Error("Overlapping edit");l=d}return o}e.applyEdits=n;function i(s,a){if(s.length<=1)return s;let o=s.length/2|0,c=s.slice(0,o),l=s.slice(o);i(c,a),i(l,a);let f=0,m=0,d=0;for(;f<c.length&&m<l.length;)a(c[f],l[m])<=0?s[d++]=c[f++]:s[d++]=l[m++];for(;f<c.length;)s[d++]=c[f++];for(;m<l.length;)s[d++]=l[m++];return s}})(Eq||(Eq={}));Vb=class{constructor(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content}update(t,r){this._content=t.text,this._version=r,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let t=[],r=this._content,n=!0;for(let i=0;i<r.length;i++){n&&(t.push(i),n=!1);let s=r.charAt(i);n=s==="\r"||s===`
64
- `,s==="\r"&&i+1<r.length&&r.charAt(i+1)===`
65
- `&&i++}n&&r.length>0&&t.push(r.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return De.create(0,t);for(;n<i;){let a=Math.floor((n+i)/2);r[a]>t?i=a:n=a+1}let s=n-1;return De.create(s,t-r[s])}offsetAt(t){let r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;let n=r[t.line],i=t.line+1<r.length?r[t.line+1]:this._content.length;return Math.max(Math.min(n+t.character,i),n)}get lineCount(){return this.getLineOffsets().length}};(function(e){let t=Object.prototype.toString;function r(g){return typeof g<"u"}e.defined=r;function n(g){return typeof g>"u"}e.undefined=n;function i(g){return g===!0||g===!1}e.boolean=i;function s(g){return t.call(g)==="[object String]"}e.string=s;function a(g){return t.call(g)==="[object Number]"}e.number=a;function o(g,v,b){return t.call(g)==="[object Number]"&&v<=g&&g<=b}e.numberRange=o;function c(g){return t.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}e.integer=c;function l(g){return t.call(g)==="[object Number]"&&0<=g&&g<=2147483647}e.uinteger=l;function f(g){return t.call(g)==="[object Function]"}e.func=f;function m(g){return g!==null&&typeof g=="object"}e.objectLiteral=m;function d(g,v){return Array.isArray(g)&&g.every(v)}e.typedArray=d})(D||(D={}))});var GG={};Oy(GG,{TextDocument:()=>nr});function Ub(e,t){if(e.length<=1)return e;let r=e.length/2|0,n=e.slice(0,r),i=e.slice(r);Ub(n,t),Ub(i,t);let s=0,a=0,o=0;for(;s<n.length&&a<i.length;)t(n[s],i[a])<=0?e[o++]=n[s++]:e[o++]=i[a++];for(;s<n.length;)e[o++]=n[s++];for(;a<i.length;)e[o++]=i[a++];return e}function Aq(e,t,r=0){let n=t?[r]:[];for(let i=0;i<e.length;i++){let s=e.charCodeAt(i);Oq(s)&&(s===13&&i+1<e.length&&e.charCodeAt(i+1)===10&&i++,n.push(r+i+1))}return n}function Oq(e){return e===13||e===10}function Pq(e){let t=e.start,r=e.end;return t.line>r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function WG(e){let t=Pq(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var _d,nr,Nq=we(()=>{"use strict";p();_d=class e{constructor(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content}update(t,r){for(let n of t)if(e.isIncremental(n)){let i=Pq(n.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+n.text+this._content.substring(a,this._content.length);let o=Math.max(i.start.line,0),c=Math.max(i.end.line,0),l=this._lineOffsets,f=Aq(n.text,!1,s);if(c-o===f.length)for(let d=0,g=f.length;d<g;d++)l[d+o+1]=f[d];else f.length<1e4?l.splice(o+1,c-o,...f):this._lineOffsets=l=l.slice(0,o+1).concat(f,l.slice(c+1));let m=n.text.length-(a-s);if(m!==0)for(let d=o+1+f.length,g=l.length;d<g;d++)l[d]=l[d]+m}else if(e.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=r}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Aq(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return{line:0,character:t};for(;n<i;){let a=Math.floor((n+i)/2);r[a]>t?i=a:n=a+1}let s=n-1;return t=this.ensureBeforeEOL(t,r[s]),{line:s,character:t-r[s]}}offsetAt(t){let r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;let n=r[t.line];if(t.character<=0)return n;let i=t.line+1<r.length?r[t.line+1]:this._content.length,s=Math.min(n+t.character,i);return this.ensureBeforeEOL(s,n)}ensureBeforeEOL(t,r){for(;t>r&&Oq(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(e){function t(i,s,a,o){return new _d(i,s,a,o)}e.create=t;function r(i,s,a){if(i instanceof _d)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=r;function n(i,s){let a=i.getText(),o=Ub(s.map(WG),(f,m)=>{let d=f.range.start.line-m.range.start.line;return d===0?f.range.start.character-m.range.start.character:d}),c=0,l=[];for(let f of o){let m=i.offsetAt(f.range.start);if(m<c)throw new Error("Overlapping edit");m>c&&l.push(a.substring(c,m)),f.newText.length&&l.push(f.newText),c=i.offsetAt(f.range.end)}return l.push(a.substr(c)),l.join("")}e.applyEdits=n})(nr||(nr={}))});function JG(e){return e>=fe.SchemaResolveError}var fe,Yt,Hb,_r=we(()=>{p();$b();Nq();(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.PropertyKeysMustBeDoublequoted=528]="PropertyKeysMustBeDoublequoted",e[e.SchemaUnsupportedFeature=769]="SchemaUnsupportedFeature",e[e.SchemaResolveError=65536]="SchemaResolveError"})(fe||(fe={}));(function(e){e[e.v3=3]="v3",e[e.v4=4]="v4",e[e.v6=6]="v6",e[e.v7=7]="v7",e[e.v2019_09=19]="v2019_09",e[e.v2020_12=20]="v2020_12"})(Yt||(Yt={}));(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[wn.Markdown,wn.PlainText],commitCharactersSupport:!0,labelDetailsSupport:!0}}}}})(Hb||(Hb={}))});var qq,Oo,rve,zb=we(()=>{p();(()=>{"use strict";var e={975:L=>{function C(I){if(typeof I!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(I))}function $(I,F){for(var U,J="",Q=0,Y=-1,he=0,_e=0;_e<=I.length;++_e){if(_e<I.length)U=I.charCodeAt(_e);else{if(U===47)break;U=47}if(U===47){if(!(Y===_e-1||he===1))if(Y!==_e-1&&he===2){if(J.length<2||Q!==2||J.charCodeAt(J.length-1)!==46||J.charCodeAt(J.length-2)!==46){if(J.length>2){var at=J.lastIndexOf("/");if(at!==J.length-1){at===-1?(J="",Q=0):Q=(J=J.slice(0,at)).length-1-J.lastIndexOf("/"),Y=_e,he=0;continue}}else if(J.length===2||J.length===1){J="",Q=0,Y=_e,he=0;continue}}F&&(J.length>0?J+="/..":J="..",Q=2)}else J.length>0?J+="/"+I.slice(Y+1,_e):J=I.slice(Y+1,_e),Q=_e-Y-1;Y=_e,he=0}else U===46&&he!==-1?++he:he=-1}return J}var V={resolve:function(){for(var I,F="",U=!1,J=arguments.length-1;J>=-1&&!U;J--){var Q;J>=0?Q=arguments[J]:(I===void 0&&(I=process.cwd()),Q=I),C(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(I){if(C(I),I.length===0)return".";var F=I.charCodeAt(0)===47,U=I.charCodeAt(I.length-1)===47;return(I=$(I,!F)).length!==0||F||(I="."),I.length>0&&U&&(I+="/"),F?"/"+I:I},isAbsolute:function(I){return C(I),I.length>0&&I.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var I,F=0;F<arguments.length;++F){var U=arguments[F];C(U),U.length>0&&(I===void 0?I=U:I+="/"+U)}return I===void 0?".":V.normalize(I)},relative:function(I,F){if(C(I),C(F),I===F||(I=V.resolve(I))===(F=V.resolve(F)))return"";for(var U=1;U<I.length&&I.charCodeAt(U)===47;++U);for(var J=I.length,Q=J-U,Y=1;Y<F.length&&F.charCodeAt(Y)===47;++Y);for(var he=F.length-Y,_e=Q<he?Q:he,at=-1,Ce=0;Ce<=_e;++Ce){if(Ce===_e){if(he>_e){if(F.charCodeAt(Y+Ce)===47)return F.slice(Y+Ce+1);if(Ce===0)return F.slice(Y+Ce)}else Q>_e&&(I.charCodeAt(U+Ce)===47?at=Ce:Ce===0&&(at=0));break}var dn=I.charCodeAt(U+Ce);if(dn!==F.charCodeAt(Y+Ce))break;dn===47&&(at=Ce)}var os="";for(Ce=U+at+1;Ce<=J;++Ce)Ce!==J&&I.charCodeAt(Ce)!==47||(os.length===0?os+="..":os+="/..");return os.length>0?os+F.slice(Y+at):(Y+=at,F.charCodeAt(Y)===47&&++Y,F.slice(Y))},_makeLong:function(I){return I},dirname:function(I){if(C(I),I.length===0)return".";for(var F=I.charCodeAt(0),U=F===47,J=-1,Q=!0,Y=I.length-1;Y>=1;--Y)if((F=I.charCodeAt(Y))===47){if(!Q){J=Y;break}}else Q=!1;return J===-1?U?"/":".":U&&J===1?"//":I.slice(0,J)},basename:function(I,F){if(F!==void 0&&typeof F!="string")throw new TypeError('"ext" argument must be a string');C(I);var U,J=0,Q=-1,Y=!0;if(F!==void 0&&F.length>0&&F.length<=I.length){if(F.length===I.length&&F===I)return"";var he=F.length-1,_e=-1;for(U=I.length-1;U>=0;--U){var at=I.charCodeAt(U);if(at===47){if(!Y){J=U+1;break}}else _e===-1&&(Y=!1,_e=U+1),he>=0&&(at===F.charCodeAt(he)?--he==-1&&(Q=U):(he=-1,Q=_e))}return J===Q?Q=_e:Q===-1&&(Q=I.length),I.slice(J,Q)}for(U=I.length-1;U>=0;--U)if(I.charCodeAt(U)===47){if(!Y){J=U+1;break}}else Q===-1&&(Y=!1,Q=U+1);return Q===-1?"":I.slice(J,Q)},extname:function(I){C(I);for(var F=-1,U=0,J=-1,Q=!0,Y=0,he=I.length-1;he>=0;--he){var _e=I.charCodeAt(he);if(_e!==47)J===-1&&(Q=!1,J=he+1),_e===46?F===-1?F=he:Y!==1&&(Y=1):F!==-1&&(Y=-1);else if(!Q){U=he+1;break}}return F===-1||J===-1||Y===0||Y===1&&F===J-1&&F===U+1?"":I.slice(F,J)},format:function(I){if(I===null||typeof I!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof I);return(function(F,U){var J=U.dir||U.root,Q=U.base||(U.name||"")+(U.ext||"");return J?J===U.root?J+Q:J+"/"+Q:Q})(0,I)},parse:function(I){C(I);var F={root:"",dir:"",base:"",ext:"",name:""};if(I.length===0)return F;var U,J=I.charCodeAt(0),Q=J===47;Q?(F.root="/",U=1):U=0;for(var Y=-1,he=0,_e=-1,at=!0,Ce=I.length-1,dn=0;Ce>=U;--Ce)if((J=I.charCodeAt(Ce))!==47)_e===-1&&(at=!1,_e=Ce+1),J===46?Y===-1?Y=Ce:dn!==1&&(dn=1):Y!==-1&&(dn=-1);else if(!at){he=Ce+1;break}return Y===-1||_e===-1||dn===0||dn===1&&Y===_e-1&&Y===he+1?_e!==-1&&(F.base=F.name=he===0&&Q?I.slice(1,_e):I.slice(he,_e)):(he===0&&Q?(F.name=I.slice(1,Y),F.base=I.slice(1,_e)):(F.name=I.slice(he,Y),F.base=I.slice(he,_e)),F.ext=I.slice(Y,_e)),he>0?F.dir=I.slice(0,he-1):Q&&(F.dir="/"),F},sep:"/",delimiter:":",win32:null,posix:null};V.posix=V,L.exports=V}},t={};function r(L){var C=t[L];if(C!==void 0)return C.exports;var $=t[L]={exports:{}};return e[L]($,$.exports,r),$.exports}r.d=(L,C)=>{for(var $ in C)r.o(C,$)&&!r.o(L,$)&&Object.defineProperty(L,$,{enumerable:!0,get:C[$]})},r.o=(L,C)=>Object.prototype.hasOwnProperty.call(L,C),r.r=L=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(L,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(L,"__esModule",{value:!0})};var n={};let i;r.r(n),r.d(n,{URI:()=>d,Utils:()=>M}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let s=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function c(L,C){if(!L.scheme&&C)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${L.authority}", path: "${L.path}", query: "${L.query}", fragment: "${L.fragment}"}`);if(L.scheme&&!s.test(L.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(L.path){if(L.authority){if(!a.test(L.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(L.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="/",m=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(C){return C instanceof d||!!C&&typeof C.authority=="string"&&typeof C.fragment=="string"&&typeof C.path=="string"&&typeof C.query=="string"&&typeof C.scheme=="string"&&typeof C.fsPath=="string"&&typeof C.with=="function"&&typeof C.toString=="function"}scheme;authority;path;query;fragment;constructor(C,$,V,I,F,U=!1){typeof C=="object"?(this.scheme=C.scheme||l,this.authority=C.authority||l,this.path=C.path||l,this.query=C.query||l,this.fragment=C.fragment||l):(this.scheme=(function(J,Q){return J||Q?J:"file"})(C,U),this.authority=$||l,this.path=(function(J,Q){switch(J){case"https":case"http":case"file":Q?Q[0]!==f&&(Q=f+Q):Q=f}return Q})(this.scheme,V||l),this.query=I||l,this.fragment=F||l,c(this,U))}get fsPath(){return w(this,!1)}with(C){if(!C)return this;let{scheme:$,authority:V,path:I,query:F,fragment:U}=C;return $===void 0?$=this.scheme:$===null&&($=l),V===void 0?V=this.authority:V===null&&(V=l),I===void 0?I=this.path:I===null&&(I=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&&I===this.path&&F===this.query&&U===this.fragment?this:new v($,V,I,F,U)}static parse(C,$=!1){let V=m.exec(C);return V?new v(V[2]||l,O(V[4]||l),O(V[5]||l),O(V[7]||l),O(V[9]||l),$):new v(l,l,l,l,l)}static file(C){let $=l;if(i&&(C=C.replace(/\\/g,f)),C[0]===f&&C[1]===f){let V=C.indexOf(f,2);V===-1?($=C.substring(2),C=f):($=C.substring(2,V),C=C.substring(V)||f)}return new v("file",$,C,l,l)}static from(C){let $=new v(C.scheme,C.authority,C.path,C.query,C.fragment);return c($,!0),$}toString(C=!1){return T(this,C)}toJSON(){return this}static revive(C){if(C){if(C instanceof d)return C;{let $=new v(C);return $._formatted=C.external,$._fsPath=C._sep===g?C.fsPath:null,$}}return C}}let g=i?1:void 0;class v extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=w(this,!1)),this._fsPath}toString(C=!1){return C?T(this,!0):(this._formatted||(this._formatted=T(this,!1)),this._formatted)}toJSON(){let C={$mid:1};return this._fsPath&&(C.fsPath=this._fsPath,C._sep=g),this._formatted&&(C.external=this._formatted),this.path&&(C.path=this.path),this.scheme&&(C.scheme=this.scheme),this.authority&&(C.authority=this.authority),this.query&&(C.query=this.query),this.fragment&&(C.fragment=this.fragment),C}}let b={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 _(L,C,$){let V,I=-1;for(let F=0;F<L.length;F++){let U=L.charCodeAt(F);if(U>=97&&U<=122||U>=65&&U<=90||U>=48&&U<=57||U===45||U===46||U===95||U===126||C&&U===47||$&&U===91||$&&U===93||$&&U===58)I!==-1&&(V+=encodeURIComponent(L.substring(I,F)),I=-1),V!==void 0&&(V+=L.charAt(F));else{V===void 0&&(V=L.substr(0,F));let J=b[U];J!==void 0?(I!==-1&&(V+=encodeURIComponent(L.substring(I,F)),I=-1),V+=J):I===-1&&(I=F)}}return I!==-1&&(V+=encodeURIComponent(L.substring(I))),V!==void 0?V:L}function k(L){let C;for(let $=0;$<L.length;$++){let V=L.charCodeAt($);V===35||V===63?(C===void 0&&(C=L.substr(0,$)),C+=b[V]):C!==void 0&&(C+=L[$])}return C!==void 0?C:L}function w(L,C){let $;return $=L.authority&&L.path.length>1&&L.scheme==="file"?`//${L.authority}${L.path}`:L.path.charCodeAt(0)===47&&(L.path.charCodeAt(1)>=65&&L.path.charCodeAt(1)<=90||L.path.charCodeAt(1)>=97&&L.path.charCodeAt(1)<=122)&&L.path.charCodeAt(2)===58?C?L.path.substr(1):L.path[1].toLowerCase()+L.path.substr(2):L.path,i&&($=$.replace(/\//g,"\\")),$}function T(L,C){let $=C?k:_,V="",{scheme:I,authority:F,path:U,query:J,fragment:Q}=L;if(I&&(V+=I,V+=":"),(F||I==="file")&&(V+=f,V+=f),F){let Y=F.indexOf("@");if(Y!==-1){let he=F.substr(0,Y);F=F.substr(Y+1),Y=he.lastIndexOf(":"),Y===-1?V+=$(he,!1,!1):(V+=$(he.substr(0,Y),!1,!1),V+=":",V+=$(he.substr(Y+1),!1,!0)),V+="@"}F=F.toLowerCase(),Y=F.lastIndexOf(":"),Y===-1?V+=$(F,!1,!0):(V+=$(F.substr(0,Y),!1,!0),V+=F.substr(Y))}if(U){if(U.length>=3&&U.charCodeAt(0)===47&&U.charCodeAt(2)===58){let Y=U.charCodeAt(1);Y>=65&&Y<=90&&(U=`/${String.fromCharCode(Y+32)}:${U.substr(3)}`)}else if(U.length>=2&&U.charCodeAt(1)===58){let Y=U.charCodeAt(0);Y>=65&&Y<=90&&(U=`${String.fromCharCode(Y+32)}:${U.substr(2)}`)}V+=$(U,!0,!1)}return J&&(V+="?",V+=$(J,!1,!1)),Q&&(V+="#",V+=C?Q:_(Q,!1,!1)),V}function y(L){try{return decodeURIComponent(L)}catch{return L.length>3?L.substr(0,3)+y(L.substr(3)):L}}let A=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function O(L){return L.match(A)?L.replace(A,(C=>y(C))):L}var P=r(975);let q=P.posix||P,B="/";var M;(function(L){L.joinPath=function(C,...$){return C.with({path:q.join(C.path,...$)})},L.resolvePath=function(C,...$){let V=C.path,I=!1;V[0]!==B&&(V=B+V,I=!0);let F=q.resolve(V,...$);return I&&F[0]===B&&!C.authority&&(F=F.substring(1)),C.with({path:F})},L.dirname=function(C){if(C.path.length===0||C.path===B)return C;let $=q.dirname(C.path);return $.length===1&&$.charCodeAt(0)===46&&($=""),C.with({path:$})},L.basename=function(C){return q.basename(C.path)},L.extname=function(C){return q.extname(C.path)}})(M||(M={})),qq=n})();({URI:Oo,Utils:rve}=qq)});var ea=x((sve,Mq)=>{"use strict";p();var Wb=Object.defineProperty,KG=Object.getOwnPropertyDescriptor,YG=Object.getOwnPropertyNames,QG=Object.prototype.hasOwnProperty,XG=(e,t)=>{for(var r in t)Wb(e,r,{get:t[r],enumerable:!0})},ZG=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of YG(t))!QG.call(e,i)&&i!==r&&Wb(e,i,{get:()=>t[i],enumerable:!(n=KG(t,i))||n.enumerable});return e},eJ=e=>ZG(Wb({},"__esModule",{value:!0}),e),Cq={};XG(Cq,{config:()=>sJ,t:()=>Iq});Mq.exports=eJ(Cq);var tJ=oe("fs"),rJ=oe("fs/promises");async function nJ(e){if(e.protocol==="file:")return await(0,rJ.readFile)(e,"utf8");if(e.protocol==="http:"||e.protocol==="https:"){let t=await fetch(e.toString(),{headers:{"Accept-Encoding":"gzip, deflate",Accept:"application/json"},redirect:"follow"});if(!t.ok){let n=`Unexpected ${t.status} response while trying to read ${e}`;try{n+=`: ${await t.text()}`}catch{}throw new Error(n)}return await t.text()}throw new Error("Unsupported protocol")}function iJ(e){return(0,tJ.readFileSync)(e,"utf8")}var Cu;function sJ(e){if("contents"in e){typeof e.contents=="string"?Cu=JSON.parse(e.contents):Cu=e.contents;return}if("fsPath"in e){let t=iJ(e.fsPath),r=JSON.parse(t);Cu=Lq(r)?r.contents.bundle:r;return}if(e.uri){let t=e.uri;return typeof e.uri=="string"&&(t=new URL(e.uri)),new Promise((r,n)=>{nJ(t).then(i=>{try{let s=JSON.parse(i);Cu=Lq(s)?s.contents.bundle:s,r()}catch(s){n(s)}}).catch(i=>{n(i)})})}}function Iq(...e){let t=e[0],r,n,i;if(typeof t=="string")r=t,n=t,e.splice(0,1),i=!e||typeof e[0]!="object"?e:e[0];else if(t instanceof Array){let a=e.slice(1);if(t.length!==a.length+1)throw new Error("expected a string as the first argument to l10n.t");let o=t[0];for(let c=1;c<t.length;c++)o+=`{${c-1}}`+t[c];return Iq(o,...a)}else n=t.message,r=n,t.comment&&t.comment.length>0&&(r+=`/${Array.isArray(t.comment)?t.comment.join(""):t.comment}`),i=t.args??{};let s=Cu?.[r];return s?typeof s=="string"?vd(s,i):s.comment?vd(s.message,i):vd(n,i):vd(n,i)}var aJ=/{([^}]+)}/g;function vd(e,t){return Object.keys(t).length===0?e:e.replace(aJ,(r,n)=>t[n]??r)}function Lq(e){return typeof e?.contents?.bundle=="object"&&typeof e?.version=="string"}});function Rt(e){return Ir(e)?e?{}:{not:{}}:e}function ni(e){e.startsWith(Dq)&&(e=cJ+e.substring(Dq.length));try{return Oo.parse(e).toString(!0)}catch{return e}}function Zb(e){return uJ[ni(e)]??void 0}function Fq(e,t=[],r=[]){return new Sd(e,t,r)}function xn(e){return Zy(e)}function Mu(e){return Xy(e)}function ek(e,t,r=!1){return t>=e.offset&&t<e.offset+e.length||r&&t===e.offset+e.length}function jq(e,t=Yt.v2020_12){let r=e.$schema;return r?Zb(r)??t:t}function xt(e,t,r,n,i){if(!e||!n.include(e))return;if(e.type==="property")return xt(e.valueNode,t,r,n,i);let s=e;switch(a(),s.type){case"object":m(s);break;case"array":f(s);break;case"string":l(s);break;case"number":c(s);break}n.add({node:s,schema:t});function a(){function d(T){return s.type===T||T==="integer"&&s.type==="number"&&s.isInteger}if(Array.isArray(t.type)?t.type.some(d)||r.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||ee.t("Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(d(t.type)||r.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||ee.t('Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(let T of t.allOf){let y=new Et,A=n.newSub();xt(s,Rt(T),y,A,i),r.merge(y),n.merge(A)}let g=Rt(t.not);if(g){let T=new Et,y=n.newSub();xt(s,g,T,y,i),T.hasProblems()||r.problems.push({location:{offset:s.offset,length:s.length},message:t.errorMessage||ee.t("Matches a schema that is not allowed.")});for(let A of y.schemas)A.inverted=!A.inverted,n.add(A)}let v=(T,y)=>{let A=[],O=o(T)??T,P;for(let q of O){let B=Rt(q),M=new Et,L=n.newSub();if(xt(s,B,M,L,i),M.hasProblems()||A.push(B),!P)P={schema:B,validationResult:M,matchingSchemas:L};else if(!y&&!M.hasProblems()&&!P.validationResult.hasProblems())P.matchingSchemas.merge(L),P.validationResult.propertiesMatches+=M.propertiesMatches,P.validationResult.propertiesValueMatches+=M.propertiesValueMatches,P.validationResult.mergeProcessedProperties(M);else{let C=M.compare(P.validationResult);C>0?P={schema:B,validationResult:M,matchingSchemas:L}:C===0&&(P.matchingSchemas.merge(L),P.validationResult.mergeEnumValues(M))}}return A.length>1&&y&&r.problems.push({location:{offset:s.offset,length:1},message:ee.t("Matches multiple schemas when only one must validate.")}),P&&(P.validationResult.updateEnumMismatchProblemMessages(),r.merge(P.validationResult),n.merge(P.matchingSchemas)),A.length};Array.isArray(t.anyOf)&&v(t.anyOf,!1),Array.isArray(t.oneOf)&&v(t.oneOf,!0);let b=T=>{let y=new Et,A=n.newSub();xt(s,Rt(T),y,A,i),r.merge(y),n.merge(A)},_=(T,y,A)=>{let O=Rt(T),P=new Et,q=n.newSub();xt(s,O,P,q,i),n.merge(q),r.mergeProcessedProperties(P),P.hasProblems()?A&&b(A):y&&b(y)},k=Rt(t.if);if(k&&_(k,Rt(t.then),Rt(t.else)),Array.isArray(t.enum)){let T=xn(s),y=!1;for(let A of t.enum)if(Ys(T,A)){y=!0;break}r.enumValues=t.enum,r.enumValueMatch=y,y||r.problems.push({location:{offset:s.offset,length:s.length},code:fe.EnumValueMismatch,message:t.errorMessage||ee.t("Value is not accepted. Valid values: {0}.",t.enum.map(A=>JSON.stringify(A)).join(", "))})}if(mr(t.const)){let T=xn(s);Ys(T,t.const)?r.enumValueMatch=!0:(r.problems.push({location:{offset:s.offset,length:s.length},code:fe.EnumValueMismatch,message:t.errorMessage||ee.t("Value must be {0}.",JSON.stringify(t.const))}),r.enumValueMatch=!1),r.enumValues=[t.const]}let w=t.deprecationMessage;if(w||t.deprecated){w=w||ee.t("Value is deprecated");let T=s.parent?.type==="property"?s.parent:s;r.problems.push({location:{offset:T.offset,length:T.length},severity:It.Warning,message:w,code:fe.Deprecated})}}function o(d){if(d.length<2)return;let g=b=>{let _=new Map;for(let k=0;k<d.length;k++){let w=b(Rt(d[k]),k);if(!w)return;w.forEach(([T,y])=>{if(y.const!==void 0){_.has(T)||_.set(T,new Map);let A=_.get(T);A.has(y.const)||A.set(y.const,[]),A.get(y.const).push(k)}})}return _},v=(b,_)=>{for(let[k,w]of b){let T=new Set;if(w.forEach(y=>y.forEach(A=>T.add(A))),T.size===d.length){let y=_(k),A=w.get(y);if(A?.length)return A.map(O=>d[O]);break}}};if(s.type==="object"&&s.properties?.length){let b=g(_=>_.properties?Object.entries(_.properties).map(([k,w])=>[k,Rt(w)]):void 0);if(b)return v(b,_=>{let k=s.properties.find(w=>w.keyNode.value===_);return k?.valueNode?.type==="string"?k.valueNode.value:void 0})}else if(s.type==="array"&&s.items?.length){let b=g(_=>{let k=_.prefixItems||(Array.isArray(_.items)?_.items:void 0);return k?k.map((w,T)=>[T,Rt(w)]):void 0});if(b)return v(b,_=>{let k=s.items[_];return k?.type==="string"?k.value:void 0})}}function c(d){let g=d.value;function v(A){let O=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(A.toString());return O&&{value:Number(O[1]+(O[2]||"")),multiplier:(O[2]?.length||0)-(parseInt(O[3])||0)}}if(Ct(t.multipleOf)){let A=-1;if(Number.isInteger(t.multipleOf))A=g%t.multipleOf;else{let O=v(t.multipleOf),P=v(g);if(O&&P){let q=10**Math.abs(P.multiplier-O.multiplier);P.multiplier<O.multiplier?P.value*=q:O.value*=q,A=P.value%O.value}}A!==0&&r.problems.push({location:{offset:d.offset,length:d.length},message:ee.t("Value is not divisible by {0}.",t.multipleOf)})}function b(A,O){if(Ct(O))return O;if(Ir(O)&&O)return A}function _(A,O){if(!Ir(O)||!O)return A}let k=b(t.minimum,t.exclusiveMinimum);Ct(k)&&g<=k&&r.problems.push({location:{offset:d.offset,length:d.length},message:ee.t("Value is below the exclusive minimum of {0}.",k)});let w=b(t.maximum,t.exclusiveMaximum);Ct(w)&&g>=w&&r.problems.push({location:{offset:d.offset,length:d.length},message:ee.t("Value is above the exclusive maximum of {0}.",w)});let T=_(t.minimum,t.exclusiveMinimum);Ct(T)&&g<T&&r.problems.push({location:{offset:d.offset,length:d.length},message:ee.t("Value is below the minimum of {0}.",T)});let y=_(t.maximum,t.exclusiveMaximum);Ct(y)&&g>y&&r.problems.push({location:{offset:d.offset,length:d.length},message:ee.t("Value is above the maximum of {0}.",y)})}function l(d){if(Ct(t.minLength)&&qb(d.value)<t.minLength&&r.problems.push({location:{offset:d.offset,length:d.length},message:ee.t("String is shorter than the minimum length of {0}.",t.minLength)}),Ct(t.maxLength)&&qb(d.value)>t.maxLength&&r.problems.push({location:{offset:d.offset,length:d.length},message:ee.t("String is longer than the maximum length of {0}.",t.maxLength)}),Zp(t.pattern)){let g=Qs(t.pattern);g&&!g.test(d.value)&&r.problems.push({location:{offset:d.offset,length:d.length},message:t.patternErrorMessage||t.errorMessage||ee.t('String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":{let v;if(!d.value)v=ee.t("URI expected.");else{let b=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(d.value);b?!b[2]&&t.format==="uri"&&(v=ee.t("URI with a scheme is expected.")):v=ee.t("URI is expected.")}v&&r.problems.push({location:{offset:d.offset,length:d.length},message:t.patternErrorMessage||t.errorMessage||ee.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 g=oJ[t.format];(!d.value||!g.pattern.exec(d.value))&&r.problems.push({location:{offset:d.offset,length:d.length},message:t.patternErrorMessage||t.errorMessage||g.errorMessage});default:}}function f(d){let g,v;i.schemaDraft>=Yt.v2020_12?(g=t.prefixItems,v=Array.isArray(t.items)?void 0:t.items):(g=Array.isArray(t.items)?t.items:void 0,v=Array.isArray(t.items)?t.additionalItems:t.items);let b=0;if(g!==void 0){let w=Math.min(g.length,d.items.length);for(;b<w;b++){let T=g[b],y=Rt(T),A=new Et,O=d.items[b];O&&(xt(O,y,A,n,i),r.mergePropertyMatch(A)),r.processedProperties.add(String(b))}}if(v!==void 0&&b<d.items.length)if(typeof v=="boolean")for(v===!1&&r.problems.push({location:{offset:d.offset,length:d.length},message:ee.t("Array has too many items according to schema. Expected {0} or fewer.",b)});b<d.items.length;b++)r.processedProperties.add(String(b)),r.propertiesValueMatches++;else for(;b<d.items.length;b++){let w=new Et;xt(d.items[b],v,w,n,i),r.mergePropertyMatch(w),r.processedProperties.add(String(b))}let _=Rt(t.contains);if(_){let w=0;for(let T=0;T<d.items.length;T++){let y=d.items[T],A=new Et;xt(y,_,A,Po.instance,i),A.hasProblems()||(w++,i.schemaDraft>=Yt.v2020_12&&r.processedProperties.add(String(T)))}w===0&&!Ct(t.minContains)&&r.problems.push({location:{offset:d.offset,length:d.length},message:t.errorMessage||ee.t("Array does not contain required item.")}),Ct(t.minContains)&&w<t.minContains&&r.problems.push({location:{offset:d.offset,length:d.length},message:t.errorMessage||ee.t("Array has too few items that match the contains contraint. Expected {0} or more.",t.minContains)}),Ct(t.maxContains)&&w>t.maxContains&&r.problems.push({location:{offset:d.offset,length:d.length},message:t.errorMessage||ee.t("Array has too many items that match the contains contraint. Expected {0} or less.",t.maxContains)})}let k=t.unevaluatedItems;if(k!==void 0)for(let w=0;w<d.items.length;w++){if(!r.processedProperties.has(String(w)))if(k===!1)r.problems.push({location:{offset:d.offset,length:d.length},message:ee.t("Item does not match any validation rule from the array.")});else{let T=new Et;xt(d.items[w],t.unevaluatedItems,T,n,i),r.mergePropertyMatch(T)}r.processedProperties.add(String(w)),r.propertiesValueMatches++}if(Ct(t.minItems)&&d.items.length<t.minItems&&r.problems.push({location:{offset:d.offset,length:d.length},message:ee.t("Array has too few items. Expected {0} or more.",t.minItems)}),Ct(t.maxItems)&&d.items.length>t.maxItems&&r.problems.push({location:{offset:d.offset,length:d.length},message:ee.t("Array has too many items. Expected {0} or fewer.",t.maxItems)}),t.uniqueItems===!0){let T=function(){for(let y=0;y<w.length-1;y++){let A=w[y];for(let O=y+1;O<w.length;O++)if(Ys(A,w[O]))return!0}return!1},w=xn(d);T()&&r.problems.push({location:{offset:d.offset,length:d.length},message:ee.t("Array has duplicate items.")})}}function m(d){let g=Object.create(null),v=new Set;for(let y of d.properties){let A=y.keyNode.value;g[A]=y.valueNode,v.add(A)}if(Array.isArray(t.required)){for(let y of t.required)if(!g[y]){let A=d.parent&&d.parent.type==="property"&&d.parent.keyNode,O=A?{offset:A.offset,length:A.length}:{offset:d.offset,length:1};r.problems.push({location:O,message:ee.t('Missing property "{0}".',y)})}}let b=y=>{v.delete(y),r.processedProperties.add(y)};if(t.properties)for(let y of Object.keys(t.properties)){b(y);let A=t.properties[y],O=g[y];if(O)if(Ir(A))if(A)r.propertiesMatches++,r.propertiesValueMatches++;else{let P=O.parent;r.problems.push({location:{offset:P.keyNode.offset,length:P.keyNode.length},message:t.errorMessage||ee.t("Property {0} is not allowed.",y)})}else{let P=new Et;xt(O,A,P,n,i),r.mergePropertyMatch(P)}}if(t.patternProperties)for(let y of Object.keys(t.patternProperties)){let A=Qs(y);if(A){let O=[];for(let P of v)if(A.test(P)){O.push(P);let q=g[P];if(q){let B=t.patternProperties[y];if(Ir(B))if(B)r.propertiesMatches++,r.propertiesValueMatches++;else{let M=q.parent;r.problems.push({location:{offset:M.keyNode.offset,length:M.keyNode.length},message:t.errorMessage||ee.t("Property {0} is not allowed.",P)})}else{let M=new Et;xt(q,B,M,n,i),r.mergePropertyMatch(M)}}}O.forEach(b)}}let _=t.additionalProperties;if(_!==void 0)for(let y of v){b(y);let A=g[y];if(A){if(_===!1){let O=A.parent;r.problems.push({location:{offset:O.keyNode.offset,length:O.keyNode.length},message:t.errorMessage||ee.t("Property {0} is not allowed.",y)})}else if(_!==!0){let O=new Et;xt(A,_,O,n,i),r.mergePropertyMatch(O)}}}let k=t.unevaluatedProperties;if(k!==void 0){let y=[];for(let A of v)if(!r.processedProperties.has(A)){y.push(A);let O=g[A];if(O){if(k===!1){let P=O.parent;r.problems.push({location:{offset:P.keyNode.offset,length:P.keyNode.length},message:t.errorMessage||ee.t("Property {0} is not allowed.",A)})}else if(k!==!0){let P=new Et;xt(O,k,P,n,i),r.mergePropertyMatch(P)}}}y.forEach(b)}if(Ct(t.maxProperties)&&d.properties.length>t.maxProperties&&r.problems.push({location:{offset:d.offset,length:d.length},message:ee.t("Object has more properties than limit of {0}.",t.maxProperties)}),Ct(t.minProperties)&&d.properties.length<t.minProperties&&r.problems.push({location:{offset:d.offset,length:d.length},message:ee.t("Object has fewer properties than the required number of {0}",t.minProperties)}),t.dependentRequired)for(let y in t.dependentRequired){let A=g[y],O=t.dependentRequired[y];A&&Array.isArray(O)&&T(y,O)}if(t.dependentSchemas)for(let y in t.dependentSchemas){let A=g[y],O=t.dependentSchemas[y];A&&Tn(O)&&T(y,O)}if(t.dependencies)for(let y in t.dependencies)g[y]&&T(y,t.dependencies[y]);let w=Rt(t.propertyNames);if(w)for(let y of d.properties){let A=y.keyNode;A&&xt(A,w,r,n,i)}function T(y,A){if(Array.isArray(A))for(let O of A)g[O]?r.propertiesValueMatches++:r.problems.push({location:{offset:d.offset,length:d.length},message:ee.t("Object is missing property {0} required by property {1}.",O,y)});else{let O=Rt(A);if(O){let P=new Et;xt(d,O,P,n,i),r.mergePropertyMatch(P)}}}}}function Bq(e,t){let r=[],n=-1,i=e.getText(),s=lr(i,!1),a=t&&t.collectComments?[]:void 0;function o(){for(;;){let P=s.scan();switch(m(),P){case 12:case 13:Array.isArray(a)&&a.push(ue.create(e.positionAt(s.getTokenOffset()),e.positionAt(s.getTokenOffset()+s.getTokenLength())));break;case 15:case 14:break;default:return P}}}function c(P){return s.getToken()===P?(o(),!0):!1}function l(P,q,B,M,L=It.Error){if(r.length===0||B!==n){let C=ue.create(e.positionAt(B),e.positionAt(M));r.push(gr.create(C,P,L,q,e.languageId)),n=B}}function f(P,q,B=void 0,M=[],L=[]){let C=s.getTokenOffset(),$=s.getTokenOffset()+s.getTokenLength();if(C===$&&C>0){for(C--;C>0&&/\s/.test(i.charAt(C));)C--;$=C+1}if(l(P,q,C,$),B&&d(B,!1),M.length+L.length>0){let V=s.getToken();for(;V!==17;){if(M.indexOf(V)!==-1){o();break}else if(L.indexOf(V)!==-1)break;V=o()}}return B}function m(){switch(s.getTokenError()){case 4:return f(ee.t("Invalid unicode sequence in string."),fe.InvalidUnicode),!0;case 5:return f(ee.t("Invalid escape character in string."),fe.InvalidEscapeCharacter),!0;case 3:return f(ee.t("Unexpected end of number."),fe.UnexpectedEndOfNumber),!0;case 1:return f(ee.t("Unexpected end of comment."),fe.UnexpectedEndOfComment),!0;case 2:return f(ee.t("Unexpected end of string."),fe.UnexpectedEndOfString),!0;case 6:return f(ee.t("Invalid characters in string. Control characters must be escaped."),fe.InvalidCharacter),!0}return!1}function d(P,q){return P.length=s.getTokenOffset()+s.getTokenLength()-P.offset,q&&o(),P}function g(P){if(s.getToken()!==3)return;let q=new Jb(P,s.getTokenOffset());o();let B=0,M=!1;for(;s.getToken()!==4&&s.getToken()!==17;){if(s.getToken()===5){M||f(ee.t("Value expected"),fe.ValueExpected);let C=s.getTokenOffset();if(o(),s.getToken()===4){M&&l(ee.t("Trailing comma"),fe.TrailingComma,C,C+1);continue}}else M&&f(ee.t("Expected comma"),fe.CommaExpected);let L=y(q);L?q.items.push(L):f(ee.t("Value expected"),fe.ValueExpected,void 0,[],[4,5]),M=!0}return s.getToken()!==4?f(ee.t("Expected comma or closing bracket"),fe.CommaOrCloseBacketExpected,q):d(q,!0)}let v=new Iu(void 0,0,0);function b(P,q){let B=new Yb(P,s.getTokenOffset(),v),M=k(B);if(!M)if(s.getToken()===16){f(ee.t("Property keys must be doublequoted"),fe.PropertyKeysMustBeDoublequoted);let C=new Iu(B,s.getTokenOffset(),s.getTokenLength());C.value=s.getTokenValue(),M=C,o()}else return;if(B.keyNode=M,M.value!=="//"){let C=q[M.value];C?(l(ee.t("Duplicate object key"),fe.DuplicateKey,B.keyNode.offset,B.keyNode.offset+B.keyNode.length,It.Warning),Tn(C)&&l(ee.t("Duplicate object key"),fe.DuplicateKey,C.keyNode.offset,C.keyNode.offset+C.keyNode.length,It.Warning),q[M.value]=!0):q[M.value]=B}if(s.getToken()===6)B.colonOffset=s.getTokenOffset(),o();else if(f(ee.t("Colon expected"),fe.ColonExpected),s.getToken()===10&&e.positionAt(M.offset+M.length).line<e.positionAt(s.getTokenOffset()).line)return B.length=M.length,B;let L=y(B);return L?(B.valueNode=L,B.length=L.offset+L.length-B.offset,B):f(ee.t("Value expected"),fe.ValueExpected,B,[],[2,5])}function _(P){if(s.getToken()!==1)return;let q=new Qb(P,s.getTokenOffset()),B=Object.create(null);o();let M=!1;for(;s.getToken()!==2&&s.getToken()!==17;){if(s.getToken()===5){M||f(ee.t("Property expected"),fe.PropertyExpected);let C=s.getTokenOffset();if(o(),s.getToken()===2){M&&l(ee.t("Trailing comma"),fe.TrailingComma,C,C+1);continue}}else M&&f(ee.t("Expected comma"),fe.CommaExpected);let L=b(q,B);L?q.properties.push(L):f(ee.t("Property expected"),fe.PropertyExpected,void 0,[],[2,5]),M=!0}return s.getToken()!==2?f(ee.t("Expected comma or closing brace"),fe.CommaOrCloseBraceExpected,q):d(q,!0)}function k(P){if(s.getToken()!==10)return;let q=new Iu(P,s.getTokenOffset());return q.value=s.getTokenValue(),d(q,!0)}function w(P){if(s.getToken()!==11)return;let q=new Kb(P,s.getTokenOffset());if(s.getTokenError()===0){let B=s.getTokenValue();try{let M=JSON.parse(B);if(!Ct(M))return f(ee.t("Invalid number format."),fe.Undefined,q);q.value=M}catch{return f(ee.t("Invalid number format."),fe.Undefined,q)}q.isInteger=B.indexOf(".")===-1}return d(q,!0)}function T(P){let q;switch(s.getToken()){case 7:return d(new Gb(P,s.getTokenOffset()),!0);case 8:return d(new bd(P,!0,s.getTokenOffset()),!0);case 9:return d(new bd(P,!1,s.getTokenOffset()),!0);default:return}}function y(P){return g(P)||_(P)||k(P)||w(P)||T(P)}let A;return o()!==17&&(A=y(A),A?s.getToken()!==17&&f(ee.t("End of file expected."),fe.Undefined):f(ee.t("Expected a JSON object, array or literal."),fe.Undefined)),new Sd(A,r,a)}var ee,oJ,ri,Gb,bd,Jb,Kb,Iu,Yb,Qb,Rq,Dq,cJ,uJ,kd,Xb,Po,Et,Sd,No=we(()=>{p();mn();Ou();Pu();_r();zb();ee=Ia(ea()),oJ={"color-hex":{errorMessage:ee.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:ee.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:ee.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:ee.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:ee.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:ee.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:ee.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:ee.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}},ri=class{constructor(t,r,n=0){this.offset=r,this.length=n,this.parent=t}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}},Gb=class extends ri{constructor(t,r){super(t,r),this.type="null",this.value=null}},bd=class extends ri{constructor(t,r,n){super(t,n),this.type="boolean",this.value=r}},Jb=class extends ri{constructor(t,r){super(t,r),this.type="array",this.items=[]}get children(){return this.items}},Kb=class extends ri{constructor(t,r){super(t,r),this.type="number",this.isInteger=!0,this.value=Number.NaN}},Iu=class extends ri{constructor(t,r,n){super(t,r,n),this.type="string",this.value=""}},Yb=class extends ri{constructor(t,r,n){super(t,r),this.type="property",this.colonOffset=-1,this.keyNode=n}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},Qb=class extends ri{constructor(t,r){super(t,r),this.type="object",this.properties=[]}get children(){return this.properties}};(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(Rq||(Rq={}));Dq="http://json-schema.org/",cJ="https://json-schema.org/";uJ={"https://json-schema.org/draft-03/schema":Yt.v3,"https://json-schema.org/draft-04/schema":Yt.v4,"https://json-schema.org/draft-06/schema":Yt.v6,"https://json-schema.org/draft-07/schema":Yt.v7,"https://json-schema.org/draft/2019-09/schema":Yt.v2019_09,"https://json-schema.org/draft/2020-12/schema":Yt.v2020_12},kd=class{constructor(t){this.schemaDraft=t}},Xb=class e{constructor(t=-1,r){this.focusOffset=t,this.exclude=r,this.schemas=[]}add(t){this.schemas.push(t)}merge(t){Array.prototype.push.apply(this.schemas,t.schemas)}include(t){return(this.focusOffset===-1||ek(t,this.focusOffset))&&t!==this.exclude}newSub(){return new e(-1,this.exclude)}},Po=class{constructor(){}get schemas(){return[]}add(t){}merge(t){}include(t){return!0}newSub(){return this}};Po.instance=new Po;Et=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(t){this.problems=this.problems.concat(t.problems),this.propertiesMatches+=t.propertiesMatches,this.propertiesValueMatches+=t.propertiesValueMatches,this.mergeProcessedProperties(t)}mergeEnumValues(t){!this.enumValueMatch&&!t.enumValueMatch&&this.enumValues&&t.enumValues&&(this.enumValues=this.enumValues.concat(t.enumValues))}updateEnumMismatchProblemMessages(){if(!this.enumValueMatch&&this.enumValues)for(let t of this.problems)t.code===fe.EnumValueMismatch&&(t.message=ee.t("Value is not accepted. Valid values: {0}.",this.enumValues.map(r=>JSON.stringify(r)).join(", ")))}mergePropertyMatch(t){this.problems=this.problems.concat(t.problems),this.propertiesMatches++,(t.enumValueMatch||!t.hasProblems()&&t.propertiesMatches)&&this.propertiesValueMatches++,t.enumValueMatch&&t.enumValues&&t.enumValues.length===1&&this.primaryValueMatches++}mergeProcessedProperties(t){t.processedProperties.forEach(r=>this.processedProperties.add(r))}compare(t){let r=this.hasProblems();return r!==t.hasProblems()?r?-1:1:this.enumValueMatch!==t.enumValueMatch?t.enumValueMatch?-1:1:this.primaryValueMatches!==t.primaryValueMatches?this.primaryValueMatches-t.primaryValueMatches:this.propertiesValueMatches!==t.propertiesValueMatches?this.propertiesValueMatches-t.propertiesValueMatches:this.propertiesMatches-t.propertiesMatches}};Sd=class{constructor(t,r=[],n=[]){this.root=t,this.syntaxErrors=r,this.comments=n}getNodeFromOffset(t,r=!1){if(this.root)return Qy(this.root,t,r)}visit(t){if(this.root){let r=n=>{let i=t(n),s=n.children;if(Array.isArray(s))for(let a=0;a<s.length&&i;a++)i=r(s[a]);return i};r(this.root)}}validate(t,r,n=It.Warning,i){if(this.root&&r){let s=new Et;return xt(this.root,r,s,Po.instance,new kd(i??jq(r))),s.problems.map(a=>{let o=ue.create(t.positionAt(a.location.offset),t.positionAt(a.location.offset+a.location.length));return gr.create(o,a.message,a.severity??n,a.code)})}}getMatchingSchemas(t,r=-1,n){if(this.root&&t){let i=new Xb(r,n),s=jq(t),a=new kd(s);return xt(this.root,t,new Et,i,a),i.schemas}return[]}}});function Td(e,t,r){if(e!==null&&typeof e=="object"){let n=t+" ";if(Array.isArray(e)){if(e.length===0)return"[]";let i=`[
66
- `;for(let s=0;s<e.length;s++)i+=n+Td(e[s],n,r),s<e.length-1&&(i+=","),i+=`
67
- `;return i+=t+"]",i}else{let i=Object.keys(e);if(i.length===0)return"{}";let s=`{
68
- `;for(let a=0;a<i.length;a++){let o=i[a];s+=n+JSON.stringify(o)+": "+Td(e[o],n,r),a<i.length-1&&(s+=","),s+=`
69
- `}return s+=t+"}",s}}return r(e)}var Vq=we(()=>{p()});var Ru,lJ,fJ,wd,$q=we(()=>{p();No();mn();Vq();Pu();Ou();_r();Ru=Ia(ea()),lJ=[",","}","]"],fJ=[":"],wd=class{constructor(t,r=[],n=Promise,i={}){this.schemaService=t,this.contributions=r,this.promiseConstructor=n,this.clientCapabilities=i}doResolve(t){for(let r=this.contributions.length-1;r>=0;r--){let n=this.contributions[r].resolveCompletion;if(n){let i=n(t);if(i)return i}}return this.promiseConstructor.resolve(t)}doComplete(t,r,n){let i={items:[],isIncomplete:!1},s=t.getText(),a=t.offsetAt(r),o=n.getNodeFromOffset(a,!0);if(this.isInComment(t,o?o.offset:0,a))return Promise.resolve(i);if(o&&a===o.offset+o.length&&a>0){let g=s[a-1];(o.type==="object"&&g==="}"||o.type==="array"&&g==="]")&&(o=o.parent)}let c=this.getCurrentWord(t,a),l;if(o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null"))l=ue.create(t.positionAt(o.offset),t.positionAt(o.offset+o.length));else{let g=a-c.length;g>0&&s[g-1]==='"'&&g--,l=ue.create(t.positionAt(g),r)}let f=!1,m=new Map,d={add:g=>{let v=g.label,b=m.get(v);if(b)b.documentation||(b.documentation=g.documentation),b.detail||(b.detail=g.detail),b.labelDetails||(b.labelDetails=g.labelDetails);else{if(v=v.replace(/[\n]/g,"\u21B5"),v.length>60){let _=v.substr(0,57).trim()+"...";m.has(_)||(v=_)}g.textEdit=Gt.replace(l,g.insertText),f&&(g.commitCharacters=g.kind===Mt.Property?fJ:lJ),g.label=v,m.set(v,g),i.items.push(g)}},setAsIncomplete:()=>{i.isIncomplete=!0},error:g=>{console.error(g)},getNumberOfProposals:()=>i.items.length};return this.schemaService.getSchemaForResource(t.uri,n).then(g=>{let v=[],b=!0,_="",k;if(o&&o.type==="string"){let T=o.parent;T&&T.type==="property"&&T.keyNode===o&&(b=!T.valueNode,k=T,_=s.substr(o.offset+1,o.length-2),T&&(o=T.parent))}if(o&&o.type==="object"){if(o.offset===a)return i;o.properties.forEach(O=>{(!k||k!==O)&&m.set(O.keyNode.value,Eo.create("__"))});let y="";b&&(y=this.evaluateSeparatorAfter(t,t.offsetAt(l.end))),g?this.getPropertyCompletions(g,n,o,b,y,d):this.getSchemaLessPropertyCompletions(n,o,_,d);let A=Mu(o);this.contributions.forEach(O=>{let P=O.collectPropertyCompletions(t.uri,A,c,b,y==="",d);P&&v.push(P)}),!g&&c.length>0&&s.charAt(a-c.length-1)!=='"'&&(d.add({kind:Mt.Property,label:this.getLabelForValue(c),insertText:this.getInsertTextForProperty(c,void 0,!1,y),insertTextFormat:et.Snippet,documentation:""}),d.setAsIncomplete())}let w={};return g?this.getValueCompletions(g,n,o,a,t,d,w):this.getSchemaLessValueCompletions(n,o,a,t,d),this.contributions.length>0&&this.getContributedValueCompletions(n,o,a,t,d,v),this.promiseConstructor.all(v).then(()=>{if(d.getNumberOfProposals()===0){let T=a;o&&(o.type==="string"||o.type==="number"||o.type==="boolean"||o.type==="null")&&(T=o.offset+o.length);let y=this.evaluateSeparatorAfter(t,T);this.addFillerValueCompletions(w,y,d)}return i})})}getPropertyCompletions(t,r,n,i,s,a){r.getMatchingSchemas(t.schema,n.offset).forEach(c=>{if(c.node===n&&!c.inverted){let l=c.schema.properties;l&&Object.keys(l).forEach(m=>{let d=l[m];if(typeof d=="object"&&!d.deprecationMessage&&!d.doNotSuggest){let g={kind:Mt.Property,label:m,insertText:this.getInsertTextForProperty(m,d,i,s),insertTextFormat:et.Snippet,filterText:this.getFilterTextForValue(m),documentation:this.fromMarkup(d.markdownDescription)||d.description||""};d.completionDetail!==void 0&&(g.detail=d.completionDetail),d.suggestSortText!==void 0&&(g.sortText=d.suggestSortText),g.insertText&&qi(g.insertText,`$1${s}`)&&(g.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(g)}});let f=c.schema.propertyNames;if(typeof f=="object"&&!f.deprecationMessage&&!f.doNotSuggest){let m=(d,g,v,b)=>{let _={kind:Mt.Property,label:d,insertText:this.getInsertTextForProperty(d,void 0,i,s),insertTextFormat:et.Snippet,filterText:this.getFilterTextForValue(d),documentation:g||this.fromMarkup(f.markdownDescription)||f.description||"",sortText:b,detail:v};_.insertText&&qi(_.insertText,`$1${s}`)&&(_.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(_)};if(f.enum)for(let d=0;d<f.enum.length;d++){let g;f.markdownEnumDescriptions&&d<f.markdownEnumDescriptions.length?g=this.fromMarkup(f.markdownEnumDescriptions[d]):f.enumDescriptions&&d<f.enumDescriptions.length&&(g=f.enumDescriptions[d]);let v=f.enumSortTexts?.[d],b=f.enumDetails?.[d];m(f.enum[d],g,b,v)}if(f.examples)for(let d=0;d<f.examples.length;d++)m(f.examples[d],void 0,void 0,void 0);f.const&&m(f.const,void 0,f.completionDetail,f.suggestSortText)}}})}getSchemaLessPropertyCompletions(t,r,n,i){let s=a=>{a.properties.forEach(o=>{let c=o.keyNode.value;i.add({kind:Mt.Property,label:c,insertText:this.getInsertTextForValue(c,""),insertTextFormat:et.Snippet,filterText:this.getFilterTextForValue(c),documentation:""})})};if(r.parent)if(r.parent.type==="property"){let a=r.parent.keyNode.value;t.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"&&i.add({kind:Mt.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:et.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})}getSchemaLessValueCompletions(t,r,n,i,s){let a=n;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:et.Snippet,documentation:""}),s.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:et.Snippet,documentation:""});return}let o=this.evaluateSeparatorAfter(i,a),c=l=>{l.parent&&!ek(l.parent,n,!0)&&s.add({kind:this.getSuggestionKind(l.type),label:this.getLabelTextForMatchingNode(l,i),insertText:this.getInsertTextForMatchingNode(l,i,o),insertTextFormat:et.Snippet,documentation:""}),l.type==="boolean"&&this.addBooleanValueCompletion(!l.value,o,s)};if(r.type==="property"&&n>(r.colonOffset||0)){let l=r.valueNode;if(l&&(n>l.offset+l.length||l.type==="object"||l.type==="array"))return;let f=r.keyNode.value;t.visit(m=>(m.type==="property"&&m.keyNode.value===f&&m.valueNode&&c(m.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;t.visit(f=>(f.type==="property"&&f.keyNode.value===l&&f.valueNode&&f.valueNode.type==="array"&&f.valueNode.items.forEach(c),!0))}else r.items.forEach(c)}getValueCompletions(t,r,n,i,s,a,o){let c=i,l,f;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(c=n.offset+n.length,f=n,n=n.parent),!n){this.addSchemaValueCompletions(t.schema,"",a,o);return}if(n.type==="property"&&i>(n.colonOffset||0)){let m=n.valueNode;if(m&&i>m.offset+m.length)return;l=n.keyNode.value,n=n.parent}if(n&&(l!==void 0||n.type==="array")){let m=this.evaluateSeparatorAfter(s,c),d=r.getMatchingSchemas(t.schema,n.offset,f);for(let g of d)if(g.node===n&&!g.inverted&&g.schema){if(n.type==="array"&&g.schema.items){let v=a;if(g.schema.uniqueItems){let b=new Set;n.children.forEach(_=>{_.type!=="array"&&_.type!=="object"&&b.add(this.getLabelForValue(xn(_)))}),v={...a,add(_){b.has(_.label)||a.add(_)}}}if(Array.isArray(g.schema.items)){let b=this.findItemAtOffset(n,s,i);b<g.schema.items.length&&this.addSchemaValueCompletions(g.schema.items[b],m,v,o)}else this.addSchemaValueCompletions(g.schema.items,m,v,o)}if(l!==void 0){let v=!1;if(g.schema.properties){let b=g.schema.properties[l];b&&(v=!0,this.addSchemaValueCompletions(b,m,a,o))}if(g.schema.patternProperties&&!v){for(let b of Object.keys(g.schema.patternProperties))if(Qs(b)?.test(l)){v=!0;let k=g.schema.patternProperties[b];this.addSchemaValueCompletions(k,m,a,o)}}if(g.schema.additionalProperties&&!v){let b=g.schema.additionalProperties;this.addSchemaValueCompletions(b,m,a,o)}}}l==="$schema"&&!n.parent&&this.addDollarSchemaCompletions(m,a),o.boolean&&(this.addBooleanValueCompletion(!0,m,a),this.addBooleanValueCompletion(!1,m,a)),o.null&&this.addNullValueCompletion(m,a)}}getContributedValueCompletions(t,r,n,i,s,a){if(!r)this.contributions.forEach(o=>{let c=o.collectDefaultCompletions(i.uri,s);c&&a.push(c)});else if((r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(r=r.parent),r&&r.type==="property"&&n>(r.colonOffset||0)){let o=r.keyNode.value,c=r.valueNode;if((!c||n<=c.offset+c.length)&&r.parent){let l=Mu(r.parent);this.contributions.forEach(f=>{let m=f.collectValueCompletions(i.uri,l,o,s);m&&a.push(m)})}}}addSchemaValueCompletions(t,r,n,i){typeof t=="object"&&(this.addEnumValueCompletions(t,r,n),this.addDefaultValueCompletions(t,r,n),this.collectTypes(t,i),Array.isArray(t.allOf)&&t.allOf.forEach(s=>this.addSchemaValueCompletions(s,r,n,i)),Array.isArray(t.anyOf)&&t.anyOf.forEach(s=>this.addSchemaValueCompletions(s,r,n,i)),Array.isArray(t.oneOf)&&t.oneOf.forEach(s=>this.addSchemaValueCompletions(s,r,n,i)))}addDefaultValueCompletions(t,r,n,i=0){let s=!1;if(mr(t.default)){let a=t.type,o=t.default;for(let l=i;l>0;l--)o=[o],a="array";let c={kind:this.getSuggestionKind(a),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,r),insertTextFormat:et.Snippet};this.doesSupportsLabelDetails()?c.labelDetails={description:Ru.t("Default value")}:c.detail=Ru.t("Default value"),n.add(c),s=!0}Array.isArray(t.examples)&&t.examples.forEach(a=>{let o=t.type,c=a;for(let l=i;l>0;l--)c=[c],o="array";n.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(c),insertText:this.getInsertTextForValue(c,r),insertTextFormat:et.Snippet}),s=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(a=>{let o=t.type,c=a.body,l=a.label,f,m;if(mr(c)){let d=t.type;for(let g=i;g>0;g--)c=[c],d="array";f=this.getInsertTextForSnippetValue(c,r),m=this.getFilterTextForSnippetValue(c),l=l||this.getLabelForSnippetValue(c)}else if(typeof a.bodyText=="string"){let d="",g="",v="";for(let b=i;b>0;b--)d=d+v+`[
70
- `,g=g+`
71
- `+v+"]",v+=" ",o="array";f=d+v+a.bodyText.split(`
72
- `).join(`
73
- `+v)+g+r,l=l||f,m=f.replace(/[\n]/g,"")}else return;n.add({kind:this.getSuggestionKind(o),label:l,documentation:this.fromMarkup(a.markdownDescription)||a.description,insertText:f,insertTextFormat:et.Snippet,filterText:m}),s=!0}),!s&&typeof t.items=="object"&&!Array.isArray(t.items)&&i<5&&this.addDefaultValueCompletions(t.items,r,n,i+1)}addEnumValueCompletions(t,r,n){if(mr(t.const)&&n.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,r),insertTextFormat:et.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(let i=0,s=t.enum.length;i<s;i++){let a=t.enum[i],o=this.fromMarkup(t.markdownDescription)||t.description;t.markdownEnumDescriptions&&i<t.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?o=this.fromMarkup(t.markdownEnumDescriptions[i]):t.enumDescriptions&&i<t.enumDescriptions.length&&(o=t.enumDescriptions[i]),n.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,r),insertTextFormat:et.Snippet,sortText:t.enumSortTexts?.[i],detail:t.enumDetails?.[i],documentation:o})}}collectTypes(t,r){if(Array.isArray(t.enum)||mr(t.const))return;let n=t.type;Array.isArray(n)?n.forEach(i=>r[i]=!0):n&&(r[n]=!0)}addFillerValueCompletions(t,r,n){t.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},r),insertTextFormat:et.Snippet,detail:Ru.t("New object"),documentation:""}),t.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],r),insertTextFormat:et.Snippet,detail:Ru.t("New array"),documentation:""})}addBooleanValueCompletion(t,r,n){n.add({kind:this.getSuggestionKind("boolean"),label:t?"true":"false",insertText:this.getInsertTextForValue(t,r),insertTextFormat:et.Snippet,documentation:""})}addNullValueCompletion(t,r){r.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+t,insertTextFormat:et.Snippet,documentation:""})}addDollarSchemaCompletions(t,r){this.schemaService.getRegisteredSchemaIds(i=>i==="http"||i==="https").forEach(i=>{i.startsWith("https://json-schema.org/draft-")&&(i=i+"#"),r.add({kind:Mt.Module,label:this.getLabelForValue(i),filterText:this.getFilterTextForValue(i),insertText:this.getInsertTextForValue(i,t),insertTextFormat:et.Snippet,documentation:""})})}getLabelForValue(t){return JSON.stringify(t)}getValueFromLabel(t){return JSON.parse(t)}getFilterTextForValue(t){return JSON.stringify(t)}getFilterTextForSnippetValue(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getLabelForSnippetValue(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")}getInsertTextForPlainText(t){return t.replace(/[\\\$\}]/g,"\\$&")}getInsertTextForValue(t,r){let n=JSON.stringify(t,null," ");return n==="{}"?"{$1}"+r:n==="[]"?"[$1]"+r:this.getInsertTextForPlainText(n+r)}getInsertTextForSnippetValue(t,r){return Td(t,"",i=>typeof i=="string"&&i[0]==="^"?i.substr(1):JSON.stringify(i))+r}getInsertTextForGuessedValue(t,r){switch(typeof t){case"object":return t===null?"${1:null}"+r:this.getInsertTextForValue(t,r);case"string":let n=JSON.stringify(t);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+r;case"number":case"boolean":return"${1:"+JSON.stringify(t)+"}"+r}return this.getInsertTextForValue(t,r)}getSuggestionKind(t){if(Array.isArray(t)){let r=t;t=r.length>0?r[0]:void 0}if(!t)return Mt.Value;switch(t){case"string":return Mt.Value;case"object":return Mt.Module;case"property":return Mt.Property;default:return Mt.Value}}getLabelTextForMatchingNode(t,r){switch(t.type){case"array":return"[]";case"object":return"{}";default:return r.getText().substr(t.offset,t.length)}}getInsertTextForMatchingNode(t,r,n){switch(t.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:let i=r.getText().substr(t.offset,t.length)+n;return this.getInsertTextForPlainText(i)}}getInsertTextForProperty(t,r,n,i){let s=this.getInsertTextForValue(t,"");if(!n)return s;let a=s+": ",o,c=0;if(r){if(Array.isArray(r.defaultSnippets)){if(r.defaultSnippets.length===1){let l=r.defaultSnippets[0].body;mr(l)&&(o=this.getInsertTextForSnippetValue(l,""))}c+=r.defaultSnippets.length}if(r.enum&&(!o&&r.enum.length===1&&(o=this.getInsertTextForGuessedValue(r.enum[0],"")),c+=r.enum.length),mr(r.const)&&(o||(o=this.getInsertTextForGuessedValue(r.const,"")),c++),mr(r.default)&&(o||(o=this.getInsertTextForGuessedValue(r.default,"")),c++),Array.isArray(r.examples)&&r.examples.length&&(o||(o=this.getInsertTextForGuessedValue(r.examples[0],"")),c+=r.examples.length),c===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||c>1)&&(o="$1"),a+o+i}getCurrentWord(t,r){let n=r-1,i=t.getText();for(;n>=0&&`
74
- \r\v":{[,]}`.indexOf(i.charAt(n))===-1;)n--;return i.substring(n+1,r)}evaluateSeparatorAfter(t,r){let n=lr(t.getText(),!0);switch(n.setPosition(r),n.scan()){case 5:case 2:case 4:case 17:return"";default:return","}}findItemAtOffset(t,r,n){let i=lr(r.getText(),!0),s=t.items;for(let a=s.length-1;a>=0;a--){let o=s[a];if(n>o.offset+o.length)return i.setPosition(o.offset+o.length),i.scan()===5&&n>=i.getTokenOffset()+i.getTokenLength()?a+1:a;if(n>=o.offset)return a}return 0}isInComment(t,r,n){let i=lr(t.getText(),!1);i.setPosition(r);let s=i.scan();for(;s!==17&&i.getTokenOffset()+i.getTokenLength()<n;)s=i.scan();return(s===12||s===13)&&i.getTokenOffset()<=n}fromMarkup(t){if(t&&this.doesSupportMarkdown())return{kind:wn.Markdown,value:t}}doesSupportMarkdown(){if(!mr(this.supportsMarkdown)){let t=this.clientCapabilities.textDocument?.completion?.completionItem?.documentationFormat;this.supportsMarkdown=Array.isArray(t)&&t.indexOf(wn.Markdown)!==-1}return this.supportsMarkdown}doesSupportsCommitCharacters(){return mr(this.supportsCommitCharacters)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.commitCharactersSupport),this.supportsCommitCharacters}doesSupportsLabelDetails(){return mr(this.labelDetailsSupport)||(this.labelDetailsSupport=this.clientCapabilities.textDocument?.completion?.completionItem?.labelDetailsSupport),this.labelDetailsSupport}}});function rk(e){if(e)return e.trim().replace(/[\\`*_{}[\]()<>#+\-.!]/g,"\\$&").replace(/(^ +)/mg,(t,r)=>"&nbsp;".repeat(r.length)).replace(/( {2,})/g,(t,r)=>" "+"&nbsp;".repeat(r.length-1)).replace(/(\t+)/g,(t,r)=>"&nbsp;".repeat(r.length*4)).replace(/\n/g,`\\
75
- `)}function pJ(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var xd,Uq=we(()=>{p();No();_r();xd=class{constructor(t,r=[],n){this.schemaService=t,this.contributions=r,this.promise=n||Promise}doHover(t,r,n){let i=t.offsetAt(r),s=n.getNodeFromOffset(i);if(!s||(s.type==="object"||s.type==="array")&&i>s.offset+1&&i<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=ue.create(t.positionAt(a.offset),t.positionAt(a.offset+a.length)),c=f=>({contents:f,range:o}),l=Mu(s);for(let f=this.contributions.length-1;f>=0;f--){let d=this.contributions[f].getInfoContribution(t.uri,l);if(d)return d.then(g=>c(g))}return this.schemaService.getSchemaForResource(t.uri,n).then(f=>{if(!f)return null;let m,d,g,v,b=n.getMatchingSchemas(f.schema,s.offset).filter(k=>k.node===s&&!k.inverted).map(k=>k.schema);for(let k of b)if(m=m||k.title,d=d||k.markdownDescription||rk(k.description),k.enum){let w=k.enum.indexOf(xn(s));k.markdownEnumDescriptions?g=k.markdownEnumDescriptions[w]:k.enumDescriptions&&(g=rk(k.enumDescriptions[w])),g&&(v=k.enum[w],typeof v!="string"&&(v=JSON.stringify(v)))}let _="";return m&&(_=rk(m)),d&&(_.length>0&&(_+=`
76
-
77
- `),_+=d),g&&(_.length>0&&(_+=`
78
-
79
- `),_+=`\`${pJ(v)}\`: ${g}`),c([_])})}}});function zq(e){if(e&&typeof e=="object"){if(Ir(e.allowComments))return e.allowComments;if(e.allOf)for(let t of e.allOf){let r=zq(t);if(Ir(r))return r}}}function Wq(e){if(e&&typeof e=="object"){if(Ir(e.allowTrailingCommas))return e.allowTrailingCommas;let t=e;if(Ir(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(let r of e.allOf){let n=Wq(r);if(Ir(n))return n}}}function Ed(e){switch(e){case"error":return It.Error;case"warning":return It.Warning;case"ignore":return}}var Hq,Ad,dJ,Gq=we(()=>{p();_r();Hq=Ia(ea());Ou();Ad=class{constructor(t,r){this.jsonSchemaService=t,this.promise=r,this.validationEnabled=!0}configure(t){t&&(this.validationEnabled=t.validate!==!1,this.commentSeverity=t.allowComments?void 0:It.Error)}doValidation(t,r,n,i){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))},c=l=>{let f=n?.trailingCommas?Ed(n.trailingCommas):It.Error,m=n?.comments?Ed(n.comments):this.commentSeverity,d=n?.schemaValidation?Ed(n.schemaValidation):It.Warning,g=n?.schemaRequest?Ed(n.schemaRequest):It.Warning;if(l){let v=(b,_,k)=>{if(r.root&&g){let w=r.root,T=w.type==="object"?w.properties[0]:void 0;if(T&&T.keyNode.value==="$schema"){let y=T.valueNode||T,A=ue.create(t.positionAt(y.offset),t.positionAt(y.offset+y.length));o(gr.create(A,b,g,_,"json",k))}else{let y=ue.create(t.positionAt(w.offset),t.positionAt(w.offset+1));o(gr.create(y,b,g,_,"json",k))}}};if(l.errors.length){let b=l.errors[0];v(b.message,b.code,b.relatedInformation)}else if(d){for(let _ of l.warnings)v(_.message,_.code,_.relatedInformation);let b=r.validate(t,l.schema,d,n?.schemaDraft);b&&b.forEach(o)}zq(l.schema)&&(m=void 0),Wq(l.schema)&&(f=void 0)}for(let v of r.syntaxErrors){if(v.code===fe.TrailingComma){if(typeof f!="number")continue;v.severity=f}o(v)}if(typeof m=="number"){let v=Hq.t("Comments are not permitted in JSON.");r.comments.forEach(b=>{o(gr.create(b,v,m,fe.CommentNotPermitted))})}return s};if(i){let l=i.id||"schemaservice://untitled/"+dJ++;return this.jsonSchemaService.registerExternalSchema({uri:l,schema:i}).getResolvedSchema().then(m=>c(m))}return this.jsonSchemaService.getSchemaForResource(t.uri,r).then(l=>c(l))}getLanguageStatus(t,r){return{schemas:this.jsonSchemaService.getSchemaURIsForResource(t.uri,r)}}},dJ=0});function lt(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function Jq(e){if(e[0]==="#")switch(e.length){case 4:return{red:lt(e.charCodeAt(1))*17/255,green:lt(e.charCodeAt(2))*17/255,blue:lt(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:lt(e.charCodeAt(1))*17/255,green:lt(e.charCodeAt(2))*17/255,blue:lt(e.charCodeAt(3))*17/255,alpha:lt(e.charCodeAt(4))*17/255};case 7:return{red:(lt(e.charCodeAt(1))*16+lt(e.charCodeAt(2)))/255,green:(lt(e.charCodeAt(3))*16+lt(e.charCodeAt(4)))/255,blue:(lt(e.charCodeAt(5))*16+lt(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(lt(e.charCodeAt(1))*16+lt(e.charCodeAt(2)))/255,green:(lt(e.charCodeAt(3))*16+lt(e.charCodeAt(4)))/255,blue:(lt(e.charCodeAt(5))*16+lt(e.charCodeAt(6)))/255,alpha:(lt(e.charCodeAt(7))*16+lt(e.charCodeAt(8)))/255}}}var Kq=we(()=>{p()});function Ii(e,t){return ue.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function Yq(e){return xn(e)||Qq.t("<empty>")}var Qq,Od,Xq=we(()=>{p();No();Pu();Kq();Qq=Ia(ea());_r();Od=class{constructor(t){this.schemaService=t}findDocumentSymbols(t,r,n={resultLimit:Number.MAX_VALUE}){let i=r.root;if(!i)return[];let s=n.resultLimit||Number.MAX_VALUE,a=t.uri;if((a==="vscode://defaultsettings/keybindings.json"||qi(a.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){let d=[];for(let g of i.items)if(g.type==="object"){for(let v of g.properties)if(v.keyNode.value==="key"&&v.valueNode){let b=ti.create(t.uri,Ii(t,g));if(d.push({name:Yq(v.valueNode),kind:yr.Function,location:b}),s--,s<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),d}}return d}let o=[{node:i,containerName:""}],c=0,l=!1,f=[],m=(d,g)=>{d.type==="array"?d.items.forEach(v=>{v&&o.push({node:v,containerName:g})}):d.type==="object"&&d.properties.forEach(v=>{let b=v.valueNode;if(b)if(s>0){s--;let _=ti.create(t.uri,Ii(t,v)),k=g?g+"."+v.keyNode.value:v.keyNode.value;f.push({name:this.getKeyLabel(v),kind:this.getSymbolKind(b.type),location:_,containerName:g}),o.push({node:b,containerName:k})}else l=!0})};for(;c<o.length;){let d=o[c++];m(d.node,d.containerName)}return l&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),f}findDocumentSymbols2(t,r,n={resultLimit:Number.MAX_VALUE}){let i=r.root;if(!i)return[];let s=n.resultLimit||Number.MAX_VALUE,a=t.uri;if((a==="vscode://defaultsettings/keybindings.json"||qi(a.toLowerCase(),"/user/keybindings.json"))&&i.type==="array"){let d=[];for(let g of i.items)if(g.type==="object"){for(let v of g.properties)if(v.keyNode.value==="key"&&v.valueNode){let b=Ii(t,g),_=Ii(t,v.keyNode);if(d.push({name:Yq(v.valueNode),kind:yr.Function,range:b,selectionRange:_}),s--,s<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),d}}return d}let o=[],c=[{node:i,result:o}],l=0,f=!1,m=(d,g)=>{d.type==="array"?d.items.forEach((v,b)=>{if(v)if(s>0){s--;let _=Ii(t,v),k=_,T={name:String(b),kind:this.getSymbolKind(v.type),range:_,selectionRange:k,children:[]};g.push(T),c.push({result:T.children,node:v})}else f=!0}):d.type==="object"&&d.properties.forEach(v=>{let b=v.valueNode;if(b)if(s>0){s--;let _=Ii(t,v),k=Ii(t,v.keyNode),w=[],T={name:this.getKeyLabel(v),kind:this.getSymbolKind(b.type),range:_,selectionRange:k,children:w,detail:this.getDetail(b)};g.push(T),c.push({result:w,node:b})}else f=!0})};for(;l<c.length;){let d=c[l++];m(d.node,d.result)}return f&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),o}getSymbolKind(t){switch(t){case"object":return yr.Module;case"string":return yr.String;case"number":return yr.Number;case"array":return yr.Array;case"boolean":return yr.Boolean;default:return yr.Variable}}getKeyLabel(t){let r=t.keyNode.value;return r&&(r=r.replace(/[\n]/g,"\u21B5")),r&&r.trim()?r:`"${r}"`}getDetail(t){if(t){if(t.type==="boolean"||t.type==="number"||t.type==="null"||t.type==="string")return String(t.value);if(t.type==="array")return t.children.length?void 0:"[]";if(t.type==="object")return t.children.length?void 0:"{}"}}findDocumentColors(t,r,n){return this.schemaService.getSchemaForResource(t.uri,r).then(i=>{let s=[];if(i){let a=n&&typeof n.resultLimit=="number"?n.resultLimit:Number.MAX_VALUE,o=r.getMatchingSchemas(i.schema),c={};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(!c[f]){let m=Jq(xn(l.node));if(m){let d=Ii(t,l.node);s.push({color:m,range:d})}if(c[f]=!0,a--,a<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(t.uri),s}}}return s})}getColorPresentations(t,r,n,i){let s=[],a=Math.round(n.red*255),o=Math.round(n.green*255),c=Math.round(n.blue*255);function l(m){let d=m.toString(16);return d.length!==2?"0"+d:d}let f;return n.alpha===1?f=`#${l(a)}${l(o)}${l(c)}`:f=`#${l(a)}${l(o)}${l(c)}${l(Math.round(n.alpha*255))}`,s.push({label:f,textEdit:Gt.replace(i,JSON.stringify(f))}),s}}});var Zq,eL=we(()=>{p();Zq={$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 tL,rL=we(()=>{p();tL={$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 pe,Pd,hJ,nL=we(()=>{p();eL();rL();pe=Ia(ea()),Pd={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":tL,"https://json-schema.org/draft/2019-09/schema":Zq}},hJ={id:pe.t("A unique identifier for the schema."),$schema:pe.t("The schema to verify this document against."),title:pe.t("A descriptive title of the schema."),description:pe.t("A long description of the schema. Used in hover menus and suggestions."),default:pe.t("A default value. Used by suggestions."),multipleOf:pe.t("A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:pe.t("The maximum numerical value, inclusive by default."),exclusiveMaximum:pe.t("Makes the maximum property exclusive."),minimum:pe.t("The minimum numerical value, inclusive by default."),exclusiveMinimum:pe.t("Makes the minimum property exclusive."),maxLength:pe.t("The maximum length of a string."),minLength:pe.t("The minimum length of a string."),pattern:pe.t("A regular expression to match the string against. It is not implicitly anchored."),additionalItems:pe.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:pe.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:pe.t("The maximum number of items that can be inside an array. Inclusive."),minItems:pe.t("The minimum number of items that can be inside an array. Inclusive."),uniqueItems:pe.t("If all of the items in the array must be unique. Defaults to false."),maxProperties:pe.t("The maximum number of properties an object can have. Inclusive."),minProperties:pe.t("The minimum number of properties an object can have. Inclusive."),required:pe.t("An array of strings that lists the names of all properties required on this object."),additionalProperties:pe.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:pe.t("Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:pe.t("A map of property names to schemas for each property."),patternProperties:pe.t("A map of regular expressions on property names to schemas for matching properties."),dependencies:pe.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:pe.t("The set of literal values that are valid."),type:pe.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:pe.t("Describes the format expected for the value. By default, not used for validation"),allOf:pe.t("An array of schemas, all of which must match."),anyOf:pe.t("An array of schemas, where at least one must match."),oneOf:pe.t("An array of schemas, exactly one of which must match."),not:pe.t("A schema which must not match."),$id:pe.t("A unique identifier for the schema."),$ref:pe.t("Reference a definition hosted on any location."),$comment:pe.t("Comments from schema authors to readers or maintainers of the schema."),readOnly:pe.t("Indicates that the value of the instance is managed exclusively by the owning authority."),examples:pe.t("Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:pe.t('An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:pe.t("If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:pe.t("An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:pe.t("Describes the media type of a string property."),contentEncoding:pe.t("Describes the content encoding of a string property."),if:pe.t('The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:pe.t('The "then" subschema is used for validation when the "if" subschema succeeds.'),else:pe.t('The "else" subschema is used for validation when the "if" subschema fails.')};for(let e in Pd.schemas){let t=Pd.schemas[e];for(let r in t.properties){let n=t.properties[r];typeof n=="boolean"&&(n=t.properties[r]={});let i=hJ[r];i&&(n.description=i)}}});function iL(e,t){if(typeof e!="string")throw new TypeError("Expected a string");let r=String(e),n="",i=t?!!t.extended:!1,s=t?!!t.globstar:!1,a=!1,o=t&&typeof t.flags=="string"?t.flags:"",c;for(let l=0,f=r.length;l<f;l++)switch(c=r[l],c){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":n+="\\"+c;break;case"?":if(i){n+=".";break}case"[":case"]":if(i){n+=c;break}case"{":if(i){a=!0,n+="(";break}case"}":if(i){a=!1,n+=")";break}case",":if(a){n+="|";break}n+="\\"+c;break;case"*":let m=r[l-1],d=1;for(;r[l+1]==="*";)d++,l++;let g=r[l+1];s?d>1&&(m==="/"||m===void 0||m==="{"||m===",")&&(g==="/"||g===void 0||g===","||g==="}")?(g==="/"?l++:m==="/"&&n.endsWith("\\/")&&(n=n.substr(0,n.length-2)),n+="((?:[^/]*(?:/|$))*)"):n+="([^/]*)":n+=".*";break;default:n+=c}return(!o||!~o.indexOf("g"))&&(n="^"+n+"$"),new RegExp(n,o)}var sL=we(()=>{p()});function En(e,t,r){let n=r?[{location:{uri:r,range:ue.create(0,0,0,0)},message:e}]:void 0;return{message:e,code:t,relatedInformation:n}}function aL(e){try{return Oo.parse(e).with({fragment:null,query:null}).toString(!0)}catch{return e}}function Du(e){try{let t=Oo.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}var rn,mJ,gJ,nk,ik,ta,Nd,qd,yJ,oL=we(()=>{p();mn();zb();Pu();No();_r();rn=Ia(ea());sL();Ou();$b();mJ="!",gJ="/",nk=class{constructor(t,r,n){this.folderUri=r,this.uris=n,this.globWrappers=[];try{for(let i of t){let s=i[0]!==mJ;s||(i=i.substring(1)),i.length>0&&(i[0]===gJ&&(i=i.substring(1)),this.globWrappers.push({regexp:iL("**/"+i,{extended:!0,globstar:!0}),include:s}))}r&&(r=aL(r),r.endsWith("/")||(r=r+"/"),this.folderUri=r)}catch{this.globWrappers.length=0,this.uris=[]}}matchesPattern(t){if(this.folderUri&&!t.startsWith(this.folderUri))return!1;let r=!1;for(let{regexp:n,include:i}of this.globWrappers)n.test(t)&&(r=i);return r}getURIs(){return this.uris}},ik=class{constructor(t,r,n){this.service=t,this.uri=r,this.dependencies=new Set,this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new ta(n)))}getUnresolvedSchema(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.uri)),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(t=>this.service.resolveSchemaContent(t,this))),this.resolvedSchema}clearSchema(){let t=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies.clear(),this.anchors=void 0,t}},ta=class{constructor(t,r=[]){this.schema=t,this.errors=r}};Nd=class{constructor(t,r=[],n=[],i){this.schema=t,this.errors=r,this.warnings=n,this.schemaDraft=i}getSection(t){let r=this.getSectionRecursive(t,this.schema);if(r)return Rt(r)}getSectionRecursive(t,r){if(!r||typeof r=="boolean"||t.length===0)return r;let n=t.shift();if(r.properties&&typeof r.properties[n])return this.getSectionRecursive(t,r.properties[n]);if(r.patternProperties){for(let i of Object.keys(r.patternProperties))if(Qs(i)?.test(n))return this.getSectionRecursive(t,r.patternProperties[i])}else{if(typeof r.additionalProperties=="object")return this.getSectionRecursive(t,r.additionalProperties);if(n.match("[0-9]+")){if(Array.isArray(r.items)){let i=parseInt(n,10);if(!isNaN(i)&&r.items[i])return this.getSectionRecursive(t,r.items[i])}else if(r.items)return this.getSectionRecursive(t,r.items)}}}},qd=class{constructor(t,r,n){this.contextService=r,this.requestService=t,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}getRegisteredSchemaIds(t){return Object.keys(this.registeredSchemasIds).filter(r=>{let n=Oo.parse(r).scheme;return n!=="schemaservice"&&(!t||t(n))})}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}onResourceChange(t){this.cachedSchemaForResource=void 0;let r=!1;t=ni(t);let n=[t],i=Object.keys(this.schemasById).map(s=>this.schemasById[s]);for(;n.length;){let s=n.pop();for(let a=0;a<i.length;a++){let o=i[a];o&&(o.uri===s||o.dependencies.has(s))&&(o.uri!==s&&n.push(o.uri),o.clearSchema()&&(r=!0),i[a]=void 0)}}return r}setSchemaContributions(t){if(t.schemas){let r=t.schemas;for(let n in r){let i=ni(n);this.contributionSchemas[i]=this.addSchemaHandle(i,r[n])}}if(Array.isArray(t.schemaAssociations)){let r=t.schemaAssociations;for(let n of r){let i=n.uris.map(ni),s=this.addFilePatternAssociation(n.pattern,n.folderUri,i);this.contributionAssociations.push(s)}}}addSchemaHandle(t,r){let n=new ik(this,t,r);return this.schemasById[t]=n,n}getOrAddSchemaHandle(t,r){return this.schemasById[t]||this.addSchemaHandle(t,r)}addFilePatternAssociation(t,r,n){let i=new nk(t,r,n);return this.filePatternAssociations.push(i),i}registerExternalSchema(t){let r=ni(t.uri);return this.registeredSchemasIds[r]=!0,this.cachedSchemaForResource=void 0,t.fileMatch&&t.fileMatch.length&&this.addFilePatternAssociation(t.fileMatch,t.folderUri,[r]),t.schema?this.addSchemaHandle(r,t.schema):this.getOrAddSchemaHandle(r)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(let t in this.contributionSchemas)this.schemasById[t]=this.contributionSchemas[t],this.registeredSchemasIds[t]=!0;for(let t of this.contributionAssociations)this.filePatternAssociations.push(t)}getResolvedSchema(t){let r=ni(t),n=this.schemasById[r];return n?n.getResolvedSchema():this.promise.resolve(void 0)}loadSchema(t){if(!this.requestService){let r=rn.t("Unable to load schema from '{0}'. No schema request service available",Du(t));return this.promise.resolve(new ta({},[En(r,fe.SchemaResolveError,t)]))}return this.requestService(t).then(r=>{if(!r){let a=rn.t("Unable to load schema from '{0}': No content.",Du(t));return new ta({},[En(a,fe.SchemaResolveError,t)])}let n=[];r.charCodeAt(0)===65279&&(n.push(En(rn.t("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.",Du(t)),fe.SchemaResolveError,t)),r=r.trimStart());let i={},s=[];return i=Yy(r,s),s.length&&n.push(En(rn.t("Unable to parse content from '{0}': Parse error at offset {1}.",Du(t),s[0].offset),fe.SchemaResolveError,t)),new ta(i,n)},r=>{let{message:n,code:i}=r;if(typeof n!="string"){let o=r.toString(),c=r.toString().split("Error: ");c.length>1&&(o=c[1]),qi(o,".")&&(o=o.substr(0,o.length-1)),n=o}let s=fe.SchemaResolveError;typeof i=="number"&&i<65536&&(s+=i);let a=rn.t("Unable to load schema from '{0}': {1}.",Du(t),n);return new ta({},[En(a,s,t)])})}resolveSchemaContent(t,r){let n=t.errors.slice(0),i=t.schema,s=i.$schema?Zb(i.$schema):void 0;if(s===Yt.v3)return this.promise.resolve(new Nd({},[En(rn.t("Draft-03 schemas are not supported."),fe.SchemaUnsupportedFeature)],[],s));let a=new Set,o=this.contextService,c=(b,_)=>{_=decodeURIComponent(_);let k=b;return _[0]==="/"&&(_=_.substring(1)),_.split("/").some(w=>(w=w.replace(/~1/g,"/").replace(/~0/g,"~"),k=k[w],!k)),k},l=(b,_,k)=>(_.anchors||(_.anchors=v(b)),_.anchors.get(k)),f=(b,_)=>{for(let k in _)_.hasOwnProperty(k)&&k!=="id"&&k!=="$id"&&(b[k]=_[k])},m=(b,_,k,w)=>{let T;if(w===void 0||w.length===0?T=_:w.charAt(0)==="/"?T=c(_,w):T=l(_,k,w),T)f(b,T);else{let y=rn.t("$ref '{0}' in '{1}' can not be resolved.",w||"",k.uri);n.push(En(y,fe.SchemaResolveError))}},d=(b,_,k,w)=>{o&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/.*/.test(_)&&(_=o.resolveRelativePath(_,w.uri)),_=ni(_);let T=this.getOrAddSchemaHandle(_);return T.getUnresolvedSchema().then(y=>{if(w.dependencies.add(_),y.errors.length){let A=y.errors[0],O=k?_+"#"+k:_,P=k?rn.t("Problems loading reference '{0}': {1}",k,A.message):A.message;n.push(En(P,A.code,_))}return m(b,y.schema,T,k),g(b,y.schema,T)})},g=(b,_,k)=>{let w=[];return this.traverseNodes(b,T=>{let y=new Set;for(;T.$ref;){let A=T.$ref,O=A.split("#",2);if(delete T.$ref,O[0].length>0){w.push(d(T,O[0],O[1],k));return}else if(!y.has(A)){let P=O[1];m(T,_,k,P),y.add(A)}}T.$recursiveRef&&a.add("$recursiveRef"),T.$dynamicRef&&a.add("$dynamicRef")}),this.promise.all(w)},v=b=>{let _=new Map;return this.traverseNodes(b,k=>{let w=k.$id||k.id,T=Zp(w)&&w.charAt(0)==="#"?w.substring(1):k.$anchor;T&&(_.has(T)?n.push(En(rn.t("Duplicate anchor declaration: '{0}'",T),fe.SchemaResolveError)):_.set(T,k)),k.$recursiveAnchor&&a.add("$recursiveAnchor"),k.$dynamicAnchor&&a.add("$dynamicAnchor")}),_};return g(i,i,r).then(b=>{let _=[];return a.size&&_.push(En(rn.t("The schema uses meta-schema features ({0}) that are not yet supported by the validator.",Array.from(a.keys()).join(", ")),fe.SchemaUnsupportedFeature)),new Nd(i,n,_,s)})}traverseNodes(t,r){if(!t||typeof t!="object")return Promise.resolve(null);let n=new Set,i=(...f)=>{for(let m of f)Tn(m)&&c.push(m)},s=(...f)=>{for(let m of f)if(Tn(m))for(let d in m){let v=m[d];Tn(v)&&c.push(v)}},a=(...f)=>{for(let m of f)if(Array.isArray(m))for(let d of m)Tn(d)&&c.push(d)},o=f=>{if(Array.isArray(f))for(let m of f)Tn(m)&&c.push(m);else Tn(f)&&c.push(f)},c=[t],l=c.pop();for(;l;)n.has(l)||(n.add(l),r(l),i(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=c.pop()}getSchemaFromProperty(t,r){if(r.root?.type==="object"){for(let n of r.root.properties)if(n.keyNode.value==="$schema"&&n.valueNode?.type==="string"){let i=n.valueNode.value;return this.contextService&&!/^\w[\w\d+.-]*:/.test(i)&&(i=this.contextService.resolveRelativePath(i,t)),i}}}getAssociatedSchemas(t){let r=Object.create(null),n=[],i=aL(t);for(let s of this.filePatternAssociations)if(s.matchesPattern(i))for(let a of s.getURIs())r[a]||(n.push(a),r[a]=!0);return n}getSchemaURIsForResource(t,r){let n=r&&this.getSchemaFromProperty(t,r);return n?[n]:this.getAssociatedSchemas(t)}getSchemaForResource(t,r){if(r){let s=this.getSchemaFromProperty(t,r);if(s){let a=ni(s);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===t)return this.cachedSchemaForResource.resolvedSchema;let n=this.getAssociatedSchemas(t),i=n.length>0?this.createCombinedSchema(t,n).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:t,resolvedSchema:i},i}createCombinedSchema(t,r){if(r.length===1)return this.getOrAddSchemaHandle(r[0]);{let n="schemaservice://combinedSchema/"+encodeURIComponent(t),i={allOf:r.map(s=>({$ref:s}))};return this.addSchemaHandle(n,i)}}getMatchingSchemas(t,r,n){if(n){let i=n.id||"schemaservice://untitled/matchingSchemas/"+yJ++;return this.addSchemaHandle(i,n).getResolvedSchema().then(a=>r.getMatchingSchemas(a.schema).filter(o=>!o.inverted))}return this.getSchemaForResource(t.uri,r).then(i=>i?r.getMatchingSchemas(i.schema).filter(s=>!s.inverted):[])}},yJ=0});function cL(e,t){let r=[],n=[],i=[],s=-1,a=lr(e.getText(),!1),o=a.scan();function c(v){r.push(v),n.push(i.length)}for(;o!==17;){switch(o){case 1:case 3:{let v=e.positionAt(a.getTokenOffset()).line,b={startLine:v,endLine:v,kind:o===1?"object":"array"};i.push(b);break}case 2:case 4:{let v=o===2?"object":"array";if(i.length>0&&i[i.length-1].kind===v){let b=i.pop(),_=e.positionAt(a.getTokenOffset()).line;b&&_>b.startLine+1&&s!==b.startLine&&(b.endLine=_-1,c(b),s=b.startLine)}break}case 13:{let v=e.positionAt(a.getTokenOffset()).line,b=e.positionAt(a.getTokenOffset()+a.getTokenLength()).line;a.getTokenError()===1&&v+1<e.lineCount?a.setPosition(e.offsetAt(De.create(v+1,0))):v<b&&(c({startLine:v,endLine:b,kind:Li.Comment}),s=v);break}case 12:{let b=e.getText().substr(a.getTokenOffset(),a.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(b){let _=e.positionAt(a.getTokenOffset()).line;if(b[1]){let k={startLine:_,endLine:_,kind:Li.Region};i.push(k)}else{let k=i.length-1;for(;k>=0&&i[k].kind!==Li.Region;)k--;if(k>=0){let w=i[k];i.length=k,_>w.startLine&&s!==w.startLine&&(w.endLine=_,c(w),s=w.startLine)}}}break}}o=a.scan()}let l=t&&t.rangeLimit;if(typeof l!="number"||r.length<=l)return r;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);let f=[];for(let v of n)v<30&&(f[v]=(f[v]||0)+1);let m=0,d=0;for(let v=0;v<f.length;v++){let b=f[v];if(b){if(b+m>l){d=v;break}m+=b}}let g=[];for(let v=0;v<r.length;v++){let b=n[v];typeof b=="number"&&(b<d||b===d&&m++<l)&&g.push(r[v])}return g}var uL=we(()=>{p();mn();_r()});function lL(e,t,r){function n(o){let c=e.offsetAt(o),l=r.getNodeFromOffset(c,!0),f=[];for(;l;){switch(l.type){case"string":case"object":case"array":let d=l.offset+1,g=l.offset+l.length-1;d<g&&c>=d&&c<=g&&f.push(i(d,g)),f.push(i(l.offset,l.offset+l.length));break;case"number":case"boolean":case"null":case"property":f.push(i(l.offset,l.offset+l.length));break}if(l.type==="property"||l.parent&&l.parent.type==="array"){let d=a(l.offset+l.length,5);d!==-1&&f.push(i(l.offset,d))}l=l.parent}let m;for(let d=f.length-1;d>=0;d--)m=Zs.create(f[d],m);return m||(m=Zs.create(ue.create(o,o))),m}function i(o,c){return ue.create(e.positionAt(o),e.positionAt(c))}let s=lr(e.getText(),!0);function a(o,c){return s.setPosition(o),s.scan()===c?s.getTokenOffset()+s.getTokenLength():-1}return t.map(n)}var fL=we(()=>{p();_r();mn()});function ju(e,t,r){let n;if(r){let s=e.offsetAt(r.start),a=e.offsetAt(r.end)-s;n={offset:s,length:a}}let i={tabSize:t?t.tabSize:4,insertSpaces:t?.insertSpaces===!0,insertFinalNewline:t?.insertFinalNewline===!0,eol:`
80
- `,keepLines:t?.keepLines===!0};return e_(e.getText(),n,i).map(s=>Gt.replace(ue.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length)),s.content))}var sk=we(()=>{p();mn();_r()});function _J(e,t){let r=e.propertyName.toLowerCase(),n=t.propertyName.toLowerCase();return r<n?-1:r>n?1:0}function vJ(e,t,r){let n=t.propertyName.toLowerCase(),i=e[0].propertyName.toLowerCase(),s=e[e.length-1].propertyName.toLowerCase();if(n<i)return 0;if(n>s)return e.length;let a=0,o=e.length-1;for(;a<=o;){let c=o+a>>1,l=r(t,e[c]);if(l>0)a=c+1;else if(l<0)o=c-1;else return c}return-a-1}var ft,ra,pL=we(()=>{p();(function(e){e[e.Object=0]="Object",e[e.Array=1]="Array"})(ft||(ft={}));ra=class{constructor(t,r){this.propertyName=t??"",this.beginningLineNumber=r,this.childrenProperties=[],this.lastProperty=!1,this.noKeyName=!1}addChildProperty(t){if(t.parent=this,this.childrenProperties.length>0){let r=0;t.noKeyName?r=this.childrenProperties.length:r=vJ(this.childrenProperties,t,_J),r<0&&(r=r*-1-1),this.childrenProperties.splice(r,0,t)}else this.childrenProperties.push(t);return t}}});function hL(e,t){let r={...t,keepLines:!1},n=nr.applyEdits(e,ju(e,r,void 0)),i=nr.create("test://test.json","json",0,n),s=bJ(i),a=kJ(i,s),o=ju(a,r,void 0),c=nr.applyEdits(a,o);return[Gt.replace(ue.create(De.create(0,0),e.positionAt(e.getText().length)),c)]}function bJ(e){let t=e.getText(),r=lr(t,!1),n=new ra,i=n,s=n,a=n,o,c=0,l=0,f,m,d=-1,g=-1,v=0,b=0,_=[],k=!1,w=!1;for(;(o=r.scan())!==17;){if(k===!0&&o!==14&&o!==15&&o!==12&&o!==13&&s.endLineNumber===void 0){let T=r.getTokenStartLine();m===2||m===4?a.endLineNumber=T-1:s.endLineNumber=T-1,v=T,k=!1}if(w===!0&&o!==14&&o!==15&&o!==12&&o!==13&&(v=r.getTokenStartLine(),w=!1),r.getTokenStartLine()!==c){for(let T=c;T<r.getTokenStartLine();T++){let y=e.getText(ue.create(De.create(T,0),De.create(T+1,0))).length;l=l+y}c=r.getTokenStartLine()}switch(o){case 10:{if(f===void 0||f===1||f===5&&_[_.length-1]===ft.Object){let T=new ra(r.getTokenValue(),v);a=s,s=i.addChildProperty(T)}break}case 3:{if(n.beginningLineNumber===void 0&&(n.beginningLineNumber=r.getTokenStartLine()),_[_.length-1]===ft.Object)i=s;else if(_[_.length-1]===ft.Array){let T=new ra(r.getTokenValue(),v);T.noKeyName=!0,a=s,s=i.addChildProperty(T),i=s}_.push(ft.Array),s.type=ft.Array,v=r.getTokenStartLine(),v++;break}case 1:{if(n.beginningLineNumber===void 0)n.beginningLineNumber=r.getTokenStartLine();else if(_[_.length-1]===ft.Array){let T=new ra(r.getTokenValue(),v);T.noKeyName=!0,a=s,s=i.addChildProperty(T)}s.type=ft.Object,_.push(ft.Object),i=s,v=r.getTokenStartLine(),v++;break}case 4:{b=r.getTokenStartLine(),_.pop(),s.endLineNumber===void 0&&(f===2||f===4)&&(s.endLineNumber=b-1,s.lastProperty=!0,s.lineWhereToAddComma=d,s.indexWhereToAddComa=g,a=s,s=s?s.parent:void 0,i=s),n.endLineNumber=b,v=b+1;break}case 2:{b=r.getTokenStartLine(),_.pop(),f!==1&&(s.endLineNumber===void 0&&(s.endLineNumber=b-1,s.lastProperty=!0,s.lineWhereToAddComma=d,s.indexWhereToAddComa=g),a=s,s=s?s.parent:void 0,i=s),n.endLineNumber=r.getTokenStartLine(),v=b+1;break}case 5:{b=r.getTokenStartLine(),s.endLineNumber===void 0&&(_[_.length-1]===ft.Object||_[_.length-1]===ft.Array&&(f===2||f===4))&&(s.endLineNumber=b,s.commaIndex=r.getTokenOffset()-l,s.commaLine=b),(f===2||f===4)&&(a=s,s=s?s.parent:void 0,i=s),v=b+1;break}case 13:{f===5&&d===r.getTokenStartLine()&&(_[_.length-1]===ft.Array&&(m===2||m===4)||_[_.length-1]===ft.Object)&&(_[_.length-1]===ft.Array&&(m===2||m===4)||_[_.length-1]===ft.Object)&&(s.endLineNumber=void 0,k=!0),(f===1||f===3)&&d===r.getTokenStartLine()&&(w=!0);break}}o!==14&&o!==13&&o!==12&&o!==15&&(m=f,f=o,d=r.getTokenStartLine(),g=r.getTokenOffset()+r.getTokenLength()-l)}return n}function kJ(e,t){if(t.childrenProperties.length===0)return e;let r=nr.create("test://test.json","json",0,e.getText()),n=[];for(dL(n,t,t.beginningLineNumber);n.length>0;){let i=n.shift(),s=i.propertyTreeArray,a=i.beginningLineNumber;for(let o=0;o<s.length;o++){let c=s[o],l=ue.create(De.create(c.beginningLineNumber,0),De.create(c.endLineNumber+1,0)),f=e.getText(l),m=nr.create("test://test.json","json",0,f);if(c.lastProperty===!0&&o!==s.length-1){let v=c.lineWhereToAddComma-c.beginningLineNumber,b=c.indexWhereToAddComa,_={range:ue.create(De.create(v,b),De.create(v,b)),text:","};nr.update(m,[_],1)}else if(c.lastProperty===!1&&o===s.length-1){let v=c.commaIndex,_=c.commaLine-c.beginningLineNumber,k={range:ue.create(De.create(_,v),De.create(_,v+1)),text:""};nr.update(m,[k],1)}let d=c.endLineNumber-c.beginningLineNumber+1,g={range:ue.create(De.create(a,0),De.create(a+d,0)),text:m.getText()};nr.update(r,[g],1),dL(n,c,a),a=a+d}}return r}function SJ(e){e.sort((t,r)=>t.propertyName.localeCompare(r.propertyName))}function dL(e,t,r){if(t.childrenProperties.length!==0)if(t.type===ft.Object){let n=1/0;for(let s of t.childrenProperties)s.beginningLineNumber<n&&(n=s.beginningLineNumber);let i=n-t.beginningLineNumber;r=r+i,SJ(t.childrenProperties),e.push(new Ld(r,t.childrenProperties))}else t.type===ft.Array&&mL(e,t,r)}function mL(e,t,r){for(let n of t.childrenProperties){if(n.type===ft.Object){let i=1/0;for(let a of n.childrenProperties)a.beginningLineNumber<i&&(i=a.beginningLineNumber);let s=i-n.beginningLineNumber;e.push(new Ld(r+n.beginningLineNumber-t.beginningLineNumber+s,n.childrenProperties))}n.type===ft.Array&&mL(e,n,r+n.beginningLineNumber-t.beginningLineNumber)}}var Ld,gL=we(()=>{p();mn();_r();sk();pL();Ld=class{constructor(t,r){this.beginningLineNumber=t,this.propertyTreeArray=r}}});function yL(e,t){let r=[];return t.visit(n=>{if(n.type==="property"&&n.keyNode.value==="$ref"&&n.valueNode?.type==="string"){let i=n.valueNode.value,s=wJ(t,i);if(s){let a=e.positionAt(s.offset);r.push({target:`${e.uri}#${a.line+1},${a.character+1}`,range:TJ(e,n.valueNode)})}}return!0}),Promise.resolve(r)}function TJ(e,t){return ue.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function wJ(e,t){let r=xJ(t);return r?ak(r,e.root):null}function ak(e,t){if(!t)return null;if(e.length===0)return t;let r=e.shift();if(t&&t.type==="object"){let n=t.properties.find(i=>i.keyNode.value===r);return n?ak(e,n.valueNode):null}else if(t&&t.type==="array"&&r.match(/^(0|[1-9][0-9]*)$/)){let n=Number.parseInt(r),i=t.items[n];return i?ak(e,i):null}return null}function xJ(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(EJ)}function EJ(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var _L=we(()=>{p();_r()});var vL={};Oy(vL,{ClientCapabilities:()=>Hb,CodeAction:()=>gd,CodeActionContext:()=>md,CodeActionKind:()=>dd,Color:()=>Nu,ColorInformation:()=>rd,ColorPresentation:()=>nd,Command:()=>Ci,CompletionItem:()=>Eo,CompletionItemKind:()=>Mt,CompletionItemTag:()=>ad,CompletionList:()=>od,Diagnostic:()=>gr,DiagnosticSeverity:()=>It,DocumentHighlight:()=>ld,DocumentHighlightKind:()=>ud,DocumentLink:()=>yd,DocumentSymbol:()=>pd,DocumentUri:()=>ed,ErrorCode:()=>fe,FoldingRange:()=>id,FoldingRangeKind:()=>Li,Hover:()=>cd,InsertTextFormat:()=>et,Location:()=>ti,MarkedString:()=>Ao,MarkupContent:()=>Xs,MarkupKind:()=>wn,Position:()=>De,Range:()=>ue,SchemaDraft:()=>Yt,SelectionRange:()=>Zs,SymbolInformation:()=>fd,SymbolKind:()=>yr,TextDocument:()=>nr,TextDocumentEdit:()=>qu,TextEdit:()=>Gt,VersionedTextDocumentIdentifier:()=>sd,WorkspaceEdit:()=>Lu,getLanguageService:()=>AJ,isSchemaResolveError:()=>JG});function AJ(e){let t=e.promiseConstructor||Promise,r=new qd(e.schemaRequestService,e.workspaceContext,t);r.setSchemaContributions(Pd);let n=new wd(r,e.contributions,t,e.clientCapabilities),i=new xd(r,e.contributions,t),s=new Od(r),a=new Ad(r,t);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=>Bq(o,{collectComments:!0}),newJSONDocument:(o,c,l)=>Fq(o,c,l),getMatchingSchemas:r.getMatchingSchemas.bind(r),doResolve:n.doResolve.bind(n),doComplete:n.doComplete.bind(n),findDocumentSymbols:s.findDocumentSymbols.bind(s),findDocumentSymbols2:s.findDocumentSymbols2.bind(s),findDocumentColors:s.findDocumentColors.bind(s),getColorPresentations:s.getColorPresentations.bind(s),doHover:i.doHover.bind(i),getFoldingRanges:cL,getSelectionRanges:lL,findDefinition:()=>Promise.resolve([]),findLinks:yL,format:(o,c,l)=>ju(o,l,c),sort:(o,c)=>hL(o,c)}}var bL=we(()=>{p();$q();Uq();Gq();Xq();No();nL();oL();uL();fL();gL();sk();_L();_r()});var uk=x(Fu=>{"use strict";p();Object.defineProperty(Fu,"__esModule",{value:!0});Fu.JSONValidator=void 0;Fu.isValid=kL;var ok=(bL(),Py(vL)),OJ=Ae(),ck=class e{service;schemas;static async create(t,r){if(t)return new e(await t.schemas(r.context))}constructor(t){this.schemas=(0,OJ.indexBy)(r=>r.uri,t),this.service=(0,ok.getLanguageService)({schemaRequestService:this.getSchemaForURI.bind(this),workspaceContext:{resolveRelativePath:(r,n)=>new URL(r,n).toString()}}),this.service.configure({schemas:t.map(r=>({uri:r.uri,fileMatch:r.fileMatch}))})}validate=async(t,r)=>{let n=ok.TextDocument.create(t,"json",0,r);return(await this.getOffsetDiagnostics(n)).map(s=>({message:s.message,startIndex:n.offsetAt(s.range.start),endIndex:n.offsetAt(s.range.end)}))};isValid=async(t,r)=>kL(this.service,t,r);async getOffsetDiagnostics(t){let r=this.service.parseJSONDocument(t);return this.service.doValidation(t,r,{schemaValidation:"error",trailingCommas:"ignore",comments:"ignore"})}async getSchemaForURI(t){let r=this.schemas[t]?.schema;return r||`No schema for '${t}' found`}};Fu.JSONValidator=ck;async function kL(e,t,r){let n=ok.TextDocument.create(t,"json",0,r),i=e.parseJSONDocument(n);return(await e.doValidation(n,i,{schemaValidation:"error",trailingCommas:"ignore",comments:"ignore"})).every(a=>a.severity!==1)}});var lk=x(Cd=>{"use strict";p();Object.defineProperty(Cd,"__esModule",{value:!0});Cd.FileType=void 0;var SL;(function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"})(SL||(Cd.FileType=SL={}))});var Id=x(Ge=>{"use strict";p();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.makeGetMetafieldDefinitions=Ge.FETCHED_METAFIELD_CATEGORIES=Ge.makeGetDefaultSchemaTranslations=Ge.makeGetDefaultTranslations=Ge.makeGetDefaultSchemaLocale=Ge.makeGetDefaultLocale=Ge.makeGetDefaultSchemaLocaleFileUri=Ge.makeGetDefaultLocaleFileUri=Ge.makeFileSize=Ge.makeFileExists=void 0;Ge.recursiveReadDirectory=qL;Ge.isDirectory=fk;var TL=Su(),wL=lk(),pk=He(),xL=bn(),PJ=G(),EL=Ae(),NJ=e=>async function(r){try{return await e.stat(r),!0}catch{return!1}};Ge.makeFileExists=NJ;var qJ=e=>async function(r){try{return(await e.stat(r)).size}catch{return 0}};Ge.makeFileSize=qJ;Ge.makeGetDefaultLocaleFileUri=AL("default.json");Ge.makeGetDefaultSchemaLocaleFileUri=AL(".default.schema.json");function AL(e=".default.json"){return function(r){return n=>dk(r,n,e)}}Ge.makeGetDefaultLocale=OL(".default.json");Ge.makeGetDefaultSchemaLocale=OL(".default.schema.json");function OL(e=".default.json"){return function(r,n){return NL(()=>LJ(r,n,e))}}Ge.makeGetDefaultTranslations=PL(".default.json");Ge.makeGetDefaultSchemaTranslations=PL(".default.schema.json");function PL(e=".default.json"){return function(r,n,i){return NL(()=>CJ(r,n,i,e))}}async function dk(e,t,r=".default.json"){return(await e.readDirectory((0,xL.join)(t,"locales"))).find(([i])=>i.endsWith(r))?.[0]}async function LJ(e,t,r){try{let n=await dk(e,t,r);return n?TL.Utils.basename(TL.URI.parse(n)).split(".")[0]:"en"}catch(n){return console.error(n),"en"}}async function CJ(e,t,r,n){try{let i=IJ(t,n);if(i)return i;let s=await dk(e,r,n);if(!s)return{};let a=await e.readFile(s);return(0,pk.parseJSON)(a,{})}catch(i){return console.error(i),{}}}function IJ(e,t){let r=e.find(i=>i.type===PJ.SourceCodeType.JSON&&i.uri.match(/locales/)&&i.uri.endsWith(t));if(!r)return;let n=(0,pk.parseJSON)(r.source);if(!(0,EL.isError)(n))return n}function NL(e){let t;return async(...r)=>(t||(t=e(...r)),t)}async function qL(e,t,r){let i=(await e.readDirectory(t)).filter(a=>!RJ(a)&&(fk(a)||r(a)));return(await Promise.all(i.map(a=>fk(a)?qL(e,a[0],r):Promise.resolve([a[0]])))).flat()}function fk([e,t]){return t===wL.FileType.Directory}var MJ=[".git","node_modules","dist","build","tmp","vendor"];function RJ([e,t]){return t===wL.FileType.Directory&&MJ.some(r=>e.endsWith(r))}Ge.FETCHED_METAFIELD_CATEGORIES=["article","blog","collection","company","company_location","location","market","order","page","product","variant","shop"];var DJ=e=>async function(t){let r={article:[],blog:[],collection:[],company:[],company_location:[],location:[],market:[],order:[],page:[],product:[],variant:[],shop:[]};try{let n=await e.readFile((0,xL.join)(t,".shopify","metafields.json")),i=(0,pk.parseJSON)(n);return(0,EL.isError)(i)?r:Ge.FETCHED_METAFIELD_CATEGORIES.reduce((s,a)=>{try{s[a]=i[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}};Ge.makeGetMetafieldDefinitions=DJ});var ML=x(Md=>{"use strict";p();Object.defineProperty(Md,"__esModule",{value:!0});Md.createDisabledChecksModule=BJ;Md.findNextLinePosition=IL;var CL=G(),jJ=Xn(),FJ=Ae();function BJ(){let e="@all",r=new Map;function n(a,o,c){let[l,f,m]=o.trim().match(/^(?:theme\-check\-(disable-next-line|disable|enable)) ?(.*)/)||[];(m?m.split(/,[ ]*/):[e]).forEach(g=>{let v=r.get(a.uri);if(f==="disable-next-line"&&!(0,FJ.isError)(a.ast)){let b=IL(a.ast,c);b&&(v.has(g)||v.set(g,[]),v.get(g).push({from:b.start,to:b.end}))}if(f==="disable"&&(v.has(g)||v.set(g,[]),v.get(g).push({from:c.position.end})),f==="enable"){let b=v.get(g);if(b)b[b.length-1].to=c.position.start;else if(g===e)for(let _ of v.values())for(let k of _)k.to||(k.to=c.position.start)}})}let i={meta:{schema:{}},create:({file:a})=>({async onCodePathStart(){r.set(a.uri,new Map)},async LiquidRawTag(o){o.name==="comment"&&n(a,o.body.value,o)},async LiquidTag(o){typeof o.markup!="string"||o.name!=="#"||n(a,o.markup,o)}})};function s(a){return[e,a.check].flatMap(c=>r.has(a.uri)?r.get(a.uri).has(c)?r.get(a.uri).get(c):[]:[]).some(c=>a.start.index>=c.from&&(!c.to||a.end.index<=c.to))}return{DisabledChecksVisitor:i,isDisabled:s}}function IL(e,t){let[r,n]=(0,jJ.findCurrentNode)(e,t.position.end),i=n.at(-1),s=n.at(-2),a=LL(i,r);if(!(!a&&(i&&(a=LL(s,i)),!a)))return"blockStartPosition"in a?a.type===CL.LiquidHtmlNodeTypes.LiquidRawTag&&a.name==="doc"?a.position:a.blockStartPosition:a.position}function LL(e,t){if(!e)return;let r=[];e.type===CL.LiquidHtmlNodeTypes.LiquidTag&&Array.isArray(e.markup)?r=e.markup:"children"in e&&(r=e.children||[]);let n=r.findIndex(s=>s===t);return n===-1?void 0:r.at(n+1)}});var mk=x(hk=>{"use strict";p();Object.defineProperty(hk,"__esModule",{value:!0});hk.isIgnored=$J;var VJ=Xw();function $J(e,t,r){return[...UJ(r,t),...RL(t.ignore)].map(i=>i.replace(/^\//,t.rootUri+"/").replace(/^([^\/])/,"**/$1").replace(/\/\*$/,"/**")).some(i=>(0,VJ.minimatch)(e,i))}function UJ(e,t){return e?RL(t.settings[e.meta.code]?.ignore):[]}function RL(e){return e??[]}});var jL=x(gk=>{"use strict";p();Object.defineProperty(gk,"__esModule",{value:!0});gk.visitLiquid=zJ;var HJ=ce();function DL(e){return!!e&&typeof e=="object"&&"type"in e}function zJ(e,t){let r=[{node:e,ancestors:[]}];for(;r.length>0;){let{node:n,ancestors:i}=r.pop(),s=i.concat(n);t(n.type,n,i);for(let a in n){if(!n.hasOwnProperty(a)||HJ.nonTraversableProperties.has(a))continue;let o=n[a];if(Array.isArray(o))for(let c=o.length-1;c>=0;c--){let l=o[c];DL(l)&&r.push({node:l,ancestors:s})}else DL(o)&&r.push({node:o,ancestors:s})}t(`${n.type}:exit`,n,i)}}});var BL=x(yk=>{"use strict";p();Object.defineProperty(yk,"__esModule",{value:!0});yk.visitJSON=GJ;function FL(e){return!!e&&typeof e=="object"&&"type"in e}var WJ=new Set(["loc"]);async function GJ(e,t){let r=[{node:e,ancestors:[]}],n;for(;r.length>0;){let{node:i,ancestors:s}=r.pop(),a=s.concat(i);n=t[i.type],n&&await n(i,s);for(let o in i){if(!i.hasOwnProperty(o)||WJ.has(o))continue;let c=i[o];if(Array.isArray(c))for(let l=c.length-1;l>=0;l--){let f=c[l];FL(f)&&r.push({node:f,ancestors:a})}else FL(c)&&r.push({node:c,ancestors:a})}n=t[`${i.type}:exit`],n&&await n(i,s)}}});var VL=x(qo=>{"use strict";p();Object.defineProperty(qo,"__esModule",{value:!0});qo.visitJSON=qo.visitLiquid=void 0;var JJ=jL();Object.defineProperty(qo,"visitLiquid",{enumerable:!0,get:function(){return JJ.visitLiquid}});var KJ=BL();Object.defineProperty(qo,"visitJSON",{enumerable:!0,get:function(){return KJ.visitJSON}})});var $L=x(Lo=>{"use strict";p();Object.defineProperty(Lo,"__esModule",{value:!0});Lo.AppBlockValidTags=Lo.ForbiddenTag=void 0;var _k=G(),vk;(function(e){e.JavaScript="javascript",e.StyleSheet="stylesheet",e.Include="include",e.Layout="layout",e.Section="section",e.Sections="sections"})(vk||(Lo.ForbiddenTag=vk={}));var YJ=e=>Object.values(vk).includes(e),QJ=e=>`Theme app extension blocks cannot contain '${e}' tags`;Lo.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:_k.SourceCodeType.LiquidHtml,severity:_k.Severity.ERROR,schema:{},targets:[_k.ConfigTarget.ThemeAppExtension]},create(e){let t=async r=>{if(YJ(r.name)){let n=r.blockEndPosition?r.blockEndPosition.end:r.position.end,i=r.blockStartPosition.start,s=QJ(r.name);return e.report({message:s,startIndex:i,endIndex:n})}};return{LiquidRawTag:t,LiquidTag:t}}}});var zL=x(Rd=>{"use strict";p();Object.defineProperty(Rd,"__esModule",{value:!0});Rd.AssetPreload=void 0;var HL=ce(),UL=G(),ii=Re();function XJ(e){return(0,ii.isAttr)(e,"rel")&&e.value.some(t=>t.type===HL.NodeTypes.TextNode&&t.value==="preload")}function ZJ(e){return e.some(t=>(0,ii.isAttr)(t,"as")&&(0,ii.hasAttributeValueOf)(t,"image"))&&e.some(t=>(0,ii.isAttr)(t,"fetchpriority")&&(0,ii.hasAttributeValueOf)(t,"high"))}Rd.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:UL.SourceCodeType.LiquidHtml,severity:UL.Severity.WARNING,schema:{},targets:[]},create(e){return{async HtmlVoidElement(t){let r=t.attributes.find(n=>(0,ii.isValuedHtmlAttribute)(n)&&XJ(n));if(t.name==="link"&&r){let n=t.attributes.filter(ii.isValuedHtmlAttribute);if(ZJ(n))return;let s=n.find(o=>(0,ii.isAttr)(o,"as"))?.value.find(o=>(0,ii.isNodeOfType)(HL.NodeTypes.TextNode,o))?.value,a="";s==="style"?a="For better performance, prefer using the preload argument of the stylesheet_tag filter":s==="image"?a="For better performance, prefer using the preload argument of the image_tag filter":a="For better performance, prefer using the preload_tag filter",e.report({message:a,startIndex:t.position.start,endIndex:t.position.end})}}}}}});var GL=x(jd=>{"use strict";p();Object.defineProperty(jd,"__esModule",{value:!0});jd.AssetSizeAppBlockCSS=void 0;var eK=He(),Dd=G(),tK=Ae(),WL=Hr(),rK={thresholdInBytes:Dd.SchemaProp.number(1e5)};jd.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:Dd.SourceCodeType.LiquidHtml,severity:Dd.Severity.ERROR,schema:rK,targets:[Dd.ConfigTarget.ThemeAppExtension]},create(e){return e.fileSize?{async LiquidRawTag(t){if(t.name!=="schema")return;let r=(0,eK.parseJSON)(t.body.value);if((0,tK.isError)(r))return;let n=r.stylesheet;if(!n)return;let i=`assets/${n}`,s=e.settings.thresholdInBytes,a=t.body.position.start+t.body.value.indexOf(n),o=a+n.length;if(!await(0,WL.doesFileExist)(e,i)){e.report({message:`'${n}' does not exist.`,startIndex:a,endIndex:o});return}let[l,f]=await(0,WL.doesFileExceedThreshold)(e,i,s);l&&e.report({message:`The file size for '${n}' (${f} B) exceeds the configured threshold (${s} B)`,startIndex:a,endIndex:o})}}:{}}}});var KL=x(Bd=>{"use strict";p();Object.defineProperty(Bd,"__esModule",{value:!0});Bd.AssetSizeAppBlockJavaScript=void 0;var nK=He(),Fd=G(),iK=Ae(),JL=Hr(),sK={thresholdInBytes:Fd.SchemaProp.number(1e4)};Bd.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:Fd.SourceCodeType.LiquidHtml,severity:Fd.Severity.ERROR,schema:sK,targets:[Fd.ConfigTarget.ThemeAppExtension]},create(e){return e.fileSize?{async LiquidRawTag(t){if(t.name!=="schema")return;let r=(0,nK.parseJSON)(t.body.value);if((0,iK.isError)(r))return;let n=r.javascript;if(!n)return;let i=`assets/${n}`,s=e.settings.thresholdInBytes,a=t.body.position.start+t.body.value.indexOf(n),o=a+n.length;if(!await(0,JL.doesFileExist)(e,i)){e.report({message:`'${n}' does not exist.`,startIndex:a,endIndex:o});return}let[l,f]=await(0,JL.doesFileExceedThreshold)(e,i,s);l&&e.report({message:`The file size for '${n}' (${f} B) exceeds the configured threshold (${s} B)`,startIndex:a,endIndex:o})}}:{}}}});var QL=x(Vd=>{"use strict";p();Object.defineProperty(Vd,"__esModule",{value:!0});Vd.AssetSizeCSS=void 0;var Io=ce(),bk=G(),aK=Ae(),YL=Hr(),Co=Re(),oK={thresholdInBytes:bk.SchemaProp.number(1e5)};function cK(e){return e.type===Io.NodeTypes.TextNode}function uK(e){return e.type===Io.NodeTypes.LiquidVariableOutput}function lK(e){return typeof e!="string"&&e.type===Io.NodeTypes.LiquidVariable}function fK(e){return e.type===Io.NodeTypes.String}Vd.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:bk.SourceCodeType.LiquidHtml,severity:bk.Severity.ERROR,schema:oK,targets:[]},create(e){if(!e.fileSize)return{};let t=e.settings.thresholdInBytes;async function r(i,s){await(0,YL.hasRemoteAssetSizeExceededThreshold)(i,t)&&e.report({message:`The CSS file size exceeds the threshold of ${t} bytes`,startIndex:s.start,endIndex:s.end})}async function n(i,s){await(0,YL.hasLocalAssetSizeExceededThreshold)(e,`assets/${i}`,t)&&e.report({message:`The CSS file size exceeds the threshold of ${t} bytes`,startIndex:s.start,endIndex:s.end})}return{async HtmlVoidElement(i){if(i.name!=="link"||!i.attributes.filter(Co.isValuedHtmlAttribute).find(o=>(0,Co.isAttr)(o,"rel")&&(0,Co.valueIncludes)(o,"stylesheet")))return;let a=i.attributes.filter(Co.isValuedHtmlAttribute).find(o=>(0,Co.isAttr)(o,"href"));if(a&&a.value.length===1){if(cK(a.value[0])&&/(https?:)?\/\//.test(a.value[0].value)){let o=a.value[0].value;await r(o,a.attributePosition)}if(uK(a.value[0])&&lK(a.value[0].markup)&&fK(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 n(o,a.attributePosition)}}},async LiquidFilter(i,s){if(i.name!=="stylesheet_tag")return;let a=(0,aK.last)(s);if(!(!a||!(0,Co.isNodeOfType)(Io.NodeTypes.LiquidVariable,a))&&a.expression.type===Io.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 n(o,a.position)}}}}}}});var ZL=x($d=>{"use strict";p();Object.defineProperty($d,"__esModule",{value:!0});$d.AssetSizeJavaScript=void 0;var Mo=ce(),Sk=G(),pK=Ae(),XL=Hr(),kk=Re(),dK={thresholdInBytes:Sk.SchemaProp.number(1e4)};function hK(e){return e.type===Mo.NodeTypes.TextNode}function mK(e){return e.type===Mo.NodeTypes.LiquidVariableOutput}function gK(e){return typeof e!="string"&&e.type===Mo.NodeTypes.LiquidVariable}function yK(e){return e.type===Mo.NodeTypes.String}$d.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:Sk.SourceCodeType.LiquidHtml,severity:Sk.Severity.ERROR,schema:dK,targets:[]},create(e){if(!e.fileSize)return{};let t=e.settings.thresholdInBytes;async function r(i,s){await(0,XL.hasRemoteAssetSizeExceededThreshold)(i,t)&&e.report({message:`JavaScript on every page load exceeds compressed size threshold (${t} Bytes), consider using the import on interaction pattern.`,startIndex:s.start,endIndex:s.end})}async function n(i,s){await(0,XL.hasLocalAssetSizeExceededThreshold)(e,`assets/${i}`,t)&&e.report({message:`JavaScript on every page load exceeds compressed size threshold (${t} Bytes), consider using the import on interaction pattern.`,startIndex:s.start,endIndex:s.end})}return{async HtmlRawNode(i){if(i.name!=="script")return;let s=i.attributes.filter(kk.isValuedHtmlAttribute).find(a=>(0,kk.isAttr)(a,"src"));if(s&&s.value.length===1){if(hK(s.value[0])&&/(https?:)?\/\//.test(s.value[0].value)){let a=s.value[0].value;await r(a,s.attributePosition)}if(mK(s.value[0])&&gK(s.value[0].markup)&&yK(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 n(a,s.attributePosition)}}},async LiquidFilter(i,s){if(i.name!=="script_tag")return;let a=(0,pK.last)(s);if(!(!a||!(0,kk.isNodeOfType)(Mo.NodeTypes.LiquidVariable,a))&&a.expression.type===Mo.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 n(o,a.position)}}}}}}});var nC=x(Hd=>{"use strict";p();Object.defineProperty(Hd,"__esModule",{value:!0});Hd.BlockIdUsage=void 0;var Ud=ce(),eC=G();Hd.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:eC.SourceCodeType.LiquidHtml,severity:eC.Severity.WARNING,schema:{},targets:[]},create(e){return{async Comparison(t,r){t.comparator==="=="&&t.left.type===Ud.NodeTypes.VariableLookup&&tC(t.left)&&rC(e,t.position)},async VariableLookup(t,r){let n=r.at(-1);n?.type===Ud.NodeTypes.LiquidTag&&n.name==="case"&&tC(t)&&rC(e,t.position)}}}};function tC(e){return e.type==Ud.NodeTypes.VariableLookup&&e.name==="block"&&e.lookups[0]&&e.lookups[0].type===Ud.NodeTypes.String&&e.lookups[0].value==="id"}function rC(e,t){e.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:t.start,endIndex:t.end})}});var sC=x(zd=>{"use strict";p();Object.defineProperty(zd,"__esModule",{value:!0});zd.CdnPreconnect=void 0;var iC=G(),na=Re();zd.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:iC.SourceCodeType.LiquidHtml,severity:iC.Severity.ERROR,schema:{},targets:[]},create(e){function t(r){(0,na.getHtmlNodeName)(r)!=="link"||!r.attributes.filter(na.isValuedHtmlAttribute).some(s=>(0,na.isAttr)(s,"rel")&&(0,na.valueIncludes)(s,"preconnect"))||!r.attributes.filter(na.isValuedHtmlAttribute).some(s=>(0,na.isAttr)(s,"href")&&(0,na.valueIncludes)(s,".+cdn.shopify.com.+"))||e.report({message:"Preconnecting to cdn.shopify.com is unnecessary and can lead to worse performance",startIndex:r.position.start,endIndex:r.position.end})}return{async HtmlVoidElement(r){t(r)},async HtmlSelfClosingElement(r){t(r)}}}}});var cC=x(Wd=>{"use strict";p();Object.defineProperty(Wd,"__esModule",{value:!0});Wd.ContentForHeaderModification=void 0;var aC=ce(),oC=G(),_K=Re();function vK(e){return e.name==="assign"&&typeof e.markup!="string"}function bK(e){return e.name==="capture"&&typeof e.markup!="string"}function kK(e){return e.name==="echo"&&typeof e.markup!="string"}Wd.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:oC.SourceCodeType.LiquidHtml,severity:oC.Severity.ERROR,schema:{},targets:[]},create(e){function t(r,n){(0,_K.isNodeOfType)(aC.NodeTypes.VariableLookup,r)&&r.name==="content_for_header"&&e.report({message:"Do not rely on the content of `content_for_header`",startIndex:n.start,endIndex:n.end})}return{async LiquidTag(r){if(vK(r))t(r.markup.value.expression,r.position);else if(kK(r))t(r.markup.expression,r.position);else if(bK(r)&&r.children)for(let n of r.children)n.type===aC.NodeTypes.LiquidVariableOutput&&typeof n.markup!="string"&&t(n.markup.expression,n.position)},async LiquidVariableOutput(r){typeof r.markup!="string"&&r.markup.filters.length&&t(r.markup.expression,r.position)}}}}});var lC=x(Gd=>{"use strict";p();Object.defineProperty(Gd,"__esModule",{value:!0});Gd.DeprecateBgsizes=void 0;var uC=G(),Bu=Re();Gd.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:uC.SourceCodeType.LiquidHtml,severity:uC.Severity.WARNING,schema:{},targets:[]},create(e){return{async HtmlElement(t){let r=t.attributes.filter(Bu.isValuedHtmlAttribute).find(i=>(0,Bu.isAttr)(i,"class")&&(0,Bu.valueIncludes)(i,"lazyload"));if(r){let i=r;e.report({message:'Use the native loading="lazy" attribute instead of lazysizes',startIndex:i.attributePosition.start,endIndex:i.attributePosition.end})}let n=t.attributes.find(i=>(0,Bu.isValuedHtmlAttribute)(i)&&(0,Bu.isAttr)(i,"data-bgset"));n&&e.report({message:"Use the CSS imageset attribute instead of data-bgset",startIndex:n.position.start,endIndex:n.position.end})}}}}});var pC=x(Jd=>{"use strict";p();Object.defineProperty(Jd,"__esModule",{value:!0});Jd.DeprecateLazysizes=void 0;var fC=G(),An=Re();function SK(e){return(0,An.isAttr)(e,"data-srcset")||(0,An.isAttr)(e,"data-sizes")}Jd.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:fC.SourceCodeType.LiquidHtml,severity:fC.Severity.WARNING,schema:{},targets:[]},create(e){function t(r){if((0,An.getHtmlNodeName)(r)!=="img")return;let n=r.attributes.filter(An.isHtmlAttribute),i=n.some(c=>(0,An.isAttr)(c,"src")),s=n.some(c=>(0,An.isAttr)(c,"loading"));i&&s||!r.attributes.filter(An.isValuedHtmlAttribute).some(c=>(0,An.isAttr)(c,"class")&&(0,An.valueIncludes)(c,"lazyload"))||!r.attributes.filter(An.isValuedHtmlAttribute).some(SK)||e.report({message:'Use the native loading="lazy" attribute instead of lazysizes',startIndex:r.position.start,endIndex:r.position.end})}return{async HtmlVoidElement(r){t(r)},async HtmlSelfClosingElement(r){t(r)}}}}});var yC=x(Do=>{"use strict";p();Object.defineProperty(Do,"__esModule",{value:!0});Do.fixHexToRgba=TK;Do.suggestImgTagFix=wK;Do.suggestImgUrlFix=xK;Do.suggestImageUrlFix=EK;var Zd=ce(),eh=Re(),dC=5760,hC={pico:16,icon:32,thumb:50,small:100,compact:160,medium:240,large:480,grande:600,original:1024};function TK(e){if(e.args.length>1)return;let{start:t,end:r}=th(e),n=Ro(e,0),i;return n?i=` color_to_rgb | color_modify: 'alpha', ${n}`:i=" color_to_rgb",s=>s.replace(t,r,i)}function wK(e){let t="Replace 'img_tag' with 'image_tag'.",r=Ro(e,0),n=Ro(e,1),i=Ro(e,2),{width:s,height:a}=wk(i,{width:-1,height:-1}),{start:o,end:c}=th(e),l=xk({width:s,height:a}),f={width:s,height:a,alt:Qd(r),class:Qd(n)},m=Yd("image_url",l),d=Yd("image_tag",f);return[{message:t,fix:g=>{let v=`${m} |${d}`;g.replace(o,c,v)}}]}function xK(e){let t="Replace 'img_url' with 'image_url'.",r=Kd(e,"crop"),n=Kd(e,"format"),i=Kd(e,"scale"),s=Ro(e,0),a=e.args.at(0);if(Tk(i?.value)||Tk(a))return;let{width:o,height:c}=xk(AK(e,wk(s))),{start:l,end:f}=th(e),m={width:o,height:c};return Xd(r?.value)&&(m.crop=Qd(r.value.value)),Xd(n?.value)&&(m.format=Qd(n.value.value)),Tk(n?.value)&&(m.format=n.value.name),[{message:t,fix:d=>{let g=Yd("image_url",m);d.replace(l,f,g)}}]}function EK(e,t){let r=`Replace '${e}' with 'image_url'.`,n=Ro(t,0),{width:i,height:s}=xk(wk(n)),{start:a,end:o}=th(t);return[{message:r,fix:c=>{let l=Yd("image_url",{width:i,height:s});c.replace(a,o,l)}}]}function wk(e,t={width:100,height:100}){if(!e)return{...t};if(e in hC){let i=hC[e];return{width:i,height:i}}let[r,n]=e.split("x").map(i=>parseInt(i));return mC({width:r,height:n})}function AK(e,t){let r=parseInt(OK(e,"scale")||"0")||1;return mC({width:t.width*r,height:t.height*r})}function mC(e){return{width:Math.min(e.width,dC),height:Math.min(e.height,dC)}}function xk(e){let{width:t,height:r}=e;return(!r||r===-1)&&(!t||t===-1)&&(t=100),{width:t,height:r}}function Ro(e,t){let r=e.args.at(t);if(gC(r)||Xd(r))return r.value}function OK(e,t){let n=Kd(e,t)?.value;if(gC(n)||Xd(n))return n.value}function Kd(e,t){return e.args.find(n=>(0,eh.isNodeOfType)(Zd.NodeTypes.NamedArgument,n)&&n.name===t)}function Yd(e,t){let r=Object.entries(t).filter(([n,i])=>i&&i!==-1).map(([n,i])=>`${n}: ${i}`).join(", ");return r?` ${e}: ${r}`:` ${e}`}function th(e){let t=e.position,r=e.source.slice(t.start).indexOf("|");return{start:t.start+r+1,end:t.end}}function Qd(e){return e?`'${e}'`:null}function Tk(e){return(0,eh.isNodeOfType)(Zd.NodeTypes.VariableLookup,e)}function Xd(e){return(0,eh.isNodeOfType)(Zd.NodeTypes.String,e)}function gC(e){return(0,eh.isNodeOfType)(Zd.NodeTypes.Number,e)}});var vC=x(nh=>{"use strict";p();Object.defineProperty(nh,"__esModule",{value:!0});nh.DeprecatedFilter=void 0;var _C=G(),rh=yC();nh.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:_C.SourceCodeType.LiquidHtml,severity:_C.Severity.WARNING,schema:{},targets:[]},create(e){return e.themeDocset?{LiquidFilter:async t=>{let r=await e.themeDocset.filters(),n=r.find(l=>l.deprecated&&l.name===t.name);if(!n)return;let i=LK(n),s=r.find(l=>l.name===i),a=qK(n,s),o=PK(t),c=NK(t);e.report({message:a,suggest:o,fix:c,startIndex:t.position.start+1,endIndex:t.position.end})}}:{}}};function PK(e){let t=e.name;switch(t){case"img_tag":return(0,rh.suggestImgTagFix)(e);case"img_url":return(0,rh.suggestImgUrlFix)(e);case"article_img_url":case"collection_img_url":case"product_img_url":return(0,rh.suggestImageUrlFix)(t,e);case"currency_selector":return}}function NK(e){if(e.name==="hex_to_rgba")return(0,rh.fixHexToRgba)(e)}function qK(e,t){return t?`Deprecated filter '${e.name}', consider using '${t.name}'.`:`Deprecated filter '${e.name}'.`}function LK(e){return e.deprecation_reason?.match(/replaced by \[`(.+?)`\]/)?.[1]}});var sh=x(ih=>{"use strict";p();Object.defineProperty(ih,"__esModule",{value:!0});ih.DEPRECATED_FONT_HANDLES=void 0;ih.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 xC=x(oh=>{"use strict";p();Object.defineProperty(oh,"__esModule",{value:!0});oh.DeprecatedFontsOnSectionsAndBlocks=void 0;var CK=Ve(),bC=G(),ah=He(),Ek=sh();oh.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:bC.SourceCodeType.LiquidHtml,severity:bC.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let r=await(0,CK.getSchema)(e),{validSchema:n,ast:i}=r??{};if(!n||n instanceof Error||!i||i instanceof Error)return;let s=t.blockStartPosition.end;IK(n,s,i,e),MK(n,s,i,e),await RK(n,s,i,e),"default"in n&&await DK(n,s,i,e)}}}};function IK(e,t,r,n){let i=e.settings;i&&kC(i,t,r,["settings"],n)}function kC(e,t,r,n,i){e.forEach((s,a)=>{if(s.type==="font_picker"&&s.default&&Ek.DEPRECATED_FONT_HANDLES.has(s.default)){let o=n.concat([String(a),"default"]);Ak(i,t,r,o,`setting '${s.id}' is using deprecated font '${s.default}'`)}})}function MK(e,t,r,n){let i=e.blocks;i&&i.forEach((s,a)=>{"settings"in s&&s.settings&&kC(s.settings,t,r,["blocks",String(a),"settings"],n)})}async function RK(e,t,r,n){let i=e.presets;if(i)for(let[s,a]of i.entries()){let o=["presets",String(s)];await SC(a.settings??{},"blocks"in a?a.blocks:void 0,e,t,r,o,n)}}async function SC(e,t,r,n,i,s,a){e&&typeof e=="object"&&Object.entries(e).forEach(([o,c])=>{if(wC(r.settings??[],o)&&Ek.DEPRECATED_FONT_HANDLES.has(c)){let l=s.concat(["settings",o]);Ak(a,n,i,l,`setting '${o}' is using deprecated font '${c}'`)}}),t&&await TC(t,r,n,i,a,s)}async function TC(e,t,r,n,i,s){let a=Array.isArray(e)?e.entries():Object.entries(e);for(let[o,c]of a){let l=s.concat(["blocks",String(o)]),f=null;if(t.blocks?.forEach(m=>{m.type===c.type&&"name"in m&&(f=m)}),!f){let m=await i.getBlockSchema?.(c.type);if(!m||m instanceof Error||(f=m.validSchema,!f||f instanceof Error))continue}for(let[m,d]of Object.entries(c.settings??{}))d&&Ek.DEPRECATED_FONT_HANDLES.has(d)&&wC(f.settings??[],m)&&Ak(i,r,n,l.concat(["settings",m]),`setting '${m}' is using deprecated font '${d}'`);"blocks"in c&&c.blocks&&await TC(c.blocks,t,r,n,i,l)}}async function DK(e,t,r,n){let i=e.default;if(!i||typeof i!="object")return;let s=["default"];await SC(i.settings??{},"blocks"in i?i.blocks:void 0,e,t,r,s,n)}function wC(e,t){return e.some(r=>r.id===t&&r.type==="font_picker")}function Ak(e,t,r,n,i,s=!0){let a=(0,ah.nodeAtPath)(r,n),o=s?t+(0,ah.getLocStart)(a):t+(0,ah.getLocEnd)(a)-1,c=t+(0,ah.getLocEnd)(a);e.report({message:i,startIndex:o,endIndex:c})}});var OC=x(ch=>{"use strict";p();Object.defineProperty(ch,"__esModule",{value:!0});ch.DeprecatedFontsOnSettingsData=void 0;var EC=G(),AC=He(),jK=sh();ch.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:EC.SourceCodeType.JSON,severity:EC.Severity.WARNING,schema:{},targets:[]},create(e){return e.toRelativePath(e.file.uri)!=="config/settings_data.json"?{}:{async Property(r){r.value.type==="Literal"&&typeof r.value.value=="string"&&jK.DEPRECATED_FONT_HANDLES.has(r.value.value)&&e.report({message:`The font "${r.value.value}" is deprecated`,startIndex:(0,AC.getLocStart)(r.value),endIndex:(0,AC.getLocEnd)(r.value)})}}}}});var NC=x(lh=>{"use strict";p();Object.defineProperty(lh,"__esModule",{value:!0});lh.DeprecatedFontsOnSettingsSchema=void 0;var uh=G(),PC=He(),FK=sh();lh.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:uh.SourceCodeType.JSON,severity:uh.Severity.WARNING,schema:{},targets:[]},create(e){return e.toRelativePath(e.file.uri)!=="config/settings_schema.json"?{}:{async Property(r){if(r.key.value==="settings"&&(0,uh.isArrayNode)(r.value)){for(let n of r.value.children)if((0,uh.isObjectNode)(n)){let i=n.children.find(s=>s.key.value==="type");if(i&&i.value.type==="Literal"&&i.value.value==="font_picker"){let s=n.children.find(a=>a.key.value==="default");if(s&&s.value.type==="Literal"&&typeof s.value.value=="string"){let a=s.value.value;FK.DEPRECATED_FONT_HANDLES.has(a)&&e.report({message:`The font "${a}" is deprecated`,startIndex:(0,PC.getLocStart)(s.value),endIndex:(0,PC.getLocEnd)(s.value)})}}}}}}}}});var LC=x(fh=>{"use strict";p();Object.defineProperty(fh,"__esModule",{value:!0});fh.DeprecatedTag=void 0;var qC=G();fh.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:qC.SourceCodeType.LiquidHtml,severity:qC.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidTag(t){if(t.name==="include"){let n=t.source.substring(t.position.start).indexOf("include"),i=n+7,s=t.position.start+n,a=t.position.start+i;e.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 nn=x(vr=>{"use strict";p();Object.defineProperty(vr,"__esModule",{value:!0});vr.reportUnknownArguments=BK;vr.reportMissingArguments=VK;vr.reportDuplicateArguments=$K;vr.findTypeMismatchParams=UK;vr.reportTypeMismatches=HK;vr.generateTypeMismatchSuggestions=IC;vr.getBlockName=WK;vr.getSnippetName=GK;vr.getLiquidDocParams=JK;vr.makeRemoveArgumentCorrector=Ok;vr.makeAddArgumentCorrector=MC;var ia=ce(),Vu=Ni(),CC=Re();function BK(e,t,r,n){let i="";t.type===ia.NodeTypes.ContentForMarkup?i=` in content_for tag for static block '${n}'`:t.type===ia.NodeTypes.RenderMarkup&&(i=` in render tag for snippet '${n}'`);for(let s of r)e.report({message:`Unknown argument '${s.name}'${i}.`,startIndex:s.position.start,endIndex:s.position.end,suggest:[{message:`Remove '${s.name}'`,fix:Ok(t,s)}]})}function VK(e,t,r,n){let i="";t.type===ia.NodeTypes.ContentForMarkup?i=` in content_for tag for static block '${n}'`:t.type===ia.NodeTypes.RenderMarkup&&(i=` in render tag for snippet '${n}'`);for(let s of r)e.report({message:`Missing required argument '${s.name}'${i}.`,startIndex:t.position.start,endIndex:t.position.end,suggest:[{message:`Add required argument '${s.name}'`,fix:MC(t,s)}]})}function $K(e,t,r,n){let i="";t.type===ia.NodeTypes.ContentForMarkup?i=` in content_for tag for static block '${n}'`:t.type===ia.NodeTypes.RenderMarkup&&(i=` in render tag for snippet '${n}'`);for(let s of r)e.report({message:`Duplicate argument '${s.name}'${i}.`,startIndex:s.position.start,endIndex:s.position.end,suggest:[{message:`Remove duplicate argument '${s.name}'`,fix:Ok(t,s)}]})}function UK(e,t){let r=[];for(let n of t){let i=e.get(n.name);i?.type&&(0,Vu.checkArgumentType)(i.type,n.value).kind==="incompatible"&&r.push(n)}return r}function HK(e,t,r){for(let n of t){let i=r.get(n.name);if(!i||!i.type)continue;let s=IC(i.type,n.value.position.start,n.value.position.end);e.report({message:(0,Vu.getArgumentTypeMismatchMessage)(n.name,i.type,n.value),startIndex:n.value.position.start,endIndex:n.value.position.end,suggest:s})}}function IC(e,t,r){let n=(0,Vu.parseStringLiterals)(e);if(n)return n.map(a=>({message:`Replace with ${a.raw}`,fix:o=>o.replace(t,r,a.raw)}));e=e.toLowerCase();let i=(0,Vu.getDefaultValueForType)(e),s=[];return i!==""&&s.push({message:`Replace with default value '${i}' for ${e}`,fix:a=>a.replace(t,r,i)}),s.push({message:"Remove value",fix:a=>a.remove(t,r)}),s}function zK(e,t){return e.args.length==1||t.position.start==e.args[e.args.length-1].position.start}function WK(e){if(e.contentForType.value!=="block")return;let t=e.args.find(r=>r.name=="type")?.value;if(!(!t||!(0,CC.isLiquidString)(t)))return t.value}function GK(e){if((0,CC.isLiquidString)(e.snippet))return e.snippet.value}async function JK(e,t){let r=e.getDocDefinition&&await e.getDocDefinition(t);if(r?.liquidDoc?.parameters)return new Map(r.liquidDoc.parameters.map(n=>[n.name,n]))}function Ok(e,t){return r=>{let n=RC(e),i=n.slice(e.position.start,t.position.start),a=n.slice(t.position.end,e.position.end).match(/^\s*,\s*/);if(a){if(zK(e,t)){let l=i.match(/,\s*$/),f=l?t.position.start-l[0].length:t.position.start;return r.remove(f,t.position.end+a[0].replace(/\s+$/,"").length)}return r.remove(t.position.start,t.position.end+a[0].length)}let o=i.match(/,\s*$/),c=o?t.position.start-o[0].length:t.position.start;return r.remove(c,t.position.end)}}function MC(e,t){return r=>{let n=RC(e),i=`, ${t.name}: ${(0,Vu.getDefaultValueForType)(t.type)}`;if(e.args.length==0)return r.insert(e.position.end-1,i);let s=e.args[e.args.length-1],o=n.substring(s.position.end,e.position.end).match(/\s*,\s*/);return o?r.replace(s.position.end,s.position.end+o[0].length,`${i} `):r.insert(s.position.end,i)}}function RC(e){return e.source?e.source:e.args.length>0?e.args[0].source:e.type===ia.NodeTypes.ContentForMarkup?e.contentForType.source:e.snippet.source}});var FC=x(ph=>{"use strict";p();Object.defineProperty(ph,"__esModule",{value:!0});ph.DuplicateRenderSnippetArguments=void 0;var DC=G(),jC=nn();ph.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:DC.SourceCodeType.LiquidHtml,severity:DC.Severity.WARNING,schema:{},targets:[]},create(e){return{async RenderMarkup(t){let r=(0,jC.getSnippetName)(t);if(!r)return;let n=new Set,i=[];t.alias?.value&&n.add(t.alias.value);for(let s of t.args)n.has(s.name)&&i.push(s),n.add(s.name);(0,jC.reportDuplicateArguments)(e,t,i,r)}}}}});var $C=x(dh=>{"use strict";p();Object.defineProperty(dh,"__esModule",{value:!0});dh.DuplicateContentForArguments=void 0;var BC=G(),VC=nn();dh.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:BC.SourceCodeType.LiquidHtml,severity:BC.Severity.WARNING,schema:{},targets:[]},create(e){return{async ContentForMarkup(t){let r=(0,VC.getBlockName)(t);if(!r)return;let n=new Set,i=[];for(let s of t.args)n.has(s.name)&&i.push(s),n.add(s.name);(0,VC.reportDuplicateArguments)(e,t,i,r)}}}}});var HC=x(hh=>{"use strict";p();Object.defineProperty(hh,"__esModule",{value:!0});hh.EmptyBlockContent=void 0;var UC=G(),KK=Ve();hh.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:UC.SourceCodeType.LiquidHtml,severity:UC.Severity.WARNING,schema:{},targets:[]},create(e){let t=!1,r={start:0,end:0};return{async LiquidTag(n){if(n.name!=="content_for")return;let i=n.markup;typeof i=="object"&&i.contentForType.value==="blocks"&&(r.start=n.blockStartPosition.start,r.end=n.blockStartPosition.end,t=!0)},async onCodePathEnd(){let n=await(0,KK.getSchema)(e),{validSchema:i,ast:s}=n??{};if(!i||i instanceof Error||!s||s instanceof Error)return;let a=i.blocks;t&&!a?e.report({message:`The 'content_for "blocks"' tag is present, but the blocks array is not defined.`,startIndex:r.start,endIndex:r.end}):t&&a&&a.length===0&&e.report({message:`The 'content_for "blocks"' tag is present, but the blocks array is empty.`,startIndex:r.start,endIndex:r.end})}}}}});var JC=x(gh=>{"use strict";p();Object.defineProperty(gh,"__esModule",{value:!0});gh.HardcodedRoutes=void 0;var YK=ce(),zC=G(),mh=Re(),Pk={"/":"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"},GC=Object.keys(Pk).reverse();gh.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:zC.SourceCodeType.LiquidHtml,severity:zC.Severity.WARNING,schema:{},targets:[]},create(e){return{async HtmlElement(t){let r=t.attributes.filter(mh.isValuedHtmlAttribute).find(n=>((0,mh.isAttr)(n,"action")||(0,mh.isAttr)(n,"href"))&&WC(n));if(r){let n=r,i=WC(n),s=Pk[i],a=n.attributePosition.start,o=a+i.length;e.report({message:`Use routes object {{ routes.${s} }} instead of hardcoding ${i}`,startIndex:a,endIndex:o})}},async LiquidFilter(t){if(t.name!=="link_to")return;let r=t.args[0],n=r.type==="String"?r.value:"",i=GC.find(s=>s==="/"?s===n:n.startsWith(s));if(i){let s=Pk[i],a=r.position.start+1;e.report({message:`Use routes object {{ routes.${s} }} instead of hardcoding ${i}`,startIndex:a,endIndex:a+i.length})}}}}};function WC(e){if(!(0,mh.isNodeOfType)(YK.NodeTypes.TextNode,e.value[0]))return;let t=e.value[0].value;return GC.find(r=>r==="/"?r===t&&e.value.length===1:t.startsWith(r))}});var YC=x(_h=>{"use strict";p();Object.defineProperty(_h,"__esModule",{value:!0});_h.ImgWidthAndHeight=void 0;var KC=G(),yh=Re();_h.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:KC.SourceCodeType.LiquidHtml,severity:KC.Severity.ERROR,schema:{},targets:[]},create(e){return{async HtmlVoidElement(t){if(t.name==="img"){let r=t.attributes.find(s=>(0,yh.isValuedHtmlAttribute)(s)&&(0,yh.isAttr)(s,"width")),n=t.attributes.find(s=>(0,yh.isValuedHtmlAttribute)(s)&&(0,yh.isAttr)(s,"height")),i=[];if(r||i.push("width"),n||i.push("height"),i.length>0){let s=i.length===1?"attribute":"attributes";e.report({message:`Missing ${i.join(" and ")} ${s} on img tag`,startIndex:t.position.start,endIndex:t.position.end})}}}}}}});var eI=x(vh=>{"use strict";p();Object.defineProperty(vh,"__esModule",{value:!0});vh.isPropertyNode=XK;vh.getAllBlocks=ZC;var Nk=He(),QK=Hr();function XK(e){return typeof e=="object"&&e!==null}function XC(e){return e.filter(t=>t==="blocks").length>1}function QC(e,t,r,n){n.report({message:e,startIndex:t+(0,Nk.getLocStart)(r),endIndex:t+(0,Nk.getLocEnd)(r)})}async function ZK(e,t){if(e==="@theme"||e==="@app")return!0;let r=`blocks/${e}.liquid`;return await(0,QK.doesFileExist)(t,r)}async function eY(e,t,r){let n=[];if(!e)return n;let i=XC(t)?await r.getBlockSchema?.(e):await r.getSectionSchema?.(e);if(!i||i instanceof Error)return n;let{validSchema:s}=i;return!s||s instanceof Error||Array.isArray(s.blocks)&&s.blocks.forEach(a=>{!("name"in a)&&a.type!=="@app"&&n.push(a.type)}),n}async function tY(e,t,r,n,i,s,a){let o=await eY(n,i,a);if(o.length===0)return;if(!await ZK(e,a))QC(`Theme block 'blocks/${e}.liquid' does not exist.`,s,r,a);else{if(t)return;{let l=e.startsWith("_"),f=o.includes("@theme"),m=o.includes(e);if(l?m:m||f)return;{let d=XC(i)?"blocks":"sections";QC(`Block type '${e}' is not allowed in '${d}/${n}.liquid'.`,s,r,a)}}}}async function ZC(e,t,r,n,i,s){await Promise.all(Object.entries(n).map(async([a,o])=>{if(o.type){let c=i.concat(a,"type"),l=(0,Nk.nodeAtPath)(e,c);l&&await tY(o.type,o.static,l,r,i,t,s)}"blocks"in o&&await ZC(e,t,o.type,o.blocks,i.concat(a,"blocks"),s)}))}});var rI=x(bh=>{"use strict";p();Object.defineProperty(bh,"__esModule",{value:!0});bh.JSONMissingBlock=void 0;var rY=Ve(),tI=G(),qk=eI();bh.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:tI.SourceCodeType.JSON,severity:tI.Severity.ERROR,schema:{},targets:[]},create(e){return e.toRelativePath(e.file.uri).startsWith("templates/")?{async onCodePathEnd(){let r=await(0,rY.getSchemaFromJSON)(e),{ast:n}=r??{};if(!n||n instanceof Error||!r)return;let i=r.parsed.sections;i&&await Promise.all(Object.entries(i).map(async([s,a])=>{(0,qk.isPropertyNode)(a)&&"blocks"in a&&(0,qk.isPropertyNode)(a.blocks)&&"type"in a&&await(0,qk.getAllBlocks)(n,0,a.type,a.blocks,["sections",s,"blocks"],e)}))}}:{}}}});var iI=x(kh=>{"use strict";p();Object.defineProperty(kh,"__esModule",{value:!0});kh.JSONMissingSection=void 0;var Lk=He(),nY=Ve(),nI=G(),iY=Hr(),sY=["apps","_blocks"];kh.JSONMissingSection={meta:{code:"JSONMissingSection",name:"Check for missing section files in JSON templates and section groups",docs:{description:"This check ensures that section types in JSON templates and section groups refer to existing section files.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/json-missing-section"},type:nI.SourceCodeType.JSON,severity:nI.Severity.ERROR,schema:{},targets:[]},create(e){let t=e.toRelativePath(e.file.uri),r=t.startsWith("templates/"),n=t.startsWith("sections/");return!r&&!n?{}:{async onCodePathEnd(){let i=await(0,nY.getSchemaFromJSON)(e),{ast:s}=i??{};if(!s||s instanceof Error)return;let a=(0,Lk.nodeAtPath)(s,["sections"]);!a||a.type!=="Object"||await Promise.all(a.children.map(async o=>{let c=o.value;if(c.type!=="Object")return;let l=c.children.find(d=>d.key.value==="type")?.value;if(!l||l.type!=="Literal")return;let f=l.value;typeof f!="string"||sY.includes(f)||await(0,iY.doesFileExist)(e,`sections/${f}.liquid`)||e.report({message:`Section type '${f}' does not refer to an existing section file`,startIndex:(0,Lk.getLocStart)(l),endIndex:(0,Lk.getLocEnd)(l)})}))}}}}});var aI=x(Sh=>{"use strict";p();Object.defineProperty(Sh,"__esModule",{value:!0});Sh.JSONSyntaxError=void 0;var aY=yb(),sI=G(),oY=Ae();function cY(e){return("rawMessage"in e?e.rawMessage:e.message).replace(/\s+at \d+:\d+/,"")}Sh.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:sI.SourceCodeType.JSON,severity:sI.Severity.ERROR,schema:{},targets:[],deprecated:!0},create(e){if(e.validateJSON)return{};let t=e.file.ast;return(0,oY.isError)(t)?{async onCodePathStart(r){if(r.ast instanceof aY.JSONCParseErrors)for(let n of r.ast.errors)e.report({message:uY(n.error),startIndex:n.offset,endIndex:n.offset+n.length});else e.report({message:cY(t),startIndex:0,endIndex:r.source.length})}}:{}}};function uY(e){switch(e){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 uI=x(Th=>{"use strict";p();Object.defineProperty(Th,"__esModule",{value:!0});Th.LiquidFreeSettings=void 0;var lY=wu(),oI=G(),fY=Xn();Th.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:oI.SourceCodeType.LiquidHtml,severity:oI.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let r=t.source.slice(t.blockStartPosition.end,t.blockEndPosition.start),n=(0,lY.toJSONAST)(r);n instanceof Error||(0,fY.visit)(n,{Property(i,s){if(!dY(s,"settings")||!cI(i.value)||pY(s))return;let{value:a,loc:o}=i.value,c=i.key.value;typeof a=="string"&&c!=="visible_if"&&a.includes("{%")&&a.includes("%}")&&e.report({message:"Settings values cannot contain liquid logic.",startIndex:t.blockStartPosition.end+o.start.offset,endIndex:t.blockStartPosition.end+o.end.offset})}})}}}};function cI(e){return e.type==="Literal"}function pY(e){let t=e.at(-1);return!t||t.type!=="Object"?!1:t.children.some(({key:r,value:n})=>r.value!=="type"||!cI(n)?!1:n.value==="liquid")}function dY(e,t){return e.some((r,n)=>{let i=e[n-1];return(r.type==="Array"||r.type==="Object")&&i?.type==="Property"&&i.key?.value===t})}});var On=x(si=>{"use strict";p();Object.defineProperty(si,"__esModule",{value:!0});si.INVALID_SYNTAX_MESSAGE=void 0;si.getValuesInMarkup=hY;si.getFragmentsInMarkup=_Y;si.getRangeMatch=mI;si.doesFragmentContainUnsupportedParentheses=vY;si.fragmentKeyValuePair=bY;si.INVALID_SYNTAX_MESSAGE="Syntax is not supported";function hY(e){return[...e.matchAll(new RegExp(dI,"g"))].map(t=>({value:t[0],index:t.index}))}var mY='"[^"]*"',gY="'[^']*'",lI="\\s*(-?\\d+(?:\\.\\d+)?|\\w+(?:\\.\\w+)*)\\s*",Ck=`\\(\\s*${lI}(\\.{2,})\\s*${lI}\\s*\\)`,fI="[^\\s,]+",pI=`(${mY}|${gY})`,dI=`(${pI}|${Ck}|${fI})`,hI=`(\\S+):\\s*${dI}`,yY=new RegExp(`${pI}|${Ck}|${hI}|${fI}`,"g");function _Y(e){return[...e.matchAll(yY)].map(t=>({value:t[0],index:t.index}))}function mI(e){return e.match(Ck)}function vY(e){return mI(e)?!1:e.includes("(")||e.includes(")")}function bY(e){let t=e.match(new RegExp(hI));if(!t)return;let[,r,n]=t;return{key:r,value:n}}});var yI=x(Ik=>{"use strict";p();Object.defineProperty(Ik,"__esModule",{value:!0});Ik.detectMultipleAssignValues=kY;var gI=On();function kY(e){let t=/([^=]+)(=\s*)([^|]+)(?:\s*\|\s*.*)?$/m;if(e.name!=="assign")return;let r=e.markup;if(typeof r!="string")return;let n=r.match(t);if(!n)return;let[i,s,a,o]=n,c=(0,gI.getValuesInMarkup)(o).at(0)?.value;if(!c)return;let l=(d,g)=>{let v=d.indexOf(r,g);return{startIndex:v+s.length+a.length+c.length,endIndex:v+s.length+a.length+o.trimEnd().length}},{startIndex:f,endIndex:m}=l(e.source,e.position.start);if(!(m<=f)&&!(m<=f))return{message:gI.INVALID_SYNTAX_MESSAGE,startIndex:f,endIndex:m,fix:d=>{d.replace(f,m,"")}}}});var vI=x(Mk=>{"use strict";p();Object.defineProperty(Mk,"__esModule",{value:!0});Mk.detectInvalidBooleanExpressions=wY;var _I=ce(),SY=On(),TY=Re();function wY(e,t){if((0,TY.isWithinRawTagThatDoesNotParseItsContents)(t))return;let r=e.condition;if(!(r.type!==_I.NodeTypes.Comparison&&r.type!==_I.NodeTypes.LogicalExpression))return{message:SY.INVALID_SYNTAX_MESSAGE,startIndex:e.position.start,endIndex:e.position.end,fix:n=>{n.replace(e.position.start,e.position.end,e.source.slice(r.left.position.start,r.left.position.end))}}}});var bI=x(Dk=>{"use strict";p();Object.defineProperty(Dk,"__esModule",{value:!0});Dk.detectInvalidEchoValue=EY;var xY=ce(),Rk=On();function EY(e){let t=/([^|]*)(?:\s*\|\s*.*)?$/m;if(e.type===xY.NodeTypes.LiquidTag&&e.name!=="echo")return;let r=e.markup;if(typeof r!="string"||!r)return;let n=r.match(t);if(!n)return;let[,i]=n,s=(0,Rk.getValuesInMarkup)(i).at(0)?.value;if(!s){let l=e.source.indexOf(r,e.position.start),f=l+r.length;return{message:Rk.INVALID_SYNTAX_MESSAGE,startIndex:l,endIndex:f,fix:m=>{m.replace(l,f,"blank")}}}let a=(l,f)=>{let m=l.indexOf(r,f);return{startIndex:m+s.length,endIndex:m+i.trimEnd().length}},{startIndex:o,endIndex:c}=a(e.source,e.position.start);if(!(c<=o))return{message:Rk.INVALID_SYNTAX_MESSAGE,startIndex:o,endIndex:c,fix:l=>{l.replace(o,c,"")}}}});var wI=x(jk=>{"use strict";p();Object.defineProperty(jk,"__esModule",{value:!0});jk.detectInvalidConditionalNode=PY;var TI=On(),AY={logical:/^(and|or)$/,comparison:/^(==|!=|>=|<=|>|<|contains)$/,invalid:/^[@#$&]$/,literal:/^(['"][^'"]*['"]|\d+(?:\.\d+)?|true|false|nil|empty|blank)$/};function OY(e){for(let[t,r]of Object.entries(AY))if(r.test(e))return t;return"variable"}function PY(e){if(!("name"in e)||!e.name||!["if","elsif","unless"].includes(String(e.name)))return;let t=e.markup;if(typeof t!="string"||!t.trim())return;let r=CY(t);if(!r)return;let n=e.blockStartPosition||e.position,s=e.source.slice(n.start,n.end).indexOf(t);if(s<0)return;let a=n.start+s,o=a+t.length;return{message:`${TI.INVALID_SYNTAX_MESSAGE}: ${r.message}`,startIndex:a,endIndex:o,fix:c=>{c.replace(a,o,r.fix)}}}function kI(e){return e.type==="literal"||e.type==="variable"}function SI(e){return e.type==="logical"||e.type==="comparison"}function NY(e){let t=e[0];return e.length===1&&t.value==="contains"?null:t.type==="invalid"||t.type==="comparison"?{message:`Conditional cannot start with '${t.value}'. Use a variable or value instead`,fix:"false"}:null}function qY(e){for(let n=0;n<=e.length-4;n++){let[i,s,a]=e.slice(n,n+3),o=e.slice(n+3);if(kI(i)&&s.type==="comparison"&&kI(a)&&o.length>0&&o[0].type!=="logical"){let c=e.slice(0,n+3).map(m=>m.value).join(" "),l=o.map(m=>m.value).join(" ");return/&&|\|\|/.test(l)?{message:`Conditional is invalid. Anything after '${c}' will be ignored. Use 'and'/'or' instead of '&&'/'||' for multiple conditions`,fix:c}:{message:`Conditional is invalid. Anything after '${c}' will be ignored`,fix:c}}}return null}function LY(e){for(let t=0;t<e.length-1;t++){let r=e[t],n=e[t+1];if(r.type==="literal"&&!SI(n)){let i=e.slice(t+1);if(!(i[0]?.type==="variable"&&i.some(SI))){let a=i.map(c=>c.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 CY(e){let t=e.trim();if(!t)return null;let r=(0,TI.getValuesInMarkup)(t).map(({value:n})=>({value:n,type:OY(n)}));return r.length===0?null:NY(r)||qY(r)||LY(r)}});var AI=x(jo=>{"use strict";p();Object.defineProperty(jo,"__esModule",{value:!0});jo.INVALID_LOOP_RANGE_MESSAGE=void 0;jo.detectInvalidLoopRange=RY;var xI=ce(),IY=On(),MY=Re();jo.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 RY(e){if(e.type===xI.NodeTypes.LiquidTag&&!(0,MY.isLoopLiquidTag)(e))return;let t=e.markup;if(t){if(typeof t=="string")return EI(e,t);if(t.collection.type===xI.NodeTypes.Range)return EI(e,e.source.slice(t.collection.position.start,t.collection.position.end))}}function EI(e,t){let r=(0,IY.getRangeMatch)(t);if(!r||r.index===void 0)return;let[n,i,,s]=r,a=i,o=s;!isNaN(Number(i))&&Number(i)%1!==0&&(a=`${Math.trunc(Number(i))}`),!isNaN(Number(s))&&Number(s)%1!==0&&(o=`${Math.trunc(Number(s))}`);let c=`(${a}..${o})`;if(t.slice(r.index,r.index+n.length)===c)return;let f=e.source.indexOf(t,e.position.start)+r.index,m=f+n.length;return{message:jo.INVALID_LOOP_RANGE_MESSAGE,startIndex:f,endIndex:m,fix:d=>{d.replace(f,m,c)}}}});var PI=x(Bk=>{"use strict";p();Object.defineProperty(Bk,"__esModule",{value:!0});Bk.detectInvalidLoopArguments=FY;var DY=ce(),Fk=On(),jY=Re();function FY(e,t=[]){if(e.type===DY.NodeTypes.LiquidTag&&!(0,jY.isLoopLiquidTag)(e))return;let r=e.markup;if(!r)return;typeof r!="string"&&(r=r.source.slice(r.position.start,r.position.end));let n=(0,Fk.getFragmentsInMarkup)(r);if(n.length<=3)return;let i=e.source.indexOf(r,e.position.start),s=i+n.at(3).index,a=i+n.at(-1).index+n.at(-1).value.length,o=[],c=!1,l=[];for(let f=3;f<n.length;f++){let m=n[f];if((0,Fk.doesFragmentContainUnsupportedParentheses)(m.value)){c=!0,l.push(m.value);continue}let d=(0,Fk.fragmentKeyValuePair)(m.value);if(d){if(c=!0,!OI(t,e.name,d.key,!1)){l.push(m.value);continue}}else if(c||!OI(t,e.name,m.value,!0)){c=!0,l.push(m.value);continue}o.push(m.value)}if(l.length!==0)return{message:`Arguments must be provided in the format \`${e.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 OI(e,t,r,n){return e.find(i=>i.name===t)?.parameters?.some(i=>i.name===r&&i.positional===n)||!1}});var NI=x($k=>{"use strict";p();Object.defineProperty($k,"__esModule",{value:!0});$k.detectConditionalNodeUnsupportedParenthesis=BY;var Vk=On();function BY(e){if(!["if","elsif","unless"].includes(e.name)||typeof e.markup!="string"||!e.markup.trim())return;let t=e.source.indexOf(e.markup,e.position.start),n=(0,Vk.getFragmentsInMarkup)(e.markup).filter(i=>(0,Vk.doesFragmentContainUnsupportedParentheses)(i.value));if(n.length)return{message:Vk.INVALID_SYNTAX_MESSAGE,startIndex:t,endIndex:t+e.markup.length,fix:i=>{for(let s of n)i.replace(t+s.index,t+s.index+s.value.length,s.value.replace(/[\(\)]/g,""))}}}});var LI=x(zk=>{"use strict";p();Object.defineProperty(zk,"__esModule",{value:!0});zk.detectInvalidFilterName=VY;var Fo=ce(),qI=On();async function VY(e,t){if(!t)return[];if(e.type===Fo.NodeTypes.LiquidVariableOutput)return typeof e.markup=="string"?Hk(e,e.markup,t):Uk(e,e.markup,t);if(e.type===Fo.NodeTypes.LiquidTag){if(e.name===Fo.NamedTags.echo){if(typeof e.markup=="string")return Hk(e,e.markup,t);if(e.markup.type===Fo.NodeTypes.LiquidVariable)return Uk(e,e.markup,t)}if(e.name===Fo.NamedTags.assign){if(typeof e.markup=="string")return Hk(e,e.markup,t);if(e.markup.type===Fo.NodeTypes.AssignMarkup)return Uk(e,e.markup.value,t)}}return[]}async function Uk(e,t,r){let n=r,i=e.source,s=t.position.end,a=[];for(let o of t.filters){if(!n.some(d=>d.name===o.name))continue;let c=i.indexOf(o.name,o.position.start);if(c===-1)continue;let l=c+o.name.length,f=i.slice(l,s).match(/^([^\s:|]+)/)?.[1];if(!f)continue;let m=l+f.length;a.push({message:`${qI.INVALID_SYNTAX_MESSAGE} Filter '${o.name}' has trailing characters '${f}' that should be removed.`,startIndex:l,endIndex:m,fix:d=>{d.replace(l,m,"")}})}return a}async function Hk(e,t,r){let n=r,i=t.trim(),s=[],a=/\|\s*([a-zA-Z][a-zA-Z0-9_]*)/g,o=Array.from(i.matchAll(a));for(let c of o){let l=c[1];if(!n.some(_=>_.name===l))continue;let f=c.index+c[0].length,d=i.slice(f).match(/^(?!\s*(?::|$|\|\s*[a-zA-Z]|\|\s*\||\s*\|\s*(?:[}%]|$)))([^:|]+?)(?=\s*(?::|$|\|))/)?.[1];if(!d)continue;let v=e.source.indexOf(t,e.position.start)+f,b=v+d.length;s.push({message:`${qI.INVALID_SYNTAX_MESSAGE} Filter '${l}' has trailing characters '${d}' that should be removed.`,startIndex:v,endIndex:b,fix:_=>{_.replace(v,b,"")}})}return s}});var MI=x(Wk=>{"use strict";p();Object.defineProperty(Wk,"__esModule",{value:!0});Wk.detectInvalidPipeSyntax=$Y;var Bo=ce(),CI=On();async function $Y(e){if(e.type===Bo.NodeTypes.LiquidVariableOutput)return typeof e.markup!="string"?[]:II(e,e.markup);if(e.type===Bo.NodeTypes.LiquidTag){if(e.name===Bo.NamedTags.echo&&typeof e.markup!="string")return[];if(e.name===Bo.NamedTags.assign&&typeof e.markup!="string")return[];if(typeof e.markup=="string"&&(e.name===Bo.NamedTags.echo||e.name===Bo.NamedTags.assign))return II(e,e.markup)}return[]}async function II(e,t){let r=[],n=t.trim(),i=/(\|\s*){2,}/g,s=Array.from(n.matchAll(i));for(let c of s){let l=e.source.indexOf(t,e.position.start);if(l===-1)continue;let f=l+c.index,m=f+c[0].length;r.push({message:`${CI.INVALID_SYNTAX_MESSAGE}. Remove extra \`|\` character(s).`,startIndex:f,endIndex:m,fix:d=>{d.replace(f,m,"| ")}})}let a=/\s*\|\s*$/,o=n.match(a);if(o){let c=e.source.indexOf(t,e.position.start);if(c===-1)return r;let l=o.index,f=c+l,m=f+o[0].length;r.push({message:`${CI.INVALID_SYNTAX_MESSAGE}. Remove the trailing \`|\` character.`,startIndex:f,endIndex:m,fix:d=>{d.replace(f,m,"")}})}return r}});var VI=x(xh=>{"use strict";p();Object.defineProperty(xh,"__esModule",{value:!0});xh.LiquidHTMLSyntaxError=void 0;var RI=G(),Gk=Ae(),UY=yI(),HY=vI(),DI=bI(),jI=wI(),zY=AI(),WY=PI(),GY=NI(),FI=LI(),BI=MI(),wh=Re();function JY(e){return"name"in e&&e.name==="LiquidHTMLParsingError"&&"loc"in e}function KY(e,t){return e.replace(/Line \d+, col \d+:\s+/,"SyntaxError: ").replace(/(?!<expected ".+",) not .*/,` not "${t}"`)}xh.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,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-html-syntax-error"},type:RI.SourceCodeType.LiquidHtml,severity:RI.Severity.ERROR,schema:{},targets:[]},create(e){let t=e.file.ast,r=e.themeDocset?.filters(),n=e.themeDocset?.tags();return(0,Gk.isError)(t)?{async onCodePathStart(i){if(JY(t)){let{start:s,end:a}=t.loc,o=(0,Gk.getOffset)(i.source,s.line,s.column),c=(0,Gk.getOffset)(i.source,a.line,a.column);o===c&&(c+=1);let l=i.source.slice(o,c);e.report({message:KY(t.message,l),startIndex:o,endIndex:c})}else e.report({message:t.message,startIndex:0,endIndex:i.source.length})}}:{async BooleanExpression(i,s){if((0,wh.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=(0,HY.detectInvalidBooleanExpressions)(i,s);a&&e.report(a)},async LiquidTag(i,s){if((0,wh.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=[(0,UY.detectMultipleAssignValues)(i),(0,DI.detectInvalidEchoValue)(i),(0,zY.detectInvalidLoopRange)(i),(0,WY.detectInvalidLoopArguments)(i,await n)].filter(Boolean),o=(0,GY.detectConditionalNodeUnsupportedParenthesis)(i)||(0,jI.detectInvalidConditionalNode)(i);o&&a.push(o),a.forEach(e.report);let c=await(0,FI.detectInvalidFilterName)(i,await r);c.length>0&&c.forEach(f=>e.report(f));let l=await(0,BI.detectInvalidPipeSyntax)(i);l.length>0&&l.forEach(f=>e.report(f))},async LiquidBranch(i,s){if((0,wh.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=(0,jI.detectInvalidConditionalNode)(i);a&&e.report(a)},async LiquidVariableOutput(i,s){if((0,wh.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=await(0,FI.detectInvalidFilterName)(i,await r);a.length>0&&a.forEach(l=>e.report(l));let o=await(0,BI.detectInvalidPipeSyntax)(i);o.length>0&&o.forEach(l=>e.report(l));let c=(0,DI.detectInvalidEchoValue)(i);c&&e.report(c)}}}}});var HI=x(Eh=>{"use strict";p();Object.defineProperty(Eh,"__esModule",{value:!0});Eh.MatchingTranslations=void 0;var $I=G(),UI=new Set(["zero","one","two","few","many","other"]);Eh.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:$I.SourceCodeType.JSON,severity:$I.Severity.ERROR,schema:{},targets:[]},create(e){let t=new Set,r=new Set,n=new Map,i=e.file,s=i.uri,a=e.toRelativePath(s),o=i.ast,c=a.startsWith("locales/"),l=s.endsWith(".default.json")||s.endsWith(".default.schema.json"),f=s.endsWith(".schema.json");if(!c||l||o instanceof Error)return{};let m=()=>t.size>0,d=({type:A})=>A==="Literal",g=A=>UI.has(A.key.value),v=A=>A.startsWith("shopify.")||A.startsWith("customer_accounts."),b=A=>t.has(A)??!1,_=A=>[...UI].some(O=>A.endsWith(O)),k=A=>Object.keys(A).reduce((P,q)=>{if(typeof A[q]!="object")return P.concat(q);let B=A[q],M=k(B);return P.concat(M.map(L=>`${q}.${L}`))},[]),w=A=>A.filter(O=>O.type==="Property").reduce((O,P)=>O.concat(P.key.value),[]).join("."),T=(A,O)=>{let P=Math.min(A.length,O.length);for(let q=0;q<P;q++)if(A[q]!==O[q])return q;return P},y=A=>{let O=A.split("."),P="",q=0;for(let B of n.keys()){let M=B.split("."),L=T(M,O);L>q&&(q=L,P=B)}return n.get(P)??o};return{async onCodePathStart(){let O=await(f?e.getDefaultSchemaTranslations:e.getDefaultTranslations)().then(k);O.forEach(Set.prototype.add,t),O.forEach(Set.prototype.add,r)},async Property(A,O){let P=w(O.concat(A));if(n.set(P,A),!!m()&&!g(A)&&d(A.value)&&!v(P)){if(b(P)){r.delete(P);return}e.report({message:`A default translation for '${P}' does not exist`,startIndex:A.loc.start.offset,endIndex:A.loc.end.offset,suggest:[{message:"Delete unneeded translation key",fix(q){q.remove(P)}}]})}},async onCodePathEnd(){r.forEach(A=>{let O=y(A);_(A)||v(A)||e.report({message:`The translation for '${A}' is missing`,startIndex:O.loc.start.offset,endIndex:O.loc.end.offset,fix(P){P.add(A,"TODO")}})})}}}}});var WI=x(Ah=>{"use strict";p();Object.defineProperty(Ah,"__esModule",{value:!0});Ah.MissingAsset=void 0;var zI=G(),Jk=Hr(),YY=Re();Ah.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:zI.SourceCodeType.LiquidHtml,severity:zI.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidVariable(t){if(t.filters.length===0||t.filters[0].name!=="asset_url"||!(0,YY.isLiquidString)(t.expression))return;let r=t.expression,n=`assets/${r.value}`,i=n,s=await(0,Jk.doesFileExist)(e,i);s||i.endsWith(".scss.css")&&(i=i.replace(".scss.css",".scss.liquid"),s=await(0,Jk.doesFileExist)(e,i),s)||(i.endsWith(".js")||i.endsWith(".css"))&&(i+=".liquid",s=await(0,Jk.doesFileExist)(e,i),s)||e.report({message:`'${n}' does not exist`,startIndex:r.position.start,endIndex:r.position.end})}}}}});var JI=x(Oh=>{"use strict";p();Object.defineProperty(Oh,"__esModule",{value:!0});Oh.MissingContentForArguments=void 0;var GI=G(),Kk=nn();Oh.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:GI.SourceCodeType.LiquidHtml,severity:GI.Severity.WARNING,schema:{},targets:[]},create(e){return{async ContentForMarkup(t){let r=(0,Kk.getBlockName)(t);if(!r)return;let n=await(0,Kk.getLiquidDocParams)(e,`blocks/${r}.liquid`);if(!n)return;let i=new Map(t.args.map(a=>[a.name,a])),s=Array.from(n.values()).filter(a=>a.required&&!i.has(a.name));(0,Kk.reportMissingArguments)(e,t,s,r)}}}}});var YI=x(Ph=>{"use strict";p();Object.defineProperty(Ph,"__esModule",{value:!0});Ph.MissingRenderSnippetArguments=void 0;var KI=G(),Yk=nn();Ph.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:KI.SourceCodeType.LiquidHtml,severity:KI.Severity.WARNING,schema:{},targets:[]},create(e){return{async RenderMarkup(t){let r=(0,Yk.getSnippetName)(t);if(!r)return;let n=await(0,Yk.getLiquidDocParams)(e,`snippets/${r}.liquid`);if(!n)return;let i=new Map(t.args.map(a=>[a.name,a])),s=Array.from(n.values()).filter(a=>a.required&&!i.has(a.name)&&a.name!==t.alias?.value);(0,Yk.reportMissingArguments)(e,t,s,r)}}}}});var QI=x(qh=>{"use strict";p();Object.defineProperty(qh,"__esModule",{value:!0});qh.MissingTemplate=void 0;var Qk=ce(),QY=Xw(),Nh=G(),XY=Hr(),ZY={ignoreMissing:Nh.SchemaProp.array(Nh.SchemaProp.string(),[])};qh.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:Nh.SourceCodeType.LiquidHtml,severity:Nh.Severity.ERROR,schema:ZY,targets:[]},create(e){let t=i=>typeof i.markup!="string";function r(i){return e.settings.ignoreMissing.some(s=>(0,QY.minimatch)(i,s))}async function n(i,{position:s}){await(0,XY.doesFileExist)(e,i)||r(i)||e.report({message:`'${i}' does not exist`,startIndex:s.start,endIndex:s.end})}return{async RenderMarkup(i){if(i.snippet.type===Qk.NodeTypes.VariableLookup||i.snippet.type===Qk.NodeTypes.Range)return;let s=i.snippet,a=`snippets/${s.value}.liquid`;await n(a,s)},async LiquidTag(i){if(!t(i)||i.name!==Qk.NamedTags.section)return;let s=i.markup.name,a=`sections/${s.value}.liquid`;await n(a,s)}}}}});var ZI=x(Lh=>{"use strict";p();Object.defineProperty(Lh,"__esModule",{value:!0});Lh.OrphanedSnippet=void 0;var eQ=Ve(),XI=G();Lh.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:XI.SourceCodeType.LiquidHtml,severity:XI.Severity.WARNING,schema:{},targets:[]},create(e){return{async onCodePathEnd(){let{getReferences:t}=e;if(!t)return;let r=e.file.uri;(0,eQ.isSnippet)(r)&&(await t(r)).length===0&&e.report({message:"This snippet is not referenced by any other files",startIndex:0,endIndex:1})}}}}});var rM=x(Ih=>{"use strict";p();Object.defineProperty(Ih,"__esModule",{value:!0});Ih.PaginationSize=void 0;var Xk=ce(),Ch=G(),eM=Ae(),tM=Re(),tQ=He(),rQ={minSize:Ch.SchemaProp.number(1),maxSize:Ch.SchemaProp.number(250)};Ih.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:Ch.SourceCodeType.LiquidHtml,severity:Ch.Severity.WARNING,schema:rQ,targets:[]},create(e){let t=e.settings.minSize,r=e.settings.maxSize,n=[],i=[];function s(a,o,c=`Pagination size must be a positive integer between ${t} and ${r}.`){t<=o&&o<=r||e.report({message:c,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,tM.isNodeOfType)(Xk.NodeTypes.VariableLookup,o)?i.push(o):(0,tM.isNodeOfType)(Xk.NodeTypes.Number,o)&&s(o,Number(o.value))},async LiquidRawTag(a){if(a.name==="schema"){let o=(0,tQ.parseJSON)(a.body.value);if((0,eM.isError)(o))return;o.settings&&Array.isArray(o.settings)&&(n=o.settings)}},async onCodePathEnd(){i.forEach(a=>{let o=(0,eM.last)(a.lookups);if(o===void 0||o.type!==Xk.NodeTypes.String)return;let c=o.value,l=n.find(f=>f.id===c);if(l!==void 0){if(l.default===void 0){e.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 ${t} and ${r} but is currently ${l.default}.`)}})}}}}});var iM=x(Vo=>{"use strict";p();Object.defineProperty(Vo,"__esModule",{value:!0});Vo.scriptTagSuggestion=Vo.liquidFilterSuggestion=void 0;var nQ=Ae(),nM=e=>`Use an HTML script tag with the ${e} attribute instead`,iQ=(e,t,r,n)=>({message:nM(e),fix(i){let a=`{{ ${t.source.slice(r.expression.position.start,(0,nQ.last)(r.filters,-1)?.position.end??t.position.start)} }}`;i.replace(n.position.start,n.position.end,`<script src="${a}" ${e}></script>`)}});Vo.liquidFilterSuggestion=iQ;var sQ=(e,t)=>({message:nM(e),fix(r){r.insert(t.blockStartPosition.end-1,` ${e}`)}});Vo.scriptTagSuggestion=sQ});var oM=x(Rh=>{"use strict";p();Object.defineProperty(Rh,"__esModule",{value:!0});Rh.ParserBlockingScript=void 0;var sM=ce(),aM=G(),Zk=Ae(),ai=Re(),Mh=iM();Rh.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:aM.SourceCodeType.LiquidHtml,severity:aM.Severity.ERROR,schema:{},targets:[]},create(e){return{LiquidFilter:async(t,r)=>{if(t.name!=="script_tag")return;let i=t.source.slice(t.position.start,t.position.end).indexOf("script_tag"),s=(0,Zk.last)(r),a=(0,Zk.last)(r,-1);e.report({message:"The script_tag filter is parser-blocking. Use a <script> tag with async or defer for better performance",startIndex:t.position.start+i,endIndex:t.position.end,suggest:a&&a.type===sM.NodeTypes.LiquidVariableOutput&&s&&s.type===sM.NodeTypes.LiquidVariable&&(0,Zk.last)(s.filters)===t?[(0,Mh.liquidFilterSuggestion)("defer",t,s,a),(0,Mh.liquidFilterSuggestion)("async",t,s,a)]:void 0})},HtmlRawNode:async t=>{if(t.name!=="script"||!t.attributes.filter(ai.isValuedHtmlAttribute).some(s=>(0,ai.isAttr)(s,"src")))return;let n=t.attributes.filter(ai.isHtmlAttribute).some(s=>(0,ai.isAttr)(s,"async")||(0,ai.isAttr)(s,"defer")),i=t.attributes.filter(ai.isValuedHtmlAttribute).some(s=>(0,ai.isAttr)(s,"type")&&((0,ai.hasAttributeValueOf)(s,"module")||(0,ai.hasAttributeValueOf)(s,"importmap")));n||i||e.report({message:"Avoid parser blocking scripts by adding `defer` or `async` on this tag",startIndex:t.position.start,endIndex:t.position.end,suggest:[(0,Mh.scriptTagSuggestion)("defer",t),(0,Mh.scriptTagSuggestion)("async",t)]})}}}}});var lM=x(Fh=>{"use strict";p();Object.defineProperty(Fh,"__esModule",{value:!0});Fh.SchemaPresetsBlockOrder=void 0;var Dh=He(),aQ=Ve(),cM=G();Fh.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:cM.SourceCodeType.LiquidHtml,severity:cM.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let r=t.blockStartPosition.end,n=await(0,aQ.getSchema)(e),{validSchema:i,ast:s}=n??{};if(!i||i instanceof Error||!s||s instanceof Error)return;let a=i.presets;a&&a.forEach((o,c)=>{"blocks"in o&&o.blocks&&uM(o,e,r,s,["presets",String(c)])})}}}};function uM(e,t,r,n,i){if("blocks"in e&&typeof e.blocks=="object"&&e.blocks){let s="block_order"in e?e.block_order:void 0;s||oQ(e)&&jh(t,r,n,i,"block_order is missing",!1),s?.forEach((a,o)=>{if(!e.blocks||!Array.isArray(e.blocks)&&!e.blocks[a]){let c=i.concat(["block_order"]).concat([String(o)]);jh(t,r,n,c,`block '${a}' is missing from 'blocks'`)}});for(let[a,o]of Object.entries(e.blocks)){if(o.static){if(Array.isArray(s)&&s.includes(a)){let c=i.concat(["block_order"]);jh(t,r,n,c,`static block '${a}' cannot be in the block_order`)}}else if(Array.isArray(s)&&!s.includes(a)){let c=i.concat(["block_order"]);jh(t,r,n,c,`block '${a}' is missing from the block_order`)}o.blocks&&(i.push("blocks",a),uM(o,t,r,n,i))}}}function oQ(e){return"blocks"in e&&typeof e.blocks=="object"&&e.blocks!==null&&!Array.isArray(e.blocks)?Object.entries(e.blocks).some(([t,r])=>r.static!==!0):!1}function jh(e,t,r,n,i,s=!0){let a=(0,Dh.nodeAtPath)(r,n),o=s?t+(0,Dh.getLocStart)(a):t+(0,Dh.getLocEnd)(a)-1,c=t+(0,Dh.getLocEnd)(a);e.report({message:i,startIndex:o,endIndex:c})}});var Bh=x(e0=>{"use strict";p();Object.defineProperty(e0,"__esModule",{value:!0});e0.isContentForBlock=cQ;function cQ(e){return typeof e=="string"?!1:e.contentForType.value==="block"}});var pM=x(Vh=>{"use strict";p();Object.defineProperty(Vh,"__esModule",{value:!0});Vh.SchemaPresetsStaticBlocks=void 0;var t0=ce(),$o=He(),uQ=Ve(),fM=G(),lQ=Bh();Vh.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:fM.SourceCodeType.LiquidHtml,severity:fM.Severity.ERROR,schema:{},targets:[]},create(e){let t=[],r=[],n=0;function i(){r.forEach(s=>{t.some(a=>a.id===s.id&&a.type===s.type)||e.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!==t0.NamedTags.content_for||!(0,lQ.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!==t0.NodeTypes.String)return;let c=o.value;a?.type===t0.NodeTypes.String&&t.push({id:a.value,type:c})},async LiquidRawTag(s){if(s.name==="schema"&&s.body.kind==="json"){n=s.blockStartPosition.end;let a=await(0,uQ.getSchema)(e),{validSchema:o,ast:c}=a??{};if(!o||o instanceof Error||!c||c instanceof Error)return;let l=o.presets;if(!l)return;l.forEach((f,m)=>{if("blocks"in f&&f.blocks){let d=["presets",m,"blocks"];Array.isArray(f.blocks)?f.blocks.forEach((g,v)=>{if(g.static===!0&&g.id){let b=(0,$o.nodeAtPath)(c,d.concat([v]));r.push({id:g.id,type:g.type,startIndex:n+(0,$o.getLocStart)(b),endIndex:n+(0,$o.getLocEnd)(b)})}}):typeof f.blocks=="object"&&Object.entries(f.blocks).forEach(([g,v])=>{if(v.static===!0){let b=(0,$o.nodeAtPath)(c,d.concat(g));r.push({id:g,type:v.type,startIndex:n+(0,$o.getLocStart)(b),endIndex:n+(0,$o.getLocEnd)(b)})}})}})}},async onCodePathEnd(){i()}}}}});var gM=x(Uh=>{"use strict";p();Object.defineProperty(Uh,"__esModule",{value:!0});Uh.RemoteAsset=void 0;var Qt=G(),Uo=Re(),fQ=Ae(),pQ=["img","link","source","script"],dQ=["fonts.shopifycdn.com","cdn.shopify.com"],hQ=["stylesheet_tag","script_tag","image_tag","img_tag"],hM=["product_img_url","article_img_url","collection_img_url","img_url"],mM=["asset_url","image_url","asset_img_url","file_img_url","file_url","global_asset_url","shopify_asset_url","external_video_url","font_url"],mQ="canonical_url";function r0(e){return e.type===Qt.LiquidHtmlNodeTypes.LiquidVariableOutput}function n0(e){return typeof e!="string"&&e.type===Qt.LiquidHtmlNodeTypes.LiquidVariable}function gQ(e){return e.startsWith("#")}function dM(e){return/^data:/i.test(e)}function $u(e){return e.replace(/[“”‘’]/g,"")}function yQ(e){let t=e.value[0];if(!t||!r0(t))return!1;let r=t.markup;return n0(r)?r.expression.type===Qt.LiquidHtmlNodeTypes.VariableLookup:!1}function $h(e,t=[]){if(/^\/cdn\//.test(e))return!0;try{let r=new URL(e);return[...dQ,...t].includes(r.hostname)}catch{return!1}}function _Q(e,t=[]){return e.value.some(r=>{if(r.type===Qt.LiquidHtmlNodeTypes.TextNode&&/^(https?:)?\/\//.test($u(r.value))&&!$h($u(r.value),t))return!0;if(r0(r)){let n=r.markup;if(n0(n)){let i=n.expression;if(i.type===Qt.LiquidHtmlNodeTypes.String&&/^https?:\/\//.test(i.value)&&!$h(i.value,t))return!0}}return!1})}function vQ(e){let t=[...hM,...mM],r=[mQ];return e.value.some(n=>!r0(n)||!n0(n.markup)?!1:!!(n.markup.filters.some(s=>t.includes(s.name))||(0,Uo.isNodeOfType)(Qt.LiquidHtmlNodeTypes.VariableLookup,n.markup.expression)&&n.markup.expression.name&&r.includes(n.markup.expression.name)))}function bQ(e){return e.map(t=>{try{return new URL(t).hostname.replace(/^www\./,"")}catch{return}}).filter(t=>t!==void 0)}var kQ={allowedDomains:Qt.SchemaProp.array(Qt.SchemaProp.string()).optional()};Uh.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:Qt.SourceCodeType.LiquidHtml,severity:Qt.Severity.WARNING,schema:kQ,targets:[]},create(e){let t=bQ(e.settings.allowedDomains||[]);function r(i){let s=(0,Uo.getHtmlNodeName)(i);if(!s||!pQ.includes(s))return;let a=i.attributes.filter(Uo.isValuedHtmlAttribute).find(m=>(0,Uo.isAttr)(m,"src")||(0,Uo.isAttr)(m,"href"));if(!a)return;let o=a.value.find(m=>m.type===Qt.LiquidHtmlNodeTypes.TextNode);if(o&&gQ($u(o.value))||o&&dM($u(o.value))||yQ(a)||a.value.filter(m=>m.type===Qt.LiquidHtmlNodeTypes.TextNode).some(m=>$h($u(m.value),t)))return;if(_Q(a,t)){e.report({message:"Asset should be served by the Shopify CDN for better performance.",startIndex:a.position.start,endIndex:a.position.end});return}vQ(a)||e.report({message:"Use one of the asset_url filters to serve assets for better performance.",startIndex:a.position.start,endIndex:a.position.end})}function n(i,s){let a=i.name;if(!hQ.includes(a))return;let o=(0,fQ.last)(s);if(!o||!(0,Uo.isNodeOfType)(Qt.LiquidHtmlNodeTypes.LiquidVariable,o)||o.filters.some(f=>hM.includes(f.name)||mM.includes(f.name)))return;let l=o.expression;l.type===Qt.LiquidHtmlNodeTypes.String&&dM(l.value)||(l.type===Qt.LiquidHtmlNodeTypes.String&&!$h(l.value,t)&&e.report({message:"Asset should be served by the Shopify CDN for better performance.",startIndex:l.position.start,endIndex:l.position.end}),e.report({message:"Use one of the asset_url filters to serve assets for better performance.",startIndex:o.expression.position.start,endIndex:i.position.end}))}return{async HtmlVoidElement(i){r(i)},async HtmlSelfClosingElement(i){r(i)},async HtmlRawNode(i){r(i)},async LiquidFilter(i,s){n(i,s)}}}}});var _M=x(zh=>{"use strict";p();Object.defineProperty(zh,"__esModule",{value:!0});zh.RequiredLayoutThemeObject=void 0;var Hh=G(),yM=Re(),SQ=/^layout\/[^/]+\.liquid$/i;zh.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:Hh.SourceCodeType.LiquidHtml,severity:Hh.Severity.ERROR,schema:{},targets:[Hh.ConfigTarget.All,Hh.ConfigTarget.Recommended]},create(e){if(!SQ.test(e.toRelativePath(e.file.uri)))return{};let t=["content_for_header","content_for_layout"],r=new Set,n,i;function s(a){a.name&&t.includes(a.name)&&r.add(a.name)}return{async VariableLookup(a){s(a)},async HtmlElement(a){(0,yM.isHtmlTag)(a,"head")?n=a:(0,yM.isHtmlTag)(a,"body")&&(i=a)},async onCodePathEnd(){for(let a of t)if(!r.has(a)){let o=`The required object '{{ ${a} }}' is missing in layout/theme.liquid`,c=a==="content_for_header"?n:i,l=c?.blockEndPosition.start;e.report({message:o,startIndex:c?.position.start??0,endIndex:c?.position.end??0,fix:l!==void 0?f=>f.insert(l,`{{ ${a} }}`):void 0})}}}}}});var bM=x(Wh=>{"use strict";p();Object.defineProperty(Wh,"__esModule",{value:!0});Wh.ReservedDocParamNames=void 0;var TQ=ce(),vM=G(),wQ=new Set(Object.keys(TQ.LiquidLiteralValues));Wh.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:vM.SourceCodeType.LiquidHtml,severity:vM.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidDocParamNode(t){let r=t.paramName.value;wQ.has(r)&&e.report({message:`The parameter name '${r}' is reserved because Liquid parses it as a literal.`,startIndex:t.paramName.position.start,endIndex:t.paramName.position.end})}}}}});var SM=x(Jh=>{"use strict";p();Object.defineProperty(Jh,"__esModule",{value:!0});Jh.StaticStylesheetAndJavascriptTags=void 0;var Gh=ce(),kM=G();Jh.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:kM.SourceCodeType.LiquidHtml,severity:kM.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="stylesheet"&&t.name!=="javascript")return;let r=t.body.nodes.filter(n=>n.type===Gh.NodeTypes.LiquidVariableOutput||n.type===Gh.NodeTypes.LiquidTag||n.type===Gh.NodeTypes.LiquidRawTag);for(let n of r){let i=t.name==="stylesheet"?"CSS":"JavaScript",s=n.type===Gh.NodeTypes.LiquidVariableOutput?"variable":"tag";e.report({message:`Liquid ${s} found in ${i} block. {% ${t.name} %} tags should only contain static ${i} code.`,startIndex:n.position.start,endIndex:n.position.end})}}}}}});var xM=x(Kh=>{"use strict";p();Object.defineProperty(Kh,"__esModule",{value:!0});Kh.TranslationKeyExists=void 0;var xQ=He(),TM=G(),EQ=Ae();function wM(e,t){for(let r of e.split(".")){if(typeof t!="object"||!t.hasOwnProperty(r))return!1;t=t[r]}return!0}Kh.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:TM.SourceCodeType.LiquidHtml,severity:TM.Severity.ERROR,schema:{},targets:[]},create(e){let t=[],r;return{async LiquidVariable(n){n.expression.type==="String"&&n.filters.some(({name:i})=>["t","translate"].includes(i))&&t.push({translationKey:n.expression.value,startIndex:n.expression.position.start,endIndex:n.expression.position.end})},async LiquidRawTag(n){if(n.name!=="schema"||n.body.kind!=="json")return;let i=await e.getDefaultLocale(),s=(0,xQ.parseJSON)(n.body.value);(0,EQ.isError)(s)&&s instanceof SyntaxError||(r=s.locales?.[i])},async onCodePathEnd(){let n=await e.getDefaultTranslations(),i=await e.getDefaultLocale(),s=await e.themeDocset?.systemTranslations(),a=Object.keys(s??{});!n&&a.length===0||t.forEach(({translationKey:o,startIndex:c,endIndex:l})=>{if(wM(o,n)||wM(o,r)||a.includes(o))return;let f=`'${o}' does not have a matching entry in 'locales/${i}.default.json'`;r&&(f+=` or '${e.toRelativePath(e.file.uri)}'`),e.report({message:f,startIndex:c,endIndex:l})})}}}}});var qM=x(Qh=>{"use strict";p();Object.defineProperty(Qh,"__esModule",{value:!0});Qh.UnclosedHTMLElement=void 0;var Ye=ce(),EM=G(),i0=Ae(),AM=Re();Qh.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:EM.SourceCodeType.LiquidHtml,severity:EM.Severity.WARNING,schema:{},targets:[]},create(e){let t=new Map;return{async HtmlElement(r,n){if(AQ(r))return;let[i,s]=(0,i0.findLastAndIndex)(n,AM.isLiquidBranch);if(!i)return;let a=n[s-1],o=n[s-2];if(!a||!o||a.type!==Ye.NodeTypes.LiquidTag)return;t.has(o)||t.set(o,{open:new Map,close:new Map,identifiers:new Set});let c=t.get(o),l=OM(i,a);c.identifiers.add(l),c.open.has(l)||c.open.set(l,[]),c.open.get(l).push(r)},async HtmlDanglingMarkerClose(r,n){let[i,s]=(0,i0.findLastAndIndex)(n,AM.isLiquidBranch);if(!i)return;let a=n[s-1],o=n[s-2];if(!a||!o||a.type!==Ye.NodeTypes.LiquidTag)return;t.has(o)||t.set(o,{open:new Map,close:new Map,identifiers:new Set});let c=t.get(o),l=OM(i,a);c.identifiers.add(l),c.close.has(l)||c.close.set(l,[]),c.close.get(l).push(r)},async onCodePathEnd(){for(let[r,n]of t){let i=new Map;for(let c of n.identifiers){let l=n.open.get(c)??[],f=n.close.get(c)??[],m=[].concat(l,f).sort((d,g)=>d.position.start-g.position.start);i.set(c,NM(m))}let s=[].concat(...i.values()).sort((c,l)=>c.position.start-l.position.start),a=NM(s),o=new Set(a);for(let[c,l]of i)for(let f of l)o.has(f)&&(f.type===Ye.NodeTypes.HtmlDanglingMarkerClose?e.report({message:`Closing tag does not have a matching opening tag for condition \`${c}\` in ${r.type} '${Yh(r)}'`,startIndex:f.position.start,endIndex:f.position.end}):e.report({message:`Opening tag does not have a matching closing tag for condition \`${c}\` in ${r.type} '${Yh(r)}'`,startIndex:f.blockStartPosition.start,endIndex:f.blockStartPosition.end}))}}}}};function AQ(e){return e.blockEndPosition.start!==e.blockEndPosition.end}function OM(e,t){if(e.name===null)switch(t.name){case Ye.NamedTags.if:return Xt(t.markup);case Ye.NamedTags.unless:return PM(Xt(t.markup));default:return"??"}switch(e.name){case"else":switch(t.name){case Ye.NamedTags.if:return PM(Xt(t.markup));case Ye.NamedTags.unless:return Xt(t.markup);case Ye.NamedTags.case:return`case ${Xt(t.markup)}`;default:return"??"}case Ye.NamedTags.elsif:return Xt(e.markup);case Ye.NamedTags.when:return t.name!==Ye.NamedTags.case?"??":`case ${Xt(t.markup)} == ${OQ(e.markup)}`;default:return"??"}}function OQ(e){return typeof e=="string"?e:e.map(Xt).join(" or ")}function Xt(e){if(typeof e=="string")return e;switch(e.type){case Ye.NodeTypes.String:return"'"+e.value+"'";case Ye.NodeTypes.LiquidLiteral:return e.value===null?"null":e.value.toString();case Ye.NodeTypes.Number:return e.value;case Ye.NodeTypes.VariableLookup:return`${e.name??""}${e.lookups.map(t=>`[${Xt(t)}]`)}`;case Ye.NodeTypes.Range:return`(${Xt(e.start)}..${Xt(e.end)})`;case Ye.NodeTypes.Comparison:return[Xt(e.left),e.comparator,Xt(e.right)].join(" ");case Ye.NodeTypes.LogicalExpression:return[Xt(e.left),e.relation,Xt(e.right)].join(" ");default:return(0,i0.assertNever)(e)}}function PM(e){return e.startsWith("-")?e.slice(1):`-${e}`}function NM(e){let t=[];for(let r of e)r.type===Ye.NodeTypes.HtmlElement?t.push(r):t.length>0&&Yh(r)===Yh(t.at(-1))&&t.at(-1).type===Ye.NodeTypes.HtmlElement&&r.type===Ye.NodeTypes.HtmlDanglingMarkerClose?t.pop():t.push(r);return t}function Yh(e){return e.type===Ye.NodeTypes.HtmlElement||e.type===Ye.NodeTypes.HtmlDanglingMarkerClose?e.name.length===0?"":e.source.slice(e.name.at(0).position.start,e.name.at(-1).position.end):e.type===Ye.NodeTypes.LiquidTag?e.name:e.type}});var s0=x(Xh=>{"use strict";p();Object.defineProperty(Xh,"__esModule",{value:!0});Xh.hasLiquidDoc=PQ;Xh.extractDocDefinition=NQ;var CM=Xn();function PQ(e){let t=!1;return(0,CM.visit)(e,{LiquidRawTag(r){r.name==="doc"&&(t=!0)}}),t}function NQ(e,t){let r=!1,n=(0,CM.visit)(t,{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:LM(o.content.value.trim()),nodeType:"example"}},LiquidDocDescriptionNode(o){return{content:LM(o.content.value.trim()),nodeType:"description"}}});if(!r)return{uri:e};let{parameters:i,examples:s,description:a}=n.reduce((o,c)=>(c.nodeType==="param"?o.parameters.push(c):c.nodeType==="example"?o.examples.push(c):c.nodeType==="description"&&!o.description&&(o.description=c),o),{parameters:[],examples:[],description:void 0});return{uri:e,liquidDoc:{...i.length&&{parameters:i},...s.length&&{examples:s},...a&&{description:a}}}}function LM(e){let t=e.split(`
81
- `);if(t.length<=1)return e;let n=t.slice(1).filter(s=>s.trim().length>0).map(s=>{let a=s.match(/^\s*/);return a?a[0].length:0});if(n.length===0)return e;let i=Math.min(...n);return[t[0],...t.slice(1).map(s=>s.trim().length===0?s:s.slice(i))].join(`
82
- `)}});var FM=x(Pn=>{"use strict";p();var qQ=Pn&&Pn.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),LQ=Pn&&Pn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),CQ=Pn&&Pn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&qQ(r,t,n[i]);return LQ(r,t),r}})();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.UndefinedObject=void 0;var sa=ce(),IQ=ei(),MQ=CQ(bn()),RQ=Ve(),IM=G(),MM=Ae(),DQ=s0(),RM=Re();Pn.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:IM.SourceCodeType.LiquidHtml,severity:IM.Severity.WARNING,schema:{},targets:[]},create(e){let t=e.toRelativePath(e.file.uri),r=e.file.ast;if((0,MM.isError)(r))return{};if(t.startsWith("snippets/")&&!(0,DQ.hasLiquidDoc)(r))return{};if(!e.themeDocset)return{};let n=e.themeDocset,i=new Map,s=new Set(FQ(t)),a=[];function o(c,l){if(!c)return;let f=i.get(c)??[];i.set(c,f.concat(l))}return{async LiquidDocParamNode(c){let l=c.paramName?.value;l&&s.add(l)},async LiquidTag(c,l){(0,RM.isWithinRawTagThatDoesNotParseItsContents)(l)||(zQ(c)&&o(c.markup.name,{start:c.blockStartPosition.end}),jM(c)&&o(c.markup.name,{start:c.blockEndPosition?.end}),["form","paginate"].includes(c.name)&&o(c.name,{start:c.blockStartPosition.end,end:c.blockEndPosition?.start}),c.name==="layout"&&o("none",{start:c.position.start,end:c.position.end}),(JQ(c)||KQ(c))&&c.markup.name!==null&&o(c.markup.name,{start:c.position.start}),(WQ(c)||GQ(c))&&(o(c.markup.variableName,{start:c.blockStartPosition.end,end:c.blockEndPosition?.start}),o(c.name==="for"?"forloop":"tablerowloop",{start:c.blockStartPosition.end,end:c.blockEndPosition?.start})))},async VariableLookup(c,l){if((0,RM.isWithinRawTagThatDoesNotParseItsContents)(l))return;let f=(0,MM.last)(l);HQ(f)&&jM(f)||a.push(c)},async onCodePathEnd(){(await jQ(n,t,e.mode)).forEach(l=>s.add(l.name)),(await BQ(e)).forEach(l=>s.add(l)),a.forEach(l=>{!l.name||$Q(l.name,l.position,s,i)||e.report({message:`Unknown object '${l.name}' used.`,startIndex:l.position.start,endIndex:l.position.end})})}}}};async function jQ(e,t,r="theme"){let n=await e.objects(),i=VQ(t,r);return n.filter(({access:a,name:o})=>i.includes(o)||!a||a.global===!0||a.template.length>0)}function FQ(e){return e.startsWith("blocks/")?[IQ.BLOCK_CONTENT_PARAMETER]:[]}async function BQ(e){return(0,RQ.isBlock)(e.file.uri)?[...(await e.getBlockParameters(MQ.basename(e.file.uri,".liquid")))?.keys()??[]]:[]}var DM=["app","section","recommendations","block"];function VQ(e,t="theme"){return e.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"]:e.startsWith("sections/")?["section","predictive_search","recommendations","comment"]:e.startsWith("blocks/")?DM:e.startsWith("snippets/")?t==="app"?DM:["app","section","block"]:[]}function $Q(e,t,r,n){if(r.has(e))return!0;let i=n.get(e);return i?i.some(s=>UQ(t,s)):!1}function UQ(e,t){let r=e.start,n=!t.start||r>t.start,i=!t.end||r<t.end;return n&&i}function HQ(e){return e?.type===sa.NodeTypes.LiquidTag}function jM(e){return e.name===sa.NamedTags.capture}function zQ(e){return e.name===sa.NamedTags.assign&&typeof e.markup!="string"}function WQ(e){return e.name===sa.NamedTags.for&&typeof e.markup!="string"}function GQ(e){return e.name===sa.NamedTags.tablerow&&typeof e.markup!="string"}function JQ(e){return e.name===sa.NamedTags.increment&&typeof e.markup!="string"}function KQ(e){return e.name===sa.NamedTags.decrement&&typeof e.markup!="string"}});var VM=x(Zh=>{"use strict";p();Object.defineProperty(Zh,"__esModule",{value:!0});Zh.UniqueDocParamNames=void 0;var BM=G();Zh.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:BM.SourceCodeType.LiquidHtml,severity:BM.Severity.ERROR,schema:{},targets:[]},create(e){let t=new Set;return{async LiquidDocParamNode(r){let n=r.paramName.value;if(!t.has(n)){t.add(n);return}e.report({message:`The parameter '${n}' is defined more than once.`,startIndex:r.paramName.position.start,endIndex:r.paramName.position.end})}}}}});var em=x(Mi=>{"use strict";p();Object.defineProperty(Mi,"__esModule",{value:!0});Mi.CLOSEST_ARGUMENT=Mi.REQUIRED_CONTENT_FOR_ARGUMENTS=Mi.RESERVED_CONTENT_FOR_ARGUMENTS=void 0;Mi.RESERVED_CONTENT_FOR_ARGUMENTS=["attributes","block","blocks","class","context","inherit","resource","resources","schema","section","sections","settings","snippet","snippets","src","style","styles","template","templates"];Mi.REQUIRED_CONTENT_FOR_ARGUMENTS=["id","type"];Mi.CLOSEST_ARGUMENT="closest."});var HM=x(tm=>{"use strict";p();Object.defineProperty(tm,"__esModule",{value:!0});tm.UniqueStaticBlockId=void 0;var a0=ce(),$M=G(),UM=em(),YQ=Bh(),QQ=new Set([...UM.REQUIRED_CONTENT_FOR_ARGUMENTS,...UM.RESERVED_CONTENT_FOR_ARGUMENTS]);tm.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:$M.SourceCodeType.LiquidHtml,severity:$M.Severity.ERROR,schema:{},targets:[]},create(e){let t=new Set;return{async LiquidTag(r){if(r.name!==a0.NamedTags.content_for||!(0,YQ.isContentForBlock)(r.markup))return;let n=r.markup.args.find(f=>f.name==="id");if(!n)return;let i=n.value;if(i.type!==a0.NodeTypes.String)return;let s=i.value,a=r.markup.args.filter(f=>!QQ.has(f.name)),o=[];for(let f of a){if(f.value.type!==a0.NodeTypes.String)return;o.push(`${f.name}=${f.value.value}`)}o.sort();let c=o.join(","),l=`${s}::${c}`;t.has(l)?e.report({message:`The id '${s}' is already being used by another static block`,startIndex:i.position.start,endIndex:i.position.end,suggest:[]}):t.add(l)}}}}});var WM=x(rm=>{"use strict";p();Object.defineProperty(rm,"__esModule",{value:!0});rm.UnknownFilter=void 0;var zM=G();rm.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:zM.SourceCodeType.LiquidHtml,severity:zM.Severity.ERROR,schema:{},targets:[]},create(e){return e.themeDocset?{async LiquidFilter(t){(await e.themeDocset.filters()).some(n=>n.name===t.name)||e.report({message:`Unknown filter '${t.name}' used.`,startIndex:t.position.start+1,endIndex:t.position.end})}}:{}}}});var JM=x(nm=>{"use strict";p();Object.defineProperty(nm,"__esModule",{value:!0});nm.UnrecognizedContentForArguments=void 0;var GM=G(),o0=nn(),c0=em();nm.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:GM.SourceCodeType.LiquidHtml,severity:GM.Severity.WARNING,schema:{},targets:[]},create(e){let t=new Set([...c0.RESERVED_CONTENT_FOR_ARGUMENTS,...c0.REQUIRED_CONTENT_FOR_ARGUMENTS]);return{async ContentForMarkup(r){let n=(0,o0.getBlockName)(r);if(!n)return;let i=await(0,o0.getLiquidDocParams)(e,`blocks/${n}.liquid`);if(!i)return;let s=r.args.filter(a=>!i.has(a.name)).filter(a=>!t.has(a.name)).filter(a=>!a.name.startsWith(c0.CLOSEST_ARGUMENT));(0,o0.reportUnknownArguments)(e,r,s,n)}}}}});var YM=x(im=>{"use strict";p();Object.defineProperty(im,"__esModule",{value:!0});im.UnrecognizedRenderSnippetArguments=void 0;var KM=G(),u0=nn();im.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:KM.SourceCodeType.LiquidHtml,severity:KM.Severity.WARNING,schema:{},targets:[]},create(e){function t(r,n,i){let s=r.alias,a=r.variable;if(s&&!n.has(s.value)&&a){let o=a.position.start;e.report({message:`Unknown argument '${s.value}' in render tag for snippet '${i}'.`,startIndex:o,endIndex:s.position.end,suggest:[{message:`Remove '${s.value}'`,fix:c=>{if(a)return c.remove(a.position.start-1,s.position.end)}}]})}}return{async RenderMarkup(r){let n=(0,u0.getSnippetName)(r);if(!n)return;let i=await(0,u0.getLiquidDocParams)(e,`snippets/${n}.liquid`);if(!i)return;let s=r.args.filter(a=>!i.has(a.name));t(r,i,n),(0,u0.reportUnknownArguments)(e,r,s,n)}}}}});var f0=x(Dt=>{"use strict";p();Object.defineProperty(Dt,"__esModule",{value:!0});Dt.offsetAdjust=Dt.adjustedSuffix=Dt.adjustedPrefix=Dt.variableExpressionMatcher=void 0;Dt.getVariableLookupsInExpression=eX;Dt.validateLookup=tX;Dt.getGlobalSettings=nX;var l0=ce(),XQ=He(),ZQ=Xn();Dt.variableExpressionMatcher=/{{(.+?)}}/;Dt.adjustedPrefix="{% if ";Dt.adjustedSuffix=" %}{% endif %}";Dt.offsetAdjust=2-Dt.adjustedPrefix.length;function eX(e){let t=Dt.variableExpressionMatcher.exec(e);if(t==null)return{warning:'Invalid visible_if expression. It should take the form "{{ <expression> }}".'};let r=t[1],n=`${Dt.adjustedPrefix}${r}${Dt.adjustedSuffix}`;try{let i=(0,l0.toLiquidHtmlAST)(n,{mode:"strict",allowUnclosedDocumentNode:!1});if(i.children.length!==1)throw new Error("Unexpected child count for DocumentNode");let s=i.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:"Syntax error: cannot parse visible_if expression."};if(a.type===l0.NodeTypes.LiquidLiteral&&["true","false"].includes(a.keyword))return null;let o=(0,ZQ.visit)(s,{VariableLookup:c=>c});return o.length===0?{warning:"visible_if expression contains no references to any settings. This is likely an error."}:o}catch(i){return i instanceof SyntaxError?{warning:"Syntax error: cannot parse visible_if expression."}:{warning:String(i)}}}function tX(e,t){let r=rX(e),n=[],i=t;for(;r.length>0;){let s=r.shift();n.push(s);let a=i[s];if(!a)return`Invalid variable: "${n.join(".")}" was not found.`;if(typeof a=="boolean")return r.length>0?`Invalid variable: "${n.join(".")}" refers to a variable, but is being used here as a namespace.`:null;i=a}return`Invalid variable: "${n.join(".")}" refers to a namespace, but is being used here as a variable.`}function rX(e){let t=e.lookups.map(r=>{if(r.type!==l0.NodeTypes.String)throw new Error(`Expected lookups to be String nodes: ${JSON.stringify(r)}`);return r.value});return[e.name,...t]}async function nX(e){let t=[];try{let r=e.toUri("config/settings_schema.json"),n=await e.fs.readFile(r),i=(0,XQ.parseJSON)(n);if(Array.isArray(i))for(let s of i)"settings"in s&&Array.isArray(s.settings)&&t.push(...s.settings.map(a=>a.id).filter(a=>a))}catch(r){console.error("Error fetching global settings:",r)}return t}});var eR=x(am=>{"use strict";p();Object.defineProperty(am,"__esModule",{value:!0});am.UnusedAssign=void 0;var ZM=ce(),QM=G(),iX=Ve(),XM=Re(),sX=f0();am.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:QM.SourceCodeType.LiquidHtml,severity:QM.Severity.WARNING,schema:{},targets:[]},create(e){let t=new Map,r=new Set;function n(i){i.type===ZM.NodeTypes.VariableLookup&&r.add(i.name)}return{async LiquidTag(i,s){(0,XM.isWithinRawTagThatDoesNotParseItsContents)(s)||(aX(i)||sm(i)&&i.markup.name)&&t.set(i.markup.name,i)},async VariableLookup(i,s){if((0,XM.isWithinRawTagThatDoesNotParseItsContents)(s))return;let a=s.at(-1);a&&sm(a)||n(i)},async LiquidRawTag(i){if(i.name!=="schema"||i.body.kind!=="json")return;let a=(await(0,iX.getSchema)(e))?.validSchema;if(!(!a||a instanceof Error))for(let o of a.settings??[]){if(!("visible_if"in o)||typeof o.visible_if!="string")continue;let c=(0,sX.getVariableLookupsInExpression)(o.visible_if);if(!(!c||"warning"in c))for(let l of c)l.name&&r.add(l.name)}},async onCodePathEnd(){for(let[i,s]of t.entries())!r.has(i)&&!i.startsWith("_")&&e.report({message:`The variable '${i}' is assigned but not used`,startIndex:sm(s)?s.blockStartPosition.start:s.position.start,endIndex:sm(s)?s.blockStartPosition.end:s.position.end,suggest:[{message:`Remove the unused variable '${i}'`,fix:a=>a.remove(s.position.start,s.position.end)}]})}}}};function aX(e){return e.name==="assign"&&typeof e.markup!="string"}function sm(e){return e.type==ZM.NodeTypes.LiquidTag&&e.name==="capture"&&typeof e.markup!="string"}});var rR=x(om=>{"use strict";p();Object.defineProperty(om,"__esModule",{value:!0});om.UnsupportedDocTag=void 0;var tR=G(),oX=Ni();om.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:tR.SourceCodeType.LiquidHtml,severity:tR.Severity.ERROR,schema:{},targets:[]},create(e){return(0,oX.filePathSupportsLiquidDoc)(e.file.uri)?{}:{async LiquidRawTag(r){r.name==="doc"&&e.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:n=>n.remove(r.position.start,r.position.end)}]})}}}}});var iR=x(cm=>{"use strict";p();Object.defineProperty(cm,"__esModule",{value:!0});cm.UnsupportedFilterArguments=void 0;var p0=ce(),nR=G(),cX=[p0.NamedTags.render,p0.NamedTags.include,p0.NamedTags.content_for];function uX(e){let t=null;for(let r=0;r<e.length;r++){let n=e[r];if(t){n===t&&(t=null);continue}if(n==="'"||n==='"'){t=n;continue}if(n==="|")return r}return-1}cm.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:nR.SourceCodeType.LiquidHtml,severity:nR.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidTag(t){if(!cX.includes(t.name)||typeof t.markup!="string")return;let r=uX(t.markup);if(r===-1)return;let n=t.source.indexOf(t.markup,t.position.start);if(n===-1)return;let i=n+r,s=n+t.markup.length;e.report({message:`Filters cannot be used on arguments passed to the '${t.name}' tag. Apply the filter beforehand (e.g. with {% assign %}) and pass the result instead.`,startIndex:i,endIndex:s})}}}}});var aR=x(um=>{"use strict";p();Object.defineProperty(um,"__esModule",{value:!0});um.UnusedDocParam=void 0;var lX=ce(),sR=G(),fX=Re();um.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:sR.SourceCodeType.LiquidHtml,severity:sR.Severity.WARNING,schema:{},targets:[]},create(e){let t=new Map,r=new Set;return{async LiquidDocParamNode(n){t.set(n.paramName.value,n)},async VariableLookup(n,i){n.type===lX.NodeTypes.VariableLookup&&n.name&&!(0,fX.isLoopScopedVariable)(n.name,i)&&r.add(n.name)},async onCodePathEnd(){for(let[n,i]of t.entries())r.has(n)||e.report({message:`The parameter '${n}' is defined but not used in this file.`,startIndex:i.position.start,endIndex:i.position.end,suggest:[{message:`Remove unused parameter '${n}'`,fix:s=>s.remove(i.position.start,i.position.end)}]})}}}}});var cR=x(lm=>{"use strict";p();Object.defineProperty(lm,"__esModule",{value:!0});lm.ValidContentForArguments=void 0;var pX=ce(),oR=G(),d0=em();lm.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:oR.SourceCodeType.LiquidHtml,severity:oR.Severity.ERROR,schema:{},targets:[]},create(e){let t={blocks:r=>{let n=r.args.filter(i=>!i.name.startsWith(d0.CLOSEST_ARGUMENT));for(let i of n)e.report({message:`{% content_for "blocks" %} only accepts 'closest.*' arguments`,startIndex:i.position.start,endIndex:i.position.end})},block:r=>{for(let i of d0.REQUIRED_CONTENT_FOR_ARGUMENTS){let s=r.args.find(o=>o.name===i);if(!s){e.report({message:`{% content_for "block" %} requires a '${i}' argument`,startIndex:r.position.start,endIndex:r.position.end,suggest:[]});continue}let a=s.value;a.type!==pX.NodeTypes.String&&e.report({message:`The '${i}' argument should be a string`,startIndex:a.position.start,endIndex:a.position.end,suggest:[]})}let n=r.args.filter(i=>d0.RESERVED_CONTENT_FOR_ARGUMENTS.includes(i.name));for(let i of n)e.report({message:`{% content_for "block" %} doesn't support '${i.name}' because it's a reserved argument.`,startIndex:i.position.start,endIndex:i.position.end})}};return{async LiquidTag(r){if(r.name!=="content_for"||typeof r.markup=="string")return;let n=r.markup.contentForType.value,i=t[n];i&&i(r.markup)}}}}});var lR=x(pm=>{"use strict";p();Object.defineProperty(pm,"__esModule",{value:!0});pm.ValidContentForArgumentTypes=void 0;var uR=G(),fm=nn();pm.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:uR.SourceCodeType.LiquidHtml,severity:uR.Severity.WARNING,schema:{},targets:[]},create(e){return{async ContentForMarkup(t){let r=(0,fm.getBlockName)(t);if(!r)return;let n=await(0,fm.getLiquidDocParams)(e,`blocks/${r}.liquid`);if(!n)return;let i=(0,fm.findTypeMismatchParams)(n,t.args);(0,fm.reportTypeMismatches)(e,i,n)}}}}});var dR=x(dm=>{"use strict";p();Object.defineProperty(dm,"__esModule",{value:!0});dm.ValidBlockTarget=void 0;var h0=He(),dX=Ve(),fR=G(),Mr=Ae();dm.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:fR.SourceCodeType.LiquidHtml,severity:fR.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let r=t.blockStartPosition.end,n=await(0,dX.getSchema)(e),{validSchema:i,ast:s}=n??{};if(!i||i instanceof Error||!s||s instanceof Error||!n)return;let{staticBlockDefs:a}=n,{rootLevelThemeBlocks:o,rootLevelLocalBlocks:c,presetLevelBlocks:l,defaultLevelBlocks:f,hasRootBlocksDeclaration:m}=(0,Mr.getBlocks)(i);if(c.length>0)return;let d=!1;if(await Promise.all(o.map(async({node:g,path:v})=>{let b=(0,h0.nodeAtPath)(s,v);await(0,Mr.validateBlockFileExistence)(g.type,e)||(d=!0,(0,Mr.reportWarning)(m0(g.type),r,b,e))})),!d){for(let[g,v]of Object.entries(l))parseInt(g,10)===0&&await Promise.all(v.map(async({node:_,path:k})=>{let w=(0,h0.nodeAtPath)(s,k),T="id"in _?_.id:k.at(-2),y=!!_.static;if((0,Mr.isInvalidPresetBlock)(T,_,o,a,m)){let O=y?`Could not find a static block of type "${_.type}" with id "${T}" in this file.`:pR(_);(0,Mr.reportWarning)(O,r,w,e)}await(0,Mr.validateBlockFileExistence)(_.type,e)?"blocks"in _&&_.blocks&&await(0,Mr.validateNestedBlocks)(e,_,_.blocks,k.slice(0,-1),r,s):(0,Mr.reportWarning)(m0(_.type),r,w,e)}));await Promise.all(f.map(async({node:g,path:v})=>{let b=(0,h0.nodeAtPath)(s,v);(0,Mr.isInvalidDefaultBlock)(g,o,m)&&(0,Mr.reportWarning)(pR(g),r,b,e),await(0,Mr.validateBlockFileExistence)(g.type,e)||(0,Mr.reportWarning)(m0(g.type),r,b,e)}))}}}}};function pR(e){return e.type.startsWith("_")?`Theme block type "${e.type}" is a private block so it must be explicitly allowed in "blocks" at the root of this schema.`:`Theme block type "${e.type}" must be allowed in "blocks" at the root of this schema.`}function m0(e){return`Theme block 'blocks/${e}.liquid' does not exist.`}});var gR=x(hm=>{"use strict";p();Object.defineProperty(hm,"__esModule",{value:!0});hm.ValidScopedCSSClass=void 0;var hR=G(),hX=Id(),Uu=$p(),g0=Kp();async function mR(e,t,r){let n=new Set;try{let i=t("assets"),a=(await e.readDirectory(i)).filter(([c])=>c.endsWith(".css")).map(([c])=>c),o=await Promise.all(a.map(c=>r(c)));for(let c of o)for(let l of c)n.add(l)}catch{}return n}async function mX(e,t,r){let n=new Set,i=await mR(e,t,r);for(let s of i)n.add(s);try{let s=t(""),a=await(0,hX.recursiveReadDirectory)(e,s,([c])=>c.endsWith(".liquid")),o=await Promise.all(a.map(c=>r(c)));for(let c of o)for(let l of c)n.add(l)}catch{}return n}hm.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:hR.SourceCodeType.LiquidHtml,severity:hR.Severity.WARNING,schema:{},targets:[]},create(e){let t=new Set,r=[];return{async LiquidRawTag(n){if(n.name==="stylesheet")for(let i of(0,Uu.extractCSSClassNames)(n.body.value))t.add(i)},async HtmlElement(n){(0,Uu.collectUsedClasses)(n.attributes,r)},async HtmlVoidElement(n){(0,Uu.collectUsedClasses)(n.attributes,r)},async HtmlSelfClosingElement(n){(0,Uu.collectUsedClasses)(n.attributes,r)},async HtmlRawNode(n){n.name==="svg"&&(0,Uu.collectUsedClassesFromSvg)(n.attributes,n.body.value,n.body.position.start,r)},async onCodePathEnd(){if(r.length===0)return;let{getReferences:n,getDependencies:i,getCSSClassesForURI:s,fs:a,toUri:o}=e;if(!n||!i||!s)return;let c=new Set(t),l=await mR(a,o,s);for(let k of l)c.add(k);let f=await(0,g0.getAncestorUris)(e.file.uri,n),m=await Promise.all(f.map(k=>s(k)));for(let k of m)for(let w of k)c.add(w);let d=[e.file.uri,...f],g=[];for(let k of d){let w=await(0,g0.getRenderedSnippetUris)(k,i);g.push(...w)}let v=await(0,g0.getAllSnippetDescendantUris)(g,i),b=await Promise.all(v.map(k=>s(k)));for(let k of b)for(let w of k)c.add(w);let _=await mX(a,o,s);for(let{className:k,startIndex:w,endIndex:T}of r)_.has(k)&&!c.has(k)&&e.report({message:`CSS class '${k}' may be defined outside the scope of this file.`,startIndex:w,endIndex:T})}}}}});var _R=x(mm=>{"use strict";p();Object.defineProperty(mm,"__esModule",{value:!0});mm.ValidHTMLTranslation=void 0;var yR=G(),gX=ce();mm.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:yR.SourceCodeType.JSON,severity:yR.Severity.WARNING,schema:{},targets:[]},create(e){return e.toRelativePath(e.file.uri).startsWith("locales/")?{async Literal(r){let n=/<[^>]+>/;if(!(typeof r.value!="string"||!n.test(r.value)))try{(0,gX.toLiquidHtmlAST)(r.value)}catch(i){let s=r.loc,a={message:`${i}.`,startIndex:s.start.offset,endIndex:s.end.offset};e.report(a)}}}:{}}}});var bR=x(gm=>{"use strict";p();Object.defineProperty(gm,"__esModule",{value:!0});gm.ValidJSON=void 0;var vR=G();gm.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:vR.SourceCodeType.JSON,severity:vR.Severity.ERROR,schema:{},targets:[]},create(e){if(!e.validateJSON)return{};let t=e.validateJSON;return{async onCodePathStart(r){let n=await t(r.uri,r.source);if(n)for(let i of n)e.report(i)}}}}});var TR=x(ym=>{"use strict";p();Object.defineProperty(ym,"__esModule",{value:!0});ym.ValidDocParamTypes=void 0;var kR=G(),y0=Ni();ym.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:kR.SourceCodeType.LiquidHtml,severity:kR.Severity.ERROR,schema:{},targets:[]},create(e){let t=e.themeDocset?.liquidDrops().then(n=>new Set((0,y0.getValidParamTypes)(n).keys()));async function r(n){return yX(n)?(0,y0.parseStringLiterals)(n)!==void 0:t?(0,y0.parseParamType)(await t,n)!==void 0:!0}return{async LiquidDocParamNode(n){let{paramType:i}=n;!i||await r(i.value)||e.report({message:`The parameter type '${i.value}' is not supported.`,startIndex:i.position.start-1,endIndex:i.position.end+1,suggest:[{message:"Remove invalid parameter type",fix:s=>{let[a,o]=_X(n.source,i);s.replace(a,o," ")}}]})}}}};function yX(e){return/['"|]/.test(e)}function _X(e,t){let r=t.position.start-1,n=t.position.end+1;for(;SR(e.charAt(r-1));)r--;for(;SR(e.charAt(n));)n++;return[r,n]}function SR(e){return e===" "||e===" "}});var xR=x(_m=>{"use strict";p();Object.defineProperty(_m,"__esModule",{value:!0});_m.getBlocks=vX;_m.reportWarning=bX;var wR=He();function vX(e){let t=[],r=[],n=[],i=e.blocks,s=e.presets;function a(o,c,l=!1){if(!o)return;let f="static"in o,m="name"in o;f?t.push({node:o,path:c.concat("type")}):m&&!l?r.push({node:o,path:c.concat("type")}):o.type!=="@app"&&n.push({node:o,path:c.concat("type")}),"blocks"in o&&(Array.isArray(o.blocks)?o.blocks.forEach((d,g)=>{a(d,c.concat("blocks",String(g)),l)}):typeof o.blocks=="object"&&o.blocks!==null&&Object.entries(o.blocks).forEach(([d,g])=>{a(g,c.concat("blocks",d),l)}))}return Array.isArray(i)&&i.forEach((o,c)=>{a(o,["blocks",String(c)])}),s&&s.forEach((o,c)=>{"blocks"in o&&o.blocks&&(Array.isArray(o.blocks)?o.blocks.forEach((l,f)=>{a(l,["presets",String(c),"blocks",String(f)],!0)}):typeof o.blocks=="object"&&Object.entries(o.blocks).forEach(([l,f])=>{a(f,["presets",String(c),"blocks",l],!0)}))}),{staticBlockLocations:t,localBlockLocations:r,themeBlockLocations:n,hasRootLevelThemeBlocks:n.some(o=>o.path[0]==="blocks")}}function bX(e,t,r,n){n.report({message:e,startIndex:t+(0,wR.getLocStart)(r),endIndex:t+(0,wR.getLocEnd)(r)})}});var OR=x(bm=>{"use strict";p();Object.defineProperty(bm,"__esModule",{value:!0});bm.ValidLocalBlocks=void 0;var ER=G(),_0=He(),kX=Ve(),AR=Ve(),vm=xR();bm.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:ER.SourceCodeType.LiquidHtml,severity:ER.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let r=t.blockStartPosition.end,n=await(0,kX.getSchema)(e),{validSchema:i,ast:s}=n??{};if(!i||i instanceof Error||!s||s instanceof Error||!n)return;let{staticBlockLocations:a,localBlockLocations:o,themeBlockLocations:c,hasRootLevelThemeBlocks:l}=(0,vm.getBlocks)(i);(0,AR.isSection)(e.file.uri)&&(a.length>0&&o.length>0&&a.forEach(f=>{let m=(0,_0.nodeAtPath)(s,f.path);(0,vm.reportWarning)("Sections cannot use static theme blocks together with locally scoped blocks.",r,m,e)}),l&&o.length>0&&c.length>0&&o.forEach(f=>{let m=(0,_0.nodeAtPath)(s,f.path);(0,vm.reportWarning)("Sections cannot use theme blocks together with locally scoped blocks.",r,m,e)})),(0,AR.isBlock)(e.file.uri)&&o.length>0&&o.forEach(f=>{let m=(0,_0.nodeAtPath)(s,f.path);(0,vm.reportWarning)("Local scoped blocks are not supported in theme blocks.",r,m,e)})}}}}});var NR=x(Sm=>{"use strict";p();Object.defineProperty(Sm,"__esModule",{value:!0});Sm.ValidRenderSnippetArgumentTypes=void 0;var PR=G(),km=Ni(),Hu=nn();Sm.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:PR.SourceCodeType.LiquidHtml,severity:PR.Severity.WARNING,schema:{},targets:[]},create(e){let t;async function r(i,s){if(!i.alias||!i.variable?.name)return;let a=s.get(i.alias.value)?.type;if(!a)return;let o=i.variable.name;await n(a,(0,km.checkArgumentType)(a,o))&&e.report({message:(0,km.getArgumentTypeMismatchMessage)(i.alias.value,a,o),startIndex:o.position.start,endIndex:o.position.end,suggest:(0,Hu.generateTypeMismatchSuggestions)(a,o.position.start,o.position.end)})}async function n(i,s){switch(s.kind){case"incompatible":return!0;case"named-type":return e.themeDocset?(t??=e.themeDocset.liquidDrops().then(a=>new Set((0,km.getValidParamTypes)(a).keys())),(0,km.parseParamType)(await t,i)!==void 0):!0;case"compatible":case"unchecked":return!1}}return{async RenderMarkup(i){let s=(0,Hu.getSnippetName)(i);if(!s)return;let a=await(0,Hu.getLiquidDocParams)(e,`snippets/${s}.liquid`);if(!a)return;await r(i,a);let o=(0,Hu.findTypeMismatchParams)(a,i.args);(0,Hu.reportTypeMismatches)(e,o,a)}}}}});var LR=x(Tm=>{"use strict";p();Object.defineProperty(Tm,"__esModule",{value:!0});Tm.ValidSchema=void 0;var qR=G();Tm.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:qR.SourceCodeType.LiquidHtml,severity:qR.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json"||!e.validateJSON)return;let r=t.source.slice(t.blockStartPosition.end,t.blockEndPosition.start),n=await e.validateJSON(e.file.uri,r);if(n)for(let i of n)e.report({message:i.message,startIndex:t.blockStartPosition.end+i.startIndex,endIndex:t.blockStartPosition.end+i.endIndex})}}}}});var MR=x(wm=>{"use strict";p();Object.defineProperty(wm,"__esModule",{value:!0});wm.ValidSchemaName=void 0;var v0=He(),SX=Ve(),CR=G(),TX=Ae(),IR=25;wm.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:CR.SourceCodeType.LiquidHtml,severity:CR.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let r=t.blockStartPosition.end,n=await(0,SX.getSchema)(e),{validSchema:i,ast:s}=n??{};if(!i||i instanceof Error||!s||s instanceof Error)return;let a=i.name;if(!a)return;let o=(0,v0.nodeAtPath)(s,["name"]),c=r+(0,v0.getLocStart)(o),l=r+(0,v0.getLocEnd)(o);if(a.startsWith("t:")){let f=await e.getDefaultLocale(),m=a.replace("t:",""),d=await e.getDefaultSchemaTranslations(),g=(0,TX.deepGet)(d,m.split("."));g!==void 0&&g.length>IR&&e.report({message:`Schema name '${g}' from 'locales/${f}.default.schema.json' is too long (max 25 characters)`,startIndex:c,endIndex:l})}else a.length>IR&&e.report({message:`Schema name '${a}' is too long (max 25 characters)`,startIndex:c,endIndex:l})}}}}});var jR=x(xm=>{"use strict";p();Object.defineProperty(xm,"__esModule",{value:!0});xm.ValidSchemaTranslations=void 0;var RR=He(),wX=Ve(),DR=G(),xX=Ae();xm.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:DR.SourceCodeType.LiquidHtml,severity:DR.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let r=t.blockStartPosition.end,n=await(0,wX.getSchema)(e),{ast:i}=n??{};if(!i||i instanceof Error)return;let s=await e.getDefaultLocale(),a=await e.getDefaultSchemaTranslations(),o=b0(i);for(let{value:c,node:l}of o){let f=c.replace("t:","");if((0,xX.deepGet)(a,f.split("."))===void 0){let d=r+(0,RR.getLocStart)(l),g=r+(0,RR.getLocEnd)(l);e.report({message:`'${c}' does not have a matching entry in 'locales/${s}.default.schema.json'`,startIndex:d,endIndex:g})}}}}}};function b0(e){let t=[];switch(e.type){case"Literal":{typeof e.value=="string"&&e.value.startsWith("t:")&&t.push({value:e.value,node:e});break}case"Object":{for(let r of e.children)t.push(...b0(r.value));break}case"Array":{for(let r of e.children)t.push(...b0(r));break}case"Property":case"Identifier":break}return t}});var UR=x(Om=>{"use strict";p();Object.defineProperty(Om,"__esModule",{value:!0});Om.ValidSettingsKey=void 0;var FR=G(),Em=He(),BR=Ve(),$R=Ae();Om.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:FR.SourceCodeType.LiquidHtml,severity:FR.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidRawTag(t){if(t.name!=="schema"||t.body.kind!=="json")return;let r=t.blockStartPosition.end,n=await(0,BR.getSchema)(e),{validSchema:i,ast:s}=n??{};if(!i||i instanceof Error||!s||s instanceof Error)return;let{rootLevelLocalBlocks:a,presetLevelBlocks:o}=(0,$R.getBlocks)(i);if(i.presets)for(let c=0;c<i.presets.length;c++){let l=(0,Em.nodeAtPath)(s,["presets",c,"settings"]);Am(e,r,l,i.settings)}if((0,BR.isSectionSchema)(n)&&"default"in i&&i.default){let c=(0,Em.nodeAtPath)(s,["default","settings"]);Am(e,r,c,i.settings),await Promise.all((i.default.blocks??[]).map((l,f)=>{let m=(0,Em.nodeAtPath)(s,["default","blocks",f,"settings"]);return VR(e,r,m,a,l)}))}for(let[c,l]of Object.entries(o))await Promise.all(l.map(({node:f,path:m})=>{let d=(0,Em.nodeAtPath)(s,m.slice(0,-1).concat("settings"));return VR(e,r,d,a,f)}))}}}};async function VR(e,t,r,n,i){if(n.length>0){let s=n.find(o=>o.node.type===i.type);if(!s)return;let a=s.node;Am(e,t,r,a.settings)}else{let s=await e.getBlockSchema?.(i.type),{validSchema:a}=s??{};if(!a||a instanceof Error)return;Am(e,t,r,a.settings,i)}}function Am(e,t,r,n,i){if(!(!r||r.type!=="Object")){for(let s of r.children)if(!n?.find(o=>o?.id===s.key.value)){let o=i?`Setting '${s.key.value}' does not exist in 'blocks/${i.type}.liquid'.`:`Setting '${s.key.value}' does not exist in schema.`;(0,$R.reportWarning)(o,t,s.key,e)}}}});var KR=x(Pm=>{"use strict";p();Object.defineProperty(Pm,"__esModule",{value:!0});Pm.ValidStandardEventData=void 0;var aa=ce(),HR=G(),EX="standard_event_data",zR="context",WR="view",k0={product:["page","search","collection","dialog","recommendation"],cart:["page","dialog"]},AX=["collection"],OX=[...new Set(Object.values(k0).flat())];function GR(e,t){return e.type===aa.NodeTypes.VariableLookup?!1:e.type!==aa.NodeTypes.String||!t.includes(e.value)}function JR(e){return e.type===aa.NodeTypes.String?` '${e.value}'`:""}function PX(e,t){if(t?.type!==aa.NodeTypes.LiquidVariable||t.filters[0]!==e)return;let r=t.expression;if(r.type===aa.NodeTypes.VariableLookup&&!(r.lookups.length>0))return r.name??void 0}Pm.ValidStandardEventData={meta:{code:"ValidStandardEventData",name:"Prevent the use of invalid arguments to the standard_event_data filter",docs:{description:"This check is aimed at preventing the use of invalid arguments for the standard_event_data filter.",url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-standard-event-data",recommended:!0},type:HR.SourceCodeType.LiquidHtml,severity:HR.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidFilter(t,r){if(t.name!==EX)return;let n=t.args.find(c=>c.type!==aa.NodeTypes.NamedArgument);n&&GR(n,[WR])&&e.report({message:`Unsupported event type${JR(n)}. The only supported event type is '${WR}'.`,startIndex:n.position.start,endIndex:n.position.end});let i=PX(t,r[r.length-1]);if(i&&AX.includes(i))return;let a=t.args.find(c=>c.type===aa.NodeTypes.NamedArgument&&c.name===zR)?.value;if(!a)return;let o=i&&k0[i]||OX;if(GR(a,o)){let c=i&&k0[i]?` for ${i}`:"";e.report({message:`Unsupported context${JR(a)}${c}. Valid values: ${o.join(", ")}. The '${zR}' argument can also be omitted.`,startIndex:a.position.start,endIndex:a.position.end})}}}}}});var QR=x(Nm=>{"use strict";p();Object.defineProperty(Nm,"__esModule",{value:!0});Nm.ValidStaticBlockType=void 0;var NX=ce(),YR=G(),qX=Hr(),LX=Bh();Nm.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:YR.SourceCodeType.LiquidHtml,severity:YR.Severity.ERROR,schema:{},targets:[]},create(e){return{async LiquidTag(t){if(t.name!=="content_for"||!(0,LX.isContentForBlock)(t.markup))return;let r=t.markup.args.find(o=>o.name==="type");if(!r)return;let n=r.value;if(n.type!==NX.NodeTypes.String)return;let i=n.value,s=`blocks/${i}.liquid`;await(0,qX.doesFileExist)(e,s)||e.report({message:`'blocks/${i}.liquid' does not exist`,startIndex:n.position.start,endIndex:n.position.end,suggest:[]})}}}}});var ZR=x(zo=>{"use strict";p();Object.defineProperty(zo,"__esModule",{value:!0});zo.ValidVisibleIfSettingsSchema=zo.ValidVisibleIf=void 0;var CX=ce(),T0=G(),S0=He(),Ho=Ve(),IX=Ae(),Nn=f0(),XR={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:T0.Severity.ERROR,schema:{},targets:[]};zo.ValidVisibleIf={meta:{...XR,type:T0.SourceCodeType.LiquidHtml},create(e){let t={},r;return{async LiquidTag(n){MX(n)&&(t[n.markup.name]=!0)},async LiquidRawTag(n){n.name!=="schema"||n.body.kind!=="json"||(r=n)},async onCodePathEnd(){if(!r)return;let n=await(0,Ho.getSchema)(e),{validSchema:i,ast:s}=n??{};if(!i||i instanceof Error||!i.settings?.some(f=>"visible_if"in f)||!s||s instanceof Error)return;let a=r.blockStartPosition.end,o=Object.fromEntries((await(0,Nn.getGlobalSettings)(e)).map(f=>[f,!0])),c=Object.fromEntries(i.settings.map(f=>[f.id,!0])),l={...t,settings:o};(0,Ho.isSectionSchema)(n)?l.section={settings:c}:(0,Ho.isBlockSchema)(n)&&(l.block={settings:c});for(let[f,m]of i.settings.entries()){if(!("visible_if"in m)||typeof m.visible_if!="string")continue;let d=(0,S0.nodeAtPath)(s,["settings",f,"visible_if"]),g=(0,Nn.getVariableLookupsInExpression)(m.visible_if);if(g===null)continue;if("warning"in g){(0,IX.reportWarning)(g.warning,a,d,e);continue}let v=(b,_)=>{typeof b=="string"&&e.report({message:b,startIndex:a+(0,S0.getLocStart)(d)+_.position.start+Nn.offsetAdjust+1,endIndex:a+(0,S0.getLocStart)(d)+_.position.end+Nn.offsetAdjust+1})};for(let b of g)b.name==="section"&&(0,Ho.isBlockSchema)(n)||(b.name==="section"&&!(0,Ho.isSectionSchema)(n)?v(`Invalid visible_if: can't refer to "section" when not in a section or block file.`,b):b.name==="block"&&!(0,Ho.isBlockSchema)(n)?v(`Invalid visible_if: can't refer to "block" when not in a block file.`,b):v((0,Nn.validateLookup)(b,l),b))}}}}};function MX(e){return e.type===CX.NodeTypes.LiquidTag&&e.name==="assign"&&typeof e.markup!="string"}zo.ValidVisibleIfSettingsSchema={meta:{...XR,type:T0.SourceCodeType.JSON},create(e){return e.toRelativePath(e.file.uri)!=="config/settings_schema.json"?{}:{async Property(r){if(r.key.value!=="visible_if"||r.value.type!=="Literal")return;let n=r.value.value;if(typeof n!="string")return;let i=r.value.loc.start.offset,s=(0,Nn.getVariableLookupsInExpression)(n);if(s===null)return;if("warning"in s){e.report({message:s.warning,startIndex:r.value.loc.start.offset,endIndex:r.value.loc.end.offset});return}let o={settings:Object.fromEntries((await(0,Nn.getGlobalSettings)(e)).map(l=>[l,!0]))},c=(l,f)=>{typeof l=="string"&&e.report({message:l,startIndex:i+f.position.start+Nn.offsetAdjust+1,endIndex:i+f.position.end+Nn.offsetAdjust+1})};for(let l of s)l.name==="section"?c(`Invalid visible_if: can't refer to "section" when not in a section file.`,l):l.name==="block"?c(`Invalid visible_if: can't refer to "block" when not in a block file.`,l):c((0,Nn.validateLookup)(l,o),l)}}}}});var tD=x(Lm=>{"use strict";p();Object.defineProperty(Lm,"__esModule",{value:!0});Lm.VariableName=void 0;var RX=ce(),w0=G(),qm=tx(),DX=e=>{let t=(0,qm.camelCase)(e);return t.charAt(0).toUpperCase()+t.slice(1)},jX=e=>e.name==="assign"&&typeof e.markup!="string",FX=e=>e.type==RX.NodeTypes.LiquidTag&&e.name==="capture"&&typeof e.markup!="string",BX={camelCase:qm.camelCase,PascalCase:DX,snake_case:qm.snakeCase,"kebab-case":qm.kebabCase},VX={format:w0.SchemaProp.string("snake_case")},eD=e=>e.replace(/[-_]?\d[-_]?/g,"");Lm.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:w0.SourceCodeType.LiquidHtml,severity:w0.Severity.WARNING,schema:VX,targets:[]},create(e){let t=n=>{if(!n.markup.name)return{valid:!1};let i=BX[e.settings.format],s=n.markup.name.startsWith("_")?"_":"",a=n.markup.name.slice(s.length),o=s+i(a);return{valid:a.length>0&&eD(n.markup.name)===eD(o),suggestion:o}},r=n=>e.report({message:`The variable '${n.markup.name}' uses wrong naming format`,startIndex:n.markup.position.start,endIndex:n.markup.position.end,suggest:[{message:`Change variable '${n.markup.name}' to '${t(n).suggestion}'`,fix:i=>{let{position:s,name:a,source:o}=n.markup;return i.replace(s.start,s.end,o.slice(s.start,s.end).replace(a,t(n).suggestion))}}]});return{async LiquidTag(n){(jX(n)||FX(n)&&n.markup.name)&&(t(n).valid||r(n))}}}}});var rD=x(Cm=>{"use strict";p();Object.defineProperty(Cm,"__esModule",{value:!0});Cm.AppBlockMissingSchema=void 0;var x0=G();Cm.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:x0.Severity.ERROR,type:x0.SourceCodeType.LiquidHtml,schema:{},targets:[x0.ConfigTarget.ThemeAppExtension]},create(e){let t=!1;return e.toRelativePath(e.file.uri).startsWith("blocks/")?{async LiquidRawTag(n){n.name=="schema"&&(t=!0)},async onCodePathEnd(){t||e.report({message:"The schema does not exist",startIndex:0,endIndex:0})}}:{}}}});var nD=x(Im=>{"use strict";p();Object.defineProperty(Im,"__esModule",{value:!0});Im.UniqueSettingIds=void 0;var Ri=G();Im.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:Ri.SourceCodeType.JSON,severity:Ri.Severity.ERROR,schema:{},targets:[]},create(e){return{async onCodePathEnd(t){if((0,Ri.isArrayNode)(t.ast)){let r=[];for(let s of t.ast.children)if((0,Ri.isObjectNode)(s)&&s.children){let a=s.children.find(o=>o.key.value==="settings");if(a&&a.value&&(0,Ri.isArrayNode)(a.value)){for(let o of a.value.children)if((0,Ri.isObjectNode)(o)&&o.children){let c=o.children.find(l=>l.key.value==="id");(0,Ri.isPropertyNode)(c)&&r.push(c)}}}let n=new Map;for(let s of r)if((0,Ri.isLiteralNode)(s.value)){let a=s.value.value;typeof a=="string"&&(n.has(a)||n.set(a,[]),n.get(a).push(s))}let i=Array.from(n.entries()).filter(([s,a])=>a.length>1);if(i.length>0)for(let[s,a]of i){let o=a[a.length-1];e.report({message:`Duplicate setting id found: "${s}"`,startIndex:o.loc.start.offset,endIndex:o.loc.end.offset})}}}}}}});var sD=x(ir=>{"use strict";p();Object.defineProperty(ir,"__esModule",{value:!0});ir.StylesheetOncePerFile=ir.StylesheetTagInWrongFile=ir.JavascriptOncePerFile=ir.JavascriptTagInWrongFile=ir.SchemaOncePerFile=ir.SchemaSectionOrBlockOnly=void 0;var E0=Ve(),Mm=G();function iD(e){return e[0].toUpperCase()+e.slice(1)}function $X({tagName:e,code:t,message:r}){return{meta:{code:t,name:t,docs:{description:r,recommended:!0},type:Mm.SourceCodeType.LiquidHtml,severity:Mm.Severity.ERROR,schema:{},targets:[]},create(n){return{async LiquidRawTag(i){i.name===e&&n.report({message:r,startIndex:i.blockStartPosition.start,endIndex:i.blockStartPosition.end})}}}}}function UX(e,{allowSnippets:t}){let r=t?"section, block, or snippet":"section or block",n=`${iD(e)}${t?"TagInWrongFile":"SectionOrBlockOnly"}`;return $X({tagName:e,code:n,message:`{% ${e} %} is only valid in ${r} files.`})}function A0(e){let t=`${iD(e)}OncePerFile`,r=`{% ${e} %} can only appear once per file.`;return{meta:{code:t,name:t,docs:{description:r,recommended:!0},type:Mm.SourceCodeType.LiquidHtml,severity:Mm.Severity.ERROR,schema:{},targets:[]},create(n){let i=0;return{async LiquidRawTag(s){s.name===e&&(i+=1,i!==1&&n.report({message:r,startIndex:s.blockStartPosition.start,endIndex:s.blockStartPosition.end}))}}}}}function O0(e,{allowSnippets:t}){let r=UX(e,{allowSnippets:t});return{...r,create(n){let i=n.file.uri;return(0,E0.isSection)(i)||(0,E0.isBlock)(i)?{}:t&&(0,E0.isSnippet)(i)?{}:r.create(n)}}}ir.SchemaSectionOrBlockOnly=O0("schema",{allowSnippets:!1});ir.SchemaOncePerFile=A0("schema");ir.JavascriptTagInWrongFile=O0("javascript",{allowSnippets:!0});ir.JavascriptOncePerFile=A0("javascript");ir.StylesheetTagInWrongFile=O0("stylesheet",{allowSnippets:!0});ir.StylesheetOncePerFile=A0("stylesheet")});var oD=x(Rm=>{"use strict";p();Object.defineProperty(Rm,"__esModule",{value:!0});Rm.BlockContentUsage=void 0;var HX=ce(),zX=ei(),WX=Ve(),aD=G(),GX=Re(),JX="Use the implicit 'content' parameter directly instead of 'block.content'.";Rm.BlockContentUsage={meta:{code:"BlockContentUsage",name:"Use `content` instead of `block.content`",docs:{description:"Reports 'block.content' in theme block files, where the built-in 'content' parameter is available as the 'content' variable.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/block-content-usage"},type:aD.SourceCodeType.LiquidHtml,severity:aD.Severity.ERROR,schema:{},targets:[]},create(e){return(0,WX.isBlock)(e.file.uri)?{async VariableLookup(t,r){(0,GX.isWithinRawTagThatDoesNotParseItsContents)(r)||KX(t)&&e.report({message:JX,startIndex:t.position.start,endIndex:t.position.end})}}:{}}};function KX(e){let[t]=e.lookups;return e.name==="block"&&t?.type===HX.NodeTypes.String&&t.value===zX.BLOCK_CONTENT_PARAMETER}});var Ee=x(Pe=>{"use strict";p();Object.defineProperty(Pe,"__esModule",{value:!0});Pe.resolveErrorLocation=QX;Pe.getOffset=P0;Pe.hasBareArrayAccess=oi;Pe.argHasBareArrayAccess=cD;Pe.variableHasBareArrayAccess=XX;Pe.conditionalHasBareArrayAccess=N0;Pe.rawMarkup=ZX;Pe.hasSkippedCharacters=sn;Pe.hasEmptyMarkup=eZ;Pe.hasSingleIdMarkup=tZ;Pe.hasSingleStringMarkup=rZ;Pe.hasRubyValidInlineCommentMarkup=nZ;Pe.hasRubyAcceptedCycleTrailingComma=iZ;Pe.hasRubyAcceptedLoopTrailingComma=sZ;Pe.hasRubyAcceptedPaginateTrailingComma=aZ;Pe.hasRubyAcceptedEmptyFirstFilterArgument=oZ;Pe.hasRubyAcceptedFilterArgumentTrailingComma=cZ;Pe.hasRubyAcceptedEmptyAssignRhs=fZ;Pe.hasRubyAcceptedAssignLhsExtraIdentifier=pZ;Pe.hasRubyAcceptedIncludeMarkup=dZ;Pe.hasRubyAcceptedRawTagCloserWithMarkup=hZ;Pe.liquidTagBodies=zu;Pe.liquidTagMarkup=Dm;Pe.hasLiquidTagNamed=gZ;Pe.liquidLineTagLocation=yZ;Pe.hasSkippedPrefixCharacters=_Z;Pe.hasRubyAcceptedWhitespaceSeparatedQuotePrefix=vZ;Pe.hasUnclosedQuotedString=bZ;var ae=ce(),YX=Ae();function QX(e,t){if("loc"in e&&e.loc){let r=e.loc;return[P0(t,r.start.line,r.start.column),P0(t,r.end.line,r.end.column)]}return[0,t.length]}function P0(e,t,r){let n=1;for(let i=0;i<e.length;i++){if(n===t)return i+(r-1);e[i]===`
83
- `&&n++}return e.length}function oi(e){return e.type===ae.NodeTypes.VariableLookup&&e.name===null}function cD(e){let t=e.type===ae.NodeTypes.NamedArgument?e.value:e;return oi(t)}function XX(e){return oi(e.expression)||e.filters.some(t=>t.args.some(cD))}function N0(e){return e.type===ae.NodeTypes.LogicalExpression?N0(e.left)||N0(e.right):e.type===ae.NodeTypes.Comparison?oi(e.left)||oi(e.right):oi(e)}function ZX(e){return e.source.slice(e.markupPosition.start,e.markupPosition.end)}function sn(e){return jm(e).length>0}function eZ(e){return an(e).length===0&&!sn(e)}function tZ(e,t){if(sn(e))return!1;let r=an(e);return r.length===1&&r[0].type===ae.MarkupTokenType.Id&&r[0].value===t}function rZ(e,t){if(sn(e))return!1;let r=an(e),n=r[0];return r.length!==1||n.type!==ae.MarkupTokenType.String?!1:n.value.slice(1,-1)===t}function nZ(e){let t=kZ(e),r=0,n=0;for(let i=1;i<t.length;i++){let s=t[i].firstEvent;s&&(r++,s.type==="uncovered"&&s.value==="#"&&n++)}return r===0||!t[0].firstEvent&&r===1?!0:r===n}function iZ(e){let t=C0(e);return t!==null&&uD(t,e)}function sZ(e){let t=C0(e);if(t===null)return!1;let r=Wu(t,e);try{if(r.consume(ae.MarkupTokenType.Id),!r.id("in"))return!1;for(r.valueExpression(),r.id("reversed");!r.isAtEnd();)r.consumeOptional(ae.MarkupTokenType.Comma),r.namedArgument()}catch{return!1}return r.isAtEnd()}function aZ(e){let t=C0(e);if(t===null)return!1;let r=Wu(t,e);try{if(r.valueExpression(),!r.id("by"))return!1;r.valueExpression(),r.consumeOptional(ae.MarkupTokenType.Comma)&&r.namedArguments()}catch{return!1}return r.isAtEnd()}function oZ(e){if(sn(e))return!1;let t=an(e),r=t.slice(-3);if(!(r.length===3&&r[0].type===ae.MarkupTokenType.Pipe&&r[1].type===ae.MarkupTokenType.Id&&r[2].type===ae.MarkupTokenType.Colon))return!1;let n=t.slice(0,-3);return q0(n,e)||L0(n,e)}function cZ(e){if(sn(e))return!1;let t=uZ(an(e));return t===null?!1:q0(t,e)||L0(t,e)||lZ(t,e)}function uZ(e){let t=!1,r=[];for(let n=0;n<e.length;n++){let i=e[n],s=e[n+1];if(i.type===ae.MarkupTokenType.Comma&&(s===void 0||s.type===ae.MarkupTokenType.Pipe)){if(!r.slice((0,YX.findLastIndex)(r,o=>o.type===ae.MarkupTokenType.Pipe)+1).some(o=>o.type===ae.MarkupTokenType.Colon))return null;let a=r[r.length-1];if(a===void 0||a.type===ae.MarkupTokenType.Comma||a.type===ae.MarkupTokenType.Colon||a.type===ae.MarkupTokenType.Pipe)return null;t=!0;continue}r.push(i)}return t?r:null}function lZ(e,t){let r=e.slice(-3);if(!(r.length===3&&r[0].type===ae.MarkupTokenType.Pipe&&r[1].type===ae.MarkupTokenType.Id&&r[2].type===ae.MarkupTokenType.Colon))return!1;let n=e.slice(0,-3);return q0(n,t)||L0(n,t)}function q0(e,t){let r=Wu(e,t);try{r.liquidVariable()}catch{return!1}return r.isAtEnd()}function L0(e,t){if(e.length<3||e[0].type!==ae.MarkupTokenType.Id||e[1].type!==ae.MarkupTokenType.Equality||e[1].value!=="=")return!1;let r=Wu(e.slice(2),t);try{r.liquidVariable()}catch{return!1}return r.isAtEnd()}function fZ(e){if(sn(e))return!1;let t=an(e);return t.length===2&&t[0].type===ae.MarkupTokenType.Id&&t[1].type===ae.MarkupTokenType.Equality&&t[1].value==="="}function pZ(e){if(sn(e))return!1;let t=an(e);return t.length<4||t[0].type!==ae.MarkupTokenType.Id||t[1].type!==ae.MarkupTokenType.Id||t[2].type!==ae.MarkupTokenType.Equality||t[2].value!=="="?!1:uD(t.slice(3),e)}function dZ(e){if(sn(e))return!1;let t=new ae.MarkupParser((0,ae.tokenizeMarkup)(e),e);try{let r=t.valueExpression();if(oi(r))return!1;if(t.id("for")||t.id("with")){let n=t.valueExpression();if(oi(n))return!1}for(t.id("as")&&t.consume(ae.MarkupTokenType.Id),t.consumeOptional(ae.MarkupTokenType.Comma);t.look(ae.MarkupTokenType.Id);){t.consume(ae.MarkupTokenType.Id),t.consume(ae.MarkupTokenType.Colon);let n=t.valueExpression();if(oi(n))return!1;if(!t.consumeOptional(ae.MarkupTokenType.Comma))break}}catch{return!1}return t.isAtEnd()}function hZ(e,t,r=0){for(let n of zu(e,r)){let i=Dm(n.body);if(i?.tagName===`end${t}`&&i.remainingTokens.length>0&&!i.hasSkippedCharacters)return mZ(e,t,n.end)}return!1}function mZ(e,t,r){let n=0;for(let i of zu(e,r)){let s=Dm(i.body);if(!(!s||s.hasSkippedCharacters)){if(s.tagName===t){n++;continue}if(s.tagName===`end${t}`&&(n--,n<0))return!1}}return n===0}function zu(e,t=0){let r=(0,ae.tokenize)(e),n=[];for(let i=0;i<r.length;i++){let s=r[i];if(s.type!==ae.TokenType.LiquidTagOpen||s.start<t)continue;let a=r[i+1],o=a?.type===ae.TokenType.Text?r[i+2]:a;!o||o.type!==ae.TokenType.LiquidTagClose||n.push(wZ(e,s,a?.type===ae.TokenType.Text?a:void 0,o))}return n}function Dm(e){let t=an(e),r=t[0];if(!(!r||r.type!==ae.MarkupTokenType.Id))return{tagName:r.value,remainingTokens:t.slice(1),hasSkippedCharacters:sn(e)}}function gZ(e,t){for(let r of zu(e)){let n=Dm(r.body);if(n?.tagName===t&&!n.hasSkippedCharacters)return!0}return!1}function yZ(e,t){for(let r of zu(e)){let n=r.body.indexOf(`
84
- `);if(n===-1)continue;let s=(0,ae.tokenizeMarkup)(r.body.slice(0,n),r.bodyStart).filter(o=>o.type!==ae.MarkupTokenType.EndOfString)[0];if(s?.type!==ae.MarkupTokenType.Id||s.value!=="liquid")continue;let a=r.bodyStart;for(let o of r.body.split(`
85
- `)){let l=(0,ae.tokenizeMarkup)(o,a).filter(f=>f.type!==ae.MarkupTokenType.EndOfString)[0];if(l?.type===ae.MarkupTokenType.Id&&l.value===t)return[l.start,a+o.length];a+=o.length+1}}return null}function _Z(e,t,r){return jm(e.slice(t,r),!0).length>0}function vZ(e){if(an(e).length>0)return!1;let t=jm(e);if(t.length===0||t.some(({value:n})=>!M0(n)))return!1;let r=t[t.length-1];for(let n=r.end;n<e.length;n++)if(I0(e[n]))return!0;return!1}function bZ(e){return jm(e).some(({value:t})=>M0(t))}function jm(e,t=!1){let r=(0,ae.tokenizeMarkup)(e),n=new Set,i=[];for(let s of r)if(s.type!==ae.MarkupTokenType.EndOfString)for(let a=s.start;a<s.end;a++)n.add(a);for(let s=0;s<e.length;s++){let a=e[s];I0(a)||n.has(s)||t&&M0(a)||i.push({value:a,start:s,end:s+1})}return i}function an(e){return(0,ae.tokenizeMarkup)(e).filter(t=>t.type!==ae.MarkupTokenType.EndOfString)}function kZ(e){let t=SZ(e),r=[{firstEvent:void 0}],n=r[0];for(let i=0;i<e.length;i++){let s=e[i];if(s===`
86
- `){n={firstEvent:void 0},r.push(n);continue}if(I0(s)||n.firstEvent)continue;let a=t.get(i);n.firstEvent=a?{type:"token",start:i,end:i+1}:{type:"uncovered",value:s,start:i,end:i+1}}return r}function SZ(e){let t=new Map;for(let r of an(e))for(let n=r.start;n<r.end;n++)t.set(n,r);return t}function uD(e,t){let r=Wu(e,t);try{r.valueExpression()}catch{return!1}return r.isAtEnd()}function C0(e){if(sn(e))return null;let t=an(e),r=t[t.length-1],n=t[t.length-2];return t.length<2||r.type!==ae.MarkupTokenType.Comma||n.type===ae.MarkupTokenType.Comma?null:t.slice(0,-1)}function Wu(e,t){return new ae.MarkupParser([...e,TZ(t)],t)}function TZ(e){return{type:ae.MarkupTokenType.EndOfString,value:"",start:e.length,end:e.length}}function I0(e){return e===" "||e===`
87
- `||e==="\r"||e===" "}function M0(e){return e==="'"||e==='"'}function wZ(e,t,r,n){return{start:t.start,body:r?e.slice(r.start,r.end):"",bodyStart:r?.start??t.end,end:n.end}}});var oa=x(Gu=>{"use strict";p();Object.defineProperty(Gu,"__esModule",{value:!0});Gu.checkBlockTag=NZ;Gu.blockTagSyntaxError=fD;Gu.checkBlockParserError=qZ;var xZ=ce(),Go=Ee(),R0="Syntax error in 'block' tag",EZ="Bare bracket access is not allowed in strict2 mode",AZ="Liquid syntax error: in 'block' - Use plain named arguments, for example: block 'name', heading: value",lD="Attempting to end parsing before LiquidTag 'block' was closed",OZ="Unclosed block tag 'block' in {% liquid %} block",PZ=new Set([lD,OZ,"Attempting to close LiquidTag 'block' before it was opened without a matching 'block'"]);function NZ(e,t){let r=fD(e);r&&t.report(r)}function fD(e){if(typeof e.markup=="string")return Wo(e.position,R0);let t=e.markup;if(LZ(t.name.value))return Wo(e.position,"Liquid syntax error: in 'block' - Valid syntax: block '[file_name]'");let r=t.args.find(IZ);if(r)return Wo(r.position,MZ(r.name));if(t.args.some(CZ))return Wo(e.position,R0);if(t.args.some(n=>n.value.type!=="BlockArrayLiteral"&&(0,Go.hasBareArrayAccess)(n.value)))return Wo(e.position,EZ);if((0,Go.hasSkippedCharacters)((0,Go.rawMarkup)(e)))return Wo(e.position,R0)}function qZ(e,t,r){if(!PZ.has(e.message))return;let[n,i]=e.message.includes("Unclosed block tag 'block' in {% liquid %} block")?(0,Go.liquidLineTagLocation)(r,"block")??(0,Go.resolveErrorLocation)(e,r):(0,Go.resolveErrorLocation)(e,r);t.report({message:e.message===lD?"Liquid syntax error: 'block' tag was never closed":e.message,startIndex:n,endIndex:i})}function Wo(e,t){return{message:t,startIndex:e.start,endIndex:e.end}}function LZ(e){return e.includes("/")||e.includes(".")}function CZ(e){return e.name==="block.name"&&e.value.type!==xZ.NodeTypes.String}function IZ(e){return e.name!=="block.name"&&e.name.includes(".")}function MZ(e){let t=RZ(e);return t?`Liquid syntax error: in 'block' - Use '${t}:' instead of '${e}:' when calling a block.`:AZ}function RZ(e){let[t,r,n,...i]=e.split(".");if(!(t!=="block"||r!=="settings"||i.length>0))return n}});var dD=x(Fm=>{"use strict";p();Object.defineProperty(Fm,"__esModule",{value:!0});Fm.DuplicateBlockArguments=void 0;var DZ=ei(),pD=G(),jZ=oa();Fm.DuplicateBlockArguments={meta:{code:"DuplicateBlockArguments",name:"Duplicate Block Arguments",docs:{description:"Reports duplicate block arguments and explicit content arguments overridden by inline body content.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/duplicate-block-arguments"},type:pD.SourceCodeType.LiquidHtml,severity:pD.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidTag(t){if(t.name!=="block"||(0,jZ.blockTagSyntaxError)(t))return;let r=t.markup,n=new Set,i=!!t.children?.length;for(let s of r.args){let a=n.has(s.name);n.add(s.name),a&&e.report({message:`Duplicate argument '${s.name}' in block tag for '${r.name.value}'.`,startIndex:s.position.start,endIndex:s.position.end}),!(!i||s.name!==DZ.BLOCK_CONTENT_PARAMETER)&&e.report({message:"The explicit 'content' argument has no effect because the inline block body takes precedence.",startIndex:s.position.start,endIndex:s.position.end})}}}}}});var hD=x(ca=>{"use strict";p();Object.defineProperty(ca,"__esModule",{value:!0});ca.ExcessiveSettingsCount=ca.TOLERATED_SETTINGS_COUNT=void 0;var Jo=G(),FZ=wu(),BZ=Xn();ca.TOLERATED_SETTINGS_COUNT=40;var VZ={maxSettings:Jo.SchemaProp.number(ca.TOLERATED_SETTINGS_COUNT)};ca.ExcessiveSettingsCount={meta:{code:"ExcessiveSettingsCount",name:"ExcessiveSettingsCount",docs:{description:"Reports section or block schemas that declare more top-level settings than the configured maximum.",recommended:!0},type:Jo.SourceCodeType.LiquidHtml,severity:Jo.Severity.WARNING,schema:VZ,targets:[]},create(e){let t=e.settings.maxSettings;return{async onCodePathEnd(){if(e.file.ast instanceof Error)return;let r=(0,BZ.visit)(e.file.ast,{LiquidRawTag(a){if(a.name==="schema")return a}})[0];if(!r)return;let n=(0,FZ.toJSONAST)(r.body.value);if(n instanceof Error||!(0,Jo.isObjectNode)(n))return;let i=n.children.find(a=>a.key.value==="settings");if(!i||!(0,Jo.isArrayNode)(i.value))return;let s=i.value.children.filter(a=>(0,Jo.isObjectNode)(a)&&a.children.some(o=>o.key.value==="id")).length;s<=t||e.report({message:`This schema declares ${s} settings, which exceeds the maximum of ${t}. Consider splitting this section or block into smaller pieces, or grouping related options with a header.`,startIndex:r.blockStartPosition.start,endIndex:r.blockStartPosition.end})}}}}});var mD=x(ua=>{"use strict";p();Object.defineProperty(ua,"__esModule",{value:!0});ua.LiquidComplexity=ua.TOLERATED_LIQUID_COMPLEXITY=void 0;var D0=G(),Ju=ce(),$Z=Ae();ua.TOLERATED_LIQUID_COMPLEXITY=120;var UZ={maxComplexity:D0.SchemaProp.number(ua.TOLERATED_LIQUID_COMPLEXITY)},HZ=new Set(["if","unless","case","for","tablerow","paginate"]),zZ=new Set(["elsif","when"]),WZ=new Set(["if","unless"]),GZ=new Set(["elsif"]);ua.LiquidComplexity={meta:{code:"LiquidComplexity",name:"LiquidComplexity",docs:{description:"Reports Liquid files with high cyclomatic complexity.",recommended:!0},type:D0.SourceCodeType.LiquidHtml,severity:D0.Severity.WARNING,schema:UZ,targets:[]},create(e){let t=e.settings.maxComplexity,r={complexity:1},n;function i(c){return"blockStartPosition"in c?{startIndex:c.blockStartPosition.start,endIndex:c.blockStartPosition.end}:{startIndex:c.position.start,endIndex:c.position.end}}function s(c){r.complexity+=1,!n&&r.complexity>t&&(n=i(c))}function a(c){let l=(0,$Z.findLastIndex)(c,m=>[Ju.NodeTypes.LiquidTag,Ju.NodeTypes.LiquidBranch,Ju.NodeTypes.LiquidVariableOutput].includes(m.type));if(l===-1)return!1;let f=c[l];return f.type===Ju.NodeTypes.LiquidTag?WZ.has(f.name):f.type===Ju.NodeTypes.LiquidBranch?GZ.has(f.name??""):!1}function o(c){return e.file.source.slice(0,c).split(`
88
- `).length}return{async LiquidTag(c){HZ.has(c.name)&&s(c)},async LiquidBranch(c){zZ.has(c.name??"")&&s(c)},async LogicalExpression(c,l){a(l)&&s(c)},async onCodePathEnd(){if(r.complexity<=t)return;let c=n??{startIndex:0,endIndex:e.file.source.length},l=o(c.startIndex);e.report({message:`Liquid complexity is ${r.complexity}, which exceeds the maximum of ${t}. The decision at line ${l} pushed it over the limit. Consider simplifying conditional logic, or moving self-contained decision logic into snippets with the render tag.`,startIndex:c.startIndex,endIndex:c.endIndex})}}}}});var yD=x(la=>{"use strict";p();Object.defineProperty(la,"__esModule",{value:!0});la.LiquidNestingDepth=la.TOLERATED_LIQUID_NESTING_DEPTH=void 0;var j0=G(),JZ=ce();la.TOLERATED_LIQUID_NESTING_DEPTH=10;var KZ={maxDepth:j0.SchemaProp.number(la.TOLERATED_LIQUID_NESTING_DEPTH)},gD=new Set(["if","unless","for","case","tablerow"]);la.LiquidNestingDepth={meta:{code:"LiquidNestingDepth",name:"LiquidNestingDepth",docs:{description:"Reports Liquid files with deeply nested control-flow structures.",recommended:!0},type:j0.SourceCodeType.LiquidHtml,severity:j0.Severity.WARNING,schema:KZ,targets:[]},create(e){let t=e.settings.maxDepth;function r(n){return n.filter(s=>s.type===JZ.NodeTypes.LiquidTag&&gD.has(s.name)).length+1}return{async LiquidTag(n,i){if(!gD.has(n.name))return;let s=r(i);s<=t||e.report({message:`This Liquid block is nested ${s} levels deep, which exceeds the maximum allowed depth of ${t}.`,startIndex:n.blockStartPosition.start,endIndex:n.blockStartPosition.end})}}}}});var _D=x(F0=>{"use strict";p();Object.defineProperty(F0,"__esModule",{value:!0});F0.checkAssignTag=YZ;var Rr=Ee();function YZ(e,t){if(typeof e.markup=="string"){if((0,Rr.hasRubyAcceptedEmptyAssignRhs)(e.markup)||(0,Rr.hasRubyAcceptedEmptyFirstFilterArgument)(e.markup)||(0,Rr.hasRubyAcceptedFilterArgumentTrailingComma)(e.markup)||(0,Rr.hasRubyAcceptedAssignLhsExtraIdentifier)(e.markup))return;t.report({message:"Syntax error in 'assign' tag",startIndex:e.position.start,endIndex:e.position.end});return}let r=e.markup;if((0,Rr.variableHasBareArrayAccess)(r.value)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}if((0,Rr.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,r.position.start)){t.report({message:"Syntax error in 'assign' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=(0,Rr.rawMarkup)(e);if((0,Rr.hasRubyAcceptedEmptyAssignRhs)(n)||(0,Rr.hasRubyAcceptedEmptyFirstFilterArgument)(n)||(0,Rr.hasRubyAcceptedFilterArgumentTrailingComma)(n)||(0,Rr.hasRubyAcceptedAssignLhsExtraIdentifier)(n))return;let i=e.source.slice(r.position.start,e.markupPosition.end);(0,Rr.hasSkippedCharacters)(i)&&t.report({message:"Syntax error in 'assign' tag",startIndex:e.position.start,endIndex:e.position.end})}});var SD=x(B0=>{"use strict";p();Object.defineProperty(B0,"__esModule",{value:!0});B0.checkBaseTag=QZ;var vD=ce(),Bm=new WeakSet;async function QZ(e,t){if("reason"in e&&typeof e.reason=="string"){t.report({message:e.reason,startIndex:e.position.start,endIndex:e.position.end});return}if(e.name==="liquid"&&Array.isArray(e.markup)){await XZ(e.markup,t);return}let r=await bD(t);Bm.has(e)||kD(e,r)&&(Bm.add(e),t.report({message:`Unknown tag '${e.name}'`,startIndex:e.position.start,endIndex:e.position.end}))}async function XZ(e,t){let r=await bD(t);for(let n of e)n.type===vD.NodeTypes.LiquidTag&&!Bm.has(n)&&kD(n,r)&&(Bm.add(n),t.report({message:`Unknown tag '${n.name}'`,startIndex:n.position.start,endIndex:n.position.end}))}async function bD(e){let t=e.themeDocset?await e.themeDocset.tags():Object.keys(vD.builtinTags).map(r=>({name:r}));return new Set(["#","else","elsif","when",...t.map(r=>r.name)])}function kD(e,t){return e.source.startsWith("{%",e.position.start)?!1:!t.has(e.name)}});var TD=x($m=>{"use strict";p();Object.defineProperty($m,"__esModule",{value:!0});$m.checkBranchTag=eee;$m.checkMisplacedBranchTag=tee;var fa=Ee(),ZZ="Bare bracket access is not allowed in strict2 mode";function eee(e,t){if(e.name==="elsif"){nee(e,t);return}e.name==="when"&&ree(e,t)}function tee(e,t){t.report({message:`Unknown tag '${e.name}'`,startIndex:e.position.start,endIndex:e.position.end})}function ree(e,t){if(typeof e.markup=="string"){V0(e,t);return}let r=e.markup,n=e.source.slice(e.markupPosition.start,e.markupPosition.end);if((0,fa.hasUnclosedQuotedString)(n)){V0(e,t);return}if(r.some(fa.hasBareArrayAccess)){t.report({message:"Bare bracket access is not allowed",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}if(r.length===0)return;let i=e.source.slice(r[0].position.start,e.markupPosition.end);(0,fa.hasSkippedCharacters)(i)&&V0(e,t)}function V0(e,t){t.report({message:"Syntax error in 'when' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}function nee(e,t){if(typeof e.markup=="string"){Vm(e,t);return}let r=e.markup,n=e.source.slice(e.markupPosition.start,e.markupPosition.end);if((0,fa.hasUnclosedQuotedString)(n)){Vm(e,t);return}if((0,fa.conditionalHasBareArrayAccess)(r)){t.report({message:ZZ,startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}if((0,fa.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,r.position.start)){Vm(e,t);return}let i=e.source.slice(r.position.start,e.markupPosition.end);(0,fa.hasSkippedCharacters)(i)&&Vm(e,t)}function Vm(e,t){t.report({message:"Syntax error in 'elsif' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}});var wD=x(U0=>{"use strict";p();Object.defineProperty(U0,"__esModule",{value:!0});U0.checkCaptureTag=iee;var $0=Ee();function iee(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'capture' tag",startIndex:e.position.start,endIndex:e.position.end});return}if((0,$0.hasBareArrayAccess)(e.markup)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}(0,$0.hasSkippedCharacters)((0,$0.rawMarkup)(e))&&t.report({message:"Syntax error in 'capture' tag",startIndex:e.position.start,endIndex:e.position.end})}});var xD=x(H0=>{"use strict";p();Object.defineProperty(H0,"__esModule",{value:!0});H0.checkCaseTag=see;var Um=Ee();function see(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'case' tag",startIndex:e.position.start,endIndex:e.position.end});return}let r=e.markup;if((0,Um.hasUnclosedQuotedString)((0,Um.rawMarkup)(e))){t.report({message:"Syntax error in 'case' tag",startIndex:e.position.start,endIndex:e.position.end});return}if((0,Um.hasBareArrayAccess)(r)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}(0,Um.hasSkippedCharacters)(e.source.slice(r.position.start,e.markupPosition.end))&&t.report({message:"Syntax error in 'case' tag",startIndex:e.position.start,endIndex:e.position.end})}});var z0=x(cn=>{"use strict";p();Object.defineProperty(cn,"__esModule",{value:!0});cn.UNMATCHED_RAW_CLOSE_PARSER_ERROR=cn.UNMATCHED_COMMENT_CLOSE_PARSER_ERROR=void 0;cn.checkCommentTag=oee;cn.checkCommentRawTag=lee;cn.hasRubyAcceptedInertCommentBodyCloser=PD;var on=ce(),qn=Ee(),AD="Liquid syntax error: 'comment' tag was never closed";cn.UNMATCHED_COMMENT_CLOSE_PARSER_ERROR="Attempting to close LiquidTag 'comment' before it was opened without a matching 'comment'";cn.UNMATCHED_RAW_CLOSE_PARSER_ERROR="Attempting to close LiquidTag 'raw' before it was opened without a matching 'raw'";var aee="Attempting to end parsing before LiquidRawTag 'comment' was closed";function oee(e,t,r){if(!fee(e,r))return;let[n,i]=(0,qn.resolveErrorLocation)(e,r);if(e.message===aee&&uee(cee(r,n))){t.report({message:AD,startIndex:n,endIndex:i});return}e.message===cn.UNMATCHED_COMMENT_CLOSE_PARSER_ERROR&&PD(r,"comment",n)||t.report({message:e.message,startIndex:n,endIndex:i})}function cee(e,t){let r=e.indexOf("%}",t);return r===-1?"":e.slice(r+2)}function uee(e){for(let t of(0,qn.liquidTagBodies)(e)){let r=(0,qn.liquidTagMarkup)(t.body);if(r?.tagName==="comment"&&!r.hasSkippedCharacters)return!0}return!1}function lee(e,t){let r=e.body.value;(dee(r,e.source,e.blockEndPosition.end)||hee(r,e.source,e.blockEndPosition.end)||pee(r))&&t.report({message:AD,startIndex:e.body.position.start,endIndex:e.body.position.end})}function fee(e,t){return!ED(t,"comment")&&!ED(t,"endcomment")?!1:e.message==="Attempting to end parsing before LiquidRawTag 'comment' was closed"||e.message===cn.UNMATCHED_COMMENT_CLOSE_PARSER_ERROR}function pee(e){let t=(0,on.tokenize)(e);for(let r=0;r<t.length;r++){let n=t[r],i=t[r+1],s=i?.type===on.TokenType.Text?t[r+2]:i;if(n.type===on.TokenType.LiquidTagOpen){if(s?.type!==on.TokenType.LiquidTagClose)return!0;continue}if(n.type===on.TokenType.LiquidVariableOutputOpen&&s?.type!==on.TokenType.LiquidVariableOutputClose)return!0}return!1}function dee(e,t,r){return OD(e,t,r,"comment")}function hee(e,t,r){return OD(e,t,r,"raw")}function OD(e,t,r,n){let i=mee(e,n);if(i===0)return!1;for(let s of(0,qn.liquidTagBodies)(t,r)){let a=(0,qn.liquidTagMarkup)(s.body);if(!(!a||a.hasSkippedCharacters)){if(a.tagName===n){i++;continue}if(a.tagName===`end${n}`&&(i--,i===0))return!1}}return!0}function mee(e,t){let r=0;for(let n of(0,qn.liquidTagBodies)(e)){let i=(0,qn.liquidTagMarkup)(n.body);if(!(!i||i.hasSkippedCharacters)){if(i.tagName===t){r++;continue}i.tagName===`end${t}`&&r>0&&r--}}return r}function pa(e,t,r=0,n=e.length){return(0,qn.liquidTagBodies)(e,r).filter(i=>{if(i.bodyStart>=n)return!1;let s=(0,qn.liquidTagMarkup)(i.body);return s?.tagName===t&&!s.hasSkippedCharacters}).length}function PD(e,t,r){let n=`end${t}`,i=gee(e,r);return i?.tagName!==n||i.hasSkippedCharacters?!1:t==="comment"?pa(e,"comment",0,r)>pa(e,"endcomment",0,r):pa(e,"raw",0,r)>pa(e,"endraw",0,r)&&pa(e,"comment",0,r)>0&&pa(e,"endcomment",r)>0}function ED(e,t){return pa(e,t)>0}function gee(e,t){let r=(0,on.tokenize)(e);for(let n=0;n<r.length;n++){let i=r[n];if(i.type!==on.TokenType.LiquidTagOpen||i.start!==t)continue;let s=r[n+1],a=s?.type===on.TokenType.Text?r[n+2]:s;return!a||a.type!==on.TokenType.LiquidTagClose?void 0:(0,qn.liquidTagMarkup)(yee(e,s?.type===on.TokenType.Text?s:void 0))}}function yee(e,t){return t?e.substring(t.start,t.end):""}});var qD=x(J0=>{"use strict";p();Object.defineProperty(J0,"__esModule",{value:!0});J0.checkContentForTag=Tee;var Hm=ce(),_ee=Ee(),vee=new Set(["block","blocks"]),bee=new Set(["block","schema"]),G0="closest.",kee="metaobject.",See=new Set(["article","blog","collection","page","product"]);function Tee(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'content_for' tag",startIndex:e.position.start,endIndex:e.position.end});return}let r=e.markup,n=r.contentForType.value;if(!vee.has(n)){qee(e,t,n);return}if(wee(r)){W0(e,t);return}if(n==="block"&&Eee(r)){W0(e,t);return}n==="blocks"&&Pee(r)&&W0(e,t)}function wee(e){return xee(e)||e.args.some(_ee.argHasBareArrayAccess)}function xee(e){let t=new Set;for(let r of e.args){if(t.has(r.name))return!0;t.add(r.name)}return!1}function Eee(e){return Aee(e)||Oee(e)||Nee(e)}function Aee(e){return e.args.some(t=>bee.has(t.name))}function Oee(e){let t=e.args.find(n=>n.name==="type"),r=e.args.find(n=>n.name==="id");return!t||!r||t.value.type!==Hm.NodeTypes.String||r.value.type!==Hm.NodeTypes.String||t.value.value===""||r.value.value===""}function Pee(e){let t=0;for(let r of e.args)if(!r.name.startsWith(G0)||r.value.type===Hm.NodeTypes.String||(t+=1,t>1)||!ND(r.name))return!0;return!1}function Nee(e){let t=0;for(let r of e.args)if(r.name.startsWith(G0)&&(r.value.type===Hm.NodeTypes.String||(t+=1,t>1)||!ND(r.name)))return!0;return!1}function ND(e){let t=e.slice(G0.length);return See.has(t)||t.startsWith(kee)}function qee(e,t,r){t.report({message:`Invalid content_for type "${r}"; expected "block" or "blocks"`,startIndex:e.position.start,endIndex:e.position.end})}function W0(e,t){t.report({message:"Syntax error in 'content_for' tag",startIndex:e.position.start,endIndex:e.position.end})}});var LD=x(K0=>{"use strict";p();Object.defineProperty(K0,"__esModule",{value:!0});K0.checkCycleTag=Lee;var Ku=Ee();function Lee(e,t){if(typeof e.markup=="string"){if((0,Ku.hasRubyAcceptedCycleTrailingComma)(e.markup))return;t.report({message:"Syntax error in 'cycle' tag",startIndex:e.position.start,endIndex:e.position.end});return}let r=e.markup;if(r.groupName&&(0,Ku.hasBareArrayAccess)(r.groupName)||r.args.some(Ku.hasBareArrayAccess)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}(0,Ku.hasSkippedCharacters)((0,Ku.rawMarkup)(e))&&t.report({message:"Syntax error in 'cycle' tag",startIndex:e.position.start,endIndex:e.position.end})}});var CD=x(Q0=>{"use strict";p();Object.defineProperty(Q0,"__esModule",{value:!0});Q0.checkDecrementTag=Cee;var Y0=Ee();function Cee(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'decrement' tag",startIndex:e.position.start,endIndex:e.position.end});return}if((0,Y0.hasBareArrayAccess)(e.markup)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}(0,Y0.hasSkippedCharacters)((0,Y0.rawMarkup)(e))&&t.report({message:"Syntax error in 'decrement' tag",startIndex:e.position.start,endIndex:e.position.end})}});var RD=x(Yu=>{"use strict";p();Object.defineProperty(Yu,"__esModule",{value:!0});Yu.checkDocTag=Mee;Yu.checkDocParserError=Ree;Yu.isDocParserError=MD;var Ko=Ee(),X0="Attempting to end parsing before LiquidRawTag 'doc' was closed",Iee="Attempting to close LiquidTag 'doc' before it was opened without a matching 'doc'";function Mee(e,t){if(e.markup!==""){t.report({message:"Syntax error in 'doc' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}ID(e.body.value)&&t.report({message:"Nested doc tags are not allowed",startIndex:e.body.position.start,endIndex:e.body.position.end})}function ID(e){for(let t of(0,Ko.liquidTagBodies)(e)){let r=(0,Ko.liquidTagMarkup)(t.body);if(r?.tagName==="enddoc"&&r.remainingTokens.length>0&&!r.hasSkippedCharacters)return!1;if(r?.tagName==="doc"&&!r.hasSkippedCharacters)return!0}return!1}function Ree(e,t,r){if(!MD(e,r))return;let[n,i]=(0,Ko.resolveErrorLocation)(e,r);if(e.message===X0&&ID(Dee(r,n))){t.report({message:"Nested doc tags are not allowed",startIndex:n,endIndex:i});return}e.message===X0&&(0,Ko.hasRubyAcceptedRawTagCloserWithMarkup)(r,"doc",n)||t.report({message:e.message,startIndex:n,endIndex:i})}function Dee(e,t){let r=e.indexOf("%}",t);return r===-1?"":e.slice(r+2)}function MD(e,t){return!(0,Ko.hasLiquidTagNamed)(t,"doc")&&!(0,Ko.hasLiquidTagNamed)(t,"enddoc")?!1:e.message===X0||e.message===Iee}});var DD=x(Z0=>{"use strict";p();Object.defineProperty(Z0,"__esModule",{value:!0});Z0.checkEchoTag=jee;var ci=Ee();function jee(e,t){if(typeof e.markup=="string"){if((0,ci.hasEmptyMarkup)((0,ci.rawMarkup)(e))||(0,ci.hasRubyAcceptedEmptyFirstFilterArgument)(e.markup)||(0,ci.hasRubyAcceptedFilterArgumentTrailingComma)(e.markup))return;t.report({message:"Syntax error in 'echo' tag",startIndex:e.position.start,endIndex:e.position.end});return}let r=e.markup;if((0,ci.variableHasBareArrayAccess)(r)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}let n=(0,ci.rawMarkup)(e);(0,ci.hasRubyAcceptedEmptyFirstFilterArgument)(n)||(0,ci.hasRubyAcceptedFilterArgumentTrailingComma)(n)||(0,ci.hasSkippedCharacters)(n)&&t.report({message:"Syntax error in 'echo' tag",startIndex:e.position.start,endIndex:e.position.end})}});var FD=x(rS=>{"use strict";p();Object.defineProperty(rS,"__esModule",{value:!0});rS.checkFormTag=Bee;var jD=ce(),eS=Ee(),tS="Syntax error in 'form' tag",Fee="Bare bracket access is not allowed in strict2 mode";function Bee(e,t){if(typeof e.markup=="string"){zm(e,t,tS);return}let r=e.markup;if(r.some(eS.argHasBareArrayAccess)){zm(e,t,Fee);return}if(Vee(r)){zm(e,t,tS);return}(0,eS.hasSkippedCharacters)((0,eS.rawMarkup)(e))&&zm(e,t,tS)}function Vee(e){if(e.length===0||e[0].type===jD.NodeTypes.NamedArgument)return!0;let t=1,r=!1;for(let n of e.slice(1)){if(n.type===jD.NodeTypes.NamedArgument){r=!0;continue}if(t+=1,r||t>2)return!0}return!1}function zm(e,t,r){t.report({message:r,startIndex:e.position.start,endIndex:e.position.end})}});var BD=x(iS=>{"use strict";p();Object.defineProperty(iS,"__esModule",{value:!0});iS.checkForTag=$ee;var nS=Ee();function $ee(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'for' tag",startIndex:e.position.start,endIndex:e.position.end});return}let r=e.markup;if((0,nS.hasBareArrayAccess)(r.collection)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}if((0,nS.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,r.position.start)){t.report({message:"Syntax error in 'for' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.source.slice(r.position.start,e.markupPosition.end);(0,nS.hasSkippedCharacters)(n)&&t.report({message:"Syntax error in 'for' tag",startIndex:e.position.start,endIndex:e.position.end})}});var VD=x(sS=>{"use strict";p();Object.defineProperty(sS,"__esModule",{value:!0});sS.checkIfTag=Uee;var Qu=Ee();function Uee(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'if' tag",startIndex:e.position.start,endIndex:e.position.end});return}let r=e.markup,n=(0,Qu.rawMarkup)(e);if((0,Qu.hasUnclosedQuotedString)(n)){t.report({message:"Syntax error in 'if' tag",startIndex:e.position.start,endIndex:e.position.end});return}if((0,Qu.conditionalHasBareArrayAccess)(r)){t.report({message:"Bare bracket access is not allowed in strict2 mode",startIndex:e.position.start,endIndex:e.position.end});return}if((0,Qu.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,r.position.start)){t.report({message:"Syntax error in 'if' tag",startIndex:e.position.start,endIndex:e.position.end});return}let i=e.source.slice(r.position.start,e.markupPosition.end);(0,Qu.hasSkippedCharacters)(i)&&t.report({message:"Syntax error in 'if' tag",startIndex:e.position.start,endIndex:e.position.end})}});var $D=x(aS=>{"use strict";p();Object.defineProperty(aS,"__esModule",{value:!0});aS.checkIncludeTag=Hee;var Yo=Ee();function Hee(e,t){if(typeof e.markup=="string"){if((0,Yo.hasRubyAcceptedIncludeMarkup)(e.markup))return;t.report({message:"Syntax error in 'include' tag",startIndex:e.position.start,endIndex:e.position.end});return}let r=e.markup;if((0,Yo.hasBareArrayAccess)(r.snippet)||r.variable&&(0,Yo.hasBareArrayAccess)(r.variable.name)||r.args.some(Yo.argHasBareArrayAccess)){t.report({message:"Bare bracket access is not allowed in strict2 mode",startIndex:e.position.start,endIndex:e.position.end});return}(0,Yo.hasSkippedCharacters)((0,Yo.rawMarkup)(e))&&t.report({message:"Syntax error in 'include' tag",startIndex:e.position.start,endIndex:e.position.end})}});var UD=x(cS=>{"use strict";p();Object.defineProperty(cS,"__esModule",{value:!0});cS.checkIncrementTag=Wee;var zee=ce(),oS=Ee();function Wee(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'increment' tag",startIndex:e.position.start,endIndex:e.position.end});return}(Gee(e)||(0,oS.hasSkippedCharacters)((0,oS.rawMarkup)(e)))&&t.report({message:"Syntax error in 'increment' tag",startIndex:e.position.start,endIndex:e.position.end})}function Gee(e){return!e.markup||typeof e.markup!="object"||Array.isArray(e.markup)||!("type"in e.markup)?!1:e.markup.type===zee.NodeTypes.VariableLookup&&(0,oS.hasBareArrayAccess)(e.markup)}});var zD=x(uS=>{"use strict";p();Object.defineProperty(uS,"__esModule",{value:!0});uS.checkInlineCommentTag=Jee;var HD=Ee();function Jee(e,t){(0,HD.hasRubyValidInlineCommentMarkup)((0,HD.rawMarkup)(e))||t.report({message:"Syntax error in tag '#' - Each line of comments must be prefixed by the '#' character",startIndex:e.position.start,endIndex:e.position.end})}});var JD=x(Xu=>{"use strict";p();Object.defineProperty(Xu,"__esModule",{value:!0});Xu.checkJavascriptTag=Zee;Xu.checkJavascriptParserError=ete;Xu.hasJavascriptClosingTagAfter=GD;var Dr=Ee(),WD="Syntax Error in 'javascript' - Valid syntax: javascript",Kee="'javascript' tag was never closed",Yee="Unknown tag 'endjavascript'",Qee="Attempting to end parsing before LiquidRawTag 'javascript' was closed",Xee="Attempting to close LiquidTag 'javascript' before it was opened without a matching 'javascript'";function Zee(e,t){(0,Dr.hasEmptyMarkup)((0,Dr.rawMarkup)(e))||t.report({message:WD,startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}function ete(e,t,r){if(!nte(r))return;if(e.message===Xee){tte(e,t,r,Yee);return}if(e.message!==Qee)return;let n=rte(r);if(n){t.report({message:WD,startIndex:n.start,endIndex:n.end});return}let[i,s]=(0,Dr.resolveErrorLocation)(e,r);GD(r,i)||t.report({message:Kee,startIndex:i,endIndex:s})}function tte(e,t,r,n){let[i,s]=(0,Dr.resolveErrorLocation)(e,r);t.report({message:n,startIndex:i,endIndex:s})}function rte(e){for(let t of(0,Dr.liquidTagBodies)(e)){let r=(0,Dr.liquidTagMarkup)(t.body);if(r?.tagName==="javascript"&&(r.remainingTokens.length>0||r.hasSkippedCharacters))return{start:t.start,end:t.end}}return null}function GD(e,t){for(let r of(0,Dr.liquidTagBodies)(e,t))if((0,Dr.liquidTagMarkup)(r.body)?.tagName==="endjavascript")return!0;return!1}function nte(e){if((0,Dr.hasLiquidTagNamed)(e,"javascript")||(0,Dr.hasLiquidTagNamed)(e,"endjavascript"))return!0;for(let t of(0,Dr.liquidTagBodies)(e)){let r=(0,Dr.liquidTagMarkup)(t.body);if(r?.tagName==="javascript"||r?.tagName==="endjavascript")return!0}return!1}});var KD=x(fS=>{"use strict";p();Object.defineProperty(fS,"__esModule",{value:!0});fS.checkLayoutTag=ite;var lS=Ee();function ite(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'layout' tag",startIndex:e.position.start,endIndex:e.position.end});return}let r=e.markup;if((0,lS.hasBareArrayAccess)(r)){t.report({message:"Bare bracket access is not allowed in strict2 mode",startIndex:e.position.start,endIndex:e.position.end});return}(0,lS.hasSkippedCharacters)((0,lS.rawMarkup)(e))&&t.report({message:"Syntax error in 'layout' tag",startIndex:e.position.start,endIndex:e.position.end})}});var YD=x(pS=>{"use strict";p();Object.defineProperty(pS,"__esModule",{value:!0});pS.checkPaginateTag=ste;var Qo=Ee();function ste(e,t){if(typeof e.markup=="string"){if((0,Qo.hasRubyAcceptedPaginateTrailingComma)(e.markup))return;t.report({message:"Syntax error in 'paginate' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}let r=e.markup;if((0,Qo.hasBareArrayAccess)(r.collection)||(0,Qo.hasBareArrayAccess)(r.pageSize)||r.args.some(Qo.argHasBareArrayAccess)){t.report({message:"Bare bracket access is not allowed",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}if((0,Qo.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,r.position.start)){t.report({message:"Syntax error in 'paginate' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}let n=e.source.slice(r.position.start,e.markupPosition.end);(0,Qo.hasSkippedCharacters)(n)&&t.report({message:"Syntax error in 'paginate' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}});var ZD=x(Wm=>{"use strict";p();Object.defineProperty(Wm,"__esModule",{value:!0});Wm.checkPartialTag=cte;Wm.checkPartialParserError=ute;var Zu=Ee(),QD="Syntax error in 'partial' tag",XD="Attempting to end parsing before LiquidTag 'partial' was closed",ate="Unclosed block tag 'partial' in {% liquid %} block",ote=new Set([XD,ate,"Attempting to close LiquidTag 'partial' before it was opened without a matching 'partial'"]);function cte(e,t){if(typeof e.markup=="string"){dS(e,t,QD);return}let r=e.markup;if(lte(r.value)){dS(e,t,"Liquid syntax error: Error in tag 'partial' - Valid syntax: partial '[name]'");return}(0,Zu.hasSkippedCharacters)((0,Zu.rawMarkup)(e))&&dS(e,t,QD)}function ute(e,t,r){if(!ote.has(e.message))return;let[n,i]=e.message.includes("Unclosed block tag 'partial' in {% liquid %} block")?(0,Zu.liquidLineTagLocation)(r,"partial")??(0,Zu.resolveErrorLocation)(e,r):(0,Zu.resolveErrorLocation)(e,r);t.report({message:e.message===XD?"Liquid syntax error: 'partial' tag was never closed":e.message,startIndex:n,endIndex:i})}function lte(e){return e===""||e.includes("/")}function dS(e,t,r){t.report({message:r,startIndex:e.position.start,endIndex:e.position.end})}});var tj=x(Gm=>{"use strict";p();Object.defineProperty(Gm,"__esModule",{value:!0});Gm.checkRawTag=pte;Gm.checkRawParserError=dte;var hS=z0(),el=Ee(),ej="Attempting to end parsing before LiquidRawTag 'raw' was closed",fte=new Set([ej,hS.UNMATCHED_RAW_CLOSE_PARSER_ERROR,"Unclosed raw tag 'raw' in {% liquid %} block"]);function pte(e,t){(e.markup!==""||(0,el.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,e.markupPosition.end)||(0,el.hasSkippedCharacters)((0,el.rawMarkup)(e)))&&t.report({message:"Syntax error in 'raw' tag",startIndex:e.markupPosition.start,endIndex:e.markupPosition.end})}function dte(e,t,r){if(!fte.has(e.message))return;let[n,i]=(0,el.resolveErrorLocation)(e,r);e.message===ej&&(0,el.hasRubyAcceptedRawTagCloserWithMarkup)(r,"raw",n)||e.message===hS.UNMATCHED_RAW_CLOSE_PARSER_ERROR&&(0,hS.hasRubyAcceptedInertCommentBodyCloser)(r,"raw",n)||t.report({message:e.message,startIndex:n,endIndex:i})}});var rj=x(mS=>{"use strict";p();Object.defineProperty(mS,"__esModule",{value:!0});mS.checkRenderTag=gte;var hte=ce(),da=Ee(),Jm="Syntax error in 'render' tag",mte="Bare bracket access is not allowed in strict2 mode";function gte(e,t){if(typeof e.markup=="string"){tl(e,t,Jm);return}let r=e.markup;if((0,da.hasUnclosedQuotedString)((0,da.rawMarkup)(e))){tl(e,t,Jm);return}if(yte(r)){tl(e,t,mte);return}if((0,da.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,r.position.start)){tl(e,t,Jm);return}let n=e.source.slice(r.position.start,e.markupPosition.end);(0,da.hasSkippedCharacters)(n)&&tl(e,t,Jm)}function yte(e){return e.snippet.type===hte.NodeTypes.VariableLookup&&(0,da.hasBareArrayAccess)(e.snippet)||e.variable&&(0,da.hasBareArrayAccess)(e.variable.name)?!0:e.args.some(t=>(0,da.hasBareArrayAccess)(t.value))}function tl(e,t,r){t.report({message:r,startIndex:e.position.start,endIndex:e.position.end})}});var nj=x(gS=>{"use strict";p();Object.defineProperty(gS,"__esModule",{value:!0});gS.checkSchemaTag=_te;function _te(e,t){e.markup!==""&&t.report({message:"Syntax error in 'schema' tag",startIndex:e.markupPosition.start,endIndex:e.markupPosition.end})}});var sj=x(yS=>{"use strict";p();Object.defineProperty(yS,"__esModule",{value:!0});yS.checkSectionsTag=vte;var ij=Ee();function vte(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'sections' tag",startIndex:e.position.start,endIndex:e.position.end});return}(0,ij.hasSkippedCharacters)((0,ij.rawMarkup)(e))&&t.report({message:"Syntax error in 'sections' tag",startIndex:e.position.start,endIndex:e.position.end})}});var aj=x(vS=>{"use strict";p();Object.defineProperty(vS,"__esModule",{value:!0});vS.checkSectionTag=bte;var _S=Ee();function bte(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'section' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}if(e.blockEndPosition){t.report({message:"Unknown tag 'endsection'",startIndex:e.blockEndPosition.start,endIndex:e.blockEndPosition.end});return}if(e.markup.args.some(n=>n.value.type!=="BlockArrayLiteral"&&(0,_S.hasBareArrayAccess)(n.value))){t.report({message:"Bare bracket access is not allowed in strict2 mode",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end});return}(0,_S.hasSkippedCharacters)((0,_S.rawMarkup)(e))&&t.report({message:"Syntax error in 'section' tag",startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}});var cj=x(bS=>{"use strict";p();Object.defineProperty(bS,"__esModule",{value:!0});bS.checkStyleTag=kte;var oj=Ee();function kte(e,t){let r=(0,oj.rawMarkup)(e);(0,oj.hasEmptyMarkup)(r)||t.report({message:`'style' tag does not accept any arguments in "${r}"`,startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}});var uj=x(SS=>{"use strict";p();Object.defineProperty(SS,"__esModule",{value:!0});SS.checkStylesheetTag=Ste;var kS=Ee();function Ste(e,t){let r=(0,kS.rawMarkup)(e);(0,kS.hasEmptyMarkup)(r)||(0,kS.hasSingleStringMarkup)(r,"scss")||t.report({message:`'stylesheet' tag can only accept the string argument 'scss' in "${r}"`,startIndex:e.blockStartPosition.start,endIndex:e.blockStartPosition.end})}});var lj=x(TS=>{"use strict";p();Object.defineProperty(TS,"__esModule",{value:!0});TS.checkTablerowTag=Tte;var rl=Ee();function Tte(e,t){if(typeof e.markup=="string"){if((0,rl.hasRubyAcceptedLoopTrailingComma)(e.markup))return;t.report({message:"Syntax error in 'tablerow' tag",startIndex:e.position.start,endIndex:e.position.end});return}let r=e.markup;if((0,rl.hasBareArrayAccess)(r.collection)||r.args.some(rl.argHasBareArrayAccess)){t.report({message:"Bare bracket access is not allowed",startIndex:e.position.start,endIndex:e.position.end});return}if((0,rl.hasSkippedPrefixCharacters)(e.source,e.markupPosition.start,r.position.start)){t.report({message:"Syntax error in 'tablerow' tag",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.source.slice(r.position.start,e.markupPosition.end);(0,rl.hasSkippedCharacters)(n)&&t.report({message:"Syntax error in 'tablerow' tag",startIndex:e.position.start,endIndex:e.position.end})}});var fj=x(wS=>{"use strict";p();Object.defineProperty(wS,"__esModule",{value:!0});wS.checkUnlessTag=wte;var nl=Ee();function wte(e,t){if(typeof e.markup=="string"){t.report({message:"Syntax error in 'unless' tag",startIndex:e.position.start,endIndex:e.position.end});return}let r=e.source,n=e.markup,i=(0,nl.rawMarkup)(e);if((0,nl.hasUnclosedQuotedString)(i)){t.report({message:"Syntax error in 'unless' tag",startIndex:e.position.start,endIndex:e.position.end});return}if((0,nl.conditionalHasBareArrayAccess)(n)){t.report({message:"Bare bracket access is not allowed in strict2 mode",startIndex:e.position.start,endIndex:e.position.end});return}if((0,nl.hasSkippedPrefixCharacters)(r,e.markupPosition.start,n.position.start)){t.report({message:"Syntax error in 'unless' tag",startIndex:e.position.start,endIndex:e.position.end});return}(0,nl.hasSkippedCharacters)(r.slice(n.position.start,e.markupPosition.end))&&t.report({message:"Syntax error in 'unless' tag",startIndex:e.position.start,endIndex:e.position.end})}});var pj=x(xS=>{"use strict";p();Object.defineProperty(xS,"__esModule",{value:!0});xS.checkVariableOutput=xte;var Di=Ee();function xte(e,t){let r=e.source.slice(e.markupPosition.start,e.markupPosition.end);if(typeof e.markup=="string"){if((0,Di.hasEmptyMarkup)(r)||(0,Di.hasRubyAcceptedEmptyFirstFilterArgument)(e.markup)||(0,Di.hasRubyAcceptedFilterArgumentTrailingComma)(e.markup))return;t.report({message:"Syntax error in variable output",startIndex:e.position.start,endIndex:e.position.end});return}let n=e.markup;if(!(0,Di.hasRubyAcceptedEmptyFirstFilterArgument)(r)&&!(0,Di.hasRubyAcceptedFilterArgumentTrailingComma)(r)){if((0,Di.hasUnclosedQuotedString)(r)){t.report({message:"Syntax error in variable output",startIndex:e.position.start,endIndex:e.position.end});return}if((0,Di.variableHasBareArrayAccess)(n)){t.report({message:"Bare bracket access is not allowed in strict2 mode",startIndex:e.position.start,endIndex:e.position.end});return}(0,Di.hasSkippedCharacters)(r)&&t.report({message:"Syntax error in variable output",startIndex:e.position.start,endIndex:e.position.end})}}});var bj=x(Ym=>{"use strict";p();Object.defineProperty(Ym,"__esModule",{value:!0});Ym.LiquidSyntaxError=void 0;var dj=G(),Ete=_D(),Ate=SD(),Km=TD(),hj=oa(),Ote=wD(),Pte=xD(),mj=z0(),Nte=qD(),qte=LD(),Lte=CD(),gj=RD(),Cte=DD(),Ite=FD(),Mte=BD(),Rte=VD(),Dte=$D(),jte=UD(),Fte=zD(),yj=JD(),Bte=KD(),Vte=YD(),_j=ZD(),vj=tj(),$te=rj(),Ute=nj(),Hte=sj(),zte=aj(),Wte=cj(),Gte=uj(),Jte=lj(),Kte=fj(),Yte=pj(),ES=(e,t)=>{},Qte={"#":Fte.checkInlineCommentTag,assign:Ete.checkAssignTag,block:hj.checkBlockTag,break:ES,capture:Ote.checkCaptureTag,case:Pte.checkCaseTag,continue:ES,content_for:Nte.checkContentForTag,cycle:qte.checkCycleTag,decrement:Lte.checkDecrementTag,echo:Cte.checkEchoTag,form:Ite.checkFormTag,for:Mte.checkForTag,tablerow:Jte.checkTablerowTag,if:Rte.checkIfTag,ifchanged:ES,include:Dte.checkIncludeTag,increment:jte.checkIncrementTag,layout:Bte.checkLayoutTag,paginate:Vte.checkPaginateTag,partial:_j.checkPartialTag,render:$te.checkRenderTag,section:zte.checkSectionTag,sections:Hte.checkSectionsTag,unless:Kte.checkUnlessTag},Xte={else:Km.checkMisplacedBranchTag,elsif:Km.checkMisplacedBranchTag,when:Km.checkMisplacedBranchTag},Zte={comment:mj.checkCommentRawTag,doc:gj.checkDocTag,javascript:yj.checkJavascriptTag,schema:Ute.checkSchemaTag,style:Wte.checkStyleTag,stylesheet:Gte.checkStylesheetTag,raw:vj.checkRawTag};Ym.LiquidSyntaxError={meta:{code:"LiquidSyntaxError",name:"LiquidSyntaxError",docs:{description:"Reports Liquid syntax errors.",recommended:!0},type:dj.SourceCodeType.LiquidHtml,severity:dj.Severity.ERROR,schema:{},targets:[]},create(e){if(e.file.ast instanceof Error){let t=e.file.ast;return{async onCodePathStart(r){(0,mj.checkCommentTag)(t,e,r.source),(0,hj.checkBlockParserError)(t,e,r.source),(0,gj.checkDocParserError)(t,e,r.source),(0,_j.checkPartialParserError)(t,e,r.source),(0,vj.checkRawParserError)(t,e,r.source),(0,yj.checkJavascriptParserError)(t,e,r.source)}}}return{async LiquidRawTag(t){let r=Zte[t.name];r&&r(t,e)},async LiquidTag(t){let r=Qte[t.name]??Xte[t.name];if(r){r(t,e);return}await(0,Ate.checkBaseTag)(t,e)},async LiquidBranch(t){(0,Km.checkBranchTag)(t,e)},async LiquidVariableOutput(t){(0,Yte.checkVariableOutput)(t,e)}}}}});var xj=x(ji=>{"use strict";p();Object.defineProperty(ji,"__esModule",{value:!0});ji.MaxFileSizeJSON=ji.MaxFileSize=void 0;var AS=G(),jr=1024,il=1024*jr,kj="_drafts",Tj="full-file-bytes",un="schemaless-bytes",wj={assets:{bytes:20*il,measurement:Tj},locales:{bytes:1.5*il,measurement:un},"config/settings_data.json":{bytes:1.5*il,measurement:un},"config/settings_schema.json":{bytes:512*jr,measurement:un},"templates/*.json":{bytes:512*jr,measurement:un},"sections/*.json":{bytes:512*jr,measurement:un},blocks:{bytes:256*jr,measurement:un},config:{bytes:256*jr,measurement:un},layout:{bytes:256*jr,measurement:un},snippets:{bytes:256*jr,measurement:un},templates:{bytes:256*jr,measurement:un},sections:{bytes:256*jr,measurement:un}},ere=Object.keys(wj),tre=/{%-?\s*schema\s*-?%}[\s\S]*?{%-?\s*endschema\s*-?%}/g;ji.MaxFileSize={meta:{code:"MaxFileSize",name:"MaxFileSize",docs:{description:"Reports theme files that exceed Shopify's maximum file size.",recommended:!0},type:AS.SourceCodeType.LiquidHtml,severity:AS.Severity.ERROR,schema:{},targets:[]},create(e){return{async onCodePathStart(){let t=rre(e.toRelativePath(e.file.uri));if(!t)return;let r=are(e.file.source,t.measurement);r<=t.bytes||e.report({message:`Theme file is too large. It is ${Sj(r)} but the limit is ${Sj(t.bytes)}.`,startIndex:0,endIndex:e.file.source.length})}}}};function rre(e){if(e===kj||e.startsWith(`${kj}/`))return;let t=nre(e);if(t)return wj[t]}function nre(e){return ere.find(t=>{if(t.endsWith("*.json")){let[r,n]=t.split("*");return sre(e,r)&&e.toLowerCase().endsWith(n)}return ire(e,t)})}function ire(e,t){return e===t||e.startsWith(`${t}/`)||e.endsWith(`/${t}`)||e.includes(`/${t}/`)}function sre(e,t){return e.startsWith(t)||e.includes(`/${t}`)}function are(e,t){if(t===Tj)return Buffer.byteLength(e);let r=[...e.matchAll(tre)].reduce((n,i)=>n+Buffer.byteLength(i[0]),0);return Buffer.byteLength(e)-r}function Sj(e){return e%il===0?`${e/il} MB`:e%jr===0?`${e/jr} KB`:`${e} bytes`}ji.MaxFileSizeJSON={...ji.MaxFileSize,meta:{...ji.MaxFileSize.meta,type:AS.SourceCodeType.JSON}}});var Aj=x(Qm=>{"use strict";p();Object.defineProperty(Qm,"__esModule",{value:!0});Qm.MissingBlockArguments=void 0;var ore=ei(),Ej=G(),cre=oa();Qm.MissingBlockArguments={meta:{code:"MissingBlockArguments",name:"Missing Block Arguments",docs:{description:"Reports required LiquidDoc parameters not provided to a block tag.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-block-arguments"},type:Ej.SourceCodeType.LiquidHtml,severity:Ej.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidTag(t){if(t.name!=="block"||(0,cre.blockTagSyntaxError)(t))return;let r=t.markup,n=await e.getBlockParameters(r.name.value);if(!n)return;let i=new Set(r.args.map(s=>s.name));t.children?.length&&i.add(ore.BLOCK_CONTENT_PARAMETER);for(let s of n.values())!s.required||i.has(s.name)||e.report({message:`Missing required argument '${s.name}' in block tag for '${r.name.value}'.`,startIndex:t.blockStartPosition.start,endIndex:t.blockStartPosition.end})}}}}});var Pj=x(Xm=>{"use strict";p();Object.defineProperty(Xm,"__esModule",{value:!0});Xm.UnrecognizedBlockArguments=void 0;var Oj=G(),ure=oa();Xm.UnrecognizedBlockArguments={meta:{code:"UnrecognizedBlockArguments",name:"Unrecognized Block Arguments",docs:{description:"Reports arguments in a block tag that are not part of the block's merged schema, LiquidDoc, and content interface.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unrecognized-block-arguments"},type:Oj.SourceCodeType.LiquidHtml,severity:Oj.Severity.WARNING,schema:{},targets:[]},create(e){return{async LiquidTag(t){if(t.name!=="block"||(0,ure.blockTagSyntaxError)(t))return;let r=t.markup,n=await e.getBlockParameters(r.name.value);if(n)for(let i of r.args)i.name==="block.name"||n.has(i.name)||e.report({message:`Unknown argument '${i.name}' in block tag for '${r.name.value}'.`,startIndex:i.position.start,endIndex:i.position.end})}}}}});var Lj=x(Ln=>{"use strict";p();var lre=Ln&&Ln.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),fre=Ln&&Ln.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),pre=Ln&&Ln.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&lre(r,t,n[i]);return fre(r,t),r}})();Object.defineProperty(Ln,"__esModule",{value:!0});Ln.ValidBlockArgumentTypes=void 0;var OS=ei(),dre=nn(),Fi=Ni(),hre=pre(bn()),mre=Ve(),Nj=G(),gre=oa(),yre=ce();Ln.ValidBlockArgumentTypes={meta:{code:"ValidBlockArgumentTypes",name:"Valid Block Argument Types",docs:{description:"Reports type mismatches in block arguments and declarations from schema, LiquidDoc, and built-in content.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-block-argument-types"},type:Nj.SourceCodeType.LiquidHtml,severity:Nj.Severity.WARNING,schema:{},targets:[]},create(e){let t=(0,mre.isBlock)(e.file.uri)?hre.basename(e.file.uri,".liquid"):void 0,r;return{async LiquidTag(n){if(n.name!=="block"||(0,gre.blockTagSyntaxError)(n))return;let i=n.markup,s=await e.getBlockParameters(i.name.value);if(s)for(let a of i.args){let o=s.get(a.name)?.type;if(o&&(0,Fi.parseStringLiterals)(o)){vre(e,a,o);continue}let c=qj(a.value);!o||!c||_re(o,c)||e.report({message:`Type mismatch for argument '${a.name}': expected ${o}, got ${c}`,startIndex:a.value.position.start,endIndex:a.value.position.end})}},async LiquidDocParamNode(n){if(!t)return;r??=e.getBlockParameters(t);let i=(await r)?.get(n.paramName.value);i&&bre(e,n,i)}}}};function qj(e){if(e.type===yre.NodeTypes.VariableLookup)return;if(e.type!=="BlockArrayLiteral")return(0,Fi.inferArgumentType)(e);let t=new Set(e.elements.map(qj));if(!(t.size===0||t.has(void 0)))return t.size===1?`${[...t][0]}[]`:"mixed[]"}function _re(e,t){return e===Fi.BasicParamTypes.Object?!0:t===Fi.BasicParamTypes.Object||t.endsWith("[]")?e===t:(0,Fi.isTypeCompatible)(e,t)}function vre(e,t,r){if((0,Fi.checkArgumentType)(r,t.value).kind!=="incompatible")return;let{start:n,end:i}=t.value.position;e.report({message:(0,Fi.getArgumentTypeMismatchMessage)(t.name,r,t.value),startIndex:n,endIndex:i,suggest:(0,dre.generateTypeMismatchSuggestions)(r,n,i)})}function bre(e,t,r){let n=(0,OS.liquidDocType)(t.paramType?.value),i=Sre(r);if(!t.paramType||!n||!i||n===Fi.BasicParamTypes.Object||n===i)return;let s=kre(r);e.report({message:`The ${s} '${r.name}' has Liquid type '${i}', but LiquidDoc declares '${n}'. The ${s} type is authoritative.`,startIndex:t.paramType.position.start-1,endIndex:t.paramType.position.end+1})}function kre(e){return e.name===OS.BLOCK_CONTENT_PARAMETER?"built-in parameter":"schema setting"}function Sre(e){if(!(!e.schemaSetting&&e.name!==OS.BLOCK_CONTENT_PARAMETER))return e.type}});var Ij=x(Cn=>{"use strict";p();var Tre=Cn&&Cn.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),wre=Cn&&Cn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),xre=Cn&&Cn.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&Tre(r,t,n[i]);return wre(r,t),r}})();Object.defineProperty(Cn,"__esModule",{value:!0});Cn.ValidBlockContentSettingType=void 0;var Ere=ei(),Are=He(),Ore=xre(bn()),Pre=Xp(),Nre=Ve(),Cj=G(),qre=Ae();Cn.ValidBlockContentSettingType={meta:{code:"ValidBlockContentSettingType",name:"Valid Block Content Setting Type",docs:{description:"Reports a theme block schema setting named 'content' whose Liquid type is not the built-in 'content' parameter's 'string' type.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-block-content-setting-type"},type:Cj.SourceCodeType.LiquidHtml,severity:Cj.Severity.ERROR,schema:{},targets:[]},create(e){if(!(0,Nre.isBlock)(e.file.uri))return{};let t=Ore.basename(e.file.uri,".liquid");return{async LiquidRawTag(r){r.name!=="schema"||r.body.kind!=="json"||e.getBlockSchema&&Lre(e,await e.getBlockSchema(t))}}}};function Lre(e,t){if(!t||t.validSchema instanceof Error||t.ast instanceof Error)return;let r=t.validSchema.settings??[],n=r.findIndex(a=>a.id===Ere.BLOCK_CONTENT_PARAMETER);if(n<0)return;let i=(0,Pre.schemaSettingLiquidType)(r[n].type),s=(0,Are.nodeAtPath)(t.ast,["settings",n,"type"]);!i||i==="string"||!s||(0,qre.reportWarning)(`Schema setting 'content' has Liquid type '${i}', but the built-in 'content' parameter has type 'string'.`,t.offset,s,e)}});var Rj=x(Zm=>{"use strict";p();Object.defineProperty(Zm,"__esModule",{value:!0});Zm.ValidBlockTagPlacement=void 0;var Mj=G(),Cre=oa(),Ire=/^templates\/(?:[^/]+\/)*[^/]+\.liquid$/,Mre=/^layout\/[^/]+\.liquid$/,Rre="The 'block' tag can only be used in templates/**/*.liquid and layout/*.liquid.";Zm.ValidBlockTagPlacement={meta:{code:"ValidBlockTagPlacement",name:"Valid Block Tag Placement",docs:{description:"Reports uses of the 'block' tag outside Liquid templates and layouts.",recommended:!0,url:"https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-block-tag-placement"},type:Mj.SourceCodeType.LiquidHtml,severity:Mj.Severity.ERROR,schema:{},targets:[]},create(e){let t=e.toRelativePath(e.file.uri),r=Ire.test(t)||Mre.test(t);return{async LiquidTag(n){n.name!=="block"||(0,Cre.blockTagSyntaxError)(n)||r||e.report({message:Rre,startIndex:n.position.start,endIndex:n.position.end})}}}}});var Fj=x(ha=>{"use strict";p();Object.defineProperty(ha,"__esModule",{value:!0});ha.recommended=ha.allChecks=void 0;var Dre=G(),jre=$L(),Fre=zL(),Bre=GL(),Vre=KL(),$re=QL(),Ure=ZL(),Hre=nC(),zre=sC(),Wre=cC(),Gre=lC(),Jre=pC(),Kre=vC(),Yre=xC(),Qre=OC(),Xre=NC(),Zre=LC(),ene=FC(),tne=$C(),rne=HC(),nne=JC(),ine=YC(),sne=rI(),ane=iI(),one=aI(),cne=uI(),une=VI(),lne=HI(),fne=WI(),pne=JI(),dne=YI(),hne=QI(),mne=ZI(),gne=rM(),yne=oM(),_ne=lM(),vne=pM(),bne=gM(),kne=_M(),Sne=bM(),Tne=SM(),wne=xM(),xne=qM(),Ene=FM(),Ane=VM(),One=HM(),Pne=WM(),Nne=JM(),qne=YM(),Lne=eR(),Cne=rR(),Ine=iR(),Mne=aR(),Rne=cR(),Dne=lR(),jne=dR(),Fne=gR(),Bne=_R(),Vne=bR(),$ne=TR(),Une=OR(),Hne=NR(),zne=LR(),Wne=MR(),Gne=jR(),Jne=UR(),Kne=KR(),Yne=QR(),Dj=ZR(),Qne=tD(),Xne=rD(),Zne=nD(),Xo=sD(),eie=oD(),tie=dD(),rie=hD(),nie=mD(),iie=yD(),sie=bj(),jj=xj(),aie=Aj(),oie=Pj(),cie=Lj(),uie=Ij(),lie=Rj();ha.allChecks=[jre.AppBlockValidTags,Fre.AssetPreload,Bre.AssetSizeAppBlockCSS,Vre.AssetSizeAppBlockJavaScript,$re.AssetSizeCSS,Ure.AssetSizeJavaScript,Hre.BlockIdUsage,zre.CdnPreconnect,Wre.ContentForHeaderModification,Gre.DeprecateBgsizes,Jre.DeprecateLazysizes,Kre.DeprecatedFilter,Yre.DeprecatedFontsOnSectionsAndBlocks,Qre.DeprecatedFontsOnSettingsData,Xre.DeprecatedFontsOnSettingsSchema,Zre.DeprecatedTag,tne.DuplicateContentForArguments,ene.DuplicateRenderSnippetArguments,rne.EmptyBlockContent,nne.HardcodedRoutes,ine.ImgWidthAndHeight,sne.JSONMissingBlock,ane.JSONMissingSection,one.JSONSyntaxError,cne.LiquidFreeSettings,une.LiquidHTMLSyntaxError,lne.MatchingTranslations,fne.MissingAsset,pne.MissingContentForArguments,dne.MissingRenderSnippetArguments,hne.MissingTemplate,Ine.UnsupportedFilterArguments,Xne.AppBlockMissingSchema,mne.OrphanedSnippet,gne.PaginationSize,yne.ParserBlockingScript,_ne.SchemaPresetsBlockOrder,vne.SchemaPresetsStaticBlocks,bne.RemoteAsset,kne.RequiredLayoutThemeObject,Sne.ReservedDocParamNames,Tne.StaticStylesheetAndJavascriptTags,wne.TranslationKeyExists,xne.UnclosedHTMLElement,Ene.UndefinedObject,Ane.UniqueDocParamNames,Zne.UniqueSettingIds,One.UniqueStaticBlockId,Pne.UnknownFilter,Nne.UnrecognizedContentForArguments,qne.UnrecognizedRenderSnippetArguments,Cne.UnsupportedDocTag,Lne.UnusedAssign,Mne.UnusedDocParam,jne.ValidBlockTarget,Bne.ValidHTMLTranslation,Rne.ValidContentForArguments,Dne.ValidContentForArgumentTypes,Fne.ValidScopedCSSClass,Vne.ValidJSON,$ne.ValidDocParamTypes,Une.ValidLocalBlocks,Hne.ValidRenderSnippetArgumentTypes,zne.ValidSchema,Jne.ValidSettingsKey,Kne.ValidStandardEventData,Yne.ValidStaticBlockType,Dj.ValidVisibleIf,Dj.ValidVisibleIfSettingsSchema,Qne.VariableName,Wne.ValidSchemaName,Gne.ValidSchemaTranslations,Xo.JavascriptOncePerFile,Xo.JavascriptTagInWrongFile,Xo.SchemaOncePerFile,Xo.SchemaSectionOrBlockOnly,Xo.StylesheetOncePerFile,Xo.StylesheetTagInWrongFile,eie.BlockContentUsage,tie.DuplicateBlockArguments,rie.ExcessiveSettingsCount,nie.LiquidComplexity,iie.LiquidNestingDepth,sie.LiquidSyntaxError,jj.MaxFileSize,jj.MaxFileSizeJSON,aie.MissingBlockArguments,oie.UnrecognizedBlockArguments,cie.ValidBlockArgumentTypes,uie.ValidBlockContentSettingType,lie.ValidBlockTagPlacement];ha.recommended=ha.allChecks.filter(e=>{let t=e.meta.docs.recommended,r=!e.meta.targets||!e.meta.targets.length||e.meta.targets.includes(Dre.ConfigTarget.Recommended);return t&&r})});var Uj=x(ui=>{"use strict";p();var fie=ui&&ui.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),pie=ui&&ui.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),die=ui&&ui.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&fie(r,t,n[i]);return pie(r,t),r}})();Object.defineProperty(ui,"__esModule",{value:!0});ui.findRoot=$j;var br=die(bn());async function hie(e,t){return mie(t(br.join(e,"shopify.extension.toml")),t(br.join(e,".theme-check.yml")),Bj(t(br.join(e,".git")),t(br.join(e,"assets")),t(br.join(e,"snippets"))),Bj(t(br.join(e,"assets")),t(br.join(e,"snippets")),Vj(t(br.join(br.dirname(e),".theme-check.yml"))),Vj(t(br.join(br.dirname(br.dirname(e)),".theme-check.yml")))))}async function Bj(...e){return(await Promise.all(e)).reduce((r,n)=>r&&n,!0)}async function mie(...e){return(await Promise.all(e)).reduce((r,n)=>r||n,!1)}async function Vj(e){return!await e}async function $j(e,t){if(await hie(e,t))return e;let n=br.dirname(e);return n===e?null:$j(n,t)}});var eg=x(PS=>{"use strict";p();Object.defineProperty(PS,"__esModule",{value:!0});PS.flattenFixes=Hj;function Hj(e){return Array.isArray(e)?e.flatMap(Hj):[e]}});var Wj=x(tg=>{"use strict";p();Object.defineProperty(tg,"__esModule",{value:!0});tg.JSONCorrector=void 0;var zj=tx();function gie(e,t){switch(t.type){case"add":return(0,zj.set)(e,t.path,t.value);case"remove":return(0,zj.unset)(e,t.path),e}}var NS=class{source;patches=[];constructor(t){this.source=t}get fix(){if(this.patches.length===0)return[];let t=this.patches.reduce(gie,JSON.parse(this.source));return{startIndex:0,endIndex:this.source.length,insert:JSON.stringify(t,null,2)}}add(t,r){this.patches.push({type:"add",path:t,value:r})}replace(t,r){this.patches.push({type:"remove",path:t},{type:"add",path:t,value:r})}remove(t){this.patches.push({type:"remove",path:t})}};tg.JSONCorrector=NS});var Gj=x(rg=>{"use strict";p();Object.defineProperty(rg,"__esModule",{value:!0});rg.StringCorrector=void 0;var qS=class{source;fix=[];constructor(t){this.source=t}insert(t,r){this.fix.push({startIndex:t,endIndex:t,insert:r})}replace(t,r,n){this.fix.push({startIndex:t,endIndex:r,insert:n})}remove(t,r){this.fix.push({startIndex:t,endIndex:r,insert:""})}};rg.StringCorrector=qS});var LS=x(ma=>{"use strict";p();Object.defineProperty(ma,"__esModule",{value:!0});ma.StringCorrector=ma.JSONCorrector=void 0;ma.createCorrector=yie;var Jj=G(),Kj=Wj();Object.defineProperty(ma,"JSONCorrector",{enumerable:!0,get:function(){return Kj.JSONCorrector}});var Yj=Gj();Object.defineProperty(ma,"StringCorrector",{enumerable:!0,get:function(){return Yj.StringCorrector}});function yie(e,t){switch(e){case Jj.SourceCodeType.JSON:return new Kj.JSONCorrector(t);case Jj.SourceCodeType.LiquidHtml:return new Yj.StringCorrector(t);default:return _ie(e)}}function _ie(e){throw new Error(`Case statement not exhausted: ${e}`)}});var Qj=x(CS=>{"use strict";p();Object.defineProperty(CS,"__esModule",{value:!0});CS.autofix=kie;var vie=LS(),bie=eg();async function kie(e,t,r){let n=t.filter(s=>"fix"in s&&!!s.fix),i=[];for(let s of e){let a=n.filter(c=>c.uri===s.uri);if(a.length===0)continue;let o=(0,vie.createCorrector)(s.type,s.source);for(let c of a)c.fix(o);i.push(r(s,(0,bie.flattenFixes)(o.fix)))}await Promise.all(i)}});var Xj=x(IS=>{"use strict";p();Object.defineProperty(IS,"__esModule",{value:!0});IS.applyFixToString=Tie;var Sie=eg();function Tie(e,t){let r=e,n=0,i=(0,Sie.flattenFixes)(t).sort((s,a)=>s.startIndex-a.startIndex);for(let s=0;s<i.length-1;s++){let a=i[s],o=i[s+1];if(a.endIndex>o.startIndex)throw new Error("Overlapping ranges are not allowed")}for(let s of i){let a=s.startIndex+n,o=s.endIndex+n;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),n+=s.insert.length-(o-a)}return r}});var Zj=x(sr=>{"use strict";p();Object.defineProperty(sr,"__esModule",{value:!0});sr.applyFixToString=sr.autofix=sr.createCorrector=sr.JSONCorrector=sr.StringCorrector=sr.flattenFixes=void 0;var wie=eg();Object.defineProperty(sr,"flattenFixes",{enumerable:!0,get:function(){return wie.flattenFixes}});var MS=LS();Object.defineProperty(sr,"StringCorrector",{enumerable:!0,get:function(){return MS.StringCorrector}});Object.defineProperty(sr,"JSONCorrector",{enumerable:!0,get:function(){return MS.JSONCorrector}});Object.defineProperty(sr,"createCorrector",{enumerable:!0,get:function(){return MS.createCorrector}});var xie=Qj();Object.defineProperty(sr,"autofix",{enumerable:!0,get:function(){return xie.autofix}});var Eie=Xj();Object.defineProperty(sr,"applyFixToString",{enumerable:!0,get:function(){return Eie.applyFixToString}})});var Zt=x(ge=>{"use strict";p();var a2=ge&&ge.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Aie=ge&&ge.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),o2=ge&&ge.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&a2(r,t,n[i]);return Aie(r,t),r}})(),it=ge&&ge.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&a2(t,e,r)};Object.defineProperty(ge,"__esModule",{value:!0});ge.schemaSettingLiquidType=ge.getBlockName=ge.path=ge.resolveBlockParameters=ge.makeGetBlockParameters=ge.BLOCK_CONTENT_PARAMETER=void 0;ge.check=Mie;var Oie=xb(),Pie=ei(),Nie=uk(),ga=Id(),qie=ML(),e2=mk(),t2=o2(bn()),RS=G(),r2=Ae(),c2=VL();it(lk(),ge);it(xb(),ge);var DS=ei();Object.defineProperty(ge,"BLOCK_CONTENT_PARAMETER",{enumerable:!0,get:function(){return DS.BLOCK_CONTENT_PARAMETER}});Object.defineProperty(ge,"makeGetBlockParameters",{enumerable:!0,get:function(){return DS.makeGetBlockParameters}});Object.defineProperty(ge,"resolveBlockParameters",{enumerable:!0,get:function(){return DS.resolveBlockParameters}});it(Fj(),ge);it(Id(),ge);it(Uj(),ge);it(Zj(),ge);it(mk(),ge);it(He(),ge);it(uk(),ge);ge.path=o2(bn());it(Ve(),ge);it(wu(),ge);it(G(),ge);it(df(),ge);it(By(),ge);it(jy(),ge);it(Ry(),ge);it(qy(),ge);it($p(),ge);it(Kp(),ge);it(Xn(),ge);it(s0(),ge);var Lie=nn();Object.defineProperty(ge,"getBlockName",{enumerable:!0,get:function(){return Lie.getBlockName}});it(Ni(),ge);var Cie=Xp();Object.defineProperty(ge,"schemaSettingLiquidType",{enumerable:!0,get:function(){return Cie.schemaSettingLiquidType}});var Iie=e=>{};async function Mie(e,t,r){let n=[],i=[],{fs:s}=r,{rootUri:a}=t,o={...r,getBlockParameters:(0,Pie.makeGetBlockParameters)(r),mode:t.context,fileExists:(0,ga.makeFileExists)(s),fileSize:(0,ga.makeFileSize)(s),getDefaultLocale:(0,ga.makeGetDefaultLocale)(s,a),getDefaultTranslations:(0,ga.makeGetDefaultTranslations)(s,e,a),getDefaultSchemaLocale:(0,ga.makeGetDefaultSchemaLocale)(s,a),getDefaultSchemaTranslations:(0,ga.makeGetDefaultSchemaTranslations)(s,e,a),getMetafieldDefinitions:r.getMetafieldDefinitions??(0,ga.makeGetMetafieldDefinitions)(s)},{DisabledChecksVisitor:c,isDisabled:l}=(0,qie.createDisabledChecksModule)(),m=(await Nie.JSONValidator.create(o.jsonValidationSet,t))?.validate;o.themeDocset&&!o.themeDocset.isAugmented&&(o.themeDocset=new Oie.AugmentedThemeDocset(o.themeDocset));for(let g of Object.values(RS.SourceCodeType))switch(g){case RS.SourceCodeType.JSON:{let v=s2(g,e),b=n2(g,t.checks);for(let _ of v)for(let k of b){if((0,e2.isIgnored)(_.uri,t,k))continue;let w=i2(k,_,t,i,o,m);n.push(jie(w,_))}break}case RS.SourceCodeType.LiquidHtml:{let v=s2(g,e),b=[c,...n2(g,t.checks)];for(let _ of v){let k=[];for(let w of b)(0,e2.isIgnored)(_.uri,t,w)||k.push(i2(w,_,t,i,o,m));n.push(...Fie(k,_))}break}}let d=t.onError||Iie;return await Promise.all(n.map(g=>g.catch(d))),i.filter(g=>!l(g))}function Rie(e,t,r,n,i,s){let a=n.settings[e.meta.code];return{...i,validateJSON:s,settings:Die(a,e.meta.schema),toUri:o=>t2.join(n.rootUri,...o.split("/")),toRelativePath:o=>t2.relative(o,n.rootUri),report(o){r.push({type:e.meta.type,check:e.meta.code,message:o.message,uri:t.uri,severity:a?.severity??e.meta.severity,start:(0,r2.getPosition)(t.source,o.startIndex),end:(0,r2.getPosition)(t.source,o.endIndex),fix:o.fix,suggest:o.suggest})},file:t}}function Die(e,t){let r={};for(let[n,i]of Object.entries(t))r[n]=e?.[n]??i.defaultValue();return r}function n2(e,t){return t.filter(r=>r.meta.type===e)}function i2(e,t,r,n,i,s){let a=Rie(e,t,n,r,i,s);return e.create(a)}function s2(e,t){return t.filter(r=>r.type===e)}async function jie(e,t){e.onCodePathStart&&await e.onCodePathStart(t),!(t.ast instanceof Error)&&(Object.keys(e).length>0&&await(0,c2.visitJSON)(t.ast,e),e.onCodePathEnd&&await e.onCodePathEnd(t))}function Fie(e,t){if(e.length===0)return[];let r=e.map(()=>[]),n=new Map,i=new Map,s=(a,...o)=>{let c=i.get(a);if(!c){c=[];for(let[l,f]of e.entries())try{f[a]&&c.push(l)}catch(m){n.has(l)||n.set(l,m)}i.set(a,c)}for(let l of c)r[l].push([a,o])};return s("onCodePathStart",t),t.ast instanceof Error||((0,c2.visitLiquid)(t.ast,s),s("onCodePathEnd",t)),e.map(async(a,o)=>{if(n.has(o))throw n.get(o);for(let[c,l]of r[o])await a[c](...l)})}});var l2=x((ng,u2)=>{p();(function(e,t){typeof ng=="object"&&typeof u2<"u"?t(ng):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.acorn={}))})(ng,(function(e){"use strict";var t=[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],n="\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",i="\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"},c=/^in(stanceof)?$/,l=new RegExp("["+i+"]"),f=new RegExp("["+i+n+"]");function m(u,h){for(var S=65536,E=0;E<h.length;E+=2){if(S+=h[E],S>u)return!1;if(S+=h[E+1],S>=u)return!0}return!1}function d(u,h){return u<65?u===36:u<91?!0:u<97?u===95:u<123?!0:u<=65535?u>=170&&l.test(String.fromCharCode(u)):h===!1?!1:m(u,r)}function g(u,h){return u<48?u===36:u<58?!0:u<65?!1:u<91?!0:u<97?u===95:u<123?!0:u<=65535?u>=170&&f.test(String.fromCharCode(u)):h===!1?!1:m(u,r)||m(u,t)}var v=function(h,S){S===void 0&&(S={}),this.label=h,this.keyword=S.keyword,this.beforeExpr=!!S.beforeExpr,this.startsExpr=!!S.startsExpr,this.isLoop=!!S.isLoop,this.isAssign=!!S.isAssign,this.prefix=!!S.prefix,this.postfix=!!S.postfix,this.binop=S.binop||null,this.updateContext=null};function b(u,h){return new v(u,{beforeExpr:!0,binop:h})}var _={beforeExpr:!0},k={startsExpr:!0},w={};function T(u,h){return h===void 0&&(h={}),h.keyword=u,w[u]=new v(u,h)}var y={num:new v("num",k),regexp:new v("regexp",k),string:new v("string",k),name:new v("name",k),privateId:new v("privateId",k),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(",",_),semi:new v(";",_),colon:new v(":",_),dot:new v("."),question:new v("?",_),questionDot:new v("?."),arrow:new v("=>",_),template:new v("template"),invalidTemplate:new v("invalidTemplate"),ellipsis:new v("...",_),backQuote:new v("`",k),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:b("||",1),logicalAND:b("&&",2),bitwiseOR:b("|",3),bitwiseXOR:b("^",4),bitwiseAND:b("&",5),equality:b("==/!=/===/!==",6),relational:b("</>/<=/>=",7),bitShift:b("<</>>/>>>",8),plusMin:new v("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:b("%",10),star:b("*",10),slash:b("/",10),starstar:new v("**",{beforeExpr:!0}),coalesce:b("??",1),_break:T("break"),_case:T("case",_),_catch:T("catch"),_continue:T("continue"),_debugger:T("debugger"),_default:T("default",_),_do:T("do",{isLoop:!0,beforeExpr:!0}),_else:T("else",_),_finally:T("finally"),_for:T("for",{isLoop:!0}),_function:T("function",k),_if:T("if"),_return:T("return",_),_switch:T("switch"),_throw:T("throw",_),_try:T("try"),_var:T("var"),_const:T("const"),_while:T("while",{isLoop:!0}),_with:T("with"),_new:T("new",{beforeExpr:!0,startsExpr:!0}),_this:T("this",k),_super:T("super",k),_class:T("class",k),_extends:T("extends",_),_export:T("export"),_import:T("import",k),_null:T("null",k),_true:T("true",k),_false:T("false",k),_in:T("in",{beforeExpr:!0,binop:7}),_instanceof:T("instanceof",{beforeExpr:!0,binop:7}),_typeof:T("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:T("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:T("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},A=/\r\n?|\n|\u2028|\u2029/,O=new RegExp(A.source,"g");function P(u){return u===10||u===13||u===8232||u===8233}function q(u,h,S){S===void 0&&(S=u.length);for(var E=h;E<S;E++){var N=u.charCodeAt(E);if(P(N))return E<S-1&&N===13&&u.charCodeAt(E+1)===10?E+2:E+1}return-1}var B=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,M=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,L=Object.prototype,C=L.hasOwnProperty,$=L.toString,V=Object.hasOwn||(function(u,h){return C.call(u,h)}),I=Array.isArray||(function(u){return $.call(u)==="[object Array]"}),F=Object.create(null);function U(u){return F[u]||(F[u]=new RegExp("^(?:"+u.replace(/ /g,"|")+")$"))}function J(u){return u<=65535?String.fromCharCode(u):(u-=65536,String.fromCharCode((u>>10)+55296,(u&1023)+56320))}var Q=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Y=function(h,S){this.line=h,this.column=S};Y.prototype.offset=function(h){return new Y(this.line,this.column+h)};var he=function(h,S,E){this.start=S,this.end=E,h.sourceFile!==null&&(this.source=h.sourceFile)};function _e(u,h){for(var S=1,E=0;;){var N=q(u,E,h);if(N<0)return new Y(S,h-E);++S,E=N}}var at={ecmaVersion:null,sourceType:"script",strict:!1,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},Ce=!1;function dn(u){var h={};for(var S in at)h[S]=u&&V(u,S)?u[S]:at[S];if(h.ecmaVersion==="latest"?h.ecmaVersion=1e8:h.ecmaVersion==null?(!Ce&&typeof console=="object"&&console.warn&&(Ce=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
89
- Defaulting to 2020, but this will stop working in the future.`)),h.ecmaVersion=11):h.ecmaVersion>=2015&&(h.ecmaVersion-=2009),h.allowReserved==null&&(h.allowReserved=h.ecmaVersion<5),(!u||u.allowHashBang==null)&&(h.allowHashBang=h.ecmaVersion>=14),I(h.onToken)){var E=h.onToken;h.onToken=function(N){return E.push(N)}}if(I(h.onComment)&&(h.onComment=os(h,h.onComment)),h.sourceType==="commonjs"&&h.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return h}function os(u,h){return function(S,E,N,R,j,W){var K={type:S?"Block":"Line",value:E,start:N,end:R};u.locations&&(K.loc=new he(this,j,W)),u.ranges&&(K.range=[N,R]),h.push(K)}}var cs=1,us=2,by=4,vw=8,ky=16,bw=32,tf=64,kw=128,ls=256,bc=512,Sw=1024,rf=cs|us|ls;function Sy(u,h){return us|(u?by:0)|(h?vw:0)}var nf=0,Ty=1,jn=2,Tw=3,ww=4,xw=5,nt=function(h,S,E){this.options=h=dn(h),this.sourceFile=h.sourceFile,this.keywords=U(o[h.ecmaVersion>=6?6:h.sourceType==="module"?"5module":5]);var N="";h.allowReserved!==!0&&(N=s[h.ecmaVersion>=6?6:h.ecmaVersion===5?5:3],h.sourceType==="module"&&(N+=" await")),this.reservedWords=U(N);var R=(N?N+" ":"")+s.strict;this.reservedWordsStrict=U(R),this.reservedWordsStrictBind=U(R+" "+s.strictBind),this.input=String(S),this.containsEsc=!1,E?(this.pos=E,this.lineStart=this.input.lastIndexOf(`
90
- `,E-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(A).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=y.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=h.sourceType==="module",this.strict=this.inModule||h.strict===!0||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&&h.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?us:cs),this.regexpState=null,this.privateNameStack=[]},wr={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}};nt.prototype.parse=function(){var h=this,S=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return h.parseTopLevel(S)})},wr.inFunction.get=function(){return(this.currentVarScope().flags&us)>0},wr.inGenerator.get=function(){return(this.currentVarScope().flags&vw)>0},wr.inAsync.get=function(){return(this.currentVarScope().flags&by)>0},wr.canAwait.get=function(){for(var u=this.scopeStack.length-1;u>=0;u--){var h=this.scopeStack[u],S=h.flags;if(S&(ls|bc))return!1;if(S&us)return(S&by)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},wr.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&cs)},wr.allowSuper.get=function(){var u=this.currentThisScope(),h=u.flags;return(h&tf)>0||this.options.allowSuperOutsideMethod},wr.allowDirectSuper.get=function(){return(this.currentThisScope().flags&kw)>0},wr.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},wr.allowNewDotTarget.get=function(){for(var u=this.scopeStack.length-1;u>=0;u--){var h=this.scopeStack[u],S=h.flags;if(S&(ls|bc)||S&us&&!(S&ky))return!0}return!1},wr.allowUsing.get=function(){var u=this.currentScope(),h=u.flags;return!(h&Sw||!this.inModule&&h&cs)},wr.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&ls)>0},nt.extend=function(){for(var h=[],S=arguments.length;S--;)h[S]=arguments[S];for(var E=this,N=0;N<h.length;N++)E=h[N](E);return E},nt.parse=function(h,S){return new this(S,h).parse()},nt.parseExpressionAt=function(h,S,E){var N=new this(E,h,S);return N.nextToken(),N.parseExpression()},nt.tokenizer=function(h,S){return new this(S,h)},Object.defineProperties(nt.prototype,wr);var Vt=nt.prototype,H4=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Vt.strictDirective=function(u){if(this.options.ecmaVersion<5)return!1;for(;;){M.lastIndex=u,u+=M.exec(this.input)[0].length;var h=H4.exec(this.input.slice(u));if(!h)return!1;if((h[1]||h[2])==="use strict"){M.lastIndex=u+h[0].length;var S=M.exec(this.input),E=S.index+S[0].length,N=this.input.charAt(E);return N===";"||N==="}"||A.test(S[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(N)||N==="!"&&this.input.charAt(E+1)==="=")}u+=h[0].length,M.lastIndex=u,u+=M.exec(this.input)[0].length,this.input[u]===";"&&u++}},Vt.eat=function(u){return this.type===u?(this.next(),!0):!1},Vt.isContextual=function(u){return this.type===y.name&&this.value===u&&!this.containsEsc},Vt.eatContextual=function(u){return this.isContextual(u)?(this.next(),!0):!1},Vt.catchStackOverflow=function(u){try{return u()}catch(h){if(h instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(h.message)||/\btoo much recursion\b/i.test(h.message)))this.raise(this.start,"Not enough stack space to parse input");else throw h}},Vt.expectContextual=function(u){this.eatContextual(u)||this.unexpected()},Vt.canInsertSemicolon=function(){return this.type===y.eof||this.type===y.braceR||A.test(this.input.slice(this.lastTokEnd,this.start))},Vt.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Vt.semicolon=function(){!this.eat(y.semi)&&!this.insertSemicolon()&&this.unexpected()},Vt.afterTrailingComma=function(u,h){if(this.type===u)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),h||this.next(),!0},Vt.expect=function(u){this.eat(u)||this.unexpected()},Vt.unexpected=function(u){this.raise(u??this.start,"Unexpected token")};var sf=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Vt.checkPatternErrors=function(u,h){if(u){u.trailingComma>-1&&this.raiseRecoverable(u.trailingComma,"Comma is not permitted after the rest element");var S=h?u.parenthesizedAssign:u.parenthesizedBind;S>-1&&this.raiseRecoverable(S,h?"Assigning to rvalue":"Parenthesized pattern")}},Vt.checkExpressionErrors=function(u,h){if(!u)return!1;var S=u.shorthandAssign,E=u.doubleProto;if(!h)return S>=0||E>=0;S>=0&&this.raise(S,"Shorthand property assignments are valid only in destructuring patterns"),E>=0&&this.raiseRecoverable(E,"Redefinition of __proto__ property")},Vt.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")},Vt.isSimpleAssignTarget=function(u){return u.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(u.expression):u.type==="Identifier"||u.type==="MemberExpression"};var ne=nt.prototype;ne.parseTopLevel=function(u){var h=Object.create(null);for(u.body||(u.body=[]);this.type!==y.eof;){var S=this.parseStatement(null,!0,h);u.body.push(S)}if(this.inModule)for(var E=0,N=Object.keys(this.undefinedExports);E<N.length;E+=1){var R=N[E];this.raiseRecoverable(this.undefinedExports[R].start,"Export '"+R+"' is not defined")}return this.adaptDirectivePrologue(u.body),this.next(),u.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(u,"Program")};var wy={kind:"loop"},z4={kind:"switch"};ne.isLet=function(u){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;M.lastIndex=this.pos;var h=M.exec(this.input),S=this.pos+h[0].length,E=this.fullCharCodeAt(S);if(E===91||E===92)return!0;if(u)return!1;if(E===123)return!0;if(d(E)){var N=S;do S+=E<=65535?1:2;while(g(E=this.fullCharCodeAt(S)));if(E===92)return!0;var R=this.input.slice(N,S);if(!c.test(R))return!0}return!1},ne.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;M.lastIndex=this.pos;var u=M.exec(this.input),h=this.pos+u[0].length,S;return!A.test(this.input.slice(this.pos,h))&&this.input.slice(h,h+8)==="function"&&(h+8===this.input.length||!(g(S=this.fullCharCodeAt(h+8))||S===92))},ne.isUsingKeyword=function(u,h){if(this.options.ecmaVersion<17||!this.isContextual(u?"await":"using"))return!1;M.lastIndex=this.pos;var S=M.exec(this.input),E=this.pos+S[0].length;if(A.test(this.input.slice(this.pos,E)))return!1;if(u){var N=E+5,R;if(this.input.slice(E,N)!=="using"||N===this.input.length||g(R=this.fullCharCodeAt(N))||R===92)return!1;M.lastIndex=N;var j=M.exec(this.input);if(E=N+j[0].length,j&&A.test(this.input.slice(N,E)))return!1}var W=this.fullCharCodeAt(E);if(!d(W)&&W!==92)return!1;var K=E;do E+=W<=65535?1:2;while(g(W=this.fullCharCodeAt(E)));if(W===92)return!0;var le=this.input.slice(K,E);if(c.test(le))return!1;if(h&&!u&&le==="of"){M.lastIndex=E;var ye=M.exec(this.input);if(E=E+ye[0].length,this.input.charCodeAt(E)!==61||(W=this.input.charCodeAt(E+1))===61||W===62)return!1}return!0},ne.isAwaitUsing=function(u){return this.isUsingKeyword(!0,u)},ne.isUsing=function(u){return this.isUsingKeyword(!1,u)},ne.parseStatement=function(u,h,S){var E=this.type,N=this.startNode(),R;switch(this.isLet(u)&&(E=y._var,R="let"),E){case y._break:case y._continue:return this.parseBreakContinueStatement(N,E.keyword);case y._debugger:return this.parseDebuggerStatement(N);case y._do:return this.parseDoStatement(N);case y._for:return this.parseForStatement(N);case y._function:return u&&(this.strict||u!=="if"&&u!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(N,!1,!u);case y._class:return u&&this.unexpected(),this.parseClass(N,!0);case y._if:return this.parseIfStatement(N);case y._return:return this.parseReturnStatement(N);case y._switch:return this.parseSwitchStatement(N);case y._throw:return this.parseThrowStatement(N);case y._try:return this.parseTryStatement(N);case y._const:case y._var:return R=R||this.value,u&&R!=="var"&&this.unexpected(),this.parseVarStatement(N,R);case y._while:return this.parseWhileStatement(N);case y._with:return this.parseWithStatement(N);case y.braceL:return this.parseBlock(!0,N);case y.semi:return this.parseEmptyStatement(N);case y._export:case y._import:if(this.options.ecmaVersion>10&&E===y._import){M.lastIndex=this.pos;var j=M.exec(this.input),W=this.pos+j[0].length,K=this.input.charCodeAt(W);if(K===40||K===46)return this.parseExpressionStatement(N,this.parseExpression())}return this.options.allowImportExportEverywhere||(h||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'")),E===y._import?this.parseImport(N):this.parseExport(N,S);default:if(this.isAsyncFunction())return u&&this.unexpected(),this.next(),this.parseFunctionStatement(N,!0,!u);var le=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(le)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"),u&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),le==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(N,!1,le),this.semicolon(),this.finishNode(N,"VariableDeclaration");var ye=this.value,Ue=this.parseExpression();return E===y.name&&Ue.type==="Identifier"&&this.eat(y.colon)?this.parseLabeledStatement(N,ye,Ue,u):this.parseExpressionStatement(N,Ue)}},ne.parseBreakContinueStatement=function(u,h){var S=h==="break";this.next(),this.eat(y.semi)||this.insertSemicolon()?u.label=null:this.type!==y.name?this.unexpected():(u.label=this.parseIdent(),this.semicolon());for(var E=0;E<this.labels.length;++E){var N=this.labels[E];if((u.label==null||N.name===u.label.name)&&(N.kind!=null&&(S||N.kind==="loop")||u.label&&S))break}return E===this.labels.length&&this.raise(u.start,"Unsyntactic "+h),this.finishNode(u,S?"BreakStatement":"ContinueStatement")},ne.parseDebuggerStatement=function(u){return this.next(),this.semicolon(),this.finishNode(u,"DebuggerStatement")},ne.parseDoStatement=function(u){return this.next(),this.labels.push(wy),u.body=this.parseStatement("do"),this.labels.pop(),this.expect(y._while),u.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(y.semi):this.semicolon(),this.finishNode(u,"DoWhileStatement")},ne.parseForStatement=function(u){this.next();var h=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(wy),this.enterScope(0),this.expect(y.parenL),this.type===y.semi)return h>-1&&this.unexpected(h),this.parseFor(u,null);var S=this.isLet();if(this.type===y._var||this.type===y._const||S){var E=this.startNode(),N=S?"let":this.value;return this.next(),this.parseVar(E,!0,N),this.finishNode(E,"VariableDeclaration"),this.parseForAfterInit(u,E,h)}var R=this.isContextual("let"),j=!1,W=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(W){var K=this.startNode();return this.next(),W==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(K,!0,W),this.finishNode(K,"VariableDeclaration"),this.parseForAfterInit(u,K,h)}var le=this.containsEsc,ye=new sf,Ue=this.start,$t=h>-1?this.parseExprSubscripts(ye,"await"):this.parseExpression(!0,ye);return this.type===y._in||(j=this.options.ecmaVersion>=6&&this.isContextual("of"))?(h>-1?(this.type===y._in&&this.unexpected(h),u.await=!0):j&&this.options.ecmaVersion>=8&&($t.start===Ue&&!le&&$t.type==="Identifier"&&$t.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(u.await=!1)),R&&j&&this.raise($t.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable($t,!1,ye),this.checkLValPattern($t),this.parseForIn(u,$t)):(this.checkExpressionErrors(ye,!0),h>-1&&this.unexpected(h),this.parseFor(u,$t))},ne.parseForAfterInit=function(u,h,S){return(this.type===y._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&h.declarations.length===1?(this.type===y._in?((h.kind==="using"||h.kind==="await using")&&!h.declarations[0].init&&this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&S>-1&&this.unexpected(S)):this.options.ecmaVersion>=9&&(u.await=S>-1),this.parseForIn(u,h)):(S>-1&&this.unexpected(S),this.parseFor(u,h))},ne.parseFunctionStatement=function(u,h,S){return this.next(),this.parseFunction(u,kc|(S?0:xy),!1,h)},ne.parseIfStatement=function(u){return this.next(),u.test=this.parseParenExpression(),u.consequent=this.parseStatement("if"),u.alternate=this.eat(y._else)?this.parseStatement("if"):null,this.finishNode(u,"IfStatement")},ne.parseReturnStatement=function(u){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(y.semi)||this.insertSemicolon()?u.argument=null:(u.argument=this.parseExpression(),this.semicolon()),this.finishNode(u,"ReturnStatement")},ne.parseSwitchStatement=function(u){this.next(),u.discriminant=this.parseParenExpression(),u.cases=[],this.expect(y.braceL),this.labels.push(z4),this.enterScope(Sw);for(var h,S=!1;this.type!==y.braceR;)if(this.type===y._case||this.type===y._default){var E=this.type===y._case;h&&this.finishNode(h,"SwitchCase"),u.cases.push(h=this.startNode()),h.consequent=[],this.next(),E?h.test=this.parseExpression():(S&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),S=!0,h.test=null),this.expect(y.colon)}else h||this.unexpected(),h.consequent.push(this.parseStatement(null));return this.exitScope(),h&&this.finishNode(h,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(u,"SwitchStatement")},ne.parseThrowStatement=function(u){return this.next(),A.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),u.argument=this.parseExpression(),this.semicolon(),this.finishNode(u,"ThrowStatement")};var W4=[];ne.parseCatchClauseParam=function(){var u=this.parseBindingAtom(),h=u.type==="Identifier";return this.enterScope(h?bw:0),this.checkLValPattern(u,h?ww:jn),this.expect(y.parenR),u},ne.parseTryStatement=function(u){if(this.next(),u.block=this.parseBlock(),u.handler=null,this.type===y._catch){var h=this.startNode();this.next(),this.eat(y.parenL)?h.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),h.param=null,this.enterScope(0)),h.body=this.parseBlock(!1),this.exitScope(),u.handler=this.finishNode(h,"CatchClause")}return u.finalizer=this.eat(y._finally)?this.parseBlock():null,!u.handler&&!u.finalizer&&this.raise(u.start,"Missing catch or finally clause"),this.finishNode(u,"TryStatement")},ne.parseVarStatement=function(u,h,S){return this.next(),this.parseVar(u,!1,h,S),this.semicolon(),this.finishNode(u,"VariableDeclaration")},ne.parseWhileStatement=function(u){return this.next(),u.test=this.parseParenExpression(),this.labels.push(wy),u.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(u,"WhileStatement")},ne.parseWithStatement=function(u){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),u.object=this.parseParenExpression(),u.body=this.parseStatement("with"),this.finishNode(u,"WithStatement")},ne.parseEmptyStatement=function(u){return this.next(),this.finishNode(u,"EmptyStatement")},ne.parseLabeledStatement=function(u,h,S,E){for(var N=0,R=this.labels;N<R.length;N+=1){var j=R[N];j.name===h&&this.raise(S.start,"Label '"+h+"' is already declared")}for(var W=this.type.isLoop?"loop":this.type===y._switch?"switch":null,K=this.labels.length-1;K>=0;K--){var le=this.labels[K];if(le.statementStart===u.start)le.statementStart=this.start,le.kind=W;else break}return this.labels.push({name:h,kind:W,statementStart:this.start}),u.body=this.parseStatement(E?E.indexOf("label")===-1?E+"label":E:"label"),this.labels.pop(),u.label=S,this.finishNode(u,"LabeledStatement")},ne.parseExpressionStatement=function(u,h){return u.expression=h,this.semicolon(),this.finishNode(u,"ExpressionStatement")},ne.parseBlock=function(u,h,S){for(u===void 0&&(u=!0),h===void 0&&(h=this.startNode()),h.body=[],this.expect(y.braceL),u&&this.enterScope(0);this.type!==y.braceR;){var E=this.parseStatement(null);h.body.push(E)}return S&&(this.strict=!1),this.next(),u&&this.exitScope(),this.finishNode(h,"BlockStatement")},ne.parseFor=function(u,h){return u.init=h,this.expect(y.semi),u.test=this.type===y.semi?null:this.parseExpression(),this.expect(y.semi),u.update=this.type===y.parenR?null:this.parseExpression(),this.expect(y.parenR),u.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(u,"ForStatement")},ne.parseForIn=function(u,h){var S=this.type===y._in;return this.next(),h.type==="VariableDeclaration"&&h.declarations[0].init!=null&&(!S||this.options.ecmaVersion<8||this.strict||h.kind!=="var"||h.declarations[0].id.type!=="Identifier")&&this.raise(h.start,(S?"for-in":"for-of")+" loop variable declaration may not have an initializer"),u.left=h,u.right=S?this.parseExpression():this.parseMaybeAssign(),this.expect(y.parenR),u.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(u,S?"ForInStatement":"ForOfStatement")},ne.parseVar=function(u,h,S,E){for(u.declarations=[],u.kind=S;;){var N=this.startNode();if(this.parseVarId(N,S),this.eat(y.eq)?N.init=this.parseMaybeAssign(h):!E&&S==="const"&&!(this.type===y._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!E&&(S==="using"||S==="await using")&&this.options.ecmaVersion>=17&&this.type!==y._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+S+" declaration"):!E&&N.id.type!=="Identifier"&&!(h&&(this.type===y._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):N.init=null,u.declarations.push(this.finishNode(N,"VariableDeclarator")),!this.eat(y.comma))break}return u},ne.parseVarId=function(u,h){u.id=h==="using"||h==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(u.id,h==="var"?Ty:jn,!1)};var kc=1,xy=2,Ew=4;ne.parseFunction=function(u,h,S,E,N){this.initFunction(u),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!E)&&(this.type===y.star&&h&xy&&this.unexpected(),u.generator=this.eat(y.star)),this.options.ecmaVersion>=8&&(u.async=!!E),h&kc&&(u.id=h&Ew&&this.type!==y.name?null:this.parseIdent(),u.id&&!(h&xy)&&this.checkLValSimple(u.id,this.strict||u.generator||u.async?this.treatFunctionsAsVar?Ty:jn:Tw));var R=this.yieldPos,j=this.awaitPos,W=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Sy(u.async,u.generator)),h&kc||(u.id=this.type===y.name?this.parseIdent():null),this.parseFunctionParams(u),this.parseFunctionBody(u,S,!1,N),this.yieldPos=R,this.awaitPos=j,this.awaitIdentPos=W,this.finishNode(u,h&kc?"FunctionDeclaration":"FunctionExpression")},ne.parseFunctionParams=function(u){this.expect(y.parenL),u.params=this.parseBindingList(y.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},ne.parseClass=function(u,h){this.next();var S=this.strict;this.strict=!0,this.parseClassId(u,h),this.parseClassSuper(u);var E=this.enterClassBody(),N=this.startNode(),R=!1;for(N.body=[],this.expect(y.braceL);this.type!==y.braceR;){var j=this.parseClassElement(u.superClass!==null);j&&(N.body.push(j),j.type==="MethodDefinition"&&j.kind==="constructor"?(R&&this.raiseRecoverable(j.start,"Duplicate constructor in the same class"),R=!0):j.key&&j.key.type==="PrivateIdentifier"&&G4(E,j)&&this.raiseRecoverable(j.key.start,"Identifier '#"+j.key.name+"' has already been declared"))}return this.strict=S,this.next(),u.body=this.finishNode(N,"ClassBody"),this.exitClassBody(),this.finishNode(u,h?"ClassDeclaration":"ClassExpression")},ne.parseClassElement=function(u){if(this.eat(y.semi))return null;var h=this.options.ecmaVersion,S=this.startNode(),E="",N=!1,R=!1,j="method",W=!1;if(this.eatContextual("static")){if(h>=13&&this.eat(y.braceL))return this.parseClassStaticBlock(S),S;this.isClassElementNameStart()||this.type===y.star?W=!0:E="static"}if(S.static=W,!E&&h>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===y.star)&&!this.canInsertSemicolon()?R=!0:E="async"),!E&&(h>=9||!R)&&this.eat(y.star)&&(N=!0),!E&&!R&&!N){var K=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?j=K:E=K)}if(E?(S.computed=!1,S.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),S.key.name=E,this.finishNode(S.key,"Identifier")):this.parseClassElementName(S),h<13||this.type===y.parenL||j!=="method"||N||R){var le=!S.static&&af(S,"constructor"),ye=le&&u;le&&j!=="method"&&this.raise(S.key.start,"Constructor can't have get/set modifier"),S.kind=le?"constructor":j,this.parseClassMethod(S,N,R,ye)}else this.parseClassField(S);return S},ne.isClassElementNameStart=function(){return this.type===y.name||this.type===y.privateId||this.type===y.num||this.type===y.string||this.type===y.bracketL||this.type.keyword},ne.parseClassElementName=function(u){this.type===y.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),u.computed=!1,u.key=this.parsePrivateIdent()):this.parsePropertyName(u)},ne.parseClassMethod=function(u,h,S,E){var N=u.key;u.kind==="constructor"?(h&&this.raise(N.start,"Constructor can't be a generator"),S&&this.raise(N.start,"Constructor can't be an async method")):u.static&&af(u,"prototype")&&this.raise(N.start,"Classes may not have a static property named prototype");var R=u.value=this.parseMethod(h,S,E);return u.kind==="get"&&R.params.length!==0&&this.raiseRecoverable(R.start,"getter should have no params"),u.kind==="set"&&R.params.length!==1&&this.raiseRecoverable(R.start,"setter should have exactly one param"),u.kind==="set"&&R.params[0].type==="RestElement"&&this.raiseRecoverable(R.params[0].start,"Setter cannot use rest params"),this.finishNode(u,"MethodDefinition")},ne.parseClassField=function(u){return af(u,"constructor")?this.raise(u.key.start,"Classes can't have a field named 'constructor'"):u.static&&af(u,"prototype")&&this.raise(u.key.start,"Classes can't have a static field named 'prototype'"),this.eat(y.eq)?(this.enterScope(bc|tf),u.value=this.parseMaybeAssign(),this.exitScope()):u.value=null,this.semicolon(),this.finishNode(u,"PropertyDefinition")},ne.parseClassStaticBlock=function(u){u.body=[];var h=this.labels;for(this.labels=[],this.enterScope(ls|tf);this.type!==y.braceR;){var S=this.parseStatement(null);u.body.push(S)}return this.next(),this.exitScope(),this.labels=h,this.finishNode(u,"StaticBlock")},ne.parseClassId=function(u,h){this.type===y.name?(u.id=this.parseIdent(),h&&this.checkLValSimple(u.id,jn,!1)):(h===!0&&this.unexpected(),u.id=null)},ne.parseClassSuper=function(u){u.superClass=this.eat(y._extends)?this.parseExprSubscripts(null,!1):null},ne.enterClassBody=function(){var u={declared:Object.create(null),used:[]};return this.privateNameStack.push(u),u.declared},ne.exitClassBody=function(){var u=this.privateNameStack.pop(),h=u.declared,S=u.used;if(this.options.checkPrivateFields)for(var E=this.privateNameStack.length,N=E===0?null:this.privateNameStack[E-1],R=0;R<S.length;++R){var j=S[R];V(h,j.name)||(N?N.used.push(j):this.raiseRecoverable(j.start,"Private field '#"+j.name+"' must be declared in an enclosing class"))}};function G4(u,h){var S=h.key.name,E=u[S],N="true";return h.type==="MethodDefinition"&&(h.kind==="get"||h.kind==="set")&&(N=(h.static?"s":"i")+h.kind),E==="iget"&&N==="iset"||E==="iset"&&N==="iget"||E==="sget"&&N==="sset"||E==="sset"&&N==="sget"?(u[S]="true",!1):E?!0:(u[S]=N,!1)}function af(u,h){var S=u.computed,E=u.key;return!S&&(E.type==="Identifier"&&E.name===h||E.type==="Literal"&&E.value===h)}ne.parseExportAllDeclaration=function(u,h){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(u.exported=this.parseModuleExportName(),this.checkExport(h,u.exported,this.lastTokStart)):u.exported=null),this.expectContextual("from"),this.type!==y.string&&this.unexpected(),u.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(u.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(u,"ExportAllDeclaration")},ne.parseExport=function(u,h){if(this.next(),this.eat(y.star))return this.parseExportAllDeclaration(u,h);if(this.eat(y._default))return this.checkExport(h,"default",this.lastTokStart),u.declaration=this.parseExportDefaultDeclaration(),this.finishNode(u,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())u.declaration=this.parseExportDeclaration(u),u.declaration.type==="VariableDeclaration"?this.checkVariableExport(h,u.declaration.declarations):this.checkExport(h,u.declaration.id,u.declaration.id.start),u.specifiers=[],u.source=null,this.options.ecmaVersion>=16&&(u.attributes=[]);else{if(u.declaration=null,u.specifiers=this.parseExportSpecifiers(h),this.eatContextual("from"))this.type!==y.string&&this.unexpected(),u.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(u.attributes=this.parseWithClause());else{for(var S=0,E=u.specifiers;S<E.length;S+=1){var N=E[S];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`.")}u.source=null,this.options.ecmaVersion>=16&&(u.attributes=[])}this.semicolon()}return this.finishNode(u,"ExportNamedDeclaration")},ne.parseExportDeclaration=function(u){return this.parseStatement(null)},ne.parseExportDefaultDeclaration=function(){var u;if(this.type===y._function||(u=this.isAsyncFunction())){var h=this.startNode();return this.next(),u&&this.next(),this.parseFunction(h,kc|Ew,!1,u)}else if(this.type===y._class){var S=this.startNode();return this.parseClass(S,"nullableID")}else{var E=this.parseMaybeAssign();return this.semicolon(),E}},ne.checkExport=function(u,h,S){u&&(typeof h!="string"&&(h=h.type==="Identifier"?h.name:h.value),V(u,h)&&this.raiseRecoverable(S,"Duplicate export '"+h+"'"),u[h]=!0)},ne.checkPatternExport=function(u,h){var S=h.type;if(S==="Identifier")this.checkExport(u,h,h.start);else if(S==="ObjectPattern")for(var E=0,N=h.properties;E<N.length;E+=1){var R=N[E];this.checkPatternExport(u,R)}else if(S==="ArrayPattern")for(var j=0,W=h.elements;j<W.length;j+=1){var K=W[j];K&&this.checkPatternExport(u,K)}else S==="Property"?this.checkPatternExport(u,h.value):S==="AssignmentPattern"?this.checkPatternExport(u,h.left):S==="RestElement"&&this.checkPatternExport(u,h.argument)},ne.checkVariableExport=function(u,h){if(u)for(var S=0,E=h;S<E.length;S+=1){var N=E[S];this.checkPatternExport(u,N.id)}},ne.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},ne.parseExportSpecifier=function(u){var h=this.startNode();return h.local=this.parseModuleExportName(),h.exported=this.eatContextual("as")?this.parseModuleExportName():h.local,this.checkExport(u,h.exported,h.exported.start),this.finishNode(h,"ExportSpecifier")},ne.parseExportSpecifiers=function(u){var h=[],S=!0;for(this.expect(y.braceL);!this.eat(y.braceR);){if(S)S=!1;else if(this.expect(y.comma),this.afterTrailingComma(y.braceR))break;h.push(this.parseExportSpecifier(u))}return h},ne.parseImport=function(u){return this.next(),this.type===y.string?(u.specifiers=W4,u.source=this.parseExprAtom()):(u.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),u.source=this.type===y.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(u.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(u,"ImportDeclaration")},ne.parseImportSpecifier=function(){var u=this.startNode();return u.imported=this.parseModuleExportName(),this.eatContextual("as")?u.local=this.parseIdent():(this.checkUnreserved(u.imported),u.local=u.imported),this.checkLValSimple(u.local,jn),this.finishNode(u,"ImportSpecifier")},ne.parseImportDefaultSpecifier=function(){var u=this.startNode();return u.local=this.parseIdent(),this.checkLValSimple(u.local,jn),this.finishNode(u,"ImportDefaultSpecifier")},ne.parseImportNamespaceSpecifier=function(){var u=this.startNode();return this.next(),this.expectContextual("as"),u.local=this.parseIdent(),this.checkLValSimple(u.local,jn),this.finishNode(u,"ImportNamespaceSpecifier")},ne.parseImportSpecifiers=function(){var u=[],h=!0;if(this.type===y.name&&(u.push(this.parseImportDefaultSpecifier()),!this.eat(y.comma)))return u;if(this.type===y.star)return u.push(this.parseImportNamespaceSpecifier()),u;for(this.expect(y.braceL);!this.eat(y.braceR);){if(h)h=!1;else if(this.expect(y.comma),this.afterTrailingComma(y.braceR))break;u.push(this.parseImportSpecifier())}return u},ne.parseWithClause=function(){var u=[];if(!this.eat(y._with))return u;this.expect(y.braceL);for(var h={},S=!0;!this.eat(y.braceR);){if(S)S=!1;else if(this.expect(y.comma),this.afterTrailingComma(y.braceR))break;var E=this.parseImportAttribute(),N=E.key.type==="Identifier"?E.key.name:E.key.value;V(h,N)&&this.raiseRecoverable(E.key.start,"Duplicate attribute key '"+N+"'"),h[N]=!0,u.push(E)}return u},ne.parseImportAttribute=function(){var u=this.startNode();return u.key=this.type===y.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(y.colon),this.type!==y.string&&this.unexpected(),u.value=this.parseExprAtom(),this.finishNode(u,"ImportAttribute")},ne.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===y.string){var u=this.parseLiteral(this.value);return Q.test(u.value)&&this.raise(u.start,"An export name cannot include a lone surrogate."),u}return this.parseIdent(!0)},ne.adaptDirectivePrologue=function(u){for(var h=0;h<u.length&&this.isDirectiveCandidate(u[h]);++h)u[h].directive=u[h].expression.raw.slice(1,-1)},ne.isDirectiveCandidate=function(u){return this.options.ecmaVersion>=5&&u.type==="ExpressionStatement"&&u.expression.type==="Literal"&&typeof u.expression.value=="string"&&(this.input[u.start]==='"'||this.input[u.start]==="'")};var xr=nt.prototype;xr.toAssignable=function(u,h,S){if(this.options.ecmaVersion>=6&&u)switch(u.type){case"Identifier":this.inAsync&&u.name==="await"&&this.raise(u.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":u.type="ObjectPattern",S&&this.checkPatternErrors(S,!0);for(var E=0,N=u.properties;E<N.length;E+=1){var R=N[E];this.toAssignable(R,h),R.type==="RestElement"&&(R.argument.type==="ArrayPattern"||R.argument.type==="ObjectPattern")&&this.raise(R.argument.start,"Unexpected token")}break;case"Property":u.kind!=="init"&&this.raise(u.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(u.value,h);break;case"ArrayExpression":u.type="ArrayPattern",S&&this.checkPatternErrors(S,!0),this.toAssignableList(u.elements,h);break;case"SpreadElement":u.type="RestElement",this.toAssignable(u.argument,h),u.argument.type==="AssignmentPattern"&&this.raise(u.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":u.operator!=="="&&this.raise(u.left.end,"Only '=' operator can be used for specifying default value."),u.type="AssignmentPattern",delete u.operator,this.toAssignable(u.left,h);break;case"ParenthesizedExpression":this.toAssignable(u.expression,h,S);break;case"ChainExpression":this.raiseRecoverable(u.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!h)break;default:this.raise(u.start,"Assigning to rvalue")}else S&&this.checkPatternErrors(S,!0);return u},xr.toAssignableList=function(u,h){for(var S=u.length,E=0;E<S;E++){var N=u[E];N&&this.toAssignable(N,h)}if(S){var R=u[S-1];this.options.ecmaVersion===6&&h&&R&&R.type==="RestElement"&&R.argument.type!=="Identifier"&&this.unexpected(R.argument.start)}return u},xr.parseSpread=function(u){var h=this.startNode();return this.next(),h.argument=this.parseMaybeAssign(!1,u),this.finishNode(h,"SpreadElement")},xr.parseRestBinding=function(){var u=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==y.name&&this.unexpected(),u.argument=this.parseBindingAtom(),this.finishNode(u,"RestElement")},xr.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case y.bracketL:var u=this.startNode();return this.next(),u.elements=this.parseBindingList(y.bracketR,!0,!0),this.finishNode(u,"ArrayPattern");case y.braceL:return this.parseObj(!0)}return this.parseIdent()},xr.parseBindingList=function(u,h,S,E){for(var N=[],R=!0;!this.eat(u);)if(R?R=!1:this.expect(y.comma),h&&this.type===y.comma)N.push(null);else{if(S&&this.afterTrailingComma(u))break;if(this.type===y.ellipsis){var j=this.parseRestBinding();this.parseBindingListItem(j),N.push(j),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(u);break}else N.push(this.parseAssignableListItem(E))}return N},xr.parseAssignableListItem=function(u){var h=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(h),h},xr.parseBindingListItem=function(u){return u},xr.parseMaybeDefault=function(u,h,S){if(S=S||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(y.eq))return S;var E=this.startNodeAt(u,h);return E.left=S,E.right=this.parseMaybeAssign(),this.finishNode(E,"AssignmentPattern")},xr.checkLValSimple=function(u,h,S){h===void 0&&(h=nf);var E=h!==nf;switch(u.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(u.name)&&this.raiseRecoverable(u.start,(E?"Binding ":"Assigning to ")+u.name+" in strict mode"),E&&(h===jn&&u.name==="let"&&this.raiseRecoverable(u.start,"let is disallowed as a lexically bound name"),S&&(V(S,u.name)&&this.raiseRecoverable(u.start,"Argument name clash"),S[u.name]=!0),h!==xw&&this.declareName(u.name,h,u.start));break;case"ChainExpression":this.raiseRecoverable(u.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":E&&this.raiseRecoverable(u.start,"Binding member expression");break;case"ParenthesizedExpression":return E&&this.raiseRecoverable(u.start,"Binding parenthesized expression"),this.checkLValSimple(u.expression,h,S);default:this.raise(u.start,(E?"Binding":"Assigning to")+" rvalue")}},xr.checkLValPattern=function(u,h,S){switch(h===void 0&&(h=nf),u.type){case"ObjectPattern":for(var E=0,N=u.properties;E<N.length;E+=1){var R=N[E];this.checkLValInnerPattern(R,h,S)}break;case"ArrayPattern":for(var j=0,W=u.elements;j<W.length;j+=1){var K=W[j];K&&this.checkLValInnerPattern(K,h,S)}break;default:this.checkLValSimple(u,h,S)}},xr.checkLValInnerPattern=function(u,h,S){switch(h===void 0&&(h=nf),u.type){case"Property":this.checkLValInnerPattern(u.value,h,S);break;case"AssignmentPattern":this.checkLValPattern(u.left,h,S);break;case"RestElement":this.checkLValPattern(u.argument,h,S);break;default:this.checkLValPattern(u,h,S)}};var Er=function(h,S,E,N,R){this.token=h,this.isExpr=!!S,this.preserveSpace=!!E,this.override=N,this.generator=!!R},$e={b_stat:new Er("{",!1),b_expr:new Er("{",!0),b_tmpl:new Er("${",!1),p_stat:new Er("(",!1),p_expr:new Er("(",!0),q_tmpl:new Er("`",!0,!0,function(u){return u.tryReadTemplateToken()}),f_stat:new Er("function",!1),f_expr:new Er("function",!0),f_expr_gen:new Er("function",!0,!1,null,!0),f_gen:new Er("function",!1,!1,null,!0)},Na=nt.prototype;Na.initialContext=function(){return[$e.b_stat]},Na.curContext=function(){return this.context[this.context.length-1]},Na.braceIsBlock=function(u){var h=this.curContext();return h===$e.f_expr||h===$e.f_stat?!0:u===y.colon&&(h===$e.b_stat||h===$e.b_expr)?!h.isExpr:u===y._return||u===y.name&&this.exprAllowed?A.test(this.input.slice(this.lastTokEnd,this.start)):u===y._else||u===y.semi||u===y.eof||u===y.parenR||u===y.arrow?!0:u===y.braceL?h===$e.b_stat:u===y._var||u===y._const||u===y.name?!1:!this.exprAllowed},Na.inGeneratorContext=function(){for(var u=this.context.length-1;u>=1;u--){var h=this.context[u];if(h.token==="function")return h.generator}return!1},Na.updateContext=function(u){var h,S=this.type;S.keyword&&u===y.dot?this.exprAllowed=!1:(h=S.updateContext)?h.call(this,u):this.exprAllowed=S.beforeExpr},Na.overrideContext=function(u){this.curContext()!==u&&(this.context[this.context.length-1]=u)},y.parenR.updateContext=y.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var u=this.context.pop();u===$e.b_stat&&this.curContext().token==="function"&&(u=this.context.pop()),this.exprAllowed=!u.isExpr},y.braceL.updateContext=function(u){this.context.push(this.braceIsBlock(u)?$e.b_stat:$e.b_expr),this.exprAllowed=!0},y.dollarBraceL.updateContext=function(){this.context.push($e.b_tmpl),this.exprAllowed=!0},y.parenL.updateContext=function(u){var h=u===y._if||u===y._for||u===y._with||u===y._while;this.context.push(h?$e.p_stat:$e.p_expr),this.exprAllowed=!0},y.incDec.updateContext=function(){},y._function.updateContext=y._class.updateContext=function(u){u.beforeExpr&&u!==y._else&&!(u===y.semi&&this.curContext()!==$e.p_stat)&&!(u===y._return&&A.test(this.input.slice(this.lastTokEnd,this.start)))&&!((u===y.colon||u===y.braceL)&&this.curContext()===$e.b_stat)?this.context.push($e.f_expr):this.context.push($e.f_stat),this.exprAllowed=!1},y.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},y.backQuote.updateContext=function(){this.curContext()===$e.q_tmpl?this.context.pop():this.context.push($e.q_tmpl),this.exprAllowed=!1},y.star.updateContext=function(u){if(u===y._function){var h=this.context.length-1;this.context[h]===$e.f_expr?this.context[h]=$e.f_expr_gen:this.context[h]=$e.f_gen}this.exprAllowed=!0},y.name.updateContext=function(u){var h=!1;this.options.ecmaVersion>=6&&u!==y.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(h=!0),this.exprAllowed=h};var de=nt.prototype;de.checkPropClash=function(u,h,S){if(!(this.options.ecmaVersion>=9&&u.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(u.computed||u.method||u.shorthand))){var E=u.key,N;switch(E.type){case"Identifier":N=E.name;break;case"Literal":N=String(E.value);break;default:return}var R=u.kind;if(this.options.ecmaVersion>=6){N==="__proto__"&&R==="init"&&(h.proto&&(S?S.doubleProto<0&&(S.doubleProto=E.start):this.raiseRecoverable(E.start,"Redefinition of __proto__ property")),h.proto=!0);return}N="$"+N;var j=h[N];if(j){var W;R==="init"?W=this.strict&&j.init||j.get||j.set:W=j.init||j[R],W&&this.raiseRecoverable(E.start,"Redefinition of property")}else j=h[N]={init:!1,get:!1,set:!1};j[R]=!0}},de.parseExpression=function(u,h){var S=this;return this.catchStackOverflow(function(){var E=S.start,N=S.startLoc,R=S.parseMaybeAssign(u,h);if(S.type===y.comma){var j=S.startNodeAt(E,N);for(j.expressions=[R];S.eat(y.comma);)j.expressions.push(S.parseMaybeAssign(u,h));return S.finishNode(j,"SequenceExpression")}return R})},de.parseMaybeAssign=function(u,h,S){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(u);this.exprAllowed=!1}var E=!1,N=-1,R=-1,j=-1;h?(N=h.parenthesizedAssign,R=h.trailingComma,j=h.doubleProto,h.parenthesizedAssign=h.trailingComma=-1):(h=new sf,E=!0);var W=this.start,K=this.startLoc;(this.type===y.parenL||this.type===y.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=u==="await");var le=this.parseMaybeConditional(u,h);if(S&&(le=S.call(this,le,W,K)),this.type.isAssign){var ye=this.startNodeAt(W,K);return ye.operator=this.value,this.type===y.eq&&(le=this.toAssignable(le,!1,h)),E||(h.parenthesizedAssign=h.trailingComma=h.doubleProto=-1),h.shorthandAssign>=le.start&&(h.shorthandAssign=-1),this.type===y.eq?this.checkLValPattern(le):this.checkLValSimple(le),ye.left=le,this.next(),ye.right=this.parseMaybeAssign(u),j>-1&&(h.doubleProto=j),this.finishNode(ye,"AssignmentExpression")}else E&&this.checkExpressionErrors(h,!0);return N>-1&&(h.parenthesizedAssign=N),R>-1&&(h.trailingComma=R),le},de.parseMaybeConditional=function(u,h){var S=this.start,E=this.startLoc,N=this.parseExprOps(u,h);if(this.checkExpressionErrors(h))return N;if(!(N.type==="ArrowFunctionExpression"&&N.start===S)&&this.eat(y.question)){var R=this.startNodeAt(S,E);return R.test=N,R.consequent=this.parseMaybeAssign(),this.expect(y.colon),R.alternate=this.parseMaybeAssign(u),this.finishNode(R,"ConditionalExpression")}return N},de.parseExprOps=function(u,h){var S=this.start,E=this.startLoc,N=this.parseMaybeUnary(h,!1,!1,u);return this.checkExpressionErrors(h)||N.start===S&&N.type==="ArrowFunctionExpression"?N:this.parseExprOp(N,S,E,-1,u)},de.parseExprOp=function(u,h,S,E,N){var R=this.type.binop;if(R!=null&&(!N||this.type!==y._in)&&R>E){var j=this.type===y.logicalOR||this.type===y.logicalAND,W=this.type===y.coalesce;W&&(R=y.logicalAND.binop);var K=this.value;this.next();var le=this.start,ye=this.startLoc,Ue=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,N),le,ye,R,N),$t=this.buildBinary(h,S,u,Ue,K,j||W);return(j&&this.type===y.coalesce||W&&(this.type===y.logicalOR||this.type===y.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp($t,h,S,E,N)}return u},de.buildBinary=function(u,h,S,E,N,R){E.type==="PrivateIdentifier"&&this.raise(E.start,"Private identifier can only be left side of binary expression");var j=this.startNodeAt(u,h);return j.left=S,j.operator=N,j.right=E,this.finishNode(j,R?"LogicalExpression":"BinaryExpression")},de.parseMaybeUnary=function(u,h,S,E){var N=this.start,R=this.startLoc,j;if(this.isContextual("await")&&this.canAwait)j=this.parseAwait(E),h=!0;else if(this.type.prefix){var W=this.startNode(),K=this.type===y.incDec;W.operator=this.value,W.prefix=!0,this.next(),W.argument=this.parseMaybeUnary(null,!0,K,E),this.checkExpressionErrors(u,!0),K?this.checkLValSimple(W.argument):this.strict&&W.operator==="delete"&&Aw(W.argument)?this.raiseRecoverable(W.start,"Deleting local variable in strict mode"):W.operator==="delete"&&Ey(W.argument)?this.raiseRecoverable(W.start,"Private fields can not be deleted"):h=!0,j=this.finishNode(W,K?"UpdateExpression":"UnaryExpression")}else if(!h&&this.type===y.privateId)(E||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),j=this.parsePrivateIdent(),this.type!==y._in&&this.unexpected();else{if(j=this.parseExprSubscripts(u,E),this.checkExpressionErrors(u))return j;for(;this.type.postfix&&!this.canInsertSemicolon();){var le=this.startNodeAt(N,R);le.operator=this.value,le.prefix=!1,le.argument=j,this.checkLValSimple(j),this.next(),j=this.finishNode(le,"UpdateExpression")}}if(!S&&this.eat(y.starstar))if(h)this.unexpected(this.lastTokStart);else return this.buildBinary(N,R,j,this.parseMaybeUnary(null,!1,!1,E),"**",!1);else return j};function Aw(u){return u.type==="Identifier"||u.type==="ParenthesizedExpression"&&Aw(u.expression)}function Ey(u){return u.type==="MemberExpression"&&u.property.type==="PrivateIdentifier"||u.type==="ChainExpression"&&Ey(u.expression)||u.type==="ParenthesizedExpression"&&Ey(u.expression)}de.parseExprSubscripts=function(u,h){var S=this.start,E=this.startLoc,N=this.parseExprAtom(u,h);if(N.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return N;var R=this.parseSubscripts(N,S,E,!1,h);return u&&R.type==="MemberExpression"&&(u.parenthesizedAssign>=R.start&&(u.parenthesizedAssign=-1),u.parenthesizedBind>=R.start&&(u.parenthesizedBind=-1),u.trailingComma>=R.start&&(u.trailingComma=-1)),R},de.parseSubscripts=function(u,h,S,E,N){for(var R=this.options.ecmaVersion>=8&&u.type==="Identifier"&&u.name==="async"&&this.lastTokEnd===u.end&&!this.canInsertSemicolon()&&u.end-u.start===5&&this.potentialArrowAt===u.start,j=!1;;){var W=this.parseSubscript(u,h,S,E,R,j,N);if(W.optional&&(j=!0),W===u||W.type==="ArrowFunctionExpression"){if(j){var K=this.startNodeAt(h,S);K.expression=W,W=this.finishNode(K,"ChainExpression")}return W}u=W}},de.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(y.arrow)},de.parseSubscriptAsyncArrow=function(u,h,S,E){return this.parseArrowExpression(this.startNodeAt(u,h),S,!0,E)},de.parseSubscript=function(u,h,S,E,N,R,j){var W=this.options.ecmaVersion>=11,K=W&&this.eat(y.questionDot);E&&K&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var le=this.eat(y.bracketL);if(le||K&&this.type!==y.parenL&&this.type!==y.backQuote||this.eat(y.dot)){var ye=this.startNodeAt(h,S);ye.object=u,le?(ye.property=this.parseExpression(),this.expect(y.bracketR)):this.type===y.privateId&&u.type!=="Super"?ye.property=this.parsePrivateIdent():ye.property=this.parseIdent(this.options.allowReserved!=="never"),ye.computed=!!le,W&&(ye.optional=K),u=this.finishNode(ye,"MemberExpression")}else if(!E&&this.eat(y.parenL)){var Ue=new sf,$t=this.yieldPos,wc=this.awaitPos,qa=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var ff=this.parseExprList(y.parenR,this.options.ecmaVersion>=8,!1,Ue);if(N&&!K&&this.shouldParseAsyncArrow())return this.checkPatternErrors(Ue,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=$t,this.awaitPos=wc,this.awaitIdentPos=qa,this.parseSubscriptAsyncArrow(h,S,ff,j);this.checkExpressionErrors(Ue,!0),this.yieldPos=$t||this.yieldPos,this.awaitPos=wc||this.awaitPos,this.awaitIdentPos=qa||this.awaitIdentPos;var La=this.startNodeAt(h,S);La.callee=u,La.arguments=ff,W&&(La.optional=K),u=this.finishNode(La,"CallExpression")}else if(this.type===y.backQuote){(K||R)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var Ca=this.startNodeAt(h,S);Ca.tag=u,Ca.quasi=this.parseTemplate({isTagged:!0}),u=this.finishNode(Ca,"TaggedTemplateExpression")}return u},de.parseExprAtom=function(u,h,S){this.type===y.slash&&this.readRegexp();var E,N=this.potentialArrowAt===this.start;switch(this.type){case y._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),E=this.startNode(),this.next(),this.type===y.parenL&&!this.allowDirectSuper&&this.raise(E.start,"super() call outside constructor of a subclass"),this.type!==y.dot&&this.type!==y.bracketL&&this.type!==y.parenL&&this.unexpected(),this.finishNode(E,"Super");case y._this:return E=this.startNode(),this.next(),this.finishNode(E,"ThisExpression");case y.name:var R=this.start,j=this.startLoc,W=this.containsEsc,K=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!W&&K.name==="async"&&!this.canInsertSemicolon()&&this.eat(y._function))return this.overrideContext($e.f_expr),this.parseFunction(this.startNodeAt(R,j),0,!1,!0,h);if(N&&!this.canInsertSemicolon()){if(this.eat(y.arrow))return this.parseArrowExpression(this.startNodeAt(R,j),[K],!1,h);if(this.options.ecmaVersion>=8&&K.name==="async"&&this.type===y.name&&!W&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return K=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(y.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(R,j),[K],!0,h)}return K;case y.regexp:var le=this.value;return E=this.parseLiteral(le.value),E.regex={pattern:le.pattern,flags:le.flags},E;case y.num:case y.string:return this.parseLiteral(this.value);case y._null:case y._true:case y._false:return E=this.startNode(),E.value=this.type===y._null?null:this.type===y._true,E.raw=this.type.keyword,this.next(),this.finishNode(E,"Literal");case y.parenL:var ye=this.start,Ue=this.parseParenAndDistinguishExpression(N,h);return u&&(u.parenthesizedAssign<0&&!this.isSimpleAssignTarget(Ue)&&(u.parenthesizedAssign=ye),u.parenthesizedBind<0&&(u.parenthesizedBind=ye)),Ue;case y.bracketL:return E=this.startNode(),this.next(),E.elements=this.parseExprList(y.bracketR,!0,!0,u),this.finishNode(E,"ArrayExpression");case y.braceL:return this.overrideContext($e.b_expr),this.parseObj(!1,u);case y._function:return E=this.startNode(),this.next(),this.parseFunction(E,0);case y._class:return this.parseClass(this.startNode(),!1);case y._new:return this.parseNew();case y.backQuote:return this.parseTemplate();case y._import:return this.options.ecmaVersion>=11?this.parseExprImport(S):this.unexpected();default:return this.parseExprAtomDefault()}},de.parseExprAtomDefault=function(){this.unexpected()},de.parseExprImport=function(u){var h=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===y.parenL&&!u)return this.parseDynamicImport(h);if(this.type===y.dot){var S=this.startNodeAt(h.start,h.loc&&h.loc.start);return S.name="import",h.meta=this.finishNode(S,"Identifier"),this.parseImportMeta(h)}else this.unexpected()},de.parseDynamicImport=function(u){if(this.next(),u.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(y.parenR)?u.options=null:(this.expect(y.comma),this.afterTrailingComma(y.parenR)?u.options=null:(u.options=this.parseMaybeAssign(),this.eat(y.parenR)||(this.expect(y.comma),this.afterTrailingComma(y.parenR)||this.unexpected())));else if(!this.eat(y.parenR)){var h=this.start;this.eat(y.comma)&&this.eat(y.parenR)?this.raiseRecoverable(h,"Trailing comma is not allowed in import()"):this.unexpected(h)}return this.finishNode(u,"ImportExpression")},de.parseImportMeta=function(u){this.next();var h=this.containsEsc;return u.property=this.parseIdent(!0),u.property.name!=="meta"&&this.raiseRecoverable(u.property.start,"The only valid meta property for import is 'import.meta'"),h&&this.raiseRecoverable(u.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(u.start,"Cannot use 'import.meta' outside a module"),this.finishNode(u,"MetaProperty")},de.parseLiteral=function(u){var h=this.startNode();return h.value=u,h.raw=this.input.slice(this.start,this.end),h.raw.charCodeAt(h.raw.length-1)===110&&(h.bigint=h.value!=null?h.value.toString():h.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(h,"Literal")},de.parseParenExpression=function(){this.expect(y.parenL);var u=this.parseExpression();return this.expect(y.parenR),u},de.shouldParseArrow=function(u){return!this.canInsertSemicolon()},de.parseParenAndDistinguishExpression=function(u,h){var S=this.start,E=this.startLoc,N,R=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var j=this.start,W=this.startLoc,K=[],le=!0,ye=!1,Ue=new sf,$t=this.yieldPos,wc=this.awaitPos,qa;for(this.yieldPos=0,this.awaitPos=0;this.type!==y.parenR;)if(le?le=!1:this.expect(y.comma),R&&this.afterTrailingComma(y.parenR,!0)){ye=!0;break}else if(this.type===y.ellipsis){qa=this.start,K.push(this.parseParenItem(this.parseRestBinding())),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else K.push(this.parseMaybeAssign(!1,Ue,this.parseParenItem));var ff=this.lastTokEnd,La=this.lastTokEndLoc;if(this.expect(y.parenR),u&&this.shouldParseArrow(K)&&this.eat(y.arrow))return this.checkPatternErrors(Ue,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=$t,this.awaitPos=wc,this.parseParenArrowList(S,E,K,h);(!K.length||ye)&&this.unexpected(this.lastTokStart),qa&&this.unexpected(qa),this.checkExpressionErrors(Ue,!0),this.yieldPos=$t||this.yieldPos,this.awaitPos=wc||this.awaitPos,K.length>1?(N=this.startNodeAt(j,W),N.expressions=K,this.finishNodeAt(N,"SequenceExpression",ff,La)):N=K[0]}else N=this.parseParenExpression();if(this.options.preserveParens){var Ca=this.startNodeAt(S,E);return Ca.expression=N,this.finishNode(Ca,"ParenthesizedExpression")}else return N},de.parseParenItem=function(u){return u},de.parseParenArrowList=function(u,h,S,E){return this.parseArrowExpression(this.startNodeAt(u,h),S,!1,E)};var J4=[];de.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var u=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===y.dot){var h=this.startNodeAt(u.start,u.loc&&u.loc.start);h.name="new",u.meta=this.finishNode(h,"Identifier"),this.next();var S=this.containsEsc;return u.property=this.parseIdent(!0),u.property.name!=="target"&&this.raiseRecoverable(u.property.start,"The only valid meta property for new is 'new.target'"),S&&this.raiseRecoverable(u.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(u.start,"'new.target' can only be used in functions and class static block"),this.finishNode(u,"MetaProperty")}var E=this.start,N=this.startLoc;return u.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),E,N,!0,!1),u.callee.type==="Super"&&this.raiseRecoverable(E,"Invalid use of 'super'"),this.eat(y.parenL)?u.arguments=this.parseExprList(y.parenR,this.options.ecmaVersion>=8,!1):u.arguments=J4,this.finishNode(u,"NewExpression")},de.parseTemplateElement=function(u){var h=u.isTagged,S=this.startNode();return this.type===y.invalidTemplate?(h||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),S.value={raw:this.value.replace(/\r\n?/g,`
91
- `),cooked:null}):S.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
92
- `),cooked:this.value},this.next(),S.tail=this.type===y.backQuote,this.finishNode(S,"TemplateElement")},de.parseTemplate=function(u){u===void 0&&(u={});var h=u.isTagged;h===void 0&&(h=!1);var S=this.startNode();this.next(),S.expressions=[];var E=this.parseTemplateElement({isTagged:h});for(S.quasis=[E];!E.tail;)this.type===y.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(y.dollarBraceL),S.expressions.push(this.parseExpression()),this.expect(y.braceR),S.quasis.push(E=this.parseTemplateElement({isTagged:h}));return this.next(),this.finishNode(S,"TemplateLiteral")},de.isAsyncProp=function(u){return!u.computed&&u.key.type==="Identifier"&&u.key.name==="async"&&(this.type===y.name||this.type===y.num||this.type===y.string||this.type===y.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===y.star)&&!A.test(this.input.slice(this.lastTokEnd,this.start))},de.parseObj=function(u,h){var S=this.startNode(),E=!0,N={};for(S.properties=[],this.next();!this.eat(y.braceR);){if(E)E=!1;else if(this.expect(y.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(y.braceR))break;var R=this.parseProperty(u,h);u||this.checkPropClash(R,N,h),S.properties.push(R)}return this.finishNode(S,u?"ObjectPattern":"ObjectExpression")},de.parseProperty=function(u,h){var S=this.startNode(),E,N,R,j;if(this.options.ecmaVersion>=9&&this.eat(y.ellipsis))return u?(S.argument=this.parseIdent(!1),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(S,"RestElement")):(S.argument=this.parseMaybeAssign(!1,h),this.type===y.comma&&h&&h.trailingComma<0&&(h.trailingComma=this.start),this.finishNode(S,"SpreadElement"));this.options.ecmaVersion>=6&&(S.method=!1,S.shorthand=!1,(u||h)&&(R=this.start,j=this.startLoc),u||(E=this.eat(y.star)));var W=this.containsEsc;return this.parsePropertyName(S),!u&&!W&&this.options.ecmaVersion>=8&&!E&&this.isAsyncProp(S)?(N=!0,E=this.options.ecmaVersion>=9&&this.eat(y.star),this.parsePropertyName(S)):N=!1,this.parsePropertyValue(S,u,E,N,R,j,h,W),this.finishNode(S,"Property")},de.parseGetterSetter=function(u){var h=u.key.name;this.parsePropertyName(u),u.value=this.parseMethod(!1),u.kind=h;var S=u.kind==="get"?0:1;if(u.value.params.length!==S){var E=u.value.start;u.kind==="get"?this.raiseRecoverable(E,"getter should have no params"):this.raiseRecoverable(E,"setter should have exactly one param")}else u.kind==="set"&&u.value.params[0].type==="RestElement"&&this.raiseRecoverable(u.value.params[0].start,"Setter cannot use rest params")},de.parsePropertyValue=function(u,h,S,E,N,R,j,W){(S||E)&&this.type===y.colon&&this.unexpected(),this.eat(y.colon)?(u.value=h?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,j),u.kind="init"):this.options.ecmaVersion>=6&&this.type===y.parenL?(h&&this.unexpected(),u.method=!0,u.value=this.parseMethod(S,E),u.kind="init"):!h&&!W&&this.options.ecmaVersion>=5&&!u.computed&&u.key.type==="Identifier"&&(u.key.name==="get"||u.key.name==="set")&&this.type!==y.comma&&this.type!==y.braceR&&this.type!==y.eq?((S||E)&&this.unexpected(),this.parseGetterSetter(u)):this.options.ecmaVersion>=6&&!u.computed&&u.key.type==="Identifier"?((S||E)&&this.unexpected(),this.checkUnreserved(u.key),u.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=N),h?u.value=this.parseMaybeDefault(N,R,this.copyNode(u.key)):this.type===y.eq&&j?(j.shorthandAssign<0&&(j.shorthandAssign=this.start),u.value=this.parseMaybeDefault(N,R,this.copyNode(u.key))):u.value=this.copyNode(u.key),u.kind="init",u.shorthand=!0):this.unexpected()},de.parsePropertyName=function(u){if(this.options.ecmaVersion>=6){if(this.eat(y.bracketL))return u.computed=!0,u.key=this.parseMaybeAssign(),this.expect(y.bracketR),u.key;u.computed=!1}return u.key=this.type===y.num||this.type===y.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},de.initFunction=function(u){u.id=null,this.options.ecmaVersion>=6&&(u.generator=u.expression=!1),this.options.ecmaVersion>=8&&(u.async=!1)},de.parseMethod=function(u,h,S){var E=this.startNode(),N=this.yieldPos,R=this.awaitPos,j=this.awaitIdentPos;return this.initFunction(E),this.options.ecmaVersion>=6&&(E.generator=u),this.options.ecmaVersion>=8&&(E.async=!!h),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Sy(h,E.generator)|tf|(S?kw:0)),this.expect(y.parenL),E.params=this.parseBindingList(y.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(E,!1,!0,!1),this.yieldPos=N,this.awaitPos=R,this.awaitIdentPos=j,this.finishNode(E,"FunctionExpression")},de.parseArrowExpression=function(u,h,S,E){var N=this.yieldPos,R=this.awaitPos,j=this.awaitIdentPos;return this.enterScope(Sy(S,!1)|ky),this.initFunction(u),this.options.ecmaVersion>=8&&(u.async=!!S),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,u.params=this.toAssignableList(h,!0),this.parseFunctionBody(u,!0,!1,E),this.yieldPos=N,this.awaitPos=R,this.awaitIdentPos=j,this.finishNode(u,"ArrowFunctionExpression")},de.parseFunctionBody=function(u,h,S,E){var N=h&&this.type!==y.braceL,R=this.strict,j=!1;if(N)u.body=this.parseMaybeAssign(E),u.expression=!0,this.checkParams(u,!1);else{var W=this.options.ecmaVersion>=7&&!this.isSimpleParamList(u.params);(!R||W)&&(j=this.strictDirective(this.end),j&&W&&this.raiseRecoverable(u.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var K=this.labels;this.labels=[],j&&(this.strict=!0),this.checkParams(u,!R&&!j&&!h&&!S&&this.isSimpleParamList(u.params)),this.strict&&u.id&&this.checkLValSimple(u.id,xw),u.body=this.parseBlock(!1,void 0,j&&!R),u.expression=!1,this.adaptDirectivePrologue(u.body.body),this.labels=K}this.exitScope()},de.isSimpleParamList=function(u){for(var h=0,S=u;h<S.length;h+=1){var E=S[h];if(E.type!=="Identifier")return!1}return!0},de.checkParams=function(u,h){for(var S=Object.create(null),E=0,N=u.params;E<N.length;E+=1){var R=N[E];this.checkLValInnerPattern(R,Ty,h?null:S)}},de.parseExprList=function(u,h,S,E){for(var N=[],R=!0;!this.eat(u);){if(R)R=!1;else if(this.expect(y.comma),h&&this.afterTrailingComma(u))break;var j=void 0;S&&this.type===y.comma?j=null:this.type===y.ellipsis?(j=this.parseSpread(E),E&&this.type===y.comma&&E.trailingComma<0&&(E.trailingComma=this.start)):j=this.parseMaybeAssign(!1,E),N.push(j)}return N},de.checkUnreserved=function(u){var h=u.start,S=u.end,E=u.name;if(this.inGenerator&&E==="yield"&&this.raiseRecoverable(h,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&E==="await"&&this.raiseRecoverable(h,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&rf)&&E==="arguments"&&this.raiseRecoverable(h,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(E==="arguments"||E==="await")&&this.raise(h,"Cannot use "+E+" in class static initialization block"),this.keywords.test(E)&&this.raise(h,"Unexpected keyword '"+E+"'"),!(this.options.ecmaVersion<6&&this.input.slice(h,S).indexOf("\\")!==-1)){var N=this.strict?this.reservedWordsStrict:this.reservedWords;N.test(E)&&(!this.inAsync&&E==="await"&&this.raiseRecoverable(h,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(h,"The keyword '"+E+"' is reserved"))}},de.parseIdent=function(u){var h=this.parseIdentNode();return this.next(!!u),this.finishNode(h,"Identifier"),u||(this.checkUnreserved(h),h.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=h.start)),h},de.parseIdentNode=function(){var u=this.startNode();return this.type===y.name?u.name=this.value:this.type.keyword?(u.name=this.type.keyword,(u.name==="class"||u.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=y.name):this.unexpected(),u},de.parsePrivateIdent=function(){var u=this.startNode();return this.type===y.privateId?u.name=this.value:this.unexpected(),this.next(),this.finishNode(u,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(u.start,"Private field '#"+u.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(u)),u},de.parseYield=function(u){this.yieldPos||(this.yieldPos=this.start);var h=this.startNode();return this.next(),this.type===y.semi||this.canInsertSemicolon()||this.type!==y.star&&!this.type.startsExpr?(h.delegate=!1,h.argument=null):(h.delegate=this.eat(y.star),h.argument=this.parseMaybeAssign(u)),this.finishNode(h,"YieldExpression")},de.parseAwait=function(u){this.awaitPos||(this.awaitPos=this.start);var h=this.startNode();return this.next(),h.argument=this.parseMaybeUnary(null,!0,!1,u),this.finishNode(h,"AwaitExpression")};var of=nt.prototype;of.raise=function(u,h){var S=_e(this.input,u);h+=" ("+S.line+":"+S.column+")",this.sourceFile&&(h+=" in "+this.sourceFile);var E=new SyntaxError(h);throw E.pos=u,E.loc=S,E.raisedAt=this.pos,E},of.raiseRecoverable=of.raise,of.curPosition=function(){if(this.options.locations)return new Y(this.curLine,this.pos-this.lineStart)};var di=nt.prototype,K4=function(h){this.flags=h,this.var=[],this.lexical=[],this.functions=[]};di.enterScope=function(u){this.scopeStack.push(new K4(u))},di.exitScope=function(){this.scopeStack.pop()},di.treatFunctionsAsVarInScope=function(u){return u.flags&us||!this.inModule&&u.flags&cs},di.declareName=function(u,h,S){var E=!1;if(h===jn){var N=this.currentScope();E=N.lexical.indexOf(u)>-1||N.functions.indexOf(u)>-1||N.var.indexOf(u)>-1,N.lexical.push(u),this.inModule&&N.flags&cs&&delete this.undefinedExports[u]}else if(h===ww){var R=this.currentScope();R.lexical.push(u)}else if(h===Tw){var j=this.currentScope();this.treatFunctionsAsVar?E=j.lexical.indexOf(u)>-1:E=j.lexical.indexOf(u)>-1||j.var.indexOf(u)>-1,j.functions.push(u)}else for(var W=this.scopeStack.length-1;W>=0;--W){var K=this.scopeStack[W];if(K.lexical.indexOf(u)>-1&&!(K.flags&bw&&K.lexical[0]===u)||!this.treatFunctionsAsVarInScope(K)&&K.functions.indexOf(u)>-1){E=!0;break}if(K.var.push(u),this.inModule&&K.flags&cs&&delete this.undefinedExports[u],K.flags&rf)break}E&&this.raiseRecoverable(S,"Identifier '"+u+"' has already been declared")},di.checkLocalExport=function(u){this.scopeStack[0].lexical.indexOf(u.name)===-1&&this.scopeStack[0].var.indexOf(u.name)===-1&&(this.undefinedExports[u.name]=u)},di.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},di.currentVarScope=function(){for(var u=this.scopeStack.length-1;;u--){var h=this.scopeStack[u];if(h.flags&(rf|bc|ls))return h}},di.currentThisScope=function(){for(var u=this.scopeStack.length-1;;u--){var h=this.scopeStack[u];if(h.flags&(rf|bc|ls)&&!(h.flags&ky))return h}};var Sc=function(h,S,E){this.type="",this.start=S,this.end=0,h.options.locations&&(this.loc=new he(h,E)),h.options.directSourceFile&&(this.sourceFile=h.options.directSourceFile),h.options.ranges&&(this.range=[S,0])},Tc=nt.prototype;Tc.startNode=function(){return new Sc(this,this.start,this.startLoc)},Tc.startNodeAt=function(u,h){return new Sc(this,u,h)};function Ow(u,h,S,E){return u.type=h,u.end=S,this.options.locations&&(u.loc.end=E),this.options.ranges&&(u.range[1]=S),u}Tc.finishNode=function(u,h){return Ow.call(this,u,h,this.lastTokEnd,this.lastTokEndLoc)},Tc.finishNodeAt=function(u,h,S,E){return Ow.call(this,u,h,S,E)},Tc.copyNode=function(u){var h=new Sc(this,u.start,this.startLoc);for(var S in u)h[S]=u[S];return h};var Y4="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",Pw="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",Nw=Pw+" Extended_Pictographic",qw=Nw,Lw=qw+" EBase EComp EMod EPres ExtPict",Cw=Lw,Q4=Cw,X4={9:Pw,10:Nw,11:qw,12:Lw,13:Cw,14:Q4},Z4="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",e$={9:"",10:"",11:"",12:"",13:"",14:Z4},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",Mw="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",Rw=Mw+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Dw=Rw+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",jw=Dw+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Fw=jw+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",t$=Fw+" "+Y4,r$={9:Mw,10:Rw,11:Dw,12:jw,13:Fw,14:t$},Bw={};function n$(u){var h=Bw[u]={binary:U(X4[u]+" "+Iw),binaryOfStrings:U(e$[u]),nonBinary:{General_Category:U(Iw),Script:U(r$[u])}};h.nonBinary.Script_Extensions=h.nonBinary.Script,h.nonBinary.gc=h.nonBinary.General_Category,h.nonBinary.sc=h.nonBinary.Script,h.nonBinary.scx=h.nonBinary.Script_Extensions}for(var Ay=0,Vw=[9,10,11,12,13,14];Ay<Vw.length;Ay+=1){var i$=Vw[Ay];n$(i$)}var re=nt.prototype,cf=function(h,S){this.parent=h,this.base=S||this};cf.prototype.separatedFrom=function(h){for(var S=this;S;S=S.parent)for(var E=h;E;E=E.parent)if(S.base===E.base&&S!==E)return!0;return!1},cf.prototype.sibling=function(){return new cf(this.parent,this.base)};var hn=function(h){this.parser=h,this.validFlags="gim"+(h.options.ecmaVersion>=6?"uy":"")+(h.options.ecmaVersion>=9?"s":"")+(h.options.ecmaVersion>=13?"d":"")+(h.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Bw[h.options.ecmaVersion>=14?14:h.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};hn.prototype.reset=function(h,S,E){var N=E.indexOf("v")!==-1,R=E.indexOf("u")!==-1;this.start=h|0,this.source=S+"",this.flags=E,N&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=R&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=R&&this.parser.options.ecmaVersion>=9)},hn.prototype.raise=function(h){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+h)},hn.prototype.at=function(h,S){S===void 0&&(S=!1);var E=this.source,N=E.length;if(h>=N)return-1;var R=E.charCodeAt(h);if(!(S||this.switchU)||R<=55295||R>=57344||h+1>=N)return R;var j=E.charCodeAt(h+1);return j>=56320&&j<=57343?(R<<10)+j-56613888:R},hn.prototype.nextIndex=function(h,S){S===void 0&&(S=!1);var E=this.source,N=E.length;if(h>=N)return N;var R=E.charCodeAt(h),j;return!(S||this.switchU)||R<=55295||R>=57344||h+1>=N||(j=E.charCodeAt(h+1))<56320||j>57343?h+1:h+2},hn.prototype.current=function(h){return h===void 0&&(h=!1),this.at(this.pos,h)},hn.prototype.lookahead=function(h){return h===void 0&&(h=!1),this.at(this.nextIndex(this.pos,h),h)},hn.prototype.advance=function(h){h===void 0&&(h=!1),this.pos=this.nextIndex(this.pos,h)},hn.prototype.eat=function(h,S){return S===void 0&&(S=!1),this.current(S)===h?(this.advance(S),!0):!1},hn.prototype.eatChars=function(h,S){S===void 0&&(S=!1);for(var E=this.pos,N=0,R=h;N<R.length;N+=1){var j=R[N],W=this.at(E,S);if(W===-1||W!==j)return!1;E=this.nextIndex(E,S)}return this.pos=E,!0},re.validateRegExpFlags=function(u){for(var h=u.validFlags,S=u.flags,E=!1,N=!1,R=0;R<S.length;R++){var j=S.charAt(R);h.indexOf(j)===-1&&this.raise(u.start,"Invalid regular expression flag"),S.indexOf(j,R+1)>-1&&this.raise(u.start,"Duplicate regular expression flag"),j==="u"&&(E=!0),j==="v"&&(N=!0)}this.options.ecmaVersion>=15&&E&&N&&this.raise(u.start,"Invalid regular expression flag")};function s$(u){for(var h in u)return!0;return!1}re.validateRegExpPattern=function(u){this.regexp_pattern(u),!u.switchN&&this.options.ecmaVersion>=9&&s$(u.groupNames)&&(u.switchN=!0,this.regexp_pattern(u))},re.regexp_pattern=function(u){u.pos=0,u.lastIntValue=0,u.lastStringValue="",u.lastAssertionIsQuantifiable=!1,u.numCapturingParens=0,u.maxBackReference=0,u.groupNames=Object.create(null),u.backReferenceNames.length=0,u.branchID=null,this.regexp_disjunction(u),u.pos!==u.source.length&&(u.eat(41)&&u.raise("Unmatched ')'"),(u.eat(93)||u.eat(125))&&u.raise("Lone quantifier brackets")),u.maxBackReference>u.numCapturingParens&&u.raise("Invalid escape");for(var h=0,S=u.backReferenceNames;h<S.length;h+=1){var E=S[h];u.groupNames[E]||u.raise("Invalid named capture referenced")}},re.regexp_disjunction=function(u){var h=this.options.ecmaVersion>=16;for(h&&(u.branchID=new cf(u.branchID,null)),this.regexp_alternative(u);u.eat(124);)h&&(u.branchID=u.branchID.sibling()),this.regexp_alternative(u);h&&(u.branchID=u.branchID.parent),this.regexp_eatQuantifier(u,!0)&&u.raise("Nothing to repeat"),u.eat(123)&&u.raise("Lone quantifier brackets")},re.regexp_alternative=function(u){for(;u.pos<u.source.length&&this.regexp_eatTerm(u););},re.regexp_eatTerm=function(u){return this.regexp_eatAssertion(u)?(u.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(u)&&u.switchU&&u.raise("Invalid quantifier"),!0):(u.switchU?this.regexp_eatAtom(u):this.regexp_eatExtendedAtom(u))?(this.regexp_eatQuantifier(u),!0):!1},re.regexp_eatAssertion=function(u){var h=u.pos;if(u.lastAssertionIsQuantifiable=!1,u.eat(94)||u.eat(36))return!0;if(u.eat(92)){if(u.eat(66)||u.eat(98))return!0;u.pos=h}if(u.eat(40)&&u.eat(63)){var S=!1;if(this.options.ecmaVersion>=9&&(S=u.eat(60)),u.eat(61)||u.eat(33))return this.regexp_disjunction(u),u.eat(41)||u.raise("Unterminated group"),u.lastAssertionIsQuantifiable=!S,!0}return u.pos=h,!1},re.regexp_eatQuantifier=function(u,h){return h===void 0&&(h=!1),this.regexp_eatQuantifierPrefix(u,h)?(u.eat(63),!0):!1},re.regexp_eatQuantifierPrefix=function(u,h){return u.eat(42)||u.eat(43)||u.eat(63)||this.regexp_eatBracedQuantifier(u,h)},re.regexp_eatBracedQuantifier=function(u,h){var S=u.pos;if(u.eat(123)){var E=0,N=-1;if(this.regexp_eatDecimalDigits(u)&&(E=u.lastIntValue,u.eat(44)&&this.regexp_eatDecimalDigits(u)&&(N=u.lastIntValue),u.eat(125)))return N!==-1&&N<E&&!h&&u.raise("numbers out of order in {} quantifier"),!0;u.switchU&&!h&&u.raise("Incomplete quantifier"),u.pos=S}return!1},re.regexp_eatAtom=function(u){return this.regexp_eatPatternCharacters(u)||u.eat(46)||this.regexp_eatReverseSolidusAtomEscape(u)||this.regexp_eatCharacterClass(u)||this.regexp_eatUncapturingGroup(u)||this.regexp_eatCapturingGroup(u)},re.regexp_eatReverseSolidusAtomEscape=function(u){var h=u.pos;if(u.eat(92)){if(this.regexp_eatAtomEscape(u))return!0;u.pos=h}return!1},re.regexp_eatUncapturingGroup=function(u){var h=u.pos;if(u.eat(40)){if(u.eat(63)){if(this.options.ecmaVersion>=16){var S=this.regexp_eatModifiers(u),E=u.eat(45);if(S||E){for(var N=0;N<S.length;N++){var R=S.charAt(N);S.indexOf(R,N+1)>-1&&u.raise("Duplicate regular expression modifiers")}if(E){var j=this.regexp_eatModifiers(u);!S&&!j&&u.current()===58&&u.raise("Invalid regular expression modifiers");for(var W=0;W<j.length;W++){var K=j.charAt(W);(j.indexOf(K,W+1)>-1||S.indexOf(K)>-1)&&u.raise("Duplicate regular expression modifiers")}}}}if(u.eat(58)){if(this.regexp_disjunction(u),u.eat(41))return!0;u.raise("Unterminated group")}}u.pos=h}return!1},re.regexp_eatCapturingGroup=function(u){if(u.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(u):u.current()===63&&u.raise("Invalid group"),this.regexp_disjunction(u),u.eat(41))return u.numCapturingParens+=1,!0;u.raise("Unterminated group")}return!1},re.regexp_eatModifiers=function(u){for(var h="",S=0;(S=u.current())!==-1&&a$(S);)h+=J(S),u.advance();return h};function a$(u){return u===105||u===109||u===115}re.regexp_eatExtendedAtom=function(u){return u.eat(46)||this.regexp_eatReverseSolidusAtomEscape(u)||this.regexp_eatCharacterClass(u)||this.regexp_eatUncapturingGroup(u)||this.regexp_eatCapturingGroup(u)||this.regexp_eatInvalidBracedQuantifier(u)||this.regexp_eatExtendedPatternCharacter(u)},re.regexp_eatInvalidBracedQuantifier=function(u){return this.regexp_eatBracedQuantifier(u,!0)&&u.raise("Nothing to repeat"),!1},re.regexp_eatSyntaxCharacter=function(u){var h=u.current();return $w(h)?(u.lastIntValue=h,u.advance(),!0):!1};function $w(u){return u===36||u>=40&&u<=43||u===46||u===63||u>=91&&u<=94||u>=123&&u<=125}re.regexp_eatPatternCharacters=function(u){for(var h=u.pos,S=0;(S=u.current())!==-1&&!$w(S);)u.advance();return u.pos!==h},re.regexp_eatExtendedPatternCharacter=function(u){var h=u.current();return h!==-1&&h!==36&&!(h>=40&&h<=43)&&h!==46&&h!==63&&h!==91&&h!==94&&h!==124?(u.advance(),!0):!1},re.regexp_groupSpecifier=function(u){if(u.eat(63)){this.regexp_eatGroupName(u)||u.raise("Invalid group");var h=this.options.ecmaVersion>=16,S=u.groupNames[u.lastStringValue];if(S)if(h)for(var E=0,N=S;E<N.length;E+=1){var R=N[E];R.separatedFrom(u.branchID)||u.raise("Duplicate capture group name")}else u.raise("Duplicate capture group name");h?(S||(u.groupNames[u.lastStringValue]=[])).push(u.branchID):u.groupNames[u.lastStringValue]=!0}},re.regexp_eatGroupName=function(u){if(u.lastStringValue="",u.eat(60)){if(this.regexp_eatRegExpIdentifierName(u)&&u.eat(62))return!0;u.raise("Invalid capture group name")}return!1},re.regexp_eatRegExpIdentifierName=function(u){if(u.lastStringValue="",this.regexp_eatRegExpIdentifierStart(u)){for(u.lastStringValue+=J(u.lastIntValue);this.regexp_eatRegExpIdentifierPart(u);)u.lastStringValue+=J(u.lastIntValue);return!0}return!1},re.regexp_eatRegExpIdentifierStart=function(u){var h=u.pos,S=this.options.ecmaVersion>=11,E=u.current(S);return u.advance(S),E===92&&this.regexp_eatRegExpUnicodeEscapeSequence(u,S)&&(E=u.lastIntValue),o$(E)?(u.lastIntValue=E,!0):(u.pos=h,!1)};function o$(u){return d(u,!0)||u===36||u===95}re.regexp_eatRegExpIdentifierPart=function(u){var h=u.pos,S=this.options.ecmaVersion>=11,E=u.current(S);return u.advance(S),E===92&&this.regexp_eatRegExpUnicodeEscapeSequence(u,S)&&(E=u.lastIntValue),c$(E)?(u.lastIntValue=E,!0):(u.pos=h,!1)};function c$(u){return g(u,!0)||u===36||u===95||u===8204||u===8205}re.regexp_eatAtomEscape=function(u){return this.regexp_eatBackReference(u)||this.regexp_eatCharacterClassEscape(u)||this.regexp_eatCharacterEscape(u)||u.switchN&&this.regexp_eatKGroupName(u)?!0:(u.switchU&&(u.current()===99&&u.raise("Invalid unicode escape"),u.raise("Invalid escape")),!1)},re.regexp_eatBackReference=function(u){var h=u.pos;if(this.regexp_eatDecimalEscape(u)){var S=u.lastIntValue;if(u.switchU)return S>u.maxBackReference&&(u.maxBackReference=S),!0;if(S<=u.numCapturingParens)return!0;u.pos=h}return!1},re.regexp_eatKGroupName=function(u){if(u.eat(107)){if(this.regexp_eatGroupName(u))return u.backReferenceNames.push(u.lastStringValue),!0;u.raise("Invalid named reference")}return!1},re.regexp_eatCharacterEscape=function(u){return this.regexp_eatControlEscape(u)||this.regexp_eatCControlLetter(u)||this.regexp_eatZero(u)||this.regexp_eatHexEscapeSequence(u)||this.regexp_eatRegExpUnicodeEscapeSequence(u,!1)||!u.switchU&&this.regexp_eatLegacyOctalEscapeSequence(u)||this.regexp_eatIdentityEscape(u)},re.regexp_eatCControlLetter=function(u){var h=u.pos;if(u.eat(99)){if(this.regexp_eatControlLetter(u))return!0;u.pos=h}return!1},re.regexp_eatZero=function(u){return u.current()===48&&!uf(u.lookahead())?(u.lastIntValue=0,u.advance(),!0):!1},re.regexp_eatControlEscape=function(u){var h=u.current();return h===116?(u.lastIntValue=9,u.advance(),!0):h===110?(u.lastIntValue=10,u.advance(),!0):h===118?(u.lastIntValue=11,u.advance(),!0):h===102?(u.lastIntValue=12,u.advance(),!0):h===114?(u.lastIntValue=13,u.advance(),!0):!1},re.regexp_eatControlLetter=function(u){var h=u.current();return Uw(h)?(u.lastIntValue=h%32,u.advance(),!0):!1};function Uw(u){return u>=65&&u<=90||u>=97&&u<=122}re.regexp_eatRegExpUnicodeEscapeSequence=function(u,h){h===void 0&&(h=!1);var S=u.pos,E=h||u.switchU;if(u.eat(117)){if(this.regexp_eatFixedHexDigits(u,4)){var N=u.lastIntValue;if(E&&N>=55296&&N<=56319){var R=u.pos;if(u.eat(92)&&u.eat(117)&&this.regexp_eatFixedHexDigits(u,4)){var j=u.lastIntValue;if(j>=56320&&j<=57343)return u.lastIntValue=(N-55296)*1024+(j-56320)+65536,!0}u.pos=R,u.lastIntValue=N}return!0}if(E&&u.eat(123)&&this.regexp_eatHexDigits(u)&&u.eat(125)&&u$(u.lastIntValue))return!0;E&&u.raise("Invalid unicode escape"),u.pos=S}return!1};function u$(u){return u>=0&&u<=1114111}re.regexp_eatIdentityEscape=function(u){if(u.switchU)return this.regexp_eatSyntaxCharacter(u)?!0:u.eat(47)?(u.lastIntValue=47,!0):!1;var h=u.current();return h!==99&&(!u.switchN||h!==107)?(u.lastIntValue=h,u.advance(),!0):!1},re.regexp_eatDecimalEscape=function(u){u.lastIntValue=0;var h=u.current();if(h>=49&&h<=57){do u.lastIntValue=10*u.lastIntValue+(h-48),u.advance();while((h=u.current())>=48&&h<=57);return!0}return!1};var Hw=0,Fn=1,Ar=2;re.regexp_eatCharacterClassEscape=function(u){var h=u.current();if(l$(h))return u.lastIntValue=-1,u.advance(),Fn;var S=!1;if(u.switchU&&this.options.ecmaVersion>=9&&((S=h===80)||h===112)){u.lastIntValue=-1,u.advance();var E;if(u.eat(123)&&(E=this.regexp_eatUnicodePropertyValueExpression(u))&&u.eat(125))return S&&E===Ar&&u.raise("Invalid property name"),E;u.raise("Invalid property name")}return Hw};function l$(u){return u===100||u===68||u===115||u===83||u===119||u===87}re.regexp_eatUnicodePropertyValueExpression=function(u){var h=u.pos;if(this.regexp_eatUnicodePropertyName(u)&&u.eat(61)){var S=u.lastStringValue;if(this.regexp_eatUnicodePropertyValue(u)){var E=u.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(u,S,E),Fn}}if(u.pos=h,this.regexp_eatLoneUnicodePropertyNameOrValue(u)){var N=u.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(u,N)}return Hw},re.regexp_validateUnicodePropertyNameAndValue=function(u,h,S){V(u.unicodeProperties.nonBinary,h)||u.raise("Invalid property name"),u.unicodeProperties.nonBinary[h].test(S)||u.raise("Invalid property value")},re.regexp_validateUnicodePropertyNameOrValue=function(u,h){if(u.unicodeProperties.binary.test(h))return Fn;if(u.switchV&&u.unicodeProperties.binaryOfStrings.test(h))return Ar;u.raise("Invalid property name")},re.regexp_eatUnicodePropertyName=function(u){var h=0;for(u.lastStringValue="";zw(h=u.current());)u.lastStringValue+=J(h),u.advance();return u.lastStringValue!==""};function zw(u){return Uw(u)||u===95}re.regexp_eatUnicodePropertyValue=function(u){var h=0;for(u.lastStringValue="";f$(h=u.current());)u.lastStringValue+=J(h),u.advance();return u.lastStringValue!==""};function f$(u){return zw(u)||uf(u)}re.regexp_eatLoneUnicodePropertyNameOrValue=function(u){return this.regexp_eatUnicodePropertyValue(u)},re.regexp_eatCharacterClass=function(u){if(u.eat(91)){var h=u.eat(94),S=this.regexp_classContents(u);return u.eat(93)||u.raise("Unterminated character class"),h&&S===Ar&&u.raise("Negated character class may contain strings"),!0}return!1},re.regexp_classContents=function(u){return u.current()===93?Fn:u.switchV?this.regexp_classSetExpression(u):(this.regexp_nonEmptyClassRanges(u),Fn)},re.regexp_nonEmptyClassRanges=function(u){for(;this.regexp_eatClassAtom(u);){var h=u.lastIntValue;if(u.eat(45)&&this.regexp_eatClassAtom(u)){var S=u.lastIntValue;u.switchU&&(h===-1||S===-1)&&u.raise("Invalid character class"),h!==-1&&S!==-1&&h>S&&u.raise("Range out of order in character class")}}},re.regexp_eatClassAtom=function(u){var h=u.pos;if(u.eat(92)){if(this.regexp_eatClassEscape(u))return!0;if(u.switchU){var S=u.current();(S===99||Jw(S))&&u.raise("Invalid class escape"),u.raise("Invalid escape")}u.pos=h}var E=u.current();return E!==93?(u.lastIntValue=E,u.advance(),!0):!1},re.regexp_eatClassEscape=function(u){var h=u.pos;if(u.eat(98))return u.lastIntValue=8,!0;if(u.switchU&&u.eat(45))return u.lastIntValue=45,!0;if(!u.switchU&&u.eat(99)){if(this.regexp_eatClassControlLetter(u))return!0;u.pos=h}return this.regexp_eatCharacterClassEscape(u)||this.regexp_eatCharacterEscape(u)},re.regexp_classSetExpression=function(u){var h=Fn,S;if(!this.regexp_eatClassSetRange(u))if(S=this.regexp_eatClassSetOperand(u)){S===Ar&&(h=Ar);for(var E=u.pos;u.eatChars([38,38]);){if(u.current()!==38&&(S=this.regexp_eatClassSetOperand(u))){S!==Ar&&(h=Fn);continue}u.raise("Invalid character in character class")}if(E!==u.pos)return h;for(;u.eatChars([45,45]);)this.regexp_eatClassSetOperand(u)||u.raise("Invalid character in character class");if(E!==u.pos)return h}else u.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(u)){if(S=this.regexp_eatClassSetOperand(u),!S)return h;S===Ar&&(h=Ar)}},re.regexp_eatClassSetRange=function(u){var h=u.pos;if(this.regexp_eatClassSetCharacter(u)){var S=u.lastIntValue;if(u.eat(45)&&this.regexp_eatClassSetCharacter(u)){var E=u.lastIntValue;return S!==-1&&E!==-1&&S>E&&u.raise("Range out of order in character class"),!0}u.pos=h}return!1},re.regexp_eatClassSetOperand=function(u){return this.regexp_eatClassSetCharacter(u)?Fn:this.regexp_eatClassStringDisjunction(u)||this.regexp_eatNestedClass(u)},re.regexp_eatNestedClass=function(u){var h=u.pos;if(u.eat(91)){var S=u.eat(94),E=this.regexp_classContents(u);if(u.eat(93))return S&&E===Ar&&u.raise("Negated character class may contain strings"),E;u.pos=h}if(u.eat(92)){var N=this.regexp_eatCharacterClassEscape(u);if(N)return N;u.pos=h}return null},re.regexp_eatClassStringDisjunction=function(u){var h=u.pos;if(u.eatChars([92,113])){if(u.eat(123)){var S=this.regexp_classStringDisjunctionContents(u);if(u.eat(125))return S}else u.raise("Invalid escape");u.pos=h}return null},re.regexp_classStringDisjunctionContents=function(u){for(var h=this.regexp_classString(u);u.eat(124);)this.regexp_classString(u)===Ar&&(h=Ar);return h},re.regexp_classString=function(u){for(var h=0;this.regexp_eatClassSetCharacter(u);)h++;return h===1?Fn:Ar},re.regexp_eatClassSetCharacter=function(u){var h=u.pos;if(u.eat(92))return this.regexp_eatCharacterEscape(u)||this.regexp_eatClassSetReservedPunctuator(u)?!0:u.eat(98)?(u.lastIntValue=8,!0):(u.pos=h,!1);var S=u.current();return S<0||S===u.lookahead()&&p$(S)||d$(S)?!1:(u.advance(),u.lastIntValue=S,!0)};function p$(u){return u===33||u>=35&&u<=38||u>=42&&u<=44||u===46||u>=58&&u<=64||u===94||u===96||u===126}function d$(u){return u===40||u===41||u===45||u===47||u>=91&&u<=93||u>=123&&u<=125}re.regexp_eatClassSetReservedPunctuator=function(u){var h=u.current();return h$(h)?(u.lastIntValue=h,u.advance(),!0):!1};function h$(u){return u===33||u===35||u===37||u===38||u===44||u===45||u>=58&&u<=62||u===64||u===96||u===126}re.regexp_eatClassControlLetter=function(u){var h=u.current();return uf(h)||h===95?(u.lastIntValue=h%32,u.advance(),!0):!1},re.regexp_eatHexEscapeSequence=function(u){var h=u.pos;if(u.eat(120)){if(this.regexp_eatFixedHexDigits(u,2))return!0;u.switchU&&u.raise("Invalid escape"),u.pos=h}return!1},re.regexp_eatDecimalDigits=function(u){var h=u.pos,S=0;for(u.lastIntValue=0;uf(S=u.current());)u.lastIntValue=10*u.lastIntValue+(S-48),u.advance();return u.pos!==h};function uf(u){return u>=48&&u<=57}re.regexp_eatHexDigits=function(u){var h=u.pos,S=0;for(u.lastIntValue=0;Ww(S=u.current());)u.lastIntValue=16*u.lastIntValue+Gw(S),u.advance();return u.pos!==h};function Ww(u){return u>=48&&u<=57||u>=65&&u<=70||u>=97&&u<=102}function Gw(u){return u>=65&&u<=70?10+(u-65):u>=97&&u<=102?10+(u-97):u-48}re.regexp_eatLegacyOctalEscapeSequence=function(u){if(this.regexp_eatOctalDigit(u)){var h=u.lastIntValue;if(this.regexp_eatOctalDigit(u)){var S=u.lastIntValue;h<=3&&this.regexp_eatOctalDigit(u)?u.lastIntValue=h*64+S*8+u.lastIntValue:u.lastIntValue=h*8+S}else u.lastIntValue=h;return!0}return!1},re.regexp_eatOctalDigit=function(u){var h=u.current();return Jw(h)?(u.lastIntValue=h-48,u.advance(),!0):(u.lastIntValue=0,!1)};function Jw(u){return u>=48&&u<=55}re.regexp_eatFixedHexDigits=function(u,h){var S=u.pos;u.lastIntValue=0;for(var E=0;E<h;++E){var N=u.current();if(!Ww(N))return u.pos=S,!1;u.lastIntValue=16*u.lastIntValue+Gw(N),u.advance()}return!0};var lf=function(h){this.type=h.type,this.value=h.value,this.start=h.start,this.end=h.end,h.options.locations&&(this.loc=new he(h,h.startLoc,h.endLoc)),h.options.ranges&&(this.range=[h.start,h.end])},ve=nt.prototype;ve.next=function(u){!u&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new lf(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},ve.getToken=function(){return this.next(),new lf(this)},typeof Symbol<"u"&&(ve[Symbol.iterator]=function(){var u=this;return{next:function(){var h=u.getToken();return{done:h.type===y.eof,value:h}}}}),ve.nextToken=function(){var u=this.curContext();if((!u||!u.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(y.eof);if(u.override)return u.override(this);this.readToken(this.fullCharCodeAtPos())},ve.readToken=function(u){return d(u,this.options.ecmaVersion>=6)||u===92?this.readWord():this.getTokenFromCode(u)},ve.fullCharCodeAt=function(u){var h=this.input.charCodeAt(u);if(h<=55295||h>=56320)return h;var S=this.input.charCodeAt(u+1);return S<=56319||S>=57344?h:(h<<10)+S-56613888},ve.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},ve.skipBlockComment=function(){var u=this.options.onComment&&this.curPosition(),h=this.pos,S=this.input.indexOf("*/",this.pos+=2);if(S===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=S+2,this.options.locations)for(var E=void 0,N=h;(E=q(this.input,N,this.pos))>-1;)++this.curLine,N=this.lineStart=E;this.options.onComment&&this.options.onComment(!0,this.input.slice(h+2,S),h,this.pos,u,this.curPosition())},ve.skipLineComment=function(u){for(var h=this.pos,S=this.options.onComment&&this.curPosition(),E=this.input.charCodeAt(this.pos+=u);this.pos<this.input.length&&!P(E);)E=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(h+u,this.pos),h,this.pos,S,this.curPosition())},ve.skipSpace=function(){e:for(;this.pos<this.input.length;){var u=this.input.charCodeAt(this.pos);switch(u){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(u>8&&u<14||u>=5760&&B.test(String.fromCharCode(u)))++this.pos;else break e}}},ve.finishToken=function(u,h){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var S=this.type;this.type=u,this.value=h,this.updateContext(S)},ve.readToken_dot=function(){var u=this.input.charCodeAt(this.pos+1);if(u>=48&&u<=57)return this.readNumber(!0);var h=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&u===46&&h===46?(this.pos+=3,this.finishToken(y.ellipsis)):(++this.pos,this.finishToken(y.dot))},ve.readToken_slash=function(){var u=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):u===61?this.finishOp(y.assign,2):this.finishOp(y.slash,1)},ve.readToken_mult_modulo_exp=function(u){var h=this.input.charCodeAt(this.pos+1),S=1,E=u===42?y.star:y.modulo;return this.options.ecmaVersion>=7&&u===42&&h===42&&(++S,E=y.starstar,h=this.input.charCodeAt(this.pos+2)),h===61?this.finishOp(y.assign,S+1):this.finishOp(E,S)},ve.readToken_pipe_amp=function(u){var h=this.input.charCodeAt(this.pos+1);if(h===u){if(this.options.ecmaVersion>=12){var S=this.input.charCodeAt(this.pos+2);if(S===61)return this.finishOp(y.assign,3)}return this.finishOp(u===124?y.logicalOR:y.logicalAND,2)}return h===61?this.finishOp(y.assign,2):this.finishOp(u===124?y.bitwiseOR:y.bitwiseAND,1)},ve.readToken_caret=function(){var u=this.input.charCodeAt(this.pos+1);return u===61?this.finishOp(y.assign,2):this.finishOp(y.bitwiseXOR,1)},ve.readToken_plus_min=function(u){var h=this.input.charCodeAt(this.pos+1);return h===u?h===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(y.incDec,2):h===61?this.finishOp(y.assign,2):this.finishOp(y.plusMin,1)},ve.readToken_lt_gt=function(u){var h=this.input.charCodeAt(this.pos+1),S=1;return h===u?(S=u===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+S)===61?this.finishOp(y.assign,S+1):this.finishOp(y.bitShift,S)):h===33&&u===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(h===61&&(S=2),this.finishOp(y.relational,S))},ve.readToken_eq_excl=function(u){var h=this.input.charCodeAt(this.pos+1);return h===61?this.finishOp(y.equality,this.input.charCodeAt(this.pos+2)===61?3:2):u===61&&h===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(y.arrow)):this.finishOp(u===61?y.eq:y.prefix,1)},ve.readToken_question=function(){var u=this.options.ecmaVersion;if(u>=11){var h=this.input.charCodeAt(this.pos+1);if(h===46){var S=this.input.charCodeAt(this.pos+2);if(S<48||S>57)return this.finishOp(y.questionDot,2)}if(h===63){if(u>=12){var E=this.input.charCodeAt(this.pos+2);if(E===61)return this.finishOp(y.assign,3)}return this.finishOp(y.coalesce,2)}}return this.finishOp(y.question,1)},ve.readToken_numberSign=function(){var u=this.options.ecmaVersion,h=35;if(u>=13&&(++this.pos,h=this.fullCharCodeAtPos(),d(h,!0)||h===92))return this.finishToken(y.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+J(h)+"'")},ve.getTokenFromCode=function(u){switch(u){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(y.parenL);case 41:return++this.pos,this.finishToken(y.parenR);case 59:return++this.pos,this.finishToken(y.semi);case 44:return++this.pos,this.finishToken(y.comma);case 91:return++this.pos,this.finishToken(y.bracketL);case 93:return++this.pos,this.finishToken(y.bracketR);case 123:return++this.pos,this.finishToken(y.braceL);case 125:return++this.pos,this.finishToken(y.braceR);case 58:return++this.pos,this.finishToken(y.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(y.backQuote);case 48:var h=this.input.charCodeAt(this.pos+1);if(h===120||h===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(h===111||h===79)return this.readRadixNumber(8);if(h===98||h===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(u);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(u);case 124:case 38:return this.readToken_pipe_amp(u);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(u);case 60:case 62:return this.readToken_lt_gt(u);case 61:case 33:return this.readToken_eq_excl(u);case 63:return this.readToken_question();case 126:return this.finishOp(y.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+J(u)+"'")},ve.finishOp=function(u,h){var S=this.input.slice(this.pos,this.pos+h);return this.pos+=h,this.finishToken(u,S)},ve.readRegexp=function(){for(var u,h,S=this.pos;;){this.pos>=this.input.length&&this.raise(S,"Unterminated regular expression");var E=this.input.charAt(this.pos);if(A.test(E)&&this.raise(S,"Unterminated regular expression"),u)u=!1;else{if(E==="[")h=!0;else if(E==="]"&&h)h=!1;else if(E==="/"&&!h)break;u=E==="\\"}++this.pos}var N=this.input.slice(S,this.pos);++this.pos;var R=this.pos,j=this.readWord1();this.containsEsc&&this.unexpected(R);var W=this.regexpState||(this.regexpState=new hn(this));W.reset(S,N,j),this.validateRegExpFlags(W),this.validateRegExpPattern(W);var K=null;try{K=new RegExp(N,j)}catch{}return this.finishToken(y.regexp,{pattern:N,flags:j,value:K})},ve.readInt=function(u,h,S){for(var E=this.options.ecmaVersion>=12&&h===void 0,N=S&&this.input.charCodeAt(this.pos)===48,R=this.pos,j=0,W=0,K=0,le=h??1/0;K<le;++K,++this.pos){var ye=this.input.charCodeAt(this.pos),Ue=void 0;if(E&&ye===95){N&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),W===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),K===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),W=ye;continue}if(ye>=97?Ue=ye-97+10:ye>=65?Ue=ye-65+10:ye>=48&&ye<=57?Ue=ye-48:Ue=1/0,Ue>=u)break;W=ye,j=j*u+Ue}return E&&W===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===R||h!=null&&this.pos-R!==h?null:j};function m$(u,h){return h?parseInt(u,8):parseFloat(u.replace(/_/g,""))}function Kw(u){return typeof BigInt!="function"?null:BigInt(u.replace(/_/g,""))}ve.readRadixNumber=function(u){var h=this.pos;this.pos+=2;var S=this.readInt(u);return S==null&&this.raise(this.start+2,"Expected number in radix "+u),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(S=Kw(this.input.slice(h,this.pos)),++this.pos):d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(y.num,S)},ve.readNumber=function(u){var h=this.pos;!u&&this.readInt(10,void 0,!0)===null&&this.raise(h,"Invalid number");var S=this.pos-h>=2&&this.input.charCodeAt(h)===48;S&&this.strict&&this.raise(h,"Invalid number");var E=this.input.charCodeAt(this.pos);if(!S&&!u&&this.options.ecmaVersion>=11&&E===110){var N=Kw(this.input.slice(h,this.pos));return++this.pos,d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(y.num,N)}S&&/[89]/.test(this.input.slice(h,this.pos))&&(S=!1),E===46&&!S&&(++this.pos,this.readInt(10),E=this.input.charCodeAt(this.pos)),(E===69||E===101)&&!S&&(E=this.input.charCodeAt(++this.pos),(E===43||E===45)&&++this.pos,this.readInt(10)===null&&this.raise(h,"Invalid number")),d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var R=m$(this.input.slice(h,this.pos),S);return this.finishToken(y.num,R)},ve.readCodePoint=function(){var u=this.input.charCodeAt(this.pos),h;if(u===123){this.options.ecmaVersion<6&&this.unexpected();var S=++this.pos;h=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,h>1114111&&this.invalidStringToken(S,"Code point out of bounds")}else h=this.readHexChar(4);return h},ve.readString=function(u){for(var h="",S=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var E=this.input.charCodeAt(this.pos);if(E===u)break;E===92?(h+=this.input.slice(S,this.pos),h+=this.readEscapedChar(!1),S=this.pos):E===8232||E===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(P(E)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return h+=this.input.slice(S,this.pos++),this.finishToken(y.string,h)};var Yw={};ve.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(u){if(u===Yw)this.readInvalidTemplateToken();else throw u}this.inTemplateElement=!1},ve.invalidStringToken=function(u,h){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Yw;this.raise(u,h)},ve.readTmplToken=function(){for(var u="",h=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var S=this.input.charCodeAt(this.pos);if(S===96||S===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===y.template||this.type===y.invalidTemplate)?S===36?(this.pos+=2,this.finishToken(y.dollarBraceL)):(++this.pos,this.finishToken(y.backQuote)):(u+=this.input.slice(h,this.pos),this.finishToken(y.template,u));if(S===92)u+=this.input.slice(h,this.pos),u+=this.readEscapedChar(!0),h=this.pos;else if(P(S)){switch(u+=this.input.slice(h,this.pos),++this.pos,S){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:u+=`
93
- `;break;default:u+=String.fromCharCode(S);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),h=this.pos}else++this.pos}},ve.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(y.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
94
- `&&++this.pos;case`
95
- `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")},ve.readEscapedChar=function(u){var h=this.input.charCodeAt(++this.pos);switch(++this.pos,h){case 110:return`
96
- `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return J(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"),u){var S=this.pos-1;this.invalidStringToken(S,"Invalid escape sequence in template string")}default:if(h>=48&&h<=55){var E=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],N=parseInt(E,8);return N>255&&(E=E.slice(0,-1),N=parseInt(E,8)),this.pos+=E.length-1,h=this.input.charCodeAt(this.pos),(E!=="0"||h===56||h===57)&&(this.strict||u)&&this.invalidStringToken(this.pos-1-E.length,u?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(N)}return P(h)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(h)}},ve.readHexChar=function(u){var h=this.pos,S=this.readInt(16,u);return S===null&&this.invalidStringToken(h,"Bad character escape sequence"),S},ve.readWord1=function(){this.containsEsc=!1;for(var u="",h=!0,S=this.pos,E=this.options.ecmaVersion>=6;this.pos<this.input.length;){var N=this.fullCharCodeAtPos();if(g(N,E))this.pos+=N<=65535?1:2;else if(N===92){this.containsEsc=!0,u+=this.input.slice(S,this.pos);var R=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var j=this.readCodePoint();(h?d:g)(j,E)||this.invalidStringToken(R,"Invalid Unicode escape"),u+=J(j),S=this.pos}else break;h=!1}return u+this.input.slice(S,this.pos)},ve.readWord=function(){var u=this.readWord1(),h=y.name;return this.keywords.test(u)&&(h=w[u]),this.finishToken(h,u)};var Qw="8.17.0";nt.acorn={Parser:nt,version:Qw,defaultOptions:at,Position:Y,SourceLocation:he,getLineInfo:_e,Node:Sc,TokenType:v,tokTypes:y,keywordTypes:w,TokContext:Er,tokContexts:$e,isIdentifierChar:g,isIdentifierStart:d,Token:lf,isNewLine:P,lineBreak:A,lineBreakG:O,nonASCIIwhitespace:B};function g$(u,h){return nt.parse(u,h)}function y$(u,h,S){return nt.parseExpressionAt(u,h,S)}function _$(u,h){return nt.tokenizer(u,h)}e.Node=Sc,e.Parser=nt,e.Position=Y,e.SourceLocation=he,e.TokContext=Er,e.Token=lf,e.TokenType=v,e.defaultOptions=at,e.getLineInfo=_e,e.isIdentifierChar=g,e.isIdentifierStart=d,e.isNewLine=P,e.keywordTypes=w,e.lineBreak=A,e.lineBreakG=O,e.nonASCIIwhitespace=B,e.parse=g$,e.parseExpressionAt=y$,e.tokContexts=$e,e.tokTypes=y,e.tokenizer=_$,e.version=Qw}))});var sg=x(ig=>{"use strict";p();Object.defineProperty(ig,"__esModule",{value:!0});ig.SUPPORTED_ASSET_IMAGE_EXTENSIONS=void 0;ig.SUPPORTED_ASSET_IMAGE_EXTENSIONS=["jpg","jpeg","png","gif","webp","heic","ico"]});var sl=x(ln=>{"use strict";p();Object.defineProperty(ln,"__esModule",{value:!0});ln.identity=void 0;ln.unique=Bie;ln.assertNever=Vie;ln.unexpected=$ie;ln.isString=Hie;ln.extname=zie;ln.exists=Wie;ln.acceptsLocalBlocks=Gie;function Bie(e){return[...new Set(e)]}function Vie(e){throw new Error(`Unknown module type ${e}`)}function $ie(){return new Error("Unexpected code path encountered")}var Uie=e=>e;ln.identity=Uie;function Hie(e){return typeof e=="string"}function zie(e){return e.split(".").pop()||""}async function Wie(e,t){return e.stat(t).then(()=>!0).catch(()=>!1)}async function Gie(e,t){let r=await t.getSectionSchema(e).catch(i=>{});if(!r)return new Error("Section does not exist");let n=r.validSchema;return n instanceof Error?n:(n.blocks??[]).some(i=>i.type&&"name"in i&&i.name)}});var FS=x(ya=>{"use strict";p();Object.defineProperty(ya,"__esModule",{value:!0});ya.toCssSourceCode=jS;ya.toSvgSourceCode=Qie;ya.toJsSourceCode=p2;ya.parseJs=d2;ya.toSourceCode=Zie;var f2=Zt(),Jie=l2(),Kie=sg(),Yie=sl();async function jS(e,t){return{type:"css",uri:e,source:t,ast:new Error("File parsing not implemented yet")}}async function Qie(e,t){return{type:"svg",uri:e,source:t,ast:new Error("File parsing not implemented yet")}}async function Xie(e,t){return{type:"image",uri:e,source:t,ast:new Error("Image files are not parsed")}}async function p2(e,t){return{type:"javascript",uri:e,source:t,ast:d2(t)}}function d2(e){try{return(0,Jie.parse)(e,{ecmaVersion:"latest",sourceType:"module"})}catch(t){return(0,f2.asError)(t)}}async function Zie(e,t){let r=(0,Yie.extname)(e);if(r==="json"||r==="liquid")return(0,f2.toSourceCode)(e,t);if(r==="js")return p2(e,t);if(r==="css")return jS(e,t);if(r==="svg")return jS(e,t);if(Kie.SUPPORTED_ASSET_IMAGE_EXTENSIONS.includes(r))return Xie(e,t);throw new Error(`Unknown source code type for ${e}`)}});var h2=x(VS=>{"use strict";p();Object.defineProperty(VS,"__esModule",{value:!0});VS.augmentDependencies=tse;var _a=Zt(),ese=FS(),BS=sl();function tse(e,t){return{fs:t.fs,getBlockSchema:(0,_a.memoize)(t.getBlockSchema,BS.identity),getSectionSchema:(0,_a.memoize)(t.getSectionSchema,BS.identity),getSourceCode:(0,_a.memoize)(t.getSourceCode??async function(n){let i=await t.fs.readFile(n);return(0,ese.toSourceCode)(n,i)},BS.identity),getWebComponentDefinitionReference:t.getWebComponentDefinitionReference,mode:t.mode??"theme",getThemeBlockNames:(0,_a.memo)(()=>(0,_a.recursiveReadDirectory)(t.fs,_a.path.join(e,"blocks"),([r])=>r.endsWith(".liquid")).then(r=>r.map(n=>_a.path.basename(n,".liquid"))))}}});var US=x(In=>{"use strict";p();Object.defineProperty(In,"__esModule",{value:!0});In.getModule=nse;In.getTemplateModule=g2;In.getThemeBlockModule=y2;In.getSectionModule=_2;In.getSectionGroupModule=v2;In.getAssetModule=b2;In.getSnippetModule=k2;In.getLayoutModule=S2;var kr=Zt(),rse=sg(),m2=sl(),$S=new WeakMap;function nse(e,t){let r=T2(e);if(r.has(t))return r.get(t);let n=kr.path.relative(t,e.rootUri);switch(!0){case n.startsWith("assets"):return b2(e,kr.path.basename(t));case n.startsWith("blocks"):return y2(e,kr.path.basename(t,".liquid"));case n.startsWith("layout"):return S2(e,kr.path.basename(t,".liquid"));case n.startsWith("sections"):return n.endsWith(".json")?v2(e,kr.path.basename(t,".json")):_2(e,kr.path.basename(t,".liquid"));case n.startsWith("snippets"):return k2(e,kr.path.basename(t,".liquid"));case n.startsWith("templates"):return g2(e,t)}}function g2(e,t){switch((0,m2.extname)(t)){case"json":return Bi(e,{type:"JSON",kind:"template",dependencies:[],references:[],uri:t});case"liquid":return Bi(e,{type:"Liquid",kind:"template",dependencies:[],references:[],uri:t});default:throw new Error(`Unknown template type for ${t}`)}}function y2(e,t){let r=kr.path.join(e.rootUri,"blocks",`${t}.liquid`);return Bi(e,{type:"Liquid",kind:"block",dependencies:[],references:[],uri:r})}function _2(e,t){let r=kr.path.join(e.rootUri,"sections",`${t}.liquid`);return Bi(e,{type:"Liquid",kind:"section",dependencies:[],references:[],uri:r})}function v2(e,t){let r=kr.path.join(e.rootUri,"sections",`${t}.json`);return Bi(e,{type:"JSON",kind:"section-group",dependencies:[],references:[],uri:r})}function b2(e,t){let r=(0,m2.extname)(t),n;if(rse.SUPPORTED_ASSET_IMAGE_EXTENSIONS.includes(r)?n="Image":r==="js"?n="JavaScript":r==="css"?n="CSS":r==="svg"&&(n="SVG"),!!n)return Bi(e,{type:n,kind:"unused",dependencies:[],references:[],uri:kr.path.join(e.rootUri,"assets",t)})}function k2(e,t){let r=kr.path.join(e.rootUri,"snippets",`${t}.liquid`);return Bi(e,{type:"Liquid",kind:"snippet",uri:r,dependencies:[],references:[]})}function S2(e,t="theme"){if(t===!1)return;t===void 0&&(t="theme");let r=kr.path.join(e.rootUri,"layout",`${t}.liquid`);return Bi(e,{type:"Liquid",kind:"layout",uri:r,dependencies:[],references:[]})}function T2(e){return $S.has(e)||$S.set(e,new Map),$S.get(e)}function Bi(e,t){let r=T2(e);return r.has(t.uri)||r.set(t.uri,t),r.get(t.uri)}});var O2=x(ag=>{"use strict";p();Object.defineProperty(ag,"__esModule",{value:!0});ag.traverseModule=Fr;ag.bind=Br;var Vi=ce(),Ft=Zt(),Mn=sl(),jt=US();async function Fr(e,t,r){if(!t.modules[e.uri]&&(t.modules[e.uri]=e,e.exists=await(0,Mn.exists)(r.fs,e.uri),!!e.exists))switch(e.type){case"Liquid":return ise(e,t,r);case"JSON":return cse(e,t,r);case"JavaScript":return;case"CSS":case"SVG":case"Image":return;default:return(0,Mn.assertNever)(e)}}async function ise(e,t,r){let n=await r.getSourceCode(e.uri);if(n.ast instanceof Error)return;let i={LiquidFilter:(c,l)=>{if(["asset_url","asset_img_url","inline_asset_content"].includes(c.name)){let f=l[l.length-1];if(f.type!==Vi.NodeTypes.LiquidVariable||f.expression.type!==Vi.NodeTypes.String||f.filters[0]!==c)return;let m=f.expression.value,d=(0,jt.getAssetModule)(t,m);return d?{target:d,sourceRange:[f.position.start,f.position.end]}:void 0}},ContentForMarkup:(c,l)=>{let f=l.at(-1);if(c.contentForType.value!=="block")return;let m=c.args.find(v=>v.name==="type");if(!m)return;let d=m.value;if(d.type!==Vi.NodeTypes.String)return;let g=d.value;return{target:(0,jt.getThemeBlockModule)(t,g),sourceRange:[f.position.start,c.position.end]}},BlockMarkup:(c,l)=>{let f=l.at(-1);return{target:(0,jt.getThemeBlockModule)(t,c.name.value),sourceRange:[f.position.start,f.position.end]}},HtmlElement:c=>{if(c.name.length!==1||c.name[0].type!==Vi.NodeTypes.TextNode)return;let l=c.name[0],f=l.value;if(!f.includes("-"))return;let m=r.getWebComponentDefinitionReference(f);if(!m)return;let{assetName:d,range:g}=m,v=(0,jt.getAssetModule)(t,d);if(v)return{target:v,sourceRange:[c.blockStartPosition.start,l.position.end],targetRange:g}},RenderMarkup:(c,l)=>{let f=c.snippet,m=l.at(-1);if(!(0,Mn.isString)(f)&&f.type===Vi.NodeTypes.String)return{target:(0,jt.getSnippetModule)(t,f.value),sourceRange:[m.position.start,m.position.end]}},LiquidTag:c=>{switch(c.name){case Vi.NamedTags.sections:if(!(0,Mn.isString)(c.markup)){let l=c.markup.value;return{target:(0,jt.getSectionGroupModule)(t,l),sourceRange:[c.position.start,c.position.end]}}case Vi.NamedTags.section:if(!(0,Mn.isString)(c.markup)&&c.markup.type===Vi.NodeTypes.SectionMarkup){let l=c.markup.name.value;return{target:(0,jt.getSectionModule)(t,l),sourceRange:[c.position.start,c.position.end]}}}}},s=(0,Ft.visit)(n.ast,i);for(let c of s)Br(e,c.target,{sourceRange:c.sourceRange,targetRange:c.targetRange});let o=(0,Mn.unique)(s.map(c=>c.target)).map(c=>Fr(c,t,r));if(e.kind==="section"){let c=Ft.path.basename(e.uri,".liquid"),l=await r.getSectionSchema(c);o.push(w2(l,e,t,r))}else if(e.kind==="block"&&r.mode==="theme"){let c=Ft.path.basename(e.uri,".liquid"),l=await r.getBlockSchema(c);o.push(w2(l,e,t,r))}return Promise.all(o)}async function w2(e,t,r,n){if(!e||t.kind==="section"&&await(0,Mn.acceptsLocalBlocks)(Ft.path.basename(t.uri,".liquid"),n))return;let{ast:a,validSchema:o}=e;if(o instanceof Error||a instanceof Error)return;let c=[];return o.blocks&&c.push(sse(e,t,a,o.blocks,r,n)),o.presets&&c.push(ase(e,t,a,o.presets,r,n)),"default"in o&&o.default&&c.push(ose(e,t,a,o.default,r,n)),Promise.all(c)}async function sse(e,t,r,n,i,s){let a=[];for(let[o,c]of Object.entries(n)){let l=["blocks",o],m=(0,Ft.nodeAtPath)(r,l).children.find(g=>g.key.value==="type");if(!m)continue;let d=[e.offset+m.loc.start.offset,e.offset+m.loc.end.offset];switch(c.type){case"@theme":{let g=await s.getThemeBlockNames().then(v=>v.filter(b=>!b.startsWith("_")));for(let v of g){let b=(0,jt.getThemeBlockModule)(i,Ft.path.basename(v,".liquid"));Br(t,b,{sourceRange:d,type:"indirect"}),a.push(Fr(b,i,s))}break}case"@app":break;default:{let g=(0,jt.getThemeBlockModule)(i,c.type);Br(t,g,{sourceRange:d}),a.push(Fr(g,i,s))}}}return Promise.all(a)}async function ase(e,t,r,n,i,s){let a=[];for(let[o,c]of n.entries()){if(!("blocks"in c))continue;let l=Array.isArray(c.blocks)?c.blocks.entries():Object.entries(c.blocks);for(let[f,m]of l){let d=["presets",o,"blocks",f],g=(0,Ft.nodeAtPath)(r,d),v=(0,jt.getThemeBlockModule)(i,m.type);if(!v)continue;let b=g.children.find(k=>k.key.value==="type");if(!b)continue;let _=[e.offset+b.loc.start.offset,e.offset+b.loc.end.offset];Br(t,v,{sourceRange:_,type:"preset"}),a.push(Fr(v,i,s)),m.blocks&&a.push(E2(e,t,r,m.blocks,d,i,s))}}return Promise.all(a)}async function E2(e,t,r,n,i,s,a){let o=[],c=Array.isArray(n)?n.entries():Object.entries(n);for(let[l,f]of c){let m=[...i,"blocks",l],d=(0,Ft.nodeAtPath)(r,m),g=(0,jt.getThemeBlockModule)(s,f.type);if(!g)continue;let v=d.children.find(_=>_.key.value==="type");if(!v)continue;let b=[e.offset+v.loc.start.offset,e.offset+v.loc.end.offset];Br(t,g,{sourceRange:b,type:"preset"}),o.push(Fr(g,s,a)),f.blocks&&o.push(E2(e,t,r,f.blocks,m,s,a))}return Promise.all(o)}async function ose(e,t,r,n,i,s){let a=[];if(!("blocks"in n))return;let o=Array.isArray(n.blocks)?n.blocks.entries():Object.entries(n.blocks);for(let[c,l]of o){let f=["default","blocks",c],m=(0,Ft.nodeAtPath)(r,f),d=(0,jt.getThemeBlockModule)(i,l.type);if(!d)continue;let g=m.children.find(b=>b.key.value==="type");if(!g)continue;let v=[e.offset+g.loc.start.offset,e.offset+g.loc.end.offset];Br(t,d,{sourceRange:v,type:"preset"}),a.push(Fr(d,i,s))}return Promise.all(a)}async function cse(e,t,r){let n=await r.getSourceCode(e.uri);if(n.type!==Ft.SourceCodeType.JSON)throw(0,Mn.unexpected)();let i=n.ast;if(!(i instanceof Error))switch(e.kind){case"template":{let s=(0,Ft.parseJSON)(n.source),a=[];for(let[l,f]of Object.entries(s.sections)){let m=f.type,d=["sections",l],g=(0,Ft.nodeAtPath)(i,d),v=(0,jt.getSectionModule)(t,m),b=g.children.find(T=>T.key.value==="type"),_=b.loc.start.offset,k=b.loc.end.offset;Br(e,v,{sourceRange:[_,k]}),a.push(Fr(v,t,r),x2(e,i,d,f,t,r))}let o=s.layout,c=(0,jt.getLayoutModule)(t,s.layout);if(c){let l,f=!0;if(o!==!1&&o!==void 0){let m=["layout"],d=(0,Ft.nodeAtPath)(i,m);l=[d.loc.start.offset,d.loc.end.offset],f=!1}Br(e,c,{sourceRange:l,type:"indirect"}),a.push(Fr(c,t,r))}return Promise.all(a)}case"section-group":{let s=(0,Ft.parseJSON)(n.source),a=[];for(let[o,c]of Object.entries(s.sections)){let l=c.type,f=["sections",o],m=(0,Ft.nodeAtPath)(i,f),d=(0,jt.getSectionModule)(t,l),g=m.children.find(k=>k.key.value==="type"),v=g.loc.start.offset,b=g.loc.end.offset;Br(e,d,{sourceRange:[v,b]}),a.push(Fr(d,t,r),x2(e,i,f,c,t,r))}return Promise.all(a)}default:return(0,Mn.assertNever)(e.kind)}}async function x2(e,t,r=[],n,i,s){if(!n.blocks||await(0,Mn.acceptsLocalBlocks)(n.type,s))return;let o=[];for(let[c,l]of Object.entries(n.blocks)){let f=l.type,m=(0,jt.getThemeBlockModule)(i,f),d=[...r,"blocks",c],v=(0,Ft.nodeAtPath)(t,d).children.find(w=>w.key.value==="type"),b=v.loc.start.offset,_=v.loc.end.offset;Br(e,m,{sourceRange:[b,_]}),o.push(Fr(m,i,s),A2(e,t,d,l,i,s))}return Promise.all(o)}async function A2(e,t,r=[],n,i,s){if(!n.blocks)return;let a=[];for(let[o,c]of Object.entries(n.blocks)){let l=c.type,f=(0,jt.getThemeBlockModule)(i,l),m=[...r,"blocks",o],g=(0,Ft.nodeAtPath)(t,m).children.find(k=>k.key.value==="type"),v=g.loc.start.offset,b=g.loc.end.offset;Br(e,f,{sourceRange:[v,b]}),a.push(Fr(f,i,s),A2(e,t,m,c,i,s))}return Promise.all(a)}function Br(e,t,{sourceRange:r,targetRange:n,type:i="direct"}={}){let s={source:{uri:e.uri,range:r},target:{uri:t.uri,range:n},type:i};e.dependencies.push(s),t.references.push(s)}});var P2=x(HS=>{"use strict";p();Object.defineProperty(HS,"__esModule",{value:!0});HS.buildThemeGraph=pse;var al=Zt(),use=h2(),lse=US(),fse=O2();async function pse(e,t,r){let n=(0,use.augmentDependencies)(e,t);r=r??await(0,al.recursiveReadDirectory)(n.fs,e,([s])=>{let a=s.startsWith(al.path.join(e,"templates")),o=s.startsWith(al.path.join(e,"layout"))&&s.endsWith(".liquid"),c=s.startsWith(al.path.join(e,"sections"))&&s.endsWith(".liquid"),l=n.mode==="app"&&s.startsWith(al.path.join(e,"blocks"))&&s.endsWith(".liquid");return a||o||c||l});let i={entryPoints:[],modules:{},rootUri:e};return i.entryPoints=r.map(s=>(0,lse.getModule)(i,s)).filter(s=>s!==void 0),await Promise.all(i.entryPoints.map(s=>(0,fse.traverseModule)(s,i,n))),i}});var N2=x(zS=>{"use strict";p();Object.defineProperty(zS,"__esModule",{value:!0});zS.serializeThemeGraph=dse;function dse(e){let t=Object.values(e.modules).map(n=>({uri:n.uri,type:n.type,kind:n.kind,..."exists"in n?{exists:n.exists}:{}})),r=Object.values(e.modules).flatMap(n=>n.dependencies);return{rootUri:e.rootUri,nodes:t,edges:r}}});var L2=x((og,q2)=>{p();(function(e,t){typeof og=="object"&&typeof q2<"u"?t(og):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t((e.acorn=e.acorn||{},e.acorn.walk={})))})(og,(function(e){"use strict";function t(k,w,T,y,A){T||(T=_),(function O(P,q,B){var M=B||P.type;b(T,M,P,q,O),w[M]&&w[M](P,q)})(k,y,A)}function r(k,w,T,y,A){var O=[];T||(T=_),(function P(q,B,M){var L=M||q.type,C=q!==O[O.length-1];C&&O.push(q),b(T,L,q,B,P),w[L]&&w[L](q,B||O,O),C&&O.pop()})(k,y,A)}function n(k,w,T,y,A){var O=T?d(T,y||void 0):y;(function P(q,B,M){O[M||q.type](q,B,P)})(k,w,A)}function i(k){return typeof k=="string"?function(w){return w===k}:k||function(){return!0}}var s=function(w,T){this.node=w,this.state=T};function a(k,w,T,y,A){T||(T=_);var O;(function P(q,B,M){var L=M||q.type;b(T,L,q,B,P),O!==q&&(w(q,B,L),O=q)})(k,y,A)}function o(k,w,T,y){T||(T=_);var A=[],O;(function P(q,B,M){var L=M||q.type,C=q!==A[A.length-1];C&&A.push(q),b(T,L,q,B,P),O!==q&&(w(q,B||A,A,L),O=q),C&&A.pop()})(k,y)}function c(k,w,T,y,A,O){A||(A=_),y=i(y);try{(function P(q,B,M){var L=M||q.type;if((w==null||q.start<=w)&&(T==null||q.end>=T)&&b(A,L,q,B,P),(w==null||q.start===w)&&(T==null||q.end===T)&&y(L,q))throw new s(q,B)})(k,O)}catch(P){if(P instanceof s)return P;throw P}}function l(k,w,T,y,A){T=i(T),y||(y=_);try{(function O(P,q,B){var M=B||P.type;if(!(P.start>w||P.end<w)&&(b(y,M,P,q,O),T(M,P)))throw new s(P,q)})(k,A)}catch(O){if(O instanceof s)return O;throw O}}function f(k,w,T,y,A){T=i(T),y||(y=_);try{(function O(P,q,B){if(!(P.end<w)){var M=B||P.type;if(P.start>=w&&T(M,P))throw new s(P,q);b(y,M,P,q,O)}})(k,A)}catch(O){if(O instanceof s)return O;throw O}}function m(k,w,T,y,A){T=i(T),y||(y=_);var O;return(function P(q,B,M){if(!(q.start>w)){var L=M||q.type;q.end<=w&&(!O||O.node.end<q.end)&&T(L,q)&&(O=new s(q,B)),b(y,L,q,B,P)}})(k,A),O}function d(k,w){var T=Object.create(w||_);for(var y in k)T[y]=k[y];return T}function g(k,w,T){T(k,w)}function v(k,w,T){}function b(k,w,T,y,A){if(k[w]==null)throw new Error("No walker function defined for node type "+w);k[w](T,y,A)}var _={};_.Program=_.BlockStatement=_.StaticBlock=function(k,w,T){for(var y=0,A=k.body;y<A.length;y+=1){var O=A[y];T(O,w,"Statement")}},_.Statement=g,_.EmptyStatement=v,_.ExpressionStatement=_.ParenthesizedExpression=_.ChainExpression=function(k,w,T){return T(k.expression,w,"Expression")},_.IfStatement=function(k,w,T){T(k.test,w,"Expression"),T(k.consequent,w,"Statement"),k.alternate&&T(k.alternate,w,"Statement")},_.LabeledStatement=function(k,w,T){return T(k.body,w,"Statement")},_.BreakStatement=_.ContinueStatement=v,_.WithStatement=function(k,w,T){T(k.object,w,"Expression"),T(k.body,w,"Statement")},_.SwitchStatement=function(k,w,T){T(k.discriminant,w,"Expression");for(var y=0,A=k.cases;y<A.length;y+=1){var O=A[y];T(O,w)}},_.SwitchCase=function(k,w,T){k.test&&T(k.test,w,"Expression");for(var y=0,A=k.consequent;y<A.length;y+=1){var O=A[y];T(O,w,"Statement")}},_.ReturnStatement=_.YieldExpression=_.AwaitExpression=function(k,w,T){k.argument&&T(k.argument,w,"Expression")},_.ThrowStatement=_.SpreadElement=function(k,w,T){return T(k.argument,w,"Expression")},_.TryStatement=function(k,w,T){T(k.block,w,"Statement"),k.handler&&T(k.handler,w),k.finalizer&&T(k.finalizer,w,"Statement")},_.CatchClause=function(k,w,T){k.param&&T(k.param,w,"Pattern"),T(k.body,w,"Statement")},_.WhileStatement=_.DoWhileStatement=function(k,w,T){T(k.test,w,"Expression"),T(k.body,w,"Statement")},_.ForStatement=function(k,w,T){k.init&&T(k.init,w,"ForInit"),k.test&&T(k.test,w,"Expression"),k.update&&T(k.update,w,"Expression"),T(k.body,w,"Statement")},_.ForInStatement=_.ForOfStatement=function(k,w,T){T(k.left,w,"ForInit"),T(k.right,w,"Expression"),T(k.body,w,"Statement")},_.ForInit=function(k,w,T){k.type==="VariableDeclaration"?T(k,w):T(k,w,"Expression")},_.DebuggerStatement=v,_.FunctionDeclaration=function(k,w,T){return T(k,w,"Function")},_.VariableDeclaration=function(k,w,T){for(var y=0,A=k.declarations;y<A.length;y+=1){var O=A[y];T(O,w)}},_.VariableDeclarator=function(k,w,T){T(k.id,w,"Pattern"),k.init&&T(k.init,w,"Expression")},_.Function=function(k,w,T){k.id&&T(k.id,w,"Pattern");for(var y=0,A=k.params;y<A.length;y+=1){var O=A[y];T(O,w,"Pattern")}T(k.body,w,k.expression?"Expression":"Statement")},_.Pattern=function(k,w,T){k.type==="Identifier"?T(k,w,"VariablePattern"):k.type==="MemberExpression"?T(k,w,"MemberPattern"):T(k,w)},_.VariablePattern=v,_.MemberPattern=g,_.RestElement=function(k,w,T){return T(k.argument,w,"Pattern")},_.ArrayPattern=function(k,w,T){for(var y=0,A=k.elements;y<A.length;y+=1){var O=A[y];O&&T(O,w,"Pattern")}},_.ObjectPattern=function(k,w,T){for(var y=0,A=k.properties;y<A.length;y+=1){var O=A[y];O.type==="Property"?(O.computed&&T(O.key,w,"Expression"),T(O.value,w,"Pattern")):O.type==="RestElement"&&T(O.argument,w,"Pattern")}},_.Expression=g,_.ThisExpression=_.Super=_.MetaProperty=v,_.ArrayExpression=function(k,w,T){for(var y=0,A=k.elements;y<A.length;y+=1){var O=A[y];O&&T(O,w,"Expression")}},_.ObjectExpression=function(k,w,T){for(var y=0,A=k.properties;y<A.length;y+=1){var O=A[y];T(O,w)}},_.FunctionExpression=_.ArrowFunctionExpression=_.FunctionDeclaration,_.SequenceExpression=function(k,w,T){for(var y=0,A=k.expressions;y<A.length;y+=1){var O=A[y];T(O,w,"Expression")}},_.TemplateLiteral=function(k,w,T){for(var y=0,A=k.quasis;y<A.length;y+=1){var O=A[y];T(O,w)}for(var P=0,q=k.expressions;P<q.length;P+=1){var B=q[P];T(B,w,"Expression")}},_.TemplateElement=v,_.UnaryExpression=_.UpdateExpression=function(k,w,T){T(k.argument,w,"Expression")},_.BinaryExpression=_.LogicalExpression=function(k,w,T){T(k.left,w,"Expression"),T(k.right,w,"Expression")},_.AssignmentExpression=_.AssignmentPattern=function(k,w,T){T(k.left,w,"Pattern"),T(k.right,w,"Expression")},_.ConditionalExpression=function(k,w,T){T(k.test,w,"Expression"),T(k.consequent,w,"Expression"),T(k.alternate,w,"Expression")},_.NewExpression=_.CallExpression=function(k,w,T){if(T(k.callee,w,"Expression"),k.arguments)for(var y=0,A=k.arguments;y<A.length;y+=1){var O=A[y];T(O,w,"Expression")}},_.MemberExpression=function(k,w,T){T(k.object,w,"Expression"),k.computed&&T(k.property,w,"Expression")},_.ExportNamedDeclaration=_.ExportDefaultDeclaration=function(k,w,T){if(k.declaration&&T(k.declaration,w,k.type==="ExportNamedDeclaration"||k.declaration.id?"Statement":"Expression"),k.source&&T(k.source,w,"Expression"),k.attributes)for(var y=0,A=k.attributes;y<A.length;y+=1){var O=A[y];T(O,w)}},_.ExportAllDeclaration=function(k,w,T){if(k.exported&&T(k.exported,w),T(k.source,w,"Expression"),k.attributes)for(var y=0,A=k.attributes;y<A.length;y+=1){var O=A[y];T(O,w)}},_.ImportAttribute=function(k,w,T){T(k.value,w,"Expression")},_.ImportDeclaration=function(k,w,T){for(var y=0,A=k.specifiers;y<A.length;y+=1){var O=A[y];T(O,w)}if(T(k.source,w,"Expression"),k.attributes)for(var P=0,q=k.attributes;P<q.length;P+=1){var B=q[P];T(B,w)}},_.ImportExpression=function(k,w,T){T(k.source,w,"Expression"),k.options&&T(k.options,w,"Expression")},_.ImportSpecifier=_.ImportDefaultSpecifier=_.ImportNamespaceSpecifier=_.Identifier=_.PrivateIdentifier=_.Literal=v,_.TaggedTemplateExpression=function(k,w,T){T(k.tag,w,"Expression"),T(k.quasi,w,"Expression")},_.ClassDeclaration=_.ClassExpression=function(k,w,T){return T(k,w,"Class")},_.Class=function(k,w,T){k.id&&T(k.id,w,"Pattern"),k.superClass&&T(k.superClass,w,"Expression"),T(k.body,w)},_.ClassBody=function(k,w,T){for(var y=0,A=k.body;y<A.length;y+=1){var O=A[y];T(O,w)}},_.MethodDefinition=_.PropertyDefinition=_.Property=function(k,w,T){k.computed&&T(k.key,w,"Expression"),k.value&&T(k.value,w,"Expression")},e.ancestor=r,e.base=_,e.findNodeAfter=f,e.findNodeAround=l,e.findNodeAt=c,e.findNodeBefore=m,e.full=a,e.fullAncestor=o,e.make=d,e.recursive=n,e.simple=t}))});var I2=x(cg=>{"use strict";p();Object.defineProperty(cg,"__esModule",{value:!0});cg.getWebComponentMap=gse;cg.findWebComponentReferences=C2;var WS=Zt(),hse=L2(),mse=/^[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 gse(e,{fs:t,getSourceCode:r}){let n=new Map,i=WS.path.join(e,"assets"),s=await(0,WS.recursiveReadDirectory)(t,i,([a])=>a.endsWith(".js"));return await Promise.all(s.map(a=>C2(a,i,r,n))),n}async function C2(e,t,r,n){let i=await r(e);if(i.type!=="javascript")return;let s=i.ast;if(!(s instanceof Error))for(let a of s.body)(0,hse.ancestor)(a,{Literal(o,c,l){if(typeof o.value=="string"&&mse.test(o.value)){let f=l.at(-2);if(!f||f.type!=="CallExpression")return;let m=f.callee;if(m.type!=="MemberExpression")return;let d=m.property;if(d.type!=="Identifier"||d.name!=="define")return;n.set(o.value,{assetName:WS.path.relative(e,t),range:[d.start,o.end]})}return null}})}});var R2=x(tt=>{"use strict";p();var yse=tt&&tt.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),_se=tt&&tt.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&yse(t,e,r)};Object.defineProperty(tt,"__esModule",{value:!0});tt.toSvgSourceCode=tt.toSourceCode=tt.toJsSourceCode=tt.toCssSourceCode=tt.findWebComponentReferences=tt.getWebComponentMap=tt.serializeThemeGraph=tt.buildThemeGraph=void 0;var vse=P2();Object.defineProperty(tt,"buildThemeGraph",{enumerable:!0,get:function(){return vse.buildThemeGraph}});var bse=N2();Object.defineProperty(tt,"serializeThemeGraph",{enumerable:!0,get:function(){return bse.serializeThemeGraph}});var M2=I2();Object.defineProperty(tt,"getWebComponentMap",{enumerable:!0,get:function(){return M2.getWebComponentMap}});Object.defineProperty(tt,"findWebComponentReferences",{enumerable:!0,get:function(){return M2.findWebComponentReferences}});var ug=FS();Object.defineProperty(tt,"toCssSourceCode",{enumerable:!0,get:function(){return ug.toCssSourceCode}});Object.defineProperty(tt,"toJsSourceCode",{enumerable:!0,get:function(){return ug.toJsSourceCode}});Object.defineProperty(tt,"toSourceCode",{enumerable:!0,get:function(){return ug.toSourceCode}});Object.defineProperty(tt,"toSvgSourceCode",{enumerable:!0,get:function(){return ug.toSvgSourceCode}});_se(sg(),tt)});var F2=x(($we,JS)=>{"use strict";p();var rt=oe("path"),D2=oe("os"),$i=D2.homedir(),GS=D2.tmpdir(),{env:Zo}=process,kse=e=>{let t=rt.join($i,"Library");return{data:rt.join(t,"Application Support",e),config:rt.join(t,"Preferences",e),cache:rt.join(t,"Caches",e),log:rt.join(t,"Logs",e),temp:rt.join(GS,e)}},Sse=e=>{let t=Zo.APPDATA||rt.join($i,"AppData","Roaming"),r=Zo.LOCALAPPDATA||rt.join($i,"AppData","Local");return{data:rt.join(r,e,"Data"),config:rt.join(t,e,"Config"),cache:rt.join(r,e,"Cache"),log:rt.join(r,e,"Log"),temp:rt.join(GS,e)}},Tse=e=>{let t=rt.basename($i);return{data:rt.join(Zo.XDG_DATA_HOME||rt.join($i,".local","share"),e),config:rt.join(Zo.XDG_CONFIG_HOME||rt.join($i,".config"),e),cache:rt.join(Zo.XDG_CACHE_HOME||rt.join($i,".cache"),e),log:rt.join(Zo.XDG_STATE_HOME||rt.join($i,".local","state"),e),temp:rt.join(GS,t,e)}},j2=(e,t)=>{if(typeof e!="string")throw new TypeError(`Expected string, got ${typeof e}`);return t=Object.assign({suffix:"nodejs"},t),t.suffix&&(e+=`-${t.suffix}`),process.platform==="darwin"?kse(e):process.platform==="win32"?Sse(e):Tse(e)};JS.exports=j2;JS.exports.default=j2});var KS=x(Vr=>{"use strict";p();Object.defineProperty(Vr,"__esModule",{value:!0});Vr.memoize=Vr.memo=Vr.tap=Vr.identity=Vr.noop=void 0;var wse=()=>{};Vr.noop=wse;var xse=e=>e;Vr.identity=xse;var Ese=e=>t=>(e(t),t);Vr.tap=Ese;var B2=Zt();Object.defineProperty(Vr,"memo",{enumerable:!0,get:function(){return B2.memo}});Object.defineProperty(Vr,"memoize",{enumerable:!0,get:function(){return B2.memoize}})});var eT=x(Te=>{"use strict";p();var pg=Te&&Te.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Te,"__esModule",{value:!0});Te.Manifests=Te.Resources=Te.ThemeLiquidDocsSchemaRoot=Te.ThemeLiquidDocsRoot=Te.root=void 0;Te.downloadSchema=V2;Te.downloadResource=$2;Te.download=QS;Te.resourcePath=lg;Te.resourceUrl=fg;Te.schemaPath=XS;Te.schemaUrl=ZS;Te.exists=U2;Te.downloadThemeLiquidDocs=qse;var Ase=pg(F2()),Ose=pg(Zw()),cl=pg(oe("node:fs/promises")),YS=pg(oe("node:path")),ol=KS(),Pse=(0,Ase.default)("theme-liquid-docs");Te.root=Pse.cache;Te.ThemeLiquidDocsRoot="https://raw.githubusercontent.com/Shopify/theme-liquid-docs/main";Te.ThemeLiquidDocsSchemaRoot=`${Te.ThemeLiquidDocsRoot}/schemas`;Te.Resources=["filters","objects","tags","shopify_system_translations","manifest_theme","manifest_theme_app_extension"];Te.Manifests={app:"manifest_theme_app_extension",theme:"manifest_theme"};var Nse={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 V2(e,t=Te.root,r=ol.noop){let n=ZS(e),i=XS(e,t),s=await QS(n,r);return await cl.default.writeFile(i,s,"utf8"),s}async function $2(e,t=Te.root,r=ol.noop){let n=fg(e),i=lg(e,t),s=await QS(n,r);return await cl.default.writeFile(i,s,"utf8"),s}async function QS(e,t){return e.startsWith("file:")?await cl.default.readFile(e.replace(/^file:/,""),"utf8").then((0,ol.tap)(()=>t(`Using local file: ${e}`))).catch(r=>{throw t(`Failed to read local file: ${e}`),r}):(await(0,Ose.default)(e)).text()}function lg(e,t=Te.root){return YS.default.join(t,`${e}.json`)}function fg(e){let t=Nse[e];return`${process.env.SHOPIFY_TLD_ROOT?`file:${process.env.SHOPIFY_TLD_ROOT}`:Te.ThemeLiquidDocsRoot}/${t}`}function XS(e,t=Te.root){return YS.default.resolve(t,YS.default.basename(e))}function ZS(e){return`${process.env.SHOPIFY_TLD_ROOT?`file:${process.env.SHOPIFY_TLD_ROOT}`:Te.ThemeLiquidDocsRoot}/schemas/${e}`}async function U2(e){try{return await cl.default.stat(e),!0}catch{return!1}}async function qse(e,t){await U2(e)||await cl.default.mkdir(e);let r=["latest"].concat(Te.Resources),n=await Promise.all(r.map(a=>$2(a,e,t).then((0,ol.tap)(()=>t(`Successfully downloaded latest resource:
97
- ${fg(a)}
98
- > ${lg(a,e)}`))).catch(o=>{throw t(`Failed to download latest resource:
99
- ${fg(a)} to
100
- ${lg(a,e)}
101
- ${o}`),o}))),s=Object.values(Te.Manifests).map(a=>r.indexOf(a)).map(a=>n[a]).map(a=>JSON.parse(a)).flatMap(a=>a.schemas.map(o=>o.uri));await Promise.all(Lse(s).map(a=>V2(a,e,t).then((0,ol.tap)(()=>t(`Successfully downloaded schema:
102
- ${ZS(a)}
103
- > ${XS(a,e)}`))).catch(o=>{throw t(`Failed to download schema: ${a}, ${o}`),o})))}function Lse(e){return[...new Set(e).values()]}});var W2=x(ec=>{"use strict";p();var H2=ec&&ec.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ec,"__esModule",{value:!0});ec.ThemeLiquidDocsManager=void 0;var ll=H2(oe("node:fs/promises")),dg=H2(oe("node:path")),Sr=eT(),ar=KS(),tT=class{log;constructor(t=ar.noop){this.log=t}filters=(0,ar.memo)(async()=>Ui(this.loaders("filters"),JSON.parse,[],this.log));objects=(0,ar.memo)(async()=>Ui(this.loaders("objects"),JSON.parse,[],this.log));liquidDrops=(0,ar.memo)(async()=>Ui(this.loaders("objects"),JSON.parse,[],this.log));tags=(0,ar.memo)(async()=>Ui(this.loaders("tags"),JSON.parse,[],this.log));systemTranslations=(0,ar.memo)(async()=>Ui(this.loaders("shopify_system_translations"),JSON.parse,{},this.log));schemas=(0,ar.memoize)(t=>Ui(this.loaders(Sr.Manifests[t]),JSON.parse,{schemas:[]},this.log).then(r=>Promise.all(r.schemas.map(async n=>({uri:`${Sr.ThemeLiquidDocsSchemaRoot}/${n.uri}`,fileMatch:n.fileMatch,schema:await Ui(this.schemaLoaders(n.uri),ar.identity,"",this.log)})))),ar.identity);setup=(0,ar.memo)(async()=>{try{await(0,Sr.exists)(Sr.root)||await ll.default.mkdir(Sr.root,{recursive:!0});let t=await this.latestRevision();await(0,Sr.downloadResource)("latest",Sr.root,this.log);let r=await this.latestRevision();t!==r&&await(0,Sr.downloadThemeLiquidDocs)(Sr.root,this.log)}catch(t){t instanceof Error&&this.log(`Failed to setup with the following error: ${t.message}`);return}});async latestRevision(){return(await Ui([ul(()=>this.load("latest"),"loadLatestRevision")],JSON.parse,{},this.log)).revision??""}async loadResource(t){return await this.setup(),this.load(t).then((0,ar.tap)(()=>this.log(`Loaded resource from ${(0,Sr.resourcePath)(t)}`)))}async load(t){return ll.default.readFile((0,Sr.resourcePath)(t),"utf8")}async loadSchema(t){return ll.default.readFile((0,Sr.schemaPath)(t),"utf8").then((0,ar.tap)(()=>this.log(`Loaded schema from ${(0,Sr.schemaPath)(t)}`)))}loaders(t){return[ul(()=>this.loadResource(t),`loadResource(${t})`),ul(()=>Cse(t,this.log),`fallbackResource(${t})`)]}schemaLoaders(t){return[ul(()=>this.loadSchema(t),`loadSchema(${t})`),ul(()=>Ise(t,this.log),`fallbackSchema(${t})`)]}};ec.ThemeLiquidDocsManager=tT;function ul(e,t){return Object.assign(e,{loaderName:t})}async function Ui(e,t,r,n){for(let i of e)try{return t(await i())}catch(s){n(`Failed to load or transform ${i.loaderName} with the following error:
104
- ${s instanceof Error?s.message:s}`);continue}return r}function z2(){return dg.default.resolve(__dirname,"./data")}async function Cse(e,t){let r=dg.default.resolve(z2(),`${e}.json`);return ll.default.readFile(r,"utf8").then((0,ar.tap)(()=>t(`Loaded fallback resource
105
- ${e} from
106
- ${r}`)))}async function Ise(e,t){let r=dg.default.resolve(z2(),dg.default.basename(e));return ll.default.readFile(r,"utf8").then((0,ar.tap)(()=>t(`Loaded fallback schema
107
- ${e} from
108
- ${r}`)))}});var G2=x($r=>{"use strict";p();Object.defineProperty($r,"__esModule",{value:!0});$r.root=$r.downloadThemeLiquidDocs=$r.downloadResource=$r.Resources=$r.ThemeLiquidDocsManager=void 0;var Mse=W2();Object.defineProperty($r,"ThemeLiquidDocsManager",{enumerable:!0,get:function(){return Mse.ThemeLiquidDocsManager}});var hg=eT();Object.defineProperty($r,"Resources",{enumerable:!0,get:function(){return hg.Resources}});Object.defineProperty($r,"downloadResource",{enumerable:!0,get:function(){return hg.downloadResource}});Object.defineProperty($r,"downloadThemeLiquidDocs",{enumerable:!0,get:function(){return hg.downloadThemeLiquidDocs}});Object.defineProperty($r,"root",{enumerable:!0,get:function(){return hg.root}})});var J2=x(rT=>{p();var va=oe("path"),zi=process.platform==="win32",Hi=oe("fs"),Rse=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function Dse(){var e;if(Rse){var t=new Error;e=r}else e=n;return e;function r(i){i&&(t.message=i.message,i=t,n(i))}function n(i){if(i){if(process.throwDeprecation)throw i;if(!process.noDeprecation){var s="fs: missing callback "+(i.stack||i.message);process.traceDeprecation?console.trace(s):console.error(s)}}}}function jse(e){return typeof e=="function"?e:Dse()}var Xwe=va.normalize;zi?li=/(.*?)(?:[\/\\]+|$)/g:li=/(.*?)(?:[\/]+|$)/g;var li;zi?fl=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/:fl=/^[\/]*/;var fl;rT.realpathSync=function(t,r){if(t=va.resolve(t),r&&Object.prototype.hasOwnProperty.call(r,t))return r[t];var n=t,i={},s={},a,o,c,l;f();function f(){var _=fl.exec(t);a=_[0].length,o=_[0],c=_[0],l="",zi&&!s[c]&&(Hi.lstatSync(c),s[c]=!0)}for(;a<t.length;){li.lastIndex=a;var m=li.exec(t);if(l=o,o+=m[0],c=l+m[1],a=li.lastIndex,!(s[c]||r&&r[c]===c)){var d;if(r&&Object.prototype.hasOwnProperty.call(r,c))d=r[c];else{var g=Hi.lstatSync(c);if(!g.isSymbolicLink()){s[c]=!0,r&&(r[c]=c);continue}var v=null;if(!zi){var b=g.dev.toString(32)+":"+g.ino.toString(32);i.hasOwnProperty(b)&&(v=i[b])}v===null&&(Hi.statSync(c),v=Hi.readlinkSync(c)),d=va.resolve(l,v),r&&(r[c]=d),zi||(i[b]=v)}t=va.resolve(d,t.slice(a)),f()}}return r&&(r[n]=t),t};rT.realpath=function(t,r,n){if(typeof n!="function"&&(n=jse(r),r=null),t=va.resolve(t),r&&Object.prototype.hasOwnProperty.call(r,t))return process.nextTick(n.bind(null,null,r[t]));var i=t,s={},a={},o,c,l,f;m();function m(){var _=fl.exec(t);o=_[0].length,c=_[0],l=_[0],f="",zi&&!a[l]?Hi.lstat(l,function(k){if(k)return n(k);a[l]=!0,d()}):process.nextTick(d)}function d(){if(o>=t.length)return r&&(r[i]=t),n(null,t);li.lastIndex=o;var _=li.exec(t);return f=c,c+=_[0],l=f+_[1],o=li.lastIndex,a[l]||r&&r[l]===l?process.nextTick(d):r&&Object.prototype.hasOwnProperty.call(r,l)?b(r[l]):Hi.lstat(l,g)}function g(_,k){if(_)return n(_);if(!k.isSymbolicLink())return a[l]=!0,r&&(r[l]=l),process.nextTick(d);if(!zi){var w=k.dev.toString(32)+":"+k.ino.toString(32);if(s.hasOwnProperty(w))return v(null,s[w],l)}Hi.stat(l,function(T){if(T)return n(T);Hi.readlink(l,function(y,A){zi||(s[w]=A),v(y,A)})})}function v(_,k,w){if(_)return n(_);var T=va.resolve(f,k);r&&(r[w]=T),b(T)}function b(_){t=va.resolve(_,t.slice(o)),m()}}});var aT=x((txe,X2)=>{p();X2.exports=Wi;Wi.realpath=Wi;Wi.sync=sT;Wi.realpathSync=sT;Wi.monkeypatch=Bse;Wi.unmonkeypatch=Vse;var tc=oe("fs"),nT=tc.realpath,iT=tc.realpathSync,Fse=process.version,K2=/^v[0-5]\./.test(Fse),Y2=J2();function Q2(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}function Wi(e,t,r){if(K2)return nT(e,t,r);typeof t=="function"&&(r=t,t=null),nT(e,t,function(n,i){Q2(n)?Y2.realpath(e,t,r):r(n,i)})}function sT(e,t){if(K2)return iT(e,t);try{return iT(e,t)}catch(r){if(Q2(r))return Y2.realpathSync(e,t);throw r}}function Bse(){tc.realpath=Wi,tc.realpathSync=sT}function Vse(){tc.realpath=nT,tc.realpathSync=iT}});var eF=x((nxe,Z2)=>{p();var $se=typeof process=="object"&&process&&process.platform==="win32";Z2.exports=$se?{sep:"\\"}:{sep:"/"}});var gg=x((axe,fT)=>{p();var Tr=fT.exports=(e,t,r={})=>(mg(t),!r.nocomment&&t.charAt(0)==="#"?!1:new rc(t,r).match(e));fT.exports=Tr;var uT=eF();Tr.sep=uT.sep;var er=Symbol("globstar **");Tr.GLOBSTAR=er;var Use=b$(),tF={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},lT="[^/]",oT=lT+"*?",Hse="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",zse="(?:(?!(?:\\/|^)\\.).)*?",iF=e=>e.split("").reduce((t,r)=>(t[r]=!0,t),{}),rF=iF("().*{}+?[]^$\\!"),Wse=iF("[.("),nF=/\/+/;Tr.filter=(e,t={})=>(r,n,i)=>Tr(r,e,t);var Gi=(e,t={})=>{let r={};return Object.keys(e).forEach(n=>r[n]=e[n]),Object.keys(t).forEach(n=>r[n]=t[n]),r};Tr.defaults=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Tr;let t=Tr,r=(n,i,s)=>t(n,i,Gi(e,s));return r.Minimatch=class extends t.Minimatch{constructor(i,s){super(i,Gi(e,s))}},r.Minimatch.defaults=n=>t.defaults(Gi(e,n)).Minimatch,r.filter=(n,i)=>t.filter(n,Gi(e,i)),r.defaults=n=>t.defaults(Gi(e,n)),r.makeRe=(n,i)=>t.makeRe(n,Gi(e,i)),r.braceExpand=(n,i)=>t.braceExpand(n,Gi(e,i)),r.match=(n,i,s)=>t.match(n,i,Gi(e,s)),r};Tr.braceExpand=(e,t)=>sF(e,t);var sF=(e,t={})=>(mg(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Use(e)),Gse=1024*64,mg=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>Gse)throw new TypeError("pattern is too long")},cT=Symbol("subparse");Tr.makeRe=(e,t)=>new rc(e,t||{}).makeRe();Tr.match=(e,t,r={})=>{let n=new rc(t,r);return e=e.filter(i=>n.match(i)),n.options.nonull&&!e.length&&e.push(t),e};var Jse=e=>e.replace(/\\(.)/g,"$1"),Kse=e=>e.replace(/\\([^-\]])/g,"$1"),Yse=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Qse=e=>e.replace(/[[\]\\]/g,"\\$&"),rc=class{constructor(t,r){mg(t),r||(r={}),this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion!==void 0?r.maxGlobstarRecursion:200,this.set=[],this.pattern=t,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 t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate();let n=this.globSet=this.braceExpand();r.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,n),n=this.globParts=n.map(i=>i.split(nF)),this.debug(this.pattern,n),n=n.map((i,s,a)=>i.map(this.parse,this)),this.debug(this.pattern,n),n=n.filter(i=>i.indexOf(!1)===-1),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;let t=this.pattern,r=!1,n=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=t.slice(n)),this.negate=r}matchOne(t,r,n){return r.indexOf(er)!==-1?this._matchGlobstar(t,r,n,0,0):this._matchOne(t,r,n,0,0)}_matchGlobstar(t,r,n,i,s){let a=-1;for(let w=s;w<r.length;w++)if(r[w]===er){a=w;break}let o=-1;for(let w=r.length-1;w>=0;w--)if(r[w]===er){o=w;break}let c=r.slice(s,a),l=n?r.slice(a+1):r.slice(a+1,o),f=n?[]:r.slice(o+1);if(c.length){let w=t.slice(i,i+c.length);if(!this._matchOne(w,c,n,0,0))return!1;i+=c.length}let m=0;if(f.length){if(f.length+i>t.length)return!1;let w=t.length-f.length;if(this._matchOne(t,f,n,w,0))m=f.length;else{if(t[t.length-1]!==""||i+f.length===t.length||!this._matchOne(t,f,n,w-1,0))return!1;m=f.length+1}}if(!l.length){let w=!!m;for(let T=i;T<t.length-m;T++){let y=String(t[T]);if(w=!0,y==="."||y===".."||!this.options.dot&&y.charAt(0)===".")return!1}return n||w}let d=[[[],0]],g=d[0],v=0,b=[0];for(let w of l)w===er?(b.push(v),g=[[],0],d.push(g)):(g[0].push(w),v++);let _=d.length-1,k=t.length-m;for(let w of d)w[1]=k-(b[_--]+w[0].length);return!!this._matchGlobStarBodySections(t,d,i,0,n,0,!!m)}_matchGlobStarBodySections(t,r,n,i,s,a,o){let c=r[i];if(!c){for(let m=n;m<t.length;m++){o=!0;let d=t[m];if(d==="."||d===".."||!this.options.dot&&d.charAt(0)===".")return!1}return o}let[l,f]=c;for(;n<=f;){if(this._matchOne(t.slice(0,n+l.length),l,s,n,0)&&a<this.maxGlobstarRecursion){let g=this._matchGlobStarBodySections(t,r,n+l.length,i+1,s,a+1,o);if(g!==!1)return g}let d=t[n];if(d==="."||d===".."||!this.options.dot&&d.charAt(0)===".")return!1;n++}return s||null}_matchOne(t,r,n,i,s){let a,o,c,l;for(a=i,o=s,c=t.length,l=r.length;a<c&&o<l;a++,o++){this.debug("matchOne loop");let f=r[o],m=t[a];if(this.debug(r,f,m),f===!1||f===er)return!1;let d;if(typeof f=="string"?(d=m===f,this.debug("string match",f,m,d)):(d=m.match(f),this.debug("pattern match",f,m,d)),!d)return!1}if(a===c&&o===l)return!0;if(a===c)return n;if(o===l)return a===c-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return sF(this.pattern,this.options)}parse(t,r){mg(t);let n=this.options;if(t==="**")if(n.noglobstar)t="*";else return er;if(t==="")return"";let i="",s=!1,a=!1,o=[],c=[],l,f=!1,m=-1,d=-1,g,v,b,_=t.charAt(0)===".",k=n.dot||_,w=()=>_?"":k?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",T=P=>P.charAt(0)==="."?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",y=()=>{if(l){switch(l){case"*":i+=oT,s=!0;break;case"?":i+=lT,s=!0;break;default:i+="\\"+l;break}this.debug("clearStateChar %j %j",l,i),l=!1}};for(let P=0,q;P<t.length&&(q=t.charAt(P));P++){if(this.debug("%s %s %s %j",t,P,i,q),a){if(q==="/")return!1;rF[q]&&(i+="\\"),i+=q,a=!1;continue}switch(q){case"/":return!1;case"\\":if(f&&t.charAt(P+1)==="-"){i+=q;continue}y(),a=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",t,P,i,q),f){this.debug(" in class"),q==="!"&&P===d+1&&(q="^"),i+=q;continue}if(q==="*"&&l==="*")continue;this.debug("call clearStateChar %j",l),y(),l=q,n.noext&&y();continue;case"(":{if(f){i+="(";continue}if(!l){i+="\\(";continue}let B={type:l,start:P-1,reStart:i.length,open:tF[l].open,close:tF[l].close};this.debug(this.pattern," ",B),o.push(B),i+=B.open,B.start===0&&B.type!=="!"&&(_=!0,i+=T(t.slice(P+1))),this.debug("plType %j %j",l,i),l=!1;continue}case")":{let B=o[o.length-1];if(f||!B){i+="\\)";continue}o.pop(),y(),s=!0,v=B,i+=v.close,v.type==="!"&&c.push(Object.assign(v,{reEnd:i.length}));continue}case"|":{let B=o[o.length-1];if(f||!B){i+="\\|";continue}y(),i+="|",B.start===0&&B.type!=="!"&&(_=!0,i+=T(t.slice(P+1)));continue}case"[":if(y(),f){i+="\\"+q;continue}f=!0,d=P,m=i.length,i+=q;continue;case"]":if(P===d+1||!f){i+="\\"+q;continue}g=t.substring(d+1,P);try{RegExp("["+Qse(Kse(g))+"]"),i+=q}catch{i=i.substring(0,m)+"(?:$.)"}s=!0,f=!1;continue;default:y(),rF[q]&&!(q==="^"&&f)&&(i+="\\"),i+=q;break}}for(f&&(g=t.slice(d+1),b=this.parse(g,cT),i=i.substring(0,m)+"\\["+b[0],s=s||b[1]),v=o.pop();v;v=o.pop()){let P;P=i.slice(v.reStart+v.open.length),this.debug("setting tail",i,v),P=P.replace(/((?:\\{2}){0,64})(\\?)\|/g,(B,M,L)=>(L||(L="\\"),M+M+L+"|")),this.debug(`tail=%j
109
- %s`,P,P,v,i);let q=v.type==="*"?oT:v.type==="?"?lT:"\\"+v.type;s=!0,i=i.slice(0,v.reStart)+q+"\\("+P}y(),a&&(i+="\\\\");let A=Wse[i.charAt(0)];for(let P=c.length-1;P>-1;P--){let q=c[P],B=i.slice(0,q.reStart),M=i.slice(q.reStart,q.reEnd-8),L=i.slice(q.reEnd),C=i.slice(q.reEnd-8,q.reEnd)+L,$=B.split(")").length,V=B.split("(").length-$,I=L;for(let U=0;U<V;U++)I=I.replace(/\)[+*?]?/,"");L=I;let F=L===""&&r!==cT?"(?:$|\\/)":"";i=B+M+L+F+C}if(i!==""&&s&&(i="(?=.)"+i),A&&(i=w()+i),r===cT)return[i,s];if(n.nocase&&!s&&(s=t.toUpperCase()!==t.toLowerCase()),!s)return Jse(t);let O=n.nocase?"i":"";try{return Object.assign(new RegExp("^"+i+"$",O),{_glob:t,_src:i})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?oT:r.dot?Hse:zse,i=r.nocase?"i":"",s=t.map(a=>(a=a.map(o=>typeof o=="string"?Yse(o):o===er?er:o._src).reduce((o,c)=>(o[o.length-1]===er&&c===er||o.push(c),o),[]),a.forEach((o,c)=>{o!==er||a[c-1]===er||(c===0?a.length>1?a[c+1]="(?:\\/|"+n+"\\/)?"+a[c+1]:a[c]=n:c===a.length-1?a[c-1]+="(?:\\/|"+n+")?":(a[c-1]+="(?:\\/|\\/"+n+"\\/)"+a[c+1],a[c+1]=er))}),a.filter(o=>o!==er).join("/"))).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,i)}catch{this.regexp=!1}return this.regexp}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let n=this.options;uT.sep!=="/"&&(t=t.split(uT.sep).join("/")),t=t.split(nF),this.debug(this.pattern,"split",t);let i=this.set;this.debug(this.pattern,"set",i);let s;for(let a=t.length-1;a>=0&&(s=t[a],!s);a--);for(let a=0;a<i.length;a++){let o=i[a],c=t;if(n.matchBase&&o.length===1&&(c=[s]),this.matchOne(c,o,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return Tr.defaults(t).Minimatch}};Tr.Minimatch=rc});var aF=x((cxe,pT)=>{p();typeof Object.create=="function"?pT.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:pT.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var oF=x((lxe,hT)=>{p();try{if(dT=oe("util"),typeof dT.inherits!="function")throw"";hT.exports=dT.inherits}catch{hT.exports=aF()}var dT});var gT=x(Ji=>{p();Ji.setopts=nae;Ji.ownProp=cF;Ji.makeAbs=pl;Ji.finish=iae;Ji.mark=sae;Ji.isIgnored=lF;Ji.childrenIgnored=aae;function cF(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Xse=oe("fs"),ba=oe("path"),Zse=gg(),uF=oe("path").isAbsolute,mT=Zse.Minimatch;function eae(e,t){return e.localeCompare(t,"en")}function tae(e,t){e.ignore=t.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]),e.ignore.length&&(e.ignore=e.ignore.map(rae))}function rae(e){var t=null;if(e.slice(-3)==="/**"){var r=e.replace(/(\/\*\*)+$/,"");t=new mT(r,{dot:!0})}return{matcher:new mT(e,{dot:!0}),gmatcher:t}}function nae(e,t,r){if(r||(r={}),r.matchBase&&t.indexOf("/")===-1){if(r.noglobstar)throw new Error("base matching requires globstar");t="**/"+t}e.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,e.windowsPathsNoEscape&&(t=t.replace(/\\/g,"/")),e.silent=!!r.silent,e.pattern=t,e.strict=r.strict!==!1,e.realpath=!!r.realpath,e.realpathCache=r.realpathCache||Object.create(null),e.follow=!!r.follow,e.dot=!!r.dot,e.mark=!!r.mark,e.nodir=!!r.nodir,e.nodir&&(e.mark=!0),e.sync=!!r.sync,e.nounique=!!r.nounique,e.nonull=!!r.nonull,e.nosort=!!r.nosort,e.nocase=!!r.nocase,e.stat=!!r.stat,e.noprocess=!!r.noprocess,e.absolute=!!r.absolute,e.fs=r.fs||Xse,e.maxLength=r.maxLength||1/0,e.cache=r.cache||Object.create(null),e.statCache=r.statCache||Object.create(null),e.symlinks=r.symlinks||Object.create(null),tae(e,r),e.changedCwd=!1;var n=process.cwd();cF(r,"cwd")?(e.cwd=ba.resolve(r.cwd),e.changedCwd=e.cwd!==n):e.cwd=ba.resolve(n),e.root=r.root||ba.resolve(e.cwd,"/"),e.root=ba.resolve(e.root),e.cwdAbs=uF(e.cwd)?e.cwd:pl(e,e.cwd),e.nomount=!!r.nomount,process.platform==="win32"&&(e.root=e.root.replace(/\\/g,"/"),e.cwd=e.cwd.replace(/\\/g,"/"),e.cwdAbs=e.cwdAbs.replace(/\\/g,"/")),r.nonegate=!0,r.nocomment=!0,e.minimatch=new mT(t,r),e.options=e.minimatch.options}function iae(e){for(var t=e.nounique,r=t?[]:Object.create(null),n=0,i=e.matches.length;n<i;n++){var s=e.matches[n];if(!s||Object.keys(s).length===0){if(e.nonull){var a=e.minimatch.globSet[n];t?r.push(a):r[a]=!0}}else{var o=Object.keys(s);t?r.push.apply(r,o):o.forEach(function(c){r[c]=!0})}}if(t||(r=Object.keys(r)),e.nosort||(r=r.sort(eae)),e.mark){for(var n=0;n<r.length;n++)r[n]=e._mark(r[n]);e.nodir&&(r=r.filter(function(c){var l=!/\/$/.test(c),f=e.cache[c]||e.cache[pl(e,c)];return l&&f&&(l=f!=="DIR"&&!Array.isArray(f)),l}))}e.ignore.length&&(r=r.filter(function(c){return!lF(e,c)})),e.found=r}function sae(e,t){var r=pl(e,t),n=e.cache[r],i=t;if(n){var s=n==="DIR"||Array.isArray(n),a=t.slice(-1)==="/";if(s&&!a?i+="/":!s&&a&&(i=i.slice(0,-1)),i!==t){var o=pl(e,i);e.statCache[o]=e.statCache[r],e.cache[o]=e.cache[r]}}return i}function pl(e,t){var r=t;return t.charAt(0)==="/"?r=ba.join(e.root,t):uF(t)||t===""?r=t:e.changedCwd?r=ba.resolve(e.cwd,t):r=ba.resolve(t),process.platform==="win32"&&(r=r.replace(/\\/g,"/")),r}function lF(e,t){return e.ignore.length?e.ignore.some(function(r){return r.matcher.match(t)||!!(r.gmatcher&&r.gmatcher.match(t))}):!1}function aae(e,t){return e.ignore.length?e.ignore.some(function(r){return!!(r.gmatcher&&r.gmatcher.match(t))}):!1}});var mF=x((yxe,hF)=>{p();hF.exports=dF;dF.GlobSync=_t;var oae=aT(),fF=gg(),hxe=fF.Minimatch,mxe=_g().Glob,gxe=oe("util"),yT=oe("path"),pF=oe("assert"),yg=oe("path").isAbsolute,ka=gT(),cae=ka.setopts,_T=ka.ownProp,uae=ka.childrenIgnored,lae=ka.isIgnored;function dF(e,t){if(typeof t=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
110
- See: https://github.com/isaacs/node-glob/issues/167`);return new _t(e,t).found}function _t(e,t){if(!e)throw new Error("must provide pattern");if(typeof t=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
111
- See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof _t))return new _t(e,t);if(cae(this,e,t),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;n<r;n++)this._process(this.minimatch.set[n],n,!1);this._finish()}_t.prototype._finish=function(){if(pF.ok(this instanceof _t),this.realpath){var e=this;this.matches.forEach(function(t,r){var n=e.matches[r]=Object.create(null);for(var i in t)try{i=e._makeAbs(i);var s=oae.realpathSync(i,e.realpathCache);n[s]=!0}catch(a){if(a.syscall==="stat")n[e._makeAbs(i)]=!0;else throw a}})}ka.finish(this)};_t.prototype._process=function(e,t,r){pF.ok(this instanceof _t);for(var n=0;typeof e[n]=="string";)n++;var i;switch(n){case e.length:this._processSimple(e.join("/"),t);return;case 0:i=null;break;default:i=e.slice(0,n).join("/");break}var s=e.slice(n),a;i===null?a=".":((yg(i)||yg(e.map(function(l){return typeof l=="string"?l:"[*]"}).join("/")))&&(!i||!yg(i))&&(i="/"+i),a=i);var o=this._makeAbs(a);if(!uae(this,a)){var c=s[0]===fF.GLOBSTAR;c?this._processGlobStar(i,a,o,s,t,r):this._processReaddir(i,a,o,s,t,r)}};_t.prototype._processReaddir=function(e,t,r,n,i,s){var a=this._readdir(r,s);if(a){for(var o=n[0],c=!!this.minimatch.negate,l=o._glob,f=this.dot||l.charAt(0)===".",m=[],d=0;d<a.length;d++){var g=a[d];if(g.charAt(0)!=="."||f){var v;c&&!e?v=!g.match(o):v=g.match(o),v&&m.push(g)}}var b=m.length;if(b!==0){if(n.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var d=0;d<b;d++){var g=m[d];e&&(e.slice(-1)!=="/"?g=e+"/"+g:g=e+g),g.charAt(0)==="/"&&!this.nomount&&(g=yT.join(this.root,g)),this._emitMatch(i,g)}return}n.shift();for(var d=0;d<b;d++){var g=m[d],_;e?_=[e,g]:_=[g],this._process(_.concat(n),i,s)}}}};_t.prototype._emitMatch=function(e,t){if(!lae(this,t)){var r=this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=r),!this.matches[e][t]){if(this.nodir){var n=this.cache[r];if(n==="DIR"||Array.isArray(n))return}this.matches[e][t]=!0,this.stat&&this._stat(t)}}};_t.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,!1);var t,r,n;try{r=this.fs.lstatSync(e)}catch(s){if(s.code==="ENOENT")return null}var i=r&&r.isSymbolicLink();return this.symlinks[e]=i,!i&&r&&!r.isDirectory()?this.cache[e]="FILE":t=this._readdir(e,!1),t};_t.prototype._readdir=function(e,t){var r;if(t&&!_T(this.symlinks,e))return this._readdirInGlobStar(e);if(_T(this.cache,e)){var n=this.cache[e];if(!n||n==="FILE")return null;if(Array.isArray(n))return n}try{return this._readdirEntries(e,this.fs.readdirSync(e))}catch(i){return this._readdirError(e,i),null}};_t.prototype._readdirEntries=function(e,t){if(!this.mark&&!this.stat)for(var r=0;r<t.length;r++){var n=t[r];e==="/"?n=e+n:n=e+"/"+n,this.cache[n]=!0}return this.cache[e]=t,t};_t.prototype._readdirError=function(e,t){switch(t.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(e);if(this.cache[r]="FILE",r===this.cwdAbs){var n=new Error(t.code+" invalid cwd "+this.cwd);throw n.path=this.cwd,n.code=t.code,n}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:if(this.cache[this._makeAbs(e)]=!1,this.strict)throw t;this.silent||console.error("glob error",t);break}};_t.prototype._processGlobStar=function(e,t,r,n,i,s){var a=this._readdir(r,s);if(a){var o=n.slice(1),c=e?[e]:[],l=c.concat(o);this._process(l,i,!1);var f=a.length,m=this.symlinks[r];if(!(m&&s))for(var d=0;d<f;d++){var g=a[d];if(!(g.charAt(0)==="."&&!this.dot)){var v=c.concat(a[d],o);this._process(v,i,!0);var b=c.concat(a[d],n);this._process(b,i,!0)}}}};_t.prototype._processSimple=function(e,t){var r=this._stat(e);if(this.matches[t]||(this.matches[t]=Object.create(null)),!!r){if(e&&yg(e)&&!this.nomount){var n=/[\/\\]$/.test(e);e.charAt(0)==="/"?e=yT.join(this.root,e):(e=yT.resolve(this.root,e),n&&(e+="/"))}process.platform==="win32"&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e)}};_t.prototype._stat=function(e){var t=this._makeAbs(e),r=e.slice(-1)==="/";if(e.length>this.maxLength)return!1;if(!this.stat&&_T(this.cache,t)){var a=this.cache[t];if(Array.isArray(a)&&(a="DIR"),!r||a==="DIR")return a;if(r&&a==="FILE")return!1}var n,i=this.statCache[t];if(!i){var s;try{s=this.fs.lstatSync(t)}catch(o){if(o&&(o.code==="ENOENT"||o.code==="ENOTDIR"))return this.statCache[t]=!1,!1}if(s&&s.isSymbolicLink())try{i=this.fs.statSync(t)}catch{i=s}else i=s}this.statCache[t]=i;var a=!0;return i&&(a=i.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||a,r&&a==="FILE"?!1:a};_t.prototype._mark=function(e){return ka.mark(this,e)};_t.prototype._makeAbs=function(e){return ka.makeAbs(this,e)}});var yF=x((vxe,gF)=>{p();var fae=v$(),dl=Object.create(null),pae=ex();gF.exports=fae(dae);function dae(e,t){return dl[e]?(dl[e].push(t),null):(dl[e]=[t],hae(e))}function hae(e){return pae(function t(){var r=dl[e],n=r.length,i=mae(arguments);try{for(var s=0;s<n;s++)r[s].apply(null,i)}finally{r.length>n?(r.splice(0,n),process.nextTick(function(){t.apply(null,i)})):delete dl[e]}})}function mae(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n]=e[n];return r}});var _g=x((Txe,vF)=>{p();vF.exports=Sa;var gae=aT(),_F=gg(),kxe=_F.Minimatch,yae=oF(),_ae=oe("events").EventEmitter,vT=oe("path"),bT=oe("assert"),hl=oe("path").isAbsolute,ST=mF(),Ta=gT(),vae=Ta.setopts,kT=Ta.ownProp,TT=yF(),Sxe=oe("util"),bae=Ta.childrenIgnored,kae=Ta.isIgnored,Sae=ex();function Sa(e,t,r){if(typeof t=="function"&&(r=t,t={}),t||(t={}),t.sync){if(r)throw new TypeError("callback provided to sync glob");return ST(e,t)}return new Ne(e,t,r)}Sa.sync=ST;var Tae=Sa.GlobSync=ST.GlobSync;Sa.glob=Sa;function wae(e,t){if(t===null||typeof t!="object")return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}Sa.hasMagic=function(e,t){var r=wae({},t);r.noprocess=!0;var n=new Ne(e,r),i=n.minimatch.set;if(!e)return!1;if(i.length>1)return!0;for(var s=0;s<i[0].length;s++)if(typeof i[0][s]!="string")return!0;return!1};Sa.Glob=Ne;yae(Ne,_ae);function Ne(e,t,r){if(typeof t=="function"&&(r=t,t=null),t&&t.sync){if(r)throw new TypeError("callback provided to sync glob");return new Tae(e,t)}if(!(this instanceof Ne))return new Ne(e,t,r);vae(this,e,t),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=new Array(n),typeof r=="function"&&(r=Sae(r),this.on("error",r),this.on("end",function(c){r(null,c)}));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(n===0)return o();for(var s=!0,a=0;a<n;a++)this._process(this.minimatch.set[a],a,!1,o);s=!1;function o(){--i._processing,i._processing<=0&&(s?process.nextTick(function(){i._finish()}):i._finish())}}Ne.prototype._finish=function(){if(bT(this instanceof Ne),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();Ta.finish(this),this.emit("end",this.found)}};Ne.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var e=this.matches.length;if(e===0)return this._finish();for(var t=this,r=0;r<this.matches.length;r++)this._realpathSet(r,n);function n(){--e===0&&t._finish()}};Ne.prototype._realpathSet=function(e,t){var r=this.matches[e];if(!r)return t();var n=Object.keys(r),i=this,s=n.length;if(s===0)return t();var a=this.matches[e]=Object.create(null);n.forEach(function(o,c){o=i._makeAbs(o),gae.realpath(o,i.realpathCache,function(l,f){l?l.syscall==="stat"?a[o]=!0:i.emit("error",l):a[f]=!0,--s===0&&(i.matches[e]=a,t())})})};Ne.prototype._mark=function(e){return Ta.mark(this,e)};Ne.prototype._makeAbs=function(e){return Ta.makeAbs(this,e)};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 e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var t=0;t<e.length;t++){var r=e[t];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(var t=0;t<n.length;t++){var i=n[t];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}};Ne.prototype._process=function(e,t,r,n){if(bT(this instanceof Ne),bT(typeof n=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([e,t,r,n]);return}for(var i=0;typeof e[i]=="string";)i++;var s;switch(i){case e.length:this._processSimple(e.join("/"),t,n);return;case 0:s=null;break;default:s=e.slice(0,i).join("/");break}var a=e.slice(i),o;s===null?o=".":((hl(s)||hl(e.map(function(f){return typeof f=="string"?f:"[*]"}).join("/")))&&(!s||!hl(s))&&(s="/"+s),o=s);var c=this._makeAbs(o);if(bae(this,o))return n();var l=a[0]===_F.GLOBSTAR;l?this._processGlobStar(s,o,c,a,t,r,n):this._processReaddir(s,o,c,a,t,r,n)}};Ne.prototype._processReaddir=function(e,t,r,n,i,s,a){var o=this;this._readdir(r,s,function(c,l){return o._processReaddir2(e,t,r,n,i,s,l,a)})};Ne.prototype._processReaddir2=function(e,t,r,n,i,s,a,o){if(!a)return o();for(var c=n[0],l=!!this.minimatch.negate,f=c._glob,m=this.dot||f.charAt(0)===".",d=[],g=0;g<a.length;g++){var v=a[g];if(v.charAt(0)!=="."||m){var b;l&&!e?b=!v.match(c):b=v.match(c),b&&d.push(v)}}var _=d.length;if(_===0)return o();if(n.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var g=0;g<_;g++){var v=d[g];e&&(e!=="/"?v=e+"/"+v:v=e+v),v.charAt(0)==="/"&&!this.nomount&&(v=vT.join(this.root,v)),this._emitMatch(i,v)}return o()}n.shift();for(var g=0;g<_;g++){var v=d[g],k;e&&(e!=="/"?v=e+"/"+v:v=e+v),this._process([v].concat(n),i,s,o)}o()};Ne.prototype._emitMatch=function(e,t){if(!this.aborted&&!kae(this,t)){if(this.paused){this._emitQueue.push([e,t]);return}var r=hl(t)?t:this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=r),!this.matches[e][t]){if(this.nodir){var n=this.cache[r];if(n==="DIR"||Array.isArray(n))return}this.matches[e][t]=!0;var i=this.statCache[r];i&&this.emit("stat",t,i),this.emit("match",t)}}};Ne.prototype._readdirInGlobStar=function(e,t){if(this.aborted)return;if(this.follow)return this._readdir(e,!1,t);var r="lstat\0"+e,n=this,i=TT(r,s);i&&n.fs.lstat(e,i);function s(a,o){if(a&&a.code==="ENOENT")return t();var c=o&&o.isSymbolicLink();n.symlinks[e]=c,!c&&o&&!o.isDirectory()?(n.cache[e]="FILE",t()):n._readdir(e,!1,t)}};Ne.prototype._readdir=function(e,t,r){if(!this.aborted&&(r=TT("readdir\0"+e+"\0"+t,r),!!r)){if(t&&!kT(this.symlinks,e))return this._readdirInGlobStar(e,r);if(kT(this.cache,e)){var n=this.cache[e];if(!n||n==="FILE")return r();if(Array.isArray(n))return r(null,n)}var i=this;i.fs.readdir(e,xae(this,e,r))}};function xae(e,t,r){return function(n,i){n?e._readdirError(t,n,r):e._readdirEntries(t,i,r)}}Ne.prototype._readdirEntries=function(e,t,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var n=0;n<t.length;n++){var i=t[n];e==="/"?i=e+i:i=e+"/"+i,this.cache[i]=!0}return this.cache[e]=t,r(null,t)}};Ne.prototype._readdirError=function(e,t,r){if(!this.aborted){switch(t.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(e);if(this.cache[n]="FILE",n===this.cwdAbs){var i=new Error(t.code+" invalid cwd "+this.cwd);i.path=this.cwd,i.code=t.code,this.emit("error",i),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:this.cache[this._makeAbs(e)]=!1,this.strict&&(this.emit("error",t),this.abort()),this.silent||console.error("glob error",t);break}return r()}};Ne.prototype._processGlobStar=function(e,t,r,n,i,s,a){var o=this;this._readdir(r,s,function(c,l){o._processGlobStar2(e,t,r,n,i,s,l,a)})};Ne.prototype._processGlobStar2=function(e,t,r,n,i,s,a,o){if(!a)return o();var c=n.slice(1),l=e?[e]:[],f=l.concat(c);this._process(f,i,!1,o);var m=this.symlinks[r],d=a.length;if(m&&s)return o();for(var g=0;g<d;g++){var v=a[g];if(!(v.charAt(0)==="."&&!this.dot)){var b=l.concat(a[g],c);this._process(b,i,!0,o);var _=l.concat(a[g],n);this._process(_,i,!0,o)}}o()};Ne.prototype._processSimple=function(e,t,r){var n=this;this._stat(e,function(i,s){n._processSimple2(e,t,i,s,r)})};Ne.prototype._processSimple2=function(e,t,r,n,i){if(this.matches[t]||(this.matches[t]=Object.create(null)),!n)return i();if(e&&hl(e)&&!this.nomount){var s=/[\/\\]$/.test(e);e.charAt(0)==="/"?e=vT.join(this.root,e):(e=vT.resolve(this.root,e),s&&(e+="/"))}process.platform==="win32"&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e),i()};Ne.prototype._stat=function(e,t){var r=this._makeAbs(e),n=e.slice(-1)==="/";if(e.length>this.maxLength)return t();if(!this.stat&&kT(this.cache,r)){var i=this.cache[r];if(Array.isArray(i)&&(i="DIR"),!n||i==="DIR")return t(null,i);if(n&&i==="FILE")return t()}var s,a=this.statCache[r];if(a!==void 0){if(a===!1)return t(null,a);var o=a.isDirectory()?"DIR":"FILE";return n&&o==="FILE"?t():t(null,o,a)}var c=this,l=TT("stat\0"+r,f);l&&c.fs.lstat(r,l);function f(m,d){if(d&&d.isSymbolicLink())return c.fs.stat(r,function(g,v){g?c._stat2(e,r,null,d,t):c._stat2(e,r,g,v,t)});c._stat2(e,r,m,d,t)}};Ne.prototype._stat2=function(e,t,r,n,i){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR"))return this.statCache[t]=!1,i();var s=e.slice(-1)==="/";if(this.statCache[t]=n,t.slice(-1)==="/"&&n&&!n.isDirectory())return i(null,!1,n);var a=!0;return n&&(a=n.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||a,s&&a==="FILE"?i():i(null,a,n)}});var bF=x(nc=>{"use strict";p();Object.defineProperty(nc,"__esModule",{value:!0});nc.saveToDiskFixApplicator=void 0;nc.autofix=Oae;var Eae=oe("fs/promises"),wT=Zt(),Aae=async(e,t)=>{let r=(0,wT.applyFixToString)(e.source,t);await(0,Eae.writeFile)(wT.path.fsPath(e.uri),r,"utf8")};nc.saveToDiskFixApplicator=Aae;async function Oae(e,t){await(0,wT.autofix)(e,t,nc.saveToDiskFixApplicator)}});var xT=x(ml=>{"use strict";p();var Pae=ml&&ml.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ml,"__esModule",{value:!0});ml.fileExists=qae;var Nae=Pae(oe("node:fs/promises"));async function qae(e){try{return await Nae.default.stat(e),!0}catch{return!1}}});var SF=x(ic=>{"use strict";p();var kF=ic&&ic.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ic,"__esModule",{value:!0});ic.thisNodeModuleRoot=void 0;var Pxe=kF(oe("node:path")),Lae=kF(oe("node:os")),Cae=()=>Lae.default.tmpdir();ic.thisNodeModuleRoot=Cae});var xF=x(sc=>{"use strict";p();var Iae=sc&&sc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(sc,"__esModule",{value:!0});sc.loadThirdPartyChecks=jae;sc.findThirdPartyChecks=Fae;var Mae=Iae(_g()),Rae=oe("node:util"),Dae=(0,Rae.promisify)(Mae.default);function jae(e=[]){let t=new Set;for(let r of e)try{let i=oe(r).checks;if(!Array.isArray(i))throw new Error(`Expected the 'checks' export to be an array and got ${typeof i}`);for(let s of i)Bae(s)?t.add(s):console.error(`Expected ${s} to be a CheckDefinition, but it looks like it isn't`)}catch(n){console.error(`Error loading ${r}, ignoring it.
112
- ${n}`)}return[...t]}async function Fae(e){let t=[TF(e.replace(/\\/g,"/"),"/node_modules/theme-check-*/"),TF(e.replace(/\\/g,"/"),"/node_modules/@*/theme-check-*/")];return(await Promise.all(t.map(n=>Dae(n)))).flat().filter(n=>!/\@shopify\/theme-check-(node|common|browser|docs-updater)/.test(n)&&!/theme-check-vscode/.test(n))}function TF(...e){return e.flatMap(t=>t.replace(/\\/g,"/").replace(/\/+$/,"")).join("/")}function wF(e){return e!==null&&typeof e=="object"}function Bae(e){return wF(e)&&"meta"in e&&"create"in e&&wF(e.meta)&&"code"in e.meta}});var AF=x(yl=>{"use strict";p();var Vae=yl&&yl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yl,"__esModule",{value:!0});yl.loadConfigDescription=zae;var AT=Zt(),gl=Vae(oe("node:path")),EF=xT(),$ae=SF(),ET=xF(),Uae=Su(),Hae=e=>e.flat();async function zae(e,t){let r=await Xae(t),n=await Promise.all([(0,ET.findThirdPartyChecks)((0,$ae.thisNodeModuleRoot)()),(0,ET.findThirdPartyChecks)(r)]).then(Hae),i=(0,ET.loadThirdPartyChecks)([...e.require,...n]),s=AT.allChecks.concat(i).filter(Gae(e)),a=Uae.URI.file(t);return{settings:Kae(e.checkSettings,s),context:e.context??"theme",checks:s,ignore:e.ignore,rootUri:Wae(a,e.root)}}function Wae(e,t){if(t===void 0)return AT.path.normalize(e);if(gl.default.isAbsolute(t))throw new Error('the "root" property can only be relative');return AT.path.resolve(e,t)}var Gae=e=>t=>{let r=e.checkSettings[t.meta.code]??Jae(e,t);return r?r.enabled:!1};function Jae(e,t){if(!t.meta.aliases)return;let r=t.meta.aliases.find(n=>e.checkSettings[n]);if(r)return e.checkSettings[r]}function Kae(e,t){return Object.fromEntries(Object.entries(e).map(([r,n])=>[Yae(r,t),n]))}function Yae(e,t){return t.find(n=>n.meta.code===e||n.meta.aliases?.find(i=>i===e))?.meta.code}async function Qae(e){if(gl.default.dirname(e)===e)return!0;let[t,r]=await Promise.all([(0,EF.fileExists)(gl.default.join(e,"node_modules")),(0,EF.fileExists)(gl.default.join(e,".git"))]);return t||r}async function Xae(e){let t=e;for(;!await Qae(t);)t=gl.default.dirname(t);return t}});var Se=x(Bt=>{"use strict";p();var OT=Symbol.for("yaml.alias"),OF=Symbol.for("yaml.document"),vg=Symbol.for("yaml.map"),PF=Symbol.for("yaml.pair"),PT=Symbol.for("yaml.scalar"),bg=Symbol.for("yaml.seq"),fi=Symbol.for("yaml.node.type"),Zae=e=>!!e&&typeof e=="object"&&e[fi]===OT,eoe=e=>!!e&&typeof e=="object"&&e[fi]===OF,toe=e=>!!e&&typeof e=="object"&&e[fi]===vg,roe=e=>!!e&&typeof e=="object"&&e[fi]===PF,NF=e=>!!e&&typeof e=="object"&&e[fi]===PT,noe=e=>!!e&&typeof e=="object"&&e[fi]===bg;function qF(e){if(e&&typeof e=="object")switch(e[fi]){case vg:case bg:return!0}return!1}function ioe(e){if(e&&typeof e=="object")switch(e[fi]){case OT:case vg:case PT:case bg:return!0}return!1}var soe=e=>(NF(e)||qF(e))&&!!e.anchor;Bt.ALIAS=OT;Bt.DOC=OF;Bt.MAP=vg;Bt.NODE_TYPE=fi;Bt.PAIR=PF;Bt.SCALAR=PT;Bt.SEQ=bg;Bt.hasAnchor=soe;Bt.isAlias=Zae;Bt.isCollection=qF;Bt.isDocument=eoe;Bt.isMap=toe;Bt.isNode=ioe;Bt.isPair=roe;Bt.isScalar=NF;Bt.isSeq=noe});var _l=x(NT=>{"use strict";p();var vt=Se(),or=Symbol("break visit"),LF=Symbol("skip children"),Rn=Symbol("remove node");function kg(e,t){let r=CF(t);vt.isDocument(e)?ac(null,e.contents,r,Object.freeze([e]))===Rn&&(e.contents=null):ac(null,e,r,Object.freeze([]))}kg.BREAK=or;kg.SKIP=LF;kg.REMOVE=Rn;function ac(e,t,r,n){let i=IF(e,t,r,n);if(vt.isNode(i)||vt.isPair(i))return MF(e,n,i),ac(e,i,r,n);if(typeof i!="symbol"){if(vt.isCollection(t)){n=Object.freeze(n.concat(t));for(let s=0;s<t.items.length;++s){let a=ac(s,t.items[s],r,n);if(typeof a=="number")s=a-1;else{if(a===or)return or;a===Rn&&(t.items.splice(s,1),s-=1)}}}else if(vt.isPair(t)){n=Object.freeze(n.concat(t));let s=ac("key",t.key,r,n);if(s===or)return or;s===Rn&&(t.key=null);let a=ac("value",t.value,r,n);if(a===or)return or;a===Rn&&(t.value=null)}}return i}async function Sg(e,t){let r=CF(t);vt.isDocument(e)?await oc(null,e.contents,r,Object.freeze([e]))===Rn&&(e.contents=null):await oc(null,e,r,Object.freeze([]))}Sg.BREAK=or;Sg.SKIP=LF;Sg.REMOVE=Rn;async function oc(e,t,r,n){let i=await IF(e,t,r,n);if(vt.isNode(i)||vt.isPair(i))return MF(e,n,i),oc(e,i,r,n);if(typeof i!="symbol"){if(vt.isCollection(t)){n=Object.freeze(n.concat(t));for(let s=0;s<t.items.length;++s){let a=await oc(s,t.items[s],r,n);if(typeof a=="number")s=a-1;else{if(a===or)return or;a===Rn&&(t.items.splice(s,1),s-=1)}}}else if(vt.isPair(t)){n=Object.freeze(n.concat(t));let s=await oc("key",t.key,r,n);if(s===or)return or;s===Rn&&(t.key=null);let a=await oc("value",t.value,r,n);if(a===or)return or;a===Rn&&(t.value=null)}}return i}function CF(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function IF(e,t,r,n){if(typeof r=="function")return r(e,t,n);if(vt.isMap(t))return r.Map?.(e,t,n);if(vt.isSeq(t))return r.Seq?.(e,t,n);if(vt.isPair(t))return r.Pair?.(e,t,n);if(vt.isScalar(t))return r.Scalar?.(e,t,n);if(vt.isAlias(t))return r.Alias?.(e,t,n)}function MF(e,t,r){let n=t[t.length-1];if(vt.isCollection(n))n.items[e]=r;else if(vt.isPair(n))e==="key"?n.key=r:n.value=r;else if(vt.isDocument(n))n.contents=r;else{let i=vt.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}NT.visit=kg;NT.visitAsync=Sg});var qT=x(DF=>{"use strict";p();var RF=Se(),aoe=_l(),ooe={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},coe=e=>e.replace(/[!,[\]{}]/g,t=>ooe[t]),vl=class e{constructor(t,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,r)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,r){this.atNextDocument&&(this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1);let n=t.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[s,a]=n;return this.tags[s]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[s]=n;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 ${i}`,!0),!1}}tagName(t,r){if(t==="!")return"!";if(t[0]!=="!")return r(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let a=t.slice(2,-1);return a==="!"||a==="!!"?(r(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&r("Verbatim tags must end with a >"),a)}let[,n,i]=t.match(/^(.*!)([^!]*)$/s);i||r(`The ${t} tag has no suffix`);let s=this.tags[n];if(s)try{return s+decodeURIComponent(i)}catch(a){return r(String(a)),null}return n==="!"?t:(r(`Could not resolve tag: ${t}`),null)}tagString(t){for(let[r,n]of Object.entries(this.tags))if(t.startsWith(n))return r+coe(t.substring(n.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(t&&n.length>0&&RF.isNode(t.contents)){let s={};aoe.visit(t.contents,(a,o)=>{RF.isNode(o)&&o.tag&&(s[o.tag]=!0)}),i=Object.keys(s)}else i=[];for(let[s,a]of n)s==="!!"&&a==="tag:yaml.org,2002:"||(!t||i.some(o=>o.startsWith(a)))&&r.push(`%TAG ${s} ${a}`);return r.join(`
113
- `)}};vl.defaultYaml={explicit:!1,version:"1.2"};vl.defaultTags={"!!":"tag:yaml.org,2002:"};DF.Directives=vl});var Tg=x(bl=>{"use strict";p();var jF=Se(),uoe=_l();function loe(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(r)}return!0}function FF(e){let t=new Set;return uoe.visit(e,{Value(r,n){n.anchor&&t.add(n.anchor)}}),t}function BF(e,t){for(let r=1;;++r){let n=`${e}${r}`;if(!t.has(n))return n}}function foe(e,t){let r=[],n=new Map,i=null;return{onAnchor:s=>{r.push(s),i??(i=FF(e));let a=BF(t,i);return i.add(a),a},setAnchors:()=>{for(let s of r){let a=n.get(s);if(typeof a=="object"&&a.anchor&&(jF.isScalar(a.node)||jF.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:n}}bl.anchorIsValid=loe;bl.anchorNames=FF;bl.createNodeAnchors=foe;bl.findNewAnchor=BF});var LT=x(VF=>{"use strict";p();function kl(e,t,r,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,s=n.length;i<s;++i){let a=n[i],o=kl(e,n,String(i),a);o===void 0?delete n[i]:o!==a&&(n[i]=o)}else if(n instanceof Map)for(let i of Array.from(n.keys())){let s=n.get(i),a=kl(e,n,i,s);a===void 0?n.delete(i):a!==s&&n.set(i,a)}else if(n instanceof Set)for(let i of Array.from(n)){let s=kl(e,n,i,i);s===void 0?n.delete(i):s!==i&&(n.delete(i),n.add(s))}else for(let[i,s]of Object.entries(n)){let a=kl(e,n,i,s);a===void 0?delete n[i]:a!==s&&(n[i]=a)}return e.call(t,r,n)}VF.applyReviver=kl});var Ki=x(UF=>{"use strict";p();var poe=Se();function $F(e,t,r){if(Array.isArray(e))return e.map((n,i)=>$F(n,String(i),r));if(e&&typeof e.toJSON=="function"){if(!r||!poe.hasAnchor(e))return e.toJSON(t,r);let n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=s=>{n.res=s,delete r.onCreate};let i=e.toJSON(t,r);return r.onCreate&&r.onCreate(i),i}return typeof e=="bigint"&&!r?.keep?Number(e):e}UF.toJS=$F});var wg=x(zF=>{"use strict";p();var doe=LT(),HF=Se(),hoe=Ki(),CT=class{constructor(t){Object.defineProperty(this,HF.NODE_TYPE,{value:t})}clone(){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:s}={}){if(!HF.isDocument(t))throw new TypeError("A document argument is required");let a={anchors:new Map,doc:t,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},o=hoe.toJS(this,"",a);if(typeof i=="function")for(let{count:c,res:l}of a.anchors.values())i(l,c);return typeof s=="function"?doe.applyReviver(s,{"":o},"",o):o}};zF.NodeBase=CT});var Sl=x(WF=>{"use strict";p();var moe=Tg(),goe=_l(),cc=Se(),yoe=wg(),_oe=Ki(),IT=class extends yoe.NodeBase{constructor(t){super(cc.ALIAS),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,r){if(r?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let n;r?.aliasResolveCache?n=r.aliasResolveCache:(n=[],goe.visit(t,{Node:(s,a)=>{(cc.isAlias(a)||cc.hasAnchor(a))&&n.push(a)}}),r&&(r.aliasResolveCache=n));let i;for(let s of n){if(s===this)break;s.anchor===this.source&&(i=s)}return i}toJSON(t,r){if(!r)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:s}=r,a=this.resolve(i,r);if(!a){let c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let o=n.get(a);if(o||(_oe.toJS(a,null,r),o=n.get(a)),o?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(s>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=xg(i,a,n)),o.count*o.aliasCount>s)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return o.res}toString(t,r,n){let i=`*${this.source}`;if(t){if(moe.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){let s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(t.implicitKey)return`${i} `}return i}};function xg(e,t,r){if(cc.isAlias(t)){let n=t.resolve(e),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}else if(cc.isCollection(t)){let n=0;for(let i of t.items){let s=xg(e,i,r);s>n&&(n=s)}return n}else if(cc.isPair(t)){let n=xg(e,t.key,r),i=xg(e,t.value,r);return Math.max(n,i)}return 1}WF.Alias=IT});var mt=x(MT=>{"use strict";p();var voe=Se(),boe=wg(),koe=Ki(),Soe=e=>!e||typeof e!="function"&&typeof e!="object",Yi=class extends boe.NodeBase{constructor(t){super(voe.SCALAR),this.value=t}toJSON(t,r){return r?.keep?this.value:koe.toJS(this.value,t,r)}toString(){return String(this.value)}};Yi.BLOCK_FOLDED="BLOCK_FOLDED";Yi.BLOCK_LITERAL="BLOCK_LITERAL";Yi.PLAIN="PLAIN";Yi.QUOTE_DOUBLE="QUOTE_DOUBLE";Yi.QUOTE_SINGLE="QUOTE_SINGLE";MT.Scalar=Yi;MT.isScalarValue=Soe});var Tl=x(JF=>{"use strict";p();var Toe=Sl(),wa=Se(),GF=mt(),woe="tag:yaml.org,2002:";function xoe(e,t,r){if(t){let n=r.filter(s=>s.tag===t),i=n.find(s=>!s.format)??n[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return r.find(n=>n.identify?.(e)&&!n.format)}function Eoe(e,t,r){if(wa.isDocument(e)&&(e=e.contents),wa.isNode(e))return e;if(wa.isPair(e)){let m=r.schema[wa.MAP].createNode?.(r.schema,null,r);return m.items.push(e),m}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:s,schema:a,sourceObjects:o}=r,c;if(n&&e&&typeof e=="object"){if(c=o.get(e),c)return c.anchor??(c.anchor=i(e)),new Toe.Alias(c.anchor);c={anchor:null,node:null},o.set(e,c)}t?.startsWith("!!")&&(t=woe+t.slice(2));let l=xoe(e,t,a.tags);if(!l){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let m=new GF.Scalar(e);return c&&(c.node=m),m}l=e instanceof Map?a[wa.MAP]:Symbol.iterator in Object(e)?a[wa.SEQ]:a[wa.MAP]}s&&(s(l),delete r.onTagObj);let f=l?.createNode?l.createNode(r.schema,e,r):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(r.schema,e,r):new GF.Scalar(e);return t?f.tag=t:l.default||(f.tag=l.tag),c&&(c.node=f),f}JF.createNode=Eoe});var Ag=x(Eg=>{"use strict";p();var Aoe=Tl(),Dn=Se(),Ooe=wg();function RT(e,t,r){let n=r;for(let i=t.length-1;i>=0;--i){let s=t[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let a=[];a[s]=n,n=a}else n=new Map([[s,n]])}return Aoe.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var KF=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,DT=class extends Ooe.NodeBase{constructor(t,r){super(t),Object.defineProperty(this,"schema",{value:r,configurable:!0,enumerable:!1,writable:!0})}clone(t){let r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(r.schema=t),r.items=r.items.map(n=>Dn.isNode(n)||Dn.isPair(n)?n.clone(t):n),this.range&&(r.range=this.range.slice()),r}addIn(t,r){if(KF(t))this.add(r);else{let[n,...i]=t,s=this.get(n,!0);if(Dn.isCollection(s))s.addIn(i,r);else if(s===void 0&&this.schema)this.set(n,RT(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(t){let[r,...n]=t;if(n.length===0)return this.delete(r);let i=this.get(r,!0);if(Dn.isCollection(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(t,r){let[n,...i]=t,s=this.get(n,!0);return i.length===0?!r&&Dn.isScalar(s)?s.value:s:Dn.isCollection(s)?s.getIn(i,r):void 0}hasAllNullValues(t){return this.items.every(r=>{if(!Dn.isPair(r))return!1;let n=r.value;return n==null||t&&Dn.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(t){let[r,...n]=t;if(n.length===0)return this.has(r);let i=this.get(r,!0);return Dn.isCollection(i)?i.hasIn(n):!1}setIn(t,r){let[n,...i]=t;if(i.length===0)this.set(n,r);else{let s=this.get(n,!0);if(Dn.isCollection(s))s.setIn(i,r);else if(s===void 0&&this.schema)this.set(n,RT(this.schema,i,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};Eg.Collection=DT;Eg.collectionFromPath=RT;Eg.isEmptyPath=KF});var wl=x(Og=>{"use strict";p();var Poe=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function jT(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Noe=(e,t,r)=>e.endsWith(`
114
- `)?jT(r,t):r.includes(`
115
- `)?`
116
- `+jT(r,t):(e.endsWith(" ")?"":" ")+r;Og.indentComment=jT;Og.lineComment=Noe;Og.stringifyComment=Poe});var QF=x(xl=>{"use strict";p();var qoe="flow",FT="block",Pg="quoted";function Loe(e,t,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:s=20,onFold:a,onOverflow:o}={}){if(!i||i<0)return e;i<s&&(s=0);let c=Math.max(1+s,1+i-t.length);if(e.length<=c)return e;let l=[],f={},m=i-t.length;typeof n=="number"&&(n>i-Math.max(2,s)?l.push(0):m=i-n);let d,g,v=!1,b=-1,_=-1,k=-1;r===FT&&(b=YF(e,b,t.length),b!==-1&&(m=b+c));for(let T;T=e[b+=1];){if(r===Pg&&T==="\\"){switch(_=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}k=b}if(T===`
117
- `)r===FT&&(b=YF(e,b,t.length)),m=b+t.length+c,d=void 0;else{if(T===" "&&g&&g!==" "&&g!==`
118
- `&&g!==" "){let y=e[b+1];y&&y!==" "&&y!==`
119
- `&&y!==" "&&(d=b)}if(b>=m)if(d)l.push(d),m=d+c,d=void 0;else if(r===Pg){for(;g===" "||g===" ";)g=T,T=e[b+=1],v=!0;let y=b>k+1?b-2:_-1;if(f[y])return e;l.push(y),f[y]=!0,m=y+c,d=void 0}else v=!0}g=T}if(v&&o&&o(),l.length===0)return e;a&&a();let w=e.slice(0,l[0]);for(let T=0;T<l.length;++T){let y=l[T],A=l[T+1]||e.length;y===0?w=`
120
- ${t}${e.slice(0,A)}`:(r===Pg&&f[y]&&(w+=`${e[y]}\\`),w+=`
121
- ${t}${e.slice(y+1,A)}`)}return w}function YF(e,t,r){let n=t,i=t+1,s=e[i];for(;s===" "||s===" ";)if(t<i+r)s=e[++t];else{do s=e[++t];while(s&&s!==`
122
- `);n=t,i=t+1,s=e[i]}return n}xl.FOLD_BLOCK=FT;xl.FOLD_FLOW=qoe;xl.FOLD_QUOTED=Pg;xl.foldFlowLines=Loe});var Al=x(XF=>{"use strict";p();var fn=mt(),Qi=QF(),qg=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Lg=e=>/^(%|---|\.\.\.)/m.test(e);function Coe(e,t,r){if(!t||t<0)return!1;let n=t-r,i=e.length;if(i<=n)return!1;for(let s=0,a=0;s<i;++s)if(e[s]===`
123
- `){if(s-a>n)return!0;if(a=s+1,i-a<=n)return!1}return!0}function El(e,t){let r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;let{implicitKey:n}=t,i=t.options.doubleQuotedMinMultiLineLength,s=t.indent||(Lg(e)?" ":""),a="",o=0;for(let c=0,l=r[c];l;l=r[++c])if(l===" "&&r[c+1]==="\\"&&r[c+2]==="n"&&(a+=r.slice(o,c)+"\\ ",c+=1,o=c,l="\\"),l==="\\")switch(r[c+1]){case"u":{a+=r.slice(o,c);let f=r.substr(c+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(c,6)}c+=5,o=c+1}break;case"n":if(n||r[c+2]==='"'||r.length<i)c+=1;else{for(a+=r.slice(o,c)+`
124
-
125
- `;r[c+2]==="\\"&&r[c+3]==="n"&&r[c+4]!=='"';)a+=`
126
- `,c+=2;a+=s,r[c+2]===" "&&(a+="\\"),c+=1,o=c+1}break;default:c+=1}return a=o?a+r.slice(o):r,n?a:Qi.foldFlowLines(a,s,Qi.FOLD_QUOTED,qg(t,!1))}function BT(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
127
- `)||/[ \t]\n|\n[ \t]/.test(e))return El(e,t);let r=t.indent||(Lg(e)?" ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
128
- ${r}`)+"'";return t.implicitKey?n:Qi.foldFlowLines(n,r,Qi.FOLD_FLOW,qg(t,!1))}function uc(e,t){let{singleQuote:r}=t.options,n;if(r===!1)n=El;else{let i=e.includes('"'),s=e.includes("'");i&&!s?n=BT:s&&!i?n=El:n=r?BT:El}return n(e,t)}var VT;try{VT=new RegExp(`(^|(?<!
129
- ))
130
- +(?!
131
- |$)`,"g")}catch{VT=/\n+(?!\n|$)/g}function Ng({comment:e,type:t,value:r},n,i,s){let{blockQuote:a,commentString:o,lineWidth:c}=n.options;if(!a||/\n[\t ]+$/.test(r))return uc(r,n);let l=n.indent||(n.forceBlockIndent||Lg(r)?" ":""),f=a==="literal"?!0:a==="folded"||t===fn.Scalar.BLOCK_FOLDED?!1:t===fn.Scalar.BLOCK_LITERAL?!0:!Coe(r,c,l.length);if(!r)return f?`|
132
- `:`>
133
- `;let m,d;for(d=r.length;d>0;--d){let A=r[d-1];if(A!==`
134
- `&&A!==" "&&A!==" ")break}let g=r.substring(d),v=g.indexOf(`
135
- `);v===-1?m="-":r===g||v!==g.length-1?(m="+",s&&s()):m="",g&&(r=r.slice(0,-g.length),g[g.length-1]===`
136
- `&&(g=g.slice(0,-1)),g=g.replace(VT,`$&${l}`));let b=!1,_,k=-1;for(_=0;_<r.length;++_){let A=r[_];if(A===" ")b=!0;else if(A===`
137
- `)k=_;else break}let w=r.substring(0,k<_?k+1:_);w&&(r=r.substring(w.length),w=w.replace(/\n+/g,`$&${l}`));let y=(b?l?"2":"1":"")+m;if(e&&(y+=" "+o(e.replace(/ ?[\r\n]+/g," ")),i&&i()),!f){let A=r.replace(/\n+/g,`
138
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${l}`),O=!1,P=qg(n,!0);a!=="folded"&&t!==fn.Scalar.BLOCK_FOLDED&&(P.onOverflow=()=>{O=!0});let q=Qi.foldFlowLines(`${w}${A}${g}`,l,Qi.FOLD_BLOCK,P);if(!O)return`>${y}
139
- ${l}${q}`}return r=r.replace(/\n+/g,`$&${l}`),`|${y}
140
- ${l}${w}${r}${g}`}function Ioe(e,t,r,n){let{type:i,value:s}=e,{actualString:a,implicitKey:o,indent:c,indentStep:l,inFlow:f}=t;if(o&&s.includes(`
141
- `)||f&&/[[\]{},]/.test(s))return uc(s,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return o||f||!s.includes(`
142
- `)?uc(s,t):Ng(e,t,r,n);if(!o&&!f&&i!==fn.Scalar.PLAIN&&s.includes(`
143
- `))return Ng(e,t,r,n);if(Lg(s)){if(c==="")return t.forceBlockIndent=!0,Ng(e,t,r,n);if(o&&c===l)return uc(s,t)}let m=s.replace(/\n+/g,`$&
144
- ${c}`);if(a){let d=b=>b.default&&b.tag!=="tag:yaml.org,2002:str"&&b.test?.test(m),{compat:g,tags:v}=t.doc.schema;if(v.some(d)||g?.some(d))return uc(s,t)}return o?m:Qi.foldFlowLines(m,c,Qi.FOLD_FLOW,qg(t,!1))}function Moe(e,t,r,n){let{implicitKey:i,inFlow:s}=t,a=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:o}=e;o!==fn.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(o=fn.Scalar.QUOTE_DOUBLE);let c=f=>{switch(f){case fn.Scalar.BLOCK_FOLDED:case fn.Scalar.BLOCK_LITERAL:return i||s?uc(a.value,t):Ng(a,t,r,n);case fn.Scalar.QUOTE_DOUBLE:return El(a.value,t);case fn.Scalar.QUOTE_SINGLE:return BT(a.value,t);case fn.Scalar.PLAIN:return Ioe(a,t,r,n);default:return null}},l=c(o);if(l===null){let{defaultKeyType:f,defaultStringType:m}=t.options,d=i&&f||m;if(l=c(d),l===null)throw new Error(`Unsupported default string type ${d}`)}return l}XF.stringifyString=Moe});var Ol=x($T=>{"use strict";p();var Roe=Tg(),Xi=Se(),Doe=wl(),joe=Al();function Foe(e,t){let r=Object.assign({blockQuote:!0,commentString:Doe.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},e.schema.toStringOptions,t),n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}function Boe(e,t){if(t.tag){let i=e.filter(s=>s.tag===t.tag);if(i.length>0)return i.find(s=>s.format===t.format)??i[0]}let r,n;if(Xi.isScalar(t)){n=t.value;let i=e.filter(s=>s.identify?.(n));if(i.length>1){let s=i.filter(a=>a.test);s.length>0&&(i=s)}r=i.find(s=>s.format===t.format)??i.find(s=>!s.format)}else n=t,r=e.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!r){let i=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${i} value`)}return r}function Voe(e,t,{anchors:r,doc:n}){if(!n.directives)return"";let i=[],s=(Xi.isScalar(e)||Xi.isCollection(e))&&e.anchor;s&&Roe.anchorIsValid(s)&&(r.add(s),i.push(`&${s}`));let a=e.tag??(t.default?null:t.tag);return a&&i.push(n.directives.tagString(a)),i.join(" ")}function $oe(e,t,r,n){if(Xi.isPair(e))return e.toString(t,r,n);if(Xi.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,s=Xi.isNode(e)?e:t.doc.createNode(e,{onTagObj:c=>i=c});i??(i=Boe(t.doc.schema.tags,s));let a=Voe(s,i,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);let o=typeof i.stringify=="function"?i.stringify(s,t,r,n):Xi.isScalar(s)?joe.stringifyString(s,t,r,n):s.toString(t,r,n);return a?Xi.isScalar(s)||o[0]==="{"||o[0]==="["?`${a} ${o}`:`${a}
145
- ${t.indent}${o}`:o}$T.createStringifyContext=Foe;$T.stringify=$oe});var rB=x(tB=>{"use strict";p();var pi=Se(),ZF=mt(),eB=Ol(),Pl=wl();function Uoe({key:e,value:t},r,n,i){let{allNullValues:s,doc:a,indent:o,indentStep:c,options:{commentString:l,indentSeq:f,simpleKeys:m}}=r,d=pi.isNode(e)&&e.comment||null;if(m){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(pi.isCollection(e)||!pi.isNode(e)&&typeof e=="object"){let P="With simple keys, collection cannot be used as a key value";throw new Error(P)}}let g=!m&&(!e||d&&t==null&&!r.inFlow||pi.isCollection(e)||(pi.isScalar(e)?e.type===ZF.Scalar.BLOCK_FOLDED||e.type===ZF.Scalar.BLOCK_LITERAL:typeof e=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!g&&(m||!s),indent:o+c});let v=!1,b=!1,_=eB.stringify(e,r,()=>v=!0,()=>b=!0);if(!g&&!r.inFlow&&_.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(r.inFlow){if(s||t==null)return v&&n&&n(),_===""?"?":g?`? ${_}`:_}else if(s&&!m||t==null&&g)return _=`? ${_}`,d&&!v?_+=Pl.lineComment(_,r.indent,l(d)):b&&i&&i(),_;v&&(d=null),g?(d&&(_+=Pl.lineComment(_,r.indent,l(d))),_=`? ${_}
146
- ${o}:`):(_=`${_}:`,d&&(_+=Pl.lineComment(_,r.indent,l(d))));let k,w,T;pi.isNode(t)?(k=!!t.spaceBefore,w=t.commentBefore,T=t.comment):(k=!1,w=null,T=null,t&&typeof t=="object"&&(t=a.createNode(t))),r.implicitKey=!1,!g&&!d&&pi.isScalar(t)&&(r.indentAtStart=_.length+1),b=!1,!f&&c.length>=2&&!r.inFlow&&!g&&pi.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor&&(r.indent=r.indent.substring(2));let y=!1,A=eB.stringify(t,r,()=>y=!0,()=>b=!0),O=" ";if(d||k||w){if(O=k?`
147
- `:"",w){let P=l(w);O+=`
148
- ${Pl.indentComment(P,r.indent)}`}A===""&&!r.inFlow?O===`
149
- `&&T&&(O=`
150
-
151
- `):O+=`
152
- ${r.indent}`}else if(!g&&pi.isCollection(t)){let P=A[0],q=A.indexOf(`
153
- `),B=q!==-1,M=r.inFlow??t.flow??t.items.length===0;if(B||!M){let L=!1;if(B&&(P==="&"||P==="!")){let C=A.indexOf(" ");P==="&"&&C!==-1&&C<q&&A[C+1]==="!"&&(C=A.indexOf(" ",C+1)),(C===-1||q<C)&&(L=!0)}L||(O=`
154
- ${r.indent}`)}}else(A===""||A[0]===`
155
- `)&&(O="");return _+=O+A,r.inFlow?y&&n&&n():T&&!y?_+=Pl.lineComment(_,r.indent,l(T)):b&&i&&i(),_}tB.stringifyPair=Uoe});var HT=x(UT=>{"use strict";p();var nB=oe("process");function Hoe(e,...t){e==="debug"&&console.log(...t)}function zoe(e,t){(e==="debug"||e==="warn")&&(typeof nB.emitWarning=="function"?nB.emitWarning(t):console.warn(t))}UT.debug=Hoe;UT.warn=zoe});var Dg=x(Rg=>{"use strict";p();var Mg=Se(),iB=mt(),Cg="<<",Ig={identify:e=>e===Cg||typeof e=="symbol"&&e.description===Cg,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new iB.Scalar(Symbol(Cg)),{addToJSMap:sB}),stringify:()=>Cg},Woe=(e,t)=>(Ig.identify(t)||Mg.isScalar(t)&&(!t.type||t.type===iB.Scalar.PLAIN)&&Ig.identify(t.value))&&e?.doc.schema.tags.some(r=>r.tag===Ig.tag&&r.default);function sB(e,t,r){let n=aB(e,r);if(Mg.isSeq(n))for(let i of n.items)zT(e,t,i);else if(Array.isArray(n))for(let i of n)zT(e,t,i);else zT(e,t,n)}function zT(e,t,r){let n=aB(e,r);if(!Mg.isMap(n))throw new Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,e,Map);for(let[s,a]of i)t instanceof Map?t.has(s)||t.set(s,a):t instanceof Set?t.add(s):Object.prototype.hasOwnProperty.call(t,s)||Object.defineProperty(t,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return t}function aB(e,t){return e&&Mg.isAlias(t)?t.resolve(e.doc,e):t}Rg.addMergeToJSMap=sB;Rg.isMergeKey=Woe;Rg.merge=Ig});var GT=x(uB=>{"use strict";p();var Goe=HT(),oB=Dg(),Joe=Ol(),cB=Se(),WT=Ki();function Koe(e,t,{key:r,value:n}){if(cB.isNode(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if(oB.isMergeKey(e,r))oB.addMergeToJSMap(e,t,n);else{let i=WT.toJS(r,"",e);if(t instanceof Map)t.set(i,WT.toJS(n,i,e));else if(t instanceof Set)t.add(i);else{let s=Yoe(r,i,e),a=WT.toJS(n,s,e);s in t?Object.defineProperty(t,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[s]=a}}return t}function Yoe(e,t,r){if(t===null)return"";if(typeof t!="object")return String(t);if(cB.isNode(e)&&r?.doc){let n=Joe.createStringifyContext(r.doc,{});n.anchors=new Set;for(let s of r.anchors.keys())n.anchors.add(s.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=e.toString(n);if(!r.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),Goe.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 i}return JSON.stringify(t)}uB.addPairToJSMap=Koe});var Zi=x(JT=>{"use strict";p();var lB=Tl(),Qoe=rB(),Xoe=GT(),jg=Se();function Zoe(e,t,r){let n=lB.createNode(e,void 0,r),i=lB.createNode(t,void 0,r);return new Fg(n,i)}var Fg=class e{constructor(t,r=null){Object.defineProperty(this,jg.NODE_TYPE,{value:jg.PAIR}),this.key=t,this.value=r}clone(t){let{key:r,value:n}=this;return jg.isNode(r)&&(r=r.clone(t)),jg.isNode(n)&&(n=n.clone(t)),new e(r,n)}toJSON(t,r){let n=r?.mapAsMap?new Map:{};return Xoe.addPairToJSMap(r,n,this)}toString(t,r,n){return t?.doc?Qoe.stringifyPair(this,t,r,n):JSON.stringify(this)}};JT.Pair=Fg;JT.createPair=Zoe});var KT=x(pB=>{"use strict";p();var xa=Se(),fB=Ol(),Bg=wl();function ece(e,t,r){return(t.inFlow??e.flow?rce:tce)(e,t,r)}function tce({comment:e,items:t},r,{blockItemPrefix:n,flowChars:i,itemIndent:s,onChompKeep:a,onComment:o}){let{indent:c,options:{commentString:l}}=r,f=Object.assign({},r,{indent:s,type:null}),m=!1,d=[];for(let v=0;v<t.length;++v){let b=t[v],_=null;if(xa.isNode(b))!m&&b.spaceBefore&&d.push(""),Vg(r,d,b.commentBefore,m),b.comment&&(_=b.comment);else if(xa.isPair(b)){let w=xa.isNode(b.key)?b.key:null;w&&(!m&&w.spaceBefore&&d.push(""),Vg(r,d,w.commentBefore,m))}m=!1;let k=fB.stringify(b,f,()=>_=null,()=>m=!0);_&&(k+=Bg.lineComment(k,s,l(_))),m&&_&&(m=!1),d.push(n+k)}let g;if(d.length===0)g=i.start+i.end;else{g=d[0];for(let v=1;v<d.length;++v){let b=d[v];g+=b?`
156
- ${c}${b}`:`
157
- `}}return e?(g+=`
158
- `+Bg.indentComment(l(e),c),o&&o()):m&&a&&a(),g}function rce({items:e},t,{flowChars:r,itemIndent:n}){let{indent:i,indentStep:s,flowCollectionPadding:a,options:{commentString:o}}=t;n+=s;let c=Object.assign({},t,{indent:n,inFlow:!0,type:null}),l=!1,f=0,m=[];for(let v=0;v<e.length;++v){let b=e[v],_=null;if(xa.isNode(b))b.spaceBefore&&m.push(""),Vg(t,m,b.commentBefore,!1),b.comment&&(_=b.comment);else if(xa.isPair(b)){let w=xa.isNode(b.key)?b.key:null;w&&(w.spaceBefore&&m.push(""),Vg(t,m,w.commentBefore,!1),w.comment&&(l=!0));let T=xa.isNode(b.value)?b.value:null;T?(T.comment&&(_=T.comment),T.commentBefore&&(l=!0)):b.value==null&&w?.comment&&(_=w.comment)}_&&(l=!0);let k=fB.stringify(b,c,()=>_=null);l||(l=m.length>f||k.includes(`
159
- `)),v<e.length-1?k+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(l||(l=m.reduce((w,T)=>w+T.length+2,2)+(k.length+2)>t.options.lineWidth)),l&&(k+=",")),_&&(k+=Bg.lineComment(k,n,o(_))),m.push(k),f=m.length}let{start:d,end:g}=r;if(m.length===0)return d+g;if(!l){let v=m.reduce((b,_)=>b+_.length+2,2);l=t.options.lineWidth>0&&v>t.options.lineWidth}if(l){let v=d;for(let b of m)v+=b?`
160
- ${s}${i}${b}`:`
161
- `;return`${v}
162
- ${i}${g}`}else return`${d}${a}${m.join(" ")}${a}${g}`}function Vg({indent:e,options:{commentString:t}},r,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let s=Bg.indentComment(t(n),e);r.push(s.trimStart())}}pB.stringifyCollection=ece});var ts=x(QT=>{"use strict";p();var nce=KT(),ice=GT(),sce=Ag(),es=Se(),$g=Zi(),ace=mt();function Nl(e,t){let r=es.isScalar(t)?t.value:t;for(let n of e)if(es.isPair(n)&&(n.key===t||n.key===r||es.isScalar(n.key)&&n.key.value===r))return n}var YT=class extends sce.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(es.MAP,t),this.items=[]}static from(t,r,n){let{keepUndefined:i,replacer:s}=n,a=new this(t),o=(c,l)=>{if(typeof s=="function")l=s.call(r,c,l);else if(Array.isArray(s)&&!s.includes(c))return;(l!==void 0||i)&&a.items.push($g.createPair(c,l,n))};if(r instanceof Map)for(let[c,l]of r)o(c,l);else if(r&&typeof r=="object")for(let c of Object.keys(r))o(c,r[c]);return typeof t.sortMapEntries=="function"&&a.items.sort(t.sortMapEntries),a}add(t,r){let n;es.isPair(t)?n=t:!t||typeof t!="object"||!("key"in t)?n=new $g.Pair(t,t?.value):n=new $g.Pair(t.key,t.value);let i=Nl(this.items,n.key),s=this.schema?.sortMapEntries;if(i){if(!r)throw new Error(`Key ${n.key} already set`);es.isScalar(i.value)&&ace.isScalarValue(n.value)?i.value.value=n.value:i.value=n.value}else if(s){let a=this.items.findIndex(o=>s(n,o)<0);a===-1?this.items.push(n):this.items.splice(a,0,n)}else this.items.push(n)}delete(t){let r=Nl(this.items,t);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(t,r){let i=Nl(this.items,t)?.value;return(!r&&es.isScalar(i)?i.value:i)??void 0}has(t){return!!Nl(this.items,t)}set(t,r){this.add(new $g.Pair(t,r),!0)}toJSON(t,r,n){let i=n?new n:r?.mapAsMap?new Map:{};r?.onCreate&&r.onCreate(i);for(let s of this.items)ice.addPairToJSMap(r,i,s);return i}toString(t,r,n){if(!t)return JSON.stringify(this);for(let i of this.items)if(!es.isPair(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),nce.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:n,onComment:r})}};QT.YAMLMap=YT;QT.findPair=Nl});var lc=x(hB=>{"use strict";p();var oce=Se(),dB=ts(),cce={collection:"map",default:!0,nodeClass:dB.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){return oce.isMap(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,r)=>dB.YAMLMap.from(e,t,r)};hB.map=cce});var rs=x(mB=>{"use strict";p();var uce=Tl(),lce=KT(),fce=Ag(),Hg=Se(),pce=mt(),dce=Ki(),XT=class extends fce.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Hg.SEQ,t),this.items=[]}add(t){this.items.push(t)}delete(t){let r=Ug(t);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(t,r){let n=Ug(t);if(typeof n!="number")return;let i=this.items[n];return!r&&Hg.isScalar(i)?i.value:i}has(t){let r=Ug(t);return typeof r=="number"&&r<this.items.length}set(t,r){let n=Ug(t);if(typeof n!="number")throw new Error(`Expected a valid index, not ${t}.`);let i=this.items[n];Hg.isScalar(i)&&pce.isScalarValue(r)?i.value=r:this.items[n]=r}toJSON(t,r){let n=[];r?.onCreate&&r.onCreate(n);let i=0;for(let s of this.items)n.push(dce.toJS(s,String(i++),r));return n}toString(t,r,n){return t?lce.stringifyCollection(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:n,onComment:r}):JSON.stringify(this)}static from(t,r,n){let{replacer:i}=n,s=new this(t);if(r&&Symbol.iterator in Object(r)){let a=0;for(let o of r){if(typeof i=="function"){let c=r instanceof Set?o:String(a++);o=i.call(r,c,o)}s.items.push(uce.createNode(o,void 0,n))}}return s}};function Ug(e){let t=Hg.isScalar(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}mB.YAMLSeq=XT});var fc=x(yB=>{"use strict";p();var hce=Se(),gB=rs(),mce={collection:"seq",default:!0,nodeClass:gB.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){return hce.isSeq(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,r)=>gB.YAMLSeq.from(e,t,r)};yB.seq=mce});var ql=x(_B=>{"use strict";p();var gce=Al(),yce={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,r,n){return t=Object.assign({actualString:!0},t),gce.stringifyString(e,t,r,n)}};_B.string=yce});var zg=x(kB=>{"use strict";p();var vB=mt(),bB={identify:e=>e==null,createNode:()=>new vB.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new vB.Scalar(null),stringify:({source:e},t)=>typeof e=="string"&&bB.test.test(e)?e:t.options.nullStr};kB.nullTag=bB});var ZT=x(TB=>{"use strict";p();var _ce=mt(),SB={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new _ce.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){if(e&&SB.test.test(e)){let n=e[0]==="t"||e[0]==="T";if(t===n)return e}return t?r.options.trueStr:r.options.falseStr}};TB.boolTag=SB});var pc=x(wB=>{"use strict";p();function vce({format:e,minFractionDigits:t,tag:r,value:n}){if(typeof n=="bigint")return String(n);let i=typeof n=="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!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=t-(s.length-a-1);for(;o-- >0;)s+="0"}return s}wB.stringifyNumber=vce});var t1=x(Wg=>{"use strict";p();var bce=mt(),e1=pc(),kce={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:e1.stringifyNumber},Sce={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():e1.stringifyNumber(e)}},Tce={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new bce.Scalar(parseFloat(e)),r=e.indexOf(".");return r!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-r-1),t},stringify:e1.stringifyNumber};Wg.float=Tce;Wg.floatExp=Sce;Wg.floatNaN=kce});var n1=x(Jg=>{"use strict";p();var xB=pc(),Gg=e=>typeof e=="bigint"||Number.isInteger(e),r1=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function EB(e,t,r){let{value:n}=e;return Gg(n)&&n>=0?r+n.toString(t):xB.stringifyNumber(e)}var wce={identify:e=>Gg(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>r1(e,2,8,r),stringify:e=>EB(e,8,"0o")},xce={identify:Gg,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>r1(e,0,10,r),stringify:xB.stringifyNumber},Ece={identify:e=>Gg(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>r1(e,2,16,r),stringify:e=>EB(e,16,"0x")};Jg.int=xce;Jg.intHex=Ece;Jg.intOct=wce});var OB=x(AB=>{"use strict";p();var Ace=lc(),Oce=zg(),Pce=fc(),Nce=ql(),qce=ZT(),i1=t1(),s1=n1(),Lce=[Ace.map,Pce.seq,Nce.string,Oce.nullTag,qce.boolTag,s1.intOct,s1.int,s1.intHex,i1.floatNaN,i1.floatExp,i1.float];AB.schema=Lce});var qB=x(NB=>{"use strict";p();var Cce=mt(),Ice=lc(),Mce=fc();function PB(e){return typeof e=="bigint"||Number.isInteger(e)}var Kg=({value:e})=>JSON.stringify(e),Rce=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Kg},{identify:e=>e==null,createNode:()=>new Cce.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Kg},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Kg},{identify:PB,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>PB(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Kg}],Dce={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},jce=[Ice.map,Mce.seq].concat(Rce,Dce);NB.schema=jce});var o1=x(LB=>{"use strict";p();var Ll=oe("buffer"),a1=mt(),Fce=Al(),Bce={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof Ll.Buffer=="function")return Ll.Buffer.from(e,"base64");if(typeof atob=="function"){let r=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(r.length);for(let i=0;i<r.length;++i)n[i]=r.charCodeAt(i);return n}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:r},n,i,s){if(!r)return"";let a=r,o;if(typeof Ll.Buffer=="function")o=a instanceof Ll.Buffer?a.toString("base64"):Ll.Buffer.from(a.buffer).toString("base64");else if(typeof btoa=="function"){let c="";for(let l=0;l<a.length;++l)c+=String.fromCharCode(a[l]);o=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=a1.Scalar.BLOCK_LITERAL),t!==a1.Scalar.QUOTE_DOUBLE){let c=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),l=Math.ceil(o.length/c),f=new Array(l);for(let m=0,d=0;m<l;++m,d+=c)f[m]=o.substr(d,c);o=f.join(t===a1.Scalar.BLOCK_LITERAL?`
163
- `:" ")}return Fce.stringifyString({comment:e,type:t,value:o},n,i,s)}};LB.binary=Bce});var Xg=x(Qg=>{"use strict";p();var Yg=Se(),c1=Zi(),Vce=mt(),$ce=rs();function CB(e,t){if(Yg.isSeq(e))for(let r=0;r<e.items.length;++r){let n=e.items[r];if(!Yg.isPair(n)){if(Yg.isMap(n)){n.items.length>1&&t("Each pair must have its own sequence indicator");let i=n.items[0]||new c1.Pair(new Vce.Scalar(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
164
- ${i.key.commentBefore}`:n.commentBefore),n.comment){let s=i.value??i.key;s.comment=s.comment?`${n.comment}
165
- ${s.comment}`:n.comment}n=i}e.items[r]=Yg.isPair(n)?n:new c1.Pair(n)}}else t("Expected a sequence for this tag");return e}function IB(e,t,r){let{replacer:n}=r,i=new $ce.YAMLSeq(e);i.tag="tag:yaml.org,2002:pairs";let s=0;if(t&&Symbol.iterator in Object(t))for(let a of t){typeof n=="function"&&(a=n.call(t,String(s++),a));let o,c;if(Array.isArray(a))if(a.length===2)o=a[0],c=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],c=a[o];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else o=a;i.items.push(c1.createPair(o,c,r))}return i}var Uce={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:CB,createNode:IB};Qg.createPairs=IB;Qg.pairs=Uce;Qg.resolvePairs=CB});var f1=x(l1=>{"use strict";p();var MB=Se(),u1=Ki(),Cl=ts(),Hce=rs(),RB=Xg(),Ea=class e extends Hce.YAMLSeq{constructor(){super(),this.add=Cl.YAMLMap.prototype.add.bind(this),this.delete=Cl.YAMLMap.prototype.delete.bind(this),this.get=Cl.YAMLMap.prototype.get.bind(this),this.has=Cl.YAMLMap.prototype.has.bind(this),this.set=Cl.YAMLMap.prototype.set.bind(this),this.tag=e.tag}toJSON(t,r){if(!r)return super.toJSON(t);let n=new Map;r?.onCreate&&r.onCreate(n);for(let i of this.items){let s,a;if(MB.isPair(i)?(s=u1.toJS(i.key,"",r),a=u1.toJS(i.value,s,r)):s=u1.toJS(i,"",r),n.has(s))throw new Error("Ordered maps must not include duplicate keys");n.set(s,a)}return n}static from(t,r,n){let i=RB.createPairs(t,r,n),s=new this;return s.items=i.items,s}};Ea.tag="tag:yaml.org,2002:omap";var zce={collection:"seq",identify:e=>e instanceof Map,nodeClass:Ea,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let r=RB.resolvePairs(e,t),n=[];for(let{key:i}of r.items)MB.isScalar(i)&&(n.includes(i.value)?t(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new Ea,r)},createNode:(e,t,r)=>Ea.from(e,t,r)};l1.YAMLOMap=Ea;l1.omap=zce});var VB=x(p1=>{"use strict";p();var DB=mt();function jB({value:e,source:t},r){return t&&(e?FB:BB).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}var FB={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new DB.Scalar(!0),stringify:jB},BB={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new DB.Scalar(!1),stringify:jB};p1.falseTag=BB;p1.trueTag=FB});var $B=x(Zg=>{"use strict";p();var Wce=mt(),d1=pc(),Gce={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:d1.stringifyNumber},Jce={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():d1.stringifyNumber(e)}},Kce={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new Wce.Scalar(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(r!==-1){let n=e.substring(r+1).replace(/_/g,"");n[n.length-1]==="0"&&(t.minFractionDigits=n.length)}return t},stringify:d1.stringifyNumber};Zg.float=Kce;Zg.floatExp=Jce;Zg.floatNaN=Gce});var HB=x(Ml=>{"use strict";p();var UB=pc(),Il=e=>typeof e=="bigint"||Number.isInteger(e);function ey(e,t,r,{intAsBigInt:n}){let i=e[0];if((i==="-"||i==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let a=BigInt(e);return i==="-"?BigInt(-1)*a:a}let s=parseInt(e,r);return i==="-"?-1*s:s}function h1(e,t,r){let{value:n}=e;if(Il(n)){let i=n.toString(t);return n<0?"-"+r+i.substr(1):r+i}return UB.stringifyNumber(e)}var Yce={identify:Il,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>ey(e,2,2,r),stringify:e=>h1(e,2,"0b")},Qce={identify:Il,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>ey(e,1,8,r),stringify:e=>h1(e,8,"0")},Xce={identify:Il,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>ey(e,0,10,r),stringify:UB.stringifyNumber},Zce={identify:Il,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>ey(e,2,16,r),stringify:e=>h1(e,16,"0x")};Ml.int=Xce;Ml.intBin=Yce;Ml.intHex=Zce;Ml.intOct=Qce});var g1=x(m1=>{"use strict";p();var ny=Se(),ty=Zi(),ry=ts(),Aa=class e extends ry.YAMLMap{constructor(t){super(t),this.tag=e.tag}add(t){let r;ny.isPair(t)?r=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?r=new ty.Pair(t.key,null):r=new ty.Pair(t,null),ry.findPair(this.items,r.key)||this.items.push(r)}get(t,r){let n=ry.findPair(this.items,t);return!r&&ny.isPair(n)?ny.isScalar(n.key)?n.key.value:n.key:n}set(t,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let n=ry.findPair(this.items,t);n&&!r?this.items.splice(this.items.indexOf(n),1):!n&&r&&this.items.push(new ty.Pair(t))}toJSON(t,r){return super.toJSON(t,r,Set)}toString(t,r,n){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),r,n);throw new Error("Set items must all have null values")}static from(t,r,n){let{replacer:i}=n,s=new this(t);if(r&&Symbol.iterator in Object(r))for(let a of r)typeof i=="function"&&(a=i.call(r,a,a)),s.items.push(ty.createPair(a,null,n));return s}};Aa.tag="tag:yaml.org,2002:set";var eue={collection:"map",identify:e=>e instanceof Set,nodeClass:Aa,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>Aa.from(e,t,r),resolve(e,t){if(ny.isMap(e)){if(e.hasAllNullValues(!0))return Object.assign(new Aa,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};m1.YAMLSet=Aa;m1.set=eue});var _1=x(iy=>{"use strict";p();var tue=pc();function y1(e,t){let r=e[0],n=r==="-"||r==="+"?e.substring(1):e,i=a=>t?BigInt(a):Number(a),s=n.replace(/_/g,"").split(":").reduce((a,o)=>a*i(60)+i(o),i(0));return r==="-"?i(-1)*s:s}function zB(e){let{value:t}=e,r=a=>a;if(typeof t=="bigint")r=a=>BigInt(a);else if(isNaN(t)||!isFinite(t))return tue.stringifyNumber(e);let n="";t<0&&(n="-",t*=r(-1));let i=r(60),s=[t%i];return t<60?s.unshift(0):(t=(t-s[0])/i,s.unshift(t%i),t>=60&&(t=(t-s[0])/i,s.unshift(t))),n+s.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var rue={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>y1(e,r),stringify:zB},nue={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>y1(e,!1),stringify:zB},WB={identify:e=>e 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(e){let t=e.match(WB.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,n,i,s,a,o]=t.map(Number),c=t[7]?Number((t[7]+"00").substr(1,3)):0,l=Date.UTC(r,n-1,i,s||0,a||0,o||0,c),f=t[8];if(f&&f!=="Z"){let m=y1(f,!1);Math.abs(m)<30&&(m*=60),l-=6e4*m}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};iy.floatTime=nue;iy.intTime=rue;iy.timestamp=WB});var KB=x(JB=>{"use strict";p();var iue=lc(),sue=zg(),aue=fc(),oue=ql(),cue=o1(),GB=VB(),v1=$B(),sy=HB(),uue=Dg(),lue=f1(),fue=Xg(),pue=g1(),b1=_1(),due=[iue.map,aue.seq,oue.string,sue.nullTag,GB.trueTag,GB.falseTag,sy.intBin,sy.intOct,sy.int,sy.intHex,v1.floatNaN,v1.floatExp,v1.float,cue.binary,uue.merge,lue.omap,fue.pairs,pue.set,b1.intTime,b1.floatTime,b1.timestamp];JB.schema=due});var sV=x(T1=>{"use strict";p();var ZB=lc(),hue=zg(),eV=fc(),mue=ql(),gue=ZT(),k1=t1(),S1=n1(),yue=OB(),_ue=qB(),tV=o1(),Rl=Dg(),rV=f1(),nV=Xg(),YB=KB(),iV=g1(),ay=_1(),QB=new Map([["core",yue.schema],["failsafe",[ZB.map,eV.seq,mue.string]],["json",_ue.schema],["yaml11",YB.schema],["yaml-1.1",YB.schema]]),XB={binary:tV.binary,bool:gue.boolTag,float:k1.float,floatExp:k1.floatExp,floatNaN:k1.floatNaN,floatTime:ay.floatTime,int:S1.int,intHex:S1.intHex,intOct:S1.intOct,intTime:ay.intTime,map:ZB.map,merge:Rl.merge,null:hue.nullTag,omap:rV.omap,pairs:nV.pairs,seq:eV.seq,set:iV.set,timestamp:ay.timestamp},vue={"tag:yaml.org,2002:binary":tV.binary,"tag:yaml.org,2002:merge":Rl.merge,"tag:yaml.org,2002:omap":rV.omap,"tag:yaml.org,2002:pairs":nV.pairs,"tag:yaml.org,2002:set":iV.set,"tag:yaml.org,2002:timestamp":ay.timestamp};function bue(e,t,r){let n=QB.get(t);if(n&&!e)return r&&!n.includes(Rl.merge)?n.concat(Rl.merge):n.slice();let i=n;if(!i)if(Array.isArray(e))i=[];else{let s=Array.from(QB.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${s} or define customTags array`)}if(Array.isArray(e))for(let s of e)i=i.concat(s);else typeof e=="function"&&(i=e(i.slice()));return r&&(i=i.concat(Rl.merge)),i.reduce((s,a)=>{let o=typeof a=="string"?XB[a]:a;if(!o){let c=JSON.stringify(a),l=Object.keys(XB).map(f=>JSON.stringify(f)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${l}`)}return s.includes(o)||s.push(o),s},[])}T1.coreKnownTags=vue;T1.getTags=bue});var E1=x(aV=>{"use strict";p();var w1=Se(),kue=lc(),Sue=fc(),Tue=ql(),oy=sV(),wue=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0,x1=class e{constructor({compat:t,customTags:r,merge:n,resolveKnownTags:i,schema:s,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(t)?oy.getTags(t,"compat"):t?oy.getTags(null,t):null,this.name=typeof s=="string"&&s||"core",this.knownTags=i?oy.coreKnownTags:{},this.tags=oy.getTags(r,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,w1.MAP,{value:kue.map}),Object.defineProperty(this,w1.SCALAR,{value:Tue.string}),Object.defineProperty(this,w1.SEQ,{value:Sue.seq}),this.sortMapEntries=typeof a=="function"?a:a===!0?wue:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};aV.Schema=x1});var cV=x(oV=>{"use strict";p();var xue=Se(),A1=Ol(),Dl=wl();function Eue(e,t){let r=[],n=t.directives===!0;if(t.directives!==!1&&e.directives){let c=e.directives.toString(e);c?(r.push(c),n=!0):e.directives.docStart&&(n=!0)}n&&r.push("---");let i=A1.createStringifyContext(e,t),{commentString:s}=i.options;if(e.commentBefore){r.length!==1&&r.unshift("");let c=s(e.commentBefore);r.unshift(Dl.indentComment(c,""))}let a=!1,o=null;if(e.contents){if(xue.isNode(e.contents)){if(e.contents.spaceBefore&&n&&r.push(""),e.contents.commentBefore){let f=s(e.contents.commentBefore);r.push(Dl.indentComment(f,""))}i.forceBlockIndent=!!e.comment,o=e.contents.comment}let c=o?void 0:()=>a=!0,l=A1.stringify(e.contents,i,()=>o=null,c);o&&(l+=Dl.lineComment(l,"",s(o))),(l[0]==="|"||l[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${l}`:r.push(l)}else r.push(A1.stringify(e.contents,i));if(e.directives?.docEnd)if(e.comment){let c=s(e.comment);c.includes(`
166
- `)?(r.push("..."),r.push(Dl.indentComment(c,""))):r.push(`... ${c}`)}else r.push("...");else{let c=e.comment;c&&a&&(c=c.replace(/^\n+/,"")),c&&((!a||o)&&r[r.length-1]!==""&&r.push(""),r.push(Dl.indentComment(s(c),"")))}return r.join(`
167
- `)+`
168
- `}oV.stringifyDocument=Eue});var jl=x(uV=>{"use strict";p();var Aue=Sl(),dc=Ag(),Ur=Se(),Oue=Zi(),Pue=Ki(),Nue=E1(),que=cV(),O1=Tg(),Lue=LT(),Cue=Tl(),P1=qT(),N1=class e{constructor(t,r,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Ur.NODE_TYPE,{value:Ur.DOC});let i=null;typeof r=="function"||Array.isArray(r)?i=r:n===void 0&&r&&(n=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"},n);this.options=s;let{version:a}=s;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new P1.Directives({version:a}),this.setSchema(a,n),this.contents=t===void 0?null:this.createNode(t,i,n)}clone(){let t=Object.create(e.prototype,{[Ur.NODE_TYPE]:{value:Ur.DOC}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Ur.isNode(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){hc(this.contents)&&this.contents.add(t)}addIn(t,r){hc(this.contents)&&this.contents.addIn(t,r)}createAlias(t,r){if(!t.anchor){let n=O1.anchorNames(this);t.anchor=!r||n.has(r)?O1.findNewAnchor(r||"a",n):r}return new Aue.Alias(t.anchor)}createNode(t,r,n){let i;if(typeof r=="function")t=r.call({"":t},"",t),i=r;else if(Array.isArray(r)){let _=w=>typeof w=="number"||w instanceof String||w instanceof Number,k=r.filter(_).map(String);k.length>0&&(r=r.concat(k)),i=r}else n===void 0&&r&&(n=r,r=void 0);let{aliasDuplicateObjects:s,anchorPrefix:a,flow:o,keepUndefined:c,onTagObj:l,tag:f}=n??{},{onAnchor:m,setAnchors:d,sourceObjects:g}=O1.createNodeAnchors(this,a||"a"),v={aliasDuplicateObjects:s??!0,keepUndefined:c??!1,onAnchor:m,onTagObj:l,replacer:i,schema:this.schema,sourceObjects:g},b=Cue.createNode(t,f,v);return o&&Ur.isCollection(b)&&(b.flow=!0),d(),b}createPair(t,r,n={}){let i=this.createNode(t,null,n),s=this.createNode(r,null,n);return new Oue.Pair(i,s)}delete(t){return hc(this.contents)?this.contents.delete(t):!1}deleteIn(t){return dc.isEmptyPath(t)?this.contents==null?!1:(this.contents=null,!0):hc(this.contents)?this.contents.deleteIn(t):!1}get(t,r){return Ur.isCollection(this.contents)?this.contents.get(t,r):void 0}getIn(t,r){return dc.isEmptyPath(t)?!r&&Ur.isScalar(this.contents)?this.contents.value:this.contents:Ur.isCollection(this.contents)?this.contents.getIn(t,r):void 0}has(t){return Ur.isCollection(this.contents)?this.contents.has(t):!1}hasIn(t){return dc.isEmptyPath(t)?this.contents!==void 0:Ur.isCollection(this.contents)?this.contents.hasIn(t):!1}set(t,r){this.contents==null?this.contents=dc.collectionFromPath(this.schema,[t],r):hc(this.contents)&&this.contents.set(t,r)}setIn(t,r){dc.isEmptyPath(t)?this.contents=r:this.contents==null?this.contents=dc.collectionFromPath(this.schema,Array.from(t),r):hc(this.contents)&&this.contents.setIn(t,r)}setSchema(t,r={}){typeof t=="number"&&(t=String(t));let n;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new P1.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new P1.Directives({version:t}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let i=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(n)this.schema=new Nue.Schema(Object.assign(n,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:r,mapAsMap:n,maxAliasCount:i,onAnchor:s,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!t,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},c=Pue.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"?Lue.applyReviver(a,{"":c},"",c):c}toJSON(t,r){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:r})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){let r=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return que.stringifyDocument(this,t)}};function hc(e){if(Ur.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}uV.Document=N1});var Vl=x(Bl=>{"use strict";p();var Fl=class extends Error{constructor(t,r,n,i){super(),this.name=t,this.code=n,this.message=i,this.pos=r}},q1=class extends Fl{constructor(t,r,n){super("YAMLParseError",t,r,n)}},L1=class extends Fl{constructor(t,r,n){super("YAMLWarning",t,r,n)}},Iue=(e,t)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(o=>t.linePos(o));let{line:n,col:i}=r.linePos[0];r.message+=` at line ${n}, column ${i}`;let s=i-1,a=e.substring(t.lineStarts[n-1],t.lineStarts[n]).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"),n>1&&/^ *$/.test(a.substring(0,s))){let o=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);o.length>80&&(o=o.substring(0,79)+`\u2026
169
- `),a=o+a}if(/[^ ]/.test(a)){let o=1,c=r.linePos[1];c?.line===n&&c.col>i&&(o=Math.max(1,Math.min(c.col-i,80-s)));let l=" ".repeat(s)+"^".repeat(o);r.message+=`:
170
-
171
- ${a}
172
- ${l}
173
- `}};Bl.YAMLError=Fl;Bl.YAMLParseError=q1;Bl.YAMLWarning=L1;Bl.prettifyError=Iue});var $l=x(lV=>{"use strict";p();function Mue(e,{flow:t,indicator:r,next:n,offset:i,onError:s,parentIndent:a,startOnNewline:o}){let c=!1,l=o,f=o,m="",d="",g=!1,v=!1,b=null,_=null,k=null,w=null,T=null,y=null,A=null;for(let q of e)switch(v&&(q.type!=="space"&&q.type!=="newline"&&q.type!=="comma"&&s(q.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),v=!1),b&&(l&&q.type!=="comment"&&q.type!=="newline"&&s(b,"TAB_AS_INDENT","Tabs are not allowed as indentation"),b=null),q.type){case"space":!t&&(r!=="doc-start"||n?.type!=="flow-collection")&&q.source.includes(" ")&&(b=q),f=!0;break;case"comment":{f||s(q,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let B=q.source.substring(1)||" ";m?m+=d+B:m=B,d="",l=!1;break}case"newline":l?m?m+=q.source:(!y||r!=="seq-item-ind")&&(c=!0):d+=q.source,l=!0,g=!0,(_||k)&&(w=q),f=!0;break;case"anchor":_&&s(q,"MULTIPLE_ANCHORS","A node can have at most one anchor"),q.source.endsWith(":")&&s(q.offset+q.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),_=q,A??(A=q.offset),l=!1,f=!1,v=!0;break;case"tag":{k&&s(q,"MULTIPLE_TAGS","A node can have at most one tag"),k=q,A??(A=q.offset),l=!1,f=!1,v=!0;break}case r:(_||k)&&s(q,"BAD_PROP_ORDER",`Anchors and tags must be after the ${q.source} indicator`),y&&s(q,"UNEXPECTED_TOKEN",`Unexpected ${q.source} in ${t??"collection"}`),y=q,l=r==="seq-item-ind"||r==="explicit-key-ind",f=!1;break;case"comma":if(t){T&&s(q,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),T=q,l=!1,f=!1;break}default:s(q,"UNEXPECTED_TOKEN",`Unexpected ${q.type} token`),l=!1,f=!1}let O=e[e.length-1],P=O?O.offset+O.source.length:i;return v&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&s(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),b&&(l&&b.indent<=a||n?.type==="block-map"||n?.type==="block-seq")&&s(b,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:T,found:y,spaceBefore:c,comment:m,hasNewline:g,anchor:_,tag:k,newlineAfterProp:w,end:P,start:A??P}}lV.resolveProps=Mue});var cy=x(fV=>{"use strict";p();function C1(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
174
- `))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let r of t.start)if(r.type==="newline")return!0;if(t.sep){for(let r of t.sep)if(r.type==="newline")return!0}if(C1(t.key)||C1(t.value))return!0}return!1;default:return!0}}fV.containsNewline=C1});var I1=x(pV=>{"use strict";p();var Rue=cy();function Due(e,t,r){if(t?.type==="flow-collection"){let n=t.end[0];n.indent===e&&(n.source==="]"||n.source==="}")&&Rue.containsNewline(t)&&r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}pV.flowIndentCheck=Due});var M1=x(hV=>{"use strict";p();var dV=Se();function jue(e,t,r){let{uniqueKeys:n}=e.options;if(n===!1)return!1;let i=typeof n=="function"?n:(s,a)=>s===a||dV.isScalar(s)&&dV.isScalar(a)&&s.value===a.value;return t.some(s=>i(s.key,r))}hV.mapIncludes=jue});var bV=x(vV=>{"use strict";p();var mV=Zi(),Fue=ts(),gV=$l(),Bue=cy(),yV=I1(),Vue=M1(),_V="All mapping items must start at the same column";function $ue({composeNode:e,composeEmptyNode:t},r,n,i,s){let a=s?.nodeClass??Fue.YAMLMap,o=new a(r.schema);r.atRoot&&(r.atRoot=!1);let c=n.offset,l=null;for(let f of n.items){let{start:m,key:d,sep:g,value:v}=f,b=gV.resolveProps(m,{indicator:"explicit-key-ind",next:d??g?.[0],offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0}),_=!b.found;if(_){if(d&&(d.type==="block-seq"?i(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==n.indent&&i(c,"BAD_INDENT",_V)),!b.anchor&&!b.tag&&!g){l=b.end,b.comment&&(o.comment?o.comment+=`
175
- `+b.comment:o.comment=b.comment);continue}(b.newlineAfterProp||Bue.containsNewline(d))&&i(d??m[m.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else b.found?.indent!==n.indent&&i(c,"BAD_INDENT",_V);r.atKey=!0;let k=b.end,w=d?e(r,d,b,i):t(r,k,m,null,b,i);r.schema.compat&&yV.flowIndentCheck(n.indent,d,i),r.atKey=!1,Vue.mapIncludes(r,o.items,w)&&i(k,"DUPLICATE_KEY","Map keys must be unique");let T=gV.resolveProps(g??[],{indicator:"map-value-ind",next:v,offset:w.range[2],onError:i,parentIndent:n.indent,startOnNewline:!d||d.type==="block-scalar"});if(c=T.end,T.found){_&&(v?.type==="block-map"&&!T.hasNewline&&i(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&b.start<T.found.offset-1024&&i(w.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let y=v?e(r,v,T,i):t(r,c,g,null,T,i);r.schema.compat&&yV.flowIndentCheck(n.indent,v,i),c=y.range[2];let A=new mV.Pair(w,y);r.options.keepSourceTokens&&(A.srcToken=f),o.items.push(A)}else{_&&i(w.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),T.comment&&(w.comment?w.comment+=`
176
- `+T.comment:w.comment=T.comment);let y=new mV.Pair(w);r.options.keepSourceTokens&&(y.srcToken=f),o.items.push(y)}}return l&&l<c&&i(l,"IMPOSSIBLE","Map comment with trailing content"),o.range=[n.offset,c,l??c],o}vV.resolveBlockMap=$ue});var SV=x(kV=>{"use strict";p();var Uue=rs(),Hue=$l(),zue=I1();function Wue({composeNode:e,composeEmptyNode:t},r,n,i,s){let a=s?.nodeClass??Uue.YAMLSeq,o=new a(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let c=n.offset,l=null;for(let{start:f,value:m}of n.items){let d=Hue.resolveProps(f,{indicator:"seq-item-ind",next:m,offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||m)m?.type==="block-seq"?i(d.end,"BAD_INDENT","All sequence items must start at the same column"):i(c,"MISSING_CHAR","Sequence item without - indicator");else{l=d.end,d.comment&&(o.comment=d.comment);continue}let g=m?e(r,m,d,i):t(r,d.end,f,null,d,i);r.schema.compat&&zue.flowIndentCheck(n.indent,m,i),c=g.range[2],o.items.push(g)}return o.range=[n.offset,c,l??c],o}kV.resolveBlockSeq=Wue});var mc=x(TV=>{"use strict";p();function Gue(e,t,r,n){let i="";if(e){let s=!1,a="";for(let o of e){let{source:c,type:l}=o;switch(l){case"space":s=!0;break;case"comment":{r&&!s&&n(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let f=c.substring(1)||" ";i?i+=a+f:i=f,a="";break}case"newline":i&&(a+=c),s=!0;break;default:n(o,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=c.length}}return{comment:i,offset:t}}TV.resolveEnd=Gue});var AV=x(EV=>{"use strict";p();var Jue=Se(),Kue=Zi(),wV=ts(),Yue=rs(),Que=mc(),xV=$l(),Xue=cy(),Zue=M1(),R1="Block collections are not allowed within flow collections",D1=e=>e&&(e.type==="block-map"||e.type==="block-seq");function ele({composeNode:e,composeEmptyNode:t},r,n,i,s){let a=n.start.source==="{",o=a?"flow map":"flow sequence",c=s?.nodeClass??(a?wV.YAMLMap:Yue.YAMLSeq),l=new c(r.schema);l.flow=!0;let f=r.atRoot;f&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let m=n.offset+n.start.source.length;for(let _=0;_<n.items.length;++_){let k=n.items[_],{start:w,key:T,sep:y,value:A}=k,O=xV.resolveProps(w,{flow:o,indicator:"explicit-key-ind",next:T??y?.[0],offset:m,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!O.found){if(!O.anchor&&!O.tag&&!y&&!A){_===0&&O.comma?i(O.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):_<n.items.length-1&&i(O.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),O.comment&&(l.comment?l.comment+=`
177
- `+O.comment:l.comment=O.comment),m=O.end;continue}!a&&r.options.strict&&Xue.containsNewline(T)&&i(T,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(_===0)O.comma&&i(O.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(O.comma||i(O.start,"MISSING_CHAR",`Missing , between ${o} items`),O.comment){let P="";e:for(let q of w)switch(q.type){case"comma":case"space":break;case"comment":P=q.source.substring(1);break e;default:break e}if(P){let q=l.items[l.items.length-1];Jue.isPair(q)&&(q=q.value??q.key),q.comment?q.comment+=`
178
- `+P:q.comment=P,O.comment=O.comment.substring(P.length+1)}}if(!a&&!y&&!O.found){let P=A?e(r,A,O,i):t(r,O.end,y,null,O,i);l.items.push(P),m=P.range[2],D1(A)&&i(P.range,"BLOCK_IN_FLOW",R1)}else{r.atKey=!0;let P=O.end,q=T?e(r,T,O,i):t(r,P,w,null,O,i);D1(T)&&i(q.range,"BLOCK_IN_FLOW",R1),r.atKey=!1;let B=xV.resolveProps(y??[],{flow:o,indicator:"map-value-ind",next:A,offset:q.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(B.found){if(!a&&!O.found&&r.options.strict){if(y)for(let C of y){if(C===B.found)break;if(C.type==="newline"){i(C,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}O.start<B.found.offset-1024&&i(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]===":"?i(A,"MISSING_CHAR",`Missing space after : in ${o}`):i(B.start,"MISSING_CHAR",`Missing , or : between ${o} items`));let M=A?e(r,A,B,i):B.found?t(r,B.end,y,null,B,i):null;M?D1(A)&&i(M.range,"BLOCK_IN_FLOW",R1):B.comment&&(q.comment?q.comment+=`
179
- `+B.comment:q.comment=B.comment);let L=new Kue.Pair(q,M);if(r.options.keepSourceTokens&&(L.srcToken=k),a){let C=l;Zue.mapIncludes(r,C.items,q)&&i(P,"DUPLICATE_KEY","Map keys must be unique"),C.items.push(L)}else{let C=new wV.YAMLMap(r.schema);C.flow=!0,C.items.push(L);let $=(M??q).range;C.range=[q.range[0],$[1],$[2]],l.items.push(C)}m=M?M.range[2]:B.end}}let d=a?"}":"]",[g,...v]=n.end,b=m;if(g?.source===d)b=g.offset+g.source.length;else{let _=o[0].toUpperCase()+o.substring(1),k=f?`${_} must end with a ${d}`:`${_} in block collection must be sufficiently indented and end with a ${d}`;i(m,f?"MISSING_CHAR":"BAD_INDENT",k),g&&g.source.length!==1&&v.unshift(g)}if(v.length>0){let _=Que.resolveEnd(v,b,r.options.strict,i);_.comment&&(l.comment?l.comment+=`
180
- `+_.comment:l.comment=_.comment),l.range=[n.offset,b,_.offset]}else l.range=[n.offset,b,b];return l}EV.resolveFlowCollection=ele});var PV=x(OV=>{"use strict";p();var tle=Se(),rle=mt(),nle=ts(),ile=rs(),sle=bV(),ale=SV(),ole=AV();function j1(e,t,r,n,i,s){let a=r.type==="block-map"?sle.resolveBlockMap(e,t,r,n,s):r.type==="block-seq"?ale.resolveBlockSeq(e,t,r,n,s):ole.resolveFlowCollection(e,t,r,n,s),o=a.constructor;return i==="!"||i===o.tagName?(a.tag=o.tagName,a):(i&&(a.tag=i),a)}function cle(e,t,r,n,i){let s=n.tag,a=s?t.directives.tagName(s.source,d=>i(s,"TAG_RESOLVE_FAILED",d)):null;if(r.type==="block-seq"){let{anchor:d,newlineAfterProp:g}=n,v=d&&s?d.offset>s.offset?d:s:d??s;v&&(!g||g.offset<v.offset)&&i(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===nle.YAMLMap.tagName&&o==="map"||a===ile.YAMLSeq.tagName&&o==="seq")return j1(e,t,r,i,a);let c=t.schema.tags.find(d=>d.tag===a&&d.collection===o);if(!c){let d=t.schema.knownTags[a];if(d?.collection===o)t.schema.tags.push(Object.assign({},d,{default:!1})),c=d;else return d?i(s,"BAD_COLLECTION_TYPE",`${d.tag} used for ${o} collection, but expects ${d.collection??"scalar"}`,!0):i(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),j1(e,t,r,i,a)}let l=j1(e,t,r,i,a,c),f=c.resolve?.(l,d=>i(s,"TAG_RESOLVE_FAILED",d),t.options)??l,m=tle.isNode(f)?f:new rle.Scalar(f);return m.range=l.range,m.tag=a,c?.format&&(m.format=c.format),m}OV.composeCollection=cle});var B1=x(NV=>{"use strict";p();var F1=mt();function ule(e,t,r){let n=t.offset,i=lle(t,e.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let s=i.mode===">"?F1.Scalar.BLOCK_FOLDED:F1.Scalar.BLOCK_LITERAL,a=t.source?fle(t.source):[],o=a.length;for(let b=a.length-1;b>=0;--b){let _=a[b][1];if(_===""||_==="\r")o=b;else break}if(o===0){let b=i.chomp==="+"&&a.length>0?`
181
- `.repeat(Math.max(1,a.length-1)):"",_=n+i.length;return t.source&&(_+=t.source.length),{value:b,type:s,comment:i.comment,range:[n,_,_]}}let c=t.indent+i.indent,l=t.offset+i.length,f=0;for(let b=0;b<o;++b){let[_,k]=a[b];if(k===""||k==="\r")i.indent===0&&_.length>c&&(c=_.length);else{_.length<c&&r(l+_.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(c=_.length),f=b,c===0&&!e.atRoot&&r(l,"BAD_INDENT","Block scalar values in collections must be indented");break}l+=_.length+k.length+1}for(let b=a.length-1;b>=o;--b)a[b][0].length>c&&(o=b+1);let m="",d="",g=!1;for(let b=0;b<f;++b)m+=a[b][0].slice(c)+`
182
- `;for(let b=f;b<o;++b){let[_,k]=a[b];l+=_.length+k.length+1;let w=k[k.length-1]==="\r";if(w&&(k=k.slice(0,-1)),k&&_.length<c){let y=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;r(l-k.length-(w?2:1),"BAD_INDENT",y),_=""}s===F1.Scalar.BLOCK_LITERAL?(m+=d+_.slice(c)+k,d=`
183
- `):_.length>c||k[0]===" "?(d===" "?d=`
184
- `:!g&&d===`
185
- `&&(d=`
186
-
187
- `),m+=d+_.slice(c)+k,d=`
188
- `,g=!0):k===""?d===`
189
- `?m+=`
190
- `:d=`
191
- `:(m+=d+k,d=" ",g=!1)}switch(i.chomp){case"-":break;case"+":for(let b=o;b<a.length;++b)m+=`
192
- `+a[b][0].slice(c);m[m.length-1]!==`
193
- `&&(m+=`
194
- `);break;default:m+=`
195
- `}let v=n+i.length+t.source.length;return{value:m,type:s,comment:i.comment,range:[n,v,v]}}function lle({offset:e,props:t},r,n){if(t[0].type!=="block-scalar-header")return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=t[0],s=i[0],a=0,o="",c=-1;for(let d=1;d<i.length;++d){let g=i[d];if(!o&&(g==="-"||g==="+"))o=g;else{let v=Number(g);!a&&v?a=v:c===-1&&(c=e+d)}}c!==-1&&n(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let l=!1,f="",m=i.length;for(let d=1;d<t.length;++d){let g=t[d];switch(g.type){case"space":l=!0;case"newline":m+=g.source.length;break;case"comment":r&&!l&&n(g,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),m+=g.source.length,f=g.source.substring(1);break;case"error":n(g,"UNEXPECTED_TOKEN",g.message),m+=g.source.length;break;default:{let v=`Unexpected token in block scalar header: ${g.type}`;n(g,"UNEXPECTED_TOKEN",v);let b=g.source;b&&typeof b=="string"&&(m+=b.length)}}}return{mode:s,indent:a,chomp:o,comment:f,length:m}}function fle(e){let t=e.split(/\n( *)/),r=t[0],n=r.match(/^( *)/),s=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let a=1;a<t.length;a+=2)s.push([t[a],t[a+1]]);return s}NV.resolveBlockScalar=ule});var $1=x(LV=>{"use strict";p();var V1=mt(),ple=mc();function dle(e,t,r){let{offset:n,type:i,source:s,end:a}=e,o,c,l=(d,g,v)=>r(n+d,g,v);switch(i){case"scalar":o=V1.Scalar.PLAIN,c=hle(s,l);break;case"single-quoted-scalar":o=V1.Scalar.QUOTE_SINGLE,c=mle(s,l);break;case"double-quoted-scalar":o=V1.Scalar.QUOTE_DOUBLE,c=gle(s,l);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+s.length,n+s.length]}}let f=n+s.length,m=ple.resolveEnd(a,f,t,r);return{value:c,type:o,comment:m.comment,range:[n,f,m.offset]}}function hle(e,t){let r="";switch(e[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 ${e[0]}`;break}case"@":case"`":{r=`reserved character ${e[0]}`;break}}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),qV(e)}function mle(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),qV(e.slice(1,-1)).replace(/''/g,"'")}function qV(e){let t,r;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
196
- `,"sy"),r=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
197
- `,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=t.exec(e);if(!n)return e;let i=n[1],s=" ",a=t.lastIndex;for(r.lastIndex=a;n=r.exec(e);)n[1]===""?s===`
198
- `?i+=s:s=`
199
- `:(i+=s+n[1],s=" "),a=r.lastIndex;let o=/[ \t]*(.*)/sy;return o.lastIndex=a,n=o.exec(e),i+s+(n?.[1]??"")}function gle(e,t){let r="";for(let n=1;n<e.length-1;++n){let i=e[n];if(!(i==="\r"&&e[n+1]===`
200
- `))if(i===`
201
- `){let{fold:s,offset:a}=yle(e,n);r+=s,n=a}else if(i==="\\"){let s=e[++n],a=_le[s];if(a)r+=a;else if(s===`
202
- `)for(s=e[n+1];s===" "||s===" ";)s=e[++n+1];else if(s==="\r"&&e[n+1]===`
203
- `)for(s=e[++n+1];s===" "||s===" ";)s=e[++n+1];else if(s==="x"||s==="u"||s==="U"){let o=s==="x"?2:s==="u"?4:8;r+=vle(e,n+1,o,t),n+=o}else{let o=e.substr(n-1,2);t(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),r+=o}}else if(i===" "||i===" "){let s=n,a=e[n+1];for(;a===" "||a===" ";)a=e[++n+1];a!==`
204
- `&&!(a==="\r"&&e[n+2]===`
205
- `)&&(r+=n>s?e.slice(s,n+1):i)}else r+=i}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}function yle(e,t){let r="",n=e[t+1];for(;(n===" "||n===" "||n===`
206
- `||n==="\r")&&!(n==="\r"&&e[t+2]!==`
207
- `);)n===`
208
- `&&(r+=`
209
- `),t+=1,n=e[t+1];return r||(r=" "),{fold:r,offset:t}}var _le={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
210
- `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function vle(e,t,r,n){let i=e.substr(t,r),a=i.length===r&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{let o=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),o}}LV.resolveFlowScalar=dle});var MV=x(IV=>{"use strict";p();var Oa=Se(),CV=mt(),ble=B1(),kle=$1();function Sle(e,t,r,n){let{value:i,type:s,comment:a,range:o}=t.type==="block-scalar"?ble.resolveBlockScalar(e,t,n):kle.resolveFlowScalar(t,e.options.strict,n),c=r?e.directives.tagName(r.source,m=>n(r,"TAG_RESOLVE_FAILED",m)):null,l;e.options.stringKeys&&e.atKey?l=e.schema[Oa.SCALAR]:c?l=Tle(e.schema,i,c,r,n):t.type==="scalar"?l=wle(e,i,t,n):l=e.schema[Oa.SCALAR];let f;try{let m=l.resolve(i,d=>n(r??t,"TAG_RESOLVE_FAILED",d),e.options);f=Oa.isScalar(m)?m:new CV.Scalar(m)}catch(m){let d=m instanceof Error?m.message:String(m);n(r??t,"TAG_RESOLVE_FAILED",d),f=new CV.Scalar(i)}return f.range=o,f.source=i,s&&(f.type=s),c&&(f.tag=c),l.format&&(f.format=l.format),a&&(f.comment=a),f}function Tle(e,t,r,n,i){if(r==="!")return e[Oa.SCALAR];let s=[];for(let o of e.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(t))return o;let a=e.knownTags[r];return a&&!a.collection?(e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),e[Oa.SCALAR])}function wle({atKey:e,directives:t,schema:r},n,i,s){let a=r.tags.find(o=>(o.default===!0||e&&o.default==="key")&&o.test?.test(n))||r[Oa.SCALAR];if(r.compat){let o=r.compat.find(c=>c.default&&c.test?.test(n))??r[Oa.SCALAR];if(a.tag!==o.tag){let c=t.tagString(a.tag),l=t.tagString(o.tag),f=`Value may be parsed as either ${c} or ${l}`;s(i,"TAG_RESOLVE_FAILED",f,!0)}}return a}IV.composeScalar=Sle});var DV=x(RV=>{"use strict";p();function xle(e,t,r){if(t){r??(r=t.length);for(let n=r-1;n>=0;--n){let i=t[n];switch(i.type){case"space":case"comment":case"newline":e-=i.source.length;continue}for(i=t[++n];i?.type==="space";)e+=i.source.length,i=t[++n];break}}return e}RV.emptyScalarPosition=xle});var BV=x(H1=>{"use strict";p();var Ele=Sl(),Ale=Se(),Ole=PV(),jV=MV(),Ple=mc(),Nle=DV(),qle={composeNode:FV,composeEmptyNode:U1};function FV(e,t,r,n){let i=e.atKey,{spaceBefore:s,comment:a,anchor:o,tag:c}=r,l,f=!0;switch(t.type){case"alias":l=Lle(e,t,n),(o||c)&&n(t,"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=jV.composeScalar(e,t,c,n),o&&(l.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=Ole.composeCollection(qle,e,t,r,n),o&&(l.anchor=o.source.substring(1))}catch(m){let d=m instanceof Error?m.message:String(m);n(t,"RESOURCE_EXHAUSTION",d)}break;default:{let m=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;n(t,"UNEXPECTED_TOKEN",m),f=!1}}return l??(l=U1(e,t.offset,void 0,null,r,n)),o&&l.anchor===""&&n(o,"BAD_ALIAS","Anchor cannot be an empty string"),i&&e.options.stringKeys&&(!Ale.isScalar(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&n(c??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(l.spaceBefore=!0),a&&(t.type==="scalar"&&t.source===""?l.comment=a:l.commentBefore=a),e.options.keepSourceTokens&&f&&(l.srcToken=t),l}function U1(e,t,r,n,{spaceBefore:i,comment:s,anchor:a,tag:o,end:c},l){let f={type:"scalar",offset:Nle.emptyScalarPosition(t,r,n),indent:-1,source:""},m=jV.composeScalar(e,f,o,l);return a&&(m.anchor=a.source.substring(1),m.anchor===""&&l(a,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(m.spaceBefore=!0),s&&(m.comment=s,m.range[2]=c),m}function Lle({options:e},{offset:t,source:r,end:n},i){let s=new Ele.Alias(r.substring(1));s.source===""&&i(t,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&i(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let a=t+r.length,o=Ple.resolveEnd(n,a,e.strict,i);return s.range=[t,a,o.offset],o.comment&&(s.comment=o.comment),s}H1.composeEmptyNode=U1;H1.composeNode=FV});var UV=x($V=>{"use strict";p();var Cle=jl(),VV=BV(),Ile=mc(),Mle=$l();function Rle(e,t,{offset:r,start:n,value:i,end:s},a){let o=Object.assign({_directives:t},e),c=new Cle.Document(void 0,o),l={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},f=Mle.resolveProps(n,{indicator:"doc-start",next:i??s?.[0],offset:r,onError:a,parentIndent:0,startOnNewline:!0});f.found&&(c.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!f.hasNewline&&a(f.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=i?VV.composeNode(l,i,f,a):VV.composeEmptyNode(l,f.end,n,null,f,a);let m=c.contents.range[2],d=Ile.resolveEnd(s,m,!1,a);return d.comment&&(c.comment=d.comment),c.range=[r,m,d.offset],c}$V.composeDoc=Rle});var W1=x(WV=>{"use strict";p();var Dle=oe("process"),jle=qT(),Fle=jl(),Ul=Vl(),HV=Se(),Ble=UV(),Vle=mc();function Hl(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:r}=e;return[t,t+(typeof r=="string"?r.length:1)]}function zV(e){let t="",r=!1,n=!1;for(let i=0;i<e.length;++i){let s=e[i];switch(s[0]){case"#":t+=(t===""?"":n?`
211
-
212
- `:`
213
- `)+(s.substring(1)||" "),r=!0,n=!1;break;case"%":e[i+1]?.[0]!=="#"&&(i+=1),r=!1;break;default:r||(n=!0),r=!1}}return{comment:t,afterEmptyLine:n}}var z1=class{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,n,i,s)=>{let a=Hl(r);s?this.warnings.push(new Ul.YAMLWarning(a,n,i)):this.errors.push(new Ul.YAMLParseError(a,n,i))},this.directives=new jle.Directives({version:t.version||"1.2"}),this.options=t}decorate(t,r){let{comment:n,afterEmptyLine:i}=zV(this.prelude);if(n){let s=t.contents;if(r)t.comment=t.comment?`${t.comment}
214
- ${n}`:n;else if(i||t.directives.docStart||!s)t.commentBefore=n;else if(HV.isCollection(s)&&!s.flow&&s.items.length>0){let a=s.items[0];HV.isPair(a)&&(a=a.key);let o=a.commentBefore;a.commentBefore=o?`${n}
215
- ${o}`:n}else{let a=s.commentBefore;s.commentBefore=a?`${n}
216
- ${a}`:n}}if(r){for(let s=0;s<this.errors.length;++s)t.errors.push(this.errors[s]);for(let s=0;s<this.warnings.length;++s)t.warnings.push(this.warnings[s])}else t.errors=this.errors,t.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:zV(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,r=!1,n=-1){for(let i of t)yield*this.next(i);yield*this.end(r,n)}*next(t){switch(Dle.env.LOG_STREAM&&console.dir(t,{depth:null}),t.type){case"directive":this.directives.add(t.source,(r,n,i)=>{let s=Hl(t);s[0]+=r,this.onError(s,"BAD_DIRECTIVE",n,i)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{let r=Ble.composeDoc(this.options,this.directives,t,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(t,"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(t.source);break;case"error":{let r=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,n=new Ul.YAMLParseError(Hl(t),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new Ul.YAMLParseError(Hl(t),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let r=Vle.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){let n=this.doc.comment;this.doc.comment=n?`${n}
217
- ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Ul.YAMLParseError(Hl(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){let n=Object.assign({_directives:this.directives},this.options),i=new Fle.Document(void 0,n);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,r,r],this.decorate(i,!1),yield i}}};WV.Composer=z1});var KV=x(uy=>{"use strict";p();var $le=B1(),Ule=$1(),Hle=Vl(),GV=Al();function zle(e,t=!0,r){if(e){let n=(i,s,a)=>{let o=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(r)r(o,s,a);else throw new Hle.YAMLParseError([o,o+1],s,a)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Ule.resolveFlowScalar(e,t,n);case"block-scalar":return $le.resolveBlockScalar({options:{strict:t}},e,n)}}return null}function Wle(e,t){let{implicitKey:r=!1,indent:n,inFlow:i=!1,offset:s=-1,type:a="PLAIN"}=t,o=GV.stringifyString({type:a,value:e},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),c=t.end??[{type:"newline",offset:-1,indent:n,source:`
218
- `}];switch(o[0]){case"|":case">":{let l=o.indexOf(`
219
- `),f=o.substring(0,l),m=o.substring(l+1)+`
220
- `,d=[{type:"block-scalar-header",offset:s,indent:n,source:f}];return JV(d,c)||d.push({type:"newline",offset:-1,indent:n,source:`
221
- `}),{type:"block-scalar",offset:s,indent:n,props:d,source:m}}case'"':return{type:"double-quoted-scalar",offset:s,indent:n,source:o,end:c};case"'":return{type:"single-quoted-scalar",offset:s,indent:n,source:o,end:c};default:return{type:"scalar",offset:s,indent:n,source:o,end:c}}}function Gle(e,t,r={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:s=!1,type:a}=r,o="indent"in e?e.indent:null;if(n&&typeof o=="number"&&(o+=2),!a)switch(e.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{let l=e.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 c=GV.stringifyString({type:a,value:t},{implicitKey:i||o===null,indent:o!==null&&o>0?" ".repeat(o):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":Jle(e,c);break;case'"':G1(e,c,"double-quoted-scalar");break;case"'":G1(e,c,"single-quoted-scalar");break;default:G1(e,c,"scalar")}}function Jle(e,t){let r=t.indexOf(`
222
- `),n=t.substring(0,r),i=t.substring(r+1)+`
223
- `;if(e.type==="block-scalar"){let s=e.props[0];if(s.type!=="block-scalar-header")throw new Error("Invalid block scalar header");s.source=n,e.source=i}else{let{offset:s}=e,a="indent"in e?e.indent:-1,o=[{type:"block-scalar-header",offset:s,indent:a,source:n}];JV(o,"end"in e?e.end:void 0)||o.push({type:"newline",offset:-1,indent:a,source:`
224
- `});for(let c of Object.keys(e))c!=="type"&&c!=="offset"&&delete e[c];Object.assign(e,{type:"block-scalar",indent:a,props:o,source:i})}}function JV(e,t){if(t)for(let r of t)switch(r.type){case"space":case"comment":e.push(r);break;case"newline":return e.push(r),!0}return!1}function G1(e,t,r){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=r,e.source=t;break;case"block-scalar":{let n=e.props.slice(1),i=t.length;e.props[0].type==="block-scalar-header"&&(i-=e.props[0].source.length);for(let s of n)s.offset+=i;delete e.props,Object.assign(e,{type:r,source:t,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
225
- `};delete e.items,Object.assign(e,{type:r,source:t,end:[i]});break}default:{let n="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter(s=>s.type==="space"||s.type==="comment"||s.type==="newline"):[];for(let s of Object.keys(e))s!=="type"&&s!=="offset"&&delete e[s];Object.assign(e,{type:r,indent:n,source:t,end:i})}}}uy.createScalarToken=Wle;uy.resolveAsScalar=zle;uy.setScalarValue=Gle});var QV=x(YV=>{"use strict";p();var Kle=e=>"type"in e?fy(e):ly(e);function fy(e){switch(e.type){case"block-scalar":{let t="";for(let r of e.props)t+=fy(r);return t+e.source}case"block-map":case"block-seq":{let t="";for(let r of e.items)t+=ly(r);return t}case"flow-collection":{let t=e.start.source;for(let r of e.items)t+=ly(r);for(let r of e.end)t+=r.source;return t}case"document":{let t=ly(e);if(e.end)for(let r of e.end)t+=r.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let r of e.end)t+=r.source;return t}}}function ly({start:e,key:t,sep:r,value:n}){let i="";for(let s of e)i+=s.source;if(t&&(i+=fy(t)),r)for(let s of r)i+=s.source;return n&&(i+=fy(n)),i}YV.stringify=Kle});var t4=x(e4=>{"use strict";p();var J1=Symbol("break visit"),Yle=Symbol("skip children"),XV=Symbol("remove item");function Pa(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),ZV(Object.freeze([]),e,t)}Pa.BREAK=J1;Pa.SKIP=Yle;Pa.REMOVE=XV;Pa.itemAtPath=(e,t)=>{let r=e;for(let[n,i]of t){let s=r?.[n];if(s&&"items"in s)r=s.items[i];else return}return r};Pa.parentCollection=(e,t)=>{let r=Pa.itemAtPath(e,t.slice(0,-1)),n=t[t.length-1][0],i=r?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function ZV(e,t,r){let n=r(t,e);if(typeof n=="symbol")return n;for(let i of["key","value"]){let s=t[i];if(s&&"items"in s){for(let a=0;a<s.items.length;++a){let o=ZV(Object.freeze(e.concat([[i,a]])),s.items[a],r);if(typeof o=="number")a=o-1;else{if(o===J1)return J1;o===XV&&(s.items.splice(a,1),a-=1)}}typeof n=="function"&&i==="key"&&(n=n(t,e))}}return typeof n=="function"?n(t,e):n}e4.visit=Pa});var py=x(cr=>{"use strict";p();var K1=KV(),Qle=QV(),Xle=t4(),Y1="\uFEFF",Q1="",X1="",Z1="",Zle=e=>!!e&&"items"in e,efe=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function tfe(e){switch(e){case Y1:return"<BOM>";case Q1:return"<DOC>";case X1:return"<FLOW_END>";case Z1:return"<SCALAR>";default:return JSON.stringify(e)}}function rfe(e){switch(e){case Y1:return"byte-order-mark";case Q1:return"doc-mode";case X1:return"flow-error-end";case Z1:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
226
- `:case`\r
227
- `: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(e[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}cr.createScalarToken=K1.createScalarToken;cr.resolveAsScalar=K1.resolveAsScalar;cr.setScalarValue=K1.setScalarValue;cr.stringify=Qle.stringify;cr.visit=Xle.visit;cr.BOM=Y1;cr.DOCUMENT=Q1;cr.FLOW_END=X1;cr.SCALAR=Z1;cr.isCollection=Zle;cr.isScalar=efe;cr.prettyToken=tfe;cr.tokenType=rfe});var rw=x(n4=>{"use strict";p();var zl=py();function pn(e){switch(e){case void 0:case" ":case`
228
- `:case"\r":case" ":return!0;default:return!1}}var r4=new Set("0123456789ABCDEFabcdef"),nfe=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),dy=new Set(",[]{}"),ife=new Set(` ,[]{}
229
- \r `),ew=e=>!e||ife.has(e),tw=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(t,r=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!r;let n=this.next??"stream";for(;n&&(r||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let t=this.pos,r=this.buffer[t];for(;r===" "||r===" ";)r=this.buffer[++t];return!r||r==="#"||r===`
230
- `?!0:r==="\r"?this.buffer[t+1]===`
231
- `:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let r=this.buffer[t];if(this.indentNext>0){let n=0;for(;r===" ";)r=this.buffer[++n+t];if(r==="\r"){let i=this.buffer[n+t+1];if(i===`
232
- `||!i&&!this.atEnd)return t+n+1}return r===`
233
- `||n>=this.indentNext||!r&&!this.atEnd?t+n:-1}if(r==="-"||r==="."){let n=this.buffer.substr(t,3);if((n==="---"||n==="...")&&pn(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
234
- `,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){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 t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===zl.BOM&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let r=t.length,n=t.indexOf("#");for(;n!==-1;){let s=t[n-1];if(s===" "||s===" "){r=n-1;break}else n=t.indexOf("#",n+1)}for(;;){let s=t[r-1];if(s===" "||s===" ")r-=1;else break}let i=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){let r=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-r),yield*this.pushNewline(),"stream"}return yield zl.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let r=this.peek(3);if((r==="---"||r==="...")&&pn(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&&!pn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[t,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&pn(r)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let t=this.getLine();if(t===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(t[r]){case"#":yield*this.pushCount(t.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(ew),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,r,n=-1;do t=yield*this.pushNewline(),t>0?(r=yield*this.pushSpaces(!1),this.indentValue=n=r):r=0,r+=yield*this.pushSpaces(!0);while(t+r>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&i[0]!=="#"||n===0&&(i.startsWith("---")||i.startsWith("..."))&&pn(i[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield zl.FLOW_END,yield*this.parseLineStart();let s=0;for(;i[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),i[s]){case void 0:return"flow";case"#":return yield*this.pushCount(i.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(ew),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||pn(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 t=this.charAt(0),r=this.buffer.indexOf(t,this.pos+1);if(t==="'")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 n=this.buffer.substring(0,r),i=n.indexOf(`
235
- `,this.pos);if(i!==-1){for(;i!==-1;){let s=this.continueScalar(i+1);if(s===-1)break;i=n.indexOf(`
236
- `,s)}i!==-1&&(r=i-(n[i-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 t=this.pos;for(;;){let r=this.buffer[++t];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=>pn(r)||r==="#")}*parseBlockScalar(){let t=this.pos-1,r=0,n;e:for(let s=this.pos;n=this.buffer[s];++s)switch(n){case" ":r+=1;break;case`
237
- `:t=s,r=0;break;case"\r":{let a=this.buffer[s+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===`
238
- `)break}default:break e}if(!n&&!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(t+1);if(s===-1)break;t=this.buffer.indexOf(`
239
- `,s)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let i=t+1;for(n=this.buffer[i];n===" ";)n=this.buffer[++i];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
240
- `;)n=this.buffer[++i];t=i-1}else if(!this.blockScalarKeep)do{let s=t-1,a=this.buffer[s];a==="\r"&&(a=this.buffer[--s]);let o=s;for(;a===" ";)a=this.buffer[--s];if(a===`
241
- `&&s>=this.pos&&s+1+r>o)t=s;else break}while(!0);return yield zl.SCALAR,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let t=this.flowLevel>0,r=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){let s=this.buffer[n+1];if(pn(s)||t&&dy.has(s))break;r=n}else if(pn(i)){let s=this.buffer[n+1];if(i==="\r"&&(s===`
242
- `?(n+=1,i=`
243
- `,s=this.buffer[n+1]):r=n),s==="#"||t&&dy.has(s))break;if(i===`
244
- `){let a=this.continueScalar(n+1);if(a===-1)break;n=Math.max(n,a-2)}}else{if(t&&dy.has(i))break;r=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield zl.SCALAR,yield*this.pushToIndex(r+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,r){let n=this.buffer.slice(this.pos,t);return n?(yield n,this.pos+=n.length,n.length):(r&&(yield""),0)}*pushIndicators(){let t=0;e:for(;;){switch(this.charAt(0)){case"!":t+=yield*this.pushTag(),t+=yield*this.pushSpaces(!0);continue e;case"&":t+=yield*this.pushUntil(ew),t+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let r=this.flowLevel>0,n=this.charAt(1);if(pn(n)||r&&dy.has(n)){r?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,t+=yield*this.pushCount(1),t+=yield*this.pushSpaces(!0);continue e}}}break e}return t}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,r=this.buffer[t];for(;!pn(r)&&r!==">";)r=this.buffer[++t];return yield*this.pushToIndex(r===">"?t+1:t,!1)}else{let t=this.pos+1,r=this.buffer[t];for(;r;)if(nfe.has(r))r=this.buffer[++t];else if(r==="%"&&r4.has(this.buffer[t+1])&&r4.has(this.buffer[t+2]))r=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){let t=this.buffer[this.pos];return t===`
245
- `?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
246
- `?yield*this.pushCount(2):0}*pushSpaces(t){let r=this.pos-1,n;do n=this.buffer[++r];while(n===" "||t&&n===" ");let i=r-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=r),i}*pushUntil(t){let r=this.pos,n=this.buffer[r];for(;!t(n);)n=this.buffer[++r];return yield*this.pushToIndex(r,!1)}};n4.Lexer=tw});var iw=x(i4=>{"use strict";p();var nw=class{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let r=0,n=this.lineStarts.length;for(;r<n;){let s=r+n>>1;this.lineStarts[s]<t?r=s+1:n=s}if(this.lineStarts[r]===t)return{line:r+1,col:1};if(r===0)return{line:0,col:t};let i=this.lineStarts[r-1];return{line:r,col:t-i+1}}}};i4.LineCounter=nw});var aw=x(u4=>{"use strict";p();var sfe=oe("process"),s4=py(),afe=rw();function ns(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function a4(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function c4(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function hy(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function gc(e){if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function my(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r<t.length;++r)e.push(t[r])}function o4(e){if(e.start.type==="flow-seq-start")for(let t of e.items)t.sep&&!t.value&&!ns(t.start,"explicit-key-ind")&&!ns(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,c4(t.value)?t.value.end?my(t.value.end,t.sep):t.value.end=t.sep:my(t.start,t.sep),delete t.sep)}var sw=class{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new afe.Lexer,this.onNewLine=t}*parse(t,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(t,r))yield*this.next(n);r||(yield*this.end())}*next(t){if(this.source=t,sfe.env.LOG_TOKENS&&console.log("|",s4.prettyToken(t)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}let r=s4.tokenType(t);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+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{let n=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:t}),this.offset+=t.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 t=this.peek(1);if(this.type==="doc-end"&&t?.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(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){let r=t??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 n=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in n?n.indent:0:r.type==="flow-collection"&&n.type==="document"&&(r.indent=0),r.type==="flow-collection"&&o4(r),n.type){case"document":n.value=r;break;case"block-scalar":n.props.push(r);break;case"block-map":{let i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=r;else{Object.assign(i,{key:r,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:r}):i.value=r;break}case"flow-collection":{let i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:r,sep:[]}):i.sep?i.value=r:Object.assign(i,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){let i=r.items[r.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&a4(i.start)===-1&&(r.indent===0||i.start.every(s=>s.type!=="comment"||s.indent<r.indent))&&(n.type==="document"?n.end=i.start:n.items.push({start:i.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 t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{a4(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}let r=this.startBlockValue(t);r?this.stack.push(r):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){let r=hy(this.peek(2)),n=gc(r),i;t.end?(i=t.end,i.push(this.sourceToken),delete t.end):i=[this.sourceToken];let s={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:n,key:t,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let r=this.source.indexOf(`
247
- `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
248
- `,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){let r=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):t.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)t.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,t.indent)){let i=t.items[t.items.length-2]?.value?.end;if(Array.isArray(i)){my(i,r.start),i.push(this.sourceToken),t.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=t.indent){let n=!this.onKeyLine&&this.indent===t.indent,i=n&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind",s=[];if(i&&r.sep&&!r.value){let a=[];for(let o=0;o<r.sep.length;++o){let c=r.sep[o];switch(c.type){case"newline":a.push(o);break;case"space":break;case"comment":c.indent>t.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":i||r.value?(s.push(this.sourceToken),t.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):i||r.value?(s.push(this.sourceToken),t.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)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ns(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(c4(r.key)&&!ns(r.sep,"newline")){let a=gc(r.start),o=r.key,c=r.sep;c.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:c}]})}else s.length>0?r.sep=r.sep.concat(s,this.sourceToken):r.sep.push(this.sourceToken);else if(ns(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{let a=gc(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||i?t.items.push({start:s,key:null,sep:[this.sourceToken]}):ns(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);i||r.value?(t.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(t);if(a){if(a.type==="block-seq"){if(!r.explicitKey&&r.sep&&!ns(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 n&&t.items.push({start:s});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){let r=t.items[t.items.length-1];switch(this.type){case"newline":if(r.value){let n="end"in r.value?r.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,t.indent)){let i=t.items[t.items.length-2]?.value?.end;if(Array.isArray(i)){my(i,r.start),i.push(this.sourceToken),t.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=t.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;r.value||ns(r.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>t.indent){let n=this.startBlockValue(t);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){let r=t.items[t.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?t.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?t.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?t.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 i=this.flowScalar(this.type);!r||r.value?t.items.push({start:[],key:i,sep:[]}):r.sep?this.stack.push(i):Object.assign(r,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}let n=this.startBlockValue(t);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===t.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let i=hy(n),s=gc(i);o4(t);let a=t.end.splice(1,t.end.length);a.push(this.sourceToken);let o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:s,key:t,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let r=this.source.indexOf(`
249
- `)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
250
- `,r)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){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=hy(t),n=gc(r);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let r=hy(t),n=gc(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,r){return this.type!=="comment"||this.indent<=r?!1:t.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){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:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};u4.Parser=sw});var h4=x(Gl=>{"use strict";p();var l4=W1(),ofe=jl(),Wl=Vl(),cfe=HT(),ufe=Se(),lfe=iw(),f4=aw();function p4(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new lfe.LineCounter||null,prettyErrors:t}}function ffe(e,t={}){let{lineCounter:r,prettyErrors:n}=p4(t),i=new f4.Parser(r?.addNewLine),s=new l4.Composer(t),a=Array.from(s.compose(i.parse(e)));if(n&&r)for(let o of a)o.errors.forEach(Wl.prettifyError(e,r)),o.warnings.forEach(Wl.prettifyError(e,r));return a.length>0?a:Object.assign([],{empty:!0},s.streamInfo())}function d4(e,t={}){let{lineCounter:r,prettyErrors:n}=p4(t),i=new f4.Parser(r?.addNewLine),s=new l4.Composer(t),a=null;for(let o of s.compose(i.parse(e),!0,e.length))if(!a)a=o;else if(a.options.logLevel!=="silent"){a.errors.push(new Wl.YAMLParseError(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&r&&(a.errors.forEach(Wl.prettifyError(e,r)),a.warnings.forEach(Wl.prettifyError(e,r))),a}function pfe(e,t,r){let n;typeof t=="function"?n=t:r===void 0&&t&&typeof t=="object"&&(r=t);let i=d4(e,r);if(!i)return null;if(i.warnings.forEach(s=>cfe.warn(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},r))}function dfe(e,t,r){let n=null;if(typeof t=="function"||Array.isArray(t)?n=t:r===void 0&&t&&(r=t),typeof r=="string"&&(r=r.length),typeof r=="number"){let i=Math.round(r);r=i<1?void 0:i>8?{indent:8}:{indent:i}}if(e===void 0){let{keepUndefined:i}=r??t??{};if(!i)return}return ufe.isDocument(e)&&!n?e.toString(r):new ofe.Document(e,n,r).toString(r)}Gl.parse=pfe;Gl.parseAllDocuments=ffe;Gl.parseDocument=d4;Gl.stringify=dfe});var g4=x(qe=>{"use strict";p();var hfe=W1(),mfe=jl(),gfe=E1(),ow=Vl(),yfe=Sl(),is=Se(),_fe=Zi(),vfe=mt(),bfe=ts(),kfe=rs(),Sfe=py(),Tfe=rw(),wfe=iw(),xfe=aw(),gy=h4(),m4=_l();qe.Composer=hfe.Composer;qe.Document=mfe.Document;qe.Schema=gfe.Schema;qe.YAMLError=ow.YAMLError;qe.YAMLParseError=ow.YAMLParseError;qe.YAMLWarning=ow.YAMLWarning;qe.Alias=yfe.Alias;qe.isAlias=is.isAlias;qe.isCollection=is.isCollection;qe.isDocument=is.isDocument;qe.isMap=is.isMap;qe.isNode=is.isNode;qe.isPair=is.isPair;qe.isScalar=is.isScalar;qe.isSeq=is.isSeq;qe.Pair=_fe.Pair;qe.Scalar=vfe.Scalar;qe.YAMLMap=bfe.YAMLMap;qe.YAMLSeq=kfe.YAMLSeq;qe.CST=Sfe;qe.Lexer=Tfe.Lexer;qe.LineCounter=wfe.LineCounter;qe.Parser=xfe.Parser;qe.parse=gy.parse;qe.parseAllDocuments=gy.parseAllDocuments;qe.parseDocument=gy.parseDocument;qe.stringify=gy.stringify;qe.visit=m4.visit;qe.visitAsync=m4.visitAsync});var yy=x(ss=>{"use strict";p();Object.defineProperty(ss,"__esModule",{value:!0});ss.ConvenienceSeverities=ss.LegacyIdentifiers=ss.ModernIdentifiers=void 0;var Jl=Zt();ss.ModernIdentifiers=["theme-check:nothing","theme-check:recommended","theme-check:theme-app-extension","theme-check:all"];ss.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"}));ss.ConvenienceSeverities={suggestion:Jl.Severity.WARNING,style:Jl.Severity.INFO,error:Jl.Severity.ERROR,warning:Jl.Severity.WARNING,info:Jl.Severity.INFO}});var S4=x(Yl=>{"use strict";p();var _4=Yl&&Yl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yl,"__esModule",{value:!0});Yl.readYamlConfigDescription=qfe;var v4=Zt(),Efe=oe("node:fs"),Afe=_4(oe("node:fs/promises")),Ofe=oe("node:module"),_y=_4(oe("node:path")),Pfe=g4(),Kl=yy(),uw=class extends Error{constructor(t,r){super(t),this.name="UnresolvedAliasError",this.message=`YAML parsing error: Unresolved alias *${r}.
251
- Did you forget to wrap your ignore statement in quotes? '*${r}'
252
- ${t}`}};function Nfe(e,t){try{let r=t.trim()===""?{}:(0,Pfe.parse)(t);if(!k4(r))throw new Error(`Expecting parsed contents of config file at path '${e}' 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 n=/: .*$/m.exec(r.message)[0].slice(2);throw new uw(r.message,n)}else throw r}}async function qfe(e,t=!1){let r=_y.default.dirname(e),n=await Afe.default.readFile(e,"utf8"),i=Nfe(e,n),s={checkSettings:{},ignore:[],extends:[],require:[]};i.root&&(s.root=i.root,delete i.root),i.ignore&&(s.ignore=cw(i.ignore),delete i.ignore),i.require&&(s.require=cw(i.require).map(a=>b4(r,a)).filter(lw),delete i.require),i.extends?(s.extends=cw(i.extends).map(a=>y4(r,a)).filter(lw),delete i.extends):t&&(s.extends=[y4(r,"theme-check:recommended")]),i.context&&(v4.Modes.includes(i.context)&&(s.context=i.context),delete i.context),i.include_categories&&delete i.include_categories,i.exclude_categories&&delete i.exclude_categories;for(let[a,o]of Object.entries(i)){if(!k4(o))throw new Error(`Expected a plain object value for ${a} but got ${typeof o}`);s.checkSettings[a]=Lfe(o)}return s}function y4(e,t){return t.startsWith(":")||Kl.LegacyIdentifiers.has(t)?Kl.LegacyIdentifiers.get(t.replace(/^:/,"")):t.startsWith("theme-check:")?t:b4(e,t)}function b4(e,t){if(_y.default.isAbsolute(t))return t;if(t.startsWith("."))return _y.default.resolve(e,t);let r=(0,Ofe.createRequire)(_y.default.join(e,"__placeholder"));return(0,Efe.realpathSync)(r.resolve(t))}function Lfe(e){let t={enabled:e.enabled||!0};for(let[r,n]of Object.entries(e))t[Rfe(r)]=n;return e.ignore!==void 0&&Array.isArray(e.ignore)&&e.ignore.every(lw)&&(t.ignore=e.ignore),e.severity!==void 0&&(t.severity=Cfe(e.severity)),t}function Cfe(e){if(Ife(e))return Kl.ConvenienceSeverities[e];if(Mfe(e))return e;throw new Error(`Unsupported severity: ${e}. Try one of ${Object.keys(Kl.ConvenienceSeverities)}`)}function Ife(e){return typeof e=="string"&&e in Kl.ConvenienceSeverities}function Mfe(e){return typeof e=="number"&&e in v4.Severity}function Rfe(e){return e.replace(/_([a-z])/g,(t,r)=>r.toUpperCase())}function k4(e){return Object.prototype.toString.call(e)==="[object Object]"}function lw(e){return typeof e=="string"}function cw(e){return Array.isArray(e)?e:[e]}});var E4=x(fw=>{"use strict";p();Object.defineProperty(fw,"__esModule",{value:!0});fw.mergeFragments=Dfe;function Dfe(e,t){return{root:T4(e.map(r=>r.root),t.root),extends:[],ignore:e.flatMap(r=>r.ignore).concat(t.ignore),require:e.flatMap(r=>r.require).concat(t.require),checkSettings:e.map(r=>r.checkSettings).concat(t.checkSettings).reduce(x4),context:T4(e.map(r=>r.context),t.context)??"theme"}}function T4(e,t){return e.concat(t).filter(Boolean).pop()}function x4(e,t){let r={...e};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(w4(e[n])&&w4(t[n])?r[n]=x4(e[n],t[n]):r[n]=t[n]);return r}function w4(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}});var O4=x(Ql=>{"use strict";p();var jfe=Ql&&Ql.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ql,"__esModule",{value:!0});Ql.resolveConfig=pw;var A4=jfe(oe("node:path")),Ffe=S4(),Bfe=E4(),Vfe=yy(),$fe=()=>A4.default.resolve(__dirname,"./configs");async function pw(e,t=!1){if(Ufe(e)){let i=A4.default.join($fe(),e.replace(/^theme-check:/,"")+".yml");return pw(i)}let r=await(0,Ffe.readYamlConfigDescription)(e,t),n=await Promise.all(r.extends.map(i=>pw(i)));return(0,Bfe.mergeFragments)(n,r)}function Ufe(e){return Vfe.ModernIdentifiers.includes(e)}});var P4=x(vy=>{"use strict";p();Object.defineProperty(vy,"__esModule",{value:!0});vy.resolveConfig=void 0;var Hfe=O4();Object.defineProperty(vy,"resolveConfig",{enumerable:!0,get:function(){return Hfe.resolveConfig}})});var q4=x(gw=>{"use strict";p();Object.defineProperty(gw,"__esModule",{value:!0});gw.validateConfig=zfe;var mw=oe("node:assert");function zfe(e){for(let t of e.checks){let r=e.settings[t.meta.code];(0,mw.strict)(r,`Unexpected missing settings for ${t.meta.code} in validateConfig call`),Wfe(t.meta.code,t.meta.schema,r,!0)}}function Wfe(e,t,r,n){for(let i in t){let s=t[i],a=r[i];dw(i,a,s)}n&&Gfe(r),Jfe(e,t,r)}function Gfe(e){let{severity:t,enabled:r,ignore:n}=e;t===void 0||hw("severity","number",typeof t),hw("enabled","boolean",typeof r),n===void 0||N4("ignore",n)}function Jfe(e,t,r){let n=["enabled","severity","ignore"];for(let i in r)!(i in t)&&!n.includes(i)&&console.error(`Unexpected setting: ${i} for check ${e} found in configuration`)}function dw(e,t,r){let{type:n,optional:i,defaultValue:s,properties:a,itemType:o}=r.options;if(t===void 0){if(i!==!0&&s===void 0)throw new Error(`Missing required setting: ${e}`);return}if(!(s!==void 0&&t===s))switch(n){case"string":case"number":case"boolean":{hw(e,n,typeof t);break}case"object":{if(typeof t!="object"||t===null||Array.isArray(t))throw new Error(`Invalid type for setting ${e}: expected object, got ${typeof t}`);for(let c in a)dw(c,t[c],a[c]);break}case"array":{if(N4(e,t),o)for(let c of t)dw(e,c,o);break}default:throw new Error(`Unexpected setting type: ${n}`)}}function hw(e,t,r){mw.strict.strictEqual(r,t,`Invalid type for setting ${e}: expected ${t}, got ${r}`)}function N4(e,t){mw.strict.ok(Array.isArray(t),`Invalid type for setting ${e}: expected array, got ${typeof t}`)}});var L4=x(Xl=>{"use strict";p();var Kfe=Xl&&Xl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xl,"__esModule",{value:!0});Xl.loadConfig=epe;var Yfe=AF(),Qfe=P4(),Xfe=q4(),Zfe=Kfe(oe("fs/promises"));async function epe(e,t){if(!t)throw new Error("loadConfig cannot be called without a root argument");let r="theme-check:recommended";e||(await Zfe.default.readdir(t)).some(a=>a.endsWith(".extension.toml")||a.endsWith(".app.toml"))&&(r="theme-check:theme-app-extension");let n=await(0,Qfe.resolveConfig)(e??r,!0),i=await(0,Yfe.loadConfigDescription)(n,t);return(0,Xfe.validateConfig)(i),i}});var C4=x(Zl=>{"use strict";p();var tpe=Zl&&Zl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zl,"__esModule",{value:!0});Zl.findConfigPath=spe;var rpe=tpe(oe("node:path")),npe=xT(),ipe=[".theme-check.yml"];function spe(e){let t=ipe.map(r=>rpe.default.join(e,r));return ape(t,npe.fileExists)}async function ape(e,t){for(let r of e)if(await t(r))return r}});var I4=x(yc=>{"use strict";p();Object.defineProperty(yc,"__esModule",{value:!0});yc.findConfigPath=yc.loadConfig=void 0;var ope=L4();Object.defineProperty(yc,"loadConfig",{enumerable:!0,get:function(){return ope.loadConfig}});var cpe=C4();Object.defineProperty(yc,"findConfigPath",{enumerable:!0,get:function(){return cpe.findConfigPath}})});var M4=x(_c=>{"use strict";p();var upe=_c&&_c.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_c,"__esModule",{value:!0});_c.NodeFileSystem=void 0;var as=Zt(),yw=upe(oe("node:fs/promises"));_c.NodeFileSystem={async readFile(e){return yw.default.readFile(as.path.fsPath(e),"utf8")},async readDirectory(e){return(await yw.default.readdir(as.path.fsPath(e),{withFileTypes:!0})).map(r=>[as.path.join(e,r.name),r.isDirectory()?as.FileType.Directory:as.FileType.File])},async stat(e){try{let t=await yw.default.stat(as.path.fsPath(e));return{type:t.isDirectory()?as.FileType.Directory:as.FileType.File,size:t.size}}catch(t){throw new Error(`Failed to get file stat: ${t}`)}}}});var Tpe=x(st=>{"use strict";p();var lpe=st&&st.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),D4=st&&st.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&lpe(t,e,r)},j4=st&&st.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(st,"__esModule",{value:!0});st.loadConfig=st.NodeFileSystem=void 0;st.toSourceCode=B4;st.check=kpe;st.checkAndAutofix=Spe;st.themeCheckRun=_w;st.getThemeAndConfig=V4;st.getTheme=$4;st.getThemeFilesPathPattern=U4;var gt=Zt(),fpe=R2(),ppe=G2(),dpe=ce(),hpe=j4(oe("node:fs/promises")),ef=j4(oe("node:path")),mpe=oe("node:util"),F4=Su(),gpe=_g(),ype=bF(),R4=I4(),vc=M4();Object.defineProperty(st,"NodeFileSystem",{enumerable:!0,get:function(){return vc.NodeFileSystem}});var _pe=oe("node:url"),vpe=(0,mpe.promisify)(gpe);D4(Zt(),st);D4(yy(),st);var bpe=async(e,t)=>(e??=await(0,R4.findConfigPath)(t),(0,R4.loadConfig)(e,t));st.loadConfig=bpe;async function B4(e){try{let t=await hpe.default.readFile(e,"utf8");return(0,gt.toSourceCode)(gt.path.normalize(F4.URI.file(e)),t)}catch{return}}async function kpe(e,t){return(await _w(e,t)).offenses}async function Spe(e,t){let{theme:r,offenses:n}=await _w(e,t);await(0,ype.autofix)(r,n)}async function _w(e,t,r=()=>{}){let{theme:n,config:i}=await V4(e,t),s=new ppe.ThemeLiquidDocsManager(r),o=(await gt.JSONValidator.create(s,i))?.isValid,c=n.map(k=>(0,gt.toSchema)(i.context,k.uri,k,o)),l=new Map(n.filter(k=>(0,gt.isBlock)(k.uri)).map(k=>[ef.default.basename(k.uri,".liquid"),(0,gt.memo)(async()=>(0,gt.toSchema)(i.context,k.uri,k,o))])),f=new Map(n.filter(k=>(0,gt.isSection)(k.uri)).map(k=>[ef.default.basename(k.uri,".liquid"),(0,gt.memo)(async()=>(0,gt.toSchema)(i.context,k.uri,k,o))])),m=new Map(n.map(k=>[ef.default.relative(F4.URI.file(e).toString(),k.uri),(0,gt.memo)(async()=>{let w=k.ast;if((0,dpe.isLiquidHtmlNode)(w)&&(0,gt.filePathSupportsLiquidDoc)(k.uri))return(0,gt.extractDocDefinition)(k.uri,w)})])),d=new Map(n.filter(k=>k.uri.endsWith(".liquid")).map(k=>[k.uri,(0,gt.memo)(async()=>(0,gt.extractCSSClassesFromLiquidUri)(k.uri,vc.NodeFileSystem))]));try{let k=gt.path.join(i.rootUri,"assets"),w=await vc.NodeFileSystem.readDirectory(k);for(let[T]of w.filter(([y])=>y.endsWith(".css")))d.set(T,(0,gt.memo)(async()=>(0,gt.extractCSSClassesFromAssetUri)(T,vc.NodeFileSystem)))}catch{}let g=async k=>f.get(k)?.(),v=async k=>l.get(k)?.(),b;try{b=await(0,fpe.buildThemeGraph)(i.rootUri,{fs:vc.NodeFileSystem,getSectionSchema:g,getBlockSchema:v,getWebComponentDefinitionReference:()=>{},mode:i.context})}catch{}let _=await(0,gt.check)(n,i,{fs:vc.NodeFileSystem,themeDocset:s,jsonValidationSet:s,getSectionSchema:g,getBlockSchema:v,getAppBlockSchema:async k=>l.get(k)?.(),getDocDefinition:async k=>m.get(k)?.(),getCSSClassesForURI:async k=>d.get(k)?.()??new Set,async getReferences(k){return b?b.modules[k]?.references??[]:[]},async getDependencies(k){return b?b.modules[k]?.dependencies??[]:[]}});return{theme:n,config:i,offenses:_}}async function V4(e,t){let r=await(0,st.loadConfig)(t,e);return{theme:await $4(r),config:r}}async function $4(e){let t=U4(e.rootUri),r=await vpe(t,{absolute:!0}).then(i=>i.filter(s=>!(0,gt.isIgnored)(s,e)));return(await Promise.all(r.map(B4))).filter(i=>i!==void 0)}function U4(e){return ef.default.normalize(ef.default.join((0,_pe.fileURLToPath)(e),"**/*.{liquid,json}")).replace(/\\/g,"/")}});export{Cy as a,ce as b,FP as c,Su as d,ed as e,De as f,ue as g,ti as h,Nu as i,rd as j,nd as k,Li as l,id as m,It as n,gr as o,Ci as p,Gt as q,qu as r,Lu as s,sd as t,wn as u,Xs as v,Mt as w,et as x,ad as y,Eo as z,od as A,Ao as B,cd as C,ud as D,ld as E,yr as F,fd as G,pd as H,dd as I,md as J,gd as K,yd as L,Zs as M,$b as N,nr as O,GG as P,Nq as Q,Oo as R,rve as S,zb as T,ea as U,vL as V,bL as W,Zt as X,R2 as Y,G2 as Z,aT as _,gg as $,oF as aa,yF as ba,g4 as ca,Tpe as da};
253
- /*! Bundled license information:
254
-
255
- isobject/index.js:
256
- (*!
257
- * isobject <https://github.com/jonschlinkert/isobject>
258
- *
259
- * Copyright (c) 2014-2015, Jon Schlinkert.
260
- * Licensed under the MIT License.
261
- *)
262
-
263
- line-column/lib/line-column.js:
264
- (**
265
- * line-column - Convert efficiently index to/from line-column in a string
266
- * @module lineColumn
267
- * @license MIT
268
- *)
269
-
270
- cssesc/cssesc.js:
271
- (*! https://mths.be/cssesc v3.0.0 by @mathias *)
272
- */