@bkm016/basalt 0.0.0-stage → 0.1.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 (252) hide show
  1. package/README.md +275 -2
  2. package/chunk-0hbjv3y6.js +11 -0
  3. package/chunk-0rya8cxe.js +3 -0
  4. package/chunk-0szjy61m.js +2 -0
  5. package/chunk-0tdv0t5q.js +3 -0
  6. package/chunk-1egbcp85.js +59 -0
  7. package/chunk-1fv27j4b.js +3 -0
  8. package/chunk-1yzt0qm0.js +2 -0
  9. package/chunk-2zqny2sy.js +2 -0
  10. package/chunk-32at88hc.js +3 -0
  11. package/chunk-356q8e0y.js +10 -0
  12. package/chunk-3jz9g8ab.js +10 -0
  13. package/chunk-3p7q2pyp.js +3 -0
  14. package/chunk-501zkf9b.js +3 -0
  15. package/chunk-58vz2qsq.js +2 -0
  16. package/chunk-5fdgy0q2.js +16 -0
  17. package/chunk-5wp4egky.js +7 -0
  18. package/chunk-665jzf2w.js +25 -0
  19. package/chunk-6gyhajhx.js +3 -0
  20. package/chunk-7yw8aa5j.js +31 -0
  21. package/chunk-8wjgbd9k.js +3 -0
  22. package/chunk-913tfr9c.js +2 -0
  23. package/chunk-97kjn55j.js +2 -0
  24. package/chunk-9y69ywyg.js +3 -0
  25. package/chunk-a6r4z44b.js +2 -0
  26. package/chunk-agntrqs9.js +2 -0
  27. package/chunk-b9bg5fhd.js +2 -0
  28. package/chunk-bj14jshr.js +3 -0
  29. package/chunk-c25s4w6a.js +5 -0
  30. package/chunk-d48bfd2e.js +3 -0
  31. package/chunk-d913kpyw.js +3 -0
  32. package/chunk-dakrpbe6.js +3 -0
  33. package/chunk-g2k3yhgh.js +12 -0
  34. package/chunk-hat3s3pr.js +3 -0
  35. package/chunk-hcn9cf6v.js +2 -0
  36. package/chunk-j2x0g1vg.js +2 -0
  37. package/chunk-k0t23cmx.js +2 -0
  38. package/chunk-k7w7ac9q.js +18 -0
  39. package/chunk-kgdrjqsy.js +3 -0
  40. package/chunk-kjr81mrd.js +9 -0
  41. package/chunk-m38ber71.js +2 -0
  42. package/chunk-n6e43rvk.js +3 -0
  43. package/chunk-qbf8x2ft.js +5 -0
  44. package/chunk-qcwnkr5y.js +2 -0
  45. package/chunk-qffb7een.js +3 -0
  46. package/chunk-qnr1f5pj.js +3 -0
  47. package/chunk-r9aatvwm.js +3 -0
  48. package/chunk-rad3dm0q.js +2 -0
  49. package/chunk-rjdhaasf.js +3 -0
  50. package/chunk-rm3kcxq9.js +20 -0
  51. package/chunk-rv06x0kn.js +7 -0
  52. package/chunk-sf13azm4.js +12 -0
  53. package/chunk-sytpmbfp.js +471 -0
  54. package/chunk-t057xfrt.js +5 -0
  55. package/chunk-tjpvayr1.js +2 -0
  56. package/chunk-tnrqkc7b.js +8 -0
  57. package/chunk-v9fea96h.js +3 -0
  58. package/chunk-ve7qx8wm.js +3 -0
  59. package/chunk-vkkj4awb.js +2 -0
  60. package/chunk-wc5j0hfw.js +39 -0
  61. package/chunk-wd9zxhza.js +2 -0
  62. package/chunk-wx7kdf0b.js +2 -0
  63. package/chunk-x9982ek7.js +25 -0
  64. package/chunk-xhk54h2q.js +7 -0
  65. package/chunk-xsbxykr4.js +2 -0
  66. package/chunk-y69ewdn2.js +3 -0
  67. package/chunk-y8ced1jm.js +5 -0
  68. package/chunk-y9xe9ct2.js +2 -0
  69. package/chunk-yb1jxgnk.js +2 -0
  70. package/chunk-zt1wvkyf.js +3 -0
  71. package/compiled.js +3773 -0
  72. package/icon-dp9pmcvp.png +0 -0
  73. package/package.json +20 -4
  74. package/ui-test-worker.js +226 -0
  75. package/web/KaTeX_AMS-Regular-n7eqehx2.woff2 +0 -0
  76. package/web/KaTeX_Caligraphic-Bold-20r3b6fv.woff2 +0 -0
  77. package/web/KaTeX_Caligraphic-Regular-kkjm8f18.woff2 +0 -0
  78. package/web/KaTeX_Fraktur-Bold-pz5vg4t0.woff2 +0 -0
  79. package/web/KaTeX_Fraktur-Regular-a1e9wkwk.woff2 +0 -0
  80. package/web/KaTeX_Main-Bold-mcp098h8.woff2 +0 -0
  81. package/web/KaTeX_Main-BoldItalic-fy74z249.woff2 +0 -0
  82. package/web/KaTeX_Main-Italic-hw2gxy7f.woff2 +0 -0
  83. package/web/KaTeX_Main-Regular-xvp1b75c.woff2 +0 -0
  84. package/web/KaTeX_Math-BoldItalic-mf5nf33d.woff2 +0 -0
  85. package/web/KaTeX_Math-Italic-ap60jrna.woff2 +0 -0
  86. package/web/KaTeX_SansSerif-Bold-we3bymb6.woff2 +0 -0
  87. package/web/KaTeX_SansSerif-Italic-ent92bjx.woff2 +0 -0
  88. package/web/KaTeX_SansSerif-Regular-0573pbz9.woff2 +0 -0
  89. package/web/KaTeX_Script-Regular-z2rtj6vq.woff2 +0 -0
  90. package/web/KaTeX_Size1-Regular-dfr3w1hv.woff2 +0 -0
  91. package/web/KaTeX_Size2-Regular-kted78zb.woff2 +0 -0
  92. package/web/KaTeX_Size3-Regular-e6k1k5jk.woff2 +0 -0
  93. package/web/KaTeX_Size4-Regular-abedc1pd.woff2 +0 -0
  94. package/web/KaTeX_Typewriter-Regular-scw9zx1z.woff2 +0 -0
  95. package/web/apple-touch-icon-7dkm33qp.png +0 -0
  96. package/web/apple-touch-icon.png +0 -0
  97. package/web/chunk-00mq7bhx.js +1 -0
  98. package/web/chunk-0atfn8jf.js +1 -0
  99. package/web/chunk-0k0hvh59.js +40 -0
  100. package/web/chunk-0mrkjnte.js +1 -0
  101. package/web/chunk-0pbjgdgp.js +2 -0
  102. package/web/chunk-0s80zw00.js +1 -0
  103. package/web/chunk-0xck277j.js +140 -0
  104. package/web/chunk-1t760bg0.js +1 -0
  105. package/web/chunk-1v3d60pp.js +217 -0
  106. package/web/chunk-1x8fn8w9.js +1 -0
  107. package/web/chunk-20q90epj.js +2 -0
  108. package/web/chunk-24mfx6w1.js +2 -0
  109. package/web/chunk-29e1trsq.js +78 -0
  110. package/web/chunk-2j4m0bh1.js +2 -0
  111. package/web/chunk-310yey4q.js +1 -0
  112. package/web/chunk-32ezm0ry.js +1136 -0
  113. package/web/chunk-3ahpr030.js +2 -0
  114. package/web/chunk-3bqh2dkw.js +7 -0
  115. package/web/chunk-3cfabjey.js +370 -0
  116. package/web/chunk-3hvgs5aw.js +1 -0
  117. package/web/chunk-3kh6zefg.js +1 -0
  118. package/web/chunk-3pf33xsm.js +98 -0
  119. package/web/chunk-3pm4645m.js +2 -0
  120. package/web/chunk-401v5ht6.js +8 -0
  121. package/web/chunk-4b5mt5pd.js +70 -0
  122. package/web/chunk-4gavbw65.js +1 -0
  123. package/web/chunk-4rm1vy7w.js +1 -0
  124. package/web/chunk-4wd9r73y.js +1 -0
  125. package/web/chunk-4y2td14d.js +24 -0
  126. package/web/chunk-54thej0t.js +2 -0
  127. package/web/chunk-55kw67nv.js +1 -0
  128. package/web/chunk-59kqahb3.js +1 -0
  129. package/web/chunk-5hex8g0y.js +24 -0
  130. package/web/chunk-5r5kv4gh.js +1 -0
  131. package/web/chunk-6atq9qtt.js +7 -0
  132. package/web/chunk-6beqrmtq.js +1 -0
  133. package/web/chunk-6m69hczt.js +2 -0
  134. package/web/chunk-6r912gfj.js +34 -0
  135. package/web/chunk-74j07k8k.js +2 -0
  136. package/web/chunk-7f0m2yrd.js +169 -0
  137. package/web/chunk-8g239029.js +1 -0
  138. package/web/chunk-942prjb6.js +332 -0
  139. package/web/chunk-95q1bwxn.js +1 -0
  140. package/web/chunk-9s7c178f.js +1 -0
  141. package/web/chunk-9v1f6yc8.js +1 -0
  142. package/web/chunk-a3xt6840.js +38 -0
  143. package/web/chunk-ad6x47yy.js +1 -0
  144. package/web/chunk-b5brnfv9.js +2 -0
  145. package/web/chunk-benmmqt2.js +1 -0
  146. package/web/chunk-bgqdcnke.js +1 -0
  147. package/web/chunk-bhe4jzha.js +1 -0
  148. package/web/chunk-bwyw10wx.js +39 -0
  149. package/web/chunk-c85wxnpw.js +292 -0
  150. package/web/chunk-canbct9d.js +55 -0
  151. package/web/chunk-cg3jterp.js +2 -0
  152. package/web/chunk-d18r4m14.js +141 -0
  153. package/web/chunk-d4d3mnak.js +84 -0
  154. package/web/chunk-dmqtdeb4.js +1 -0
  155. package/web/chunk-dy2gm1fs.js +1 -0
  156. package/web/chunk-e5rmr47n.js +2 -0
  157. package/web/chunk-ea9swkkt.js +1 -0
  158. package/web/chunk-ejd43q75.js +19 -0
  159. package/web/chunk-eqegxtdt.js +1 -0
  160. package/web/chunk-ev1g5cqw.js +2 -0
  161. package/web/chunk-ezyvv4ab.js +3 -0
  162. package/web/chunk-f91wzwtk.js +1 -0
  163. package/web/chunk-fdkp6tzq.js +36 -0
  164. package/web/chunk-g1ev11wx.js +1 -0
  165. package/web/chunk-g9qv15hq.js +41 -0
  166. package/web/chunk-ghxe4gam.js +2 -0
  167. package/web/chunk-gmfp7fg4.js +1 -0
  168. package/web/chunk-gxay64d5.js +1 -0
  169. package/web/chunk-gxn0bey7.js +142 -0
  170. package/web/chunk-haphmhz8.js +200 -0
  171. package/web/chunk-hejz98gw.js +1 -0
  172. package/web/chunk-hfaffkrh.js +1 -0
  173. package/web/chunk-hp167dbv.js +1 -0
  174. package/web/chunk-hryhthxr.js +16 -0
  175. package/web/chunk-j2vt8c8v.js +1 -0
  176. package/web/chunk-jg6nzn6q.js +1 -0
  177. package/web/chunk-jtwhjp20.js +303 -0
  178. package/web/chunk-jvhmna7z.js +89 -0
  179. package/web/chunk-ka3q31t1.js +1 -0
  180. package/web/chunk-kbtbbarw.js +2 -0
  181. package/web/chunk-ktqt87qw.js +1 -0
  182. package/web/chunk-kx2xk3bb.js +1 -0
  183. package/web/chunk-m2d1sp30.js +1 -0
  184. package/web/chunk-mdsgekpk.js +1 -0
  185. package/web/chunk-mq92vqb1.js +2 -0
  186. package/web/chunk-n1dmrz44.js +2 -0
  187. package/web/chunk-n5fn9khr.js +1 -0
  188. package/web/chunk-n90cqdvg.js +2 -0
  189. package/web/chunk-nerx2q12.js +139 -0
  190. package/web/chunk-ngpq43vn.js +1 -0
  191. package/web/chunk-nj0cv1cq.js +257 -0
  192. package/web/chunk-nzey7cpv.js +1 -0
  193. package/web/chunk-p8y0hjx9.js +2 -0
  194. package/web/chunk-pxe3vna4.js +1 -0
  195. package/web/chunk-pz934t6t.js +30 -0
  196. package/web/chunk-r1dnh0s8.js +1 -0
  197. package/web/chunk-r5eakmw6.js +1 -0
  198. package/web/chunk-rkesqprv.js +1 -0
  199. package/web/chunk-rsn8j7xv.js +120 -0
  200. package/web/chunk-rtf2zzzv.js +1 -0
  201. package/web/chunk-ry9256r7.js +1 -0
  202. package/web/chunk-rykfak98.js +2 -0
  203. package/web/chunk-rz6wwdd5.js +106 -0
  204. package/web/chunk-s8vapqgr.js +12 -0
  205. package/web/chunk-sc63gh9d.js +2 -0
  206. package/web/chunk-srrfphes.js +1 -0
  207. package/web/chunk-svdzmaxb.js +2 -0
  208. package/web/chunk-svmhj9hd.js +1 -0
  209. package/web/chunk-t6agpn2z.js +1 -0
  210. package/web/chunk-tfyxp2qs.js +89 -0
  211. package/web/chunk-ts7zrf5b.js +2 -0
  212. package/web/chunk-ttg6tbwx.js +2 -0
  213. package/web/chunk-v47rhg7b.js +1 -0
  214. package/web/chunk-v5cnt7c8.js +1 -0
  215. package/web/chunk-v6v831tc.js +214 -0
  216. package/web/chunk-vadqkz3x.js +99 -0
  217. package/web/chunk-vfqdy860.js +1 -0
  218. package/web/chunk-vfqe8298.js +1 -0
  219. package/web/chunk-vqjs551t.js +7 -0
  220. package/web/chunk-wtawdeej.css +1 -0
  221. package/web/chunk-x3zwjkwg.js +62 -0
  222. package/web/chunk-x59p8sg2.js +1 -0
  223. package/web/chunk-x9q4kh67.js +4 -0
  224. package/web/chunk-xet1jjy9.js +1 -0
  225. package/web/chunk-xzp7jf7e.js +2 -0
  226. package/web/chunk-y7z144e3.js +1 -0
  227. package/web/chunk-ydgqrfvw.js +2 -0
  228. package/web/chunk-ydtrc1ay.js +2 -0
  229. package/web/chunk-yj1a2d37.js +1 -0
  230. package/web/chunk-ykxpb3wv.js +2 -0
  231. package/web/chunk-ytpwz01r.js +291 -0
  232. package/web/chunk-z09emmrb.js +1 -0
  233. package/web/chunk-z1jtv4c0.js +2 -0
  234. package/web/chunk-zakv2xdf.js +1 -0
  235. package/web/chunk-zbj1trar.js +2 -0
  236. package/web/chunk-zk2f7x5e.js +4 -0
  237. package/web/icon-192.png +0 -0
  238. package/web/icon-512.png +0 -0
  239. package/web/icon-maskable-512.png +0 -0
  240. package/web/icon-yx2p2pye.svg +13 -0
  241. package/web/icon.svg +13 -0
  242. package/web/index.html +23 -0
  243. package/web/install.ps1 +91 -0
  244. package/web/install.sh +177 -0
  245. package/web/inter-latin-wght-normal-an0py913.woff2 +0 -0
  246. package/web/jetbrains-mono-latin-wght-normal-hj2e42wt.woff2 +0 -0
  247. package/web/manifest-txf6vfbq.webmanifest +35 -0
  248. package/web/manifest.webmanifest +35 -0
  249. package/web/source-serif-4-latin-wght-italic-ta5tqqvz.woff2 +0 -0
  250. package/web/source-serif-4-latin-wght-normal-1yyvbhsz.woff2 +0 -0
  251. package/web/sw.js +90 -0
  252. package/worker.js +2 -0
@@ -0,0 +1,2 @@
1
+ var e=Object.freeze(JSON.parse('{"displayName":"Shell","name":"shellscript","patterns":[{"include":"#initial_context"}],"repository":{"alias_statement":{"begin":"[\\\\t ]*+(alias)[\\\\t ]*+((?:((?<!\\\\w)-\\\\w+)\\\\b[\\\\t ]*+)*)[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))","beginCaptures":{"1":{"name":"storage.type.alias.shell"},"2":{"patterns":[{"match":"(?<!\\\\w)-\\\\w+\\\\b","name":"string.unquoted.argument.shell constant.other.option.shell"}]},"3":{"name":"string.unquoted.argument.shell constant.other.option.shell"},"4":{"name":"variable.other.assignment.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"variable.other.assignment.shell"},"7":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"8":{"name":"punctuation.definition.array.access.shell"},"9":{"name":"keyword.operator.assignment.shell"},"10":{"name":"keyword.operator.assignment.compound.shell"},"11":{"name":"keyword.operator.assignment.compound.shell"}},"end":"(?=[\\\\t ]|$)|(?:(?:(?:(;)|(&&))|(\\\\|\\\\|))|(&))","endCaptures":{"1":{"name":"punctuation.terminator.statement.semicolon.shell"},"2":{"name":"punctuation.separator.statement.and.shell"},"3":{"name":"punctuation.separator.statement.or.shell"},"4":{"name":"punctuation.separator.statement.background.shell"}},"name":"meta.expression.assignment.alias.shell","patterns":[{"include":"#normal_context"}]},"argument":{"begin":"[\\\\t ]++(?![\\\\n#\\\\&(\\\\[|]|$|;)","beginCaptures":{},"end":"(?=[\\\\t \\\\&;|]|$|[\\\\n)`])","endCaptures":{},"name":"meta.argument.shell","patterns":[{"include":"#argument_context"},{"include":"#line_continuation"}]},"argument_context":{"patterns":[{"captures":{"1":{"name":"string.unquoted.argument.shell","patterns":[{"match":"\\\\*","name":"variable.language.special.wildcard.shell"},{"include":"#variable"},{"include":"#numeric_literal"},{"captures":{"1":{"name":"constant.language.$1.shell"}},"match":"(?<!\\\\w)\\\\b(true|false)\\\\b(?!\\\\w)"}]}},"match":"[\\\\t ]*+([^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\`|]+(?!>))"},{"include":"#normal_context"}]},"arithmetic_double":{"patterns":[{"begin":"\\\\(\\\\(","beginCaptures":{"0":{"name":"punctuation.section.arithmetic.double.shell"}},"end":"\\\\)\\\\s*\\\\)","endCaptures":{"0":{"name":"punctuation.section.arithmetic.double.shell"}},"name":"meta.arithmetic.shell","patterns":[{"include":"#math"},{"include":"#string"}]}]},"arithmetic_no_dollar":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.arithmetic.single.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.arithmetic.single.shell"}},"name":"meta.arithmetic.shell","patterns":[{"include":"#math"},{"include":"#string"}]}]},"array_access_inline":{"captures":{"1":{"name":"punctuation.section.array.shell"},"2":{"patterns":[{"include":"#special_expansion"},{"include":"#string"},{"include":"#variable"}]},"3":{"name":"punctuation.section.array.shell"}},"match":"(\\\\[)([^]\\\\[]+)(])"},"array_value":{"begin":"[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))[\\\\t ]*+(\\\\()","beginCaptures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"},"9":{"name":"punctuation.definition.array.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.array.shell"}},"patterns":[{"include":"#comment"},{"captures":{"1":{"name":"variable.other.assignment.array.shell entity.other.attribute-name.shell"},"2":{"name":"keyword.operator.assignment.shell punctuation.definition.assignment.shell"}},"match":"((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(=)"},{"captures":{"1":{"name":"punctuation.definition.bracket.named-array.shell"},"2":{"name":"string.unquoted.shell entity.other.attribute-name.bracket.shell"},"3":{"name":"punctuation.definition.bracket.named-array.shell"},"4":{"name":"punctuation.definition.assignment.shell"}},"match":"(\\\\[)(.+?)(])(=)"},{"include":"#normal_context"},{"include":"#simple_unquoted"}]},"assignment_statement":{"patterns":[{"include":"#array_value"},{"include":"#modified_assignment_statement"},{"include":"#normal_assignment_statement"}]},"basic_command_name":{"captures":{"1":{"name":"storage.modifier.$1.shell"},"2":{"name":"entity.name.function.call.shell entity.name.command.shell","patterns":[{"match":"(?<!\\\\w)(?:continue|return|break)(?!\\\\w)","name":"keyword.control.$0.shell"},{"match":"(?<!\\\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[.:])(?!/)(?!\\\\w)(?!-)","name":"support.function.builtin.shell"},{"include":"#variable"}]}},"match":"(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?:((?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$))|((?![\\"\']|\\\\\\\\\\\\n?$)[^\\\\t\\\\n\\\\r !\\"\'<>]+?))(?:(?=[\\\\t ])|(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\))","name":"meta.statement.command.name.basic.shell"},"block_comment":{"begin":"\\\\s*+(/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.shell"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.shell"}},"name":"comment.block.shell"},"boolean":{"match":"\\\\b(?:true|false)\\\\b","name":"constant.language.$0.shell"},"case_statement":{"begin":"\\\\b(case)\\\\b[\\\\t ]*+(.+?)[\\\\t ]*+\\\\b(in)\\\\b","beginCaptures":{"1":{"name":"keyword.control.case.shell"},"2":{"patterns":[{"include":"#initial_context"}]},"3":{"name":"keyword.control.in.shell"}},"end":"\\\\besac\\\\b","endCaptures":{"0":{"name":"keyword.control.esac.shell"}},"name":"meta.case.shell","patterns":[{"include":"#comment"},{"captures":{"1":{"name":"keyword.operator.pattern.case.default.shell"}},"match":"[\\\\t ]*+(\\\\* *\\\\))"},{"begin":"(?<!\\\\))(?![\\\\t ]*+(?:esac\\\\b|$))","beginCaptures":{},"end":"(?=\\\\besac\\\\b)|(\\\\))","endCaptures":{"1":{"name":"keyword.operator.pattern.case.shell"}},"name":"meta.case.entry.pattern.shell","patterns":[{"include":"#case_statement_context"}]},{"begin":"(?<=\\\\))","beginCaptures":{},"end":"(;;)|(?=\\\\besac\\\\b)","endCaptures":{"1":{"name":"punctuation.terminator.statement.case.shell"}},"name":"meta.case.entry.body.shell","patterns":[{"include":"#typical_statements"},{"include":"#initial_context"}]}]},"case_statement_context":{"patterns":[{"match":"\\\\*","name":"variable.language.special.quantifier.star.shell keyword.operator.quantifier.star.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"\\\\+","name":"variable.language.special.quantifier.plus.shell keyword.operator.quantifier.plus.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"\\\\?","name":"variable.language.special.quantifier.question.shell keyword.operator.quantifier.question.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"@","name":"variable.language.special.at.shell keyword.operator.at.shell punctuation.definition.regex.at.shell"},{"match":"\\\\|","name":"keyword.operator.orvariable.language.special.or.shell keyword.operator.alternation.ruby.shell punctuation.definition.regex.alternation.shell punctuation.separator.regex.alternation.shell"},{"match":"\\\\\\\\.","name":"constant.character.escape.shell"},{"match":"(?<=\\\\tin| in|[\\\\t ]|;;)\\\\(","name":"keyword.operator.pattern.case.shell"},{"begin":"(?<=\\\\S)(\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.group.shell punctuation.definition.regex.group.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.definition.regex.group.shell"}},"name":"meta.parenthese.shell","patterns":[{"include":"#case_statement_context"}]},{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.character-class.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.character-class.shell"}},"name":"string.regexp.character-class.shell","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.shell"}]},{"include":"#string"},{"match":"[^\\\\t\\\\n )*?@\\\\[|]","name":"string.unquoted.pattern.shell string.regexp.unquoted.shell"}]},"command_name_range":{"begin":"\\\\G","beginCaptures":{},"end":"(?=[\\\\t \\\\&;|]|$|[\\\\n)`])|(?=<)","endCaptures":{},"name":"meta.statement.command.name.shell","patterns":[{"match":"(?<!\\\\w)(?:continue|return|break)(?!\\\\w)","name":"entity.name.function.call.shell entity.name.command.shell keyword.control.$0.shell"},{"match":"(?<!\\\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[.:])(?!/)(?!\\\\w)(?!-)","name":"entity.name.function.call.shell entity.name.command.shell support.function.builtin.shell"},{"include":"#variable"},{"captures":{"1":{"name":"entity.name.function.call.shell entity.name.command.shell"}},"match":"(?<!\\\\w)(?<=\\\\G|[\\"\')}])([^\\\\t\\\\n\\\\r \\"\\\\&\');->`{|]+)"},{"begin":"(?:\\\\G|(?<![\\\\t\\\\n #\\\\&;{|]))(\\\\$?)((\\")|(\'))","beginCaptures":{"1":{"name":"meta.statement.command.name.quoted.shell punctuation.definition.string.shell entity.name.function.call.shell entity.name.command.shell"},"2":{},"3":{"name":"meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"},"4":{"name":"meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"}},"end":"(?<!\\\\G)(?<=\\\\2)","endCaptures":{},"patterns":[{"include":"#continuation_of_single_quoted_command_name"},{"include":"#continuation_of_double_quoted_command_name"}]},{"include":"#line_continuation"},{"include":"#simple_unquoted"}]},"command_statement":{"begin":"[\\\\t ]*+(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?!\\\\\\\\\\\\n?$)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.command.shell","patterns":[{"include":"#command_name_range"},{"include":"#line_continuation"},{"include":"#option"},{"include":"#argument"},{"include":"#string"},{"include":"#heredoc"}]},"comment":{"captures":{"1":{"name":"comment.line.number-sign.shell meta.shebang.shell"},"2":{"name":"punctuation.definition.comment.shebang.shell"},"3":{"name":"comment.line.number-sign.shell"},"4":{"name":"punctuation.definition.comment.shell"}},"match":"(?:^|[\\\\t ]++)(?:((#!).*)|((#).*))"},"comments":{"patterns":[{"include":"#block_comment"},{"include":"#line_comment"}]},"compound-command":{"patterns":[{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical-expression"},{"include":"#initial_context"}]},{"begin":"(?<=\\\\s|^)\\\\{(?=\\\\s|$)","beginCaptures":{"0":{"name":"punctuation.definition.group.shell"}},"end":"(?<=^|;)\\\\s*(})","endCaptures":{"1":{"name":"punctuation.definition.group.shell"}},"name":"meta.scope.group.shell","patterns":[{"include":"#initial_context"}]}]},"continuation_of_double_quoted_command_name":{"begin":"\\\\G(?<=\\")","beginCaptures":{},"contentName":"meta.statement.command.name.continuation string.quoted.double entity.name.function.call entity.name.command","end":"\\"","endCaptures":{"0":{"name":"string.quoted.double.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}},"patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},"continuation_of_single_quoted_command_name":{"begin":"\\\\G(?<=\')","beginCaptures":{},"contentName":"meta.statement.command.name.continuation string.quoted.single entity.name.function.call entity.name.command","end":"\'","endCaptures":{"0":{"name":"string.quoted.single.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}}},"custom_command_names":{"patterns":[]},"custom_commands":{"patterns":[]},"double_quote_context":{"patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},"double_quote_escape_char":{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\`]","name":"constant.character.escape.shell"},"floating_keyword":{"patterns":[{"match":"(?<=^|[\\\\t \\\\&;])(?:then|elif|else|done|end|do|if|fi)(?=[\\\\t \\\\&;]|$)","name":"keyword.control.$0.shell"}]},"for_statement":{"patterns":[{"begin":"\\\\b(for)\\\\b[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))[\\\\t ]*+\\\\b(in)\\\\b","beginCaptures":{"1":{"name":"keyword.control.for.shell"},"2":{"name":"variable.other.for.shell"},"3":{"name":"keyword.control.in.shell"}},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.for.in.shell","patterns":[{"include":"#string"},{"include":"#simple_unquoted"},{"include":"#normal_context"}]},{"begin":"\\\\b(for)\\\\b","beginCaptures":{"1":{"name":"keyword.control.for.shell"}},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.for.shell","patterns":[{"include":"#arithmetic_double"},{"include":"#normal_context"}]}]},"function_definition":{"applyEndPatternLast":1,"begin":"[\\\\t ]*+(?:\\\\b(function)\\\\b[\\\\t ]*+([^\\\\t\\\\n\\\\r \\"\'()=]+)(?:(\\\\()[\\\\t ]*+(\\\\)))?|([^\\\\t\\\\n\\\\r \\"\'()=]+)[\\\\t ]*+(\\\\()[\\\\t ]*+(\\\\)))","beginCaptures":{"1":{"name":"storage.type.function.shell"},"2":{"name":"entity.name.function.shell"},"3":{"name":"punctuation.definition.arguments.shell"},"4":{"name":"punctuation.definition.arguments.shell"},"5":{"name":"entity.name.function.shell"},"6":{"name":"punctuation.definition.arguments.shell"},"7":{"name":"punctuation.definition.arguments.shell"}},"end":"(?<=[)}])","endCaptures":{},"name":"meta.function.shell","patterns":[{"match":"\\\\G[\\\\t\\\\n ]"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"name":"meta.function.body.shell","patterns":[{"include":"#initial_context"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"name":"meta.function.body.shell","patterns":[{"include":"#initial_context"}]},{"include":"#initial_context"}]},"heredoc":{"patterns":[{"begin":"((?<!<)<<-)[\\\\t ]*+([\\"\'])[\\\\t ]*+([^\\"\']+?)(?=[\\"\\\\&\';<\\\\s])(\\\\2)(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.quote.shell"},"3":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"4":{"name":"punctuation.definition.string.heredoc.quote.shell"},"5":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.quoted.heredoc.indent.$3","end":"^\\\\t*\\\\3(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.$0.shell"}},"patterns":[]},{"begin":"((?<!<)<<(?!<))[\\\\t ]*+([\\"\'])[\\\\t ]*+([^\\"\']+?)(?=[\\"\\\\&\';<\\\\s])(\\\\2)(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.quote.shell"},"3":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"4":{"name":"punctuation.definition.string.heredoc.quote.shell"},"5":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.quoted.heredoc.no-indent.$3","end":"^\\\\3(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[]},{"begin":"((?<!<)<<-)[\\\\t ]*+([^\\\\t \\"\']+)(?=[\\"\\\\&\';<\\\\s])(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"3":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.unquoted.heredoc.indent.$2","end":"^\\\\t*\\\\2(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[{"include":"#double_quote_escape_char"},{"include":"#variable"},{"include":"#interpolation"}]},{"begin":"((?<!<)<<(?!<))[\\\\t ]*+([^\\\\t \\"\']+)(?=[\\"\\\\&\';<\\\\s])(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"3":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.unquoted.heredoc.no-indent.$2","end":"^\\\\2(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[{"include":"#double_quote_escape_char"},{"include":"#variable"},{"include":"#interpolation"}]}]},"herestring":{"patterns":[{"begin":"(<<<)\\\\s*((\'))","beginCaptures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.quoted.single.shell"},"3":{"name":"punctuation.definition.string.begin.shell"}},"contentName":"string.quoted.single.shell","end":"(\')","endCaptures":{"0":{"name":"string.quoted.single.shell"},"1":{"name":"punctuation.definition.string.end.shell"}},"name":"meta.herestring.shell"},{"begin":"(<<<)\\\\s*((\\"))","beginCaptures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.quoted.double.shell"},"3":{"name":"punctuation.definition.string.begin.shell"}},"contentName":"string.quoted.double.shell","end":"(\\")","endCaptures":{"0":{"name":"string.quoted.double.shell"},"1":{"name":"punctuation.definition.string.end.shell"}},"name":"meta.herestring.shell","patterns":[{"include":"#double_quote_context"}]},{"captures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.unquoted.herestring.shell","patterns":[{"include":"#initial_context"}]}},"match":"(<<<)\\\\s*(([^)\\\\\\\\\\\\s]|\\\\\\\\.)+)","name":"meta.herestring.shell"}]},"initial_context":{"patterns":[{"include":"#comment"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#logical_expression_double"},{"include":"#logical_expression_single"},{"include":"#assignment_statement"},{"include":"#case_statement"},{"include":"#for_statement"},{"include":"#loop"},{"include":"#function_definition"},{"include":"#line_continuation"},{"include":"#arithmetic_double"},{"include":"#misc_ranges"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#alias_statement"},{"include":"#normal_statement"},{"include":"#string"},{"include":"#support"}]},"inline_comment":{"captures":{"1":{"name":"comment.block.shell punctuation.definition.comment.begin.shell"},"2":{"name":"comment.block.shell"},"3":{"patterns":[{"match":"\\\\*/","name":"comment.block.shell punctuation.definition.comment.end.shell"},{"match":"\\\\*","name":"comment.block.shell"}]}},"match":"(/\\\\*)((?:[^*]|\\\\*++[^/])*+(\\\\*++/))"},"interpolation":{"patterns":[{"include":"#arithmetic_dollar"},{"include":"#subshell_dollar"},{"begin":"`","beginCaptures":{"0":{"name":"punctuation.definition.evaluation.backticks.shell"}},"end":"`","endCaptures":{"0":{"name":"punctuation.definition.evaluation.backticks.shell"}},"name":"string.interpolated.backtick.shell","patterns":[{"match":"\\\\\\\\[$\\\\\\\\`]","name":"constant.character.escape.shell"},{"begin":"(?<=\\\\W)(?=#)(?!#\\\\{)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.shell"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.shell"}},"end":"(?=`)","name":"comment.line.number-sign.shell"}]},{"include":"#initial_context"}]}]},"keyword":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])(then|else|elif|fi|for|in|do|done|select|continue|esac|while|until|return)(?=[\\\\&;\\\\s]|$)","name":"keyword.control.shell"},{"match":"(?<=^|[\\\\&;\\\\s])(?:export|declare|typeset|local|readonly)(?=[\\\\&;\\\\s]|$)","name":"storage.modifier.shell"}]},"line_comment":{"begin":"\\\\s*+(//)","beginCaptures":{"1":{"name":"punctuation.definition.comment.shell"}},"end":"(?<=\\\\n)(?<!\\\\\\\\\\\\n)","endCaptures":{},"name":"comment.line.double-slash.shell","patterns":[{"include":"#line_continuation_character"}]},"line_continuation":{"match":"\\\\\\\\(?=\\\\n)","name":"constant.character.escape.line-continuation.shell"},"logical-expression":{"patterns":[{"include":"#arithmetic_no_dollar"},{"match":"=[=~]?|!=?|[<>]|&&|\\\\|\\\\|","name":"keyword.operator.logical.shell"},{"match":"(?<!\\\\S)-(nt|ot|ef|eq|ne|l[et]|g[et]|[GLNOSa-hknopr-uwxz])\\\\b","name":"keyword.operator.logical.shell"}]},"logical_expression_context":{"patterns":[{"include":"#regex_comparison"},{"include":"#arithmetic_no_dollar"},{"include":"#logical-expression"},{"include":"#logical_expression_single"},{"include":"#logical_expression_double"},{"include":"#comment"},{"include":"#boolean"},{"include":"#redirect_number"},{"include":"#numeric_literal"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"}]},"logical_expression_double":{"begin":"\\\\[\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical_expression_context"}]},"logical_expression_single":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical_expression_context"}]},"loop":{"patterns":[{"begin":"(?<=^|[\\\\&;\\\\s])(for)\\\\s+(.+?)\\\\s+(in)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"},"2":{"name":"variable.other.loop.shell","patterns":[{"include":"#string"}]},"3":{"name":"keyword.control.shell"}},"end":"(?<=^|[\\\\&;\\\\s])done(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"0":{"name":"keyword.control.shell"}},"name":"meta.scope.for-in-loop.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])(while|until)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"}},"end":"(?<=^|[\\\\&;\\\\s])done(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"0":{"name":"keyword.control.shell"}},"name":"meta.scope.while-loop.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])(select)\\\\s+((?:[^\\\\\\\\\\\\s]|\\\\\\\\.)+)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"},"2":{"name":"variable.other.loop.shell"}},"end":"(?<=^|[\\\\&;\\\\s])(done)(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"1":{"name":"keyword.control.shell"}},"name":"meta.scope.select-block.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])if(?=[\\\\&;\\\\s]|$)","beginCaptures":{"0":{"name":"keyword.control.if.shell"}},"end":"(?<=^|[\\\\&;\\\\s])fi(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"keyword.control.fi.shell"}},"name":"meta.scope.if-block.shell","patterns":[{"include":"#initial_context"}]}]},"math":{"patterns":[{"include":"#variable"},{"match":"\\\\+{1,2}|-{1,2}|[!~]|\\\\*{1,2}|[%/]|<[<=]?|>[=>]?|==|!=|^|\\\\|{1,2}|&{1,2}|[,:=?]|[-%\\\\&*+/^|]=|<<=|>>=","name":"keyword.operator.arithmetic.shell"},{"match":"0[Xx]\\\\h+","name":"constant.numeric.hex.shell"},{"match":";","name":"punctuation.separator.semicolon.range"},{"match":"0\\\\d+","name":"constant.numeric.octal.shell"},{"match":"\\\\d{1,2}#[0-9@-Z_a-z]+","name":"constant.numeric.other.shell"},{"match":"\\\\d+","name":"constant.numeric.integer.shell"},{"match":"(?<!\\\\w)[0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"}]},"math_operators":{"patterns":[{"match":"\\\\+{1,2}|-{1,2}|[!~]|\\\\*{1,2}|[%/]|<[<=]?|>[=>]?|==|!=|^|\\\\|{1,2}|&{1,2}|[,:=?]|[-%\\\\&*+/^|]=|<<=|>>=","name":"keyword.operator.arithmetic.shell"},{"match":"0[Xx]\\\\h+","name":"constant.numeric.hex.shell"},{"match":"0\\\\d+","name":"constant.numeric.octal.shell"},{"match":"\\\\d{1,2}#[0-9@-Z_a-z]+","name":"constant.numeric.other.shell"},{"match":"\\\\d+","name":"constant.numeric.integer.shell"}]},"misc_ranges":{"patterns":[{"include":"#logical_expression_single"},{"include":"#logical_expression_double"},{"include":"#subshell_dollar"},{"begin":"(?<![^\\\\t ])(\\\\{)(?![$\\\\w])","beginCaptures":{"1":{"name":"punctuation.definition.group.shell"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.group.shell"}},"name":"meta.scope.group.shell","patterns":[{"include":"#initial_context"}]}]},"modified_assignment_statement":{"begin":"(?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$)","beginCaptures":{"0":{"name":"storage.modifier.$0.shell"}},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.shell meta.expression.assignment.modified.shell","patterns":[{"match":"(?<!\\\\w)-\\\\w+\\\\b","name":"string.unquoted.argument.shell constant.other.option.shell"},{"include":"#array_value"},{"captures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"},"9":{"name":"constant.numeric.shell constant.numeric.hex.shell"},"10":{"name":"constant.numeric.shell constant.numeric.octal.shell"},"11":{"name":"constant.numeric.shell constant.numeric.other.shell"},"12":{"name":"constant.numeric.shell constant.numeric.decimal.shell"},"13":{"name":"constant.numeric.shell constant.numeric.version.shell"},"14":{"name":"constant.numeric.shell constant.numeric.integer.shell"}},"match":"((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))?(?:(?<=[\\\\t =]|^|[(\\\\[{])(?:(?:(?:(?:(?:(0[Xx]\\\\h+)|(0\\\\d+))|(\\\\d{1,2}#[0-9@-Z_a-z]+))|(-?\\\\d+\\\\.\\\\d+))|(-?\\\\d+(?:\\\\.\\\\d+)+))|(-?\\\\d+))(?=[\\\\t ]|$|[);}]))?"},{"include":"#normal_context"}]},"modifiers":{"match":"(?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$)","name":"storage.modifier.$0.shell"},"normal_assignment_statement":{"begin":"[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))","beginCaptures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"}},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.expression.assignment.shell","patterns":[{"include":"#comment"},{"include":"#string"},{"include":"#normal_assignment_statement"},{"begin":"(?<=[\\\\t ])(?![\\\\t ]|\\\\w+=)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.command.env.shell","patterns":[{"include":"#command_name_range"},{"include":"#line_continuation"},{"include":"#option"},{"include":"#argument"},{"include":"#string"}]},{"include":"#simple_unquoted"},{"include":"#normal_context"}]},"normal_context":{"patterns":[{"include":"#comment"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#misc_ranges"},{"include":"#boolean"},{"include":"#redirect_number"},{"include":"#numeric_literal"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"},{"include":"#parenthese"}]},"normal_statement":{"begin":"(?!^[\\\\t ]*+$)(?:(?<=(?:^until| until|\\\\tuntil|^while| while|\\\\twhile|^elif| elif|\\\\telif|^else| else|\\\\telse|^then| then|\\\\tthen|^do| do|\\\\tdo|^if| if|\\\\tif) )|(?<=^|[!\\\\&(;`{|]))[\\\\t ]*+(?!nocorrect\\\\W|nocorrect\\\\$|function\\\\W|function\\\\$|foreach\\\\W|foreach\\\\$|repeat\\\\W|repeat\\\\$|logout\\\\W|logout\\\\$|coproc\\\\W|coproc\\\\$|select\\\\W|select\\\\$|while\\\\W|while\\\\$|pushd\\\\W|pushd\\\\$|until\\\\W|until\\\\$|case\\\\W|case\\\\$|done\\\\W|done\\\\$|elif\\\\W|elif\\\\$|else\\\\W|else\\\\$|esac\\\\W|esac\\\\$|popd\\\\W|popd\\\\$|then\\\\W|then\\\\$|time\\\\W|time\\\\$|for\\\\W|for\\\\$|end\\\\W|end\\\\$|fi\\\\W|fi\\\\$|do\\\\W|do\\\\$|in\\\\W|in\\\\$|if\\\\W|if\\\\$)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.shell","patterns":[{"include":"#typical_statements"}]},"normal_statement_seperator":{"captures":{"1":{"name":"punctuation.terminator.statement.semicolon.shell"},"2":{"name":"punctuation.separator.statement.and.shell"},"3":{"name":"punctuation.separator.statement.or.shell"},"4":{"name":"punctuation.separator.statement.background.shell"}},"match":"(?:(?:(;)|(&&))|(\\\\|\\\\|))|(&)"},"numeric_literal":{"captures":{"1":{"name":"constant.numeric.shell constant.numeric.hex.shell"},"2":{"name":"constant.numeric.shell constant.numeric.octal.shell"},"3":{"name":"constant.numeric.shell constant.numeric.other.shell"},"4":{"name":"constant.numeric.shell constant.numeric.decimal.shell"},"5":{"name":"constant.numeric.shell constant.numeric.version.shell"},"6":{"name":"constant.numeric.shell constant.numeric.integer.shell"}},"match":"(?<=[\\\\t =]|^|[(\\\\[{])(?:(?:(?:(?:(?:(0[Xx]\\\\h+)|(0\\\\d+))|(\\\\d{1,2}#[0-9@-Z_a-z]+))|(-?\\\\d+\\\\.\\\\d+))|(-?\\\\d+(?:\\\\.\\\\d+)+))|(-?\\\\d+))(?=[\\\\t ]|$|[);}])"},"option":{"begin":"[\\\\t ]++(-)((?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;]))","beginCaptures":{"1":{"name":"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{"name":"string.unquoted.argument.shell constant.other.option.shell"}},"contentName":"string.unquoted.argument constant.other.option","end":"(?=[\\\\t ])|(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"patterns":[{"include":"#option_context"}]},"option_context":{"patterns":[{"include":"#misc_ranges"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"}]},"parenthese":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parenthese.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parenthese.shell"}},"name":"meta.parenthese.group.shell","patterns":[{"include":"#initial_context"}]}]},"pathname":{"patterns":[{"match":"(?<=[:=\\\\s]|^)~","name":"keyword.operator.tilde.shell"},{"match":"[*?]","name":"keyword.operator.glob.shell"},{"begin":"([!*+?@])(\\\\()","beginCaptures":{"1":{"name":"keyword.operator.extglob.shell"},"2":{"name":"punctuation.definition.extglob.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.extglob.shell"}},"name":"meta.structure.extglob.shell","patterns":[{"include":"#initial_context"}]}]},"pipeline":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])(time)(?=[\\\\&;\\\\s]|$)","name":"keyword.other.shell"},{"match":"[!|]","name":"keyword.operator.pipe.shell"}]},"redirect_fix":{"captures":{"1":{"name":"keyword.operator.redirect.shell"},"2":{"name":"string.unquoted.argument.shell"}},"match":"(>>?)[\\\\t ]*+([^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\`|]+)"},"redirect_number":{"captures":{"1":{"name":"keyword.operator.redirect.stdout.shell"},"2":{"name":"keyword.operator.redirect.stderr.shell"},"3":{"name":"keyword.operator.redirect.$3.shell"}},"match":"(?<=[\\\\t ])(?:(1)|(2)|(\\\\d+))(?=>)"},"redirection":{"patterns":[{"begin":"[<>]\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.interpolated.process-substitution.shell","patterns":[{"include":"#initial_context"}]},{"match":"(?<![<>])(&>|\\\\d*>&\\\\d*|\\\\d*(>>|[<>])|\\\\d*<&|\\\\d*<>)(?![<>])","name":"keyword.operator.redirect.shell"}]},"regex_comparison":{"match":"=~","name":"keyword.operator.logical.regex.shell"},"regexp":{"patterns":[{"match":".+"}]},"simple_options":{"captures":{"0":{"patterns":[{"captures":{"1":{"name":"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{"name":"string.unquoted.argument.shell constant.other.option.shell"}},"match":"[\\\\t ]++(-)(\\\\w+)"}]}},"match":"(?:[\\\\t ]++-\\\\w+)*"},"simple_unquoted":{"match":"[^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\`|]","name":"string.unquoted.shell"},"special_expansion":{"match":"!|:[-=?]?|[*@]|##?|%%|[%/]","name":"keyword.operator.expansion.shell"},"start_of_command":{"match":"[\\\\t ]*+(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?!\\\\\\\\\\\\n?$)"},"string":{"patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.shell"},{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\'","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.single.shell"},{"begin":"\\\\$?\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.double.shell","patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},{"begin":"\\\\$\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\'","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.single.dollar.shell","patterns":[{"match":"\\\\\\\\[\'\\\\\\\\abefnrtv]","name":"constant.character.escape.ansi-c.shell"},{"match":"\\\\\\\\[0-9]{3}\\"","name":"constant.character.escape.octal.shell"},{"match":"\\\\\\\\x\\\\h{2}\\"","name":"constant.character.escape.hex.shell"},{"match":"\\\\\\\\c.\\"","name":"constant.character.escape.control-char.shell"}]}]},"subshell_dollar":{"patterns":[{"begin":"\\\\$\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.subshell.single.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.subshell.single.shell"}},"name":"meta.scope.subshell","patterns":[{"include":"#parenthese"},{"include":"#initial_context"}]}]},"support":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])[.:](?=[\\\\&;\\\\s]|$)","name":"support.function.builtin.shell"}]},"typical_statements":{"patterns":[{"include":"#assignment_statement"},{"include":"#case_statement"},{"include":"#for_statement"},{"include":"#while_statement"},{"include":"#function_definition"},{"include":"#command_statement"},{"include":"#line_continuation"},{"include":"#arithmetic_double"},{"include":"#normal_context"}]},"variable":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.all.shell"},"2":{"name":"variable.parameter.positional.all.shell"}},"match":"(\\\\$)(@(?!\\\\w))"},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{"name":"variable.parameter.positional.shell"}},"match":"(\\\\$)([0-9](?!\\\\w))"},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.language.special.shell"},"2":{"name":"variable.language.special.shell"}},"match":"(\\\\$)([-!#$*0?_](?!\\\\w))"},{"begin":"(\\\\$)(\\\\{)[\\\\t ]*+(?=\\\\d)","beginCaptures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{"name":"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},"contentName":"meta.parameter-expansion","end":"}","endCaptures":{"0":{"name":"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},"patterns":[{"include":"#special_expansion"},{"include":"#array_access_inline"},{"match":"[0-9]+","name":"variable.parameter.positional.shell"},{"match":"(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"},{"include":"#variable"},{"include":"#string"}]},{"begin":"(\\\\$)(\\\\{)","beginCaptures":{"1":{"name":"punctuation.definition.variable.shell"},"2":{"name":"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell"}},"contentName":"meta.parameter-expansion","end":"}","endCaptures":{"0":{"name":"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell"}},"patterns":[{"include":"#special_expansion"},{"include":"#array_access_inline"},{"match":"(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"},{"include":"#variable"},{"include":"#string"}]},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.other.normal.shell"},"2":{"name":"variable.other.normal.shell"}},"match":"(\\\\$)(\\\\w+(?!\\\\w))"}]},"while_statement":{"patterns":[{"begin":"\\\\b(while)\\\\b","beginCaptures":{"1":{"name":"keyword.control.while.shell"}},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.while.shell","patterns":[{"include":"#line_continuation"},{"include":"#math_operators"},{"include":"#option"},{"include":"#simple_unquoted"},{"include":"#normal_context"},{"include":"#string"}]}]}},"scopeName":"source.shell","aliases":["bash","sh","shell","zsh"]}')),ta=[e];
2
+ export{ta};
@@ -0,0 +1,141 @@
1
+ var Fe=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:r=!1,cache:n,regexConstructor:a}=t;if(!a)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map((s)=>{if(typeof s!=="string")return s;let o=n?.get(s);if(o){if(o instanceof RegExp)return o;if(r)return null;throw o}try{let i=a(s);return n?.set(s,i),i}catch(i){if(n?.set(s,i),r)return null;throw i}})}findNextMatchSync(e,t,r){let n=typeof e==="string"?e:e.content,a=[];function s(o,i,u=0){return{index:o,captureIndices:i.indices.map((c)=>{if(c==null)return{start:4294967295,end:4294967295,length:0};return{start:c[0]+u,end:c[1]+u,length:c[1]-c[0]}})}}for(let o=0;o<this.regexps.length;o++){let i=this.regexps[o];if(!i)continue;try{i.lastIndex=t;let u=i.exec(n);if(!u)continue;if(u.index===t)return s(o,u,0);a.push([o,u,0])}catch(u){if(this.options.forgiving)continue;throw u}}if(a.length){let o=Math.min(...a.map((i)=>i[1].index));for(let[i,u,c]of a)if(u.index===o)return s(i,u,c)}return null}};function R(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function Pe(e,t,r){return e.has(t)||e.set(t,r),e.get(t)}var K=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),b=String.raw;function N(e,t){if(e==null)throw Error(t??"Value expected");return e}var Te=b`\[\^?`,ze=`c.? | C(?:-.?)?|${b`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${b`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${b`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${b`o\{[^\}]*\}?`}|${b`\d{1,3}`}`,me=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,ae=new RegExp(b`
2
+ \\ (?:
3
+ ${ze}
4
+ | [gk]<[^>]*>?
5
+ | [gk]'[^']*'?
6
+ | .
7
+ )
8
+ | \( (?:
9
+ \? (?:
10
+ [:=!>({]
11
+ | <[=!]
12
+ | <[^>]*>
13
+ | '[^']*'
14
+ | ~\|?
15
+ | #(?:[^)\\]|\\.?)*
16
+ | [^:)]*[:)]
17
+ )?
18
+ | \*[^\)]*\)?
19
+ )?
20
+ | (?:${me.source})+
21
+ | ${Te}
22
+ | .
23
+ `.replace(/\s+/g,""),"gsu"),he=new RegExp(b`
24
+ \\ (?:
25
+ ${ze}
26
+ | .
27
+ )
28
+ | \[:(?:\^?\p{Alpha}+|\^):\]
29
+ | ${Te}
30
+ | &&
31
+ | .
32
+ `.replace(/\s+/g,""),"gsu");function Ve(e,t={}){let r={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw Error("String expected as pattern");let n=Zr(r.flags),a=[n.extended],s={captureGroup:r.rules.captureGroup,getCurrentModX(){return a.at(-1)},numOpenGroups:0,popModX(){a.pop()},pushModX(l){a.push(l)},replaceCurrentModX(l){a[a.length-1]=l},singleline:r.rules.singleline},o=[],i;for(ae.lastIndex=0;i=ae.exec(e);){let l=Mr(s,e,i[0],ae.lastIndex);l.tokens?o.push(...l.tokens):l.token&&o.push(l.token),l.lastIndex!==void 0&&(ae.lastIndex=l.lastIndex)}let u=[],c=0;o.filter((l)=>l.type==="GroupOpen").forEach((l)=>{l.kind==="capturing"?l.number=++c:l.raw==="("&&u.push(l)}),c||u.forEach((l,f)=>{l.kind="capturing",l.number=f+1});let p=c||u.length;return{tokens:o.map((l)=>l.type==="EscapedNumber"?qr(l,p):l).flat(),flags:n}}function Mr(e,t,r,n){let[a,s]=r;if(r==="["||r==="[^"){let o=Nr(t,r,n);return{tokens:o.tokens,lastIndex:o.lastIndex}}if(a==="\\"){if("AbBGyYzZ".includes(s))return{token:Re(r,r)};if(/^\\g[<']/.test(r)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(r))throw Error(`Invalid group name "${r}"`);return{token:Tr(r)}}if(/^\\k[<']/.test(r)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(r))throw Error(`Invalid group name "${r}"`);return{token:He(r)}}if(s==="K")return{token:je("keep",r)};if(s==="N"||s==="R")return{token:B("newline",r,{negate:s==="N"})};if(s==="O")return{token:B("any",r)};if(s==="X")return{token:B("text_segment",r)};let o=We(r,{inCharClass:!1});return Array.isArray(o)?{tokens:o}:{token:o}}if(a==="("){if(s==="*")return{token:Hr(r)};if(r==="(?{")throw Error(`Unsupported callout "${r}"`);if(r.startsWith("(?#")){if(t[n]!==")")throw Error('Unclosed comment group "(?#"');return{lastIndex:n+1}}if(/^\(\?[-imx]+[:)]$/.test(r))return{token:Wr(r,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,r==="("&&!e.captureGroup||r==="(?:")return{token:j("group",r)};if(r==="(?>")return{token:j("atomic",r)};if(r==="(?="||r==="(?!"||r==="(?<="||r==="(?<!")return{token:j(r[2]==="<"?"lookbehind":"lookahead",r,{negate:r.endsWith("!")})};if(r==="("&&e.captureGroup||r.startsWith("(?<")&&r.endsWith(">")||r.startsWith("(?'")&&r.endsWith("'"))return{token:j("capturing",r,{...r!=="("&&{name:r.slice(3,-1)}})};if(r.startsWith("(?~")){if(r==="(?~|")throw Error(`Unsupported absence function kind "${r}"`);return{token:j("absence_repeater",r)}}throw r==="(?("?Error(`Unsupported conditional "${r}"`):Error(`Invalid or unsupported group option "${r}"`)}if(r===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error('Unmatched ")"');return{token:Or(r)}}if(e.getCurrentModX()){if(r==="#"){let o=t.indexOf(`
33
+ `,n);return{lastIndex:o===-1?t.length:o}}if(/^\s$/.test(r)){let o=/\s+/y;return o.lastIndex=n,{lastIndex:o.exec(t)?o.lastIndex:n}}}if(r===".")return{token:B("dot",r)};if(r==="^"||r==="$"){let o=e.singleline?{"^":b`\A`,$:b`\Z`}[r]:r;return{token:Re(o,r)}}return r==="|"?{token:Gr(r)}:me.test(r)?{tokens:Jr(r)}:{token:L(R(r),r)}}function Nr(e,t,r){let n=[Ue(t[1]==="^",t)],a=1,s;for(he.lastIndex=r;s=he.exec(e);){let o=s[0];if(o[0]==="["&&o[1]!==":")a++,n.push(Ue(o[1]==="^",o));else if(o==="]"){if(n.at(-1).type==="CharacterClassOpen")n.push(L(93,o));else if(a--,n.push(Fr(o)),!a)break}else{let i=Lr(o);Array.isArray(i)?n.push(...i):n.push(i)}}return{tokens:n,lastIndex:he.lastIndex||e.length}}function Lr(e){if(e[0]==="\\")return We(e,{inCharClass:!0});if(e[0]==="["){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!K.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return B("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?Pr(e):e==="&&"?Rr(e):L(R(e),e)}function We(e,{inCharClass:t}){let r=e[1];if(r==="c"||r==="C")return Vr(e);if("dDhHsSwW".includes(r))return jr(e);if(e.startsWith(b`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw Error(`Incomplete or invalid Unicode property "${e}"`);return Xr(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let n=e.split(/\\x/).slice(1).map((o)=>parseInt(o,16)),a=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(n)),s=new TextEncoder;return[...a].map((o)=>{let i=[...s.encode(o)].map((u)=>`\\x${u.toString(16)}`).join("");return L(R(o),i)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(r==="u"||r==="x")return L(Qr(e),e);if(Oe.has(r))return L(Oe.get(r),e);if(/\d/.test(r))return Ur(t,e);if(e==="\\")throw Error(b`Incomplete escape "\"`);if(r==="M")throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return L(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function Gr(e){return{type:"Alternator",raw:e}}function Re(e,t){return{type:"Assertion",kind:e,raw:t}}function He(e){return{type:"Backreference",raw:e}}function L(e,t){return{type:"Character",value:e,raw:t}}function Fr(e){return{type:"CharacterClassClose",raw:e}}function Pr(e){return{type:"CharacterClassHyphen",raw:e}}function Rr(e){return{type:"CharacterClassIntersector",raw:e}}function Ue(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function B(e,t,r={}){return{type:"CharacterSet",kind:e,...r,raw:t}}function je(e,t,r={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:N(r.flags),raw:t}}function Ur(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function Or(e){return{type:"GroupClose",raw:e}}function j(e,t,r={}){return{type:"GroupOpen",kind:e,...r,raw:t}}function Dr(e,t,r,n){return{type:"NamedCallout",kind:e,tag:t,arguments:r,raw:n}}function Br(e,t,r,n){return{type:"Quantifier",kind:e,min:t,max:r,raw:n}}function Tr(e){return{type:"Subroutine",raw:e}}var zr=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),Oe=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Vr(e){let t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return L(R(t.toUpperCase())-64,e)}function Wr(e,t){let{on:r,off:n}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;n??="";let a=(t.getCurrentModX()||r.includes("x"))&&!n.includes("x"),s=Be(r),o=Be(n),i={};if(s&&(i.enable=s),o&&(i.disable=o),e.endsWith(")"))return t.replaceCurrentModX(a),je("flags",e,{flags:i});if(e.endsWith(":"))return t.pushModX(a),t.numOpenGroups++,j("group",e,{...(s||o)&&{flags:i}});throw Error(`Unexpected flag modifier "${e}"`)}function Hr(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:r,tag:n,args:a}=t.groups;if(!r)throw Error(`Invalid named callout "${e}"`);if(n==="")throw Error(`Named callout tag with empty value not allowed "${e}"`);let s=a?a.split(",").filter((p)=>p!=="").map((p)=>/^[+-]?\d+$/.test(p)?+p:p):[],[o,i,u]=s,c=zr.has(r)?r.toLowerCase():"custom";switch(c){case"fail":case"mismatch":case"skip":if(s.length>0)throw Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw Error(`Named callout allows only one argument "${s}"`);if(typeof o=="string")throw Error(`Named callout argument must be a number "${o}"`);break;case"max":if(!s.length||s.length>2)throw Error(`Named callout must have one or two arguments "${s}"`);if(typeof o=="string"&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(s.length===2&&(typeof i=="number"||!/^[<>X]$/.test(i)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${i}"`);break;case"count":case"total_count":if(s.length>1)throw Error(`Named callout allows only one argument "${s}"`);if(s.length===1&&(typeof o=="number"||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case"cmp":if(s.length!==3)throw Error(`Named callout must have three arguments "${s}"`);if(typeof o=="string"&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof i=="number"||!/^(?:[<>!=]=|[<>])$/.test(i))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${i}"`);if(typeof u=="string"&&!/^[A-Za-z_]\w*$/.test(u))throw Error(`Named callout argument three must be a tag or number "${u}"`);break;case"custom":throw Error(`Undefined callout name "${r}"`);default:throw Error(`Unexpected named callout kind "${c}"`)}return Dr(c,n??null,a?.split(",")??null,e)}function De(e){let t=null,r,n;if(e[0]==="{"){let{minStr:a,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups;if(+a>1e5||s&&+s>1e5)throw Error("Quantifier value unsupported in Oniguruma");if(r=+a,n=s===void 0?+a:s===""?1/0:+s,r>n&&(t="possessive",[r,n]=[n,r]),e.endsWith("?")){if(t==="possessive")throw Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else r=e[0]==="+"?1:0,n=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return Br(t,r,n,e)}function jr(e){let t=e[1].toLowerCase();return B({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function Xr(e){let{p:t,neg:r,value:n}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return B("property",e,{value:n,negate:t==="P"&&!r||t==="p"&&!!r})}function Be(e){let t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function Zr(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let r=0;r<e.length;r++){let n=e[r];if(!"imxDPSWy".includes(n))throw Error(`Invalid flag "${n}"`);if(n==="y"){if(!/^y{[gw]}/.test(e.slice(r)))throw Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[r+2]==="g"?"grapheme":"word",r+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[n]]=!0}return t}function Qr(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);let t=e[2]==="{"?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function qr(e,t){let{raw:r,inCharClass:n}=e,a=r.slice(1);if(!n&&(a!=="0"&&a.length===1||a[0]!=="0"&&+a<=t))return[He(r)];let s=[],o=a.match(/^[0-7]+|\d/g);for(let i=0;i<o.length;i++){let u=o[i],c;if(i===0&&u!=="8"&&u!=="9"){if(c=parseInt(u,8),c>127)throw Error(b`Octal encoded byte above 177 unsupported "${r}"`)}else c=R(u);s.push(L(c,(i===0?"\\":"")+u))}return s}function Jr(e){let t=[],r=new RegExp(me,"gy"),n;for(;n=r.exec(e);){let a=n[0];if(a[0]==="{"){let s=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(a);if(s){let{min:o,max:i}=s.groups;if(+o>+i&&a.endsWith("?")){r.lastIndex--,t.push(De(a.slice(0,-1)));continue}}}t.push(De(a))}return t}function oe(e,t){if(!Array.isArray(e.body))throw Error("Expected node with body array");if(e.body.length!==1)return!1;let r=e.body[0];return!t||Object.keys(t).every((n)=>t[n]===r[n])}function Xe(e){return Kr.has(e.type)}var Kr=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function ue(e,t={}){let r={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},n=Ve(e,{flags:r.flags,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline}}),a=(f,g)=>{let d=n.tokens[s.nextIndex];switch(s.parent=f,s.nextIndex++,d.type){case"Alternator":return G();case"Assertion":return Yr(d);case"Backreference":return et(d,s);case"Character":return X(d.value,{useLastValid:!!g.isCheckingRangeEnd});case"CharacterClassHyphen":return rt(d,s,g);case"CharacterClassOpen":return tt(d,s,g);case"CharacterSet":return nt(d,s);case"Directive":return ct(d.kind,{flags:d.flags});case"GroupOpen":return st(d,s,g);case"NamedCallout":return pt(d.kind,d.tag,d.arguments);case"Quantifier":return at(d,s);case"Subroutine":return ot(d,s);default:throw Error(`Unexpected token type "${d.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:r.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:r.skipBackrefValidation,skipLookbehindValidation:r.skipLookbehindValidation,skipPropertyNameValidation:r.skipPropertyNameValidation,subroutines:[],tokens:n.tokens,unicodePropertyMap:r.unicodePropertyMap,walk:a},o=dt(lt(n.flags)),i=o.body[0];for(;s.nextIndex<n.tokens.length;){let f=a(i,{});f.type==="Alternative"?(o.body.push(f),i=f):i.body.push(f)}let{capturingGroups:u,hasNumberedRef:c,namedGroupsByName:p,subroutines:l}=s;if(c&&p.size&&!r.rules.captureGroup)throw Error("Numbered backref/subroutine not allowed when using named capture");for(let{ref:f}of l)if(typeof f=="number"){if(f>u.length)throw Error("Subroutine uses a group number that's not defined");f&&(u[f-1].isSubroutined=!0)}else if(p.has(f)){if(p.get(f).length>1)throw Error(b`Subroutine uses a duplicate group name "\g<${f}>"`);p.get(f)[0].isSubroutined=!0}else throw Error(b`Subroutine uses a group name that's not defined "\g<${f}>"`);return o}function Yr({kind:e}){return ce(N({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===b`\B`||e===b`\Y`})}function et({raw:e},t){let r=/^\\k[<']/.test(e),n=r?e.slice(3,-1):e.slice(1),a=(s,o=!1)=>{let i=t.capturingGroups.length,u=!1;if(s>i)if(t.skipBackrefValidation)u=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,ie(o?i+1-s:s,{orphan:u})};if(r){let s=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(n);if(s)return a(+s.groups.num,!!s.groups.sign);if(/[-+]/.test(n))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(n))throw Error(`Group name not defined to the left "${e}"`);return ie(n)}return a(+n)}function rt(e,t,r){let{tokens:n,walk:a}=t,s=t.parent,o=s.body.at(-1),i=n[t.nextIndex];if(!r.isCheckingRangeEnd&&o&&o.type!=="CharacterClass"&&o.type!=="CharacterClassRange"&&i&&i.type!=="CharacterClassOpen"&&i.type!=="CharacterClassClose"&&i.type!=="CharacterClassIntersector"){let u=a(s,{...r,isCheckingRangeEnd:!0});if(o.type==="Character"&&u.type==="Character")return s.body.pop(),ut(o,u);throw Error("Invalid character class range")}return X(R("-"))}function tt({negate:e},t,r){let{tokens:n,walk:a}=t,s=[Y()],o=n[t.nextIndex],i=qe(o);for(;i.type!=="CharacterClassClose";){if(i.type==="CharacterClassIntersector")s.push(Y()),t.nextIndex++;else{let c=s.at(-1);c.body.push(a(c,r))}i=qe(n[t.nextIndex],o)}let u=Y({negate:e});return s.length===1?u.body=s[0].body:(u.kind="intersection",u.body=s.map((c)=>c.body.length===1?c.body[0]:c)),t.nextIndex++,u}function nt({kind:e,negate:t,value:r},n){let{normalizeUnknownPropertyNames:a,skipPropertyNameValidation:s,unicodePropertyMap:o}=n;if(e==="property"){let i=Z(r);if(K.has(i)&&!o?.has(i))e="posix",r=i;else return T(r,{negate:t,normalizeUnknownPropertyNames:a,skipPropertyNameValidation:s,unicodePropertyMap:o})}return e==="posix"?ft(r,{negate:t}):le(e,{negate:t})}function st(e,t,r){let{tokens:n,capturingGroups:a,namedGroupsByName:s,skipLookbehindValidation:o,walk:i}=t,u=gt(e),c=u.type==="AbsenceFunction",p=Qe(u),l=p&&u.negate;if(u.type==="CapturingGroup"&&(a.push(u),u.name&&Pe(s,u.name,[]).push(u)),c&&r.isInAbsenceFunction)throw Error("Nested absence function not supported by Oniguruma");let f=Je(n[t.nextIndex]);for(;f.type!=="GroupClose";){if(f.type==="Alternator")u.body.push(G()),t.nextIndex++;else{let g=u.body.at(-1),d=i(g,{...r,isInAbsenceFunction:r.isInAbsenceFunction||c,isInLookbehind:r.isInLookbehind||p,isInNegLookbehind:r.isInNegLookbehind||l});if(g.body.push(d),(p||r.isInLookbehind)&&!o){if(l||r.isInNegLookbehind){if(Ze(d)||d.type==="CapturingGroup")throw Error("Lookbehind includes a pattern not allowed by Oniguruma")}else if(Ze(d)||Qe(d)&&d.negate)throw Error("Lookbehind includes a pattern not allowed by Oniguruma")}}f=Je(n[t.nextIndex])}return t.nextIndex++,u}function at({kind:e,min:t,max:r},n){let a=n.parent,s=a.body.at(-1);if(!s||!Xe(s))throw Error("Quantifier requires a repeatable token");let o=ye(e,t,r,s);return a.body.pop(),o}function ot({raw:e},t){let{capturingGroups:r,subroutines:n}=t,a=e.slice(3,-1),s=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(a);if(s){let i=+s.groups.num,u=r.length;if(t.hasNumberedRef=!0,a={"":i,"+":u+i,"-":u+1-i}[s.groups.sign],a<1)throw Error("Invalid subroutine number")}else a==="0"&&(a=0);let o=Ce(a);return n.push(o),o}function it(e,t){if(e!=="repeater")throw Error(`Unexpected absence function kind "${e}"`);return{type:"AbsenceFunction",kind:e,body:ee(t?.body)}}function G(e){return{type:"Alternative",body:Ke(e?.body)}}function ce(e,t){let r={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(r.negate=!!t?.negate),r}function ie(e,t){let r=!!t?.orphan;return{type:"Backreference",ref:e,...r&&{orphan:r}}}function we(e,t){let r={name:void 0,isSubroutined:!1,...t};if(r.name!==void 0&&!ht(r.name))throw Error(`Group name "${r.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...r.name&&{name:r.name},...r.isSubroutined&&{isSubroutined:r.isSubroutined},body:ee(t?.body)}}function X(e,t){let r={useLastValid:!1,...t};if(e>1114111){let n=e.toString(16);if(r.useLastValid)e=1114111;else throw e>1310719?Error(`Invalid code point out of range "\\x{${n}}"`):Error(`Invalid code point out of range in JS "\\x{${n}}"`)}return{type:"Character",value:e}}function Y(e){let t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:Ke(e?.body)}}function ut(e,t){if(t.value<e.value)throw Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function le(e,t){let r=!!t?.negate,n={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(n.negate=r),(e==="text_segment"||e==="newline"&&!r)&&(n.variableLength=!0),n}function ct(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:N(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function lt(e){return{type:"Flags",...e}}function v(e){let t=e?.atomic,r=e?.flags;if(t&&r)throw Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...r&&{flags:r},body:ee(e?.body)}}function U(e){let t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:ee(e?.body)}}function pt(e,t,r){return{type:"NamedCallout",kind:e,tag:t,arguments:r}}function ft(e,t){let r=!!t?.negate;if(!K.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:r}}function ye(e,t,r,n){if(t>r)throw Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:r,body:n}}function dt(e,t){return{type:"Regex",body:ee(t?.body),flags:e}}function Ce(e){return{type:"Subroutine",ref:e}}function T(e,t){let r={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},n=r.unicodePropertyMap?.get(Z(e));if(!n){if(r.normalizeUnknownPropertyNames)n=mt(e);else if(r.unicodePropertyMap&&!r.skipPropertyNameValidation)throw Error(b`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:n??e,negate:r.negate}}function gt({flags:e,kind:t,name:r,negate:n,number:a}){switch(t){case"absence_repeater":return it("repeater");case"atomic":return v({atomic:!0});case"capturing":return we(a,{name:r});case"group":return v({flags:e});case"lookahead":case"lookbehind":return U({behind:t==="lookbehind",negate:n});default:throw Error(`Unexpected group kind "${t}"`)}}function ee(e){if(e===void 0)e=[G()];else if(!Array.isArray(e)||!e.length||!e.every((t)=>t.type==="Alternative"))throw Error("Invalid body; expected array of one or more Alternative nodes");return e}function Ke(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every((t)=>!!t.type))throw Error("Invalid body; expected array of nodes");return e}function Ze(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function Qe(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function ht(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function mt(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,(t)=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function Z(e){return e.replace(/[- _]+/g,"").toLowerCase()}function qe(e,t){let r=t;return N(e,`Unclosed character class${r?.type==="Character"&&r.value===93&&r.raw==="]"?' (started with "]")':""}`)}function Je(e){return N(e,"Unclosed group")}function z(e,t,r=null){function n(s,o){for(let i=0;i<s.length;i++){let u=a(s[i],o,i,s);i=Math.max(-1,i+u)}}function a(s,o=null,i=null,u=null){let c=0,p=!1,l={node:s,parent:o,key:i,container:u,root:e,remove(){pe(u).splice(Math.max(0,Q(i)+c),1),c--,p=!0},removeAllNextSiblings(){return pe(u).splice(Q(i)+1)},removeAllPrevSiblings(){let y=Q(i)+c;return c-=y,pe(u).splice(0,Math.max(0,y))},replaceWith(y,E={}){let I=!!E.traverse;u?u[Math.max(0,Q(i)+c)]=y:N(o,"Can't replace root node")[i]=y,I&&a(y,o,i,u),p=!0},replaceWithMultiple(y,E={}){let I=!!E.traverse;if(pe(u).splice(Math.max(0,Q(i)+c),1,...y),c+=y.length-1,I){let k=0;for(let S=0;S<y.length;S++)k+=a(y[S],o,Q(i)+S+k,u)}p=!0},skip(){p=!0}},{type:f}=s,g=t["*"],d=t[f],m=typeof g=="function"?g:g?.enter,w=typeof d=="function"?d:d?.enter;if(m?.(l,r),w?.(l,r),!p)switch(f){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":n(s.body,s);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":a(s.min,s,"min"),a(s.max,s,"max");break;case"Quantifier":a(s.body,s,"body");break;case"Regex":n(s.body,s),a(s.flags,s,"flags");break;default:throw Error(`Unexpected node type "${f}"`)}return d?.exit?.(l,r),g?.exit?.(l,r),c}return a(e),e}function pe(e){if(!Array.isArray(e))throw Error("Container expected");return e}function Q(e){if(typeof e!="number")throw Error("Numeric key expected");return e}var Ye=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function er(e,t){for(let r=0;r<e.length;r++)if(e[r]>=t)e[r]++}function rr(e,t,r,n){return e.slice(0,t)+n+e.slice(t+r.length)}var A=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function re(e,t,r,n){let a=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1],o=0,i="";for(let u of e.matchAll(a)){let{0:c,groups:{$skip:p}}=u;if(!p&&(!n||n===A.DEFAULT===!o)){if(r instanceof Function)i+=r(u,{context:o?A.CHAR_CLASS:A.DEFAULT,negated:s[s.length-1]});else i+=r;continue}if(c[0]==="[")o++,s.push(c[1]==="^");else if(c==="]"&&o)o--,s.pop();i+=c}return i}function be(e,t,r,n){re(e,t,r,n)}function wt(e,t,r=0,n){if(!new RegExp(t,"su").test(e))return null;let a=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");a.lastIndex=r;let s=0,o;while(o=a.exec(e)){let{0:i,groups:{$skip:u}}=o;if(!u&&(!n||n===A.DEFAULT===!s))return o;if(i==="[")s++;else if(i==="]"&&s)s--;if(a.lastIndex==o.index)a.lastIndex++}return null}function te(e,t,r){return!!wt(e,t,0,r)}function tr(e,t){let r=/\\?./gsu;r.lastIndex=t;let n=e.length,a=0,s=1,o;while(o=r.exec(e)){let[i]=o;if(i==="[")a++;else if(!a){if(i==="(")s++;else if(i===")"){if(s--,!s){n=o.index;break}}}else if(i==="]")a--}return e.slice(t,n)}var nr=new RegExp(String.raw`(?<noncapturingStart>${Ye})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function ke(e,t){let r=t?.hiddenCaptures??[],n=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:n,hiddenCaptures:r};let a="(?>",s="(?:(?=(",o=[0],i=[],u=0,c=0,p=NaN,l;do{l=!1;let f=0,g=0,d=!1,m;nr.lastIndex=Number.isNaN(p)?0:p+s.length;while(m=nr.exec(e)){let{0:w,index:y,groups:{capturingStart:E,noncapturingStart:I}}=m;if(w==="[")f++;else if(!f){if(w===a&&!d)p=y,d=!0;else if(d&&I)g++;else if(E)if(d)g++;else u++,o.push(u+c);else if(w===")"&&d){if(!g){c++;let k=u+c;if(e=`${e.slice(0,p)}${s}${e.slice(p+a.length,y)}))<$$${k}>)${e.slice(y+1)}`,l=!0,i.push(k),er(r,k),n.size){let S=new Map;n.forEach((se,W)=>{S.set(W>=k?W+1:W,se.map((H)=>H>=k?H+1:H))}),n=S}break}g--}}else if(w==="]")f--}}while(l);return r.push(...i),e=re(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:f,groups:{backrefNum:g,wrappedBackrefNum:d}})=>{if(g){let m=+g;if(m>o.length-1)throw Error(`Backref "${f}" greater than number of captures`);return`\\${o[m]}`}return`\\${d}`},A.DEFAULT),{pattern:e,captureTransfers:n,hiddenCaptures:r}}var sr=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,xe=new RegExp(String.raw`
34
+ \\(?: \d+
35
+ | c[A-Za-z]
36
+ | [gk]<[^>]+>
37
+ | [pPu]\{[^\}]+\}
38
+ | u[A-Fa-f\d]{4}
39
+ | x[A-Fa-f\d]{2}
40
+ )
41
+ | \((?: \? (?: [:=!>]
42
+ | <(?:[=!]|[^>]+>)
43
+ | [A-Za-z\-]+:
44
+ | \(DEFINE\)
45
+ ))?
46
+ | (?<qBase>${sr})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
47
+ | \\?.
48
+ `.replace(/\s+/g,""),"gsu");function Ee(e){if(!new RegExp(`${sr}\\+`).test(e))return{pattern:e};let t=[],r=null,n=null,a="",s=0,o;xe.lastIndex=0;while(o=xe.exec(e)){let{0:i,index:u,groups:{qBase:c,qMod:p,invalidQ:l}}=o;if(i==="["){if(!s)n=u;s++}else if(i==="]")if(s)s--;else n=null;else if(!s){if(p==="+"&&a&&!a.startsWith("(")){if(l)throw Error(`Invalid quantifier "${i}"`);let f=-1;if(/^\{\d+\}$/.test(c))e=rr(e,u+c.length,p,"");else{if(a===")"||a==="]"){let g=a===")"?r:n;if(g===null)throw Error(`Invalid unmatched "${a}"`);e=`${e.slice(0,g)}(?>${e.slice(g,u)}${c})${e.slice(u+i.length)}`}else e=`${e.slice(0,u-a.length)}(?>${a}${c})${e.slice(u+i.length)}`;f+=4}xe.lastIndex+=f}else if(i[0]==="(")t.push(u);else if(i===")")r=t.length?t.pop():null}a=i}return{pattern:e}}var _=String.raw,yt=_`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Ie=_`\(\?R=(?<rDepth>[^\)]+)\)|${yt}`,fe=_`\(\?<(?![=!])(?<captureName>[^>]+)>`,cr=_`${fe}|(?<unnamed>\()(?!\?)`,V=new RegExp(_`${fe}|${Ie}|\(\?|\\?.`,"gsu"),Ae="Cannot use multiple overlapping recursions";function lr(e,t){let{hiddenCaptures:r,mode:n}={hiddenCaptures:[],mode:"plugin",...t},a=t?.captureTransfers??new Map;if(!new RegExp(Ie,"su").test(e))return{pattern:e,captureTransfers:a,hiddenCaptures:r};if(n==="plugin"&&te(e,_`\(\?\(DEFINE\)`,A.DEFAULT))throw Error("DEFINE groups cannot be used with recursion");let s=[],o=te(e,_`\\[1-9]`,A.DEFAULT),i=new Map,u=[],c=!1,p=0,l=0,f;V.lastIndex=0;while(f=V.exec(e)){let{0:g,groups:{captureName:d,rDepth:m,gRNameOrNum:w,gRDepth:y}}=f;if(g==="[")p++;else if(!p){if(m){if(ar(m),c)throw Error(Ae);if(o)throw Error(`${n==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);let E=e.slice(0,f.index),I=e.slice(V.lastIndex);if(te(I,Ie,A.DEFAULT))throw Error(Ae);let k=+m-1;e=or(E,I,k,!1,r,s,l),a=ur(a,E,k,s.length,0,l);break}else if(w){ar(y);let E=!1;for(let J of u)if(J.name===w||J.num===+w){if(E=!0,J.hasRecursedWithin)throw Error(Ae);break}if(!E)throw Error(_`Recursive \g cannot be used outside the referenced group "${n==="external"?w:_`\g<${w}&R=${y}>`}"`);let I=i.get(w),k=tr(e,I);if(o&&te(k,_`${fe}|\((?!\?)`,A.DEFAULT))throw Error(`${n==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);let S=e.slice(I,f.index),se=k.slice(S.length+g.length),W=s.length,H=+y-1,Ge=or(S,se,H,!0,r,s,l);a=ur(a,S,H,s.length-W,W,l);let Sr=e.slice(0,I),_r=e.slice(I+k.length);e=`${Sr}${Ge}${_r}`,V.lastIndex+=Ge.length-g.length-S.length-se.length,u.forEach((J)=>J.hasRecursedWithin=!0),c=!0}else if(d)l++,i.set(String(l),V.lastIndex),i.set(d,V.lastIndex),u.push({num:l,name:d});else if(g[0]==="("){let E=g==="(";if(E)l++,i.set(String(l),V.lastIndex);u.push(E?{num:l}:{})}else if(g===")")u.pop()}else if(g==="]")p--}return r.push(...s),{pattern:e,captureTransfers:a,hiddenCaptures:r}}function ar(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw Error(t);if(e=+e,e<2||e>100)throw Error(t)}function or(e,t,r,n,a,s,o){let i=new Set;if(n)be(e+t,fe,({groups:{captureName:c}})=>{i.add(c)},A.DEFAULT);let u=[r,n?i:null,a,s,o];return`${e}${ir(`(?:${e}`,"forward",...u)}(?:)${ir(`${t})`,"backward",...u)}${t}`}function ir(e,t,r,n,a,s,o){let u=(p)=>t==="forward"?p+2:r-p+2-1,c="";for(let p=0;p<r;p++){let l=u(p);c+=re(e,_`${cr}|\\k<(?<backref>[^>]+)>`,({0:f,groups:{captureName:g,unnamed:d,backref:m}})=>{if(m&&n&&!n.has(m))return f;let w=`_$${l}`;if(d||g){let y=o+s.length+1;return s.push(y),Ct(a,y),d?f:`(?<${g}${w}>`}return _`\k<${m}${w}>`},A.DEFAULT)}return c}function Ct(e,t){for(let r=0;r<e.length;r++)if(e[r]>=t)e[r]++}function ur(e,t,r,n,a,s){if(e.size&&n){let o=0;be(t,cr,()=>o++,A.DEFAULT);let i=s-o+a,u=new Map;return e.forEach((c,p)=>{let l=(n-o*r)/r,f=o*r,g=p>i+o?p+n:p,d=[];for(let m of c)if(m<=i)d.push(m);else if(m>i+o+l)d.push(m+n);else if(m<=i+o)for(let w=0;w<=r;w++)d.push(m+o*w);else for(let w=0;w<=r;w++)d.push(m+f+l*w);u.set(g,d)}),u}return e}var{fromCodePoint:x,raw:h}=String,M={},ge=globalThis.RegExp;M.flagGroups=(()=>{try{new ge("(?i:)")}catch{return!1}return!0})();M.unicodeSets=(()=>{try{new ge("[[]]","v")}catch{return!1}return!0})();M.bugFlagVLiteralHyphenIsRange=M.unicodeSets?(()=>{try{new ge(h`[\d\-a]`,"v")}catch{return!0}return!1})():!1;M.bugNestedClassIgnoresNegation=M.unicodeSets&&new ge("[[^a]]","v").test("a");function de(e,{enable:t,disable:r}){return{dotAll:!r?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!r?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function ne(e,t,r){if(!e.has(t))e.set(t,r);return e.get(t)}function Me(e,t){return pr[e]>=pr[t]}function bt(e,t){if(e==null)throw Error(t??"Value expected");return e}var pr={ES2025:2025,ES2024:2024,ES2018:2018},xt={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function mr(e={}){if({}.toString.call(e)!=="[object Object]")throw Error("Unexpected options");if(e.target!==void 0&&!xt[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};if(t.target==="auto")t.target=M.flagGroups?"ES2025":M.unicodeSets?"ES2024":"ES2018";return t}var kt="[\t-\r ]",Et=new Set([x(304),x(305)]),F=h`[\p{L}\p{M}\p{N}\p{Pc}]`;function wr(e){if(Et.has(e))return[e];let t=new Set,r=e.toLowerCase(),n=r.toUpperCase(),a=$t.get(r),s=At.get(r),o=It.get(r);if([...n].length===1)t.add(n);return o&&t.add(o),a&&t.add(a),t.add(r),s&&t.add(s),[...t]}var Ne=new Map(`C Other
49
+ Cc Control cntrl
50
+ Cf Format
51
+ Cn Unassigned
52
+ Co Private_Use
53
+ Cs Surrogate
54
+ L Letter
55
+ LC Cased_Letter
56
+ Ll Lowercase_Letter
57
+ Lm Modifier_Letter
58
+ Lo Other_Letter
59
+ Lt Titlecase_Letter
60
+ Lu Uppercase_Letter
61
+ M Mark Combining_Mark
62
+ Mc Spacing_Mark
63
+ Me Enclosing_Mark
64
+ Mn Nonspacing_Mark
65
+ N Number
66
+ Nd Decimal_Number digit
67
+ Nl Letter_Number
68
+ No Other_Number
69
+ P Punctuation punct
70
+ Pc Connector_Punctuation
71
+ Pd Dash_Punctuation
72
+ Pe Close_Punctuation
73
+ Pf Final_Punctuation
74
+ Pi Initial_Punctuation
75
+ Po Other_Punctuation
76
+ Ps Open_Punctuation
77
+ S Symbol
78
+ Sc Currency_Symbol
79
+ Sk Modifier_Symbol
80
+ Sm Math_Symbol
81
+ So Other_Symbol
82
+ Z Separator
83
+ Zl Line_Separator
84
+ Zp Paragraph_Separator
85
+ Zs Space_Separator
86
+ ASCII
87
+ ASCII_Hex_Digit AHex
88
+ Alphabetic Alpha
89
+ Any
90
+ Assigned
91
+ Bidi_Control Bidi_C
92
+ Bidi_Mirrored Bidi_M
93
+ Case_Ignorable CI
94
+ Cased
95
+ Changes_When_Casefolded CWCF
96
+ Changes_When_Casemapped CWCM
97
+ Changes_When_Lowercased CWL
98
+ Changes_When_NFKC_Casefolded CWKCF
99
+ Changes_When_Titlecased CWT
100
+ Changes_When_Uppercased CWU
101
+ Dash
102
+ Default_Ignorable_Code_Point DI
103
+ Deprecated Dep
104
+ Diacritic Dia
105
+ Emoji
106
+ Emoji_Component EComp
107
+ Emoji_Modifier EMod
108
+ Emoji_Modifier_Base EBase
109
+ Emoji_Presentation EPres
110
+ Extended_Pictographic ExtPict
111
+ Extender Ext
112
+ Grapheme_Base Gr_Base
113
+ Grapheme_Extend Gr_Ext
114
+ Hex_Digit Hex
115
+ IDS_Binary_Operator IDSB
116
+ IDS_Trinary_Operator IDST
117
+ ID_Continue IDC
118
+ ID_Start IDS
119
+ Ideographic Ideo
120
+ Join_Control Join_C
121
+ Logical_Order_Exception LOE
122
+ Lowercase Lower
123
+ Math
124
+ Noncharacter_Code_Point NChar
125
+ Pattern_Syntax Pat_Syn
126
+ Pattern_White_Space Pat_WS
127
+ Quotation_Mark QMark
128
+ Radical
129
+ Regional_Indicator RI
130
+ Sentence_Terminal STerm
131
+ Soft_Dotted SD
132
+ Terminal_Punctuation Term
133
+ Unified_Ideograph UIdeo
134
+ Uppercase Upper
135
+ Variation_Selector VS
136
+ White_Space space
137
+ XID_Continue XIDC
138
+ XID_Start XIDS`.split(/\s/).map((e)=>[Z(e),e])),At=new Map([["s",x(383)],[x(383),"s"]]),It=new Map([[x(223),x(7838)],[x(107),x(8490)],[x(229),x(8491)],[x(969),x(8486)]]),$t=new Map([O(453),O(456),O(459),O(498),...$e(8072,8079),...$e(8088,8095),...$e(8104,8111),O(8124),O(8140),O(8188)]),vt=new Map([["alnum",h`[\p{Alpha}\p{Nd}]`],["alpha",h`\p{Alpha}`],["ascii",h`\p{ASCII}`],["blank",h`[\p{Zs}\t]`],["cntrl",h`\p{Cc}`],["digit",h`\p{Nd}`],["graph",h`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",h`\p{Lower}`],["print",h`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",h`[\p{P}\p{S}]`],["space",h`\p{space}`],["upper",h`\p{Upper}`],["word",h`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",h`\p{AHex}`]]);function St(e,t){let r=[];for(let n=e;n<=t;n++)r.push(n);return r}function O(e){let t=x(e);return[t.toLowerCase(),t]}function $e(e,t){return St(e,t).map((r)=>O(r))}var yr=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function _t(e,t){let r={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};Cr(e);let n={accuracy:r.accuracy,asciiWordBoundaries:r.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Me(r.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};z(e,Mt,n);let a={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},s={currentFlags:a,prevFlags:null,globalFlags:a,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:n.subroutineRefMap};z(e,Nt,s);let o={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return z(e,Lt,o),e._originMap=s.groupOriginByCopy,e._strategy=n.strategy,e}var Mt={AbsenceFunction({node:e,parent:t,replaceWith:r}){let{body:n,kind:a}=e;if(a==="repeater"){let s=v();s.body[0].body.push(U({negate:!0,body:n}),T("Any"));let o=v();o.body[0].body.push(ye("greedy",0,1/0,s)),r(C(o,t),{traverse:!0})}else throw Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:r},{flagDirectivesByAlt:n}){let a=e.body.filter((s)=>s.kind==="flags");for(let s=r+1;s<t.body.length;s++){let o=t.body[s];ne(n,o,[]).push(...a)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let r=xr(t.get(e));if(r){let n=v({flags:r});n.body[0].body=e.body,e.body=[C(n,e)]}}}},Assertion({node:e,parent:t,key:r,container:n,root:a,remove:s,replaceWith:o},i){let{kind:u,negate:c}=e,{asciiWordBoundaries:p,avoidSubclass:l,supportedGNodes:f,wordIsAscii:g}=i;if(u==="text_segment_boundary")throw Error(`Unsupported text segment boundary "\\${c?"Y":"y"}"`);else if(u==="line_end")o(C(U({body:[G({body:[ce("string_end")]}),G({body:[X(10)]})]}),t));else if(u==="line_start")o(C(P(h`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(u==="search_start")if(f.has(e))a.flags.sticky=!0,s();else{let d=n[r-1];if(d&&Ot(d))o(C(U({negate:!0}),t));else if(l)throw Error(h`Uses "\G" in a way that requires a subclass`);else o(D(ce("string_start"),t)),i.strategy="clip_search"}else if(u==="string_end"||u==="string_start");else if(u==="string_end_newline")o(C(P(h`(?=\n?\z)`),t));else if(u==="word_boundary"){if(!g&&!p){let d=`(?:(?<=${F})(?!${F})|(?<!${F})(?=${F}))`,m=`(?:(?<=${F})(?=${F})|(?<!${F})(?!${F}))`;o(C(P(c?m:d),t))}}else throw Error(`Unexpected assertion kind "${u}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:r}=e;if(typeof r==="string"&&!Se(r))r=ve(r,t),e.ref=r},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:r}){let{name:n}=e;if(n&&!Se(n))n=ve(n,t),e.name=n;if(r.set(e.number,e),n)r.set(n,e)},CharacterClassRange({node:e,parent:t,replaceWith:r}){if(t.kind==="intersection"){let n=Y({body:[e]});r(C(n,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:r},{accuracy:n,minTargetEs2024:a,digitIsAscii:s,spaceIsAscii:o,wordIsAscii:i}){let{kind:u,negate:c,value:p}=e;if(s&&(u==="digit"||p==="digit")){r(D(le("digit",{negate:c}),t));return}if(o&&(u==="space"||p==="space")){r(C(_e(P(kt),c),t));return}if(i&&(u==="word"||p==="word")){r(D(le("word",{negate:c}),t));return}if(u==="any")r(D(T("Any"),t));else if(u==="digit")r(D(T("Nd",{negate:c}),t));else if(u==="dot");else if(u==="text_segment"){if(n==="strict")throw Error(h`Use of "\X" requires non-strict accuracy`);let l="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",f=h`\p{RI}{2}|${l}(?:\u200D${l})*`;r(C(P(h`(?>\r\n|${a?h`\p{RGI_Emoji}`:f}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(u==="hex")r(D(T("AHex",{negate:c}),t));else if(u==="newline")r(C(P(c?`[^
139
+ ]`:`(?>\r
140
+ ?|[
141
+ \v\f…\u2028\u2029])`),t));else if(u==="posix")if(!a&&(p==="graph"||p==="print")){if(n==="strict")throw Error(`POSIX class "${p}" requires min target ES2024 or non-strict accuracy`);let l={graph:"!-~",print:" -~"}[p];if(c)l=`\x00-${x(l.codePointAt(0)-1)}${x(l.codePointAt(2)+1)}-\uDBFF\uDFFF`;r(C(P(`[${l}]`),t))}else r(C(_e(P(vt.get(p)),c),t));else if(u==="property"){if(!Ne.has(Z(p)))e.key="sc"}else if(u==="space")r(D(T("space",{negate:c}),t));else if(u==="word")r(C(_e(P(F),c),t));else throw Error(`Unexpected character set kind "${u}"`)},Directive({node:e,parent:t,root:r,remove:n,replaceWith:a,removeAllPrevSiblings:s,removeAllNextSiblings:o}){let{kind:i,flags:u}=e;if(i==="flags")if(!u.enable&&!u.disable)n();else{let c=v({flags:u});c.body[0].body=o(),a(C(c,t),{traverse:!0})}else if(i==="keep"){let c=r.body[0],l=r.body.length===1&&oe(c,{type:"Group"})&&c.body[0].body.length===1?c.body[0]:r;if(t.parent!==l||l.body.length>1)throw Error(h`Uses "\K" in a way that's unsupported`);let f=U({behind:!0});f.body[0].body=s(),a(C(f,t))}else throw Error(`Unexpected directive kind "${i}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach((r)=>delete e[r]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:r}=e.flags;t?.extended&&delete t.extended,r?.extended&&delete r.extended,t?.dotAll&&r?.dotAll&&delete t.dotAll,t?.ignoreCase&&r?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,r&&!Object.keys(r).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:r}=e;if(r==="lookbehind")t.passedLookbehind=!0},NamedCallout({node:e,parent:t,replaceWith:r}){let{kind:n}=e;if(n==="fail")r(C(U({negate:!0}),t));else throw Error(`Unsupported named callout "(*${n.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){let t=v();t.body[0].body.push(e.body),e.body=C(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let r=[],n=!1,a=!1;for(let s of e.body)if(s.body.length===1&&s.body[0].kind==="search_start")s.body.pop();else{let o=Er(s.body);if(o)n=!0,Array.isArray(o)?r.push(...o):r.push(o);else a=!0}if(n&&!a)r.forEach((s)=>t.add(s))},exit(e,{accuracy:t,passedLookbehind:r,strategy:n}){if(t==="strict"&&r&&n)throw Error(h`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:r}=e;if(typeof r==="string"&&!Se(r))r=ve(r,t),e.ref=r}},Nt={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:r}){let{orphan:n,ref:a}=e;if(!n)r.set(e,[...t.get(a).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:r,skip:n},{groupOriginByCopy:a,groupsByName:s,multiplexCapturesToLeftByRef:o,openRefs:i,reffedNodesByReferencer:u}){let c=a.get(e);if(c&&i.has(e.number)){let l=D(fr(e.number),t);u.set(l,i.get(e.number)),r(l);return}if(i.set(e.number,e),o.set(e.number,[]),e.name)ne(o,e.name,[]);let p=o.get(e.name??e.number);for(let l=0;l<p.length;l++){let f=p[l];if(c===f.node||c&&c===f.origin||e===f.origin){p.splice(l,1);break}}if(o.get(e.number).push({node:e,origin:c}),e.name)o.get(e.name).push({node:e,origin:c});if(e.name){let l=ne(s,e.name,new Map),f=!1;if(c)f=!0;else for(let g of l.values())if(!g.hasDuplicateNameToRemove){f=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:f})}},exit({node:e},{openRefs:t}){if(t.get(e.number)===e)t.delete(e.number)}},Group:{enter({node:e},t){if(t.prevFlags=t.currentFlags,e.flags)t.currentFlags=de(t.currentFlags,e.flags)},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:r},n){let{isRecursive:a,ref:s}=e;if(a){let p=t;while(p=p.parent)if(p.type==="CapturingGroup"&&(p.name===s||p.number===s))break;n.reffedNodesByReferencer.set(e,p);return}let o=n.subroutineRefMap.get(s),i=s===0,u=i?fr(0):br(o,n.groupOriginByCopy,null),c=u;if(!i){let p=xr(Pt(o,(f)=>f.type==="Group"&&!!f.flags)),l=p?de(n.globalFlags,p):n.globalFlags;if(!Gt(l,n.currentFlags))c=v({flags:Rt(l)}),c.body[0].body.push(u)}r(C(c,t),{traverse:!i})}},Lt={Backreference({node:e,parent:t,replaceWith:r},n){if(e.orphan){n.highestOrphanBackref=Math.max(n.highestOrphanBackref,e.ref);return}let s=n.reffedNodesByReferencer.get(e).filter((o)=>Ft(o,e));if(!s.length)r(C(U({negate:!0}),t));else if(s.length>1){let o=v({atomic:!0,body:s.reverse().map((i)=>G({body:[ie(i.number)]}))});r(C(o,t))}else e.ref=s[0].number},CapturingGroup({node:e},t){if(e.number=++t.numCapturesToLeft,e.name){if(t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove)delete e.name}},Regex:{exit({node:e},t){let r=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let n=0;n<r;n++){let a=we();e.body.at(-1).body.push(a)}}},Subroutine({node:e},t){if(!e.isRecursive||e.ref===0)return;e.ref=t.reffedNodesByReferencer.get(e).number}};function Cr(e){z(e,{"*"({node:t,parent:r}){t.parent=r}})}function Gt(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function Ft(e,t){let r=t;do{if(r.type==="Regex")return!1;if(r.type==="Alternative")continue;if(r===e)return!1;let n=kr(r.parent);for(let a of n){if(a===r)break;if(a===e||Ar(a,e))return!0}}while(r=r.parent);throw Error("Unexpected path")}function br(e,t,r,n){let a=Array.isArray(e)?[]:{};for(let[s,o]of Object.entries(e))if(s==="parent")a.parent=Array.isArray(r)?n:r;else if(o&&typeof o==="object")a[s]=br(o,t,a,r);else{if(s==="type"&&o==="CapturingGroup")t.set(a,t.get(e)??e);a[s]=o}return a}function fr(e){let t=Ce(e);return t.isRecursive=!0,t}function Pt(e,t){let r=[];while(e=e.parent)if(!t||t(e))r.push(e);return r}function ve(e,t){if(t.has(e))return t.get(e);let r=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,r),r}function xr(e){let t=["dotAll","ignoreCase"],r={enable:{},disable:{}};if(e.forEach(({flags:n})=>{t.forEach((a)=>{if(n.enable?.[a])delete r.disable[a],r.enable[a]=!0;if(n.disable?.[a])r.disable[a]=!0})}),!Object.keys(r.enable).length)delete r.enable;if(!Object.keys(r.disable).length)delete r.disable;if(r.enable||r.disable)return r;return null}function Rt({dotAll:e,ignoreCase:t}){let r={};if(e||t)r.enable={},e&&(r.enable.dotAll=!0),t&&(r.enable.ignoreCase=!0);if(!e||!t)r.disable={},!e&&(r.disable.dotAll=!0),!t&&(r.disable.ignoreCase=!0);return r}function kr(e){if(!e)throw Error("Node expected");let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function Er(e){let t=e.find((r)=>r.kind==="search_start"||Dt(r,{negate:!1})||!Ut(r));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){let r=[];for(let n of t.body){let a=Er(n.body);if(!a)return null;Array.isArray(a)?r.push(...a):r.push(a)}return r}return null}function Ar(e,t){let r=kr(e)??[];for(let n of r)if(n===t||Ar(n,t))return!0;return!1}function Ut({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function Ot(e){let t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function Dt(e,t){let r={negate:null,...t};return e.type==="LookaroundAssertion"&&(r.negate===null||e.negate===r.negate)&&e.body.length===1&&oe(e.body[0],{type:"Assertion",kind:"search_start"})}function Se(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function P(e,t){let n=ue(e,{...t,unicodePropertyMap:Ne}).body;if(n.length>1||n[0].body.length>1)return v({body:n});return n[0].body[0]}function _e(e,t){return e.negate=t,e}function D(e,t){return e.parent=t,e}function C(e,t){return Cr(e),e.parent=t,e}function Bt(e,t){let r=mr(t),n=Me(r.target,"ES2024"),a=Me(r.target,"ES2025"),s=r.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw Error("Invalid recursionLimit; use 2-20");let o=null,i=null;if(!a){let g=[e.flags.ignoreCase];z(e,Tt,{getCurrentModI:()=>g.at(-1),popModI(){g.pop()},pushModI(d){g.push(d)},setHasCasedChar(){if(g.at(-1))o=!0;else i=!0}})}let u={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!i)},c=e,p={accuracy:r.accuracy,appliedGlobalFlags:u,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!a&&o&&i),useFlagMods:a,useFlagV:n,verbose:r.verbose};function l(g){return p.lastNode=c,c=g,bt(zt[g.type],`Unexpected node type "${g.type}"`)(g,p,l)}let f={pattern:e.body.map(l).join("|"),flags:l(e.flags),options:{...e.options}};if(!n)delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null;return f._captureTransfers=new Map,f._hiddenCaptures=[],p.captureMap.forEach((g,d)=>{if(g.hidden)f._hiddenCaptures.push(d);if(g.transferTo)ne(f._captureTransfers,g.transferTo,[]).push(d)}),f}var Tt={"*":{enter({node:e},t){if(gr(e)){let r=t.getCurrentModI();t.pushModI(e.flags?de({ignoreCase:r},e.flags).ignoreCase:r)}},exit({node:e},t){if(gr(e))t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){if(Le(x(e.value)))t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},r){if(t(),Ir(e,{firstOnly:!0}).length)r.setHasCasedChar()},CharacterSet({node:e},t){if(e.kind==="property"&&yr.has(e.value))t.setHasCasedChar()}},zt={Alternative({body:e},t,r){return e.map(r).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?h`\B`:h`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!=="number")throw Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,r){let{body:n,name:a,number:s}=e,o={ignoreCase:t.currentFlags.ignoreCase},i=t.originMap.get(e);if(i){if(o.hidden=!0,s>i.number)o.transferTo=i.number}return t.captureMap.set(s,o),`(${a?`?<${a}>`:""}${n.map(r).join("|")})`},Character({value:e},t){let r=x(e),n=q(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(n!==r)return n;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Le(r)){let a=wr(r);return t.inCharClass?a.join(""):a.length>1?`[${a.join("")}]`:a[0]}return r},CharacterClass(e,t,r){let{kind:n,negate:a,parent:s}=e,{body:o}=e;if(n==="intersection"&&!t.useFlagV)throw Error("Use of character class intersection requires min target ES2024");if(M.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(hr))o=[X(45),...o.filter((c)=>!hr(c))];let i=()=>`[${a?"^":""}${o.map(r).join(n==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||M.bugNestedClassIgnoresNegation)&&!a){let p=o.filter((l)=>l.type==="CharacterClass"&&l.kind==="union"&&l.negate);if(p.length){let l=v(),f=l.body[0];if(l.parent=s,f.parent=l,o=o.filter((g)=>!p.includes(g)),e.body=o,o.length)e.parent=f,f.body.push(e);else l.body.pop();return p.forEach((g)=>{let d=G({body:[g]});g.parent=d,d.parent=l,l.body.push(d)}),r(l)}}t.inCharClass=!0;let c=i();return t.inCharClass=!1,c}let u=o[0];if(n==="union"&&!a&&u&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(M.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&o.length===1&&u.type!=="CharacterClassRange"))return o.map(r).join("");if(!t.useFlagV&&s.type==="CharacterClass")throw Error("Uses nested character class in a way that requires min target ES2024");return i()},CharacterClassRange(e,t){let r=e.min.value,n=e.max.value,a={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=q(r,a),o=q(n,a),i=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){let u=Ir(e);Xt(u).forEach((p)=>{i.add(Array.isArray(p)?`${q(p[0],a)}-${q(p[1],a)}`:q(p,a))})}return`${s}-${o}${[...i].join("")}`},CharacterSet({kind:e,negate:t,value:r,key:n},a){if(e==="dot")return a.currentFlags.dotAll?a.appliedGlobalFlags.dotAll||a.useFlagMods?".":"[^]":h`[^\n]`;if(e==="digit")return t?h`\D`:h`\d`;if(e==="property"){if(a.useAppliedIgnoreCase&&a.currentFlags.ignoreCase&&yr.has(r))throw Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${t?h`\P`:h`\p`}{${n?`${n}=`:""}${r}}`}if(e==="word")return t?h`\W`:h`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:r,parent:n},a,s){let o=a.currentFlags;if(r)a.currentFlags=de(o,r);let i=t.map(s).join("|"),u=!a.verbose&&t.length===1&&n.type!=="Quantifier"&&!e&&(!a.useFlagMods||!r)?i:`(?${Zt(e,r,a.useFlagMods)}${i})`;return a.currentFlags=o,u},LookaroundAssertion({body:e,kind:t,negate:r},n,a){return`(?${`${t==="lookahead"?"":"<"}${r?"!":"="}`}${e.map(a).join("|")})`},Quantifier(e,t,r){return r(e.body)+Qt(e)},Subroutine({isRecursive:e,ref:t},r){if(!e)throw Error("Unexpected non-recursive subroutine in transformed AST");let n=r.recursionLimit;return t===0?`(?R=${n})`:h`\g<${t}&R=${n}>`}},Vt=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),Wt=new Set(["-","\\","]","^","["]),Ht=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),dr=new Map([[9,h`\t`],[10,h`\n`],[11,h`\v`],[12,h`\f`],[13,h`\r`],[8232,h`\u2028`],[8233,h`\u2029`],[65279,h`\uFEFF`]]),jt=/^\p{Cased}$/u;function Le(e){return jt.test(e)}function Ir(e,t){let r=!!t?.firstOnly,n=e.min.value,a=e.max.value,s=[];if(n<65&&(a===65535||a>=131071)||n===65536&&a>=131071)return s;for(let o=n;o<=a;o++){let i=x(o);if(!Le(i))continue;let u=wr(i).filter((c)=>{let p=c.codePointAt(0);return p<n||p>a});if(u.length){if(s.push(...u),r)break}}return s}function q(e,{escDigit:t,inCharClass:r,useFlagV:n}){if(dr.has(e))return dr.get(e);if(e<32||e>126&&e<160||e>262143||t&&qt(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;let a=r?n?Ht:Wt:Vt,s=x(e);return(a.has(s)?"\\":"")+s}function Xt(e){let t=e.map((a)=>a.codePointAt(0)).sort((a,s)=>a-s),r=[],n=null;for(let a=0;a<t.length;a++)if(t[a+1]===t[a]+1)n??=t[a];else if(n===null)r.push(t[a]);else r.push([n,t[a]]),n=null;return r}function Zt(e,t,r){if(e)return">";let n="";if(t&&r){let{enable:a,disable:s}=t;n=(a?.ignoreCase?"i":"")+(a?.dotAll?"s":"")+(s?"-":"")+(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")}return`${n}:`}function Qt({kind:e,max:t,min:r}){let n;if(!r&&t===1)n="?";else if(!r&&t===1/0)n="*";else if(r===1&&t===1/0)n="+";else if(r===t)n=`{${r}}`;else n=`{${r},${t===1/0?"":t}}`;return n+{greedy:"",lazy:"?",possessive:"+"}[e]}function gr({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function qt(e){return e>47&&e<58}function hr({type:e,value:t}){return e==="Character"&&t===45}var Jt=class e extends RegExp{#r=new Map;#e=null;#n;#t=null;#s=null;rawOptions={};get source(){return this.#n||"(?:)"}constructor(t,r,n){let a=!!n?.lazyCompile;if(t instanceof RegExp){if(n)throw Error("Cannot provide options when copying a regexp");let s=t;super(s,r);if(this.#n=s.source,s instanceof e)this.#r=s.#r,this.#t=s.#t,this.#s=s.#s,this.rawOptions=s.rawOptions}else{let s={hiddenCaptures:[],strategy:null,transfers:[],...n};super(a?"":t,r);this.#n=t,this.#r=Yt(s.hiddenCaptures,s.transfers),this.#s=s.strategy,this.rawOptions=n??{}}if(!a)this.#e=this}exec(t){if(!this.#e){let{lazyCompile:a,...s}=this.rawOptions;this.#e=new e(this.#n,this.flags,s)}let r=this.global||this.sticky,n=this.lastIndex;if(this.#s==="clip_search"&&r&&n){this.lastIndex=0;let a=this.#a(t.slice(n));if(a)Kt(a,n,t,this.hasIndices),this.lastIndex+=n;return a}return this.#a(t)}#a(t){this.#e.lastIndex=this.lastIndex;let r=super.exec.call(this.#e,t);if(this.lastIndex=this.#e.lastIndex,!r||!this.#r.size)return r;let n=[...r];r.length=1;let a;if(this.hasIndices)a=[...r.indices],r.indices.length=1;let s=[0];for(let o=1;o<n.length;o++){let{hidden:i,transferTo:u}=this.#r.get(o)??{};if(i)s.push(null);else if(s.push(r.length),r.push(n[o]),this.hasIndices)r.indices.push(a[o]);if(u&&n[o]!==void 0){let c=s[u];if(!c)throw Error(`Invalid capture transfer to "${c}"`);if(r[c]=n[o],this.hasIndices)r.indices[c]=a[o];if(r.groups){if(!this.#t)this.#t=en(this.source);let p=this.#t.get(u);if(p){if(r.groups[p]=n[o],this.hasIndices)r.indices.groups[p]=a[o]}}}}return r}};function Kt(e,t,r,n){if(e.index+=t,e.input=r,n){let a=e.indices;for(let o=0;o<a.length;o++){let i=a[o];if(i)a[o]=[i[0]+t,i[1]+t]}let s=a.groups;if(s)Object.keys(s).forEach((o)=>{let i=s[o];if(i)s[o]=[i[0]+t,i[1]+t]})}}function Yt(e,t){let r=new Map;for(let n of e)r.set(n,{hidden:!0});for(let[n,a]of t)for(let s of a)ne(r,s,{}).transferTo=n;return r}function en(e){let t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map,n=0,a=0,s;while(s=t.exec(e)){let{0:o,groups:{capture:i,name:u}}=s;if(o==="[")n++;else if(!n){if(i){if(a++,u)r.set(a,u)}}else if(o==="]")n--}return r}function $r(e,t){let r=rn(e,t);if(r.options)return new Jt(r.pattern,r.flags,r.options);return new RegExp(r.pattern,r.flags)}function rn(e,t){let r=mr(t),n=ue(e,{flags:r.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline},skipBackrefValidation:r.rules.allowOrphanBackrefs,unicodePropertyMap:Ne}),a=_t(n,{accuracy:r.accuracy,asciiWordBoundaries:r.rules.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,bestEffortTarget:r.target}),s=Bt(a,r),o=lr(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),i=Ee(o.pattern),u=ke(i.pattern,{captureTransfers:o.captureTransfers,hiddenCaptures:o.hiddenCaptures}),c={pattern:u.pattern,flags:`${r.hasIndices?"d":""}${r.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(r.avoidSubclass){if(r.lazyCompileLength!==1/0)throw Error("Lazy compilation requires subclass")}else{let p=u.hiddenCaptures.sort((d,m)=>d-m),l=Array.from(u.captureTransfers),f=a._strategy,g=c.pattern.length>=r.lazyCompileLength;if(p.length||l.length||f||g)c.options={...p.length&&{hiddenCaptures:p},...l.length&&{transfers:l},...f&&{strategy:f},...g&&{lazyCompile:g}}}return c}function vr(e,t){return $r(e,{global:!0,hasIndices:!0,lazyCompileLength:3000,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function tn(e={}){let t={target:"auto",cache:new Map,...e};return t.regexConstructor||=(r)=>vr(r,{target:t.target}),{createScanner(r){return new Fe(r,t)},createString(r){return{content:r}}}}export{tn as createJavaScriptRegexEngine};
@@ -0,0 +1,84 @@
1
+ import{e,Yt,r,b,C,S,E,T,A,I,L,s,N,le,ae,ie,ft,he,ge}from"./chunk-jtwhjp20.js";import{fe}from"./chunk-b5brnfv9.js";import{oe}from"./chunk-kbtbbarw.js";var He=function(){var t=e(function(X,l,o,h){for(o=o||{},h=X.length;h--;o[X[h]]=l);return o},"o"),d=[1,3],f=[1,4],m=[1,5],a=[1,6],u=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],q=[1,22],w=[2,7],R=[1,26],V=[1,27],v=[1,28],F=[1,29],P=[1,33],U=[1,34],Y=[1,35],B=[1,36],Q=[1,37],H=[1,38],K=[1,24],W=[1,31],j=[1,32],G=[1,30],g=[1,39],y=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],J=[1,61],pe=[89,90],Ke=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],xe=[27,29],We=[1,70],je=[1,71],Ge=[1,72],ze=[1,73],Xe=[1,74],Je=[1,75],Ze=[1,76],be=[1,83],Z=[1,80],Re=[1,84],ke=[1,85],ye=[1,86],_e=[1,87],Se=[1,88],Ie=[1,89],Te=[1,90],Ne=[1,91],qe=[1,92],we=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],ee=[63,64],et=[1,101],tt=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],D=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],te=[1,110],se=[1,106],re=[1,107],ne=[1,108],ce=[1,109],ue=[1,111],Ce=[1,116],Ae=[1,117],Ve=[1,114],ve=[1,115],$e={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:e(function(l,o,h,n,p,i,Le){var c=i.length-1;switch(p){case 4:this.$=i[c].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=i[c].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:n.setDirection("TB");break;case 18:n.setDirection("BT");break;case 19:n.setDirection("RL");break;case 20:n.setDirection("LR");break;case 21:n.addRequirement(i[c-3],i[c-4]);break;case 22:n.addRequirement(i[c-5],i[c-6]),n.setClass([i[c-5]],i[c-3]);break;case 23:n.setNewReqId(i[c-2]);break;case 24:n.setNewReqText(i[c-2]);break;case 25:n.setNewReqRisk(i[c-2]);break;case 26:n.setNewReqVerifyMethod(i[c-2]);break;case 29:this.$=n.RequirementType.REQUIREMENT;break;case 30:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=n.RiskLevel.LOW_RISK;break;case 36:this.$=n.RiskLevel.MED_RISK;break;case 37:this.$=n.RiskLevel.HIGH_RISK;break;case 38:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=n.VerifyType.VERIFY_TEST;break;case 42:n.addElement(i[c-3]);break;case 43:n.addElement(i[c-5]),n.setClass([i[c-5]],i[c-3]);break;case 44:n.setNewElementType(i[c-2]);break;case 45:n.setNewElementDocRef(i[c-2]);break;case 48:n.addRelationship(i[c-2],i[c],i[c-4]);break;case 49:n.addRelationship(i[c-2],i[c-4],i[c]);break;case 50:this.$=n.Relationships.CONTAINS;break;case 51:this.$=n.Relationships.COPIES;break;case 52:this.$=n.Relationships.DERIVES;break;case 53:this.$=n.Relationships.SATISFIES;break;case 54:this.$=n.Relationships.VERIFIES;break;case 55:this.$=n.Relationships.REFINES;break;case 56:this.$=n.Relationships.TRACES;break;case 57:this.$=i[c-2],n.defineClass(i[c-1],i[c]);break;case 58:n.setClass(i[c-1],i[c]);break;case 59:n.setClass([i[c-2]],i[c]);break;case 60:case 62:this.$=[i[c]];break;case 61:case 63:this.$=i[c-2].concat([i[c]]);break;case 64:this.$=i[c-2],n.setCssStyle(i[c-1],i[c]);break;case 65:this.$=[i[c]];break;case 66:i[c-2].push(i[c]),this.$=i[c-2];break;case 68:this.$=i[c-1]+i[c];break}},"anonymous"),table:[{3:1,4:2,6:d,9:f,11:m,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:d,9:f,11:m,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(u,[2,6]),{3:12,4:2,6:d,9:f,11:m,13:a},{1:[2,2]},{4:17,5:q,7:13,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},t(u,[2,4]),t(u,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:q,7:42,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:43,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:44,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:45,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:46,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:47,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:48,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:49,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{4:17,5:q,7:50,8:w,9:f,11:m,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:R,22:V,23:v,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:g,90:y},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(k,[2,17]),t(k,[2,18]),t(k,[2,19]),t(k,[2,20]),{30:60,33:62,75:J,89:g,90:y},{30:63,33:62,75:J,89:g,90:y},{30:64,33:62,75:J,89:g,90:y},t(pe,[2,29]),t(pe,[2,30]),t(pe,[2,31]),t(pe,[2,32]),t(pe,[2,33]),t(pe,[2,34]),t(Ke,[2,81]),t(Ke,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(xe,[2,79]),t(xe,[2,80]),{27:[1,67],29:[1,68]},t(xe,[2,85]),t(xe,[2,86]),{62:69,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{62:77,65:We,66:je,67:Ge,68:ze,69:Xe,70:Je,71:Ze},{30:78,33:62,75:J,89:g,90:y},{73:79,75:be,76:Z,78:81,79:82,80:Re,81:ke,82:ye,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},t(we,[2,60]),t(we,[2,62]),{73:93,75:be,76:Z,78:81,79:82,80:Re,81:ke,82:ye,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},{30:94,33:62,75:J,76:Z,89:g,90:y},{5:[1,95]},{30:96,33:62,75:J,89:g,90:y},{5:[1,97]},{30:98,33:62,75:J,89:g,90:y},{63:[1,99]},t(ee,[2,50]),t(ee,[2,51]),t(ee,[2,52]),t(ee,[2,53]),t(ee,[2,54]),t(ee,[2,55]),t(ee,[2,56]),{64:[1,100]},t(k,[2,59],{76:Z}),t(k,[2,64],{76:et}),{33:103,75:[1,102],89:g,90:y},t(tt,[2,65],{79:104,75:be,80:Re,81:ke,82:ye,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),t(D,[2,67]),t(D,[2,69]),t(D,[2,70]),t(D,[2,71]),t(D,[2,72]),t(D,[2,73]),t(D,[2,74]),t(D,[2,75]),t(D,[2,76]),t(D,[2,77]),t(D,[2,78]),t(k,[2,57],{76:et}),t(k,[2,58],{76:Z}),{5:te,28:105,31:se,34:re,36:ne,38:ce,40:ue},{27:[1,112],76:Z},{5:Ce,40:Ae,56:113,57:Ve,59:ve},{27:[1,118],76:Z},{33:119,89:g,90:y},{33:120,89:g,90:y},{75:be,78:121,79:82,80:Re,81:ke,82:ye,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe},t(we,[2,61]),t(we,[2,63]),t(D,[2,68]),t(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:te,28:126,31:se,34:re,36:ne,38:ce,40:ue},t(k,[2,28]),{5:[1,127]},t(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:Ce,40:Ae,56:130,57:Ve,59:ve},t(k,[2,47]),{5:[1,131]},t(k,[2,48]),t(k,[2,49]),t(tt,[2,66],{79:104,75:be,80:Re,81:ke,82:ye,83:_e,84:Se,85:Ie,86:Te,87:Ne,88:qe}),{33:132,89:g,90:y},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(k,[2,27]),{5:te,28:145,31:se,34:re,36:ne,38:ce,40:ue},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(k,[2,46]),{5:Ce,40:Ae,56:152,57:Ve,59:ve},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(k,[2,43]),{5:te,28:159,31:se,34:re,36:ne,38:ce,40:ue},{5:te,28:160,31:se,34:re,36:ne,38:ce,40:ue},{5:te,28:161,31:se,34:re,36:ne,38:ce,40:ue},{5:te,28:162,31:se,34:re,36:ne,38:ce,40:ue},{5:Ce,40:Ae,56:163,57:Ve,59:ve},{5:Ce,40:Ae,56:164,57:Ve,59:ve},t(k,[2,23]),t(k,[2,24]),t(k,[2,25]),t(k,[2,26]),t(k,[2,44]),t(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:e(function(l,o){if(o.recoverable)this.trace(l);else{var h=Error(l);throw h.hash=o,h}},"parseError"),parse:e(function(l){var o=this,h=[0],n=[],p=[null],i=[],Le=this.table,c="",Oe=0,st=0,it=0,ct=2,rt=1,ht=i.slice.call(arguments,1),_=Object.create(this.lexer),me={yy:{}};for(var Pe in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Pe))me.yy[Pe]=this.yy[Pe];if(_.setInput(l,me.yy),me.yy.lexer=_,me.yy.parser=this,typeof _.yylloc>"u")_.yylloc={};var Ue=_.yylloc;i.push(Ue);var ut=_.options&&_.options.ranges;if(typeof me.yy.parseError==="function")this.parseError=me.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function mt(M){h.length=h.length-2*M,p.length=p.length-M,i.length=i.length-M}e(mt,"popStack");function nt(){var M=n.pop()||_.lex()||rt;if(typeof M!=="number"){if(M instanceof Array)n=M,M=n.pop();M=o.symbols_[M]||M}return M}e(nt,"lex");var x,Ye,de,O,gt,Be,Ee={},Me,z,at,Fe;while(!0){if(de=h[h.length-1],this.defaultActions[de])O=this.defaultActions[de];else{if(x===null||typeof x>"u")x=nt();O=Le[de]&&Le[de][x]}if(typeof O>"u"||!O.length||!O[0]){var Qe="";Fe=[];for(Me in Le[de])if(this.terminals_[Me]&&Me>ct)Fe.push("'"+this.terminals_[Me]+"'");if(_.showPosition)Qe="Parse error on line "+(Oe+1)+`:
2
+ `+_.showPosition()+`
3
+ Expecting `+Fe.join(", ")+", got '"+(this.terminals_[x]||x)+"'";else Qe="Parse error on line "+(Oe+1)+": Unexpected "+(x==rt?"end of input":"'"+(this.terminals_[x]||x)+"'");this.parseError(Qe,{text:_.match,token:this.terminals_[x]||x,line:_.yylineno,loc:Ue,expected:Fe})}if(O[0]instanceof Array&&O.length>1)throw Error("Parse Error: multiple actions possible at state: "+de+", token: "+x);switch(O[0]){case 1:if(h.push(x),p.push(_.yytext),i.push(_.yylloc),h.push(O[1]),x=null,!Ye){if(st=_.yyleng,c=_.yytext,Oe=_.yylineno,Ue=_.yylloc,it>0)it--}else x=Ye,Ye=null;break;case 2:if(z=this.productions_[O[1]][1],Ee.$=p[p.length-z],Ee._$={first_line:i[i.length-(z||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(z||1)].first_column,last_column:i[i.length-1].last_column},ut)Ee._$.range=[i[i.length-(z||1)].range[0],i[i.length-1].range[1]];if(Be=this.performAction.apply(Ee,[c,st,Oe,me.yy,O[1],p,i].concat(ht)),typeof Be<"u")return Be;if(z)h=h.slice(0,-1*z*2),p=p.slice(0,-1*z),i=i.slice(0,-1*z);h.push(this.productions_[O[1]][0]),p.push(Ee.$),i.push(Ee._$),at=Le[h[h.length-2]][h[h.length-1]],h.push(at);break;case 3:return!0}}return!0},"parse")},ot=function(){var X={EOF:1,parseError:e(function(o,h){if(this.yy.parser)this.yy.parser.parseError(o,h);else throw Error(o)},"parseError"),setInput:e(function(l,o){if(this.yy=o||this.yy||{},this._input=l,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:e(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var o=l.match(/(?:\r\n?|\n).*/g);if(o)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),l},"input"),unput:e(function(l){var o=l.length,h=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var n=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1)this.yylineno-=h.length-1;var p=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===n.length?this.yylloc.first_column:0)+n[n.length-h.length].length-h[0].length:this.yylloc.first_column-o},this.options.ranges)this.yylloc.range=[p[0],p[0]+this.yyleng-o];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(l){this.unput(this.match.slice(l))},"less"),pastInput:e(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var l=this.match;if(l.length<20)l+=this._input.substr(0,20-l.length);return(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var l=this.pastInput(),o=Array(l.length+1).join("-");return l+this.upcomingInput()+`
5
+ `+o+"^"},"showPosition"),test_match:e(function(l,o){var h,n,p;if(this.options.backtrack_lexer){if(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)p.yylloc.range=this.yylloc.range.slice(0)}if(n=l[0].match(/(?:\r\n?|\n).*/g),n)this.yylineno+=n.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(l[0].length),this.matched+=l[0],h=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(h)return h;else if(this._backtrack){for(var i in p)this[i]=p[i];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var l,o,h,n;if(!this._more)this.yytext="",this.match="";var p=this._currentRules();for(var i=0;i<p.length;i++)if(h=this._input.match(this.rules[p[i]]),h&&(!o||h[0].length>o[0].length)){if(o=h,n=i,this.options.backtrack_lexer)if(l=this.test_match(h,p[i]),l!==!1)return l;else if(this._backtrack){o=!1;continue}else return!1;else if(!this.options.flex)break}if(o){if(l=this.test_match(o,p[n]),l!==!1)return l;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var o=this.next();if(o)return o;else return this.lex()},"lex"),begin:e(function(o){this.conditionStack.push(o)},"begin"),popState:e(function(){var o=this.conditionStack.length-1;if(o>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(o){if(o=this.conditionStack.length-1-Math.abs(o||0),o>=0)return this.conditionStack[o];else return"INITIAL"},"topState"),pushState:e(function(o){this.begin(o)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(o,h,n,p){var i=p;switch(n){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return h.yytext=h.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return X}();$e.lexer=ot;function De(){this.yy={}}return e(De,"Parser"),De.prototype=$e,$e.Parser=De,new De}();He.parser=He;var dt=He,pt=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=S,this.getAccTitle=E,this.setAccDescription=T,this.getAccDescription=A,this.setDiagramTitle=I,this.getDiagramTitle=L,this.getConfig=e(()=>s().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{e(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(t,d){if(!this.requirements.has(t))this.requirements.set(t,{name:t,type:d,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]});return this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){if(this.latestRequirement!==void 0)this.latestRequirement.requirementId=t}setNewReqText(t){if(this.latestRequirement!==void 0)this.latestRequirement.text=t}setNewReqRisk(t){if(this.latestRequirement!==void 0)this.latestRequirement.risk=t}setNewReqVerifyMethod(t){if(this.latestRequirement!==void 0)this.latestRequirement.verifyMethod=t}addElement(t){if(!this.elements.has(t))this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),r.info("Added new element: ",t);return this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){if(this.latestElement!==void 0)this.latestElement.type=t}setNewElementDocRef(t){if(this.latestElement!==void 0)this.latestElement.docRef=t}addRelationship(t,d,f){this.relations.push({type:t,src:d,dst:f})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,C()}setCssStyle(t,d){for(let f of t){let m=this.requirements.get(f)??this.elements.get(f);if(!d||!m)return;for(let a of d)if(a.includes(","))m.cssStyles.push(...a.split(","));else m.cssStyles.push(a)}}setClass(t,d){for(let f of t){let m=this.requirements.get(f)??this.elements.get(f);if(m)for(let a of d){m.classes.push(a);let u=this.classes.get(a)?.styles;if(u)m.cssStyles.push(...u)}}}defineClass(t,d){for(let f of t){let m=this.classes.get(f);if(m===void 0)m={id:f,styles:[],textStyles:[]},this.classes.set(f,m);if(d)d.forEach(function(a){if(/color/.exec(a)){let u=a.replace("fill","bgFill");m.textStyles.push(u)}m.styles.push(a)});this.requirements.forEach((a)=>{if(a.classes.includes(f))a.cssStyles.push(...d.flatMap((u)=>u.split(",")))}),this.elements.forEach((a)=>{if(a.classes.includes(f))a.cssStyles.push(...d.flatMap((u)=>u.split(",")))})}}getClasses(){return this.classes}getData(){let t=s(),d=[],f=[];for(let a of this.requirements.values()){let u=a;u.id=a.name,u.cssStyles=a.cssStyles,u.cssClasses=a.classes.join(" "),u.shape="requirementBox",u.look=t.look,u.colorIndex=d.length,d.push(u)}for(let a of this.elements.values()){let u=a;u.shape="requirementBox",u.look=t.look,u.id=a.name,u.cssStyles=a.cssStyles,u.cssClasses=a.classes.join(" "),u.colorIndex=d.length,d.push(u)}let m=0;for(let a of this.relations){let u=a.type===this.Relationships.CONTAINS,q={id:`${a.src}-${a.dst}-${m++}`,start:this.requirements.get(a.src)?.name??this.elements.get(a.src)?.name,end:this.requirements.get(a.dst)?.name??this.elements.get(a.dst)?.name,label:`&lt;&lt;${a.type}&gt;&gt;`,classes:"relationshipLine",style:["fill:none",u?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:u?"normal":"dashed",arrowTypeStart:u?"requirement_contains":"",arrowTypeEnd:u?"":"requirement_arrow",look:t.look,labelType:"markdown"};f.push(q)}return{nodes:d,edges:f,other:{},config:t,direction:this.getDirection()}}},Et=e(()=>{let t=b(),{theme:d,themeVariables:f}=t,{bkgColorArray:m,borderColorArray:a}=f;if(!ae(d,a))return"";let u=ie(t.look),q="",w=le(m);for(let R=0;R<ft(a);R++){let V=a[R],v=w?`fill: ${m[R%m.length]};`:"";q+=`
7
+
8
+ [data-look="${u}"][data-color-id="color-${R}"].node path {
9
+ stroke: ${V};
10
+ ${v}
11
+ }
12
+
13
+ [data-look="${u}"][data-color-id="color-${R}"].node rect {
14
+ stroke: ${V};
15
+ ${v}
16
+ }
17
+ `}return q},"genColor"),bt=e((t)=>{let d=b(),{look:f,themeVariables:m}=d,{requirementEdgeLabelBackground:a}=m;return`
18
+ ${Et()}
19
+ marker {
20
+ fill: ${t.relationColor};
21
+ stroke: ${t.relationColor};
22
+ }
23
+
24
+ marker.cross {
25
+ stroke: ${t.lineColor};
26
+ }
27
+
28
+ svg {
29
+ font-family: ${t.fontFamily};
30
+ font-size: ${t.fontSize};
31
+ }
32
+
33
+ .reqBox {
34
+ fill: ${t.requirementBackground};
35
+ fill-opacity: 1.0;
36
+ stroke: ${t.requirementBorderColor};
37
+ stroke-width: ${t.requirementBorderSize};
38
+ }
39
+
40
+ .reqTitle, .reqLabel{
41
+ fill: ${t.requirementTextColor};
42
+ }
43
+ .reqLabelBox {
44
+ fill: ${t.relationLabelBackground};
45
+ fill-opacity: 1.0;
46
+ }
47
+
48
+ .req-title-line {
49
+ stroke: ${t.requirementBorderColor};
50
+ stroke-width: ${t.requirementBorderSize};
51
+ }
52
+ .relationshipLine {
53
+ stroke: ${t.relationColor};
54
+ stroke-width: ${f==="neo"?t.strokeWidth:"1px"};
55
+ }
56
+ .relationshipLabel {
57
+ fill: ${t.relationLabelColor};
58
+ }
59
+ .edgeLabel {
60
+ background-color: ${t.edgeLabelBackground};
61
+ }
62
+ .edgeLabel .label rect {
63
+ fill: ${t.edgeLabelBackground};
64
+ }
65
+ .edgeLabel .label text {
66
+ fill: ${t.relationLabelColor};
67
+ }
68
+ .divider {
69
+ stroke: ${t.nodeBorder};
70
+ stroke-width: 1;
71
+ }
72
+ .label {
73
+ font-family: ${t.fontFamily};
74
+ color: ${t.nodeTextColor||t.textColor};
75
+ }
76
+ .label text,span {
77
+ fill: ${t.nodeTextColor||t.textColor};
78
+ color: ${t.nodeTextColor||t.textColor};
79
+ }
80
+ .labelBkg {
81
+ background-color: ${a??t.edgeLabelBackground};
82
+ }
83
+
84
+ `},"getStyles"),Rt=bt,lt={};Yt(lt,{draw:()=>kt});var kt=e(async function(t,d,f,m){r.info("REF0:"),r.info("Drawing requirement diagram (unified)",d);let{securityLevel:a,state:u,layout:q,look:w}=s(),R=m.db.getData(),V=fe(d,a);R.type=m.type,R.layoutAlgorithm=ge(q),R.nodeSpacing=u?.nodeSpacing??50,R.rankSpacing=u?.rankSpacing??50,R.markers=w==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],R.diagramId=d,await he(R,V);let v=8;N.insertTitle(V,"requirementDiagramTitleText",u?.titleTopMargin??25,m.db.getDiagramTitle()),oe(V,v,"requirementDiagram",u?.useMaxWidth??!0)},"draw"),Mt={parser:dt,get db(){return new pt},renderer:lt,styles:Rt};export{Mt as diagram};